@namroodinc/liquid-editorial 0.8.0 → 0.9.0

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 (267) hide show
  1. package/README.md +13 -7
  2. package/UPGRADING.md +142 -0
  3. package/dist/chunks/{Avatar-6t78C9Np.js → Avatar-BK8IdL5W.js} +2 -2
  4. package/dist/chunks/{Avatar-6t78C9Np.js.map → Avatar-BK8IdL5W.js.map} +1 -1
  5. package/dist/chunks/{Avatar-Cvj_DqG0.cjs → Avatar-DPnrvkwd.cjs} +2 -2
  6. package/dist/chunks/{Avatar-Cvj_DqG0.cjs.map → Avatar-DPnrvkwd.cjs.map} +1 -1
  7. package/dist/chunks/{CollectionView-B18Ihv7X.cjs → CollectionView-BNYx29b1.cjs} +2 -2
  8. package/dist/chunks/{CollectionView-B18Ihv7X.cjs.map → CollectionView-BNYx29b1.cjs.map} +1 -1
  9. package/dist/chunks/{CollectionView-C-SwkPWC.js → CollectionView-Vj84E26b.js} +2 -2
  10. package/dist/chunks/{CollectionView-C-SwkPWC.js.map → CollectionView-Vj84E26b.js.map} +1 -1
  11. package/dist/chunks/{ColourField-Dohdx7eW.cjs → ColourField-C1qjpIfB.cjs} +2 -2
  12. package/dist/chunks/{ColourField-Dohdx7eW.cjs.map → ColourField-C1qjpIfB.cjs.map} +1 -1
  13. package/dist/chunks/{ColourField-DzZ--mQZ.js → ColourField-Ce2oaVcd.js} +2 -2
  14. package/dist/chunks/{ColourField-DzZ--mQZ.js.map → ColourField-Ce2oaVcd.js.map} +1 -1
  15. package/dist/chunks/{DatePicker-Bjc4D8Kg.cjs → DatePicker-BCnzFJFF.cjs} +2 -2
  16. package/dist/chunks/{DatePicker-Bjc4D8Kg.cjs.map → DatePicker-BCnzFJFF.cjs.map} +1 -1
  17. package/dist/chunks/{DatePicker-DZVOtzoU.js → DatePicker-CnVmsCwO.js} +2 -2
  18. package/dist/chunks/{DatePicker-DZVOtzoU.js.map → DatePicker-CnVmsCwO.js.map} +1 -1
  19. package/dist/chunks/{Drawer-CcVF_p4b.cjs → Drawer-BDX9_qHA.cjs} +2 -2
  20. package/dist/chunks/Drawer-BDX9_qHA.cjs.map +1 -0
  21. package/dist/chunks/{Drawer-uhJvy3s9.js → Drawer-DTtgAZO2.js} +3 -3
  22. package/dist/chunks/Drawer-DTtgAZO2.js.map +1 -0
  23. package/dist/chunks/EntryPicker-Baqn0SQM.cjs +2 -0
  24. package/dist/chunks/EntryPicker-Baqn0SQM.cjs.map +1 -0
  25. package/dist/chunks/EntryPicker-DIYjKmBf.js +803 -0
  26. package/dist/chunks/EntryPicker-DIYjKmBf.js.map +1 -0
  27. package/dist/chunks/FormEditor-B7Pm_ZzT.cjs +2 -0
  28. package/dist/chunks/FormEditor-B7Pm_ZzT.cjs.map +1 -0
  29. package/dist/chunks/{FormEditor-D0J3JN-H.js → FormEditor-HqqFmu7s.js} +156 -150
  30. package/dist/chunks/FormEditor-HqqFmu7s.js.map +1 -0
  31. package/dist/chunks/{RichTextEditor-B6H6_3wk.js → RichTextEditor-CuZnjiy2.js} +86 -86
  32. package/dist/chunks/RichTextEditor-CuZnjiy2.js.map +1 -0
  33. package/dist/chunks/RichTextEditor-DcbLho2Q.cjs +2 -0
  34. package/dist/chunks/RichTextEditor-DcbLho2Q.cjs.map +1 -0
  35. package/dist/chunks/{dialogLabel-3EeaH1Zl.cjs → dialogLabel-2HRYMHbF.cjs} +2 -2
  36. package/dist/chunks/{dialogLabel-3EeaH1Zl.cjs.map → dialogLabel-2HRYMHbF.cjs.map} +1 -1
  37. package/dist/chunks/{dialogLabel-BjtTix5C.js → dialogLabel-D18maX-p.js} +2 -2
  38. package/dist/chunks/{dialogLabel-BjtTix5C.js.map → dialogLabel-D18maX-p.js.map} +1 -1
  39. package/dist/chunks/{frame-CycTDnzE.js → frame-CzadNYgy.js} +3 -3
  40. package/dist/chunks/{frame-CycTDnzE.js.map → frame-CzadNYgy.js.map} +1 -1
  41. package/dist/chunks/{frame-BtIh7K-M.cjs → frame-Mh99nmhR.cjs} +2 -2
  42. package/dist/chunks/{frame-BtIh7K-M.cjs.map → frame-Mh99nmhR.cjs.map} +1 -1
  43. package/dist/chunks/group-CJA3-3s5.js +35 -0
  44. package/dist/chunks/group-CJA3-3s5.js.map +1 -0
  45. package/dist/chunks/group-DRSLOsXu.cjs +2 -0
  46. package/dist/chunks/group-DRSLOsXu.cjs.map +1 -0
  47. package/dist/chunks/limit-BNo4dlRj.cjs +2 -0
  48. package/dist/chunks/limit-BNo4dlRj.cjs.map +1 -0
  49. package/dist/chunks/{limit-BHHST_0G.js → limit-s9zfxIMC.js} +5 -4
  50. package/dist/chunks/limit-s9zfxIMC.js.map +1 -0
  51. package/dist/chunks/overlayLayer-IuoPVwTO.js +158 -0
  52. package/dist/chunks/overlayLayer-IuoPVwTO.js.map +1 -0
  53. package/dist/chunks/overlayLayer-seJG-EFn.cjs +2 -0
  54. package/dist/chunks/overlayLayer-seJG-EFn.cjs.map +1 -0
  55. package/dist/chunks/useIsomorphicLayoutEffect-Bc9hxFMc.js +7 -0
  56. package/dist/chunks/useIsomorphicLayoutEffect-Bc9hxFMc.js.map +1 -0
  57. package/dist/chunks/useIsomorphicLayoutEffect-XM4Ot6x5.cjs +2 -0
  58. package/dist/chunks/useIsomorphicLayoutEffect-XM4Ot6x5.cjs.map +1 -0
  59. package/dist/chunks/{useLimit-WWWDacob.cjs → useLimit-CCv6sAUS.cjs} +2 -2
  60. package/dist/chunks/{useLimit-WWWDacob.cjs.map → useLimit-CCv6sAUS.cjs.map} +1 -1
  61. package/dist/chunks/{useLimit-C471qZ4H.js → useLimit-DZOKm4S_.js} +2 -2
  62. package/dist/chunks/{useLimit-C471qZ4H.js.map → useLimit-DZOKm4S_.js.map} +1 -1
  63. package/dist/chunks/{useTooltip-DtrE7QYu.cjs → useTooltip-BXAvQwt4.cjs} +2 -2
  64. package/dist/chunks/{useTooltip-DtrE7QYu.cjs.map → useTooltip-BXAvQwt4.cjs.map} +1 -1
  65. package/dist/chunks/{useTooltip-DajWQyNL.js → useTooltip-BrC7FdeH.js} +2 -2
  66. package/dist/chunks/{useTooltip-DajWQyNL.js.map → useTooltip-BrC7FdeH.js.map} +1 -1
  67. package/dist/components/AppShell/index.cjs +1 -1
  68. package/dist/components/AppShell/index.js +1 -1
  69. package/dist/components/Avatar/index.cjs +1 -1
  70. package/dist/components/Avatar/index.js +1 -1
  71. package/dist/components/Badge/style.css +1 -1
  72. package/dist/components/Choice/index.cjs +1 -1
  73. package/dist/components/Choice/index.cjs.map +1 -1
  74. package/dist/components/Choice/index.d.cts +13 -2
  75. package/dist/components/Choice/index.d.cts.map +1 -1
  76. package/dist/components/Choice/index.d.ts +13 -2
  77. package/dist/components/Choice/index.d.ts.map +1 -1
  78. package/dist/components/Choice/index.js +55 -35
  79. package/dist/components/Choice/index.js.map +1 -1
  80. package/dist/components/Choice/style.css +7 -2
  81. package/dist/components/CollectionView/index.cjs +1 -1
  82. package/dist/components/CollectionView/index.js +1 -1
  83. package/dist/components/ColourField/index.cjs +1 -1
  84. package/dist/components/ColourField/index.js +1 -1
  85. package/dist/components/DatePicker/index.cjs +1 -1
  86. package/dist/components/DatePicker/index.js +1 -1
  87. package/dist/components/Drawer/index.cjs +1 -1
  88. package/dist/components/Drawer/index.d.cts +4 -1
  89. package/dist/components/Drawer/index.d.cts.map +1 -1
  90. package/dist/components/Drawer/index.d.ts +4 -1
  91. package/dist/components/Drawer/index.d.ts.map +1 -1
  92. package/dist/components/Drawer/index.js +1 -1
  93. package/dist/components/Drawer/style.css +4 -1
  94. package/dist/components/EditLayout/index.cjs +1 -1
  95. package/dist/components/EditLayout/index.cjs.map +1 -1
  96. package/dist/components/EditLayout/index.d.cts.map +1 -1
  97. package/dist/components/EditLayout/index.d.ts.map +1 -1
  98. package/dist/components/EditLayout/index.js +62 -61
  99. package/dist/components/EditLayout/index.js.map +1 -1
  100. package/dist/components/EditLayout/style.css +12 -5
  101. package/dist/components/EntryPicker/blocked.d.cts +21 -0
  102. package/dist/components/EntryPicker/blocked.d.cts.map +1 -0
  103. package/dist/components/EntryPicker/blocked.d.ts +21 -0
  104. package/dist/components/EntryPicker/blocked.d.ts.map +1 -0
  105. package/dist/components/EntryPicker/dialog.d.cts +7 -3
  106. package/dist/components/EntryPicker/dialog.d.cts.map +1 -1
  107. package/dist/components/EntryPicker/dialog.d.ts +7 -3
  108. package/dist/components/EntryPicker/dialog.d.ts.map +1 -1
  109. package/dist/components/EntryPicker/index.cjs +1 -1
  110. package/dist/components/EntryPicker/index.d.cts.map +1 -1
  111. package/dist/components/EntryPicker/index.d.ts.map +1 -1
  112. package/dist/components/EntryPicker/index.js +1 -1
  113. package/dist/components/EntryPicker/item.d.cts +25 -1
  114. package/dist/components/EntryPicker/item.d.cts.map +1 -1
  115. package/dist/components/EntryPicker/item.d.ts +25 -1
  116. package/dist/components/EntryPicker/item.d.ts.map +1 -1
  117. package/dist/components/EntryPicker/limit.d.cts +25 -2
  118. package/dist/components/EntryPicker/limit.d.cts.map +1 -1
  119. package/dist/components/EntryPicker/limit.d.ts +25 -2
  120. package/dist/components/EntryPicker/limit.d.ts.map +1 -1
  121. package/dist/components/EntryPicker/results.d.cts +3 -4
  122. package/dist/components/EntryPicker/results.d.cts.map +1 -1
  123. package/dist/components/EntryPicker/results.d.ts +3 -4
  124. package/dist/components/EntryPicker/results.d.ts.map +1 -1
  125. package/dist/components/EntryPicker/selected-items.d.cts.map +1 -1
  126. package/dist/components/EntryPicker/selected-items.d.ts.map +1 -1
  127. package/dist/components/EntryPicker/style.css +79 -12
  128. package/dist/components/EntryPicker/types.d.cts +8 -0
  129. package/dist/components/EntryPicker/types.d.cts.map +1 -1
  130. package/dist/components/EntryPicker/types.d.ts +8 -0
  131. package/dist/components/EntryPicker/types.d.ts.map +1 -1
  132. package/dist/components/EntryPicker/use-picker-scroll.d.cts +14 -0
  133. package/dist/components/EntryPicker/use-picker-scroll.d.cts.map +1 -0
  134. package/dist/components/EntryPicker/use-picker-scroll.d.ts +14 -0
  135. package/dist/components/EntryPicker/use-picker-scroll.d.ts.map +1 -0
  136. package/dist/components/Field/group.d.cts +1 -1
  137. package/dist/components/Field/group.d.cts.map +1 -1
  138. package/dist/components/Field/group.d.ts +1 -1
  139. package/dist/components/Field/group.d.ts.map +1 -1
  140. package/dist/components/Field/index.cjs +1 -1
  141. package/dist/components/Field/index.js +1 -1
  142. package/dist/components/Field/types.d.cts +3 -1
  143. package/dist/components/Field/types.d.cts.map +1 -1
  144. package/dist/components/Field/types.d.ts +3 -1
  145. package/dist/components/Field/types.d.ts.map +1 -1
  146. package/dist/components/FieldAffix/index.cjs +1 -1
  147. package/dist/components/FieldAffix/index.cjs.map +1 -1
  148. package/dist/components/FieldAffix/index.d.cts.map +1 -1
  149. package/dist/components/FieldAffix/index.d.ts.map +1 -1
  150. package/dist/components/FieldAffix/index.js +2 -1
  151. package/dist/components/FieldAffix/index.js.map +1 -1
  152. package/dist/components/FormEditor/README.md +31 -10
  153. package/dist/components/FormEditor/index.cjs +1 -1
  154. package/dist/components/FormEditor/index.d.cts.map +1 -1
  155. package/dist/components/FormEditor/index.d.ts.map +1 -1
  156. package/dist/components/FormEditor/index.js +1 -1
  157. package/dist/components/FormEditor/model.d.cts +9 -2
  158. package/dist/components/FormEditor/model.d.cts.map +1 -1
  159. package/dist/components/FormEditor/model.d.ts +9 -2
  160. package/dist/components/FormEditor/model.d.ts.map +1 -1
  161. package/dist/components/ImageCropper/index.cjs +1 -1
  162. package/dist/components/ImageCropper/index.cjs.map +1 -1
  163. package/dist/components/ImageCropper/index.d.cts.map +1 -1
  164. package/dist/components/ImageCropper/index.d.ts.map +1 -1
  165. package/dist/components/ImageCropper/index.js +30 -29
  166. package/dist/components/ImageCropper/index.js.map +1 -1
  167. package/dist/components/LimitReading/index.cjs +1 -1
  168. package/dist/components/LimitReading/index.cjs.map +1 -1
  169. package/dist/components/LimitReading/index.d.cts +1 -1
  170. package/dist/components/LimitReading/index.d.cts.map +1 -1
  171. package/dist/components/LimitReading/index.d.ts +1 -1
  172. package/dist/components/LimitReading/index.d.ts.map +1 -1
  173. package/dist/components/LimitReading/index.js +19 -14
  174. package/dist/components/LimitReading/index.js.map +1 -1
  175. package/dist/components/LimitReading/limit.d.cts +3 -3
  176. package/dist/components/LimitReading/limit.d.cts.map +1 -1
  177. package/dist/components/LimitReading/limit.d.ts +3 -3
  178. package/dist/components/LimitReading/limit.d.ts.map +1 -1
  179. package/dist/components/LimitReading/types.d.cts +8 -0
  180. package/dist/components/LimitReading/types.d.cts.map +1 -1
  181. package/dist/components/LimitReading/types.d.ts +8 -0
  182. package/dist/components/LimitReading/types.d.ts.map +1 -1
  183. package/dist/components/Menu/index.cjs +1 -1
  184. package/dist/components/Menu/index.js +1 -1
  185. package/dist/components/Modal/index.cjs +1 -1
  186. package/dist/components/Modal/index.cjs.map +1 -1
  187. package/dist/components/Modal/index.d.cts +4 -1
  188. package/dist/components/Modal/index.d.cts.map +1 -1
  189. package/dist/components/Modal/index.d.ts +4 -1
  190. package/dist/components/Modal/index.d.ts.map +1 -1
  191. package/dist/components/Modal/index.js +5 -3
  192. package/dist/components/Modal/index.js.map +1 -1
  193. package/dist/components/Modal/style.css +4 -1
  194. package/dist/components/Popover/index.cjs +1 -1
  195. package/dist/components/Popover/index.js +1 -1
  196. package/dist/components/RichTextEditor/expansion.d.cts.map +1 -1
  197. package/dist/components/RichTextEditor/expansion.d.ts.map +1 -1
  198. package/dist/components/RichTextEditor/index.cjs +1 -1
  199. package/dist/components/RichTextEditor/index.js +1 -1
  200. package/dist/components/SearchField/index.cjs +1 -1
  201. package/dist/components/SearchField/index.js +1 -1
  202. package/dist/components/Select/index.cjs +1 -1
  203. package/dist/components/Select/index.js +1 -1
  204. package/dist/components/SelectionCard/index.cjs +1 -1
  205. package/dist/components/SelectionCard/index.js +1 -1
  206. package/dist/components/SortableList/index.cjs +1 -1
  207. package/dist/components/SortableList/index.cjs.map +1 -1
  208. package/dist/components/SortableList/index.d.cts +2 -0
  209. package/dist/components/SortableList/index.d.cts.map +1 -1
  210. package/dist/components/SortableList/index.d.ts +2 -0
  211. package/dist/components/SortableList/index.d.ts.map +1 -1
  212. package/dist/components/SortableList/index.js +14 -13
  213. package/dist/components/SortableList/index.js.map +1 -1
  214. package/dist/components/SubNav/index.cjs +1 -1
  215. package/dist/components/SubNav/index.cjs.map +1 -1
  216. package/dist/components/SubNav/index.d.cts.map +1 -1
  217. package/dist/components/SubNav/index.d.ts.map +1 -1
  218. package/dist/components/SubNav/index.js +40 -31
  219. package/dist/components/SubNav/index.js.map +1 -1
  220. package/dist/components/SubNav/style.css +0 -14
  221. package/dist/components/TagsInput/index.cjs +1 -1
  222. package/dist/components/TagsInput/index.js +1 -1
  223. package/dist/components/TextField/index.cjs +1 -1
  224. package/dist/components/TextField/index.js +1 -1
  225. package/dist/components/Time/index.cjs +1 -1
  226. package/dist/components/Time/index.js +1 -1
  227. package/dist/index.cjs +1 -1
  228. package/dist/index.d.cts +1 -1
  229. package/dist/index.d.cts.map +1 -1
  230. package/dist/index.d.ts +1 -1
  231. package/dist/index.d.ts.map +1 -1
  232. package/dist/index.js +15 -15
  233. package/dist/internal/portalScope.d.cts.map +1 -1
  234. package/dist/internal/portalScope.d.ts.map +1 -1
  235. package/dist/internal/useIsomorphicLayoutEffect.d.cts +7 -0
  236. package/dist/internal/useIsomorphicLayoutEffect.d.cts.map +1 -0
  237. package/dist/internal/useIsomorphicLayoutEffect.d.ts +7 -0
  238. package/dist/internal/useIsomorphicLayoutEffect.d.ts.map +1 -0
  239. package/dist/internal/useLatest.d.cts.map +1 -1
  240. package/dist/internal/useLatest.d.ts.map +1 -1
  241. package/dist/internal/useModalDialog.d.cts.map +1 -1
  242. package/dist/internal/useModalDialog.d.ts.map +1 -1
  243. package/dist/tokens.css +1 -0
  244. package/package.json +1 -1
  245. package/dist/chunks/Drawer-CcVF_p4b.cjs.map +0 -1
  246. package/dist/chunks/Drawer-uhJvy3s9.js.map +0 -1
  247. package/dist/chunks/EntryPicker-CBquan7o.js +0 -685
  248. package/dist/chunks/EntryPicker-CBquan7o.js.map +0 -1
  249. package/dist/chunks/EntryPicker-Dq72wjTt.cjs +0 -2
  250. package/dist/chunks/EntryPicker-Dq72wjTt.cjs.map +0 -1
  251. package/dist/chunks/FormEditor-CTcnpR51.cjs +0 -2
  252. package/dist/chunks/FormEditor-CTcnpR51.cjs.map +0 -1
  253. package/dist/chunks/FormEditor-D0J3JN-H.js.map +0 -1
  254. package/dist/chunks/RichTextEditor-B6H6_3wk.js.map +0 -1
  255. package/dist/chunks/RichTextEditor-BIopdEDA.cjs +0 -2
  256. package/dist/chunks/RichTextEditor-BIopdEDA.cjs.map +0 -1
  257. package/dist/chunks/group-67F_I1yw.js +0 -34
  258. package/dist/chunks/group-67F_I1yw.js.map +0 -1
  259. package/dist/chunks/group-BSJHLagi.cjs +0 -2
  260. package/dist/chunks/group-BSJHLagi.cjs.map +0 -1
  261. package/dist/chunks/limit-BBnpe9o9.cjs +0 -2
  262. package/dist/chunks/limit-BBnpe9o9.cjs.map +0 -1
  263. package/dist/chunks/limit-BHHST_0G.js.map +0 -1
  264. package/dist/chunks/overlayLayer-BgnMskpk.js +0 -158
  265. package/dist/chunks/overlayLayer-BgnMskpk.js.map +0 -1
  266. package/dist/chunks/overlayLayer-YVudmo27.cjs +0 -2
  267. package/dist/chunks/overlayLayer-YVudmo27.cjs.map +0 -1
