payload 3.0.0-beta.70 → 3.0.0-beta.72

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 (192) hide show
  1. package/dist/admin/elements/Cell.d.ts +2 -1
  2. package/dist/admin/elements/Cell.d.ts.map +1 -1
  3. package/dist/admin/elements/Cell.js.map +1 -1
  4. package/dist/admin/fields/Array.d.ts +19 -0
  5. package/dist/admin/fields/Array.d.ts.map +1 -0
  6. package/dist/admin/fields/Array.js +3 -0
  7. package/dist/admin/fields/Array.js.map +1 -0
  8. package/dist/admin/fields/Blocks.d.ts +28 -0
  9. package/dist/admin/fields/Blocks.d.ts.map +1 -0
  10. package/dist/admin/fields/Blocks.js +3 -0
  11. package/dist/admin/fields/Blocks.js.map +1 -0
  12. package/dist/admin/fields/Checkbox.d.ts +16 -0
  13. package/dist/admin/fields/Checkbox.d.ts.map +1 -0
  14. package/dist/admin/fields/Checkbox.js +3 -0
  15. package/dist/admin/fields/Checkbox.js.map +1 -0
  16. package/dist/admin/fields/Code.d.ts +14 -0
  17. package/dist/admin/fields/Code.d.ts.map +1 -0
  18. package/dist/admin/fields/Code.js +3 -0
  19. package/dist/admin/fields/Code.js.map +1 -0
  20. package/dist/admin/fields/Collapsible.d.ts +12 -0
  21. package/dist/admin/fields/Collapsible.d.ts.map +1 -0
  22. package/dist/admin/fields/Collapsible.js +3 -0
  23. package/dist/admin/fields/Collapsible.js.map +1 -0
  24. package/dist/admin/fields/Date.d.ts +14 -0
  25. package/dist/admin/fields/Date.d.ts.map +1 -0
  26. package/dist/admin/fields/Date.js +3 -0
  27. package/dist/admin/fields/Date.js.map +1 -0
  28. package/dist/admin/fields/Email.d.ts +14 -0
  29. package/dist/admin/fields/Email.d.ts.map +1 -0
  30. package/dist/admin/fields/Email.js +3 -0
  31. package/dist/admin/fields/Email.js.map +1 -0
  32. package/dist/admin/fields/Group.d.ts +14 -0
  33. package/dist/admin/fields/Group.d.ts.map +1 -0
  34. package/dist/admin/fields/Group.js +3 -0
  35. package/dist/admin/fields/Group.js.map +1 -0
  36. package/dist/admin/fields/Hidden.d.ts +13 -0
  37. package/dist/admin/fields/Hidden.d.ts.map +1 -0
  38. package/dist/admin/fields/Hidden.js +3 -0
  39. package/dist/admin/fields/Hidden.js.map +1 -0
  40. package/dist/admin/fields/JSON.d.ts +14 -0
  41. package/dist/admin/fields/JSON.d.ts.map +1 -0
  42. package/dist/admin/fields/JSON.js +3 -0
  43. package/dist/admin/fields/JSON.js.map +1 -0
  44. package/dist/admin/fields/Number.d.ts +19 -0
  45. package/dist/admin/fields/Number.d.ts.map +1 -0
  46. package/dist/admin/fields/Number.js +3 -0
  47. package/dist/admin/fields/Number.js.map +1 -0
  48. package/dist/admin/fields/Point.d.ts +13 -0
  49. package/dist/admin/fields/Point.d.ts.map +1 -0
  50. package/dist/admin/fields/Point.js +3 -0
  51. package/dist/admin/fields/Point.js.map +1 -0
  52. package/dist/admin/fields/Radio.d.ts +17 -0
  53. package/dist/admin/fields/Radio.d.ts.map +1 -0
  54. package/dist/admin/fields/Radio.js +3 -0
  55. package/dist/admin/fields/Radio.js.map +1 -0
  56. package/dist/admin/fields/Relationship.d.ts +16 -0
  57. package/dist/admin/fields/Relationship.d.ts.map +1 -0
  58. package/dist/admin/fields/Relationship.js +3 -0
  59. package/dist/admin/fields/Relationship.js.map +1 -0
  60. package/dist/admin/fields/RichText.d.ts +12 -0
  61. package/dist/admin/fields/RichText.d.ts.map +1 -0
  62. package/dist/admin/fields/RichText.js +3 -0
  63. package/dist/admin/fields/RichText.js.map +1 -0
  64. package/dist/admin/fields/Row.d.ts +14 -0
  65. package/dist/admin/fields/Row.d.ts.map +1 -0
  66. package/dist/admin/fields/Row.js +3 -0
  67. package/dist/admin/fields/Row.js.map +1 -0
  68. package/dist/admin/fields/Select.d.ts +18 -0
  69. package/dist/admin/fields/Select.d.ts.map +1 -0
  70. package/dist/admin/fields/Select.js +3 -0
  71. package/dist/admin/fields/Select.js.map +1 -0
  72. package/dist/admin/fields/Tabs.d.ts +20 -0
  73. package/dist/admin/fields/Tabs.d.ts.map +1 -0
  74. package/dist/admin/fields/Tabs.js +3 -0
  75. package/dist/admin/fields/Tabs.js.map +1 -0
  76. package/dist/admin/fields/Text.d.ts +20 -0
  77. package/dist/admin/fields/Text.d.ts.map +1 -0
  78. package/dist/admin/fields/Text.js +3 -0
  79. package/dist/admin/fields/Text.js.map +1 -0
  80. package/dist/admin/fields/Textarea.d.ts +16 -0
  81. package/dist/admin/fields/Textarea.d.ts.map +1 -0
  82. package/dist/admin/fields/Textarea.js +3 -0
  83. package/dist/admin/fields/Textarea.js.map +1 -0
  84. package/dist/admin/fields/Upload.d.ts +13 -0
  85. package/dist/admin/fields/Upload.d.ts.map +1 -0
  86. package/dist/admin/fields/Upload.js +3 -0
  87. package/dist/admin/fields/Upload.js.map +1 -0
  88. package/dist/admin/fields/index.d.ts +65 -0
  89. package/dist/admin/fields/index.d.ts.map +1 -0
  90. package/dist/admin/fields/index.js +3 -0
  91. package/dist/admin/fields/index.js.map +1 -0
  92. package/dist/admin/forms/Error.d.ts +8 -1
  93. package/dist/admin/forms/Error.d.ts.map +1 -1
  94. package/dist/admin/forms/Error.js.map +1 -1
  95. package/dist/admin/forms/Field.d.ts +32 -0
  96. package/dist/admin/forms/Field.d.ts.map +1 -0
  97. package/dist/admin/forms/Field.js +3 -0
  98. package/dist/admin/forms/Field.js.map +1 -0
  99. package/dist/admin/forms/FieldDescription.d.ts +8 -5
  100. package/dist/admin/forms/FieldDescription.d.ts.map +1 -1
  101. package/dist/admin/forms/FieldDescription.js.map +1 -1
  102. package/dist/admin/forms/FieldMap.d.ts +23 -0
  103. package/dist/admin/forms/FieldMap.d.ts.map +1 -0
  104. package/dist/admin/forms/FieldMap.js +3 -0
  105. package/dist/admin/forms/FieldMap.js.map +1 -0
  106. package/dist/admin/forms/Label.d.ts +11 -6
  107. package/dist/admin/forms/Label.d.ts.map +1 -1
  108. package/dist/admin/forms/Label.js.map +1 -1
  109. package/dist/admin/types.d.ts +30 -3
  110. package/dist/admin/types.d.ts.map +1 -1
  111. package/dist/admin/types.js.map +1 -1
  112. package/dist/auth/getAccessResults.d.ts.map +1 -1
  113. package/dist/auth/getAccessResults.js +2 -7
  114. package/dist/auth/getAccessResults.js.map +1 -1
  115. package/dist/auth/operations/access.d.ts.map +1 -1
  116. package/dist/auth/operations/access.js +1 -6
  117. package/dist/auth/operations/access.js.map +1 -1
  118. package/dist/auth/operations/resetPassword.d.ts.map +1 -1
  119. package/dist/auth/operations/resetPassword.js +2 -1
  120. package/dist/auth/operations/resetPassword.js.map +1 -1
  121. package/dist/auth/strategies/local/generatePasswordSaltHash.d.ts +3 -1
  122. package/dist/auth/strategies/local/generatePasswordSaltHash.d.ts.map +1 -1
  123. package/dist/auth/strategies/local/generatePasswordSaltHash.js +14 -8
  124. package/dist/auth/strategies/local/generatePasswordSaltHash.js.map +1 -1
  125. package/dist/auth/strategies/local/register.js +2 -1
  126. package/dist/auth/strategies/local/register.js.map +1 -1
  127. package/dist/collections/config/client.d.ts.map +1 -1
  128. package/dist/collections/config/types.d.ts +3 -3
  129. package/dist/collections/config/types.d.ts.map +1 -1
  130. package/dist/collections/config/types.js.map +1 -1
  131. package/dist/collections/operations/count.d.ts.map +1 -1
  132. package/dist/collections/operations/count.js +0 -4
  133. package/dist/collections/operations/count.js.map +1 -1
  134. package/dist/collections/operations/delete.d.ts.map +1 -1
  135. package/dist/collections/operations/delete.js.map +1 -1
  136. package/dist/collections/operations/deleteByID.d.ts.map +1 -1
  137. package/dist/collections/operations/deleteByID.js.map +1 -1
  138. package/dist/collections/operations/docAccess.d.ts.map +1 -1
  139. package/dist/collections/operations/docAccess.js +0 -4
  140. package/dist/collections/operations/docAccess.js.map +1 -1
  141. package/dist/collections/operations/find.d.ts.map +1 -1
  142. package/dist/collections/operations/find.js +0 -4
  143. package/dist/collections/operations/find.js.map +1 -1
  144. package/dist/collections/operations/findByID.d.ts.map +1 -1
  145. package/dist/collections/operations/findByID.js +0 -4
  146. package/dist/collections/operations/findByID.js.map +1 -1
  147. package/dist/collections/operations/findVersionByID.d.ts.map +1 -1
  148. package/dist/collections/operations/findVersionByID.js +0 -4
  149. package/dist/collections/operations/findVersionByID.js.map +1 -1
  150. package/dist/collections/operations/findVersions.d.ts.map +1 -1
  151. package/dist/collections/operations/findVersions.js +0 -4
  152. package/dist/collections/operations/findVersions.js.map +1 -1
  153. package/dist/collections/operations/restoreVersion.d.ts +1 -0
  154. package/dist/collections/operations/restoreVersion.d.ts.map +1 -1
  155. package/dist/collections/operations/restoreVersion.js +5 -6
  156. package/dist/collections/operations/restoreVersion.js.map +1 -1
  157. package/dist/collections/operations/updateByID.d.ts.map +1 -1
  158. package/dist/collections/operations/updateByID.js +2 -1
  159. package/dist/collections/operations/updateByID.js.map +1 -1
  160. package/dist/config/types.d.ts +1 -0
  161. package/dist/config/types.d.ts.map +1 -1
  162. package/dist/config/types.js.map +1 -1
  163. package/dist/fields/config/client.d.ts +207 -90
  164. package/dist/fields/config/client.d.ts.map +1 -1
  165. package/dist/fields/config/types.d.ts +59 -41
  166. package/dist/fields/config/types.d.ts.map +1 -1
  167. package/dist/fields/config/types.js.map +1 -1
  168. package/dist/fields/hooks/beforeChange/promise.d.ts.map +1 -1
  169. package/dist/fields/hooks/beforeChange/promise.js +2 -1
  170. package/dist/fields/hooks/beforeChange/promise.js.map +1 -1
  171. package/dist/fields/validations.d.ts +5 -2
  172. package/dist/fields/validations.d.ts.map +1 -1
  173. package/dist/fields/validations.js +11 -1
  174. package/dist/fields/validations.js.map +1 -1
  175. package/dist/globals/operations/findOne.d.ts.map +1 -1
  176. package/dist/globals/operations/findOne.js +0 -7
  177. package/dist/globals/operations/findOne.js.map +1 -1
  178. package/dist/globals/operations/findVersionByID.d.ts.map +1 -1
  179. package/dist/globals/operations/findVersionByID.js +0 -7
  180. package/dist/globals/operations/findVersionByID.js.map +1 -1
  181. package/dist/globals/operations/findVersions.d.ts +1 -0
  182. package/dist/globals/operations/findVersions.d.ts.map +1 -1
  183. package/dist/globals/operations/findVersions.js +2 -5
  184. package/dist/globals/operations/findVersions.js.map +1 -1
  185. package/dist/globals/operations/restoreVersion.d.ts +1 -0
  186. package/dist/globals/operations/restoreVersion.d.ts.map +1 -1
  187. package/dist/globals/operations/restoreVersion.js +15 -1
  188. package/dist/globals/operations/restoreVersion.js.map +1 -1
  189. package/dist/utilities/killTransaction.d.ts.map +1 -1
  190. package/dist/utilities/killTransaction.js +5 -1
  191. package/dist/utilities/killTransaction.js.map +1 -1
  192. package/package.json +2 -2
