payload 3.30.0 → 3.31.0-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/admin/forms/Label.d.ts +1 -1
  2. package/dist/admin/forms/Label.d.ts.map +1 -1
  3. package/dist/admin/forms/Label.js.map +1 -1
  4. package/dist/admin/functions/index.d.ts +1 -0
  5. package/dist/admin/functions/index.d.ts.map +1 -1
  6. package/dist/admin/functions/index.js.map +1 -1
  7. package/dist/admin/views/index.d.ts +0 -2
  8. package/dist/admin/views/index.d.ts.map +1 -1
  9. package/dist/admin/views/index.js.map +1 -1
  10. package/dist/admin/views/list.d.ts +5 -0
  11. package/dist/admin/views/list.d.ts.map +1 -1
  12. package/dist/admin/views/list.js.map +1 -1
  13. package/dist/bin/generateImportMap/utilities/getFromImportMap.d.ts.map +1 -1
  14. package/dist/bin/generateImportMap/utilities/getFromImportMap.js.map +1 -1
  15. package/dist/collections/config/types.d.ts +5 -0
  16. package/dist/collections/config/types.d.ts.map +1 -1
  17. package/dist/collections/config/types.js.map +1 -1
  18. package/dist/config/client.d.ts +1 -1
  19. package/dist/config/client.d.ts.map +1 -1
  20. package/dist/config/client.js +2 -1
  21. package/dist/config/client.js.map +1 -1
  22. package/dist/config/sanitize.d.ts.map +1 -1
  23. package/dist/config/sanitize.js +13 -10
  24. package/dist/config/sanitize.js.map +1 -1
  25. package/dist/config/types.d.ts +20 -0
  26. package/dist/config/types.d.ts.map +1 -1
  27. package/dist/config/types.js.map +1 -1
  28. package/dist/exports/shared.d.ts +4 -0
  29. package/dist/exports/shared.d.ts.map +1 -1
  30. package/dist/exports/shared.js +4 -0
  31. package/dist/exports/shared.js.map +1 -1
  32. package/dist/index.d.ts +1 -0
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js.map +1 -1
  35. package/dist/preferences/types.d.ts +2 -0
  36. package/dist/preferences/types.d.ts.map +1 -1
  37. package/dist/preferences/types.js.map +1 -1
  38. package/dist/query-presets/access.d.ts +4 -0
  39. package/dist/query-presets/access.d.ts.map +1 -0
  40. package/dist/query-presets/access.js +84 -0
  41. package/dist/query-presets/access.js.map +1 -0
  42. package/dist/query-presets/config.d.ts +5 -0
  43. package/dist/query-presets/config.d.ts.map +1 -0
  44. package/dist/query-presets/config.js +149 -0
  45. package/dist/query-presets/config.js.map +1 -0
  46. package/dist/query-presets/constraints.d.ts +4 -0
  47. package/dist/query-presets/constraints.d.ts.map +1 -0
  48. package/dist/query-presets/constraints.js +94 -0
  49. package/dist/query-presets/constraints.js.map +1 -0
  50. package/dist/query-presets/types.d.ts +29 -0
  51. package/dist/query-presets/types.d.ts.map +1 -0
  52. package/dist/query-presets/types.js +8 -0
  53. package/dist/query-presets/types.js.map +1 -0
  54. package/dist/utilities/mergeListSearchAndWhere.d.ts +12 -0
  55. package/dist/utilities/mergeListSearchAndWhere.d.ts.map +1 -0
  56. package/dist/utilities/mergeListSearchAndWhere.js +52 -0
  57. package/dist/utilities/mergeListSearchAndWhere.js.map +1 -0
  58. package/dist/utilities/transformWhereQuery.d.ts +11 -0
  59. package/dist/utilities/transformWhereQuery.d.ts.map +1 -0
  60. package/dist/utilities/transformWhereQuery.js +54 -0
  61. package/dist/utilities/transformWhereQuery.js.map +1 -0
  62. package/dist/utilities/validateWhereQuery.d.ts +11 -0
  63. package/dist/utilities/validateWhereQuery.d.ts.map +1 -0
  64. package/dist/utilities/validateWhereQuery.js +41 -0
  65. package/dist/utilities/validateWhereQuery.js.map +1 -0
  66. package/package.json +2 -2
  67. package/dist/exports/components/utilities.d.ts +0 -2
  68. package/dist/exports/components/utilities.d.ts.map +0 -1
  69. package/dist/exports/components/utilities.js +0 -2
  70. package/dist/exports/components/utilities.js.map +0 -1
  71. package/dist/fields/utilities/getFieldPaths.d.ts +0 -2
  72. package/dist/fields/utilities/getFieldPaths.d.ts.map +0 -1
  73. package/dist/fields/utilities/getFieldPaths.js +0 -2
  74. package/dist/fields/utilities/getFieldPaths.js.map +0 -1
@@ -2,7 +2,7 @@ import type { StaticLabel } from '../../config/types.js';
2
2
  import type { Field } from '../../fields/config/types.js';
3
3
  import type { ClientFieldWithOptionalType, ServerComponentProps } from './Field.js';
4
4
  export type GenericLabelProps = {
5
- readonly as?: 'label' | 'span';
5
+ readonly as?: 'h3' | 'label' | 'span';
6
6
  readonly hideLocale?: boolean;
7
7
  readonly htmlFor?: string;
8
8
  readonly label?: StaticLabel;
@@ -1 +1 @@
1
- {"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Label.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACzD,OAAO,KAAK,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAEnF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAA;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,qBAAqB,CAC/B,YAAY,SAAS,OAAO,CAAC,2BAA2B,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC,IAC9F;IACF,KAAK,CAAC,EAAE,YAAY,CAAA;CACrB,GAAG,iBAAiB,CAAA;AAErB,MAAM,MAAM,qBAAqB,CAC/B,YAAY,SAAS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EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,qBAAqB,CAC/B,YAAY,SAAS,OAAO,CAAC,2BAA2B,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC,IAC9F;IACF,KAAK,CAAC,EAAE,YAAY,CAAA;CACrB,GAAG,iBAAiB,CAAA;AAErB,MAAM,MAAM,qBAAqB,CAC/B,YAAY,SAAS,KAAK,EAC1B,YAAY,SAAS,2BAA2B,GAAG,2BAA2B,IAC5E;IACF,WAAW,EAAE,YAAY,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;CAC7B,GAAG,iBAAiB,GACnB,oBAAoB,CAAA;AAEtB,MAAM,MAAM,mBAAmB,CAAC,YAAY,SAAS,2BAA2B,IAAI,IAAI,CACtF,qBAAqB,CAAC,YAAY,CAAC,EACnC,OAAO,GAAG,UAAU,CACrB,CAAA;AAED,MAAM,MAAM,yBAAyB,CACnC,YAAY,SAAS,2BAA2B,GAAG,2BAA2B,IAC5E,KAAK,CAAC,aAAa,CAAC,qBAAqB,CAAC,YAAY,CAAC,CAAC,CAAA;AAE5D,MAAM,MAAM,yBAAyB,CACnC,YAAY,SAAS,KAAK,GAAG,KAAK,EAClC,YAAY,SAAS,2BAA2B,GAAG,2BAA2B,IAC5E,KAAK,CAAC,aAAa,CAAC,qBAAqB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/forms/Label.ts"],"sourcesContent":["import type { StaticLabel } from '../../config/types.js'\nimport type { Field } from '../../fields/config/types.js'\nimport type { ClientFieldWithOptionalType, ServerComponentProps } from './Field.js'\n\nexport type GenericLabelProps = {\n readonly as?: 'label' | 'span'\n readonly hideLocale?: boolean\n readonly htmlFor?: string\n readonly label?: StaticLabel\n readonly localized?: boolean\n readonly path?: string\n readonly required?: boolean\n readonly unstyled?: boolean\n}\n\nexport type FieldLabelClientProps<\n TFieldClient extends Partial<ClientFieldWithOptionalType> = Partial<ClientFieldWithOptionalType>,\n> = {\n field?: TFieldClient\n} & GenericLabelProps\n\nexport type FieldLabelServerProps<\n TFieldServer extends Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n clientField: TFieldClient\n readonly field: TFieldServer\n} & GenericLabelProps &\n ServerComponentProps\n\nexport type SanitizedLabelProps<TFieldClient extends ClientFieldWithOptionalType> = Omit<\n FieldLabelClientProps<TFieldClient>,\n 'label' | 'required'\n>\n\nexport type FieldLabelClientComponent<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = React.ComponentType<FieldLabelClientProps<TFieldClient>>\n\nexport type FieldLabelServerComponent<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = React.ComponentType<FieldLabelServerProps<TFieldServer, TFieldClient>>\n"],"names":[],"mappings":"AAuCA,WAG0E"}
1
+ {"version":3,"sources":["../../../src/admin/forms/Label.ts"],"sourcesContent":["import type { StaticLabel } from '../../config/types.js'\nimport type { Field } from '../../fields/config/types.js'\nimport type { ClientFieldWithOptionalType, ServerComponentProps } from './Field.js'\n\nexport type GenericLabelProps = {\n readonly as?: 'h3' | 'label' | 'span'\n readonly hideLocale?: boolean\n readonly htmlFor?: string\n readonly label?: StaticLabel\n readonly localized?: boolean\n readonly path?: string\n readonly required?: boolean\n readonly unstyled?: boolean\n}\n\nexport type FieldLabelClientProps<\n TFieldClient extends Partial<ClientFieldWithOptionalType> = Partial<ClientFieldWithOptionalType>,\n> = {\n field?: TFieldClient\n} & GenericLabelProps\n\nexport type FieldLabelServerProps<\n TFieldServer extends Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n clientField: TFieldClient\n readonly field: TFieldServer\n} & GenericLabelProps &\n ServerComponentProps\n\nexport type SanitizedLabelProps<TFieldClient extends ClientFieldWithOptionalType> = Omit<\n FieldLabelClientProps<TFieldClient>,\n 'label' | 'required'\n>\n\nexport type FieldLabelClientComponent<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = React.ComponentType<FieldLabelClientProps<TFieldClient>>\n\nexport type FieldLabelServerComponent<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = React.ComponentType<FieldLabelServerProps<TFieldServer, TFieldClient>>\n"],"names":[],"mappings":"AAuCA,WAG0E"}
@@ -30,6 +30,7 @@ export type ListQuery = {
30
30
  columns?: ColumnsFromURL;
31
31
  limit?: string;
32
32
  page?: string;
33
+ preset?: number | string;
33
34
  search?: string;
34
35
  sort?: Sort;
35
36
  where?: Where;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/admin/functions/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAA;AAEnF,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,SAAS,CAAA;IACpB,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,IAAI,EAAE,MAAM,CAAA;CACb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,"sources":["../../../src/admin/functions/index.ts"],"sourcesContent":["import type { ImportMap } from '../../bin/generateImportMap/index.js'\nimport type { SanitizedConfig } from '../../config/types.js'\nimport type { PaginatedDocs } from '../../database/types.js'\nimport type { CollectionSlug, ColumnPreference } from '../../index.js'\nimport type { PayloadRequest, Sort, Where } from '../../types/index.js'\nimport type { ColumnsFromURL } from '../../utilities/transformColumnPreferences.js'\n\nexport type DefaultServerFunctionArgs = {\n importMap: ImportMap\n req: PayloadRequest\n}\n\nexport type ServerFunctionArgs = {\n args: Record<string, unknown>\n name: string\n}\n\nexport type ServerFunctionClientArgs = {\n args: Record<string, unknown>\n name: string\n}\n\nexport type ServerFunctionClient = (args: ServerFunctionClientArgs) => Promise<unknown> | unknown\n\nexport type ServerFunction = (\n args: DefaultServerFunctionArgs & ServerFunctionClientArgs['args'],\n) => Promise<unknown> | unknown\n\nexport type ServerFunctionConfig = {\n fn: ServerFunction\n name: string\n}\n\nexport type ServerFunctionHandler = (\n args: {\n config: Promise<SanitizedConfig> | SanitizedConfig\n importMap: ImportMap\n } & ServerFunctionClientArgs,\n) => Promise<unknown>\n\nexport type ListQuery = {\n /*\n * This is an of strings, i.e. `['title', '-slug']`\n * Use `transformColumnsToPreferences` to convert it back and forth\n */\n columns?: ColumnsFromURL\n limit?: string\n page?: string\n /*\n When provided, is automatically injected into the `where` object\n */\n search?: string\n sort?: Sort\n where?: Where\n}\n\nexport type BuildTableStateArgs = {\n collectionSlug: string | string[]\n columns?: ColumnPreference[]\n docs?: PaginatedDocs['docs']\n enableRowSelections?: boolean\n parent?: {\n collectionSlug: CollectionSlug\n id: number | string\n joinPath: string\n }\n query?: ListQuery\n renderRowTypes?: boolean\n req: PayloadRequest\n tableAppearance?: 'condensed' | 'default'\n}\n"],"names":[],"mappings":"AAwDA,WAcC"}