@@ -1,22 +1,22 @@
1
1
  import { Button as e } from "../components/Button/index.js";
2
2
  import { Field as t } from "../components/Field/index.js";
3
3
  import { TextArea as n, TextField as r } from "../components/TextField/index.js";
4
- import { n as i, r as a, t as o } from "./RichTextEditor-B6H6_3wk.js";
4
+ import { n as i, r as a, t as o } from "./RichTextEditor-CuZnjiy2.js";
5
5
  import { Container as s } from "../components/Container/index.js";
6
- import { n as c, t as l } from "./EntryPicker-CBquan7o.js";
7
- import { Checkbox as u, ChoiceGroup as d, Radio as f } from "../components/Choice/index.js";
8
- import { n as p } from "./decimal-hq_W9D3s.js";
9
- import { t as m } from "./NumberField-CVsK4l9P.js";
10
- import { Select as h } from "../components/Select/index.js";
11
- import { Switch as g } from "../components/Switch/index.js";
12
- import { i as _ } from "./colour-CYEF4Q_n.js";
13
- import { t as v } from "./ColourField-DzZ--mQZ.js";
14
- import { i as y, n as b, r as ee, t as x } from "./Slider-Cab6NqhK.js";
15
- import { a as S, n as C } from "./DatePicker-DZVOtzoU.js";
16
- import { TagsInput as w } from "../components/TagsInput/index.js";
17
- import { CheckboxCard as te, RadioCard as ne, SelectionCardGroup as re } from "../components/SelectionCard/index.js";
18
- import { useMemo as T, useState as E } from "react";
19
- import { Fragment as ie, jsx as D, jsxs as O } from "react/jsx-runtime";
6
+ import { n as c, r as l, t as u } from "./EntryPicker-DIYjKmBf.js";
7
+ import { Checkbox as d, ChoiceGroup as f, Radio as p } from "../components/Choice/index.js";
8
+ import { n as m } from "./decimal-hq_W9D3s.js";
9
+ import { t as h } from "./NumberField-CVsK4l9P.js";
10
+ import { Select as g } from "../components/Select/index.js";
11
+ import { Switch as _ } from "../components/Switch/index.js";
12
+ import { i as v } from "./colour-CYEF4Q_n.js";
13
+ import { t as y } from "./ColourField-Ce2oaVcd.js";
14
+ import { i as b, n as x, r as S, t as ee } from "./Slider-Cab6NqhK.js";
15
+ import { a as te, n as ne } from "./DatePicker-CnVmsCwO.js";
16
+ import { TagsInput as re } from "../components/TagsInput/index.js";
17
+ import { CheckboxCard as C, RadioCard as w, SelectionCardGroup as T } from "../components/SelectionCard/index.js";
18
+ import { useMemo as E, useState as D } from "react";
19
+ import { Fragment as ie, jsx as O, jsxs as k } from "react/jsx-runtime";
20
20
  //#region src/components/RichTextEditor/expanded-width.ts
