Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into site-preview-not-auth…
Browse files Browse the repository at this point in the history
…proxy
  • Loading branch information
fraxachun committed Sep 25, 2024
2 parents 11eb1ed + b433d53 commit 49f0995
Show file tree
Hide file tree
Showing 63 changed files with 531 additions and 316 deletions.
5 changes: 5 additions & 0 deletions .changeset/six-rules-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/admin": patch
---

Fix an issue where the clear button of `SelectField` would be shown, even if the value is `undefined`
5 changes: 5 additions & 0 deletions .changeset/soft-flies-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/admin": patch
---

Allow setting all props of `FinalFormSelect` via `componentsProps` in `SelectField`
5 changes: 5 additions & 0 deletions .changeset/yellow-toes-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/cms-admin": patch
---

Support numbers as content scope values in User Permissions administration panel
3 changes: 2 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ The versions of the project that are currently supported with security updates.

| Version | Supported |
| ------: | :------------------------------------ |
| 6.x | :white_check_mark: |
| 7.x | :white_check_mark: |
| 6.x | :white_check_mark: (until 2025-07-31) |
| 5.x | :white_check_mark: (until 2025-01-30) |
| 4.x | :white_check_mark: (until 2024-11-21) |
| < 4.x | :x: |
Expand Down
18 changes: 7 additions & 11 deletions demo/admin/src/products/ManufacturersGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import {
usePersistentColumnState,
} from "@comet/admin";
import { Add as AddIcon, Edit, Info } from "@comet/admin-icons";
import { Button, IconButton, Typography } from "@mui/material";
import { DataGridPro, GridToolbarQuickFilter } from "@mui/x-data-grid-pro";
import { Button, IconButton } from "@mui/material";
import { DataGridPro, GridColumnHeaderTitle, GridToolbarQuickFilter } from "@mui/x-data-grid-pro";
import {
GQLCreateManufacturerMutation,
GQLCreateManufacturerMutationVariables,
Expand Down Expand Up @@ -62,19 +62,15 @@ export function ManufacturersGrid() {
field: "id",
width: 150,
renderHeader: () => (
<div style={{ display: "flex", alignItems: "center" }}>
<Typography fontWeight={400} fontSize={14}>
{intl.formatMessage({ id: "manufacturers.id", defaultMessage: "ID" })}
</Typography>
<>
<GridColumnHeaderTitle label={intl.formatMessage({ id: "manufacturers.id", defaultMessage: "ID" })} columnWidth={150} />
<Tooltip
trigger="click"
trigger="hover"
title={<FormattedMessage id="comet.manufacturers.id.info" defaultMessage="The id of the manufacturer" />}
>
<IconButton>
<Info />
</IconButton>
<Info sx={{ marginLeft: 1 }} />
</Tooltip>
</div>
</>
),
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const CombinationFieldsTestProductsGrid: GridConfig<GQLProduct> = {
headerName: "Title and Category",
primaryText: "title",
secondaryText: {
type: "string",
type: "text",
field: "category.title",
emptyValue: "No category set",
},
Expand Down
9 changes: 7 additions & 2 deletions demo/admin/src/products/future/ManufacturersGrid.cometGen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ export const ManufacturersGrid: GridConfig<GQLManufacturer> = {
{ type: "text", name: "name", headerName: "Name" },
{ type: "text", name: "address.street", headerName: "Street" },
{ type: "number", name: "address.streetNumber", headerName: "Street number" },
{ type: "text", name: "address.alternativeAddress.street", headerName: "Alt-Street" },
{ type: "number", name: "address.alternativeAddress.streetNumber", headerName: "Alt-Street number" },
{ type: "text", name: "address.alternativeAddress.street", headerName: "Alt-Street", headerInfoTooltip: "Street of alternative address" },
{
type: "number",
name: "address.alternativeAddress.streetNumber",
headerName: "Alt-Street number",
headerInfoTooltip: "Street number of alternative address",
},
{ type: "text", name: "addressAsEmbeddable.street", headerName: "Street 2" },
{ type: "number", name: "addressAsEmbeddable.streetNumber", headerName: "Street number 2" },
{ type: "text", name: "addressAsEmbeddable.alternativeAddress.street", headerName: "Alt-Street 2" },
Expand Down
2 changes: 1 addition & 1 deletion demo/admin/src/products/future/ProductsGrid.cometGen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const ProductsGrid: GridConfig<GQLProduct> = {
},
{ type: "text", name: "title", headerName: "Titel", minWidth: 200, maxWidth: 250, visible: "up('md')" },
{ type: "text", name: "description", headerName: "Description", visible: "up('md')" },
{ type: "number", name: "price", headerName: "Price", maxWidth: 150 },
{ type: "number", name: "price", headerName: "Price", maxWidth: 150, headerInfoTooltip: "Price in EUR" },
{ type: "boolean", name: "inStock", headerName: "In stock", width: 90 },
{ type: "staticSelect", name: "type", maxWidth: 150, values: [{ value: "Cap", label: "great Cap" }, "Shirt", "Tie"] },
{ type: "date", name: "availableSince", width: 140 },
Expand Down
48 changes: 44 additions & 4 deletions demo/admin/src/products/future/generated/ManufacturersGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ import {
ToolbarActions,
ToolbarFillSpace,
ToolbarItem,
Tooltip,
useBufferedRowCount,
useDataGridRemote,
usePersistentColumnState,
} from "@comet/admin";
import { Add as AddIcon, Edit } from "@comet/admin-icons";
import { Add as AddIcon, Edit, Info } from "@comet/admin-icons";
import { Button, IconButton } from "@mui/material";
import { DataGridPro, GridToolbarQuickFilter } from "@mui/x-data-grid-pro";
import { DataGridPro, GridColumnHeaderTitle, GridToolbarQuickFilter } from "@mui/x-data-grid-pro";
import * as React from "react";
import { FormattedMessage, useIntl } from "react-intl";

Expand Down Expand Up @@ -137,7 +138,25 @@ export function ManufacturersGrid(): React.ReactElement {
},
{
field: "address_alternativeAddress_street",
headerName: intl.formatMessage({ id: "manufacturer.address.alternativeAddress.street", defaultMessage: "Alt-Street" }),
renderHeader: () => (
<>
<GridColumnHeaderTitle
label={intl.formatMessage({ id: "manufacturer.address.alternativeAddress.street", defaultMessage: "Alt-Street" })}
columnWidth={150}
/>
<Tooltip
trigger="hover"
title={
<FormattedMessage
id="manufacturer.address.alternativeAddress.street.tooltip"
defaultMessage="Street of alternative address"
/>
}
>
<Info sx={{ marginLeft: 1 }} />
</Tooltip>
</>
),
filterable: false,
sortable: false,
valueGetter: ({ row }) => row.address?.alternativeAddress?.street,
Expand All @@ -146,7 +165,28 @@ export function ManufacturersGrid(): React.ReactElement {
},
{
field: "address_alternativeAddress_streetNumber",
headerName: intl.formatMessage({ id: "manufacturer.address.alternativeAddress.streetNumber", defaultMessage: "Alt-Street number" }),
renderHeader: () => (
<>
<GridColumnHeaderTitle
label={intl.formatMessage({
id: "manufacturer.address.alternativeAddress.streetNumber",
defaultMessage: "Alt-Street number",
})}
columnWidth={150}
/>
<Tooltip
trigger="hover"
title={
<FormattedMessage
id="manufacturer.address.alternativeAddress.streetNumber.tooltip"
defaultMessage="Street number of alternative address"
/>
}
>
<Info sx={{ marginLeft: 1 }} />
</Tooltip>
</>
),
type: "number",
filterable: false,
sortable: false,
Expand Down
23 changes: 16 additions & 7 deletions demo/admin/src/products/future/generated/ProductsGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ import {
ToolbarActions,
ToolbarFillSpace,
ToolbarItem,
Tooltip,
useBufferedRowCount,
useDataGridRemote,
usePersistentColumnState,
} from "@comet/admin";
import { Info } from "@comet/admin-icons";
import { DamImageBlock } from "@comet/cms-admin";
import { useTheme } from "@mui/material";
import { DataGridPro, GridRenderCellParams, GridToolbarQuickFilter } from "@mui/x-data-grid-pro";
import { DataGridPro, GridColumnHeaderTitle, GridRenderCellParams, GridToolbarQuickFilter } from "@mui/x-data-grid-pro";
import { GQLProductFilter } from "@src/graphql.generated";
import * as React from "react";
import { useIntl } from "react-intl";
import { FormattedMessage, useIntl } from "react-intl";

import { ProductsGridPreviewAction } from "../../ProductsGridPreviewAction";
import {
Expand Down Expand Up @@ -115,16 +117,16 @@ export function ProductsGrid({ filter, toolbarAction, rowAction }: Props): React
flex: 1,
visible: theme.breakpoints.down("md"),
sortBy: ["title", "description"],
maxWidth: 250,
minWidth: 200,
maxWidth: 250,
},
{
field: "title",
headerName: intl.formatMessage({ id: "product.title", defaultMessage: "Titel" }),
flex: 1,
visible: theme.breakpoints.up("md"),
maxWidth: 250,
minWidth: 200,
maxWidth: 250,
},
{
field: "description",
Expand All @@ -135,11 +137,18 @@ export function ProductsGrid({ filter, toolbarAction, rowAction }: Props): React
},
{
field: "price",
headerName: intl.formatMessage({ id: "product.price", defaultMessage: "Price" }),
renderHeader: () => (
<>
<GridColumnHeaderTitle label={intl.formatMessage({ id: "product.price", defaultMessage: "Price" })} columnWidth={150} />
<Tooltip trigger="hover" title={<FormattedMessage id="product.price.tooltip" defaultMessage="Price in EUR" />}>
<Info sx={{ marginLeft: 1 }} />
</Tooltip>
</>
),
type: "number",
flex: 1,
maxWidth: 150,
minWidth: 150,
maxWidth: 150,
},
{ field: "inStock", headerName: intl.formatMessage({ id: "product.inStock", defaultMessage: "In stock" }), type: "boolean", width: 90 },
{
Expand All @@ -163,8 +172,8 @@ export function ProductsGrid({ filter, toolbarAction, rowAction }: Props): React
return row.type;
},
flex: 1,
maxWidth: 150,
minWidth: 150,
maxWidth: 150,
},
{
field: "availableSince",
Expand Down
5 changes: 2 additions & 3 deletions demo/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
"mikro-orm": "mikro-orm",
"mikro-orm:drop": "mikro-orm schema:drop -r",
"mikro-orm:migration:generate": "mikro-orm migration:create",
"start": "$npm_execpath prebuild && dotenv -c -- nest start",
"start:debug": "$npm_execpath prebuild && dotenv -c -- nest start --debug --watch --preserveWatchOutput",
"start:dev": "$npm_execpath prebuild && $npm_execpath db:migrate && $npm_execpath console createBlockIndexViews && dotenv -c -- nest start --watch --preserveWatchOutput",
"start": "$npm_execpath prebuild && dotenv -c -- nest start --debug --watch --preserveWatchOutput",
"start:dev": "$npm_execpath prebuild && $npm_execpath db:migrate && $npm_execpath console createBlockIndexViews && dotenv -c -- nest start --debug --watch --preserveWatchOutput",
"start:prod": "node dist/main"
},
"dependencies": {
Expand Down
34 changes: 17 additions & 17 deletions demo/api/schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,23 @@ A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date
"""
scalar DateTime

type Dependency {
rootId: String!
rootGraphqlObjectType: String!
rootColumnName: String!
jsonPath: String!
visible: Boolean!
targetGraphqlObjectType: String!
targetId: String!
name: String
secondaryInformation: String
}

type PaginatedDependencies {
nodes: [Dependency!]!
totalCount: Int!
}

type ImageCropArea {
focalPoint: FocalPoint!
width: Float
Expand Down Expand Up @@ -90,23 +107,6 @@ enum LicenseType {
RIGHTS_MANAGED
}

type Dependency {
rootId: String!
rootGraphqlObjectType: String!
rootColumnName: String!
jsonPath: String!
visible: Boolean!
targetGraphqlObjectType: String!
targetId: String!
name: String
secondaryInformation: String
}

type PaginatedDependencies {
nodes: [Dependency!]!
totalCount: Int!
}

type BuildTemplate {
id: ID!
name: String!
Expand Down
3 changes: 0 additions & 3 deletions demo/site/src/header/PageLink.fragment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ export const pageLinkFragment = gql`
... on Link {
content
}
... on PredefinedPage {
type
}
}
}
`;
2 changes: 2 additions & 0 deletions packages/admin/admin-babel-preset/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @comet/admin-babel-preset

## 7.4.2

## 7.4.1

## 7.4.0
Expand Down
2 changes: 1 addition & 1 deletion packages/admin/admin-babel-preset/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@comet/admin-babel-preset",
"version": "7.4.1",
"version": "7.4.2",
"repository": {
"type": "git",
"url": "https://github.com/vivid-planet/comet",
Expand Down
7 changes: 7 additions & 0 deletions packages/admin/admin-color-picker/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @comet/admin-color-picker

## 7.4.2

### Patch Changes

- @comet/admin@7.4.2
- @comet/admin-icons@7.4.2

## 7.4.1

### Patch Changes
Expand Down
10 changes: 5 additions & 5 deletions packages/admin/admin-color-picker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@comet/admin-color-picker",
"version": "7.4.1",
"version": "7.4.2",
"repository": {
"type": "git",
"url": "https://github.com/vivid-planet/comet",
Expand All @@ -26,8 +26,8 @@
"start:types": "tsc --project ./tsconfig.json --emitDeclarationOnly --watch --preserveWatchOutput"
},
"dependencies": {
"@comet/admin": "workspace:^7.4.1",
"@comet/admin-icons": "workspace:^7.4.1",
"@comet/admin": "workspace:^7.4.2",
"@comet/admin-icons": "workspace:^7.4.2",
"clsx": "^1.1.1",
"react-colorful": "^5.5.1",
"tinycolor2": "^1.4.1",
Expand All @@ -36,8 +36,8 @@
"devDependencies": {
"@babel/cli": "^7.17.6",
"@babel/core": "^7.20.12",
"@comet/admin-babel-preset": "workspace:^7.4.1",
"@comet/eslint-config": "workspace:^7.4.1",
"@comet/admin-babel-preset": "workspace:^7.4.2",
"@comet/eslint-config": "workspace:^7.4.2",
"@mui/material": "^5.0.0",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/admin/admin-date-time/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @comet/admin-date-time

## 7.4.2

### Patch Changes

- @comet/admin@7.4.2
- @comet/admin-icons@7.4.2

## 7.4.1

### Patch Changes
Expand Down
Loading

0 comments on commit 49f0995

Please sign in to comment.