@10x-media/form-builder 0.1.0-beta.2 → 0.1.0-beta.21

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 (619) hide show
  1. package/CHANGELOG.md +360 -0
  2. package/README.md +7 -5
  3. package/dist/actions/assertNoBlockCollision.js +18 -0
  4. package/dist/actions/assertNoBlockCollision.js.map +1 -0
  5. package/dist/actions/body/converters.d.ts +20 -0
  6. package/dist/actions/body/converters.js +57 -0
  7. package/dist/actions/body/converters.js.map +1 -0
  8. package/dist/actions/body/escapeHtml.d.ts +6 -0
  9. package/dist/actions/body/escapeHtml.js +14 -0
  10. package/dist/actions/body/escapeHtml.js.map +1 -0
  11. package/dist/actions/body/serializeBody.d.ts +55 -0
  12. package/dist/actions/body/serializeBody.js +78 -0
  13. package/dist/actions/body/serializeBody.js.map +1 -0
  14. package/dist/actions/body/serializeSlate.js +31 -0
  15. package/dist/actions/body/serializeSlate.js.map +1 -0
  16. package/dist/actions/body/textOfBody.d.ts +13 -0
  17. package/dist/actions/body/textOfBody.js +35 -0
  18. package/dist/actions/body/textOfBody.js.map +1 -0
  19. package/dist/actions/body/wildcards.d.ts +10 -0
  20. package/dist/actions/body/wildcards.js +33 -0
  21. package/dist/actions/body/wildcards.js.map +1 -0
  22. package/dist/actions/buildActionBlocks.js +12 -9
  23. package/dist/actions/buildActionBlocks.js.map +1 -1
  24. package/dist/actions/builtin/confirmation.js +47 -43
  25. package/dist/actions/builtin/confirmation.js.map +1 -1
  26. package/dist/actions/builtin/emailAction.d.ts +20 -0
  27. package/dist/actions/builtin/emailAction.js +120 -0
  28. package/dist/actions/builtin/emailAction.js.map +1 -0
  29. package/dist/actions/builtin/emailTeam.js +20 -38
  30. package/dist/actions/builtin/emailTeam.js.map +1 -1
  31. package/dist/actions/builtin/index.d.ts +16 -1
  32. package/dist/actions/builtin/index.js +21 -7
  33. package/dist/actions/builtin/index.js.map +1 -1
  34. package/dist/actions/builtin/signedWebhook.js +6 -2
  35. package/dist/actions/builtin/signedWebhook.js.map +1 -1
  36. package/dist/actions/defineAction.d.ts +17 -5
  37. package/dist/actions/defineAction.js.map +1 -1
  38. package/dist/actions/dispatch.js +51 -6
  39. package/dist/actions/dispatch.js.map +1 -1
  40. package/dist/actions/dispatchContext.js +13 -0
  41. package/dist/actions/dispatchContext.js.map +1 -0
  42. package/dist/actions/emailRecipients.d.ts +12 -0
  43. package/dist/actions/emailRecipients.js +146 -0
  44. package/dist/actions/emailRecipients.js.map +1 -0
  45. package/dist/actions/fromAddresses.d.ts +37 -0
  46. package/dist/actions/fromAddresses.js +131 -0
  47. package/dist/actions/fromAddresses.js.map +1 -0
  48. package/dist/actions/recipientSources.d.ts +34 -0
  49. package/dist/actions/recipientSources.js +11 -0
  50. package/dist/actions/recipientSources.js.map +1 -0
  51. package/dist/actions/registry.d.ts +2 -1
  52. package/dist/actions/registry.js +5 -7
  53. package/dist/actions/registry.js.map +1 -1
  54. package/dist/actions/runActions.js +10 -1
  55. package/dist/actions/runActions.js.map +1 -1
  56. package/dist/actions/task.js +47 -16
  57. package/dist/actions/task.js.map +1 -1
  58. package/dist/aggregation/aggregateResponses.d.ts +9 -0
  59. package/dist/aggregation/aggregateResponses.js +8 -14
  60. package/dist/aggregation/aggregateResponses.js.map +1 -1
  61. package/dist/aggregation/resolveResultsRequest.d.ts +41 -6
  62. package/dist/aggregation/resolveResultsRequest.js +97 -11
  63. package/dist/aggregation/resolveResultsRequest.js.map +1 -1
  64. package/dist/calc/computeCalcFields.d.ts +5 -3
  65. package/dist/calc/computeCalcFields.js +6 -4
  66. package/dist/calc/computeCalcFields.js.map +1 -1
  67. package/dist/calc/evaluate.d.ts +26 -3
  68. package/dist/calc/evaluate.js +34 -13
  69. package/dist/calc/evaluate.js.map +1 -1
  70. package/dist/calc/formatCalc.d.ts +11 -0
  71. package/dist/calc/formatCalc.js +35 -0
  72. package/dist/calc/formatCalc.js.map +1 -0
  73. package/dist/calc/formatCalcValue.d.ts +17 -0
  74. package/dist/calc/formatCalcValue.js +17 -0
  75. package/dist/calc/formatCalcValue.js.map +1 -0
  76. package/dist/calc/normalizeCalc.d.ts +17 -3
  77. package/dist/calc/normalizeCalc.js +42 -33
  78. package/dist/calc/normalizeCalc.js.map +1 -1
  79. package/dist/calc/registry.d.ts +43 -0
  80. package/dist/calc/registry.js +27 -0
  81. package/dist/calc/registry.js.map +1 -0
  82. package/dist/calc/resolveCalcContext.d.ts +36 -0
  83. package/dist/calc/resolveCalcContext.js +87 -0
  84. package/dist/calc/resolveCalcContext.js.map +1 -0
  85. package/dist/calc/types.d.ts +25 -4
  86. package/dist/calc/types.js +23 -0
  87. package/dist/calc/types.js.map +1 -0
  88. package/dist/client/ByteSizeField.d.ts +29 -0
  89. package/dist/client/ByteSizeField.js +58 -0
  90. package/dist/client/ByteSizeField.js.map +1 -0
  91. package/dist/client/CalcExpressionBuilder.d.ts +20 -0
  92. package/dist/client/CalcExpressionBuilder.js +890 -0
  93. package/dist/client/CalcExpressionBuilder.js.map +1 -0
  94. package/dist/client/ClosePollButton.d.ts +15 -0
  95. package/dist/client/ClosePollButton.js +80 -0
  96. package/dist/client/ClosePollButton.js.map +1 -0
  97. package/dist/client/CondensedArray.d.ts +15 -0
  98. package/dist/client/CondensedArray.js +97 -0
  99. package/dist/client/CondensedArray.js.map +1 -0
  100. package/dist/client/ConditionBuilder.js +2 -1
  101. package/dist/client/ConditionBuilder.js.map +1 -1
  102. package/dist/client/ConsentBlockLabel.d.ts +15 -0
  103. package/dist/client/ConsentBlockLabel.js +71 -0
  104. package/dist/client/ConsentBlockLabel.js.map +1 -0
  105. package/dist/client/ConsentSourceRowLabel.d.ts +9 -0
  106. package/dist/client/ConsentSourceRowLabel.js +21 -0
  107. package/dist/client/ConsentSourceRowLabel.js.map +1 -0
  108. package/dist/client/EndpointOptionsSelect.d.ts +55 -0
  109. package/dist/client/EndpointOptionsSelect.js +112 -0
  110. package/dist/client/EndpointOptionsSelect.js.map +1 -0
  111. package/dist/client/FieldBlockLabel.d.ts +18 -0
  112. package/dist/client/FieldBlockLabel.js +34 -0
  113. package/dist/client/FieldBlockLabel.js.map +1 -0
  114. package/dist/client/FieldNameSelect.d.ts +37 -0
  115. package/dist/client/FieldNameSelect.js +72 -0
  116. package/dist/client/FieldNameSelect.js.map +1 -0
  117. package/dist/client/FlowBuilder.d.ts +2 -2
  118. package/dist/client/FlowBuilder.js +137 -88
  119. package/dist/client/FlowBuilder.js.map +1 -1
  120. package/dist/client/FormConditionField.js +1 -4
  121. package/dist/client/FormConditionField.js.map +1 -1
  122. package/dist/client/RecipientsSelect.d.ts +37 -0
  123. package/dist/client/RecipientsSelect.js +197 -0
  124. package/dist/client/RecipientsSelect.js.map +1 -0
  125. package/dist/client/RuleDescription.d.ts +21 -0
  126. package/dist/client/RuleDescription.js +19 -0
  127. package/dist/client/RuleDescription.js.map +1 -0
  128. package/dist/client/admin.css +557 -0
  129. package/dist/client/endpointOptions.d.ts +11 -0
  130. package/dist/client/endpointOptions.js +38 -0
  131. package/dist/client/endpointOptions.js.map +1 -0
  132. package/dist/client/flowAuthoring.js +142 -0
  133. package/dist/client/flowAuthoring.js.map +1 -0
  134. package/dist/client/synthesizeClientField.js +21 -10
  135. package/dist/client/synthesizeClientField.js.map +1 -1
  136. package/dist/client/toStaticLabel.js +13 -0
  137. package/dist/client/toStaticLabel.js.map +1 -0
  138. package/dist/collections/buttonFields.d.ts +34 -0
  139. package/dist/collections/buttonFields.js +35 -0
  140. package/dist/collections/buttonFields.js.map +1 -0
  141. package/dist/collections/cells/FieldCountCell.d.ts +15 -0
  142. package/dist/collections/cells/FieldCountCell.js +18 -0
  143. package/dist/collections/cells/FieldCountCell.js.map +1 -0
  144. package/dist/collections/cells/FlowStepsCell.d.ts +14 -0
  145. package/dist/collections/cells/FlowStepsCell.js +17 -0
  146. package/dist/collections/cells/FlowStepsCell.js.map +1 -0
  147. package/dist/collections/formSubmissions.js +114 -28
  148. package/dist/collections/formSubmissions.js.map +1 -1
  149. package/dist/collections/forms.js +449 -112
  150. package/dist/collections/forms.js.map +1 -1
  151. package/dist/collections/formsEndpoints.js +106 -0
  152. package/dist/collections/formsEndpoints.js.map +1 -0
  153. package/dist/collections/redirectFields.d.ts +29 -0
  154. package/dist/collections/settingsFields.d.ts +31 -0
  155. package/dist/collections/settingsFields.js +45 -0
  156. package/dist/collections/settingsFields.js.map +1 -0
  157. package/dist/conditions/conditionType.js +9 -2
  158. package/dist/conditions/conditionType.js.map +1 -1
  159. package/dist/conditions/evaluate.js +1 -1
  160. package/dist/conditions/evaluate.js.map +1 -1
  161. package/dist/conditions/fieldTypes.d.ts +3 -1
  162. package/dist/conditions/fieldTypes.js +4 -1
  163. package/dist/conditions/fieldTypes.js.map +1 -1
  164. package/dist/conditions/normalizeConditions.js +20 -6
  165. package/dist/conditions/normalizeConditions.js.map +1 -1
  166. package/dist/consent/applyConsentStatements.d.ts +14 -0
  167. package/dist/consent/applyConsentStatements.js +17 -0
  168. package/dist/consent/applyConsentStatements.js.map +1 -0
  169. package/dist/consent/captureConsent.d.ts +39 -11
  170. package/dist/consent/captureConsent.js +63 -13
  171. package/dist/consent/captureConsent.js.map +1 -1
  172. package/dist/consent/consentSourcesField.d.ts +66 -0
  173. package/dist/consent/consentSourcesField.js +98 -0
  174. package/dist/consent/consentSourcesField.js.map +1 -0
  175. package/dist/consent/effectiveStatement.js +16 -0
  176. package/dist/consent/effectiveStatement.js.map +1 -0
  177. package/dist/consent/resolveConsentEntries.d.ts +24 -0
  178. package/dist/consent/resolveConsentEntries.js +40 -0
  179. package/dist/consent/resolveConsentEntries.js.map +1 -0
  180. package/dist/consent/resolveConsentSourcesRequest.d.ts +37 -0
  181. package/dist/consent/resolveConsentSourcesRequest.js +54 -0
  182. package/dist/consent/resolveConsentSourcesRequest.js.map +1 -0
  183. package/dist/consent/resolveConsentStatements.d.ts +45 -0
  184. package/dist/consent/resolveConsentStatements.js +46 -0
  185. package/dist/consent/resolveConsentStatements.js.map +1 -0
  186. package/dist/consent/resolvePublishedVersionRef.d.ts +17 -11
  187. package/dist/consent/resolvePublishedVersionRef.js +13 -10
  188. package/dist/consent/resolvePublishedVersionRef.js.map +1 -1
  189. package/dist/consent/types.d.ts +69 -0
  190. package/dist/context/formContext.d.ts +30 -0
  191. package/dist/context/formContext.js +54 -0
  192. package/dist/context/formContext.js.map +1 -0
  193. package/dist/email/departments.d.ts +59 -0
  194. package/dist/email/departments.js +87 -0
  195. package/dist/email/departments.js.map +1 -0
  196. package/dist/email/departmentsField.d.ts +53 -0
  197. package/dist/email/departmentsField.js +73 -0
  198. package/dist/email/departmentsField.js.map +1 -0
  199. package/dist/exports/client.d.ts +14 -1
  200. package/dist/exports/client.js +14 -1
  201. package/dist/exports/i18n.d.ts +5 -2
  202. package/dist/exports/i18n.js +5 -2
  203. package/dist/exports/react.d.ts +34 -10
  204. package/dist/exports/react.js +24 -4
  205. package/dist/exports/rsc.d.ts +10 -1
  206. package/dist/exports/rsc.js +10 -1
  207. package/dist/exports/types.d.ts +20 -12
  208. package/dist/fields/buildFieldBlocks.js +46 -25
  209. package/dist/fields/buildFieldBlocks.js.map +1 -1
  210. package/dist/fields/builtin/calculation.d.ts +17 -0
  211. package/dist/fields/builtin/calculation.js +193 -18
  212. package/dist/fields/builtin/calculation.js.map +1 -1
  213. package/dist/fields/builtin/checkbox.js +23 -0
  214. package/dist/fields/builtin/checkbox.js.map +1 -1
  215. package/dist/fields/builtin/consent.js +49 -14
  216. package/dist/fields/builtin/consent.js.map +1 -1
  217. package/dist/fields/builtin/country.d.ts +13 -0
  218. package/dist/fields/builtin/country.js +30 -0
  219. package/dist/fields/builtin/country.js.map +1 -0
  220. package/dist/fields/builtin/date.js +31 -0
  221. package/dist/fields/builtin/date.js.map +1 -0
  222. package/dist/fields/builtin/email.js +8 -1
  223. package/dist/fields/builtin/email.js.map +1 -1
  224. package/dist/fields/builtin/file.d.ts +15 -0
  225. package/dist/fields/builtin/file.js +95 -8
  226. package/dist/fields/builtin/file.js.map +1 -1
  227. package/dist/fields/builtin/index.d.ts +30 -0
  228. package/dist/fields/builtin/index.js +37 -10
  229. package/dist/fields/builtin/index.js.map +1 -1
  230. package/dist/fields/builtin/message.js +30 -0
  231. package/dist/fields/builtin/message.js.map +1 -0
  232. package/dist/fields/builtin/repeater.js +8 -3
  233. package/dist/fields/builtin/repeater.js.map +1 -1
  234. package/dist/fields/builtin/select.js +28 -4
  235. package/dist/fields/builtin/select.js.map +1 -1
  236. package/dist/fields/builtin/state.d.ts +13 -0
  237. package/dist/fields/builtin/state.js +30 -0
  238. package/dist/fields/builtin/state.js.map +1 -0
  239. package/dist/fields/builtin/text.js +7 -0
  240. package/dist/fields/builtin/text.js.map +1 -1
  241. package/dist/fields/data/regions.d.ts +21 -0
  242. package/dist/fields/data/regions.js +1238 -0
  243. package/dist/fields/data/regions.js.map +1 -0
  244. package/dist/fields/fieldKey.d.ts +15 -0
  245. package/dist/fields/fieldKey.js +16 -0
  246. package/dist/fields/fieldKey.js.map +1 -0
  247. package/dist/fields/fieldNamesOfType.js +30 -0
  248. package/dist/fields/fieldNamesOfType.js.map +1 -0
  249. package/dist/fields/instanceOptions.js +20 -0
  250. package/dist/fields/instanceOptions.js.map +1 -0
  251. package/dist/fields/localizedIf.d.ts +13 -0
  252. package/dist/fields/localizedIf.js +12 -0
  253. package/dist/fields/localizedIf.js.map +1 -0
  254. package/dist/fields/registry.d.ts +3 -1
  255. package/dist/fields/registry.js +23 -8
  256. package/dist/fields/registry.js.map +1 -1
  257. package/dist/fields/sharedConfig.js +125 -59
  258. package/dist/fields/sharedConfig.js.map +1 -1
  259. package/dist/fields/types.d.ts +78 -9
  260. package/dist/flow/engine.d.ts +6 -4
  261. package/dist/flow/engine.js +11 -6
  262. package/dist/flow/engine.js.map +1 -1
  263. package/dist/flow/normalizeFlow.js +28 -9
  264. package/dist/flow/normalizeFlow.js.map +1 -1
  265. package/dist/flow/stepLabel.js +15 -0
  266. package/dist/flow/stepLabel.js.map +1 -0
  267. package/dist/flow/types.d.ts +12 -3
  268. package/dist/flow/types.js +11 -0
  269. package/dist/flow/types.js.map +1 -0
  270. package/dist/form/pollState.d.ts +23 -0
  271. package/dist/form/pollState.js +17 -0
  272. package/dist/form/pollState.js.map +1 -0
  273. package/dist/form/toFormDocument.d.ts +110 -0
  274. package/dist/form/toFormDocument.js +89 -0
  275. package/dist/form/toFormDocument.js.map +1 -0
  276. package/dist/form/types.d.ts +73 -0
  277. package/dist/index.d.ts +67 -61
  278. package/dist/index.js +120 -25
  279. package/dist/index.js.map +1 -1
  280. package/dist/options.d.ts +281 -0
  281. package/dist/plugin/applyRegistryConfig.d.ts +11 -0
  282. package/dist/plugin/applyRegistryConfig.js +20 -0
  283. package/dist/plugin/applyRegistryConfig.js.map +1 -0
  284. package/dist/plugin/customState.js +26 -0
  285. package/dist/plugin/customState.js.map +1 -0
  286. package/dist/plugin/registerCollections.js +43 -40
  287. package/dist/plugin/registerCollections.js.map +1 -1
  288. package/dist/plugin/uploadsCollection.d.ts +16 -0
  289. package/dist/plugin/uploadsCollection.js +53 -0
  290. package/dist/plugin/uploadsCollection.js.map +1 -0
  291. package/dist/poll/applyPollOptions.js +18 -0
  292. package/dist/poll/applyPollOptions.js.map +1 -0
  293. package/dist/poll/buildPollOptionSourceFields.js +50 -0
  294. package/dist/poll/buildPollOptionSourceFields.js.map +1 -0
  295. package/dist/poll/closeJob.d.ts +53 -0
  296. package/dist/poll/closeJob.js +121 -0
  297. package/dist/poll/closeJob.js.map +1 -0
  298. package/dist/poll/definePollOptionSource.d.ts +44 -0
  299. package/dist/poll/definePollOptionSource.js +6 -0
  300. package/dist/poll/definePollOptionSource.js.map +1 -0
  301. package/dist/poll/definePollType.d.ts +34 -0
  302. package/dist/poll/definePollType.js +6 -0
  303. package/dist/poll/definePollType.js.map +1 -0
  304. package/dist/poll/effectivePollOptions.d.ts +38 -0
  305. package/dist/poll/effectivePollOptions.js +64 -0
  306. package/dist/poll/effectivePollOptions.js.map +1 -0
  307. package/dist/poll/mostVoted.d.ts +21 -0
  308. package/dist/poll/mostVoted.js +32 -0
  309. package/dist/poll/mostVoted.js.map +1 -0
  310. package/dist/poll/outcomeBeforeChange.js +91 -0
  311. package/dist/poll/outcomeBeforeChange.js.map +1 -0
  312. package/dist/poll/outcomeFields.d.ts +38 -0
  313. package/dist/poll/outcomeFields.js +52 -0
  314. package/dist/poll/outcomeFields.js.map +1 -0
  315. package/dist/poll/pollTypeRegistry.d.ts +34 -0
  316. package/dist/poll/pollTypeRegistry.js +69 -0
  317. package/dist/poll/pollTypeRegistry.js.map +1 -0
  318. package/dist/poll/registry.d.ts +17 -0
  319. package/dist/poll/registry.js +12 -0
  320. package/dist/poll/registry.js.map +1 -0
  321. package/dist/poll/resolvePollCloseRequest.js +106 -0
  322. package/dist/poll/resolvePollCloseRequest.js.map +1 -0
  323. package/dist/poll/resolvePollOptions.d.ts +29 -0
  324. package/dist/poll/resolvePollOptions.js +52 -0
  325. package/dist/poll/resolvePollOptions.js.map +1 -0
  326. package/dist/poll/resolvePollOptionsRequest.js +50 -0
  327. package/dist/poll/resolvePollOptionsRequest.js.map +1 -0
  328. package/dist/poll/resolvePollOutcome.d.ts +40 -0
  329. package/dist/poll/resolvePollOutcome.js +90 -0
  330. package/dist/poll/resolvePollOutcome.js.map +1 -0
  331. package/dist/poll/resultsField.js +21 -0
  332. package/dist/poll/resultsField.js.map +1 -0
  333. package/dist/poll/votes/aggregateFromVotes.d.ts +27 -0
  334. package/dist/poll/votes/aggregateFromVotes.js +54 -0
  335. package/dist/poll/votes/aggregateFromVotes.js.map +1 -0
  336. package/dist/poll/votes/answerValues.js +16 -0
  337. package/dist/poll/votes/answerValues.js.map +1 -0
  338. package/dist/poll/votes/bumpPollVote.js +88 -0
  339. package/dist/poll/votes/bumpPollVote.js.map +1 -0
  340. package/dist/poll/votes/recountPollVotes.d.ts +20 -0
  341. package/dist/poll/votes/recountPollVotes.js +63 -0
  342. package/dist/poll/votes/recountPollVotes.js.map +1 -0
  343. package/dist/poll/votes/voteTallyHook.js +76 -0
  344. package/dist/poll/votes/voteTallyHook.js.map +1 -0
  345. package/dist/poll/votes/votesCollection.d.ts +19 -0
  346. package/dist/poll/votes/votesCollection.js +89 -0
  347. package/dist/poll/votes/votesCollection.js.map +1 -0
  348. package/dist/prefill/valuesFromSearchParams.js +5 -9
  349. package/dist/prefill/valuesFromSearchParams.js.map +1 -1
  350. package/dist/presentations/types.d.ts +3 -2
  351. package/dist/react/Form.d.ts +77 -35
  352. package/dist/react/Form.js +368 -222
  353. package/dist/react/Form.js.map +1 -1
  354. package/dist/react/FormContext.d.ts +51 -1
  355. package/dist/react/FormContext.js.map +1 -1
  356. package/dist/react/FormControls.d.ts +55 -0
  357. package/dist/react/FormControls.js +56 -0
  358. package/dist/react/FormControls.js.map +1 -0
  359. package/dist/react/FormFields.d.ts +18 -0
  360. package/dist/react/FormFields.js +114 -0
  361. package/dist/react/FormFields.js.map +1 -0
  362. package/dist/react/FormLayout.d.ts +4 -2
  363. package/dist/react/FormLayout.js +3 -2
  364. package/dist/react/FormLayout.js.map +1 -1
  365. package/dist/react/FormResults.d.ts +8 -3
  366. package/dist/react/FormResults.js +50 -29
  367. package/dist/react/FormResults.js.map +1 -1
  368. package/dist/react/FormSteps.d.ts +17 -0
  369. package/dist/react/FormSteps.js +35 -0
  370. package/dist/react/FormSteps.js.map +1 -0
  371. package/dist/react/Poll.d.ts +40 -6
  372. package/dist/react/Poll.js +137 -33
  373. package/dist/react/Poll.js.map +1 -1
  374. package/dist/react/adapters.d.ts +35 -0
  375. package/dist/react/adapters.js +11 -0
  376. package/dist/react/adapters.js.map +1 -0
  377. package/dist/react/captcha/HcaptchaCaptcha.d.ts +31 -0
  378. package/dist/react/captcha/HcaptchaCaptcha.js +53 -0
  379. package/dist/react/captcha/HcaptchaCaptcha.js.map +1 -0
  380. package/dist/react/captcha/RecaptchaCaptcha.d.ts +44 -0
  381. package/dist/react/captcha/RecaptchaCaptcha.js +93 -0
  382. package/dist/react/captcha/RecaptchaCaptcha.js.map +1 -0
  383. package/dist/react/captcha/TurnstileCaptcha.d.ts +31 -0
  384. package/dist/react/captcha/TurnstileCaptcha.js +53 -0
  385. package/dist/react/captcha/TurnstileCaptcha.js.map +1 -0
  386. package/dist/react/captcha/types.d.ts +8 -0
  387. package/dist/react/captcha/useCaptchaScript.js +63 -0
  388. package/dist/react/captcha/useCaptchaScript.js.map +1 -0
  389. package/dist/react/captcha/vendors.js +8 -0
  390. package/dist/react/captcha/vendors.js.map +1 -0
  391. package/dist/react/contract.d.ts +2 -3
  392. package/dist/react/contract.js.map +1 -1
  393. package/dist/react/fetchResults.d.ts +1 -1
  394. package/dist/react/fetchResults.js +1 -1
  395. package/dist/react/fetchResults.js.map +1 -1
  396. package/dist/react/presentation/DialogSurface.js +1 -4
  397. package/dist/react/presentation/DialogSurface.js.map +1 -1
  398. package/dist/react/primitives/Checkbox.d.ts +6 -2
  399. package/dist/react/primitives/Checkbox.js +4 -2
  400. package/dist/react/primitives/Checkbox.js.map +1 -1
  401. package/dist/react/primitives/ChoiceGroup.d.ts +40 -0
  402. package/dist/react/primitives/ChoiceGroup.js +33 -0
  403. package/dist/react/primitives/ChoiceGroup.js.map +1 -0
  404. package/dist/react/primitives/FieldShell.d.ts +13 -5
  405. package/dist/react/primitives/FieldShell.js +35 -32
  406. package/dist/react/primitives/FieldShell.js.map +1 -1
  407. package/dist/react/primitives/Input.d.ts +4 -2
  408. package/dist/react/primitives/Input.js +2 -1
  409. package/dist/react/primitives/Input.js.map +1 -1
  410. package/dist/react/renderers/calculation.js +7 -5
  411. package/dist/react/renderers/calculation.js.map +1 -1
  412. package/dist/react/renderers/checkbox.js +3 -5
  413. package/dist/react/renderers/checkbox.js.map +1 -1
  414. package/dist/react/renderers/consent.js +84 -36
  415. package/dist/react/renderers/consent.js.map +1 -1
  416. package/dist/react/renderers/date.js +33 -0
  417. package/dist/react/renderers/date.js.map +1 -0
  418. package/dist/react/renderers/email.js +4 -5
  419. package/dist/react/renderers/email.js.map +1 -1
  420. package/dist/react/renderers/file.js +29 -14
  421. package/dist/react/renderers/file.js.map +1 -1
  422. package/dist/react/renderers/index.js +7 -0
  423. package/dist/react/renderers/index.js.map +1 -1
  424. package/dist/react/renderers/message.js +41 -0
  425. package/dist/react/renderers/message.js.map +1 -0
  426. package/dist/react/renderers/number.js +1 -4
  427. package/dist/react/renderers/number.js.map +1 -1
  428. package/dist/react/renderers/region.js +43 -0
  429. package/dist/react/renderers/region.js.map +1 -0
  430. package/dist/react/renderers/repeater.js +32 -14
  431. package/dist/react/renderers/repeater.js.map +1 -1
  432. package/dist/react/renderers/select.js +21 -6
  433. package/dist/react/renderers/select.js.map +1 -1
  434. package/dist/react/renderers/text.js +4 -5
  435. package/dist/react/renderers/text.js.map +1 -1
  436. package/dist/react/renderers/textarea.js +1 -4
  437. package/dist/react/renderers/textarea.js.map +1 -1
  438. package/dist/react/state.d.ts +46 -3
  439. package/dist/react/state.js +73 -10
  440. package/dist/react/state.js.map +1 -1
  441. package/dist/react/submitForm.js +1 -1
  442. package/dist/react/submitForm.js.map +1 -1
  443. package/dist/react/uploadFile.d.ts +2 -2
  444. package/dist/react/uploadFile.js +1 -1
  445. package/dist/react/uploadFile.js.map +1 -1
  446. package/dist/react/useCalcValues.d.ts +10 -0
  447. package/dist/react/useCalcValues.js +13 -0
  448. package/dist/react/useCalcValues.js.map +1 -0
  449. package/dist/react/useField.d.ts +0 -1
  450. package/dist/react/useField.js +7 -6
  451. package/dist/react/useField.js.map +1 -1
  452. package/dist/react/useFormState.d.ts +1 -1
  453. package/dist/react/useFormState.js +1 -1
  454. package/dist/react/useFormState.js.map +1 -1
  455. package/dist/react/validateField.js +3 -6
  456. package/dist/react/validateField.js.map +1 -1
  457. package/dist/recall/interpolate.d.ts +4 -3
  458. package/dist/recall/interpolate.js +5 -4
  459. package/dist/recall/interpolate.js.map +1 -1
  460. package/dist/recall/resolver.d.ts +1 -1
  461. package/dist/recall/resolver.js +15 -3
  462. package/dist/recall/resolver.js.map +1 -1
  463. package/dist/spam/captcha.d.ts +4 -3
  464. package/dist/spam/captcha.js +4 -3
  465. package/dist/spam/captcha.js.map +1 -1
  466. package/dist/spam/clientIp.js +9 -0
  467. package/dist/spam/clientIp.js.map +1 -0
  468. package/dist/spam/constants.js +13 -1
  469. package/dist/spam/constants.js.map +1 -1
  470. package/dist/spam/identify.js +3 -6
  471. package/dist/spam/identify.js.map +1 -1
  472. package/dist/spam/providers/hcaptcha.d.ts +17 -0
  473. package/dist/spam/providers/hcaptcha.js +18 -0
  474. package/dist/spam/providers/hcaptcha.js.map +1 -0
  475. package/dist/spam/providers/recaptcha.d.ts +23 -0
  476. package/dist/spam/providers/recaptcha.js +23 -0
  477. package/dist/spam/providers/recaptcha.js.map +1 -0
  478. package/dist/spam/providers/siteverify.js +34 -0
  479. package/dist/spam/providers/siteverify.js.map +1 -0
  480. package/dist/spam/providers/turnstile.d.ts +17 -0
  481. package/dist/spam/providers/turnstile.js +18 -0
  482. package/dist/spam/providers/turnstile.js.map +1 -0
  483. package/dist/spam/resolveSpam.js +2 -1
  484. package/dist/spam/resolveSpam.js.map +1 -1
  485. package/dist/spam/spamGuard.js +25 -11
  486. package/dist/spam/spamGuard.js.map +1 -1
  487. package/dist/spam/types.d.ts +19 -4
  488. package/dist/submissions/SubmissionAnswers.js +6 -2
  489. package/dist/submissions/SubmissionAnswers.js.map +1 -1
  490. package/dist/submissions/SubmissionAnswersClient.js +100 -64
  491. package/dist/submissions/SubmissionAnswersClient.js.map +1 -1
  492. package/dist/submissions/coerceBoolean.js +14 -0
  493. package/dist/submissions/coerceBoolean.js.map +1 -0
  494. package/dist/submissions/createSubmission.d.ts +36 -0
  495. package/dist/submissions/createSubmission.js +26 -0
  496. package/dist/submissions/createSubmission.js.map +1 -0
  497. package/dist/submissions/formIdOf.js +13 -0
  498. package/dist/submissions/formIdOf.js.map +1 -0
  499. package/dist/submissions/resolveVotedSubmission.d.ts +27 -0
  500. package/dist/submissions/resolveVotedSubmission.js +51 -0
  501. package/dist/submissions/resolveVotedSubmission.js.map +1 -0
  502. package/dist/submissions/runSubmission.d.ts +10 -0
  503. package/dist/submissions/runSubmission.js +104 -54
  504. package/dist/submissions/runSubmission.js.map +1 -1
  505. package/dist/submissions/types.d.ts +11 -4
  506. package/dist/submissions/validateSubmission.js +99 -13
  507. package/dist/submissions/validateSubmission.js.map +1 -1
  508. package/dist/submissions/verifyContext.js +35 -0
  509. package/dist/submissions/verifyContext.js.map +1 -0
  510. package/dist/submissions/voteChangeEndpoint.js +105 -0
  511. package/dist/submissions/voteChangeEndpoint.js.map +1 -0
  512. package/dist/submissions/votedCookie.d.ts +15 -0
  513. package/dist/submissions/votedCookie.js +74 -0
  514. package/dist/submissions/votedCookie.js.map +1 -0
  515. package/dist/translations/clientRuntimeKeys.d.ts +17 -0
  516. package/dist/translations/clientRuntimeKeys.js +48 -0
  517. package/dist/translations/clientRuntimeKeys.js.map +1 -0
  518. package/dist/translations/de.d.ts +12 -0
  519. package/dist/translations/de.js +380 -0
  520. package/dist/translations/de.js.map +1 -0
  521. package/dist/translations/en.js +250 -28
  522. package/dist/translations/en.js.map +1 -1
  523. package/dist/translations/index.d.ts +14 -5
  524. package/dist/translations/index.js +14 -3
  525. package/dist/translations/index.js.map +1 -1
  526. package/dist/translations/keys.d.ts +245 -23
  527. package/dist/translations/keys.js +246 -24
  528. package/dist/translations/keys.js.map +1 -1
  529. package/dist/translations/makeTranslate.d.ts +7 -3
  530. package/dist/translations/makeTranslate.js +12 -3
  531. package/dist/translations/makeTranslate.js.map +1 -1
  532. package/dist/translations/server.js +8 -1
  533. package/dist/translations/server.js.map +1 -1
  534. package/dist/uploads/captureFileRef.d.ts +10 -3
  535. package/dist/uploads/captureFileRef.js +18 -9
  536. package/dist/uploads/captureFileRef.js.map +1 -1
  537. package/dist/uploads/formatBytes.d.ts +9 -0
  538. package/dist/uploads/formatBytes.js +25 -0
  539. package/dist/uploads/formatBytes.js.map +1 -0
  540. package/dist/uploads/resolveFileRef.js +3 -2
  541. package/dist/uploads/resolveFileRef.js.map +1 -1
  542. package/dist/uploads/types.d.ts +1 -2
  543. package/dist/validation/buildRuleBlocks.js +18 -17
  544. package/dist/validation/buildRuleBlocks.js.map +1 -1
  545. package/dist/validation/builtin/email.js +2 -1
  546. package/dist/validation/builtin/email.js.map +1 -1
  547. package/dist/validation/builtin/index.d.ts +14 -0
  548. package/dist/validation/builtin/index.js +14 -1
  549. package/dist/validation/builtin/index.js.map +1 -1
  550. package/dist/validation/builtin/integer.js +15 -0
  551. package/dist/validation/builtin/integer.js.map +1 -0
  552. package/dist/validation/builtin/matchesField.js +3 -7
  553. package/dist/validation/builtin/matchesField.js.map +1 -1
  554. package/dist/validation/builtin/max.js +1 -0
  555. package/dist/validation/builtin/max.js.map +1 -1
  556. package/dist/validation/builtin/maxDate.js +24 -0
  557. package/dist/validation/builtin/maxDate.js.map +1 -0
  558. package/dist/validation/builtin/maxLength.js +1 -0
  559. package/dist/validation/builtin/maxLength.js.map +1 -1
  560. package/dist/validation/builtin/min.js +1 -0
  561. package/dist/validation/builtin/min.js.map +1 -1
  562. package/dist/validation/builtin/minDate.js +24 -0
  563. package/dist/validation/builtin/minDate.js.map +1 -0
  564. package/dist/validation/builtin/minLength.js +1 -0
  565. package/dist/validation/builtin/minLength.js.map +1 -1
  566. package/dist/validation/builtin/notAlreadySubmitted.js +5 -1
  567. package/dist/validation/builtin/notAlreadySubmitted.js.map +1 -1
  568. package/dist/validation/builtin/oneOf.js +1 -0
  569. package/dist/validation/builtin/oneOf.js.map +1 -1
  570. package/dist/validation/builtin/pattern.js +11 -2
  571. package/dist/validation/builtin/pattern.js.map +1 -1
  572. package/dist/validation/builtin/url.js +1 -0
  573. package/dist/validation/builtin/url.js.map +1 -1
  574. package/dist/validation/builtin/validateDateBound.js +18 -0
  575. package/dist/validation/builtin/validateDateBound.js.map +1 -0
  576. package/dist/validation/builtin/validateRegexParams.js +44 -0
  577. package/dist/validation/builtin/validateRegexParams.js.map +1 -0
  578. package/dist/validation/emailPattern.js +10 -0
  579. package/dist/validation/emailPattern.js.map +1 -0
  580. package/dist/validation/fieldTargetParam.d.ts +22 -0
  581. package/dist/validation/fieldTargetParam.js +38 -0
  582. package/dist/validation/fieldTargetParam.js.map +1 -0
  583. package/dist/validation/registry.d.ts +2 -1
  584. package/dist/validation/registry.js +2 -9
  585. package/dist/validation/registry.js.map +1 -1
  586. package/dist/validation/runValidation.js +8 -29
  587. package/dist/validation/runValidation.js.map +1 -1
  588. package/dist/validation/types.d.ts +5 -11
  589. package/dist/validation/validateUrl.js +22 -0
  590. package/dist/validation/validateUrl.js.map +1 -0
  591. package/package.json +14 -6
  592. package/styles/form-builder.css +94 -190
  593. package/dist/collections/uploads.d.ts +0 -30
  594. package/dist/collections/uploads.js +0 -55
  595. package/dist/collections/uploads.js.map +0 -1
  596. package/dist/consent/buildConsentSourceConfig.js +0 -49
  597. package/dist/consent/buildConsentSourceConfig.js.map +0 -1
  598. package/dist/consent/builtin/index.d.ts +0 -7
  599. package/dist/consent/builtin/index.js +0 -11
  600. package/dist/consent/builtin/index.js.map +0 -1
  601. package/dist/consent/builtin/pageReference.js +0 -75
  602. package/dist/consent/builtin/pageReference.js.map +0 -1
  603. package/dist/consent/builtin/static.js +0 -44
  604. package/dist/consent/builtin/static.js.map +0 -1
  605. package/dist/consent/defineConsentSource.d.ts +0 -35
  606. package/dist/consent/defineConsentSource.js +0 -6
  607. package/dist/consent/defineConsentSource.js.map +0 -1
  608. package/dist/consent/registry.d.ts +0 -16
  609. package/dist/consent/registry.js +0 -16
  610. package/dist/consent/registry.js.map +0 -1
  611. package/dist/consent/resolveConsentLinks.d.ts +0 -19
  612. package/dist/consent/resolveConsentLinks.js +0 -26
  613. package/dist/consent/resolveConsentLinks.js.map +0 -1
  614. package/dist/presentations/registry.d.ts +0 -15
  615. package/dist/presentations/registry.js +0 -15
  616. package/dist/presentations/registry.js.map +0 -1
  617. package/dist/react/toFormDocument.d.ts +0 -24
  618. package/dist/react/toFormDocument.js +0 -22
  619. package/dist/react/toFormDocument.js.map +0 -1
