payload 3.0.0-beta.73 → 3.0.0-beta.74

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 (116) hide show
  1. package/dist/admin/RichText.d.ts +2 -1
  2. package/dist/admin/RichText.d.ts.map +1 -1
  3. package/dist/admin/RichText.js.map +1 -1
  4. package/dist/admin/fields/Array.d.ts +3 -1
  5. package/dist/admin/fields/Array.d.ts.map +1 -1
  6. package/dist/admin/fields/Array.js.map +1 -1
  7. package/dist/admin/fields/Blocks.d.ts +3 -1
  8. package/dist/admin/fields/Blocks.d.ts.map +1 -1
  9. package/dist/admin/fields/Blocks.js.map +1 -1
  10. package/dist/admin/fields/Checkbox.d.ts +3 -1
  11. package/dist/admin/fields/Checkbox.d.ts.map +1 -1
  12. package/dist/admin/fields/Checkbox.js.map +1 -1
  13. package/dist/admin/fields/Code.d.ts +3 -1
  14. package/dist/admin/fields/Code.d.ts.map +1 -1
  15. package/dist/admin/fields/Code.js.map +1 -1
  16. package/dist/admin/fields/Date.d.ts +3 -1
  17. package/dist/admin/fields/Date.d.ts.map +1 -1
  18. package/dist/admin/fields/Date.js.map +1 -1
  19. package/dist/admin/fields/Email.d.ts +3 -1
  20. package/dist/admin/fields/Email.d.ts.map +1 -1
  21. package/dist/admin/fields/Email.js.map +1 -1
  22. package/dist/admin/fields/JSON.d.ts +3 -1
  23. package/dist/admin/fields/JSON.d.ts.map +1 -1
  24. package/dist/admin/fields/JSON.js.map +1 -1
  25. package/dist/admin/fields/Number.d.ts +3 -1
  26. package/dist/admin/fields/Number.d.ts.map +1 -1
  27. package/dist/admin/fields/Number.js.map +1 -1
  28. package/dist/admin/fields/Point.d.ts +3 -1
  29. package/dist/admin/fields/Point.d.ts.map +1 -1
  30. package/dist/admin/fields/Point.js.map +1 -1
  31. package/dist/admin/fields/Radio.d.ts +3 -1
  32. package/dist/admin/fields/Radio.d.ts.map +1 -1
  33. package/dist/admin/fields/Radio.js.map +1 -1
  34. package/dist/admin/fields/Relationship.d.ts +3 -1
  35. package/dist/admin/fields/Relationship.d.ts.map +1 -1
  36. package/dist/admin/fields/Relationship.js.map +1 -1
  37. package/dist/admin/fields/RichText.d.ts +3 -1
  38. package/dist/admin/fields/RichText.d.ts.map +1 -1
  39. package/dist/admin/fields/RichText.js.map +1 -1
  40. package/dist/admin/fields/Select.d.ts +3 -1
  41. package/dist/admin/fields/Select.d.ts.map +1 -1
  42. package/dist/admin/fields/Select.js.map +1 -1
  43. package/dist/admin/fields/Text.d.ts +3 -1
  44. package/dist/admin/fields/Text.d.ts.map +1 -1
  45. package/dist/admin/fields/Text.js.map +1 -1
  46. package/dist/admin/fields/Textarea.d.ts +3 -1
  47. package/dist/admin/fields/Textarea.d.ts.map +1 -1
  48. package/dist/admin/fields/Textarea.js.map +1 -1
  49. package/dist/admin/fields/Upload.d.ts +3 -2
  50. package/dist/admin/fields/Upload.d.ts.map +1 -1
  51. package/dist/admin/fields/Upload.js.map +1 -1
  52. package/dist/admin/forms/Form.d.ts +2 -2
  53. package/dist/admin/forms/Form.d.ts.map +1 -1
  54. package/dist/admin/forms/Form.js.map +1 -1
  55. package/dist/auth/baseFields/email.d.ts +2 -4
  56. package/dist/auth/baseFields/email.d.ts.map +1 -1
  57. package/dist/auth/baseFields/email.js +21 -21
  58. package/dist/auth/baseFields/email.js.map +1 -1
  59. package/dist/auth/baseFields/username.d.ts +2 -2
  60. package/dist/auth/baseFields/username.d.ts.map +1 -1
  61. package/dist/auth/baseFields/username.js +1 -1
  62. package/dist/auth/baseFields/username.js.map +1 -1
  63. package/dist/auth/ensureUsernameOrEmail.d.ts +17 -0
  64. package/dist/auth/ensureUsernameOrEmail.d.ts.map +1 -0
  65. package/dist/auth/ensureUsernameOrEmail.js +43 -0
  66. package/dist/auth/ensureUsernameOrEmail.js.map +1 -0
  67. package/dist/auth/getAuthFields.d.ts.map +1 -1
  68. package/dist/auth/getAuthFields.js +18 -10
  69. package/dist/auth/getAuthFields.js.map +1 -1
  70. package/dist/auth/operations/registerFirstUser.d.ts.map +1 -1
  71. package/dist/auth/operations/registerFirstUser.js +8 -0
  72. package/dist/auth/operations/registerFirstUser.js.map +1 -1
  73. package/dist/auth/types.d.ts +6 -1
  74. package/dist/auth/types.d.ts.map +1 -1
  75. package/dist/auth/types.js.map +1 -1
  76. package/dist/collections/config/defaults.d.ts.map +1 -1
  77. package/dist/collections/config/defaults.js +2 -1
  78. package/dist/collections/config/defaults.js.map +1 -1
  79. package/dist/collections/config/sanitize.d.ts.map +1 -1
  80. package/dist/collections/config/sanitize.js +17 -4
  81. package/dist/collections/config/sanitize.js.map +1 -1
  82. package/dist/collections/operations/create.d.ts.map +1 -1
  83. package/dist/collections/operations/create.js +8 -0
  84. package/dist/collections/operations/create.js.map +1 -1
  85. package/dist/collections/operations/update.d.ts.map +1 -1
  86. package/dist/collections/operations/update.js +11 -0
  87. package/dist/collections/operations/update.js.map +1 -1
  88. package/dist/collections/operations/updateByID.d.ts.map +1 -1
  89. package/dist/collections/operations/updateByID.js +11 -0
  90. package/dist/collections/operations/updateByID.js.map +1 -1
  91. package/dist/errors/ValidationError.d.ts +6 -8
  92. package/dist/errors/ValidationError.d.ts.map +1 -1
  93. package/dist/errors/ValidationError.js.map +1 -1
  94. package/dist/errors/index.d.ts +1 -0
  95. package/dist/errors/index.d.ts.map +1 -1
  96. package/dist/errors/index.js.map +1 -1
  97. package/dist/fields/config/client.d.ts +15 -15
  98. package/dist/fields/config/client.d.ts.map +1 -1
  99. package/dist/fields/config/types.d.ts +2 -1
  100. package/dist/fields/config/types.d.ts.map +1 -1
  101. package/dist/fields/config/types.js.map +1 -1
  102. package/dist/fields/hooks/beforeChange/promise.d.ts.map +1 -1
  103. package/dist/fields/hooks/beforeChange/promise.js +1 -0
  104. package/dist/fields/hooks/beforeChange/promise.js.map +1 -1
  105. package/dist/fields/validations.d.ts +65 -74
  106. package/dist/fields/validations.d.ts.map +1 -1
  107. package/dist/fields/validations.js +20 -4
  108. package/dist/fields/validations.js.map +1 -1
  109. package/dist/index.d.ts +3 -2
  110. package/dist/index.d.ts.map +1 -1
  111. package/dist/index.js +1 -1
  112. package/dist/index.js.map +1 -1
  113. package/dist/utilities/configToJSONSchema.d.ts.map +1 -1
  114. package/dist/utilities/configToJSONSchema.js +88 -57
  115. package/dist/utilities/configToJSONSchema.js.map +1 -1
  116. package/package.json +2 -2
@@ -5,7 +5,7 @@ import type { SanitizedCollectionConfig, TypeWithID } from '../collections/confi
5
5
  import type { SanitizedConfig } from '../config/types.js';
6
6
  import type { Field, FieldAffectingData, RichTextField, Validate } from '../fields/config/types.js';
7
7
  import type { SanitizedGlobalConfig } from '../globals/config/types.js';
8
- import type { JsonObject, PayloadRequest, RequestContext } from '../types/index.js';
8
+ import type { JsonObject, Payload, PayloadRequest, RequestContext } from '../types/index.js';
9
9
  import type { WithServerSidePropsComponentProps } from './elements/WithServerSideProps.js';