1
+ {"version":3,"sources":["../../../src/admin/functions/index.ts"],"sourcesContent":["import type { ImportMap } from '../../bin/generateImportMap/index.js'\nimport type { SanitizedConfig } from '../../config/types.js'\nimport type { PaginatedDocs } from '../../database/types.js'\nimport type { CollectionSlug, ColumnPreference } from '../../index.js'\nimport type { PayloadRequest, Sort, Where } from '../../types/index.js'\nimport type { ColumnsFromURL } from '../../utilities/transformColumnPreferences.js'\n\nexport type DefaultServerFunctionArgs = {\n importMap: ImportMap\n req: PayloadRequest\n}\n\nexport type ServerFunctionArgs = {\n args: Record<string, unknown>\n name: string\n}\n\nexport type ServerFunctionClientArgs = {\n args: Record<string, unknown>\n name: string\n}\n\nexport type ServerFunctionClient = (args: ServerFunctionClientArgs) => Promise<unknown> | unknown\n\nexport type ServerFunction = (\n args: DefaultServerFunctionArgs & ServerFunctionClientArgs['args'],\n) => Promise<unknown> | unknown\n\nexport type ServerFunctionConfig = {\n fn: ServerFunction\n name: string\n}\n\nexport type ServerFunctionHandler = (\n args: {\n config: Promise<SanitizedConfig> | SanitizedConfig\n importMap: ImportMap\n } & ServerFunctionClientArgs,\n) => Promise<unknown>\n\nexport type ListQuery = {\n /*\n * This is an of strings, i.e. `['title', '-slug']`\n * Use `transformColumnsToPreferences` and `transformColumnsToSearchParams` to convert it back and forth\n */\n columns?: ColumnsFromURL\n limit?: string\n page?: string\n preset?: number | string\n /*\n When provided, is automatically injected into the `where` object\n */\n search?: string\n sort?: Sort\n where?: Where\n}\n\nexport type BuildTableStateArgs = {\n collectionSlug: string | string[]\n columns?: ColumnPreference[]\n docs?: PaginatedDocs['docs']\n enableRowSelections?: boolean\n parent?: {\n collectionSlug: CollectionSlug\n id: number | string\n joinPath: string\n }\n query?: ListQuery\n renderRowTypes?: boolean\n req: PayloadRequest\n tableAppearance?: 'condensed' | 'default'\n}\n"],"names":[],"mappings":"AAyDA,WAcC"}
@@ -33,8 +33,6 @@ export type AdminViewServerPropsOnly = {
33
33
  readonly importMap: ImportMap;
34
34
  readonly initialData?: Data;
35
35
  readonly initPageResult: InitPageResult;
36
- readonly redirectAfterDelete?: boolean;
37
- readonly redirectAfterDuplicate?: boolean;
38
36
  } & ServerProps;
39
37
  export type AdminViewServerProps = AdminViewClientProps & AdminViewServerPropsOnly;
40
38
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/admin/views/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAQ,MAAM,0BAA0B,CAAA;AAE9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AACrE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,KAAK,EACV,eAAe,EACf,MAAM,EACN,UAAU,EAEV,gBAAgB,EAChB,eAAe,EACf,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAC1E,OAAO,KAAK,EAAW,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAEzD,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,gBAAgB,CAAA;IAC3B,gEAAgE;IAChE,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,EAAE,YAAY,CAAA;IAC1B,mBAAmB,CAAC,EAAE,oBAAoB,CAAA;I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M,CAAC,EAAE,CAAA;CACzC,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,gBAAgB,CAAC,EAAE,yBAAyB,CAAA;IAC5C,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,eAAe,EAAE,eAAe,CAAA;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,oBAAoB,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,cAAc,CAAA;IACnB,YAAY,EAAE,wBAAwB,CAAA;IACtC,eAAe,EAAE,eAAe,CAAA;CACjC,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,WAAW,GACX,UAAU,GACV,MAAM,GACN,OAAO,GACP,QAAQ,GACR,SAAS,CAAA;AAEb,MAAM,MAAM,mBAAmB,GAAG;IAChC,gBAAgB,CAAC,EAAE,eAAe,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA;IACzD,YAAY,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAA;IACjD,WAAW,EAAE,eAAe,EAAE,CAAA;CAC/B,CAAA;AAGD,MAAM,MAAM,0BAA0B,GAAG;IACvC,cAAc,CAAC,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAA;IAClD,WAAW,EAAE,iBAAiB,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG,EAAE,GAAG,WAAW,CAAA;AAE7D,MAAM,MAAM,0BAA0B,GAAG,0BAA0B,GAAG,8BAA8B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/views/index.ts"],"sourcesContent":["import type { ClientTranslationsObject, I18n } from '@payloadcms/translations'\n\nimport type { SanitizedPermissions } from '../../auth/index.js'\nimport type { ImportMap } from '../../bin/generateImportMap/index.js'\nimport type { SanitizedCollectionConfig } from '../../collections/config/types.js'\nimport type { ClientConfig } from '../../config/client.js'\nimport type {\n CustomComponent,\n Locale,\n MetaConfig,\n Params,\n PayloadComponent,\n SanitizedConfig,\n ServerProps,\n} from '../../config/types.js'\nimport type { SanitizedGlobalConfig } from '../../globals/config/types.js'\nimport type { Payload, PayloadRequest } from '../../types/index.js'\nimport type { LanguageOptions } from '../LanguageOptions.js'\nimport type { Data, StaticDescription } from '../types.js'\nimport type { DocumentSubViewTypes } from './document.js'\n\nexport type AdminViewConfig = {\n Component: PayloadComponent\n /** Whether the path should be matched exactly or as a prefix */\n exact?: boolean\n meta?: MetaConfig\n path?: string\n sensitive?: boolean\n strict?: boolean\n}\n\nexport type AdminViewClientProps = {\n clientConfig: ClientConfig\n documentSubViewType?: DocumentSubViewTypes\n viewType: ViewTypes\n}\n\nexport type AdminViewServerPropsOnly = {\n readonly clientConfig: ClientConfig\n readonly disableActions?: boolean\n /**\n * @todo remove `docID` here as it is already contained in `initPageResult`\n */\n readonly docID?: number | string\n readonly importMap: ImportMap\n readonly initialData?: Data\n readonly initPageResult: InitPageResult\n readonly redirectAfterDelete?: boolean\n readonly redirectAfterDuplicate?: boolean\n} & ServerProps\n\nexport type AdminViewServerProps = AdminViewClientProps & AdminViewServerPropsOnly\n\n/**\n * @deprecated This should be removed in favor of direct props\n */\nexport type AdminViewComponent = PayloadComponent<AdminViewServerProps>\n\nexport type VisibleEntities = {\n collections: SanitizedCollectionConfig['slug'][]\n globals: SanitizedGlobalConfig['slug'][]\n}\n\nexport type InitPageResult = {\n collectionConfig?: SanitizedCollectionConfig\n cookies: Map<string, string>\n docID?: number | string\n globalConfig?: SanitizedGlobalConfig\n languageOptions: LanguageOptions\n locale?: Locale\n permissions: SanitizedPermissions\n redirectTo?: string\n req: PayloadRequest\n translations: ClientTranslationsObject\n visibleEntities: VisibleEntities\n}\n\n/**\n * @todo This should be renamed to `ViewType` (singular)\n */\nexport type ViewTypes =\n | 'account'\n | 'dashboard'\n | 'document'\n | 'list'\n | 'reset'\n | 'verify'\n | 'version'\n\nexport type ServerPropsFromView = {\n collectionConfig?: SanitizedConfig['collections'][number]\n globalConfig?: SanitizedConfig['globals'][number]\n viewActions: CustomComponent[]\n}\n\n// Description\nexport type ViewDescriptionClientProps = {\n collectionSlug?: SanitizedCollectionConfig['slug']\n description: StaticDescription\n}\n\nexport type ViewDescriptionServerPropsOnly = {} & ServerProps\n\nexport type ViewDescriptionServerProps = ViewDescriptionClientProps & ViewDescriptionServerPropsOnly\n"],"names":[],"mappings":"AAuGA,WAAoG"}
1
+ {"version":3,"sources":["../../../src/admin/views/index.ts"],"sourcesContent":["import type { ClientTranslationsObject, I18n } from '@payloadcms/translations'\n\nimport type { SanitizedPermissions } from '../../auth/index.js'\nimport type { ImportMap } from '../../bin/generateImportMap/index.js'\nimport type { SanitizedCollectionConfig } from '../../collections/config/types.js'\nimport type { ClientConfig } from '../../config/client.js'\nimport type {\n CustomComponent,\n Locale,\n MetaConfig,\n Params,\n PayloadComponent,\n SanitizedConfig,\n ServerProps,\n} from '../../config/types.js'\nimport type { SanitizedGlobalConfig } from '../../globals/config/types.js'\nimport type { Payload, PayloadRequest } from '../../types/index.js'\nimport type { LanguageOptions } from '../LanguageOptions.js'\nimport type { Data, StaticDescription } from '../types.js'\nimport type { DocumentSubViewTypes } from './document.js'\n\nexport type AdminViewConfig = {\n Component: PayloadComponent\n /** Whether the path should be matched exactly or as a prefix */\n exact?: boolean\n meta?: MetaConfig\n path?: string\n sensitive?: boolean\n strict?: boolean\n}\n\nexport type AdminViewClientProps = {\n clientConfig: ClientConfig\n documentSubViewType?: DocumentSubViewTypes\n viewType: ViewTypes\n}\n\nexport type AdminViewServerPropsOnly = {\n readonly clientConfig: ClientConfig\n readonly disableActions?: boolean\n /**\n * @todo remove `docID` here as it is already contained in `initPageResult`\n */\n readonly docID?: number | string\n readonly importMap: ImportMap\n readonly initialData?: Data\n readonly initPageResult: InitPageResult\n} & ServerProps\n\nexport type AdminViewServerProps = AdminViewClientProps & AdminViewServerPropsOnly\n\n/**\n * @deprecated This should be removed in favor of direct props\n */\nexport type AdminViewComponent = PayloadComponent<AdminViewServerProps>\n\nexport type VisibleEntities = {\n collections: SanitizedCollectionConfig['slug'][]\n globals: SanitizedGlobalConfig['slug'][]\n}\n\nexport type InitPageResult = {\n collectionConfig?: SanitizedCollectionConfig\n cookies: Map<string, string>\n docID?: number | string\n globalConfig?: SanitizedGlobalConfig\n languageOptions: LanguageOptions\n locale?: Locale\n permissions: SanitizedPermissions\n redirectTo?: string\n req: PayloadRequest\n translations: ClientTranslationsObject\n visibleEntities: VisibleEntities\n}\n\n/**\n * @todo This should be renamed to `ViewType` (singular)\n */\nexport type ViewTypes =\n | 'account'\n | 'dashboard'\n | 'document'\n | 'list'\n | 'reset'\n | 'verify'\n | 'version'\n\nexport type ServerPropsFromView = {\n collectionConfig?: SanitizedConfig['collections'][number]\n globalConfig?: SanitizedConfig['globals'][number]\n viewActions: CustomComponent[]\n}\n\n// Description\nexport type ViewDescriptionClientProps = {\n collectionSlug?: SanitizedCollectionConfig['slug']\n description: StaticDescription\n}\n\nexport type ViewDescriptionServerPropsOnly = {} & ServerProps\n\nexport type ViewDescriptionServerProps = ViewDescriptionClientProps & ViewDescriptionServerPropsOnly\n"],"names":[],"mappings":"AAqGA,WAAoG"}
@@ -1,6 +1,8 @@
1
+ import type { SanitizedCollectionPermission } from '../../auth/types.js';
1
2
  import type { CollectionAdminOptions, SanitizedCollectionConfig } from '../../collections/config/types.js';