@@ -0,0 +1,73 @@
1
+ import { keys } from "../translations/keys.js";
2
+ import { labelForKey } from "../translations/server.js";
3
+ import { localizedIf } from "../fields/localizedIf.js";
4
+ //#region src/email/departmentsField.ts
5
+ /**
6
+ * The department-emails array, for the host to place on any collection or global they own: a
7
+ * settings global, a tenants collection, a departments parent, wherever the addresses belong. The
8
+ * plugin never registers it and never guesses where it lives; the `email.departments` resolver reads
9
+ * it back, which is also where multi-tenant scoping goes: place this on the tenant-scoped document
10
+ * and have the resolver return only that tenant's addresses, derived from `req`.
11
+ *
12
+ * A row is a `label` (how the address is named when routing a submission to it) and the `email` it
13
+ * resolves to. Because `email` is `localized` by default, a host can hold a different address per
14
+ * locale without changing the stored shape. The array itself is not localized, so per-locale edits
15
+ * must address existing rows by their own auto-assigned `id` rather than re-sending id-less rows.
16
+ *
17
+ * It renders condensed: `admin.components.Field` is {@link CondensedArray}, which lays each row out
18
+ * flat as `[label, email]` at 50% each with no per-row collapsible, while keeping Payload's native
19
+ * per-locale storage and row ids.
20
+ *
21
+ * ```ts
22
+ * // The host's own collection or global:
23
+ * fields: [departmentsField()]
24
+ *
25
+ * // The plugin, reading it back to route a submission. `resolveDepartmentOptions` reads the array
26
+ * // (fetched at `locale: 'all'`) and resolves each row's address for the requesting locale:
27
+ * formBuilder({
28
+ * email: {
29
+ * departments: async ({ req }) => {
30
+ * const settings = await req.payload.findGlobal({ slug: 'settings', depth: 0, locale: 'all' })
31
+ * return resolveDepartmentOptions({ payload: req.payload, req, doc: settings })
32
+ * },
33
+ * },
34
+ * })
35
+ * ```
36
+ *
37
+ * The read above omits the save's `req` on purpose: threading it into a `locale: 'all'` read from
38
+ * within a form's save validation flips `req.locale` to `all` and corrupts the localized write of the
39
+ * document being saved. It reads already-committed data, so no transaction (`req`) is needed.
40
+ */
41
+ const departmentsField = (options = {}) => {
42
+ const localize = options.localized !== false;
43
+ return {
44
+ name: options.name ?? "departmentEmails",
45
+ type: "array",
46
+ label: options.label ?? labelForKey(keys.departmentsField),
47
+ labels: {
48
+ singular: labelForKey(keys.departmentSingular),
49
+ plural: labelForKey(keys.departmentPlural)
50
+ },
51
+ admin: {
52
+ description: labelForKey(keys.departmentsFieldDescription),
53
+ components: { Field: "@10x-media/form-builder/client#CondensedArray" }
54
+ },
55
+ fields: [{
56
+ name: "label",
57
+ type: "text",
58
+ label: labelForKey(keys.departmentLabel),
59
+ admin: { width: "50%" },
60
+ ...localizedIf(localize)
61
+ }, {
62
+ name: "email",
63
+ type: "text",
64
+ label: labelForKey(keys.departmentEmail),
65
+ admin: { width: "50%" },
66
+ ...localizedIf(localize)
67
+ }]
68
+ };
69
+ };
70
+ //#endregion
71
+ export { departmentsField };
72
+
73
+ //# sourceMappingURL=departmentsField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"departmentsField.js","names":[],"sources":["../../src/email/departmentsField.ts"],"sourcesContent":["import type { ArrayField } from 'payload'\nimport { localizedIf } from '../fields/localizedIf'\nimport { keys } from '../translations/keys'\nimport { labelForKey } from '../translations/server'\n\nexport type DepartmentsFieldOptions = {\n\t/** Field name, i.e. what the row array is stored under. Defaults to `departmentEmails`. */\n\tname?: string\n\t/** Field label. Defaults to the plugin's translated one. */\n\tlabel?: ArrayField['label']\n\t/**\n\t * Whether each row's `email` (and its `label`) carry `localized: true`, so the same field can\n\t * hold a different address per locale. Default `true`; Payload strips the flag on hosts without\n\t * `localization`, so it is safe either way.\n\t */\n\tlocalized?: boolean\n}\n\n/**\n * The department-emails array, for the host to place on any collection or global they own: a\n * settings global, a tenants collection, a departments parent, wherever the addresses belong. The\n * plugin never registers it and never guesses where it lives; the `email.departments` resolver reads\n * it back, which is also where multi-tenant scoping goes: place this on the tenant-scoped document\n * and have the resolver return only that tenant's addresses, derived from `req`.\n *\n * A row is a `label` (how the address is named when routing a submission to it) and the `email` it\n * resolves to. Because `email` is `localized` by default, a host can hold a different address per\n * locale without changing the stored shape. The array itself is not localized, so per-locale edits\n * must address existing rows by their own auto-assigned `id` rather than re-sending id-less rows.\n *\n * It renders condensed: `admin.components.Field` is {@link CondensedArray}, which lays each row out\n * flat as `[label, email]` at 50% each with no per-row collapsible, while keeping Payload's native\n * per-locale storage and row ids.\n *\n * ```ts\n * // The host's own collection or global:\n * fields: [departmentsField()]\n *\n * // The plugin, reading it back to route a submission. `resolveDepartmentOptions` reads the array\n * // (fetched at `locale: 'all'`) and resolves each row's address for the requesting locale:\n * formBuilder({\n * email: {\n * departments: async ({ req }) => {\n * const settings = await req.payload.findGlobal({ slug: 'settings', depth: 0, locale: 'all' })\n * return resolveDepartmentOptions({ payload: req.payload, req, doc: settings })\n * },\n * },\n * })\n * ```\n *\n * The read above omits the save's `req` on purpose: threading it into a `locale: 'all'` read from\n * within a form's save validation flips `req.locale` to `all` and corrupts the localized write of the\n * document being saved. It reads already-committed data, so no transaction (`req`) is needed.\n */\nexport const departmentsField = (options: DepartmentsFieldOptions = {}): ArrayField => {\n\tconst localize = options.localized !== false\n\n\treturn {\n\t\tname: options.name ?? 'departmentEmails',\n\t\ttype: 'array',\n\t\tlabel: options.label ?? labelForKey(keys.departmentsField),\n\t\tlabels: {\n\t\t\tsingular: labelForKey(keys.departmentSingular),\n\t\t\tplural: labelForKey(keys.departmentPlural),\n\t\t},\n\t\tadmin: {\n\t\t\tdescription: labelForKey(keys.departmentsFieldDescription),\n\t\t\tcomponents: { Field: '@10x-media/form-builder/client#CondensedArray' },\n\t\t},\n\t\tfields: [\n\t\t\t{\n\t\t\t\tname: 'label',\n\t\t\t\ttype: 'text',\n\t\t\t\tlabel: labelForKey(keys.departmentLabel),\n\t\t\t\tadmin: { width: '50%' },\n\t\t\t\t...localizedIf(localize),\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'email',\n\t\t\t\ttype: 'text',\n\t\t\t\tlabel: labelForKey(keys.departmentEmail),\n\t\t\t\tadmin: { width: '50%' },\n\t\t\t\t...localizedIf(localize),\n\t\t\t},\n\t\t],\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA,MAAa,oBAAoB,UAAmC,CAAC,MAAkB;CACtF,MAAM,WAAW,QAAQ,cAAc;CAEvC,OAAO;EACN,MAAM,QAAQ,QAAQ;EACtB,MAAM;EACN,OAAO,QAAQ,SAAS,YAAY,KAAK,gBAAgB;EACzD,QAAQ;GACP,UAAU,YAAY,KAAK,kBAAkB;GAC7C,QAAQ,YAAY,KAAK,gBAAgB;EAC1C;EACA,OAAO;GACN,aAAa,YAAY,KAAK,2BAA2B;GACzD,YAAY,EAAE,OAAO,gDAAgD;EACtE;EACA,QAAQ,CACP;GACC,MAAM;GACN,MAAM;GACN,OAAO,YAAY,KAAK,eAAe;GACvC,OAAO,EAAE,OAAO,MAAM;GACtB,GAAG,YAAY,QAAQ;EACxB,GACA;GACC,MAAM;GACN,MAAM;GACN,OAAO,YAAY,KAAK,eAAe;GACvC,OAAO,EAAE,OAAO,MAAM;GACtB,GAAG,YAAY,QAAQ;EACxB,CACD;CACD;AACD"}
@@ -1,3 +1,16 @@
1
+ import { ByteSizeField } from "../client/ByteSizeField.js";
2
+ import { CalcExpressionBuilder } from "../client/CalcExpressionBuilder.js";
3
+ import { ClosePollButton } from "../client/ClosePollButton.js";
4
+ import { CondensedArray } from "../client/CondensedArray.js";
5
+ import { ConsentBlockLabel } from "../client/ConsentBlockLabel.js";
6
+ import { ConsentSourceRowLabel } from "../client/ConsentSourceRowLabel.js";
7
+ import { EndpointOptionsSelect } from "../client/EndpointOptionsSelect.js";
8
+ import { FieldBlockLabel } from "../client/FieldBlockLabel.js";
9
+ import { FieldNameSelect } from "../client/FieldNameSelect.js";
1
10
  import { FlowBuilder } from "../client/FlowBuilder.js";