21
21
  var ae = ["wide", "full"], oe = [
22
22
  "sm",
@@ -41,22 +41,22 @@ var ae = ["wide", "full"], oe = [
41
41
  "date",
42
42
  "divider"
43
43
  ]);
44
- function k(e) {
44
+ function A(e) {
45
45
  let t = /* @__PURE__ */ new Set();
46
46
  for (let n of e.fields) {
47
47
  if (!n.id?.trim() || t.has(n.id)) throw Error("Form field IDs must be nonempty and unique.");
48
48
  if (!se.has(n.type)) throw Error(`Unsupported form field type: ${n.type}`);
49
- n.type !== "divider" && (ce(n), N(n), ue(n)), t.add(n.id);
49
+ n.type !== "divider" && (ce(n), P(n), ue(n)), t.add(n.id);
50
50
  }
51
51
  }
52
52
  function ce(e) {
53
53
  switch (e.type) {
54
54
  case "select":
55
55
  case "radioGroup":
56
- case "checkboxGroup": return I(e);
56
+ case "checkboxGroup": return L(e);
57
57
  case "slider":
58
- case "rangeSlider": return P(e);
59
- case "number": return F(e);
58
+ case "rangeSlider": return F(e);
59
+ case "number": return I(e);
60
60
  }
61
61
  }
62
62
  var le = /* @__PURE__ */ new Set([
@@ -66,18 +66,18 @@ var le = /* @__PURE__ */ new Set([
66
66
  "asset",
67
67
  "reference"
68
68
  ]);
69
- function A(e) {
69
+ function j(e) {
70
70
  return le.has(e.type);
71
71
  }
72
72
  function ue(e) {
73
- if (A(e)) {
73
+ if (j(e)) {
74
74
  if (e.limitDisplay !== void 0 && !["used", "remaining"].includes(e.limitDisplay)) throw Error(`Field ${e.id} needs a limitDisplay of used or remaining.`);
75
75
  if (e.limitVisibility !== void 0 && !["always", "nearLimit"].includes(e.limitVisibility)) throw Error(`Field ${e.id} needs a limitVisibility of always or nearLimit.`);
76
76
  if (e.showLimitRing !== void 0 && typeof e.showLimitRing != "boolean") throw Error(`Field ${e.id} needs a boolean showLimitRing.`);
77
77
  }
78
78
  }
79
79
  function de(e, t, n, r) {
80
- return A(e) ? {
80
+ return j(e) ? {
81
81
  limitDisplay: e.limitDisplay,
82
82
  limitVisibility: e.limitVisibility,
83
83
  showLimitRing: e.showLimitRing,
@@ -88,54 +88,60 @@ function fe(e, t, n, r) {
88
88
  switch (e.type) {
89
89
  case "shortText":
90
90
  case "longText": return e.maxLength === void 0 ? void 0 : {
91
- count: j(t).length,
91
+ count: M(t).length,
92
92
  max: e.maxLength
93
93
  };
94
94
  case "tags": return e.max === void 0 ? void 0 : {
95
- count: J(t).length,
95
+ count: q(t).length,
96
96
  max: e.max
97
97
  };
98
98
  default: {
99
- if (!e.multiple) return null;
100
- let { mode: t, max: i } = M(e, r);
101
- return c(t, n.length, i);
99
+ let { mode: t, max: i } = N(e, r);
100
+ return l(t, n.length, i);
102
101
  }
103
102
  }
104
103
  }
105
- function j(e) {
104
+ function pe(e, t, n, r) {
105
+ if (n !== void 0 && (e.type === "asset" || e.type === "reference")) {
106
+ let { mode: t, max: i } = N(e, r);
107
+ return c(t, n.length, i);
108
+ }
109
+ return e.type === "checkboxGroup" ? q(t).length : void 0;
110
+ }
111
+ function M(e) {
106
112
  return typeof e == "string" ? e : "";
107
113
  }
108
- function M(e, t) {
114
+ function N(e, t) {
109
115
  let n = t?.mode ?? (e.multiple ? "multiple" : "single");
110
116
  if (!e.multiple) return {
111
117
  mode: n,
112
118
  max: n === "multiple" ? 1 : void 0
113
119
  };
114
- let r = [z(e).max, t?.max].filter((e) => e !== void 0);
120
+ let r = [B(e).max, t?.max].filter((e) => e !== void 0 && Number.isFinite(e));
115
121
  return {
116
122
  mode: n,
117
123
  max: r.length > 0 ? Math.min(...r) : void 0
118
124
  };
119
125
  }
120
- function N(e) {
126
+ function P(e) {
121
127
  if (e.width !== void 0 && !oe.includes(e.width)) throw Error(`Field ${e.id} needs a width of sm, md or lg.`);
122
128
  if (e.type === "richText" && e.expandedWidth !== void 0 && !ae.includes(e.expandedWidth)) throw Error(`Rich text field ${e.id} needs an expandedWidth of wide or full.`);
123
129
  }
124
- function P(e) {
125
- let { min: t, max: n, step: r } = y(e);
130
+ function F(e) {
131
+ let { min: t, max: n, step: r } = b(e);
126
132
  if (![
127
133
  t,
128
134
  n,
129
135
  r
130
136
  ].every(Number.isFinite) || t >= n || r <= 0) throw Error(`Slider field ${e.id} needs finite min < max and a positive step.`);
131
- if (e.type === "rangeSlider" && r > p(n, -t)) throw Error(`Range slider ${e.id} needs room for at least one step.`);
137
+ if (e.type === "rangeSlider" && r > m(n, -t)) throw Error(`Range slider ${e.id} needs room for at least one step.`);
132
138
  }
133
- function F(e) {
139
+ function I(e) {
134
140
  let { min: t, max: n, step: r = "any" } = e;
135
141
  if ([t, n].some((e) => e !== void 0 && !Number.isFinite(e)) || t !== void 0 && n !== void 0 && t > n || r !== "any" && !(Number.isFinite(r) && r > 0)) throw Error(`Number field ${e.id} needs finite min <= max and a positive step or "any".`);
136
142
  if ([e.decreaseLabel, e.increaseLabel].some((e) => e !== void 0 && (typeof e != "string" || !e.trim()))) throw Error(`Number field ${e.id} needs nonempty stepper labels.`);
137
143
  }
138
- function I(e) {
144
+ function L(e) {
139
145
  if (!Array.isArray(e.options)) {
140
146
  let t = e.type === "select" ? "Select" : "Choice";
141
147
  throw Error(`${t} field ${e.id} needs an options array.`);
@@ -144,7 +150,7 @@ function I(e) {
144
150
  let t = e.options.map((e) => e.value);
145
151
  if (t.some((e) => typeof e != "string" || !e.trim()) || new Set(t).size !== t.length) throw Error(`Choice field ${e.id} needs nonempty, unique option values.`);
146
152
  }
147
- var L = {
153
+ var R = {
148
154
  asset: {
149
155
  key: "assetId",
150
156
  itemLabel: "asset",
@@ -156,11 +162,11 @@ var L = {
156
162
  itemsLabel: "entries"
157
163
  }
158
164
  };
159
- function R(e) {
165
+ function z(e) {
160
166
  return e.type === "asset" || e.type === "reference" ? e.picker?.label ?? e.label : e.label;
161
167
  }
162
- function z(e) {
163
- let t = L[e.type], { addLabel: n = `Choose ${R(e)}`, emptyLabel: r, itemLabel: i = t.itemLabel, itemsLabel: a = t.itemsLabel, max: o, isReorderable: s } = e.picker ?? {};
168
+ function B(e) {
169
+ let t = R[e.type], { addLabel: n = `Choose ${z(e)}`, emptyLabel: r, itemLabel: i = t.itemLabel, itemsLabel: a = t.itemsLabel, max: o, isReorderable: s } = e.picker ?? {};
164
170
  return {
165
171
  addLabel: n,
166
172
  emptyLabel: r,
@@ -170,8 +176,8 @@ function z(e) {
170
176
  isReorderable: s
171
177
  };
172
178
  }
173
- function B(e, t) {
174
- let { key: n } = L[e.type];
179
+ function me(e, t) {
180
+ let { key: n } = R[e.type];
175
181
  return (Array.isArray(t) ? t : t === void 0 ? [] : [t]).flatMap((e) => H(e, n) ? [e[n]] : []);
176
182
  }
177
183
  function V(e) {
@@ -188,52 +194,52 @@ function U(e) {
188
194
  return !!e.text?.trim() || e.type === "horizontalRule" || !!e.content?.some(U);
189
195
  }
190
196
  function W(e) {
191
- return `${R(e)} is required.`;
197
+ return `${z(e)} is required.`;
192
198
  }
193
199
  function G(e, t) {
194
200
  if (typeof t != "string") return "Enter text.";
195
201
  if (e.required && !t.trim()) return W(e);
196
202
  if ((e.type === "shortText" || e.type === "longText") && e.maxLength !== void 0 && t.length > e.maxLength) return `Enter no more than ${e.maxLength} characters.`;
197
203
  }
198
- function K(e, t) {
204
+ function he(e, t) {
199
205
  let n = i(t);
200
206
  if (n) return n;
201
207
  if (e.required && !U(t)) return W(e);
202
208
  }
203
- function q(e, t) {
209
+ function K(e, t) {
204
210
  if (typeof t != "string") return "Choose an available option.";
205
211
  if (t === "") return e.required ? W(e) : void 0;
206
212
  if ((e.type === "select" || e.type === "radioGroup") && e.options.length > 0 && !e.options.some((e) => e.value === t)) return "Choose an available option.";
207
213
  }
208
- function J(e) {
214
+ function q(e) {
209
215
  return Array.isArray(e) ? e.filter((e) => typeof e == "string") : [];
210
216
  }
211
- function Y(e, t) {
217
+ function J(e, t) {
212
218
  if (!Array.isArray(t) || !t.every((e) => typeof e == "string" && e.trim()) || new Set(t).size !== t.length) return "Enter a list of unique, nonempty text values.";
213
219
  if (e.required && !t.length) return W(e);
214
220
  if (e.type === "tags" && e.max !== void 0 && t.length > e.max) return `Enter no more than ${e.max} tags.`;
215
221
  if (e.type === "checkboxGroup" && e.options.length && t.some((t) => !e.options.some((e) => e.value === t))) return "Choose available options.";
216
222
  }
217
- function X(e, t) {
223
+ function Y(e, t) {
218
224
  if (typeof t != "number" || !Number.isFinite(t)) return "Enter a finite number.";
219
- let { min: n, max: r } = e.type === "slider" || e.type === "rangeSlider" ? y(e) : e.type === "number" ? e : {};
225
+ let { min: n, max: r } = e.type === "slider" || e.type === "rangeSlider" ? b(e) : e.type === "number" ? e : {};
220
226
  if (n !== void 0 && t < n) return `Enter a number of at least ${n}.`;
221
227
  if (r !== void 0 && t > r) return `Enter a number no greater than ${r}.`;
222
228
  }
223
- function pe(e, t) {
229
+ function ge(e, t) {
224
230
  if (typeof t != "string") return "Enter a valid calendar date (YYYY-MM-DD).";
225
231
  if (!t) return e.required ? W(e) : void 0;
226
- if (!S(t)) return "Enter a valid calendar date (YYYY-MM-DD).";
232
+ if (!te(t)) return "Enter a valid calendar date (YYYY-MM-DD).";
227
233
  if (e.type === "date") {
228
234
  if (e.min && t < e.min) return `Choose a date on or after ${e.min}.`;
229
235
  if (e.max && t > e.max) return `Choose a date on or before ${e.max}.`;
230
236
  }
231
237
  }
232
- function Z(e, t) {
233
- return typeof e == "number" && Number.isFinite(e) ? ee(e, t) : void 0;
238
+ function X(e, t) {
239
+ return typeof e == "number" && Number.isFinite(e) ? S(e, t) : void 0;
234
240
  }
235
- function me(e, t) {
236
- let n = e, r = Z(n?.min, t), i = Z(n?.max, t);
241
+ function _e(e, t) {
242
+ let n = e, r = X(n?.min, t), i = X(n?.max, t);
237
243
  if (r === void 0 && i === void 0) return;
238
244
  let [a, o] = [r ?? t.min, i ?? t.max].sort((e, t) => e - t);
239
245
  return {
@@ -241,56 +247,56 @@ function me(e, t) {
241
247
  max: o
242
248
  };
243
249
  }
244
- function he(e, t) {
250
+ function ve(e, t) {
245
251
  if (!t || typeof t != "object" || Array.isArray(t)) return "Enter a range.";
246
- let n = t, r = n.min, i = n.max, a = X(e, r) ?? X(e, i);
252
+ let n = t, r = n.min, i = n.max, a = Y(e, r) ?? Y(e, i);
247
253
  if (a) return a;
248
254
  if (r > i) return "The start must not be greater than the end.";
249
- if (e.type === "rangeSlider" && p(i, -r) < y(e).step) return "Keep the range endpoints at least one step apart.";
255
+ if (e.type === "rangeSlider" && m(i, -r) < b(e).step) return "Keep the range endpoints at least one step apart.";
250
256
  }
251
- function ge(e, t) {
252
- return typeof t == "string" ? t.trim() ? _(t) ? void 0 : "Enter a valid colour." : e.required ? W(e) : void 0 : "Enter a valid colour.";
257
+ function ye(e, t) {
258
+ return typeof t == "string" ? t.trim() ? v(t) ? void 0 : "Enter a valid colour." : e.required ? W(e) : void 0 : "Enter a valid colour.";
253
259
  }
254
- function Q(e, t) {
260
+ function Z(e, t) {
255
261
  if (e.type !== "asset" && e.type !== "reference") return;
256
- let { key: n, itemLabel: r, itemsLabel: i } = L[e.type];
262
+ let { key: n, itemLabel: r, itemsLabel: i } = R[e.type];
257
263
  if (!e.multiple) return H(t, n) ? void 0 : `Choose an ${r}.`;
258
264
  if (!Array.isArray(t) || !t.every((e) => H(e, n))) return `Choose a list of ${i}.`;
259
265
  if (e.required && t.length === 0) return W(e);
260
266
  let a = e.picker?.max;
261
- if (a !== void 0 && t.length > a) return `Choose no more than ${a} ${z(e).itemsLabel}.`;
267
+ if (a !== void 0 && t.length > a) return `Choose no more than ${a} ${B(e).itemsLabel}.`;
262
268
  }
263
- var _e = {
269
+ var be = {
264
270
  shortText: G,
265
271
  longText: G,
266
- richText: K,
267
- number: X,
268
- slider: X,
269
- rangeSlider: he,
270
- date: pe,
271
- colour: ge,
272
- radioGroup: q,
273
- checkboxGroup: Y,
274
- tags: Y,
272
+ richText: he,
273
+ number: Y,
274
+ slider: Y,
275
+ rangeSlider: ve,
276
+ date: ge,
277
+ colour: ye,
278
+ radioGroup: K,
279
+ checkboxGroup: J,
280
+ tags: J,
275
281
  boolean: (e, t) => typeof t == "boolean" ? void 0 : "Choose a boolean value.",
276
282
  dateTime: (e, t) => V(t) ? void 0 : "Enter a valid UTC date and time.",
277
- select: q,
278
- asset: Q,
279
- reference: Q
283
+ select: K,
284
+ asset: Z,
285
+ reference: Z
280
286
  };
281
- function $(e, t) {
282
- return t === void 0 ? e.required ? W(e) : void 0 : _e[e.type](e, t);
287
+ function Q(e, t) {
288
+ return t === void 0 ? e.required ? W(e) : void 0 : be[e.type](e, t);
283
289
  }
284
- function ve(e, t) {
285
- return k(e), Object.fromEntries(e.fields.flatMap((e) => {
290
+ function xe(e, t) {
291
+ return A(e), Object.fromEntries(e.fields.flatMap((e) => {
286
292
  if (e.type === "divider") return [];
287
- let n = $(e, Object.hasOwn(t, e.id) ? t[e.id] : void 0);
293
+ let n = Q(e, Object.hasOwn(t, e.id) ? t[e.id] : void 0);
288
294
  return n ? [[e.id, n]] : [];
289
295
  }));
290
296
  }
291
297
  //#endregion
292
298
  //#region src/components/FormEditor/choice-control.tsx
293
- function ye({ field: e, option: t, name: n, checked: r, isDisabled: i, invalid: a, onChange: o }) {
299
+ function Se({ field: e, option: t, name: n, checked: r, isDisabled: i, invalid: a, onChange: o }) {
294
300
  let s = {
295
301
  name: n,
296
302
  value: t.value,
@@ -302,29 +308,29 @@ function ye({ field: e, option: t, name: n, checked: r, isDisabled: i, invalid:
302
308
  }
303
309
  };
304
310
  if (e.appearance === "card") {
305
- let n = e.type === "radioGroup" ? ne : te;
306
- return /* @__PURE__ */ D(n, {
311
+ let n = e.type === "radioGroup" ? w : C;
312
+ return /* @__PURE__ */ O(n, {
307
313
  ...s,
308
314
  title: t.label,
309
315
  description: t.description
310
316
  });
311
317
  }
312
- let c = e.type === "radioGroup" ? f : u;
313
- return /* @__PURE__ */ D(c, {
318
+ let c = e.type === "radioGroup" ? p : d;
319
+ return /* @__PURE__ */ O(c, {
314
320
  ...s,
315
- children: /* @__PURE__ */ O("span", { children: [t.label, t.description && /* @__PURE__ */ D("span", {
321
+ children: /* @__PURE__ */ k("span", { children: [t.label, t.description && /* @__PURE__ */ O("span", {
316
322
  className: "ds-form-editor__option-description",
317
323
  children: t.description
318
324
  })] })
319
325
  });
320
326
  }
321
- function be({ field: t, stored: n, isDisabled: r, required: i, accessibility: a, onChange: o }) {
322
- let s = t.type === "checkboxGroup", c = s ? J(n) : typeof n == "string" && n ? [n] : [], l = t.appearance === "card" ? re : d;
323
- return /* @__PURE__ */ O(ie, { children: [/* @__PURE__ */ D(l, {
327
+ function Ce({ field: t, stored: n, isDisabled: r, required: i, accessibility: a, onChange: o }) {
328
+ let s = t.type === "checkboxGroup", c = s ? q(n) : typeof n == "string" && n ? [n] : [], l = t.appearance === "card" ? T : f;
329
+ return /* @__PURE__ */ k(ie, { children: [/* @__PURE__ */ O(l, {
324
330
  ...a,
325
331
  label: t.label,
326
332
  columns: t.columns ?? (t.appearance === "card" ? 2 : 1),
327
- children: t.options.map((e) => /* @__PURE__ */ D(ye, {
333
+ children: t.options.map((e) => /* @__PURE__ */ O(Se, {
328
334
  field: t,
329
335
  option: e,
330
336
  name: a.id,
@@ -335,7 +341,7 @@ function be({ field: t, stored: n, isDisabled: r, required: i, accessibility: a,
335
341
  o(s ? c.includes(e.value) ? c.filter((t) => t !== e.value) : [...c, e.value] : e.value);
336
342
  }
337
343
  }, e.value))
338
- }), !s && !i && c.length > 0 && /* @__PURE__ */ O(e, {
344
+ }), !s && !i && c.length > 0 && /* @__PURE__ */ k(e, {
339
345
  variant: "simple",
340
346
  size: "sm",
341
347
  isDisabled: r,
@@ -345,9 +351,9 @@ function be({ field: t, stored: n, isDisabled: r, required: i, accessibility: a,
345
351
  }
346
352
  //#endregion
347
353
  //#region src/components/FormEditor/additional-control.tsx
348
- function xe({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i }) {
349
- let a = y(e), o = Z(t, a);
350
- return /* @__PURE__ */ D(b, {
354
+ function we({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i }) {
355
+ let a = b(e), o = X(t, a);
356
+ return /* @__PURE__ */ O(x, {
351
357
  ...r,
352
358
  ...a,
353
359
  prefix: e.prefix,
@@ -363,9 +369,9 @@ function xe({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i
363
369
  }
364
370
  });
365
371
  }
366
- function Se({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i }) {
367
- let a = y(e), o = me(t, a);
368
- return /* @__PURE__ */ D(x, {
372
+ function Te({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i }) {
373
+ let a = b(e), o = _e(t, a);
374
+ return /* @__PURE__ */ O(ee, {
369
375
  ...r,
370
376
  ...a,
371
377
  prefix: e.prefix,
@@ -386,7 +392,7 @@ function Se({ field: e, stored: t, isDisabled: n, accessibility: r, onChange: i
386
392
  }
387
393
  });
388
394
  }
389
- function Ce({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
395
+ function Ee({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
390
396
  let o = {
391
397
  stored: t,
392
398
  isDisabled: n,
@@ -396,19 +402,19 @@ function Ce({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
396
402
  };
397
403
  switch (e.type) {
398
404
  case "radioGroup":
399
- case "checkboxGroup": return /* @__PURE__ */ D(be, {
405
+ case "checkboxGroup": return /* @__PURE__ */ O(Ce, {
400
406
  field: e,
401
407
  ...o
402
408
  });
403
- case "rangeSlider": return /* @__PURE__ */ D(Se, {
409
+ case "rangeSlider": return /* @__PURE__ */ O(Te, {
404
410
  field: e,
405
411
  ...o
406
412
  });
407
- case "slider": return /* @__PURE__ */ D(xe, {
413
+ case "slider": return /* @__PURE__ */ O(we, {
408
414
  field: e,
409
415
  ...o
410
416
  });
411
- case "colour": return /* @__PURE__ */ D(v, {
417
+ case "colour": return /* @__PURE__ */ O(y, {
412
418
  ...i,
413
419
  required: r,
414
420
  placeholder: e.placeholder,
@@ -422,20 +428,20 @@ function Ce({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
422
428
  value: typeof t == "string" ? t : "",
423
429
  onInput: (e) => {
424
430
  let t = e.currentTarget.value;
425
- t.trim() && !_(t) && a(t);
431
+ t.trim() && !v(t) && a(t);
426
432
  },
427
433
  onValueChange: (e) => a(e === "" ? void 0 : e)
428
434
  });
429
- case "tags": return /* @__PURE__ */ D(w, {
435
+ case "tags": return /* @__PURE__ */ O(re, {
430
436
  ...i,
431
437
  required: r,
432
438
  placeholder: e.placeholder,
433
439
  max: e.max,
434
440
  isDisabled: n,
435
- value: J(t),
441
+ value: q(t),
436
442
  onValueChange: a
437
443
  });
438
- case "date": return /* @__PURE__ */ D(C, {
444
+ case "date": return /* @__PURE__ */ O(ne, {
439
445
  ...i,
440
446
  placeholder: e.placeholder,
441
447
  min: e.min,
@@ -451,7 +457,7 @@ function Ce({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
451
457
  }
452
458
  //#endregion
453
459
  //#region src/components/FormEditor/control.tsx
454
- function we(e, t) {
460
+ function De(e, t) {
455
461
  if (e.type === "asset") {
456
462
  let n = t.map((e) => ({ assetId: e }));
457
463
  return e.multiple ? n : n[0];
@@ -459,8 +465,8 @@ function we(e, t) {
459
465
  let n = t.map((e) => ({ entryId: e }));
460
466
  return e.multiple ? n : n[0];
461
467
  }
462
- function Te({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
463
- return /* @__PURE__ */ D(m, {
468
+ function $({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
469
+ return /* @__PURE__ */ O(h, {
464
470
  ...i,
465
471
  required: r,
466
472
  isDisabled: n,
@@ -480,9 +486,9 @@ function Te({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
480
486
  }
481
487
  });
482
488
  }
483
- function Ee({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
489
+ function Oe({ field: e, stored: t, isDisabled: n, required: r, accessibility: i, onChange: a }) {
484
490
  let o = !r && !e.options.some((e) => e.value === "");
485
- return /* @__PURE__ */ D(h, {
491
+ return /* @__PURE__ */ O(g, {
486
492
  ...i,
487
493
  "aria-required": r || void 0,
488
494
  isDisabled: n,
@@ -497,19 +503,19 @@ function Ee({ field: e, stored: t, isDisabled: n, required: r, accessibility: i,
497
503
  onValueChange: (e) => a(e === "" ? void 0 : e)
498
504
  });
499
505
  }
500
- function De({ field: e, selected: t, items: n, source: r, isDisabled: i, accessibility: a, onChange: o }) {
501
- return /* @__PURE__ */ D(l, {
506
+ function ke({ field: e, selected: t, items: n, source: r, isDisabled: i, accessibility: a, onChange: o }) {
507
+ return /* @__PURE__ */ O(u, {
502
508
  ...a,
503
509
  ...r,
504
510
  items: n,
505
511
  value: t,
506
- ...z(e),
507
- ...M(e, r),
512
+ ...B(e),
513
+ ...N(e, r),
508
514
  isDisabled: i,
509
- onValueChange: (t) => o(we(e, t))
515
+ onValueChange: (t) => o(De(e, t))
510
516
  });
511
517
  }
512
- function Oe({ field: e, stored: t, selected: i, items: s, source: c, isDisabled: l, accessibility: { required: u, ...d }, onChange: f }) {
518
+ function Ae({ field: e, stored: t, selected: i, items: s, source: c, isDisabled: l, accessibility: { required: u, ...d }, onChange: f }) {
513
519
  let p = {
514
520
  stored: t,
515
521
  isDisabled: l,
@@ -518,7 +524,7 @@ function Oe({ field: e, stored: t, selected: i, items: s, source: c, isDisabled:
518
524
  onChange: f
519
525
  };
520
526
  switch (e.type) {
521
- case "shortText": return /* @__PURE__ */ D(r, {
527
+ case "shortText": return /* @__PURE__ */ O(r, {
522
528
  ...d,
523
529
  required: u,
524
530
  disabled: l,
@@ -527,10 +533,10 @@ function Oe({ field: e, stored: t, selected: i, items: s, source: c, isDisabled:
527
533
  maxLength: e.maxLength,
528
534
  readOnly: e.readOnly,
529
535
  autoFocus: e.autoFocus,
530
- value: j(t),
536
+ value: M(t),
531
537
  onChange: (e) => f(e.target.value)
532
538
  });
533
- case "longText": return /* @__PURE__ */ D(n, {
539
+ case "longText": return /* @__PURE__ */ O(n, {
534
540
  ...d,
535
541
  required: u,
536
542
  disabled: l,
@@ -539,21 +545,21 @@ function Oe({ field: e, stored: t, selected: i, items: s, source: c, isDisabled:
539
545
  maxLength: e.maxLength,
540
546
  readOnly: e.readOnly,
541
547
  autoFocus: e.autoFocus,
542
- value: j(t),
548
+ value: M(t),
543
549
  onChange: (e) => f(e.target.value)
544
550
  });
545
- case "number": return /* @__PURE__ */ D(Te, {
551
+ case "number": return /* @__PURE__ */ O($, {
546
552
  field: e,
547
553
  ...p
548
554
  });
549
- case "boolean": return /* @__PURE__ */ D(g, {
555
+ case "boolean": return /* @__PURE__ */ O(_, {
550
556
  ...d,
551
557
  isDisabled: l,
552
558
  autoFocus: e.autoFocus,
553
559
  isSelected: t === !0,
554
560
  onSelectedChange: f
555
561
  });
556
- case "dateTime": return /* @__PURE__ */ D(r, {
562
+ case "dateTime": return /* @__PURE__ */ O(r, {
557
563
  ...d,
558
564
  required: u,
559
565
  disabled: l,
@@ -563,7 +569,7 @@ function Oe({ field: e, stored: t, selected: i, items: s, source: c, isDisabled:
563
569
  value: V(t)?.slice(0, -1) ?? "",
564
570
  onChange: (e) => f(V(`${e.target.value}Z`))
565
571
  });
566
- case "richText": return /* @__PURE__ */ D(o, {
572
+ case "richText": return /* @__PURE__ */ O(o, {
567
573
  ...d,
568
574
  expandedWidth: e.expandedWidth,
569
575
  label: e.label,
@@ -574,19 +580,19 @@ function Oe({ field: e, stored: t, selected: i, items: s, source: c, isDisabled:
574
580
  value: t === void 0 ? a : t,
575
581
  onChange: f
576
582
  });
577
- case "select": return /* @__PURE__ */ D(Ee, {
583
+ case "select": return /* @__PURE__ */ O(Oe, {
578
584
  field: e,
579
585
  ...p
580
586
  });
581
587
  case "asset":
582
- case "reference": return /* @__PURE__ */ D(De, {
588
+ case "reference": return /* @__PURE__ */ O(ke, {
583
589
  field: e,
584
590
  items: s,
585
591
  source: c,
586
592
  selected: i ?? [],
587
593
  ...p
588
594
  });
589
- default: return /* @__PURE__ */ D(Ce, {
595
+ default: return /* @__PURE__ */ O(Ee, {
590
596
  field: e,
591
597
  ...p
592
598
  });
@@ -594,28 +600,28 @@ function Oe({ field: e, stored: t, selected: i, items: s, source: c, isDisabled:
594
600
  }
595
601
  //#endregion
596
602
  //#region src/components/FormEditor/index.tsx
597
- function ke({ field: e, stored: n, items: r, source: i, isDisabled: a, error: o, isErrorVisible: c, onChange: l }) {
598
- let u = T(() => o === void 0 && c ? $(e, n) : void 0, [
603
+ function je({ field: e, stored: n, items: r, source: i, isDisabled: a, error: o, isErrorVisible: c, onChange: l }) {
604
+ let u = E(() => o === void 0 && c ? Q(e, n) : void 0, [
599
605
  o,
600
606
  c,
601
607
  e,
602
608
  n
603
- ]), d = T(() => e.type === "asset" || e.type === "reference" ? B(e, n) : void 0, [e, n]);
604
- return /* @__PURE__ */ D(s, {
609
+ ]), d = E(() => e.type === "asset" || e.type === "reference" ? me(e, n) : void 0, [e, n]);
610
+ return /* @__PURE__ */ O(s, {
605
611
  width: e.width,
606
612
  padded: !1,
607
613
  center: !1,
608
614
  className: "ds-form-editor__field",
609
- children: /* @__PURE__ */ D(t, {
615
+ children: /* @__PURE__ */ O(t, {
610
616
  ...de(e, n, d, i),
611
- label: e.type === "dateTime" ? `${e.label} (UTC)` : R(e),
617
+ label: e.type === "dateTime" ? `${e.label} (UTC)` : z(e),
612
618
  hint: e.hint,
613
619
  labelHint: e.labelHint,
614
620
  error: o ?? u,
615
621
  isRequired: e.required,
616
- count: d?.length ?? (e.type === "checkboxGroup" ? J(n).length : void 0),
617
- isGroup: d !== void 0 || Ae.has(e.type),
618
- children: (t) => /* @__PURE__ */ D(Oe, {
622
+ count: pe(e, n, d, i),
623
+ isGroup: d !== void 0 || Me.has(e.type),
624
+ children: (t) => /* @__PURE__ */ O(Ae, {
619
625
  field: e,
620
626
  stored: n,
621
627
  selected: d,
@@ -628,19 +634,19 @@ function ke({ field: e, stored: n, items: r, source: i, isDisabled: a, error: o,
628
634
  })
629
635
  });
630
636
  }
631
- var Ae = /* @__PURE__ */ new Set([
637
+ var Me = /* @__PURE__ */ new Set([
632
638
  "radioGroup",
633
639
  "checkboxGroup",
634
640
  "rangeSlider"
635
- ]), je = /* @__PURE__ */ new Set([
641
+ ]), Ne = /* @__PURE__ */ new Set([
636
642
  "slider",
637
643
  "rangeSlider",
638
644
  "date",
639
645
  "colour"
640
646
  ]);
641
- function Me({ schema: e, value: t, defaultValue: n = {}, onValueChange: r, pickerItems: i = {}, pickerSources: a = {}, errors: o = {}, isDisabled: s = !1, showAllErrors: c = !1, columns: l = 1, minColumnWidth: u = "16rem", className: d, style: f, ...p }) {
642
- let [m, h] = E(n), [g, _] = E(() => /* @__PURE__ */ new Set()), v = t ?? m;
643
- T(() => k(e), [e]);
647
+ function Pe({ schema: e, value: t, defaultValue: n = {}, onValueChange: r, pickerItems: i = {}, pickerSources: a = {}, errors: o = {}, isDisabled: s = !1, showAllErrors: c = !1, columns: l = 1, minColumnWidth: u = "16rem", className: d, style: f, ...p }) {
648
+ let [m, h] = D(n), [g, _] = D(() => /* @__PURE__ */ new Set()), v = t ?? m;
649
+ E(() => A(e), [e]);
644
650
  let y = (e, n) => {
645
651
  let i = { ...v };
646
652
  n === void 0 ? delete i[e] : i[e] = n, t === void 0 && h(i), _((t) => new Set(t).add(e)), r?.(i, { fieldId: e });
@@ -648,7 +654,7 @@ function Me({ schema: e, value: t, defaultValue: n = {}, onValueChange: r, picke
648
654
  "--form-editor-columns": l,
649
655
  "--form-editor-min-column": u
650
656
  };
651
- return /* @__PURE__ */ D("div", {
657
+ return /* @__PURE__ */ O("div", {
652
658
  className: [
653
659
  "ds-form-editor",
654
660
  l === "auto" && "ds-form-editor--auto",
@@ -660,9 +666,9 @@ function Me({ schema: e, value: t, defaultValue: n = {}, onValueChange: r, picke
660
666
  },
661
667
  ...p,
662
668
  children: e.fields.map((e) => {
663
- if (e.type === "divider") return /* @__PURE__ */ D("hr", { className: "ds-form-editor__divider" }, e.id);
664
- let t = Object.hasOwn(v, e.id) ? v[e.id] : void 0, n = s || !!e.isDisabled, r = n || "readOnly" in e && !!e.readOnly, l = typeof t == "string" ? t.trim() !== "" : t !== void 0, u = c || g.has(e.id) || l && je.has(e.type) || e.type === "number" && typeof t == "number";
665
- return /* @__PURE__ */ D(ke, {
669
+ if (e.type === "divider") return /* @__PURE__ */ O("hr", { className: "ds-form-editor__divider" }, e.id);
670
+ let t = Object.hasOwn(v, e.id) ? v[e.id] : void 0, n = s || !!e.isDisabled, r = n || "readOnly" in e && !!e.readOnly, l = typeof t == "string" ? t.trim() !== "" : t !== void 0, u = c || g.has(e.id) || l && Ne.has(e.type) || e.type === "number" && typeof t == "number";
671
+ return /* @__PURE__ */ O(je, {
666
672
  field: e,
667
673
  stored: t,
668
674
  items: i[e.id] ?? [],
@@ -678,6 +684,6 @@ function Me({ schema: e, value: t, defaultValue: n = {}, onValueChange: r, picke
678
684
  });
679
685
  }
680
686
  //#endregion
681
- export { ve as n, Me as t };
687
+ export { xe as n, Pe as t };
682
688
 
683
- //# sourceMappingURL=FormEditor-D0J3JN-H.js.map
689
+ //# sourceMappingURL=FormEditor-HqqFmu7s.js.map