10
10
  export type RichTextFieldProps<Value extends object, AdapterProps, ExtraFieldProperties = {}> = {
11
11
  path?: string;
@@ -113,6 +113,7 @@ type RichTextAdapterBase<Value extends object = object, AdapterProps = any, Extr
113
113
  WithServerSideProps: React.FC<Omit<WithServerSidePropsComponentProps, 'serverOnlyProps'>>;
114
114
  config: SanitizedConfig;
115
115
  i18n: I18nClient;
116
+ payload: Payload;
116
117
  schemaPath: string;
117
118
  }) => Map<string, React.ReactNode>;
118
119
  generateSchemaMap?: (args: {
@@ -1 +1 @@
1
- {"version":3,"file":"RichText.d.ts","sourceRoot":"","sources":["../../src/admin/RichText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAC3F,OAAO,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ACF,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAA;IAC5B,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAAC,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC,CAAA;CACxF,GAAG,mBAAmB,CAAC,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAA;AAElE,MAAM,MAAM,uBAAuB,CACjC,KAAK,SAAS,MAAM,GAAG,MAAM,EAC7B,YAAY,GAAG,GAAG,EAClB,oBAAoB,GAAG,EAAE,IACvB,CAAC,EACH,MAAM,EACN,MAAM,GACP,EAAE;IACD,MAAM,EAAE,eAAe,CAAA;IACvB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KACG,OAAO,CAAC,eAAe,CAAC,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC,GACnE,eAAe,CAAC,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/admin/RichText.ts"],"sourcesContent":["import type { GenericLanguages, I18n, I18nClient } from '@payloadcms/translations'\nimport type { JSONSchema4 } from 'json-schema'\nimport type React from 'react'\n\nimport type { SanitizedCollectionConfig, TypeWithID } from '../collections/config/types.js'\nimport type { SanitizedConfig } from '../config/types.js'\nimport type { Field, FieldAffectingData, RichTextField, Validate } from '../fields/config/types.js'\nimport type { SanitizedGlobalConfig } from '../globals/config/types.js'\nimport type { JsonObject, PayloadRequest, RequestContext } from '../types/index.js'\nimport type { WithServerSidePropsComponentProps } from './elements/WithServerSideProps.js'\n\nexport type RichTextFieldProps<Value extends object, AdapterProps, ExtraFieldProperties = {}> = {\n path?: string\n} & Omit<RichTextField<Value, AdapterProps, ExtraFieldProperties>, 'type'>\n\nexport type AfterReadRichTextHookArgs<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = {\n currentDepth?: number\n\n depth?: number\n\n draft?: boolean\n\n fallbackLocale?: string\n\n fieldPromises?: Promise<void>[]\n\n /** Boolean to denote if this hook is running against finding one, or finding many within the afterRead hook. */\n findMany?: boolean\n\n flattenLocales?: boolean\n\n locale?: string\n\n /** A string relating to which operation the field type is currently executing within. */\n operation?: 'create' | 'delete' | 'read' | 'update'\n\n overrideAccess?: boolean\n\n populationPromises?: Promise<void>[]\n showHiddenFields?: boolean\n triggerAccessControl?: boolean\n triggerHooks?: boolean\n}\n\nexport type AfterChangeRichTextHookArgs<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = {\n /** A string relating to which operation the field type is currently executing within. */\n operation: 'create' | 'update'\n /** The document before changes were applied. */\n previousDoc?: TData\n /** The sibling data of the document before changes being applied. */\n previousSiblingDoc?: TData\n /** The previous value of the field, before changes */\n previousValue?: TValue\n}\nexport type BeforeValidateRichTextHookArgs<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = {\n /** A string relating to which operation the field type is currently executing within. */\n operation: 'create' | 'update'\n overrideAccess?: boolean\n /** The sibling data of the document before changes being applied. */\n previousSiblingDoc?: TData\n /** The previous value of the field, before changes */\n previousValue?: TValue\n}\n\nexport type BeforeChangeRichTextHookArgs<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = {\n /**\n * The original data with locales (not modified by any hooks). Only available in `beforeChange` and `beforeDuplicate` field hooks.\n */\n docWithLocales?: JsonObject\n\n duplicate?: boolean\n\n errors?: { field: string; message: string }[]\n /** Only available in `beforeChange` field hooks */\n mergeLocaleActions?: (() => Promise<void>)[]\n /** A string relating to which operation the field type is currently executing within. */\n operation?: 'create' | 'delete' | 'read' | 'update'\n /** The sibling data of the document before changes being applied. */\n previousSiblingDoc?: TData\n /** The previous value of the field, before changes */\n previousValue?: TValue\n /**\n * The original siblingData with locales (not modified by any hooks).\n */\n siblingDocWithLocales?: JsonObject\n\n skipValidation?: boolean\n}\n\nexport type BaseRichTextHookArgs<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = {\n /** The collection which the field belongs to. If the field belongs to a global, this will be null. */\n collection: SanitizedCollectionConfig | null\n context: RequestContext\n /** The data passed to update the document within create and update operations, and the full document itself in the afterRead hook. */\n data?: Partial<TData>\n /** The field which the hook is running against. */\n field: FieldAffectingData\n /** The global which the field belongs to. If the field belongs to a collection, this will be null. */\n global: SanitizedGlobalConfig | null\n\n /** The full original document in `update` operations. In the `afterChange` hook, this is the resulting document of the operation. */\n originalDoc?: TData\n /**\n * The path of the field, e.g. [\"group\", \"myArray\", 1, \"textField\"]. The path is the schemaPath but with indexes and would be used in the context of field data, not field schemas.\n */\n path: (number | string)[]\n\n /** The Express request object. It is mocked for Local API operations. */\n req: PayloadRequest\n /**\n * The schemaPath of the field, e.g. [\"group\", \"myArray\", \"textField\"]. The schemaPath is the path but without indexes and would be used in the context of field schemas, not field data.\n */\n schemaPath: string[]\n /** The sibling data passed to a field that the hook is running against. */\n siblingData: Partial<TSiblingData>\n /** The value of the field. */\n value?: TValue\n}\n\nexport type AfterReadRichTextHook<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = (\n args: AfterReadRichTextHookArgs<TData, TValue, TSiblingData> &\n BaseRichTextHookArgs<TData, TValue, TSiblingData>,\n) => Promise<TValue> | TValue\n\nexport type AfterChangeRichTextHook<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = (\n args: AfterChangeRichTextHookArgs<TData, TValue, TSiblingData> &\n BaseRichTextHookArgs<TData, TValue, TSiblingData>,\n) => Promise<TValue> | TValue\n\nexport type BeforeChangeRichTextHook<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = (\n args: BaseRichTextHookArgs<TData, TValue, TSiblingData> &\n BeforeChangeRichTextHookArgs<TData, TValue, TSiblingData>,\n) => Promise<TValue> | TValue\n\nexport type BeforeValidateRichTextHook<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = (\n args: BaseRichTextHookArgs<TData, TValue, TSiblingData> &\n BeforeValidateRichTextHookArgs<TData, TValue, TSiblingData>,\n) => Promise<TValue> | TValue\n\nexport type RichTextHooks = {\n afterChange?: AfterChangeRichTextHook[]\n afterRead?: AfterReadRichTextHook[]\n beforeChange?: BeforeChangeRichTextHook[]\n beforeValidate?: BeforeValidateRichTextHook[]\n}\n\ntype RichTextAdapterBase<\n Value extends object = object,\n AdapterProps = any,\n ExtraFieldProperties = {},\n> = {\n generateComponentMap: (args: {\n WithServerSideProps: React.FC<Omit<WithServerSidePropsComponentProps, 'serverOnlyProps'>>\n config: SanitizedConfig\n i18n: I18nClient\n schemaPath: string\n }) => Map<string, React.ReactNode>\n generateSchemaMap?: (args: {\n config: SanitizedConfig\n i18n: I18n<any, any>\n schemaMap: Map<string, Field[]>\n schemaPath: string\n }) => Map<string, Field[]>\n /**\n * Like an afterRead hook, but runs only for the GraphQL resolver. For populating data, this should be used, as afterRead hooks do not have a depth in graphQL.\n *\n * To populate stuff / resolve field hooks, mutate the incoming populationPromises or fieldPromises array. They will then be awaited in the correct order within payload itself.\n * @param data\n */\n graphQLPopulationPromises?: (data: {\n context: RequestContext\n currentDepth?: number\n depth: number\n draft: boolean\n field: RichTextField<Value, AdapterProps, ExtraFieldProperties>\n fieldPromises: Promise<void>[]\n findMany: boolean\n flattenLocales: boolean\n overrideAccess?: boolean\n populationPromises: Promise<void>[]\n req: PayloadRequest\n showHiddenFields: boolean\n siblingDoc: JsonObject\n }) => void\n hooks?: RichTextHooks\n i18n?: Partial<GenericLanguages>\n outputSchema?: ({\n collectionIDFieldTypes,\n config,\n field,\n interfaceNameDefinitions,\n isRequired,\n }: {\n collectionIDFieldTypes: { [key: string]: 'number' | 'string' }\n config?: SanitizedConfig\n field: RichTextField<Value, AdapterProps, ExtraFieldProperties>\n /**\n * Allows you to define new top-level interfaces that can be re-used in the output schema.\n */\n interfaceNameDefinitions: Map<string, JSONSchema4>\n isRequired: boolean\n }) => JSONSchema4\n validate: Validate<\n Value,\n Value,\n unknown,\n RichTextField<Value, AdapterProps, ExtraFieldProperties>\n >\n}\n\nexport type RichTextAdapter<\n Value extends object = object,\n AdapterProps = any,\n ExtraFieldProperties = {},\n> = {\n CellComponent: React.FC<any>\n FieldComponent: React.FC<RichTextFieldProps<Value, AdapterProps, ExtraFieldProperties>>\n} & RichTextAdapterBase<Value, AdapterProps, ExtraFieldProperties>\n\nexport type RichTextAdapterProvider<\n Value extends object = object,\n AdapterProps = any,\n ExtraFieldProperties = {},\n> = ({\n config,\n isRoot,\n}: {\n config: SanitizedConfig\n /**\n * Whether or not this is the root richText editor, defined in the payload.config.ts.\n *\n * @default false\n */\n isRoot?: boolean\n}) =>\n | Promise<RichTextAdapter<Value, AdapterProps, ExtraFieldProperties>>\n | RichTextAdapter<Value, AdapterProps, ExtraFieldProperties>\n"],"names":[],"mappings":"AA+PA,WAiB8D"}
1
+ {"version":3,"sources":["../../src/admin/RichText.ts"],"sourcesContent":["import type { GenericLanguages, I18n, I18nClient } from '@payloadcms/translations'\nimport type { JSONSchema4 } from 'json-schema'\nimport type React from 'react'\n\nimport type { SanitizedCollectionConfig, TypeWithID } from '../collections/config/types.js'\nimport type { SanitizedConfig } from '../config/types.js'\nimport type { Field, FieldAffectingData, RichTextField, Validate } from '../fields/config/types.js'\nimport type { SanitizedGlobalConfig } from '../globals/config/types.js'\nimport type { JsonObject, Payload, PayloadRequest, RequestContext } from '../types/index.js'\nimport type { WithServerSidePropsComponentProps } from './elements/WithServerSideProps.js'\n\nexport type RichTextFieldProps<Value extends object, AdapterProps, ExtraFieldProperties = {}> = {\n path?: string\n} & Omit<RichTextField<Value, AdapterProps, ExtraFieldProperties>, 'type'>\n\nexport type AfterReadRichTextHookArgs<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = {\n currentDepth?: number\n\n depth?: number\n\n draft?: boolean\n\n fallbackLocale?: string\n\n fieldPromises?: Promise<void>[]\n\n /** Boolean to denote if this hook is running against finding one, or finding many within the afterRead hook. */\n findMany?: boolean\n\n flattenLocales?: boolean\n\n locale?: string\n\n /** A string relating to which operation the field type is currently executing within. */\n operation?: 'create' | 'delete' | 'read' | 'update'\n\n overrideAccess?: boolean\n\n populationPromises?: Promise<void>[]\n showHiddenFields?: boolean\n triggerAccessControl?: boolean\n triggerHooks?: boolean\n}\n\nexport type AfterChangeRichTextHookArgs<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = {\n /** A string relating to which operation the field type is currently executing within. */\n operation: 'create' | 'update'\n /** The document before changes were applied. */\n previousDoc?: TData\n /** The sibling data of the document before changes being applied. */\n previousSiblingDoc?: TData\n /** The previous value of the field, before changes */\n previousValue?: TValue\n}\nexport type BeforeValidateRichTextHookArgs<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = {\n /** A string relating to which operation the field type is currently executing within. */\n operation: 'create' | 'update'\n overrideAccess?: boolean\n /** The sibling data of the document before changes being applied. */\n previousSiblingDoc?: TData\n /** The previous value of the field, before changes */\n previousValue?: TValue\n}\n\nexport type BeforeChangeRichTextHookArgs<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = {\n /**\n * The original data with locales (not modified by any hooks). Only available in `beforeChange` and `beforeDuplicate` field hooks.\n */\n docWithLocales?: JsonObject\n\n duplicate?: boolean\n\n errors?: { field: string; message: string }[]\n /** Only available in `beforeChange` field hooks */\n mergeLocaleActions?: (() => Promise<void>)[]\n /** A string relating to which operation the field type is currently executing within. */\n operation?: 'create' | 'delete' | 'read' | 'update'\n /** The sibling data of the document before changes being applied. */\n previousSiblingDoc?: TData\n /** The previous value of the field, before changes */\n previousValue?: TValue\n /**\n * The original siblingData with locales (not modified by any hooks).\n */\n siblingDocWithLocales?: JsonObject\n\n skipValidation?: boolean\n}\n\nexport type BaseRichTextHookArgs<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = {\n /** The collection which the field belongs to. If the field belongs to a global, this will be null. */\n collection: SanitizedCollectionConfig | null\n context: RequestContext\n /** The data passed to update the document within create and update operations, and the full document itself in the afterRead hook. */\n data?: Partial<TData>\n /** The field which the hook is running against. */\n field: FieldAffectingData\n /** The global which the field belongs to. If the field belongs to a collection, this will be null. */\n global: SanitizedGlobalConfig | null\n\n /** The full original document in `update` operations. In the `afterChange` hook, this is the resulting document of the operation. */\n originalDoc?: TData\n /**\n * The path of the field, e.g. [\"group\", \"myArray\", 1, \"textField\"]. The path is the schemaPath but with indexes and would be used in the context of field data, not field schemas.\n */\n path: (number | string)[]\n\n /** The Express request object. It is mocked for Local API operations. */\n req: PayloadRequest\n /**\n * The schemaPath of the field, e.g. [\"group\", \"myArray\", \"textField\"]. The schemaPath is the path but without indexes and would be used in the context of field schemas, not field data.\n */\n schemaPath: string[]\n /** The sibling data passed to a field that the hook is running against. */\n siblingData: Partial<TSiblingData>\n /** The value of the field. */\n value?: TValue\n}\n\nexport type AfterReadRichTextHook<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = (\n args: AfterReadRichTextHookArgs<TData, TValue, TSiblingData> &\n BaseRichTextHookArgs<TData, TValue, TSiblingData>,\n) => Promise<TValue> | TValue\n\nexport type AfterChangeRichTextHook<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = (\n args: AfterChangeRichTextHookArgs<TData, TValue, TSiblingData> &\n BaseRichTextHookArgs<TData, TValue, TSiblingData>,\n) => Promise<TValue> | TValue\n\nexport type BeforeChangeRichTextHook<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = (\n args: BaseRichTextHookArgs<TData, TValue, TSiblingData> &\n BeforeChangeRichTextHookArgs<TData, TValue, TSiblingData>,\n) => Promise<TValue> | TValue\n\nexport type BeforeValidateRichTextHook<\n TData extends TypeWithID = any,\n TValue = any,\n TSiblingData = any,\n> = (\n args: BaseRichTextHookArgs<TData, TValue, TSiblingData> &\n BeforeValidateRichTextHookArgs<TData, TValue, TSiblingData>,\n) => Promise<TValue> | TValue\n\nexport type RichTextHooks = {\n afterChange?: AfterChangeRichTextHook[]\n afterRead?: AfterReadRichTextHook[]\n beforeChange?: BeforeChangeRichTextHook[]\n beforeValidate?: BeforeValidateRichTextHook[]\n}\n\ntype RichTextAdapterBase<\n Value extends object = object,\n AdapterProps = any,\n ExtraFieldProperties = {},\n> = {\n generateComponentMap: (args: {\n WithServerSideProps: React.FC<Omit<WithServerSidePropsComponentProps, 'serverOnlyProps'>>\n config: SanitizedConfig\n i18n: I18nClient\n payload: Payload\n schemaPath: string\n }) => Map<string, React.ReactNode>\n generateSchemaMap?: (args: {\n config: SanitizedConfig\n i18n: I18n<any, any>\n schemaMap: Map<string, Field[]>\n schemaPath: string\n }) => Map<string, Field[]>\n /**\n * Like an afterRead hook, but runs only for the GraphQL resolver. For populating data, this should be used, as afterRead hooks do not have a depth in graphQL.\n *\n * To populate stuff / resolve field hooks, mutate the incoming populationPromises or fieldPromises array. They will then be awaited in the correct order within payload itself.\n * @param data\n */\n graphQLPopulationPromises?: (data: {\n context: RequestContext\n currentDepth?: number\n depth: number\n draft: boolean\n field: RichTextField<Value, AdapterProps, ExtraFieldProperties>\n fieldPromises: Promise<void>[]\n findMany: boolean\n flattenLocales: boolean\n overrideAccess?: boolean\n populationPromises: Promise<void>[]\n req: PayloadRequest\n showHiddenFields: boolean\n siblingDoc: JsonObject\n }) => void\n hooks?: RichTextHooks\n i18n?: Partial<GenericLanguages>\n outputSchema?: ({\n collectionIDFieldTypes,\n config,\n field,\n interfaceNameDefinitions,\n isRequired,\n }: {\n collectionIDFieldTypes: { [key: string]: 'number' | 'string' }\n config?: SanitizedConfig\n field: RichTextField<Value, AdapterProps, ExtraFieldProperties>\n /**\n * Allows you to define new top-level interfaces that can be re-used in the output schema.\n */\n interfaceNameDefinitions: Map<string, JSONSchema4>\n isRequired: boolean\n }) => JSONSchema4\n validate: Validate<\n Value,\n Value,\n unknown,\n RichTextField<Value, AdapterProps, ExtraFieldProperties>\n >\n}\n\nexport type RichTextAdapter<\n Value extends object = object,\n AdapterProps = any,\n ExtraFieldProperties = {},\n> = {\n CellComponent: React.FC<any>\n FieldComponent: React.FC<RichTextFieldProps<Value, AdapterProps, ExtraFieldProperties>>\n} & RichTextAdapterBase<Value, AdapterProps, ExtraFieldProperties>\n\nexport type RichTextAdapterProvider<\n Value extends object = object,\n AdapterProps = any,\n ExtraFieldProperties = {},\n> = ({\n config,\n isRoot,\n}: {\n config: SanitizedConfig\n /**\n * Whether or not this is the root richText editor, defined in the payload.config.ts.\n *\n * @default false\n */\n isRoot?: boolean\n}) =>\n | Promise<RichTextAdapter<Value, AdapterProps, ExtraFieldProperties>>\n | RichTextAdapter<Value, AdapterProps, ExtraFieldProperties>\n"],"names":[],"mappings":"AAgQA,WAiB8D"}
@@ -1,4 +1,5 @@
1
1
  import type { ArrayField } from '../../fields/config/types.js';
2
+ import type { ArrayFieldValidation } from '../../fields/validations.js';
2
3
  import type { ErrorComponent } from '../forms/Error.js';
3
4
  import type { FieldMap } from '../forms/FieldMap.js';
4
5
  import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
@@ -11,8 +12,9 @@ export type ArrayFieldProps = {
11
12
  maxRows?: ArrayField['maxRows'];
12
13
  minRows?: ArrayField['minRows'];
13
14
  name?: string;
15
+ validate?: ArrayFieldValidation;
14
16
  width?: string;
15
- } & FormFieldBase;
17
+ } & Omit<FormFieldBase, 'validate'>;
16
18
  export type ArrayFieldLabelComponent = LabelComponent<'array'>;
17
19
  export type ArrayFieldDescriptionComponent = DescriptionComponent<'array'>;
18
20
  export type ArrayFieldErrorComponent = ErrorComponent<'array'>;
@@ -1 +1 @@
1
- {"version":3,"file":"Array.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,s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CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAA;IAC7B,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAA;IAC/B,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAA;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,oBAAoB,CAAA;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;AAEnC,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA;AAE9D,MAAM,MAAM,8BAA8B,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAA;AAE1E,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/fields/Array.ts"],"sourcesContent":["import type { ArrayField } from '../../fields/config/types.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { FieldMap } from '../forms/FieldMap.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type ArrayFieldProps = {\n CustomRowLabel?: React.ReactNode\n fieldMap: FieldMap\n forceRender?: boolean\n isSortable?: boolean\n labels?: ArrayField['labels']\n maxRows?: ArrayField['maxRows']\n minRows?: ArrayField['minRows']\n name?: string\n width?: string\n} & FormFieldBase\n\nexport type ArrayFieldLabelComponent = LabelComponent<'array'>\n\nexport type ArrayFieldDescriptionComponent = DescriptionComponent<'array'>\n\nexport type ArrayFieldErrorComponent = ErrorComponent<'array'>\n"],"names":[],"mappings":"AAqBA,WAA8D"}
1
+ {"version":3,"sources":["../../../src/admin/fields/Array.ts"],"sourcesContent":["import type { ArrayField } from '../../fields/config/types.js'\nimport type { ArrayFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { FieldMap } from '../forms/FieldMap.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type ArrayFieldProps = {\n CustomRowLabel?: React.ReactNode\n fieldMap: FieldMap\n forceRender?: boolean\n isSortable?: boolean\n labels?: ArrayField['labels']\n maxRows?: ArrayField['maxRows']\n minRows?: ArrayField['minRows']\n name?: string\n validate?: ArrayFieldValidation\n width?: string\n} & Omit<FormFieldBase, 'validate'>\n\nexport type ArrayFieldLabelComponent = LabelComponent<'array'>\n\nexport type ArrayFieldDescriptionComponent = DescriptionComponent<'array'>\n\nexport type ArrayFieldErrorComponent = ErrorComponent<'array'>\n"],"names":[],"mappings":"AAuBA,WAA8D"}
@@ -1,4 +1,5 @@
1
1
  import type { Block, BlockField } from '../../fields/config/types.js';