2
11
  import { FormConditionField } from "../client/FormConditionField.js";
3
- export { FlowBuilder, FormConditionField };
12
+ import { RecipientsSelect } from "../client/RecipientsSelect.js";
13
+ import { RuleDescription } from "../client/RuleDescription.js";
14
+ import { FieldCountCell } from "../collections/cells/FieldCountCell.js";
15
+ import { FlowStepsCell } from "../collections/cells/FlowStepsCell.js";
16
+ export { ByteSizeField, CalcExpressionBuilder, ClosePollButton, CondensedArray, ConsentBlockLabel, ConsentSourceRowLabel, EndpointOptionsSelect, FieldBlockLabel, FieldCountCell, FieldNameSelect, FlowBuilder, FlowStepsCell, FormConditionField, RecipientsSelect, RuleDescription };
@@ -1,4 +1,17 @@
1
1
  "use client";
2
+ import { ByteSizeField } from "../client/ByteSizeField.js";
3
+ import { CalcExpressionBuilder } from "../client/CalcExpressionBuilder.js";
4
+ import { ClosePollButton } from "../client/ClosePollButton.js";
5
+ import { CondensedArray } from "../client/CondensedArray.js";
6
+ import { ConsentBlockLabel } from "../client/ConsentBlockLabel.js";
7
+ import { ConsentSourceRowLabel } from "../client/ConsentSourceRowLabel.js";
8
+ import { EndpointOptionsSelect } from "../client/EndpointOptionsSelect.js";
9
+ import { FieldBlockLabel } from "../client/FieldBlockLabel.js";
10
+ import { FieldNameSelect } from "../client/FieldNameSelect.js";
2
11
  import { FlowBuilder } from "../client/FlowBuilder.js";
