diff --git a/app/(payload)/admin/[[...segments]]/not-found.tsx b/app/(payload)/admin/[[...segments]]/not-found.tsx index 91a9752c905..180e6f81cdf 100644 --- a/app/(payload)/admin/[[...segments]]/not-found.tsx +++ b/app/(payload)/admin/[[...segments]]/not-found.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { generatePageMetadata, NotFoundPage } from '@payloadcms/next/views' import { importMap } from '../importMap.js' diff --git a/app/(payload)/admin/[[...segments]]/page.tsx b/app/(payload)/admin/[[...segments]]/page.tsx index 79dd4ba7011..e59b2d3a84b 100644 --- a/app/(payload)/admin/[[...segments]]/page.tsx +++ b/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { generatePageMetadata, RootPage } from '@payloadcms/next/views' import { importMap } from '../importMap.js' diff --git a/app/(payload)/api/[...slug]/route.ts b/app/(payload)/api/[...slug]/route.ts index 52caec96ad5..183cf457f62 100644 --- a/app/(payload)/api/[...slug]/route.ts +++ b/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/app/(payload)/api/graphql-playground/route.ts b/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/app/(payload)/api/graphql-playground/route.ts +++ b/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/app/(payload)/api/graphql/route.ts b/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/app/(payload)/api/graphql/route.ts +++ b/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/app/(payload)/layout.tsx b/app/(payload)/layout.tsx index ee2762cc3ee..396a5cc7569 100644 --- a/app/(payload)/layout.tsx +++ b/app/(payload)/layout.tsx @@ -1,13 +1,11 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import { RootLayout } from '@payloadcms/next/layouts' - -import { importMap } from './admin/importMap.js' - // import '@payloadcms/ui/styles.css' // Uncomment this line if `@payloadcms/ui` in `tsconfig.json` points to `/ui/dist` instead of `/ui/src` -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' +import { importMap } from './admin/importMap.js' import './custom.scss' type Args = { diff --git a/docs/admin/fields.mdx b/docs/admin/fields.mdx index f34019928b8..11bef66b512 100644 --- a/docs/admin/fields.mdx +++ b/docs/admin/fields.mdx @@ -40,21 +40,21 @@ export const CollectionConfig: CollectionConfig = { The following options are available: -| Option | Description | -| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **`condition`** | Programmatically show / hide fields based on other fields. [More details](../admin/fields#conditional-logic). | -| **`components`** | All Field Components can be swapped out for [Custom Components](../admin/components) that you define. [More details](../admin/fields). | -| **`description`** | Helper text to display alongside the field to provide more information for the editor. [More details](../admin/fields#description). | +| Option | Description | +| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **`condition`** | Programmatically show / hide fields based on other fields. [More details](../admin/fields#conditional-logic). | +| **`components`** | All Field Components can be swapped out for [Custom Components](../admin/components) that you define. [More details](../admin/fields). | +| **`description`** | Helper text to display alongside the field to provide more information for the editor. [More details](../admin/fields#description). | | **`position`** | Specify if the field should be rendered in the sidebar by defining `position: 'sidebar'`. | | **`width`** | Restrict the width of a field. You can pass any string-based value here, be it pixels, percentages, etc. This property is especially useful when fields are nested within a `Row` type where they can be organized horizontally. | -| **`style`** | [CSS Properties](https://developer.mozilla.org/en-US/docs/Web/CSS) to inject into the root element of the field. | -| **`className`** | Attach a [CSS class attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/Class_selectors) to the root DOM element of a field. | +| **`style`** | [CSS Properties](https://developer.mozilla.org/en-US/docs/Web/CSS) to inject into the root element of the field. | +| **`className`** | Attach a [CSS class attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/Class_selectors) to the root DOM element of a field. | | **`readOnly`** | Setting a field to `readOnly` has no effect on the API whatsoever but disables the admin component's editability to prevent editors from modifying the field's value. | -| **`disabled`** | If a field is `disabled`, it is completely omitted from the [Admin Panel](../admin/overview). | -| **`disableBulkEdit`** | Set `disableBulkEdit` to `true` to prevent fields from appearing in the select options when making edits for multiple documents. | +| **`disabled`** | If a field is `disabled`, it is completely omitted from the [Admin Panel](../admin/overview). | +| **`disableBulkEdit`** | Set `disableBulkEdit` to `true` to prevent fields from appearing in the select options when making edits for multiple documents. Defaults to `true` for UI fields. | | **`disableListColumn`** | Set `disableListColumn` to `true` to prevent fields from appearing in the list view column selector. | | **`disableListFilter`** | Set `disableListFilter` to `true` to prevent fields from appearing in the list view filter options. | -| **`hidden`** | Will transform the field into a `hidden` input type. Its value will still submit with requests in the Admin Panel, but the field itself will not be visible to editors. | +| **`hidden`** | Will transform the field into a `hidden` input type. Its value will still submit with requests in the Admin Panel, but the field itself will not be visible to editors. | ## Field Components diff --git a/docs/fields/ui.mdx b/docs/fields/ui.mdx index bf09e543ae6..776866297fb 100644 --- a/docs/fields/ui.mdx +++ b/docs/fields/ui.mdx @@ -28,14 +28,14 @@ export const MyUIField: Field = { ## Config Options -| Option | Description | -| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| **`name`** \* | A unique identifier for this field. | -| **`label`** | Human-readable label for this UI field. | +| Option | Description | +| ------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| **`name`** \* | A unique identifier for this field. | +| **`label`** | Human-readable label for this UI field. | | **`admin.components.Field`** \* | React component to be rendered for this field within the Edit View. [More](../admin/components/#field-component) | | **`admin.components.Cell`** | React component to be rendered as a Cell within collection List views. [More](../admin/components/#field-component) | -| **`admin.disableListColumn`** | Set `disableListColumn` to `true` to prevent the UI field from appearing in the list view column selector. | -| **`custom`** | Extension point for adding custom data (e.g. for plugins) | +| **`admin.disableListColumn`** | Set `disableListColumn` to `true` to prevent the UI field from appearing in the list view column selector. | +| **`custom`** | Extension point for adding custom data (e.g. for plugins) | _\* An asterisk denotes that a property is required._ diff --git a/docs/lexical/overview.mdx b/docs/lexical/overview.mdx index 84c76f952af..ac011e7400b 100644 --- a/docs/lexical/overview.mdx +++ b/docs/lexical/overview.mdx @@ -178,7 +178,7 @@ Notice how even the toolbars are features? That's how extensible our lexical edi ## Creating your own, custom Feature -You can find more information about creating your own feature in our [building custom feature docs](lexical/building-custom-features). +You can find more information about creating your own feature in our [building custom feature docs](/docs/lexical/building-custom-features). ## TypeScript diff --git a/docs/rest-api/overview.mdx b/docs/rest-api/overview.mdx index 1334bba4ce6..916eded45e2 100644 --- a/docs/rest-api/overview.mdx +++ b/docs/rest-api/overview.mdx @@ -605,7 +605,7 @@ export const Orders: CollectionConfig = { path: '/:id/tracking', method: 'get', handler: async (req) => { - const tracking = await getTrackingInfo(req.params.id) + const tracking = await getTrackingInfo(req.routeParams.id) if (!tracking) { return Response.json({ error: 'not found' }, { status: 404}) diff --git a/examples/auth/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx b/examples/auth/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx index e7723f49a0b..361b404e293 100644 --- a/examples/auth/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx +++ b/examples/auth/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx @@ -1,9 +1,9 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views' +import { generatePageMetadata, NotFoundPage } from '@payloadcms/next/views' type Args = { params: { diff --git a/examples/auth/payload/src/app/(payload)/admin/[[...segments]]/page.tsx b/examples/auth/payload/src/app/(payload)/admin/[[...segments]]/page.tsx index 61be15c883f..4e484451ea7 100644 --- a/examples/auth/payload/src/app/(payload)/admin/[[...segments]]/page.tsx +++ b/examples/auth/payload/src/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,9 +1,9 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import { RootPage, generatePageMetadata } from '@payloadcms/next/views' +import { generatePageMetadata, RootPage } from '@payloadcms/next/views' type Args = { params: { diff --git a/examples/auth/payload/src/app/(payload)/api/[...slug]/route.ts b/examples/auth/payload/src/app/(payload)/api/[...slug]/route.ts index 52caec96ad5..183cf457f62 100644 --- a/examples/auth/payload/src/app/(payload)/api/[...slug]/route.ts +++ b/examples/auth/payload/src/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/examples/auth/payload/src/app/(payload)/api/graphql-playground/route.ts b/examples/auth/payload/src/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/examples/auth/payload/src/app/(payload)/api/graphql-playground/route.ts +++ b/examples/auth/payload/src/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/examples/auth/payload/src/app/(payload)/api/graphql/route.ts b/examples/auth/payload/src/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/examples/auth/payload/src/app/(payload)/api/graphql/route.ts +++ b/examples/auth/payload/src/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/examples/auth/payload/src/app/(payload)/layout.tsx b/examples/auth/payload/src/app/(payload)/layout.tsx index 7997f272f10..cfcc0bcb0c3 100644 --- a/examples/auth/payload/src/app/(payload)/layout.tsx +++ b/examples/auth/payload/src/app/(payload)/layout.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import '@payloadcms/next/css' import { RootLayout } from '@payloadcms/next/layouts' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' import './custom.scss' diff --git a/examples/custom-components/src/app/(payload)/admin/[[...segments]]/not-found.tsx b/examples/custom-components/src/app/(payload)/admin/[[...segments]]/not-found.tsx index 0acfa69c866..faeff9ecfc4 100644 --- a/examples/custom-components/src/app/(payload)/admin/[[...segments]]/not-found.tsx +++ b/examples/custom-components/src/app/(payload)/admin/[[...segments]]/not-found.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { generatePageMetadata, NotFoundPage } from '@payloadcms/next/views' import { importMap } from '../importMap.js' diff --git a/examples/custom-components/src/app/(payload)/admin/[[...segments]]/page.tsx b/examples/custom-components/src/app/(payload)/admin/[[...segments]]/page.tsx index 0c501d9a03e..496e4301c49 100644 --- a/examples/custom-components/src/app/(payload)/admin/[[...segments]]/page.tsx +++ b/examples/custom-components/src/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { generatePageMetadata, RootPage } from '@payloadcms/next/views' import { importMap } from '../importMap.js' diff --git a/examples/custom-components/src/app/(payload)/api/[...slug]/route.ts b/examples/custom-components/src/app/(payload)/api/[...slug]/route.ts index 52caec96ad5..183cf457f62 100644 --- a/examples/custom-components/src/app/(payload)/api/[...slug]/route.ts +++ b/examples/custom-components/src/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/examples/custom-components/src/app/(payload)/api/graphql-playground/route.ts b/examples/custom-components/src/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/examples/custom-components/src/app/(payload)/api/graphql-playground/route.ts +++ b/examples/custom-components/src/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/examples/custom-components/src/app/(payload)/api/graphql/route.ts b/examples/custom-components/src/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/examples/custom-components/src/app/(payload)/api/graphql/route.ts +++ b/examples/custom-components/src/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/examples/custom-components/src/app/(payload)/layout.tsx b/examples/custom-components/src/app/(payload)/layout.tsx index 35fd12cc3ad..d2cf5ab1c79 100644 --- a/examples/custom-components/src/app/(payload)/layout.tsx +++ b/examples/custom-components/src/app/(payload)/layout.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import '@payloadcms/next/css' import { RootLayout } from '@payloadcms/next/layouts' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' import { importMap } from './admin/importMap.js' diff --git a/examples/form-builder/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx b/examples/form-builder/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx index e7723f49a0b..361b404e293 100644 --- a/examples/form-builder/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx +++ b/examples/form-builder/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx @@ -1,9 +1,9 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views' +import { generatePageMetadata, NotFoundPage } from '@payloadcms/next/views' type Args = { params: { diff --git a/examples/form-builder/payload/src/app/(payload)/admin/[[...segments]]/page.tsx b/examples/form-builder/payload/src/app/(payload)/admin/[[...segments]]/page.tsx index 61be15c883f..4e484451ea7 100644 --- a/examples/form-builder/payload/src/app/(payload)/admin/[[...segments]]/page.tsx +++ b/examples/form-builder/payload/src/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,9 +1,9 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import { RootPage, generatePageMetadata } from '@payloadcms/next/views' +import { generatePageMetadata, RootPage } from '@payloadcms/next/views' type Args = { params: { diff --git a/examples/form-builder/payload/src/app/(payload)/api/[...slug]/route.ts b/examples/form-builder/payload/src/app/(payload)/api/[...slug]/route.ts index 52caec96ad5..183cf457f62 100644 --- a/examples/form-builder/payload/src/app/(payload)/api/[...slug]/route.ts +++ b/examples/form-builder/payload/src/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/examples/form-builder/payload/src/app/(payload)/api/graphql-playground/route.ts b/examples/form-builder/payload/src/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/examples/form-builder/payload/src/app/(payload)/api/graphql-playground/route.ts +++ b/examples/form-builder/payload/src/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/examples/form-builder/payload/src/app/(payload)/api/graphql/route.ts b/examples/form-builder/payload/src/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/examples/form-builder/payload/src/app/(payload)/api/graphql/route.ts +++ b/examples/form-builder/payload/src/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/examples/form-builder/payload/src/app/(payload)/layout.tsx b/examples/form-builder/payload/src/app/(payload)/layout.tsx index 7997f272f10..cfcc0bcb0c3 100644 --- a/examples/form-builder/payload/src/app/(payload)/layout.tsx +++ b/examples/form-builder/payload/src/app/(payload)/layout.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import '@payloadcms/next/css' import { RootLayout } from '@payloadcms/next/layouts' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' import './custom.scss' diff --git a/examples/hierarchy/src/app/(payload)/admin/[[...segments]]/page.tsx b/examples/hierarchy/src/app/(payload)/admin/[[...segments]]/page.tsx index 6dd436af4df..81b4abb85a6 100644 --- a/examples/hierarchy/src/app/(payload)/admin/[[...segments]]/page.tsx +++ b/examples/hierarchy/src/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,6 +1,6 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -import config from '@payload-config' /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ +import config from '@payload-config' import { RootPage } from '@payloadcms/next/views' type Args = { diff --git a/examples/hierarchy/src/app/(payload)/api/[...slug]/route.ts b/examples/hierarchy/src/app/(payload)/api/[...slug]/route.ts index 282e1ad32fa..39ac605ac18 100644 --- a/examples/hierarchy/src/app/(payload)/api/[...slug]/route.ts +++ b/examples/hierarchy/src/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/examples/hierarchy/src/app/(payload)/api/graphql-playground/route.ts b/examples/hierarchy/src/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/examples/hierarchy/src/app/(payload)/api/graphql-playground/route.ts +++ b/examples/hierarchy/src/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/examples/hierarchy/src/app/(payload)/api/graphql/route.ts b/examples/hierarchy/src/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/examples/hierarchy/src/app/(payload)/api/graphql/route.ts +++ b/examples/hierarchy/src/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/examples/live-preview/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx b/examples/live-preview/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx index e7723f49a0b..361b404e293 100644 --- a/examples/live-preview/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx +++ b/examples/live-preview/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx @@ -1,9 +1,9 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views' +import { generatePageMetadata, NotFoundPage } from '@payloadcms/next/views' type Args = { params: { diff --git a/examples/live-preview/payload/src/app/(payload)/admin/[[...segments]]/page.tsx b/examples/live-preview/payload/src/app/(payload)/admin/[[...segments]]/page.tsx index 61be15c883f..4e484451ea7 100644 --- a/examples/live-preview/payload/src/app/(payload)/admin/[[...segments]]/page.tsx +++ b/examples/live-preview/payload/src/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,9 +1,9 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import { RootPage, generatePageMetadata } from '@payloadcms/next/views' +import { generatePageMetadata, RootPage } from '@payloadcms/next/views' type Args = { params: { diff --git a/examples/live-preview/payload/src/app/(payload)/api/[...slug]/route.ts b/examples/live-preview/payload/src/app/(payload)/api/[...slug]/route.ts index 52caec96ad5..183cf457f62 100644 --- a/examples/live-preview/payload/src/app/(payload)/api/[...slug]/route.ts +++ b/examples/live-preview/payload/src/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/examples/live-preview/payload/src/app/(payload)/api/graphql-playground/route.ts b/examples/live-preview/payload/src/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/examples/live-preview/payload/src/app/(payload)/api/graphql-playground/route.ts +++ b/examples/live-preview/payload/src/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/examples/live-preview/payload/src/app/(payload)/api/graphql/route.ts b/examples/live-preview/payload/src/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/examples/live-preview/payload/src/app/(payload)/api/graphql/route.ts +++ b/examples/live-preview/payload/src/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/examples/live-preview/payload/src/app/(payload)/layout.tsx b/examples/live-preview/payload/src/app/(payload)/layout.tsx index 7997f272f10..cfcc0bcb0c3 100644 --- a/examples/live-preview/payload/src/app/(payload)/layout.tsx +++ b/examples/live-preview/payload/src/app/(payload)/layout.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import '@payloadcms/next/css' import { RootLayout } from '@payloadcms/next/layouts' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' import './custom.scss' diff --git a/examples/multi-tenant-single-domain/src/app/(payload)/admin/[[...segments]]/not-found.tsx b/examples/multi-tenant-single-domain/src/app/(payload)/admin/[[...segments]]/not-found.tsx index f2492a309d5..faeff9ecfc4 100644 --- a/examples/multi-tenant-single-domain/src/app/(payload)/admin/[[...segments]]/not-found.tsx +++ b/examples/multi-tenant-single-domain/src/app/(payload)/admin/[[...segments]]/not-found.tsx @@ -1,9 +1,9 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views' +import { generatePageMetadata, NotFoundPage } from '@payloadcms/next/views' import { importMap } from '../importMap.js' diff --git a/examples/multi-tenant-single-domain/src/app/(payload)/admin/[[...segments]]/page.tsx b/examples/multi-tenant-single-domain/src/app/(payload)/admin/[[...segments]]/page.tsx index 0bfe410796e..496e4301c49 100644 --- a/examples/multi-tenant-single-domain/src/app/(payload)/admin/[[...segments]]/page.tsx +++ b/examples/multi-tenant-single-domain/src/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,9 +1,9 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import { RootPage, generatePageMetadata } from '@payloadcms/next/views' +import { generatePageMetadata, RootPage } from '@payloadcms/next/views' import { importMap } from '../importMap.js' diff --git a/examples/multi-tenant-single-domain/src/app/(payload)/api/[...slug]/route.ts b/examples/multi-tenant-single-domain/src/app/(payload)/api/[...slug]/route.ts index 52caec96ad5..183cf457f62 100644 --- a/examples/multi-tenant-single-domain/src/app/(payload)/api/[...slug]/route.ts +++ b/examples/multi-tenant-single-domain/src/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/examples/multi-tenant-single-domain/src/app/(payload)/api/graphql-playground/route.ts b/examples/multi-tenant-single-domain/src/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/examples/multi-tenant-single-domain/src/app/(payload)/api/graphql-playground/route.ts +++ b/examples/multi-tenant-single-domain/src/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/examples/multi-tenant-single-domain/src/app/(payload)/api/graphql/route.ts b/examples/multi-tenant-single-domain/src/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/examples/multi-tenant-single-domain/src/app/(payload)/api/graphql/route.ts +++ b/examples/multi-tenant-single-domain/src/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/examples/multi-tenant-single-domain/src/app/(payload)/layout.tsx b/examples/multi-tenant-single-domain/src/app/(payload)/layout.tsx index 35fd12cc3ad..d2cf5ab1c79 100644 --- a/examples/multi-tenant-single-domain/src/app/(payload)/layout.tsx +++ b/examples/multi-tenant-single-domain/src/app/(payload)/layout.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import '@payloadcms/next/css' import { RootLayout } from '@payloadcms/next/layouts' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' import { importMap } from './admin/importMap.js' diff --git a/examples/tailwind-shadcn-ui/src/app/(payload)/admin/[[...segments]]/page.tsx b/examples/tailwind-shadcn-ui/src/app/(payload)/admin/[[...segments]]/page.tsx index 6dd436af4df..81b4abb85a6 100644 --- a/examples/tailwind-shadcn-ui/src/app/(payload)/admin/[[...segments]]/page.tsx +++ b/examples/tailwind-shadcn-ui/src/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,6 +1,6 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -import config from '@payload-config' /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ +import config from '@payload-config' import { RootPage } from '@payloadcms/next/views' type Args = { diff --git a/examples/tailwind-shadcn-ui/src/app/(payload)/api/[...slug]/route.ts b/examples/tailwind-shadcn-ui/src/app/(payload)/api/[...slug]/route.ts index 282e1ad32fa..39ac605ac18 100644 --- a/examples/tailwind-shadcn-ui/src/app/(payload)/api/[...slug]/route.ts +++ b/examples/tailwind-shadcn-ui/src/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/examples/tailwind-shadcn-ui/src/app/(payload)/api/graphql-playground/route.ts b/examples/tailwind-shadcn-ui/src/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/examples/tailwind-shadcn-ui/src/app/(payload)/api/graphql-playground/route.ts +++ b/examples/tailwind-shadcn-ui/src/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/examples/tailwind-shadcn-ui/src/app/(payload)/api/graphql/route.ts b/examples/tailwind-shadcn-ui/src/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/examples/tailwind-shadcn-ui/src/app/(payload)/api/graphql/route.ts +++ b/examples/tailwind-shadcn-ui/src/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/examples/tailwind-shadcn-ui/src/app/(payload)/layout.tsx b/examples/tailwind-shadcn-ui/src/app/(payload)/layout.tsx index 7997f272f10..cfcc0bcb0c3 100644 --- a/examples/tailwind-shadcn-ui/src/app/(payload)/layout.tsx +++ b/examples/tailwind-shadcn-ui/src/app/(payload)/layout.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import '@payloadcms/next/css' import { RootLayout } from '@payloadcms/next/layouts' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' import './custom.scss' diff --git a/examples/virtual-fields/src/app/(payload)/admin/[[...segments]]/page.tsx b/examples/virtual-fields/src/app/(payload)/admin/[[...segments]]/page.tsx index 6dd436af4df..81b4abb85a6 100644 --- a/examples/virtual-fields/src/app/(payload)/admin/[[...segments]]/page.tsx +++ b/examples/virtual-fields/src/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,6 +1,6 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -import config from '@payload-config' /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ +import config from '@payload-config' import { RootPage } from '@payloadcms/next/views' type Args = { diff --git a/examples/virtual-fields/src/app/(payload)/api/[...slug]/route.ts b/examples/virtual-fields/src/app/(payload)/api/[...slug]/route.ts index 282e1ad32fa..39ac605ac18 100644 --- a/examples/virtual-fields/src/app/(payload)/api/[...slug]/route.ts +++ b/examples/virtual-fields/src/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/examples/virtual-fields/src/app/(payload)/api/graphql-playground/route.ts b/examples/virtual-fields/src/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/examples/virtual-fields/src/app/(payload)/api/graphql-playground/route.ts +++ b/examples/virtual-fields/src/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/examples/virtual-fields/src/app/(payload)/api/graphql/route.ts b/examples/virtual-fields/src/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/examples/virtual-fields/src/app/(payload)/api/graphql/route.ts +++ b/examples/virtual-fields/src/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/examples/virtual-fields/src/app/(payload)/layout.tsx b/examples/virtual-fields/src/app/(payload)/layout.tsx index 7997f272f10..cfcc0bcb0c3 100644 --- a/examples/virtual-fields/src/app/(payload)/layout.tsx +++ b/examples/virtual-fields/src/app/(payload)/layout.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import '@payloadcms/next/css' import { RootLayout } from '@payloadcms/next/layouts' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' import './custom.scss' diff --git a/examples/whitelabel/src/app/(payload)/admin/[[...segments]]/page.tsx b/examples/whitelabel/src/app/(payload)/admin/[[...segments]]/page.tsx index 6dd436af4df..5f13704d3ec 100644 --- a/examples/whitelabel/src/app/(payload)/admin/[[...segments]]/page.tsx +++ b/examples/whitelabel/src/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,6 +1,7 @@ -/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. + DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. +*/ import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { RootPage } from '@payloadcms/next/views' type Args = { diff --git a/examples/whitelabel/src/app/(payload)/api/[...slug]/route.ts b/examples/whitelabel/src/app/(payload)/api/[...slug]/route.ts index 282e1ad32fa..39ac605ac18 100644 --- a/examples/whitelabel/src/app/(payload)/api/[...slug]/route.ts +++ b/examples/whitelabel/src/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/examples/whitelabel/src/app/(payload)/api/graphql-playground/route.ts b/examples/whitelabel/src/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/examples/whitelabel/src/app/(payload)/api/graphql-playground/route.ts +++ b/examples/whitelabel/src/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/examples/whitelabel/src/app/(payload)/api/graphql/route.ts b/examples/whitelabel/src/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/examples/whitelabel/src/app/(payload)/api/graphql/route.ts +++ b/examples/whitelabel/src/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/examples/whitelabel/src/app/(payload)/layout.tsx b/examples/whitelabel/src/app/(payload)/layout.tsx index 7997f272f10..cfcc0bcb0c3 100644 --- a/examples/whitelabel/src/app/(payload)/layout.tsx +++ b/examples/whitelabel/src/app/(payload)/layout.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import '@payloadcms/next/css' import { RootLayout } from '@payloadcms/next/layouts' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' import './custom.scss' diff --git a/packages/drizzle/src/transform/write/traverseFields.ts b/packages/drizzle/src/transform/write/traverseFields.ts index dd3ba349e59..6834c1184bd 100644 --- a/packages/drizzle/src/transform/write/traverseFields.ts +++ b/packages/drizzle/src/transform/write/traverseFields.ts @@ -363,6 +363,7 @@ export const traverseFields = ({ existingLocales, fieldPrefix, fields: field.fields, + forcedLocale, locales, numbers, parentTableName, diff --git a/packages/payload/src/fields/config/sanitize.ts b/packages/payload/src/fields/config/sanitize.ts index 1622ad8ba2e..9ff611488d9 100644 --- a/packages/payload/src/fields/config/sanitize.ts +++ b/packages/payload/src/fields/config/sanitize.ts @@ -289,6 +289,10 @@ export const sanitizeFields = async ({ } } + if (field.type === 'ui' && typeof field.admin.disableBulkEdit === 'undefined') { + field.admin.disableBulkEdit = true + } + if ('_sanitized' in field) { field._sanitized = true } diff --git a/packages/payload/src/fields/config/types.ts b/packages/payload/src/fields/config/types.ts index 997a83c34be..3a964a8edec 100644 --- a/packages/payload/src/fields/config/types.ts +++ b/packages/payload/src/fields/config/types.ts @@ -832,6 +832,10 @@ export type UIField = { condition?: Condition /** Extension point to add your custom data. Available in server and client. */ custom?: Record + /** + * Set `false` make the UI field appear in the list view column selector. `true` by default for UI fields. + * @default true + */ disableBulkEdit?: boolean /** * Shows / hides fields from appearing in the list view column selector. diff --git a/packages/plugin-seo/src/fields/MetaDescription/MetaDescriptionComponent.tsx b/packages/plugin-seo/src/fields/MetaDescription/MetaDescriptionComponent.tsx index 914b3507ed0..8ceda3be3fa 100644 --- a/packages/plugin-seo/src/fields/MetaDescription/MetaDescriptionComponent.tsx +++ b/packages/plugin-seo/src/fields/MetaDescription/MetaDescriptionComponent.tsx @@ -6,6 +6,7 @@ import type { TextareaFieldClientProps } from 'payload' import { FieldLabel, TextareaInput, + useConfig, useDocumentInfo, useField, useFieldProps, @@ -41,6 +42,13 @@ export const MetaDescriptionComponent: React.FC = (props) } = props const { path: pathFromContext } = useFieldProps() + const { + config: { + routes: { api }, + serverURL, + }, + } = useConfig() + const { t } = useTranslation() const locale = useLocale() @@ -58,7 +66,9 @@ export const MetaDescriptionComponent: React.FC = (props) return } - const genDescriptionResponse = await fetch('/api/plugin-seo/generate-description', { + const endpoint = `${serverURL}${api}/plugin-seo/generate-description` + + const genDescriptionResponse = await fetch(endpoint, { body: JSON.stringify({ id: docInfo.id, collectionSlug: docInfo.collectionSlug, @@ -85,7 +95,23 @@ export const MetaDescriptionComponent: React.FC = (props) const { result: generatedDescription } = await genDescriptionResponse.json() setValue(generatedDescription || '') - }, [hasGenerateDescriptionFn, docInfo, getData, locale, setValue]) + }, [ + hasGenerateDescriptionFn, + serverURL, + api, + docInfo.id, + docInfo.collectionSlug, + docInfo.docPermissions, + docInfo.globalSlug, + docInfo.hasPublishPermission, + docInfo.hasSavePermission, + docInfo.initialData, + docInfo.initialState, + docInfo.title, + getData, + locale, + setValue, + ]) return (
= (props) => { } = props || {} const { path: pathFromContext } = useFieldProps() + const { + config: { + collections, + routes: { api }, + serverURL, + }, + } = useConfig() + const field: FieldType = useField({ ...props, path: pathFromContext } as Options) const { t } = useTranslation() @@ -55,7 +63,9 @@ export const MetaImageComponent: React.FC = (props) => { return } - const genImageResponse = await fetch('/api/plugin-seo/generate-image', { + const endpoint = `${serverURL}${api}/plugin-seo/generate-image` + + const genImageResponse = await fetch(endpoint, { body: JSON.stringify({ id: docInfo.id, collectionSlug: docInfo.collectionSlug, @@ -79,14 +89,26 @@ export const MetaImageComponent: React.FC = (props) => { const generatedImage = await genImageResponse.text() setValue(generatedImage || '') - }, [hasGenerateImageFn, docInfo, getData, locale, setValue]) + }, [ + hasGenerateImageFn, + serverURL, + api, + docInfo.id, + docInfo.collectionSlug, + docInfo.docPermissions, + docInfo.globalSlug, + docInfo.hasPublishPermission, + docInfo.hasSavePermission, + docInfo.initialData, + docInfo.initialState, + docInfo.title, + getData, + locale, + setValue, + ]) const hasImage = Boolean(value) - const { config } = useConfig() - - const { collections, routes: { api } = {}, serverURL } = config - const collection = collections?.find((coll) => coll.slug === relationTo) || undefined return ( diff --git a/packages/plugin-seo/src/fields/MetaTitle/MetaTitleComponent.tsx b/packages/plugin-seo/src/fields/MetaTitle/MetaTitleComponent.tsx index 684eab081b7..3c496c234b2 100644 --- a/packages/plugin-seo/src/fields/MetaTitle/MetaTitleComponent.tsx +++ b/packages/plugin-seo/src/fields/MetaTitle/MetaTitleComponent.tsx @@ -6,6 +6,7 @@ import type { TextFieldClientProps } from 'payload' import { FieldLabel, TextInput, + useConfig, useDocumentInfo, useField, useFieldProps, @@ -44,6 +45,13 @@ export const MetaTitleComponent: React.FC = (props) => { const { path: pathFromContext } = useFieldProps() const { t } = useTranslation() + const { + config: { + routes: { api }, + serverURL, + }, + } = useConfig() + const field: FieldType = useField({ path: pathFromContext, } as Options) @@ -59,7 +67,9 @@ export const MetaTitleComponent: React.FC = (props) => { return } - const genTitleResponse = await fetch('/api/plugin-seo/generate-title', { + const endpoint = `${serverURL}${api}/plugin-seo/generate-title` + + const genTitleResponse = await fetch(endpoint, { body: JSON.stringify({ id: docInfo.id, collectionSlug: docInfo.collectionSlug, @@ -83,7 +93,23 @@ export const MetaTitleComponent: React.FC = (props) => { const { result: generatedTitle } = await genTitleResponse.json() setValue(generatedTitle || '') - }, [hasGenerateTitleFn, docInfo, getData, locale, setValue]) + }, [ + hasGenerateTitleFn, + serverURL, + api, + docInfo.id, + docInfo.collectionSlug, + docInfo.docPermissions, + docInfo.globalSlug, + docInfo.hasPublishPermission, + docInfo.hasSavePermission, + docInfo.initialData, + docInfo.initialState, + docInfo.title, + getData, + locale, + setValue, + ]) return (
= (props) => { const { t } = useTranslation() + const { + config: { + routes: { api }, + serverURL, + }, + } = useConfig() + const locale = useLocale() const [fields] = useAllFormFields() const { getData } = useForm() @@ -45,8 +53,10 @@ export const PreviewComponent: React.FC = (props) => { const [href, setHref] = useState() useEffect(() => { + const endpoint = `${serverURL}${api}/plugin-seo/generate-url` + const getHref = async () => { - const genURLResponse = await fetch('/api/plugin-seo/generate-url', { + const genURLResponse = await fetch(endpoint, { body: JSON.stringify({ id: docInfo.id, collectionSlug: docInfo.collectionSlug, @@ -75,7 +85,7 @@ export const PreviewComponent: React.FC = (props) => { if (hasGenerateURLFn && !href) { void getHref() } - }, [fields, href, locale, docInfo, hasGenerateURLFn, getData]) + }, [fields, href, locale, docInfo, hasGenerateURLFn, getData, serverURL, api]) return (
{ - // escape for a variety of reasons + // escape for a variety of reasons, include ui fields as they have `name`. if ( - fieldAffectsData(field) && + (fieldAffectsData(field) || field.type === 'ui') && (field.admin.disableBulkEdit || field.unique || field.admin.hidden || diff --git a/templates/_template/src/app/(payload)/admin/[[...segments]]/not-found.tsx b/templates/_template/src/app/(payload)/admin/[[...segments]]/not-found.tsx index d5e3c923e11..ade432a48d5 100644 --- a/templates/_template/src/app/(payload)/admin/[[...segments]]/not-found.tsx +++ b/templates/_template/src/app/(payload)/admin/[[...segments]]/not-found.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views' import { importMap } from '../importMap' diff --git a/templates/_template/src/app/(payload)/admin/[[...segments]]/page.tsx b/templates/_template/src/app/(payload)/admin/[[...segments]]/page.tsx index 4d5bbfd27a7..75241971d57 100644 --- a/templates/_template/src/app/(payload)/admin/[[...segments]]/page.tsx +++ b/templates/_template/src/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { RootPage, generatePageMetadata } from '@payloadcms/next/views' import { importMap } from '../importMap' diff --git a/templates/_template/src/app/(payload)/api/[...slug]/route.ts b/templates/_template/src/app/(payload)/api/[...slug]/route.ts index 52caec96ad5..183cf457f62 100644 --- a/templates/_template/src/app/(payload)/api/[...slug]/route.ts +++ b/templates/_template/src/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/templates/_template/src/app/(payload)/api/graphql-playground/route.ts b/templates/_template/src/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/templates/_template/src/app/(payload)/api/graphql-playground/route.ts +++ b/templates/_template/src/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/templates/_template/src/app/(payload)/api/graphql/route.ts b/templates/_template/src/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/templates/_template/src/app/(payload)/api/graphql/route.ts +++ b/templates/_template/src/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/templates/_template/src/app/(payload)/layout.tsx b/templates/_template/src/app/(payload)/layout.tsx index b2fefffa39b..767040c59b8 100644 --- a/templates/_template/src/app/(payload)/layout.tsx +++ b/templates/_template/src/app/(payload)/layout.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import '@payloadcms/next/css' import { RootLayout } from '@payloadcms/next/layouts' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' import './custom.scss' diff --git a/templates/blank/src/app/(payload)/admin/[[...segments]]/not-found.tsx b/templates/blank/src/app/(payload)/admin/[[...segments]]/not-found.tsx index d5e3c923e11..ade432a48d5 100644 --- a/templates/blank/src/app/(payload)/admin/[[...segments]]/not-found.tsx +++ b/templates/blank/src/app/(payload)/admin/[[...segments]]/not-found.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views' import { importMap } from '../importMap' diff --git a/templates/blank/src/app/(payload)/admin/[[...segments]]/page.tsx b/templates/blank/src/app/(payload)/admin/[[...segments]]/page.tsx index 4d5bbfd27a7..75241971d57 100644 --- a/templates/blank/src/app/(payload)/admin/[[...segments]]/page.tsx +++ b/templates/blank/src/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { RootPage, generatePageMetadata } from '@payloadcms/next/views' import { importMap } from '../importMap' diff --git a/templates/blank/src/app/(payload)/api/[...slug]/route.ts b/templates/blank/src/app/(payload)/api/[...slug]/route.ts index 52caec96ad5..183cf457f62 100644 --- a/templates/blank/src/app/(payload)/api/[...slug]/route.ts +++ b/templates/blank/src/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/templates/blank/src/app/(payload)/api/graphql-playground/route.ts b/templates/blank/src/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/templates/blank/src/app/(payload)/api/graphql-playground/route.ts +++ b/templates/blank/src/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/templates/blank/src/app/(payload)/api/graphql/route.ts b/templates/blank/src/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/templates/blank/src/app/(payload)/api/graphql/route.ts +++ b/templates/blank/src/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/templates/blank/src/app/(payload)/layout.tsx b/templates/blank/src/app/(payload)/layout.tsx index b2fefffa39b..767040c59b8 100644 --- a/templates/blank/src/app/(payload)/layout.tsx +++ b/templates/blank/src/app/(payload)/layout.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import '@payloadcms/next/css' import { RootLayout } from '@payloadcms/next/layouts' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' import './custom.scss' diff --git a/templates/vercel-postgres/src/app/(payload)/admin/[[...segments]]/not-found.tsx b/templates/vercel-postgres/src/app/(payload)/admin/[[...segments]]/not-found.tsx index e7723f49a0b..9cdc0d393ad 100644 --- a/templates/vercel-postgres/src/app/(payload)/admin/[[...segments]]/not-found.tsx +++ b/templates/vercel-postgres/src/app/(payload)/admin/[[...segments]]/not-found.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views' type Args = { diff --git a/templates/vercel-postgres/src/app/(payload)/admin/[[...segments]]/page.tsx b/templates/vercel-postgres/src/app/(payload)/admin/[[...segments]]/page.tsx index 61be15c883f..559298711a1 100644 --- a/templates/vercel-postgres/src/app/(payload)/admin/[[...segments]]/page.tsx +++ b/templates/vercel-postgres/src/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { RootPage, generatePageMetadata } from '@payloadcms/next/views' type Args = { diff --git a/templates/vercel-postgres/src/app/(payload)/api/[...slug]/route.ts b/templates/vercel-postgres/src/app/(payload)/api/[...slug]/route.ts index 52caec96ad5..183cf457f62 100644 --- a/templates/vercel-postgres/src/app/(payload)/api/[...slug]/route.ts +++ b/templates/vercel-postgres/src/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/templates/vercel-postgres/src/app/(payload)/api/graphql-playground/route.ts b/templates/vercel-postgres/src/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/templates/vercel-postgres/src/app/(payload)/api/graphql-playground/route.ts +++ b/templates/vercel-postgres/src/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/templates/vercel-postgres/src/app/(payload)/api/graphql/route.ts b/templates/vercel-postgres/src/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/templates/vercel-postgres/src/app/(payload)/api/graphql/route.ts +++ b/templates/vercel-postgres/src/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/templates/vercel-postgres/src/app/(payload)/layout.tsx b/templates/vercel-postgres/src/app/(payload)/layout.tsx index 7997f272f10..cfcc0bcb0c3 100644 --- a/templates/vercel-postgres/src/app/(payload)/layout.tsx +++ b/templates/vercel-postgres/src/app/(payload)/layout.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import '@payloadcms/next/css' import { RootLayout } from '@payloadcms/next/layouts' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' import './custom.scss' diff --git a/templates/website/src/Header/Nav/index.tsx b/templates/website/src/Header/Nav/index.tsx index 31041316173..df9f96640e8 100644 --- a/templates/website/src/Header/Nav/index.tsx +++ b/templates/website/src/Header/Nav/index.tsx @@ -18,7 +18,7 @@ export const HeaderNav: React.FC<{ header: HeaderType }> = ({ header }) => { })} Search - + ) diff --git a/templates/website/src/app/(frontend)/[slug]/page.client.tsx b/templates/website/src/app/(frontend)/[slug]/page.client.tsx new file mode 100644 index 00000000000..2d526692800 --- /dev/null +++ b/templates/website/src/app/(frontend)/[slug]/page.client.tsx @@ -0,0 +1,15 @@ +'use client' +import { useHeaderTheme } from '@/providers/HeaderTheme' +import React, { useEffect } from 'react' + +const PageClient: React.FC = () => { + /* Force the header to be dark mode while we have an image behind it */ + const { setHeaderTheme } = useHeaderTheme() + + useEffect(() => { + setHeaderTheme('light') + }, [setHeaderTheme]) + return +} + +export default PageClient diff --git a/templates/website/src/app/(frontend)/[slug]/page.tsx b/templates/website/src/app/(frontend)/[slug]/page.tsx index ee4bb6f7263..295817b547f 100644 --- a/templates/website/src/app/(frontend)/[slug]/page.tsx +++ b/templates/website/src/app/(frontend)/[slug]/page.tsx @@ -12,6 +12,7 @@ import type { Page as PageType } from '@/payload-types' import { RenderBlocks } from '@/blocks/RenderBlocks' import { RenderHero } from '@/heros/RenderHero' import { generateMeta } from '@/utilities/generateMeta' +import PageClient from './page.client' export async function generateStaticParams() { const payload = await getPayloadHMR({ config: configPromise }) @@ -55,6 +56,7 @@ export default async function Page({ params: { slug = 'home' } }) { return (
+ {/* Allows redirects for valid pages too */} diff --git a/templates/website/src/app/(frontend)/posts/page.client.tsx b/templates/website/src/app/(frontend)/posts/page.client.tsx new file mode 100644 index 00000000000..2d526692800 --- /dev/null +++ b/templates/website/src/app/(frontend)/posts/page.client.tsx @@ -0,0 +1,15 @@ +'use client' +import { useHeaderTheme } from '@/providers/HeaderTheme' +import React, { useEffect } from 'react' + +const PageClient: React.FC = () => { + /* Force the header to be dark mode while we have an image behind it */ + const { setHeaderTheme } = useHeaderTheme() + + useEffect(() => { + setHeaderTheme('light') + }, [setHeaderTheme]) + return +} + +export default PageClient diff --git a/templates/website/src/app/(frontend)/posts/page.tsx b/templates/website/src/app/(frontend)/posts/page.tsx index 918ea05bd2b..cba764fede4 100644 --- a/templates/website/src/app/(frontend)/posts/page.tsx +++ b/templates/website/src/app/(frontend)/posts/page.tsx @@ -6,6 +6,7 @@ import { Pagination } from '@/components/Pagination' import configPromise from '@payload-config' import { getPayloadHMR } from '@payloadcms/next/utilities' import React from 'react' +import PageClient from './page.client' export const dynamic = 'force-static' export const revalidate = 600 @@ -22,6 +23,7 @@ export default async function Page() { return (
+

Posts

diff --git a/templates/website/src/app/(frontend)/posts/page/[pageNumber]/page.client.tsx b/templates/website/src/app/(frontend)/posts/page/[pageNumber]/page.client.tsx new file mode 100644 index 00000000000..2d526692800 --- /dev/null +++ b/templates/website/src/app/(frontend)/posts/page/[pageNumber]/page.client.tsx @@ -0,0 +1,15 @@ +'use client' +import { useHeaderTheme } from '@/providers/HeaderTheme' +import React, { useEffect } from 'react' + +const PageClient: React.FC = () => { + /* Force the header to be dark mode while we have an image behind it */ + const { setHeaderTheme } = useHeaderTheme() + + useEffect(() => { + setHeaderTheme('light') + }, [setHeaderTheme]) + return +} + +export default PageClient diff --git a/templates/website/src/app/(frontend)/posts/page/[pageNumber]/page.tsx b/templates/website/src/app/(frontend)/posts/page/[pageNumber]/page.tsx index 99f594638e3..3987bad6a47 100644 --- a/templates/website/src/app/(frontend)/posts/page/[pageNumber]/page.tsx +++ b/templates/website/src/app/(frontend)/posts/page/[pageNumber]/page.tsx @@ -6,6 +6,8 @@ import { Pagination } from '@/components/Pagination' import configPromise from '@payload-config' import { getPayloadHMR } from '@payloadcms/next/utilities' import React from 'react' +import PageClient from './page.client' + export const revalidate = 600 export default async function Page({ params: { pageNumber } }) { @@ -21,6 +23,7 @@ export default async function Page({ params: { pageNumber } }) { return (
+

Posts

diff --git a/templates/website/src/app/(frontend)/search/page.client.tsx b/templates/website/src/app/(frontend)/search/page.client.tsx new file mode 100644 index 00000000000..2d526692800 --- /dev/null +++ b/templates/website/src/app/(frontend)/search/page.client.tsx @@ -0,0 +1,15 @@ +'use client' +import { useHeaderTheme } from '@/providers/HeaderTheme' +import React, { useEffect } from 'react' + +const PageClient: React.FC = () => { + /* Force the header to be dark mode while we have an image behind it */ + const { setHeaderTheme } = useHeaderTheme() + + useEffect(() => { + setHeaderTheme('light') + }, [setHeaderTheme]) + return +} + +export default PageClient diff --git a/templates/website/src/app/(frontend)/search/page.tsx b/templates/website/src/app/(frontend)/search/page.tsx index c28b7a1a064..4220b99fec6 100644 --- a/templates/website/src/app/(frontend)/search/page.tsx +++ b/templates/website/src/app/(frontend)/search/page.tsx @@ -6,7 +6,7 @@ import { getPayloadHMR } from '@payloadcms/next/utilities' import React from 'react' import { Post } from '@/payload-types' import { Search } from '@/search/Component' - +import PageClient from './page.client' export default async function Page({ searchParams }: { searchParams: { q: string } }) { const query = searchParams.q const payload = await getPayloadHMR({ config: configPromise }) @@ -47,6 +47,7 @@ export default async function Page({ searchParams }: { searchParams: { q: string return (
+

Search

diff --git a/templates/website/src/app/(payload)/admin/[[...segments]]/not-found.tsx b/templates/website/src/app/(payload)/admin/[[...segments]]/not-found.tsx index d5e3c923e11..ade432a48d5 100644 --- a/templates/website/src/app/(payload)/admin/[[...segments]]/not-found.tsx +++ b/templates/website/src/app/(payload)/admin/[[...segments]]/not-found.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views' import { importMap } from '../importMap' diff --git a/templates/website/src/app/(payload)/admin/[[...segments]]/page.tsx b/templates/website/src/app/(payload)/admin/[[...segments]]/page.tsx index 4d5bbfd27a7..75241971d57 100644 --- a/templates/website/src/app/(payload)/admin/[[...segments]]/page.tsx +++ b/templates/website/src/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { RootPage, generatePageMetadata } from '@payloadcms/next/views' import { importMap } from '../importMap' diff --git a/templates/website/src/app/(payload)/api/[...slug]/route.ts b/templates/website/src/app/(payload)/api/[...slug]/route.ts index 52caec96ad5..183cf457f62 100644 --- a/templates/website/src/app/(payload)/api/[...slug]/route.ts +++ b/templates/website/src/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/templates/website/src/app/(payload)/api/graphql-playground/route.ts b/templates/website/src/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/templates/website/src/app/(payload)/api/graphql-playground/route.ts +++ b/templates/website/src/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/templates/website/src/app/(payload)/api/graphql/route.ts b/templates/website/src/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/templates/website/src/app/(payload)/api/graphql/route.ts +++ b/templates/website/src/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/templates/website/src/app/(payload)/layout.tsx b/templates/website/src/app/(payload)/layout.tsx index b2fefffa39b..767040c59b8 100644 --- a/templates/website/src/app/(payload)/layout.tsx +++ b/templates/website/src/app/(payload)/layout.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import '@payloadcms/next/css' import { RootLayout } from '@payloadcms/next/layouts' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' import './custom.scss' diff --git a/templates/with-payload-cloud/src/app/(payload)/admin/[[...segments]]/not-found.tsx b/templates/with-payload-cloud/src/app/(payload)/admin/[[...segments]]/not-found.tsx index d5e3c923e11..ade432a48d5 100644 --- a/templates/with-payload-cloud/src/app/(payload)/admin/[[...segments]]/not-found.tsx +++ b/templates/with-payload-cloud/src/app/(payload)/admin/[[...segments]]/not-found.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views' import { importMap } from '../importMap' diff --git a/templates/with-payload-cloud/src/app/(payload)/admin/[[...segments]]/page.tsx b/templates/with-payload-cloud/src/app/(payload)/admin/[[...segments]]/page.tsx index 4d5bbfd27a7..75241971d57 100644 --- a/templates/with-payload-cloud/src/app/(payload)/admin/[[...segments]]/page.tsx +++ b/templates/with-payload-cloud/src/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { RootPage, generatePageMetadata } from '@payloadcms/next/views' import { importMap } from '../importMap' diff --git a/templates/with-payload-cloud/src/app/(payload)/api/[...slug]/route.ts b/templates/with-payload-cloud/src/app/(payload)/api/[...slug]/route.ts index 52caec96ad5..183cf457f62 100644 --- a/templates/with-payload-cloud/src/app/(payload)/api/[...slug]/route.ts +++ b/templates/with-payload-cloud/src/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/templates/with-payload-cloud/src/app/(payload)/api/graphql-playground/route.ts b/templates/with-payload-cloud/src/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/templates/with-payload-cloud/src/app/(payload)/api/graphql-playground/route.ts +++ b/templates/with-payload-cloud/src/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/templates/with-payload-cloud/src/app/(payload)/api/graphql/route.ts b/templates/with-payload-cloud/src/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/templates/with-payload-cloud/src/app/(payload)/api/graphql/route.ts +++ b/templates/with-payload-cloud/src/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/templates/with-payload-cloud/src/app/(payload)/layout.tsx b/templates/with-payload-cloud/src/app/(payload)/layout.tsx index b2fefffa39b..767040c59b8 100644 --- a/templates/with-payload-cloud/src/app/(payload)/layout.tsx +++ b/templates/with-payload-cloud/src/app/(payload)/layout.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import '@payloadcms/next/css' import { RootLayout } from '@payloadcms/next/layouts' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' import './custom.scss' diff --git a/templates/with-postgres/src/app/(payload)/admin/[[...segments]]/not-found.tsx b/templates/with-postgres/src/app/(payload)/admin/[[...segments]]/not-found.tsx index d5e3c923e11..ade432a48d5 100644 --- a/templates/with-postgres/src/app/(payload)/admin/[[...segments]]/not-found.tsx +++ b/templates/with-postgres/src/app/(payload)/admin/[[...segments]]/not-found.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views' import { importMap } from '../importMap' diff --git a/templates/with-postgres/src/app/(payload)/admin/[[...segments]]/page.tsx b/templates/with-postgres/src/app/(payload)/admin/[[...segments]]/page.tsx index 4d5bbfd27a7..75241971d57 100644 --- a/templates/with-postgres/src/app/(payload)/admin/[[...segments]]/page.tsx +++ b/templates/with-postgres/src/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { RootPage, generatePageMetadata } from '@payloadcms/next/views' import { importMap } from '../importMap' diff --git a/templates/with-postgres/src/app/(payload)/api/[...slug]/route.ts b/templates/with-postgres/src/app/(payload)/api/[...slug]/route.ts index 52caec96ad5..183cf457f62 100644 --- a/templates/with-postgres/src/app/(payload)/api/[...slug]/route.ts +++ b/templates/with-postgres/src/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/templates/with-postgres/src/app/(payload)/api/graphql-playground/route.ts b/templates/with-postgres/src/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/templates/with-postgres/src/app/(payload)/api/graphql-playground/route.ts +++ b/templates/with-postgres/src/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/templates/with-postgres/src/app/(payload)/api/graphql/route.ts b/templates/with-postgres/src/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/templates/with-postgres/src/app/(payload)/api/graphql/route.ts +++ b/templates/with-postgres/src/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/templates/with-postgres/src/app/(payload)/layout.tsx b/templates/with-postgres/src/app/(payload)/layout.tsx index b2fefffa39b..767040c59b8 100644 --- a/templates/with-postgres/src/app/(payload)/layout.tsx +++ b/templates/with-postgres/src/app/(payload)/layout.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import '@payloadcms/next/css' import { RootLayout } from '@payloadcms/next/layouts' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' import './custom.scss' diff --git a/templates/with-vercel-mongodb/src/app/(payload)/admin/[[...segments]]/not-found.tsx b/templates/with-vercel-mongodb/src/app/(payload)/admin/[[...segments]]/not-found.tsx index d5e3c923e11..ade432a48d5 100644 --- a/templates/with-vercel-mongodb/src/app/(payload)/admin/[[...segments]]/not-found.tsx +++ b/templates/with-vercel-mongodb/src/app/(payload)/admin/[[...segments]]/not-found.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views' import { importMap } from '../importMap' diff --git a/templates/with-vercel-mongodb/src/app/(payload)/admin/[[...segments]]/page.tsx b/templates/with-vercel-mongodb/src/app/(payload)/admin/[[...segments]]/page.tsx index 4d5bbfd27a7..75241971d57 100644 --- a/templates/with-vercel-mongodb/src/app/(payload)/admin/[[...segments]]/page.tsx +++ b/templates/with-vercel-mongodb/src/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { RootPage, generatePageMetadata } from '@payloadcms/next/views' import { importMap } from '../importMap' diff --git a/templates/with-vercel-mongodb/src/app/(payload)/api/[...slug]/route.ts b/templates/with-vercel-mongodb/src/app/(payload)/api/[...slug]/route.ts index 52caec96ad5..183cf457f62 100644 --- a/templates/with-vercel-mongodb/src/app/(payload)/api/[...slug]/route.ts +++ b/templates/with-vercel-mongodb/src/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/templates/with-vercel-mongodb/src/app/(payload)/api/graphql-playground/route.ts b/templates/with-vercel-mongodb/src/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/templates/with-vercel-mongodb/src/app/(payload)/api/graphql-playground/route.ts +++ b/templates/with-vercel-mongodb/src/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/templates/with-vercel-mongodb/src/app/(payload)/api/graphql/route.ts b/templates/with-vercel-mongodb/src/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/templates/with-vercel-mongodb/src/app/(payload)/api/graphql/route.ts +++ b/templates/with-vercel-mongodb/src/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/templates/with-vercel-mongodb/src/app/(payload)/layout.tsx b/templates/with-vercel-mongodb/src/app/(payload)/layout.tsx index b2fefffa39b..767040c59b8 100644 --- a/templates/with-vercel-mongodb/src/app/(payload)/layout.tsx +++ b/templates/with-vercel-mongodb/src/app/(payload)/layout.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import '@payloadcms/next/css' import { RootLayout } from '@payloadcms/next/layouts' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' import './custom.scss' diff --git a/templates/with-vercel-postgres/src/app/(payload)/admin/[[...segments]]/not-found.tsx b/templates/with-vercel-postgres/src/app/(payload)/admin/[[...segments]]/not-found.tsx index d5e3c923e11..ade432a48d5 100644 --- a/templates/with-vercel-postgres/src/app/(payload)/admin/[[...segments]]/not-found.tsx +++ b/templates/with-vercel-postgres/src/app/(payload)/admin/[[...segments]]/not-found.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views' import { importMap } from '../importMap' diff --git a/templates/with-vercel-postgres/src/app/(payload)/admin/[[...segments]]/page.tsx b/templates/with-vercel-postgres/src/app/(payload)/admin/[[...segments]]/page.tsx index 4d5bbfd27a7..75241971d57 100644 --- a/templates/with-vercel-postgres/src/app/(payload)/admin/[[...segments]]/page.tsx +++ b/templates/with-vercel-postgres/src/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import { RootPage, generatePageMetadata } from '@payloadcms/next/views' import { importMap } from '../importMap' diff --git a/templates/with-vercel-postgres/src/app/(payload)/api/[...slug]/route.ts b/templates/with-vercel-postgres/src/app/(payload)/api/[...slug]/route.ts index 52caec96ad5..183cf457f62 100644 --- a/templates/with-vercel-postgres/src/app/(payload)/api/[...slug]/route.ts +++ b/templates/with-vercel-postgres/src/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/templates/with-vercel-postgres/src/app/(payload)/api/graphql-playground/route.ts b/templates/with-vercel-postgres/src/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/templates/with-vercel-postgres/src/app/(payload)/api/graphql-playground/route.ts +++ b/templates/with-vercel-postgres/src/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/templates/with-vercel-postgres/src/app/(payload)/api/graphql/route.ts b/templates/with-vercel-postgres/src/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/templates/with-vercel-postgres/src/app/(payload)/api/graphql/route.ts +++ b/templates/with-vercel-postgres/src/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/templates/with-vercel-postgres/src/app/(payload)/layout.tsx b/templates/with-vercel-postgres/src/app/(payload)/layout.tsx index b2fefffa39b..767040c59b8 100644 --- a/templates/with-vercel-postgres/src/app/(payload)/layout.tsx +++ b/templates/with-vercel-postgres/src/app/(payload)/layout.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import '@payloadcms/next/css' import { RootLayout } from '@payloadcms/next/layouts' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' import './custom.scss' diff --git a/test/admin-root/app/(payload)/[[...segments]]/not-found.tsx b/test/admin-root/app/(payload)/[[...segments]]/not-found.tsx index a3140c38ef2..1aa94de0daf 100644 --- a/test/admin-root/app/(payload)/[[...segments]]/not-found.tsx +++ b/test/admin-root/app/(payload)/[[...segments]]/not-found.tsx @@ -1,9 +1,9 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views' +import { generatePageMetadata, NotFoundPage } from '@payloadcms/next/views' import { importMap } from '../admin/importMap.js' diff --git a/test/admin-root/app/(payload)/[[...segments]]/page.tsx b/test/admin-root/app/(payload)/[[...segments]]/page.tsx index a3fc4f3c6ef..db45298219c 100644 --- a/test/admin-root/app/(payload)/[[...segments]]/page.tsx +++ b/test/admin-root/app/(payload)/[[...segments]]/page.tsx @@ -1,9 +1,9 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import { RootPage, generatePageMetadata } from '@payloadcms/next/views' +import { generatePageMetadata, RootPage } from '@payloadcms/next/views' import { importMap } from '../admin/importMap.js' diff --git a/test/admin-root/app/(payload)/api/[...slug]/route.ts b/test/admin-root/app/(payload)/api/[...slug]/route.ts index 52caec96ad5..183cf457f62 100644 --- a/test/admin-root/app/(payload)/api/[...slug]/route.ts +++ b/test/admin-root/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/test/admin-root/app/(payload)/api/graphql-playground/route.ts b/test/admin-root/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/test/admin-root/app/(payload)/api/graphql-playground/route.ts +++ b/test/admin-root/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/test/admin-root/app/(payload)/api/graphql/route.ts b/test/admin-root/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/test/admin-root/app/(payload)/api/graphql/route.ts +++ b/test/admin-root/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/test/admin-root/app/(payload)/layout.tsx b/test/admin-root/app/(payload)/layout.tsx index 9ab2fab28b0..396a5cc7569 100644 --- a/test/admin-root/app/(payload)/layout.tsx +++ b/test/admin-root/app/(payload)/layout.tsx @@ -1,8 +1,8 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import { RootLayout } from '@payloadcms/next/layouts' // import '@payloadcms/ui/styles.css' // Uncomment this line if `@payloadcms/ui` in `tsconfig.json` points to `/ui/dist` instead of `/ui/src` -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' import { importMap } from './admin/importMap.js' diff --git a/test/app/(payload)/admin/[[...segments]]/not-found.tsx b/test/app/(payload)/admin/[[...segments]]/not-found.tsx index f2492a309d5..faeff9ecfc4 100644 --- a/test/app/(payload)/admin/[[...segments]]/not-found.tsx +++ b/test/app/(payload)/admin/[[...segments]]/not-found.tsx @@ -1,9 +1,9 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views' +import { generatePageMetadata, NotFoundPage } from '@payloadcms/next/views' import { importMap } from '../importMap.js' diff --git a/test/app/(payload)/admin/[[...segments]]/page.tsx b/test/app/(payload)/admin/[[...segments]]/page.tsx index 0bfe410796e..496e4301c49 100644 --- a/test/app/(payload)/admin/[[...segments]]/page.tsx +++ b/test/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,9 +1,9 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import { RootPage, generatePageMetadata } from '@payloadcms/next/views' +import { generatePageMetadata, RootPage } from '@payloadcms/next/views' import { importMap } from '../importMap.js' diff --git a/test/app/(payload)/api/[...slug]/route.ts b/test/app/(payload)/api/[...slug]/route.ts index 52caec96ad5..183cf457f62 100644 --- a/test/app/(payload)/api/[...slug]/route.ts +++ b/test/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/test/app/(payload)/api/graphql-playground/route.ts b/test/app/(payload)/api/graphql-playground/route.ts index 7b7f279983f..3a5eb92625b 100644 --- a/test/app/(payload)/api/graphql-playground/route.ts +++ b/test/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes' diff --git a/test/app/(payload)/api/graphql/route.ts b/test/app/(payload)/api/graphql/route.ts index c2723e439fb..9c2ffc39be0 100644 --- a/test/app/(payload)/api/graphql/route.ts +++ b/test/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes' diff --git a/test/app/(payload)/layout.tsx b/test/app/(payload)/layout.tsx index 5767ca6c3c3..f8fd5cf37e4 100644 --- a/test/app/(payload)/layout.tsx +++ b/test/app/(payload)/layout.tsx @@ -1,14 +1,12 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import '@payloadcms/next/css' import { RootLayout } from '@payloadcms/next/layouts' - -import { importMap } from './admin/importMap.js' - // import '@payloadcms/ui/styles.css' // Uncomment this line if `@payloadcms/ui` in `tsconfig.json` points to `/ui/dist` instead of `/ui/src` -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' +import { importMap } from './admin/importMap.js' import './custom.scss' type Args = { diff --git a/test/live-preview/app/(payload)/admin/[[...segments]]/not-found.tsx b/test/live-preview/app/(payload)/admin/[[...segments]]/not-found.tsx index bc3736be058..10470914ed0 100644 --- a/test/live-preview/app/(payload)/admin/[[...segments]]/not-found.tsx +++ b/test/live-preview/app/(payload)/admin/[[...segments]]/not-found.tsx @@ -1,9 +1,9 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import { NotFoundPage, generatePageMetadata } from '@payloadcms/next/views/NotFound/index.js' +import { generatePageMetadata, NotFoundPage } from '@payloadcms/next/views/NotFound/index.js' import { importMap } from '../importMap.js' diff --git a/test/live-preview/app/(payload)/admin/[[...segments]]/page.tsx b/test/live-preview/app/(payload)/admin/[[...segments]]/page.tsx index 7cb7e4e141b..78d74d9d56c 100644 --- a/test/live-preview/app/(payload)/admin/[[...segments]]/page.tsx +++ b/test/live-preview/app/(payload)/admin/[[...segments]]/page.tsx @@ -1,9 +1,9 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import type { Metadata } from 'next' import config from '@payload-config' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ -import { RootPage, generatePageMetadata } from '@payloadcms/next/views/Root/index.js' +import { generatePageMetadata, RootPage } from '@payloadcms/next/views/Root/index.js' import { importMap } from '../importMap.js' diff --git a/test/live-preview/app/(payload)/api/[...slug]/route.ts b/test/live-preview/app/(payload)/api/[...slug]/route.ts index 52caec96ad5..183cf457f62 100644 --- a/test/live-preview/app/(payload)/api/[...slug]/route.ts +++ b/test/live-preview/app/(payload)/api/[...slug]/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { REST_DELETE, REST_GET, REST_OPTIONS, REST_PATCH, REST_POST } from '@payloadcms/next/routes' diff --git a/test/live-preview/app/(payload)/api/graphql-playground/route.ts b/test/live-preview/app/(payload)/api/graphql-playground/route.ts index 7832c8ba921..dffacb345f0 100644 --- a/test/live-preview/app/(payload)/api/graphql-playground/route.ts +++ b/test/live-preview/app/(payload)/api/graphql-playground/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes/index.js' diff --git a/test/live-preview/app/(payload)/api/graphql/route.ts b/test/live-preview/app/(payload)/api/graphql/route.ts index 4caee1b7cb1..25cbd7926cc 100644 --- a/test/live-preview/app/(payload)/api/graphql/route.ts +++ b/test/live-preview/app/(payload)/api/graphql/route.ts @@ -1,5 +1,5 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ -/* DO NOT MODIFY it because it could be re-written at any time. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import config from '@payload-config' import { GRAPHQL_POST } from '@payloadcms/next/routes/index.js' diff --git a/test/live-preview/app/(payload)/layout.tsx b/test/live-preview/app/(payload)/layout.tsx index ccd96200435..ffb0e029f1d 100644 --- a/test/live-preview/app/(payload)/layout.tsx +++ b/test/live-preview/app/(payload)/layout.tsx @@ -1,7 +1,7 @@ /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ +/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import configPromise from '@payload-config' import { RootLayout } from '@payloadcms/next/layouts/Root/index.js' -/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ import React from 'react' import { importMap } from './admin/importMap.js' diff --git a/test/localization/collections/Group/index.ts b/test/localization/collections/Group/index.ts index 47caceda872..d33fb5c4bb6 100644 --- a/test/localization/collections/Group/index.ts +++ b/test/localization/collections/Group/index.ts @@ -1,10 +1,26 @@ -import type { CollectionConfig } from 'payload/types' +import type { CollectionConfig } from 'payload' export const groupSlug = 'groups' export const Group: CollectionConfig = { slug: groupSlug, fields: [ + { + name: 'groupLocalizedRow', + type: 'group', + localized: true, + fields: [ + { + type: 'row', + fields: [ + { + name: 'text', + type: 'text', + }, + ], + }, + ], + }, { name: 'groupLocalized', type: 'group', @@ -16,6 +32,7 @@ export const Group: CollectionConfig = { ], localized: true, }, + { name: 'group', type: 'group', diff --git a/test/localization/int.spec.ts b/test/localization/int.spec.ts index 3c2c1cb0326..4598952664a 100644 --- a/test/localization/int.spec.ts +++ b/test/localization/int.spec.ts @@ -1452,6 +1452,42 @@ describe('Localization', () => { expect(docEs.deep.blocks[0].title).toBe('hello es') }) + it('should create/updated/read localized group with row field', async () => { + const doc = await payload.create({ + collection: 'groups', + data: { + groupLocalizedRow: { + text: 'hello world', + }, + }, + locale: 'en', + }) + + expect(doc.groupLocalizedRow.text).toBe('hello world') + + const docES = await payload.update({ + collection: 'groups', + data: { + groupLocalizedRow: { + text: 'hola world or something', + }, + }, + locale: 'es', + id: doc.id, + }) + + expect(docES.groupLocalizedRow.text).toBe('hola world or something') + + // check if docES didnt break EN + const docEN = await payload.findByID({ collection: 'groups', id: doc.id, locale: 'en' }) + expect(docEN.groupLocalizedRow.text).toBe('hello world') + + const all = await payload.findByID({ collection: 'groups', id: doc.id, locale: 'all' }) + + expect(all.groupLocalizedRow.en.text).toBe('hello world') + expect(all.groupLocalizedRow.es.text).toBe('hola world or something') + }) + it('should properly create/update/read localized tab field', async () => { const result = await payload.create({ collection: tabSlug, diff --git a/test/localization/payload-types.ts b/test/localization/payload-types.ts index ef01c5059b8..07df3c3d944 100644 --- a/test/localization/payload-types.ts +++ b/test/localization/payload-types.ts @@ -402,6 +402,9 @@ export interface Group { groupLocalized?: { title?: string | null; }; + groupLocalizedRow?: { + text?: string | null; + }; group?: { title?: string | null; };