diff --git a/.changeset/atlantic-scallop-fisherman b/.changeset/atlantic-scallop-fisherman
new file mode 100644
index 0000000000..27a8255a0f
--- /dev/null
+++ b/.changeset/atlantic-scallop-fisherman
@@ -0,0 +1,5 @@
+---
+"@comet/cms-api": patch
+---
+
+API Generator: Disable input generation if `create` and `update` are set to `false` in the decorator
diff --git a/.changeset/beige-chefs-confess.md b/.changeset/beige-chefs-confess.md
new file mode 100644
index 0000000000..421b0cb446
--- /dev/null
+++ b/.changeset/beige-chefs-confess.md
@@ -0,0 +1,16 @@
+---
+"@comet/eslint-config": major
+---
+
+Enforce PascalCase for enums
+
+Changing the casing of an existing enum can be problematic, e.g., if the enum values are persisted in the database.
+In such cases, the rule can be disabled like so
+
+```diff
++ /* eslint-disable @typescript-eslint/naming-convention */
+ export enum ExampleEnum {
+ attr1 = "attr1",
+ }
++ /* eslint-enable @typescript-eslint/naming-convention */
+```
diff --git a/.changeset/brave-carpets-talk.md b/.changeset/brave-carpets-talk.md
new file mode 100644
index 0000000000..d43440e4d9
--- /dev/null
+++ b/.changeset/brave-carpets-talk.md
@@ -0,0 +1,7 @@
+---
+"@comet/admin": major
+---
+
+Add `@comet/admin-theme` as a peer dependency
+
+`@comet/admin` now uses the custom `Typography` variants `list` and `listItem` defined in `@comet/admin-theme`.
diff --git a/.changeset/brave-kiwis-pay.md b/.changeset/brave-kiwis-pay.md
new file mode 100644
index 0000000000..aa46ea5c70
--- /dev/null
+++ b/.changeset/brave-kiwis-pay.md
@@ -0,0 +1,5 @@
+---
+"@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
new file mode 100644
index 0000000000..f3bebda792
--- /dev/null
+++ b/.changeset/bright-dolls-live.md
@@ -0,0 +1,57 @@
+---
+"@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/brown-kids-develop.md b/.changeset/brown-kids-develop.md
new file mode 100644
index 0000000000..883bfcd1e0
--- /dev/null
+++ b/.changeset/brown-kids-develop.md
@@ -0,0 +1,7 @@
+---
+"@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/calm-plums-taste.md b/.changeset/calm-plums-taste.md
new file mode 100644
index 0000000000..7b9b735953
--- /dev/null
+++ b/.changeset/calm-plums-taste.md
@@ -0,0 +1,6 @@
+---
+"@comet/cms-admin": major
+"@comet/cms-api": major
+---
+
+Change language field in User and CurrentUser to locale
diff --git a/.changeset/chilled-walls-shop.md b/.changeset/chilled-walls-shop.md
new file mode 100644
index 0000000000..e250315fce
--- /dev/null
+++ b/.changeset/chilled-walls-shop.md
@@ -0,0 +1,21 @@
+---
+"@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
+}
+```
\ No newline at end of file
diff --git a/.changeset/clever-clocks-smile.md b/.changeset/clever-clocks-smile.md
new file mode 100644
index 0000000000..2fcd094778
--- /dev/null
+++ b/.changeset/clever-clocks-smile.md
@@ -0,0 +1,5 @@
+---
+"@comet/admin-color-picker": major
+---
+
+Replace the `componentsProps` prop with `slotProps` in `ColorPicker` and remove the `ColorPickerComponentsProps` type
diff --git a/.changeset/cold-humans-pull.md b/.changeset/cold-humans-pull.md
new file mode 100644
index 0000000000..2aed94ccf1
--- /dev/null
+++ b/.changeset/cold-humans-pull.md
@@ -0,0 +1,8 @@
+---
+"@comet/cms-admin": major
+---
+
+Add `@comet/admin-theme` as a peer dependency
+
+`@comet/cms-admin` now uses the custom `Typography` variants `list` and `listItem` defined in `@comet/admin-theme`.
+
diff --git a/.changeset/config.json b/.changeset/config.json
index e5bd42918c..e6d4199baa 100644
--- a/.changeset/config.json
+++ b/.changeset/config.json
@@ -7,7 +7,7 @@
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
- "ignore": ["comet-admin-stories", "comet-demo-api", "comet-demo-admin", "comet-demo-site", "comet-docs"],
+ "ignore": ["comet-storybook", "comet-demo-api", "comet-demo-admin", "comet-demo-site", "comet-docs"],
"snapshot": {
"useCalculatedVersion": true
}
diff --git a/.changeset/cool-kiwis-shop.md b/.changeset/cool-kiwis-shop.md
new file mode 100644
index 0000000000..8003fdf773
--- /dev/null
+++ b/.changeset/cool-kiwis-shop.md
@@ -0,0 +1,5 @@
+---
+"@comet/admin-theme": major
+---
+
+Rework theme of MUI's `Chip` to match the updated Comet CI
diff --git a/.changeset/curvy-moles-punch.md b/.changeset/curvy-moles-punch.md
new file mode 100644
index 0000000000..72e1ce219d
--- /dev/null
+++ b/.changeset/curvy-moles-punch.md
@@ -0,0 +1,8 @@
+---
+"@comet/admin-theme": major
+---
+
+Rework `typographyOptions`
+
+- Replace `typographyOptions` with `createTypographyOptions()` to enable using the theme's breakpoints for media queries
+- Add new styles for `button` variant
diff --git a/.changeset/cyan-drinks-enjoy.md b/.changeset/cyan-drinks-enjoy.md
new file mode 100644
index 0000000000..7679ef251f
--- /dev/null
+++ b/.changeset/cyan-drinks-enjoy.md
@@ -0,0 +1,8 @@
+---
+"@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
new file mode 100644
index 0000000000..6618eed645
--- /dev/null
+++ b/.changeset/cyan-ladybugs-bathe.md
@@ -0,0 +1,7 @@
+---
+"@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/early-news-attend.md b/.changeset/early-news-attend.md
new file mode 100644
index 0000000000..78e46dc704
--- /dev/null
+++ b/.changeset/early-news-attend.md
@@ -0,0 +1,6 @@
+---
+"@comet/cms-admin": major
+"@comet/cms-api": major
+---
+
+CRUD Generator: Remove `lastUpdatedAt` argument from update mutations
diff --git a/.changeset/eighty-owls-cheat.md b/.changeset/eighty-owls-cheat.md
new file mode 100644
index 0000000000..ebca055b90
--- /dev/null
+++ b/.changeset/eighty-owls-cheat.md
@@ -0,0 +1,21 @@
+---
+"@comet/admin-theme": major
+---
+
+Rework colors
+
+- Rename `bluePalette` to `primaryPalette`
+- Rename `neutrals` to `greyPalette`
+- Remove `greenPalette`
+- Remove `secondary` from `paletteOptions`
+- 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/fair-clouds-poke.md b/.changeset/fair-clouds-poke.md
deleted file mode 100644
index b88df66dc8..0000000000
--- a/.changeset/fair-clouds-poke.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@comet/cms-api": patch
----
-
-API Generator: Use correct type for `where` when `getFindCondition` service method is not used
diff --git a/.changeset/fast-pens-laugh.md b/.changeset/fast-pens-laugh.md
new file mode 100644
index 0000000000..b7f143b603
--- /dev/null
+++ b/.changeset/fast-pens-laugh.md
@@ -0,0 +1,5 @@
+---
+"@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/fluffy-oranges-approve.md b/.changeset/fluffy-oranges-approve.md
new file mode 100644
index 0000000000..b84740a057
--- /dev/null
+++ b/.changeset/fluffy-oranges-approve.md
@@ -0,0 +1,7 @@
+---
+"@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
new file mode 100644
index 0000000000..2311bc9865
--- /dev/null
+++ b/.changeset/fluffy-sheep-hammer.md
@@ -0,0 +1,7 @@
+---
+"@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-hounds-work.md b/.changeset/forty-hounds-work.md
new file mode 100644
index 0000000000..2aafc07200
--- /dev/null
+++ b/.changeset/forty-hounds-work.md
@@ -0,0 +1,59 @@
+---
+"@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/fresh-buckets-begin.md b/.changeset/fresh-buckets-begin.md
new file mode 100644
index 0000000000..11fc53ef72
--- /dev/null
+++ b/.changeset/fresh-buckets-begin.md
@@ -0,0 +1,31 @@
+---
+"@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
new file mode 100644
index 0000000000..1479c75e68
--- /dev/null
+++ b/.changeset/fresh-sheep-remember.md
@@ -0,0 +1,7 @@
+---
+"@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/gentle-chefs-sell.md b/.changeset/gentle-chefs-sell.md
new file mode 100644
index 0000000000..0878d53118
--- /dev/null
+++ b/.changeset/gentle-chefs-sell.md
@@ -0,0 +1,7 @@
+---
+"@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
new file mode 100644
index 0000000000..cb360cbcea
--- /dev/null
+++ b/.changeset/gentle-pots-perform.md
@@ -0,0 +1,5 @@
+---
+"@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
new file mode 100644
index 0000000000..ca8f0310fb
--- /dev/null
+++ b/.changeset/giant-apples-cheer.md
@@ -0,0 +1,8 @@
+---
+"@comet/cms-api": major
+---
+
+API Generator: Generate better API for Many-to-one-relations with `orphanRemoval` activated where the reverse side has its own API generated
+
+- Add `id` as argument to create mutation
+- Add `id` as argument to list query
diff --git a/.changeset/good-squids-join.md b/.changeset/good-squids-join.md
new file mode 100644
index 0000000000..f4b76b6338
--- /dev/null
+++ b/.changeset/good-squids-join.md
@@ -0,0 +1,19 @@
+---
+"@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`:
+
+ ```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());
+ }
\ No newline at end of file
diff --git a/.changeset/great-hotels-unite.md b/.changeset/great-hotels-unite.md
new file mode 100644
index 0000000000..091f339369
--- /dev/null
+++ b/.changeset/great-hotels-unite.md
@@ -0,0 +1,10 @@
+---
+"@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
new file mode 100644
index 0000000000..32634b6656
--- /dev/null
+++ b/.changeset/great-insects-reply.md
@@ -0,0 +1,7 @@
+---
+"@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
new file mode 100644
index 0000000000..f821545876
--- /dev/null
+++ b/.changeset/grumpy-poets-own.md
@@ -0,0 +1,5 @@
+---
+"@comet/admin-theme": major
+---
+
+Change `Link` text styling
diff --git a/.changeset/happy-fans-pump.md b/.changeset/happy-fans-pump.md
new file mode 100644
index 0000000000..a220014ade
--- /dev/null
+++ b/.changeset/happy-fans-pump.md
@@ -0,0 +1,5 @@
+---
+"@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
new file mode 100644
index 0000000000..13dec62322
--- /dev/null
+++ b/.changeset/happy-ladybugs-smile.md
@@ -0,0 +1,5 @@
+---
+"@comet/admin": major
+---
+
+Rename the `FilterBarMoveFilersClassKey` type to `FilterBarMoreFiltersClassKey`
diff --git a/.changeset/hot-drinks-crash.md b/.changeset/hot-drinks-crash.md
new file mode 100644
index 0000000000..cb8d114b3c
--- /dev/null
+++ b/.changeset/hot-drinks-crash.md
@@ -0,0 +1,5 @@
+---
+"@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
new file mode 100644
index 0000000000..048ca36b65
--- /dev/null
+++ b/.changeset/khaki-cobras-trade.md
@@ -0,0 +1,7 @@
+---
+"@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
new file mode 100644
index 0000000000..41be238033
--- /dev/null
+++ b/.changeset/khaki-eels-try.md
@@ -0,0 +1,5 @@
+---
+"@comet/admin": minor
+---
+
+Only use horizontal layout in `FieldContainer` when it exceeds `600px` in width
diff --git a/.changeset/long-crabs-bake.md b/.changeset/long-crabs-bake.md
new file mode 100644
index 0000000000..ae00ec0ebf
--- /dev/null
+++ b/.changeset/long-crabs-bake.md
@@ -0,0 +1,8 @@
+---
+"@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.
\ No newline at end of file
diff --git a/.changeset/long-items-sell.md b/.changeset/long-items-sell.md
new file mode 100644
index 0000000000..bb3decacc7
--- /dev/null
+++ b/.changeset/long-items-sell.md
@@ -0,0 +1,8 @@
+---
+"@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/metal-seas-listen.md b/.changeset/metal-seas-listen.md
new file mode 100644
index 0000000000..abad6b7023
--- /dev/null
+++ b/.changeset/metal-seas-listen.md
@@ -0,0 +1,5 @@
+---
+"@comet/admin": minor
+---
+
+Router Prompt: actively reset form state when choosing discard in the prompt dialog
diff --git a/.changeset/nervous-sloths-thank.md b/.changeset/nervous-sloths-thank.md
new file mode 100644
index 0000000000..f36e4963fc
--- /dev/null
+++ b/.changeset/nervous-sloths-thank.md
@@ -0,0 +1,5 @@
+---
+"@comet/admin": minor
+---
+
+Add setting `signInUrl` to `createErrorDialogApolloLink`
diff --git a/.changeset/nervous-windows-grin.md b/.changeset/nervous-windows-grin.md
new file mode 100644
index 0000000000..0b785a9d9a
--- /dev/null
+++ b/.changeset/nervous-windows-grin.md
@@ -0,0 +1,13 @@
+---
+"@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
new file mode 100644
index 0000000000..24e818c89b
--- /dev/null
+++ b/.changeset/new-chicken-search.md
@@ -0,0 +1,7 @@
+---
+"@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/plenty-cougars-warn.md b/.changeset/plenty-cougars-warn.md
new file mode 100644
index 0000000000..a664a60ab6
--- /dev/null
+++ b/.changeset/plenty-cougars-warn.md
@@ -0,0 +1,34 @@
+---
+"@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"
+ }
+);
+```
\ No newline at end of file
diff --git a/.changeset/polite-needles-unite.md b/.changeset/polite-needles-unite.md
new file mode 100644
index 0000000000..97f204b36e
--- /dev/null
+++ b/.changeset/polite-needles-unite.md
@@ -0,0 +1,5 @@
+---
+"@comet/admin-theme": minor
+---
+
+Add `breakpointsOptions` to theme
diff --git a/.changeset/poor-dragons-sing.md b/.changeset/poor-dragons-sing.md
new file mode 100644
index 0000000000..4fafa61d0d
--- /dev/null
+++ b/.changeset/poor-dragons-sing.md
@@ -0,0 +1,5 @@
+---
+"@comet/admin": minor
+---
+
+Support relative paths in `SubRoute` component using `./subroute` notation
diff --git a/.changeset/proud-cheetahs-sleep.md b/.changeset/proud-cheetahs-sleep.md
new file mode 100644
index 0000000000..79c548ace2
--- /dev/null
+++ b/.changeset/proud-cheetahs-sleep.md
@@ -0,0 +1,9 @@
+---
+"@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
new file mode 100644
index 0000000000..437da160b5
--- /dev/null
+++ b/.changeset/quick-foxes-notice.md
@@ -0,0 +1,5 @@
+---
+"@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
new file mode 100644
index 0000000000..ec52553b6e
--- /dev/null
+++ b/.changeset/rare-boxes-guess.md
@@ -0,0 +1,5 @@
+---
+"@comet/cms-admin": minor
+---
+
+Adapt `Header` and `UserHeaderItem` used in `AppHeader` for mobile devices (<900px)
diff --git a/.changeset/selfish-books-fail.md b/.changeset/selfish-books-fail.md
new file mode 100644
index 0000000000..c187025397
--- /dev/null
+++ b/.changeset/selfish-books-fail.md
@@ -0,0 +1,5 @@
+---
+"@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
new file mode 100644
index 0000000000..fe70825e6b
--- /dev/null
+++ b/.changeset/selfish-dolls-beg.md
@@ -0,0 +1,14 @@
+---
+"@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.
\ No newline at end of file
diff --git a/.changeset/serious-ravens-matter.md b/.changeset/serious-ravens-matter.md
new file mode 100644
index 0000000000..306d89aa76
--- /dev/null
+++ b/.changeset/serious-ravens-matter.md
@@ -0,0 +1,5 @@
+---
+"@comet/admin": major
+---
+
+Replace the `componentsProps` prop with `slotProps` in `InputWithPopper` and remove the `InputWithPopperComponentsProps` type
diff --git a/.changeset/shy-scissors-joke.md b/.changeset/shy-scissors-joke.md
new file mode 100644
index 0000000000..410ceb8ece
--- /dev/null
+++ b/.changeset/shy-scissors-joke.md
@@ -0,0 +1,9 @@
+---
+"@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/small-snails-mate.md b/.changeset/small-snails-mate.md
new file mode 100644
index 0000000000..f77b840307
--- /dev/null
+++ b/.changeset/small-snails-mate.md
@@ -0,0 +1,9 @@
+---
+"@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
new file mode 100644
index 0000000000..365c7ae2ec
--- /dev/null
+++ b/.changeset/smooth-chefs-flow.md
@@ -0,0 +1,5 @@
+---
+"@comet/admin-theme": major
+---
+
+Adapt `Typography` headlines for mobile devices (<900px)
diff --git a/.changeset/strange-steaks-pull.md b/.changeset/strange-steaks-pull.md
new file mode 100644
index 0000000000..d0f4dff674
--- /dev/null
+++ b/.changeset/strange-steaks-pull.md
@@ -0,0 +1,7 @@
+---
+"@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-turkeys-poke.md b/.changeset/ten-turkeys-poke.md
new file mode 100644
index 0000000000..2d0f065aa4
--- /dev/null
+++ b/.changeset/ten-turkeys-poke.md
@@ -0,0 +1,29 @@
+---
+"@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
new file mode 100644
index 0000000000..4ce98620f7
--- /dev/null
+++ b/.changeset/tender-dots-warn.md
@@ -0,0 +1,7 @@
+---
+"@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
new file mode 100644
index 0000000000..716d36c023
--- /dev/null
+++ b/.changeset/tender-pigs-rest.md
@@ -0,0 +1,21 @@
+---
+"@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
++ ///
+
+// ...
+```
\ No newline at end of file
diff --git a/.changeset/thin-ligers-pull.md b/.changeset/thin-ligers-pull.md
new file mode 100644
index 0000000000..6f2236cc91
--- /dev/null
+++ b/.changeset/thin-ligers-pull.md
@@ -0,0 +1,7 @@
+---
+"@comet/admin-react-select": major
+---
+
+Remove `ControlInput` component
+
+`ControlInput` was never intended to be exported, use MUI's `InputBase` instead.
diff --git a/.changeset/tidy-impalas-refuse.md b/.changeset/tidy-impalas-refuse.md
new file mode 100644
index 0000000000..113f173e47
--- /dev/null
+++ b/.changeset/tidy-impalas-refuse.md
@@ -0,0 +1,7 @@
+---
+"@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
new file mode 100644
index 0000000000..7a4e60cc4e
--- /dev/null
+++ b/.changeset/tough-zoos-refuse.md
@@ -0,0 +1,8 @@
+---
+"@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
new file mode 100644
index 0000000000..35bfd67fe8
--- /dev/null
+++ b/.changeset/tricky-paws-march.md
@@ -0,0 +1,7 @@
+---
+"@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
new file mode 100644
index 0000000000..077fd13a40
--- /dev/null
+++ b/.changeset/twelve-spoons-play.md
@@ -0,0 +1,7 @@
+---
+"@comet/admin": major
+---
+
+Remove the `disabled` class-key in `ClearInputButton`
+
+Use the `:disabled` selector instead when styling the disabled state.
diff --git a/.changeset/two-lions-promise.md b/.changeset/two-lions-promise.md
new file mode 100644
index 0000000000..4a57683e17
--- /dev/null
+++ b/.changeset/two-lions-promise.md
@@ -0,0 +1,5 @@
+---
+"@comet/admin": major
+---
+
+`MenuItem` no longer supports props from MUI's `ListItem` but those from `ListItemButton` instead
diff --git a/.changeset/unlucky-files-compare.md b/.changeset/unlucky-files-compare.md
deleted file mode 100644
index 2455678e2d..0000000000
--- a/.changeset/unlucky-files-compare.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@comet/eslint-config": major
----
-
-Enable no-other-module-relative-import rule by default
diff --git a/.changeset/violet-wombats-try.md b/.changeset/violet-wombats-try.md
new file mode 100644
index 0000000000..ba2f8739fb
--- /dev/null
+++ b/.changeset/violet-wombats-try.md
@@ -0,0 +1,8 @@
+---
+"@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-moles-destroy.md b/.changeset/weak-moles-destroy.md
new file mode 100644
index 0000000000..0df4d8e361
--- /dev/null
+++ b/.changeset/weak-moles-destroy.md
@@ -0,0 +1,5 @@
+---
+"@comet/admin": patch
+---
+
+Fix a bug where the `disabled` prop would not be passed to the children of `Field`
diff --git a/.changeset/yellow-houses-talk.md b/.changeset/yellow-houses-talk.md
new file mode 100644
index 0000000000..82ab535d20
--- /dev/null
+++ b/.changeset/yellow-houses-talk.md
@@ -0,0 +1,106 @@
+---
+"@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
index 71ca251373..245ed4b6f4 100644
--- a/.changeset/yellow-seahorses-lick.md
+++ b/.changeset/yellow-seahorses-lick.md
@@ -5,7 +5,12 @@
"@comet/cms-site": minor
---
-Migrate site preview to Next.js Preview Mode
+Uses 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-Routes the current scope is checked (and possibly stored), then the client is redirected to the Preview.
+
+// TODO Move the following introduction to the migration guide before releasing
Requires following changes to site:
@@ -16,8 +21,12 @@ Requires following changes to site:
- Just implement `getStaticProps`/`getServerSideProps` (Preview Mode will SSR automatically)
- Get `previewData` from `context` and use it to configure the GraphQL Client
- Add `SitePreviewProvider` to `App` (typically in `src/pages/_app.tsx`)
-- Add `/api/preview` Next API route (see demo)
+- Provide a protected environment for the site
+ - Make sure that a Authorization-Header is present in this environment
+ - Add a Next.JS API-Route for the site preview (eg. `/api/site-preview`)
+ - Call `getValidatedSitePreviewParams()` in the API-Route (calls the API which checks the Authorization-Header with the submitted scope)
+ - Use the `path`-part of the return value to redirect to the preview
-Requires following changes to API:
+Requires following changes to admin
-- Set `sitePreviewSecret` in `PageTreeModule`-options (make sure it's the same across multiple API-instances)
+- The `SitesConfig` must provide a `sitePreviewApiUrl`
diff --git a/.changeset/young-lies-cry.md b/.changeset/young-lies-cry.md
new file mode 100644
index 0000000000..8ede23a758
--- /dev/null
+++ b/.changeset/young-lies-cry.md
@@ -0,0 +1,7 @@
+---
+"@comet/admin-theme": major
+---
+
+Rework shadows
+
+- Change shadows 1 - 4
diff --git a/.env b/.env
index 5e98ce65ce..b941576b81 100644
--- a/.env
+++ b/.env
@@ -49,10 +49,6 @@ BLOB_STORAGE_DIRECTORY_PREFIX="comet-demo"
# dam
DAM_SECRET=6a9e8a185b513363bc89ec0b96eed8f70c759bc86b97319f60365c4b7f8593dc
-DAM_CDN_ENABLED="false"
-DAM_CDN_DOMAIN=
-DAM_CDN_ORIGIN_HEADER=
-DAM_DISABLE_CDN_ORIGIN_HEADER_CHECK=false
# admin
ADMIN_PORT=8000
@@ -64,11 +60,8 @@ SITE_PORT=3000
SITE_URL=http://localhost:$SITE_PORT
SITE_PRELOGIN_ENABLED=false
SITE_PRELOGIN_PASSWORD=password
-# no gtm in dev mode
-NEXT_PUBLIC_GTM_ID=
NEXT_PUBLIC_SITE_DOMAIN=main
-NEXT_PUBLIC_SITE_LANGUAGES=en
-NEXT_PUBLIC_SITE_DEFAULT_LANGUAGE=en
+NEXT_PUBLIC_API_URL=$API_URL
# jaegertracing
JAEGER_UI_PORT=16686
diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml
new file mode 100644
index 0000000000..145ba47897
--- /dev/null
+++ b/.github/auto_assign.yml
@@ -0,0 +1,10 @@
+addAssignees: author
+
+addReviewers: true
+
+reviewers:
+ - johnnyomair
+
+skipKeywords:
+ - Merge main into next
+ - Version Packages
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index ea3b1ec5f7..07641a2cfd 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,6 +1,14 @@
+---
+
+## PR Checklist
+- [ ] Verify if the change requires a changeset. See [CONTRIBUTING.md](https://github.com/vivid-planet/comet/blob/HEAD/CONTRIBUTING.md)
+- [ ] Link to the respective task if one exists:
+- [ ] Provide screenshots/screencasts if the change contains visual changes
-
-- [ ] Add changeset (if necessary)
\ No newline at end of file
+
+ Screenshots/screencasts
+
+
diff --git a/.github/workflows/i18n.yml b/.github/workflows/i18n.yml
index 2925647ac3..ebe7872f56 100644
--- a/.github/workflows/i18n.yml
+++ b/.github/workflows/i18n.yml
@@ -25,13 +25,6 @@ jobs:
token: ${{ secrets.VIVID_PLANET_BOT_TOKEN }}
path: "demo/admin/lang/comet-lang"
- - name: "Demo: Clone translations"
- uses: actions/checkout@v3
- with:
- repository: vivid-planet/comet-demo-lang
- token: ${{ secrets.VIVID_PLANET_BOT_TOKEN }}
- path: "demo/admin/lang/comet-demo-lang"
-
- uses: pnpm/action-setup@v2
with:
version: 8
@@ -50,18 +43,43 @@ jobs:
pnpm run intl:extract
cp -r lang/* demo/admin/lang/comet-lang/
- - name: "Library: Update translateable strings"
+ - name: "Library: Update translatable strings"
uses: EndBug/add-and-commit@v9
with:
cwd: "./demo/admin/lang/comet-lang"
- - name: "Demo: Extract i18n strings"
+ - name: "Demo Admin: Clone translations"
+ uses: actions/checkout@v3
+ with:
+ repository: vivid-planet/comet-demo-lang
+ token: ${{ secrets.VIVID_PLANET_BOT_TOKEN }}
+ path: "demo/admin/lang/comet-demo-lang"
+
+ - name: "Demo Admin: Extract i18n strings"
run: |
cd demo/admin
pnpm run intl:extract
- cp -r lang-extracted/* lang/comet-demo-lang
+ cp -r lang-extracted/* lang/comet-demo-lang/admin
- - name: "Demo: Update translateable strings"
+ - name: "Demo Admin: Update translatable strings"
uses: EndBug/add-and-commit@v9
with:
cwd: "./demo/admin/lang/comet-demo-lang"
+
+ - name: "Demo Site: Clone translations"
+ uses: actions/checkout@v3
+ with:
+ repository: vivid-planet/comet-demo-lang
+ token: ${{ secrets.VIVID_PLANET_BOT_TOKEN }}
+ path: "demo/site/lang/comet-demo-lang"
+
+ - name: "Demo Site: Extract i18n strings"
+ run: |
+ cd demo/site
+ pnpm run intl:extract
+ cp -r lang-extracted/* lang/comet-demo-lang/site
+
+ - name: "Demo Site: Update translatable strings"
+ uses: EndBug/add-and-commit@v9
+ with:
+ cwd: "./demo/site/lang/comet-demo-lang"
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 79c555768a..bbd5bf9d70 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -6,7 +6,6 @@ on:
- opened
- synchronize
- reopened
- - closed
push:
branches:
- main
@@ -40,6 +39,15 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
path: "demo/admin/lang/comet-demo-lang"
+ - name: Initial lang content (TODO remove this step after all lang files are in the repo)
+ run: |
+ mkdir -p demo/admin/lang/comet-demo-lang/admin
+ test -f demo/admin/lang/comet-demo-lang/admin/en.json || echo "{}" > demo/admin/lang/comet-demo-lang/admin/en.json
+ test -f demo/admin/lang/comet-demo-lang/admin/de.json || echo "{}" > demo/admin/lang/comet-demo-lang/admin/de.json
+ mkdir -p demo/site/lang/comet-demo-lang/site
+ test -f demo/site/lang/comet-demo-lang/site/en.json || echo "{}" > demo/site/lang/comet-demo-lang/site/en.json
+ test -f demo/site/lang/comet-demo-lang/site/de.json || echo "{}" > demo/site/lang/comet-demo-lang/site/de.json
+
- uses: pnpm/action-setup@v2
with:
version: 8
@@ -57,7 +65,7 @@ jobs:
run: pnpm run copy-schema-files
- name: Build
- run: pnpm run build:lib
+ run: pnpm run build:packages
- name: Lint
run: |
@@ -65,13 +73,3 @@ jobs:
pnpm run lint
# check for duplicate ids of formatted messages
pnpm run intl:extract
-
- - name: Test
- run: pnpm run test
-
- - name: Upload test results
- uses: actions/upload-artifact@v3
- if: success() || failure()
- with:
- name: test-results
- path: packages/**/junit.xml
diff --git a/.github/workflows/main-into-next-pr.yml b/.github/workflows/main-into-next-pr.yml
index ca9a473789..990189733e 100644
--- a/.github/workflows/main-into-next-pr.yml
+++ b/.github/workflows/main-into-next-pr.yml
@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
fetch-depth: 0 # Needed to also fetch next branch
@@ -36,9 +36,9 @@ jobs:
echo 'PR_BODY=This is an automated pull request to merge changes from `main` into `next`. It has merge conflicts. To resolve conflicts, check out the branch `merge-main-into-next` locally, make any necessary changes to conflicting files, and commit and publish your changes.' >> $GITHUB_ENV
- name: Create pull request
- uses: peter-evans/create-pull-request@v5
+ uses: peter-evans/create-pull-request@v6
with:
- token: ${{ secrets.GITHUB_TOKEN }}
+ token: ${{ secrets.VIVID_PLANET_BOT_TOKEN }}
title: ${{ env.PR_TITLE }}
body: ${{ env.PR_BODY }}
base: next
diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml
index bc92d115f8..3bf69649fc 100644
--- a/.github/workflows/test-report.yml
+++ b/.github/workflows/test-report.yml
@@ -1,7 +1,7 @@
name: "Test Report"
on:
workflow_run:
- workflows: ["Lint"]
+ workflows: ["Test"]
types:
- completed
jobs:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000000..44d1242e46
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,55 @@
+name: Test
+
+on:
+ pull_request:
+ types:
+ - opened
+ - synchronize
+ - reopened
+ push:
+ branches:
+ - main
+ - next
+
+jobs:
+ test:
+ name: Test
+ runs-on: ubuntu-latest
+ steps:
+ - run: echo "${{ github.actor }}"
+
+ - uses: actions/checkout@v3
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ - run: |
+ git config user.name github-actions
+ git config user.email github-actions@github.com
+
+ - uses: pnpm/action-setup@v2
+ with:
+ version: 8
+
+ - name: Use Node.js 18.x
+ uses: actions/setup-node@v3
+ with:
+ node-version: 18
+ registry-url: "https://registry.npmjs.org"
+ cache: "pnpm" # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies
+
+ - run: pnpm install --frozen-lockfile
+
+ - name: Copy schema files
+ run: pnpm run copy-schema-files
+
+ - name: Build
+ run: pnpm run build:packages
+
+ - name: Test
+ run: pnpm run test
+
+ - name: Upload test results
+ uses: actions/upload-artifact@v3
+ if: success() || failure()
+ with:
+ name: test-results
+ path: packages/**/junit.xml
diff --git a/.gitignore b/.gitignore
index 1fee62d94c..1096bee992 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@ lang/
.pnp.*
junit.xml
.env.local
+**/.idea
diff --git a/README.md b/README.md
index d4f0c68353..183cd64ef8 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,11 @@
Visit https://docs.comet-dxp.com/ to view the documentation.
-## Getting started
+## Create a new Comet DXP project
+
+Use `@comet/create-app` to create a new Comet DXP project. More information can be found in the [docs](https://docs.comet-dxp.com/docs/getting-started/).
+
+## Development
### Prerequisites
@@ -30,32 +34,76 @@ sh install.sh
_It is recommended to run `install.sh` every time you switch to the `main` branch._
+### Build packages
+
+Before starting individual development processes, build all Comet packages at least once.
+
+```bash
+pnpm run build:packages
+```
+
+_It is recommended to build all packages every time you switch to the `main` branch._
+
### Start development processes
[dev-process-manager](https://github.com/vivid-planet/dev-process-manager) is used for local development.
+We recommend only running the development process you will need.
+Typically, you will need a subset of the available development processes.
-Start Comet Admin packages
+Here are a few examples:
-```bash
-pnpm run dev:admin
-```
+1. You want to add a new component to `@comet/admin`
-Start CMS packages
+ Start the development process for `@comet/admin`:
-```bash
-pnpm run dev:cms
-```
+ ```bash
+ npx dev-pm start @comet-admin
+ ```
-It is also possbile to start specific microservices
+ Create a development story in Storybook:
-```bash
-pnpm run dev:cms:api # (api|admin|site)
-```
+ ```bash
+ pnpm run storybook
+ ```
+
+2. You want to add a CMS feature to the API
+
+ Start the development process for `@comet/cms-api`:
+
+ ```bash
+ npx dev-pm start @cms-api
+ ```
+
+ Start Demo API:
+
+ ```bash
+ npx dev-pm start @demo-api
+ ```
+
+ The Demo API will be available at [http://localhost:4000/](http://localhost:4000/)
+
+3. You want to add a CMS feature to the Admin
+
+ Start the development process for `@comet/cms-admin`:
+
+ ```bash
+ npx dev-pm start @cms-admin
+ ```
+
+ Start Demo API and Admin:
+
+ ```bash
+ npx dev-pm start @demo-api @demo-admin
+ ```
+
+ The Demo Admin will be available at [http://localhost:8000/](http://localhost:8000/)
+
+See [dev-pm.config.js](/dev-pm.config.js) for a list of all available processes and process groups.
#### Start Demo
```bash
-pnpm run dev:demo
+npx dev-pm start @demo
```
Demo will be available at
@@ -64,10 +112,10 @@ Demo will be available at
- API: [http://localhost:4000/](http://localhost:4000/)
- Site: [http://localhost:3000/](http://localhost:3000/)
-It is also possbile to start specific microservices
+It is also possible to start specific microservices
```bash
-pnpm run dev:demo:api # (api|admin|site)
+npx dev-pm start @demo-api # (@demo-api|@demo-admin|@demo-site)
```
#### Start Storybook
@@ -86,12 +134,25 @@ pnpm run docs
The docs will be available at [http://localhost:3000/](http://localhost:3000/)
-### Stop Processes
+### Stop processes
```bash
npx dev-pm shutdown
```
+### Dev scripts
+
+We provide `dev:*` scripts for the most common use cases.
+For example, to start the Demo, you can also run:
+
+```bash
+pnpm run dev:demo
+```
+
+However, we recommend directly using dev-process-manager for greater control over which development processes to start.
+
+See [package.json](/package.json) for a list of all available dev scripts.
+
## Develop in a project
### additional Requirements
diff --git a/SECURITY.md b/SECURITY.md
index 657ada47de..e842f38ad0 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -4,12 +4,12 @@
The versions of the project that are currently supported with security updates.
-| Version | Supported |
-| ------: | :---------------------------------- |
-| 5.x | :white_check_mark: |
-| 4.x | :white_check_mark: |
-| 3.x | :white_check_mark: (until March 24) |
-| < 3.0 | :x: |
+| Version | Supported |
+| ------: | :------------------------------------ |
+| 6.x | :white_check_mark: |
+| 5.x | :white_check_mark: (until 2025-01-30) |
+| 4.x | :white_check_mark: (until 2024-11-21) |
+| < 4.x | :x: |
## Reporting a vulnerability
diff --git a/copy-schema-files.js b/copy-schema-files.js
index d2a25e5c41..c6f9f8d1f7 100644
--- a/copy-schema-files.js
+++ b/copy-schema-files.js
@@ -11,7 +11,7 @@ const fs = require("fs");
fs.promises.copyFile("demo/api/block-meta.json", "demo/site/block-meta.json"),
fs.promises.copyFile("demo/api/schema.gql", "demo/admin/schema.gql"),
fs.promises.copyFile("demo/api/schema.gql", "demo/site/schema.gql"),
- fs.promises.copyFile("demo/api/comet-config.json", "demo/site/comet-config.json"),
- fs.promises.copyFile("demo/api/comet-config.json", "demo/admin/comet-config.json"),
+ fs.promises.copyFile("demo/api/src/comet-config.json", "demo/site/src/comet-config.json"),
+ fs.promises.copyFile("demo/api/src/comet-config.json", "demo/admin/src/comet-config.json"),
]);
})();
diff --git a/demo/admin/.gitignore b/demo/admin/.gitignore
index 170cb27250..2f88443846 100644
--- a/demo/admin/.gitignore
+++ b/demo/admin/.gitignore
@@ -12,5 +12,6 @@ lang-compiled
graphql.generated.ts
block-meta.json
src/blocks.generated.ts
-comet-config.json
+src/comet-config.json
src/**/*.generated.ts
+.swc/
\ No newline at end of file
diff --git a/demo/admin/public/index.ejs b/demo/admin/index.html
similarity index 65%
rename from demo/admin/public/index.ejs
rename to demo/admin/index.html
index 07769481ff..28e24576b3 100644
--- a/demo/admin/public/index.ejs
+++ b/demo/admin/index.html
@@ -6,13 +6,11 @@
Comet Demo Admin
-
-
-
+