2
+ import type { BlockFieldValidation } from '../../fields/validations.js';
2
3
  import type { ErrorComponent } from '../forms/Error.js';
3
4
  import type { FieldMap } from '../forms/FieldMap.js';
4
5
  import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
@@ -11,8 +12,9 @@ export type BlocksFieldProps = {
11
12
  minRows?: number;
12
13
  name?: string;
13
14
  slug?: string;
15
+ validate?: BlockFieldValidation;
14
16
  width?: string;
15
- } & FormFieldBase;
17
+ } & Omit<FormFieldBase, 'validate'>;
16
18
  export type ReducedBlock = {
17
19
  LabelComponent: Block['admin']['components']['Label'];
18
20
  custom?: Record<any, string>;
@@ -1 +1 @@
1
- {"version":3,"file":"Blocks.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Blocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,KAAK,EAAE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AG,cAAc,CAAC,QAAQ,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/fields/Blocks.ts"],"sourcesContent":["import type { Block, BlockField } from '../../fields/config/types.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { FieldMap } from '../forms/FieldMap.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type BlocksFieldProps = {\n blocks?: ReducedBlock[]\n forceRender?: boolean\n isSortable?: boolean\n labels?: BlockField['labels']\n maxRows?: number\n minRows?: number\n name?: string\n slug?: string\n width?: string\n} & FormFieldBase\n\nexport type ReducedBlock = {\n LabelComponent: Block['admin']['components']['Label']\n custom?: Record<any, string>\n fieldMap: FieldMap\n imageAltText?: string\n imageURL?: string\n labels: BlockField['labels']\n slug: string\n}\n\nexport type BlocksFieldLabelComponent = LabelComponent<'blocks'>\n\nexport type BlocksFieldDescriptionComponent = DescriptionComponent<'blocks'>\n\nexport type BlocksFieldErrorComponent = ErrorComponent<'blocks'>\n"],"names":[],"mappings":"AA+BA,WAAgE"}
1
+ {"version":3,"sources":["../../../src/admin/fields/Blocks.ts"],"sourcesContent":["import type { Block, BlockField } from '../../fields/config/types.js'\nimport type { BlockFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { FieldMap } from '../forms/FieldMap.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type BlocksFieldProps = {\n blocks?: ReducedBlock[]\n forceRender?: boolean\n isSortable?: boolean\n labels?: BlockField['labels']\n maxRows?: number\n minRows?: number\n name?: string\n slug?: string\n validate?: BlockFieldValidation\n width?: string\n} & Omit<FormFieldBase, 'validate'>\n\nexport type ReducedBlock = {\n LabelComponent: Block['admin']['components']['Label']\n custom?: Record<any, string>\n fieldMap: FieldMap\n imageAltText?: string\n imageURL?: string\n labels: BlockField['labels']\n slug: string\n}\n\nexport type BlocksFieldLabelComponent = LabelComponent<'blocks'>\n\nexport type BlocksFieldDescriptionComponent = DescriptionComponent<'blocks'>\n\nexport type BlocksFieldErrorComponent = ErrorComponent<'blocks'>\n"],"names":[],"mappings":"AAiCA,WAAgE"}
@@ -1,3 +1,4 @@
1
+ import type { CheckboxFieldValidation } from '../../fields/validations.js';
1
2
  import type { ErrorComponent } from '../forms/Error.js';