@@ -0,0 +1,20 @@
1
+ import type { TabsField } from '../../fields/config/types.js';
2
+ import type { ErrorComponent } from '../forms/Error.js';
3
+ import type { FieldMap } from '../forms/FieldMap.js';
4
+ import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
5
+ export type TabsFieldProps = {
6
+ forceRender?: boolean;
7
+ name?: string;
8
+ path?: string;
9
+ tabs?: MappedTab[];
10
+ width?: string;
11
+ } & FormFieldBase;
12
+ export type MappedTab = {
13
+ fieldMap?: FieldMap;
14
+ label: TabsField['tabs'][0]['label'];
15
+ name?: string;
16
+ };
17
+ export type TabsFieldLabelComponent = LabelComponent<'tabs'>;
18
+ export type TabsFieldDescriptionComponent = DescriptionComponent<'tabs'>;
19
+ export type TabsFieldErrorComponent = ErrorComponent<'tabs'>;
20
+ //# sourceMappingURL=Tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Tabs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,cAAc,GAAG;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,EAAE,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,aAAa,CAAA;AAEjB,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;AAE5D,MAAM,MAAM,6BAA6B,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAA;AAExE,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=Tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/admin/fields/Tabs.ts"],"sourcesContent":["import type { TabsField } from '../../fields/config/types.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { FieldMap } from '../forms/FieldMap.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type TabsFieldProps = {\n forceRender?: boolean\n name?: string\n path?: string\n tabs?: MappedTab[]\n width?: string\n} & FormFieldBase\n\nexport type MappedTab = {\n fieldMap?: FieldMap\n label: TabsField['tabs'][0]['label']\n name?: string\n}\n\nexport type TabsFieldLabelComponent = LabelComponent<'tabs'>\n\nexport type TabsFieldDescriptionComponent = DescriptionComponent<'tabs'>\n\nexport type TabsFieldErrorComponent = ErrorComponent<'tabs'>\n"],"names":[],"mappings":"AAuBA,WAA4D"}
@@ -0,0 +1,20 @@
1
+ import type { TextField } from '../../fields/config/types.js';
2
+ import type { ErrorComponent } from '../forms/Error.js';
3
+ import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
4
+ export type TextFieldProps = {
5
+ hasMany?: boolean;
6
+ inputRef?: React.MutableRefObject<HTMLInputElement>;
7
+ maxLength?: number;
8
+ maxRows?: number;
9
+ minLength?: number;
10
+ minRows?: number;
11
+ name?: string;
12
+ onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
13
+ path?: string;
14
+ placeholder?: TextField['admin']['placeholder'];
15
+ width?: string;
16
+ } & FormFieldBase;
17
+ export type TextFieldLabelComponent = LabelComponent<'text'>;
18
+ export type TextFieldDescriptionComponent = DescriptionComponent<'text'>;
19
+ export type TextFieldErrorComponent = ErrorComponent<'text'>;
20
+ //# sourceMappingURL=Text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEtF,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAA;IACnD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAA;IACxD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAA;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,aAAa,CAAA;AAEjB,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;AAE5D,MAAM,MAAM,6BAA6B,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAA;AAExE,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=Text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/admin/fields/Text.ts"],"sourcesContent":["import type { TextField } from '../../fields/config/types.js'\nimport type { ErrorComponent } from '../forms/Error.js'\nimport type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js'\n\nexport type TextFieldProps = {\n hasMany?: boolean\n inputRef?: React.MutableRefObject<HTMLInputElement>\n maxLength?: number\n maxRows?: number\n minLength?: number\n minRows?: number\n name?: string\n onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>\n path?: string\n placeholder?: TextField['admin']['placeholder']\n width?: string\n} & FormFieldBase\n\nexport type TextFieldLabelComponent = LabelComponent<'text'>\n\nexport type TextFieldDescriptionComponent = DescriptionComponent<'text'>\n\nexport type TextFieldErrorComponent = ErrorComponent<'text'>\n"],"names":[],"mappings":"AAsBA,WAA4D"}
@@ -0,0 +1,16 @@
1
+ import type { TextareaField } from '../../fields/config/types.js';
2
+ import type { ErrorComponent } from '../forms/Error.js';
3
+ import type { DescriptionComponent, FormFieldBase, LabelComponent } from '../types.js';
4
+ export type TextareaFieldProps = {
5
+ maxLength?: number;
6
+ minLength?: number;
7
+ name?: string;
8
+ path?: string;
9
+ placeholder?: TextareaField['admin']['placeholder'];
10
+ rows?: number;
11
+ width?: string;
12
+ } & FormFieldBase;
13
+ export type TextareaFieldLabelComponent = LabelComponent<'textarea'>;
14
+ export type TextareaFieldDescriptionComponent = DescriptionComponent<'textarea'>;
15
+ export type TextareaFieldErrorComponent = ErrorComponent<'textarea'>;
16
+ //# sourceMappingURL=Textarea.d.ts.map
@@ -0,0 +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,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,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,aAAa,CAAA;AAEjB,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA;AAEpE,MAAM,MAAM,iCAAiC,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAA;AAEhF,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,UAAU,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=Textarea.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/admin/fields/Textarea.ts"],"sourcesContent":["import type { TextareaField } from '../../fields/config/types.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 width?: string\n} & FormFieldBase\n\nexport type TextareaFieldLabelComponent = LabelComponent<'textarea'>\n\nexport type TextareaFieldDescriptionComponent = DescriptionComponent<'textarea'>\n\nexport type TextareaFieldErrorComponent = ErrorComponent<'textarea'>\n"],"names":[],"mappings":"AAkBA,WAAoE"}
@@ -0,0 +1,13 @@
1
+ import type { DescriptionComponent, FormFieldBase, LabelComponent, UploadField } from 'payload';
2
+ import type { ErrorComponent } from '../forms/Error.js';
3
+ export type UploadFieldProps = {
4
+ filterOptions?: UploadField['filterOptions'];
5
+ name?: string;
6
+ path?: string;
7
+ relationTo?: UploadField['relationTo'];
8
+ width?: string;
9
+ } & FormFieldBase;
10
+ export type UploadFieldLabelComponent = LabelComponent<'upload'>;
11
+ export type UploadFieldDescriptionComponent = DescriptionComponent<'upload'>;
12
+ export type UploadFieldErrorComponent = ErrorComponent<'upload'>;
13
+ //# sourceMappingURL=Upload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Upload.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Upload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE/F,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,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,aAAa,CAAA;AAEjB,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"}
@@ -0,0 +1,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=Upload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/admin/fields/Upload.ts"],"sourcesContent":["import type { DescriptionComponent, FormFieldBase, LabelComponent, UploadField } 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 width?: string\n} & FormFieldBase\n\nexport type UploadFieldLabelComponent = LabelComponent<'upload'>\n\nexport type UploadFieldDescriptionComponent = DescriptionComponent<'upload'>\n\nexport type UploadFieldErrorComponent = ErrorComponent<'upload'>\n"],"names":[],"mappings":"AAgBA,WAAgE"}
@@ -0,0 +1,65 @@
1
+ import type { ArrayFieldProps } from './Array.js';
2
+ import type { BlocksFieldProps } from './Blocks.js';
3
+ import type { CheckboxFieldProps } from './Checkbox.js';
4
+ import type { CodeFieldProps } from './Code.js';
5
+ import type { CollapsibleFieldProps } from './Collapsible.js';
6
+ import type { DateFieldProps } from './Date.js';
7
+ import type { EmailFieldProps } from './Email.js';
8
+ import type { GroupFieldProps } from './Group.js';
9
+ import type { HiddenFieldProps } from './Hidden.js';
10
+ import type { JSONFieldProps } from './JSON.js';
11
+ import type { NumberFieldProps } from './Number.js';
12
+ import type { PointFieldProps } from './Point.js';
13
+ import type { RadioFieldProps } from './Radio.js';
14
+ import type { RelationshipFieldProps } from './Relationship.js';
15
+ import type { RichTextComponentProps } from './RichText.js';
16
+ import type { RowFieldProps } from './Row.js';
17
+ import type { SelectFieldProps } from './Select.js';
18
+ import type { TabsFieldProps } from './Tabs.js';
19
+ import type { TextFieldProps } from './Text.js';
20
+ import type { TextareaFieldProps } from './Textarea.js';
21
+ import type { UploadFieldProps } from './Upload.js';
22
+ export type FieldComponentProps = ({
23
+ type: 'array';
24
+ } & ArrayFieldProps) | ({
25
+ type: 'blocks';
26
+ } & BlocksFieldProps) | ({
27
+ type: 'checkbox';
28
+ } & CheckboxFieldProps) | ({
29
+ type: 'code';
30
+ } & CodeFieldProps) | ({
31
+ type: 'collapsible';
32
+ } & CollapsibleFieldProps) | ({
33
+ type: 'date';
34
+ } & DateFieldProps) | ({
35
+ type: 'email';
36
+ } & EmailFieldProps) | ({
37
+ type: 'group';
38
+ } & GroupFieldProps) | ({
39
+ type: 'hidden';
40
+ } & HiddenFieldProps) | ({
41
+ type: 'json';
42
+ } & JSONFieldProps) | ({
43
+ type: 'number';
44
+ } & NumberFieldProps) | ({
45
+ type: 'point';
46
+ } & PointFieldProps) | ({
47
+ type: 'radio';
48
+ } & RadioFieldProps) | ({
49
+ type: 'relationship';
50
+ } & RelationshipFieldProps) | ({
51
+ type: 'richText';
52
+ } & RichTextComponentProps) | ({
53
+ type: 'row';
54
+ } & RowFieldProps) | ({
55
+ type: 'select';
56
+ } & SelectFieldProps) | ({
57
+ type: 'tabs';
58
+ } & TabsFieldProps) | ({
59
+ type: 'text';
60
+ } & TextFieldProps) | ({
61
+ type: 'textarea';
62
+ } & TextareaFieldProps) | ({
63
+ type: 'upload';
64
+ } & UploadFieldProps);
65
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAA;AAC7D,OAAO,KA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CAAC,GAC1B,CAAC;IACC,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,cAAc,CAAC,GACnB,CAAC;IACC,IAAI,EAAE,OAAO,CAAA;CACd,GAAG,eAAe,CAAC,GACpB,CAAC;IACC,IAAI,EAAE,OAAO,CAAA;CACd,GAAG,eAAe,CAAC,GACpB,CAAC;IACC,IAAI,EAAE,QAAQ,CAAA;CACf,GAAG,gBAAgB,CAAC,GACrB,CAAC;IACC,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,cAAc,CAAC,GACnB,CAAC;IACC,IAAI,EAAE,QAAQ,CAAA;CACf,GAAG,gBAAgB,CAAC,GACrB,CAAC;IACC,IAAI,EAAE,OAAO,CAAA;CACd,GAAG,eAAe,CAAC,GACpB,CAAC;IACC,IAAI,EAAE,OAAO,CAAA;CACd,GAAG,eAAe,CAAC,GACpB,CAAC;IACC,IAAI,EAAE,cAAc,CAAA;CACrB,GAAG,sBAAsB,CAAC,GAC3B,CAAC;IACC,IAAI,EAAE,UAAU,CAAA;CACjB,GAAG,sBAAsB,CAAC,GAC3B,CAAC;IACC,IAAI,EAAE,KAAK,CAAA;CACZ,GAAG,aAAa,CAAC,GAClB,CAAC;IACC,IAAI,EAAE,QAAQ,CAAA;CACf,GAAG,gBAAgB,CAAC,GACrB,CAAC;IACC,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,cAAc,CAAC,GACnB,CAAC;IACC,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,cAAc,CAAC,GACnB,CAAC;IACC,IAAI,EAAE,UAAU,CAAA;CACjB,GAAG,kBAAkB,CAAC,GACvB,CAAC;IACC,IAAI,EAAE,QAAQ,CAAA;CACf,GAAG,gBAAgB,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/admin/fields/index.ts"],"sourcesContent":["import type { ArrayFieldProps } from './Array.js'\nimport type { BlocksFieldProps } from './Blocks.js'\nimport type { CheckboxFieldProps } from './Checkbox.js'\nimport type { CodeFieldProps } from './Code.js'\nimport type { CollapsibleFieldProps } from './Collapsible.js'\nimport type { DateFieldProps } from './Date.js'\nimport type { EmailFieldProps } from './Email.js'\nimport type { GroupFieldProps } from './Group.js'\nimport type { HiddenFieldProps } from './Hidden.js'\nimport type { JSONFieldProps } from './JSON.js'\nimport type { NumberFieldProps } from './Number.js'\nimport type { PointFieldProps } from './Point.js'\nimport type { RadioFieldProps } from './Radio.js'\nimport type { RelationshipFieldProps } from './Relationship.js'\nimport type { RichTextComponentProps } from './RichText.js'\nimport type { RowFieldProps } from './Row.js'\nimport type { SelectFieldProps } from './Select.js'\nimport type { TabsFieldProps } from './Tabs.js'\nimport type { TextFieldProps } from './Text.js'\nimport type { TextareaFieldProps } from './Textarea.js'\nimport type { UploadFieldProps } from './Upload.js'\n\nexport type FieldComponentProps =\n | ({\n type: 'array'\n } & ArrayFieldProps)\n | ({\n type: 'blocks'\n } & BlocksFieldProps)\n | ({\n type: 'checkbox'\n } & CheckboxFieldProps)\n | ({\n type: 'code'\n } & CodeFieldProps)\n | ({\n type: 'collapsible'\n } & CollapsibleFieldProps)\n | ({\n type: 'date'\n } & DateFieldProps)\n | ({\n type: 'email'\n } & EmailFieldProps)\n | ({\n type: 'group'\n } & GroupFieldProps)\n | ({\n type: 'hidden'\n } & HiddenFieldProps)\n | ({\n type: 'json'\n } & JSONFieldProps)\n | ({\n type: 'number'\n } & NumberFieldProps)\n | ({\n type: 'point'\n } & PointFieldProps)\n | ({\n type: 'radio'\n } & RadioFieldProps)\n | ({\n type: 'relationship'\n } & RelationshipFieldProps)\n | ({\n type: 'richText'\n } & RichTextComponentProps)\n | ({\n type: 'row'\n } & RowFieldProps)\n | ({\n type: 'select'\n } & SelectFieldProps)\n | ({\n type: 'tabs'\n } & TabsFieldProps)\n | ({\n type: 'text'\n } & TextFieldProps)\n | ({\n type: 'textarea'\n } & TextareaFieldProps)\n | ({\n type: 'upload'\n } & UploadFieldProps)\n"],"names":[],"mappings":"AAsBA,WA+DyB"}
@@ -1,8 +1,15 @@
1
- export type ErrorProps = {
1
+ import type { CustomComponent, ServerProps } from '../../config/types.js';
2
+ import type { FieldComponentProps } from '../types.js';
3
+ import type { FieldTypes } from './FieldTypes.js';
4
+ export type GenericErrorProps = {
2
5
  CustomError?: React.ReactNode;
3
6
  alignCaret?: 'center' | 'left' | 'right';
4
7
  message?: string;
5
8
  path?: string;
6
9
  showError?: boolean;
7
10
  };
11
+ export type ErrorProps<T extends keyof FieldTypes = any> = {
12
+ type: T;
13
+ } & FieldComponentProps & GenericErrorProps & Partial<ServerProps>;
14
+ export type ErrorComponent<T extends keyof FieldTypes = any> = CustomComponent<ErrorProps<T>>;
8
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,MAAM,MAAM,UAAU,GAAG;IACvB,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"}
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 +1 @@
1
- {"version":3,"sources":["../../../src/admin/forms/Error.ts"],"sourcesContent":["export type ErrorProps = {\n CustomError?: React.ReactNode\n alignCaret?: 'center' | 'left' | 'right'\n message?: string\n path?: string\n showError?: boolean\n}\n"],"names":[],"mappings":"AAAA,WAMC"}
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"}
@@ -0,0 +1,32 @@
1
+ import type { User } from '../../auth/types.js';
2
+ import type { LabelStatic, Locale } from '../../config/types.js';
3
+ import type { Validate } from '../../fields/config/types.js';
4
+ import type { DocumentPreferences } from '../../preferences/types.js';
5
+ import type { ErrorProps } from './Error.js';
6
+ import type { FieldDescriptionProps } from './FieldDescription.js';
7
+ import type { SanitizedLabelProps } from './Label.js';
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;
31
+ };
32
+ //# sourceMappingURL=Field.d.ts.map
@@ -0,0 +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,EAAE,mBAAmB,CAAA;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=Field.js.map
@@ -0,0 +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,14 +1,17 @@
1
1
  import type React from 'react';