3
12
  import { FormConditionField } from "../client/FormConditionField.js";
4
- export { FlowBuilder, FormConditionField };
13
+ import { RecipientsSelect } from "../client/RecipientsSelect.js";
14
+ import { RuleDescription } from "../client/RuleDescription.js";
15
+ import { FieldCountCell } from "../collections/cells/FieldCountCell.js";
16
+ import { FlowStepsCell } from "../collections/cells/FlowStepsCell.js";
17
+ export { ByteSizeField, CalcExpressionBuilder, ClosePollButton, CondensedArray, ConsentBlockLabel, ConsentSourceRowLabel, EndpointOptionsSelect, FieldBlockLabel, FieldCountCell, FieldNameSelect, FlowBuilder, FlowStepsCell, FormConditionField, RecipientsSelect, RuleDescription };
@@ -1,3 +1,6 @@
1
1
  import { TranslationKey, keys } from "../translations/keys.js";
2
- import { TranslationsOption, translations } from "../translations/index.js";
3
- export { type TranslationKey as FormBuilderTranslationKeys, type TranslationKey, type TranslationsOption, keys, translations };
2
+ import { de } from "../translations/de.js";
3
+ import { en } from "../translations/en.js";
4
+ import { TranslationBundle, TranslationsOption, bundles, translations } from "../translations/index.js";
5
+ import { clientRuntimeKeys } from "../translations/clientRuntimeKeys.js";
6
+ export { type TranslationKey as FormBuilderTranslationKeys, type TranslationBundle, type TranslationKey, type TranslationsOption, bundles, clientRuntimeKeys, de, en, keys, translations };
@@ -1,3 +1,6 @@
1
1
  import { keys } from "../translations/keys.js";
