diff --git a/.changeset/beige-brooms-try.md b/.changeset/beige-brooms-try.md deleted file mode 100644 index 7d54e1700b..0000000000 --- a/.changeset/beige-brooms-try.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/cms-api": major ---- - -Remove `download` helper - -Use `createFileUploadInputFromUrl` instead. diff --git a/.changeset/blue-apricots-appear.md b/.changeset/blue-apricots-appear.md deleted file mode 100644 index 9a53169fc3..0000000000 --- a/.changeset/blue-apricots-appear.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/cms-api": minor ---- - -API Generator: Add support for filtering one-to-many relations by id diff --git a/.changeset/brave-kiwis-pay.md b/.changeset/brave-kiwis-pay.md deleted file mode 100644 index aa46ea5c70..0000000000 --- a/.changeset/brave-kiwis-pay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin": minor ---- - -Add `StackToolbar`, a variant of `Toolbar` component that hides itself in a nested stack diff --git a/.changeset/bright-dolls-live.md b/.changeset/bright-dolls-live.md deleted file mode 100644 index f3bebda792..0000000000 --- a/.changeset/bright-dolls-live.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -"@comet/cms-api": major ---- - -Remove CDN config from DAM - -It was a bad idea to introduce this in the first place, because `@comet/cms-api` should not be opinionated about how the CDN works. - -Modern applications require all traffic to be routed through a CDN. Cloudflare offers a tunnel, which made the origin-check obsolete, so we introduced a flag to disable the origin check. - -Also changes the behavior of the `FilesService::createFileUrl()`-method which now expects an options-object as second argument. - -## How to migrate (only required if CDN is used): - -Remove the following env vars from the API - -``` -DAM_CDN_ENABLED= -DAM_CDN_DOMAIN= -DAM_CDN_ORIGIN_HEADER= -DAM_DISABLE_CDN_ORIGIN_HEADER_CHECK=false -``` - -If you want to enable the origin check: - -1. Set the following env vars for the API - -``` -CDN_ORIGIN_CHECK_SECRET="Use value from DAM_CDN_ORIGIN_HEADER to avoid downtime" -``` - -_environment-variables.ts_ - -``` -@IsOptional() -@IsString() -CDN_ORIGIN_CHECK_SECRET: string; -``` - -_config.ts_ - -``` -cdn: { - originCheckSecret: envVars.CDN_ORIGIN_CHECK_SECRET, -}, -``` - -2. Add CdnGuard - -``` -// if CDN is enabled, make sure all traffic is either coming from the CDN or internal sources -if (config.cdn.originCheckSecret) { - app.useGlobalGuards(new CdnGuard({ headerName: "x-cdn-origin-check", headerValue: config.cdn.originCheckSecret })); -} -``` - -3. DNS changes might be required. `api.example.com` should point to CDN, CDN should point to internal API domain diff --git a/.changeset/bright-lobsters-shout.md b/.changeset/bright-lobsters-shout.md deleted file mode 100644 index 3ed2dece9b..0000000000 --- a/.changeset/bright-lobsters-shout.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/cms-api": major ---- - -Remove `FileUploadService` - -Use `createFileUploadInputFromUrl` instead of `FileUploadService#createFileUploadInputFromUrl`. diff --git a/.changeset/brown-cups-exist.md b/.changeset/brown-cups-exist.md deleted file mode 100644 index f4df582932..0000000000 --- a/.changeset/brown-cups-exist.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin": major ---- - -Remove `clearable` prop from `FinalFormSelect` and `FinalFormAsyncSelect` - -`FinalFormSelect` and `FinalFormAsyncSelect` are now clearable when `required` is not set. diff --git a/.changeset/brown-kids-develop.md b/.changeset/brown-kids-develop.md deleted file mode 100644 index 883bfcd1e0..0000000000 --- a/.changeset/brown-kids-develop.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin": major ---- - -Create a subroute by default in `SaveBoundary` - -The default path is `./save`, you can change it using the `subRoutePath` prop. diff --git a/.changeset/chatty-walls-study.md b/.changeset/chatty-walls-study.md deleted file mode 100644 index eacc778281..0000000000 --- a/.changeset/chatty-walls-study.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin": minor ---- - -Add hover effect for collapsed menu icons. This ensures that navigation is also possible in collapsed state. diff --git a/.changeset/chilled-walls-shop.md b/.changeset/chilled-walls-shop.md deleted file mode 100644 index 3e0182fc81..0000000000 --- a/.changeset/chilled-walls-shop.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -"@comet/eslint-config": major ---- - -Add the rule `@typescript-eslint/prefer-enum-initializers` to require enum initializers - -```ts -// ✅ -enum ExampleEnum { - One = "One", - Two = "Two", -} -``` - -```ts -// ❌ -enum ExampleEnum { - One, - Two, -} -``` diff --git a/.changeset/clean-apes-vanish.md b/.changeset/clean-apes-vanish.md deleted file mode 100644 index 97933e1fc1..0000000000 --- a/.changeset/clean-apes-vanish.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@comet/cms-admin": major -"@comet/cms-api": major ---- - -Remove `language` field from `User` object - -- Providing the locale is not mandatory for ID-Tokens -- Does not have a real use case (better rely on the Accept-Language header of the browser to determine the language of the current user) diff --git a/.changeset/clean-insects-happen.md b/.changeset/clean-insects-happen.md deleted file mode 100644 index 1e08dab2ca..0000000000 --- a/.changeset/clean-insects-happen.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@comet/cms-api": major ---- - -`FilesService#createFileDownloadUrl` now expects an options object as second parameter - -```diff -- this.filesService.createFileDownloadUrl(file, previewDamUrls) -+ this.filesService.createFileDownloadUrl(file, { previewDamUrls, relativeDamUrls }) -``` diff --git a/.changeset/clever-clocks-smile.md b/.changeset/clever-clocks-smile.md deleted file mode 100644 index 2fcd094778..0000000000 --- a/.changeset/clever-clocks-smile.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin-color-picker": major ---- - -Replace the `componentsProps` prop with `slotProps` in `ColorPicker` and remove the `ColorPickerComponentsProps` type diff --git a/.changeset/cool-kangaroos-cough.md b/.changeset/cool-kangaroos-cough.md deleted file mode 100644 index a8cd93aa1c..0000000000 --- a/.changeset/cool-kangaroos-cough.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -"@comet/cms-admin": major ---- - -Remove `EditPageLayout` - -You can completely remove `EditPageLayout` from your application. -Instead, use `MainContent` to wrap all your page content except the `Toolbar`. -If needed, wrap `MainContent` and `Toolbar` in a fragment. - -Example: - -```diff -- -+ <> - - // ... - --
-+ - // ... --
-+ --
-+ -``` diff --git a/.changeset/cool-kiwis-shop.md b/.changeset/cool-kiwis-shop.md deleted file mode 100644 index 8003fdf773..0000000000 --- a/.changeset/cool-kiwis-shop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin-theme": major ---- - -Rework theme of MUI's `Chip` to match the updated Comet CI diff --git a/.changeset/curly-pillows-decide.md b/.changeset/curly-pillows-decide.md deleted file mode 100644 index 58276674a4..0000000000 --- a/.changeset/curly-pillows-decide.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -"@comet/admin": minor ---- - -Add new `DataGridToolbar` component - -The "normal" `Toolbar` is meant to be used on page-level to show the current scope, breadcrumbs and page-wide action buttons (like save). -The `DataGridToolbar`, however, is meant to be used in DataGrids to contain a search input, filter options, bulk actions and an add button. - -You can use it like this: - -```tsx - {/* ... */}, - }} -/> -``` diff --git a/.changeset/curvy-moles-punch.md b/.changeset/curvy-moles-punch.md deleted file mode 100644 index aae724d896..0000000000 --- a/.changeset/curvy-moles-punch.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -"@comet/admin-theme": major ---- - -Rework `typographyOptions` - -- Replace `typographyOptions` with `createTypographyOptions()` to enable using the theme's breakpoints for media queries -- Add new default styles for variants `subtitle1`, `subtitle2`, `caption` and `overline` -- Remove custom `fontWeights` -- Switch the font from `Roboto` to `Roboto Flex` - -The font switch requires you to make the following two changes in your admin application: - -**Note: The `@comet/upgrade` script handles these changes automatically.** - -```diff -// package.json -- "@fontsource/roboto": "^4.5.5", -+ "@fontsource-variable/roboto-flex": "^5.0.0", -``` - -```diff -// App.tsx -- import "@fontsource/roboto/100.css"; -- import "@fontsource/roboto/300.css"; -- import "@fontsource/roboto/400.css"; -- import "@fontsource/roboto/500.css"; -+ import "@fontsource-variable/roboto-flex/full.css"; -``` diff --git a/.changeset/cyan-drinks-enjoy.md b/.changeset/cyan-drinks-enjoy.md deleted file mode 100644 index 7679ef251f..0000000000 --- a/.changeset/cyan-drinks-enjoy.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@comet/admin": major ---- - -Change theming method of `Menu` - -- Rename `permanent` class-key to `permanentDrawer` and `temporary` class-key to `temporaryDrawer` -- Replace the `permanentDrawerProps` and `temporaryDrawerProps` props with `slotProps` diff --git a/.changeset/cyan-ladybugs-bathe.md b/.changeset/cyan-ladybugs-bathe.md deleted file mode 100644 index 6618eed645..0000000000 --- a/.changeset/cyan-ladybugs-bathe.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/cms-api": minor ---- - -API Generator: Add `list` option to `@CrudGenerator()` to allow disabling the list query - -Related DTO classes will still be generated as they might be useful for application code. diff --git a/.changeset/dirty-rabbits-tease.md b/.changeset/dirty-rabbits-tease.md deleted file mode 100644 index 89dd04acda..0000000000 --- a/.changeset/dirty-rabbits-tease.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin": major ---- - -Remove the `listItem` class key from `MenuCollapsibleItemClassKey` due to a larger overhaul of the menu components diff --git a/.changeset/early-news-attend.md b/.changeset/early-news-attend.md deleted file mode 100644 index 78e46dc704..0000000000 --- a/.changeset/early-news-attend.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@comet/cms-admin": major -"@comet/cms-api": major ---- - -CRUD Generator: Remove `lastUpdatedAt` argument from update mutations diff --git a/.changeset/eight-rules-laugh.md b/.changeset/eight-rules-laugh.md deleted file mode 100644 index 42677672b2..0000000000 --- a/.changeset/eight-rules-laugh.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin": major ---- - -Remove the `openedIcon` and `closedIcon` props from `MenuCollapsibleItem` and add `iconMapping` instead - -The icon shown as the collapse indicator will be chosen from `iconMapping`, depending on the collapsed states of the Menu and the Item. diff --git a/.changeset/eighty-owls-cheat.md b/.changeset/eighty-owls-cheat.md deleted file mode 100644 index acc051b683..0000000000 --- a/.changeset/eighty-owls-cheat.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -"@comet/admin-theme": major ---- - -Rework colors - -- Rename `bluePalette` to `primaryPalette` -- Rename `neutrals` to `greyPalette` -- Remove `greenPalette` -- Change colors in all palettes -- Change `text` colors -- Add `highlight` colors `purple`, `green`, `orange`, `yellow` and `red` to palette - -Hint: To use the `highlight` colors without getting a type error, you must adjust the `vendors.d.ts` in your project: - -```diff -+ /// - -// ... -``` diff --git a/.changeset/empty-islands-confess.md b/.changeset/empty-islands-confess.md deleted file mode 100644 index 75c3213a6f..0000000000 --- a/.changeset/empty-islands-confess.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -"@comet/admin": minor ---- - -Add the ability to change by which fields a DataGrid column is sorted using `sortBy` in the column definition - -This can be useful for custom columns that do not represent an actual field in the data, e.g., columns that render the data of multiple fields. - -```tsx -const columns: GridColDef[] = [ - { - field: "fullName", - sortBy: ["firstName", "lastName"], - renderCell: ({ row }) => `${row.firstName} ${row.lastName}`, - }, -]; -``` diff --git a/.changeset/fair-waves-breathe.md b/.changeset/fair-waves-breathe.md deleted file mode 100644 index 7058dcf2b5..0000000000 --- a/.changeset/fair-waves-breathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin": minor ---- - -Show icons in permanent menu even in closed state. diff --git a/.changeset/fast-dodos-compete.md b/.changeset/fast-dodos-compete.md deleted file mode 100644 index 723c5d84ff..0000000000 --- a/.changeset/fast-dodos-compete.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin": minor ---- - -Add `ForcePromptRoute`, a `Route` that triggers a prompt even if it is a subroute - -Used in `StackSwitch` so that navigating to a nested stack subpage will show a prompt (if dirty) diff --git a/.changeset/fast-pens-laugh.md b/.changeset/fast-pens-laugh.md deleted file mode 100644 index b7f143b603..0000000000 --- a/.changeset/fast-pens-laugh.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/cms-site": minor ---- - -Deprecate `InternalLinkBlock` component, instead there should be a copy of this component in the application for flexibility (e.g., support for internationalized routing) diff --git a/.changeset/fifty-beers-attend.md b/.changeset/fifty-beers-attend.md deleted file mode 100644 index fbc45814d2..0000000000 --- a/.changeset/fifty-beers-attend.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin": major ---- - -Remove `popoverProps` from `AppHeaderDropdown` - -Use `slotProps.popover` instead. diff --git a/.changeset/fifty-keys-sit.md b/.changeset/fifty-keys-sit.md deleted file mode 100644 index 78a41b4809..0000000000 --- a/.changeset/fifty-keys-sit.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -"@comet/cms-admin": major ---- - -Replace the `ContentScopeIndicator` with a new version intended for use in the new `Toolbar` - -The old `ContentScopeIndicator` was a purely cosmetic component. Hence, the logic for displaying the current scope had to be implemented in the project (usually in a project-internal `ContentScopeIndicator` component). - -The new `ContentScopeIndicator` has the logic for displaying the current scope built-in. Thus, you can remove your project's `ContentScopeIndicator` implementation and directly use the `ContentScopeIndicator` from this library. - -Usage: - -- Per default, the `ContentScopeIndicator` displays the current `ContentScope` -- Pass a scope object via the `scope` prop if your page has a custom scope -- Pass the `global` prop if your page has no scope -- Pass `children` if you want to render completely custom content diff --git a/.changeset/fifty-suits-drive.md b/.changeset/fifty-suits-drive.md deleted file mode 100644 index 01072d17c6..0000000000 --- a/.changeset/fifty-suits-drive.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin-theme": minor ---- - -Override the default theme of `Badge` - -If no children are passed, the Badge renders as is without position relative and absolute. diff --git a/.changeset/fluffy-oranges-approve.md b/.changeset/fluffy-oranges-approve.md deleted file mode 100644 index b84740a057..0000000000 --- a/.changeset/fluffy-oranges-approve.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/cms-api": major ---- - -Make `@nestjs/platform-express` a peer dependency - -Make sure that `@nestjs/platform-express` is installed in the application. diff --git a/.changeset/fluffy-sheep-hammer.md b/.changeset/fluffy-sheep-hammer.md deleted file mode 100644 index 2311bc9865..0000000000 --- a/.changeset/fluffy-sheep-hammer.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/cms-site": major ---- - -Bump styled-components peer dependency to v6 - -Follow the official [migration guide](https://styled-components.com/docs/faqs#what-do-i-need-to-do-to-migrate-to-v6) to upgrade. diff --git a/.changeset/forty-bees-exercise.md b/.changeset/forty-bees-exercise.md deleted file mode 100644 index d70d0dcf5a..0000000000 --- a/.changeset/forty-bees-exercise.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -"@comet/cms-admin": major ---- - -Restructure `MasterMenuData` - -Items now need an explicit `type`. There are four types available: - -- `route` - - ```diff - { - + type: "route", - primary: , - icon: , - route: { - path: "/dashboard", - component: Dashboard, - }, - }, - ``` - -- `externalLink` - - ```diff - { - + type: "externalLink", - primary: , - icon: , - href: "https://comet-dxp.com", - }, - ``` - -- `collapsible` - - ```diff - { - + type: "collapsible", - primary: , - icon: , - - submenu: [ - + items: [ - // ... - ], - }, - ``` - -- `group` (new) - - ```diff - { - + type: "group", - + title: , - + items: [ - + // ... - + ] - }, - ``` diff --git a/.changeset/forty-hounds-work.md b/.changeset/forty-hounds-work.md deleted file mode 100644 index 2aafc07200..0000000000 --- a/.changeset/forty-hounds-work.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -"@comet/blocks-api": major -"@comet/cms-api": major ---- - -Support "real" dependency injection in `BlockData#transformToPlain` - -Previously we supported poor man's dependency injection using the `TransformDependencies` object in `transformToPlain`. -This is now replaced by a technique that allows actual dependency injection. - -**Example** - -```ts -class NewsLinkBlockData extends BlockData { - @BlockField({ nullable: true }) - id?: string; - - transformToPlain() { - // Return service that does the transformation - return NewsLinkBlockTransformerService; - } -} - -type TransformResponse = { - news?: { - id: string; - slug: string; - }; -}; - -@Injectable() -class NewsLinkBlockTransformerService implements BlockTransformerServiceInterface { - // Use dependency injection here - constructor(@InjectRepository(News) private readonly repository: EntityRepository) {} - - async transformToPlain(block: NewsLinkBlockData, context: BlockContext) { - if (!block.id) { - return {}; - } - - const news = await this.repository.findOneOrFail(block.id); - - return { - news: { - id: news.id, - slug: news.slug, - }, - }; - } -} -``` - -Adding this new technique results in a few breaking changes: - -- Remove dynamic registration of `BlocksModule` -- Pass `moduleRef` to `BlocksTransformerMiddlewareFactory` instead of `dependencies` -- Remove `dependencies` from `BlockData#transformToPlain` - -See the [migration guide](https://docs.comet-dxp.com/docs/migration/migration-from-v6-to-v7) on how to migrate. diff --git a/.changeset/forty-ways-matter.md b/.changeset/forty-ways-matter.md deleted file mode 100644 index cbd859aeb8..0000000000 --- a/.changeset/forty-ways-matter.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -"@comet/cms-api": minor ---- - -API Generator: Change default value for input field if property has no initializer - -Previously, the following property of an entity - -```ts -@Property({ type: types.date, nullable: true }) -@Field({ nullable: true }) -availableSince?: Date; -``` - -resulted in the following input being generated: - -```ts -@IsNullable() -@IsDate() -@Field({ nullable: true }) -availableSince?: Date; -``` - -This was problematic for two reasons: - -1. The error message would be misleading when trying to create an entity without providing a value for the property. For example, a valid GraphQL mutation - - ```graphql - mutation CreateProduct { - createProduct(input: { title: "A", slug: "A", description: "FOO" }) { - id - availableSince - } - } - ``` - - would result in the following error: - - ``` - "isDate": "availableSince must be a Date instance" - ``` - -2. Relying on the initializer as the default value is not obvious and appears somewhat magical. - -To address this, we now use `null` as the default value for nullable properties if no initializer is provided. If an initializer is provided, it is used as the default value. diff --git a/.changeset/four-cobras-shave.md b/.changeset/four-cobras-shave.md deleted file mode 100644 index 19e20d7014..0000000000 --- a/.changeset/four-cobras-shave.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@comet/admin": minor ---- - -Add new `FileSelect`, `FileDropzone` and `FileSelectListItem` components - -`FileSelect` combines `FileDropzone` and `FileSelectListItem` to handle the user's selection of files, display those files below, and handle the download and removal actions. - -`FileDropzone` is a wrapper around [react-dropzone](https://www.npmjs.com/package/react-dropzone) that manages error and disabled states. - -`FileSelectListItem` is used to display a list of files, including loading, skeleton, and error states and options to download and delete the file. diff --git a/.changeset/fresh-buckets-begin.md b/.changeset/fresh-buckets-begin.md deleted file mode 100644 index 11fc53ef72..0000000000 --- a/.changeset/fresh-buckets-begin.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -"@comet/admin-date-time": major ---- - -Change `DatePicker` and `DateRangePicker` values from `Date` to `string` - -This affects the `value` prop and the value returned by the `onChange` event. - -The value of `DatePicker` is a string in the format `YYYY-MM-DD`. -The value of `DateRangePicker` is an object with `start` and `end` keys, each as a string in the format `YYYY-MM-DD`. - -The code that handles values from these components may need to be adjusted. -This may include how the values are stored in or sent to the database. - -```diff -- const [date, setDate] = useState(new Date("2024-03-10")); -+ const [date, setDate] = useState("2024-03-10"); - return ; -``` - -```diff - const [dateRange, setDateRange] = useState({ -- start: new Date("2024-03-10"), -- end: new Date("2024-03-16"), -+ start: "2024-03-10", -+ end: "2024-03-16", - }); - return ; -``` - -The reason for this change is that when selecting a date like `2024-04-10` in a timezone ahead of UTC, it would be stored in a `Date` object as e.g. `2024-04-09T22:00:00.000Z`. When only the date is saved to the database, without the time, it would be saved as `2024-04-09`, which differs from the selected date. diff --git a/.changeset/fresh-sheep-remember.md b/.changeset/fresh-sheep-remember.md deleted file mode 100644 index 1479c75e68..0000000000 --- a/.changeset/fresh-sheep-remember.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/cms-site": major ---- - -Upgrade to Next 14 and React 18 - -Add "use client" directive to components that currently require it (as they use styled-components or a context) diff --git a/.changeset/friendly-mayflies-play.md b/.changeset/friendly-mayflies-play.md deleted file mode 100644 index 726bf0f6c4..0000000000 --- a/.changeset/friendly-mayflies-play.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -"@comet/cms-site": major ---- - -Revise `PixelImageBlock` to correctly use the "new" `next/image` component - -See the [docs](https://nextjs.org/docs/pages/api-reference/components/image-legacy#comparison) for a comparison between the new and the legacy component. - -**Migrate** - -Remove the `layout` prop from the block as it can lead to errors with the default implementation (`layout="responsive"` is not compatible with the new `fill` prop). - -- `layout={"responsive" | "inherit"}` can safely be removed - - ```diff - - ``` - -- `layout={"fill"}` can be replaced with `fill={true}` - - ```diff - - ``` - -Notes: - -The `PixelImageBlock` is usually wrapped in a `DamImageBlock` in the application. The `layout` prop should be removed from it as well. - -You can use the newly added `fill` prop of the `next/image` component by embedding the `PixelImageBlock` in a parent element that assigns the `position` style. See the [docs](https://nextjs.org/docs/pages/api-reference/components/image#fill) for more information. diff --git a/.changeset/funny-paws-dream.md b/.changeset/funny-paws-dream.md deleted file mode 100644 index b249f00e42..0000000000 --- a/.changeset/funny-paws-dream.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -"@comet/cms-admin": minor ---- - -Add `ContentScopeSelect` component - -This can be used as the basis for both content-driven and data-driven applications. - -**Example** - -```tsx -function ContentScopeControls() { - const [value, setValue] = useState({ domain: "main", language: "en" }); - - return ( - { - setValue(value); - }} - options={[ - { domain: { label: "Main", value: "main" }, language: { label: "English", value: "en" } }, - { domain: { label: "Main", value: "main" }, language: { label: "German", value: "de" } }, - { domain: { label: "Secondary", value: "secondary" }, language: { label: "English", value: "en" } }, - { domain: { label: "Secondary", value: "secondary" }, language: { label: "German", value: "de" } }, - ]} - /> - ); -} -``` diff --git a/.changeset/fuzzy-foxes-laugh.md b/.changeset/fuzzy-foxes-laugh.md deleted file mode 100644 index 235fcd3c4e..0000000000 --- a/.changeset/fuzzy-foxes-laugh.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@comet/cms-admin": major ---- - -Make icon required for top level menu and group items - -This fixes the problem, that there was no icon or text to display in the collapsed state of the menu if no icon was passed. -Icons are required for all top level menu items and the items of groups. Groups themselves do not require an icon. diff --git a/.changeset/gentle-chefs-sell.md b/.changeset/gentle-chefs-sell.md deleted file mode 100644 index 27274fe9f5..0000000000 --- a/.changeset/gentle-chefs-sell.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin": major ---- - -Remove the `requiredSymbol` prop from `FieldContainer` and use MUIs native implementation - -This prop was used to display a custom required symbol next to the label of the field. We now use the native implementation of the required attribute of MUI to ensure better accessibility and compatibility with screen readers. diff --git a/.changeset/gentle-pots-perform.md b/.changeset/gentle-pots-perform.md deleted file mode 100644 index cb360cbcea..0000000000 --- a/.changeset/gentle-pots-perform.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin-theme": minor ---- - -Slightly increase the default size of dialogs diff --git a/.changeset/giant-apples-cheer.md b/.changeset/giant-apples-cheer.md deleted file mode 100644 index c876eb06e7..0000000000 --- a/.changeset/giant-apples-cheer.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@comet/cms-api": major ---- - -API Generator: Add new `dedicatedResolverArg` option to `@CrudField` to generate better API for Many-to-one-relations - -- Add foreign id as argument to create mutation -- Add foreign id as argument to list query diff --git a/.changeset/giant-humans-lick.md b/.changeset/giant-humans-lick.md deleted file mode 100644 index ece6049435..0000000000 --- a/.changeset/giant-humans-lick.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -"@comet/cms-api": major ---- - -Replace `additionalMimeTypes` and `overrideAcceptedMimeTypes` in `DamModule#damConfig` with `acceptedMimeTypes` - -You can now add mime types like this: - -```ts -DamModule.register({ - damConfig: { - acceptedMimeTypes: [...damDefaultAcceptedMimetypes, "something-else"], - }, -}); -``` - -And remove them like this: - -```ts -DamModule.register({ - damConfig: { - acceptedMimeTypes: damDefaultAcceptedMimetypes.filter((mimeType) => mimeType !== "application/zip"), - }, -}); -``` - -Don't forget to also remove/add the mime types in the admin's `DamConfigProvider` diff --git a/.changeset/giant-ladybugs-greet.md b/.changeset/giant-ladybugs-greet.md deleted file mode 100644 index 6df683edf1..0000000000 --- a/.changeset/giant-ladybugs-greet.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -"@comet/admin": major ---- - -Rework `Toolbar` - -- The `Toolbar` is now split into a top and a bottom bar. - - The top bar displays a scope indicator and breadcrumbs. The bottom bar behaves like the old `Toolbar`. - -- The styling of `Toolbar`, `ToolbarItem`, `ToolbarActions`, `ToolbarAutomaticTitleItem` and `ToolbarBackButton` was adjusted - -- The new `ToolbarActionButton` should be used for buttons inside the `ToolbarActions` - - It automatically switches from a normal `Button` to an `IconButton` for smaller screen sizes. - -- To show a scope indicator, you must pass a `` to the `Toolbar` via the `scopeIndicator` prop diff --git a/.changeset/giant-suns-begin.md b/.changeset/giant-suns-begin.md deleted file mode 100644 index a27684847f..0000000000 --- a/.changeset/giant-suns-begin.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin": major ---- - -Remove `temporaryDrawerProps`, `permanentDrawerProps`, `temporaryDrawerPaperProps` and `permanentDrawerPaperProps` props from `Menu` component. - -Use `slotProps` instead. diff --git a/.changeset/good-squids-join.md b/.changeset/good-squids-join.md deleted file mode 100644 index e8fe3b84c9..0000000000 --- a/.changeset/good-squids-join.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -"@comet/cms-site": minor ---- - -Store site preview scope in cookie and add `previewParams()` helper to access it - -- Requires the new `SITE_PREVIEW_SECRET` environment variable that must contain a random secret (not required for local development) -- Requires a Route Handler located at `app/api/site-preview/route.ts`: -- The previewParams() return a promise - - ```ts - import { sitePreviewRoute } from "@comet/cms-site"; - import { createGraphQLFetch } from "@src/util/graphQLClient"; - import { type NextRequest } from "next/server"; - - export const dynamic = "force-dynamic"; - - export async function GET(request: NextRequest) { - return sitePreviewRoute(request, createGraphQLFetch()); - } - ``` diff --git a/.changeset/gorgeous-islands-perform.md b/.changeset/gorgeous-islands-perform.md deleted file mode 100644 index 56f7054c6d..0000000000 --- a/.changeset/gorgeous-islands-perform.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/cms-api": major ---- - -filtersToMikroOrmQuery: Move second argument (`applyFilter` callback) into an options object diff --git a/.changeset/great-hotels-unite.md b/.changeset/great-hotels-unite.md deleted file mode 100644 index 091f339369..0000000000 --- a/.changeset/great-hotels-unite.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@comet/cms-api": major ---- - -Refactor auth-decorators - -- Remove `@PublicApi()`-decorator -- Rename `@DisableGlobalGuard()`-decorator to `@DisableCometGuards()` - -The `@DisableCometGuards()`-decorator will only disable the AuthGuard when no `x-include-invisible-content`-header is set. diff --git a/.changeset/great-insects-reply.md b/.changeset/great-insects-reply.md deleted file mode 100644 index 32634b6656..0000000000 --- a/.changeset/great-insects-reply.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin": major ---- - -Remove the `FieldContainerComponent` component - -`FieldContainerComponent` was never intended to be exported, use `FieldContainer` instead. diff --git a/.changeset/grumpy-poets-own.md b/.changeset/grumpy-poets-own.md deleted file mode 100644 index f821545876..0000000000 --- a/.changeset/grumpy-poets-own.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin-theme": major ---- - -Change `Link` text styling diff --git a/.changeset/happy-fans-pump.md b/.changeset/happy-fans-pump.md deleted file mode 100644 index a220014ade..0000000000 --- a/.changeset/happy-fans-pump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/cms-admin": minor ---- - -Add future Admin Generator that works with configuration files diff --git a/.changeset/happy-ladybugs-smile.md b/.changeset/happy-ladybugs-smile.md deleted file mode 100644 index 13dec62322..0000000000 --- a/.changeset/happy-ladybugs-smile.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin": major ---- - -Rename the `FilterBarMoveFilersClassKey` type to `FilterBarMoreFiltersClassKey` diff --git a/.changeset/hot-buckets-talk.md b/.changeset/hot-buckets-talk.md deleted file mode 100644 index 79feb4860a..0000000000 --- a/.changeset/hot-buckets-talk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/eslint-config": major ---- - -nextjs: Enable `react/jsx-curly-brace-presence` rule diff --git a/.changeset/hot-carpets-eat.md b/.changeset/hot-carpets-eat.md deleted file mode 100644 index 724f68f77d..0000000000 --- a/.changeset/hot-carpets-eat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/cms-api": major ---- - -Rename `defaultDamAcceptedMimetypes` to `damDefaultAcceptedMimetypes` diff --git a/.changeset/hot-drinks-crash.md b/.changeset/hot-drinks-crash.md deleted file mode 100644 index cb8d114b3c..0000000000 --- a/.changeset/hot-drinks-crash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin-theme": minor ---- - -Adapt styling of filter panel in `DataGrid` for mobile devices (<900px) diff --git a/.changeset/khaki-cobras-trade.md b/.changeset/khaki-cobras-trade.md deleted file mode 100644 index 048ca36b65..0000000000 --- a/.changeset/khaki-cobras-trade.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin": major ---- - -Remove the `disabled` class-key in `TabScrollButton` - -Use the `:disabled` selector instead when styling the disabled state. diff --git a/.changeset/khaki-eels-try.md b/.changeset/khaki-eels-try.md deleted file mode 100644 index 41be238033..0000000000 --- a/.changeset/khaki-eels-try.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin": minor ---- - -Only use horizontal layout in `FieldContainer` when it exceeds `600px` in width diff --git a/.changeset/large-mirrors-teach.md b/.changeset/large-mirrors-teach.md deleted file mode 100644 index b94fb4f5b6..0000000000 --- a/.changeset/large-mirrors-teach.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"@comet/cms-site": major ---- - -Fix an issue where the block preview could break a block's styling and HTML structure - -This was caused by a `div` added around every block to enable the selection and highlighting of the block in the block preview. -The `div` is still present but now uses `display: contents`, so its effect should be minimal. - -Common issues that should now be resolved include: - -- The image inside, e.g., a `PixelImageBlock`, would not be visible because the image's size depends on the parent `div`'s size. -- Blocks used as children of elements with `display: flex` or `display: grid` could not position themselves correctly. diff --git a/.changeset/light-chefs-lie.md b/.changeset/light-chefs-lie.md deleted file mode 100644 index 8338a9b54d..0000000000 --- a/.changeset/light-chefs-lie.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin": major ---- - -Remove the `MenuLevel` type - -The type can be used from `MenuItemProps['level']` instead, if necessary. diff --git a/.changeset/light-ligers-wonder.md b/.changeset/light-ligers-wonder.md deleted file mode 100644 index bcb2b8e00a..0000000000 --- a/.changeset/light-ligers-wonder.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin-date-time": major ---- - -Remove the `clearable` prop and add a `required` prop to `DateRangePicker`, `DateTimePicker`, `TimePicker` and `TimeRangePicker` - -The clear button will automatically be shown for all optional fields. diff --git a/.changeset/long-bottles-brush.md b/.changeset/long-bottles-brush.md deleted file mode 100644 index c369b4d2dc..0000000000 --- a/.changeset/long-bottles-brush.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -"@comet/cms-api": major ---- - -Rename `DateFilter` to `DateTimeFilter` - -This leaves room for a future DateFilter that only filters by date, not time. - -**Upgrading** - -1. Change import - -```diff -- import { DateFilter } from "@comet/cms-api"; -+ import { DateTimeFilter } from "@comet/cms-api"; -``` - -2. Re-run API Generator. diff --git a/.changeset/long-crabs-bake.md b/.changeset/long-crabs-bake.md deleted file mode 100644 index 2414467679..0000000000 --- a/.changeset/long-crabs-bake.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@comet/admin": major ---- - -Remove the `components` and `componentProps` props from `CopyToClipboardButton` - -Instead, for the icons, use the `copyIcon` and `successIcon` props to pass a `ReactNode` instead of separately passing in values to the `components` and `componentProps` objects. -Use `slotPops` to pass props to the remaining elements. diff --git a/.changeset/long-items-sell.md b/.changeset/long-items-sell.md deleted file mode 100644 index bb3decacc7..0000000000 --- a/.changeset/long-items-sell.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@comet/cms-admin": minor ---- - -Remove "Re-login"-button from `CurrentUserProvider` - -The button is already implemented in `createErrorDialogApolloLink()`. The correct arrangement of -the components in `App.tsx` (see migration guide) makes the double implementation needless. diff --git a/.changeset/many-rivers-exist.md b/.changeset/many-rivers-exist.md deleted file mode 100644 index 1d3fc3edef..0000000000 --- a/.changeset/many-rivers-exist.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin": major ---- - -Add `FeedbackButton` component diff --git a/.changeset/mean-coats-matter.md b/.changeset/mean-coats-matter.md deleted file mode 100644 index 69359d969c..0000000000 --- a/.changeset/mean-coats-matter.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -"@comet/cms-site": major ---- - -Require `aspectRatio` prop for `PixelImageBlock` and `Image` - -The `16x9` default aspect ratio has repeatedly led to incorrectly displayed images on the site. -Therefore, it has been removed. -Instead, consider which aspect ratio to use for each image. - -**Example** - -```diff - -``` diff --git a/.changeset/metal-bugs-beg.md b/.changeset/metal-bugs-beg.md deleted file mode 100644 index 6379a8044e..0000000000 --- a/.changeset/metal-bugs-beg.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -"@comet/admin": minor ---- - -Add the ability to make `DataGrid` columns responsive by setting the `visible` property of the column definition to a media query - -This can be used to hide certain columns on smaller screens and show a combined column instead. - -This will only work when using `usePersistentColumnState` with `DataGridPro`/`DataGridPremium`. -When defining the columns, use the `GridColDef` type from `@comet/admin` instead of `@mui/x-data-grid`. - -```ts -const columns: GridColDef[] = [ - { - field: "fullName", - visible: theme.breakpoints.down("md"), - }, - { - field: "firstName", - visible: theme.breakpoints.up("md"), - }, - { - field: "lastName", - visible: theme.breakpoints.up("md"), - }, -]; -``` diff --git a/.changeset/metal-seas-listen.md b/.changeset/metal-seas-listen.md deleted file mode 100644 index abad6b7023..0000000000 --- a/.changeset/metal-seas-listen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin": minor ---- - -Router Prompt: actively reset form state when choosing discard in the prompt dialog diff --git a/.changeset/modern-glasses-sort.md b/.changeset/modern-glasses-sort.md deleted file mode 100644 index 11014c5c7c..0000000000 --- a/.changeset/modern-glasses-sort.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -"@comet/admin": minor ---- - -Add the `GridCellContent` component - -Used to display primary and secondary texts and an icon in a `DataGrid` cell using the columns `renderCell` function. - -```tsx -const columns: GridColDef[] = [ - { - field: "title", - renderCell: ({ row }) => {row.title}, - }, - { - field: "overview", - renderCell: ({ row }) => } />, - }, -]; -``` diff --git a/.changeset/neat-kiwis-serve.md b/.changeset/neat-kiwis-serve.md deleted file mode 100644 index 61731e4bb9..0000000000 --- a/.changeset/neat-kiwis-serve.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@comet/cms-admin": minor -"@comet/cms-api": minor ---- - -CRUD Generator: Add support for date-only fields diff --git a/.changeset/nervous-sloths-thank.md b/.changeset/nervous-sloths-thank.md deleted file mode 100644 index f36e4963fc..0000000000 --- a/.changeset/nervous-sloths-thank.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin": minor ---- - -Add setting `signInUrl` to `createErrorDialogApolloLink` diff --git a/.changeset/nervous-windows-grin.md b/.changeset/nervous-windows-grin.md deleted file mode 100644 index 0b785a9d9a..0000000000 --- a/.changeset/nervous-windows-grin.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"@comet/cms-admin": major -"@comet/blocks-api": major -"@comet/cms-api": major ---- - -Remove unused/unnecessary peer dependencies - -Some dependencies were incorrectly marked as peer dependencies. -If you don't use them in your application, you may remove the following dependencies: - -- Admin: `axios` -- API: `@aws-sdk/client-s3`, `@azure/storage-blob` and `pg-error-constants` diff --git a/.changeset/new-chicken-search.md b/.changeset/new-chicken-search.md deleted file mode 100644 index 24e818c89b..0000000000 --- a/.changeset/new-chicken-search.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/cms-api": minor ---- - -InternalLinkBlock: add scope to targetPage in output - -This allows for example using the language from scope as url prefix in a multi-language site diff --git a/.changeset/nice-pigs-mate.md b/.changeset/nice-pigs-mate.md deleted file mode 100644 index 4a847992e2..0000000000 --- a/.changeset/nice-pigs-mate.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -"@comet/cms-api": major ---- - -Rename "public uploads" to "file uploads" - -The name "public uploads" was not fitting since the uploads can also be used for "private" uploads in the Admin. -The feature was therefore renamed to "file uploads". - -This requires the following changes: - -- Use `FileUploadsModule` instead of `PublicUploadModule` -- Use `FileUpload` instead of `PublicUpload` -- Use `FileUploadsService` instead of `PublicUploadsService` -- Change the upload URL from `/public-upload/files/upload` to `/files-uploads/upload` diff --git a/.changeset/ninety-adults-peel.md b/.changeset/ninety-adults-peel.md deleted file mode 100644 index dcea95d454..0000000000 --- a/.changeset/ninety-adults-peel.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin-color-picker": major ---- - -Remove `clearable` prop and add a `required` prop to `ColorPicker` - -The clear button will automatically be shown for all optional fields. diff --git a/.changeset/ninety-countries-chew.md b/.changeset/ninety-countries-chew.md deleted file mode 100644 index a05249ad40..0000000000 --- a/.changeset/ninety-countries-chew.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/cms-site": minor ---- - -Add optional `fill` prop to `YouTubeVideoBlock` and `DamVideoBlock` to support same behavior as in `PixelImageBlock` diff --git a/.changeset/odd-countries-drive.md b/.changeset/odd-countries-drive.md deleted file mode 100644 index 08ab13ca9e..0000000000 --- a/.changeset/odd-countries-drive.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -"@comet/cms-api": major ---- - -Secure file uploads upload endpoint by default - -The `/file-uploads/upload` endpoint now requires the `fileUploads` permission by default. - -Use the `upload.public` option to make the endpoint public: - -```diff -FileUploadsModule.register({ - /* ... */, -+ upload: { -+ public: true, -+ }, -}), -``` diff --git a/.changeset/old-falcons-complain.md b/.changeset/old-falcons-complain.md deleted file mode 100644 index 5887c44b81..0000000000 --- a/.changeset/old-falcons-complain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/cms-admin": minor ---- - -Admin Generator: Use variant="horizontal" for all generated form fields diff --git a/.changeset/plenty-cougars-warn.md b/.changeset/plenty-cougars-warn.md deleted file mode 100644 index d0ee9aac64..0000000000 --- a/.changeset/plenty-cougars-warn.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -"@comet/cms-site": minor ---- - -Add GraphQL fetch client - -- `createGraphQLFetch`: simple graphql client around fetch, usage: createGraphQLFetch(fetch, url)(gql, variables) -- `type GraphQLFetch = (query: string, variables?: V, init?: RequestInit) => Promise` -- `gql` for tagging queries -- `createFetchWithDefaults` fetch decorator that adds default values (eg. headers or next.revalidate) -- `createFetchWithPreviewHeaders` fetch decorator that adds comet preview headers (based on SitePreviewData) - -Example helper in application: - -``` -export const graphQLApiUrl = `${typeof window === "undefined" ? process.env.API_URL_INTERNAL : process.env.NEXT_PUBLIC_API_URL}/graphql`; -export function createGraphQLFetch(previewData?: SitePreviewData) { - return createGraphQLFetchLibrary( - createFetchWithDefaults(createFetchWithPreviewHeaders(fetch, previewData), { next: { revalidate: 15 * 60 } }), - graphQLApiUrl, - ); - -} -``` - -Usage example: - -``` -const graphqlFetch = createGraphQLFetch(previewData); -const data = await graphqlFetch( - exampleQuery, - { - exampleVariable: "foo" - } -); -``` diff --git a/.changeset/polite-ducks-juggle.md b/.changeset/polite-ducks-juggle.md deleted file mode 100644 index 70f4a12e04..0000000000 --- a/.changeset/polite-ducks-juggle.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@comet/eslint-config": major ---- - -Prevent `@mui/icons-material` icon imports - -Icons used in Comet DXP applications should match the Comet CI. -Use icons from `@comet/admin-icons` instead. diff --git a/.changeset/polite-needles-unite.md b/.changeset/polite-needles-unite.md deleted file mode 100644 index 97f204b36e..0000000000 --- a/.changeset/polite-needles-unite.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin-theme": minor ---- - -Add `breakpointsOptions` to theme diff --git a/.changeset/poor-dragons-sing.md b/.changeset/poor-dragons-sing.md deleted file mode 100644 index 4fafa61d0d..0000000000 --- a/.changeset/poor-dragons-sing.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin": minor ---- - -Support relative paths in `SubRoute` component using `./subroute` notation diff --git a/.changeset/popular-planes-tap.md b/.changeset/popular-planes-tap.md deleted file mode 100644 index d89dc5a532..0000000000 --- a/.changeset/popular-planes-tap.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -"@comet/blocks-admin": major -"@comet/cms-admin": major -"@comet/blocks-api": major -"@comet/cms-api": major ---- - -Move `YouTubeVideoBlock` to `@cms` packages - -**Migrate** - -```diff -- import { YouTubeVideoBlock } from "@comet/blocks-admin"; -+ import { YouTubeVideoBlock } from "@comet/cms-admin"; -``` - -```diff -- import { YouTubeVideoBlock } from "@comet/blocks-api"; -+ import { YouTubeVideoBlock } from "@comet/cms-api"; -``` diff --git a/.changeset/popular-shirts-pretend.md b/.changeset/popular-shirts-pretend.md deleted file mode 100644 index 89789b176a..0000000000 --- a/.changeset/popular-shirts-pretend.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/cms-site": minor ---- - -Add `legacyPagesRouterSitePreviewApiHandler` helper - -Used to enable the site preview (Preview Mode) for projects which use the Pages Router. This helper is added to ease migrating. New projects should use the App Router instead. diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index b4deb21af1..0000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "mode": "exit", - "tag": "beta", - "initialVersions": { - "comet-demo-admin": "1.0.0", - "comet-demo-admin-server": "1.0.0", - "comet-demo-api": "1.0.0", - "comet-demo-site": "1.0.0", - "comet-demo-site-pages": "1.0.0", - "comet-docs": "0.0.0", - "@comet/admin": "6.10.0", - "@comet/admin-babel-preset": "6.10.0", - "@comet/admin-color-picker": "6.10.0", - "@comet/admin-date-time": "6.10.0", - "@comet/admin-icons": "6.10.0", - "@comet/admin-react-select": "6.10.0", - "@comet/admin-rte": "6.10.0", - "@comet/admin-theme": "6.10.0", - "@comet/blocks-admin": "6.10.0", - "@comet/cms-admin": "6.10.0", - "@comet/blocks-api": "6.10.0", - "@comet/cms-api": "6.10.0", - "@comet/cli": "6.10.0", - "@comet/eslint-config": "6.10.0", - "@comet/eslint-plugin": "6.10.0", - "@comet/cms-site": "6.10.0", - "comet-storybook": "1.0.0" - }, - "changesets": [ - "blue-apricots-appear", - "brave-kiwis-pay", - "bright-dolls-live", - "brown-kids-develop", - "chatty-walls-study", - "chilled-walls-shop", - "clean-apes-vanish", - "clean-insects-happen", - "clever-clocks-smile", - "cool-kangaroos-cough", - "cool-kiwis-shop", - "curly-pillows-decide", - "curvy-moles-punch", - "cyan-drinks-enjoy", - "cyan-ladybugs-bathe", - "dirty-rabbits-tease", - "early-news-attend", - "eight-rules-laugh", - "eighty-owls-cheat", - "empty-islands-confess", - "fair-waves-breathe", - "fast-dodos-compete", - "fast-pens-laugh", - "fifty-keys-sit", - "fifty-suits-drive", - "fluffy-oranges-approve", - "fluffy-sheep-hammer", - "forty-bees-exercise", - "forty-hounds-work", - "fresh-buckets-begin", - "fresh-sheep-remember", - "friendly-mayflies-play", - "funny-paws-dream", - "fuzzy-foxes-laugh", - "gentle-chefs-sell", - "gentle-pots-perform", - "giant-apples-cheer", - "giant-humans-lick", - "giant-ladybugs-greet", - "giant-suns-begin", - "good-squids-join", - "great-hotels-unite", - "great-insects-reply", - "grumpy-poets-own", - "happy-fans-pump", - "happy-ladybugs-smile", - "hip-garlics-press", - "hot-buckets-talk", - "hot-carpets-eat", - "hot-drinks-crash", - "khaki-cobras-trade", - "khaki-eels-try", - "large-mirrors-teach", - "light-chefs-lie", - "light-ligers-wonder", - "long-bottles-brush", - "long-crabs-bake", - "long-items-sell", - "many-rivers-exist", - "mean-coats-matter", - "metal-bugs-beg", - "metal-seas-listen", - "modern-glasses-sort", - "nervous-sloths-thank", - "nervous-windows-grin", - "new-chicken-search", - "ninety-adults-peel", - "plenty-cougars-warn", - "polite-ducks-juggle", - "polite-needles-unite", - "poor-dragons-sing", - "popular-ducks-vanish", - "popular-planes-tap", - "popular-shirts-pretend", - "pretty-deers-trade", - "pretty-kangaroos-repair", - "proud-cheetahs-sleep", - "quick-foxes-notice", - "rare-boxes-guess", - "rare-crabs-burn", - "real-roses-applaud", - "rotten-clocks-shop", - "selfish-books-fail", - "selfish-dolls-beg", - "selfish-shrimps-explode", - "serious-bats-boil", - "serious-ravens-matter", - "sharp-zebras-hear", - "short-donkeys-double", - "shy-jars-float", - "shy-scissors-joke", - "small-eggs-learn", - "small-snails-mate", - "smooth-chefs-flow", - "spotty-penguins-wash", - "strange-clouds-pretend", - "strange-coins-hug", - "strange-frogs-remain", - "strange-steaks-pull", - "ten-turkeys-poke", - "tender-dots-warn", - "tender-pigs-rest", - "thin-ligers-pull", - "thirty-countries-refuse", - "tidy-impalas-refuse", - "tough-zoos-refuse", - "tricky-paws-march", - "twelve-spoons-play", - "twenty-impalas-count", - "two-lions-promise", - "two-walls-fetch", - "unlucky-hats-exist", - "unlucky-points-matter", - "violet-wombats-try", - "weak-moles-destroy", - "wise-moose-argue", - "yellow-houses-talk", - "yellow-seahorses-lick", - "young-lies-cry" - ] -} diff --git a/.changeset/pretty-deers-trade.md b/.changeset/pretty-deers-trade.md deleted file mode 100644 index ad90dedc06..0000000000 --- a/.changeset/pretty-deers-trade.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin": minor ---- - -Add support for third level menu items. Collapsible items can be nested in each other, which creates subsubitems. diff --git a/.changeset/pretty-kangaroos-repair.md b/.changeset/pretty-kangaroos-repair.md deleted file mode 100644 index 49343b4ef5..0000000000 --- a/.changeset/pretty-kangaroos-repair.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/cms-api": minor ---- - -API Generator: Generate field resolver for root blocks - -This allows skipping the `@Field` annotation for root blocks in the entity and it doesn't need the field middleware anymore. diff --git a/.changeset/proud-cheetahs-sleep.md b/.changeset/proud-cheetahs-sleep.md deleted file mode 100644 index 79c548ace2..0000000000 --- a/.changeset/proud-cheetahs-sleep.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@comet/admin-color-picker": patch -"@comet/admin-react-select": patch -"@comet/admin-date-time": patch -"@comet/admin-rte": patch -"@comet/admin": patch ---- - -Allow partial props in the theme's `defaultProps` instead of requiring all props when setting the `defaultProps` of a component diff --git a/.changeset/quick-foxes-notice.md b/.changeset/quick-foxes-notice.md deleted file mode 100644 index 437da160b5..0000000000 --- a/.changeset/quick-foxes-notice.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin": major ---- - -Replace the `componentsProps` prop with `slotProps` in `FieldSet` diff --git a/.changeset/rare-boxes-guess.md b/.changeset/rare-boxes-guess.md deleted file mode 100644 index ec52553b6e..0000000000 --- a/.changeset/rare-boxes-guess.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/cms-admin": minor ---- - -Adapt `Header` and `UserHeaderItem` used in `AppHeader` for mobile devices (<900px) diff --git a/.changeset/rare-crabs-burn.md b/.changeset/rare-crabs-burn.md deleted file mode 100644 index aac1977c32..0000000000 --- a/.changeset/rare-crabs-burn.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/cms-api": major ---- - -Require `strategyName` in `createStaticCredentialsBasicStrategy` - -The `strategyName` is then used as SystemUser which allows to distinguish between different system users (e.g. activate logging) diff --git a/.changeset/real-roses-applaud.md b/.changeset/real-roses-applaud.md deleted file mode 100644 index 0b8df6d0a2..0000000000 --- a/.changeset/real-roses-applaud.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -"@comet/cms-admin": major ---- - -Rework `ContentScopeProvider` and `ContentScopeControls` - -The content scope controls were changed to display all available combinations in a single select. - -This requires a few breaking changes: - -1. The `values` props of `ContentScopeProvider` has been changed to an array: - - **Before** - - ```ts - const values: ContentScopeValues = { - domain: [ - { label: "Main", value: "main" }, - { label: "Secondary", value: "secondary" }, - ], - language: [ - { label: "English", value: "en" }, - { label: "German", value: "de" }, - ], - }; - ``` - - **Now** - - ```ts - const values: ContentScopeValues = [ - { - domain: { label: "Main", value: "main" }, - language: { label: "English", value: "en" }, - }, - { - domain: { label: "Main", value: "main" }, - language: { label: "German", value: "de" }, - }, - { - domain: { label: "Secondary", value: "secondary" }, - language: { label: "English", value: "en" }, - }, - ]; - ``` - -2. The `config` prop of `ContentScopeControls` has been removed. - You can use the props `searchable`, `groupBy`, and `icon` instead. - You may also remove the convenience wrapper defined in the application as it doesn't offer a real benefit anymore: - - ```diff - + import { ContentScopeControls } from "@comet/cms-admin"; - - import { ContentScopeControls as ContentScopeControlsLibrary } from "@comet/cms-admin"; - - - export const ContentScopeControls: React.FC = () => { - - return config={controlsConfig} />; - - }; - ``` diff --git a/.changeset/rotten-clocks-shop.md b/.changeset/rotten-clocks-shop.md deleted file mode 100644 index 7b78e1485f..0000000000 --- a/.changeset/rotten-clocks-shop.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin": minor ---- - -Add `GridColumnsButton` - -This button opens a panel to hide or show columns of `DataGrid`, similar to MUIs `GridToolbarColumnsButton`. diff --git a/.changeset/rotten-pots-itch.md b/.changeset/rotten-pots-itch.md deleted file mode 100644 index ab7d5acfe1..0000000000 --- a/.changeset/rotten-pots-itch.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -"@comet/admin": major ---- - -`FinalFormFileSelect` is now a simple final form wrapper around `FileSelect` - -Props now mirror those of `FileSelect` and are passed through to the `FileSelect` component. -Setting `defaultProps` in the theme must now be done with `CometAdminFileSelect` instead of `CometAdminFinalFormFileSelect`. - -Class keys have been removed. Apply custom styling to `CometAdminFileSelect` instead of `FinalFormFileSelect`. - -The default value for `maxSize` has been removed. -You may want to set the previous default value of 50 MB explicitly. - -```diff - -``` - -The `disableDropzone` prop has been removed. -Use `slotProps.dropzone.hideDroppableArea` instead. - -```diff - -``` - -The `disableSelectFileButton` prop has been removed. -Use `slotProps.dropzone.hideButton` instead. - -```diff - -``` diff --git a/.changeset/selfish-books-fail.md b/.changeset/selfish-books-fail.md deleted file mode 100644 index c187025397..0000000000 --- a/.changeset/selfish-books-fail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin": minor ---- - -Pass `required` prop to children of `Field` component diff --git a/.changeset/selfish-dolls-beg.md b/.changeset/selfish-dolls-beg.md deleted file mode 100644 index 32bff15360..0000000000 --- a/.changeset/selfish-dolls-beg.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -"@comet/cms-site": minor ---- - -Add new technique for blocks to load additional data at page level when using SSR - -This works both server-side (SSR, SSG) and client-side (block preview). - -New Apis: - -- `recursivelyLoadBlockData`: used to call loaders for a block data tree -- `BlockLoader`: type of a loader function that is responsible for one block -- `useBlockPreviewFetch`: helper hook for block preview that creates client-side caching graphQLFetch/fetch -- `BlockLoaderDependencies`: interface with dependencies that get passed through recursivelyLoadBlockData into loader functions. Can be extended using module augmentation in application to inject eg. pageTreeNodeId. diff --git a/.changeset/selfish-shrimps-explode.md b/.changeset/selfish-shrimps-explode.md deleted file mode 100644 index 37ac0303fa..0000000000 --- a/.changeset/selfish-shrimps-explode.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/cms-api": minor ---- - -API Generator: Add support for enum array filter and sort diff --git a/.changeset/serious-bats-boil.md b/.changeset/serious-bats-boil.md deleted file mode 100644 index 7d4cf1da34..0000000000 --- a/.changeset/serious-bats-boil.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@comet/cms-admin": minor -"@comet/admin": minor ---- - -Deprecate `SplitButton`, `FinalFormSaveSplitButton` and `SplitButtonContext` and remove all uses of these components in our libraries - -The reason is that we decided to retire the SplitButton pattern. diff --git a/.changeset/serious-ravens-matter.md b/.changeset/serious-ravens-matter.md deleted file mode 100644 index 306d89aa76..0000000000 --- a/.changeset/serious-ravens-matter.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin": major ---- - -Replace the `componentsProps` prop with `slotProps` in `InputWithPopper` and remove the `InputWithPopperComponentsProps` type diff --git a/.changeset/sharp-zebras-hear.md b/.changeset/sharp-zebras-hear.md deleted file mode 100644 index 6be4226c2a..0000000000 --- a/.changeset/sharp-zebras-hear.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin": minor ---- - -Stack: Update parent breadcrumb URL in state to not forget filters and other states when going back diff --git a/.changeset/short-donkeys-double.md b/.changeset/short-donkeys-double.md deleted file mode 100644 index e9f1bf341f..0000000000 --- a/.changeset/short-donkeys-double.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -"@comet/admin": minor ---- - -Add `MenuItemGroup` component to group menu items - -**Example:** - -```tsx - - } to="/menu-item-1" /> - } to="/menu-item-2" /> - } to="/menu-item-3" /> - {/* Some more menu items... */} - -``` diff --git a/.changeset/shy-jars-float.md b/.changeset/shy-jars-float.md deleted file mode 100644 index 45dd6eb081..0000000000 --- a/.changeset/shy-jars-float.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/cms-api": patch ---- - -API Generator: Add missing type for integer fields in input type diff --git a/.changeset/shy-scissors-joke.md b/.changeset/shy-scissors-joke.md deleted file mode 100644 index 410ceb8ece..0000000000 --- a/.changeset/shy-scissors-joke.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@comet/cms-api": major ---- - -API Generator: Remove support for `visible` boolean, use `status` enum instead. - -Recommended enum values: Published/Unpublished or Visible/Invisible or Active/Deleted or Active/Archived - -Remove support for update visibility mutation, use existing generic update instead diff --git a/.changeset/sixty-cougars-begin.md b/.changeset/sixty-cougars-begin.md deleted file mode 100644 index fae0d16b5e..0000000000 --- a/.changeset/sixty-cougars-begin.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/cms-api": minor ---- - -API Generator: Add `search` argument to `OneToManyFilter` and `ManyToManyFilter` - -Performs a search like the `search` argument in the list query. diff --git a/.changeset/small-eggs-learn.md b/.changeset/small-eggs-learn.md deleted file mode 100644 index a6e22563b8..0000000000 --- a/.changeset/small-eggs-learn.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -"@comet/cms-api": major ---- - -API Generator: Replace graphql-type-json with graphql-scalars for JSON columns - -**Upgrading** - -1. Install graphql-scalars: `npm install graphql-scalars` -2. Uninstall graphql-type-json: `npm install graphql-type-json` -3. Update imports: - - ```diff - - import { GraphQLJSONObject } from "graphql-type-json"; - + import { GraphQLJSONObject } from "graphql-scalars"; - ``` diff --git a/.changeset/small-snails-mate.md b/.changeset/small-snails-mate.md deleted file mode 100644 index f77b840307..0000000000 --- a/.changeset/small-snails-mate.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@comet/cms-admin": major -"@comet/cms-site": major ---- - -Support single host for block preview - -The content scope is passed through the iframe-bridge in the admin and accessible in the site in the IFrameBridgeProvider. -Breaking: `previewUrl`-property of `SiteConfig` has changed to `blockPreviewBaseUrl` diff --git a/.changeset/smooth-chefs-flow.md b/.changeset/smooth-chefs-flow.md deleted file mode 100644 index 365c7ae2ec..0000000000 --- a/.changeset/smooth-chefs-flow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin-theme": major ---- - -Adapt `Typography` headlines for mobile devices (<900px) diff --git a/.changeset/spotty-penguins-wash.md b/.changeset/spotty-penguins-wash.md deleted file mode 100644 index 99280a87c9..0000000000 --- a/.changeset/spotty-penguins-wash.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -"@comet/blocks-admin": major -"@comet/cms-site": major -"@comet/cms-api": major ---- - -Remove `aspectRatio` from `YouTubeBlock` - -The block's aspect ratio options (4x3, 16x9) proved too inflexible to be of actual use in an application. Therefore, the aspect ratio field was removed. It should be defined in the application instead. - -**Migrate** - -The block requires an aspect ratio in the site. It should be set using the `aspectRatio` prop (default: `16x9`): - -```diff - -``` diff --git a/.changeset/stale-pandas-watch.md b/.changeset/stale-pandas-watch.md deleted file mode 100644 index 66d8e919b9..0000000000 --- a/.changeset/stale-pandas-watch.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@comet/cms-admin": patch ---- - -Redirect to edit page after adding a redirect - -Previously, the user wasn't redirected to the edit page after creating a new redirect. -This caused strange validation errors and made it impossible to edit the redirect after creating it. diff --git a/.changeset/strange-clouds-pretend.md b/.changeset/strange-clouds-pretend.md deleted file mode 100644 index 15bddf2e89..0000000000 --- a/.changeset/strange-clouds-pretend.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -"@comet/cms-admin": major ---- - -Replace `additionalMimeTypes` and `overrideAcceptedMimeTypes` in `DamConfigProvider` with `acceptedMimeTypes` - -You can now add mime types like this: - -```tsx - - {/* ... */} - -``` - -And remove them like this: - -```tsx - mimeType !== "application/zip"), - }} -> - {/* ... */} - -``` - -Don't forget to also remove/add the mime types in the API's `DamModule` diff --git a/.changeset/strange-coins-hug.md b/.changeset/strange-coins-hug.md deleted file mode 100644 index 35a58ee4da..0000000000 --- a/.changeset/strange-coins-hug.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@comet/admin": minor ---- - -Automatically set `fullWidth` for `FieldContainer` with `variant="horizontal"` - -Horizontal fields are automatically responsive: -If they are less than 600px wide, the layout automatically changes to vertical. -For this to work correctly, the fields must be `fullWidth`. -Therefore, `fullWidth` is now `true` by default for horizontal fields. diff --git a/.changeset/strange-frogs-remain.md b/.changeset/strange-frogs-remain.md deleted file mode 100644 index 37112066b7..0000000000 --- a/.changeset/strange-frogs-remain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/eslint-config": major ---- - -nextjs/react: Enable `react/jsx-no-useless-fragment` rule diff --git a/.changeset/strange-steaks-pull.md b/.changeset/strange-steaks-pull.md deleted file mode 100644 index d0f4dff674..0000000000 --- a/.changeset/strange-steaks-pull.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin": major ---- - -Remove the `message` class-key from `Alert` - -Use the `.MuiAlert-message` selector instead to style the message of the underlying MUI `Alert` component. diff --git a/.changeset/ten-buses-lie.md b/.changeset/ten-buses-lie.md deleted file mode 100644 index 4944e37d2e..0000000000 --- a/.changeset/ten-buses-lie.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@comet/cms-api": major ---- - -API Generator: Remove generated service - -The `Service#getFindCondition` method is replaced with the new `gqlArgsToMikroOrmQuery` function, which detects an entity's searchable fields from its metadata. -Consequently, the generated service isn't needed anymore and will therefore no longer be generated. -Remove the service from the module after re-running the API Generator. diff --git a/.changeset/ten-turkeys-poke.md b/.changeset/ten-turkeys-poke.md deleted file mode 100644 index 2d0f065aa4..0000000000 --- a/.changeset/ten-turkeys-poke.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -"@comet/admin-date-time": major ---- - -Rename multiple props and class-keys and remove the `componentsProps` types: - -- `DatePicker`: - - - Replace the `componentsProps` prop with `slotProps` - - Remove the `DatePickerComponentsProps` type - -- `DateRangePicker`: - - - Replace the `componentsProps` prop with `slotProps` - - Remove the `DateRangePickerComponentsProps` type - - Rename the `calendar` class-key to `dateRange` - -- `DateTimePicker`: - - - Replace the `componentsProps` prop with `slotProps` - - Remove the `DateTimePickerComponentsProps` type - - Replace the `formControl` class-key with two separate class-keys: `dateFormControl` and `timeFormControl` - -- `TimeRangePicker`: - - - Replace the `componentsProps` prop with `slotProps` - - Remove the `TimeRangePickerComponentsProps` and `TimeRangePickerIndividualPickerProps` types - - Replace the `formControl` class-key with two separate class-keys: `startFormControl` and `endFormControl` - - Replace the `timePicker` class-key with two separate class-keys: `startTimePicker` and `endTimePicker` diff --git a/.changeset/tender-dots-warn.md b/.changeset/tender-dots-warn.md deleted file mode 100644 index 4ce98620f7..0000000000 --- a/.changeset/tender-dots-warn.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin": major ---- - -Remove the `paper` class-key from `FilterBarPopoverFilter` - -Instead of using `styleOverrides` for `paper` in the theme, use the `slotProps` and `sx` props. diff --git a/.changeset/tender-pigs-rest.md b/.changeset/tender-pigs-rest.md deleted file mode 100644 index 4f761bfd73..0000000000 --- a/.changeset/tender-pigs-rest.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -"@comet/admin-theme": minor ---- - -Add custom `Typography` variants for displaying inline lists - -```tsx - - Lorem ipsum - Lorem ipsum - Lorem ipsum - -``` - -Hint: To use the custom variants without getting a type error, you must adjust the `vendors.d.ts` in your project: - -```diff -+ /// - -// ... -``` diff --git a/.changeset/thin-ligers-pull.md b/.changeset/thin-ligers-pull.md deleted file mode 100644 index 6f2236cc91..0000000000 --- a/.changeset/thin-ligers-pull.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin-react-select": major ---- - -Remove `ControlInput` component - -`ControlInput` was never intended to be exported, use MUI's `InputBase` instead. diff --git a/.changeset/thirty-countries-refuse.md b/.changeset/thirty-countries-refuse.md deleted file mode 100644 index 54c6c9c3ee..0000000000 --- a/.changeset/thirty-countries-refuse.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"@comet/cms-site": major ---- - -Remove `next/link` legacy behavior as default behavior - -Previously, Next required the `Link` component to have a child `` tag. To style this tag correctly in the application, none of the library link blocks (`DamFileDownloadLinkBlock`, `ExternalLinkBlock`, `EmailLinkBlock`, `InternalLinkBlock`, and `PhoneLinkBlock`) rendered the tag, but cloned the children with the correct props instead. - -However, since Next v13 the `Link` component no longer requires a child `` tag. Consequently, we don't need to render the tag for the `InternalLinkBlock` (which uses `Link` internally) anymore. In order to style all link blocks correctly, we now render an `` tag for all other link blocks. - -**Upgrade** - -To upgrade, either remove all `` tags from your link block usages, or add the `legacyBehavior` prop to all library link blocks. diff --git a/.changeset/tidy-impalas-refuse.md b/.changeset/tidy-impalas-refuse.md deleted file mode 100644 index 113f173e47..0000000000 --- a/.changeset/tidy-impalas-refuse.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin-date-time": major ---- - -Remove `clearable` prop from `DatePicker` - -The clear button will automatically be shown for all optional fields. diff --git a/.changeset/tough-zoos-refuse.md b/.changeset/tough-zoos-refuse.md deleted file mode 100644 index 7a4e60cc4e..0000000000 --- a/.changeset/tough-zoos-refuse.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@comet/admin": major ---- - -Remove the `disabled` and `focusVisible` class-keys and rename the `inner` class-key to `content` in `AppHeaderButton` - -Use the `:disabled` selector instead when styling the disabled state. -Use the `:focus` selector instead when styling the focus state. diff --git a/.changeset/tricky-paws-march.md b/.changeset/tricky-paws-march.md deleted file mode 100644 index 35bfd67fe8..0000000000 --- a/.changeset/tricky-paws-march.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin": major ---- - -Remove `endAdornment` prop from `FinalFormSelect` component - -The reason were conflicts with the clearable prop. This decision was based on the fact that MUI doesn't support endAdornment on selects (see: [mui/material-ui#17799](https://github.com/mui/material-ui/issues/17799)), and that there are no common use cases where both `endAdornment` and `clearable` are needed simultaneously. diff --git a/.changeset/twelve-spoons-play.md b/.changeset/twelve-spoons-play.md deleted file mode 100644 index 077fd13a40..0000000000 --- a/.changeset/twelve-spoons-play.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin": major ---- - -Remove the `disabled` class-key in `ClearInputButton` - -Use the `:disabled` selector instead when styling the disabled state. diff --git a/.changeset/twenty-impalas-count.md b/.changeset/twenty-impalas-count.md deleted file mode 100644 index 9fb5bbab97..0000000000 --- a/.changeset/twenty-impalas-count.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/cms-api": major ---- - -Increase minimum supported version of `@mikro-orm/core`, `@mikro-orm/migrations`, and `@mikro-orm/postgresql` to v5.8.4 diff --git a/.changeset/two-lions-promise.md b/.changeset/two-lions-promise.md deleted file mode 100644 index 4a57683e17..0000000000 --- a/.changeset/two-lions-promise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin": major ---- - -`MenuItem` no longer supports props from MUI's `ListItem` but those from `ListItemButton` instead diff --git a/.changeset/two-walls-fetch.md b/.changeset/two-walls-fetch.md deleted file mode 100644 index fc5ed810ef..0000000000 --- a/.changeset/two-walls-fetch.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@comet/cms-admin": minor -"@comet/cms-site": minor -"@comet/cms-api": minor ---- - -Add preview image to `YouTubeVideoBlock` and `DamVideoBlock` - -The `YouTubeVideoBlock` and the `DamVideoBlock` now support a preview image out of the box. For customisation the default `VideoPreviewImage` component can be overridden with the optional `renderPreviewImage` method. - -It is recommended to replace the custom implemented video blocks in the projects with the updated `YouTubeVideoBlock` and `DamVideoBlock` from the library. diff --git a/.changeset/unlucky-points-matter.md b/.changeset/unlucky-points-matter.md deleted file mode 100644 index 9fb776f22b..0000000000 --- a/.changeset/unlucky-points-matter.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/cms-api": minor ---- - -API Generator: Add support for filtering many-to-many relations by id diff --git a/.changeset/violet-wombats-try.md b/.changeset/violet-wombats-try.md deleted file mode 100644 index ba2f8739fb..0000000000 --- a/.changeset/violet-wombats-try.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@comet/admin": major ---- - -Remove the `popoverPaper` class-key and rename the `popoverRoot` class-key to `popover` in `AppHeaderDropdown` - -Instead of using `styleOverrides` for `popoverPaper` in the theme, use the `slotProps` and `sx` props. -Use the `popover` prop instead of `popoverRoot` to override styles. diff --git a/.changeset/weak-comics-rhyme.md b/.changeset/weak-comics-rhyme.md deleted file mode 100644 index df5724714f..0000000000 --- a/.changeset/weak-comics-rhyme.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -"@comet/cms-site": major ---- - -Remove server-only code from client bundle - -Make sure to upgrade to Next 14.2.0 or later. -Enable `optimizePackageImports` for `@comet/cms-site` in `next.config.js`: - -```diff -const nextConfig = { - /* ... */ -+ experimental: { -+ optimizePackageImports: ["@comet/cms-site"], -+ }, -}; - -module.exports = withBundleAnalyzer(nextConfig); -``` diff --git a/.changeset/weak-moles-destroy.md b/.changeset/weak-moles-destroy.md deleted file mode 100644 index 0df4d8e361..0000000000 --- a/.changeset/weak-moles-destroy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@comet/admin": patch ---- - -Fix a bug where the `disabled` prop would not be passed to the children of `Field` diff --git a/.changeset/wise-moose-argue.md b/.changeset/wise-moose-argue.md deleted file mode 100644 index 89411e55ca..0000000000 --- a/.changeset/wise-moose-argue.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -"@comet/admin": minor ---- - -Add `helperIcon` prop to MenuItemGroup. Its intended purpose is to render an icon with a `Tooltip` behind the group section title, if the menu is not collapsed. - -### Examples: - -**Render only an icon:** - -```tsx -}> - {/* ... */} - -``` - -**Render an icon with tooltip:** - -```tsx - - - - } -> - {/* ... */} - -``` diff --git a/.changeset/yellow-houses-talk.md b/.changeset/yellow-houses-talk.md deleted file mode 100644 index 82ab535d20..0000000000 --- a/.changeset/yellow-houses-talk.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -"@comet/admin-color-picker": major -"@comet/admin-react-select": major -"@comet/admin-date-time": major -"@comet/blocks-admin": major -"@comet/admin-theme": major -"@comet/admin-rte": major -"@comet/cms-admin": major -"@comet/admin": major ---- - -Change the method of overriding the styling of Admin components - -- Remove dependency on the legacy `@mui/styles` package in favor of `@mui/material/styles`. -- Add the ability to style components using [MUI's `sx` prop](https://mui.com/system/getting-started/the-sx-prop/). -- Add the ability to style individual elements (slots) of a component using the `slotProps` and `sx` props. -- The `$` syntax in the theme's `styleOverrides` is no longer supported, see: https://mui.com/material-ui/migration/v5-style-changes/#migrate-theme-styleoverrides-to-emotion - -```diff - const theme = createCometTheme({ - components: { - CometAdminMyComponent: { - styleOverrides: { -- root: { -- "&$hasShadow": { -- boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)", -- }, -- "& $header": { -- backgroundColor: "lime", -- }, -- }, -+ hasShadow: { -+ boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)", -+ }, -+ header: { -+ backgroundColor: "lime", -+ }, - }, - }, - }, - }); -``` - -- Overriding a component's styles using `withStyles` is no longer supported. Use the `sx` and `slotProps` props instead: - -```diff --import { withStyles } from "@mui/styles"; -- --const StyledMyComponent = withStyles({ -- root: { -- backgroundColor: "lime", -- }, -- header: { -- backgroundColor: "fuchsia", -- }, --})(MyComponent); -- --// ... -- --; -+ -``` - -- The module augmentation for the `DefaultTheme` type from `@mui/styles/defaultTheme` is no longer needed and needs to be removed from the admins theme file, usually located in `admin/src/theme.ts`: - -```diff --declare module "@mui/styles/defaultTheme" { -- // eslint-disable-next-line @typescript-eslint/no-empty-interface -- export interface DefaultTheme extends Theme {} --} -``` - -- Class-keys originating from MUI components have been removed from Comet Admin components, causing certain class-names and `styleOverrides` to no longer be applied. - The components `root` class-key is not affected. Other class-keys will retain the class-names and `styleOverrides` from the underlying MUI component. - For example, in `ClearInputAdornment` (when used with `position="end"`) the class-name `CometAdminClearInputAdornment-positionEnd` and the `styleOverrides` for `CometAdminClearInputAdornment.positionEnd` will no longer be applied. - The component will retain the class-names `MuiInputAdornment-positionEnd`, `MuiInputAdornment-root`, and `CometAdminClearInputAdornment-root`. - Also, the `styleOverrides` for `MuiInputAdornment.positionEnd`, `MuiInputAdornment.root`, and `CometAdminClearInputAdornment.root` will continue to be applied. - - This affects the following components: - - - `AppHeader` - - `AppHeaderMenuButton` - - `ClearInputAdornment` - - `Tooltip` - - `CancelButton` - - `DeleteButton` - - `OkayButton` - - `SaveButton` - - `StackBackButton` - - `DatePicker` - - `DateRangePicker` - - `TimePicker` - -- For more details, see MUI's migration guide: https://mui.com/material-ui/migration/v5-style-changes/#mui-styles diff --git a/.changeset/yellow-seahorses-lick.md b/.changeset/yellow-seahorses-lick.md deleted file mode 100644 index 4ae4d4f142..0000000000 --- a/.changeset/yellow-seahorses-lick.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@comet/cms-admin": major -"@comet/cms-api": major -"@comet/eslint-config": minor -"@comet/cms-site": minor ---- - -Use the Next.js Preview Mode for the site preview - -The preview is entered by navigating to an API Route in the site, which has to be executed in a secured environment. -In the API Route the current scope is checked (and possibly stored), then the client is redirected to the preview. diff --git a/.changeset/young-lies-cry.md b/.changeset/young-lies-cry.md deleted file mode 100644 index 45d31e62bb..0000000000 --- a/.changeset/young-lies-cry.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@comet/admin-theme": major ---- - -Rework shadows - -- Change shadows 1 - 4 diff --git a/packages/admin/admin-babel-preset/CHANGELOG.md b/packages/admin/admin-babel-preset/CHANGELOG.md index 79ad16438b..d9ebca0f06 100644 --- a/packages/admin/admin-babel-preset/CHANGELOG.md +++ b/packages/admin/admin-babel-preset/CHANGELOG.md @@ -1,5 +1,7 @@ # @comet/admin-babel-preset +## 7.0.0 + ## 7.0.0-beta.6 ## 7.0.0-beta.5 diff --git a/packages/admin/admin-babel-preset/package.json b/packages/admin/admin-babel-preset/package.json index 1ec5ee661e..a289f4af29 100644 --- a/packages/admin/admin-babel-preset/package.json +++ b/packages/admin/admin-babel-preset/package.json @@ -1,6 +1,6 @@ { "name": "@comet/admin-babel-preset", - "version": "7.0.0-beta.6", + "version": "7.0.0", "repository": { "type": "git", "url": "https://github.com/vivid-planet/comet", diff --git a/packages/admin/admin-color-picker/CHANGELOG.md b/packages/admin/admin-color-picker/CHANGELOG.md index 33bf919a4d..c0b8ff9acc 100644 --- a/packages/admin/admin-color-picker/CHANGELOG.md +++ b/packages/admin/admin-color-picker/CHANGELOG.md @@ -1,5 +1,165 @@ # @comet/admin-color-picker +## 7.0.0 + +### Major Changes + +- b87c3c292: Replace the `componentsProps` prop with `slotProps` in `ColorPicker` and remove the `ColorPickerComponentsProps` type +- cb544bc3e: Remove `clearable` prop and add a `required` prop to `ColorPicker` + + The clear button will automatically be shown for all optional fields. + +- 92eae2ba9: Change the method of overriding the styling of Admin components + + - Remove dependency on the legacy `@mui/styles` package in favor of `@mui/material/styles`. + - Add the ability to style components using [MUI's `sx` prop](https://mui.com/system/getting-started/the-sx-prop/). + - Add the ability to style individual elements (slots) of a component using the `slotProps` and `sx` props. + - The `# @comet/admin-color-picker syntax in the theme's `styleOverrides` is no longer supported, see: https://mui.com/material-ui/migration/v5-style-changes/#migrate-theme-styleoverrides-to-emotion + + ```diff + const theme = createCometTheme({ + components: { + CometAdminMyComponent: { + styleOverrides: { + - root: { + - "&$hasShadow": { + - boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)", + - }, + - "& $header": { + - backgroundColor: "lime", + - }, + - }, + + hasShadow: { + + boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)", + + }, + + header: { + + backgroundColor: "lime", + + }, + }, + }, + }, + }); + ``` + + - Overriding a component's styles using `withStyles` is no longer supported. Use the `sx` and `slotProps` props instead: + + ```diff + -import { withStyles } from "@mui/styles"; + - + -const StyledMyComponent = withStyles({ + - root: { + - backgroundColor: "lime", + - }, + - header: { + - backgroundColor: "fuchsia", + - }, + -})(MyComponent); + - + -// ... + - + -; + + + ``` + + - The module augmentation for the `DefaultTheme` type from `@mui/styles/defaultTheme` is no longer needed and needs to be removed from the admins theme file, usually located in `admin/src/theme.ts`: + + ```diff + -declare module "@mui/styles/defaultTheme" { + - // eslint-disable-next-line @typescript-eslint/no-empty-interface + - export interface DefaultTheme extends Theme {} + -} + ``` + + - Class-keys originating from MUI components have been removed from Comet Admin components, causing certain class-names and `styleOverrides` to no longer be applied. + The components `root` class-key is not affected. Other class-keys will retain the class-names and `styleOverrides` from the underlying MUI component. + For example, in `ClearInputAdornment` (when used with `position="end"`) the class-name `CometAdminClearInputAdornment-positionEnd` and the `styleOverrides` for `CometAdminClearInputAdornment.positionEnd` will no longer be applied. + The component will retain the class-names `MuiInputAdornment-positionEnd`, `MuiInputAdornment-root`, and `CometAdminClearInputAdornment-root`. + Also, the `styleOverrides` for `MuiInputAdornment.positionEnd`, `MuiInputAdornment.root`, and `CometAdminClearInputAdornment.root` will continue to be applied. + + This affects the following components: + + - `AppHeader` + - `AppHeaderMenuButton` + - `ClearInputAdornment` + - `Tooltip` + - `CancelButton` + - `DeleteButton` + - `OkayButton` + - `SaveButton` + - `StackBackButton` + - `DatePicker` + - `DateRangePicker` + - `TimePicker` + + - For more details, see MUI's migration guide: https://mui.com/material-ui/migration/v5-style-changes/#mui-styles + +### Patch Changes + +- b5753e612: Allow partial props in the theme's `defaultProps` instead of requiring all props when setting the `defaultProps` of a component +- Updated dependencies [05ce68ec0] +- Updated dependencies [949356e84] +- Updated dependencies [51a0861d8] +- Updated dependencies [dc8bb6a99] +- Updated dependencies [54f775497] +- Updated dependencies [73140014f] +- Updated dependencies [9a4530b06] +- Updated dependencies [dc8bb6a99] +- Updated dependencies [e3efdfcc3] +- Updated dependencies [02d33e230] +- Updated dependencies [a0bd09afa] +- Updated dependencies [8cc51b368] +- Updated dependencies [c46146cb3] +- Updated dependencies [6054fdcab] +- Updated dependencies [d0869ac82] +- Updated dependencies [9a4530b06] +- Updated dependencies [47ec528a4] +- Updated dependencies [956111ab2] +- Updated dependencies [19eaee4ca] +- Updated dependencies [758c65656] +- Updated dependencies [9a4530b06] +- Updated dependencies [04ed68cc9] +- Updated dependencies [61b2acfb2] +- Updated dependencies [0263a45fa] +- Updated dependencies [4ca4830f3] +- Updated dependencies [3397ec1b6] +- Updated dependencies [20b2bafd8] +- Updated dependencies [51a0861d8] +- Updated dependencies [9c4b7c974] +- Updated dependencies [b5753e612] +- Updated dependencies [2a7bc765c] +- Updated dependencies [774977311] +- Updated dependencies [27efe7bd8] +- Updated dependencies [f8114cd39] +- Updated dependencies [569ad0463] +- Updated dependencies [b87c3c292] +- Updated dependencies [170720b0c] +- Updated dependencies [f06f4bea6] +- Updated dependencies [119714999] +- Updated dependencies [2a7bc765c] +- Updated dependencies [d2e64d1ec] +- Updated dependencies [241249bd4] +- Updated dependencies [be4e6392d] +- Updated dependencies [a53545438] +- Updated dependencies [1a1d83156] +- Updated dependencies [a2f278bbd] +- Updated dependencies [66330e4e6] +- Updated dependencies [b0249e3bc] +- Updated dependencies [92eae2ba9] + - @comet/admin@7.0.0 + - @comet/admin-icons@7.0.0 + ## 7.0.0-beta.6 ### Patch Changes diff --git a/packages/admin/admin-color-picker/package.json b/packages/admin/admin-color-picker/package.json index 10fab2794a..db3e0c2add 100644 --- a/packages/admin/admin-color-picker/package.json +++ b/packages/admin/admin-color-picker/package.json @@ -1,6 +1,6 @@ { "name": "@comet/admin-color-picker", - "version": "7.0.0-beta.6", + "version": "7.0.0", "repository": { "type": "git", "url": "https://github.com/vivid-planet/comet", @@ -26,8 +26,8 @@ "start:types": "tsc --project ./tsconfig.json --emitDeclarationOnly --watch --preserveWatchOutput" }, "dependencies": { - "@comet/admin": "workspace:^7.0.0-beta.6", - "@comet/admin-icons": "workspace:^7.0.0-beta.6", + "@comet/admin": "workspace:^7.0.0", + "@comet/admin-icons": "workspace:^7.0.0", "clsx": "^1.1.1", "react-colorful": "^5.5.1", "tinycolor2": "^1.4.1", @@ -36,8 +36,8 @@ "devDependencies": { "@babel/cli": "^7.17.6", "@babel/core": "^7.20.12", - "@comet/admin-babel-preset": "workspace:^7.0.0-beta.6", - "@comet/eslint-config": "workspace:^7.0.0-beta.6", + "@comet/admin-babel-preset": "workspace:^7.0.0", + "@comet/eslint-config": "workspace:^7.0.0", "@mui/material": "^5.0.0", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", diff --git a/packages/admin/admin-date-time/CHANGELOG.md b/packages/admin/admin-date-time/CHANGELOG.md index 7a73fb7da3..3be15c1230 100644 --- a/packages/admin/admin-date-time/CHANGELOG.md +++ b/packages/admin/admin-date-time/CHANGELOG.md @@ -1,5 +1,222 @@ # @comet/admin-date-time +## 7.0.0 + +### Major Changes + +- ad73068f4: Change `DatePicker` and `DateRangePicker` values from `Date` to `string` + + This affects the `value` prop and the value returned by the `onChange` event. + + The value of `DatePicker` is a string in the format `YYYY-MM-DD`. + The value of `DateRangePicker` is an object with `start` and `end` keys, each as a string in the format `YYYY-MM-DD`. + + The code that handles values from these components may need to be adjusted. + This may include how the values are stored in or sent to the database. + + ```diff + - const [date, setDate] = useState(new Date("2024-03-10")); + + const [date, setDate] = useState("2024-03-10"); + return ; + ``` + + ```diff + const [dateRange, setDateRange] = useState({ + - start: new Date("2024-03-10"), + - end: new Date("2024-03-16"), + + start: "2024-03-10", + + end: "2024-03-16", + }); + return ; + ``` + + The reason for this change is that when selecting a date like `2024-04-10` in a timezone ahead of UTC, it would be stored in a `Date` object as e.g. `2024-04-09T22:00:00.000Z`. When only the date is saved to the database, without the time, it would be saved as `2024-04-09`, which differs from the selected date. + +- cb544bc3e: Remove the `clearable` prop and add a `required` prop to `DateRangePicker`, `DateTimePicker`, `TimePicker` and `TimeRangePicker` + + The clear button will automatically be shown for all optional fields. + +- b87c3c292: Rename multiple props and class-keys and remove the `componentsProps` types: + + - `DatePicker`: + + - Replace the `componentsProps` prop with `slotProps` + - Remove the `DatePickerComponentsProps` type + + - `DateRangePicker`: + + - Replace the `componentsProps` prop with `slotProps` + - Remove the `DateRangePickerComponentsProps` type + - Rename the `calendar` class-key to `dateRange` + + - `DateTimePicker`: + + - Replace the `componentsProps` prop with `slotProps` + - Remove the `DateTimePickerComponentsProps` type + - Replace the `formControl` class-key with two separate class-keys: `dateFormControl` and `timeFormControl` + + - `TimeRangePicker`: + + - Replace the `componentsProps` prop with `slotProps` + - Remove the `TimeRangePickerComponentsProps` and `TimeRangePickerIndividualPickerProps` types + - Replace the `formControl` class-key with two separate class-keys: `startFormControl` and `endFormControl` + - Replace the `timePicker` class-key with two separate class-keys: `startTimePicker` and `endTimePicker` + +- f8114cd39: Remove `clearable` prop from `DatePicker` + + The clear button will automatically be shown for all optional fields. + +- 92eae2ba9: Change the method of overriding the styling of Admin components + + - Remove dependency on the legacy `@mui/styles` package in favor of `@mui/material/styles`. + - Add the ability to style components using [MUI's `sx` prop](https://mui.com/system/getting-started/the-sx-prop/). + - Add the ability to style individual elements (slots) of a component using the `slotProps` and `sx` props. + - The `# @comet/admin-date-time syntax in the theme's `styleOverrides` is no longer supported, see: https://mui.com/material-ui/migration/v5-style-changes/#migrate-theme-styleoverrides-to-emotion + + ```diff + const theme = createCometTheme({ + components: { + CometAdminMyComponent: { + styleOverrides: { + - root: { + - "&$hasShadow": { + - boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)", + - }, + - "& $header": { + - backgroundColor: "lime", + - }, + - }, + + hasShadow: { + + boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)", + + }, + + header: { + + backgroundColor: "lime", + + }, + }, + }, + }, + }); + ``` + + - Overriding a component's styles using `withStyles` is no longer supported. Use the `sx` and `slotProps` props instead: + + ```diff + -import { withStyles } from "@mui/styles"; + - + -const StyledMyComponent = withStyles({ + - root: { + - backgroundColor: "lime", + - }, + - header: { + - backgroundColor: "fuchsia", + - }, + -})(MyComponent); + - + -// ... + - + -; + + + ``` + + - The module augmentation for the `DefaultTheme` type from `@mui/styles/defaultTheme` is no longer needed and needs to be removed from the admins theme file, usually located in `admin/src/theme.ts`: + + ```diff + -declare module "@mui/styles/defaultTheme" { + - // eslint-disable-next-line @typescript-eslint/no-empty-interface + - export interface DefaultTheme extends Theme {} + -} + ``` + + - Class-keys originating from MUI components have been removed from Comet Admin components, causing certain class-names and `styleOverrides` to no longer be applied. + The components `root` class-key is not affected. Other class-keys will retain the class-names and `styleOverrides` from the underlying MUI component. + For example, in `ClearInputAdornment` (when used with `position="end"`) the class-name `CometAdminClearInputAdornment-positionEnd` and the `styleOverrides` for `CometAdminClearInputAdornment.positionEnd` will no longer be applied. + The component will retain the class-names `MuiInputAdornment-positionEnd`, `MuiInputAdornment-root`, and `CometAdminClearInputAdornment-root`. + Also, the `styleOverrides` for `MuiInputAdornment.positionEnd`, `MuiInputAdornment.root`, and `CometAdminClearInputAdornment.root` will continue to be applied. + + This affects the following components: + + - `AppHeader` + - `AppHeaderMenuButton` + - `ClearInputAdornment` + - `Tooltip` + - `CancelButton` + - `DeleteButton` + - `OkayButton` + - `SaveButton` + - `StackBackButton` + - `DatePicker` + - `DateRangePicker` + - `TimePicker` + + - For more details, see MUI's migration guide: https://mui.com/material-ui/migration/v5-style-changes/#mui-styles + +### Patch Changes + +- b5753e612: Allow partial props in the theme's `defaultProps` instead of requiring all props when setting the `defaultProps` of a component +- Updated dependencies [05ce68ec0] +- Updated dependencies [949356e84] +- Updated dependencies [51a0861d8] +- Updated dependencies [dc8bb6a99] +- Updated dependencies [54f775497] +- Updated dependencies [73140014f] +- Updated dependencies [9a4530b06] +- Updated dependencies [dc8bb6a99] +- Updated dependencies [e3efdfcc3] +- Updated dependencies [02d33e230] +- Updated dependencies [a0bd09afa] +- Updated dependencies [8cc51b368] +- Updated dependencies [c46146cb3] +- Updated dependencies [6054fdcab] +- Updated dependencies [d0869ac82] +- Updated dependencies [9a4530b06] +- Updated dependencies [47ec528a4] +- Updated dependencies [956111ab2] +- Updated dependencies [19eaee4ca] +- Updated dependencies [758c65656] +- Updated dependencies [9a4530b06] +- Updated dependencies [04ed68cc9] +- Updated dependencies [61b2acfb2] +- Updated dependencies [0263a45fa] +- Updated dependencies [4ca4830f3] +- Updated dependencies [3397ec1b6] +- Updated dependencies [20b2bafd8] +- Updated dependencies [51a0861d8] +- Updated dependencies [9c4b7c974] +- Updated dependencies [b5753e612] +- Updated dependencies [2a7bc765c] +- Updated dependencies [774977311] +- Updated dependencies [27efe7bd8] +- Updated dependencies [f8114cd39] +- Updated dependencies [569ad0463] +- Updated dependencies [b87c3c292] +- Updated dependencies [170720b0c] +- Updated dependencies [f06f4bea6] +- Updated dependencies [119714999] +- Updated dependencies [2a7bc765c] +- Updated dependencies [d2e64d1ec] +- Updated dependencies [241249bd4] +- Updated dependencies [be4e6392d] +- Updated dependencies [a53545438] +- Updated dependencies [1a1d83156] +- Updated dependencies [a2f278bbd] +- Updated dependencies [66330e4e6] +- Updated dependencies [b0249e3bc] +- Updated dependencies [92eae2ba9] + - @comet/admin@7.0.0 + - @comet/admin-icons@7.0.0 + ## 7.0.0-beta.6 ### Patch Changes diff --git a/packages/admin/admin-date-time/package.json b/packages/admin/admin-date-time/package.json index e2f80d7e64..b47c5e0fb7 100644 --- a/packages/admin/admin-date-time/package.json +++ b/packages/admin/admin-date-time/package.json @@ -1,6 +1,6 @@ { "name": "@comet/admin-date-time", - "version": "7.0.0-beta.6", + "version": "7.0.0", "repository": { "type": "git", "url": "https://github.com/vivid-planet/comet", @@ -26,8 +26,8 @@ "start:types": "tsc --project ./tsconfig.json --emitDeclarationOnly --watch --preserveWatchOutput" }, "dependencies": { - "@comet/admin": "workspace:^7.0.0-beta.6", - "@comet/admin-icons": "workspace:^7.0.0-beta.6", + "@comet/admin": "workspace:^7.0.0", + "@comet/admin-icons": "workspace:^7.0.0", "@mui/utils": "^5.4.1", "clsx": "^1.1.1", "date-fns": "^2.28.0", @@ -36,8 +36,8 @@ "devDependencies": { "@babel/cli": "^7.17.6", "@babel/core": "^7.20.12", - "@comet/admin-babel-preset": "workspace:^7.0.0-beta.6", - "@comet/eslint-config": "workspace:^7.0.0-beta.6", + "@comet/admin-babel-preset": "workspace:^7.0.0", + "@comet/eslint-config": "workspace:^7.0.0", "@mui/material": "^5.0.0", "@types/react": "^17.0", "@types/react-date-range": "^1.4.3", diff --git a/packages/admin/admin-icons/CHANGELOG.md b/packages/admin/admin-icons/CHANGELOG.md index 484c0a3009..9d25e87ed5 100644 --- a/packages/admin/admin-icons/CHANGELOG.md +++ b/packages/admin/admin-icons/CHANGELOG.md @@ -1,5 +1,7 @@ # @comet/admin-icons +## 7.0.0 + ## 7.0.0-beta.6 ## 7.0.0-beta.5 diff --git a/packages/admin/admin-icons/package.json b/packages/admin/admin-icons/package.json index 38a3186cf4..2dd312776e 100644 --- a/packages/admin/admin-icons/package.json +++ b/packages/admin/admin-icons/package.json @@ -1,6 +1,6 @@ { "name": "@comet/admin-icons", - "version": "7.0.0-beta.6", + "version": "7.0.0", "repository": { "type": "git", "url": "https://github.com/vivid-planet/comet", @@ -25,8 +25,8 @@ "devDependencies": { "@babel/cli": "^7.17.6", "@babel/core": "^7.20.12", - "@comet/admin-babel-preset": "workspace:^7.0.0-beta.6", - "@comet/eslint-config": "workspace:^7.0.0-beta.6", + "@comet/admin-babel-preset": "workspace:^7.0.0", + "@comet/eslint-config": "workspace:^7.0.0", "@mui/material": "^5.0.0", "@types/cli-progress": "^3.8.0", "@types/node": "^18.0.0", diff --git a/packages/admin/admin-react-select/CHANGELOG.md b/packages/admin/admin-react-select/CHANGELOG.md index 1ea84f50d3..d030e698e4 100644 --- a/packages/admin/admin-react-select/CHANGELOG.md +++ b/packages/admin/admin-react-select/CHANGELOG.md @@ -1,5 +1,164 @@ # @comet/admin-react-select +## 7.0.0 + +### Major Changes + +- e00c8e1fd: Remove `ControlInput` component + + `ControlInput` was never intended to be exported, use MUI's `InputBase` instead. + +- 92eae2ba9: Change the method of overriding the styling of Admin components + + - Remove dependency on the legacy `@mui/styles` package in favor of `@mui/material/styles`. + - Add the ability to style components using [MUI's `sx` prop](https://mui.com/system/getting-started/the-sx-prop/). + - Add the ability to style individual elements (slots) of a component using the `slotProps` and `sx` props. + - The `# @comet/admin-react-select syntax in the theme's `styleOverrides` is no longer supported, see: https://mui.com/material-ui/migration/v5-style-changes/#migrate-theme-styleoverrides-to-emotion + + ```diff + const theme = createCometTheme({ + components: { + CometAdminMyComponent: { + styleOverrides: { + - root: { + - "&$hasShadow": { + - boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)", + - }, + - "& $header": { + - backgroundColor: "lime", + - }, + - }, + + hasShadow: { + + boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)", + + }, + + header: { + + backgroundColor: "lime", + + }, + }, + }, + }, + }); + ``` + + - Overriding a component's styles using `withStyles` is no longer supported. Use the `sx` and `slotProps` props instead: + + ```diff + -import { withStyles } from "@mui/styles"; + - + -const StyledMyComponent = withStyles({ + - root: { + - backgroundColor: "lime", + - }, + - header: { + - backgroundColor: "fuchsia", + - }, + -})(MyComponent); + - + -// ... + - + -; + + + ``` + + - The module augmentation for the `DefaultTheme` type from `@mui/styles/defaultTheme` is no longer needed and needs to be removed from the admins theme file, usually located in `admin/src/theme.ts`: + + ```diff + -declare module "@mui/styles/defaultTheme" { + - // eslint-disable-next-line @typescript-eslint/no-empty-interface + - export interface DefaultTheme extends Theme {} + -} + ``` + + - Class-keys originating from MUI components have been removed from Comet Admin components, causing certain class-names and `styleOverrides` to no longer be applied. + The components `root` class-key is not affected. Other class-keys will retain the class-names and `styleOverrides` from the underlying MUI component. + For example, in `ClearInputAdornment` (when used with `position="end"`) the class-name `CometAdminClearInputAdornment-positionEnd` and the `styleOverrides` for `CometAdminClearInputAdornment.positionEnd` will no longer be applied. + The component will retain the class-names `MuiInputAdornment-positionEnd`, `MuiInputAdornment-root`, and `CometAdminClearInputAdornment-root`. + Also, the `styleOverrides` for `MuiInputAdornment.positionEnd`, `MuiInputAdornment.root`, and `CometAdminClearInputAdornment.root` will continue to be applied. + + This affects the following components: + + - `AppHeader` + - `AppHeaderMenuButton` + - `ClearInputAdornment` + - `Tooltip` + - `CancelButton` + - `DeleteButton` + - `OkayButton` + - `SaveButton` + - `StackBackButton` + - `DatePicker` + - `DateRangePicker` + - `TimePicker` + + - For more details, see MUI's migration guide: https://mui.com/material-ui/migration/v5-style-changes/#mui-styles + +### Patch Changes + +- b5753e612: Allow partial props in the theme's `defaultProps` instead of requiring all props when setting the `defaultProps` of a component +- Updated dependencies [05ce68ec0] +- Updated dependencies [949356e84] +- Updated dependencies [51a0861d8] +- Updated dependencies [dc8bb6a99] +- Updated dependencies [54f775497] +- Updated dependencies [73140014f] +- Updated dependencies [9a4530b06] +- Updated dependencies [dc8bb6a99] +- Updated dependencies [e3efdfcc3] +- Updated dependencies [02d33e230] +- Updated dependencies [a0bd09afa] +- Updated dependencies [8cc51b368] +- Updated dependencies [c46146cb3] +- Updated dependencies [6054fdcab] +- Updated dependencies [d0869ac82] +- Updated dependencies [9a4530b06] +- Updated dependencies [47ec528a4] +- Updated dependencies [956111ab2] +- Updated dependencies [19eaee4ca] +- Updated dependencies [758c65656] +- Updated dependencies [9a4530b06] +- Updated dependencies [04ed68cc9] +- Updated dependencies [61b2acfb2] +- Updated dependencies [0263a45fa] +- Updated dependencies [4ca4830f3] +- Updated dependencies [3397ec1b6] +- Updated dependencies [20b2bafd8] +- Updated dependencies [51a0861d8] +- Updated dependencies [9c4b7c974] +- Updated dependencies [b5753e612] +- Updated dependencies [2a7bc765c] +- Updated dependencies [774977311] +- Updated dependencies [27efe7bd8] +- Updated dependencies [f8114cd39] +- Updated dependencies [569ad0463] +- Updated dependencies [b87c3c292] +- Updated dependencies [170720b0c] +- Updated dependencies [f06f4bea6] +- Updated dependencies [119714999] +- Updated dependencies [2a7bc765c] +- Updated dependencies [d2e64d1ec] +- Updated dependencies [241249bd4] +- Updated dependencies [be4e6392d] +- Updated dependencies [a53545438] +- Updated dependencies [1a1d83156] +- Updated dependencies [a2f278bbd] +- Updated dependencies [66330e4e6] +- Updated dependencies [b0249e3bc] +- Updated dependencies [92eae2ba9] + - @comet/admin@7.0.0 + - @comet/admin-icons@7.0.0 + ## 7.0.0-beta.6 ### Patch Changes diff --git a/packages/admin/admin-react-select/package.json b/packages/admin/admin-react-select/package.json index 2a71c3c256..a894bb224b 100644 --- a/packages/admin/admin-react-select/package.json +++ b/packages/admin/admin-react-select/package.json @@ -1,6 +1,6 @@ { "name": "@comet/admin-react-select", - "version": "7.0.0-beta.6", + "version": "7.0.0", "repository": { "type": "git", "url": "https://github.com/vivid-planet/comet", @@ -26,15 +26,15 @@ "start:types": "tsc --project ./tsconfig.json --emitDeclarationOnly --watch --preserveWatchOutput" }, "dependencies": { - "@comet/admin": "workspace:^7.0.0-beta.6", - "@comet/admin-icons": "workspace:^7.0.0-beta.6", + "@comet/admin": "workspace:^7.0.0", + "@comet/admin-icons": "workspace:^7.0.0", "classnames": "^2.2.6" }, "devDependencies": { "@babel/cli": "^7.17.6", "@babel/core": "^7.20.12", - "@comet/admin-babel-preset": "workspace:^7.0.0-beta.6", - "@comet/eslint-config": "workspace:^7.0.0-beta.6", + "@comet/admin-babel-preset": "workspace:^7.0.0", + "@comet/eslint-config": "workspace:^7.0.0", "@mui/material": "^5.0.0", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", diff --git a/packages/admin/admin-rte/CHANGELOG.md b/packages/admin/admin-rte/CHANGELOG.md index 5e12aa9844..94926f287b 100644 --- a/packages/admin/admin-rte/CHANGELOG.md +++ b/packages/admin/admin-rte/CHANGELOG.md @@ -1,5 +1,160 @@ # @comet/admin-rte +## 7.0.0 + +### Major Changes + +- 92eae2ba9: Change the method of overriding the styling of Admin components + + - Remove dependency on the legacy `@mui/styles` package in favor of `@mui/material/styles`. + - Add the ability to style components using [MUI's `sx` prop](https://mui.com/system/getting-started/the-sx-prop/). + - Add the ability to style individual elements (slots) of a component using the `slotProps` and `sx` props. + - The `# @comet/admin-rte syntax in the theme's `styleOverrides` is no longer supported, see: https://mui.com/material-ui/migration/v5-style-changes/#migrate-theme-styleoverrides-to-emotion + + ```diff + const theme = createCometTheme({ + components: { + CometAdminMyComponent: { + styleOverrides: { + - root: { + - "&$hasShadow": { + - boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)", + - }, + - "& $header": { + - backgroundColor: "lime", + - }, + - }, + + hasShadow: { + + boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)", + + }, + + header: { + + backgroundColor: "lime", + + }, + }, + }, + }, + }); + ``` + + - Overriding a component's styles using `withStyles` is no longer supported. Use the `sx` and `slotProps` props instead: + + ```diff + -import { withStyles } from "@mui/styles"; + - + -const StyledMyComponent = withStyles({ + - root: { + - backgroundColor: "lime", + - }, + - header: { + - backgroundColor: "fuchsia", + - }, + -})(MyComponent); + - + -// ... + - + -; + + + ``` + + - The module augmentation for the `DefaultTheme` type from `@mui/styles/defaultTheme` is no longer needed and needs to be removed from the admins theme file, usually located in `admin/src/theme.ts`: + + ```diff + -declare module "@mui/styles/defaultTheme" { + - // eslint-disable-next-line @typescript-eslint/no-empty-interface + - export interface DefaultTheme extends Theme {} + -} + ``` + + - Class-keys originating from MUI components have been removed from Comet Admin components, causing certain class-names and `styleOverrides` to no longer be applied. + The components `root` class-key is not affected. Other class-keys will retain the class-names and `styleOverrides` from the underlying MUI component. + For example, in `ClearInputAdornment` (when used with `position="end"`) the class-name `CometAdminClearInputAdornment-positionEnd` and the `styleOverrides` for `CometAdminClearInputAdornment.positionEnd` will no longer be applied. + The component will retain the class-names `MuiInputAdornment-positionEnd`, `MuiInputAdornment-root`, and `CometAdminClearInputAdornment-root`. + Also, the `styleOverrides` for `MuiInputAdornment.positionEnd`, `MuiInputAdornment.root`, and `CometAdminClearInputAdornment.root` will continue to be applied. + + This affects the following components: + + - `AppHeader` + - `AppHeaderMenuButton` + - `ClearInputAdornment` + - `Tooltip` + - `CancelButton` + - `DeleteButton` + - `OkayButton` + - `SaveButton` + - `StackBackButton` + - `DatePicker` + - `DateRangePicker` + - `TimePicker` + + - For more details, see MUI's migration guide: https://mui.com/material-ui/migration/v5-style-changes/#mui-styles + +### Patch Changes + +- b5753e612: Allow partial props in the theme's `defaultProps` instead of requiring all props when setting the `defaultProps` of a component +- Updated dependencies [05ce68ec0] +- Updated dependencies [949356e84] +- Updated dependencies [51a0861d8] +- Updated dependencies [dc8bb6a99] +- Updated dependencies [54f775497] +- Updated dependencies [73140014f] +- Updated dependencies [9a4530b06] +- Updated dependencies [dc8bb6a99] +- Updated dependencies [e3efdfcc3] +- Updated dependencies [02d33e230] +- Updated dependencies [a0bd09afa] +- Updated dependencies [8cc51b368] +- Updated dependencies [c46146cb3] +- Updated dependencies [6054fdcab] +- Updated dependencies [d0869ac82] +- Updated dependencies [9a4530b06] +- Updated dependencies [47ec528a4] +- Updated dependencies [956111ab2] +- Updated dependencies [19eaee4ca] +- Updated dependencies [758c65656] +- Updated dependencies [9a4530b06] +- Updated dependencies [04ed68cc9] +- Updated dependencies [61b2acfb2] +- Updated dependencies [0263a45fa] +- Updated dependencies [4ca4830f3] +- Updated dependencies [3397ec1b6] +- Updated dependencies [20b2bafd8] +- Updated dependencies [51a0861d8] +- Updated dependencies [9c4b7c974] +- Updated dependencies [b5753e612] +- Updated dependencies [2a7bc765c] +- Updated dependencies [774977311] +- Updated dependencies [27efe7bd8] +- Updated dependencies [f8114cd39] +- Updated dependencies [569ad0463] +- Updated dependencies [b87c3c292] +- Updated dependencies [170720b0c] +- Updated dependencies [f06f4bea6] +- Updated dependencies [119714999] +- Updated dependencies [2a7bc765c] +- Updated dependencies [d2e64d1ec] +- Updated dependencies [241249bd4] +- Updated dependencies [be4e6392d] +- Updated dependencies [a53545438] +- Updated dependencies [1a1d83156] +- Updated dependencies [a2f278bbd] +- Updated dependencies [66330e4e6] +- Updated dependencies [b0249e3bc] +- Updated dependencies [92eae2ba9] + - @comet/admin@7.0.0 + - @comet/admin-icons@7.0.0 + ## 7.0.0-beta.6 ### Patch Changes diff --git a/packages/admin/admin-rte/package.json b/packages/admin/admin-rte/package.json index b826d1734b..df4a92af80 100644 --- a/packages/admin/admin-rte/package.json +++ b/packages/admin/admin-rte/package.json @@ -1,6 +1,6 @@ { "name": "@comet/admin-rte", - "version": "7.0.0-beta.6", + "version": "7.0.0", "repository": { "type": "git", "url": "https://github.com/vivid-planet/comet", @@ -28,8 +28,8 @@ "test:watch": "jest --watch" }, "dependencies": { - "@comet/admin": "workspace:^7.0.0-beta.6", - "@comet/admin-icons": "workspace:^7.0.0-beta.6", + "@comet/admin": "workspace:^7.0.0", + "@comet/admin-icons": "workspace:^7.0.0", "detect-browser": "^5.2.1", "draft-js-export-html": "^1.4.1", "draft-js-import-html": "^1.4.1", @@ -39,8 +39,8 @@ "devDependencies": { "@babel/cli": "^7.17.6", "@babel/core": "^7.20.12", - "@comet/admin-babel-preset": "workspace:^7.0.0-beta.6", - "@comet/eslint-config": "workspace:^7.0.0-beta.6", + "@comet/admin-babel-preset": "workspace:^7.0.0", + "@comet/eslint-config": "workspace:^7.0.0", "@mui/material": "^5.0.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^12.0.0", diff --git a/packages/admin/admin-theme/CHANGELOG.md b/packages/admin/admin-theme/CHANGELOG.md index 6f7011c1d7..1771bebe58 100644 --- a/packages/admin/admin-theme/CHANGELOG.md +++ b/packages/admin/admin-theme/CHANGELOG.md @@ -1,5 +1,186 @@ # @comet/admin-theme +## 7.0.0 + +### Major Changes + +- 803bc607f: Rework theme of MUI's `Chip` to match the updated Comet CI +- 33ba50719: Rework `typographyOptions` + + - Replace `typographyOptions` with `createTypographyOptions()` to enable using the theme's breakpoints for media queries + - Add new default styles for variants `subtitle1`, `subtitle2`, `caption` and `overline` + - Remove custom `fontWeights` + - Switch the font from `Roboto` to `Roboto Flex` + + The font switch requires you to make the following two changes in your admin application: + + **Note: The `@comet/upgrade` script handles these changes automatically.** + + ```diff + // package.json + - "@fontsource/roboto": "^4.5.5", + + "@fontsource-variable/roboto-flex": "^5.0.0", + ``` + + ```diff + // App.tsx + - import "@fontsource/roboto/100.css"; + - import "@fontsource/roboto/300.css"; + - import "@fontsource/roboto/400.css"; + - import "@fontsource/roboto/500.css"; + + import "@fontsource-variable/roboto-flex/full.css"; + ``` + +- 33ba50719: Rework colors + + - Rename `bluePalette` to `primaryPalette` + - Rename `neutrals` to `greyPalette` + - Remove `greenPalette` + - Change colors in all palettes + - Change `text` colors + - Add `highlight` colors `purple`, `green`, `orange`, `yellow` and `red` to palette + + Hint: To use the `highlight` colors without getting a type error, you must adjust the `vendors.d.ts` in your project: + + ```diff + + /// + + // ... + ``` + +- 33ba50719: Change `Link` text styling +- cce88d448: Adapt `Typography` headlines for mobile devices (<900px) +- 92eae2ba9: Change the method of overriding the styling of Admin components + + - Remove dependency on the legacy `@mui/styles` package in favor of `@mui/material/styles`. + - Add the ability to style components using [MUI's `sx` prop](https://mui.com/system/getting-started/the-sx-prop/). + - Add the ability to style individual elements (slots) of a component using the `slotProps` and `sx` props. + - The `# @comet/admin-theme syntax in the theme's `styleOverrides` is no longer supported, see: https://mui.com/material-ui/migration/v5-style-changes/#migrate-theme-styleoverrides-to-emotion + + ```diff + const theme = createCometTheme({ + components: { + CometAdminMyComponent: { + styleOverrides: { + - root: { + - "&$hasShadow": { + - boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)", + - }, + - "& $header": { + - backgroundColor: "lime", + - }, + - }, + + hasShadow: { + + boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)", + + }, + + header: { + + backgroundColor: "lime", + + }, + }, + }, + }, + }); + ``` + + - Overriding a component's styles using `withStyles` is no longer supported. Use the `sx` and `slotProps` props instead: + + ```diff + -import { withStyles } from "@mui/styles"; + - + -const StyledMyComponent = withStyles({ + - root: { + - backgroundColor: "lime", + - }, + - header: { + - backgroundColor: "fuchsia", + - }, + -})(MyComponent); + - + -// ... + - + -; + + + ``` + + - The module augmentation for the `DefaultTheme` type from `@mui/styles/defaultTheme` is no longer needed and needs to be removed from the admins theme file, usually located in `admin/src/theme.ts`: + + ```diff + -declare module "@mui/styles/defaultTheme" { + - // eslint-disable-next-line @typescript-eslint/no-empty-interface + - export interface DefaultTheme extends Theme {} + -} + ``` + + - Class-keys originating from MUI components have been removed from Comet Admin components, causing certain class-names and `styleOverrides` to no longer be applied. + The components `root` class-key is not affected. Other class-keys will retain the class-names and `styleOverrides` from the underlying MUI component. + For example, in `ClearInputAdornment` (when used with `position="end"`) the class-name `CometAdminClearInputAdornment-positionEnd` and the `styleOverrides` for `CometAdminClearInputAdornment.positionEnd` will no longer be applied. + The component will retain the class-names `MuiInputAdornment-positionEnd`, `MuiInputAdornment-root`, and `CometAdminClearInputAdornment-root`. + Also, the `styleOverrides` for `MuiInputAdornment.positionEnd`, `MuiInputAdornment.root`, and `CometAdminClearInputAdornment.root` will continue to be applied. + + This affects the following components: + + - `AppHeader` + - `AppHeaderMenuButton` + - `ClearInputAdornment` + - `Tooltip` + - `CancelButton` + - `DeleteButton` + - `OkayButton` + - `SaveButton` + - `StackBackButton` + - `DatePicker` + - `DateRangePicker` + - `TimePicker` + + - For more details, see MUI's migration guide: https://mui.com/material-ui/migration/v5-style-changes/#mui-styles + +- 33ba50719: Rework shadows + + - Change shadows 1 - 4 + +### Minor Changes + +- c702cc5b2: Override the default theme of `Badge` + + If no children are passed, the Badge renders as is without position relative and absolute. + +- 535444623: Slightly increase the default size of dialogs +- f9615fbf4: Adapt styling of filter panel in `DataGrid` for mobile devices (<900px) +- 33ba50719: Add `breakpointsOptions` to theme +- 865f253d8: Add custom `Typography` variants for displaying inline lists + + ```tsx + + Lorem ipsum + Lorem ipsum + Lorem ipsum + + ``` + + Hint: To use the custom variants without getting a type error, you must adjust the `vendors.d.ts` in your project: + + ```diff + + /// + + // ... + ``` + +### Patch Changes + +- @comet/admin-icons@7.0.0 + ## 7.0.0-beta.6 ### Patch Changes diff --git a/packages/admin/admin-theme/package.json b/packages/admin/admin-theme/package.json index f49f4ba446..c62747b36a 100644 --- a/packages/admin/admin-theme/package.json +++ b/packages/admin/admin-theme/package.json @@ -1,6 +1,6 @@ { "name": "@comet/admin-theme", - "version": "7.0.0-beta.6", + "version": "7.0.0", "repository": { "type": "git", "url": "https://github.com/vivid-planet/comet", @@ -26,14 +26,14 @@ "start:types": "tsc --project ./tsconfig.json --emitDeclarationOnly --watch --preserveWatchOutput" }, "dependencies": { - "@comet/admin-icons": "workspace:^7.0.0-beta.6", + "@comet/admin-icons": "workspace:^7.0.0", "@mui/utils": "^5.4.1" }, "devDependencies": { "@babel/cli": "^7.17.6", "@babel/core": "^7.20.12", - "@comet/admin-babel-preset": "workspace:^7.0.0-beta.6", - "@comet/eslint-config": "workspace:^7.0.0-beta.6", + "@comet/admin-babel-preset": "workspace:^7.0.0", + "@comet/eslint-config": "workspace:^7.0.0", "@mui/material": "^5.0.0", "@mui/system": "^5.0.0", "@mui/x-data-grid": "^5.0.0", diff --git a/packages/admin/admin/CHANGELOG.md b/packages/admin/admin/CHANGELOG.md index afb07959d7..30ca9cdee1 100644 --- a/packages/admin/admin/CHANGELOG.md +++ b/packages/admin/admin/CHANGELOG.md @@ -1,5 +1,419 @@ # @comet/admin +## 7.0.0 + +### Major Changes + +- 949356e84: Remove `clearable` prop from `FinalFormSelect` and `FinalFormAsyncSelect` + + `FinalFormSelect` and `FinalFormAsyncSelect` are now clearable when `required` is not set. + +- 51a0861d8: Create a subroute by default in `SaveBoundary` + + The default path is `./save`, you can change it using the `subRoutePath` prop. + +- 73140014f: Change theming method of `Menu` + + - Rename `permanent` class-key to `permanentDrawer` and `temporary` class-key to `temporaryDrawer` + - Replace the `permanentDrawerProps` and `temporaryDrawerProps` props with `slotProps` + +- 9a4530b06: Remove the `listItem` class key from `MenuCollapsibleItemClassKey` due to a larger overhaul of the menu components +- dc8bb6a99: Remove the `openedIcon` and `closedIcon` props from `MenuCollapsibleItem` and add `iconMapping` instead + + The icon shown as the collapse indicator will be chosen from `iconMapping`, depending on the collapsed states of the Menu and the Item. + +- 8cc51b368: Remove `popoverProps` from `AppHeaderDropdown` + + Use `slotProps.popover` instead. + +- 6054fdcab: Remove the `requiredSymbol` prop from `FieldContainer` and use MUIs native implementation + + This prop was used to display a custom required symbol next to the label of the field. We now use the native implementation of the required attribute of MUI to ensure better accessibility and compatibility with screen readers. + +- d0869ac82: Rework `Toolbar` + + - The `Toolbar` is now split into a top and a bottom bar. + + The top bar displays a scope indicator and breadcrumbs. The bottom bar behaves like the old `Toolbar`. + + - The styling of `Toolbar`, `ToolbarItem`, `ToolbarActions`, `ToolbarAutomaticTitleItem` and `ToolbarBackButton` was adjusted + + - The new `ToolbarActionButton` should be used for buttons inside the `ToolbarActions` + + It automatically switches from a normal `Button` to an `IconButton` for smaller screen sizes. + + - To show a scope indicator, you must pass a `` to the `Toolbar` via the `scopeIndicator` prop + +- 9a4530b06: Remove `temporaryDrawerProps`, `permanentDrawerProps`, `temporaryDrawerPaperProps` and `permanentDrawerPaperProps` props from `Menu` component. + + Use `slotProps` instead. + +- 47ec528a4: Remove the `FieldContainerComponent` component + + `FieldContainerComponent` was never intended to be exported, use `FieldContainer` instead. + +- 956111ab2: Rename the `FilterBarMoveFilersClassKey` type to `FilterBarMoreFiltersClassKey` +- 19eaee4ca: Remove the `disabled` class-key in `TabScrollButton` + + Use the `:disabled` selector instead when styling the disabled state. + +- 9a4530b06: Remove the `MenuLevel` type + + The type can be used from `MenuItemProps['level']` instead, if necessary. + +- 04ed68cc9: Remove the `components` and `componentProps` props from `CopyToClipboardButton` + + Instead, for the icons, use the `copyIcon` and `successIcon` props to pass a `ReactNode` instead of separately passing in values to the `components` and `componentProps` objects. + Use `slotPops` to pass props to the remaining elements. + +- 61b2acfb2: Add `FeedbackButton` component +- 2a7bc765c: Replace the `componentsProps` prop with `slotProps` in `FieldSet` +- 27efe7bd8: `FinalFormFileSelect` is now a simple final form wrapper around `FileSelect` + + Props now mirror those of `FileSelect` and are passed through to the `FileSelect` component. + Setting `defaultProps` in the theme must now be done with `CometAdminFileSelect` instead of `CometAdminFinalFormFileSelect`. + + Class keys have been removed. Apply custom styling to `CometAdminFileSelect` instead of `FinalFormFileSelect`. + + The default value for `maxSize` has been removed. + You may want to set the previous default value of 50 MB explicitly. + + ```diff + + ``` + + The `disableDropzone` prop has been removed. + Use `slotProps.dropzone.hideDroppableArea` instead. + + ```diff + + ``` + + The `disableSelectFileButton` prop has been removed. + Use `slotProps.dropzone.hideButton` instead. + + ```diff + + ``` + +- b87c3c292: Replace the `componentsProps` prop with `slotProps` in `InputWithPopper` and remove the `InputWithPopperComponentsProps` type +- 2a7bc765c: Remove the `message` class-key from `Alert` + + Use the `.MuiAlert-message` selector instead to style the message of the underlying MUI `Alert` component. + +- d2e64d1ec: Remove the `paper` class-key from `FilterBarPopoverFilter` + + Instead of using `styleOverrides` for `paper` in the theme, use the `slotProps` and `sx` props. + +- 241249bd4: Remove the `disabled` and `focusVisible` class-keys and rename the `inner` class-key to `content` in `AppHeaderButton` + + Use the `:disabled` selector instead when styling the disabled state. + Use the `:focus` selector instead when styling the focus state. + +- be4e6392d: Remove `endAdornment` prop from `FinalFormSelect` component + + The reason were conflicts with the clearable prop. This decision was based on the fact that MUI doesn't support endAdornment on selects (see: [mui/material-ui#17799](https://github.com/mui/material-ui/issues/17799)), and that there are no common use cases where both `endAdornment` and `clearable` are needed simultaneously. + +- a53545438: Remove the `disabled` class-key in `ClearInputButton` + + Use the `:disabled` selector instead when styling the disabled state. + +- 1a1d83156: `MenuItem` no longer supports props from MUI's `ListItem` but those from `ListItemButton` instead +- a2f278bbd: Remove the `popoverPaper` class-key and rename the `popoverRoot` class-key to `popover` in `AppHeaderDropdown` + + Instead of using `styleOverrides` for `popoverPaper` in the theme, use the `slotProps` and `sx` props. + Use the `popover` prop instead of `popoverRoot` to override styles. + +- 92eae2ba9: Change the method of overriding the styling of Admin components + + - Remove dependency on the legacy `@mui/styles` package in favor of `@mui/material/styles`. + - Add the ability to style components using [MUI's `sx` prop](https://mui.com/system/getting-started/the-sx-prop/). + - Add the ability to style individual elements (slots) of a component using the `slotProps` and `sx` props. + - The `# @comet/admin syntax in the theme's `styleOverrides` is no longer supported, see: https://mui.com/material-ui/migration/v5-style-changes/#migrate-theme-styleoverrides-to-emotion + + ```diff + const theme = createCometTheme({ + components: { + CometAdminMyComponent: { + styleOverrides: { + - root: { + - "&$hasShadow": { + - boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)", + - }, + - "& $header": { + - backgroundColor: "lime", + - }, + - }, + + hasShadow: { + + boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)", + + }, + + header: { + + backgroundColor: "lime", + + }, + }, + }, + }, + }); + ``` + + - Overriding a component's styles using `withStyles` is no longer supported. Use the `sx` and `slotProps` props instead: + + ```diff + -import { withStyles } from "@mui/styles"; + - + -const StyledMyComponent = withStyles({ + - root: { + - backgroundColor: "lime", + - }, + - header: { + - backgroundColor: "fuchsia", + - }, + -})(MyComponent); + - + -// ... + - + -; + + + ``` + + - The module augmentation for the `DefaultTheme` type from `@mui/styles/defaultTheme` is no longer needed and needs to be removed from the admins theme file, usually located in `admin/src/theme.ts`: + + ```diff + -declare module "@mui/styles/defaultTheme" { + - // eslint-disable-next-line @typescript-eslint/no-empty-interface + - export interface DefaultTheme extends Theme {} + -} + ``` + + - Class-keys originating from MUI components have been removed from Comet Admin components, causing certain class-names and `styleOverrides` to no longer be applied. + The components `root` class-key is not affected. Other class-keys will retain the class-names and `styleOverrides` from the underlying MUI component. + For example, in `ClearInputAdornment` (when used with `position="end"`) the class-name `CometAdminClearInputAdornment-positionEnd` and the `styleOverrides` for `CometAdminClearInputAdornment.positionEnd` will no longer be applied. + The component will retain the class-names `MuiInputAdornment-positionEnd`, `MuiInputAdornment-root`, and `CometAdminClearInputAdornment-root`. + Also, the `styleOverrides` for `MuiInputAdornment.positionEnd`, `MuiInputAdornment.root`, and `CometAdminClearInputAdornment.root` will continue to be applied. + + This affects the following components: + + - `AppHeader` + - `AppHeaderMenuButton` + - `ClearInputAdornment` + - `Tooltip` + - `CancelButton` + - `DeleteButton` + - `OkayButton` + - `SaveButton` + - `StackBackButton` + - `DatePicker` + - `DateRangePicker` + - `TimePicker` + + - For more details, see MUI's migration guide: https://mui.com/material-ui/migration/v5-style-changes/#mui-styles + +### Minor Changes + +- 05ce68ec0: Add `StackToolbar`, a variant of `Toolbar` component that hides itself in a nested stack +- dc8bb6a99: Add hover effect for collapsed menu icons. This ensures that navigation is also possible in collapsed state. +- 54f775497: Add new `DataGridToolbar` component + + The "normal" `Toolbar` is meant to be used on page-level to show the current scope, breadcrumbs and page-wide action buttons (like save). + The `DataGridToolbar`, however, is meant to be used in DataGrids to contain a search input, filter options, bulk actions and an add button. + + You can use it like this: + + ```tsx + {/* ... */}, + }} + /> + ``` + +- e3efdfcc3: Add the ability to change by which fields a DataGrid column is sorted using `sortBy` in the column definition + + This can be useful for custom columns that do not represent an actual field in the data, e.g., columns that render the data of multiple fields. + + ```tsx + const columns: GridColDef[] = [ + { + field: "fullName", + sortBy: ["firstName", "lastName"], + renderCell: ({ row }) => `${row.firstName} ${row.lastName}`, + }, + ]; + ``` + +- 02d33e230: Show icons in permanent menu even in closed state. +- a0bd09afa: Add `ForcePromptRoute`, a `Route` that triggers a prompt even if it is a subroute + + Used in `StackSwitch` so that navigating to a nested stack subpage will show a prompt (if dirty) + +- c46146cb3: Add new `FileSelect`, `FileDropzone` and `FileSelectListItem` components + + `FileSelect` combines `FileDropzone` and `FileSelectListItem` to handle the user's selection of files, display those files below, and handle the download and removal actions. + + `FileDropzone` is a wrapper around [react-dropzone](https://www.npmjs.com/package/react-dropzone) that manages error and disabled states. + + `FileSelectListItem` is used to display a list of files, including loading, skeleton, and error states and options to download and delete the file. + +- 758c65656: Only use horizontal layout in `FieldContainer` when it exceeds `600px` in width +- 0263a45fa: Add the ability to make `DataGrid` columns responsive by setting the `visible` property of the column definition to a media query + + This can be used to hide certain columns on smaller screens and show a combined column instead. + + This will only work when using `usePersistentColumnState` with `DataGridPro`/`DataGridPremium`. + When defining the columns, use the `GridColDef` type from `@comet/admin` instead of `@mui/x-data-grid`. + + ```ts + const columns: GridColDef[] = [ + { + field: "fullName", + visible: theme.breakpoints.down("md"), + }, + { + field: "firstName", + visible: theme.breakpoints.up("md"), + }, + { + field: "lastName", + visible: theme.breakpoints.up("md"), + }, + ]; + ``` + +- 4ca4830f3: Router Prompt: actively reset form state when choosing discard in the prompt dialog +- 3397ec1b6: Add the `GridCellContent` component + + Used to display primary and secondary texts and an icon in a `DataGrid` cell using the columns `renderCell` function. + + ```tsx + const columns: GridColDef[] = [ + { + field: "title", + renderCell: ({ row }) => {row.title}, + }, + { + field: "overview", + renderCell: ({ row }) => } />, + }, + ]; + ``` + +- 20b2bafd8: Add setting `signInUrl` to `createErrorDialogApolloLink` +- 51a0861d8: Support relative paths in `SubRoute` component using `./subroute` notation +- 9c4b7c974: Add support for third level menu items. Collapsible items can be nested in each other, which creates subsubitems. +- 774977311: Add `GridColumnsButton` + + This button opens a panel to hide or show columns of `DataGrid`, similar to MUIs `GridToolbarColumnsButton`. + +- f8114cd39: Pass `required` prop to children of `Field` component +- 569ad0463: Deprecate `SplitButton`, `FinalFormSaveSplitButton` and `SplitButtonContext` and remove all uses of these components in our libraries + + The reason is that we decided to retire the SplitButton pattern. + +- 170720b0c: Stack: Update parent breadcrumb URL in state to not forget filters and other states when going back +- f06f4bea6: Add `MenuItemGroup` component to group menu items + + **Example:** + + ```tsx + + } to="/menu-item-1" /> + } to="/menu-item-2" /> + } to="/menu-item-3" /> + {/* Some more menu items... */} + + ``` + +- 119714999: Automatically set `fullWidth` for `FieldContainer` with `variant="horizontal"` + + Horizontal fields are automatically responsive: + If they are less than 600px wide, the layout automatically changes to vertical. + For this to work correctly, the fields must be `fullWidth`. + Therefore, `fullWidth` is now `true` by default for horizontal fields. + +- b0249e3bc: Add `helperIcon` prop to MenuItemGroup. Its intended purpose is to render an icon with a `Tooltip` behind the group section title, if the menu is not collapsed. + + ### Examples: + + **Render only an icon:** + + ```tsx + }> + {/* ... */} + + ``` + + **Render an icon with tooltip:** + + ```tsx + + + + } + > + {/* ... */} + + ``` + +### Patch Changes + +- b5753e612: Allow partial props in the theme's `defaultProps` instead of requiring all props when setting the `defaultProps` of a component +- 66330e4e6: Fix a bug where the `disabled` prop would not be passed to the children of `Field` +- Updated dependencies [803bc607f] +- Updated dependencies [33ba50719] +- Updated dependencies [33ba50719] +- Updated dependencies [c702cc5b2] +- Updated dependencies [535444623] +- Updated dependencies [33ba50719] +- Updated dependencies [f9615fbf4] +- Updated dependencies [33ba50719] +- Updated dependencies [cce88d448] +- Updated dependencies [865f253d8] +- Updated dependencies [92eae2ba9] +- Updated dependencies [33ba50719] + - @comet/admin-theme@7.0.0 + - @comet/admin-icons@7.0.0 + ## 7.0.0-beta.6 ### Minor Changes diff --git a/packages/admin/admin/package.json b/packages/admin/admin/package.json index a90f6d2b59..36911799d4 100644 --- a/packages/admin/admin/package.json +++ b/packages/admin/admin/package.json @@ -1,6 +1,6 @@ { "name": "@comet/admin", - "version": "7.0.0-beta.6", + "version": "7.0.0", "repository": { "type": "git", "url": "https://github.com/vivid-planet/comet", @@ -28,8 +28,8 @@ "test:watch": "jest --watch" }, "dependencies": { - "@comet/admin-icons": "workspace:^7.0.0-beta.6", - "@comet/admin-theme": "workspace:^7.0.0-beta.6", + "@comet/admin-icons": "workspace:^7.0.0", + "@comet/admin-theme": "workspace:^7.0.0", "@mui/lab": "^5.0.0-alpha.76", "@mui/private-theming": "^5.0.0", "clsx": "^1.1.1", @@ -49,8 +49,8 @@ "@apollo/client": "^3.7.0", "@babel/cli": "^7.17.6", "@babel/core": "^7.20.12", - "@comet/admin-babel-preset": "workspace:^7.0.0-beta.6", - "@comet/eslint-config": "workspace:^7.0.0-beta.6", + "@comet/admin-babel-preset": "workspace:^7.0.0", + "@comet/eslint-config": "workspace:^7.0.0", "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", "@mui/material": "^5.0.0", diff --git a/packages/admin/blocks-admin/CHANGELOG.md b/packages/admin/blocks-admin/CHANGELOG.md index 9a9fa0ff66..29ebd4d447 100644 --- a/packages/admin/blocks-admin/CHANGELOG.md +++ b/packages/admin/blocks-admin/CHANGELOG.md @@ -1,5 +1,188 @@ # @comet/blocks-admin +## 7.0.0 + +### Major Changes + +- b7560e3a7: Move `YouTubeVideoBlock` to `@cms` packages + + **Migrate** + + ```diff + - import { YouTubeVideoBlock } from "@comet/blocks-admin"; + + import { YouTubeVideoBlock } from "@comet/cms-admin"; + ``` + + ```diff + - import { YouTubeVideoBlock } from "@comet/blocks-api"; + + import { YouTubeVideoBlock } from "@comet/cms-api"; + ``` + +- a58918893: Remove `aspectRatio` from `YouTubeBlock` + + The block's aspect ratio options (4x3, 16x9) proved too inflexible to be of actual use in an application. Therefore, the aspect ratio field was removed. It should be defined in the application instead. + + **Migrate** + + The block requires an aspect ratio in the site. It should be set using the `aspectRatio` prop (default: `16x9`): + + ```diff + + ``` + +- 92eae2ba9: Change the method of overriding the styling of Admin components + + - Remove dependency on the legacy `@mui/styles` package in favor of `@mui/material/styles`. + - Add the ability to style components using [MUI's `sx` prop](https://mui.com/system/getting-started/the-sx-prop/). + - Add the ability to style individual elements (slots) of a component using the `slotProps` and `sx` props. + - The `# @comet/blocks-admin syntax in the theme's `styleOverrides` is no longer supported, see: https://mui.com/material-ui/migration/v5-style-changes/#migrate-theme-styleoverrides-to-emotion + + ```diff + const theme = createCometTheme({ + components: { + CometAdminMyComponent: { + styleOverrides: { + - root: { + - "&$hasShadow": { + - boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)", + - }, + - "& $header": { + - backgroundColor: "lime", + - }, + - }, + + hasShadow: { + + boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)", + + }, + + header: { + + backgroundColor: "lime", + + }, + }, + }, + }, + }); + ``` + + - Overriding a component's styles using `withStyles` is no longer supported. Use the `sx` and `slotProps` props instead: + + ```diff + -import { withStyles } from "@mui/styles"; + - + -const StyledMyComponent = withStyles({ + - root: { + - backgroundColor: "lime", + - }, + - header: { + - backgroundColor: "fuchsia", + - }, + -})(MyComponent); + - + -// ... + - + -; + + + ``` + + - The module augmentation for the `DefaultTheme` type from `@mui/styles/defaultTheme` is no longer needed and needs to be removed from the admins theme file, usually located in `admin/src/theme.ts`: + + ```diff + -declare module "@mui/styles/defaultTheme" { + - // eslint-disable-next-line @typescript-eslint/no-empty-interface + - export interface DefaultTheme extends Theme {} + -} + ``` + + - Class-keys originating from MUI components have been removed from Comet Admin components, causing certain class-names and `styleOverrides` to no longer be applied. + The components `root` class-key is not affected. Other class-keys will retain the class-names and `styleOverrides` from the underlying MUI component. + For example, in `ClearInputAdornment` (when used with `position="end"`) the class-name `CometAdminClearInputAdornment-positionEnd` and the `styleOverrides` for `CometAdminClearInputAdornment.positionEnd` will no longer be applied. + The component will retain the class-names `MuiInputAdornment-positionEnd`, `MuiInputAdornment-root`, and `CometAdminClearInputAdornment-root`. + Also, the `styleOverrides` for `MuiInputAdornment.positionEnd`, `MuiInputAdornment.root`, and `CometAdminClearInputAdornment.root` will continue to be applied. + + This affects the following components: + + - `AppHeader` + - `AppHeaderMenuButton` + - `ClearInputAdornment` + - `Tooltip` + - `CancelButton` + - `DeleteButton` + - `OkayButton` + - `SaveButton` + - `StackBackButton` + - `DatePicker` + - `DateRangePicker` + - `TimePicker` + + - For more details, see MUI's migration guide: https://mui.com/material-ui/migration/v5-style-changes/#mui-styles + +### Patch Changes + +- Updated dependencies [05ce68ec0] +- Updated dependencies [949356e84] +- Updated dependencies [51a0861d8] +- Updated dependencies [dc8bb6a99] +- Updated dependencies [54f775497] +- Updated dependencies [73140014f] +- Updated dependencies [9a4530b06] +- Updated dependencies [dc8bb6a99] +- Updated dependencies [e3efdfcc3] +- Updated dependencies [02d33e230] +- Updated dependencies [a0bd09afa] +- Updated dependencies [8cc51b368] +- Updated dependencies [c46146cb3] +- Updated dependencies [6054fdcab] +- Updated dependencies [d0869ac82] +- Updated dependencies [9a4530b06] +- Updated dependencies [47ec528a4] +- Updated dependencies [956111ab2] +- Updated dependencies [19eaee4ca] +- Updated dependencies [758c65656] +- Updated dependencies [9a4530b06] +- Updated dependencies [04ed68cc9] +- Updated dependencies [61b2acfb2] +- Updated dependencies [0263a45fa] +- Updated dependencies [4ca4830f3] +- Updated dependencies [3397ec1b6] +- Updated dependencies [20b2bafd8] +- Updated dependencies [51a0861d8] +- Updated dependencies [9c4b7c974] +- Updated dependencies [b5753e612] +- Updated dependencies [2a7bc765c] +- Updated dependencies [774977311] +- Updated dependencies [27efe7bd8] +- Updated dependencies [f8114cd39] +- Updated dependencies [569ad0463] +- Updated dependencies [b87c3c292] +- Updated dependencies [170720b0c] +- Updated dependencies [f06f4bea6] +- Updated dependencies [119714999] +- Updated dependencies [2a7bc765c] +- Updated dependencies [d2e64d1ec] +- Updated dependencies [241249bd4] +- Updated dependencies [be4e6392d] +- Updated dependencies [a53545438] +- Updated dependencies [1a1d83156] +- Updated dependencies [a2f278bbd] +- Updated dependencies [66330e4e6] +- Updated dependencies [b0249e3bc] +- Updated dependencies [92eae2ba9] + - @comet/admin@7.0.0 + - @comet/admin-icons@7.0.0 + ## 7.0.0-beta.6 ### Patch Changes diff --git a/packages/admin/blocks-admin/package.json b/packages/admin/blocks-admin/package.json index 92c0eaaca5..28fbd8aad6 100644 --- a/packages/admin/blocks-admin/package.json +++ b/packages/admin/blocks-admin/package.json @@ -1,6 +1,6 @@ { "name": "@comet/blocks-admin", - "version": "7.0.0-beta.6", + "version": "7.0.0", "repository": { "type": "git", "url": "https://github.com/vivid-planet/comet", @@ -30,8 +30,8 @@ "test:watch": "jest --watch" }, "dependencies": { - "@comet/admin": "workspace:^7.0.0-beta.6", - "@comet/admin-icons": "workspace:^7.0.0-beta.6", + "@comet/admin": "workspace:^7.0.0", + "@comet/admin-icons": "workspace:^7.0.0", "@mui/lab": "^5.0.0-alpha.76", "clipboard-copy": "^4.0.0", "clsx": "^1.1.1", @@ -43,9 +43,9 @@ "devDependencies": { "@babel/cli": "^7.17.6", "@babel/core": "^7.20.12", - "@comet/admin-babel-preset": "workspace:^7.0.0-beta.6", - "@comet/cli": "workspace:^7.0.0-beta.6", - "@comet/eslint-config": "workspace:^7.0.0-beta.6", + "@comet/admin-babel-preset": "workspace:^7.0.0", + "@comet/cli": "workspace:^7.0.0", + "@comet/eslint-config": "workspace:^7.0.0", "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", "@mui/lab": "^5.0.0-alpha.76", diff --git a/packages/admin/cms-admin/CHANGELOG.md b/packages/admin/cms-admin/CHANGELOG.md index f2f3264ee0..b3701bd70e 100644 --- a/packages/admin/cms-admin/CHANGELOG.md +++ b/packages/admin/cms-admin/CHANGELOG.md @@ -1,5 +1,450 @@ # @comet/cms-admin +## 7.0.0 + +### Major Changes + +- 0588e212c: Remove `language` field from `User` object + + - Providing the locale is not mandatory for ID-Tokens + - Does not have a real use case (better rely on the Accept-Language header of the browser to determine the language of the current user) + +- 3574617ea: Remove `EditPageLayout` + + You can completely remove `EditPageLayout` from your application. + Instead, use `MainContent` to wrap all your page content except the `Toolbar`. + If needed, wrap `MainContent` and `Toolbar` in a fragment. + + Example: + + ```diff + - + + <> + + // ... + + -
+ + + // ... + -
+ + + -
+ + + ``` + +- 0e6debb06: CRUD Generator: Remove `lastUpdatedAt` argument from update mutations +- 2abc096fe: Replace the `ContentScopeIndicator` with a new version intended for use in the new `Toolbar` + + The old `ContentScopeIndicator` was a purely cosmetic component. Hence, the logic for displaying the current scope had to be implemented in the project (usually in a project-internal `ContentScopeIndicator` component). + + The new `ContentScopeIndicator` has the logic for displaying the current scope built-in. Thus, you can remove your project's `ContentScopeIndicator` implementation and directly use the `ContentScopeIndicator` from this library. + + Usage: + + - Per default, the `ContentScopeIndicator` displays the current `ContentScope` + - Pass a scope object via the `scope` prop if your page has a custom scope + - Pass the `global` prop if your page has no scope + - Pass `children` if you want to render completely custom content + +- c8e7a0496: Restructure `MasterMenuData` + + Items now need an explicit `type`. There are four types available: + + - `route` + + ```diff + { + + type: "route", + primary: , + icon: , + route: { + path: "/dashboard", + component: Dashboard, + }, + }, + ``` + + - `externalLink` + + ```diff + { + + type: "externalLink", + primary: , + icon: , + href: "https://comet-dxp.com", + }, + ``` + + - `collapsible` + + ```diff + { + + type: "collapsible", + primary: , + icon: , + - submenu: [ + + items: [ + // ... + ], + }, + ``` + + - `group` (new) + + ```diff + { + + type: "group", + + title: , + + items: [ + + // ... + + ] + }, + ``` + +- 06768a70f: Make icon required for top level menu and group items + + This fixes the problem, that there was no icon or text to display in the collapsed state of the menu if no icon was passed. + Icons are required for all top level menu items and the items of groups. Groups themselves do not require an icon. + +- ebf597120: Remove unused/unnecessary peer dependencies + + Some dependencies were incorrectly marked as peer dependencies. + If you don't use them in your application, you may remove the following dependencies: + + - Admin: `axios` + - API: `@aws-sdk/client-s3`, `@azure/storage-blob` and `pg-error-constants` + +- b7560e3a7: Move `YouTubeVideoBlock` to `@cms` packages + + **Migrate** + + ```diff + - import { YouTubeVideoBlock } from "@comet/blocks-admin"; + + import { YouTubeVideoBlock } from "@comet/cms-admin"; + ``` + + ```diff + - import { YouTubeVideoBlock } from "@comet/blocks-api"; + + import { YouTubeVideoBlock } from "@comet/cms-api"; + ``` + +- b777136f8: Rework `ContentScopeProvider` and `ContentScopeControls` + + The content scope controls were changed to display all available combinations in a single select. + + This requires a few breaking changes: + + 1. The `values` props of `ContentScopeProvider` has been changed to an array: + + **Before** + + ```ts + const values: ContentScopeValues = { + domain: [ + { label: "Main", value: "main" }, + { label: "Secondary", value: "secondary" }, + ], + language: [ + { label: "English", value: "en" }, + { label: "German", value: "de" }, + ], + }; + ``` + + **Now** + + ```ts + const values: ContentScopeValues = [ + { + domain: { label: "Main", value: "main" }, + language: { label: "English", value: "en" }, + }, + { + domain: { label: "Main", value: "main" }, + language: { label: "German", value: "de" }, + }, + { + domain: { label: "Secondary", value: "secondary" }, + language: { label: "English", value: "en" }, + }, + ]; + ``` + + 2. The `config` prop of `ContentScopeControls` has been removed. + You can use the props `searchable`, `groupBy`, and `icon` instead. + You may also remove the convenience wrapper defined in the application as it doesn't offer a real benefit anymore: + + ```diff + + import { ContentScopeControls } from "@comet/cms-admin"; + - import { ContentScopeControls as ContentScopeControlsLibrary } from "@comet/cms-admin"; + + - export const ContentScopeControls: React.FC = () => { + - return config={controlsConfig} />; + - }; + ``` + +- ae0142029: Support single host for block preview + + The content scope is passed through the iframe-bridge in the admin and accessible in the site in the IFrameBridgeProvider. + Breaking: `previewUrl`-property of `SiteConfig` has changed to `blockPreviewBaseUrl` + +- c3940df58: Replace `additionalMimeTypes` and `overrideAcceptedMimeTypes` in `DamConfigProvider` with `acceptedMimeTypes` + + You can now add mime types like this: + + ```tsx + + {/* ... */} + + ``` + + And remove them like this: + + ```tsx + mimeType !== "application/zip"), + }} + > + {/* ... */} + + ``` + + Don't forget to also remove/add the mime types in the API's `DamModule` + +- 92eae2ba9: Change the method of overriding the styling of Admin components + + - Remove dependency on the legacy `@mui/styles` package in favor of `@mui/material/styles`. + - Add the ability to style components using [MUI's `sx` prop](https://mui.com/system/getting-started/the-sx-prop/). + - Add the ability to style individual elements (slots) of a component using the `slotProps` and `sx` props. + - The `# @comet/cms-admin syntax in the theme's `styleOverrides` is no longer supported, see: https://mui.com/material-ui/migration/v5-style-changes/#migrate-theme-styleoverrides-to-emotion + + ```diff + const theme = createCometTheme({ + components: { + CometAdminMyComponent: { + styleOverrides: { + - root: { + - "&$hasShadow": { + - boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)", + - }, + - "& $header": { + - backgroundColor: "lime", + - }, + - }, + + hasShadow: { + + boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)", + + }, + + header: { + + backgroundColor: "lime", + + }, + }, + }, + }, + }); + ``` + + - Overriding a component's styles using `withStyles` is no longer supported. Use the `sx` and `slotProps` props instead: + + ```diff + -import { withStyles } from "@mui/styles"; + - + -const StyledMyComponent = withStyles({ + - root: { + - backgroundColor: "lime", + - }, + - header: { + - backgroundColor: "fuchsia", + - }, + -})(MyComponent); + - + -// ... + - + -; + + + ``` + + - The module augmentation for the `DefaultTheme` type from `@mui/styles/defaultTheme` is no longer needed and needs to be removed from the admins theme file, usually located in `admin/src/theme.ts`: + + ```diff + -declare module "@mui/styles/defaultTheme" { + - // eslint-disable-next-line @typescript-eslint/no-empty-interface + - export interface DefaultTheme extends Theme {} + -} + ``` + + - Class-keys originating from MUI components have been removed from Comet Admin components, causing certain class-names and `styleOverrides` to no longer be applied. + The components `root` class-key is not affected. Other class-keys will retain the class-names and `styleOverrides` from the underlying MUI component. + For example, in `ClearInputAdornment` (when used with `position="end"`) the class-name `CometAdminClearInputAdornment-positionEnd` and the `styleOverrides` for `CometAdminClearInputAdornment.positionEnd` will no longer be applied. + The component will retain the class-names `MuiInputAdornment-positionEnd`, `MuiInputAdornment-root`, and `CometAdminClearInputAdornment-root`. + Also, the `styleOverrides` for `MuiInputAdornment.positionEnd`, `MuiInputAdornment.root`, and `CometAdminClearInputAdornment.root` will continue to be applied. + + This affects the following components: + + - `AppHeader` + - `AppHeaderMenuButton` + - `ClearInputAdornment` + - `Tooltip` + - `CancelButton` + - `DeleteButton` + - `OkayButton` + - `SaveButton` + - `StackBackButton` + - `DatePicker` + - `DateRangePicker` + - `TimePicker` + + - For more details, see MUI's migration guide: https://mui.com/material-ui/migration/v5-style-changes/#mui-styles + +- 769bd72f0: Use the Next.js Preview Mode for the site preview + + The preview is entered by navigating to an API Route in the site, which has to be executed in a secured environment. + In the API Route the current scope is checked (and possibly stored), then the client is redirected to the preview. + +### Minor Changes + +- b777136f8: Add `ContentScopeSelect` component + + This can be used as the basis for both content-driven and data-driven applications. + + **Example** + + ```tsx + function ContentScopeControls() { + const [value, setValue] = useState({ domain: "main", language: "en" }); + + return ( + { + setValue(value); + }} + options={[ + { domain: { label: "Main", value: "main" }, language: { label: "English", value: "en" } }, + { domain: { label: "Main", value: "main" }, language: { label: "German", value: "de" } }, + { domain: { label: "Secondary", value: "secondary" }, language: { label: "English", value: "en" } }, + { domain: { label: "Secondary", value: "secondary" }, language: { label: "German", value: "de" } }, + ]} + /> + ); + } + ``` + +- 2486e8a91: Add future Admin Generator that works with configuration files +- 5c5500733: Remove "Re-login"-button from `CurrentUserProvider` + + The button is already implemented in `createErrorDialogApolloLink()`. The correct arrangement of + the components in `App.tsx` (see migration guide) makes the double implementation needless. + +- 8d920da56: CRUD Generator: Add support for date-only fields +- 52a925e0f: Admin Generator: Use variant="horizontal" for all generated form fields +- 3b1dc72d3: Adapt `Header` and `UserHeaderItem` used in `AppHeader` for mobile devices (<900px) +- 569ad0463: Deprecate `SplitButton`, `FinalFormSaveSplitButton` and `SplitButtonContext` and remove all uses of these components in our libraries + + The reason is that we decided to retire the SplitButton pattern. + +- b7560e3a7: Add preview image to `YouTubeVideoBlock` and `DamVideoBlock` + + The `YouTubeVideoBlock` and the `DamVideoBlock` now support a preview image out of the box. For customisation the default `VideoPreviewImage` component can be overridden with the optional `renderPreviewImage` method. + + It is recommended to replace the custom implemented video blocks in the projects with the updated `YouTubeVideoBlock` and `DamVideoBlock` from the library. + +### Patch Changes + +- 53fe8d76e: Redirect to edit page after adding a redirect + + Previously, the user wasn't redirected to the edit page after creating a new redirect. + This caused strange validation errors and made it impossible to edit the redirect after creating it. + +- Updated dependencies [05ce68ec0] +- Updated dependencies [949356e84] +- Updated dependencies [51a0861d8] +- Updated dependencies [dc8bb6a99] +- Updated dependencies [803bc607f] +- Updated dependencies [54f775497] +- Updated dependencies [33ba50719] +- Updated dependencies [73140014f] +- Updated dependencies [9a4530b06] +- Updated dependencies [dc8bb6a99] +- Updated dependencies [33ba50719] +- Updated dependencies [e3efdfcc3] +- Updated dependencies [02d33e230] +- Updated dependencies [a0bd09afa] +- Updated dependencies [8cc51b368] +- Updated dependencies [c702cc5b2] +- Updated dependencies [c46146cb3] +- Updated dependencies [ad73068f4] +- Updated dependencies [6054fdcab] +- Updated dependencies [535444623] +- Updated dependencies [d0869ac82] +- Updated dependencies [9a4530b06] +- Updated dependencies [47ec528a4] +- Updated dependencies [33ba50719] +- Updated dependencies [956111ab2] +- Updated dependencies [f9615fbf4] +- Updated dependencies [19eaee4ca] +- Updated dependencies [758c65656] +- Updated dependencies [9a4530b06] +- Updated dependencies [cb544bc3e] +- Updated dependencies [04ed68cc9] +- Updated dependencies [61b2acfb2] +- Updated dependencies [0263a45fa] +- Updated dependencies [4ca4830f3] +- Updated dependencies [3397ec1b6] +- Updated dependencies [20b2bafd8] +- Updated dependencies [33ba50719] +- Updated dependencies [51a0861d8] +- Updated dependencies [b7560e3a7] +- Updated dependencies [9c4b7c974] +- Updated dependencies [b5753e612] +- Updated dependencies [2a7bc765c] +- Updated dependencies [774977311] +- Updated dependencies [27efe7bd8] +- Updated dependencies [f8114cd39] +- Updated dependencies [569ad0463] +- Updated dependencies [b87c3c292] +- Updated dependencies [170720b0c] +- Updated dependencies [f06f4bea6] +- Updated dependencies [cce88d448] +- Updated dependencies [a58918893] +- Updated dependencies [119714999] +- Updated dependencies [2a7bc765c] +- Updated dependencies [b87c3c292] +- Updated dependencies [d2e64d1ec] +- Updated dependencies [865f253d8] +- Updated dependencies [f8114cd39] +- Updated dependencies [241249bd4] +- Updated dependencies [be4e6392d] +- Updated dependencies [a53545438] +- Updated dependencies [1a1d83156] +- Updated dependencies [a2f278bbd] +- Updated dependencies [66330e4e6] +- Updated dependencies [b0249e3bc] +- Updated dependencies [92eae2ba9] +- Updated dependencies [33ba50719] + - @comet/admin@7.0.0 + - @comet/admin-theme@7.0.0 + - @comet/admin-date-time@7.0.0 + - @comet/blocks-admin@7.0.0 + - @comet/admin-rte@7.0.0 + - @comet/admin-icons@7.0.0 + ## 7.0.0-beta.6 ### Patch Changes diff --git a/packages/admin/cms-admin/package.json b/packages/admin/cms-admin/package.json index e10cb2bda9..7b7733e33a 100644 --- a/packages/admin/cms-admin/package.json +++ b/packages/admin/cms-admin/package.json @@ -1,6 +1,6 @@ { "name": "@comet/cms-admin", - "version": "7.0.0-beta.6", + "version": "7.0.0", "repository": { "type": "git", "url": "https://github.com/vivid-planet/comet", @@ -35,12 +35,12 @@ "test:watch": "jest --watch" }, "dependencies": { - "@comet/admin": "workspace:^7.0.0-beta.6", - "@comet/admin-date-time": "workspace:^7.0.0-beta.6", - "@comet/admin-icons": "workspace:^7.0.0-beta.6", - "@comet/admin-rte": "workspace:^7.0.0-beta.6", - "@comet/admin-theme": "workspace:^7.0.0-beta.6", - "@comet/blocks-admin": "workspace:^7.0.0-beta.6", + "@comet/admin": "workspace:^7.0.0", + "@comet/admin-date-time": "workspace:^7.0.0", + "@comet/admin-icons": "workspace:^7.0.0", + "@comet/admin-rte": "workspace:^7.0.0", + "@comet/admin-theme": "workspace:^7.0.0", + "@comet/blocks-admin": "workspace:^7.0.0", "@graphql-tools/graphql-file-loader": "^7.5.17", "@graphql-tools/load": "^7.8.14", "@graphql-typed-document-node/core": "^3.1.1", @@ -83,9 +83,9 @@ "@apollo/client": "^3.7.0", "@babel/cli": "^7.17.6", "@babel/core": "^7.20.12", - "@comet/admin-babel-preset": "workspace:^7.0.0-beta.6", - "@comet/cli": "workspace:^7.0.0-beta.6", - "@comet/eslint-config": "workspace:^7.0.0-beta.6", + "@comet/admin-babel-preset": "workspace:^7.0.0", + "@comet/cli": "workspace:^7.0.0", + "@comet/eslint-config": "workspace:^7.0.0", "@emotion/react": "^11.5.0", "@emotion/styled": "^11.3.0", "@graphql-codegen/cli": "^2.0.0", diff --git a/packages/api/blocks-api/CHANGELOG.md b/packages/api/blocks-api/CHANGELOG.md index 8441c4da0b..3392af469d 100644 --- a/packages/api/blocks-api/CHANGELOG.md +++ b/packages/api/blocks-api/CHANGELOG.md @@ -1,5 +1,86 @@ # @comet/blocks-api +## 7.0.0 + +### Major Changes + +- e15927594: Support "real" dependency injection in `BlockData#transformToPlain` + + Previously we supported poor man's dependency injection using the `TransformDependencies` object in `transformToPlain`. + This is now replaced by a technique that allows actual dependency injection. + + **Example** + + ```ts + class NewsLinkBlockData extends BlockData { + @BlockField({ nullable: true }) + id?: string; + + transformToPlain() { + // Return service that does the transformation + return NewsLinkBlockTransformerService; + } + } + + type TransformResponse = { + news?: { + id: string; + slug: string; + }; + }; + + @Injectable() + class NewsLinkBlockTransformerService implements BlockTransformerServiceInterface { + // Use dependency injection here + constructor(@InjectRepository(News) private readonly repository: EntityRepository) {} + + async transformToPlain(block: NewsLinkBlockData, context: BlockContext) { + if (!block.id) { + return {}; + } + + const news = await this.repository.findOneOrFail(block.id); + + return { + news: { + id: news.id, + slug: news.slug, + }, + }; + } + } + ``` + + Adding this new technique results in a few breaking changes: + + - Remove dynamic registration of `BlocksModule` + - Pass `moduleRef` to `BlocksTransformerMiddlewareFactory` instead of `dependencies` + - Remove `dependencies` from `BlockData#transformToPlain` + + See the [migration guide](https://docs.comet-dxp.com/docs/migration/migration-from-v6-to-v7) on how to migrate. + +- ebf597120: Remove unused/unnecessary peer dependencies + + Some dependencies were incorrectly marked as peer dependencies. + If you don't use them in your application, you may remove the following dependencies: + + - Admin: `axios` + - API: `@aws-sdk/client-s3`, `@azure/storage-blob` and `pg-error-constants` + +- b7560e3a7: Move `YouTubeVideoBlock` to `@cms` packages + + **Migrate** + + ```diff + - import { YouTubeVideoBlock } from "@comet/blocks-admin"; + + import { YouTubeVideoBlock } from "@comet/cms-admin"; + ``` + + ```diff + - import { YouTubeVideoBlock } from "@comet/blocks-api"; + + import { YouTubeVideoBlock } from "@comet/cms-api"; + ``` + ## 7.0.0-beta.6 ## 7.0.0-beta.5 diff --git a/packages/api/blocks-api/package.json b/packages/api/blocks-api/package.json index 55588658c2..614a2f7598 100644 --- a/packages/api/blocks-api/package.json +++ b/packages/api/blocks-api/package.json @@ -1,6 +1,6 @@ { "name": "@comet/blocks-api", - "version": "7.0.0-beta.6", + "version": "7.0.0", "repository": { "type": "git", "url": "https://github.com/vivid-planet/comet", @@ -31,7 +31,7 @@ "rimraf": "^3.0.0" }, "devDependencies": { - "@comet/eslint-config": "workspace:^7.0.0-beta.6", + "@comet/eslint-config": "workspace:^7.0.0", "@nestjs/common": "^9.0.0", "@types/draft-js": "^0.11.10", "@types/jest": "^29.5.0", diff --git a/packages/api/cms-api/CHANGELOG.md b/packages/api/cms-api/CHANGELOG.md index 4672840a60..152692ac49 100644 --- a/packages/api/cms-api/CHANGELOG.md +++ b/packages/api/cms-api/CHANGELOG.md @@ -1,5 +1,374 @@ # @comet/cms-api +## 7.0.0 + +### Major Changes + +- 6ac10edf1: Remove `download` helper + + Use `createFileUploadInputFromUrl` instead. + +- 9a1b01669: Remove CDN config from DAM + + It was a bad idea to introduce this in the first place, because `@comet/cms-api` should not be opinionated about how the CDN works. + + Modern applications require all traffic to be routed through a CDN. Cloudflare offers a tunnel, which made the origin-check obsolete, so we introduced a flag to disable the origin check. + + Also changes the behavior of the `FilesService::createFileUrl()`-method which now expects an options-object as second argument. + + ## How to migrate (only required if CDN is used): + + Remove the following env vars from the API + + ``` + DAM_CDN_ENABLED= + DAM_CDN_DOMAIN= + DAM_CDN_ORIGIN_HEADER= + DAM_DISABLE_CDN_ORIGIN_HEADER_CHECK=false + ``` + + If you want to enable the origin check: + + 1. Set the following env vars for the API + + ``` + CDN_ORIGIN_CHECK_SECRET="Use value from DAM_CDN_ORIGIN_HEADER to avoid downtime" + ``` + + _environment-variables.ts_ + + ``` + @IsOptional() + @IsString() + CDN_ORIGIN_CHECK_SECRET: string; + ``` + + _config.ts_ + + ``` + cdn: { + originCheckSecret: envVars.CDN_ORIGIN_CHECK_SECRET, + }, + ``` + + 2. Add CdnGuard + + ``` + // if CDN is enabled, make sure all traffic is either coming from the CDN or internal sources + if (config.cdn.originCheckSecret) { + app.useGlobalGuards(new CdnGuard({ headerName: "x-cdn-origin-check", headerValue: config.cdn.originCheckSecret })); + } + ``` + + 3. DNS changes might be required. `api.example.com` should point to CDN, CDN should point to internal API domain + +- 6ac10edf1: Remove `FileUploadService` + + Use `createFileUploadInputFromUrl` instead of `FileUploadService#createFileUploadInputFromUrl`. + +- 0588e212c: Remove `language` field from `User` object + + - Providing the locale is not mandatory for ID-Tokens + - Does not have a real use case (better rely on the Accept-Language header of the browser to determine the language of the current user) + +- 46b86ba5f: `FilesService#createFileDownloadUrl` now expects an options object as second parameter + + ```diff + - this.filesService.createFileDownloadUrl(file, previewDamUrls) + + this.filesService.createFileDownloadUrl(file, { previewDamUrls, relativeDamUrls }) + ``` + +- 0e6debb06: CRUD Generator: Remove `lastUpdatedAt` argument from update mutations +- ebf597120: Make `@nestjs/platform-express` a peer dependency + + Make sure that `@nestjs/platform-express` is installed in the application. + +- e15927594: Support "real" dependency injection in `BlockData#transformToPlain` + + Previously we supported poor man's dependency injection using the `TransformDependencies` object in `transformToPlain`. + This is now replaced by a technique that allows actual dependency injection. + + **Example** + + ```ts + class NewsLinkBlockData extends BlockData { + @BlockField({ nullable: true }) + id?: string; + + transformToPlain() { + // Return service that does the transformation + return NewsLinkBlockTransformerService; + } + } + + type TransformResponse = { + news?: { + id: string; + slug: string; + }; + }; + + @Injectable() + class NewsLinkBlockTransformerService implements BlockTransformerServiceInterface { + // Use dependency injection here + constructor(@InjectRepository(News) private readonly repository: EntityRepository) {} + + async transformToPlain(block: NewsLinkBlockData, context: BlockContext) { + if (!block.id) { + return {}; + } + + const news = await this.repository.findOneOrFail(block.id); + + return { + news: { + id: news.id, + slug: news.slug, + }, + }; + } + } + ``` + + Adding this new technique results in a few breaking changes: + + - Remove dynamic registration of `BlocksModule` + - Pass `moduleRef` to `BlocksTransformerMiddlewareFactory` instead of `dependencies` + - Remove `dependencies` from `BlockData#transformToPlain` + + See the [migration guide](https://docs.comet-dxp.com/docs/migration/migration-from-v6-to-v7) on how to migrate. + +- 9bed75638: API Generator: Add new `dedicatedResolverArg` option to `@CrudField` to generate better API for Many-to-one-relations + + - Add foreign id as argument to create mutation + - Add foreign id as argument to list query + +- c3940df58: Replace `additionalMimeTypes` and `overrideAcceptedMimeTypes` in `DamModule#damConfig` with `acceptedMimeTypes` + + You can now add mime types like this: + + ```ts + DamModule.register({ + damConfig: { + acceptedMimeTypes: [...damDefaultAcceptedMimetypes, "something-else"], + }, + }); + ``` + + And remove them like this: + + ```ts + DamModule.register({ + damConfig: { + acceptedMimeTypes: damDefaultAcceptedMimetypes.filter((mimeType) => mimeType !== "application/zip"), + }, + }); + ``` + + Don't forget to also remove/add the mime types in the admin's `DamConfigProvider` + +- 4485d1540: filtersToMikroOrmQuery: Move second argument (`applyFilter` callback) into an options object +- 28322b422: Refactor auth-decorators + + - Remove `@PublicApi()`-decorator + - Rename `@DisableGlobalGuard()`-decorator to `@DisableCometGuards()` + + The `@DisableCometGuards()`-decorator will only disable the AuthGuard when no `x-include-invisible-content`-header is set. + +- c3940df58: Rename `defaultDamAcceptedMimetypes` to `damDefaultAcceptedMimetypes` +- caefa1c5d: Rename `DateFilter` to `DateTimeFilter` + + This leaves room for a future DateFilter that only filters by date, not time. + + **Upgrading** + + 1. Change import + + ```diff + - import { DateFilter } from "@comet/cms-api"; + + import { DateTimeFilter } from "@comet/cms-api"; + ``` + + 2. Re-run API Generator. + +- ebf597120: Remove unused/unnecessary peer dependencies + + Some dependencies were incorrectly marked as peer dependencies. + If you don't use them in your application, you may remove the following dependencies: + + - Admin: `axios` + - API: `@aws-sdk/client-s3`, `@azure/storage-blob` and `pg-error-constants` + +- 6ac10edf1: Rename "public uploads" to "file uploads" + + The name "public uploads" was not fitting since the uploads can also be used for "private" uploads in the Admin. + The feature was therefore renamed to "file uploads". + + This requires the following changes: + + - Use `FileUploadsModule` instead of `PublicUploadModule` + - Use `FileUpload` instead of `PublicUpload` + - Use `FileUploadsService` instead of `PublicUploadsService` + - Change the upload URL from `/public-upload/files/upload` to `/files-uploads/upload` + +- 17c7f79a2: Secure file uploads upload endpoint by default + + The `/file-uploads/upload` endpoint now requires the `fileUploads` permission by default. + + Use the `upload.public` option to make the endpoint public: + + ```diff + FileUploadsModule.register({ + /* ... */, + + upload: { + + public: true, + + }, + }), + ``` + +- b7560e3a7: Move `YouTubeVideoBlock` to `@cms` packages + + **Migrate** + + ```diff + - import { YouTubeVideoBlock } from "@comet/blocks-admin"; + + import { YouTubeVideoBlock } from "@comet/cms-admin"; + ``` + + ```diff + - import { YouTubeVideoBlock } from "@comet/blocks-api"; + + import { YouTubeVideoBlock } from "@comet/cms-api"; + ``` + +- 1d2f54bee: Require `strategyName` in `createStaticCredentialsBasicStrategy` + + The `strategyName` is then used as SystemUser which allows to distinguish between different system users (e.g. activate logging) + +- 2497a062f: API Generator: Remove support for `visible` boolean, use `status` enum instead. + + Recommended enum values: Published/Unpublished or Visible/Invisible or Active/Deleted or Active/Archived + + Remove support for update visibility mutation, use existing generic update instead + +- fe22985d6: API Generator: Replace graphql-type-json with graphql-scalars for JSON columns + + **Upgrading** + + 1. Install graphql-scalars: `npm install graphql-scalars` + 2. Uninstall graphql-type-json: `npm install graphql-type-json` + 3. Update imports: + + ```diff + - import { GraphQLJSONObject } from "graphql-type-json"; + + import { GraphQLJSONObject } from "graphql-scalars"; + ``` + +- a58918893: Remove `aspectRatio` from `YouTubeBlock` + + The block's aspect ratio options (4x3, 16x9) proved too inflexible to be of actual use in an application. Therefore, the aspect ratio field was removed. It should be defined in the application instead. + + **Migrate** + + The block requires an aspect ratio in the site. It should be set using the `aspectRatio` prop (default: `16x9`): + + ```diff + + ``` + +- 4485d1540: API Generator: Remove generated service + + The `Service#getFindCondition` method is replaced with the new `gqlArgsToMikroOrmQuery` function, which detects an entity's searchable fields from its metadata. + Consequently, the generated service isn't needed anymore and will therefore no longer be generated. + Remove the service from the module after re-running the API Generator. + +- 3ea123f68: Increase minimum supported version of `@mikro-orm/core`, `@mikro-orm/migrations`, and `@mikro-orm/postgresql` to v5.8.4 +- 769bd72f0: Use the Next.js Preview Mode for the site preview + + The preview is entered by navigating to an API Route in the site, which has to be executed in a secured environment. + In the API Route the current scope is checked (and possibly stored), then the client is redirected to the preview. + +### Minor Changes + +- 5e8713488: API Generator: Add support for filtering one-to-many relations by id +- f1d0f023d: API Generator: Add `list` option to `@CrudGenerator()` to allow disabling the list query + + Related DTO classes will still be generated as they might be useful for application code. + +- bb04fb863: API Generator: Change default value for input field if property has no initializer + + Previously, the following property of an entity + + ```ts + @Property({ type: types.date, nullable: true }) + @Field({ nullable: true }) + availableSince?: Date; + ``` + + resulted in the following input being generated: + + ```ts + @IsNullable() + @IsDate() + @Field({ nullable: true }) + availableSince?: Date; + ``` + + This was problematic for two reasons: + + 1. The error message would be misleading when trying to create an entity without providing a value for the property. For example, a valid GraphQL mutation + + ```graphql + mutation CreateProduct { + createProduct(input: { title: "A", slug: "A", description: "FOO" }) { + id + availableSince + } + } + ``` + + would result in the following error: + + ``` + "isDate": "availableSince must be a Date instance" + ``` + + 2. Relying on the initializer as the default value is not obvious and appears somewhat magical. + + To address this, we now use `null` as the default value for nullable properties if no initializer is provided. If an initializer is provided, it is used as the default value. + +- 8d920da56: CRUD Generator: Add support for date-only fields +- 36cdd70f1: InternalLinkBlock: add scope to targetPage in output + + This allows for example using the language from scope as url prefix in a multi-language site + +- bfa94b74b: API Generator: Generate field resolver for root blocks + + This allows skipping the `@Field` annotation for root blocks in the entity and it doesn't need the field middleware anymore. + +- f38ecc186: API Generator: Add support for enum array filter and sort +- 4485d1540: API Generator: Add `search` argument to `OneToManyFilter` and `ManyToManyFilter` + + Performs a search like the `search` argument in the list query. + +- b7560e3a7: Add preview image to `YouTubeVideoBlock` and `DamVideoBlock` + + The `YouTubeVideoBlock` and the `DamVideoBlock` now support a preview image out of the box. For customisation the default `VideoPreviewImage` component can be overridden with the optional `renderPreviewImage` method. + + It is recommended to replace the custom implemented video blocks in the projects with the updated `YouTubeVideoBlock` and `DamVideoBlock` from the library. + +- 2f0675b83: API Generator: Add support for filtering many-to-many relations by id + +### Patch Changes + +- 9c8a9a190: API Generator: Add missing type for integer fields in input type +- Updated dependencies [e15927594] +- Updated dependencies [ebf597120] +- Updated dependencies [b7560e3a7] + - @comet/blocks-api@7.0.0 + ## 7.0.0-beta.6 ### Patch Changes diff --git a/packages/api/cms-api/package.json b/packages/api/cms-api/package.json index ef32e4ff81..92f831d253 100644 --- a/packages/api/cms-api/package.json +++ b/packages/api/cms-api/package.json @@ -1,6 +1,6 @@ { "name": "@comet/cms-api", - "version": "7.0.0-beta.6", + "version": "7.0.0", "repository": { "type": "git", "url": "https://github.com/vivid-planet/comet", @@ -36,7 +36,7 @@ "@azure-rest/ai-translation-text": "^1.0.0-beta.1", "@azure/openai": "1.0.0-beta.11", "@azure/storage-blob": "^12.23.0", - "@comet/blocks-api": "workspace:^7.0.0-beta.6", + "@comet/blocks-api": "workspace:^7.0.0", "@fast-csv/parse": "^4.3.6", "@golevelup/nestjs-discovery": "^3.0.0", "@hapi/accept": "^5.0.2", @@ -84,7 +84,7 @@ }, "devDependencies": { "@aws-sdk/types": "^3.47.0", - "@comet/eslint-config": "workspace:^7.0.0-beta.6", + "@comet/eslint-config": "workspace:^7.0.0", "@golevelup/ts-jest": "^0.4.0", "@kubernetes/client-node": "^0.18.1", "@mikro-orm/core": "^5.9.8", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 18601ff8ea..aad41d5c9d 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,7 @@ # @comet/cli +## 7.0.0 + ## 7.0.0-beta.6 ## 7.0.0-beta.5 diff --git a/packages/cli/package.json b/packages/cli/package.json index 2a3dc4bca5..66df9bc85a 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@comet/cli", - "version": "7.0.0-beta.6", + "version": "7.0.0", "repository": { "type": "git", "url": "https://github.com/vivid-planet/comet", @@ -30,7 +30,7 @@ "prettier": "^2.7.1" }, "devDependencies": { - "@comet/eslint-config": "workspace:^7.0.0-beta.6", + "@comet/eslint-config": "workspace:^7.0.0", "@types/node": "^18.0.0", "eslint": "^8.0.0", "npm-run-all": "^4.1.5", diff --git a/packages/eslint-config/CHANGELOG.md b/packages/eslint-config/CHANGELOG.md index f7846bfd57..847ba5a37d 100644 --- a/packages/eslint-config/CHANGELOG.md +++ b/packages/eslint-config/CHANGELOG.md @@ -1,5 +1,46 @@ # @comet/eslint-config +## 7.0.0 + +### Major Changes + +- 45585f4cc: Add the rule `@typescript-eslint/prefer-enum-initializers` to require enum initializers + + ```ts + // ✅ + enum ExampleEnum { + One = "One", + Two = "Two", + } + ``` + + ```ts + // ❌ + enum ExampleEnum { + One, + Two, + } + ``` + +- af37ac9d1: nextjs: Enable `react/jsx-curly-brace-presence` rule +- 7a473ab8d: Prevent `@mui/icons-material` icon imports + + Icons used in Comet DXP applications should match the Comet CI. + Use icons from `@comet/admin-icons` instead. + +- 2e20a8684: nextjs/react: Enable `react/jsx-no-useless-fragment` rule + +### Minor Changes + +- 769bd72f0: Use the Next.js Preview Mode for the site preview + + The preview is entered by navigating to an API Route in the site, which has to be executed in a secured environment. + In the API Route the current scope is checked (and possibly stored), then the client is redirected to the preview. + +### Patch Changes + +- @comet/eslint-plugin@7.0.0 + ## 7.0.0-beta.6 ### Major Changes diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 90861935b7..35165b4915 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@comet/eslint-config", - "version": "7.0.0-beta.6", + "version": "7.0.0", "repository": { "type": "git", "url": "https://github.com/vivid-planet/comet", @@ -15,7 +15,7 @@ }, "dependencies": { "@calm/eslint-plugin-react-intl": "^1.4.1", - "@comet/eslint-plugin": "workspace:^7.0.0-beta.6", + "@comet/eslint-plugin": "workspace:^7.0.0", "@next/eslint-plugin-next": "^14.0.0", "@typescript-eslint/eslint-plugin": "^5.48.2", "@typescript-eslint/parser": "^5.48.2", diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 012852e6b9..69e40422e0 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -1,5 +1,7 @@ # @comet/eslint-plugin +## 7.0.0 + ## 7.0.0-beta.6 ## 7.0.0-beta.5 diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index c3a192440a..b61f52ec2b 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@comet/eslint-plugin", - "version": "7.0.0-beta.6", + "version": "7.0.0", "main": "lib/index.js", "scripts": { "build": "$npm_execpath run clean && tsc", diff --git a/packages/site/cms-site/CHANGELOG.md b/packages/site/cms-site/CHANGELOG.md index d68b0b6826..5053793c6b 100644 --- a/packages/site/cms-site/CHANGELOG.md +++ b/packages/site/cms-site/CHANGELOG.md @@ -1,5 +1,207 @@ # @comet/cms-site +## 7.0.0 + +### Major Changes + +- 4f32ad014: Bump styled-components peer dependency to v6 + + Follow the official [migration guide](https://styled-components.com/docs/faqs#what-do-i-need-to-do-to-migrate-to-v6) to upgrade. + +- 9351b1452: Upgrade to Next 14 and React 18 + + Add "use client" directive to components that currently require it (as they use styled-components or a context) + +- 15eb9e173: Revise `PixelImageBlock` to correctly use the "new" `next/image` component + + See the [docs](https://nextjs.org/docs/pages/api-reference/components/image-legacy#comparison) for a comparison between the new and the legacy component. + + **Migrate** + + Remove the `layout` prop from the block as it can lead to errors with the default implementation (`layout="responsive"` is not compatible with the new `fill` prop). + + - `layout={"responsive" | "inherit"}` can safely be removed + + ```diff + + ``` + + - `layout={"fill"}` can be replaced with `fill={true}` + + ```diff + + ``` + + Notes: + + The `PixelImageBlock` is usually wrapped in a `DamImageBlock` in the application. The `layout` prop should be removed from it as well. + + You can use the newly added `fill` prop of the `next/image` component by embedding the `PixelImageBlock` in a parent element that assigns the `position` style. See the [docs](https://nextjs.org/docs/pages/api-reference/components/image#fill) for more information. + +- 86358bf87: Fix an issue where the block preview could break a block's styling and HTML structure + + This was caused by a `div` added around every block to enable the selection and highlighting of the block in the block preview. + The `div` is still present but now uses `display: contents`, so its effect should be minimal. + + Common issues that should now be resolved include: + + - The image inside, e.g., a `PixelImageBlock`, would not be visible because the image's size depends on the parent `div`'s size. + - Blocks used as children of elements with `display: flex` or `display: grid` could not position themselves correctly. + +- 6986cdc82: Require `aspectRatio` prop for `PixelImageBlock` and `Image` + + The `16x9` default aspect ratio has repeatedly led to incorrectly displayed images on the site. + Therefore, it has been removed. + Instead, consider which aspect ratio to use for each image. + + **Example** + + ```diff + + ``` + +- ae0142029: Support single host for block preview + + The content scope is passed through the iframe-bridge in the admin and accessible in the site in the IFrameBridgeProvider. + Breaking: `previewUrl`-property of `SiteConfig` has changed to `blockPreviewBaseUrl` + +- a58918893: Remove `aspectRatio` from `YouTubeBlock` + + The block's aspect ratio options (4x3, 16x9) proved too inflexible to be of actual use in an application. Therefore, the aspect ratio field was removed. It should be defined in the application instead. + + **Migrate** + + The block requires an aspect ratio in the site. It should be set using the `aspectRatio` prop (default: `16x9`): + + ```diff + + ``` + +- 7f1e78448: Remove `next/link` legacy behavior as default behavior + + Previously, Next required the `Link` component to have a child `
` tag. To style this tag correctly in the application, none of the library link blocks (`DamFileDownloadLinkBlock`, `ExternalLinkBlock`, `EmailLinkBlock`, `InternalLinkBlock`, and `PhoneLinkBlock`) rendered the tag, but cloned the children with the correct props instead. + + However, since Next v13 the `Link` component no longer requires a child `` tag. Consequently, we don't need to render the tag for the `InternalLinkBlock` (which uses `Link` internally) anymore. In order to style all link blocks correctly, we now render an `` tag for all other link blocks. + + **Upgrade** + + To upgrade, either remove all `` tags from your link block usages, or add the `legacyBehavior` prop to all library link blocks. + +- ba4e509ef: Remove server-only code from client bundle + + Make sure to upgrade to Next 14.2.0 or later. + Enable `optimizePackageImports` for `@comet/cms-site` in `next.config.js`: + + ```diff + const nextConfig = { + /* ... */ + + experimental: { + + optimizePackageImports: ["@comet/cms-site"], + + }, + }; + + module.exports = withBundleAnalyzer(nextConfig); + ``` + +### Minor Changes + +- 36cdd70f1: Deprecate `InternalLinkBlock` component, instead there should be a copy of this component in the application for flexibility (e.g., support for internationalized routing) +- 6d56606a8: Store site preview scope in cookie and add `previewParams()` helper to access it + + - Requires the new `SITE_PREVIEW_SECRET` environment variable that must contain a random secret (not required for local development) + - Requires a Route Handler located at `app/api/site-preview/route.ts`: + - The previewParams() return a promise + + ```ts + import { sitePreviewRoute } from "@comet/cms-site"; + import { createGraphQLFetch } from "@src/util/graphQLClient"; + import { type NextRequest } from "next/server"; + + export const dynamic = "force-dynamic"; + + export async function GET(request: NextRequest) { + return sitePreviewRoute(request, createGraphQLFetch()); + } + ``` + +- 4f46b3e3e: Add optional `fill` prop to `YouTubeVideoBlock` and `DamVideoBlock` to support same behavior as in `PixelImageBlock` +- a80ab10f3: Add GraphQL fetch client + + - `createGraphQLFetch`: simple graphql client around fetch, usage: createGraphQLFetch(fetch, url)(gql, variables) + - `type GraphQLFetch = (query: string, variables?: V, init?: RequestInit) => Promise` + - `gql` for tagging queries + - `createFetchWithDefaults` fetch decorator that adds default values (eg. headers or next.revalidate) + - `createFetchWithPreviewHeaders` fetch decorator that adds comet preview headers (based on SitePreviewData) + + Example helper in application: + + ``` + export const graphQLApiUrl = `${typeof window === "undefined" ? process.env.API_URL_INTERNAL : process.env.NEXT_PUBLIC_API_URL}/graphql`; + export function createGraphQLFetch(previewData?: SitePreviewData) { + return createGraphQLFetchLibrary( + createFetchWithDefaults(createFetchWithPreviewHeaders(fetch, previewData), { next: { revalidate: 15 * 60 } }), + graphQLApiUrl, + ); + + } + ``` + + Usage example: + + ``` + const graphqlFetch = createGraphQLFetch(previewData); + const data = await graphqlFetch( + exampleQuery, + { + exampleVariable: "foo" + } + ); + ``` + +- cf9496fdb: Add `legacyPagesRouterSitePreviewApiHandler` helper + + Used to enable the site preview (Preview Mode) for projects which use the Pages Router. This helper is added to ease migrating. New projects should use the App Router instead. + +- fc27014bc: Add new technique for blocks to load additional data at page level when using SSR + + This works both server-side (SSR, SSG) and client-side (block preview). + + New Apis: + + - `recursivelyLoadBlockData`: used to call loaders for a block data tree + - `BlockLoader`: type of a loader function that is responsible for one block + - `useBlockPreviewFetch`: helper hook for block preview that creates client-side caching graphQLFetch/fetch + - `BlockLoaderDependencies`: interface with dependencies that get passed through recursivelyLoadBlockData into loader functions. Can be extended using module augmentation in application to inject eg. pageTreeNodeId. + +- b7560e3a7: Add preview image to `YouTubeVideoBlock` and `DamVideoBlock` + + The `YouTubeVideoBlock` and the `DamVideoBlock` now support a preview image out of the box. For customisation the default `VideoPreviewImage` component can be overridden with the optional `renderPreviewImage` method. + + It is recommended to replace the custom implemented video blocks in the projects with the updated `YouTubeVideoBlock` and `DamVideoBlock` from the library. + +- 769bd72f0: Use the Next.js Preview Mode for the site preview + + The preview is entered by navigating to an API Route in the site, which has to be executed in a secured environment. + In the API Route the current scope is checked (and possibly stored), then the client is redirected to the preview. + ## 7.0.0-beta.6 ## 7.0.0-beta.5 diff --git a/packages/site/cms-site/package.json b/packages/site/cms-site/package.json index 23c9cde75c..b28422667d 100644 --- a/packages/site/cms-site/package.json +++ b/packages/site/cms-site/package.json @@ -1,6 +1,6 @@ { "name": "@comet/cms-site", - "version": "7.0.0-beta.6", + "version": "7.0.0", "repository": { "type": "git", "url": "https://github.com/vivid-planet/comet", @@ -33,8 +33,8 @@ "use-debounce": "^6.0.0" }, "devDependencies": { - "@comet/cli": "workspace:^7.0.0-beta.6", - "@comet/eslint-config": "workspace:^7.0.0-beta.6", + "@comet/cli": "workspace:^7.0.0", + "@comet/eslint-config": "workspace:^7.0.0", "@gitbeaker/node": "^34.0.0", "@types/draft-js": "^0.11.10", "@types/jest": "^29.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64c5056b08..3367457300 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1079,10 +1079,10 @@ importers: packages/admin/admin: dependencies: '@comet/admin-icons': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-icons '@comet/admin-theme': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-theme '@mui/lab': specifier: ^5.0.0-alpha.76 @@ -1137,10 +1137,10 @@ importers: specifier: ^7.20.12 version: 7.20.12 '@comet/admin-babel-preset': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-babel-preset '@comet/eslint-config': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../../eslint-config '@emotion/react': specifier: ^11.5.0 @@ -1302,10 +1302,10 @@ importers: packages/admin/admin-color-picker: dependencies: '@comet/admin': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin '@comet/admin-icons': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-icons clsx: specifier: ^1.1.1 @@ -1327,10 +1327,10 @@ importers: specifier: ^7.20.12 version: 7.20.12 '@comet/admin-babel-preset': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-babel-preset '@comet/eslint-config': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../../eslint-config '@mui/material': specifier: ^5.0.0 @@ -1378,10 +1378,10 @@ importers: packages/admin/admin-date-time: dependencies: '@comet/admin': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin '@comet/admin-icons': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-icons '@mui/utils': specifier: ^5.4.1 @@ -1403,10 +1403,10 @@ importers: specifier: ^7.20.12 version: 7.20.12 '@comet/admin-babel-preset': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-babel-preset '@comet/eslint-config': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../../eslint-config '@mui/material': specifier: ^5.0.0 @@ -1460,10 +1460,10 @@ importers: specifier: ^7.20.12 version: 7.20.12 '@comet/admin-babel-preset': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-babel-preset '@comet/eslint-config': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../../eslint-config '@mui/material': specifier: ^5.0.0 @@ -1517,10 +1517,10 @@ importers: packages/admin/admin-react-select: dependencies: '@comet/admin': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin '@comet/admin-icons': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-icons classnames: specifier: ^2.2.6 @@ -1533,10 +1533,10 @@ importers: specifier: ^7.20.12 version: 7.20.12 '@comet/admin-babel-preset': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-babel-preset '@comet/eslint-config': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../../eslint-config '@mui/material': specifier: ^5.0.0 @@ -1584,10 +1584,10 @@ importers: packages/admin/admin-rte: dependencies: '@comet/admin': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin '@comet/admin-icons': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-icons detect-browser: specifier: ^5.2.1 @@ -1612,10 +1612,10 @@ importers: specifier: ^7.20.12 version: 7.20.12 '@comet/admin-babel-preset': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-babel-preset '@comet/eslint-config': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../../eslint-config '@mui/material': specifier: ^5.0.0 @@ -1693,7 +1693,7 @@ importers: packages/admin/admin-theme: dependencies: '@comet/admin-icons': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-icons '@mui/utils': specifier: ^5.4.1 @@ -1706,10 +1706,10 @@ importers: specifier: ^7.20.12 version: 7.20.12 '@comet/admin-babel-preset': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-babel-preset '@comet/eslint-config': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../../eslint-config '@mui/material': specifier: ^5.0.0 @@ -1751,10 +1751,10 @@ importers: packages/admin/blocks-admin: dependencies: '@comet/admin': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin '@comet/admin-icons': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-icons '@mui/lab': specifier: ^5.0.0-alpha.76 @@ -1785,13 +1785,13 @@ importers: specifier: ^7.20.12 version: 7.20.12 '@comet/admin-babel-preset': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-babel-preset '@comet/cli': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../../cli '@comet/eslint-config': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../../eslint-config '@emotion/react': specifier: ^11.5.0 @@ -1881,22 +1881,22 @@ importers: packages/admin/cms-admin: dependencies: '@comet/admin': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin '@comet/admin-date-time': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-date-time '@comet/admin-icons': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-icons '@comet/admin-rte': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-rte '@comet/admin-theme': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-theme '@comet/blocks-admin': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../blocks-admin '@graphql-tools/graphql-file-loader': specifier: ^7.5.17 @@ -2020,13 +2020,13 @@ importers: specifier: ^7.20.12 version: 7.20.12 '@comet/admin-babel-preset': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../admin-babel-preset '@comet/cli': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../../cli '@comet/eslint-config': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../../eslint-config '@emotion/react': specifier: ^11.5.0 @@ -2204,7 +2204,7 @@ importers: version: 3.0.2 devDependencies: '@comet/eslint-config': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../../eslint-config '@nestjs/common': specifier: ^9.0.0 @@ -2267,7 +2267,7 @@ importers: specifier: ^12.23.0 version: 12.23.0 '@comet/blocks-api': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../blocks-api '@fast-csv/parse': specifier: ^4.3.6 @@ -2406,7 +2406,7 @@ importers: specifier: ^3.47.0 version: 3.254.0 '@comet/eslint-config': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../../eslint-config '@golevelup/ts-jest': specifier: ^0.4.0 @@ -2539,7 +2539,7 @@ importers: version: 2.8.3 devDependencies: '@comet/eslint-config': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../eslint-config '@types/node': specifier: ^18.0.0 @@ -2566,7 +2566,7 @@ importers: specifier: ^1.4.1 version: 1.4.1 '@comet/eslint-plugin': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../eslint-plugin '@next/eslint-plugin-next': specifier: ^14.0.0 @@ -2670,10 +2670,10 @@ importers: version: 6.0.1(react@18.2.0) devDependencies: '@comet/cli': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../../cli '@comet/eslint-config': - specifier: workspace:^7.0.0-beta.6 + specifier: workspace:^7.0.0 version: link:../../eslint-config '@gitbeaker/node': specifier: ^34.0.0