2
- import type { CustomComponent, LabelFunction } from '../../config/types.js';
3
- import type { Payload } from '../../index.js';
2
+ import type { CustomComponent, LabelFunction, ServerProps } from '../../config/types.js';
3
+ import type { FieldComponentProps } from '../types.js';
4
+ import type { FieldTypes } from './FieldTypes.js';
4
5
  export type DescriptionFunction = LabelFunction;
5
- export type DescriptionComponent = CustomComponent<FieldDescriptionProps>;
6
+ export type DescriptionComponent<T extends keyof FieldTypes = any> = CustomComponent<FieldDescriptionProps<T>>;
6
7
  export type Description = DescriptionFunction | Record<string, string> | string;
7
- export type FieldDescriptionProps = {
8
+ export type GenericDescriptionProps = {
8
9
  CustomDescription?: React.ReactNode;
9
10
  className?: string;
10
11
  description?: Record<string, string> | string;
11
12
  marginPlacement?: 'bottom' | 'top';
12
- payload?: Payload;
13
13
  };
14
+ export type FieldDescriptionProps<T extends keyof FieldTypes = any> = {
15
+ type: T;
16
+ } & FieldComponentProps & GenericDescriptionProps & Partial<ServerProps>;
14
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;AAE9B,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,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AAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACnC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAA;IAC7C,eAAe,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAA;CACnC,CAAA;AACD,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,MAAM,UAAU,GAAG,GAAG,IAAI;IACpE,IAAI,EAAE,CAAC,CAAA;CACR,GAAG,mBAAmB,GACrB,uBAAuB,GACvB,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 } from '../../config/types.js'\nimport type { Payload } from '../../index.js'\n\nexport type DescriptionFunction = LabelFunction\n\nexport type DescriptionComponent = CustomComponent<FieldDescriptionProps>\n\nexport type Description = DescriptionFunction | Record<string, string> | string\n\nexport type FieldDescriptionProps = {\n CustomDescription?: React.ReactNode\n className?: string\n description?: Record<string, string> | string\n marginPlacement?: 'bottom' | 'top'\n payload?: Payload\n}\n"],"names":[],"mappings":"AAWA,WAMC"}
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} & FieldComponentProps &\n GenericDescriptionProps &\n Partial<ServerProps>\n"],"names":[],"mappings":"AAmBA,WAIsB"}
@@ -0,0 +1,23 @@
1
+ import type { CellComponentProps, FieldComponentProps } from '../types.js';
2
+ import type { FieldTypes } from './FieldTypes.js';
3
+ export type MappedField = {
4
+ CustomCell?: React.ReactNode;
5
+ CustomField?: React.ReactNode;
6
+ cellComponentProps: CellComponentProps;
7
+ custom?: Record<any, string>;
8
+ disableBulkEdit?: boolean;
9
+ disableListColumn?: boolean;
10
+ disableListFilter?: boolean;
11
+ disabled?: boolean;
12
+ fieldComponentProps: FieldComponentProps;
13
+ fieldIsPresentational: boolean;
14
+ isFieldAffectingData: boolean;
15
+ isHidden?: boolean;
16
+ isSidebar?: boolean;
17
+ localized: boolean;
18
+ name?: string;
19
+ type: keyof FieldTypes;
20
+ unique?: boolean;
21
+ };
22
+ export type FieldMap = MappedField[];
23
+ //# sourceMappingURL=FieldMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldMap.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/FieldMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,kBAAkB,EAAE,kBAAkB,CAAA;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,qBAAqB,EAAE,OAAO,CAAA;IAC9B,oBAAoB,EAAE,OAAO,CAAA;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,SAAS,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,UAAU,CAAA;IACtB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { };
2
+
3
+ //# sourceMappingURL=FieldMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/admin/forms/FieldMap.ts"],"sourcesContent":["import type { CellComponentProps, FieldComponentProps } from '../types.js'\nimport type { FieldTypes } from './FieldTypes.js'\n\nexport type MappedField = {\n CustomCell?: React.ReactNode\n CustomField?: React.ReactNode\n cellComponentProps: CellComponentProps\n custom?: Record<any, string>\n disableBulkEdit?: boolean\n disableListColumn?: boolean\n disableListFilter?: boolean\n disabled?: boolean\n fieldComponentProps: FieldComponentProps\n fieldIsPresentational: boolean\n isFieldAffectingData: boolean\n isHidden?: boolean\n isSidebar?: boolean\n localized: boolean\n name?: string\n type: keyof FieldTypes\n unique?: boolean\n}\n\nexport type FieldMap = MappedField[]\n"],"names":[],"mappings":"AAuBA,WAAoC"}
@@ -1,11 +1,16 @@
1
- export type LabelProps = {
2
- CustomLabel?: React.ReactNode;
1
+ import type { CustomComponent, ServerProps } from '../../config/types.js';
2
+ import type { FieldComponentProps } from '../fields/index.js';
3
+ import type { FormFieldBase } from './Field.js';
4
+ import type { FieldTypes } from './FieldTypes.js';
5
+ export type GenericLabelProps = {
3
6
  as?: 'label' | 'span';
4
7
  htmlFor?: string;
5
- label?: Record<string, string> | string;
6
- required?: boolean;
7
8
  schemaPath?: string;
8
9
  unstyled?: boolean;
9
- };
10
- export type SanitizedLabelProps = Omit<LabelProps, 'label' | 'required'>;
10
+ } & FormFieldBase;
11
+ export type LabelProps<T extends keyof FieldTypes = any> = {
12
+ type: T;
13
+ } & FieldComponentProps & GenericLabelProps & Partial<ServerProps>;
14
+ export type SanitizedLabelProps<T extends keyof FieldTypes = any> = Omit<LabelProps<T>, 'label' | 'required'>;
15
+ export type LabelComponent<T extends keyof FieldTypes = any> = CustomComponent<LabelProps<T>>;
11
16
  //# sourceMappingURL=Label.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../src/admin/forms/Label.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,EAAE,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAA;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,UAAU,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,MAAM,uBAAuB,CAAA;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAC7D,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,IAAI,EAAE,CAAC,CAAA;CACR,GAAG,mBAAmB,GACrB,iBAAiB,GACjB,OAAO,CAAC,WAAW,CAAC,CAAA;AAEtB,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 +1 @@