2
- import { translations } from "../translations/index.js";
3
- export { keys, translations };
2
+ import { de } from "../translations/de.js";
3
+ import { en } from "../translations/en.js";
4
+ import { bundles, translations } from "../translations/index.js";
5
+ import { clientRuntimeKeys } from "../translations/clientRuntimeKeys.js";
6
+ export { bundles, clientRuntimeKeys, de, en, keys, translations };
@@ -1,24 +1,48 @@
1
- import { FormFieldInstance } from "../submissions/types.js";
2
- import { AggregationBucket, FieldAggregation } from "../aggregation/types.js";
3
1
  import { CalcExpression } from "../calc/types.js";
2
+ import { FormFieldInstance, SubmissionValue } from "../submissions/types.js";
3
+ import { de } from "../translations/de.js";
4
+ import { en } from "../translations/en.js";
5
+ import { TranslationBundle, bundles } from "../translations/index.js";
6
+ import { clientRuntimeKeys } from "../translations/clientRuntimeKeys.js";
7
+ import { BodyConverter, BodyConverterArgs, BodyRender, sanitizeUrl } from "../actions/body/converters.js";
8
+ import { BodyContext, serializeBody } from "../actions/body/serializeBody.js";
9
+ import { textOfBody } from "../actions/body/textOfBody.js";
10
+ import { AggregationBucket, FieldAggregation } from "../aggregation/types.js";
11
+ import { CalcResolved, evaluateCalc } from "../calc/evaluate.js";
4
12
  import { computeCalcFields } from "../calc/computeCalcFields.js";
5
- import { evaluateCalc } from "../calc/evaluate.js";
13
+ import { formatCalc } from "../calc/formatCalc.js";
14
+ import { CalcDisplayConfig, formatCalcValue } from "../calc/formatCalcValue.js";
6
15
  import { evaluateCondition } from "../conditions/evaluate.js";
16
+ import { ConsentStatement, ConsentStatements } from "../consent/resolveConsentStatements.js";
17
+ import { COUNTRIES, US_STATES } from "../fields/data/regions.js";
18
+ import { fieldKey } from "../fields/fieldKey.js";
7
19
  import { firstStepId, isTerminalStepId, resolveNextStepId, stepFieldNames } from "../flow/engine.js";
20
+ import { FormButtonSettings, FormDocument, FormPollSettings, FormResponseSettings } from "../form/types.js";
21
+ import { ToFormDocumentOptions, toFormDocument } from "../form/toFormDocument.js";
8
22
  import { PrefillOptions, valuesFromSearchParams } from "../prefill/valuesFromSearchParams.js";
23
+ import { FormAdapters, LoadScript, NavigateOptions, VoteStorage } from "../react/adapters.js";
24
+ import { CaptchaWidgetHandle } from "../react/captcha/types.js";
25
+ import { HCAPTCHA_SCRIPT_URL, HcaptchaCaptcha, HcaptchaCaptchaProps } from "../react/captcha/HcaptchaCaptcha.js";
26
+ import { RECAPTCHA_SCRIPT_URL, RecaptchaCaptcha, RecaptchaCaptchaHandle, RecaptchaCaptchaProps } from "../react/captcha/RecaptchaCaptcha.js";
27
+ import { TURNSTILE_SCRIPT_URL, TurnstileCaptcha, TurnstileCaptchaProps } from "../react/captcha/TurnstileCaptcha.js";
9
28
  import { cn } from "../react/cn.js";
10
29
  import { FieldRenderer, FieldRendererProps, RendererTranslate, defineFieldRenderer } from "../react/contract.js";
30
+ import { BackButtonRenderProps, FormControls, FormControlsProps, NextButtonRenderProps, SubmitButtonRenderProps } from "../react/FormControls.js";
11
31
  import { FormPresentation, PresentationWrapperProps } from "../react/presentation/types.js";
12
32
  import { PresentationOption, PresentationRegistry, PresentationsConfig, resolvePresentations } from "../react/presentation/registry.js";
13
33
  import { RendererOption, RendererRegistry, RenderersConfig, resolveRenderers } from "../react/registry.js";
14
34
  import { SubmitFormResult, SubmitHandler, submitForm } from "../react/submitForm.js";
15
- import { BackButtonRenderProps, Form, FormDocument, FormProps, NextButtonRenderProps, SubmitButtonRenderProps } from "../react/Form.js";
16
- import { FormState } from "../react/state.js";
17
- import { FormStepInfo } from "../react/FormContext.js";
35
+ import { Form, FormProps, FormSuccessResponse, FormSuccessResult } from "../react/Form.js";
36
+ import { RecallResolver, buildRecallResolver } from "../recall/resolver.js";
37
+ import { FieldErrors, FormAction, FormState } from "../react/state.js";
38
+ import { FormContextValue, FormControlLabels, FormStepInfo, useFormContext } from "../react/FormContext.js";
39
+ import { FormFields, FormFieldsProps } from "../react/FormFields.js";
18
40
  import { FieldWidth, FormLayout, FormLayoutProps, widthProps } from "../react/FormLayout.js";
19
41
  import { FormResults, FormResultsProps } from "../react/FormResults.js";
42
+ import { FormSteps, FormStepsProps } from "../react/FormSteps.js";
20
43
  import { FetchResultsInput, FetchResultsResult, fetchFormResults } from "../react/fetchResults.js";
21
44
  import { Honeypot, HoneypotProps } from "../react/Honeypot.js";
45
+ import { VotedSubmission } from "../submissions/resolveVotedSubmission.js";
22
46
  import { Poll, PollProps } from "../react/Poll.js";
23
47
  import { Backdrop, BackdropProps } from "../react/presentation/Backdrop.js";
24
48
  import { DialogSurface, DialogSurfaceProps } from "../react/presentation/DialogSurface.js";
@@ -27,19 +51,19 @@ import { UseDismissOptions, useDismiss } from "../react/presentation/useDismiss.
27
51
  import { useFocusTrap } from "../react/presentation/useFocusTrap.js";
28
52
  import { useScrollLock } from "../react/presentation/useScrollLock.js";
29
53
  import { Checkbox, CheckboxProps } from "../react/primitives/Checkbox.js";
54
+ import { ChoiceGroup, ChoiceGroupProps, ChoiceOption } from "../react/primitives/ChoiceGroup.js";
30
55
  import { FieldShell, FieldShellProps } from "../react/primitives/FieldShell.js";
31
56
  import { Input, InputProps } from "../react/primitives/Input.js";
32
57
  import { Select, SelectOption, SelectProps } from "../react/primitives/Select.js";
33
58
  import { Textarea, TextareaProps } from "../react/primitives/Textarea.js";
34
59
  import { defaultRenderers } from "../react/renderers/index.js";
35
- import { toFormDocument } from "../react/toFormDocument.js";
36
60
  import { UploadFileInput, UploadFileResult, uploadFile } from "../react/uploadFile.js";
61
+ import { useCalcValues } from "../react/useCalcValues.js";
37
62
  import { UseFieldResult, useField } from "../react/useField.js";
38
63
  import { useFormState } from "../react/useFormState.js";
39
64
  import { useFormStep } from "../react/useFormStep.js";
40
65
  import { interpolate } from "../recall/interpolate.js";
41
- import { RecallResolver, buildRecallResolver } from "../recall/resolver.js";
42
66
  import { CAPTCHA_TOKEN_KEY, DEFAULT_HONEYPOT_FIELD } from "../spam/constants.js";
43
- import { en } from "../translations/en.js";
44
67
  import { makeTranslate } from "../translations/makeTranslate.js";
45
- export { type AggregationBucket, type BackButtonRenderProps, Backdrop, type BackdropProps, CAPTCHA_TOKEN_KEY, type CalcExpression, Checkbox, type CheckboxProps, DEFAULT_HONEYPOT_FIELD, DialogSurface, type DialogSurfaceProps, type FetchResultsInput, type FetchResultsResult, type FieldAggregation, type FieldRenderer, type FieldRendererProps, FieldShell, type FieldShellProps, type FieldWidth, Form, type FormDocument, type FormFieldInstance, FormLayout, type FormLayoutProps, type FormPresentation, type FormProps, FormResults, type FormResultsProps, type FormState, type FormStepInfo, Honeypot, type HoneypotProps, Input, type InputProps, type NextButtonRenderProps, Poll, type PollProps, type PrefillOptions, type PresentationOption, type PresentationRegistry, type PresentationWrapperProps, type PresentationsConfig, type RecallResolver, type RendererOption, type RendererRegistry, type RendererTranslate, type RenderersConfig, Select, type SelectOption, type SelectProps, type SubmitButtonRenderProps, type SubmitFormResult, type SubmitHandler, Textarea, type TextareaProps, type UploadFileInput, type UploadFileResult, type UseDismissOptions, type UseFieldResult, buildRecallResolver, cn, computeCalcFields, defaultPresentations, defaultRenderers, defineFieldRenderer, en, evaluateCalc, evaluateCondition, fetchFormResults, firstStepId, interpolate, isTerminalStepId, makeTranslate, resolveNextStepId, resolvePresentations, resolveRenderers, stepFieldNames, submitForm, toFormDocument, uploadFile, useDismiss, useField, useFocusTrap, useFormState, useFormStep, useScrollLock, valuesFromSearchParams, widthProps };
68
+ import { formatBytes } from "../uploads/formatBytes.js";
69
+ export { type AggregationBucket, type BackButtonRenderProps, Backdrop, type BackdropProps, type BodyContext, type BodyConverter, type BodyConverterArgs, type BodyRender, CAPTCHA_TOKEN_KEY, COUNTRIES, type CalcDisplayConfig, type CalcExpression, type CalcResolved, type CaptchaWidgetHandle, Checkbox, type CheckboxProps, ChoiceGroup, type ChoiceGroupProps, type ChoiceOption, type ConsentStatement, type ConsentStatements, DEFAULT_HONEYPOT_FIELD, DialogSurface, type DialogSurfaceProps, type FetchResultsInput, type FetchResultsResult, type FieldAggregation, type FieldErrors, type FieldRenderer, type FieldRendererProps, FieldShell, type FieldShellProps, type FieldWidth, Form, type FormAction, type FormAdapters, type FormButtonSettings, type FormContextValue, type FormControlLabels, FormControls, type FormControlsProps, type FormDocument, type FormFieldInstance, FormFields, type FormFieldsProps, FormLayout, type FormLayoutProps, type FormPollSettings, type FormPresentation, type FormProps, type FormResponseSettings, FormResults, type FormResultsProps, type FormState, type FormStepInfo, FormSteps, type FormStepsProps, type FormSuccessResponse, type FormSuccessResult, HCAPTCHA_SCRIPT_URL, HcaptchaCaptcha, type HcaptchaCaptchaProps, Honeypot, type HoneypotProps, Input, type InputProps, type LoadScript, type NavigateOptions, type NextButtonRenderProps, Poll, type PollProps, type PrefillOptions, type PresentationOption, type PresentationRegistry, type PresentationWrapperProps, type PresentationsConfig, RECAPTCHA_SCRIPT_URL, type RecallResolver, RecaptchaCaptcha, type RecaptchaCaptchaHandle, type RecaptchaCaptchaProps, type RendererOption, type RendererRegistry, type RendererTranslate, type RenderersConfig, Select, type SelectOption, type SelectProps, type SubmissionValue, type SubmitButtonRenderProps, type SubmitFormResult, type SubmitHandler, TURNSTILE_SCRIPT_URL, Textarea, type TextareaProps, type ToFormDocumentOptions, type TranslationBundle, TurnstileCaptcha, type TurnstileCaptchaProps, US_STATES, type UploadFileInput, type UploadFileResult, type UseDismissOptions, type UseFieldResult, type VoteStorage, type VotedSubmission, buildRecallResolver, bundles, clientRuntimeKeys, cn, computeCalcFields, de, defaultPresentations, defaultRenderers, defineFieldRenderer, en, evaluateCalc, evaluateCondition, fetchFormResults, fieldKey, firstStepId, formatBytes, formatCalc, formatCalcValue, interpolate, isTerminalStepId, makeTranslate, resolveNextStepId, resolvePresentations, resolveRenderers, sanitizeUrl, serializeBody, stepFieldNames, submitForm, textOfBody, toFormDocument, uploadFile, useCalcValues, useDismiss, useField, useFocusTrap, useFormContext, useFormState, useFormStep, useScrollLock, valuesFromSearchParams, widthProps };
@@ -1,17 +1,35 @@
1
1
  "use client";