2
3
  import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
3
4
  export type CheckboxFieldProps = {
@@ -8,8 +9,9 @@ export type CheckboxFieldProps = {
8
9
  onChange?: (val: boolean) => void;
9
10
  partialChecked?: boolean;
10
11
  path?: string;
12
+ validate?: CheckboxFieldValidation;
11
13
  width?: string;
12
- } & FormFieldBase;
14
+ } & Omit<FormFieldBase, 'validate'>;
13
15
  export type CheckboxFieldLabelComponent = LabelComponent<'checkbox'>;
14
16
  export type CheckboxFieldDescriptionComponent = DescriptionComponent<'checkbox'>;
15
17
  export type CheckboxFieldErrorComponent = ErrorComponent<'checkbox'>;
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAA;IACjC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,aAAa,CAAA;AAEjB,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA;AAEpE,MAAM,MAAM,iCAAiC,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAA;AAEhF,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA"}
1
+ {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAA;IACjC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,uBAAuB,CAAA;IAClC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;AAEnC,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA;AAEpE,MAAM,MAAM,iCAAiC,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAA;AAEhF,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/fields/Checkbox.ts"],"sourcesContent":["import type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type CheckboxFieldProps = {\n checked?: boolean\n disableFormData?: boolean\n id?: string\n name?: string\n onChange?: (val: boolean) => void\n partialChecked?: boolean\n path?: string\n width?: string\n} & FormFieldBase\n\nexport type CheckboxFieldLabelComponent = LabelComponent<'checkbox'>\n\nexport type CheckboxFieldDescriptionComponent = DescriptionComponent<'checkbox'>\n\nexport type CheckboxFieldErrorComponent = ErrorComponent<'checkbox'>\n"],"names":[],"mappings":"AAkBA,WAAoE"}
1
+ {"version":3,"sources":["../../../src/admin/fields/Checkbox.ts"],"sourcesContent":["import type { CheckboxFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type CheckboxFieldProps = {\n checked?: boolean\n disableFormData?: boolean\n id?: string\n name?: string\n onChange?: (val: boolean) => void\n partialChecked?: boolean\n path?: string\n validate?: CheckboxFieldValidation\n width?: string\n} & Omit<FormFieldBase, 'validate'>\n\nexport type CheckboxFieldLabelComponent = LabelComponent<'checkbox'>\n\nexport type CheckboxFieldDescriptionComponent = DescriptionComponent<'checkbox'>\n\nexport type CheckboxFieldErrorComponent = ErrorComponent<'checkbox'>\n"],"names":[],"mappings":"AAoBA,WAAoE"}
@@ -1,4 +1,5 @@
1
1
  import type { CodeField } from '../../fields/config/types.js';
2
+ import type { CodeFieldValidation } from '../../fields/validations.js';
2
3
  import type { ErrorComponent } from '../forms/Error.js';
3
4
  import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
4
5
  export type CodeFieldProps = {
@@ -6,8 +7,9 @@ export type CodeFieldProps = {
6
7
  language?: CodeField['admin']['language'];
7
8
  name?: string;
8
9
  path?: string;
10
+ validate?: CodeFieldValidation;
9
11
  width: string;
10
- } & FormFieldBase;
12
+ } & Omit<FormFieldBase, 'validate'>;
11
13
  export type CodeFieldLabelComponent = LabelComponent<'code'>;
12
14
  export type CodeFieldDescriptionComponent = DescriptionComponent<'code'>;
13
15
  export type CodeFieldErrorComponent = ErrorComponent<'code'>;
@@ -1 +1 @@
1
- {"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Code.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,CAAA;IACnD,QAAQ,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,CAAA;IACzC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,GAAG,aAAa,CAAA;AAEjB,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;AAE5D,MAAM,MAAM,6BAA6B,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAA;AAExE,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA"}
1
+ {"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Code.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,CAAA;IACnD,QAAQ,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,CAAA;IACzC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,mBAAmB,CAAA;IAC9B,KAAK,EAAE,MAAM,CAAA;CACd,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;AAEnC,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;AAE5D,MAAM,MAAM,6BAA6B,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAA;AAExE,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/fields/Code.ts"],"sourcesContent":["import type { CodeField } from '../../fields/config/types.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type CodeFieldProps = {\n editorOptions?: CodeField['admin']['editorOptions']\n language?: CodeField['admin']['language']\n name?: string\n path?: string\n width: string\n} & FormFieldBase\n\nexport type CodeFieldLabelComponent = LabelComponent<'code'>\n\nexport type CodeFieldDescriptionComponent = DescriptionComponent<'code'>\n\nexport type CodeFieldErrorComponent = ErrorComponent<'code'>\n"],"names":[],"mappings":"AAgBA,WAA4D"}
1
+ {"version":3,"sources":["../../../src/admin/fields/Code.ts"],"sourcesContent":["import type { CodeField } from '../../fields/config/types.js'\nimport type { CodeFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type CodeFieldProps = {\n editorOptions?: CodeField['admin']['editorOptions']\n language?: CodeField['admin']['language']\n name?: string\n path?: string\n validate?: CodeFieldValidation\n width: string\n} & Omit<FormFieldBase, 'validate'>\n\nexport type CodeFieldLabelComponent = LabelComponent<'code'>\n\nexport type CodeFieldDescriptionComponent = DescriptionComponent<'code'>\n\nexport type CodeFieldErrorComponent = ErrorComponent<'code'>\n"],"names":[],"mappings":"AAkBA,WAA4D"}
@@ -1,4 +1,5 @@
1
1
  import type { DateField } from '../../fields/config/types.js';
