payload 3.0.0-beta.133 → 3.0.0-beta.135

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 (72) hide show
  1. package/dist/admin/forms/Description.d.ts +5 -2
  2. package/dist/admin/forms/Description.d.ts.map +1 -1
  3. package/dist/admin/forms/Description.js.map +1 -1
  4. package/dist/admin/forms/Field.d.ts +7 -1
  5. package/dist/admin/forms/Field.d.ts.map +1 -1
  6. package/dist/admin/forms/Field.js.map +1 -1
  7. package/dist/admin/forms/Form.d.ts +5 -0
  8. package/dist/admin/forms/Form.d.ts.map +1 -1
  9. package/dist/admin/forms/Form.js.map +1 -1
  10. package/dist/admin/views/types.d.ts +4 -10
  11. package/dist/admin/views/types.d.ts.map +1 -1
  12. package/dist/admin/views/types.js.map +1 -1
  13. package/dist/auth/types.d.ts +9 -0
  14. package/dist/auth/types.d.ts.map +1 -1
  15. package/dist/auth/types.js.map +1 -1
  16. package/dist/bin/generateImportMap/getFromImportMap.d.ts +9 -0
  17. package/dist/bin/generateImportMap/getFromImportMap.d.ts.map +1 -0
  18. package/dist/bin/generateImportMap/getFromImportMap.js +18 -0
  19. package/dist/bin/generateImportMap/getFromImportMap.js.map +1 -0
  20. package/dist/bin/generateImportMap/iterateConfig.d.ts.map +1 -1
  21. package/dist/bin/generateImportMap/iterateConfig.js +1 -1
  22. package/dist/bin/generateImportMap/iterateConfig.js.map +1 -1
  23. package/dist/bin/generateImportMap/iterateFields.d.ts.map +1 -1
  24. package/dist/bin/generateImportMap/iterateFields.js +20 -1
  25. package/dist/bin/generateImportMap/iterateFields.js.map +1 -1
  26. package/dist/bin/generateImportMap/parsePayloadComponent.d.ts.map +1 -1
  27. package/dist/bin/generateImportMap/parsePayloadComponent.js.map +1 -1
  28. package/dist/collections/config/client.d.ts +5 -2
  29. package/dist/collections/config/client.d.ts.map +1 -1
  30. package/dist/collections/config/client.js +6 -4
  31. package/dist/collections/config/client.js.map +1 -1
  32. package/dist/config/client.d.ts +3 -1
  33. package/dist/config/client.d.ts.map +1 -1
  34. package/dist/config/client.js +5 -3
  35. package/dist/config/client.js.map +1 -1
  36. package/dist/config/types.d.ts +2 -2
  37. package/dist/config/types.js.map +1 -1
  38. package/dist/exports/shared.d.ts +1 -0
  39. package/dist/exports/shared.d.ts.map +1 -1
  40. package/dist/exports/shared.js +1 -0
  41. package/dist/exports/shared.js.map +1 -1
  42. package/dist/fields/config/client.d.ts +5 -2
  43. package/dist/fields/config/client.d.ts.map +1 -1
  44. package/dist/fields/config/client.js +23 -28
  45. package/dist/fields/config/client.js.map +1 -1
  46. package/dist/fields/config/types.d.ts +79 -15
  47. package/dist/fields/config/types.d.ts.map +1 -1
  48. package/dist/fields/config/types.js.map +1 -1
  49. package/dist/fields/hooks/beforeValidate/promise.d.ts.map +1 -1
  50. package/dist/fields/hooks/beforeValidate/promise.js +12 -0
  51. package/dist/fields/hooks/beforeValidate/promise.js.map +1 -1
  52. package/dist/globals/config/client.d.ts +5 -2
  53. package/dist/globals/config/client.d.ts.map +1 -1
  54. package/dist/globals/config/client.js +6 -4
  55. package/dist/globals/config/client.js.map +1 -1
  56. package/dist/index.d.ts +7 -6
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +85 -1
  59. package/dist/index.js.map +1 -1
  60. package/dist/queues/config/generateJobsJSONSchemas.js +5 -2
  61. package/dist/queues/config/generateJobsJSONSchemas.js.map +1 -1
  62. package/dist/utilities/configToJSONSchema.d.ts.map +1 -1
  63. package/dist/utilities/configToJSONSchema.js +4 -2
  64. package/dist/utilities/configToJSONSchema.js.map +1 -1
  65. package/dist/utilities/deepCopyObject.d.ts.map +1 -1
  66. package/dist/utilities/deepCopyObject.js +8 -0
  67. package/dist/utilities/deepCopyObject.js.map +1 -1
  68. package/dist/utilities/sanitizePermissions.js +1 -1
  69. package/dist/utilities/sanitizePermissions.js.map +1 -1
  70. package/dist/utilities/sanitizePermissions.spec.js +134 -1
  71. package/dist/utilities/sanitizePermissions.spec.js.map +1 -1
  72. package/package.json +4 -2
@@ -1,7 +1,10 @@
1
- import type { LabelFunction, ServerProps } from '../../config/types.js';
1
+ import type { TFunction } from '@payloadcms/translations';
2
+ import type { ServerProps } from '../../config/types.js';
2
3
  import type { Field } from '../../fields/config/types.js';
3
4
  import type { ClientFieldWithOptionalType } from './Field.js';
4
- export type DescriptionFunction = LabelFunction;
5
+ export type DescriptionFunction = ({ t }: {
6
+ t: TFunction;
7
+ }) => string;
5
8
  export type FieldDescriptionClientComponent<TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType> = React.ComponentType<FieldDescriptionClientProps<TFieldClient>>;
6
9
  export type FieldDescriptionServerComponent<TFieldServer extends Field = Field, TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType> = React.ComponentType<FieldDescriptionServerProps<TFieldServer, TFieldClient>>;
7
10
  export type StaticDescription = Record<string, string> | string;
@@ -1 +1 @@
1
- {"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Description.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACvE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACzD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAA;AAE7D,MAAM,MAAM,mBAAmB,GAAG,aAAa,CAAA;AAE/C,MAAM,MAAM,+BAA+B,CACzC,YAAY,SAAS,2BAA2B,GAAG,2BAA2B,IAC5E,KAAK,CAAC,aAAa,CAAC,2BAA2B,CAAC,YAAY,CAAC,CAAC,CAAA;AAElE,MAAM,MAAM,+BAA+B,CACzC,YAAY,SAAS,KAAK,GAAG,KAAK,EAClC,YAAY,SAAS,2BAA2B,GAAG,2BAA2B,IAC5E,KAAK,CAAC,aAAa,CAAC,2BAA2B,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAA;AAEhF,MAAM,MAAM,iBAA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,2BAA2B,IAC5E,KAAK,CAAC,aAAa,CAAC,2BAA2B,CAAC,YAAY,CAAC,CAAC,CAAA;AAElE,MAAM,MAAM,+BAA+B,CACzC,YAAY,SAAS,KAAK,GAAG,KAAK,EAClC,YAAY,SAAS,2BAA2B,GAAG,2BAA2B,IAC5E,KAAK,CAAC,aAAa,CAAC,2BAA2B,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAA;AAEhF,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAA;AAE/D,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG,iBAAiB,CAAA;AAEjE,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,iBAAiB,CAAA;IACxC,QAAQ,CAAC,eAAe,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAA;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,2BAA2B,CACrC,YAAY,SAAS,KAAK,GAAG,KAAK,EAClC,YAAY,SAAS,2BAA2B,GAAG,2BAA2B,IAC5E;IACF,WAAW,EAAE,YAAY,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;CAC7B,GAAG,uBAAuB,GACzB,OAAO,CAAC,WAAW,CAAC,CAAA;AAEtB,MAAM,MAAM,2BAA2B,CACrC,YAAY,SAAS,2BAA2B,GAAG,2BAA2B,IAC5E;IACF,KAAK,EAAE,YAAY,CAAA;CACpB,GAAG,uBAAuB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/forms/Description.ts"],"sourcesContent":["import type { LabelFunction, ServerProps } from '../../config/types.js'\nimport type { Field } from '../../fields/config/types.js'\nimport type { ClientFieldWithOptionalType } from './Field.js'\n\nexport type DescriptionFunction = LabelFunction\n\nexport type FieldDescriptionClientComponent<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = React.ComponentType<FieldDescriptionClientProps<TFieldClient>>\n\nexport type FieldDescriptionServerComponent<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = React.ComponentType<FieldDescriptionServerProps<TFieldServer, TFieldClient>>\n\nexport type StaticDescription = Record<string, string> | string\n\nexport type Description = DescriptionFunction | StaticDescription\n\nexport type GenericDescriptionProps = {\n readonly className?: string\n readonly description?: StaticDescription\n readonly marginPlacement?: 'bottom' | 'top'\n readonly path: string\n}\n\nexport type FieldDescriptionServerProps<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n clientField: TFieldClient\n readonly field: TFieldServer\n} & GenericDescriptionProps &\n Partial<ServerProps>\n\nexport type FieldDescriptionClientProps<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n field: TFieldClient\n} & GenericDescriptionProps\n"],"names":[],"mappings":"AAmCA,WAI2B"}
1
+ {"version":3,"sources":["../../../src/admin/forms/Description.ts"],"sourcesContent":["import type { TFunction } from '@payloadcms/translations'\n\nimport type { ServerProps } from '../../config/types.js'\nimport type { Field } from '../../fields/config/types.js'\nimport type { ClientFieldWithOptionalType } from './Field.js'\n\nexport type DescriptionFunction = ({ t }: { t: TFunction }) => string\n\nexport type FieldDescriptionClientComponent<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = React.ComponentType<FieldDescriptionClientProps<TFieldClient>>\n\nexport type FieldDescriptionServerComponent<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = React.ComponentType<FieldDescriptionServerProps<TFieldServer, TFieldClient>>\n\nexport type StaticDescription = Record<string, string> | string\n\nexport type Description = DescriptionFunction | StaticDescription\n\nexport type GenericDescriptionProps = {\n readonly className?: string\n readonly description?: StaticDescription\n readonly marginPlacement?: 'bottom' | 'top'\n readonly path: string\n}\n\nexport type FieldDescriptionServerProps<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n clientField: TFieldClient\n readonly field: TFieldServer\n} & GenericDescriptionProps &\n Partial<ServerProps>\n\nexport type FieldDescriptionClientProps<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n field: TFieldClient\n} & GenericDescriptionProps\n"],"names":[],"mappings":"AAqCA,WAI2B"}
@@ -2,7 +2,8 @@ import type { I18nClient } from '@payloadcms/translations';
2
2
  import type { MarkOptional } from 'ts-essentials';
