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