2
3
  import type { ServerProps } from '../../config/types.js';
3
4
  import type { ListPreferences } from '../../preferences/types.js';
5
+ import type { QueryPreset } from '../../query-presets/types.js';
4
6
  import type { ResolvedFilterOptions } from '../../types/index.js';
5
7
  import type { Column } from '../elements/Table.js';
6
8
  import type { Data } from '../types.js';
@@ -33,6 +35,7 @@ export type ListViewClientProps = {
33
35
  columnState: Column[];
34
36
  disableBulkDelete?: boolean;
35
37
  disableBulkEdit?: boolean;
38
+ disableQueryPresets?: boolean;
36
39
  enableRowSelections?: boolean;
37
40
  hasCreatePermission: boolean;
38
41
  /**
@@ -44,6 +47,8 @@ export type ListViewClientProps = {
44
47
  * @deprecated
45
48
  */
46
49
  preferenceKey?: string;
50
+ queryPreset?: QueryPreset;
51
+ queryPresetPermissions?: SanitizedCollectionPermission;
47
52
  renderedFilters?: Map<string, React.ReactNode>;
48
53
  resolvedFilterOptions?: Map<string, ResolvedFilterOptions>;
49
54
  } & ListViewSlots;
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/admin/views/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAChC,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACjC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAA;IACjC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,gBAAgB,EA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AAEjB,MAAM,MAAM,6BAA6B,GAAG;IAC1C,cAAc,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAA;IACjD,mBAAmB,EAAE,OAAO,CAAA;IAC5B,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAGD,MAAM,MAAM,qBAAqB,GAAG,6BAA6B,CAAA;AACjE,MAAM,MAAM,yBAAyB,GAAG,EAAE,GAAG,uBAAuB,CAAA;AACpE,MAAM,MAAM,qBAAqB,GAAG,qBAAqB,GAAG,yBAAyB,CAAA;AAGrF,MAAM,MAAM,0BAA0B,GAAG,6BAA6B,CAAA;AACtE,MAAM,MAAM,8BAA8B,GAAG,EAAE,GAAG,uBAAuB,CAAA;AACzE,MAAM,MAAM,0BAA0B,GAAG,0BAA0B,GAAG,8BAA8B,CAAA;AAGpG,MAAM,MAAM,oBAAoB,GAAG,6BAA6B,CAAA;AAChE,MAAM,MAAM,wBAAwB,GAAG,EAAE,GAAG,uBAAuB,CAAA;AACnE,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,GAAG,wBAAwB,CAAA;AAGlF,MAAM,MAAM,yBAAyB,GAAG,6BAA6B,CAAA;AACrE,MAAM,MAAM,6BAA6B,GAAG,EAAE,GAAG,uBAAuB,CAAA;AACxE,MAAM,MAAM,yBAAyB,GAAG,yBAAyB,GAAG,6BAA6B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/views/list.ts"],"sourcesContent":["import type {\n CollectionAdminOptions,\n SanitizedCollectionConfig,\n} from '../../collections/config/types.js'\nimport type { ServerProps } from '../../config/types.js'\nimport type { ListPreferences } from '../../preferences/types.js'\nimport type { ResolvedFilterOptions } from '../../types/index.js'\nimport type { Column } from '../elements/Table.js'\nimport type { Data } from '../types.js'\n\nexport type ListViewSlots = {\n AfterList?: React.ReactNode\n AfterListTable?: React.ReactNode\n BeforeList?: React.ReactNode\n BeforeListTable?: React.ReactNode\n Description?: React.ReactNode\n listMenuItems?: React.ReactNode[]\n Table: React.ReactNode\n}\n\n/**\n * The `ListViewServerPropsOnly` approach is needed to ensure type strictness when injecting component props\n * There is no way to do something like `Omit<ListViewServerProps, keyof ListViewClientProps>`\n * This is because `ListViewClientProps` is a union which is impossible to exclude from\n * Exporting explicitly defined `ListViewServerPropsOnly`, etc. allows for the strictest typing\n */\nexport type ListViewServerPropsOnly = {\n collectionConfig: SanitizedCollectionConfig\n data: Data\n limit: number\n listPreferences: ListPreferences\n listSearchableFields: CollectionAdminOptions['listSearchableFields']\n} & ServerProps\n\nexport type ListViewServerProps = ListViewClientProps & ListViewServerPropsOnly\n\nexport type ListViewClientProps = {\n beforeActions?: React.ReactNode[]\n collectionSlug: SanitizedCollectionConfig['slug']\n columnState: Column[]\n disableBulkDelete?: boolean\n disableBulkEdit?: boolean\n enableRowSelections?: boolean\n hasCreatePermission: boolean\n /**\n * @deprecated\n */\n listPreferences?: ListPreferences\n newDocumentURL: string\n /**\n * @deprecated\n */\n preferenceKey?: string\n renderedFilters?: Map<string, React.ReactNode>\n resolvedFilterOptions?: Map<string, ResolvedFilterOptions>\n} & ListViewSlots\n\nexport type ListViewSlotSharedClientProps = {\n collectionSlug: SanitizedCollectionConfig['slug']\n hasCreatePermission: boolean\n newDocumentURL: string\n}\n\n// BeforeList\nexport type BeforeListClientProps = ListViewSlotSharedClientProps\nexport type BeforeListServerPropsOnly = {} & ListViewServerPropsOnly\nexport type BeforeListServerProps = BeforeListClientProps & BeforeListServerPropsOnly\n\n// BeforeListTable\nexport type BeforeListTableClientProps = ListViewSlotSharedClientProps\nexport type BeforeListTableServerPropsOnly = {} & ListViewServerPropsOnly\nexport type BeforeListTableServerProps = BeforeListTableClientProps & BeforeListTableServerPropsOnly\n\n// AfterList\nexport type AfterListClientProps = ListViewSlotSharedClientProps\nexport type AfterListServerPropsOnly = {} & ListViewServerPropsOnly\nexport type AfterListServerProps = AfterListClientProps & AfterListServerPropsOnly\n\n// AfterListTable\nexport type AfterListTableClientProps = ListViewSlotSharedClientProps\nexport type AfterListTableServerPropsOnly = {} & ListViewServerPropsOnly\nexport type AfterListTableServerProps = AfterListTableClientProps & AfterListTableServerPropsOnly\n"],"names":[],"mappings":"AAiFA,WAAiG"}
1
+ {"version":3,"sources":["../../../src/admin/views/list.ts"],"sourcesContent":["import type { SanitizedCollectionPermission } from '../../auth/types.js'\nimport type {\n CollectionAdminOptions,\n SanitizedCollectionConfig,\n} from '../../collections/config/types.js'\nimport type { ServerProps } from '../../config/types.js'\nimport type { ListPreferences } from '../../preferences/types.js'\nimport type { QueryPreset } from '../../query-presets/types.js'\nimport type { ResolvedFilterOptions } from '../../types/index.js'\nimport type { Column } from '../elements/Table.js'\nimport type { Data } from '../types.js'\n\nexport type ListViewSlots = {\n AfterList?: React.ReactNode\n AfterListTable?: React.ReactNode\n BeforeList?: React.ReactNode\n BeforeListTable?: React.ReactNode\n Description?: React.ReactNode\n listMenuItems?: React.ReactNode[]\n Table: React.ReactNode\n}\n\n/**\n * The `ListViewServerPropsOnly` approach is needed to ensure type strictness when injecting component props\n * There is no way to do something like `Omit<ListViewServerProps, keyof ListViewClientProps>`\n * This is because `ListViewClientProps` is a union which is impossible to exclude from\n * Exporting explicitly defined `ListViewServerPropsOnly`, etc. allows for the strictest typing\n */\nexport type ListViewServerPropsOnly = {\n collectionConfig: SanitizedCollectionConfig\n data: Data\n limit: number\n listPreferences: ListPreferences\n listSearchableFields: CollectionAdminOptions['listSearchableFields']\n} & ServerProps\n\nexport type ListViewServerProps = ListViewClientProps & ListViewServerPropsOnly\n\nexport type ListViewClientProps = {\n beforeActions?: React.ReactNode[]\n collectionSlug: SanitizedCollectionConfig['slug']\n columnState: Column[]\n disableBulkDelete?: boolean\n disableBulkEdit?: boolean\n disableQueryPresets?: boolean\n enableRowSelections?: boolean\n hasCreatePermission: boolean\n /**\n * @deprecated\n */\n listPreferences?: ListPreferences\n newDocumentURL: string\n /**\n * @deprecated\n */\n preferenceKey?: string\n queryPreset?: QueryPreset\n queryPresetPermissions?: SanitizedCollectionPermission\n renderedFilters?: Map<string, React.ReactNode>\n resolvedFilterOptions?: Map<string, ResolvedFilterOptions>\n} & ListViewSlots\n\nexport type ListViewSlotSharedClientProps = {\n collectionSlug: SanitizedCollectionConfig['slug']\n hasCreatePermission: boolean\n newDocumentURL: string\n}\n\n// BeforeList\nexport type BeforeListClientProps = ListViewSlotSharedClientProps\nexport type BeforeListServerPropsOnly = {} & ListViewServerPropsOnly\nexport type BeforeListServerProps = BeforeListClientProps & BeforeListServerPropsOnly\n\n// BeforeListTable\nexport type BeforeListTableClientProps = ListViewSlotSharedClientProps\nexport type BeforeListTableServerPropsOnly = {} & ListViewServerPropsOnly\nexport type BeforeListTableServerProps = BeforeListTableClientProps & BeforeListTableServerPropsOnly\n\n// AfterList\nexport type AfterListClientProps = ListViewSlotSharedClientProps\nexport type AfterListServerPropsOnly = {} & ListViewServerPropsOnly\nexport type AfterListServerProps = AfterListClientProps & AfterListServerPropsOnly\n\n// AfterListTable\nexport type AfterListTableClientProps = ListViewSlotSharedClientProps\nexport type AfterListTableServerPropsOnly = {} & ListViewServerPropsOnly\nexport type AfterListTableServerProps = AfterListTableClientProps & AfterListTableServerPropsOnly\n"],"names":[],"mappings":"AAsFA,WAAiG"}
@@ -1 +1 @@
1
- {"version":3,"file":"getFromImportMap.d.ts","sourceRoot":"","sources":["../../../../src/bin/generateImportMap/utilities/getFromImportMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAG5C,eAAO,MAAM,gBAAgB,GAAI,OAAO,QAAQ;IAC9C,SAAS,EAAE,SAAS,CAAA;IACpB,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KAAG,OAuBH,CAAA"}
1
+ {"version":3,"file":"getFromImportMap.d.ts","sourceRoot":"","sources":["../../../../src/bin/generateImportMap/utilities/getFromImportMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAI5C,eAAO,MAAM,gBAAgB,GAAI,OAAO,QAAQ;IAC9C,SAAS,EAAE,SAAS,CAAA;IACpB,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KAAG,OAuBH,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/bin/generateImportMap/utilities/getFromImportMap.ts"],"sourcesContent":["import type { PayloadComponent } from '../../../config/types.js'\nimport type { ImportMap } from '../index.js'\nimport { parsePayloadComponent } from './parsePayloadComponent.js'\n\nexport const getFromImportMap = <TOutput>(args: {\n importMap: ImportMap\n PayloadComponent: PayloadComponent\n schemaPath?: string\n silent?: boolean\n}): TOutput => {\n const { importMap, PayloadComponent, schemaPath, silent } = args\n\n const { exportName, path } = parsePayloadComponent(PayloadComponent)\n\n const key = path + '#' + exportName\n\n const importMapEntry = importMap[key]\n\n if (!importMapEntry && !silent) {\n // eslint-disable-next-line no-console\n console.error(\n `getFromImportMap: PayloadComponent not found in importMap`,\n {\n key,\n PayloadComponent,\n schemaPath,\n },\n 'You may need to run the `payload generate:importmap` command to generate the importMap ahead of runtime.',\n )\n }\n\n return importMapEntry\n}\n"],"names":["parsePayloadComponent","getFromImportMap","args","importMap","PayloadComponent","schemaPath","silent","exportName","path","key","importMapEntry","console","error"],"mappings":"AAEA,SAASA,qBAAqB,QAAQ,6BAA4B;AAElE,OAAO,MAAMC,mBAAmB,CAAUC;IAMxC,MAAM,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,UAAU,EAAEC,MAAM,EAAE,GAAGJ;IAE5D,MAAM,EAAEK,UAAU,EAAEC,IAAI,EAAE,GAAGR,sBAAsBI;IAEnD,MAAMK,MAAMD,OAAO,MAAMD;IAEzB,MAAMG,iBAAiBP,SAAS,CAACM,IAAI;IAErC,IAAI,CAACC,kBAAkB,CAACJ,QAAQ;QAC9B,sCAAsC;QACtCK,QAAQC,KAAK,CACX,CAAC,yDAAyD,CAAC,EAC3D;YACEH;YACAL;YACAC;QACF,GACA;IAEJ;IAEA,OAAOK;AACT,EAAC"}
1
+ {"version":3,"sources":["../../../../src/bin/generateImportMap/utilities/getFromImportMap.ts"],"sourcesContent":["import type { PayloadComponent } from '../../../config/types.js'\nimport type { ImportMap } from '../index.js'\n\nimport { parsePayloadComponent } from './parsePayloadComponent.js'\n\nexport const getFromImportMap = <TOutput>(args: {\n importMap: ImportMap\n PayloadComponent: PayloadComponent\n schemaPath?: string\n silent?: boolean\n}): TOutput => {\n const { importMap, PayloadComponent, schemaPath, silent } = args\n\n const { exportName, path } = parsePayloadComponent(PayloadComponent)\n\n const key = path + '#' + exportName\n\n const importMapEntry = importMap[key]\n\n if (!importMapEntry && !silent) {\n // eslint-disable-next-line no-console\n console.error(\n `getFromImportMap: PayloadComponent not found in importMap`,\n {\n key,\n PayloadComponent,\n schemaPath,\n },\n 'You may need to run the `payload generate:importmap` command to generate the importMap ahead of runtime.',\n )\n }\n\n return importMapEntry\n}\n"],"names":["parsePayloadComponent","getFromImportMap","args","importMap","PayloadComponent","schemaPath","silent","exportName","path","key","importMapEntry","console","error"],"mappings":"AAGA,SAASA,qBAAqB,QAAQ,6BAA4B;AAElE,OAAO,MAAMC,mBAAmB,CAAUC;IAMxC,MAAM,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,UAAU,EAAEC,MAAM,EAAE,GAAGJ;IAE5D,MAAM,EAAEK,UAAU,EAAEC,IAAI,EAAE,GAAGR,sBAAsBI;IAEnD,MAAMK,MAAMD,OAAO,MAAMD;IAEzB,MAAMG,iBAAiBP,SAAS,CAACM,IAAI;IAErC,IAAI,CAACC,kBAAkB,CAACJ,QAAQ;QAC9B,sCAAsC;QACtCK,QAAQC,KAAK,CACX,CAAC,yDAAyD,CAAC,EAC3D;YACEH;YACAL;YACAC;QACF,GACA;IAEJ;IAEA,OAAOK;AACT,EAAC"}
@@ -336,6 +336,11 @@ export type CollectionConfig<TSlug extends CollectionSlug = any> = {
336
336
  * When true, do not show the "Duplicate" button while editing documents within this collection and prevent `duplicate` from all APIs
337
337
  */
338
338
  disableDuplicate?: boolean;
339
+ /**
340
+ * Opt-in to enable query presets for this collection.
341
+ * @see https://payloadcms.com/docs/query-presets/overview
342
+ */
343
+ enableQueryPresets?: boolean;
339
344
  /**
340
345
  * Custom rest api endpoints, set false to disable all rest endpoints for this collection.
341
346
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/collections/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AACxF,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAC3E,OAAO,KAAK,EACV,SAAS,IAAI,gBAAgB,EAC7B,MAAM,IAAI,aAAa,EACxB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,KAAK,EACV,MAAM,EACN,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,0BAA0B,EAC1B,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KA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B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE;QACN,KAAK,EAAE,cAAc,CAAA;QACrB,aAAa,EAAE,MAAM,CAAA;QACrB,IAAI,EAAE,MAAM,CAAA;QACZ,gBAAgB,EAAE,OAAO,CAAA;KAC1B,EAAE,CAAA;IACH,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/collections/config/types.ts"],"sourcesContent":["import type { GraphQLInputObjectType, GraphQLNonNull, GraphQLObjectType } from 'graphql'\nimport type { DeepRequired, IsAny, MarkOptional } from 'ts-essentials'\n\nimport type { CustomUpload } from '../../admin/types.js'\nimport type { Arguments as MeArguments } from '../../auth/operations/me.js'\nimport type {\n Arguments as RefreshArguments,\n Result as RefreshResult,\n} from '../../auth/operations/refresh.js'\nimport type { Auth, ClientUser, IncomingAuthType } from '../../auth/types.js'\nimport type {\n Access,\n AfterErrorHookArgs,\n AfterErrorResult,\n CustomComponent,\n EditConfig,\n Endpoint,\n EntityDescription,\n EntityDescriptionComponent,\n GeneratePreviewURL,\n LabelFunction,\n LivePreviewConfig,\n MetaConfig,\n PayloadComponent,\n StaticLabel,\n} from '../../config/types.js'\nimport type { DBIdentifierName } from '../../database/types.js'\nimport type {\n Field,\n FlattenedField,\n JoinField,\n RelationshipField,\n UploadField,\n} from '../../fields/config/types.js'\nimport type {\n CollectionSlug,\n JsonObject,\n RequestContext,\n TypedAuthOperations,\n TypedCollection,\n TypedCollectionSelect,\n TypedLocale,\n} from '../../index.js'\nimport type {\n PayloadRequest,\n SelectIncludeType,\n SelectType,\n Sort,\n TransformCollectionWithSelect,\n Where,\n} from '../../types/index.js'\nimport type { SanitizedUploadConfig, UploadConfig } from '../../uploads/types.js'\nimport type {\n IncomingCollectionVersions,\n SanitizedCollectionVersions,\n} from '../../versions/types.js'\nimport type { AfterOperationArg, AfterOperationMap } from '../operations/utils.js'\n\nexport type DataFromCollectionSlug<TSlug extends CollectionSlug> = TypedCollection[TSlug]\n\nexport type SelectFromCollectionSlug<TSlug extends CollectionSlug> = TypedCollectionSelect[TSlug]\n\nexport type AuthOperationsFromCollectionSlug<TSlug extends CollectionSlug> =\n TypedAuthOperations[TSlug]\n\nexport type RequiredDataFromCollection<TData extends JsonObject> = MarkOptional<\n TData,\n 'createdAt' | 'id' | 'sizes' | 'updatedAt'\n>\n\nexport type RequiredDataFromCollectionSlug<TSlug extends CollectionSlug> =\n RequiredDataFromCollection<DataFromCollectionSlug<TSlug>>\n\nexport type HookOperationType =\n | 'autosave'\n | 'count'\n | 'countVersions'\n | 'create'\n | 'delete'\n | 'forgotPassword'\n | 'login'\n | 'read'\n | 'refresh'\n | 'update'\n\ntype CreateOrUpdateOperation = Extract<HookOperationType, 'create' | 'update'>\n\nexport type BeforeOperationHook = (args: {\n args?: any\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n /**\n * Hook operation being performed\n */\n operation: HookOperationType\n req: PayloadRequest\n}) => any\n\nexport type BeforeValidateHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n data?: Partial<T>\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n /**\n * Original document before change\n *\n * `undefined` on 'create' operation\n */\n originalDoc?: T\n req: PayloadRequest\n}) => any\n\nexport type BeforeChangeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n data: Partial<T>\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n /**\n * Original document before change\n *\n * `undefined` on 'create' operation\n */\n originalDoc?: T\n req: PayloadRequest\n}) => any\n\nexport type AfterChangeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n previousDoc: T\n req: PayloadRequest\n}) => any\n\nexport type BeforeReadHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n query: { [key: string]: any }\n req: PayloadRequest\n}) => any\n\nexport type AfterReadHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n findMany?: boolean\n query?: { [key: string]: any }\n req: PayloadRequest\n}) => any\n\nexport type BeforeDeleteHook = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n id: number | string\n req: PayloadRequest\n}) => any\n\nexport type AfterDeleteHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n id: number | string\n req: PayloadRequest\n}) => any\n\nexport type AfterOperationHook<TOperationGeneric extends CollectionSlug = string> = (\n arg: AfterOperationArg<TOperationGeneric>,\n) =>\n | Awaited<\n ReturnType<AfterOperationMap<TOperationGeneric>[keyof AfterOperationMap<TOperationGeneric>]>\n >\n | Promise<\n Awaited<\n ReturnType<AfterOperationMap<TOperationGeneric>[keyof AfterOperationMap<TOperationGeneric>]>\n >\n >\n\nexport type BeforeLoginHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n user: T\n}) => any\n\nexport type AfterLoginHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n token: string\n user: T\n}) => any\n\nexport type AfterLogoutHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n}) => any\n\nexport type AfterMeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n response: unknown\n}) => any\n\nexport type RefreshHook<T extends TypeWithID = any> = (args: {\n args: RefreshArguments\n user: T\n}) => Promise<RefreshResult | void> | (RefreshResult | void)\n\nexport type MeHook<T extends TypeWithID = any> = (args: {\n args: MeArguments\n user: T\n}) => ({ exp: number; user: T } | void) | Promise<{ exp: number; user: T } | void>\n\nexport type AfterRefreshHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n exp: number\n req: PayloadRequest\n token: string\n}) => any\n\nexport type AfterErrorHook = (\n args: { collection: SanitizedCollectionConfig } & AfterErrorHookArgs,\n) => AfterErrorResult | Promise<AfterErrorResult>\n\nexport type AfterForgotPasswordHook = (args: {\n args?: any\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n}) => any\n\nexport type BaseListFilter = (args: {\n limit: number\n locale?: TypedLocale\n page: number\n req: PayloadRequest\n sort: string\n}) => null | Promise<null | Where> | Where\n\nexport type CollectionAdminOptions = {\n baseListFilter?: BaseListFilter\n /**\n * Custom admin components\n */\n components?: {\n afterList?: CustomComponent[]\n afterListTable?: CustomComponent[]\n beforeList?: CustomComponent[]\n beforeListTable?: CustomComponent[]\n Description?: EntityDescriptionComponent\n /**\n * Components within the edit view\n */\n edit?: {\n /**\n * Replaces the \"Preview\" button\n */\n PreviewButton?: CustomComponent\n /**\n * Replaces the \"Publish\" button\n * + drafts must be enabled\n */\n PublishButton?: CustomComponent\n /**\n * Replaces the \"Save\" button\n * + drafts must be disabled\n */\n SaveButton?: CustomComponent\n /**\n * Replaces the \"Save Draft\" button\n * + drafts must be enabled\n * + autosave must be disabled\n */\n SaveDraftButton?: CustomComponent\n /**\n * Replaces the \"Upload\" section\n * + upload must be enabled\n */\n Upload?: CustomUpload\n }\n listMenuItems?: CustomComponent[]\n views?: {\n /**\n * Set to a React component to replace the entire Edit View, including all nested routes.\n * Set to an object to replace or modify individual nested routes, or to add new ones.\n */\n edit?: EditConfig\n list?: {\n actions?: CustomComponent[]\n Component?: PayloadComponent\n }\n }\n }\n /** Extension point to add your custom data. Available in server and client. */\n custom?: Record<string, any>\n /**\n * Default columns to show in list view\n */\n defaultColumns?: string[]\n /**\n * Custom description for collection. This will also be used as JSDoc for the generated types\n */\n description?: EntityDescription\n /**\n * Disable the Copy To Locale button in the edit document view\n * @default false\n */\n disableCopyToLocale?: boolean\n enableRichTextLink?: boolean\n enableRichTextRelationship?: boolean\n /**\n * Specify a navigational group for collections in the admin sidebar.\n * - Provide a string to place the entity in a custom group.\n * - Provide a record to define localized group names.\n * - Set to `false` to exclude the entity from the sidebar / dashboard without disabling its routes.\n */\n group?: false | Record<string, string> | string\n /**\n * Exclude the collection from the admin nav and routes\n */\n hidden?: ((args: { user: ClientUser }) => boolean) | boolean\n /**\n * Hide the API URL within the Edit view\n */\n hideAPIURL?: boolean\n /**\n * Additional fields to be searched via the full text search\n */\n listSearchableFields?: string[]\n /**\n * Live preview options\n */\n livePreview?: LivePreviewConfig\n meta?: MetaConfig\n pagination?: {\n defaultLimit?: number\n limits?: number[]\n }\n /**\n * Function to generate custom preview URL\n */\n preview?: GeneratePreviewURL\n /**\n * Field to use as title in Edit View and first column in List view\n */\n useAsTitle?: string\n}\n\n/** Manage all aspects of a data collection */\nexport type CollectionConfig<TSlug extends CollectionSlug = any> = {\n /**\n * Do not set this property manually. This is set to true during sanitization, to avoid\n * sanitizing the same collection multiple times.\n */\n _sanitized?: boolean\n /**\n * Access control\n */\n access?: {\n admin?: ({ req }: { req: PayloadRequest }) => boolean | Promise<boolean>\n create?: Access\n delete?: Access\n read?: Access\n readVersions?: Access\n unlock?: Access\n update?: Access\n }\n /**\n * Collection admin options\n */\n admin?: CollectionAdminOptions\n /**\n * Collection login options\n *\n * Use `true` to enable with default options\n */\n auth?: boolean | IncomingAuthType\n /** Extension point to add your custom data. Server only. */\n custom?: Record<string, any>\n /**\n * Used to override the default naming of the database table or collection with your using a function or string\n * @WARNING: If you change this property with existing data, you will need to handle the renaming of the table in your database or by using migrations\n */\n dbName?: DBIdentifierName\n defaultPopulate?: IsAny<SelectFromCollectionSlug<TSlug>> extends true\n ? SelectType\n : SelectFromCollectionSlug<TSlug>\n /**\n * Default field to sort by in collection list view\n */\n defaultSort?: Sort\n /**\n * When true, do not show the \"Duplicate\" button while editing documents within this collection and prevent `duplicate` from all APIs\n */\n disableDuplicate?: boolean\n /**\n * Custom rest api endpoints, set false to disable all rest endpoints for this collection.\n */\n endpoints?: false | Omit<Endpoint, 'root'>[]\n fields: Field[]\n /**\n * Specify which fields should be selected always, regardless of the `select` query which can be useful that the field exists for access control / hooks\n */\n forceSelect?: IsAny<SelectFromCollectionSlug<TSlug>> extends true\n ? SelectIncludeType\n : SelectFromCollectionSlug<TSlug>\n /**\n * GraphQL configuration\n */\n graphQL?:\n | {\n disableMutations?: true\n disableQueries?: true\n pluralName?: string\n singularName?: string\n }\n | false\n /**\n * Hooks to modify Payload functionality\n */\n hooks?: {\n afterChange?: AfterChangeHook[]\n afterDelete?: AfterDeleteHook[]\n afterError?: AfterErrorHook[]\n afterForgotPassword?: AfterForgotPasswordHook[]\n afterLogin?: AfterLoginHook[]\n afterLogout?: AfterLogoutHook[]\n afterMe?: AfterMeHook[]\n afterOperation?: AfterOperationHook<TSlug>[]\n afterRead?: AfterReadHook[]\n afterRefresh?: AfterRefreshHook[]\n beforeChange?: BeforeChangeHook[]\n beforeDelete?: BeforeDeleteHook[]\n beforeLogin?: BeforeLoginHook[]\n beforeOperation?: BeforeOperationHook[]\n beforeRead?: BeforeReadHook[]\n beforeValidate?: BeforeValidateHook[]\n /**\n /**\n * Use the `me` hook to control the `me` operation.\n * Here, you can optionally instruct the me operation to return early,\n * and skip its default logic.\n */\n me?: MeHook[]\n /**\n * Use the `refresh` hook to control the refresh operation.\n * Here, you can optionally instruct the refresh operation to return early,\n * and skip its default logic.\n */\n refresh?: RefreshHook[]\n }\n /**\n * Define compound indexes for this collection.\n * This can be used to either speed up querying/sorting by 2 or more fields at the same time or\n * to ensure uniqueness between several fields.\n * Specify field paths\n * @example\n * [{ unique: true, fields: ['title', 'group.name'] }]\n * @default []\n */\n indexes?: CompoundIndex[]\n /**\n * Label configuration\n */\n labels?: {\n plural?: LabelFunction | StaticLabel\n singular?: LabelFunction | StaticLabel\n }\n /**\n * Enables / Disables the ability to lock documents while editing\n * @default true\n */\n lockDocuments?:\n | {\n duration: number\n }\n | false\n slug: string\n /**\n * Add `createdAt` and `updatedAt` fields\n *\n * @default true\n */\n timestamps?: boolean\n /**\n * Options used in typescript generation\n */\n typescript?: {\n /**\n * Typescript generation name given to the interface type\n */\n interface?: string\n }\n /**\n * Customize the handling of incoming file uploads\n *\n * @default false // disable uploads\n */\n upload?: boolean | UploadConfig\n /**\n * Enable versioning. Set it to true to enable default versions settings,\n * or customize versions options by setting the property equal to an object\n * containing the version options.\n *\n * @default false // disable versioning\n */\n versions?: boolean | IncomingCollectionVersions\n}\n\nexport type SanitizedJoin = {\n /**\n * The field configuration defining the join\n */\n field: JoinField\n getForeignPath?(args: { locale?: TypedLocale }): string\n /**\n * The path of the join field in dot notation\n */\n joinPath: string\n /**\n * `parentIsLocalized` is true if any parent field of the\n * field configuration defining the join is localized\n */\n parentIsLocalized: boolean\n targetField: RelationshipField | UploadField\n}\n\nexport type SanitizedJoins = {\n [collectionSlug: string]: SanitizedJoin[]\n}\n\n/**\n * @todo remove the `DeepRequired` in v4.\n * We don't actually guarantee that all properties are set when sanitizing configs.\n */\nexport interface SanitizedCollectionConfig\n extends Omit<\n DeepRequired<CollectionConfig>,\n 'auth' | 'endpoints' | 'fields' | 'slug' | 'upload' | 'versions'\n > {\n auth: Auth\n endpoints: Endpoint[] | false\n fields: Field[]\n /**\n * Fields in the database schema structure\n * Rows / collapsible / tabs w/o name `fields` merged to top, UIs are excluded\n */\n flattenedFields: FlattenedField[]\n /**\n * Object of collections to join 'Join Fields object keyed by collection\n */\n joins: SanitizedJoins\n\n /**\n * List of all polymorphic join fields\n */\n polymorphicJoins: SanitizedJoin[]\n\n sanitizedIndexes: SanitizedCompoundIndex[]\n\n slug: CollectionSlug\n upload: SanitizedUploadConfig\n versions: SanitizedCollectionVersions\n}\n\nexport type Collection = {\n config: SanitizedCollectionConfig\n customIDType?: 'number' | 'text'\n graphQL?: {\n countType: GraphQLObjectType\n JWT: GraphQLObjectType\n mutationInputType: GraphQLNonNull<any>\n paginatedType: GraphQLObjectType\n type: GraphQLObjectType\n updateMutationInputType: GraphQLNonNull<any>\n versionType: GraphQLObjectType\n whereInputType: GraphQLInputObjectType\n }\n}\n\nexport type BulkOperationResult<TSlug extends CollectionSlug, TSelect extends SelectType> = {\n docs: TransformCollectionWithSelect<TSlug, TSelect>[]\n errors: {\n id: DataFromCollectionSlug<TSlug>['id']\n message: string\n }[]\n}\n\nexport type AuthCollection = {\n config: SanitizedCollectionConfig\n}\n\nexport type TypeWithID = {\n docId?: any\n id: number | string\n}\n\nexport type TypeWithTimestamps = {\n [key: string]: unknown\n createdAt: string\n id: number | string\n updatedAt: string\n}\n\nexport type CompoundIndex = {\n fields: string[]\n unique?: boolean\n}\n\nexport type SanitizedCompoundIndex = {\n fields: {\n field: FlattenedField\n localizedPath: string\n path: string\n pathHasLocalized: boolean\n }[]\n unique: boolean\n}\n"],"names":[],"mappings":"AA4nBA,WAQC"}
1
+ {"version":3,"sources":["../../../src/collections/config/types.ts"],"sourcesContent":["import type { GraphQLInputObjectType, GraphQLNonNull, GraphQLObjectType } from 'graphql'\nimport type { DeepRequired, IsAny, MarkOptional } from 'ts-essentials'\n\nimport type { CustomUpload } from '../../admin/types.js'\nimport type { Arguments as MeArguments } from '../../auth/operations/me.js'\nimport type {\n Arguments as RefreshArguments,\n Result as RefreshResult,\n} from '../../auth/operations/refresh.js'\nimport type { Auth, ClientUser, IncomingAuthType } from '../../auth/types.js'\nimport type {\n Access,\n AfterErrorHookArgs,\n AfterErrorResult,\n CustomComponent,\n EditConfig,\n Endpoint,\n EntityDescription,\n EntityDescriptionComponent,\n GeneratePreviewURL,\n LabelFunction,\n LivePreviewConfig,\n MetaConfig,\n PayloadComponent,\n StaticLabel,\n} from '../../config/types.js'\nimport type { DBIdentifierName } from '../../database/types.js'\nimport type {\n Field,\n FlattenedField,\n JoinField,\n RelationshipField,\n UploadField,\n} from '../../fields/config/types.js'\nimport type {\n CollectionSlug,\n JsonObject,\n RequestContext,\n TypedAuthOperations,\n TypedCollection,\n TypedCollectionSelect,\n TypedLocale,\n} from '../../index.js'\nimport type {\n PayloadRequest,\n SelectIncludeType,\n SelectType,\n Sort,\n TransformCollectionWithSelect,\n Where,\n} from '../../types/index.js'\nimport type { SanitizedUploadConfig, UploadConfig } from '../../uploads/types.js'\nimport type {\n IncomingCollectionVersions,\n SanitizedCollectionVersions,\n} from '../../versions/types.js'\nimport type { AfterOperationArg, AfterOperationMap } from '../operations/utils.js'\n\nexport type DataFromCollectionSlug<TSlug extends CollectionSlug> = TypedCollection[TSlug]\n\nexport type SelectFromCollectionSlug<TSlug extends CollectionSlug> = TypedCollectionSelect[TSlug]\n\nexport type AuthOperationsFromCollectionSlug<TSlug extends CollectionSlug> =\n TypedAuthOperations[TSlug]\n\nexport type RequiredDataFromCollection<TData extends JsonObject> = MarkOptional<\n TData,\n 'createdAt' | 'id' | 'sizes' | 'updatedAt'\n>\n\nexport type RequiredDataFromCollectionSlug<TSlug extends CollectionSlug> =\n RequiredDataFromCollection<DataFromCollectionSlug<TSlug>>\n\nexport type HookOperationType =\n | 'autosave'\n | 'count'\n | 'countVersions'\n | 'create'\n | 'delete'\n | 'forgotPassword'\n | 'login'\n | 'read'\n | 'refresh'\n | 'update'\n\ntype CreateOrUpdateOperation = Extract<HookOperationType, 'create' | 'update'>\n\nexport type BeforeOperationHook = (args: {\n args?: any\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n /**\n * Hook operation being performed\n */\n operation: HookOperationType\n req: PayloadRequest\n}) => any\n\nexport type BeforeValidateHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n data?: Partial<T>\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n /**\n * Original document before change\n *\n * `undefined` on 'create' operation\n */\n originalDoc?: T\n req: PayloadRequest\n}) => any\n\nexport type BeforeChangeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n data: Partial<T>\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n /**\n * Original document before change\n *\n * `undefined` on 'create' operation\n */\n originalDoc?: T\n req: PayloadRequest\n}) => any\n\nexport type AfterChangeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n /**\n * Hook operation being performed\n */\n operation: CreateOrUpdateOperation\n previousDoc: T\n req: PayloadRequest\n}) => any\n\nexport type BeforeReadHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n query: { [key: string]: any }\n req: PayloadRequest\n}) => any\n\nexport type AfterReadHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n findMany?: boolean\n query?: { [key: string]: any }\n req: PayloadRequest\n}) => any\n\nexport type BeforeDeleteHook = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n id: number | string\n req: PayloadRequest\n}) => any\n\nexport type AfterDeleteHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n doc: T\n id: number | string\n req: PayloadRequest\n}) => any\n\nexport type AfterOperationHook<TOperationGeneric extends CollectionSlug = string> = (\n arg: AfterOperationArg<TOperationGeneric>,\n) =>\n | Awaited<\n ReturnType<AfterOperationMap<TOperationGeneric>[keyof AfterOperationMap<TOperationGeneric>]>\n >\n | Promise<\n Awaited<\n ReturnType<AfterOperationMap<TOperationGeneric>[keyof AfterOperationMap<TOperationGeneric>]>\n >\n >\n\nexport type BeforeLoginHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n user: T\n}) => any\n\nexport type AfterLoginHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n token: string\n user: T\n}) => any\n\nexport type AfterLogoutHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n}) => any\n\nexport type AfterMeHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n req: PayloadRequest\n response: unknown\n}) => any\n\nexport type RefreshHook<T extends TypeWithID = any> = (args: {\n args: RefreshArguments\n user: T\n}) => Promise<RefreshResult | void> | (RefreshResult | void)\n\nexport type MeHook<T extends TypeWithID = any> = (args: {\n args: MeArguments\n user: T\n}) => ({ exp: number; user: T } | void) | Promise<{ exp: number; user: T } | void>\n\nexport type AfterRefreshHook<T extends TypeWithID = any> = (args: {\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n exp: number\n req: PayloadRequest\n token: string\n}) => any\n\nexport type AfterErrorHook = (\n args: { collection: SanitizedCollectionConfig } & AfterErrorHookArgs,\n) => AfterErrorResult | Promise<AfterErrorResult>\n\nexport type AfterForgotPasswordHook = (args: {\n args?: any\n /** The collection which this hook is being run on */\n collection: SanitizedCollectionConfig\n context: RequestContext\n}) => any\n\nexport type BaseListFilter = (args: {\n limit: number\n locale?: TypedLocale\n page: number\n req: PayloadRequest\n sort: string\n}) => null | Promise<null | Where> | Where\n\nexport type CollectionAdminOptions = {\n baseListFilter?: BaseListFilter\n /**\n * Custom admin components\n */\n components?: {\n afterList?: CustomComponent[]\n afterListTable?: CustomComponent[]\n beforeList?: CustomComponent[]\n beforeListTable?: CustomComponent[]\n Description?: EntityDescriptionComponent\n /**\n * Components within the edit view\n */\n edit?: {\n /**\n * Replaces the \"Preview\" button\n */\n PreviewButton?: CustomComponent\n /**\n * Replaces the \"Publish\" button\n * + drafts must be enabled\n */\n PublishButton?: CustomComponent\n /**\n * Replaces the \"Save\" button\n * + drafts must be disabled\n */\n SaveButton?: CustomComponent\n /**\n * Replaces the \"Save Draft\" button\n * + drafts must be enabled\n * + autosave must be disabled\n */\n SaveDraftButton?: CustomComponent\n /**\n * Replaces the \"Upload\" section\n * + upload must be enabled\n */\n Upload?: CustomUpload\n }\n listMenuItems?: CustomComponent[]\n views?: {\n /**\n * Set to a React component to replace the entire Edit View, including all nested routes.\n * Set to an object to replace or modify individual nested routes, or to add new ones.\n */\n edit?: EditConfig\n list?: {\n actions?: CustomComponent[]\n Component?: PayloadComponent\n }\n }\n }\n /** Extension point to add your custom data. Available in server and client. */\n custom?: Record<string, any>\n /**\n * Default columns to show in list view\n */\n defaultColumns?: string[]\n /**\n * Custom description for collection. This will also be used as JSDoc for the generated types\n */\n description?: EntityDescription\n /**\n * Disable the Copy To Locale button in the edit document view\n * @default false\n */\n disableCopyToLocale?: boolean\n enableRichTextLink?: boolean\n enableRichTextRelationship?: boolean\n /**\n * Specify a navigational group for collections in the admin sidebar.\n * - Provide a string to place the entity in a custom group.\n * - Provide a record to define localized group names.\n * - Set to `false` to exclude the entity from the sidebar / dashboard without disabling its routes.\n */\n group?: false | Record<string, string> | string\n /**\n * Exclude the collection from the admin nav and routes\n */\n hidden?: ((args: { user: ClientUser }) => boolean) | boolean\n /**\n * Hide the API URL within the Edit view\n */\n hideAPIURL?: boolean\n /**\n * Additional fields to be searched via the full text search\n */\n listSearchableFields?: string[]\n /**\n * Live preview options\n */\n livePreview?: LivePreviewConfig\n meta?: MetaConfig\n pagination?: {\n defaultLimit?: number\n limits?: number[]\n }\n /**\n * Function to generate custom preview URL\n */\n preview?: GeneratePreviewURL\n /**\n * Field to use as title in Edit View and first column in List view\n */\n useAsTitle?: string\n}\n\n/** Manage all aspects of a data collection */\nexport type CollectionConfig<TSlug extends CollectionSlug = any> = {\n /**\n * Do not set this property manually. This is set to true during sanitization, to avoid\n * sanitizing the same collection multiple times.\n */\n _sanitized?: boolean\n /**\n * Access control\n */\n access?: {\n admin?: ({ req }: { req: PayloadRequest }) => boolean | Promise<boolean>\n create?: Access\n delete?: Access\n read?: Access\n readVersions?: Access\n unlock?: Access\n update?: Access\n }\n /**\n * Collection admin options\n */\n admin?: CollectionAdminOptions\n /**\n * Collection login options\n *\n * Use `true` to enable with default options\n */\n auth?: boolean | IncomingAuthType\n /** Extension point to add your custom data. Server only. */\n custom?: Record<string, any>\n /**\n * Used to override the default naming of the database table or collection with your using a function or string\n * @WARNING: If you change this property with existing data, you will need to handle the renaming of the table in your database or by using migrations\n */\n dbName?: DBIdentifierName\n defaultPopulate?: IsAny<SelectFromCollectionSlug<TSlug>> extends true\n ? SelectType\n : SelectFromCollectionSlug<TSlug>\n /**\n * Default field to sort by in collection list view\n */\n defaultSort?: Sort\n /**\n * When true, do not show the \"Duplicate\" button while editing documents within this collection and prevent `duplicate` from all APIs\n */\n disableDuplicate?: boolean\n /**\n * Opt-in to enable query presets for this collection.\n * @see https://payloadcms.com/docs/query-presets/overview\n */\n enableQueryPresets?: boolean\n /**\n * Custom rest api endpoints, set false to disable all rest endpoints for this collection.\n */\n endpoints?: false | Omit<Endpoint, 'root'>[]\n fields: Field[]\n /**\n * Specify which fields should be selected always, regardless of the `select` query which can be useful that the field exists for access control / hooks\n */\n forceSelect?: IsAny<SelectFromCollectionSlug<TSlug>> extends true\n ? SelectIncludeType\n : SelectFromCollectionSlug<TSlug>\n /**\n * GraphQL configuration\n */\n graphQL?:\n | {\n disableMutations?: true\n disableQueries?: true\n pluralName?: string\n singularName?: string\n }\n | false\n /**\n * Hooks to modify Payload functionality\n */\n hooks?: {\n afterChange?: AfterChangeHook[]\n afterDelete?: AfterDeleteHook[]\n afterError?: AfterErrorHook[]\n afterForgotPassword?: AfterForgotPasswordHook[]\n afterLogin?: AfterLoginHook[]\n afterLogout?: AfterLogoutHook[]\n afterMe?: AfterMeHook[]\n afterOperation?: AfterOperationHook<TSlug>[]\n afterRead?: AfterReadHook[]\n afterRefresh?: AfterRefreshHook[]\n beforeChange?: BeforeChangeHook[]\n beforeDelete?: BeforeDeleteHook[]\n beforeLogin?: BeforeLoginHook[]\n beforeOperation?: BeforeOperationHook[]\n beforeRead?: BeforeReadHook[]\n beforeValidate?: BeforeValidateHook[]\n /**\n /**\n * Use the `me` hook to control the `me` operation.\n * Here, you can optionally instruct the me operation to return early,\n * and skip its default logic.\n */\n me?: MeHook[]\n /**\n * Use the `refresh` hook to control the refresh operation.\n * Here, you can optionally instruct the refresh operation to return early,\n * and skip its default logic.\n */\n refresh?: RefreshHook[]\n }\n /**\n * Define compound indexes for this collection.\n * This can be used to either speed up querying/sorting by 2 or more fields at the same time or\n * to ensure uniqueness between several fields.\n * Specify field paths\n * @example\n * [{ unique: true, fields: ['title', 'group.name'] }]\n * @default []\n */\n indexes?: CompoundIndex[]\n /**\n * Label configuration\n */\n labels?: {\n plural?: LabelFunction | StaticLabel\n singular?: LabelFunction | StaticLabel\n }\n /**\n * Enables / Disables the ability to lock documents while editing\n * @default true\n */\n lockDocuments?:\n | {\n duration: number\n }\n | false\n slug: string\n /**\n * Add `createdAt` and `updatedAt` fields\n *\n * @default true\n */\n timestamps?: boolean\n /**\n * Options used in typescript generation\n */\n typescript?: {\n /**\n * Typescript generation name given to the interface type\n */\n interface?: string\n }\n /**\n * Customize the handling of incoming file uploads\n *\n * @default false // disable uploads\n */\n upload?: boolean | UploadConfig\n /**\n * Enable versioning. Set it to true to enable default versions settings,\n * or customize versions options by setting the property equal to an object\n * containing the version options.\n *\n * @default false // disable versioning\n */\n versions?: boolean | IncomingCollectionVersions\n}\n\nexport type SanitizedJoin = {\n /**\n * The field configuration defining the join\n */\n field: JoinField\n getForeignPath?(args: { locale?: TypedLocale }): string\n /**\n * The path of the join field in dot notation\n */\n joinPath: string\n /**\n * `parentIsLocalized` is true if any parent field of the\n * field configuration defining the join is localized\n */\n parentIsLocalized: boolean\n targetField: RelationshipField | UploadField\n}\n\nexport type SanitizedJoins = {\n [collectionSlug: string]: SanitizedJoin[]\n}\n\n/**\n * @todo remove the `DeepRequired` in v4.\n * We don't actually guarantee that all properties are set when sanitizing configs.\n */\nexport interface SanitizedCollectionConfig\n extends Omit<\n DeepRequired<CollectionConfig>,\n 'auth' | 'endpoints' | 'fields' | 'slug' | 'upload' | 'versions'\n > {\n auth: Auth\n endpoints: Endpoint[] | false\n fields: Field[]\n /**\n * Fields in the database schema structure\n * Rows / collapsible / tabs w/o name `fields` merged to top, UIs are excluded\n */\n flattenedFields: FlattenedField[]\n /**\n * Object of collections to join 'Join Fields object keyed by collection\n */\n joins: SanitizedJoins\n\n /**\n * List of all polymorphic join fields\n */\n polymorphicJoins: SanitizedJoin[]\n\n sanitizedIndexes: SanitizedCompoundIndex[]\n\n slug: CollectionSlug\n upload: SanitizedUploadConfig\n versions: SanitizedCollectionVersions\n}\n\nexport type Collection = {\n config: SanitizedCollectionConfig\n customIDType?: 'number' | 'text'\n graphQL?: {\n countType: GraphQLObjectType\n JWT: GraphQLObjectType\n mutationInputType: GraphQLNonNull<any>\n paginatedType: GraphQLObjectType\n type: GraphQLObjectType\n updateMutationInputType: GraphQLNonNull<any>\n versionType: GraphQLObjectType\n whereInputType: GraphQLInputObjectType\n }\n}\n\nexport type BulkOperationResult<TSlug extends CollectionSlug, TSelect extends SelectType> = {\n docs: TransformCollectionWithSelect<TSlug, TSelect>[]\n errors: {\n id: DataFromCollectionSlug<TSlug>['id']\n message: string\n }[]\n}\n\nexport type AuthCollection = {\n config: SanitizedCollectionConfig\n}\n\nexport type TypeWithID = {\n docId?: any\n id: number | string\n}\n\nexport type TypeWithTimestamps = {\n [key: string]: unknown\n createdAt: string\n id: number | string\n updatedAt: string\n}\n\nexport type CompoundIndex = {\n fields: string[]\n unique?: boolean\n}\n\nexport type SanitizedCompoundIndex = {\n fields: {\n field: FlattenedField\n localizedPath: string\n path: string\n pathHasLocalized: boolean\n }[]\n unique: boolean\n}\n"],"names":[],"mappings":"AAioBA,WAQC"}
@@ -5,7 +5,7 @@ import type { BlockSlug } from '../index.js';
5
5
  import type { LivePreviewConfig, SanitizedConfig, ServerOnlyLivePreviewProperties } from './types.js';