1
- {"version":3,"sources":["../../../src/admin/forms/Label.ts"],"sourcesContent":["export type LabelProps = {\n CustomLabel?: React.ReactNode\n as?: 'label' | 'span'\n htmlFor?: string\n label?: Record<string, string> | string\n required?: boolean\n schemaPath?: string\n unstyled?: boolean\n}\n\nexport type SanitizedLabelProps = Omit<LabelProps, 'label' | 'required'>\n"],"names":[],"mappings":"AAUA,WAAwE"}
1
+ {"version":3,"sources":["../../../src/admin/forms/Label.ts"],"sourcesContent":["import type { CustomComponent, ServerProps } from '../../config/types.js'\nimport type { FieldComponentProps } from '../fields/index.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 type: T\n} & FieldComponentProps &\n GenericLabelProps &\n Partial<ServerProps>\n\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":"AAuBA,WAA6F"}
@@ -10,10 +10,37 @@ export type { CustomSaveDraftButton } from './elements/SaveDraftButton.js';
10
10
  export type { DocumentTab, DocumentTabComponent, DocumentTabCondition, DocumentTabConfig, DocumentTabProps, } from './elements/Tab.js';
11
11
  export type { CustomUpload } from './elements/Upload.js';
12
12
  export type { WithServerSidePropsComponent, WithServerSidePropsComponentProps, } from './elements/WithServerSideProps.js';
13
- export type { ErrorProps } from './forms/Error.js';
14
- export type { Description, DescriptionComponent, DescriptionFunction, FieldDescriptionProps, } from './forms/FieldDescription.js';
13
+ 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';
16
+ export type { CheckboxFieldDescriptionComponent, CheckboxFieldErrorComponent, CheckboxFieldLabelComponent, CheckboxFieldProps, } from './fields/Checkbox.js';
17
+ export type { CodeFieldDescriptionComponent, CodeFieldErrorComponent, CodeFieldLabelComponent, CodeFieldProps, } from './fields/Code.js';
18
+ export type { CollapsibleFieldDescriptionComponent, CollapsibleFieldErrorComponent, CollapsibleFieldLabelComponent, CollapsibleFieldProps, } from './fields/Collapsible.js';
19
+ export type { DateFieldDescriptionComponent, DateFieldErrorComponent, DateFieldLabelComponent, DateFieldProps, } from './fields/Date.js';
20
+ export type { EmailFieldDescriptionComponent, EmailFieldErrorComponent, EmailFieldLabelComponent, EmailFieldProps, } from './fields/Email.js';
21
+ export type { GroupFieldDescriptionComponent, GroupFieldErrorComponent, GroupFieldLabelComponent, GroupFieldProps, } from './fields/Group.js';
22
+ export type { HiddenFieldDescriptionComponent, HiddenFieldErrorComponent, HiddenFieldLabelComponent, HiddenFieldProps, } from './fields/Hidden.js';
23
+ export type { JSONFieldDescriptionComponent, JSONFieldErrorComponent, JSONFieldLabelComponent, JSONFieldProps, } from './fields/JSON.js';
24
+ export type { NumberFieldDescriptionComponent, NumberFieldErrorComponent, NumberFieldLabelComponent, NumberFieldProps, } from './fields/Number.js';
25
+ export type { PointFieldDescriptionComponent, PointFieldErrorComponent, PointFieldLabelComponent, PointFieldProps, } from './fields/Point.js';
26
+ export type { RadioFieldDescriptionComponent, RadioFieldErrorComponent, RadioFieldLabelComponent, RadioFieldProps, } from './fields/Radio.js';
27
+ export type { RelationshipFieldDescriptionComponent, RelationshipFieldErrorComponent, RelationshipFieldLabelComponent, RelationshipFieldProps, } from './fields/Relationship.js';
28
+ export type { RichTextComponentProps, RichTextFieldDescriptionComponent, RichTextFieldErrorComponent, RichTextFieldLabelComponent, } from './fields/RichText.js';
29
+ export type { RowFieldDescriptionComponent, RowFieldErrorComponent, RowFieldLabelComponent, RowFieldProps, } from './fields/Row.js';
30
+ 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 { TextFieldDescriptionComponent, TextFieldErrorComponent, TextFieldLabelComponent, TextFieldProps, } from './fields/Text.js';
34
+ export type { TextareaFieldDescriptionComponent, TextareaFieldErrorComponent, TextareaFieldLabelComponent, TextareaFieldProps, } from './fields/Textarea.js';
35
+ export type { UploadFieldDescriptionComponent, UploadFieldErrorComponent, UploadFieldLabelComponent, UploadFieldProps, } from './fields/Upload.js';
36
+ export type { FieldComponentProps } from './fields/index.js';
37
+ export type { ErrorComponent, ErrorProps, GenericErrorProps } from './forms/Error.js';
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';
15
42
  export type { Data, FilterOptionsResult, FormField, FormState, Row } from './forms/Form.js';
16
- export type { LabelProps, SanitizedLabelProps } from './forms/Label.js';
43
+ export type { GenericLabelProps, LabelComponent, LabelProps, SanitizedLabelProps, } from './forms/Label.js';
17
44
  export type { RowLabel, RowLabelComponent } from './forms/RowLabel.js';
18
45
  export type { AdminViewComponent, AdminViewProps, EditViewProps, InitPageResult, ServerSideEditViewProps, VisibleEntities, } from './views/types.js';
19
46
  //# 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,MAAM,6BAA6B,CAAA;AACtE,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACtE,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAChE,YAAY,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAC1E,YAAY,EACV,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,YAAY,EACV,4BAA4B,EAC5B,iCAAiC,GAClC,MAAM,mCAAmC,CAA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EACrB,uBAAuB,GACxB,MAAM,6BAA6B,CAAA;AAEpC,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEtD,YAAY,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAEnD,YAAY,EAAE,IAAI,EAAE,mBAAmB,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAE3F,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,mBAAmB,GACpB,MAAM,kBAAkB,CAAA;AAEzB,YAAY,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEtE,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,eAAe,GAChB,MAAM,kBAAkB,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'\nexport type {\n DocumentTab,\n DocumentTabComponent,\n DocumentTabCondition,\n DocumentTabConfig,\n DocumentTabProps,\n} from './elements/Tab.js'\nexport type { CustomUpload } from './elements/Upload.js'\nexport type {\n WithServerSidePropsComponent,\n WithServerSidePropsComponentProps,\n} from './elements/WithServerSideProps.js'\nexport type { ErrorProps } from './forms/Error.js'\nexport type {\n Description,\n DescriptionComponent,\n DescriptionFunction,\n FieldDescriptionProps,\n} from './forms/FieldDescription.js'\nexport type { Data, FilterOptionsResult, FormField, FormState, Row } from './forms/Form.js'\nexport type { LabelProps, SanitizedLabelProps } 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":"AAiCA,WAOyB"}
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 +1 @@
1
- {"version":3,"file":"getAccessResults.d.ts","sourceRoot":"","sources":["../../src/auth/getAccessResults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAK7C,KAAK,oBAAoB,GAAG;IAC1B,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AACD,wBAAsB,gBAAgB,CAAC,EAAE,GAAG,EAAE,EAAE,oBAAoB,GAAG,OAAO,CAAC,WAAW,CAAC,CAyE1F"}
1
+ {"version":3,"file":"getAccessResults.d.ts","sourceRoot":"","sources":["../../src/auth/getAccessResults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAI7C,KAAK,oBAAoB,GAAG;IAC1B,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AACD,wBAAsB,gBAAgB,CAAC,EAAE,GAAG,EAAE,EAAE,oBAAoB,GAAG,OAAO,CAAC,WAAW,CAAC,CAqE1F"}
@@ -1,5 +1,4 @@
1
1
  import { getEntityPolicies } from '../utilities/getEntityPolicies.js';
2
- import isolateObjectProperty from '../utilities/isolateObjectProperty.js';
3
2
  export async function getAccessResults({ req }) {
4
3
  const results = {};
5
4
  const { payload, user } = req;
@@ -29,9 +28,7 @@ export async function getAccessResults({ req }) {
29
28
  type: 'collection',
30
29
  entity: collection,
31
30
  operations: collectionOperations,
32
- // Do not re-use our existing req object, as we need a new req.transactionID. Cannot re-use our existing one, as this is run in parallel (Promise.all above) which is
33
- // not supported on the same transaction ID. Not passing a transaction ID here creates a new transaction ID.
34
- req: isolateObjectProperty(req, 'transactionID')
31
+ req
35
32
  });
36
33
  results.collections = {
37
34
  ...results.collections,
@@ -50,9 +47,7 @@ export async function getAccessResults({ req }) {
50
47
  type: 'global',
51
48
  entity: global,
52
49
  operations: globalOperations,
53
- // Do not re-use our existing req object, as we need a new req.transactionID. Cannot re-use our existing one, as this is run in parallel (Promise.all above) which is
54
- // not supported on the same transaction ID. Not passing a transaction ID here creates a new transaction ID.
55
- req: isolateObjectProperty(req, 'transactionID')
50
+ req
56
51
  });
57
52
  results.globals = {
58
53
  ...results.globals,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/auth/getAccessResults.ts"],"sourcesContent":["import type { AllOperations, PayloadRequest } from '../types/index.js'\nimport type { Permissions } from './types.js'\n\nimport { getEntityPolicies } from '../utilities/getEntityPolicies.js'\nimport isolateObjectProperty from '../utilities/isolateObjectProperty.js'\n\ntype GetAccessResultsArgs = {\n req: PayloadRequest\n}\nexport async function getAccessResults({ req }: GetAccessResultsArgs): Promise<Permissions> {\n const results = {} as Permissions\n const { payload, user } = req\n\n const isLoggedIn = !!user\n const userCollectionConfig =\n user && user.collection\n ? payload.config.collections.find((collection) => collection.slug === user.collection)\n : null\n\n if (userCollectionConfig && payload.config.admin.user === user.collection) {\n results.canAccessAdmin = userCollectionConfig.access.admin\n ? await userCollectionConfig.access.admin({ req })\n : isLoggedIn\n } else {\n results.canAccessAdmin = false\n }\n\n await Promise.all(\n payload.config.collections.map(async (collection) => {\n const collectionOperations: AllOperations[] = ['create', 'read', 'update', 'delete']\n\n if (\n collection.auth &&\n typeof collection.auth.maxLoginAttempts !== 'undefined' &&\n collection.auth.maxLoginAttempts !== 0\n ) {\n collectionOperations.push('unlock')\n }\n\n if (collection.versions) {\n collectionOperations.push('readVersions')\n }\n\n const collectionPolicy = await getEntityPolicies({\n type: 'collection',\n entity: collection,\n operations: collectionOperations,\n // Do not re-use our existing req object, as we need a new req.transactionID. Cannot re-use our existing one, as this is run in parallel (Promise.all above) which is\n // not supported on the same transaction ID. Not passing a transaction ID here creates a new transaction ID.\n req: isolateObjectProperty(req, 'transactionID'),\n })\n results.collections = {\n ...results.collections,\n [collection.slug]: collectionPolicy,\n }\n }),\n )\n\n await Promise.all(\n payload.config.globals.map(async (global) => {\n const globalOperations: AllOperations[] = ['read', 'update']\n\n if (global.versions) {\n globalOperations.push('readVersions')\n }\n\n const globalPolicy = await getEntityPolicies({\n type: 'global',\n entity: global,\n operations: globalOperations,\n // Do not re-use our existing req object, as we need a new req.transactionID. Cannot re-use our existing one, as this is run in parallel (Promise.all above) which is\n // not supported on the same transaction ID. Not passing a transaction ID here creates a new transaction ID.\n req: isolateObjectProperty(req, 'transactionID'),\n })\n results.globals = {\n ...results.globals,\n [global.slug]: globalPolicy,\n }\n }),\n )\n\n return results\n}\n"],"names":["getEntityPolicies","isolateObjectProperty","getAccessResults","req","results","payload","user","isLoggedIn","userCollectionConfig","collection","config","collections","find","slug","admin","canAccessAdmin","access","Promise","all","map","collectionOperations","auth","maxLoginAttempts","push","versions","collectionPolicy","type","entity","operations","globals","global","globalOperations","globalPolicy"],"mappings":"AAGA,SAASA,iBAAiB,QAAQ,oCAAmC;AACrE,OAAOC,2BAA2B,wCAAuC;AAKzE,OAAO,eAAeC,iBAAiB,EAAEC,GAAG,EAAwB;IAClE,MAAMC,UAAU,CAAC;IACjB,MAAM,EAAEC,OAAO,EAAEC,IAAI,EAAE,GAAGH;IAE1B,MAAMI,aAAa,CAAC,CAACD;IACrB,MAAME,uBACJF,QAAQA,KAAKG,UAAU,GACnBJ,QAAQK,MAAM,CAACC,WAAW,CAACC,IAAI,CAAC,CAACH,aAAeA,WAAWI,IAAI,KAAKP,KAAKG,UAAU,IACnF;IAEN,IAAID,wBAAwBH,QAAQK,MAAM,CAACI,KAAK,CAACR,IAAI,KAAKA,KAAKG,UAAU,EAAE;QACzEL,QAAQW,cAAc,GAAGP,qBAAqBQ,MAAM,CAACF,KAAK,GACtD,MAAMN,qBAAqBQ,MAAM,CAACF,KAAK,CAAC;YAAEX;QAAI,KAC9CI;IACN,OAAO;QACLH,QAAQW,cAAc,GAAG;IAC3B;IAEA,MAAME,QAAQC,GAAG,CACfb,QAAQK,MAAM,CAACC,WAAW,CAACQ,GAAG,CAAC,OAAOV;QACpC,MAAMW,uBAAwC;YAAC;YAAU;YAAQ;YAAU;SAAS;QAEpF,IACEX,WAAWY,IAAI,IACf,OAAOZ,WAAWY,IAAI,CAACC,gBAAgB,KAAK,eAC5Cb,WAAWY,IAAI,CAACC,gBAAgB,KAAK,GACrC;YACAF,qBAAqBG,IAAI,CAAC;QAC5B;QAEA,IAAId,WAAWe,QAAQ,EAAE;YACvBJ,qBAAqBG,IAAI,CAAC;QAC5B;QAEA,MAAME,mBAAmB,MAAMzB,kBAAkB;YAC/C0B,MAAM;YACNC,QAAQlB;YACRmB,YAAYR;YACZ,qKAAqK;YACrK,4GAA4G;YAC5GjB,KAAKF,sBAAsBE,KAAK;QAClC;QACAC,QAAQO,WAAW,GAAG;YACpB,GAAGP,QAAQO,WAAW;YACtB,CAACF,WAAWI,IAAI,CAAC,EAAEY;QACrB;IACF;IAGF,MAAMR,QAAQC,GAAG,CACfb,QAAQK,MAAM,CAACmB,OAAO,CAACV,GAAG,CAAC,OAAOW;QAChC,MAAMC,mBAAoC;YAAC;YAAQ;SAAS;QAE5D,IAAID,OAAON,QAAQ,EAAE;YACnBO,iBAAiBR,IAAI,CAAC;QACxB;QAEA,MAAMS,eAAe,MAAMhC,kBAAkB;YAC3C0B,MAAM;YACNC,QAAQG;YACRF,YAAYG;YACZ,qKAAqK;YACrK,4GAA4G;YAC5G5B,KAAKF,sBAAsBE,KAAK;QAClC;QACAC,QAAQyB,OAAO,GAAG;YAChB,GAAGzB,QAAQyB,OAAO;YAClB,CAACC,OAAOjB,IAAI,CAAC,EAAEmB;QACjB;IACF;IAGF,OAAO5B;AACT"}
1
+ {"version":3,"sources":["../../src/auth/getAccessResults.ts"],"sourcesContent":["import type { AllOperations, PayloadRequest } from '../types/index.js'\nimport type { Permissions } from './types.js'\n\nimport { getEntityPolicies } from '../utilities/getEntityPolicies.js'\n\ntype GetAccessResultsArgs = {\n req: PayloadRequest\n}\nexport async function getAccessResults({ req }: GetAccessResultsArgs): Promise<Permissions> {\n const results = {} as Permissions\n const { payload, user } = req\n\n const isLoggedIn = !!user\n const userCollectionConfig =\n user && user.collection\n ? payload.config.collections.find((collection) => collection.slug === user.collection)\n : null\n\n if (userCollectionConfig && payload.config.admin.user === user.collection) {\n results.canAccessAdmin = userCollectionConfig.access.admin\n ? await userCollectionConfig.access.admin({ req })\n : isLoggedIn\n } else {\n results.canAccessAdmin = false\n }\n\n await Promise.all(\n payload.config.collections.map(async (collection) => {\n const collectionOperations: AllOperations[] = ['create', 'read', 'update', 'delete']\n\n if (\n collection.auth &&\n typeof collection.auth.maxLoginAttempts !== 'undefined' &&\n collection.auth.maxLoginAttempts !== 0\n ) {\n collectionOperations.push('unlock')\n }\n\n if (collection.versions) {\n collectionOperations.push('readVersions')\n }\n\n const collectionPolicy = await getEntityPolicies({\n type: 'collection',\n entity: collection,\n operations: collectionOperations,\n req,\n })\n results.collections = {\n ...results.collections,\n [collection.slug]: collectionPolicy,\n }\n }),\n )\n\n await Promise.all(\n payload.config.globals.map(async (global) => {\n const globalOperations: AllOperations[] = ['read', 'update']\n\n if (global.versions) {\n globalOperations.push('readVersions')\n }\n\n const globalPolicy = await getEntityPolicies({\n type: 'global',\n entity: global,\n operations: globalOperations,\n req,\n })\n results.globals = {\n ...results.globals,\n [global.slug]: globalPolicy,\n }\n }),\n )\n\n return results\n}\n"],"names":["getEntityPolicies","getAccessResults","req","results","payload","user","isLoggedIn","userCollectionConfig","collection","config","collections","find","slug","admin","canAccessAdmin","access","Promise","all","map","collectionOperations","auth","maxLoginAttempts","push","versions","collectionPolicy","type","entity","operations","globals","global","globalOperations","globalPolicy"],"mappings":"AAGA,SAASA,iBAAiB,QAAQ,oCAAmC;AAKrE,OAAO,eAAeC,iBAAiB,EAAEC,GAAG,EAAwB;IAClE,MAAMC,UAAU,CAAC;IACjB,MAAM,EAAEC,OAAO,EAAEC,IAAI,EAAE,GAAGH;IAE1B,MAAMI,aAAa,CAAC,CAACD;IACrB,MAAME,uBACJF,QAAQA,KAAKG,UAAU,GACnBJ,QAAQK,MAAM,CAACC,WAAW,CAACC,IAAI,CAAC,CAACH,aAAeA,WAAWI,IAAI,KAAKP,KAAKG,UAAU,IACnF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1 +1 @@
1
- {"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../../src/auth/operations/access.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAQ9C,KAAK,SAAS,GAAG;IACf,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,eAAe,SAAgB,SAAS,KAAG,OAAO,CAAC,WAAW,CAc1E,CAAA"}
1
+ {"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../../src/auth/operations/access.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAM9C,KAAK,SAAS,GAAG;IACf,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,eAAe,SAAgB,SAAS,KAAG,OAAO,CAAC,WAAW,CAW1E,CAAA"}
@@ -1,5 +1,3 @@
1
- import { commitTransaction } from '../../utilities/commitTransaction.js';
2
- import { initTransaction } from '../../utilities/initTransaction.js';
3
1
  import { killTransaction } from '../../utilities/killTransaction.js';
4
2
  import { adminInit as adminInitTelemetry } from '../../utilities/telemetry/events/adminInit.js';
5
3
  import { getAccessResults } from '../getAccessResults.js';
@@ -7,12 +5,9 @@ export const accessOperation = async (args)=>{
7
5
  const { req } = args;
8
6
  adminInitTelemetry(req);
9
7
  try {
10
- const shouldCommit = await initTransaction(req);
11
- const results = getAccessResults({
8
+ return getAccessResults({
12
9
  req
13
10
  });
14
- if (shouldCommit) await commitTransaction(req);
15
- return results;
16
11
  } catch (e) {
17
12
  await killTransaction(req);
18
13
  throw e;