2
2
  import { interpolate } from "../recall/interpolate.js";
3
- import { CAPTCHA_TOKEN_KEY, DEFAULT_HONEYPOT_FIELD } from "../spam/constants.js";
3
+ import { sanitizeUrl } from "../actions/body/converters.js";
4
+ import { serializeBody } from "../actions/body/serializeBody.js";
5
+ import { formatCalcValue } from "../calc/formatCalcValue.js";
6
+ import { fieldKey } from "../fields/fieldKey.js";
4
7
  import { evaluateCalc } from "../calc/evaluate.js";
5
8
  import { computeCalcFields } from "../calc/computeCalcFields.js";
9
+ import { textOfBody } from "../actions/body/textOfBody.js";
10
+ import { CAPTCHA_TOKEN_KEY, DEFAULT_HONEYPOT_FIELD } from "../spam/constants.js";
6
11
  import { evaluateCondition } from "../conditions/evaluate.js";
12
+ import { de } from "../translations/de.js";
7
13
  import { en } from "../translations/en.js";
14
+ import { bundles } from "../translations/index.js";
15
+ import { formatCalc } from "../calc/formatCalc.js";
16
+ import { COUNTRIES, US_STATES } from "../fields/data/regions.js";
17
+ import { toFormDocument } from "../form/toFormDocument.js";
8
18
  import { valuesFromSearchParams } from "../prefill/valuesFromSearchParams.js";
9
19
  import { buildRecallResolver } from "../recall/resolver.js";
20
+ import { formatBytes } from "../uploads/formatBytes.js";
10
21
  import { firstStepId, isTerminalStepId, resolveNextStepId, stepFieldNames } from "../flow/engine.js";
22
+ import { HCAPTCHA_SCRIPT_URL, HcaptchaCaptcha } from "../react/captcha/HcaptchaCaptcha.js";
23
+ import { RECAPTCHA_SCRIPT_URL, RecaptchaCaptcha } from "../react/captcha/RecaptchaCaptcha.js";
24
+ import { TURNSTILE_SCRIPT_URL, TurnstileCaptcha } from "../react/captcha/TurnstileCaptcha.js";
11
25
  import { cn } from "../react/cn.js";
12
26
  import { defineFieldRenderer } from "../react/contract.js";
13
27
  import { makeTranslate } from "../translations/makeTranslate.js";
28
+ import { useFormContext } from "../react/FormContext.js";
29
+ import { FormControls } from "../react/FormControls.js";
14
30
  import { FormLayout, widthProps } from "../react/FormLayout.js";
31
+ import { useField } from "../react/useField.js";
32
+ import { FormFields } from "../react/FormFields.js";
15
33
  import { Honeypot } from "../react/Honeypot.js";
16
34
  import { Backdrop } from "../react/presentation/Backdrop.js";
17
35
  import { useDismiss } from "../react/presentation/useDismiss.js";
@@ -25,16 +43,18 @@ import { FieldShell } from "../react/primitives/FieldShell.js";
25
43
  import { Checkbox } from "../react/primitives/Checkbox.js";
26
44
  import { Input } from "../react/primitives/Input.js";
27
45
  import { uploadFile } from "../react/uploadFile.js";
28
- import { useField } from "../react/useField.js";
29
46
  import { Select } from "../react/primitives/Select.js";
47
+ import { ChoiceGroup } from "../react/primitives/ChoiceGroup.js";
30
48
  import { Textarea } from "../react/primitives/Textarea.js";
31
49
  import { defaultRenderers } from "../react/renderers/index.js";
32
50
  import { submitForm } from "../react/submitForm.js";
33
51
  import { Form } from "../react/Form.js";
34
52
  import { FormResults } from "../react/FormResults.js";
53
+ import { FormSteps } from "../react/FormSteps.js";
35
54
  import { fetchFormResults } from "../react/fetchResults.js";
36
55
  import { Poll } from "../react/Poll.js";
37
- import { toFormDocument } from "../react/toFormDocument.js";
56
+ import { useCalcValues } from "../react/useCalcValues.js";
38
57
  import { useFormState } from "../react/useFormState.js";
39
58
  import { useFormStep } from "../react/useFormStep.js";
40
- export { Backdrop, CAPTCHA_TOKEN_KEY, Checkbox, DEFAULT_HONEYPOT_FIELD, DialogSurface, FieldShell, Form, FormLayout, FormResults, Honeypot, Input, Poll, Select, Textarea, buildRecallResolver, cn, computeCalcFields, defaultPresentations, defaultRenderers, defineFieldRenderer, en, evaluateCalc, evaluateCondition, fetchFormResults, firstStepId, interpolate, isTerminalStepId, makeTranslate, resolveNextStepId, resolvePresentations, resolveRenderers, stepFieldNames, submitForm, toFormDocument, uploadFile, useDismiss, useField, useFocusTrap, useFormState, useFormStep, useScrollLock, valuesFromSearchParams, widthProps };
59
+ import { clientRuntimeKeys } from "../translations/clientRuntimeKeys.js";
60
+ export { Backdrop, CAPTCHA_TOKEN_KEY, COUNTRIES, Checkbox, ChoiceGroup, DEFAULT_HONEYPOT_FIELD, DialogSurface, FieldShell, Form, FormControls, FormFields, FormLayout, FormResults, FormSteps, HCAPTCHA_SCRIPT_URL, HcaptchaCaptcha, Honeypot, Input, Poll, RECAPTCHA_SCRIPT_URL, RecaptchaCaptcha, Select, TURNSTILE_SCRIPT_URL, Textarea, TurnstileCaptcha, US_STATES, buildRecallResolver, bundles, clientRuntimeKeys, cn, computeCalcFields, de, defaultPresentations, defaultRenderers, defineFieldRenderer, en, evaluateCalc, evaluateCondition, fetchFormResults, fieldKey, firstStepId, formatBytes, formatCalc, formatCalcValue, interpolate, isTerminalStepId, makeTranslate, resolveNextStepId, resolvePresentations, resolveRenderers, sanitizeUrl, serializeBody, stepFieldNames, submitForm, textOfBody, toFormDocument, uploadFile, useCalcValues, useDismiss, useField, useFocusTrap, useFormContext, useFormState, useFormStep, useScrollLock, valuesFromSearchParams, widthProps };
@@ -1,2 +1,11 @@
1
+ import { resolveConsentStatements } from "../consent/resolveConsentStatements.js";
2
+ import { toFormDocument } from "../form/toFormDocument.js";
3
+ import { VotedSubmission, resolveVotedSubmission } from "../submissions/resolveVotedSubmission.js";
4
+ import { FormContextReference, signFormContext, verifyFormContext } from "../context/formContext.js";
5
+ import { isPollClosed } from "../form/pollState.js";
6
+ import { resolveEffectivePollOptions } from "../poll/effectivePollOptions.js";
7
+ import { resolvePollOptions } from "../poll/resolvePollOptions.js";
8
+ import { resolvePollOutcome } from "../poll/resolvePollOutcome.js";
1
9
  import { SubmissionAnswers } from "../submissions/SubmissionAnswers.js";
2
- export { SubmissionAnswers };
10
+ import { hasVotedCookie, votedCookieName } from "../submissions/votedCookie.js";
11
+ export { type FormContextReference, SubmissionAnswers, type VotedSubmission, hasVotedCookie, isPollClosed, resolveConsentStatements, resolveEffectivePollOptions, resolvePollOptions, resolvePollOutcome, resolveVotedSubmission, signFormContext, toFormDocument, verifyFormContext, votedCookieName };
@@ -1,2 +1,11 @@
1
+ import { isPollClosed } from "../form/pollState.js";
2
+ import { resolveConsentStatements } from "../consent/resolveConsentStatements.js";
3
+ import { resolvePollOptions } from "../poll/resolvePollOptions.js";
4
+ import { resolveEffectivePollOptions } from "../poll/effectivePollOptions.js";
5
+ import { resolvePollOutcome } from "../poll/resolvePollOutcome.js";
6
+ import { signFormContext, verifyFormContext } from "../context/formContext.js";
7
+ import { hasVotedCookie, votedCookieName } from "../submissions/votedCookie.js";
8
+ import { toFormDocument } from "../form/toFormDocument.js";
9
+ import { resolveVotedSubmission } from "../submissions/resolveVotedSubmission.js";
1
10
  import { SubmissionAnswers } from "../submissions/SubmissionAnswers.js";
2
- export { SubmissionAnswers };
11
+ export { SubmissionAnswers, hasVotedCookie, isPollClosed, resolveConsentStatements, resolveEffectivePollOptions, resolvePollOptions, resolvePollOutcome, resolveVotedSubmission, signFormContext, toFormDocument, verifyFormContext, votedCookieName };
@@ -1,28 +1,36 @@
1
+ import { CalcExpression } from "../calc/types.js";
2
+ import { FormFieldInstance, SubmissionDescriptor, SubmissionFieldError, SubmissionValue, SubmissionWidth } from "../submissions/types.js";
1
3
  import { FileFieldConfig, FileRef, FileRefError } from "../uploads/types.js";
2
- import { AnyFormFieldDefinition, FormFieldDefinition, FormFieldFormat, FormFieldValidate, FormFieldValueKind } from "../fields/types.js";
3
- import { FormFieldInstance, SubmissionDescriptor, SubmissionFieldError, SubmissionValue } from "../submissions/types.js";
4
+ import { AnyFormFieldDefinition, FormFieldDefinition, FormFieldFormat, FormFieldValidate, FormFieldValueKind, OmittableSharedField } from "../fields/types.js";
5
+ import { RichTextBodyOption } from "../actions/body/serializeBody.js";
4
6
  import { AggregationBucket, AggregationRow, FieldAggregation, FieldMeta, SubmissionStatusFilter } from "../aggregation/types.js";
5
- import { CalcExpression } from "../calc/types.js";
7
+ import { ConsentSourceEntry, ConsentSourcePage, ConsentSourcesResolver } from "../consent/types.js";
8
+ import { ConsentStatement, ConsentStatements, ResolveConsentStatementsArgs } from "../consent/resolveConsentStatements.js";
6
9
  import { FlowStep, FlowTransition, FormFlow } from "../flow/types.js";
10
+ import { FormButtonSettings, FormDocument, FormPollSettings, FormResponseSettings } from "../form/types.js";
7
11
  import { FieldTypeOption, FieldTypeRegistry, FieldTypesConfig } from "../fields/registry.js";
8
12
  import { PrefillOptions } from "../prefill/valuesFromSearchParams.js";
9
13
  import { FormEvent, FormEventSink } from "../events/types.js";
10
- import { AnyValidationRuleDefinition, ValidationRuleDefinition, ValidationRuleResult, ValidationSeverity } from "../validation/types.js";
14
+ import { AnyValidationRuleDefinition, ValidationRuleDefinition, ValidationRuleResult } from "../validation/types.js";
11
15
  import { PresentationDensity, PresentationDescriptor, PresentationSurface } from "../presentations/types.js";
12
16
  import { RecallResolver } from "../recall/resolver.js";
17
+ import { PollOptionSourceOption, PollOptionSourceRegistry, PollOptionSourcesConfig } from "../poll/registry.js";
13
18
  import { ActionDefinition, ActionRunArgs, AnyActionDefinition } from "../actions/defineAction.js";
19
+ import { FromAddressOption, FromAddressesResolver } from "../actions/fromAddresses.js";
14
20
  import { ActionOption, ActionRegistry, ActionsConfig } from "../actions/registry.js";
15
21
  import { ActionResult } from "../actions/runActions.js";
16
22
  import { AggregateFieldResponsesArgs, AggregateFormResponsesArgs } from "../aggregation/aggregateResponses.js";
17
- import { ResolveResultsRequestArgs, ResolveResultsRequestResult } from "../aggregation/resolveResultsRequest.js";
18
- import { CollectionOverrides, FieldsOverride } from "../plugin/collectionOverrides.js";
19
- import { UploadsCollectionConfig, UploadsOption } from "../collections/uploads.js";
23
+ import { FormResultsAccess, FormResultsAccessArgs, ResolveResultsRequestArgs, ResolveResultsRequestResult } from "../aggregation/resolveResultsRequest.js";
24
+ import { ButtonFieldsOverride, ButtonsOption, DefaultButtonFields } from "../collections/buttonFields.js";
20
25
  import { FieldCondition } from "../conditions/types.js";
21
- import { AnyConsentSource, ConsentLink, ConsentResolveArgs, ConsentResolved, ConsentSource } from "../consent/defineConsentSource.js";
22
- import { ConsentSourceOption, ConsentSourceRegistry, ConsentSourcesConfig } from "../consent/registry.js";
23
26
  import { ConsentProof } from "../consent/captureConsent.js";