3
3
  import type { SanitizedFieldPermissions, User } from '../../auth/types.js';
4
4
  import type { ClientBlock, ClientField, Field } from '../../fields/config/types.js';
5
- import type { Payload } from '../../types/index.js';
5
+ import type { DocumentPreferences } from '../../preferences/types.js';
6
+ import type { Operation, Payload, PayloadRequest } from '../../types/index.js';
6
7
  import type { ClientTab, Data, FieldSchemaMap, FormField, FormState, RenderedField } from '../types.js';
7
8
  export type ClientFieldWithOptionalType = MarkOptional<ClientField, 'type'>;
8
9
  export type ClientComponentProps = {
@@ -53,6 +54,7 @@ export type FieldPaths = {
53
54
  };
54
55
  export type ServerComponentProps = {
55
56
  clientField: ClientFieldWithOptionalType;
57
+ collectionSlug: string;
56
58
  data: Data;
57
59
  field: Field;
58
60
  /**
@@ -65,8 +67,12 @@ export type ServerComponentProps = {
65
67
  */
66
68
  formState: FormState;
67
69
  i18n: I18nClient;
70
+ id?: number | string;
71
+ operation: Operation;
68
72
  payload: Payload;
69
73
  permissions: SanitizedFieldPermissions;
74
+ preferences: DocumentPreferences;
75
+ req: PayloadRequest;
70
76
  siblingData: Data;
71
77
  user: User;
72
78
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Field.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,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,eAAe,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC,CAAA;AAExE,MAAM,MAAM,oBAAoB,CAC9B,YAAY,SAAS,KAAK,GAAG,KAAK,EAClC,YAAY,SAAS,2BAA2B,GAAG,2BAA2B,EAC9E,eAAe,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IACvE,KAAK,CAAC,aAAa,CAAC,eAAe,GAAG,eAAe,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/forms/Field.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type { MarkOptional } from 'ts-essentials'\n\nimport type { SanitizedFieldPermissions, User } from '../../auth/types.js'\nimport type { ClientBlock, ClientField, Field } from '../../fields/config/types.js'\nimport type { Payload } from '../../types/index.js'\nimport type {\n ClientTab,\n Data,\n FieldSchemaMap,\n FormField,\n FormState,\n RenderedField,\n} from '../types.js'\n\nexport type ClientFieldWithOptionalType = MarkOptional<ClientField, 'type'>\n\nexport type ClientComponentProps = {\n customComponents: FormField['customComponents']\n field: ClientBlock | ClientField | ClientTab\n forceRender?: boolean\n readOnly?: boolean\n renderedBlocks?: RenderedField[]\n /**\n * Used to extract field configs from a schemaMap.\n * Does not include indexes.\n *\n * @default field.name\n **/\n schemaPath?: string\n}\n\n// TODO: maybe we can come up with a better name?\nexport type FieldPaths = {\n /**\n * @default ''\n */\n indexPath?: string\n /**\n * @default ''\n */\n parentPath?: string\n /**\n * The path built up to the point of the field\n * excluding the field name.\n *\n * @default ''\n */\n parentSchemaPath?: string\n /**\n * A built up path to access FieldState in the form state.\n * Nested fields will have a path that includes the parent field names\n * if they are nested within a group, array, block or named tab.\n *\n * Collapsibles and unnamed tabs will have arbitrary paths\n * that look like _index-0, _index-1, etc.\n *\n * Row fields will not have a path.\n *\n * @example 'parentGroupField.childTextField'\n *\n * @default field.name\n */\n path: string\n}\n\nexport type ServerComponentProps = {\n clientField: ClientFieldWithOptionalType\n data: Data\n field: Field\n /**\n * The fieldSchemaMap that is created before form state is built is made available here.\n */\n fieldSchemaMap: FieldSchemaMap\n /**\n * Server Components will also have available to the entire form state.\n * We cannot add it to ClientComponentProps as that would blow up the size of the props sent to the client.\n */\n formState: FormState\n i18n: I18nClient\n payload: Payload\n permissions: SanitizedFieldPermissions\n siblingData: Data\n user: User\n}\n\nexport type ClientFieldBase<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n readonly field: TFieldClient\n} & Omit<ClientComponentProps, 'customComponents' | 'field'>\n\nexport type ServerFieldBase<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n readonly clientField: TFieldClient\n readonly field: TFieldServer\n} & Omit<ClientComponentProps, 'field'> &\n Omit<ServerComponentProps, 'clientField' | 'field'>\n\nexport type FieldClientComponent<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n AdditionalProps extends Record<string, unknown> = Record<string, unknown>,\n> = React.ComponentType<AdditionalProps & ClientFieldBase<TFieldClient>>\n\nexport type FieldServerComponent<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n AdditionalProps extends Record<string, unknown> = Record<string, unknown>,\n> = React.ComponentType<AdditionalProps & ServerFieldBase<TFieldServer, TFieldClient>>\n"],"names":[],"mappings":"AA0GA,WAIsF"}
1
+ {"version":3,"sources":["../../../src/admin/forms/Field.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type { MarkOptional } from 'ts-essentials'\n\nimport type { SanitizedFieldPermissions, User } from '../../auth/types.js'\nimport type { ClientBlock, ClientField, Field } from '../../fields/config/types.js'\nimport type { DocumentPreferences } from '../../preferences/types.js'\nimport type { Operation, Payload, PayloadRequest } from '../../types/index.js'\nimport type {\n ClientTab,\n Data,\n FieldSchemaMap,\n FormField,\n FormState,\n RenderedField,\n} from '../types.js'\n\nexport type ClientFieldWithOptionalType = MarkOptional<ClientField, 'type'>\n\nexport type ClientComponentProps = {\n customComponents: FormField['customComponents']\n field: ClientBlock | ClientField | ClientTab\n forceRender?: boolean\n readOnly?: boolean\n renderedBlocks?: RenderedField[]\n /**\n * Used to extract field configs from a schemaMap.\n * Does not include indexes.\n *\n * @default field.name\n **/\n schemaPath?: string\n}\n\n// TODO: maybe we can come up with a better name?\nexport type FieldPaths = {\n /**\n * @default ''\n */\n indexPath?: string\n /**\n * @default ''\n */\n parentPath?: string\n /**\n * The path built up to the point of the field\n * excluding the field name.\n *\n * @default ''\n */\n parentSchemaPath?: string\n /**\n * A built up path to access FieldState in the form state.\n * Nested fields will have a path that includes the parent field names\n * if they are nested within a group, array, block or named tab.\n *\n * Collapsibles and unnamed tabs will have arbitrary paths\n * that look like _index-0, _index-1, etc.\n *\n * Row fields will not have a path.\n *\n * @example 'parentGroupField.childTextField'\n *\n * @default field.name\n */\n path: string\n}\n\nexport type ServerComponentProps = {\n clientField: ClientFieldWithOptionalType\n collectionSlug: string\n data: Data\n field: Field\n /**\n * The fieldSchemaMap that is created before form state is built is made available here.\n */\n fieldSchemaMap: FieldSchemaMap\n /**\n * Server Components will also have available to the entire form state.\n * We cannot add it to ClientComponentProps as that would blow up the size of the props sent to the client.\n */\n formState: FormState\n i18n: I18nClient\n id?: number | string\n operation: Operation\n payload: Payload\n permissions: SanitizedFieldPermissions\n preferences: DocumentPreferences\n req: PayloadRequest\n siblingData: Data\n user: User\n}\n\nexport type ClientFieldBase<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n readonly field: TFieldClient\n} & Omit<ClientComponentProps, 'customComponents' | 'field'>\n\nexport type ServerFieldBase<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n readonly clientField: TFieldClient\n readonly field: TFieldServer\n} & Omit<ClientComponentProps, 'field'> &\n Omit<ServerComponentProps, 'clientField' | 'field'>\n\nexport type FieldClientComponent<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n AdditionalProps extends Record<string, unknown> = Record<string, unknown>,\n> = React.ComponentType<AdditionalProps & ClientFieldBase<TFieldClient>>\n\nexport type FieldServerComponent<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n AdditionalProps extends Record<string, unknown> = Record<string, unknown>,\n> = React.ComponentType<AdditionalProps & ServerFieldBase<TFieldServer, TFieldClient>>\n"],"names":[],"mappings":"AAgHA,WAIsF"}
@@ -17,6 +17,11 @@ export type FilterOptionsResult = {
17
17
  };
18
18
  export type FieldState = {
19
19
  customComponents?: {
20
+ /**
21
+ * This is used by UI fields, as they can have arbitrary components defined if used
22
+ * as a vessel to bring in custom components.
23
+ */
24
+ [key: string]: React.ReactNode | React.ReactNode[] | undefined;
20
25
  AfterInput?: React.ReactNode;
21
26
  BeforeInput?: React.ReactNode;
22
27
  Description?: React.ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAElE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAA;AACvE,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEjE,MAAM,MAAM,IAAI,GAAG;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,GA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,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;CACnB,CACJ,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/forms/Form.ts"],"sourcesContent":["import { type SupportedLanguages } from '@payloadcms/translations'\n\nimport type { SanitizedDocumentPermissions } from '../../auth/types.js'\nimport type { Field, Validate } from '../../fields/config/types.js'\nimport type { TypedLocale } from '../../index.js'\nimport type { DocumentPreferences } from '../../preferences/types.js'\nimport type { PayloadRequest, Where } from '../../types/index.js'\n\nexport type Data = {\n [key: string]: any\n}\n\nexport type Row = {\n blockType?: string\n collapsed?: boolean\n id: string\n}\n\nexport type FilterOptionsResult = {\n [relation: string]: boolean | Where\n}\n\nexport type FieldState = {\n customComponents?: {\n AfterInput?: React.ReactNode\n BeforeInput?: React.ReactNode\n Description?: React.ReactNode\n Error?: React.ReactNode\n Field?: React.ReactNode\n Label?: React.ReactNode\n RowLabels?: React.ReactNode[]\n }\n disableFormData?: boolean\n errorMessage?: string\n errorPaths?: string[]\n /**\n * The fieldSchema may be part of the form state if `includeSchema: true` is passed to buildFormState.\n * This will never be in the form state of the client.\n */\n fieldSchema?: Field\n filterOptions?: FilterOptionsResult\n initialValue: unknown\n isSidebar?: boolean\n passesCondition?: boolean\n requiresRender?: boolean\n rows?: Row[]\n valid: boolean\n validate?: Validate\n value: unknown\n}\n\nexport type FieldStateWithoutComponents = Omit<FieldState, 'customComponents'>\n\nexport type FormState = {\n [path: string]: FieldState\n}\n\nexport type FormStateWithoutComponents = {\n [path: string]: FieldStateWithoutComponents\n}\n\nexport type BuildFormStateArgs = {\n data?: Data\n docPermissions: SanitizedDocumentPermissions | undefined\n docPreferences: DocumentPreferences\n fallbackLocale?: false | TypedLocale\n formState?: FormState\n id?: number | string\n /*\n If not i18n was passed, the language can be passed to init i18n\n */\n language?: keyof SupportedLanguages\n locale?: string\n operation?: 'create' | 'update'\n /*\n If true, will render field components within their state object\n */\n renderAllFields?: boolean\n req: PayloadRequest\n returnLockStatus?: boolean\n schemaPath: string\n updateLastEdited?: boolean\n} & (\n | {\n collectionSlug: string\n // Do not type it as never. This still makes it so that either collectionSlug or globalSlug is required, but makes it easier to provide both collectionSlug and globalSlug if it's\n // unclear which one is actually available.\n globalSlug?: string\n }\n | {\n collectionSlug?: string\n globalSlug: string\n }\n)\n"],"names":[],"mappings":"AA6DA,WAgCC"}
1
+ {"version":3,"sources":["../../../src/admin/forms/Form.ts"],"sourcesContent":["import { type SupportedLanguages } from '@payloadcms/translations'\n\nimport type { SanitizedDocumentPermissions } from '../../auth/types.js'\nimport type { Field, Validate } from '../../fields/config/types.js'\nimport type { TypedLocale } from '../../index.js'\nimport type { DocumentPreferences } from '../../preferences/types.js'\nimport type { PayloadRequest, Where } from '../../types/index.js'\n\nexport type Data = {\n [key: string]: any\n}\n\nexport type Row = {\n blockType?: string\n collapsed?: boolean\n id: string\n}\n\nexport type FilterOptionsResult = {\n [relation: string]: boolean | Where\n}\n\nexport type FieldState = {\n customComponents?: {\n /**\n * This is used by UI fields, as they can have arbitrary components defined if used\n * as a vessel to bring in custom components.\n */\n [key: string]: React.ReactNode | React.ReactNode[] | undefined\n AfterInput?: React.ReactNode\n BeforeInput?: React.ReactNode\n Description?: React.ReactNode\n Error?: React.ReactNode\n Field?: React.ReactNode\n Label?: React.ReactNode\n RowLabels?: React.ReactNode[]\n }\n disableFormData?: boolean\n errorMessage?: string\n errorPaths?: string[]\n /**\n * The fieldSchema may be part of the form state if `includeSchema: true` is passed to buildFormState.\n * This will never be in the form state of the client.\n */\n fieldSchema?: Field\n filterOptions?: FilterOptionsResult\n initialValue: unknown\n isSidebar?: boolean\n passesCondition?: boolean\n requiresRender?: boolean\n rows?: Row[]\n valid: boolean\n validate?: Validate\n value: unknown\n}\n\nexport type FieldStateWithoutComponents = Omit<FieldState, 'customComponents'>\n\nexport type FormState = {\n [path: string]: FieldState\n}\n\nexport type FormStateWithoutComponents = {\n [path: string]: FieldStateWithoutComponents\n}\n\nexport type BuildFormStateArgs = {\n data?: Data\n docPermissions: SanitizedDocumentPermissions | undefined\n docPreferences: DocumentPreferences\n fallbackLocale?: false | TypedLocale\n formState?: FormState\n id?: number | string\n /*\n If not i18n was passed, the language can be passed to init i18n\n */\n language?: keyof SupportedLanguages\n locale?: string\n operation?: 'create' | 'update'\n /*\n If true, will render field components within their state object\n */\n renderAllFields?: boolean\n req: PayloadRequest\n returnLockStatus?: boolean\n schemaPath: string\n updateLastEdited?: boolean\n} & (\n | {\n collectionSlug: string\n // Do not type it as never. This still makes it so that either collectionSlug or globalSlug is required, but makes it easier to provide both collectionSlug and globalSlug if it's\n // unclear which one is actually available.\n globalSlug?: string\n }\n | {\n collectionSlug?: string\n globalSlug: string\n }\n)\n"],"names":[],"mappings":"AAkEA,WAgCC"}
@@ -3,11 +3,11 @@ import type { SanitizedPermissions } from '../../auth/index.js';
3
3
  import type { ImportMap } from '../../bin/generateImportMap/index.js';
4
4
  import type { SanitizedCollectionConfig } from '../../collections/config/types.js';
5
5
  import type { ClientConfig } from '../../config/client.js';
6
- import type { Locale, MetaConfig, PayloadComponent } from '../../config/types.js';
6
+ import type { Locale, MetaConfig, PayloadComponent, ServerProps } from '../../config/types.js';
7
7
  import type { SanitizedGlobalConfig } from '../../globals/config/types.js';
8
8
  import type { PayloadRequest } from '../../types/index.js';
9
9
  import type { LanguageOptions } from '../LanguageOptions.js';
10
- import type { Data, DocumentSlots, PayloadServerAction } from '../types.js';
10
+ import type { Data, DocumentSlots } from '../types.js';
11
11
  export type AdminViewConfig = {
12
12
  Component: AdminViewComponent;
13
13
  /** Whether the path should be matched exactly or as a prefix */
@@ -56,15 +56,9 @@ export type InitPageResult = {
56
56
  visibleEntities: VisibleEntities;
57
57
  };
58
58
  export type ServerSideEditViewProps = {
59
+ readonly doc: Data;
59
60
  readonly initPageResult: InitPageResult;
60
- readonly params: {
61
- [key: string]: string | string[] | undefined;
62
- };
63
- readonly payloadServerAction: PayloadServerAction;
64
61
  readonly routeSegments: string[];
65
- readonly searchParams: {
66
- [key: string]: string | string[] | undefined;
67
- };
68
- } & ClientSideEditViewProps;
62
+ } & ClientSideEditViewProps & ServerProps;
69
63
  export type ClientSideEditViewProps = {} & DocumentSlots;
70
64
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/admin/views/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;AAExE,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,EAAE,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACjF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAE3E,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,kBAAkB,CAAA;IAC7B,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,cAAc,GAAG;IAC3B,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAA;IACnC,QA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,EAAE,MAAM,CAAA;IAChC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,yBAAyB,CAAC,MAAM,CAAC,EAAE,CAAA;IAChD,OAAO,EAAE,qBAAqB,CAAC,MAAM,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,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAA;IAClB,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAA;IACvC,QAAQ,CAAC,aAAa,EAAE,MAAM,EAAE,CAAA;CACjC,GAAG,uBAAuB,GACzB,WAAW,CAAA;AAEb,MAAM,MAAM,uBAAuB,GAAG,EAAE,GAAG,aAAa,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/views/types.ts"],"sourcesContent":["import type { ClientTranslationsObject } 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 { Locale, MetaConfig, PayloadComponent } from '../../config/types.js'\nimport type { SanitizedGlobalConfig } from '../../globals/config/types.js'\nimport type { PayloadRequest } from '../../types/index.js'\nimport type { LanguageOptions } from '../LanguageOptions.js'\nimport type { Data, DocumentSlots, PayloadServerAction } from '../types.js'\n\nexport type AdminViewConfig = {\n Component: AdminViewComponent\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 AdminViewProps = {\n readonly clientConfig: ClientConfig\n readonly disableActions?: boolean\n readonly drawerSlug?: string\n readonly importMap: ImportMap\n readonly initialData?: Data\n readonly initPageResult: InitPageResult\n readonly params?: { [key: string]: string | string[] | undefined }\n readonly redirectAfterDelete?: boolean\n readonly redirectAfterDuplicate?: boolean\n readonly searchParams: { [key: string]: string | string[] | undefined }\n}\n\nexport type AdminViewComponent = PayloadComponent<AdminViewProps>\n\nexport type EditViewProps = {\n readonly collectionSlug?: string\n readonly globalSlug?: string\n}\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\nexport type ServerSideEditViewProps = {\n readonly initPageResult: InitPageResult\n readonly params: { [key: string]: string | string[] | undefined }\n readonly payloadServerAction: PayloadServerAction\n readonly routeSegments: string[]\n readonly searchParams: { [key: string]: string | string[] | undefined }\n} & ClientSideEditViewProps\n\nexport type ClientSideEditViewProps = {} & DocumentSlots\n"],"names":[],"mappings":"AAqEA,WAAwD"}
1
+ {"version":3,"sources":["../../../src/admin/views/types.ts"],"sourcesContent":["import type { ClientTranslationsObject } 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 { Locale, MetaConfig, PayloadComponent, ServerProps } from '../../config/types.js'\nimport type { SanitizedGlobalConfig } from '../../globals/config/types.js'\nimport type { PayloadRequest } from '../../types/index.js'\nimport type { LanguageOptions } from '../LanguageOptions.js'\nimport type { Data, DocumentSlots, PayloadServerAction } from '../types.js'\n\nexport type AdminViewConfig = {\n Component: AdminViewComponent\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 AdminViewProps = {\n readonly clientConfig: ClientConfig\n readonly disableActions?: boolean\n readonly drawerSlug?: string\n readonly importMap: ImportMap\n readonly initialData?: Data\n readonly initPageResult: InitPageResult\n readonly params?: { [key: string]: string | string[] | undefined }\n readonly redirectAfterDelete?: boolean\n readonly redirectAfterDuplicate?: boolean\n readonly searchParams: { [key: string]: string | string[] | undefined }\n}\n\nexport type AdminViewComponent = PayloadComponent<AdminViewProps>\n\nexport type EditViewProps = {\n readonly collectionSlug?: string\n readonly globalSlug?: string\n}\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\nexport type ServerSideEditViewProps = {\n readonly doc: Data\n readonly initPageResult: InitPageResult\n readonly routeSegments: string[]\n} & ClientSideEditViewProps &\n ServerProps\n\nexport type ClientSideEditViewProps = {} & DocumentSlots\n"],"names":[],"mappings":"AAoEA,WAAwD"}
@@ -11,9 +11,18 @@ export type Permission = {
11
11
  export type FieldPermissions = {
12
12
  blocks?: {
13
13
  [blockSlug: string]: {
14
+ create: {
15
+ permission: boolean;
16
+ };
14
17
  fields: {
15
18
  [fieldName: string]: FieldPermissions;
16
19
  };
20
+ read: {
21
+ permission: boolean;
22
+ };
23
+ update: {
24
+ permission: boolean;
25
+ };
17
26
  };
18
27
  };
19
28
  create: {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/auth/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAE9D;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,UAAU,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,CAAC,EAAE;QACP,CAAC,SAAS,EAAE,MAAM,GAAG;YACnB,MAAM,EAAE;gBACN,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAAA;aACtC,CAAA;SACF,CAAA;KACF,CAAA;IACD,MAAM,EAAE;QACN,UAAU,EAAE,OAAO,CAAA;KACpB,CAAA;IACD,MAAM,CAAC,EAAE;QACP,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAAA;KACtC,CAAA;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,OAAO,CAAA;KACpB,CAAA;IACD,MAAM,EAAE;QACN,UAAU,EAAE,OAAO,CAAA;KACpB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,yBAAyB,GACjC;IACE,MAAM,CAAC,EAAE;QACP,CAAC,SAAS,EAAE,MAAM,GAAG;YACnB,MAAM,EAAE;gBACN,CAAC,SAAS,EAAE,MAA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,EAAE,OAAO,CAAA;IACnB;;;OAGG;IACH,MAAM,CAAC,EACH;QACE,iBAAiB,CAAC,EAAE,uBAAuB,CAAA;QAC3C,oBAAoB,CAAC,EAAE,0BAA0B,CAAA;KAClD,GACD,OAAO,CAAA;CACZ;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,iBAAiB,CAAC,EAAE,uBAAuB,CAAA;IAC3C,oBAAoB,CAAC,EAAE,0BAA0B,CAAA;CAClD,CAAA;AAED,MAAM,WAAW,IACf,SAAQ,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,mBAAmB,GAAG,QAAQ,CAAC;IAC/F,cAAc,CAAC,EAAE;QACf,iBAAiB,CAAC,EAAE,+BAA+B,CAAA;QACnD,oBAAoB,CAAC,EAAE,kCAAkC,CAAA;KAC1D,CAAA;IACD,iBAAiB,EAAE,KAAK,GAAG,wBAAwB,CAAA;IACnD,MAAM,CAAC,EAAE,OAAO,GAAG,YAAY,CAAA;CAChC;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,IAAI,KAAK,CAE7E"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/auth/types.ts"],"sourcesContent":["import type { DeepRequired } from 'ts-essentials'\n\nimport type { CollectionSlug, GlobalSlug, Payload } from '../index.js'\nimport type { PayloadRequest, Where } from '../types/index.js'\n\n/**\n * A permission object that can be used to determine if a user has access to a specific operation.\n */\nexport type Permission = {\n permission: boolean\n where?: Where\n}\n\nexport type FieldPermissions = {\n blocks?: {\n [blockSlug: string]: {\n fields: {\n [fieldName: string]: FieldPermissions\n }\n }\n }\n create: {\n permission: boolean\n }\n fields?: {\n [fieldName: string]: FieldPermissions\n }\n read: {\n permission: boolean\n }\n update: {\n permission: boolean\n }\n}\n\nexport type SanitizedFieldPermissions =\n | {\n blocks?: {\n [blockSlug: string]: {\n fields: {\n [fieldName: string]: SanitizedFieldPermissions\n }\n }\n }\n create: true\n fields?: {\n [fieldName: string]: SanitizedFieldPermissions\n }\n read: true\n update: true\n }\n | true\n\nexport type CollectionPermission = {\n create: Permission\n delete: Permission\n fields: {\n [fieldName: string]: FieldPermissions\n }\n read: Permission\n readVersions?: Permission\n update: Permission\n}\n\nexport type SanitizedCollectionPermission = {\n create?: true\n delete?: true\n fields:\n | {\n [fieldName: string]: SanitizedFieldPermissions\n }\n | true\n read?: true\n readVersions?: true\n update?: true\n}\n\nexport type GlobalPermission = {\n fields: {\n [fieldName: string]: FieldPermissions\n }\n read: Permission\n readVersions?: Permission\n update: Permission\n}\n\nexport type SanitizedGlobalPermission = {\n fields:\n | {\n [fieldName: string]: SanitizedFieldPermissions\n }\n | true\n read?: true\n readVersions?: true\n update?: true\n}\n\nexport type DocumentPermissions = CollectionPermission | GlobalPermission\n\nexport type SanitizedDocumentPermissions = SanitizedCollectionPermission | SanitizedGlobalPermission\n\nexport type Permissions = {\n canAccessAdmin: boolean\n collections: {\n [collectionSlug: CollectionSlug]: CollectionPermission\n }\n globals?: {\n [globalSlug: GlobalSlug]: GlobalPermission\n }\n}\n\nexport type SanitizedPermissions = {\n canAccessAdmin?: boolean\n collections?: {\n [collectionSlug: string]: {\n create?: true\n delete?: true\n fields: {\n [fieldName: string]: SanitizedFieldPermissions\n }\n read?: true\n readVersions?: true\n update?: true\n }\n }\n globals?: {\n [globalSlug: string]: {\n fields: {\n [fieldName: string]: SanitizedFieldPermissions\n }\n read?: true\n readVersions?: true\n update?: true\n }\n }\n}\n\ntype BaseUser = {\n collection: string\n email?: string\n id: number | string\n username?: string\n}\n\nexport type User = {\n [key: string]: any\n} & BaseUser\n\n/**\n * `collection` is not available one the client. It's only available on the server (req.user)\n * On the client, you can access the collection via config.admin.user. Config can be accessed using the useConfig() hook\n */\nexport type ClientUser = {\n [key: string]: any\n} & BaseUser\n\ntype GenerateVerifyEmailHTML<TUser = any> = (args: {\n req: PayloadRequest\n token: string\n user: TUser\n}) => Promise<string> | string\n\ntype GenerateVerifyEmailSubject<TUser = any> = (args: {\n req: PayloadRequest\n token: string\n user: TUser\n}) => Promise<string> | string\n\ntype GenerateForgotPasswordEmailHTML<TUser = any> = (args?: {\n req?: PayloadRequest\n token?: string\n user?: TUser\n}) => Promise<string> | string\n\ntype GenerateForgotPasswordEmailSubject<TUser = any> = (args?: {\n req?: PayloadRequest\n token?: string\n user?: TUser\n}) => Promise<string> | string\n\nexport type AuthStrategyFunctionArgs = {\n headers: Request['headers']\n isGraphQL?: boolean\n payload: Payload\n}\n\nexport type AuthStrategyResult = {\n responseHeaders?: Headers\n user: null | User\n}\n\nexport type AuthStrategyFunction = (\n args: AuthStrategyFunctionArgs,\n) => AuthStrategyResult | Promise<AuthStrategyResult>\nexport type AuthStrategy = {\n authenticate: AuthStrategyFunction\n name: string\n}\n\nexport type LoginWithUsernameOptions =\n | {\n allowEmailLogin?: false\n requireEmail?: boolean\n // If `allowEmailLogin` is false, `requireUsername` must be true (default: true)\n requireUsername?: true\n }\n | {\n allowEmailLogin?: true\n requireEmail?: boolean\n requireUsername?: boolean\n }\n\nexport interface IncomingAuthType {\n /**\n * Set cookie options, including secure, sameSite, and domain. For advanced users.\n */\n cookies?: {\n domain?: string\n sameSite?: 'Lax' | 'None' | 'Strict' | boolean\n secure?: boolean\n }\n /**\n * How many levels deep a user document should be populated when creating the JWT and binding the user to the req. Defaults to 0 and should only be modified if absolutely necessary, as this will affect performance.\n * @default 0\n */\n depth?: number\n /**\n * Advanced - disable Payload's built-in local auth strategy. Only use this property if you have replaced Payload's auth mechanisms with your own.\n */\n disableLocalStrategy?: true\n /**\n * Customize the way that the forgotPassword operation functions.\n * @link https://payloadcms.com/docs/beta/authentication/email#forgot-password\n */\n forgotPassword?: {\n generateEmailHTML?: GenerateForgotPasswordEmailHTML\n generateEmailSubject?: GenerateForgotPasswordEmailSubject\n }\n /**\n * Set the time (in milliseconds) that a user should be locked out if they fail authentication more times than maxLoginAttempts allows for.\n */\n lockTime?: number\n /**\n * Ability to allow users to login with username/password.\n *\n * @link https://payloadcms.com/docs/beta/authentication/overview#login-with-username\n */\n loginWithUsername?: boolean | LoginWithUsernameOptions\n /**\n * Only allow a user to attempt logging in X amount of times. Automatically locks out a user from authenticating if this limit is passed. Set to 0 to disable.\n */\n maxLoginAttempts?: number\n /***\n * Set to true if you want to remove the token from the returned authentication API responses such as login or refresh.\n */\n removeTokenFromResponses?: true\n /**\n * Advanced - an array of custom authentification strategies to extend this collection's authentication with.\n * @link https://payloadcms.com/docs/beta/authentication/custom-strategies\n */\n strategies?: AuthStrategy[]\n /**\n * Controls how many seconds the token will be valid for. Default is 2 hours.\n * @default 7200\n * @link https://payloadcms.com/docs/beta/authentication/overview#config-options\n */\n tokenExpiration?: number\n /**\n * Payload Authentication provides for API keys to be set on each user within an Authentication-enabled Collection.\n * @default false\n * @link https://payloadcms.com/docs/beta/authentication/api-keys\n */\n useAPIKey?: boolean\n /**\n * Set to true or pass an object with verification options to require users to verify by email before they are allowed to log into your app.\n * @link https://payloadcms.com/docs/beta/authentication/email#email-verification\n */\n verify?:\n | {\n generateEmailHTML?: GenerateVerifyEmailHTML\n generateEmailSubject?: GenerateVerifyEmailSubject\n }\n | boolean\n}\n\nexport type VerifyConfig = {\n generateEmailHTML?: GenerateVerifyEmailHTML\n generateEmailSubject?: GenerateVerifyEmailSubject\n}\n\nexport interface Auth\n extends Omit<DeepRequired<IncomingAuthType>, 'forgotPassword' | 'loginWithUsername' | 'verify'> {\n forgotPassword?: {\n generateEmailHTML?: GenerateForgotPasswordEmailHTML\n generateEmailSubject?: GenerateForgotPasswordEmailSubject\n }\n loginWithUsername: false | LoginWithUsernameOptions\n verify?: boolean | VerifyConfig\n}\n\nexport function hasWhereAccessResult(result: boolean | Where): result is Where {\n return result && typeof result === 'object'\n}\n"],"names":["hasWhereAccessResult","result"],"mappings":"AA4SA,OAAO,SAASA,qBAAqBC,MAAuB;IAC1D,OAAOA,UAAU,OAAOA,WAAW;AACrC"}
1
+ {"version":3,"sources":["../../src/auth/types.ts"],"sourcesContent":["import type { DeepRequired } from 'ts-essentials'\n\nimport type { CollectionSlug, GlobalSlug, Payload } from '../index.js'\nimport type { PayloadRequest, Where } from '../types/index.js'\n\n/**\n * A permission object that can be used to determine if a user has access to a specific operation.\n */\nexport type Permission = {\n permission: boolean\n where?: Where\n}\n\nexport type FieldPermissions = {\n blocks?: {\n [blockSlug: string]: {\n create: {\n permission: boolean\n }\n fields: {\n [fieldName: string]: FieldPermissions\n }\n read: {\n permission: boolean\n }\n update: {\n permission: boolean\n }\n }\n }\n create: {\n permission: boolean\n }\n fields?: {\n [fieldName: string]: FieldPermissions\n }\n read: {\n permission: boolean\n }\n update: {\n permission: boolean\n }\n}\n\nexport type SanitizedFieldPermissions =\n | {\n blocks?: {\n [blockSlug: string]: {\n fields: {\n [fieldName: string]: SanitizedFieldPermissions\n }\n }\n }\n create: true\n fields?: {\n [fieldName: string]: SanitizedFieldPermissions\n }\n read: true\n update: true\n }\n | true\n\nexport type CollectionPermission = {\n create: Permission\n delete: Permission\n fields: {\n [fieldName: string]: FieldPermissions\n }\n read: Permission\n readVersions?: Permission\n update: Permission\n}\n\nexport type SanitizedCollectionPermission = {\n create?: true\n delete?: true\n fields:\n | {\n [fieldName: string]: SanitizedFieldPermissions\n }\n | true\n read?: true\n readVersions?: true\n update?: true\n}\n\nexport type GlobalPermission = {\n fields: {\n [fieldName: string]: FieldPermissions\n }\n read: Permission\n readVersions?: Permission\n update: Permission\n}\n\nexport type SanitizedGlobalPermission = {\n fields:\n | {\n [fieldName: string]: SanitizedFieldPermissions\n }\n | true\n read?: true\n readVersions?: true\n update?: true\n}\n\nexport type DocumentPermissions = CollectionPermission | GlobalPermission\n\nexport type SanitizedDocumentPermissions = SanitizedCollectionPermission | SanitizedGlobalPermission\n\nexport type Permissions = {\n canAccessAdmin: boolean\n collections: {\n [collectionSlug: CollectionSlug]: CollectionPermission\n }\n globals?: {\n [globalSlug: GlobalSlug]: GlobalPermission\n }\n}\n\nexport type SanitizedPermissions = {\n canAccessAdmin?: boolean\n collections?: {\n [collectionSlug: string]: {\n create?: true\n delete?: true\n fields: {\n [fieldName: string]: SanitizedFieldPermissions\n }\n read?: true\n readVersions?: true\n update?: true\n }\n }\n globals?: {\n [globalSlug: string]: {\n fields: {\n [fieldName: string]: SanitizedFieldPermissions\n }\n read?: true\n readVersions?: true\n update?: true\n }\n }\n}\n\ntype BaseUser = {\n collection: string\n email?: string\n id: number | string\n username?: string\n}\n\nexport type User = {\n [key: string]: any\n} & BaseUser\n\n/**\n * `collection` is not available one the client. It's only available on the server (req.user)\n * On the client, you can access the collection via config.admin.user. Config can be accessed using the useConfig() hook\n */\nexport type ClientUser = {\n [key: string]: any\n} & BaseUser\n\ntype GenerateVerifyEmailHTML<TUser = any> = (args: {\n req: PayloadRequest\n token: string\n user: TUser\n}) => Promise<string> | string\n\ntype GenerateVerifyEmailSubject<TUser = any> = (args: {\n req: PayloadRequest\n token: string\n user: TUser\n}) => Promise<string> | string\n\ntype GenerateForgotPasswordEmailHTML<TUser = any> = (args?: {\n req?: PayloadRequest\n token?: string\n user?: TUser\n}) => Promise<string> | string\n\ntype GenerateForgotPasswordEmailSubject<TUser = any> = (args?: {\n req?: PayloadRequest\n token?: string\n user?: TUser\n}) => Promise<string> | string\n\nexport type AuthStrategyFunctionArgs = {\n headers: Request['headers']\n isGraphQL?: boolean\n payload: Payload\n}\n\nexport type AuthStrategyResult = {\n responseHeaders?: Headers\n user: null | User\n}\n\nexport type AuthStrategyFunction = (\n args: AuthStrategyFunctionArgs,\n) => AuthStrategyResult | Promise<AuthStrategyResult>\nexport type AuthStrategy = {\n authenticate: AuthStrategyFunction\n name: string\n}\n\nexport type LoginWithUsernameOptions =\n | {\n allowEmailLogin?: false\n requireEmail?: boolean\n // If `allowEmailLogin` is false, `requireUsername` must be true (default: true)\n requireUsername?: true\n }\n | {\n allowEmailLogin?: true\n requireEmail?: boolean\n requireUsername?: boolean\n }\n\nexport interface IncomingAuthType {\n /**\n * Set cookie options, including secure, sameSite, and domain. For advanced users.\n */\n cookies?: {\n domain?: string\n sameSite?: 'Lax' | 'None' | 'Strict' | boolean\n secure?: boolean\n }\n /**\n * How many levels deep a user document should be populated when creating the JWT and binding the user to the req. Defaults to 0 and should only be modified if absolutely necessary, as this will affect performance.\n * @default 0\n */\n depth?: number\n /**\n * Advanced - disable Payload's built-in local auth strategy. Only use this property if you have replaced Payload's auth mechanisms with your own.\n */\n disableLocalStrategy?: true\n /**\n * Customize the way that the forgotPassword operation functions.\n * @link https://payloadcms.com/docs/beta/authentication/email#forgot-password\n */\n forgotPassword?: {\n generateEmailHTML?: GenerateForgotPasswordEmailHTML\n generateEmailSubject?: GenerateForgotPasswordEmailSubject\n }\n /**\n * Set the time (in milliseconds) that a user should be locked out if they fail authentication more times than maxLoginAttempts allows for.\n */\n lockTime?: number\n /**\n * Ability to allow users to login with username/password.\n *\n * @link https://payloadcms.com/docs/beta/authentication/overview#login-with-username\n */\n loginWithUsername?: boolean | LoginWithUsernameOptions\n /**\n * Only allow a user to attempt logging in X amount of times. Automatically locks out a user from authenticating if this limit is passed. Set to 0 to disable.\n */\n maxLoginAttempts?: number\n /***\n * Set to true if you want to remove the token from the returned authentication API responses such as login or refresh.\n */\n removeTokenFromResponses?: true\n /**\n * Advanced - an array of custom authentification strategies to extend this collection's authentication with.\n * @link https://payloadcms.com/docs/beta/authentication/custom-strategies\n */\n strategies?: AuthStrategy[]\n /**\n * Controls how many seconds the token will be valid for. Default is 2 hours.\n * @default 7200\n * @link https://payloadcms.com/docs/beta/authentication/overview#config-options\n */\n tokenExpiration?: number\n /**\n * Payload Authentication provides for API keys to be set on each user within an Authentication-enabled Collection.\n * @default false\n * @link https://payloadcms.com/docs/beta/authentication/api-keys\n */\n useAPIKey?: boolean\n /**\n * Set to true or pass an object with verification options to require users to verify by email before they are allowed to log into your app.\n * @link https://payloadcms.com/docs/beta/authentication/email#email-verification\n */\n verify?:\n | {\n generateEmailHTML?: GenerateVerifyEmailHTML\n generateEmailSubject?: GenerateVerifyEmailSubject\n }\n | boolean\n}\n\nexport type VerifyConfig = {\n generateEmailHTML?: GenerateVerifyEmailHTML\n generateEmailSubject?: GenerateVerifyEmailSubject\n}\n\nexport interface Auth\n extends Omit<DeepRequired<IncomingAuthType>, 'forgotPassword' | 'loginWithUsername' | 'verify'> {\n forgotPassword?: {\n generateEmailHTML?: GenerateForgotPasswordEmailHTML\n generateEmailSubject?: GenerateForgotPasswordEmailSubject\n }\n loginWithUsername: false | LoginWithUsernameOptions\n verify?: boolean | VerifyConfig\n}\n\nexport function hasWhereAccessResult(result: boolean | Where): result is Where {\n return result && typeof result === 'object'\n}\n"],"names":["hasWhereAccessResult","result"],"mappings":"AAqTA,OAAO,SAASA,qBAAqBC,MAAuB;IAC1D,OAAOA,UAAU,OAAOA,WAAW;AACrC"}
@@ -0,0 +1,9 @@
1
+ import type { PayloadComponent } from '../../config/types.js';
2
+ import type { ImportMap } from './index.js';
3
+ export declare const getFromImportMap: <TOutput>(args: {
4
+ importMap: ImportMap;
5
+ PayloadComponent: PayloadComponent;
6
+ schemaPath?: string;
7
+ silent?: boolean;
8
+ }) => TOutput;
9
+ //# sourceMappingURL=getFromImportMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFromImportMap.d.ts","sourceRoot":"","sources":["../../../src/bin/generateImportMap/getFromImportMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAI3C,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"}
@@ -0,0 +1,18 @@
1
+ import { parsePayloadComponent } from './parsePayloadComponent.js';
2
+ export const getFromImportMap = (args)=>{
3
+ const { importMap, PayloadComponent, schemaPath, silent } = args;
4
+ const { exportName, path } = parsePayloadComponent(PayloadComponent);
5
+ const key = path + '#' + exportName;
6
+ const importMapEntry = importMap[key];
7
+ if (!importMapEntry && !silent) {
8
+ // eslint-disable-next-line no-console
9
+ console.error(`getFromImportMap: PayloadComponent not found in importMap`, {
10
+ key,
11
+ PayloadComponent,
12
+ schemaPath
13
+ }, 'You may need to run the `payload generate:importmap` command to generate the importMap ahead of runtime.');
14
+ }
15
+ return importMapEntry;
16
+ };
17
+
18
+ //# sourceMappingURL=getFromImportMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/bin/generateImportMap/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"}
@@ -1 +1 @@
1
- {"version":3,"file":"iterateConfig.d.ts","sourceRoot":"","sources":["../../../src/bin/generateImportMap/iterateConfig.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAK5E,wBAAgB,aAAa,CAAC,EAC5B,cAAc,EACd,OAAO,EACP,MAAM,EACN,SAAS,EACT,OAAO,GACR,EAAE;IACD,cAAc,EAAE,cAAc,CAAA;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,eAAe,CAAA;IACvB,SAAS,EAAE,iBAAiB,CAAA;IAC5B,OAAO,EAAE,OAAO,CAAA;CACjB,QAkFA"}
1
+ {"version":3,"file":"iterateConfig.d.ts","sourceRoot":"","sources":["../../../src/bin/generateImportMap/iterateConfig.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAK5E,wBAAgB,aAAa,CAAC,EAC5B,cAAc,EACd,OAAO,EACP,MAAM,EACN,SAAS,EACT,OAAO,GACR,EAAE;IACD,cAAc,EAAE,cAAc,CAAA;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,eAAe,CAAA;IACvB,SAAS,EAAE,iBAAiB,CAAA;IAC5B,OAAO,EAAE,OAAO,CAAA;CACjB,QAkFA"}
@@ -1,4 +1,4 @@
1
- import { iterateCollections } from './iterateCollections.js';
1
+ /* eslint-disable @typescript-eslint/no-unused-expressions */ import { iterateCollections } from './iterateCollections.js';
2
2
  import { iterateGlobals } from './iterateGlobals.js';
3
3
  export function iterateConfig({ addToImportMap, baseDir, config, importMap, imports }) {
4
4
  iterateCollections({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/bin/generateImportMap/iterateConfig.ts"],"sourcesContent":["import type { AdminViewConfig } from '../../admin/views/types.js'\nimport type { SanitizedConfig } from '../../config/types.js'\nimport type { AddToImportMap, Imports, InternalImportMap } from './index.js'\n\nimport { iterateCollections } from './iterateCollections.js'\nimport { iterateGlobals } from './iterateGlobals.js'\n\nexport function iterateConfig({\n addToImportMap,\n baseDir,\n config,\n importMap,\n imports,\n}: {\n addToImportMap: AddToImportMap\n baseDir: string\n config: SanitizedConfig\n importMap: InternalImportMap\n imports: Imports\n}) {\n iterateCollections({\n addToImportMap,\n baseDir,\n collections: config.collections,\n config,\n importMap,\n imports,\n })\n\n iterateGlobals({\n addToImportMap,\n baseDir,\n config,\n globals: config.globals,\n importMap,\n imports,\n })\n\n if (typeof config.admin?.avatar === 'object') {\n addToImportMap(config.admin?.avatar?.Component)\n }\n\n addToImportMap(config.admin?.components?.Nav)\n addToImportMap(config.admin?.components?.header)\n addToImportMap(config.admin?.components?.logout?.Button)\n addToImportMap(config.admin?.components?.graphics?.Icon)\n addToImportMap(config.admin?.components?.graphics?.Logo)\n\n addToImportMap(config.admin?.components?.actions)\n addToImportMap(config.admin?.components?.afterDashboard)\n addToImportMap(config.admin?.components?.afterLogin)\n addToImportMap(config.admin?.components?.afterNavLinks)\n addToImportMap(config.admin?.components?.beforeDashboard)\n addToImportMap(config.admin?.components?.beforeLogin)\n addToImportMap(config.admin?.components?.beforeNavLinks)\n\n addToImportMap(config.admin?.components?.providers)\n\n if (config.admin?.components?.views) {\n if (Object.keys(config.admin?.components?.views)?.length) {\n for (const key in config.admin?.components?.views) {\n const adminViewConfig: AdminViewConfig = config.admin?.components?.views[key]\n addToImportMap(adminViewConfig?.Component)\n }\n }\n }\n\n if (config?.admin?.importMap?.generators?.length) {\n for (const generator of config.admin.importMap.generators) {\n generator({\n addToImportMap,\n baseDir,\n config,\n importMap,\n imports,\n })\n }\n }\n\n if (config?.admin?.dependencies) {\n for (const key in config.admin.dependencies) {\n const dependency = config.admin.dependencies[key]\n addToImportMap(dependency.path)\n }\n }\n\n /*\n if (\n config?.editor &&\n typeof config.editor === 'object' &&\n config.editor.generateImportMap &&\n typeof config.editor.generateImportMap === 'function'\n ) {\n config.editor.generateImportMap({\n addToImportMap,\n baseDir,\n componentMap,\n config,\n importMap,\n })\n }*/ // No need to do that here since in the sanitized editor config, this root editor is already added to the field editor - and we already process that in iterateFields\n}\n"],"names":["iterateCollections","iterateGlobals","iterateConfig","addToImportMap","baseDir","config","importMap","imports","collections","globals","admin","avatar","Component","components","Nav","header","logout","Button","graphics","Icon","Logo","actions","afterDashboard","afterLogin","afterNavLinks","beforeDashboard","beforeLogin","beforeNavLinks","providers","views","Object","keys","length","key","adminViewConfig","generators","generator","dependencies","dependency","path"],"mappings":"AAIA,SAASA,kBAAkB,QAAQ,0BAAyB;AAC5D,SAASC,cAAc,QAAQ,sBAAqB;AAEpD,OAAO,SAASC,cAAc,EAC5BC,cAAc,EACdC,OAAO,EACPC,MAAM,EACNC,SAAS,EACTC,OAAO,EAOR;IACCP,mBAAmB;QACjBG;QACAC;QACAI,aAAaH,OAAOG,WAAW;QAC/BH;QACAC;QACAC;IACF;IAEAN,eAAe;QACbE;QACAC;QACAC;QACAI,SAASJ,OAAOI,OAAO;QACvBH;QACAC;IACF;IAEA,IAAI,OAAOF,OAAOK,KAAK,EAAEC,WAAW,UAAU;QAC5CR,eAAeE,OAAOK,KAAK,EAAEC,QAAQC;IACvC;IAEAT,eAAeE,OAAOK,KAAK,EAAEG,YAAYC;IACzCX,eAAeE,OA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;;;;;;;;;;;;;GAcC,GAAG,qKAAqK;AAC3K"}
1
+ {"version":3,"sources":["../../../src/bin/generateImportMap/iterateConfig.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-expressions */\nimport type { AdminViewConfig } from '../../admin/views/types.js'\nimport type { SanitizedConfig } from '../../config/types.js'\nimport type { AddToImportMap, Imports, InternalImportMap } from './index.js'\n\nimport { iterateCollections } from './iterateCollections.js'\nimport { iterateGlobals } from './iterateGlobals.js'\n\nexport function iterateConfig({\n addToImportMap,\n baseDir,\n config,\n importMap,\n imports,\n}: {\n addToImportMap: AddToImportMap\n baseDir: string\n config: SanitizedConfig\n importMap: InternalImportMap\n imports: Imports\n}) {\n iterateCollections({\n addToImportMap,\n baseDir,\n collections: config.collections,\n config,\n importMap,\n imports,\n })\n\n iterateGlobals({\n addToImportMap,\n baseDir,\n config,\n globals: config.globals,\n importMap,\n imports,\n })\n\n if (typeof config.admin?.avatar === 'object') {\n addToImportMap(config.admin?.avatar?.Component)\n }\n\n addToImportMap(config.admin?.components?.Nav)\n addToImportMap(config.admin?.components?.header)\n addToImportMap(config.admin?.components?.logout?.Button)\n addToImportMap(config.admin?.components?.graphics?.Icon)\n addToImportMap(config.admin?.components?.graphics?.Logo)\n\n addToImportMap(config.admin?.components?.actions)\n addToImportMap(config.admin?.components?.afterDashboard)\n addToImportMap(config.admin?.components?.afterLogin)\n addToImportMap(config.admin?.components?.afterNavLinks)\n addToImportMap(config.admin?.components?.beforeDashboard)\n addToImportMap(config.admin?.components?.beforeLogin)\n addToImportMap(config.admin?.components?.beforeNavLinks)\n\n addToImportMap(config.admin?.components?.providers)\n\n if (config.admin?.components?.views) {\n if (Object.keys(config.admin?.components?.views)?.length) {\n for (const key in config.admin?.components?.views) {\n const adminViewConfig: AdminViewConfig = config.admin?.components?.views[key]\n addToImportMap(adminViewConfig?.Component)\n }\n }\n }\n\n if (config?.admin?.importMap?.generators?.length) {\n for (const generator of config.admin.importMap.generators) {\n generator({\n addToImportMap,\n baseDir,\n config,\n importMap,\n imports,\n })\n }\n }\n\n if (config?.admin?.dependencies) {\n for (const key in config.admin.dependencies) {\n const dependency = config.admin.dependencies[key]\n addToImportMap(dependency.path)\n }\n }\n\n /*\n if (\n config?.editor &&\n typeof config.editor === 'object' &&\n config.editor.generateImportMap &&\n typeof config.editor.generateImportMap === 'function'\n ) {\n config.editor.generateImportMap({\n addToImportMap,\n baseDir,\n componentMap,\n config,\n importMap,\n })\n }*/ // No need to do that here since in the sanitized editor config, this root editor is already added to the field editor - and we already process that in iterateFields\n}\n"],"names":["iterateCollections","iterateGlobals","iterateConfig","addToImportMap","baseDir","config","importMap","imports","collections","globals","admin","avatar","Component","components","Nav","header","logout","Button","graphics","Icon","Logo","actions","afterDashboard","afterLogin","afterNavLinks","beforeDashboard","beforeLogin","beforeNavLinks","providers","views","Object","keys","length","key","adminViewConfig","generators","generator","dependencies","dependency","path"],"mappings":"AAAA,2DAA2D,GAK3D,SAASA,kBAAkB,QAAQ,0BAAyB;AAC5D,SAASC,cAAc,QAAQ,sBAAqB;AAEpD,OAAO,SAASC,cAAc,EAC5BC,cAAc,EACdC,OAAO,EACPC,MAAM,EACNC,SAAS,EACTC,OAAO,EAOR;IACCP,mBAAmB;QACjBG;QACAC;QACAI,aAAaH,OAAOG,WAAW;QAC/BH;QACAC;QACAC;IACF;IAEAN,eAAe;QACbE;QACAC;QACAC;QACAI,SAASJ,OAAOI,OAAO;QACvBH;QACAC;IACF;IAEA,IAAI,OAAOF,OAAOK,KAAK,EAAEC,WAAW,UAAU;QAC5CR,eAAeE,OAAOK,KAAK,EAAEC,QAAQC;IACvC;IAEAT,eAAeE,OAAOK,KAAK,EAAEG,YAAYC;IACzCX,eAAeE,OAAOK,KAAK,EAAEG,YAAYE;IACzCZ,eAAeE,OAAOK,KAAK,EAAEG,YAAYG,QAAQC;IACjDd,eAAeE,OAAOK,KAAK,EAAEG,YAAYK,UAAUC;IACnDhB,eAAeE,OAAOK,KAAK,EAAEG,Y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AK,EAAoB,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAS5E,wBAAgB,yBAAyB,CAAC,EACxC,cAAc,EACd,OAAO,EACP,MAAM,EACN,MAAM,EACN,SAAS,EACT,OAAO,GACR,EAAE;IACD,cAAc,EAAE,cAAc,CAAA;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,eAAe,CAAA;IACvB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,GAAG,EAAE,CAAA;IACjC,SAAS,EAAE,iBAAiB,CAAA;IAC5B,OAAO,EAAE,OAAO,CAAA;CACjB,QAmEA"}
1
+ {"version":3,"file":"iterateFields.d.ts","sourceRoot":"","sources":["../../../src/bin/generateImportMap/iterateFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAoB,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC9E,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAe5E,wBAAgB,yBAAyB,CAAC,EACxC,cAAc,EACd,OAAO,EACP,MAAM,EACN,MAAM,EACN,SAAS,EACT,OAAO,GACR,EAAE;IACD,cAAc,EAAE,cAAc,CAAA;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,eAAe,CAAA;IACvB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,GAAG,EAAE,CAAA;IACjC,SAAS,EAAE,iBAAiB,CAAA;IAC5B,OAAO,EAAE,OAAO,CAAA;CACjB,QAiFA"}
@@ -1,6 +1,12 @@
1
- function hasKey(obj, key) {
1
+ /* eslint-disable @typescript-eslint/no-unused-expressions */ function hasKey(obj, key) {
2
2
  return obj != null && Object.prototype.hasOwnProperty.call(obj, key);
3
3
  }
4
+ const defaultUIFieldComponentKeys = [
5
+ 'Cell',
6
+ 'Description',
7
+ 'Field',
8
+ 'Filter'
9
+ ];
4
10
  export function genImportMapIterateFields({ addToImportMap, baseDir, config, fields, importMap, imports }) {
5
11
  for (const field of fields){
6
12
  if ('fields' in field) {
@@ -40,8 +46,21 @@ export function genImportMapIterateFields({ addToImportMap, baseDir, config, fie
40
46
  imports
41
47
  });
42
48
  }
49
+ } else if (field.type === 'ui') {
50
+ if (field?.admin?.components) {
51
+ // Render any extra, untyped components
52
+ for(const key in field.admin.components){
53
+ if (key in defaultUIFieldComponentKeys) {
54
+ continue;
55
+ }
56
+ addToImportMap(field.admin.components[key]);
57
+ }
58
+ }
43
59
  }
60
+ hasKey(field?.admin, 'jsx') && addToImportMap(field.admin.jsx) // For Blocks
61
+ ;
44
62
  hasKey(field?.admin?.components, 'Label') && addToImportMap(field.admin.components.Label);
63
+ hasKey(field?.admin?.components, 'Block') && addToImportMap(field.admin.components.Block);
45
64
  hasKey(field?.admin?.components, 'Cell') && addToImportMap(field?.admin?.components?.Cell);
46
65
  hasKey(field?.admin?.components, 'Description') && addToImportMap(field?.admin?.components?.Description);
47
66
  hasKey(field?.admin?.components, 'Field') && addToImportMap(field?.admin?.components?.Field);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/bin/generateImportMap/iterateFields.ts"],"sourcesContent":["import type { PayloadComponent, SanitizedConfig } from '../../config/types.js'\nimport type { Block, Field, Tab } from '../../fields/config/types.js'\nimport type { AddToImportMap, Imports, InternalImportMap } from './index.js'\n\nfunction hasKey<T, K extends string>(\n obj: null | T | undefined,\n key: K,\n): obj is { [P in K]: PayloadComponent | PayloadComponent[] } & T {\n return obj != null && Object.prototype.hasOwnProperty.call(obj, key)\n}\n\nexport function genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields,\n importMap,\n imports,\n}: {\n addToImportMap: AddToImportMap\n baseDir: string\n config: SanitizedConfig\n fields: Block[] | Field[] | Tab[]\n importMap: InternalImportMap\n imports: Imports\n}) {\n for (const field of fields) {\n if ('fields' in field) {\n genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields: field.fields,\n importMap,\n imports,\n })\n } else if (field.type === 'blocks') {\n genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields: field.blocks,\n importMap,\n imports,\n })\n } else if (field.type === 'tabs') {\n genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields: field.tabs,\n importMap,\n imports,\n })\n } else if (field.type === 'richText') {\n if (\n field?.editor &&\n typeof field.editor === 'object' &&\n field.editor.generateImportMap &&\n typeof field.editor.generateImportMap === 'function'\n ) {\n field.editor.generateImportMap({\n addToImportMap,\n baseDir,\n config,\n importMap,\n imports,\n })\n }\n }\n\n hasKey(field?.admin?.components, 'Label') && addToImportMap(field.admin.components.Label)\n\n hasKey(field?.admin?.components, 'Cell') && addToImportMap(field?.admin?.components?.Cell)\n\n hasKey(field?.admin?.components, 'Description') &&\n addToImportMap(field?.admin?.components?.Description)\n\n hasKey(field?.admin?.components, 'Field') && addToImportMap(field?.admin?.components?.Field)\n hasKey(field?.admin?.components, 'Filter') && addToImportMap(field?.admin?.components?.Filter)\n\n hasKey(field?.admin?.components, 'Error') && addToImportMap(field?.admin?.components?.Error)\n\n hasKey(field?.admin?.components, 'afterInput') &&\n addToImportMap(field?.admin?.components?.afterInput)\n\n hasKey(field?.admin?.components, 'beforeInput') &&\n addToImportMap(field?.admin?.components?.beforeInput)\n\n hasKey(field?.admin?.components, 'RowLabel') &&\n addToImportMap(field?.admin?.components?.RowLabel)\n }\n}\n"],"names":["hasKey","obj","key","Object","prototype","hasOwnProperty","call","genImportMapIterateFields","addToImportMap","baseDir","config","fields","importMap","imports","field","type","blocks","tabs","editor","generateImportMap","admin","components","Label","Cell","Description","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eAAeM,OAAOM,OAAOC,YAAYI;QACtFzB,OAAOc,OAAOM,OAAOC,YAAY,aAAab,eAAeM,OAAOM,OAAOC,YAAYK;QAEvF1B,OAAOc,OAAOM,OAAOC,YAAY,YAAYb,eAAeM,OAAOM,OAAOC,YAAYM;QAEtF3B,OAAOc,OAAOM,OAAOC,YAAY,iBAC/Bb,eAAeM,OAAOM,OAAOC,YAAYO;QAE3C5B,OAAOc,OAAOM,OAAOC,YAAY,kBAC/Bb,eAAeM,OAAOM,OAAOC,YAAYQ;QAE3C7B,OAAOc,OAAOM,OAAOC,YAAY,eAC/Bb,eAAeM,OAAOM,OAAOC,YAAYS;IAC7C;AACF"}
1
+ {"version":3,"sources":["../../../src/bin/generateImportMap/iterateFields.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-expressions */\nimport type { PayloadComponent, SanitizedConfig } from '../../config/types.js'\nimport type { Block, Field, Tab } from '../../fields/config/types.js'\nimport type { AddToImportMap, Imports, InternalImportMap } from './index.js'\n\nfunction hasKey<T, K extends string>(\n obj: null | T | undefined,\n key: K,\n): obj is { [P in K]: PayloadComponent | PayloadComponent[] } & T {\n return obj != null && Object.prototype.hasOwnProperty.call(obj, key)\n}\n\nconst defaultUIFieldComponentKeys: Array<'Cell' | 'Description' | 'Field' | 'Filter'> = [\n 'Cell',\n 'Description',\n 'Field',\n 'Filter',\n]\nexport function genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields,\n importMap,\n imports,\n}: {\n addToImportMap: AddToImportMap\n baseDir: string\n config: SanitizedConfig\n fields: Block[] | Field[] | Tab[]\n importMap: InternalImportMap\n imports: Imports\n}) {\n for (const field of fields) {\n if ('fields' in field) {\n genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields: field.fields,\n importMap,\n imports,\n })\n } else if (field.type === 'blocks') {\n genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields: field.blocks,\n importMap,\n imports,\n })\n } else if (field.type === 'tabs') {\n genImportMapIterateFields({\n addToImportMap,\n baseDir,\n config,\n fields: field.tabs,\n importMap,\n imports,\n })\n } else if (field.type === 'richText') {\n if (\n field?.editor &&\n typeof field.editor === 'object' &&\n field.editor.generateImportMap &&\n typeof field.editor.generateImportMap === 'function'\n ) {\n field.editor.generateImportMap({\n addToImportMap,\n baseDir,\n config,\n importMap,\n imports,\n })\n }\n } else if (field.type === 'ui') {\n if (field?.admin?.components) {\n // Render any extra, untyped components\n for (const key in field.admin.components) {\n if (key in defaultUIFieldComponentKeys) {\n continue\n }\n addToImportMap(field.admin.components[key])\n }\n }\n }\n\n hasKey(field?.admin, 'jsx') && addToImportMap(field.admin.jsx) // For Blocks\n\n hasKey(field?.admin?.components, 'Label') && addToImportMap(field.admin.components.Label)\n\n hasKey(field?.admin?.components, 'Block') && addToImportMap(field.admin.components.Block)\n\n hasKey(field?.admin?.components, 'Cell') && addToImportMap(field?.admin?.components?.Cell)\n\n hasKey(field?.admin?.components, 'Description') &&\n addToImportMap(field?.admin?.components?.Description)\n\n hasKey(field?.admin?.components, 'Field') && addToImportMap(field?.admin?.components?.Field)\n hasKey(field?.admin?.components, 'Filter') && addToImportMap(field?.admin?.components?.Filter)\n\n hasKey(field?.admin?.components, 'Error') && addToImportMap(field?.admin?.components?.Error)\n\n hasKey(field?.admin?.components, 'afterInput') &&\n addToImportMap(field?.admin?.components?.afterInput)\n\n hasKey(field?.admin?.components, 'beforeInput') &&\n addToImportMap(field?.admin?.components?.beforeInput)\n\n hasKey(field?.admin?.components, 'RowLabel') &&\n addToImportMap(field?.admin?.components?.RowLabel)\n }\n}\n"],"names":["hasKey","obj","key","Object","prototype","hasOwnProperty","call","defaultUIFieldComponentKeys","genImportMapIterateFields","addToImportMap","baseDir","config","fields","importMap","imports","field","type","blocks","tabs","editor","generateImportMap","admin","components","jsx","Label","Block","Cell","Description","Field","Filter","Error","afterInput","beforeInput","RowLabel"],"mappings":"AAAA,2DAA2D,GAK3D,SAASA,OACPC,GAAyB,EACzBC,GA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MAAMM,KAAK,CAACE,GAAG,EAAE,aAAa;;QAE5EvB,OAAOe,OAAOM,OAAOC,YAAY,YAAYb,eAAeM,MAAMM,KAAK,CAACC,UAAU,CAACE,KAAK;QAExFxB,OAAOe,OAAOM,OAAOC,YAAY,YAAYb,eAAeM,MAAMM,KAAK,CAACC,UAAU,CAACG,KAAK;QAExFzB,OAAOe,OAAOM,OAAOC,YAAY,WAAWb,eAAeM,OAAOM,OAAOC,YAAYI;QAErF1B,OAAOe,OAAOM,OAAOC,YAAY,kBAC/Bb,eAAeM,OAAOM,OAAOC,YAAYK;QAE3C3B,OAAOe,OAAOM,OAAOC,YAAY,YAAYb,eAAeM,OAAOM,OAAOC,YAAYM;QACtF5B,OAAOe,OAAOM,OAAOC,YAAY,aAAab,eAAeM,OAAOM,OAAOC,YAAYO;QAEvF7B,OAAOe,OAAOM,OAAOC,YAAY,YAAYb,eAAeM,OAAOM,OAAOC,YAAYQ;QAEtF9B,OAAOe,OAAOM,OAAOC,YAAY,iBAC/Bb,eAAeM,OAAOM,OAAOC,YAAYS;QAE3C/B,OAAOe,OAAOM,OAAOC,YAAY,kBAC/Bb,eAAeM,OAAOM,OAAOC,YAAYU;QAE3ChC,OAAOe,OAAOM,OAAOC,YAAY,eAC/Bb,eAAeM,OAAOM,OAAOC,YAAYW;IAC7C;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"parsePayloadComponent.d.ts","sourceRoot":"","sources":["../../../src/bin/generateImportMap/parsePayloadComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,wBAAgB,qBAAqB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG;IACzE,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;CACb,CAqBA"}
1
+ {"version":3,"file":"parsePayloadComponent.d.ts","sourceRoot":"","sources":["../../../src/bin/generateImportMap/parsePayloadComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,wBAAgB,qBAAqB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG;IACzE,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;CACb,CAsBA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/bin/generateImportMap/parsePayloadComponent.ts"],"sourcesContent":["import type { PayloadComponent } from '../../config/types.js'\n\nexport function parsePayloadComponent(PayloadComponent: PayloadComponent): {\n exportName: string\n path: string\n} {\n if (!PayloadComponent) {\n return null\n }\n const pathAndMaybeExport =\n typeof PayloadComponent === 'string' ? PayloadComponent : PayloadComponent.path\n\n let path = ''\n let exportName = 'default'\n\n if (pathAndMaybeExport?.includes('#')) {\n ;[path, exportName] = pathAndMaybeExport.split('#')\n } else {\n path = pathAndMaybeExport\n }\n\n if (typeof PayloadComponent === 'object' && PayloadComponent.exportName) {\n exportName = PayloadComponent.exportName\n }\n\n return { exportName, path }\n}\n"],"names":["parsePayloadComponent","PayloadComponent","pathAndMaybeExport","path","exportName","includes","split"],"mappings":"AAEA,OAAO,SAASA,sBAAsBC,gBAAkC;IAItE,IAAI,CAACA,kBAAkB;QACrB,OAAO;IACT;IACA,MAAMC,qBACJ,OAAOD,qBAAqB,WAAWA,mBAAmBA,iBAAiBE,IAAI;IAEjF,IAAIA,OAAO;IACX,IAAIC,aAAa;IAEjB,IAAIF,oBAAoBG,SAAS,MAAM;QACpC,CAACF,MAAMC,WAAW,GAAGF,mBAAmBI,KAAK,CAAC;IACjD,OAAO;QACLH,OAAOD;IACT;IAEA,IAAI,OAAOD,qBAAqB,YAAYA,iBAAiBG,UAAU,EAAE;QACvEA,aAAaH,iBAAiBG,UAAU;IAC1C;IAEA,OAAO;QAAEA;QAAYD;IAAK;AAC5B"}
1
+ {"version":3,"sources":["../../../src/bin/generateImportMap/parsePayloadComponent.ts"],"sourcesContent":["import type { PayloadComponent } from '../../config/types.js'\n\nexport function parsePayloadComponent(PayloadComponent: PayloadComponent): {\n exportName: string\n path: string\n} {\n if (!PayloadComponent) {\n return null\n }\n\n const pathAndMaybeExport =\n typeof PayloadComponent === 'string' ? PayloadComponent : PayloadComponent.path\n\n let path = ''\n let exportName = 'default'\n\n if (pathAndMaybeExport?.includes('#')) {\n ;[path, exportName] = pathAndMaybeExport.split('#')\n } else {\n path = pathAndMaybeExport\n }\n\n if (typeof PayloadComponent === 'object' && PayloadComponent.exportName) {\n exportName = PayloadComponent.exportName\n }\n\n return { exportName, path }\n}\n"],"names":["parsePayloadComponent","PayloadComponent","pathAndMaybeExport","path","exportName","includes","split"],"mappings":"AAEA,OAAO,SAASA,sBAAsBC,gBAAkC;IAItE,IAAI,CAACA,kBAAkB;QACrB,OAAO;IACT;IAEA,MAAMC,qBACJ,OAAOD,qBAAqB,WAAWA,mBAAmBA,iBAAiBE,IAAI;IAEjF,IAAIA,OAAO;IACX,IAAIC,aAAa;IAEjB,IAAIF,oBAAoBG,SAAS,MAAM;QACpC,CAACF,MAAMC,WAAW,GAAGF,mBAAmBI,KAAK,CAAC;IACjD,OAAO;QACLH,OAAOD;IACT;IAEA,IAAI,OAAOD,qBAAqB,YAAYA,iBAAiBG,UAAU,EAAE;QACvEA,aAAaH,iBAAiBG,UAAU;IAC1C;IAEA,OAAO;QAAEA;QAAYD;IAAK;AAC5B"}
@@ -1,5 +1,6 @@
1
1
  import type { I18nClient } from '@payloadcms/translations';
2
2
  import type { StaticDescription } from '../../admin/types.js';
3
+ import type { ImportMap } from '../../bin/generateImportMap/index.js';
3
4
  import type { LivePreviewConfig, ServerOnlyLivePreviewProperties, StaticLabel } from '../../config/types.js';
4
5
  import type { ClientField } from '../../fields/config/client.js';
5
6
  import type { Payload } from '../../types/index.js';
@@ -19,14 +20,16 @@ export type ClientCollectionConfig = {
19
20
  singular: StaticLabel;
20
21
  };
21
22
  } & Omit<SanitizedCollectionConfig, 'admin' | 'fields' | 'labels' | ServerOnlyCollectionProperties>;
22
- export declare const createClientCollectionConfig: ({ collection, defaultIDType, i18n, }: {
23
+ export declare const createClientCollectionConfig: ({ collection, defaultIDType, i18n, importMap, }: {
23
24
  collection: SanitizedCollectionConfig;
24
25
  defaultIDType: Payload["config"]["db"]["defaultIDType"];
25
26
  i18n: I18nClient;
27
+ importMap: ImportMap;
26
28
  }) => ClientCollectionConfig;
27
- export declare const createClientCollectionConfigs: ({ collections, defaultIDType, i18n, }: {
29
+ export declare const createClientCollectionConfigs: ({ collections, defaultIDType, i18n, importMap, }: {
28
30
  collections: SanitizedCollectionConfig[];
29
31
  defaultIDType: Payload["config"]["db"]["defaultIDType"];
30
32
  i18n: I18nClient;
33
+ importMap: ImportMap;
31
34
  }) => ClientCollectionConfig[];
32
35
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/collections/config/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EACV,iBAAiB,EACjB,+BAA+B,EAC/B,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA;AAK3D,MAAM,MAAM,8BAA8B,GAAG,MAAM,IAAI,CACrD,yBAAyB,EACzB,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,GAAG,OAAO,CACtD,CAAA;AAED,MAAM,MAAM,mCAAmC,GAAG,MAAM,IAAI,CAC1D,yBAAyB,CAAC,OAAO,CAAC,EAClC,gBAAgB,GAAG,YAAY,GAAG,QAAQ,CAC3C,CAAA;AAED,MAAM,M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AQ,EAAE,WAAW,CAAA;KACtB,CAAA;CACF,GAAG,IAAI,CAAC,yBAAyB,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,8BAA8B,CAAC,CAAA;AA6BnG,eAAO,MAAM,4BAA4B,oDAKtC;IACD,UAAU,EAAE,yBAAyB,CAAA;IACrC,aAAa,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,CAAA;IACvD,IAAI,EAAE,UAAU,CAAA;IAChB,SAAS,EAAE,SAAS,CAAA;CACrB,KAAG,sBA4FH,CAAA;AAED,eAAO,MAAM,6BAA6B,qDAKvC;IACD,WAAW,EAAE,yBAAyB,EAAE,CAAA;IACxC,aAAa,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,CAAA;IACvD,IAAI,EAAE,UAAU,CAAA;IAChB,SAAS,EAAE,SAAS,CAAA;CACrB,KAAG,sBAAsB,EAezB,CAAA"}
@@ -19,13 +19,14 @@ const serverOnlyCollectionAdminProperties = [
19
19
  'baseListFilter',
20
20
  'components'
21
21
  ];
22
- export const createClientCollectionConfig = ({ collection, defaultIDType, i18n })=>{
22
+ export const createClientCollectionConfig = ({ collection, defaultIDType, i18n, importMap })=>{
23
23
  const clientCollection = deepCopyObjectSimple(collection, true);
24
24
  clientCollection.fields = createClientFields({
25
25
  clientFields: clientCollection?.fields || [],
26
26
  defaultIDType,
27
27
  fields: collection.fields,
28
- i18n
28
+ i18n,
29
+ importMap
29
30
  });
30
31
  serverOnlyCollectionProperties.forEach((key)=>{
31
32
  if (key in clientCollection) {
@@ -93,14 +94,15 @@ export const createClientCollectionConfig = ({ collection, defaultIDType, i18n }
93
94
  }
94
95
  return clientCollection;
95
96
  };
96
- export const createClientCollectionConfigs = ({ collections, defaultIDType, i18n })=>{
97
+ export const createClientCollectionConfigs = ({ collections, defaultIDType, i18n, importMap })=>{
97
98
  const clientCollections = new Array(collections.length);
98
99
  for(let i = 0; i < collections.length; i++){
99
100
  const collection = collections[i];
100
101
  clientCollections[i] = createClientCollectionConfig({
101
102
  collection,
102
103
  defaultIDType,
103
- i18n
104
+ i18n,
105
+ importMap
104
106
  });
105
107
  }
106
108
  return clientCollections;