payload 3.0.0-beta.127 → 3.0.0-beta.129

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 (294) hide show
  1. package/dist/admin/RichText.d.ts +8 -21
  2. package/dist/admin/RichText.d.ts.map +1 -1
  3. package/dist/admin/RichText.js.map +1 -1
  4. package/dist/admin/elements/Cell.d.ts +7 -9
  5. package/dist/admin/elements/Cell.d.ts.map +1 -1
  6. package/dist/admin/elements/Cell.js.map +1 -1
  7. package/dist/admin/fields/Array.d.ts +3 -3
  8. package/dist/admin/fields/Array.d.ts.map +1 -1
  9. package/dist/admin/fields/Array.js.map +1 -1
  10. package/dist/admin/fields/Blocks.d.ts +2 -1
  11. package/dist/admin/fields/Blocks.d.ts.map +1 -1
  12. package/dist/admin/fields/Blocks.js.map +1 -1
  13. package/dist/admin/fields/Checkbox.d.ts +1 -0
  14. package/dist/admin/fields/Checkbox.d.ts.map +1 -1
  15. package/dist/admin/fields/Checkbox.js.map +1 -1
  16. package/dist/admin/fields/Code.d.ts +2 -1
  17. package/dist/admin/fields/Code.d.ts.map +1 -1
  18. package/dist/admin/fields/Code.js.map +1 -1
  19. package/dist/admin/fields/Collapsible.d.ts +5 -2
  20. package/dist/admin/fields/Collapsible.d.ts.map +1 -1
  21. package/dist/admin/fields/Collapsible.js.map +1 -1
  22. package/dist/admin/fields/Date.d.ts +1 -0
  23. package/dist/admin/fields/Date.d.ts.map +1 -1
  24. package/dist/admin/fields/Date.js.map +1 -1
  25. package/dist/admin/fields/Email.d.ts +1 -1
  26. package/dist/admin/fields/Email.d.ts.map +1 -1
  27. package/dist/admin/fields/Email.js.map +1 -1
  28. package/dist/admin/fields/Group.d.ts +5 -2
  29. package/dist/admin/fields/Group.d.ts.map +1 -1
  30. package/dist/admin/fields/Group.js.map +1 -1
  31. package/dist/admin/fields/Hidden.d.ts +7 -6
  32. package/dist/admin/fields/Hidden.d.ts.map +1 -1
  33. package/dist/admin/fields/Hidden.js.map +1 -1
  34. package/dist/admin/fields/JSON.d.ts +1 -0
  35. package/dist/admin/fields/JSON.d.ts.map +1 -1
  36. package/dist/admin/fields/JSON.js.map +1 -1
  37. package/dist/admin/fields/Join.d.ts +3 -1
  38. package/dist/admin/fields/Join.d.ts.map +1 -1
  39. package/dist/admin/fields/Join.js.map +1 -1
  40. package/dist/admin/fields/Number.d.ts +1 -0
  41. package/dist/admin/fields/Number.d.ts.map +1 -1
  42. package/dist/admin/fields/Number.js.map +1 -1
  43. package/dist/admin/fields/Point.d.ts +1 -0
  44. package/dist/admin/fields/Point.d.ts.map +1 -1
  45. package/dist/admin/fields/Point.js.map +1 -1
  46. package/dist/admin/fields/Radio.d.ts +1 -0
  47. package/dist/admin/fields/Radio.d.ts.map +1 -1
  48. package/dist/admin/fields/Radio.js.map +1 -1
  49. package/dist/admin/fields/Relationship.d.ts +1 -0
  50. package/dist/admin/fields/Relationship.d.ts.map +1 -1
  51. package/dist/admin/fields/Relationship.js.map +1 -1
  52. package/dist/admin/fields/RichText.d.ts +3 -2
  53. package/dist/admin/fields/RichText.d.ts.map +1 -1
  54. package/dist/admin/fields/RichText.js.map +1 -1
  55. package/dist/admin/fields/Row.d.ts +1 -2
  56. package/dist/admin/fields/Row.d.ts.map +1 -1
  57. package/dist/admin/fields/Row.js.map +1 -1
  58. package/dist/admin/fields/Select.d.ts +1 -0
  59. package/dist/admin/fields/Select.d.ts.map +1 -1
  60. package/dist/admin/fields/Select.js.map +1 -1
  61. package/dist/admin/fields/Tabs.d.ts +4 -2
  62. package/dist/admin/fields/Tabs.d.ts.map +1 -1
  63. package/dist/admin/fields/Tabs.js.map +1 -1
  64. package/dist/admin/fields/Text.d.ts +1 -0
  65. package/dist/admin/fields/Text.d.ts.map +1 -1
  66. package/dist/admin/fields/Text.js.map +1 -1
  67. package/dist/admin/fields/Textarea.d.ts +1 -0
  68. package/dist/admin/fields/Textarea.d.ts.map +1 -1
  69. package/dist/admin/fields/Textarea.js.map +1 -1
  70. package/dist/admin/fields/UI.d.ts +8 -0
  71. package/dist/admin/fields/UI.d.ts.map +1 -0
  72. package/dist/admin/fields/UI.js +3 -0
  73. package/dist/admin/fields/UI.js.map +1 -0
  74. package/dist/admin/fields/Upload.d.ts +1 -0
  75. package/dist/admin/fields/Upload.d.ts.map +1 -1
  76. package/dist/admin/fields/Upload.js.map +1 -1
  77. package/dist/admin/forms/Description.d.ts +1 -2
  78. package/dist/admin/forms/Description.d.ts.map +1 -1
  79. package/dist/admin/forms/Description.js.map +1 -1
  80. package/dist/admin/forms/Error.d.ts +0 -2
  81. package/dist/admin/forms/Error.d.ts.map +1 -1
  82. package/dist/admin/forms/Error.js.map +1 -1
  83. package/dist/admin/forms/Field.d.ts +53 -29
  84. package/dist/admin/forms/Field.d.ts.map +1 -1
  85. package/dist/admin/forms/Field.js.map +1 -1
  86. package/dist/admin/forms/Form.d.ts +46 -3
  87. package/dist/admin/forms/Form.d.ts.map +1 -1
  88. package/dist/admin/forms/Form.js.map +1 -1
  89. package/dist/admin/forms/Label.d.ts +1 -2
  90. package/dist/admin/forms/Label.d.ts.map +1 -1
  91. package/dist/admin/forms/Label.js.map +1 -1
  92. package/dist/admin/functions/index.d.ts +44 -0
  93. package/dist/admin/functions/index.d.ts.map +1 -0
  94. package/dist/admin/functions/index.js +3 -0
  95. package/dist/admin/functions/index.js.map +1 -0
  96. package/dist/admin/types.d.ts +63 -20
  97. package/dist/admin/types.d.ts.map +1 -1
  98. package/dist/admin/types.js +4 -1
  99. package/dist/admin/types.js.map +1 -1
  100. package/dist/admin/views/types.d.ts +9 -6
  101. package/dist/admin/views/types.d.ts.map +1 -1
  102. package/dist/admin/views/types.js.map +1 -1
  103. package/dist/assets/images/github-banner-nextjs-native.jpg +0 -0
  104. package/dist/auth/ensureUsernameOrEmail.js +4 -4
  105. package/dist/auth/ensureUsernameOrEmail.js.map +1 -1
  106. package/dist/auth/getFieldsToSign.js +13 -13
  107. package/dist/auth/getFieldsToSign.js.map +1 -1
  108. package/dist/auth/operations/local/auth.d.ts.map +1 -1
  109. package/dist/auth/operations/local/auth.js +2 -2
  110. package/dist/auth/operations/local/auth.js.map +1 -1
  111. package/dist/auth/operations/login.js +10 -10
  112. package/dist/auth/operations/login.js.map +1 -1
  113. package/dist/auth/strategies/local/generatePasswordSaltHash.js +2 -2
  114. package/dist/auth/strategies/local/generatePasswordSaltHash.js.map +1 -1
  115. package/dist/auth/strategies/local/register.js +4 -4
  116. package/dist/auth/strategies/local/register.js.map +1 -1
  117. package/dist/bin/generateImportMap/index.d.ts.map +1 -1
  118. package/dist/bin/generateImportMap/index.js +32 -5
  119. package/dist/bin/generateImportMap/index.js.map +1 -1
  120. package/dist/bin/generateImportMap/parsePayloadComponent.d.ts +1 -1
  121. package/dist/bin/generateImportMap/parsePayloadComponent.js +5 -5
  122. package/dist/bin/generateImportMap/parsePayloadComponent.js.map +1 -1
  123. package/dist/bin/migrate.js +17 -17
  124. package/dist/bin/migrate.js.map +1 -1
  125. package/dist/collections/config/client.d.ts +23 -35
  126. package/dist/collections/config/client.d.ts.map +1 -1
  127. package/dist/collections/config/client.js +104 -1
  128. package/dist/collections/config/client.js.map +1 -1
  129. package/dist/collections/config/sanitize.d.ts.map +1 -1
  130. package/dist/collections/config/sanitize.js +4 -2
  131. package/dist/collections/config/sanitize.js.map +1 -1
  132. package/dist/collections/config/types.d.ts +3 -3
  133. package/dist/collections/config/types.d.ts.map +1 -1
  134. package/dist/collections/config/types.js.map +1 -1
  135. package/dist/collections/operations/countVersions.d.ts +14 -0
  136. package/dist/collections/operations/countVersions.d.ts.map +1 -0
  137. package/dist/collections/operations/countVersions.js +74 -0
  138. package/dist/collections/operations/countVersions.js.map +1 -0
  139. package/dist/collections/operations/local/count.d.ts.map +1 -1
  140. package/dist/collections/operations/local/count.js +1 -0
  141. package/dist/collections/operations/local/count.js.map +1 -1
  142. package/dist/collections/operations/local/countVersions.d.ts +20 -0
  143. package/dist/collections/operations/local/countVersions.d.ts.map +1 -0
  144. package/dist/collections/operations/local/countVersions.js +20 -0
  145. package/dist/collections/operations/local/countVersions.js.map +1 -0
  146. package/dist/collections/operations/local/index.d.ts +2 -0
  147. package/dist/collections/operations/local/index.d.ts.map +1 -1
  148. package/dist/collections/operations/local/index.js +2 -0
  149. package/dist/collections/operations/local/index.js.map +1 -1
  150. package/dist/collections/operations/utils.d.ts +6 -0
  151. package/dist/collections/operations/utils.d.ts.map +1 -1
  152. package/dist/collections/operations/utils.js.map +1 -1
  153. package/dist/config/client.d.ts +10 -13
  154. package/dist/config/client.d.ts.map +1 -1
  155. package/dist/config/client.js +36 -0
  156. package/dist/config/client.js.map +1 -1
  157. package/dist/config/types.d.ts +20 -15
  158. package/dist/config/types.d.ts.map +1 -1
  159. package/dist/config/types.js.map +1 -1
  160. package/dist/database/getLocalizedPaths.js +1 -1
  161. package/dist/database/getLocalizedPaths.js.map +1 -1
  162. package/dist/database/sanitizeJoinQuery.js +6 -6
  163. package/dist/database/sanitizeJoinQuery.js.map +1 -1
  164. package/dist/database/types.d.ts +14 -0
  165. package/dist/database/types.d.ts.map +1 -1
  166. package/dist/database/types.js.map +1 -1
  167. package/dist/errors/ValidationError.d.ts +1 -1
  168. package/dist/errors/ValidationError.d.ts.map +1 -1
  169. package/dist/errors/ValidationError.js +1 -1
  170. package/dist/errors/ValidationError.js.map +1 -1
  171. package/dist/exports/shared.d.ts +3 -1
  172. package/dist/exports/shared.d.ts.map +1 -1
  173. package/dist/exports/shared.js +3 -1
  174. package/dist/exports/shared.js.map +1 -1
  175. package/dist/fields/config/client.d.ts +16 -1
  176. package/dist/fields/config/client.d.ts.map +1 -1
  177. package/dist/fields/config/client.js +229 -1
  178. package/dist/fields/config/client.js.map +1 -1
  179. package/dist/fields/config/sanitize.d.ts +2 -2
  180. package/dist/fields/config/sanitize.d.ts.map +1 -1
  181. package/dist/fields/config/sanitize.js +7 -21
  182. package/dist/fields/config/sanitize.js.map +1 -1
  183. package/dist/fields/config/sanitizeJoinField.d.ts +2 -2
  184. package/dist/fields/config/sanitizeJoinField.d.ts.map +1 -1
  185. package/dist/fields/config/sanitizeJoinField.js +2 -2
  186. package/dist/fields/config/sanitizeJoinField.js.map +1 -1
  187. package/dist/fields/config/types.d.ts +28 -171
  188. package/dist/fields/config/types.d.ts.map +1 -1
  189. package/dist/fields/config/types.js.map +1 -1
  190. package/dist/fields/getFieldPaths.d.ts +25 -8
  191. package/dist/fields/getFieldPaths.d.ts.map +1 -1
  192. package/dist/fields/getFieldPaths.js +9 -37
  193. package/dist/fields/getFieldPaths.js.map +1 -1
  194. package/dist/fields/hooks/afterChange/promise.d.ts +2 -1
  195. package/dist/fields/hooks/afterChange/promise.d.ts.map +1 -1
  196. package/dist/fields/hooks/afterChange/promise.js +66 -62
  197. package/dist/fields/hooks/afterChange/promise.js.map +1 -1
  198. package/dist/fields/hooks/afterChange/traverseFields.d.ts.map +1 -1
  199. package/dist/fields/hooks/afterChange/traverseFields.js +2 -1
  200. package/dist/fields/hooks/afterChange/traverseFields.js.map +1 -1
  201. package/dist/fields/hooks/afterRead/promise.d.ts +2 -1
  202. package/dist/fields/hooks/afterRead/promise.d.ts.map +1 -1
  203. package/dist/fields/hooks/afterRead/promise.js +107 -103
  204. package/dist/fields/hooks/afterRead/promise.js.map +1 -1
  205. package/dist/fields/hooks/afterRead/traverseFields.d.ts.map +1 -1
  206. package/dist/fields/hooks/afterRead/traverseFields.js +2 -1
  207. package/dist/fields/hooks/afterRead/traverseFields.js.map +1 -1
  208. package/dist/fields/hooks/beforeChange/index.d.ts.map +1 -1
  209. package/dist/fields/hooks/beforeChange/index.js.map +1 -1
  210. package/dist/fields/hooks/beforeChange/promise.d.ts +8 -5
  211. package/dist/fields/hooks/beforeChange/promise.d.ts.map +1 -1
  212. package/dist/fields/hooks/beforeChange/promise.js +99 -110
  213. package/dist/fields/hooks/beforeChange/promise.js.map +1 -1
  214. package/dist/fields/hooks/beforeChange/traverseFields.d.ts +2 -4
  215. package/dist/fields/hooks/beforeChange/traverseFields.d.ts.map +1 -1
  216. package/dist/fields/hooks/beforeChange/traverseFields.js +2 -1
  217. package/dist/fields/hooks/beforeChange/traverseFields.js.map +1 -1
  218. package/dist/fields/hooks/beforeDuplicate/promise.d.ts +2 -1
  219. package/dist/fields/hooks/beforeDuplicate/promise.d.ts.map +1 -1
  220. package/dist/fields/hooks/beforeDuplicate/promise.js +47 -43
  221. package/dist/fields/hooks/beforeDuplicate/promise.js.map +1 -1
  222. package/dist/fields/hooks/beforeDuplicate/traverseFields.d.ts.map +1 -1
  223. package/dist/fields/hooks/beforeDuplicate/traverseFields.js +2 -1
  224. package/dist/fields/hooks/beforeDuplicate/traverseFields.js.map +1 -1
  225. package/dist/fields/hooks/beforeValidate/promise.d.ts +2 -1
  226. package/dist/fields/hooks/beforeValidate/promise.d.ts.map +1 -1
  227. package/dist/fields/hooks/beforeValidate/promise.js +105 -101
  228. package/dist/fields/hooks/beforeValidate/promise.js.map +1 -1
  229. package/dist/fields/hooks/beforeValidate/traverseFields.d.ts.map +1 -1
  230. package/dist/fields/hooks/beforeValidate/traverseFields.js +2 -1
  231. package/dist/fields/hooks/beforeValidate/traverseFields.js.map +1 -1
  232. package/dist/globals/config/client.d.ts +18 -25
  233. package/dist/globals/config/client.d.ts.map +1 -1
  234. package/dist/globals/config/client.js +53 -1
  235. package/dist/globals/config/client.js.map +1 -1
  236. package/dist/globals/config/sanitize.d.ts.map +1 -1
  237. package/dist/globals/config/sanitize.js +3 -1
  238. package/dist/globals/config/sanitize.js.map +1 -1
  239. package/dist/globals/operations/countGlobalVersions.d.ts +13 -0
  240. package/dist/globals/operations/countGlobalVersions.d.ts.map +1 -0
  241. package/dist/globals/operations/countGlobalVersions.js +49 -0
  242. package/dist/globals/operations/countGlobalVersions.js.map +1 -0
  243. package/dist/globals/operations/local/countGlobalVersions.d.ts +20 -0
  244. package/dist/globals/operations/local/countGlobalVersions.d.ts.map +1 -0
  245. package/dist/globals/operations/local/countGlobalVersions.js +20 -0
  246. package/dist/globals/operations/local/countGlobalVersions.js.map +1 -0
  247. package/dist/globals/operations/local/index.d.ts +2 -0
  248. package/dist/globals/operations/local/index.d.ts.map +1 -1
  249. package/dist/globals/operations/local/index.js +2 -0
  250. package/dist/globals/operations/local/index.js.map +1 -1
  251. package/dist/index.d.ts +28 -12
  252. package/dist/index.d.ts.map +1 -1
  253. package/dist/index.js +21 -2
  254. package/dist/index.js.map +1 -1
  255. package/dist/queues/config/jobsCollection.d.ts.map +1 -1
  256. package/dist/queues/config/jobsCollection.js +2 -11
  257. package/dist/queues/config/jobsCollection.js.map +1 -1
  258. package/dist/queues/config/types/workflowTypes.d.ts +2 -1
  259. package/dist/queues/config/types/workflowTypes.d.ts.map +1 -1
  260. package/dist/queues/config/types/workflowTypes.js.map +1 -1
  261. package/dist/queues/localAPI.d.ts +2 -0
  262. package/dist/queues/localAPI.d.ts.map +1 -1
  263. package/dist/queues/localAPI.js +13 -0
  264. package/dist/queues/localAPI.js.map +1 -1
  265. package/dist/utilities/configToJSONSchema.js +232 -232
  266. package/dist/utilities/configToJSONSchema.js.map +1 -1
  267. package/dist/utilities/createLocalReq.d.ts +1 -1
  268. package/dist/utilities/createLocalReq.d.ts.map +1 -1
  269. package/dist/utilities/createLocalReq.js +4 -4
  270. package/dist/utilities/createLocalReq.js.map +1 -1
  271. package/dist/utilities/deepCopyObject.d.ts +1 -0
  272. package/dist/utilities/deepCopyObject.d.ts.map +1 -1
  273. package/dist/utilities/deepCopyObject.js +23 -0
  274. package/dist/utilities/deepCopyObject.js.map +1 -1
  275. package/dist/utilities/fieldSchemaToJSON.js +17 -17
  276. package/dist/utilities/fieldSchemaToJSON.js.map +1 -1
  277. package/dist/utilities/formatErrors.d.ts +6 -0
  278. package/dist/utilities/formatErrors.d.ts.map +1 -0
  279. package/dist/utilities/formatErrors.js +56 -0
  280. package/dist/utilities/formatErrors.js.map +1 -0
  281. package/dist/utilities/telemetry/conf/index.js +2 -2
  282. package/dist/utilities/telemetry/conf/index.js.map +1 -1
  283. package/dist/versions/saveVersion.d.ts.map +1 -1
  284. package/dist/versions/saveVersion.js +1 -7
  285. package/dist/versions/saveVersion.js.map +1 -1
  286. package/dist/versions/types.d.ts +1 -1
  287. package/dist/versions/types.d.ts.map +1 -1
  288. package/dist/versions/types.js.map +1 -1
  289. package/license.md +22 -0
  290. package/package.json +3 -3
  291. package/dist/utilities/mergeListSearchAndWhere.d.ts +0 -12
  292. package/dist/utilities/mergeListSearchAndWhere.d.ts.map +0 -1
  293. package/dist/utilities/mergeListSearchAndWhere.js +0 -57
  294. package/dist/utilities/mergeListSearchAndWhere.js.map +0 -1