24
- import { PresentationDescriptorOption, PresentationDescriptorRegistry, PresentationsDescriptorConfig } from "../presentations/registry.js";
27
+ import { ConsentSourcesFieldOptions } from "../consent/consentSourcesField.js";
28
+ import { ResolveConsentEntriesArgs } from "../consent/resolveConsentEntries.js";
29
+ import { ConsentSourceOption, ResolveConsentSourcesRequestArgs, ResolveConsentSourcesRequestResult } from "../consent/resolveConsentSourcesRequest.js";
30
+ import { ResolvePublishedVersionRefArgs } from "../consent/resolvePublishedVersionRef.js";
31
+ import { CollectionOverrides, FieldsOverride } from "../plugin/collectionOverrides.js";
25
32
  import { CaptchaProvider, CaptchaVerifyArgs, IdentifyFn, RateLimitCheckArgs, RateLimitConfig, RateLimitResult, RateLimiter, SpamConfig, SpamMetadataConfig, SpamOption } from "../spam/types.js";
33
+ import { UploadsOption } from "../plugin/uploadsCollection.js";
26
34
  import { ValidationRuleOption, ValidationRuleRegistry, ValidationRulesConfig } from "../validation/registry.js";
27
- import { FormBuilderPluginOptions } from "../index.js";
28
- export type { ActionDefinition, ActionOption, ActionRegistry, ActionResult, ActionRunArgs, ActionsConfig, AggregateFieldResponsesArgs, AggregateFormResponsesArgs, AggregationBucket, AggregationRow, AnyActionDefinition, AnyConsentSource, AnyFormFieldDefinition, AnyValidationRuleDefinition, CalcExpression, CaptchaProvider, CaptchaVerifyArgs, CollectionOverrides, ConsentLink, ConsentProof, ConsentResolveArgs, ConsentResolved, ConsentSource, ConsentSourceOption, ConsentSourceRegistry, ConsentSourcesConfig, FieldAggregation, FieldCondition, FieldMeta, FieldTypeOption, FieldTypeRegistry, FieldTypesConfig, FieldsOverride, FileFieldConfig, FileRef, FileRefError, FlowStep, FlowTransition, FormBuilderPluginOptions, FormEvent, FormEventSink, FormFieldDefinition, FormFieldFormat, FormFieldInstance, FormFieldValidate, FormFieldValueKind, FormFlow, IdentifyFn, PrefillOptions, PresentationDensity, PresentationDescriptor, PresentationDescriptorOption, PresentationDescriptorRegistry, PresentationSurface, PresentationsDescriptorConfig, RateLimitCheckArgs, RateLimitConfig, RateLimitResult, RateLimiter, RecallResolver, ResolveResultsRequestArgs, ResolveResultsRequestResult, SpamConfig, SpamMetadataConfig, SpamOption, SubmissionDescriptor, SubmissionFieldError, SubmissionStatusFilter, SubmissionValue, UploadsCollectionConfig, UploadsOption, ValidationRuleDefinition, ValidationRuleOption, ValidationRuleRegistry, ValidationRuleResult, ValidationRulesConfig, ValidationSeverity };
35
+ import { FormBuilderPluginOptions } from "../options.js";
36
+ export type { ActionDefinition, ActionOption, ActionRegistry, ActionResult, ActionRunArgs, ActionsConfig, AggregateFieldResponsesArgs, AggregateFormResponsesArgs, AggregationBucket, AggregationRow, AnyActionDefinition, AnyFormFieldDefinition, AnyValidationRuleDefinition, ButtonFieldsOverride, ButtonsOption, CalcExpression, CaptchaProvider, CaptchaVerifyArgs, CollectionOverrides, ConsentProof, ConsentSourceEntry, ConsentSourceOption, ConsentSourcePage, ConsentSourcesFieldOptions, ConsentSourcesResolver, ConsentStatement, ConsentStatements, DefaultButtonFields, FieldAggregation, FieldCondition, FieldMeta, FieldTypeOption, FieldTypeRegistry, FieldTypesConfig, FieldsOverride, FileFieldConfig, FileRef, FileRefError, FlowStep, FlowTransition, FormBuilderPluginOptions, FormButtonSettings, FormDocument, FormEvent, FormEventSink, FormFieldDefinition, FormFieldFormat, FormFieldInstance, FormFieldValidate, FormFieldValueKind, FormFlow, FormPollSettings, FormResponseSettings, FormResultsAccess, FormResultsAccessArgs, FromAddressOption, FromAddressesResolver, IdentifyFn, OmittableSharedField, PollOptionSourceOption, PollOptionSourceRegistry, PollOptionSourcesConfig, PrefillOptions, PresentationDensity, PresentationDescriptor, PresentationSurface, RateLimitCheckArgs, RateLimitConfig, RateLimitResult, RateLimiter, RecallResolver, ResolveConsentEntriesArgs, ResolveConsentSourcesRequestArgs, ResolveConsentSourcesRequestResult, ResolveConsentStatementsArgs, ResolvePublishedVersionRefArgs, ResolveResultsRequestArgs, ResolveResultsRequestResult, RichTextBodyOption, SpamConfig, SpamMetadataConfig, SpamOption, SubmissionDescriptor, SubmissionFieldError, SubmissionStatusFilter, SubmissionValue, SubmissionWidth, UploadsOption, ValidationRuleDefinition, ValidationRuleOption, ValidationRuleRegistry, ValidationRuleResult, ValidationRulesConfig };
@@ -1,24 +1,45 @@
1
1
  import { keys } from "../translations/keys.js";
2
2
  import { labelFor } from "../translations/server.js";
3
3
  import { buildConditionTypeMap } from "../conditions/conditionType.js";
4
- import { buildConsentSourceConfig } from "../consent/buildConsentSourceConfig.js";
5
4
  import { buildRuleBlocks } from "../validation/buildRuleBlocks.js";
6
- import { sharedFieldConfig } from "./sharedConfig.js";
5
+ import { fieldBlockTabs } from "./sharedConfig.js";
7
6
  //#region src/fields/buildFieldBlocks.ts