6
6
  import { type ClientCollectionConfig } from '../collections/config/client.js';
7
7
  import { type ClientGlobalConfig } from '../globals/config/client.js';
8
- export type ServerOnlyRootProperties = keyof Pick<SanitizedConfig, 'bin' | 'cors' | 'csrf' | 'custom' | 'db' | 'editor' | 'email' | 'endpoints' | 'graphQL' | 'hooks' | 'i18n' | 'jobs' | 'logger' | 'onInit' | 'plugins' | 'secret' | 'sharp' | 'typescript'>;
8
+ export type ServerOnlyRootProperties = keyof Pick<SanitizedConfig, 'bin' | 'cors' | 'csrf' | 'custom' | 'db' | 'editor' | 'email' | 'endpoints' | 'graphQL' | 'hooks' | 'i18n' | 'jobs' | 'logger' | 'onInit' | 'plugins' | 'queryPresets' | 'secret' | 'sharp' | 'typescript'>;
9
9
  export type ServerOnlyRootAdminProperties = keyof Pick<SanitizedConfig['admin'], 'components'>;
10
10
  export type UnsanitizedClientConfig = {
11
11
  admin: {
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/config/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;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AAC,CAAA;IACjF,MAAM,EAAE,WAAW,EAAE,CAAA;IACrB,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA;IACzC,WAAW,EAAE,sBAAsB,EAAE,CAAA;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,OAAO,EAAE,kBAAkB,EAAE,CAAA;CAC9B,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,wBAAwB,CAAC,CAAA;AAElG,eAAO,MAAM,+BAA+B,EAAE,SAAS,OAAO,CAAC,6BAA6B,CAAC,EAAO,CAAA;AAEpG,eAAO,MAAM,0BAA0B,EAAE,SAAS,OAAO,CAAC,wBAAwB,CAAC,EAqBlF,CAAA;AAED,eAAO,MAAM,kBAAkB,iCAI5B;IACD,MAAM,EAAE,eAAe,CAAA;IACvB,IAAI,EAAE,UAAU,CAAA;IAChB,SAAS,EAAE,SAAS,CAAA;CACrB,KAAG,YAoGH,CAAA"}
@@ -21,7 +21,8 @@ export const serverOnlyConfigProperties = [
21
21
  'custom',
22
22
  'graphQL',
23
23
  'jobs',
24
- 'logger'
24
+ 'logger',
25
+ 'queryPresets'
25
26
  ];
26
27
  export const createClientConfig = ({ config, i18n, importMap })=>{
27
28
  const clientConfig = {};
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/config/client.ts"],"sourcesContent":["// @ts-strict-ignore\nimport type { I18nClient } from '@payloadcms/translations'\nimport type { DeepPartial } from 'ts-essentials'\n\nimport type { ImportMap } from '../bin/generateImportMap/index.js'\nimport type { ClientBlock } from '../fields/config/types.js'\nimport type { BlockSlug } from '../index.js'\nimport type {\n LivePreviewConfig,\n SanitizedConfig,\n ServerOnlyLivePreviewProperties,\n} from './types.js'\n\nimport {\n type ClientCollectionConfig,\n createClientCollectionConfigs,\n} from '../collections/config/client.js'\nimport { createClientBlocks } from '../fields/config/client.js'\nimport { type ClientGlobalConfig, createClientGlobalConfigs } from '../globals/config/client.js'\nexport type ServerOnlyRootProperties = keyof Pick<\n SanitizedConfig,\n | 'bin'\n | 'cors'\n | 'csrf'\n | 'custom'\n | 'db'\n | 'editor'\n | 'email'\n | 'endpoints'\n | 'graphQL'\n | 'hooks'\n | 'i18n'\n | 'jobs'\n | 'logger'\n | 'onInit'\n | 'plugins'\n | 'secret'\n | 'sharp'\n | 'typescript'\n>\n\nexport type ServerOnlyRootAdminProperties = keyof Pick<SanitizedConfig['admin'], 'components'>\n\nexport type UnsanitizedClientConfig = {\n admin: {\n livePreview?: Omit<LivePreviewConfig, ServerOnlyLivePreviewProperties>\n } & Omit<SanitizedConfig['admin'], 'components' | 'dependencies' | 'livePreview'>\n blocks: ClientBlock[]\n collections: ClientCollectionConfig[]\n custom?: Record<string, any>\n globals: ClientGlobalConfig[]\n} & Omit<SanitizedConfig, 'admin' | 'collections' | 'globals' | 'i18n' | ServerOnlyRootProperties>\n\nexport type ClientConfig = {\n admin: {\n livePreview?: Omit<LivePreviewConfig, ServerOnlyLivePreviewProperties>\n } & Omit<SanitizedConfig['admin'], 'components' | 'dependencies' | 'livePreview'>\n blocks: ClientBlock[]\n blocksMap: Record<BlockSlug, ClientBlock>\n collections: ClientCollectionConfig[]\n custom?: Record<string, any>\n globals: ClientGlobalConfig[]\n} & Omit<SanitizedConfig, 'admin' | 'collections' | 'globals' | 'i18n' | ServerOnlyRootProperties>\n\nexport const serverOnlyAdminConfigProperties: readonly Partial<ServerOnlyRootAdminProperties>[] = []\n\nexport const serverOnlyConfigProperties: readonly Partial<ServerOnlyRootProperties>[] = [\n 'endpoints',\n 'db',\n 'editor',\n 'plugins',\n 'sharp',\n 'onInit',\n 'secret',\n 'hooks',\n 'bin',\n 'i18n',\n 'typescript',\n 'cors',\n 'csrf',\n 'email',\n 'custom',\n 'graphQL',\n 'jobs',\n 'logger',\n // `admin`, `onInit`, `localization`, `collections`, and `globals` are all handled separately\n]\n\nexport const createClientConfig = ({\n config,\n i18n,\n importMap,\n}: {\n config: SanitizedConfig\n i18n: I18nClient\n importMap: ImportMap\n}): ClientConfig => {\n const clientConfig = {} as DeepPartial<ClientConfig>\n\n for (const key in config) {\n if (serverOnlyConfigProperties.includes(key as any)) {\n continue\n }\n switch (key) {\n case 'admin':\n clientConfig.admin = {\n autoLogin: config.admin.autoLogin,\n avatar: config.admin.avatar,\n custom: config.admin.custom,\n dateFormat: config.admin.dateFormat,\n importMap: config.admin.importMap,\n meta: config.admin.meta,\n routes: config.admin.routes,\n theme: config.admin.theme,\n timezones: config.admin.timezones,\n user: config.admin.user,\n }\n if (config.admin.livePreview) {\n clientConfig.admin.livePreview = {}\n\n if (config.admin.livePreview.breakpoints) {\n clientConfig.admin.livePreview.breakpoints = config.admin.livePreview.breakpoints\n }\n }\n break\n case 'blocks': {\n ;(clientConfig.blocks as ClientBlock[]) = createClientBlocks({\n blocks: config.blocks,\n defaultIDType: config.db.defaultIDType,\n i18n,\n importMap,\n }).filter((block) => typeof block !== 'string') as ClientBlock[]\n\n break\n }\n case 'collections':\n ;(clientConfig.collections as ClientCollectionConfig[]) = createClientCollectionConfigs({\n collections: config.collections,\n defaultIDType: config.db.defaultIDType,\n i18n,\n importMap,\n })\n break\n case 'globals':\n ;(clientConfig.globals as ClientGlobalConfig[]) = createClientGlobalConfigs({\n defaultIDType: config.db.defaultIDType,\n globals: config.globals,\n i18n,\n importMap,\n })\n break\n\n case 'localization':\n if (typeof config.localization === 'object' && config.localization) {\n clientConfig.localization = {}\n if (config.localization.defaultLocale) {\n clientConfig.localization.defaultLocale = config.localization.defaultLocale\n }\n if (config.localization.defaultLocalePublishOption) {\n clientConfig.localization.defaultLocalePublishOption =\n config.localization.defaultLocalePublishOption\n }\n if (config.localization.fallback) {\n clientConfig.localization.fallback = config.localization.fallback\n }\n if (config.localization.localeCodes) {\n clientConfig.localization.localeCodes = config.localization.localeCodes\n }\n if (config.localization.locales) {\n clientConfig.localization.locales = []\n for (const locale of config.localization.locales) {\n if (locale) {\n const clientLocale: Partial<(typeof config.localization.locales)[0]> = {}\n if (locale.code) {\n clientLocale.code = locale.code\n }\n if (locale.fallbackLocale) {\n clientLocale.fallbackLocale = locale.fallbackLocale\n }\n if (locale.label) {\n clientLocale.label = locale.label\n }\n if (locale.rtl) {\n clientLocale.rtl = locale.rtl\n }\n clientConfig.localization.locales.push(clientLocale)\n }\n }\n }\n }\n break\n default:\n clientConfig[key] = config[key]\n }\n }\n return clientConfig as ClientConfig\n}\n"],"names":["createClientCollectionConfigs","createClientBlocks","createClientGlobalConfigs","serverOnlyAdminConfigProperties","serverOnlyConfigProperties","createClientConfig","config","i18n","importMap","clientConfig","key","includes","admin","autoLogin","avatar","custom","dateFormat","meta","routes","theme","timezones","user","livePreview","breakpoints","blocks","defaultIDType","db","filter","block","collections","globals","localization","defaultLocale","defaultLocalePublishOption","fallback","localeCodes","locales","locale","clientLocale","code","fallbackLocale","label","rtl","push"],"mappings":"AAAA,oBAAoB;AAapB,SAEEA,6BAA6B,QACxB,kCAAiC;AACxC,SAASC,kBAAkB,QAAQ,6BAA4B;AAC/D,SAAkCC,yBAAyB,QAAQ,8BAA6B;AA8ChG,OAAO,MAAMC,kCAAqF,EAAE,CAAA;AAEpG,OAAO,MAAMC,6BAA2E;IACtF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CAED,CAAA;AAED,OAAO,MAAMC,qBAAqB,CAAC,EACjCC,MAAM,EACNC,IAAI,EACJC,SAAS,EAKV;IACC,MAAMC,eAAe,CAAC;IAEtB,IAAK,MAAMC,OAAOJ,OAAQ;QACxB,IAAIF,2BAA2BO,QAAQ,CAACD,MAAa;YACnD;QACF;QACA,OAAQA;YACN,KAAK;gBACHD,aAAaG,KAAK,GAAG;oBACnBC,WAAWP,OAAOM,KAAK,CAACC,SAAS;oBACjCC,QAAQR,OAAOM,KAAK,CAACE,MAAM;oBAC3BC,QAAQT,OAAO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../src/config/client.ts"],"sourcesContent":["// @ts-strict-ignore\nimport type { I18nClient } from '@payloadcms/translations'\nimport type { DeepPartial } from 'ts-essentials'\n\nimport type { ImportMap } from '../bin/generateImportMap/index.js'\nimport type { ClientBlock } from '../fields/config/types.js'\nimport type { BlockSlug } from '../index.js'\nimport type {\n LivePreviewConfig,\n SanitizedConfig,\n ServerOnlyLivePreviewProperties,\n} from './types.js'\n\nimport {\n type ClientCollectionConfig,\n createClientCollectionConfigs,\n} from '../collections/config/client.js'\nimport { createClientBlocks } from '../fields/config/client.js'\nimport { type ClientGlobalConfig, createClientGlobalConfigs } from '../globals/config/client.js'\n\nexport type ServerOnlyRootProperties = keyof Pick<\n SanitizedConfig,\n | 'bin'\n | 'cors'\n | 'csrf'\n | 'custom'\n | 'db'\n | 'editor'\n | 'email'\n | 'endpoints'\n | 'graphQL'\n | 'hooks'\n | 'i18n'\n | 'jobs'\n | 'logger'\n | 'onInit'\n | 'plugins'\n | 'queryPresets'\n | 'secret'\n | 'sharp'\n | 'typescript'\n>\n\nexport type ServerOnlyRootAdminProperties = keyof Pick<SanitizedConfig['admin'], 'components'>\n\nexport type UnsanitizedClientConfig = {\n admin: {\n livePreview?: Omit<LivePreviewConfig, ServerOnlyLivePreviewProperties>\n } & Omit<SanitizedConfig['admin'], 'components' | 'dependencies' | 'livePreview'>\n blocks: ClientBlock[]\n collections: ClientCollectionConfig[]\n custom?: Record<string, any>\n globals: ClientGlobalConfig[]\n} & Omit<SanitizedConfig, 'admin' | 'collections' | 'globals' | 'i18n' | ServerOnlyRootProperties>\n\nexport type ClientConfig = {\n admin: {\n livePreview?: Omit<LivePreviewConfig, ServerOnlyLivePreviewProperties>\n } & Omit<SanitizedConfig['admin'], 'components' | 'dependencies' | 'livePreview'>\n blocks: ClientBlock[]\n blocksMap: Record<BlockSlug, ClientBlock>\n collections: ClientCollectionConfig[]\n custom?: Record<string, any>\n globals: ClientGlobalConfig[]\n} & Omit<SanitizedConfig, 'admin' | 'collections' | 'globals' | 'i18n' | ServerOnlyRootProperties>\n\nexport const serverOnlyAdminConfigProperties: readonly Partial<ServerOnlyRootAdminProperties>[] = []\n\nexport const serverOnlyConfigProperties: readonly Partial<ServerOnlyRootProperties>[] = [\n 'endpoints',\n 'db',\n 'editor',\n 'plugins',\n 'sharp',\n 'onInit',\n 'secret',\n 'hooks',\n 'bin',\n 'i18n',\n 'typescript',\n 'cors',\n 'csrf',\n 'email',\n 'custom',\n 'graphQL',\n 'jobs',\n 'logger',\n 'queryPresets',\n // `admin`, `onInit`, `localization`, `collections`, and `globals` are all handled separately\n]\n\nexport const createClientConfig = ({\n config,\n i18n,\n importMap,\n}: {\n config: SanitizedConfig\n i18n: I18nClient\n importMap: ImportMap\n}): ClientConfig => {\n const clientConfig = {} as DeepPartial<ClientConfig>\n\n for (const key in config) {\n if (serverOnlyConfigProperties.includes(key as any)) {\n continue\n }\n switch (key) {\n case 'admin':\n clientConfig.admin = {\n autoLogin: config.admin.autoLogin,\n avatar: config.admin.avatar,\n custom: config.admin.custom,\n dateFormat: config.admin.dateFormat,\n importMap: config.admin.importMap,\n meta: config.admin.meta,\n routes: config.admin.routes,\n theme: config.admin.theme,\n timezones: config.admin.timezones,\n user: config.admin.user,\n }\n if (config.admin.livePreview) {\n clientConfig.admin.livePreview = {}\n\n if (config.admin.livePreview.breakpoints) {\n clientConfig.admin.livePreview.breakpoints = config.admin.livePreview.breakpoints\n }\n }\n break\n case 'blocks': {\n ;(clientConfig.blocks as ClientBlock[]) = createClientBlocks({\n blocks: config.blocks,\n defaultIDType: config.db.defaultIDType,\n i18n,\n importMap,\n }).filter((block) => typeof block !== 'string') as ClientBlock[]\n\n break\n }\n case 'collections':\n ;(clientConfig.collections as ClientCollectionConfig[]) = createClientCollectionConfigs({\n collections: config.collections,\n defaultIDType: config.db.defaultIDType,\n i18n,\n importMap,\n })\n break\n case 'globals':\n ;(clientConfig.globals as ClientGlobalConfig[]) = createClientGlobalConfigs({\n defaultIDType: config.db.defaultIDType,\n globals: config.globals,\n i18n,\n importMap,\n })\n break\n\n case 'localization':\n if (typeof config.localization === 'object' && config.localization) {\n clientConfig.localization = {}\n if (config.localization.defaultLocale) {\n clientConfig.localization.defaultLocale = config.localization.defaultLocale\n }\n if (config.localization.defaultLocalePublishOption) {\n clientConfig.localization.defaultLocalePublishOption =\n config.localization.defaultLocalePublishOption\n }\n if (config.localization.fallback) {\n clientConfig.localization.fallback = config.localization.fallback\n }\n if (config.localization.localeCodes) {\n clientConfig.localization.localeCodes = config.localization.localeCodes\n }\n if (config.localization.locales) {\n clientConfig.localization.locales = []\n for (const locale of config.localization.locales) {\n if (locale) {\n const clientLocale: Partial<(typeof config.localization.locales)[0]> = {}\n if (locale.code) {\n clientLocale.code = locale.code\n }\n if (locale.fallbackLocale) {\n clientLocale.fallbackLocale = locale.fallbackLocale\n }\n if (locale.label) {\n clientLocale.label = locale.label\n }\n if (locale.rtl) {\n clientLocale.rtl = locale.rtl\n }\n clientConfig.localization.locales.push(clientLocale)\n }\n }\n }\n }\n break\n default:\n clientConfig[key] = config[key]\n }\n }\n return clientConfig as ClientConfig\n}\n"],"names":["createClientCollectionConfigs","createClientBlocks","createClientGlobalConfigs","serverOnlyAdminConfigProperties","serverOnlyConfigProperties","createClientConfig","config","i18n","importMap","clientConfig","key","includes","admin","autoLogin","avatar","custom","dateFormat","meta","routes","theme","timezones","user","livePreview","breakpoints","blocks","defaultIDType","db","filter","block","collections","globals","localization","defaultLocale","defaultLocalePublishOption","fallback","localeCodes","locales","locale","clientLocale","code","fallbackLocale","label","rtl","push"],"mappings":"AAAA,oBAAoB;AAapB,SAEEA,6BAA6B,QACxB,kCAAiC;AACxC,SAASC,kBAAkB,QAAQ,6BAA4B;AAC/D,SAAkCC,yBAAyB,QAAQ,8BAA6B;AAgDhG,OAAO,MAAMC,kCAAqF,EAAE,CAAA;AAEpG,OAAO,MAAMC,6BAA2E;IACtF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAC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OAAOG,cAAc;gCACrD;gCACA,IAAIH,OAAOI,KAAK,EAAE;oCAChBH,aAAaG,KAAK,GAAGJ,OAAOI,KAAK;gCACnC;gCACA,IAAIJ,OAAOK,GAAG,EAAE;oCACdJ,aAAaI,GAAG,GAAGL,OAAOK,GAAG;gCAC/B;gCACAjC,aAAasB,YAAY,CAACK,OAAO,CAACO,IAAI,CAACL;4BACzC;wBACF;oBACF;gBACF;gBACA;YACF;gBACE7B,YAAY,CAACC,IAAI,GAAGJ,MAAM,CAACI,IAAI;QACnC;IACF;IACA,OAAOD;AACT,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../src/config/sanitize.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,MAAM,EAGN,eAAe,EAEhB,MAAM,YAAY,CAAA;AA4FnB,eAAO,MAAM,cAAc,mBAA0B,MAAM,KAAG,OAAO,CAAC,eAAe,CA4RpF,CAAA"}
1
+ {"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../src/config/sanitize.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,MAAM,EAGN,eAAe,EAEhB,MAAM,YAAY,CAAA;AA6FnB,eAAO,MAAM,cAAc,mBAA0B,MAAM,KAAG,OAAO,CAAC,eAAe,CA8SpF,CAAA"}
@@ -11,6 +11,7 @@ import { sanitizeGlobal } from '../globals/config/sanitize.js';
11
11
  import { baseBlockFields, formatLabels, sanitizeFields } from '../index.js';
12
12
  import { getLockedDocumentsCollection, lockedDocumentsCollectionSlug } from '../locked-documents/config.js';
13
13
  import { getPreferencesCollection, preferencesCollectionSlug } from '../preferences/config.js';
14
+ import { getQueryPresetsConfig, queryPresetsCollectionSlug } from '../query-presets/config.js';
14
15
  import { getDefaultJobsCollection, jobsCollectionSlug } from '../queues/config/index.js';
15
16
  import { flattenBlock } from '../utilities/flattenAllFields.js';
16
17
  import { getSchedulePublishTask } from '../versions/schedule/job.js';
@@ -119,6 +120,7 @@ export const sanitizeConfig = async (incomingConfig)=>{
119
120
  config.i18n = i18nConfig;
120
121
  const richTextSanitizationPromises = [];
121
122
  const schedulePublishCollections = [];
123
+ const queryPresetsCollections = [];
122
124
  const schedulePublishGlobals = [];
123
125
  const collectionSlugs = new Set();
124
126
  const validRelationships = [
@@ -163,6 +165,12 @@ export const sanitizeConfig = async (incomingConfig)=>{
163
165
  if (typeof draftsConfig === 'object' && draftsConfig.schedulePublish) {
164
166
  schedulePublishCollections.push(config.collections[i].slug);
165
167
  }
168
+ if (config.collections[i].enableQueryPresets) {
169
+ queryPresetsCollections.push(config.collections[i].slug);
170
+ if (!validRelationships.includes(queryPresetsCollectionSlug)) {
171
+ validRelationships.push(queryPresetsCollectionSlug);
172
+ }
173
+ }
166
174
  config.collections[i] = await sanitizeCollection(config, config.collections[i], richTextSanitizationPromises, validRelationships);
167
175
  }
168
176
  if (config.globals.length > 0) {
@@ -208,16 +216,11 @@ export const sanitizeConfig = async (incomingConfig)=>{
208
216
  configWithDefaults.collections.push(sanitizedJobsCollection);
209
217
  }
210
218
  }
211
- const lockedDocumentsCollection = getLockedDocumentsCollection(config);
212
- if (lockedDocumentsCollection) {
213
- configWithDefaults.collections.push(await sanitizeCollection(config, getLockedDocumentsCollection(config), richTextSanitizationPromises, validRelationships));
214
- }
215
- const preferencesCollection = getPreferencesCollection(config);
216
- if (preferencesCollection) {
217
- configWithDefaults.collections.push(await sanitizeCollection(config, getPreferencesCollection(config), richTextSanitizationPromises, validRelationships));
218
- }
219
- if (migrationsCollection) {
220
- configWithDefaults.collections.push(await sanitizeCollection(config, migrationsCollection, richTextSanitizationPromises, validRelationships));
219
+ configWithDefaults.collections.push(await sanitizeCollection(config, getLockedDocumentsCollection(config), richTextSanitizationPromises, validRelationships));
220
+ configWithDefaults.collections.push(await sanitizeCollection(config, getPreferencesCollection(config), richTextSanitizationPromises, validRelationships));
221
+ configWithDefaults.collections.push(await sanitizeCollection(config, migrationsCollection, richTextSanitizationPromises, validRelationships));
222
+ if (queryPresetsCollections.length > 0) {
223
+ configWithDefaults.collections.push(await sanitizeCollection(config, getQueryPresetsConfig(config), richTextSanitizationPromises, validRelationships));
221
224
  }
222
225
  if (config.serverURL !== '') {
223
226
  config.csrf.push(config.serverURL);