@@ -1,39 +1,63 @@
1
+ import type { I18nClient } from '@payloadcms/translations';
1
2
  import type { MarkOptional } from 'ts-essentials';
2
- import type { User } from '../../auth/types.js';
3
- import type { Locale, ServerProps } from '../../config/types.js';
4
- import type { ClientField, Field, Validate } from '../../fields/config/types.js';
5
- import type { DocumentPreferences } from '../../preferences/types.js';
6
- import type { FieldDescriptionClientProps, FieldDescriptionServerProps } from './Description.js';
7
- import type { FieldErrorClientProps, FieldErrorServerProps } from './Error.js';
8
- import type { FieldLabelClientProps, FieldLabelServerProps } from './Label.js';
3
+ import type { FieldPermissions, User } from '../../auth/types.js';
4
+ import type { ClientBlock, ClientField, Field } from '../../fields/config/types.js';
5
+ import type { Payload } from '../../types/index.js';
6
+ import type { ClientTab, Data, FieldSchemaMap, FormField, FormState, RenderedField } from '../types.js';
9
7
  export type ClientFieldWithOptionalType = MarkOptional<ClientField, 'type'>;
10
- export type ClientFieldBase<TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType> = {
11
- readonly descriptionProps?: FieldDescriptionClientProps<TFieldClient>;
12
- readonly errorProps?: FieldErrorClientProps<TFieldClient>;
13
- readonly field: TFieldClient;
14
- readonly labelProps?: FieldLabelClientProps<TFieldClient>;
15
- } & FormFieldBase;
16
- export type ServerFieldBase<TFieldServer extends Field = Field, TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType> = {
17
- readonly clientField: TFieldClient;
18
- readonly descriptionProps?: FieldDescriptionServerProps<TFieldServer, TFieldClient>;
19
- readonly errorProps?: FieldErrorServerProps<TFieldServer, TFieldClient>;
20
- readonly field: TFieldServer;
21
- readonly labelProps?: FieldLabelServerProps<TFieldServer, TFieldClient>;
22
- } & FormFieldBase & Partial<ServerProps>;
23
- export type FormFieldBase = {
24
- readonly docPreferences?: DocumentPreferences;
8
+ export type ClientComponentProps = {
9
+ customComponents: FormField['customComponents'];
10
+ field: ClientBlock | ClientField | ClientTab;
11
+ forceRender?: boolean;
12
+ /**
13
+ * @default ''
14
+ */
15
+ indexPath?: string;
16
+ /**
17
+ * @default ''
18
+ */
19
+ parentPath?: string;
20
+ /**
21
+ * @default '''
22
+ */
23
+ parentSchemaPath?: string;
24
+ /**
25
+ * @default field.name
26
+ */
27
+ path?: string;
28
+ readOnly?: boolean;
29
+ renderedBlocks?: RenderedField[];
30
+ /**
31
+ * @default field.name
32
+ **/
33
+ schemaPath?: string;
34
+ };
35
+ export type ServerComponentProps = {
36
+ clientField: ClientFieldWithOptionalType;
37
+ data: Data;
38
+ field: Field;
25
39
  /**
26
- * `forceRender` is added by RenderField automatically.
40
+ * The fieldSchemaMap that is created before form state is built is made available here.
27
41
  */
28
- readonly forceRender?: boolean;
29
- readonly locale?: Locale;
42
+ fieldSchemaMap: FieldSchemaMap;
30
43
  /**
31
- * `readOnly` is added by RenderField automatically. This should be used instead of `field.admin.readOnly`.
44
+ * Server Components will also have available to the entire form state.
45
+ * We cannot add it to ClientComponentProps as that would blow up the size of the props sent to the client.
32
46
  */
33
- readonly readOnly?: boolean;
34
- readonly user?: User;
35
- readonly validate?: Validate;
47
+ formState: FormState;
48
+ i18n: I18nClient;
49
+ payload: Payload;
50
+ permissions: FieldPermissions;
51
+ siblingData: Data;
52
+ user: User;
36
53
  };
54
+ export type ClientFieldBase<TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType> = {
55
+ readonly field: TFieldClient;
56
+ } & Omit<ClientComponentProps, 'customComponents' | 'field'>;
57
+ export type ServerFieldBase<TFieldServer extends Field = Field, TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType> = {
58
+ readonly clientField: TFieldClient;
59
+ readonly field: TFieldServer;
60
+ } & Omit<ClientComponentProps, 'field'> & Omit<ServerComponentProps, 'clientField' | 'field'>;
37
61
  export type FieldClientComponent<TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType, AdditionalProps extends Record<string, unknown> = Record<string, unknown>> = React.ComponentType<AdditionalProps & ClientFieldBase<TFieldClient>>;
38
62
  export type FieldServerComponent<TFieldServer extends Field = Field, TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType, AdditionalProps extends Record<string, unknown> = Record<string, unknown>> = React.ComponentType<AdditionalProps & ServerFieldBase<TFieldServer, TFieldClient>>;
39
63
  //# 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,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AAChF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,KAAK,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AAChG,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAE9E,MAAM,MAAM,2BAA2B,GAAG,YAAY,CAAC,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ACrC,IAAI,CAAC,oBAAoB,EAAE,aAAa,GAAG,OAAO,CAAC,CAAA;AAErD,MAAM,MAAM,oBAAoB,CAC9B,YAAY,SAAS,2BAA2B,GAAG,2BAA2B,EAC9E,eAAe,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IACvE,KAAK,CAAC,aAAa,CAAC,eAAe,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC,CAAA;AAExE,MAAM,MAAM,oBAAoB,CAC9B,YAAY,SAAS,KAAK,GAAG,KAAK,EAClC,YAAY,SAAS,2BAA2B,GAAG,2BAA2B,EAC9E,eAAe,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IACvE,KAAK,CAAC,aAAa,CAAC,eAAe,GAAG,eAAe,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/forms/Field.ts"],"sourcesContent":["import type { MarkOptional } from 'ts-essentials'\n\nimport type { User } from '../../auth/types.js'\nimport type { Locale, ServerProps } from '../../config/types.js'\nimport type { ClientField, Field, Validate } from '../../fields/config/types.js'\nimport type { DocumentPreferences } from '../../preferences/types.js'\nimport type { FieldDescriptionClientProps, FieldDescriptionServerProps } from './Description.js'\nimport type { FieldErrorClientProps, FieldErrorServerProps } from './Error.js'\nimport type { FieldLabelClientProps, FieldLabelServerProps } from './Label.js'\n\nexport type ClientFieldWithOptionalType = MarkOptional<ClientField, 'type'>\n\nexport type ClientFieldBase<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n readonly descriptionProps?: FieldDescriptionClientProps<TFieldClient>\n readonly errorProps?: FieldErrorClientProps<TFieldClient>\n readonly field: TFieldClient\n readonly labelProps?: FieldLabelClientProps<TFieldClient>\n} & FormFieldBase\n\nexport type ServerFieldBase<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n readonly clientField: TFieldClient\n readonly descriptionProps?: FieldDescriptionServerProps<TFieldServer, TFieldClient>\n readonly errorProps?: FieldErrorServerProps<TFieldServer, TFieldClient>\n readonly field: TFieldServer\n readonly labelProps?: FieldLabelServerProps<TFieldServer, TFieldClient>\n} & FormFieldBase &\n Partial<ServerProps>\n\nexport type FormFieldBase = {\n readonly docPreferences?: DocumentPreferences\n /**\n * `forceRender` is added by RenderField automatically.\n */\n readonly forceRender?: boolean\n readonly locale?: Locale\n /**\n * `readOnly` 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\nexport type FieldClientComponent<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n AdditionalProps extends Record<string, unknown> = Record<string, unknown>,\n> = React.ComponentType<AdditionalProps & ClientFieldBase<TFieldClient>>\n\nexport type FieldServerComponent<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n AdditionalProps extends Record<string, unknown> = Record<string, unknown>,\n> = React.ComponentType<AdditionalProps & ServerFieldBase<TFieldServer, TFieldClient>>\n"],"names":[],"mappings":"AAqDA,WAIsF"}
1
+ {"version":3,"sources":["../../../src/admin/forms/Field.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type { MarkOptional } from 'ts-essentials'\n\nimport type { FieldPermissions, User } from '../../auth/types.js'\nimport type { ClientBlock, ClientField, Field } from '../../fields/config/types.js'\nimport type { Payload } from '../../types/index.js'\nimport type {\n ClientTab,\n Data,\n FieldSchemaMap,\n FormField,\n FormState,\n RenderedField,\n} from '../types.js'\n\nexport type ClientFieldWithOptionalType = MarkOptional<ClientField, 'type'>\n\nexport type ClientComponentProps = {\n customComponents: FormField['customComponents']\n field: ClientBlock | ClientField | ClientTab\n forceRender?: boolean\n /**\n * @default ''\n */\n indexPath?: string\n /**\n * @default ''\n */\n parentPath?: string\n /**\n * @default '''\n */\n parentSchemaPath?: string\n /**\n * @default field.name\n */\n path?: string\n readOnly?: boolean\n renderedBlocks?: RenderedField[]\n /**\n * @default field.name\n **/\n schemaPath?: string\n}\n\nexport type ServerComponentProps = {\n clientField: ClientFieldWithOptionalType\n data: Data\n field: Field\n /**\n * The fieldSchemaMap that is created before form state is built is made available here.\n */\n fieldSchemaMap: FieldSchemaMap\n /**\n * Server Components will also have available to the entire form state.\n * We cannot add it to ClientComponentProps as that would blow up the size of the props sent to the client.\n */\n formState: FormState\n i18n: I18nClient\n payload: Payload\n permissions: FieldPermissions\n siblingData: Data\n user: User\n}\n\nexport type ClientFieldBase<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n readonly field: TFieldClient\n} & Omit<ClientComponentProps, 'customComponents' | 'field'>\n\nexport type ServerFieldBase<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n readonly clientField: TFieldClient\n readonly field: TFieldServer\n} & Omit<ClientComponentProps, 'field'> &\n Omit<ServerComponentProps, 'clientField' | 'field'>\n\nexport type FieldClientComponent<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n AdditionalProps extends Record<string, unknown> = Record<string, unknown>,\n> = React.ComponentType<AdditionalProps & ClientFieldBase<TFieldClient>>\n\nexport type FieldServerComponent<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n AdditionalProps extends Record<string, unknown> = Record<string, unknown>,\n> = React.ComponentType<AdditionalProps & ServerFieldBase<TFieldServer, TFieldClient>>\n"],"names":[],"mappings":"AAqFA,WAIsF"}
@@ -1,5 +1,8 @@
1
+ import { type SupportedLanguages } from '@payloadcms/translations';
2
+ import type { DocumentPermissions } from '../../auth/types.js';
1
3
  import type { Field, Validate } from '../../fields/config/types.js';
2
- import type { Where } from '../../types/index.js';
4
+ import type { DocumentPreferences } from '../../preferences/types.js';
5
+ import type { PayloadRequest, Where } from '../../types/index.js';
3
6
  export type Data = {
4
7
  [key: string]: any;
5
8
  };
@@ -11,20 +14,60 @@ export type Row = {
11
14
  export type FilterOptionsResult = {
12
15
  [relation: string]: boolean | Where;
13
16
  };
14
- export type FormField = {
17
+ export type FieldState = {
18
+ customComponents?: {
19
+ AfterInput?: React.ReactNode;
20
+ BeforeInput?: React.ReactNode;
21
+ Description?: React.ReactNode;
22
+ Error?: React.ReactNode;
23
+ Field?: React.ReactNode;
24
+ Label?: React.ReactNode;
25
+ RowLabels?: React.ReactNode[];
26
+ };
15
27
  disableFormData?: boolean;
16
28
  errorMessage?: string;
17
29
  errorPaths?: string[];
30
+ /**
31
+ * The fieldSchema may be part of the form state if `includeSchema: true` is passed to buildFormState.
32
+ * This will never be in the form state of the client.
33
+ */
18
34
  fieldSchema?: Field;
19
35
  filterOptions?: FilterOptionsResult;
20
36
  initialValue: unknown;
37
+ isSidebar?: boolean;
21
38
  passesCondition?: boolean;
39
+ requiresRender?: boolean;
22
40
  rows?: Row[];
23
41
  valid: boolean;
24
42
  validate?: Validate;
25
43
  value: unknown;
26
44
  };
45
+ export type FieldStateWithoutComponents = Omit<FieldState, 'customComponents'>;
27
46
  export type FormState = {
28
- [path: string]: FormField;
47
+ [path: string]: FieldState;
29
48
  };
49
+ export type FormStateWithoutComponents = {
50
+ [path: string]: FieldStateWithoutComponents;
51
+ };
52
+ export type BuildFormStateArgs = {
53
+ data?: Data;
54
+ docPermissions: DocumentPermissions | undefined;
55
+ docPreferences: DocumentPreferences;
56
+ formState?: FormState;
57
+ id?: number | string;
58
+ language?: keyof SupportedLanguages;
59
+ locale?: string;
60
+ operation?: 'create' | 'update';
61
+ renderAllFields?: boolean;
62
+ req: PayloadRequest;
63
+ returnLockStatus?: boolean;
64
+ schemaPath: string;
65
+ updateLastEdited?: boolean;
66
+ } & ({
67
+ collectionSlug: string;
68
+ globalSlug?: string;
69
+ } | {
70
+ collectionSlug?: string;
71
+ globalSlug: string;
72
+ });
30
73
  //# sourceMappingURL=Form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEjD,MAAM,MAAM,IAAI,GAAG;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,GAAG,GAAG;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,CAAA;CACpC,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,YAAY,EAAE,OAAO,CAAA;IACrB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;IACZ,KAAK,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,KAAK,EAAE,OAAO,CAAA;CACf,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;CAC1B,CAAA"}
1
+ {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Form.ts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B,GACD;IACE,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;CACnB,CACJ,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/forms/Form.ts"],"sourcesContent":["import type { Field, Validate } from '../../fields/config/types.js'\nimport type { Where } from '../../types/index.js'\n\nexport type Data = {\n [key: string]: any\n}\n\nexport type Row = {\n blockType?: string\n collapsed?: boolean\n id: string\n}\n\nexport type FilterOptionsResult = {\n [relation: string]: boolean | Where\n}\n\nexport type FormField = {\n disableFormData?: boolean\n errorMessage?: string\n errorPaths?: string[]\n fieldSchema?: Field\n filterOptions?: FilterOptionsResult\n initialValue: unknown\n passesCondition?: boolean\n rows?: Row[]\n valid: boolean\n validate?: Validate\n value: unknown\n}\n\nexport type FormState = {\n [path: string]: FormField\n}\n"],"names":[],"mappings":"AA+BA,WAEC"}
1
+ {"version":3,"sources":["../../../src/admin/forms/Form.ts"],"sourcesContent":["import { type SupportedLanguages } from '@payloadcms/translations'\n\nimport type { DocumentPermissions } from '../../auth/types.js'\nimport type { Field, Validate } from '../../fields/config/types.js'\nimport type { DocumentPreferences } from '../../preferences/types.js'\nimport type { PayloadRequest, Where } from '../../types/index.js'\n\nexport type Data = {\n [key: string]: any\n}\n\nexport type Row = {\n blockType?: string\n collapsed?: boolean\n id: string\n}\n\nexport type FilterOptionsResult = {\n [relation: string]: boolean | Where\n}\n\nexport type FieldState = {\n customComponents?: {\n AfterInput?: React.ReactNode\n BeforeInput?: React.ReactNode\n Description?: React.ReactNode\n Error?: React.ReactNode\n Field?: React.ReactNode\n Label?: React.ReactNode\n RowLabels?: React.ReactNode[]\n }\n disableFormData?: boolean\n errorMessage?: string\n errorPaths?: string[]\n /**\n * The fieldSchema may be part of the form state if `includeSchema: true` is passed to buildFormState.\n * This will never be in the form state of the client.\n */\n fieldSchema?: Field\n filterOptions?: FilterOptionsResult\n initialValue: unknown\n isSidebar?: boolean\n passesCondition?: boolean\n requiresRender?: boolean\n rows?: Row[]\n valid: boolean\n validate?: Validate\n value: unknown\n}\n\nexport type FieldStateWithoutComponents = Omit<FieldState, 'customComponents'>\n\nexport type FormState = {\n [path: string]: FieldState\n}\n\nexport type FormStateWithoutComponents = {\n [path: string]: FieldStateWithoutComponents\n}\n\nexport type BuildFormStateArgs = {\n data?: Data\n docPermissions: DocumentPermissions | undefined\n docPreferences: DocumentPreferences\n formState?: FormState\n id?: number | string\n /*\n If not i18n was passed, the language can be passed to init i18n\n */\n language?: keyof SupportedLanguages\n locale?: string\n operation?: 'create' | 'update'\n /*\n If true, will render field components within their state object\n */\n renderAllFields?: boolean\n req: PayloadRequest\n returnLockStatus?: boolean\n schemaPath: string\n updateLastEdited?: boolean\n} & (\n | {\n collectionSlug: string\n // Do not type it as never. This still makes it so that either collectionSlug or globalSlug is required, but makes it easier to provide both collectionSlug and globalSlug if it's\n // unclear which one is actually available.\n globalSlug?: string\n }\n | {\n collectionSlug?: string\n globalSlug: string\n }\n)\n"],"names":[],"mappings":"AA4DA,WA+BC"}
@@ -1,14 +1,13 @@
1
1
  import type { ServerProps, StaticLabel } from '../../config/types.js';
2
2
  import type { Field } from '../../fields/config/types.js';
3
- import type { MappedComponent } from '../types.js';
4
3
  import type { ClientFieldWithOptionalType } from './Field.js';
5
4
  export type GenericLabelProps = {
6
5
  readonly as?: 'label' | 'span';
7
6
  readonly hideLocale?: boolean;
8
7
  readonly htmlFor?: string;
9
- readonly Label?: MappedComponent;
10
8
  readonly label?: StaticLabel;
11
9
  readonly localized?: boolean;
10
+ readonly path?: string;
12
11
  readonly required?: boolean;
13
12
  readonly unstyled?: boolean;
14
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Label.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA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zB,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;CAC7B,GAAG,iBAAiB,GACnB,OAAO,CAAC,WAAW,CAAC,CAAA;AAEtB,MAAM,MAAM,mBAAmB,CAAC,YAAY,SAAS,2BAA2B,IAAI,IAAI,CACtF,qBAAqB,CAAC,YAAY,CAAC,EACnC,OAAO,GAAG,UAAU,CACrB,CAAA;AAED,MAAM,MAAM,yBAAyB,CACnC,YAAY,SAAS,2BAA2B,GAAG,2BAA2B,IAC5E,KAAK,CAAC,aAAa,CAAC,qBAAqB,CAAC,YAAY,CAAC,CAAC,CAAA;AAE5D,MAAM,MAAM,yBAAyB,CACnC,YAAY,SAAS,KAAK,GAAG,KAAK,EAClC,YAAY,SAAS,2BAA2B,GAAG,2BAA2B,IAC5E,KAAK,CAAC,aAAa,CAAC,qBAAqB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/admin/forms/Label.ts"],"sourcesContent":["import type { ServerProps, StaticLabel } from '../../config/types.js'\nimport type { Field } from '../../fields/config/types.js'\nimport type { MappedComponent } from '../types.js'\nimport type { ClientFieldWithOptionalType } from './Field.js'\n\nexport type GenericLabelProps = {\n readonly as?: 'label' | 'span'\n readonly hideLocale?: boolean\n readonly htmlFor?: string\n readonly Label?: MappedComponent\n readonly label?: StaticLabel\n readonly localized?: boolean\n readonly required?: boolean\n readonly unstyled?: boolean\n}\n\nexport type FieldLabelClientProps<\n TFieldClient extends Partial<ClientFieldWithOptionalType> = Partial<ClientFieldWithOptionalType>,\n> = {\n field?: TFieldClient\n} & GenericLabelProps\n\nexport type FieldLabelServerProps<\n TFieldServer extends Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n clientField: TFieldClient\n readonly field: TFieldServer\n} & GenericLabelProps &\n Partial<ServerProps>\n\nexport type SanitizedLabelProps<TFieldClient extends ClientFieldWithOptionalType> = Omit<\n FieldLabelClientProps<TFieldClient>,\n 'label' | 'required'\n>\n\nexport type FieldLabelClientComponent<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = React.ComponentType<FieldLabelClientProps<TFieldClient>>\n\nexport type FieldLabelServerComponent<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = React.ComponentType<FieldLabelServerProps<TFieldServer, TFieldClient>>\n"],"names":[],"mappings":"AAwCA,WAG0E"}
1
+ {"version":3,"sources":["../../../src/admin/forms/Label.ts"],"sourcesContent":["import type { ServerProps, StaticLabel } from '../../config/types.js'\nimport type { Field } from '../../fields/config/types.js'\nimport type { ClientFieldWithOptionalType } from './Field.js'\n\nexport type GenericLabelProps = {\n readonly as?: 'label' | 'span'\n readonly hideLocale?: boolean\n readonly htmlFor?: string\n readonly label?: StaticLabel\n readonly localized?: boolean\n readonly path?: string\n readonly required?: boolean\n readonly unstyled?: boolean\n}\n\nexport type FieldLabelClientProps<\n TFieldClient extends Partial<ClientFieldWithOptionalType> = Partial<ClientFieldWithOptionalType>,\n> = {\n field?: TFieldClient\n} & GenericLabelProps\n\nexport type FieldLabelServerProps<\n TFieldServer extends Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n clientField: TFieldClient\n readonly field: TFieldServer\n} & GenericLabelProps &\n Partial<ServerProps>\n\nexport type SanitizedLabelProps<TFieldClient extends ClientFieldWithOptionalType> = Omit<\n FieldLabelClientProps<TFieldClient>,\n 'label' | 'required'\n>\n\nexport type FieldLabelClientComponent<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = React.ComponentType<FieldLabelClientProps<TFieldClient>>\n\nexport type FieldLabelServerComponent<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = React.ComponentType<FieldLabelServerProps<TFieldServer, TFieldClient>>\n"],"names":[],"mappings":"AAuCA,WAG0E"}
@@ -0,0 +1,44 @@
1
+ import type { ImportMap } from '../../bin/generateImportMap/index.js';
2
+ import type { SanitizedConfig } from '../../config/types.js';
3
+ import type { PaginatedDocs } from '../../database/types.js';
4
+ import type { PayloadRequest, Where } from '../../types/index.js';
5
+ export type DefaultServerFunctionArgs = {
6
+ importMap: ImportMap;
7
+ req: PayloadRequest;
8
+ };
9
+ export type ServerFunctionArgs = {
10
+ args: Record<string, unknown>;
11
+ name: string;
12
+ };
13
+ export type ServerFunctionClientArgs = {
14
+ args: Record<string, unknown>;
15
+ name: string;
16
+ };
17
+ export type ServerFunctionClient = (args: ServerFunctionClientArgs) => Promise<unknown> | unknown;
18
+ export type ServerFunction = (args: DefaultServerFunctionArgs & ServerFunctionClientArgs['args']) => Promise<unknown> | unknown;
19
+ export type ServerFunctionConfig = {
20
+ fn: ServerFunction;
21
+ name: string;
22
+ };
23
+ export type ServerFunctionHandler = (args: {
24
+ config: Promise<SanitizedConfig> | SanitizedConfig;
25
+ importMap: ImportMap;
26
+ } & ServerFunctionClientArgs) => Promise<unknown>;
27
+ export type ListQuery = {
28
+ limit?: string;
29
+ page?: string;
30
+ search?: string;
31
+ sort?: string;
32
+ where?: Where;
33
+ };
34
+ export type BuildTableStateArgs = {
35
+ collectionSlug: string;
36
+ columns?: any[];
37
+ docs?: PaginatedDocs['docs'];
38
+ enableRowSelections?: boolean;
39
+ query?: ListQuery;
40
+ renderRowTypes?: boolean;
41
+ req: PayloadRequest;
42
+ tableAppearance?: 'condensed' | 'default';
43
+ };
44
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/admin/functions/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,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,cAAc,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,GAAG,EAAE,CAAA;IACf,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,GAAG,EAAE,cAAc,CAAA;IACnB,eAAe,CAAC,EAAE,WAAW,GAAG,SAAS,CAAA;CAC1C,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/admin/functions/index.ts"],"sourcesContent":["import type { ImportMap } from '../../bin/generateImportMap/index.js'\nimport type { SanitizedConfig } from '../../config/types.js'\nimport type { PaginatedDocs } from '../../database/types.js'\nimport type { PayloadRequest, Where } from '../../types/index.js'\n\nexport type DefaultServerFunctionArgs = {\n importMap: ImportMap\n req: PayloadRequest\n}\n\nexport type ServerFunctionArgs = {\n args: Record<string, unknown>\n name: string\n}\n\nexport type ServerFunctionClientArgs = {\n args: Record<string, unknown>\n name: string\n}\n\nexport type ServerFunctionClient = (args: ServerFunctionClientArgs) => Promise<unknown> | unknown\n\nexport type ServerFunction = (\n args: DefaultServerFunctionArgs & ServerFunctionClientArgs['args'],\n) => Promise<unknown> | unknown\n\nexport type ServerFunctionConfig = {\n fn: ServerFunction\n name: string\n}\n\nexport type ServerFunctionHandler = (\n args: {\n config: Promise<SanitizedConfig> | SanitizedConfig\n importMap: ImportMap\n } & ServerFunctionClientArgs,\n) => Promise<unknown>\n\nexport type ListQuery = {\n limit?: string\n page?: string\n /*\n When provided, is automatically injected into the `where` object\n */\n search?: string\n sort?: string\n where?: Where\n}\n\nexport type BuildTableStateArgs = {\n collectionSlug: string\n columns?: any[] // TODO: type this (comes from ui pkg)\n docs?: PaginatedDocs['docs']\n enableRowSelections?: boolean\n query?: ListQuery\n renderRowTypes?: boolean\n req: PayloadRequest\n tableAppearance?: 'condensed' | 'default'\n}\n"],"names":[],"mappings":"AAiDA,WASC"}
@@ -1,7 +1,11 @@
1
+ import type { AcceptedLanguages, I18nClient } from '@payloadcms/translations';
1
2
  import type React from 'react';
2
- import type { PayloadComponent } from '../config/types.js';
3
+ import type { ImportMap } from '../bin/generateImportMap/index.js';
4
+ import type { SanitizedConfig } from '../config/types.js';
5
+ import type { Block, Field, FieldTypes, Tab } from '../fields/config/types.js';
3
6
  import type { JsonObject } from '../types/index.js';
4
- export type { CellComponentProps, DefaultCellComponentProps } from './elements/Cell.js';
7
+ import type { BuildFormStateArgs, Data, FieldState, FieldStateWithoutComponents, FilterOptionsResult, FormState, FormStateWithoutComponents, Row } from './forms/Form.js';
8
+ export type { DefaultCellComponentProps } from './elements/Cell.js';
5
9
  export type { ConditionalDateProps } from './elements/DatePicker.js';
6
10
  export type { DayPickerProps, SharedProps, TimePickerProps } from './elements/DatePicker.js';
7
11
  export type { CustomPreviewButton } from './elements/PreviewButton.js';
@@ -32,16 +36,16 @@ export type { SelectFieldClientComponent, SelectFieldClientProps, SelectFieldDes
32
36
  export type { ClientTab, TabsFieldClientComponent, TabsFieldClientProps, TabsFieldDescriptionClientComponent, TabsFieldDescriptionServerComponent, TabsFieldErrorClientComponent, TabsFieldErrorServerComponent, TabsFieldLabelClientComponent, TabsFieldLabelServerComponent, TabsFieldServerComponent, TabsFieldServerProps, } from './fields/Tabs.js';
33
37
  export type { TextFieldClientComponent, TextFieldClientProps, TextFieldDescriptionClientComponent, TextFieldDescriptionServerComponent, TextFieldErrorClientComponent, TextFieldErrorServerComponent, TextFieldLabelClientComponent, TextFieldLabelServerComponent, TextFieldServerComponent, TextFieldServerProps, } from './fields/Text.js';
34
38
  export type { TextareaFieldClientComponent, TextareaFieldClientProps, TextareaFieldDescriptionClientComponent, TextareaFieldDescriptionServerComponent, TextareaFieldErrorClientComponent, TextareaFieldErrorServerComponent, TextareaFieldLabelClientComponent, TextareaFieldLabelServerComponent, TextareaFieldServerComponent, TextareaFieldServerProps, } from './fields/Textarea.js';
39
+ export type { UIFieldClientComponent, UIFieldServerComponent } from './fields/UI.js';
35
40
  export type { UploadFieldClientComponent, UploadFieldClientProps, UploadFieldDescriptionClientComponent, UploadFieldDescriptionServerComponent, UploadFieldErrorClientComponent, UploadFieldErrorServerComponent, UploadFieldLabelClientComponent, UploadFieldLabelServerComponent, UploadFieldServerComponent, UploadFieldServerProps, } from './fields/Upload.js';
36
41
  export type { Description, DescriptionFunction, FieldDescriptionClientComponent, FieldDescriptionClientProps, FieldDescriptionServerComponent, FieldDescriptionServerProps, GenericDescriptionProps, StaticDescription, } from './forms/Description.js';
37
42
  export type { FieldErrorClientComponent, FieldErrorClientProps, FieldErrorServerComponent, FieldErrorServerProps, GenericErrorProps, } from './forms/Error.js';
38
- export type { FormFieldBase, ServerFieldBase } from './forms/Field.js';
39
- export type { Data, FilterOptionsResult, FormField, FormState, Row } from './forms/Form.js';
43
+ export type { ClientComponentProps, ClientFieldBase, ClientFieldWithOptionalType, FieldClientComponent, FieldServerComponent, ServerComponentProps, ServerFieldBase, } from './forms/Field.js';
44
+ export type { BuildFormStateArgs, Data, FieldState as FormField, FieldStateWithoutComponents as FormFieldWithoutComponents, FilterOptionsResult, FormState, FormStateWithoutComponents, Row, };
40
45
  export type { FieldLabelClientComponent, FieldLabelClientProps, FieldLabelServerComponent, FieldLabelServerProps, GenericLabelProps, SanitizedLabelProps, } from './forms/Label.js';
41
46
  export type { RowLabel, RowLabelComponent } from './forms/RowLabel.js';
47
+ export type { BuildTableStateArgs, DefaultServerFunctionArgs, ListQuery, ServerFunction, ServerFunctionArgs, ServerFunctionClient, ServerFunctionClientArgs, ServerFunctionConfig, ServerFunctionHandler, } from './functions/index.js';
42
48
  export type { LanguageOptions } from './LanguageOptions.js';
43
- export type { RichTextAdapter, RichTextAdapterProvider, RichTextGenerateComponentMap, RichTextHooks, } from './RichText.js';
44
- export type { AdminViewComponent, AdminViewConfig, AdminViewProps, EditViewProps, InitPageResult, ServerSideEditViewProps, VisibleEntities, } from './views/types.js';
45
49
  export type MappedServerComponent<TComponentClientProps extends JsonObject = JsonObject> = {
46
50
  Component?: React.ComponentType<TComponentClientProps>;
47
51
  props?: Partial<any>;
@@ -57,19 +61,58 @@ export type MappedClientComponent<TComponentClientProps extends JsonObject = Jso
57
61
  export type MappedEmptyComponent = {
58
62
  type: 'empty';
59
63
  };
60
- export type MappedComponent<TComponentClientProps extends JsonObject = JsonObject> = MappedClientComponent<TComponentClientProps> | MappedEmptyComponent | MappedServerComponent<TComponentClientProps> | undefined;
61
- export type CreateMappedComponent = {
62
- <T extends JsonObject>(component: {
63
- Component: React.FC<T>;
64
- } | null | PayloadComponent<T>, props: {
65
- clientProps?: JsonObject;
66
- serverProps?: object;
67
- }, fallback: React.FC, identifier: string): MappedComponent<T>;
68
- <T extends JsonObject>(components: ({
69
- Component: React.FC<T>;
70
- } | PayloadComponent<T>)[], props: {
71
- clientProps?: JsonObject;
72
- serverProps?: object;
73
- }, fallback: React.FC, identifier: string): MappedComponent<T>[];
64
+ export declare enum Action {
65
+ RenderConfig = "render-config"
66
+ }
67
+ export type RenderEntityConfigArgs = {
68
+ collectionSlug?: string;
69
+ data?: Data;
70
+ globalSlug?: string;
74
71
  };
72
+ export type RenderRootConfigArgs = {};
73
+ export type RenderFieldConfigArgs = {
74
+ collectionSlug?: string;
75
+ formState?: FormState;
76
+ globalSlug?: string;
77
+ schemaPath: string;
78
+ };
79
+ export type RenderConfigArgs = {
80
+ action: Action.RenderConfig;
81
+ config: Promise<SanitizedConfig> | SanitizedConfig;
82
+ i18n: I18nClient;
83
+ importMap: ImportMap;
84
+ languageCode: AcceptedLanguages;
85
+ serverProps?: any;
86
+ } & (RenderEntityConfigArgs | RenderFieldConfigArgs | RenderRootConfigArgs);
87
+ export type PayloadServerAction = (args: {
88
+ [key: string]: any;
89
+ action: Action;
90
+ i18n: I18nClient;
91
+ } | RenderConfigArgs) => Promise<string>;
92
+ export type RenderedField = {
93
+ Field: React.ReactNode;
94
+ indexPath?: string;
95
+ initialSchemaPath?: string;
96
+ isSidebar: boolean;
97
+ path: string;
98
+ schemaPath: string;
99
+ type: FieldTypes;
100
+ };
101
+ export type FieldRow = {
102
+ RowLabel?: React.ReactNode;
103
+ };
104
+ export type DocumentSlots = {
105
+ Description?: React.ReactNode;
106
+ PreviewButton?: React.ReactNode;
107
+ PublishButton?: React.ReactNode;
108
+ SaveButton?: React.ReactNode;
109
+ SaveDraftButton?: React.ReactNode;
110
+ Upload?: React.ReactNode;
111
+ };
112
+ export type { RichTextAdapter, RichTextAdapterProvider, RichTextHooks } from './RichText.js';
113
+ export type { AdminViewComponent, AdminViewConfig, AdminViewProps, ClientSideEditViewProps, EditViewProps, InitPageResult, ServerSideEditViewProps, VisibleEntities, } from './views/types.js';
114
+ type SchemaPath = {} & string;
115
+ export type FieldSchemaMap = Map<SchemaPath, {
116
+ fields: Field[];
117
+ } | Block | Field | Tab>;
75
118
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/admin/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD,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,MAAM,6BAA6B,CAAA;AACtE,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACtE,YAAY,EAAE,gBAAgB,EAAE,MAAM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AClB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,UAAU,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACjC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACzB,CAAA;AAED,YAAY,EAAE,eAAe,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAE5F,YAAY,EACV,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,uBAAuB,EACvB,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,eAAe,GAChB,MAAM,kBAAkB,CAAA;AAEzB,KAAK,UAAU,GAAG,EAAE,GAAG,MAAM,CAAA;AAC7B,MAAM,MAAM,cAAc,GAAG,GAAG,CAC9B,UAAU,EACR;IACE,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB,GACD,KAAK,GACL,KAAK,GACL,GAAG,CACN,CAAA"}
@@ -1,3 +1,6 @@
1
- export { };
1
+ export var Action;
2
+ (function(Action) {
3
+ Action["RenderConfig"] = "render-config";
4
+ })(Action || (Action = {}));
2
5
 
3
6
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
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 { 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'\nexport type {\n DocumentTabComponent,\n DocumentTabCondition,\n DocumentTabConfig,\n DocumentTabProps,\n} from './elements/Tab.js'\nexport type { CustomUpload } from './elements/Upload.js'\n\nexport type {\n WithServerSidePropsComponent,\n WithServerSidePropsComponentProps,\n} from './elements/WithServerSideProps.js'\n\nexport type {\n ArrayFieldClientComponent,\n ArrayFieldClientProps,\n ArrayFieldDescriptionClientComponent,\n ArrayFieldDescriptionServerComponent,\n ArrayFieldErrorClientComponent,\n ArrayFieldErrorServerComponent,\n ArrayFieldLabelClientComponent,\n ArrayFieldLabelServerComponent,\n ArrayFieldServerComponent,\n ArrayFieldServerProps,\n} from './fields/Array.js'\n\nexport type {\n BlocksFieldClientComponent,\n BlocksFieldClientProps,\n BlocksFieldDescriptionClientComponent,\n BlocksFieldDescriptionServerComponent,\n BlocksFieldErrorClientComponent,\n BlocksFieldErrorServerComponent,\n BlocksFieldLabelClientComponent,\n BlocksFieldLabelServerComponent,\n BlocksFieldServerComponent,\n BlocksFieldServerProps,\n} from './fields/Blocks.js'\n\nexport type {\n CheckboxFieldClientComponent,\n CheckboxFieldClientProps,\n CheckboxFieldDescriptionClientComponent,\n CheckboxFieldDescriptionServerComponent,\n CheckboxFieldErrorClientComponent,\n CheckboxFieldErrorServerComponent,\n CheckboxFieldLabelClientComponent,\n CheckboxFieldLabelServerComponent,\n CheckboxFieldServerComponent,\n CheckboxFieldServerProps,\n} from './fields/Checkbox.js'\n\nexport type {\n CodeFieldClientComponent,\n CodeFieldClientProps,\n CodeFieldDescriptionClientComponent,\n CodeFieldDescriptionServerComponent,\n CodeFieldErrorClientComponent,\n CodeFieldErrorServerComponent,\n CodeFieldLabelClientComponent,\n CodeFieldLabelServerComponent,\n CodeFieldServerComponent,\n CodeFieldServerProps,\n} from './fields/Code.js'\n\nexport type {\n CollapsibleFieldClientComponent,\n CollapsibleFieldClientProps,\n CollapsibleFieldDescriptionClientComponent,\n CollapsibleFieldDescriptionServerComponent,\n CollapsibleFieldErrorClientComponent,\n CollapsibleFieldErrorServerComponent,\n CollapsibleFieldLabelClientComponent,\n CollapsibleFieldLabelServerComponent,\n CollapsibleFieldServerComponent,\n CollapsibleFieldServerProps,\n} from './fields/Collapsible.js'\n\nexport type {\n DateFieldClientComponent,\n DateFieldClientProps,\n DateFieldDescriptionClientComponent,\n DateFieldDescriptionServerComponent,\n DateFieldErrorClientComponent,\n DateFieldErrorServerComponent,\n DateFieldLabelClientComponent,\n DateFieldLabelServerComponent,\n DateFieldServerComponent,\n DateFieldServerProps,\n} from './fields/Date.js'\n\nexport type {\n EmailFieldClientComponent,\n EmailFieldClientProps,\n EmailFieldDescriptionClientComponent,\n EmailFieldDescriptionServerComponent,\n EmailFieldErrorClientComponent,\n EmailFieldErrorServerComponent,\n EmailFieldLabelClientComponent,\n EmailFieldLabelServerComponent,\n EmailFieldServerComponent,\n EmailFieldServerProps,\n} from './fields/Email.js'\n\nexport type {\n GroupFieldClientComponent,\n GroupFieldClientProps,\n GroupFieldDescriptionClientComponent,\n GroupFieldDescriptionServerComponent,\n GroupFieldErrorClientComponent,\n GroupFieldErrorServerComponent,\n GroupFieldLabelClientComponent,\n GroupFieldLabelServerComponent,\n GroupFieldServerComponent,\n GroupFieldServerProps,\n} from './fields/Group.js'\n\nexport type { HiddenFieldProps } from './fields/Hidden.js'\n\nexport type {\n JoinFieldClientComponent,\n JoinFieldClientProps,\n JoinFieldDescriptionClientComponent,\n JoinFieldDescriptionServerComponent,\n JoinFieldErrorClientComponent,\n JoinFieldErrorServerComponent,\n JoinFieldLabelClientComponent,\n JoinFieldLabelServerComponent,\n JoinFieldServerComponent,\n JoinFieldServerProps,\n} from './fields/Join.js'\n\nexport type {\n JSONFieldClientComponent,\n JSONFieldClientProps,\n JSONFieldDescriptionClientComponent,\n JSONFieldDescriptionServerComponent,\n JSONFieldErrorClientComponent,\n JSONFieldErrorServerComponent,\n JSONFieldLabelClientComponent,\n JSONFieldLabelServerComponent,\n JSONFieldServerComponent,\n JSONFieldServerProps,\n} from './fields/JSON.js'\n\nexport type {\n NumberFieldClientComponent,\n NumberFieldClientProps,\n NumberFieldDescriptionClientComponent,\n NumberFieldDescriptionServerComponent,\n NumberFieldErrorClientComponent,\n NumberFieldErrorServerComponent,\n NumberFieldLabelClientComponent,\n NumberFieldLabelServerComponent,\n NumberFieldServerComponent,\n NumberFieldServerProps,\n} from './fields/Number.js'\n\nexport type {\n PointFieldClientComponent,\n PointFieldClientProps,\n PointFieldDescriptionClientComponent,\n PointFieldDescriptionServerComponent,\n PointFieldErrorClientComponent,\n PointFieldErrorServerComponent,\n PointFieldLabelClientComponent,\n PointFieldLabelServerComponent,\n PointFieldServerComponent,\n PointFieldServerProps,\n} from './fields/Point.js'\n\nexport type {\n RadioFieldClientComponent,\n RadioFieldClientProps,\n RadioFieldDescriptionClientComponent,\n RadioFieldDescriptionServerComponent,\n RadioFieldErrorClientComponent,\n RadioFieldErrorServerComponent,\n RadioFieldLabelClientComponent,\n RadioFieldLabelServerComponent,\n RadioFieldServerComponent,\n RadioFieldServerProps,\n} from './fields/Radio.js'\n\nexport type {\n RelationshipFieldClientComponent,\n RelationshipFieldClientProps,\n RelationshipFieldDescriptionClientComponent,\n RelationshipFieldDescriptionServerComponent,\n RelationshipFieldErrorClientComponent,\n RelationshipFieldErrorServerComponent,\n RelationshipFieldLabelClientComponent,\n RelationshipFieldLabelServerComponent,\n RelationshipFieldServerComponent,\n RelationshipFieldServerProps,\n} from './fields/Relationship.js'\n\nexport type {\n RichTextFieldClientComponent,\n RichTextFieldClientProps,\n RichTextFieldDescriptionClientComponent,\n RichTextFieldDescriptionServerComponent,\n RichTextFieldErrorClientComponent,\n RichTextFieldErrorServerComponent,\n RichTextFieldLabelClientComponent,\n RichTextFieldLabelServerComponent,\n RichTextFieldServerComponent,\n RichTextFieldServerProps,\n} from './fields/RichText.js'\n\nexport type {\n RowFieldClientComponent,\n RowFieldClientProps,\n RowFieldDescriptionClientComponent,\n RowFieldDescriptionServerComponent,\n RowFieldErrorClientComponent,\n RowFieldErrorServerComponent,\n RowFieldLabelClientComponent,\n RowFieldLabelServerComponent,\n RowFieldServerComponent,\n RowFieldServerProps,\n} from './fields/Row.js'\n\nexport type {\n SelectFieldClientComponent,\n SelectFieldClientProps,\n SelectFieldDescriptionClientComponent,\n SelectFieldDescriptionServerComponent,\n SelectFieldErrorClientComponent,\n SelectFieldErrorServerComponent,\n SelectFieldLabelClientComponent,\n SelectFieldLabelServerComponent,\n SelectFieldServerComponent,\n SelectFieldServerProps,\n} from './fields/Select.js'\n\nexport type {\n ClientTab,\n TabsFieldClientComponent,\n TabsFieldClientProps,\n TabsFieldDescriptionClientComponent,\n TabsFieldDescriptionServerComponent,\n TabsFieldErrorClientComponent,\n TabsFieldErrorServerComponent,\n TabsFieldLabelClientComponent,\n TabsFieldLabelServerComponent,\n TabsFieldServerComponent,\n TabsFieldServerProps,\n} from './fields/Tabs.js'\n\nexport type {\n TextFieldClientComponent,\n TextFieldClientProps,\n TextFieldDescriptionClientComponent,\n TextFieldDescriptionServerComponent,\n TextFieldErrorClientComponent,\n TextFieldErrorServerComponent,\n TextFieldLabelClientComponent,\n TextFieldLabelServerComponent,\n TextFieldServerComponent,\n TextFieldServerProps,\n} from './fields/Text.js'\n\nexport type {\n TextareaFieldClientComponent,\n TextareaFieldClientProps,\n TextareaFieldDescriptionClientComponent,\n TextareaFieldDescriptionServerComponent,\n TextareaFieldErrorClientComponent,\n TextareaFieldErrorServerComponent,\n TextareaFieldLabelClientComponent,\n TextareaFieldLabelServerComponent,\n TextareaFieldServerComponent,\n TextareaFieldServerProps,\n} from './fields/Textarea.js'\n\nexport type {\n UploadFieldClientComponent,\n UploadFieldClientProps,\n UploadFieldDescriptionClientComponent,\n UploadFieldDescriptionServerComponent,\n UploadFieldErrorClientComponent,\n UploadFieldErrorServerComponent,\n UploadFieldLabelClientComponent,\n UploadFieldLabelServerComponent,\n UploadFieldServerComponent,\n UploadFieldServerProps,\n} from './fields/Upload.js'\n\nexport type {\n Description,\n DescriptionFunction,\n FieldDescriptionClientComponent,\n FieldDescriptionClientProps,\n FieldDescriptionServerComponent,\n FieldDescriptionServerProps,\n GenericDescriptionProps,\n StaticDescription,\n} from './forms/Description.js'\n\nexport type {\n FieldErrorClientComponent,\n FieldErrorClientProps,\n FieldErrorServerComponent,\n FieldErrorServerProps,\n GenericErrorProps,\n} from './forms/Error.js'\n\nexport type { FormFieldBase, ServerFieldBase } from './forms/Field.js'\n\nexport type { Data, FilterOptionsResult, FormField, FormState, Row } from './forms/Form.js'\n\nexport type {\n FieldLabelClientComponent,\n FieldLabelClientProps,\n FieldLabelServerComponent,\n FieldLabelServerProps,\n GenericLabelProps,\n SanitizedLabelProps,\n} from './forms/Label.js'\n\nexport type { RowLabel, RowLabelComponent } from './forms/RowLabel.js'\n\nexport type { LanguageOptions } from './LanguageOptions.js'\n\nexport type {\n RichTextAdapter,\n RichTextAdapterProvider,\n RichTextGenerateComponentMap,\n RichTextHooks,\n} from './RichText.js'\n\nexport type {\n AdminViewComponent,\n AdminViewConfig,\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 props?: Partial<any>\n RenderedComponent: React.ReactNode\n type: 'server'\n}\n\nexport type MappedClientComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component?: React.ComponentType<TComponentClientProps>\n props?: Partial<TComponentClientProps>\n RenderedComponent?: React.ReactNode\n type: 'client'\n}\n\nexport type MappedEmptyComponent = {\n type: 'empty'\n}\n\nexport type MappedComponent<TComponentClientProps extends JsonObject = JsonObject> =\n | MappedClientComponent<TComponentClientProps>\n | MappedEmptyComponent\n | MappedServerComponent<TComponentClientProps>\n | undefined\n\nexport type CreateMappedComponent = {\n <T extends JsonObject>(\n component: { Component: React.FC<T> } | null | PayloadComponent<T>,\n props: {\n clientProps?: JsonObject\n serverProps?: object\n },\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: {\n clientProps?: JsonObject\n serverProps?: object\n },\n fallback: React.FC,\n identifier: string,\n ): MappedComponent<T>[]\n}\n"],"names":[],"mappings":"AA0XA,WAoBC"}
1
+ {"version":3,"sources":["../../src/admin/types.ts"],"sourcesContent":["import type { AcceptedLanguages, I18nClient } from '@payloadcms/translations'\nimport type React from 'react'\n\nimport type { ImportMap } from '../bin/generateImportMap/index.js'\nimport type { SanitizedCollectionConfig } from '../collections/config/types.js'\nimport type { SanitizedConfig } from '../config/types.js'\nimport type { Block, ClientField, Field, FieldTypes, Tab } from '../fields/config/types.js'\nimport type { SanitizedGlobalConfig } from '../globals/config/types.js'\nimport type { JsonObject } from '../types/index.js'\nimport type {\n BuildFormStateArgs,\n Data,\n FieldState,\n FieldStateWithoutComponents,\n FilterOptionsResult,\n FormState,\n FormStateWithoutComponents,\n Row,\n} from './forms/Form.js'\n\nexport type { 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'\nexport type {\n DocumentTabComponent,\n DocumentTabCondition,\n DocumentTabConfig,\n DocumentTabProps,\n} from './elements/Tab.js'\nexport type { CustomUpload } from './elements/Upload.js'\n\nexport type {\n WithServerSidePropsComponent,\n WithServerSidePropsComponentProps,\n} from './elements/WithServerSideProps.js'\n\nexport type {\n ArrayFieldClientComponent,\n ArrayFieldClientProps,\n ArrayFieldDescriptionClientComponent,\n ArrayFieldDescriptionServerComponent,\n ArrayFieldErrorClientComponent,\n ArrayFieldErrorServerComponent,\n ArrayFieldLabelClientComponent,\n ArrayFieldLabelServerComponent,\n ArrayFieldServerComponent,\n ArrayFieldServerProps,\n} from './fields/Array.js'\n\nexport type {\n BlocksFieldClientComponent,\n BlocksFieldClientProps,\n BlocksFieldDescriptionClientComponent,\n BlocksFieldDescriptionServerComponent,\n BlocksFieldErrorClientComponent,\n BlocksFieldErrorServerComponent,\n BlocksFieldLabelClientComponent,\n BlocksFieldLabelServerComponent,\n BlocksFieldServerComponent,\n BlocksFieldServerProps,\n} from './fields/Blocks.js'\n\nexport type {\n CheckboxFieldClientComponent,\n CheckboxFieldClientProps,\n CheckboxFieldDescriptionClientComponent,\n CheckboxFieldDescriptionServerComponent,\n CheckboxFieldErrorClientComponent,\n CheckboxFieldErrorServerComponent,\n CheckboxFieldLabelClientComponent,\n CheckboxFieldLabelServerComponent,\n CheckboxFieldServerComponent,\n CheckboxFieldServerProps,\n} from './fields/Checkbox.js'\n\nexport type {\n CodeFieldClientComponent,\n CodeFieldClientProps,\n CodeFieldDescriptionClientComponent,\n CodeFieldDescriptionServerComponent,\n CodeFieldErrorClientComponent,\n CodeFieldErrorServerComponent,\n CodeFieldLabelClientComponent,\n CodeFieldLabelServerComponent,\n CodeFieldServerComponent,\n CodeFieldServerProps,\n} from './fields/Code.js'\n\nexport type {\n CollapsibleFieldClientComponent,\n CollapsibleFieldClientProps,\n CollapsibleFieldDescriptionClientComponent,\n CollapsibleFieldDescriptionServerComponent,\n CollapsibleFieldErrorClientComponent,\n CollapsibleFieldErrorServerComponent,\n CollapsibleFieldLabelClientComponent,\n CollapsibleFieldLabelServerComponent,\n CollapsibleFieldServerComponent,\n CollapsibleFieldServerProps,\n} from './fields/Collapsible.js'\n\nexport type {\n DateFieldClientComponent,\n DateFieldClientProps,\n DateFieldDescriptionClientComponent,\n DateFieldDescriptionServerComponent,\n DateFieldErrorClientComponent,\n DateFieldErrorServerComponent,\n DateFieldLabelClientComponent,\n DateFieldLabelServerComponent,\n DateFieldServerComponent,\n DateFieldServerProps,\n} from './fields/Date.js'\n\nexport type {\n EmailFieldClientComponent,\n EmailFieldClientProps,\n EmailFieldDescriptionClientComponent,\n EmailFieldDescriptionServerComponent,\n EmailFieldErrorClientComponent,\n EmailFieldErrorServerComponent,\n EmailFieldLabelClientComponent,\n EmailFieldLabelServerComponent,\n EmailFieldServerComponent,\n EmailFieldServerProps,\n} from './fields/Email.js'\n\nexport type {\n GroupFieldClientComponent,\n GroupFieldClientProps,\n GroupFieldDescriptionClientComponent,\n GroupFieldDescriptionServerComponent,\n GroupFieldErrorClientComponent,\n GroupFieldErrorServerComponent,\n GroupFieldLabelClientComponent,\n GroupFieldLabelServerComponent,\n GroupFieldServerComponent,\n GroupFieldServerProps,\n} from './fields/Group.js'\n\nexport type { HiddenFieldProps } from './fields/Hidden.js'\n\nexport type {\n JoinFieldClientComponent,\n JoinFieldClientProps,\n JoinFieldDescriptionClientComponent,\n JoinFieldDescriptionServerComponent,\n JoinFieldErrorClientComponent,\n JoinFieldErrorServerComponent,\n JoinFieldLabelClientComponent,\n JoinFieldLabelServerComponent,\n JoinFieldServerComponent,\n JoinFieldServerProps,\n} from './fields/Join.js'\n\nexport type {\n JSONFieldClientComponent,\n JSONFieldClientProps,\n JSONFieldDescriptionClientComponent,\n JSONFieldDescriptionServerComponent,\n JSONFieldErrorClientComponent,\n JSONFieldErrorServerComponent,\n JSONFieldLabelClientComponent,\n JSONFieldLabelServerComponent,\n JSONFieldServerComponent,\n JSONFieldServerProps,\n} from './fields/JSON.js'\n\nexport type {\n NumberFieldClientComponent,\n NumberFieldClientProps,\n NumberFieldDescriptionClientComponent,\n NumberFieldDescriptionServerComponent,\n NumberFieldErrorClientComponent,\n NumberFieldErrorServerComponent,\n NumberFieldLabelClientComponent,\n NumberFieldLabelServerComponent,\n NumberFieldServerComponent,\n NumberFieldServerProps,\n} from './fields/Number.js'\n\nexport type {\n PointFieldClientComponent,\n PointFieldClientProps,\n PointFieldDescriptionClientComponent,\n PointFieldDescriptionServerComponent,\n PointFieldErrorClientComponent,\n PointFieldErrorServerComponent,\n PointFieldLabelClientComponent,\n PointFieldLabelServerComponent,\n PointFieldServerComponent,\n PointFieldServerProps,\n} from './fields/Point.js'\n\nexport type {\n RadioFieldClientComponent,\n RadioFieldClientProps,\n RadioFieldDescriptionClientComponent,\n RadioFieldDescriptionServerComponent,\n RadioFieldErrorClientComponent,\n RadioFieldErrorServerComponent,\n RadioFieldLabelClientComponent,\n RadioFieldLabelServerComponent,\n RadioFieldServerComponent,\n RadioFieldServerProps,\n} from './fields/Radio.js'\n\nexport type {\n RelationshipFieldClientComponent,\n RelationshipFieldClientProps,\n RelationshipFieldDescriptionClientComponent,\n RelationshipFieldDescriptionServerComponent,\n RelationshipFieldErrorClientComponent,\n RelationshipFieldErrorServerComponent,\n RelationshipFieldLabelClientComponent,\n RelationshipFieldLabelServerComponent,\n RelationshipFieldServerComponent,\n RelationshipFieldServerProps,\n} from './fields/Relationship.js'\n\nexport type {\n RichTextFieldClientComponent,\n RichTextFieldClientProps,\n RichTextFieldDescriptionClientComponent,\n RichTextFieldDescriptionServerComponent,\n RichTextFieldErrorClientComponent,\n RichTextFieldErrorServerComponent,\n RichTextFieldLabelClientComponent,\n RichTextFieldLabelServerComponent,\n RichTextFieldServerComponent,\n RichTextFieldServerProps,\n} from './fields/RichText.js'\n\nexport type {\n RowFieldClientComponent,\n RowFieldClientProps,\n RowFieldDescriptionClientComponent,\n RowFieldDescriptionServerComponent,\n RowFieldErrorClientComponent,\n RowFieldErrorServerComponent,\n RowFieldLabelClientComponent,\n RowFieldLabelServerComponent,\n RowFieldServerComponent,\n RowFieldServerProps,\n} from './fields/Row.js'\n\nexport type {\n SelectFieldClientComponent,\n SelectFieldClientProps,\n SelectFieldDescriptionClientComponent,\n SelectFieldDescriptionServerComponent,\n SelectFieldErrorClientComponent,\n SelectFieldErrorServerComponent,\n SelectFieldLabelClientComponent,\n SelectFieldLabelServerComponent,\n SelectFieldServerComponent,\n SelectFieldServerProps,\n} from './fields/Select.js'\n\nexport type {\n ClientTab,\n TabsFieldClientComponent,\n TabsFieldClientProps,\n TabsFieldDescriptionClientComponent,\n TabsFieldDescriptionServerComponent,\n TabsFieldErrorClientComponent,\n TabsFieldErrorServerComponent,\n TabsFieldLabelClientComponent,\n TabsFieldLabelServerComponent,\n TabsFieldServerComponent,\n TabsFieldServerProps,\n} from './fields/Tabs.js'\n\nexport type {\n TextFieldClientComponent,\n TextFieldClientProps,\n TextFieldDescriptionClientComponent,\n TextFieldDescriptionServerComponent,\n TextFieldErrorClientComponent,\n TextFieldErrorServerComponent,\n TextFieldLabelClientComponent,\n TextFieldLabelServerComponent,\n TextFieldServerComponent,\n TextFieldServerProps,\n} from './fields/Text.js'\n\nexport type {\n TextareaFieldClientComponent,\n TextareaFieldClientProps,\n TextareaFieldDescriptionClientComponent,\n TextareaFieldDescriptionServerComponent,\n TextareaFieldErrorClientComponent,\n TextareaFieldErrorServerComponent,\n TextareaFieldLabelClientComponent,\n TextareaFieldLabelServerComponent,\n TextareaFieldServerComponent,\n TextareaFieldServerProps,\n} from './fields/Textarea.js'\n\nexport type { UIFieldClientComponent, UIFieldServerComponent } from './fields/UI.js'\n\nexport type {\n UploadFieldClientComponent,\n UploadFieldClientProps,\n UploadFieldDescriptionClientComponent,\n UploadFieldDescriptionServerComponent,\n UploadFieldErrorClientComponent,\n UploadFieldErrorServerComponent,\n UploadFieldLabelClientComponent,\n UploadFieldLabelServerComponent,\n UploadFieldServerComponent,\n UploadFieldServerProps,\n} from './fields/Upload.js'\n\nexport type {\n Description,\n DescriptionFunction,\n FieldDescriptionClientComponent,\n FieldDescriptionClientProps,\n FieldDescriptionServerComponent,\n FieldDescriptionServerProps,\n GenericDescriptionProps,\n StaticDescription,\n} from './forms/Description.js'\n\nexport type {\n FieldErrorClientComponent,\n FieldErrorClientProps,\n FieldErrorServerComponent,\n FieldErrorServerProps,\n GenericErrorProps,\n} from './forms/Error.js'\n\nexport type {\n ClientComponentProps,\n ClientFieldBase,\n ClientFieldWithOptionalType,\n FieldClientComponent,\n FieldServerComponent,\n ServerComponentProps,\n ServerFieldBase,\n} from './forms/Field.js'\n\nexport type {\n BuildFormStateArgs,\n Data,\n FieldState as FormField,\n FieldStateWithoutComponents as FormFieldWithoutComponents,\n FilterOptionsResult,\n FormState,\n FormStateWithoutComponents,\n Row,\n}\n\nexport type {\n FieldLabelClientComponent,\n FieldLabelClientProps,\n FieldLabelServerComponent,\n FieldLabelServerProps,\n GenericLabelProps,\n SanitizedLabelProps,\n} from './forms/Label.js'\n\nexport type { RowLabel, RowLabelComponent } from './forms/RowLabel.js'\n\nexport type {\n BuildTableStateArgs,\n DefaultServerFunctionArgs,\n ListQuery,\n ServerFunction,\n ServerFunctionArgs,\n ServerFunctionClient,\n ServerFunctionClientArgs,\n ServerFunctionConfig,\n ServerFunctionHandler,\n} from './functions/index.js'\n\nexport type { LanguageOptions } from './LanguageOptions.js'\n\nexport type MappedServerComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component?: React.ComponentType<TComponentClientProps>\n props?: Partial<any>\n RenderedComponent: React.ReactNode\n type: 'server'\n}\n\nexport type MappedClientComponent<TComponentClientProps extends JsonObject = JsonObject> = {\n Component?: React.ComponentType<TComponentClientProps>\n props?: Partial<TComponentClientProps>\n RenderedComponent?: React.ReactNode\n type: 'client'\n}\n\nexport type MappedEmptyComponent = {\n type: 'empty'\n}\n\nexport enum Action {\n RenderConfig = 'render-config',\n}\n\nexport type RenderEntityConfigArgs = {\n collectionSlug?: string\n data?: Data\n globalSlug?: string\n}\n\nexport type RenderRootConfigArgs = {}\n\nexport type RenderFieldConfigArgs = {\n collectionSlug?: string\n formState?: FormState\n globalSlug?: string\n schemaPath: string\n}\n\nexport type RenderConfigArgs = {\n action: Action.RenderConfig\n config: Promise<SanitizedConfig> | SanitizedConfig\n i18n: I18nClient\n importMap: ImportMap\n languageCode: AcceptedLanguages\n serverProps?: any\n} & (RenderEntityConfigArgs | RenderFieldConfigArgs | RenderRootConfigArgs)\n\nexport type PayloadServerAction = (\n args:\n | {\n [key: string]: any\n action: Action\n i18n: I18nClient\n }\n | RenderConfigArgs,\n) => Promise<string>\n\nexport type RenderedField = {\n Field: React.ReactNode\n indexPath?: string\n initialSchemaPath?: string\n isSidebar: boolean\n path: string\n schemaPath: string\n type: FieldTypes\n}\n\nexport type FieldRow = {\n RowLabel?: React.ReactNode\n}\n\nexport type DocumentSlots = {\n Description?: React.ReactNode\n PreviewButton?: React.ReactNode\n PublishButton?: React.ReactNode\n SaveButton?: React.ReactNode\n SaveDraftButton?: React.ReactNode\n Upload?: React.ReactNode\n}\n\nexport type { RichTextAdapter, RichTextAdapterProvider, RichTextHooks } from './RichText.js'\n\nexport type {\n AdminViewComponent,\n AdminViewConfig,\n AdminViewProps,\n ClientSideEditViewProps,\n EditViewProps,\n InitPageResult,\n ServerSideEditViewProps,\n VisibleEntities,\n} from './views/types.js'\n\ntype SchemaPath = {} & string\nexport type FieldSchemaMap = Map<\n SchemaPath,\n | {\n fields: Field[]\n }\n | Block\n | Field\n | Tab\n>\n"],"names":["Action"],"mappings":";UAiZYA;;GAAAA,WAAAA"}
@@ -7,7 +7,7 @@ import type { Locale, MetaConfig, PayloadComponent } from '../../config/types.js
7
7
  import type { SanitizedGlobalConfig } from '../../globals/config/types.js';
8
8
  import type { PayloadRequest } from '../../types/index.js';
9
9
  import type { LanguageOptions } from '../LanguageOptions.js';
10
- import type { MappedComponent } from '../types.js';
10
+ import type { Data, DocumentSlots, PayloadServerAction } from '../types.js';
11
11
  export type AdminViewConfig = {
12
12
  Component: AdminViewComponent;
13
13
  /** Whether the path should be matched exactly or as a prefix */
@@ -17,17 +17,18 @@ export type AdminViewConfig = {
17
17
  sensitive?: boolean;
18
18
  strict?: boolean;
19
19
  };
20
- export type MappedView = {
21
- actions?: MappedComponent[];
22
- Component: MappedComponent;
23
- };
24
20
  export type AdminViewProps = {
25
21
  readonly clientConfig: ClientConfig;
22
+ readonly disableActions?: boolean;
23
+ readonly drawerSlug?: string;
26
24
  readonly importMap: ImportMap;
25
+ readonly initialData?: Data;
27
26
  readonly initPageResult: InitPageResult;
28
27
  readonly params?: {
29
28
  [key: string]: string | string[] | undefined;
30
29
  };
30
+ readonly redirectAfterDelete?: boolean;
31
+ readonly redirectAfterDuplicate?: boolean;
31
32
  readonly searchParams: {
32
33
  [key: string]: string | string[] | undefined;
33
34
  };
@@ -59,9 +60,11 @@ export type ServerSideEditViewProps = {
59
60
  readonly params: {
60
61
  [key: string]: string | string[] | undefined;
61
62
  };
63
+ readonly payloadServerAction: PayloadServerAction;
62
64
  readonly routeSegments: string[];
63
65
  readonly searchParams: {
64
66
  [key: string]: string | string[] | undefined;
65
67
  };
66
- };
68
+ } & ClientSideEditViewProps;
69
+ export type ClientSideEditViewProps = {} & DocumentSlots;
67
70
  //# sourceMappingURL=types.d.ts.map