8
- /** One add-field block per registered type: shared config, the type's own config, then its validations. */
9
- const buildFieldBlocks = (registry, ruleRegistry, consentRegistry) => {
7
+ const FIELD_BLOCK_LABEL_REF = "@10x-media/form-builder/client#FieldBlockLabel";
8
+ /**
9
+ * Replace Payload's default `blockName` row header (which reads "Untitled" until filled) with the
10
+ * field's own `label`, keyed to the type label as fallback. See `FieldBlockLabel`.
11
+ */
12
+ const blockLabelAdmin = (typeLabelKey, ref = FIELD_BLOCK_LABEL_REF) => ({ components: { Label: {
13
+ path: ref,
14
+ clientProps: { typeLabelKey }
15
+ } } });
16
+ /** Whether `fields` contains a field named `name`, descending into presentational rows. */
17
+ const hasNameField = (fields) => fields.some((f) => {
18
+ if ("name" in f && f.name === "name") return true;
19
+ return f.type === "row" && hasNameField(f.fields);
20
+ });
21
+ /** The tab whose fields hold the shared basics and type config, found by the `name` field it carries. */
22
+ const fieldTabOf = (block) => {
23
+ return block.fields.find((f) => f.type === "tabs")?.tabs.find((tab) => hasNameField(tab.fields))?.fields;
24
+ };
25
+ const buildFieldBlocks = ({ registry, ruleRegistry, localize = true }) => {
10
26
  const conditionTypes = buildConditionTypeMap(registry);
11
27
  const blocks = [];
28
+ const bareSlugs = /* @__PURE__ */ new Set();
12
29
  for (const definition of registry.values()) {
13
- let typeConfig = definition.config ?? [];
14
- if (definition.type === "consent" && consentRegistry) {
15
- const statement = typeConfig.find((f) => f.name === "statement");
16
- const optional = typeConfig.find((f) => f.name === "optional");
17
- typeConfig = [
18
- ...statement ? [statement] : [],
19
- ...buildConsentSourceConfig(consentRegistry),
20
- ...optional ? [optional] : []
21
- ];
30
+ const typeConfig = definition.config ?? [];
31
+ if (definition.bare === true) {
32
+ bareSlugs.add(definition.type);
33
+ blocks.push({
34
+ slug: definition.type,
35
+ labels: {
36
+ singular: labelFor(definition.label),
37
+ plural: labelFor(definition.label)
38
+ },
39
+ admin: blockLabelAdmin(definition.label, definition.blockLabel),
40
+ fields: typeConfig
41
+ });
42
+ continue;
22
43
  }
23
44
  blocks.push({
24
45
  slug: definition.type,
@@ -26,31 +47,31 @@ const buildFieldBlocks = (registry, ruleRegistry, consentRegistry) => {
26
47
  singular: labelFor(definition.label),
27
48
  plural: labelFor(definition.label)
28
49
  },
29
- fields: [
30
- ...sharedFieldConfig(conditionTypes),
31
- ...typeConfig,
32
- {
50
+ admin: blockLabelAdmin(definition.label, definition.blockLabel),
51
+ fields: [fieldBlockTabs({
52
+ conditionTypes,
53
+ typeConfig,
54
+ validations: {
33
55
  name: "validations",
34
56
  type: "blocks",
35
57
  label: labelFor(keys.validationsLabel),
36
58
  blocks: buildRuleBlocks(ruleRegistry, definition.type)
37
- }
38
- ]
59
+ },
60
+ localize,
61
+ omitShared: definition.omitShared,
62
+ advancedConfig: definition.advancedConfig
63
+ })]
39
64
  });
40
65
  }
41
66
  const repeaterBlock = blocks.find((b) => b.slug === "repeater");
42
67
  if (repeaterBlock) {
43
- const subFieldBlocks = blocks.filter((b) => b.slug !== "repeater");
44
- const fieldsArr = repeaterBlock.fields;
45
- const validationsIdx = fieldsArr.findIndex((f) => f.name === "validations");
46
68
  const subFieldsField = {
47
69
  name: "subFields",
48
70
  type: "blocks",
49
71
  label: labelFor(keys.configSubFields),
50
- blocks: subFieldBlocks
72
+ blocks: blocks.filter((b) => b.slug !== "repeater" && !bareSlugs.has(b.slug))
51
73
  };
52
- if (validationsIdx >= 0) fieldsArr.splice(validationsIdx, 0, subFieldsField);
53
- else fieldsArr.push(subFieldsField);
74
+ (fieldTabOf(repeaterBlock) ?? repeaterBlock.fields).push(subFieldsField);
54
75
  }
55
76
  return blocks;
56
77
  };
@@ -1 +1 @@
1
- {"version":3,"file":"buildFieldBlocks.js","names":[],"sources":["../../src/fields/buildFieldBlocks.ts"],"sourcesContent":["import type { Block, Field } from 'payload'\nimport { buildConditionTypeMap } from '../conditions/conditionType'\nimport { buildConsentSourceConfig } from '../consent/buildConsentSourceConfig'\nimport type { ConsentSourceRegistry } from '../consent/registry'\nimport { keys } from '../translations/keys'\nimport { labelFor } from '../translations/server'\nimport { buildRuleBlocks } from '../validation/buildRuleBlocks'\nimport type { ValidationRuleRegistry } from '../validation/registry'\nimport type { FieldTypeRegistry } from './registry'\nimport { sharedFieldConfig } from './sharedConfig'\n\n/** One add-field block per registered type: shared config, the type's own config, then its validations. */\nexport const buildFieldBlocks = (\n\tregistry: FieldTypeRegistry,\n\truleRegistry: ValidationRuleRegistry,\n\tconsentRegistry?: ConsentSourceRegistry\n): Block[] => {\n\tconst conditionTypes = buildConditionTypeMap(registry)\n\tconst blocks: Block[] = []\n\tfor (const definition of registry.values()) {\n\t\tlet typeConfig: Field[] = definition.config ?? []\n\n\t\t// Inject dynamic source select + conditional sourceConfig group for the consent field.\n\t\t// consent.ts intentionally omits source/sourceConfig; the live registry drives the\n\t\t// select options and per-source field visibility (admin.condition).\n\t\tif (definition.type === 'consent' && consentRegistry) {\n\t\t\t// statement is first; optional is last; source/sourceConfig go in between.\n\t\t\tconst statement = typeConfig.find((f) => (f as { name?: string }).name === 'statement')\n\t\t\tconst optional = typeConfig.find((f) => (f as { name?: string }).name === 'optional')\n\t\t\ttypeConfig = [\n\t\t\t\t...(statement ? [statement] : []),\n\t\t\t\t...buildConsentSourceConfig(consentRegistry),\n\t\t\t\t...(optional ? [optional] : []),\n\t\t\t]\n\t\t}\n\n\t\tblocks.push({\n\t\t\tslug: definition.type,\n\t\t\tlabels: { singular: labelFor(definition.label), plural: labelFor(definition.label) },\n\t\t\tfields: [\n\t\t\t\t...sharedFieldConfig(conditionTypes),\n\t\t\t\t...typeConfig,\n\t\t\t\t{\n\t\t\t\t\tname: 'validations',\n\t\t\t\t\ttype: 'blocks',\n\t\t\t\t\tlabel: labelFor(keys.validationsLabel),\n\t\t\t\t\tblocks: buildRuleBlocks(ruleRegistry, definition.type),\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\t}\n\n\t// Second pass: inject subFields into the repeater block using all non-repeater blocks.\n\t// Done after the main loop so every sibling block is already built.\n\t// Repeater-in-repeater is not supported in v1; the repeater block is excluded from subFields.\n\tconst repeaterBlock = blocks.find((b) => b.slug === 'repeater')\n\tif (repeaterBlock) {\n\t\tconst subFieldBlocks = blocks.filter((b) => b.slug !== 'repeater')\n\t\tconst fieldsArr = repeaterBlock.fields as Field[]\n\t\tconst validationsIdx = fieldsArr.findIndex(\n\t\t\t(f) => (f as { name?: string }).name === 'validations'\n\t\t)\n\t\tconst subFieldsField: Field = {\n\t\t\tname: 'subFields',\n\t\t\ttype: 'blocks',\n\t\t\tlabel: labelFor(keys.configSubFields),\n\t\t\tblocks: subFieldBlocks,\n\t\t}\n\t\tif (validationsIdx >= 0) {\n\t\t\tfieldsArr.splice(validationsIdx, 0, subFieldsField)\n\t\t} else {\n\t\t\tfieldsArr.push(subFieldsField)\n\t\t}\n\t}\n\n\treturn blocks\n}\n"],"mappings":";;;;;;;;AAYA,MAAa,oBACZ,UACA,cACA,oBACa;CACb,MAAM,iBAAiB,sBAAsB,QAAQ;CACrD,MAAM,SAAkB,CAAC;CACzB,KAAK,MAAM,cAAc,SAAS,OAAO,GAAG;EAC3C,IAAI,aAAsB,WAAW,UAAU,CAAC;EAKhD,IAAI,WAAW,SAAS,aAAa,iBAAiB;GAErD,MAAM,YAAY,WAAW,MAAM,MAAO,EAAwB,SAAS,WAAW;GACtF,MAAM,WAAW,WAAW,MAAM,MAAO,EAAwB,SAAS,UAAU;GACpF,aAAa;IACZ,GAAI,YAAY,CAAC,SAAS,IAAI,CAAC;IAC/B,GAAG,yBAAyB,eAAe;IAC3C,GAAI,WAAW,CAAC,QAAQ,IAAI,CAAC;GAC9B;EACD;EAEA,OAAO,KAAK;GACX,MAAM,WAAW;GACjB,QAAQ;IAAE,UAAU,SAAS,WAAW,KAAK;IAAG,QAAQ,SAAS,WAAW,KAAK;GAAE;GACnF,QAAQ;IACP,GAAG,kBAAkB,cAAc;IACnC,GAAG;IACH;KACC,MAAM;KACN,MAAM;KACN,OAAO,SAAS,KAAK,gBAAgB;KACrC,QAAQ,gBAAgB,cAAc,WAAW,IAAI;IACtD;GACD;EACD,CAAC;CACF;CAKA,MAAM,gBAAgB,OAAO,MAAM,MAAM,EAAE,SAAS,UAAU;CAC9D,IAAI,eAAe;EAClB,MAAM,iBAAiB,OAAO,QAAQ,MAAM,EAAE,SAAS,UAAU;EACjE,MAAM,YAAY,cAAc;EAChC,MAAM,iBAAiB,UAAU,WAC/B,MAAO,EAAwB,SAAS,aAC1C;EACA,MAAM,iBAAwB;GAC7B,MAAM;GACN,MAAM;GACN,OAAO,SAAS,KAAK,eAAe;GACpC,QAAQ;EACT;EACA,IAAI,kBAAkB,GACrB,UAAU,OAAO,gBAAgB,GAAG,cAAc;OAElD,UAAU,KAAK,cAAc;CAE/B;CAEA,OAAO;AACR"}
1
+ {"version":3,"file":"buildFieldBlocks.js","names":[],"sources":["../../src/fields/buildFieldBlocks.ts"],"sourcesContent":["import type { Block, Field, TabsField } from 'payload'\nimport { buildConditionTypeMap } from '../conditions/conditionType'\nimport { keys } from '../translations/keys'\nimport { labelFor } from '../translations/server'\nimport { buildRuleBlocks } from '../validation/buildRuleBlocks'\nimport type { ValidationRuleRegistry } from '../validation/registry'\nimport type { FieldTypeRegistry } from './registry'\nimport { fieldBlockTabs } from './sharedConfig'\n\nconst FIELD_BLOCK_LABEL_REF = '@10x-media/form-builder/client#FieldBlockLabel'\n\n/**\n * Replace Payload's default `blockName` row header (which reads \"Untitled\" until filled) with the\n * field's own `label`, keyed to the type label as fallback. See `FieldBlockLabel`.\n */\nconst blockLabelAdmin = (\n\ttypeLabelKey: string,\n\tref: string = FIELD_BLOCK_LABEL_REF\n): NonNullable<Block['admin']> => ({\n\tcomponents: { Label: { path: ref, clientProps: { typeLabelKey } } },\n})\n\n/** Whether `fields` contains a field named `name`, descending into presentational rows. */\nconst hasNameField = (fields: Field[]): boolean =>\n\tfields.some((f) => {\n\t\tif ('name' in f && f.name === 'name') {\n\t\t\treturn true\n\t\t}\n\t\treturn f.type === 'row' && hasNameField(f.fields)\n\t})\n\n/** The tab whose fields hold the shared basics and type config, found by the `name` field it carries. */\nconst fieldTabOf = (block: Block): Field[] | undefined => {\n\tconst tabsField = block.fields.find((f): f is TabsField => f.type === 'tabs')\n\treturn tabsField?.tabs.find((tab) => hasNameField(tab.fields))?.fields\n}\n\n/**\n * One add-field block per registered type: tabs holding shared config, type config, and\n * validations. Bare definitions (e.g. `message`) skip all of that: their block is the\n * definition's `config` alone, no name/shared basics/tabs. `localize` controls whether the\n * shared content fields carry `localized: true`; per-type config fields carry their own flag\n * from the registry definitions.\n */\ntype BuildFieldBlocksArgs = {\n\tregistry: FieldTypeRegistry\n\truleRegistry: ValidationRuleRegistry\n\tlocalize?: boolean\n}\n\nexport const buildFieldBlocks = ({\n\tregistry,\n\truleRegistry,\n\tlocalize = true,\n}: BuildFieldBlocksArgs): Block[] => {\n\tconst conditionTypes = buildConditionTypeMap(registry)\n\tconst blocks: Block[] = []\n\tconst bareSlugs = new Set<string>()\n\tfor (const definition of registry.values()) {\n\t\tconst typeConfig: Field[] = definition.config ?? []\n\n\t\tif (definition.bare === true) {\n\t\t\tbareSlugs.add(definition.type)\n\t\t\tblocks.push({\n\t\t\t\tslug: definition.type,\n\t\t\t\tlabels: { singular: labelFor(definition.label), plural: labelFor(definition.label) },\n\t\t\t\tadmin: blockLabelAdmin(definition.label, definition.blockLabel),\n\t\t\t\tfields: typeConfig,\n\t\t\t})\n\t\t\tcontinue\n\t\t}\n\n\t\tblocks.push({\n\t\t\tslug: definition.type,\n\t\t\tlabels: { singular: labelFor(definition.label), plural: labelFor(definition.label) },\n\t\t\tadmin: blockLabelAdmin(definition.label, definition.blockLabel),\n\t\t\tfields: [\n\t\t\t\tfieldBlockTabs({\n\t\t\t\t\tconditionTypes,\n\t\t\t\t\ttypeConfig,\n\t\t\t\t\tvalidations: {\n\t\t\t\t\t\tname: 'validations',\n\t\t\t\t\t\ttype: 'blocks',\n\t\t\t\t\t\tlabel: labelFor(keys.validationsLabel),\n\t\t\t\t\t\tblocks: buildRuleBlocks(ruleRegistry, definition.type),\n\t\t\t\t\t},\n\t\t\t\t\tlocalize,\n\t\t\t\t\tomitShared: definition.omitShared,\n\t\t\t\t\tadvancedConfig: definition.advancedConfig,\n\t\t\t\t}),\n\t\t\t],\n\t\t})\n\t}\n\n\t// Second pass: inject subFields into the repeater block using all non-repeater blocks.\n\t// Done after the main loop so every sibling block is already built.\n\t// Repeater-in-repeater is not supported in v1; the repeater block is excluded from subFields.\n\t// Bare blocks are excluded too: repeater row plumbing (values, composite error paths) is name-keyed.\n\tconst repeaterBlock = blocks.find((b) => b.slug === 'repeater')\n\tif (repeaterBlock) {\n\t\tconst subFieldsField: Field = {\n\t\t\tname: 'subFields',\n\t\t\ttype: 'blocks',\n\t\t\tlabel: labelFor(keys.configSubFields),\n\t\t\tblocks: blocks.filter((b) => b.slug !== 'repeater' && !bareSlugs.has(b.slug)),\n\t\t}\n\t\tconst fieldTabFields = fieldTabOf(repeaterBlock)\n\t\t;(fieldTabFields ?? (repeaterBlock.fields as Field[])).push(subFieldsField)\n\t}\n\n\treturn blocks\n}\n"],"mappings":";;;;;;AASA,MAAM,wBAAwB;;;;;AAM9B,MAAM,mBACL,cACA,MAAc,2BACoB,EAClC,YAAY,EAAE,OAAO;CAAE,MAAM;CAAK,aAAa,EAAE,aAAa;AAAE,EAAE,EACnE;;AAGA,MAAM,gBAAgB,WACrB,OAAO,MAAM,MAAM;CAClB,IAAI,UAAU,KAAK,EAAE,SAAS,QAC7B,OAAO;CAER,OAAO,EAAE,SAAS,SAAS,aAAa,EAAE,MAAM;AACjD,CAAC;;AAGF,MAAM,cAAc,UAAsC;CAEzD,OADkB,MAAM,OAAO,MAAM,MAAsB,EAAE,SAAS,MACvD,GAAG,KAAK,MAAM,QAAQ,aAAa,IAAI,MAAM,CAAC,GAAG;AACjE;AAeA,MAAa,oBAAoB,EAChC,UACA,cACA,WAAW,WACyB;CACpC,MAAM,iBAAiB,sBAAsB,QAAQ;CACrD,MAAM,SAAkB,CAAC;CACzB,MAAM,4BAAY,IAAI,IAAY;CAClC,KAAK,MAAM,cAAc,SAAS,OAAO,GAAG;EAC3C,MAAM,aAAsB,WAAW,UAAU,CAAC;EAElD,IAAI,WAAW,SAAS,MAAM;GAC7B,UAAU,IAAI,WAAW,IAAI;GAC7B,OAAO,KAAK;IACX,MAAM,WAAW;IACjB,QAAQ;KAAE,UAAU,SAAS,WAAW,KAAK;KAAG,QAAQ,SAAS,WAAW,KAAK;IAAE;IACnF,OAAO,gBAAgB,WAAW,OAAO,WAAW,UAAU;IAC9D,QAAQ;GACT,CAAC;GACD;EACD;EAEA,OAAO,KAAK;GACX,MAAM,WAAW;GACjB,QAAQ;IAAE,UAAU,SAAS,WAAW,KAAK;IAAG,QAAQ,SAAS,WAAW,KAAK;GAAE;GACnF,OAAO,gBAAgB,WAAW,OAAO,WAAW,UAAU;GAC9D,QAAQ,CACP,eAAe;IACd;IACA;IACA,aAAa;KACZ,MAAM;KACN,MAAM;KACN,OAAO,SAAS,KAAK,gBAAgB;KACrC,QAAQ,gBAAgB,cAAc,WAAW,IAAI;IACtD;IACA;IACA,YAAY,WAAW;IACvB,gBAAgB,WAAW;GAC5B,CAAC,CACF;EACD,CAAC;CACF;CAMA,MAAM,gBAAgB,OAAO,MAAM,MAAM,EAAE,SAAS,UAAU;CAC9D,IAAI,eAAe;EAClB,MAAM,iBAAwB;GAC7B,MAAM;GACN,MAAM;GACN,OAAO,SAAS,KAAK,eAAe;GACpC,QAAQ,OAAO,QAAQ,MAAM,EAAE,SAAS,cAAc,CAAC,UAAU,IAAI,EAAE,IAAI,CAAC;EAC7E;EAEC,CADsB,WAAW,aACnB,KAAM,cAAc,QAAoB,KAAK,cAAc;CAC3E;CAEA,OAAO;AACR"}
@@ -0,0 +1,17 @@
1
+ import { PayloadRequest } from "payload";
2
+
3
+ //#region src/fields/builtin/calculation.d.ts
4
+ /**
5
+ * Serializable calc-source metadata for the admin builder (threaded as clientProps): key, display
6
+ * label, and which modes the source implements (`scalar` = has `resolve`, `weights` = has
7
+ * `resolveWeights`). Derived where the registry is resolved; resolver functions never serialize.
8
+ */
9
+ type CalcSourceClientMeta = {
10
+ key: string;
11
+ label: string | Record<string, string>;
12
+ scalar: boolean;
13
+ weights: boolean;
14
+ };
15
+ //#endregion
16
+ export { CalcSourceClientMeta };
17
+ //# sourceMappingURL=calculation.d.ts.map