2
+ import type { DateFieldValidation } from '../../fields/validations.js';
2
3
  import type { ErrorComponent } from '../forms/Error.js';
3
4
  import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
4
5
  export type DateFieldProps = {
@@ -6,8 +7,9 @@ export type DateFieldProps = {
6
7
  name?: string;
7
8
  path?: string;
8
9
  placeholder?: DateField['admin']['placeholder'] | string;
10
+ validate?: DateFieldValidation;
9
11
  width?: string;
10
- } & FormFieldBase;
12
+ } & Omit<FormFieldBase, 'validate'>;
11
13
  export type DateFieldLabelComponent = LabelComponent<'date'>;
12
14
  export type DateFieldDescriptionComponent = DescriptionComponent<'date'>;
13
15
  export type DateFieldErrorComponent = ErrorComponent<'date'>;
@@ -1 +1 @@
1
- {"version":3,"file":"Date.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Date.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;IACjC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,GAAG,MAAM,CAAA;IACxD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,aAAa,CAAA;AAEjB,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;AAE5D,MAAM,MAAM,6BAA6B,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAA;AAExE,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA"}
1
+ {"version":3,"file":"Date.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Date.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;IACjC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,GAAG,MAAM,CAAA;IACxD,QAAQ,CAAC,EAAE,mBAAmB,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;AAEnC,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;AAE5D,MAAM,MAAM,6BAA6B,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAA;AAExE,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/fields/Date.ts"],"sourcesContent":["import type { DateField } from '../../fields/config/types.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type DateFieldProps = {\n date?: DateField['admin']['date']\n name?: string\n path?: string\n placeholder?: DateField['admin']['placeholder'] | string\n width?: string\n} & FormFieldBase\n\nexport type DateFieldLabelComponent = LabelComponent<'date'>\n\nexport type DateFieldDescriptionComponent = DescriptionComponent<'date'>\n\nexport type DateFieldErrorComponent = ErrorComponent<'date'>\n"],"names":[],"mappings":"AAgBA,WAA4D"}
1
+ {"version":3,"sources":["../../../src/admin/fields/Date.ts"],"sourcesContent":["import type { DateField } from '../../fields/config/types.js'\nimport type { DateFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type DateFieldProps = {\n date?: DateField['admin']['date']\n name?: string\n path?: string\n placeholder?: DateField['admin']['placeholder'] | string\n validate?: DateFieldValidation\n width?: string\n} & Omit<FormFieldBase, 'validate'>\n\nexport type DateFieldLabelComponent = LabelComponent<'date'>\n\nexport type DateFieldDescriptionComponent = DescriptionComponent<'date'>\n\nexport type DateFieldErrorComponent = ErrorComponent<'date'>\n"],"names":[],"mappings":"AAkBA,WAA4D"}
@@ -1,4 +1,5 @@
1
1
  import type { EmailField } from '../../fields/config/types.js';
