payload 3.0.0-beta.78 → 3.0.0-beta.79

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 (234) hide show
  1. package/bin.js +33 -10
  2. package/dist/admin/RichText.d.ts +20 -17
  3. package/dist/admin/RichText.d.ts.map +1 -1
  4. package/dist/admin/RichText.js.map +1 -1
  5. package/dist/admin/elements/Cell.d.ts +11 -26
  6. package/dist/admin/elements/Cell.d.ts.map +1 -1
  7. package/dist/admin/elements/Cell.js.map +1 -1
  8. package/dist/admin/elements/Tab.d.ts +16 -15
  9. package/dist/admin/elements/Tab.d.ts.map +1 -1
  10. package/dist/admin/elements/Tab.js.map +1 -1
  11. package/dist/admin/fields/Array.d.ts +6 -13
  12. package/dist/admin/fields/Array.d.ts.map +1 -1
  13. package/dist/admin/fields/Array.js.map +1 -1
  14. package/dist/admin/fields/Blocks.d.ts +8 -25
  15. package/dist/admin/fields/Blocks.d.ts.map +1 -1
  16. package/dist/admin/fields/Blocks.js.map +1 -1
  17. package/dist/admin/fields/Checkbox.d.ts +9 -9
  18. package/dist/admin/fields/Checkbox.d.ts.map +1 -1
  19. package/dist/admin/fields/Checkbox.js.map +1 -1
  20. package/dist/admin/fields/Code.d.ts +5 -7
  21. package/dist/admin/fields/Code.d.ts.map +1 -1
  22. package/dist/admin/fields/Code.js.map +1 -1
  23. package/dist/admin/fields/Collapsible.d.ts +3 -4
  24. package/dist/admin/fields/Collapsible.d.ts.map +1 -1
  25. package/dist/admin/fields/Collapsible.js.map +1 -1
  26. package/dist/admin/fields/Date.d.ts +4 -7
  27. package/dist/admin/fields/Date.d.ts.map +1 -1
  28. package/dist/admin/fields/Date.js.map +1 -1
  29. package/dist/admin/fields/Email.d.ts +5 -7
  30. package/dist/admin/fields/Email.d.ts.map +1 -1
  31. package/dist/admin/fields/Email.js.map +1 -1
  32. package/dist/admin/fields/Group.d.ts +3 -6
  33. package/dist/admin/fields/Group.d.ts.map +1 -1
  34. package/dist/admin/fields/Group.js.map +1 -1
  35. package/dist/admin/fields/Hidden.d.ts +7 -5
  36. package/dist/admin/fields/Hidden.d.ts.map +1 -1
  37. package/dist/admin/fields/Hidden.js.map +1 -1
  38. package/dist/admin/fields/JSON.d.ts +4 -7
  39. package/dist/admin/fields/JSON.d.ts.map +1 -1
  40. package/dist/admin/fields/JSON.js.map +1 -1
  41. package/dist/admin/fields/Number.d.ts +5 -12
  42. package/dist/admin/fields/Number.d.ts.map +1 -1
  43. package/dist/admin/fields/Number.js.map +1 -1
  44. package/dist/admin/fields/Point.d.ts +4 -6
  45. package/dist/admin/fields/Point.d.ts.map +1 -1
  46. package/dist/admin/fields/Point.js.map +1 -1
  47. package/dist/admin/fields/Radio.d.ts +6 -9
  48. package/dist/admin/fields/Radio.d.ts.map +1 -1
  49. package/dist/admin/fields/Radio.js.map +1 -1
  50. package/dist/admin/fields/Relationship.d.ts +4 -9
  51. package/dist/admin/fields/Relationship.d.ts.map +1 -1
  52. package/dist/admin/fields/Relationship.js.map +1 -1
  53. package/dist/admin/fields/RichText.d.ts +5 -6
  54. package/dist/admin/fields/RichText.d.ts.map +1 -1
  55. package/dist/admin/fields/RichText.js.map +1 -1
  56. package/dist/admin/fields/Row.d.ts +3 -4
  57. package/dist/admin/fields/Row.d.ts.map +1 -1
  58. package/dist/admin/fields/Row.js.map +1 -1
  59. package/dist/admin/fields/Select.d.ts +6 -11
  60. package/dist/admin/fields/Select.d.ts.map +1 -1
  61. package/dist/admin/fields/Select.js.map +1 -1
  62. package/dist/admin/fields/Tabs.d.ts +8 -12
  63. package/dist/admin/fields/Tabs.d.ts.map +1 -1
  64. package/dist/admin/fields/Tabs.js.map +1 -1
  65. package/dist/admin/fields/Text.d.ts +7 -13
  66. package/dist/admin/fields/Text.d.ts.map +1 -1
  67. package/dist/admin/fields/Text.js.map +1 -1
  68. package/dist/admin/fields/Textarea.d.ts +7 -9
  69. package/dist/admin/fields/Textarea.d.ts.map +1 -1
  70. package/dist/admin/fields/Textarea.js.map +1 -1
  71. package/dist/admin/fields/Upload.d.ts +6 -7
  72. package/dist/admin/fields/Upload.d.ts.map +1 -1
  73. package/dist/admin/fields/Upload.js.map +1 -1
  74. package/dist/admin/forms/Error.d.ts +10 -10
  75. package/dist/admin/forms/Error.d.ts.map +1 -1
  76. package/dist/admin/forms/Error.js.map +1 -1
  77. package/dist/admin/forms/Field.d.ts +17 -24
  78. package/dist/admin/forms/Field.d.ts.map +1 -1
  79. package/dist/admin/forms/Field.js +1 -0
  80. package/dist/admin/forms/Field.js.map +1 -1
  81. package/dist/admin/forms/FieldDescription.d.ts +10 -9
  82. package/dist/admin/forms/FieldDescription.d.ts.map +1 -1
  83. package/dist/admin/forms/FieldDescription.js.map +1 -1
  84. package/dist/admin/forms/Label.d.ts +14 -15
  85. package/dist/admin/forms/Label.d.ts.map +1 -1
  86. package/dist/admin/forms/Label.js.map +1 -1
  87. package/dist/admin/types.d.ts +30 -11
  88. package/dist/admin/types.d.ts.map +1 -1
  89. package/dist/admin/types.js.map +1 -1
  90. package/dist/admin/views/types.d.ts +21 -13
  91. package/dist/admin/views/types.d.ts.map +1 -1
  92. package/dist/admin/views/types.js.map +1 -1
  93. package/dist/auth/baseFields/apiKey.js +2 -2
  94. package/dist/auth/baseFields/apiKey.js.map +1 -1
  95. package/dist/auth/baseFields/email.js +1 -1
  96. package/dist/auth/baseFields/email.js.map +1 -1
  97. package/dist/auth/baseFields/username.js +1 -1
  98. package/dist/auth/baseFields/username.js.map +1 -1
  99. package/dist/auth/baseFields/verification.js +1 -1
  100. package/dist/auth/baseFields/verification.js.map +1 -1
  101. package/dist/bin/generateImportMap/index.d.ts +47 -0
  102. package/dist/bin/generateImportMap/index.d.ts.map +1 -0
  103. package/dist/bin/generateImportMap/index.js +129 -0
  104. package/dist/bin/generateImportMap/index.js.map +1 -0
  105. package/dist/bin/generateImportMap/iterateCollections.d.ts +12 -0
  106. package/dist/bin/generateImportMap/iterateCollections.d.ts.map +1 -0
  107. package/dist/bin/generateImportMap/iterateCollections.js +41 -0
  108. package/dist/bin/generateImportMap/iterateCollections.js.map +1 -0
  109. package/dist/bin/generateImportMap/iterateConfig.d.ts +10 -0
  110. package/dist/bin/generateImportMap/iterateConfig.d.ts.map +1 -0
  111. package/dist/bin/generateImportMap/iterateConfig.js +75 -0
  112. package/dist/bin/generateImportMap/iterateConfig.js.map +1 -0
  113. package/dist/bin/generateImportMap/iterateFields.d.ts +12 -0
  114. package/dist/bin/generateImportMap/iterateFields.d.ts.map +1 -0
  115. package/dist/bin/generateImportMap/iterateFields.js +56 -0
  116. package/dist/bin/generateImportMap/iterateFields.js.map +1 -0
  117. package/dist/bin/generateImportMap/iterateGlobals.d.ts +12 -0
  118. package/dist/bin/generateImportMap/iterateGlobals.d.ts.map +1 -0
  119. package/dist/bin/generateImportMap/iterateGlobals.js +34 -0
  120. package/dist/bin/generateImportMap/iterateGlobals.js.map +1 -0
  121. package/dist/bin/generateImportMap/parsePayloadComponent.d.ts +6 -0
  122. package/dist/bin/generateImportMap/parsePayloadComponent.d.ts.map +1 -0
  123. package/dist/bin/generateImportMap/parsePayloadComponent.js +19 -0
  124. package/dist/bin/generateImportMap/parsePayloadComponent.js.map +1 -0
  125. package/dist/bin/index.d.ts.map +1 -1
  126. package/dist/bin/index.js +35 -4
  127. package/dist/bin/index.js.map +1 -1
  128. package/dist/collections/config/client.d.ts +32 -308
  129. package/dist/collections/config/client.d.ts.map +1 -1
  130. package/dist/collections/config/client.js +1 -82
  131. package/dist/collections/config/client.js.map +1 -1
  132. package/dist/collections/config/types.d.ts +9 -9
  133. package/dist/collections/config/types.d.ts.map +1 -1
  134. package/dist/collections/config/types.js.map +1 -1
  135. package/dist/config/client.d.ts +12 -6
  136. package/dist/config/client.d.ts.map +1 -1
  137. package/dist/config/client.js +1 -49
  138. package/dist/config/client.js.map +1 -1
  139. package/dist/config/defaults.d.ts.map +1 -1
  140. package/dist/config/defaults.js +4 -0
  141. package/dist/config/defaults.js.map +1 -1
  142. package/dist/config/types.d.ts +111 -52
  143. package/dist/config/types.d.ts.map +1 -1
  144. package/dist/config/types.js.map +1 -1
  145. package/dist/exports/node.d.ts +0 -1
  146. package/dist/exports/node.d.ts.map +1 -1
  147. package/dist/exports/node.js +0 -1
  148. package/dist/exports/node.js.map +1 -1
  149. package/dist/exports/shared.d.ts +2 -1
  150. package/dist/exports/shared.d.ts.map +1 -1
  151. package/dist/exports/shared.js +2 -1
  152. package/dist/exports/shared.js.map +1 -1
  153. package/dist/fields/config/client.d.ts +3 -1642
  154. package/dist/fields/config/client.d.ts.map +1 -1
  155. package/dist/fields/config/client.js +1 -81
  156. package/dist/fields/config/client.js.map +1 -1
  157. package/dist/fields/config/sanitize.d.ts.map +1 -1
  158. package/dist/fields/config/sanitize.js +23 -22
  159. package/dist/fields/config/sanitize.js.map +1 -1
  160. package/dist/fields/config/types.d.ts +385 -56
  161. package/dist/fields/config/types.d.ts.map +1 -1
  162. package/dist/fields/config/types.js +3 -0
  163. package/dist/fields/config/types.js.map +1 -1
  164. package/dist/globals/config/client.d.ts +26 -14
  165. package/dist/globals/config/client.d.ts.map +1 -1
  166. package/dist/globals/config/client.js +1 -47
  167. package/dist/globals/config/client.js.map +1 -1
  168. package/dist/globals/config/types.d.ts +3 -3
  169. package/dist/globals/config/types.js.map +1 -1
  170. package/dist/index.d.ts +15 -11
  171. package/dist/index.d.ts.map +1 -1
  172. package/dist/index.js +7 -7
  173. package/dist/index.js.map +1 -1
  174. package/dist/uploads/getBaseFields.d.ts.map +1 -1
  175. package/dist/uploads/getBaseFields.js +5 -2
  176. package/dist/uploads/getBaseFields.js.map +1 -1
  177. package/dist/uploads/types.d.ts +4 -0
  178. package/dist/uploads/types.d.ts.map +1 -1
  179. package/dist/uploads/types.js.map +1 -1
  180. package/dist/utilities/fieldSchemaToJSON.d.ts +4 -4
  181. package/dist/utilities/fieldSchemaToJSON.d.ts.map +1 -1
  182. package/dist/utilities/fieldSchemaToJSON.js +0 -10
  183. package/dist/utilities/fieldSchemaToJSON.js.map +1 -1
  184. package/dist/utilities/flattenTopLevelFields.d.ts +4 -3
  185. package/dist/utilities/flattenTopLevelFields.d.ts.map +1 -1
  186. package/dist/utilities/flattenTopLevelFields.js +12 -7
  187. package/dist/utilities/flattenTopLevelFields.js.map +1 -1
  188. package/dist/utilities/getEntityPolicies.d.ts.map +1 -1
  189. package/dist/utilities/getEntityPolicies.js +5 -5
  190. package/dist/utilities/getEntityPolicies.js.map +1 -1
  191. package/dist/utilities/telemetry/conf/index.js.map +1 -1
  192. package/dist/versions/baseFields.js +1 -1
  193. package/dist/versions/baseFields.js.map +1 -1
  194. package/package.json +3 -10
  195. package/dist/admin/fields/index.d.ts +0 -65
  196. package/dist/admin/fields/index.d.ts.map +0 -1
  197. package/dist/admin/fields/index.js +0 -3
  198. package/dist/admin/fields/index.js.map +0 -1
  199. package/dist/admin/forms/FieldMap.d.ts +0 -23
  200. package/dist/admin/forms/FieldMap.d.ts.map +0 -1
  201. package/dist/admin/forms/FieldMap.js +0 -3
  202. package/dist/admin/forms/FieldMap.js.map +0 -1
  203. package/dist/admin/forms/FieldTypes.d.ts +0 -27
  204. package/dist/admin/forms/FieldTypes.d.ts.map +0 -1
  205. package/dist/admin/forms/FieldTypes.js +0 -3
  206. package/dist/admin/forms/FieldTypes.js.map +0 -1
  207. package/dist/bin/loader/clientExtensions.d.ts +0 -2
  208. package/dist/bin/loader/clientExtensions.d.ts.map +0 -1
  209. package/dist/bin/loader/clientExtensions.js +0 -13
  210. package/dist/bin/loader/clientExtensions.js.map +0 -1
  211. package/dist/bin/loader/compile.d.ts +0 -5
  212. package/dist/bin/loader/compile.d.ts.map +0 -1
  213. package/dist/bin/loader/compile.js +0 -27
  214. package/dist/bin/loader/compile.js.map +0 -1
  215. package/dist/bin/loader/ignores.d.ts +0 -2
  216. package/dist/bin/loader/ignores.d.ts.map +0 -1
  217. package/dist/bin/loader/ignores.js +0 -5
  218. package/dist/bin/loader/ignores.js.map +0 -1
  219. package/dist/bin/loader/index.d.ts +0 -34
  220. package/dist/bin/loader/index.d.ts.map +0 -1
  221. package/dist/bin/loader/index.js +0 -116
  222. package/dist/bin/loader/index.js.map +0 -1
  223. package/dist/bin/loader/read-default-tsconfig.d.ts +0 -29
  224. package/dist/bin/loader/read-default-tsconfig.d.ts.map +0 -1
  225. package/dist/bin/loader/read-default-tsconfig.js +0 -116
  226. package/dist/bin/loader/read-default-tsconfig.js.map +0 -1
  227. package/dist/bin/loader/resolveOriginalPath.d.ts +0 -10
  228. package/dist/bin/loader/resolveOriginalPath.d.ts.map +0 -1
  229. package/dist/bin/loader/resolveOriginalPath.js +0 -36
  230. package/dist/bin/loader/resolveOriginalPath.js.map +0 -1
  231. package/dist/utilities/importWithoutClientFiles.d.ts +0 -7
  232. package/dist/utilities/importWithoutClientFiles.d.ts.map +0 -1
  233. package/dist/utilities/importWithoutClientFiles.js +0 -47
  234. package/dist/utilities/importWithoutClientFiles.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Textarea.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AACjE,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,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAA;IACnD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAA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AAG,oBAAoB,CAAC,UAAU,CAAC,CAAA;AAEhF,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/fields/Textarea.ts"],"sourcesContent":["import type { TextareaField } from '../../fields/config/types.js'\nimport type { TextareaFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type TextareaFieldProps = {\n maxLength?: number\n minLength?: number\n name?: string\n path?: string\n placeholder?: TextareaField['admin']['placeholder']\n rows?: number\n validate?: TextareaFieldValidation\n width?: string\n} & Omit<FormFieldBase, 'validate'>\n\nexport type TextareaFieldLabelComponent = LabelComponent<'textarea'>\n\nexport type TextareaFieldDescriptionComponent = DescriptionComponent<'textarea'>\n\nexport type TextareaFieldErrorComponent = ErrorComponent<'textarea'>\n"],"names":[],"mappings":"AAoBA,WAAoE"}
1
+ {"version":3,"sources":["../../../src/admin/fields/Textarea.ts"],"sourcesContent":["import type React from 'react'\nimport type { MarkOptional } from 'ts-essentials'\n\nimport type { TextareaFieldClient } from '../../fields/config/types.js'\nimport type { TextareaFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type TextareaFieldProps = {\n readonly field: MarkOptional<TextareaFieldClient, 'type'>\n readonly inputRef?: React.Ref<HTMLInputElement>\n readonly onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>\n readonly validate?: TextareaFieldValidation\n} & Omit<FormFieldBase, 'validate'>\n\nexport type TextareaFieldLabelComponent = LabelComponent<'textarea'>\n\nexport type TextareaFieldDescriptionComponent = DescriptionComponent<'textarea'>\n\nexport type TextareaFieldErrorComponent = ErrorComponent<'textarea'>\n"],"names":[],"mappings":"AAmBA,WAAoE"}
@@ -1,12 +1,11 @@
1
- import type { DescriptionComponent, FormFieldBase, LabelComponent, UploadField, UploadFieldValidation } from 'payload';
1
+ import type { MarkOptional } from 'ts-essentials';
2
+ import type { UploadFieldClient } from '../../fields/config/types.js';
3
+ import type { UploadFieldValidation } from '../../fields/validations.js';
2
4
  import type { ErrorComponent } from '../forms/Error.js';
5
+ import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
3
6
  export type UploadFieldProps = {
4
- filterOptions?: UploadField['filterOptions'];
5
- name?: string;
6
- path?: string;
7
- relationTo?: UploadField['relationTo'];
8
- validate?: UploadFieldValidation;
9
- width?: string;
7
+ readonly field: MarkOptional<UploadFieldClient, 'type'>;
8
+ readonly validate?: UploadFieldValidation;
10
9
  } & Omit<FormFieldBase, 'validate'>;
11
10
  export type UploadFieldLabelComponent = LabelComponent<'upload'>;
12
11
  export type UploadFieldDescriptionComponent = DescriptionComponent<'upload'>;
@@ -1 +1 @@
1
- {"version":3,"file":"Upload.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Upload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,WAAW,EACX,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,aAAa,CAAC,EAAE,WAAW,CAAC,eAAe,CAAC,CAAA;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,CAAA;IACtC,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
+ {"version":3,"file":"Upload.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Upload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAA;IACvD,QAAQ,CAAC,QAAQ,CAAC,EAAE,qBAAqB,CAAA;CAC1C,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/Upload.ts"],"sourcesContent":["import type {\n DescriptionComponent,\n FormFieldBase,\n LabelComponent,\n UploadField,\n UploadFieldValidation,\n} from 'payload'\n\nimport type { ErrorComponent } from '../forms/Error.js'\n\nexport type UploadFieldProps = {\n filterOptions?: UploadField['filterOptions']\n name?: string\n path?: string\n relationTo?: UploadField['relationTo']\n validate?: UploadFieldValidation\n width?: string\n} & Omit<FormFieldBase, 'validate'>\n\nexport type UploadFieldLabelComponent = LabelComponent<'upload'>\n\nexport type UploadFieldDescriptionComponent = DescriptionComponent<'upload'>\n\nexport type UploadFieldErrorComponent = ErrorComponent<'upload'>\n"],"names":[],"mappings":"AAuBA,WAAgE"}
1
+ {"version":3,"sources":["../../../src/admin/fields/Upload.ts"],"sourcesContent":["import type { MarkOptional } from 'ts-essentials'\n\nimport type { UploadFieldClient } from '../../fields/config/types.js'\nimport type { UploadFieldValidation } from '../../fields/validations.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type UploadFieldProps = {\n readonly field: MarkOptional<UploadFieldClient, 'type'>\n readonly validate?: UploadFieldValidation\n} & Omit<FormFieldBase, 'validate'>\n\nexport type UploadFieldLabelComponent = LabelComponent<'upload'>\n\nexport type UploadFieldDescriptionComponent = DescriptionComponent<'upload'>\n\nexport type UploadFieldErrorComponent = ErrorComponent<'upload'>\n"],"names":[],"mappings":"AAgBA,WAAgE"}
@@ -1,15 +1,15 @@
1
1
  import type { CustomComponent, ServerProps } from '../../config/types.js';
2
- import type { FieldComponentProps } from '../types.js';
3
- import type { FieldTypes } from './FieldTypes.js';
2
+ import type { FieldTypes } from '../../fields/config/types.js';
3
+ import type { MappedComponent } from '../types.js';
4
4
  export type GenericErrorProps = {
5
- CustomError?: React.ReactNode;
6
- alignCaret?: 'center' | 'left' | 'right';
7
- message?: string;
8
- path?: string;
9
- showError?: boolean;
5
+ readonly CustomError?: MappedComponent;
6
+ readonly alignCaret?: 'center' | 'left' | 'right';
7
+ readonly message?: string;
8
+ readonly path?: string;
9
+ readonly showError?: boolean;
10
10
  };
11
- export type ErrorProps<T extends keyof FieldTypes = any> = {
11
+ export type ErrorProps<T extends 'hidden' | FieldTypes = any> = {
12
12
  type: T;
13
- } & FieldComponentProps & GenericErrorProps & Partial<ServerProps>;
14
- export type ErrorComponent<T extends keyof FieldTypes = any> = CustomComponent<ErrorProps<T>>;
13
+ } & GenericErrorProps & Partial<ServerProps>;
14
+ export type ErrorComponent<T extends 'hidden' | FieldTypes = any> = CustomComponent<ErrorProps<T>>;
15
15
  //# sourceMappingURL=Error.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,UAAU,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;IACxC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,UAAU,GAAG,GAAG,IAAI;IACzD,IAAI,EAAE,CAAC,CAAA;CACR,GAAG,mBAAmB,GACrB,iBAAiB,GACjB,OAAO,CAAC,WAAW,CAAC,CAAA;AAEtB,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,UAAU,GAAG,GAAG,IAAI,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,WAAW,CAAC,EAAE,eAAe,CAAA;IACtC,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;IACjD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,QAAQ,GAAG,UAAU,GAAG,GAAG,IAAI;IAC9D,IAAI,EAAE,CAAC,CAAA;CACR,GAAG,iBAAiB,GACnB,OAAO,CAAC,WAAW,CAAC,CAAA;AAEtB,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,QAAQ,GAAG,UAAU,GAAG,GAAG,IAAI,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/forms/Error.ts"],"sourcesContent":["import type { CustomComponent, ServerProps } from '../../config/types.js'\nimport type { FieldComponentProps } from '../types.js'\nimport type { FieldTypes } from './FieldTypes.js'\n\nexport type GenericErrorProps = {\n CustomError?: React.ReactNode\n alignCaret?: 'center' | 'left' | 'right'\n message?: string\n path?: string\n showError?: boolean\n}\n\nexport type ErrorProps<T extends keyof FieldTypes = any> = {\n type: T\n} & FieldComponentProps &\n GenericErrorProps &\n Partial<ServerProps>\n\nexport type ErrorComponent<T extends keyof FieldTypes = any> = CustomComponent<ErrorProps<T>>\n"],"names":[],"mappings":"AAkBA,WAA6F"}
1
+ {"version":3,"sources":["../../../src/admin/forms/Error.ts"],"sourcesContent":["import type { CustomComponent, ServerProps } from '../../config/types.js'\nimport type { FieldTypes } from '../../fields/config/types.js'\nimport type { MappedComponent } from '../types.js'\n\nexport type GenericErrorProps = {\n readonly CustomError?: MappedComponent\n readonly alignCaret?: 'center' | 'left' | 'right'\n readonly message?: string\n readonly path?: string\n readonly showError?: boolean\n}\n\nexport type ErrorProps<T extends 'hidden' | FieldTypes = any> = {\n type: T\n} & GenericErrorProps &\n Partial<ServerProps>\n\nexport type ErrorComponent<T extends 'hidden' | FieldTypes = any> = CustomComponent<ErrorProps<T>>\n"],"names":[],"mappings":"AAiBA,WAAkG"}
@@ -1,32 +1,25 @@
1
1
  import type { User } from '../../auth/types.js';
2
- import type { LabelStatic, Locale } from '../../config/types.js';
2
+ import type { Locale } from '../../config/types.js';
3
3
  import type { Validate } from '../../fields/config/types.js';
4
4
  import type { DocumentPreferences } from '../../preferences/types.js';
5
5
  import type { ErrorProps } from './Error.js';
6
6
  import type { FieldDescriptionProps } from './FieldDescription.js';
7
- import type { SanitizedLabelProps } from './Label.js';
7
+ import type { LabelProps } from './Label.js';
8
8
  export type FormFieldBase = {
9
- AfterInput?: React.ReactNode;
10
- BeforeInput?: React.ReactNode;
11
- CustomDescription?: React.ReactNode;
12
- CustomError?: React.ReactNode;
13
- CustomLabel?: React.ReactNode;
14
- className?: string;
15
- custom?: Record<string, any>;
16
- descriptionProps?: Omit<FieldDescriptionProps, 'type'>;
17
- disabled?: boolean;
18
- docPreferences?: DocumentPreferences;
19
- errorProps?: Omit<ErrorProps, 'type'>;
20
- label?: LabelStatic | false;
21
- labelProps?: SanitizedLabelProps;
22
- locale?: Locale;
23
- localized?: boolean;
24
- path?: string;
25
- readOnly?: boolean;
26
- required?: boolean;
27
- rtl?: boolean;
28
- style?: React.CSSProperties;
29
- user?: User;
30
- validate?: Validate;
9
+ readonly descriptionProps?: FieldDescriptionProps;
10
+ readonly docPreferences?: DocumentPreferences;
11
+ readonly errorProps?: ErrorProps;
12
+ /**
13
+ * forceRender is added by RenderField automatically
14
+ */
15
+ readonly forceRender?: boolean;
16
+ readonly labelProps?: LabelProps;
17
+ readonly locale?: Locale;
18
+ /**
19
+ * forceRender is added by RenderField automatically. This should be used instead of field.admin.readOnly
20
+ */
21
+ readonly readOnly?: boolean;
22
+ readonly user?: User;
23
+ readonly validate?: Validate;
31
24
  };
32
25
  //# sourceMappingURL=Field.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Field.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAErD,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACnC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,gBAAgB,CAAC,EAAE,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAA;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,cAAc,CAAC,EAAE,mBAAmB,CAAA;IACpC,UAAU,CAAC,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;IACrC,KAAK,CAAC,EAAE,WAAW,GAAG,KAAK,CAAA;IAC3B,UAAU,CAAC,EAA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Q,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAA;IACpB,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAC7B,CAAA"}
@@ -1,3 +1,4 @@
1
+ // TODO: Check if we still need this. Shouldnt most of it be present in the field type?
1
2
  export { };
2
3
 
3
4
  //# sourceMappingURL=Field.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/forms/Field.ts"],"sourcesContent":["import type { User } from '../../auth/types.js'\nimport type { LabelStatic, Locale } from '../../config/types.js'\nimport type { Validate } from '../../fields/config/types.js'\nimport type { DocumentPreferences } from '../../preferences/types.js'\nimport type { ErrorProps } from './Error.js'\nimport type { FieldDescriptionProps } from './FieldDescription.js'\nimport type { SanitizedLabelProps } from './Label.js'\n\nexport type FormFieldBase = {\n AfterInput?: React.ReactNode\n BeforeInput?: React.ReactNode\n CustomDescription?: React.ReactNode\n CustomError?: React.ReactNode\n CustomLabel?: React.ReactNode\n className?: string\n custom?: Record<string, any>\n descriptionProps?: Omit<FieldDescriptionProps, 'type'>\n disabled?: boolean\n docPreferences?: DocumentPreferences\n errorProps?: Omit<ErrorProps, 'type'>\n label?: LabelStatic | false\n labelProps?: SanitizedLabelProps\n locale?: Locale\n localized?: boolean\n path?: string\n readOnly?: boolean\n required?: boolean\n rtl?: boolean\n style?: React.CSSProperties\n user?: User\n validate?: Validate\n}\n"],"names":[],"mappings":"AAQA,WAuBC"}
1
+ {"version":3,"sources":["../../../src/admin/forms/Field.ts"],"sourcesContent":["import type { User } from '../../auth/types.js'\nimport type { Locale } from '../../config/types.js'\nimport type { Validate } from '../../fields/config/types.js'\nimport type { DocumentPreferences } from '../../preferences/types.js'\nimport type { ErrorProps } from './Error.js'\nimport type { FieldDescriptionProps } from './FieldDescription.js'\nimport type { LabelProps } from './Label.js'\n\n// TODO: Check if we still need this. Shouldnt most of it be present in the field type?\nexport type FormFieldBase = {\n readonly descriptionProps?: FieldDescriptionProps\n readonly docPreferences?: DocumentPreferences\n readonly errorProps?: ErrorProps\n /**\n * forceRender is added by RenderField automatically\n */\n readonly forceRender?: boolean\n readonly labelProps?: LabelProps\n readonly locale?: Locale\n /**\n * forceRender is added by RenderField automatically. This should be used instead of field.admin.readOnly\n */\n readonly readOnly?: boolean\n readonly user?: User\n readonly validate?: Validate\n}\n"],"names":[],"mappings":"AAQA,uFAAuF;AACvF,WAgBC"}
@@ -1,16 +1,17 @@
1
- import type React from 'react';
2
1
  import type { CustomComponent, LabelFunction, ServerProps } from '../../config/types.js';
3
- import type { FieldTypes } from './FieldTypes.js';
2
+ import type { FieldTypes } from '../../fields/config/types.js';
3
+ import type { MappedComponent } from '../types.js';
4
4
  export type DescriptionFunction = LabelFunction;
5
- export type DescriptionComponent<T extends keyof FieldTypes = any> = CustomComponent<FieldDescriptionProps<T>>;
6
- export type Description = DescriptionFunction | Record<string, string> | string;
5
+ export type DescriptionComponent<T extends 'hidden' | FieldTypes = any> = CustomComponent<FieldDescriptionProps<T>>;
6
+ export type StaticDescription = Record<string, string> | string;
7
+ export type Description = DescriptionFunction | StaticDescription;
7
8
  export type GenericDescriptionProps = {
8
- CustomDescription?: React.ReactNode;
9
- className?: string;
10
- description?: Record<string, string> | string;
11
- marginPlacement?: 'bottom' | 'top';
9
+ readonly Description?: MappedComponent;
10
+ readonly className?: string;
11
+ readonly description?: StaticDescription;
12
+ readonly marginPlacement?: 'bottom' | 'top';
12
13
  };
13
- export type FieldDescriptionProps<T extends keyof FieldTypes = any> = {
14
+ export type FieldDescriptionProps<T extends 'hidden' | FieldTypes = any> = {
14
15
  type: T;
15
16
  } & GenericDescriptionProps & Partial<ServerProps>;
16
17
  //# sourceMappingURL=FieldDescription.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldDescription.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/FieldDescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9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eAAe,CACvF,qBAAqB,CAAC,CAAC,CAAC,CACzB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAA;AAE/D,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG,iBAAiB,CAAA;AACjE,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,WAAW,CAAC,EAAE,eAAe,CAAA;IACtC,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;CAC5C,CAAA;AACD,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,QAAQ,GAAG,UAAU,GAAG,GAAG,IAAI;IACzE,IAAI,EAAE,CAAC,CAAA;CACR,GAAG,uBAAuB,GACzB,OAAO,CAAC,WAAW,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/forms/FieldDescription.ts"],"sourcesContent":["import type React from 'react'\n\nimport type { CustomComponent, LabelFunction, ServerProps } from '../../config/types.js'\nimport type { FieldComponentProps } from '../types.js'\nimport type { FieldTypes } from './FieldTypes.js'\n\nexport type DescriptionFunction = LabelFunction\n\nexport type DescriptionComponent<T extends keyof FieldTypes = any> = CustomComponent<\n FieldDescriptionProps<T>\n>\n\nexport type Description = DescriptionFunction | Record<string, string> | string\nexport type GenericDescriptionProps = {\n CustomDescription?: React.ReactNode\n className?: string\n description?: Record<string, string> | string\n marginPlacement?: 'bottom' | 'top'\n}\nexport type FieldDescriptionProps<T extends keyof FieldTypes = any> = {\n type: T\n} & GenericDescriptionProps &\n Partial<ServerProps>\n"],"names":[],"mappings":"AAmBA,WAGsB"}
1
+ {"version":3,"sources":["../../../src/admin/forms/FieldDescription.ts"],"sourcesContent":["import type { CustomComponent, LabelFunction, ServerProps } from '../../config/types.js'\nimport type { FieldTypes } from '../../fields/config/types.js'\nimport type { MappedComponent } from '../types.js'\n\nexport type DescriptionFunction = LabelFunction\n\nexport type DescriptionComponent<T extends 'hidden' | FieldTypes = any> = CustomComponent<\n FieldDescriptionProps<T>\n>\n\nexport type StaticDescription = Record<string, string> | string\n\nexport type Description = DescriptionFunction | StaticDescription\nexport type GenericDescriptionProps = {\n readonly Description?: MappedComponent\n readonly className?: string\n readonly description?: StaticDescription\n readonly marginPlacement?: 'bottom' | 'top'\n}\nexport type FieldDescriptionProps<T extends 'hidden' | FieldTypes = any> = {\n type: T\n} & GenericDescriptionProps &\n Partial<ServerProps>\n"],"names":[],"mappings":"AAmBA,WAGsB"}
@@ -1,18 +1,17 @@
1
- import type { CustomComponent } from '../../config/types.js';
2
- import type { FormFieldBase } from './Field.js';
3
- import type { FieldTypes } from './FieldTypes.js';
1
+ import type { CustomComponent, ServerProps, StaticLabel } from '../../config/types.js';
2
+ import type { FieldTypes } from '../../fields/config/types.js';
3
+ import type { MappedComponent } from '../types.js';
4
4
  export type GenericLabelProps = {
5
- as?: 'label' | 'span';
6
- htmlFor?: string;
7
- schemaPath?: string;
8
- unstyled?: boolean;
9
- } & FormFieldBase;
10
- export type LabelProps<T extends keyof FieldTypes = any> = {
11
- label?: FormFieldBase['label'];
12
- required?: boolean;
13
- } & {
5
+ readonly Label?: MappedComponent;
6
+ readonly as?: 'label' | 'span';
7
+ readonly htmlFor?: string;
8
+ readonly label?: StaticLabel;
9
+ readonly required?: boolean;
10
+ readonly unstyled?: boolean;
11
+ };
12
+ export type LabelProps<T extends 'hidden' | FieldTypes = any> = {
14
13
  type: T;
15
- } & GenericLabelProps;
16
- export type SanitizedLabelProps<T extends keyof FieldTypes = any> = Omit<LabelProps<T>, 'label' | 'required'>;
17
- export type LabelComponent<T extends keyof FieldTypes = any> = CustomComponent<LabelProps<T>>;
14
+ } & GenericLabelProps & Partial<ServerProps>;
15
+ export type SanitizedLabelProps<T extends 'hidden' | FieldTypes = any> = Omit<LabelProps<T>, 'label' | 'required'>;
16
+ export type LabelComponent<T extends 'hidden' | FieldTypes = any> = CustomComponent<LabelProps<T>>;
18
17
  //# sourceMappingURL=Label.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Label.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAe,MAAM,uBAAuB,CAAA;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GAAG,aAAa,CAAA;AAEjB,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,UAAU,GAAG,GAAG,IAAI;IACzD,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAA;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GAAG;IACF,IAAI,EAAE,CAAC,CAAA;CACR,GAAG,iBAAiB,CAAA;AACrB,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,MAAM,UAAU,GAAG,GAAG,IAAI,IAAI,CACtE,UAAU,CAAC,CAAC,CAAC,EACb,OAAO,GAAG,UAAU,CACrB,CAAA;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,UAAU,GAAG,GAAG,IAAI,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Label.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACtF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,CAAA;IAChC,QAAQ,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAA;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,QAAQ,GAAG,UAAU,GAAG,GAAG,IAAI;IAC9D,IAAI,EAAE,CAAC,CAAA;CACR,GAAG,iBAAiB,GACnB,OAAO,CAAC,WAAW,CAAC,CAAA;AAEtB,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,QAAQ,GAAG,UAAU,GAAG,GAAG,IAAI,IAAI,CAC3E,UAAU,CAAC,CAAC,CAAC,EACb,OAAO,GAAG,UAAU,CACrB,CAAA;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,QAAQ,GAAG,UAAU,GAAG,GAAG,IAAI,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/forms/Label.ts"],"sourcesContent":["import type { CustomComponent, ServerProps } from '../../config/types.js'\nimport type { FormFieldBase } from './Field.js'\nimport type { FieldTypes } from './FieldTypes.js'\n\nexport type GenericLabelProps = {\n as?: 'label' | 'span'\n htmlFor?: string\n schemaPath?: string\n unstyled?: boolean\n} & FormFieldBase\n\nexport type LabelProps<T extends keyof FieldTypes = any> = {\n label?: FormFieldBase['label']\n required?: boolean\n} & {\n type: T\n} & GenericLabelProps\nexport type SanitizedLabelProps<T extends keyof FieldTypes = any> = Omit<\n LabelProps<T>,\n 'label' | 'required'\n>\n\nexport type LabelComponent<T extends keyof FieldTypes = any> = CustomComponent<LabelProps<T>>\n"],"names":[],"mappings":"AAsBA,WAA6F"}
1
+ {"version":3,"sources":["../../../src/admin/forms/Label.ts"],"sourcesContent":["import type { CustomComponent, ServerProps, StaticLabel } from '../../config/types.js'\nimport type { FieldTypes } from '../../fields/config/types.js'\nimport type { MappedComponent } from '../types.js'\n\nexport type GenericLabelProps = {\n readonly Label?: MappedComponent\n readonly as?: 'label' | 'span'\n readonly htmlFor?: string\n readonly label?: StaticLabel\n readonly required?: boolean\n readonly unstyled?: boolean\n}\n\nexport type LabelProps<T extends 'hidden' | FieldTypes = any> = {\n type: T\n} & GenericLabelProps &\n Partial<ServerProps>\n\nexport type SanitizedLabelProps<T extends 'hidden' | FieldTypes = any> = Omit<\n LabelProps<T>,\n 'label' | 'required'\n>\n\nexport type LabelComponent<T extends 'hidden' | FieldTypes = any> = CustomComponent<LabelProps<T>>\n"],"names":[],"mappings":"AAuBA,WAAkG"}
@@ -1,5 +1,8 @@
1
+ import type React from 'react';
2
+ import type { PayloadComponent } from '../config/types.js';
3
+ import type { JsonObject } from '../types/index.js';
1
4
  export type { LanguageOptions } from './LanguageOptions.js';
2
- export type { RichTextAdapter, RichTextAdapterProvider, RichTextFieldProps } from './RichText.js';
5
+ export type { RichTextAdapter, RichTextAdapterProvider, RichTextGenerateComponentMap, RichTextHooks, } from './RichText.js';
3
6
  export type { CellComponentProps, DefaultCellComponentProps } from './elements/Cell.js';
4
7
  export type { ConditionalDateProps } from './elements/DatePicker.js';
5
8
  export type { DayPickerProps, SharedProps, TimePickerProps } from './elements/DatePicker.js';
@@ -7,12 +10,11 @@ export type { CustomPreviewButton } from './elements/PreviewButton.js';
7
10
  export type { CustomPublishButton } from './elements/PublishButton.js';
8
11
  export type { CustomSaveButton } from './elements/SaveButton.js';
9
12
  export type { CustomSaveDraftButton } from './elements/SaveDraftButton.js';
10
- export type { DocumentTab, DocumentTabComponent, DocumentTabCondition, DocumentTabConfig, DocumentTabProps, } from './elements/Tab.js';
13
+ export type { DocumentTabComponent, DocumentTabCondition, DocumentTabConfig, DocumentTabProps, } from './elements/Tab.js';
11
14
  export type { CustomUpload } from './elements/Upload.js';
12
15
  export type { WithServerSidePropsComponent, WithServerSidePropsComponentProps, } from './elements/WithServerSideProps.js';
13
16
  export type { ArrayFieldDescriptionComponent, ArrayFieldErrorComponent, ArrayFieldLabelComponent, ArrayFieldProps, } from './fields/Array.js';
14
- export type { ReducedBlock } from './fields/Blocks.js';
15
- export type { BlocksFieldDescriptionComponent, BlocksFieldErrorComponent, BlocksFieldLabelComponent, BlocksFieldProps, } from './fields/Blocks.js';
17
+ export type { BlockFieldDescriptionComponent, BlockFieldErrorComponent, BlockFieldLabelComponent, BlockFieldProps, } from './fields/Blocks.js';
16
18
  export type { CheckboxFieldDescriptionComponent, CheckboxFieldErrorComponent, CheckboxFieldLabelComponent, CheckboxFieldProps, } from './fields/Checkbox.js';
17
19
  export type { CodeFieldDescriptionComponent, CodeFieldErrorComponent, CodeFieldLabelComponent, CodeFieldProps, } from './fields/Code.js';
18
20
  export type { CollapsibleFieldDescriptionComponent, CollapsibleFieldErrorComponent, CollapsibleFieldLabelComponent, CollapsibleFieldProps, } from './fields/Collapsible.js';
@@ -25,22 +27,39 @@ export type { NumberFieldDescriptionComponent, NumberFieldErrorComponent, Number
25
27
  export type { PointFieldDescriptionComponent, PointFieldErrorComponent, PointFieldLabelComponent, PointFieldProps, } from './fields/Point.js';
26
28
  export type { RadioFieldDescriptionComponent, RadioFieldErrorComponent, RadioFieldLabelComponent, RadioFieldProps, } from './fields/Radio.js';
27
29
  export type { RelationshipFieldDescriptionComponent, RelationshipFieldErrorComponent, RelationshipFieldLabelComponent, RelationshipFieldProps, } from './fields/Relationship.js';
28
- export type { RichTextComponentProps, RichTextFieldDescriptionComponent, RichTextFieldErrorComponent, RichTextFieldLabelComponent, } from './fields/RichText.js';
30
+ export type { RichTextFieldDescriptionComponent, RichTextFieldErrorComponent, RichTextFieldLabelComponent, RichTextFieldProps, } from './fields/RichText.js';
29
31
  export type { RowFieldDescriptionComponent, RowFieldErrorComponent, RowFieldLabelComponent, RowFieldProps, } from './fields/Row.js';
30
32
  export type { SelectFieldDescriptionComponent, SelectFieldErrorComponent, SelectFieldLabelComponent, SelectFieldProps, } from './fields/Select.js';
31
- export type { MappedTab } from './fields/Tabs.js';
32
- export type { TabsFieldDescriptionComponent, TabsFieldErrorComponent, TabsFieldLabelComponent, TabsFieldProps, } from './fields/Tabs.js';
33
+ export type { ClientTab, TabsFieldDescriptionComponent, TabsFieldErrorComponent, TabsFieldLabelComponent, TabsFieldProps, } from './fields/Tabs.js';
33
34
  export type { TextFieldDescriptionComponent, TextFieldErrorComponent, TextFieldLabelComponent, TextFieldProps, } from './fields/Text.js';
34
35
  export type { TextareaFieldDescriptionComponent, TextareaFieldErrorComponent, TextareaFieldLabelComponent, TextareaFieldProps, } from './fields/Textarea.js';
35
36
  export type { UploadFieldDescriptionComponent, UploadFieldErrorComponent, UploadFieldLabelComponent, UploadFieldProps, } from './fields/Upload.js';
36
- export type { FieldComponentProps } from './fields/index.js';
37
37
  export type { ErrorComponent, ErrorProps, GenericErrorProps } from './forms/Error.js';
38
38
  export type { FormFieldBase } from './forms/Field.js';
39
- export type { Description, DescriptionComponent, DescriptionFunction, FieldDescriptionProps, GenericDescriptionProps, } from './forms/FieldDescription.js';
40
- export type { MappedField } from './forms/FieldMap.js';
41
- export type { FieldMap } from './forms/FieldMap.js';
39
+ export type { Description, DescriptionComponent, DescriptionFunction, FieldDescriptionProps, GenericDescriptionProps, StaticDescription, } from './forms/FieldDescription.js';
42
40
  export type { Data, FilterOptionsResult, FormField, FormState, Row } from './forms/Form.js';
43
41
  export type { GenericLabelProps, LabelComponent, LabelProps, SanitizedLabelProps, } from './forms/Label.js';
44
42
  export type { RowLabel, RowLabelComponent } from './forms/RowLabel.js';
45
43
  export type { AdminViewComponent, AdminViewProps, EditViewProps, InitPageResult, ServerSideEditViewProps, VisibleEntities, } from './views/types.js';
44
+ export type MappedServerComponent<TComponentClientProps extends JsonObject = JsonObject> = {
45
+ Component: React.ComponentType<TComponentClientProps>;
46
+ RenderedComponent: React.ReactNode;
47
+ props?: Partial<any>;
48
+ type: 'server';
49
+ };
50
+ export type MappedClientComponent<TComponentClientProps extends JsonObject = JsonObject> = {
51
+ Component: React.ComponentType<TComponentClientProps>;
52
+ RenderedComponent?: React.ReactNode;
53
+ props?: Partial<TComponentClientProps>;
54
+ type: 'client';
55
+ };
56
+ export type MappedComponent<TComponentClientProps extends JsonObject = JsonObject> = MappedClientComponent<TComponentClientProps> | MappedServerComponent<TComponentClientProps> | undefined;
57
+ export type CreateMappedComponent = {
58
+ <T extends JsonObject>(component: {
59
+ Component: React.FC<T>;
60
+ } | PayloadComponent<T> | null, props: object, fallback: React.FC, identifier: string): MappedComponent<T>;
61
+ <T extends JsonObject>(components: ({
62
+ Component: React.FC<T>;
63
+ } | PayloadComponent<T>)[], props: object, fallback: React.FC, identifier: string): MappedComponent<T>[];
64
+ };
46
65
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/admin/types.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,YAAY,EAAE,eAAe,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACjG,YAAY,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AACvF,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACpE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC5F,YAAY,EAAE,mBAAmB,EAAE,M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C,KAAK,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAA;IACtC,IAAI,EAAE,QAAQ,CAAA;CACf,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,qBAAqB,SAAS,UAAU,GAAG,UAAU,IAC7E,qBAAqB,CAAC,qBAAqB,CAAC,GAC5C,qBAAqB,CAAC,qBAAqB,CAAC,GAC5C,SAAS,CAAA;AAEb,MAAM,MAAM,qBAAqB,GAAG;IAClC,CAAC,CAAC,SAAS,UAAU,EACnB,SAAS,EAAE;QAAE,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG,gBAAgB,CAAC,CAAC,CAAC,GAAG,IAAI,EAClE,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,KAAK,CAAC,EAAE,EAClB,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,CAAC,CAAC,CAAA;IAErB,CAAC,CAAC,SAAS,UAAU,EACnB,UAAU,EAAE,CAAC;QAAE,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,EAChE,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,KAAK,CAAC,EAAE,EAClB,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,CAAC,CAAC,EAAE,CAAA;CACxB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/admin/types.ts"],"sourcesContent":["export type { LanguageOptions } from './LanguageOptions.js'\nexport type { RichTextAdapter, RichTextAdapterProvider, RichTextFieldProps } from './RichText.js'\nexport type { CellComponentProps, DefaultCellComponentProps } from './elements/Cell.js'\nexport type { ConditionalDateProps } from './elements/DatePicker.js'\nexport type { DayPickerProps, SharedProps, TimePickerProps } from './elements/DatePicker.js'\nexport type { CustomPreviewButton } from './elements/PreviewButton.js'\nexport type { CustomPublishButton } from './elements/PublishButton.js'\nexport type { CustomSaveButton } from './elements/SaveButton.js'\nexport type { CustomSaveDraftButton } from './elements/SaveDraftButton.js'\n\nexport type {\n DocumentTab,\n DocumentTabComponent,\n DocumentTabCondition,\n DocumentTabConfig,\n DocumentTabProps,\n} from './elements/Tab.js'\n\nexport type { CustomUpload } from './elements/Upload.js'\n\nexport type {\n WithServerSidePropsComponent,\n WithServerSidePropsComponentProps,\n} from './elements/WithServerSideProps.js'\n\nexport type {\n ArrayFieldDescriptionComponent,\n ArrayFieldErrorComponent,\n ArrayFieldLabelComponent,\n ArrayFieldProps,\n} from './fields/Array.js'\n\nexport type { ReducedBlock } from './fields/Blocks.js'\n\nexport type {\n BlocksFieldDescriptionComponent,\n BlocksFieldErrorComponent,\n BlocksFieldLabelComponent,\n BlocksFieldProps,\n} from './fields/Blocks.js'\n\nexport type {\n CheckboxFieldDescriptionComponent,\n CheckboxFieldErrorComponent,\n CheckboxFieldLabelComponent,\n CheckboxFieldProps,\n} from './fields/Checkbox.js'\n\nexport type {\n CodeFieldDescriptionComponent,\n CodeFieldErrorComponent,\n CodeFieldLabelComponent,\n CodeFieldProps,\n} from './fields/Code.js'\n\nexport type {\n CollapsibleFieldDescriptionComponent,\n CollapsibleFieldErrorComponent,\n CollapsibleFieldLabelComponent,\n CollapsibleFieldProps,\n} from './fields/Collapsible.js'\n\nexport type {\n DateFieldDescriptionComponent,\n DateFieldErrorComponent,\n DateFieldLabelComponent,\n DateFieldProps,\n} from './fields/Date.js'\n\nexport type {\n EmailFieldDescriptionComponent,\n EmailFieldErrorComponent,\n EmailFieldLabelComponent,\n EmailFieldProps,\n} from './fields/Email.js'\n\nexport type {\n GroupFieldDescriptionComponent,\n GroupFieldErrorComponent,\n GroupFieldLabelComponent,\n GroupFieldProps,\n} from './fields/Group.js'\n\nexport type {\n HiddenFieldDescriptionComponent,\n HiddenFieldErrorComponent,\n HiddenFieldLabelComponent,\n HiddenFieldProps,\n} from './fields/Hidden.js'\n\nexport type {\n JSONFieldDescriptionComponent,\n JSONFieldErrorComponent,\n JSONFieldLabelComponent,\n JSONFieldProps,\n} from './fields/JSON.js'\n\nexport type {\n NumberFieldDescriptionComponent,\n NumberFieldErrorComponent,\n NumberFieldLabelComponent,\n NumberFieldProps,\n} from './fields/Number.js'\n\nexport type {\n PointFieldDescriptionComponent,\n PointFieldErrorComponent,\n PointFieldLabelComponent,\n PointFieldProps,\n} from './fields/Point.js'\n\nexport type {\n RadioFieldDescriptionComponent,\n RadioFieldErrorComponent,\n RadioFieldLabelComponent,\n RadioFieldProps,\n} from './fields/Radio.js'\n\nexport type {\n RelationshipFieldDescriptionComponent,\n RelationshipFieldErrorComponent,\n RelationshipFieldLabelComponent,\n RelationshipFieldProps,\n} from './fields/Relationship.js'\n\nexport type {\n RichTextComponentProps,\n RichTextFieldDescriptionComponent,\n RichTextFieldErrorComponent,\n RichTextFieldLabelComponent,\n} from './fields/RichText.js'\n\nexport type {\n RowFieldDescriptionComponent,\n RowFieldErrorComponent,\n RowFieldLabelComponent,\n RowFieldProps,\n} from './fields/Row.js'\n\nexport type {\n SelectFieldDescriptionComponent,\n SelectFieldErrorComponent,\n SelectFieldLabelComponent,\n SelectFieldProps,\n} from './fields/Select.js'\n\nexport type { MappedTab } from './fields/Tabs.js'\n\nexport type {\n TabsFieldDescriptionComponent,\n TabsFieldErrorComponent,\n TabsFieldLabelComponent,\n TabsFieldProps,\n} from './fields/Tabs.js'\n\nexport type {\n TextFieldDescriptionComponent,\n TextFieldErrorComponent,\n TextFieldLabelComponent,\n TextFieldProps,\n} from './fields/Text.js'\n\nexport type {\n TextareaFieldDescriptionComponent,\n TextareaFieldErrorComponent,\n TextareaFieldLabelComponent,\n TextareaFieldProps,\n} from './fields/Textarea.js'\n\nexport type {\n UploadFieldDescriptionComponent,\n UploadFieldErrorComponent,\n UploadFieldLabelComponent,\n UploadFieldProps,\n} from './fields/Upload.js'\n\nexport type { FieldComponentProps } from './fields/index.js'\n\nexport type { ErrorComponent, ErrorProps, GenericErrorProps } from './forms/Error.js'\n\nexport type { FormFieldBase } from './forms/Field.js'\n\nexport type {\n Description,\n DescriptionComponent,\n DescriptionFunction,\n FieldDescriptionProps,\n GenericDescriptionProps,\n} from './forms/FieldDescription.js'\n\nexport type { MappedField } from './forms/FieldMap.js'\n\nexport type { FieldMap } from './forms/FieldMap.js'\n\nexport type { Data, FilterOptionsResult, FormField, FormState, Row } from './forms/Form.js'\n\nexport type {\n GenericLabelProps,\n LabelComponent,\n LabelProps,\n SanitizedLabelProps,\n} from './forms/Label.js'\n\nexport type { RowLabel, RowLabelComponent } from './forms/RowLabel.js'\n\nexport type {\n AdminViewComponent,\n AdminViewProps,\n EditViewProps,\n InitPageResult,\n ServerSideEditViewProps,\n VisibleEntities,\n} from './views/types.js'\n"],"names":[],"mappings":"AA6MA,WAOyB"}
1
+ {"version":3,"sources":["../../src/admin/types.ts"],"sourcesContent":["import type React from 'react'\n\nimport type { PayloadComponent } from '../config/types.js'\nimport type { JsonObject } from '../types/index.js'\n\nexport type { LanguageOptions } from './LanguageOptions.js'\nexport type {\n RichTextAdapter,\n RichTextAdapterProvider,\n RichTextGenerateComponentMap,\n RichTextHooks,\n} from './RichText.js'\nexport type { CellComponentProps, DefaultCellComponentProps } from './elements/Cell.js'\nexport type { ConditionalDateProps } from './elements/DatePicker.js'\nexport type { DayPickerProps, SharedProps, TimePickerProps } from './elements/DatePicker.js'\nexport type { CustomPreviewButton } from './elements/PreviewButton.js'\nexport type { CustomPublishButton } from './elements/PublishButton.js'\nexport type { CustomSaveButton } from './elements/SaveButton.js'\nexport type { CustomSaveDraftButton } from './elements/SaveDraftButton.js'\n\nexport type {\n DocumentTabComponent,\n DocumentTabCondition,\n DocumentTabConfig,\n DocumentTabProps,\n} from './elements/Tab.js'\n\nexport type { CustomUpload } from './elements/Upload.js'\n\nexport type {\n WithServerSidePropsComponent,\n WithServerSidePropsComponentProps,\n} from './elements/WithServerSideProps.js'\n\nexport type {\n ArrayFieldDescriptionComponent,\n ArrayFieldErrorComponent,\n ArrayFieldLabelComponent,\n ArrayFieldProps,\n} from './fields/Array.js'\n\nexport type {\n BlockFieldDescriptionComponent,\n BlockFieldErrorComponent,\n BlockFieldLabelComponent,\n BlockFieldProps,\n} from './fields/Blocks.js'\n\nexport type {\n CheckboxFieldDescriptionComponent,\n CheckboxFieldErrorComponent,\n CheckboxFieldLabelComponent,\n CheckboxFieldProps,\n} from './fields/Checkbox.js'\n\nexport type {\n CodeFieldDescriptionComponent,\n CodeFieldErrorComponent,\n CodeFieldLabelComponent,\n CodeFieldProps,\n} from './fields/Code.js'\n\nexport type {\n CollapsibleFieldDescriptionComponent,\n CollapsibleFieldErrorComponent,\n CollapsibleFieldLabelComponent,\n CollapsibleFieldProps,\n} from './fields/Collapsible.js'\n\nexport type {\n DateFieldDescriptionComponent,\n DateFieldErrorComponent,\n DateFieldLabelComponent,\n DateFieldProps,\n} from './fields/Date.js'\n\nexport type {\n EmailFieldDescriptionComponent,\n EmailFieldErrorComponent,\n EmailFieldLabelComponent,\n EmailFieldProps,\n} from './fields/Email.js'\n\nexport type {\n GroupFieldDescriptionComponent,\n GroupFieldErrorComponent,\n GroupFieldLabelComponent,\n GroupFieldProps,\n} from './fields/Group.js'\n\nexport type {\n HiddenFieldDescriptionComponent,\n HiddenFieldErrorComponent,\n HiddenFieldLabelComponent,\n HiddenFieldProps,\n} from './fields/Hidden.js'\n\nexport type {\n JSONFieldDescriptionComponent,\n JSONFieldErrorComponent,\n JSONFieldLabelComponent,\n JSONFieldProps,\n} from './fields/JSON.js'\n\nexport type {\n NumberFieldDescriptionComponent,\n NumberFieldErrorComponent,\n NumberFieldLabelComponent,\n NumberFieldProps,\n} from './fields/Number.js'\n\nexport type {\n PointFieldDescriptionComponent,\n PointFieldErrorComponent,\n PointFieldLabelComponent,\n PointFieldProps,\n} from './fields/Point.js'\n\nexport type {\n RadioFieldDescriptionComponent,\n RadioFieldErrorComponent,\n RadioFieldLabelComponent,\n RadioFieldProps,\n} from './fields/Radio.js'\n\nexport type {\n RelationshipFieldDescriptionComponent,\n RelationshipFieldErrorComponent,\n RelationshipFieldLabelComponent,\n RelationshipFieldProps,\n} from './fields/Relationship.js'\n\nexport type {\n RichTextFieldDescriptionComponent,\n RichTextFieldErrorComponent,\n RichTextFieldLabelComponent,\n RichTextFieldProps,\n} from './fields/RichText.js'\n\nexport type {\n RowFieldDescriptionComponent,\n RowFieldErrorComponent,\n RowFieldLabelComponent,\n RowFieldProps,\n} from './fields/Row.js'\n\nexport type {\n SelectFieldDescriptionComponent,\n SelectFieldErrorComponent,\n SelectFieldLabelComponent,\n SelectFieldProps,\n} from './fields/Select.js'\n\nexport type {\n ClientTab,\n TabsFieldDescriptionComponent,\n TabsFieldErrorComponent,\n TabsFieldLabelComponent,\n TabsFieldProps,\n} from './fields/Tabs.js'\n\nexport type {\n TextFieldDescriptionComponent,\n TextFieldErrorComponent,\n TextFieldLabelComponent,\n TextFieldProps,\n} from './fields/Text.js'\n\nexport type {\n TextareaFieldDescriptionComponent,\n TextareaFieldErrorComponent,\n TextareaFieldLabelComponent,\n TextareaFieldProps,\n} from './fields/Textarea.js'\n\nexport type {\n UploadFieldDescriptionComponent,\n UploadFieldErrorComponent,\n UploadFieldLabelComponent,\n UploadFieldProps,\n} from './fields/Upload.js'\n\nexport type { ErrorComponent, ErrorProps, GenericErrorProps } from './forms/Error.js'\n\nexport type { FormFieldBase } from './forms/Field.js'\n\nexport type {\n Description,\n DescriptionComponent,\n DescriptionFunction,\n FieldDescriptionProps,\n GenericDescriptionProps,\n StaticDescription,\n} from './forms/FieldDescription.js'\n\nexport type { Data, FilterOptionsResult, FormField, FormState, Row } from './forms/Form.js'\n\nexport type {\n GenericLabelProps,\n LabelComponent,\n LabelProps,\n SanitizedLabelProps,\n} from './forms/Label.js'\n\nexport type { RowLabel, RowLabelComponent } from './forms/RowLabel.js'\n\nexport type {\n AdminViewComponent,\n AdminViewProps,\n EditViewProps,\n InitPageResult,\n ServerSideEditViewProps,\n VisibleEntities,\n} from './views/types.js'\n\nexport type MappedServerComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component: React.ComponentType<TComponentClientProps>\n RenderedComponent: React.ReactNode\n props?: Partial<any>\n type: 'server'\n}\n\nexport type MappedClientComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component: React.ComponentType<TComponentClientProps>\n RenderedComponent?: React.ReactNode\n props?: Partial<TComponentClientProps>\n type: 'client'\n}\n\nexport type MappedComponent<TComponentClientProps extends JsonObject = JsonObject> =\n | MappedClientComponent<TComponentClientProps>\n | MappedServerComponent<TComponentClientProps>\n | undefined\n\nexport type CreateMappedComponent = {\n <T extends JsonObject>(\n component: { Component: React.FC<T> } | PayloadComponent<T> | null,\n props: object,\n fallback: React.FC,\n identifier: string,\n ): MappedComponent<T>\n\n <T extends JsonObject>(\n components: ({ Component: React.FC<T> } | PayloadComponent<T>)[],\n props: object,\n fallback: React.FC,\n identifier: string,\n ): MappedComponent<T>[]\n}\n"],"names":[],"mappings":"AA0OA,WAcC"}
@@ -1,32 +1,40 @@
1
1
  import type { ClientTranslationsObject } from '@payloadcms/translations';
2
2
  import type { Permissions } from '../../auth/index.js';
3
+ import type { ImportMap } from '../../bin/generateImportMap/index.js';
3
4
  import type { SanitizedCollectionConfig } from '../../collections/config/types.js';
4
- import type { Locale } from '../../config/types.js';
5
+ import type { ClientConfig } from '../../config/client.js';
6
+ import type { Locale, PayloadComponent } from '../../config/types.js';
5
7
  import type { SanitizedGlobalConfig } from '../../globals/config/types.js';
6
8
  import type { PayloadRequest } from '../../types/index.js';
7
9
  import type { LanguageOptions } from '../LanguageOptions.js';
10
+ import type { MappedComponent } from '../types.js';
8
11
  export type AdminViewConfig = {
9
12
  Component: AdminViewComponent;
10
13
  /** Whether the path should be matched exactly or as a prefix */
11
14
  exact?: boolean;
12
- path: string;
15
+ path?: string;
13
16
  sensitive?: boolean;
14
17
  strict?: boolean;
15
18
  };
19
+ export type MappedView = {
20
+ Component: MappedComponent;
21
+ actions?: MappedComponent[];
22
+ };
16
23
  export type AdminViewProps = {
17
- initPageResult: InitPageResult;
18
- params?: {
24
+ readonly clientConfig: ClientConfig;
25
+ readonly importMap: ImportMap;
26
+ readonly initPageResult: InitPageResult;
27
+ readonly params?: {
19
28
  [key: string]: string | string[] | undefined;
20
29
  };
21
- searchParams: {
30
+ readonly searchParams: {
22
31
  [key: string]: string | string[] | undefined;
23
32
  };
24
33
  };
25
- export type AdminViewComponent = React.ComponentType<AdminViewProps>;
26
- export type AdminView = AdminViewComponent | AdminViewConfig;
34
+ export type AdminViewComponent = PayloadComponent<AdminViewProps>;
27
35
  export type EditViewProps = {
28
- collectionSlug?: string;
29
- globalSlug?: string;
36
+ readonly collectionSlug?: string;
37
+ readonly globalSlug?: string;
30
38
  };
31
39
  export type VisibleEntities = {
32
40
  collections: SanitizedCollectionConfig['slug'][];
@@ -45,12 +53,12 @@ export type InitPageResult = {
45
53
  visibleEntities: VisibleEntities;
46
54
  };
47
55
  export type ServerSideEditViewProps = {
48
- initPageResult: InitPageResult;
49
- params: {
56
+ readonly initPageResult: InitPageResult;
57
+ readonly params: {
50
58
  [key: string]: string | string[] | undefined;
51
59
  };
52
- routeSegments: string[];
53
- searchParams: {
60
+ readonly routeSegments: string[];
61
+ readonly searchParams: {
54
62
  [key: string]: string | string[] | undefined;
55
63
  };
56
64
  };
@@ -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,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC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AY,CAAC,EAAE,qBAAqB,CAAA;IACpC,eAAe,EAAE,eAAe,CAAA;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,WAAW,CAAA;IACxB,GAAG,EAAE,cAAc,CAAA;IACnB,YAAY,EAAE,wBAAwB,CAAA;IACtC,eAAe,EAAE,eAAe,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAA;IACvC,QAAQ,CAAC,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAA;KAAE,CAAA;IACjE,QAAQ,CAAC,aAAa,EAAE,MAAM,EAAE,CAAA;IAChC,QAAQ,CAAC,YAAY,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAA;KAAE,CAAA;CACxE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/views/types.ts"],"sourcesContent":["import type { ClientTranslationsObject } from '@payloadcms/translations'\n\nimport type { Permissions } from '../../auth/index.js'\nimport type { SanitizedCollectionConfig } from '../../collections/config/types.js'\nimport type { Locale } 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'\n\nexport type AdminViewConfig = {\n Component: AdminViewComponent\n /** Whether the path should be matched exactly or as a prefix */\n exact?: boolean\n path: string\n sensitive?: boolean\n strict?: boolean\n}\n\nexport type AdminViewProps = {\n initPageResult: InitPageResult\n params?: { [key: string]: string | string[] | undefined }\n searchParams: { [key: string]: string | string[] | undefined }\n}\n\nexport type AdminViewComponent = React.ComponentType<AdminViewProps>\n\nexport type AdminView = AdminViewComponent | AdminViewConfig\n\nexport type EditViewProps = {\n collectionSlug?: string\n 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?: string\n globalConfig?: SanitizedGlobalConfig\n languageOptions: LanguageOptions\n locale?: Locale\n permissions: Permissions\n req: PayloadRequest\n translations: ClientTranslationsObject\n visibleEntities: VisibleEntities\n}\n\nexport type ServerSideEditViewProps = {\n initPageResult: InitPageResult\n params: { [key: string]: string | string[] | undefined }\n routeSegments: string[]\n searchParams: { [key: string]: string | string[] | undefined }\n}\n"],"names":[],"mappings":"AAmDA,WAKC"}
1
+ {"version":3,"sources":["../../../src/admin/views/types.ts"],"sourcesContent":["import type { ClientTranslationsObject } from '@payloadcms/translations'\n\nimport type { Permissions } 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, 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 { MappedComponent } 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 path?: string\n sensitive?: boolean\n strict?: boolean\n}\n\nexport type MappedView = {\n Component: MappedComponent\n actions?: MappedComponent[]\n}\n\nexport type AdminViewProps = {\n readonly clientConfig: ClientConfig\n readonly importMap: ImportMap\n readonly initPageResult: InitPageResult\n readonly params?: { [key: string]: string | string[] | undefined }\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?: string\n globalConfig?: SanitizedGlobalConfig\n languageOptions: LanguageOptions\n locale?: Locale\n permissions: Permissions\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 routeSegments: string[]\n readonly searchParams: { [key: string]: string | string[] | undefined }\n}\n"],"names":[],"mappings":"AA2DA,WAKC"}
@@ -7,7 +7,7 @@ export const apiKeyFields = [
7
7
  type: 'checkbox',
8
8
  admin: {
9
9
  components: {
10
- Field: ()=>null
10
+ Field: '@payloadcms/ui/shared#emptyComponent'
11
11
  }
12
12
  },
13
13
  label: ({ t })=>t('authentication:enableAPIKey')
@@ -17,7 +17,7 @@ export const apiKeyFields = [
17
17
  type: 'text',
18
18
  admin: {
19
19
  components: {
20
- Field: ()=>null
20
+ Field: '@payloadcms/ui/shared#emptyComponent'
21
21
  }
22
22
  },
23
23
  hooks: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/auth/baseFields/apiKey.ts"],"sourcesContent":["import crypto from 'crypto'\n\nimport type { Field, FieldHook } from '../../fields/config/types.js'\n\nconst encryptKey: FieldHook = ({ req, value }) =>\n value ? req.payload.encrypt(value as string) : null\nconst decryptKey: FieldHook = ({ req, value }) =>\n value ? req.payload.decrypt(value as string) : undefined\n\nexport const apiKeyFields = [\n {\n name: 'enableAPIKey',\n type: 'checkbox',\n admin: {\n components: {\n Field: () => null,\n },\n },\n label: ({ t }) => t('authentication:enableAPIKey'),\n },\n {\n name: 'apiKey',\n type: 'text',\n admin: {\n components: {\n Field: () => null,\n },\n },\n hooks: {\n afterRead: [decryptKey],\n beforeChange: [encryptKey],\n },\n label: ({ t }) => t('authentication:apiKey'),\n },\n {\n name: 'apiKeyIndex',\n type: 'text',\n admin: {\n disabled: true,\n },\n hidden: true,\n hooks: {\n beforeValidate: [\n ({ data, req, value }) => {\n if (data.apiKey === false || data.apiKey === null) {\n return null\n }\n if (data.enableAPIKey === false || data.enableAPIKey === null) {\n return null\n }\n if (data.apiKey) {\n return crypto\n .createHmac('sha1', req.payload.secret)\n .update(data.apiKey as string)\n .digest('hex')\n }\n return value\n },\n ],\n },\n },\n] as Field[]\n"],"names":["crypto","encryptKey","req","value","payload","encrypt","decryptKey","decrypt","undefined","apiKeyFields","name","type","admin","components","Field","label","t","hooks","afterRead","beforeChange","disabled","hidden","beforeValidate","data","apiKey","enableAPIKey","createHmac","secret","update","digest"],"mappings":"AAAA,OAAOA,YAAY,SAAQ;AAI3B,MAAMC,aAAwB,CAAC,EAAEC,GAAG,EAAEC,KAAK,EAAE,GAC3CA,QAAQD,IAAIE,OAAO,CAACC,OAAO,CAACF,SAAmB;AACjD,MAAMG,aAAwB,CAAC,EAAEJ,GAAG,EAAEC,KAAK,EAAE,GAC3CA,QAAQD,IAAIE,OAAO,CAACG,OAAO,CAACJ,SAAmBK;AAEjD,OAAO,MAAMC,eAAe;IAC1B;QACEC,MAAM;QACNC,MAAM;QACNC,OAAO;YACLC,YAAY;gBACVC,OAAO,IAAM;YACf;QACF;QACAC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;IACtB;IACA;QACEN,MAAM;QACNC,MAAM;QACNC,OAAO;YACLC,YAAY;gBACVC,OAAO,IAAM;YACf;QACF;QACAG,OAAO;YACLC,WAAW;gBAACZ;aAAW;YACvBa,cAAc;gBAAClB;aAAW;QAC5B;QACAc,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;IACtB;IACA;QACEN,MAAM;QACNC,MAAM;QACNC,OAAO;YACLQ,UAAU;QACZ;QACAC,QAAQ;QACRJ,OAAO;YACLK,gBAAgB;gBACd,CAAC,EAAEC,IAAI,EAAErB,GAAG,EAAEC,KAAK,EAAE;oBACnB,IAAIoB,KAAKC,MAAM,KAAK,SAASD,KAAKC,MAAM,KAAK,MAAM;wBACjD,OAAO;oBACT;oBACA,IAAID,KAAKE,YAAY,KAAK,SAASF,KAAKE,YAAY,KAAK,MAAM;wBAC7D,OAAO;oBACT;oBACA,IAAIF,KAAKC,MAAM,EAAE;wBACf,OAAOxB,OACJ0B,UAAU,CAAC,QAAQxB,IAAIE,OAAO,CAACuB,MAAM,EACrCC,MAAM,CAACL,KAAKC,MAAM,EAClBK,MAAM,CAAC;oBACZ;oBACA,OAAO1B;gBACT;aACD;QACH;IACF;CACD,CAAW"}
1
+ {"version":3,"sources":["../../../src/auth/baseFields/apiKey.ts"],"sourcesContent":["import crypto from 'crypto'\n\nimport type { Field, FieldHook } from '../../fields/config/types.js'\n\nconst encryptKey: FieldHook = ({ req, value }) =>\n value ? req.payload.encrypt(value as string) : null\nconst decryptKey: FieldHook = ({ req, value }) =>\n value ? req.payload.decrypt(value as string) : undefined\n\nexport const apiKeyFields = [\n {\n name: 'enableAPIKey',\n type: 'checkbox',\n admin: {\n components: {\n Field: '@payloadcms/ui/shared#emptyComponent',\n },\n },\n label: ({ t }) => t('authentication:enableAPIKey'),\n },\n {\n name: 'apiKey',\n type: 'text',\n admin: {\n components: {\n Field: '@payloadcms/ui/shared#emptyComponent',\n },\n },\n hooks: {\n afterRead: [decryptKey],\n beforeChange: [encryptKey],\n },\n label: ({ t }) => t('authentication:apiKey'),\n },\n {\n name: 'apiKeyIndex',\n type: 'text',\n admin: {\n disabled: true,\n },\n hidden: true,\n hooks: {\n beforeValidate: [\n ({ data, req, value }) => {\n if (data.apiKey === false || data.apiKey === null) {\n return null\n }\n if (data.enableAPIKey === false || data.enableAPIKey === null) {\n return null\n }\n if (data.apiKey) {\n return crypto\n .createHmac('sha1', req.payload.secret)\n .update(data.apiKey as string)\n .digest('hex')\n }\n return value\n },\n ],\n },\n },\n] as Field[]\n"],"names":["crypto","encryptKey","req","value","payload","encrypt","decryptKey","decrypt","undefined","apiKeyFields","name","type","admin","components","Field","label","t","hooks","afterRead","beforeChange","disabled","hidden","beforeValidate","data","apiKey","enableAPIKey","createHmac","secret","update","digest"],"mappings":"AAAA,OAAOA,YAAY,SAAQ;AAI3B,MAAMC,aAAwB,CAAC,EAAEC,GAAG,EAAEC,KAAK,EAAE,GAC3CA,QAAQD,IAAIE,OAAO,CAACC,OAAO,CAACF,SAAmB;AACjD,MAAMG,aAAwB,CAAC,EAAEJ,GAAG,EAAEC,KAAK,EAAE,GAC3CA,QAAQD,IAAIE,OAAO,CAACG,OAAO,CAACJ,SAAmBK;AAEjD,OAAO,MAAMC,eAAe;IAC1B;QACEC,MAAM;QACNC,MAAM;QACNC,OAAO;YACLC,YAAY;gBACVC,OAAO;YACT;QACF;QACAC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;IACtB;IACA;QACEN,MAAM;QACNC,MAAM;QACNC,OAAO;YACLC,YAAY;gBACVC,OAAO;YACT;QACF;QACAG,OAAO;YACLC,WAAW;gBAACZ;aAAW;YACvBa,cAAc;gBAAClB;aAAW;QAC5B;QACAc,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;IACtB;IACA;QACEN,MAAM;QACNC,MAAM;QACNC,OAAO;YACLQ,UAAU;QACZ;QACAC,QAAQ;QACRJ,OAAO;YACLK,gBAAgB;gBACd,CAAC,EAAEC,IAAI,EAAErB,GAAG,EAAEC,KAAK,EAAE;oBACnB,IAAIoB,KAAKC,MAAM,KAAK,SAASD,KAAKC,MAAM,KAAK,MAAM;wBACjD,OAAO;oBACT;oBACA,IAAID,KAAKE,YAAY,KAAK,SAASF,KAAKE,YAAY,KAAK,MAAM;wBAC7D,OAAO;oBACT;oBACA,IAAIF,KAAKC,MAAM,EAAE;wBACf,OAAOxB,OACJ0B,UAAU,CAAC,QAAQxB,IAAIE,OAAO,CAACuB,MAAM,EACrCC,MAAM,CAACL,KAAKC,MAAM,EAClBK,MAAM,CAAC;oBACZ;oBACA,OAAO1B;gBACT;aACD;QACH;IACF;CACD,CAAW"}
@@ -4,7 +4,7 @@ export const emailFieldConfig = {
4
4
  type: 'email',
5
5
  admin: {
6
6
  components: {
7
- Field: ()=>null
7
+ Field: '@payloadcms/ui/shared#emptyComponent'
8
8
  }
9
9
  },
10
10
  hooks: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/auth/baseFields/email.ts"],"sourcesContent":["import type { EmailField } from '../../fields/config/types.js'\n\nimport { email } from '../../fields/validations.js'\n\nexport const emailFieldConfig: EmailField = {\n name: 'email',\n type: 'email',\n admin: {\n components: {\n Field: () => null,\n },\n },\n hooks: {\n beforeChange: [\n ({ value }) => {\n if (value) {\n return value.toLowerCase().trim()\n }\n },\n ],\n },\n label: ({ t }) => t('general:email'),\n required: true,\n unique: true,\n validate: email,\n}\n"],"names":["email","emailFieldConfig","name","type","admin","components","Field","hooks","beforeChange","value","toLowerCase","trim","label","t","required","unique","validate"],"mappings":"AAEA,SAASA,KAAK,QAAQ,8BAA6B;AAEnD,OAAO,MAAMC,mBAA+B;IAC1CC,MAAM;IACNC,MAAM;IACNC,OAAO;QACLC,YAAY;YACVC,OAAO,IAAM;QACf;IACF;IACAC,OAAO;QACLC,cAAc;YACZ,CAAC,EAAEC,KAAK,EAAE;gBACR,IAAIA,OAAO;oBACT,OAAOA,MAAMC,WAAW,GAAGC,IAAI;gBACjC;YACF;SACD;IACH;IACAC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;IACpBC,UAAU;IACVC,QAAQ;IACRC,UAAUhB;AACZ,EAAC"}
1
+ {"version":3,"sources":["../../../src/auth/baseFields/email.ts"],"sourcesContent":["import type { EmailField } from '../../fields/config/types.js'\n\nimport { email } from '../../fields/validations.js'\n\nexport const emailFieldConfig: EmailField = {\n name: 'email',\n type: 'email',\n admin: {\n components: {\n Field: '@payloadcms/ui/shared#emptyComponent',\n },\n },\n hooks: {\n beforeChange: [\n ({ value }) => {\n if (value) {\n return value.toLowerCase().trim()\n }\n },\n ],\n },\n label: ({ t }) => t('general:email'),\n required: true,\n unique: true,\n validate: email,\n}\n"],"names":["email","emailFieldConfig","name","type","admin","components","Field","hooks","beforeChange","value","toLowerCase","trim","label","t","required","unique","validate"],"mappings":"AAEA,SAASA,KAAK,QAAQ,8BAA6B;AAEnD,OAAO,MAAMC,mBAA+B;IAC1CC,MAAM;IACNC,MAAM;IACNC,OAAO;QACLC,YAAY;YACVC,OAAO;QACT;IACF;IACAC,OAAO;QACLC,cAAc;YACZ,CAAC,EAAEC,KAAK,EAAE;gBACR,IAAIA,OAAO;oBACT,OAAOA,MAAMC,WAAW,GAAGC,IAAI;gBACjC;YACF;SACD;IACH;IACAC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;IACpBC,UAAU;IACVC,QAAQ;IACRC,UAAUhB;AACZ,EAAC"}
@@ -4,7 +4,7 @@ export const usernameFieldConfig = {
4
4
  type: 'text',
5
5
  admin: {
6
6
  components: {
7
- Field: ()=>null
7
+ Field: '@payloadcms/ui/shared#emptyComponent'
8
8
  }
9
9
  },
10
10
  hooks: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/auth/baseFields/username.ts"],"sourcesContent":["import type { TextField } from '../../fields/config/types.js'\n\nimport { username } from '../../fields/validations.js'\n\nexport const usernameFieldConfig: TextField = {\n name: 'username',\n type: 'text',\n admin: {\n components: {\n Field: () => null,\n },\n },\n hooks: {\n beforeChange: [\n ({ value }) => {\n if (value) {\n return value.toLowerCase().trim()\n }\n },\n ],\n },\n label: ({ t }) => t('authentication:username'),\n required: true,\n unique: true,\n validate: username,\n}\n"],"names":["username","usernameFieldConfig","name","type","admin","components","Field","hooks","beforeChange","value","toLowerCase","trim","label","t","required","unique","validate"],"mappings":"AAEA,SAASA,QAAQ,QAAQ,8BAA6B;AAEtD,OAAO,MAAMC,sBAAiC;IAC5CC,MAAM;IACNC,MAAM;IACNC,OAAO;QACLC,YAAY;YACVC,OAAO,IAAM;QACf;IACF;IACAC,OAAO;QACLC,cAAc;YACZ,CAAC,EAAEC,KAAK,EAAE;gBACR,IAAIA,OAAO;oBACT,OAAOA,MAAMC,WAAW,GAAGC,IAAI;gBACjC;YACF;SACD;IACH;IACAC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;IACpBC,UAAU;IACVC,QAAQ;IACRC,UAAUhB;AACZ,EAAC"}
1
+ {"version":3,"sources":["../../../src/auth/baseFields/username.ts"],"sourcesContent":["import type { TextField } from '../../fields/config/types.js'\n\nimport { username } from '../../fields/validations.js'\n\nexport const usernameFieldConfig: TextField = {\n name: 'username',\n type: 'text',\n admin: {\n components: {\n Field: '@payloadcms/ui/shared#emptyComponent',\n },\n },\n hooks: {\n beforeChange: [\n ({ value }) => {\n if (value) {\n return value.toLowerCase().trim()\n }\n },\n ],\n },\n label: ({ t }) => t('authentication:username'),\n required: true,\n unique: true,\n validate: username,\n}\n"],"names":["username","usernameFieldConfig","name","type","admin","components","Field","hooks","beforeChange","value","toLowerCase","trim","label","t","required","unique","validate"],"mappings":"AAEA,SAASA,QAAQ,QAAQ,8BAA6B;AAEtD,OAAO,MAAMC,sBAAiC;IAC5CC,MAAM;IACNC,MAAM;IACNC,OAAO;QACLC,YAAY;YACVC,OAAO;QACT;IACF;IACAC,OAAO;QACLC,cAAc;YACZ,CAAC,EAAEC,KAAK,EAAE;gBACR,IAAIA,OAAO;oBACT,OAAOA,MAAMC,WAAW,GAAGC,IAAI;gBACjC;YACF;SACD;IACH;IACAC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;IACpBC,UAAU;IACVC,QAAQ;IACRC,UAAUhB;AACZ,EAAC"}