2
+ import type { EmailFieldValidation } from '../../fields/validations.js';
2
3
  import type { ErrorComponent } from '../forms/Error.js';
3
4
  import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
4
5
  export type EmailFieldProps = {
@@ -6,8 +7,9 @@ export type EmailFieldProps = {
6
7
  name?: string;
7
8
  path?: string;
8
9
  placeholder?: EmailField['admin']['placeholder'];
10
+ validate?: EmailFieldValidation;
9
11
  width?: string;
10
- } & FormFieldBase;
12
+ } & Omit<FormFieldBase, 'validate'>;
11
13
  export type EmailFieldLabelComponent = LabelComponent<'email'>;
12
14
  export type EmailFieldDescriptionComponent = DescriptionComponent<'email'>;
13
15
  export type EmailFieldErrorComponent = ErrorComponent<'email'>;
@@ -1 +1 @@
1
- {"version":3,"file":"Email.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Email.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAA;IAChD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,aAAa,CAAA;AAEjB,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA;AAE9D,MAAM,MAAM,8BAA8B,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAA;AAE1E,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA"}
1
+ {"version":3,"file":"Email.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Email.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAA;IAChD,QAAQ,CAAC,EAAE,oBAAoB,CAAA;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;AAEnC,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA;AAE9D,MAAM,MAAM,8BAA8B,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAA;AAE1E,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/fields/Email.ts"],"sourcesContent":["import type { EmailField } from '../../fields/config/types.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type EmailFieldProps = {\n autoComplete?: string\n name?: string\n path?: string\n placeholder?: EmailField['admin']['placeholder']\n width?: string\n} & FormFieldBase\n\nexport type EmailFieldLabelComponent = LabelComponent<'email'>\n\nexport type EmailFieldDescriptionComponent = DescriptionComponent<'email'>\n\nexport type EmailFieldErrorComponent = ErrorComponent<'email'>\n"],"names":[],"mappings":"AAgBA,WAA8D"}
1
+ {"version":3,"sources":["../../../src/admin/fields/Email.ts"],"sourcesContent":["import type { EmailField } from '../../fields/config/types.js'\nimport type { EmailFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type EmailFieldProps = {\n autoComplete?: string\n name?: string\n path?: string\n placeholder?: EmailField['admin']['placeholder']\n validate?: EmailFieldValidation\n width?: string\n} & Omit<FormFieldBase, 'validate'>\n\nexport type EmailFieldLabelComponent = LabelComponent<'email'>\n\nexport type EmailFieldDescriptionComponent = DescriptionComponent<'email'>\n\nexport type EmailFieldErrorComponent = ErrorComponent<'email'>\n"],"names":[],"mappings":"AAkBA,WAA8D"}
@@ -1,4 +1,5 @@
1
1
  import type { JSONField } from '../../fields/config/types.js';
2
+ import type { JSONFieldValidation } from '../../fields/validations.js';
2
3
  import type { ErrorComponent } from '../forms/Error.js';
3
4
  import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
4
5
  export type JSONFieldProps = {
@@ -6,8 +7,9 @@ export type JSONFieldProps = {
6
7
  jsonSchema?: Record<string, unknown>;
7
8
  name?: string;
8
9
  path?: string;
10
+ validate?: JSONFieldValidation;
9
11
  width?: string;
10
- } & FormFieldBase;
12
+ } & Omit<FormFieldBase, 'validate'>;
11
13
  export type JSONFieldLabelComponent = LabelComponent<'json'>;
12
14
  export type JSONFieldDescriptionComponent = DescriptionComponent<'json'>;
13
15
  export type JSONFieldErrorComponent = ErrorComponent<'json'>;
@@ -1 +1 @@
1
- {"version":3,"file":"JSON.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/JSON.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,CAAA;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,aAAa,CAAA;AAEjB,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;AAE5D,MAAM,MAAM,6BAA6B,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAA;AAExE,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA"}
1
+ {"version":3,"file":"JSON.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/JSON.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,CAAA;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,mBAAmB,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;AAEnC,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;AAE5D,MAAM,MAAM,6BAA6B,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAA;AAExE,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/fields/JSON.ts"],"sourcesContent":["import type { JSONField } from '../../fields/config/types.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type JSONFieldProps = {\n editorOptions?: JSONField['admin']['editorOptions']\n jsonSchema?: Record<string, unknown>\n name?: string\n path?: string\n width?: string\n} & FormFieldBase\n\nexport type JSONFieldLabelComponent = LabelComponent<'json'>\n\nexport type JSONFieldDescriptionComponent = DescriptionComponent<'json'>\n\nexport type JSONFieldErrorComponent = ErrorComponent<'json'>\n"],"names":[],"mappings":"AAgBA,WAA4D"}
1
+ {"version":3,"sources":["../../../src/admin/fields/JSON.ts"],"sourcesContent":["import type { JSONField } from '../../fields/config/types.js'\nimport type { JSONFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type JSONFieldProps = {\n editorOptions?: JSONField['admin']['editorOptions']\n jsonSchema?: Record<string, unknown>\n name?: string\n path?: string\n validate?: JSONFieldValidation\n width?: string\n} & Omit<FormFieldBase, 'validate'>\n\nexport type JSONFieldLabelComponent = LabelComponent<'json'>\n\nexport type JSONFieldDescriptionComponent = DescriptionComponent<'json'>\n\nexport type JSONFieldErrorComponent = ErrorComponent<'json'>\n"],"names":[],"mappings":"AAkBA,WAA4D"}
@@ -1,4 +1,5 @@
1
1
  import type { NumberField } from '../../fields/config/types.js';
2
+ import type { NumberFieldValidation } from '../../fields/validations.js';
2
3
  import type { ErrorComponent } from '../forms/Error.js';
3
4
  import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
4
5
  export type NumberFieldProps = {
@@ -11,8 +12,9 @@ export type NumberFieldProps = {
11
12
  path?: string;
12
13
  placeholder?: NumberField['admin']['placeholder'];
13
14
  step?: number;
15
+ validate?: NumberFieldValidation;
14
16
  width?: string;
15
- } & FormFieldBase;
17
+ } & Omit<FormFieldBase, 'validate'>;
16
18
  export type NumberFieldLabelComponent = LabelComponent<'number'>;
17
19
  export type NumberFieldDescriptionComponent = DescriptionComponent<'number'>;
18
20
  export type NumberFieldErrorComponent = ErrorComponent<'number'>;
@@ -1 +1 @@
1
- {"version":3,"file":"Number.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Number.ts"],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AM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAA;IACjD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,qBAAqB,CAAA;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;AAEnC,MAAM,MAAM,yBAAyB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAA;AAEhE,MAAM,MAAM,+BAA+B,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAA;AAE5E,MAAM,MAAM,yBAAyB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/fields/Number.ts"],"sourcesContent":["import type { NumberField } from '../../fields/config/types.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type NumberFieldProps = {\n hasMany?: boolean\n max?: number\n maxRows?: number\n min?: number\n name?: string\n onChange?: (e: number) => void\n path?: string\n placeholder?: NumberField['admin']['placeholder']\n step?: number\n width?: string\n} & FormFieldBase\n\nexport type NumberFieldLabelComponent = LabelComponent<'number'>\n\nexport type NumberFieldDescriptionComponent = DescriptionComponent<'number'>\n\nexport type NumberFieldErrorComponent = ErrorComponent<'number'>\n"],"names":[],"mappings":"AAqBA,WAAgE"}
1
+ {"version":3,"sources":["../../../src/admin/fields/Number.ts"],"sourcesContent":["import type { NumberField } from '../../fields/config/types.js'\nimport type { NumberFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type NumberFieldProps = {\n hasMany?: boolean\n max?: number\n maxRows?: number\n min?: number\n name?: string\n onChange?: (e: number) => void\n path?: string\n placeholder?: NumberField['admin']['placeholder']\n step?: number\n validate?: NumberFieldValidation\n width?: string\n} & Omit<FormFieldBase, 'validate'>\n\nexport type NumberFieldLabelComponent = LabelComponent<'number'>\n\nexport type NumberFieldDescriptionComponent = DescriptionComponent<'number'>\n\nexport type NumberFieldErrorComponent = ErrorComponent<'number'>\n"],"names":[],"mappings":"AAuBA,WAAgE"}
@@ -1,3 +1,4 @@
1
+ import type { PointFieldValidation } from '../../fields/validations.js';
1
2
  import type { ErrorComponent } from '../forms/Error.js';
2
3
  import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
3
4
  export type PointFieldProps = {
@@ -5,8 +6,9 @@ export type PointFieldProps = {
5
6
  path?: string;
6
7
  placeholder?: string;
7
8
  step?: number;
9
+ validate?: PointFieldValidation;
8
10
  width?: string;
9
- } & FormFieldBase;
11
+ } & Omit<FormFieldBase, 'validate'>;
10
12
  export type PointFieldLabelComponent = LabelComponent<'point'>;
11
13
  export type PointFieldDescriptionComponent = DescriptionComponent<'point'>;
12
14
  export type PointFieldErrorComponent = ErrorComponent<'point'>;
@@ -1 +1 @@
1
- {"version":3,"file":"Point.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Point.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,aAAa,CAAA;AAEjB,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA;AAE9D,MAAM,MAAM,8BAA8B,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAA;AAE1E,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA"}
1
+ {"version":3,"file":"Point.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Point.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,oBAAoB,CAAA;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;AAEnC,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA;AAE9D,MAAM,MAAM,8BAA8B,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAA;AAE1E,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/fields/Point.ts"],"sourcesContent":["import type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type PointFieldProps = {\n name?: string\n path?: string\n placeholder?: string\n step?: number\n width?: string\n} & FormFieldBase\n\nexport type PointFieldLabelComponent = LabelComponent<'point'>\n\nexport type PointFieldDescriptionComponent = DescriptionComponent<'point'>\n\nexport type PointFieldErrorComponent = ErrorComponent<'point'>\n"],"names":[],"mappings":"AAeA,WAA8D"}
1
+ {"version":3,"sources":["../../../src/admin/fields/Point.ts"],"sourcesContent":["import type { PointFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type PointFieldProps = {\n name?: string\n path?: string\n placeholder?: string\n step?: number\n validate?: PointFieldValidation\n width?: string\n} & Omit<FormFieldBase, 'validate'>\n\nexport type PointFieldLabelComponent = LabelComponent<'point'>\n\nexport type PointFieldDescriptionComponent = DescriptionComponent<'point'>\n\nexport type PointFieldErrorComponent = ErrorComponent<'point'>\n"],"names":[],"mappings":"AAiBA,WAA8D"}
@@ -1,4 +1,5 @@
1
1
  import type { Option } from '../../fields/config/types.js';
2
+ import type { RadioFieldValidation } from '../../fields/validations.js';
2
3
  import type { ErrorComponent } from '../forms/Error.js';
3
4
  import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
4
5
  export type RadioFieldProps = {
@@ -7,9 +8,10 @@ export type RadioFieldProps = {
7
8
  onChange?: OnChange;
8
9
  options?: Option[];
9
10
  path?: string;
11
+ validate?: RadioFieldValidation;
10
12
  value?: string;
11
13
  width?: string;
12
- } & FormFieldBase;
14
+ } & Omit<FormFieldBase, 'validate'>;
13
15
  export type OnChange<T = string> = (value: T) => void;
14
16
  export type RadioFieldLabelComponent = LabelComponent<'radio'>;
15
17
  export type RadioFieldDescriptionComponent = DescriptionComponent<'radio'>;
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Radio.ts"],"names":[],"mappings":"AAAA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I,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,oBAAoB,CAAA;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;AAEnC,MAAM,MAAM,QAAQ,CAAC,CAAC,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;AAErD,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA;AAE9D,MAAM,MAAM,8BAA8B,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAA;AAE1E,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/fields/Radio.ts"],"sourcesContent":["import type { Option } from '../../fields/config/types.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type RadioFieldProps = {\n layout?: 'horizontal' | 'vertical'\n name?: string\n onChange?: OnChange\n options?: Option[]\n path?: string\n value?: string\n width?: string\n} & FormFieldBase\n\nexport type OnChange<T = string> = (value: T) => void\n\nexport type RadioFieldLabelComponent = LabelComponent<'radio'>\n\nexport type RadioFieldDescriptionComponent = DescriptionComponent<'radio'>\n\nexport type RadioFieldErrorComponent = ErrorComponent<'radio'>\n"],"names":[],"mappings":"AAoBA,WAA8D"}
1
+ {"version":3,"sources":["../../../src/admin/fields/Radio.ts"],"sourcesContent":["import type { Option } from '../../fields/config/types.js'\nimport type { RadioFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type RadioFieldProps = {\n layout?: 'horizontal' | 'vertical'\n name?: string\n onChange?: OnChange\n options?: Option[]\n path?: string\n validate?: RadioFieldValidation\n value?: string\n width?: string\n} & Omit<FormFieldBase, 'validate'>\n\nexport type OnChange<T = string> = (value: T) => void\n\nexport type RadioFieldLabelComponent = LabelComponent<'radio'>\n\nexport type RadioFieldDescriptionComponent = DescriptionComponent<'radio'>\n\nexport type RadioFieldErrorComponent = ErrorComponent<'radio'>\n"],"names":[],"mappings":"AAsBA,WAA8D"}
@@ -1,4 +1,5 @@
1
1
  import type { RelationshipField } from '../../fields/config/types.js';
2
+ import type { RelationshipFieldValidation } from '../../fields/validations.js';
2
3
  import type { ErrorComponent } from '../forms/Error.js';
3
4
  import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
4
5
  export type RelationshipFieldProps = {
@@ -8,8 +9,9 @@ export type RelationshipFieldProps = {
8
9
  name: string;
9
10
  relationTo?: RelationshipField['relationTo'];
10
11
  sortOptions?: RelationshipField['admin']['sortOptions'];
12
+ validate?: RelationshipFieldValidation;
11
13
  width?: string;
12
- } & FormFieldBase;
14
+ } & Omit<FormFieldBase, 'validate'>;
13
15
  export type RelationshipFieldLabelComponent = LabelComponent<'relationship'>;
14
16
  export type RelationshipFieldDescriptionComponent = DescriptionComponent<'relationship'>;
15
17
  export type RelationshipFieldErrorComponent = ErrorComponent<'relationship'>;
@@ -1 +1 @@
1
- {"version":3,"file":"Relationship.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Relationship.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,sBAAsB,GAAG;IACnC,WAAW,CAAC,EAAE,iBAAi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,EAAE,2BAA2B,CAAA;IACtC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;AAEnC,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAAC,cAAc,CAAC,CAAA;AAE5E,MAAM,MAAM,qCAAqC,GAAG,oBAAoB,CAAC,cAAc,CAAC,CAAA;AAExF,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAAC,cAAc,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/fields/Relationship.ts"],"sourcesContent":["import type { RelationshipField } from '../../fields/config/types.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type RelationshipFieldProps = {\n allowCreate?: RelationshipField['admin']['allowCreate']\n hasMany?: boolean\n isSortable?: boolean\n name: string\n relationTo?: RelationshipField['relationTo']\n sortOptions?: RelationshipField['admin']['sortOptions']\n width?: string\n} & FormFieldBase\n\nexport type RelationshipFieldLabelComponent = LabelComponent<'relationship'>\n\nexport type RelationshipFieldDescriptionComponent = DescriptionComponent<'relationship'>\n\nexport type RelationshipFieldErrorComponent = ErrorComponent<'relationship'>\n"],"names":[],"mappings":"AAkBA,WAA4E"}
1
+ {"version":3,"sources":["../../../src/admin/fields/Relationship.ts"],"sourcesContent":["import type { RelationshipField } from '../../fields/config/types.js'\nimport type { RelationshipFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type RelationshipFieldProps = {\n allowCreate?: RelationshipField['admin']['allowCreate']\n hasMany?: boolean\n isSortable?: boolean\n name: string\n relationTo?: RelationshipField['relationTo']\n sortOptions?: RelationshipField['admin']['sortOptions']\n validate?: RelationshipFieldValidation\n width?: string\n} & Omit<FormFieldBase, 'validate'>\n\nexport type RelationshipFieldLabelComponent = LabelComponent<'relationship'>\n\nexport type RelationshipFieldDescriptionComponent = DescriptionComponent<'relationship'>\n\nexport type RelationshipFieldErrorComponent = ErrorComponent<'relationship'>\n"],"names":[],"mappings":"AAoBA,WAA4E"}
@@ -1,11 +1,13 @@
1
+ import type { RichTextFieldValidation } from '../../fields/validations.js';
1
2
  import type { ErrorComponent } from '../forms/Error.js';
2
3
  import type { MappedField } from '../forms/FieldMap.js';
3
4
  import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
4
5
  export type RichTextComponentProps = {
5
6
  name: string;
6
7
  richTextComponentMap?: Map<string, MappedField[] | React.ReactNode>;
8
+ validate?: RichTextFieldValidation;
7
9
  width?: string;
8
- } & FormFieldBase;
10
+ } & Omit<FormFieldBase, 'validate'>;
9
11
  export type RichTextFieldLabelComponent = LabelComponent<'richText'>;
10
12
  export type RichTextFieldDescriptionComponent = DescriptionComponent<'richText'>;
11
13
  export type RichTextFieldErrorComponent = ErrorComponent<'richText'>;
@@ -1 +1 @@
1
- {"version":3,"file":"RichText.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/RichText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAA;IACZ,oBAAoB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC,CAAA;IACnE,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,aAAa,CAAA;AAEjB,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA;AAEpE,MAAM,MAAM,iCAAiC,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAA;AAEhF,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA"}
1
+ {"version":3,"file":"RichText.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/RichText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAA;IACZ,oBAAoB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC,CAAA;IACnE,QAAQ,CAAC,EAAE,uBAAuB,CAAA;IAClC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;AAEnC,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA;AAEpE,MAAM,MAAM,iCAAiC,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAA;AAEhF,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/fields/RichText.ts"],"sourcesContent":["import type { ErrorComponent } from '../forms/Error.js'\nimport type { MappedField } from '../forms/FieldMap.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type RichTextComponentProps = {\n name: string\n richTextComponentMap?: Map<string, MappedField[] | React.ReactNode>\n width?: string\n} & FormFieldBase\n\nexport type RichTextFieldLabelComponent = LabelComponent<'richText'>\n\nexport type RichTextFieldDescriptionComponent = DescriptionComponent<'richText'>\n\nexport type RichTextFieldErrorComponent = ErrorComponent<'richText'>\n"],"names":[],"mappings":"AAcA,WAAoE"}
1
+ {"version":3,"sources":["../../../src/admin/fields/RichText.ts"],"sourcesContent":["import type { RichTextFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { MappedField } from '../forms/FieldMap.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type RichTextComponentProps = {\n name: string\n richTextComponentMap?: Map<string, MappedField[] | React.ReactNode>\n validate?: RichTextFieldValidation\n width?: string\n} & Omit<FormFieldBase, 'validate'>\n\nexport type RichTextFieldLabelComponent = LabelComponent<'richText'>\n\nexport type RichTextFieldDescriptionComponent = DescriptionComponent<'richText'>\n\nexport type RichTextFieldErrorComponent = ErrorComponent<'richText'>\n"],"names":[],"mappings":"AAgBA,WAAoE"}
@@ -1,4 +1,5 @@
1
1
  import type { Option } from '../../fields/config/types.js';
2
+ import type { SelectFieldValidation } from '../../fields/validations.js';
2
3
  import type { ErrorComponent } from '../forms/Error.js';
3
4
  import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
4
5
  export type SelectFieldProps = {
@@ -9,9 +10,10 @@ export type SelectFieldProps = {
9
10
  onChange?: (e: string | string[]) => void;
10
11
  options?: Option[];
11
12
  path?: string;
13
+ validate?: SelectFieldValidation;
12
14
  value?: string;
13
15
  width?: string;
14
- } & FormFieldBase;
16
+ } & Omit<FormFieldBase, 'validate'>;
15
17
  export type SelectFieldLabelComponent = LabelComponent<'select'>;
16
18
  export type SelectFieldDescriptionComponent = DescriptionComponent<'select'>;
17
19
  export type SelectFieldErrorComponent = ErrorComponent<'select'>;
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Select.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAA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A;IACb,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAA;IACzC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,qBAAqB,CAAA;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;AAEnC,MAAM,MAAM,yBAAyB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAA;AAEhE,MAAM,MAAM,+BAA+B,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAA;AAE5E,MAAM,MAAM,yBAAyB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/fields/Select.ts"],"sourcesContent":["import type { Option } from '../../fields/config/types.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type SelectFieldProps = {\n hasMany?: boolean\n isClearable?: boolean\n isSortable?: boolean\n name?: string\n onChange?: (e: string | string[]) => void\n options?: Option[]\n path?: string\n value?: string\n width?: string\n} & FormFieldBase\n\nexport type SelectFieldLabelComponent = LabelComponent<'select'>\n\nexport type SelectFieldDescriptionComponent = DescriptionComponent<'select'>\n\nexport type SelectFieldErrorComponent = ErrorComponent<'select'>\n"],"names":[],"mappings":"AAoBA,WAAgE"}
1
+ {"version":3,"sources":["../../../src/admin/fields/Select.ts"],"sourcesContent":["import type { Option } from '../../fields/config/types.js'\nimport type { SelectFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type SelectFieldProps = {\n hasMany?: boolean\n isClearable?: boolean\n isSortable?: boolean\n name?: string\n onChange?: (e: string | string[]) => void\n options?: Option[]\n path?: string\n validate?: SelectFieldValidation\n value?: string\n width?: string\n} & Omit<FormFieldBase, 'validate'>\n\nexport type SelectFieldLabelComponent = LabelComponent<'select'>\n\nexport type SelectFieldDescriptionComponent = DescriptionComponent<'select'>\n\nexport type SelectFieldErrorComponent = ErrorComponent<'select'>\n"],"names":[],"mappings":"AAsBA,WAAgE"}
@@ -1,4 +1,5 @@
1
1
  import type { TextField } from '../../fields/config/types.js';
2
+ import type { TextFieldValidation } from '../../fields/validations.js';
2
3
  import type { ErrorComponent } from '../forms/Error.js';
3
4
  import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
4
5
  export type TextFieldProps = {
@@ -12,8 +13,9 @@ export type TextFieldProps = {
12
13
  onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
13
14
  path?: string;
14
15
  placeholder?: TextField['admin']['placeholder'];
16
+ validate?: TextFieldValidation;
15
17
  width?: string;
16
- } & FormFieldBase;
18
+ } & Omit<FormFieldBase, 'validate'>;
17
19
  export type TextFieldLabelComponent = LabelComponent<'text'>;
18
20
  export type TextFieldDescriptionComponent = DescriptionComponent<'text'>;
19
21
  export type TextFieldErrorComponent = ErrorComponent<'text'>;
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAA;IACnD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO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C,EAAE,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAA;IACxD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAA;IAC/C,QAAQ,CAAC,EAAE,mBAAmB,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;AAEnC,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;AAE5D,MAAM,MAAM,6BAA6B,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAA;AAExE,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/fields/Text.ts"],"sourcesContent":["import type { TextField } from '../../fields/config/types.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type TextFieldProps = {\n hasMany?: boolean\n inputRef?: React.MutableRefObject<HTMLInputElement>\n maxLength?: number\n maxRows?: number\n minLength?: number\n minRows?: number\n name?: string\n onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>\n path?: string\n placeholder?: TextField['admin']['placeholder']\n width?: string\n} & FormFieldBase\n\nexport type TextFieldLabelComponent = LabelComponent<'text'>\n\nexport type TextFieldDescriptionComponent = DescriptionComponent<'text'>\n\nexport type TextFieldErrorComponent = ErrorComponent<'text'>\n"],"names":[],"mappings":"AAsBA,WAA4D"}
1
+ {"version":3,"sources":["../../../src/admin/fields/Text.ts"],"sourcesContent":["import type { TextField } from '../../fields/config/types.js'\nimport type { TextFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type TextFieldProps = {\n hasMany?: boolean\n inputRef?: React.MutableRefObject<HTMLInputElement>\n maxLength?: number\n maxRows?: number\n minLength?: number\n minRows?: number\n name?: string\n onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>\n path?: string\n placeholder?: TextField['admin']['placeholder']\n validate?: TextFieldValidation\n width?: string\n} & Omit<FormFieldBase, 'validate'>\n\nexport type TextFieldLabelComponent = LabelComponent<'text'>\n\nexport type TextFieldDescriptionComponent = DescriptionComponent<'text'>\n\nexport type TextFieldErrorComponent = ErrorComponent<'text'>\n"],"names":[],"mappings":"AAwBA,WAA4D"}