@tempots/beatui 0.82.1 → 0.83.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/dist/ar-CBrjAlIY.cjs +1 -0
- package/dist/ar-DjMvIww5.js +175 -0
- package/dist/{ar-NCCPhOpI.js → ar-DwDxAANU.js} +16 -1
- package/dist/ar-kZBzg02I.cjs +1 -0
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +33 -32
- package/dist/{auth-divider-Wr-S16kF.js → auth-divider-C3_CgC0l.js} +589 -569
- package/dist/auth-divider-C4WTL71M.cjs +1 -0
- package/dist/beatui.css +5678 -1438
- package/dist/beatui.tailwind.css +5662 -1422
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +18 -31
- package/dist/{colors-B2yrgHSW.cjs → colors-BI0YhONJ.cjs} +1 -1
- package/dist/{colors-DPo9GEJR.js → colors-BmLYKmoH.js} +38 -30
- package/dist/de-B03SM9eF.cjs +1 -0
- package/dist/{de-BVK2MkCk.js → de-CSGSC0xX.js} +18 -3
- package/dist/de-CrBw41po.cjs +1 -0
- package/dist/{de-f2xcEb34.js → de-wChFYqM4.js} +79 -5
- package/dist/deep-merge-CmQoIYPC.js +1689 -0
- package/dist/deep-merge-UghuPcyW.cjs +1 -0
- package/dist/{duration-input-B9UNmUCh.cjs → duration-input-BJzKgI15.cjs} +1 -1
- package/dist/{duration-input-DqcJbxKD.js → duration-input-DaB6s0rL.js} +4 -4
- package/dist/editor-toolbar-group-BslfdazC.js +32 -0
- package/dist/editor-toolbar-group-_V1rDM-1.cjs +1 -0
- package/dist/{es-BxBeTRCv.cjs → es-BRa0hV-7.cjs} +1 -1
- package/dist/es-Ca5xT3NE.cjs +1 -0
- package/dist/es-CmPF3IGl.js +175 -0
- package/dist/{es-BQS8PL9j.js → es-dR46FTMF.js} +16 -1
- package/dist/{fa-DxPseW3g.cjs → fa-BxCSKn9j.cjs} +1 -1
- package/dist/fa-D696e75R.js +175 -0
- package/dist/fa-DhZJYuC6.cjs +1 -0
- package/dist/{fa-T-tkJSJr.js → fa-FsHBFjdY.js} +16 -1
- package/dist/fr-1nSKSIlw.cjs +1 -0
- package/dist/{fr-yOW_68YY.js → fr-B0jeX1Hx.js} +83 -9
- package/dist/{fr-CSRRhyCG.js → fr-Di6BT9_V.js} +18 -3
- package/dist/fr-Dq6RAY9s.cjs +1 -0
- package/dist/he-BBX1h9uD.cjs +1 -0
- package/dist/{he-Bxdc4M08.js → he-CXujw1Lw.js} +16 -1
- package/dist/he-DhcurPt5.cjs +1 -0
- package/dist/he-SgAsIYJA.js +175 -0
- package/dist/{hi-CJeFvTBe.js → hi-Bvh4d9bO.js} +16 -1
- package/dist/hi-Cd0YQZTU.cjs +1 -0
- package/dist/hi-CxsIxbfM.cjs +1 -0
- package/dist/hi-s9oiIihq.js +175 -0
- package/dist/{index-Bt7FYl80.cjs → index-Bm43lZqE.cjs} +2 -2
- package/dist/{index-05UbKOYe.cjs → index-C2_iX1um.cjs} +1 -1
- package/dist/{index-C2Lq1m45.js → index-C32iUFIr.js} +5 -5
- package/dist/{index-lYhXnu6I.js → index-CEqc0H3v.js} +1 -1
- package/dist/index-DH37GTQj.cjs +1 -0
- package/dist/{index-DklKfzD4.js → index-Di1_W_7Q.js} +351 -361
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +6220 -3084
- package/dist/input-container-CSi72GI1.cjs +1 -0
- package/dist/{input-container-DiCjOzR2.js → input-container-Nx0gMAzS.js} +86 -75
- package/dist/it-ByIEk5Cq.cjs +1 -0
- package/dist/it-D_IcaYxp.cjs +1 -0
- package/dist/{it-6e6X-4BB.js → it-Dc4IMciD.js} +80 -6
- package/dist/{it-Zmp0BhIj.js → it-EWhykhHv.js} +18 -3
- package/dist/ja-CMGqpPo7.cjs +1 -0
- package/dist/{ja-BxNuNo2H.js → ja-D2t2g5xj.js} +85 -11
- package/dist/ja-DV6Fpp18.cjs +1 -0
- package/dist/{ja-DWjoA-hQ.js → ja-YZ0P5woj.js} +16 -1
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +191 -185
- package/dist/json-schema-display/index.cjs.js +1 -1
- package/dist/json-schema-display/index.es.js +1 -1
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +679 -660
- package/dist/ko-BPl5rP97.cjs +1 -0
- package/dist/ko-BRylA5JZ.js +175 -0
- package/dist/ko-DR1f0as8.cjs +1 -0
- package/dist/{ko-BOlI-33h.js → ko-U7BSUAxZ.js} +16 -1
- package/dist/lexical/index.cjs.js +31 -31
- package/dist/lexical/index.es.js +5248 -5221
- package/dist/lexical.css +5 -7
- package/dist/menu-CX72LaZ3.cjs +1 -0
- package/dist/menu-D_slbwl8.js +374 -0
- package/dist/{modal-v3u2Fpnd.js → modal-DaI1jH-X.js} +4 -4
- package/dist/{modal-I5srcntN.cjs → modal-kyZfvVZb.cjs} +1 -1
- package/dist/nl-BSfaHFt0.cjs +1 -0
- package/dist/{nl-Dr-l6zUy.cjs → nl-CQF0N7Mc.cjs} +1 -1
- package/dist/{nl-kQNcAdY1.js → nl-CqAxoB4J.js} +18 -3
- package/dist/nl-Dh7LUWAn.js +176 -0
- package/dist/{notice-CLDdy1MW.cjs → notice-Bc1L4Zpr.cjs} +1 -1
- package/dist/{notice-BuZvdvZh.js → notice-Dz4nX57_.js} +4 -4
- package/dist/{oneof-branch-detection-Dt8ss9lc.js → oneof-branch-detection-BED_n2MT.js} +522 -519
- package/dist/{oneof-branch-detection-DsM1K5xc.cjs → oneof-branch-detection-Vov_e3kI.cjs} +4 -4
- package/dist/{pl-CKyPFvss.js → pl-C-weXGCB.js} +16 -1
- package/dist/pl-D-O4sCnr.cjs +1 -0
- package/dist/{pl-Bs4nLJ__.js → pl-XEG-p1Q9.js} +77 -3
- package/dist/{pl-BK0i_yvq.cjs → pl-y_w3DWF3.cjs} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/{pt-DBmUhaNI.js → pt-BjNGOoZH.js} +18 -3
- package/dist/pt-DYsDA2sZ.js +175 -0
- package/dist/pt-DqaZWmbG.cjs +1 -0
- package/dist/pt-chEEYLlt.cjs +1 -0
- package/dist/ru-B46hVpFF.cjs +1 -0
- package/dist/{ru-Bi1_DEKM.js → ru-BTKBykp-.js} +86 -12
- package/dist/{ru-CsJ_yT-7.js → ru-CFmeZBXK.js} +16 -1
- package/dist/ru-CISMzCHR.cjs +1 -0
- package/dist/{styles-url-B2dzXrYt.cjs → styles-url-CVCcF0ra.cjs} +1 -1
- package/dist/{styles-url-Cw_mxshe.js → styles-url-DUdp56Ts.js} +1 -1
- package/dist/tailwind/index.cjs.js +1 -1
- package/dist/tailwind/index.es.js +3 -3
- package/dist/tailwind/preset.cjs.js +1 -1
- package/dist/tailwind/preset.es.js +74 -4
- package/dist/tailwind/vite-plugin.cjs.js +10 -10
- package/dist/tailwind/vite-plugin.es.js +289 -410
- package/dist/text-input-8v79fzEy.cjs +1 -0
- package/dist/text-input-CPJzUC2r.js +45 -0
- package/dist/{toolbar-D994_E_s.js → toolbar-CjQG7l7X.js} +1 -1
- package/dist/{toolbar-x0_8lmKu.cjs → toolbar-D3ZsC0g_.cjs} +1 -1
- package/dist/{tr-Bn5ldVJs.js → tr-C5X2gFZS.js} +17 -2
- package/dist/tr-CaMaflJL.cjs +1 -0
- package/dist/{tr-DiYB-FwX.js → tr-Cp8ZCUic.js} +77 -3
- package/dist/{tr-CgJ8uhZu.cjs → tr-mWu2E__o.cjs} +1 -1
- package/dist/{translations-Cq8bUKJP.js → translations-BGblCUBj.js} +144 -70
- package/dist/translations-CZ0KOii3.cjs +1 -0
- package/dist/translations-gVgMyNno.cjs +1 -0
- package/dist/translations-jUYta1_1.js +87 -0
- package/dist/types/auth/index.d.ts +13 -0
- package/dist/types/auth-i18n/default.d.ts +14 -0
- package/dist/types/auth-i18n/locales/ar.d.ts +14 -0
- package/dist/types/auth-i18n/locales/de.d.ts +14 -0
- package/dist/types/auth-i18n/locales/en.d.ts +14 -0
- package/dist/types/auth-i18n/locales/es.d.ts +14 -0
- package/dist/types/auth-i18n/locales/fa.d.ts +14 -0
- package/dist/types/auth-i18n/locales/fr.d.ts +14 -0
- package/dist/types/auth-i18n/locales/he.d.ts +14 -0
- package/dist/types/auth-i18n/locales/hi.d.ts +14 -0
- package/dist/types/auth-i18n/locales/it.d.ts +14 -0
- package/dist/types/auth-i18n/locales/ja.d.ts +14 -0
- package/dist/types/auth-i18n/locales/ko.d.ts +14 -0
- package/dist/types/auth-i18n/locales/nl.d.ts +14 -0
- package/dist/types/auth-i18n/locales/pl.d.ts +14 -0
- package/dist/types/auth-i18n/locales/pt.d.ts +14 -0
- package/dist/types/auth-i18n/locales/ru.d.ts +14 -0
- package/dist/types/auth-i18n/locales/tr.d.ts +14 -0
- package/dist/types/auth-i18n/locales/ur.d.ts +14 -0
- package/dist/types/auth-i18n/locales/vi.d.ts +14 -0
- package/dist/types/auth-i18n/locales/zh.d.ts +14 -0
- package/dist/types/auth-i18n/translations.d.ts +14 -0
- package/dist/types/beatui-i18n/default.d.ts +99 -0
- package/dist/types/beatui-i18n/index.d.ts +11 -0
- package/dist/types/beatui-i18n/locales/en.d.ts +63 -0
- package/dist/types/beatui-i18n/translations.d.ts +87 -0
- package/dist/types/better-auth/components/authenticated.d.ts +2 -2
- package/dist/types/better-auth/components/better-auth-container.d.ts +1 -1
- package/dist/types/better-auth/components/better-auth-modal.d.ts +1 -1
- package/dist/types/better-auth/index.d.ts +13 -0
- package/dist/types/better-auth/provider.d.ts +33 -0
- package/dist/types/better-auth/types.d.ts +112 -0
- package/dist/types/components/auth/auth-container.d.ts +63 -2
- package/dist/types/components/auth/auth-divider.d.ts +30 -0
- package/dist/types/components/auth/auth-email-prop.d.ts +25 -0
- package/dist/types/components/auth/index.d.ts +9 -0
- package/dist/types/components/auth/password-strength-indicator.d.ts +58 -0
- package/dist/types/components/auth/reset-password-form.d.ts +33 -0
- package/dist/types/components/auth/schemas.d.ts +183 -5
- package/dist/types/components/auth/signin-form.d.ts +33 -0
- package/dist/types/components/auth/signup-form.d.ts +36 -0
- package/dist/types/components/auth/social-login-button.d.ts +213 -0
- package/dist/types/components/auth/social-providers.d.ts +27 -1
- package/dist/types/components/auth/types.d.ts +299 -0
- package/dist/types/components/auth/utils.d.ts +198 -0
- package/dist/types/components/beatui.d.ts +35 -0
- package/dist/types/components/button/button.d.ts +61 -0
- package/dist/types/components/button/close-button.d.ts +32 -1
- package/dist/types/components/button/index.d.ts +2 -0
- package/dist/types/components/button/toggle-button-group.d.ts +95 -0
- package/dist/types/components/button/toggle-button.d.ts +60 -0
- package/dist/types/components/data/avatar-group.d.ts +74 -0
- package/dist/types/components/data/avatar.d.ts +62 -0
- package/dist/types/components/data/badge.d.ts +49 -2
- package/dist/types/components/data/calendar-shared.d.ts +59 -0
- package/dist/types/components/data/calendar.d.ts +107 -0
- package/dist/types/components/data/history-timeline.d.ts +35 -0
- package/dist/types/components/data/icon-badge.d.ts +14 -0
- package/dist/types/components/data/icon.d.ts +55 -4
- package/dist/types/components/data/index.d.ts +9 -0
- package/dist/types/components/data/page-drop-zone.d.ts +61 -8
- package/dist/types/components/data/presence-overlay.d.ts +26 -0
- package/dist/types/components/data/progress-bar.d.ts +81 -0
- package/dist/types/components/data/range-calendar.d.ts +104 -0
- package/dist/types/components/data/skeleton.d.ts +70 -0
- package/dist/types/components/data/table.d.ts +38 -11
- package/dist/types/components/data/tag.d.ts +40 -0
- package/dist/types/components/data/unstyled-drop-zone.d.ts +73 -0
- package/dist/types/components/form/control/control.d.ts +155 -0
- package/dist/types/components/form/control/date-utils.d.ts +81 -0
- package/dist/types/components/form/control/ensure-control.d.ts +28 -0
- package/dist/types/components/form/control/form-status.d.ts +63 -0
- package/dist/types/components/form/control/index.d.ts +10 -0
- package/dist/types/components/form/control/list-control.d.ts +100 -1
- package/dist/types/components/form/control/list-item-controls.d.ts +65 -0
- package/dist/types/components/form/controller/color-controller.d.ts +29 -1
- package/dist/types/components/form/controller/controller-validation.d.ts +31 -0
- package/dist/types/components/form/controller/controller.d.ts +286 -0
- package/dist/types/components/form/controller/index.d.ts +12 -0
- package/dist/types/components/form/controller/path.d.ts +69 -0
- package/dist/types/components/form/controller/union-controller.d.ts +106 -11
- package/dist/types/components/form/controller/utils.d.ts +67 -0
- package/dist/types/components/form/input/advanced-slider.d.ts +143 -0
- package/dist/types/components/form/input/appearance-selector.d.ts +39 -0
- package/dist/types/components/form/input/base64-input.d.ts +34 -0
- package/dist/types/components/form/input/base64s-input.d.ts +47 -0
- package/dist/types/components/form/input/bigint-input.d.ts +27 -0
- package/dist/types/components/form/input/checkbox-input.d.ts +46 -0
- package/dist/types/components/form/input/color-input.d.ts +42 -0
- package/dist/types/components/form/input/color-swatch-input.d.ts +53 -0
- package/dist/types/components/form/input/combobox-input.d.ts +73 -0
- package/dist/types/components/form/input/combobox-tags-input.d.ts +54 -0
- package/dist/types/components/form/input/date-input.d.ts +33 -0
- package/dist/types/components/form/input/date-time-input.d.ts +34 -0
- package/dist/types/components/form/input/dropdown-base.d.ts +52 -0
- package/dist/types/components/form/input/dropdown-input.d.ts +86 -0
- package/dist/types/components/form/input/duration-input.d.ts +18 -0
- package/dist/types/components/form/input/duration-mask.d.ts +24 -0
- package/dist/types/components/form/input/editable-text.d.ts +33 -0
- package/dist/types/components/form/input/email-input.d.ts +34 -0
- package/dist/types/components/form/input/file-input.d.ts +33 -0
- package/dist/types/components/form/input/files-input.d.ts +44 -0
- package/dist/types/components/form/input/index.d.ts +5 -0
- package/dist/types/components/form/input/input-adornment.d.ts +38 -0
- package/dist/types/components/form/input/input-container.d.ts +65 -0
- package/dist/types/components/form/input/input-options.d.ts +70 -0
- package/dist/types/components/form/input/input-wrapper.d.ts +78 -0
- package/dist/types/components/form/input/instant-input.d.ts +18 -0
- package/dist/types/components/form/input/lazy-native-select.d.ts +43 -0
- package/dist/types/components/form/input/list-input.d.ts +50 -0
- package/dist/types/components/form/input/mask-input.d.ts +158 -0
- package/dist/types/components/form/input/native-select.d.ts +50 -0
- package/dist/types/components/form/input/nullable-base64-input.d.ts +25 -0
- package/dist/types/components/form/input/nullable-bigint-input.d.ts +26 -0
- package/dist/types/components/form/input/nullable-date-input.d.ts +18 -0
- package/dist/types/components/form/input/nullable-date-time-input.d.ts +19 -0
- package/dist/types/components/form/input/nullable-duration-input.d.ts +19 -0
- package/dist/types/components/form/input/nullable-email-input.d.ts +18 -0
- package/dist/types/components/form/input/nullable-instant-input.d.ts +19 -0
- package/dist/types/components/form/input/nullable-mask-input.d.ts +24 -0
- package/dist/types/components/form/input/nullable-number-input.d.ts +29 -0
- package/dist/types/components/form/input/nullable-password-input.d.ts +18 -0
- package/dist/types/components/form/input/nullable-plain-date-input.d.ts +18 -0
- package/dist/types/components/form/input/nullable-plain-date-time-input.d.ts +18 -0
- package/dist/types/components/form/input/nullable-plain-month-day-input.d.ts +18 -0
- package/dist/types/components/form/input/nullable-plain-time-input.d.ts +18 -0
- package/dist/types/components/form/input/nullable-plain-year-month-input.d.ts +18 -0
- package/dist/types/components/form/input/nullable-rating-input.d.ts +33 -0
- package/dist/types/components/form/input/nullable-text-area.d.ts +27 -0
- package/dist/types/components/form/input/nullable-text-input.d.ts +18 -0
- package/dist/types/components/form/input/nullable-url-input.d.ts +18 -0
- package/dist/types/components/form/input/nullable-utils.d.ts +22 -2
- package/dist/types/components/form/input/nullable-uuid-input.d.ts +18 -0
- package/dist/types/components/form/input/nullable-zoned-date-time-input.d.ts +20 -0
- package/dist/types/components/form/input/number-input.d.ts +49 -0
- package/dist/types/components/form/input/option.d.ts +165 -0
- package/dist/types/components/form/input/otp-input.d.ts +77 -0
- package/dist/types/components/form/input/password-input.d.ts +39 -0
- package/dist/types/components/form/input/plain-date-input.d.ts +17 -0
- package/dist/types/components/form/input/plain-date-time-input.d.ts +17 -0
- package/dist/types/components/form/input/plain-month-day-input.d.ts +18 -0
- package/dist/types/components/form/input/plain-time-input.d.ts +17 -0
- package/dist/types/components/form/input/plain-year-month-input.d.ts +17 -0
- package/dist/types/components/form/input/radio-group.d.ts +108 -0
- package/dist/types/components/form/input/rating-input.d.ts +57 -0
- package/dist/types/components/form/input/segmented-input.d.ts +70 -1
- package/dist/types/components/form/input/select-tags-input.d.ts +69 -0
- package/dist/types/components/form/input/slider-input.d.ts +82 -0
- package/dist/types/components/form/input/switch.d.ts +59 -1
- package/dist/types/components/form/input/tag-input.d.ts +19 -0
- package/dist/types/components/form/input/tag-utils.d.ts +111 -0
- package/dist/types/components/form/input/tags-input.d.ts +18 -0
- package/dist/types/components/form/input/text-area.d.ts +42 -0
- package/dist/types/components/form/input/text-input.d.ts +63 -1
- package/dist/types/components/form/input/url-input.d.ts +34 -0
- package/dist/types/components/form/input/uuid-input.d.ts +19 -0
- package/dist/types/components/form/input/zoned-date-time-input.d.ts +20 -0
- package/dist/types/components/form/schema/standard-schema-v1.d.ts +98 -23
- package/dist/types/components/form/use-form.d.ts +146 -2
- package/dist/types/components/i18n/index.d.ts +9 -0
- package/dist/types/components/i18n/locale-direction.d.ts +21 -1
- package/dist/types/components/i18n/locale-selector.d.ts +45 -0
- package/dist/types/components/i18n/make-i18nprovider.d.ts +42 -0
- package/dist/types/components/json-schema/schema-types.d.ts +133 -0
- package/dist/types/components/json-structure/controls/deprecation-utils.d.ts +2 -3
- package/dist/types/components/json-structure/structure-types.d.ts +473 -19
- package/dist/types/components/layout/accordion.d.ts +77 -0
- package/dist/types/components/layout/action-card.d.ts +90 -2
- package/dist/types/components/layout/app-shell.d.ts +76 -0
- package/dist/types/components/layout/card.d.ts +27 -0
- package/dist/types/components/layout/center.d.ts +39 -0
- package/dist/types/components/layout/collapse.d.ts +28 -0
- package/dist/types/components/layout/divider.d.ts +84 -0
- package/dist/types/components/layout/group.d.ts +15 -0
- package/dist/types/components/layout/index.d.ts +2 -0
- package/dist/types/components/layout/nine-slice-scroll-view.d.ts +105 -0
- package/dist/types/components/layout/scrollable-panel.d.ts +54 -0
- package/dist/types/components/layout/sink.d.ts +46 -0
- package/dist/types/components/layout/stack.d.ts +16 -0
- package/dist/types/components/layout/with-breakpoint.d.ts +194 -0
- package/dist/types/components/lexical/code/language-selector.d.ts +2 -2
- package/dist/types/components/lexical/floating/block-handle.d.ts +2 -2
- package/dist/types/components/lexical/floating/floating-toolbar.d.ts +2 -2
- package/dist/types/components/lexical/floating/slash-command-palette.d.ts +2 -2
- package/dist/types/components/lexical/table/table-controls.d.ts +2 -2
- package/dist/types/components/lexical/toolbar/lexical-toolbar.d.ts +2 -2
- package/dist/types/components/lexical/toolbar/toolbar-helpers.d.ts +4 -2
- package/dist/types/components/misc/empty-state.d.ts +86 -0
- package/dist/types/components/misc/expando.d.ts +81 -0
- package/dist/types/components/misc/index.d.ts +2 -1
- package/dist/types/components/misc/link-portal.d.ts +40 -2
- package/dist/types/components/misc/notice.d.ts +93 -0
- package/dist/types/components/misc/notification-panel.d.ts +21 -0
- package/dist/types/components/misc/notification-provider.d.ts +141 -0
- package/dist/types/components/misc/notification.d.ts +93 -0
- package/dist/types/components/misc/style-portal.d.ts +31 -1
- package/dist/types/components/monaco/monaco-editor-input.d.ts +59 -2
- package/dist/types/components/navigation/breadcrumbs.d.ts +96 -0
- package/dist/types/components/navigation/flyout.d.ts +118 -16
- package/dist/types/components/navigation/index.d.ts +3 -0
- package/dist/types/components/navigation/link/link.d.ts +100 -0
- package/dist/types/components/navigation/menu.d.ts +155 -35
- package/dist/types/components/navigation/pagination.d.ts +82 -0
- package/dist/types/components/navigation/sidebar/sidebar-group.d.ts +42 -0
- package/dist/types/components/navigation/sidebar/sidebar-link.d.ts +101 -0
- package/dist/types/components/navigation/sidebar/sidebar-separator.d.ts +17 -0
- package/dist/types/components/navigation/sidebar/sidebar.d.ts +57 -0
- package/dist/types/components/navigation/tabs/tabs.d.ts +3 -2
- package/dist/types/components/navigation/toolbar/toolbar.d.ts +125 -0
- package/dist/types/components/navigation/tree-view.d.ts +95 -0
- package/dist/types/components/overlay/announcement-bar.d.ts +41 -2
- package/dist/types/components/overlay/block-command-palette.d.ts +25 -0
- package/dist/types/components/overlay/command-palette.d.ts +17 -0
- package/dist/types/components/overlay/dialogs.d.ts +213 -0
- package/dist/types/components/overlay/drawer.d.ts +76 -12
- package/dist/types/components/overlay/index.d.ts +4 -0
- package/dist/types/components/overlay/lightbox.d.ts +53 -10
- package/dist/types/components/overlay/modal.d.ts +113 -13
- package/dist/types/components/overlay/overlay.d.ts +61 -0
- package/dist/types/components/overlay/popover.d.ts +100 -0
- package/dist/types/components/overlay/ribbon.d.ts +58 -9
- package/dist/types/components/prosemirror/etoolbar-button.d.ts +10 -0
- package/dist/types/components/prosemirror/etoolbar-group.d.ts +10 -0
- package/dist/types/components/prosemirror/link-control.d.ts +43 -2
- package/dist/types/components/prosemirror/prosemirror-toolbar.d.ts +46 -6
- package/dist/types/components/prosemirror/utils.d.ts +113 -1
- package/dist/types/components/theme/style-utils.d.ts +95 -0
- package/dist/types/components/theme/theme.d.ts +39 -0
- package/dist/types/components/theme/types.d.ts +133 -1
- package/dist/types/components/typography/index.d.ts +1 -0
- package/dist/types/components/typography/kbd.d.ts +48 -0
- package/dist/types/components/typography/label.d.ts +45 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/json-schema/index.d.ts +13 -0
- package/dist/types/json-schema-display/index.d.ts +12 -0
- package/dist/types/json-structure/index.d.ts +9 -4
- package/dist/types/markdown/index.d.ts +13 -0
- package/dist/types/monaco/index.d.ts +17 -0
- package/dist/types/monaco/lazy-loader.d.ts +79 -0
- package/dist/types/monaco/styles-url.d.ts +11 -0
- package/dist/types/monaco/styles.d.ts +11 -0
- package/dist/types/monaco/types.d.ts +47 -0
- package/dist/types/prosemirror/index.d.ts +12 -0
- package/dist/types/prosemirror/styles-url.d.ts +11 -0
- package/dist/types/prosemirror/styles.d.ts +10 -0
- package/dist/types/tailwind/google-fonts.d.ts +15 -0
- package/dist/types/tailwind/index.d.ts +13 -0
- package/dist/types/tailwind/preset.d.ts +111 -0
- package/dist/types/tailwind/vite-plugin.d.ts +39 -4
- package/dist/types/tokens/base-colors.d.ts +21 -0
- package/dist/types/tokens/breakpoints.d.ts +67 -0
- package/dist/types/tokens/colors.d.ts +213 -4
- package/dist/types/tokens/motion.d.ts +142 -3
- package/dist/types/tokens/radius.d.ts +99 -0
- package/dist/types/tokens/shadows.d.ts +85 -0
- package/dist/types/tokens/spacing.d.ts +111 -0
- package/dist/types/tokens/text-shadows.d.ts +82 -0
- package/dist/types/tokens/typography.d.ts +313 -25
- package/dist/types/tokens/z-index.d.ts +62 -0
- package/dist/types/utils/color.d.ts +297 -28
- package/dist/types/utils/download.d.ts +92 -0
- package/dist/types/utils/focus-trap.d.ts +67 -11
- package/dist/types/utils/format-file-size.d.ts +44 -0
- package/dist/ur-B6yB2JQ7.cjs +1 -0
- package/dist/ur-CvGP14xo.cjs +1 -0
- package/dist/{ur-Bg9eX81v.js → ur-Deo004ME.js} +16 -1
- package/dist/{ur-B69X-xNs.js → ur-DkIYJxsF.js} +82 -8
- package/dist/use-animated-toggle-89fKlXxy.js +195 -0
- package/dist/use-animated-toggle-DrqK7nUS.cjs +1 -0
- package/dist/{use-form-B56E_x5Y.js → use-form-BurzbPVV.js} +190 -2
- package/dist/{use-form-Cnp3XQ5X.cjs → use-form-Uree6QFy.cjs} +1 -1
- package/dist/vi-BYk1rJDv.js +53 -0
- package/dist/vi-DKw6PBja.js +175 -0
- package/dist/vi-Df4WZe9y.cjs +1 -0
- package/dist/vi-DneuUbkq.cjs +1 -0
- package/dist/{widget-customization-Ds9sicAg.js → widget-customization-0is7oTeP.js} +205 -204
- package/dist/widget-customization-B-LmxkPE.cjs +1 -0
- package/dist/zh-C5a9NGFW.cjs +1 -0
- package/dist/zh-CaKHseXJ.js +175 -0
- package/dist/zh-DFHuW_5g.cjs +1 -0
- package/dist/{zh-BIykcEu9.js → zh-DR7QaM65.js} +16 -1
- package/package.json +1 -1
- package/dist/ar-BsUm-TCn.cjs +0 -1
- package/dist/ar-D7CXDmVZ.cjs +0 -1
- package/dist/ar-nOSKXpIW.js +0 -101
- package/dist/auth-divider-BqZPH1-z.cjs +0 -1
- package/dist/de-BUFLEyKr.cjs +0 -1
- package/dist/de-WzsOu9Gn.cjs +0 -1
- package/dist/deep-merge-BYm0y62g.js +0 -1620
- package/dist/deep-merge-d7sf0xmN.cjs +0 -1
- package/dist/editor-toolbar-group--a-xgsJw.cjs +0 -1
- package/dist/editor-toolbar-group-CVpl5mxF.js +0 -31
- package/dist/es-CDqqzpCw.js +0 -101
- package/dist/es-Ds2Xf3wV.cjs +0 -1
- package/dist/fa-C7tE_hR3.js +0 -101
- package/dist/fa-Ct1UtDB7.cjs +0 -1
- package/dist/fr-Cdyopuz3.cjs +0 -1
- package/dist/fr-CzAkRFed.cjs +0 -1
- package/dist/he-D2oUloCJ.js +0 -101
- package/dist/he-DarDNPn0.cjs +0 -1
- package/dist/he-DlXALrK7.cjs +0 -1
- package/dist/hi-3dBhLwDs.cjs +0 -1
- package/dist/hi-D5ZlZoQq.js +0 -101
- package/dist/hi-tATwsXJ6.cjs +0 -1
- package/dist/index-DE2tjivA.cjs +0 -1
- package/dist/input-container-C6qEIjcA.cjs +0 -1
- package/dist/it-BmFag7j0.cjs +0 -1
- package/dist/it-DohtcWi9.cjs +0 -1
- package/dist/ja-Dj-bAKLf.cjs +0 -1
- package/dist/ja-eyTArrgS.cjs +0 -1
- package/dist/ko-BFLCDMMs.cjs +0 -1
- package/dist/ko-BomUE-yQ.cjs +0 -1
- package/dist/ko-Ch0jFsBV.js +0 -101
- package/dist/menu-CZzRsQP_.js +0 -372
- package/dist/menu-ClrU72xH.cjs +0 -1
- package/dist/nl-Bx2ACvr4.cjs +0 -1
- package/dist/nl-NuTdZO1s.js +0 -102
- package/dist/pl-QHl6sl8f.cjs +0 -1
- package/dist/pt-BETjHZrL.js +0 -101
- package/dist/pt-DZGw2Z-1.cjs +0 -1
- package/dist/pt-oBMmVYcu.cjs +0 -1
- package/dist/ru-CtxMmoa6.cjs +0 -1
- package/dist/ru-D03IuLqh.cjs +0 -1
- package/dist/text-input-B3VBat1k.js +0 -44
- package/dist/text-input-Ds8e7Z1G.cjs +0 -1
- package/dist/tr-B_-_1wua.cjs +0 -1
- package/dist/translations-B4-Zd2LM.cjs +0 -1
- package/dist/translations-D62qqNV9.cjs +0 -1
- package/dist/translations-DPr6c05Z.js +0 -67
- package/dist/ur-DvqAg9gW.cjs +0 -1
- package/dist/ur-DyUSmIbo.cjs +0 -1
- package/dist/use-animated-toggle-ChycsEoj.js +0 -175
- package/dist/use-animated-toggle-DR6CyMac.cjs +0 -1
- package/dist/vi-BdzxA60L.js +0 -101
- package/dist/vi-CBmPaHxg.cjs +0 -1
- package/dist/vi-D5R3YcU0.cjs +0 -1
- package/dist/vi-DhdsHHf_.js +0 -38
- package/dist/widget-customization-Dk7XcVly.cjs +0 -1
- package/dist/zh-CCGXcj5r.cjs +0 -1
- package/dist/zh-Cb1b8uik.cjs +0 -1
- package/dist/zh-Dn1UJiZa.js +0 -101
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { html as p, attr as
|
|
3
|
-
import { b, a as
|
|
4
|
-
import { e as
|
|
5
|
-
import { T as
|
|
6
|
-
import { N as
|
|
7
|
-
import { l as
|
|
8
|
-
import { B as U } from "../input-container-
|
|
9
|
-
import { S as B, L as
|
|
10
|
-
function
|
|
1
|
+
import { _ as Z, g as Ke } from "../string-DYyMxBl-.js";
|
|
2
|
+
import { html as p, attr as f, Fragment as q, MapSignal as W, Empty as pe, Value as x, computedOf as M, prop as Je, WithElement as Ze, OnDispose as He } from "@tempots/dom";
|
|
3
|
+
import { b, a as ne, I as _, d as Xe, f as re, A as K, g as Ye } from "../use-form-BurzbPVV.js";
|
|
4
|
+
import { e as H, N as Qe, f as de, g as fe, U as et, c as tt, a as nt, T as rt, L as me, b as ye, h as it, G as st, i as at, S as ut, j as ot } from "../deep-merge-CmQoIYPC.js";
|
|
5
|
+
import { T as ct } from "../text-input-CPJzUC2r.js";
|
|
6
|
+
import { N as lt, B as pt, D as dt, a as ft, P as mt, b as yt, c as gt, d as ht, e as bt, F as vt } from "../duration-input-DaB6s0rL.js";
|
|
7
|
+
import { l as xt } from "../colors-BmLYKmoH.js";
|
|
8
|
+
import { B as U } from "../input-container-Nx0gMAzS.js";
|
|
9
|
+
import { S as B, L as ge, M as $t, i as ie } from "../stack-BJgsPJ9A.js";
|
|
10
|
+
function It(e) {
|
|
11
11
|
return e === "int64" || e === "int128" || e === "uint64" || e === "uint128";
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function P(e) {
|
|
14
14
|
return e === "int8" || e === "int16" || e === "int32" || e === "int64" || e === "int128" || e === "uint8" || e === "uint16" || e === "uint32" || e === "uint64" || e === "uint128";
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function X(e) {
|
|
17
17
|
return e === "float" || e === "double" || e === "decimal";
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
return
|
|
19
|
+
function Tt(e) {
|
|
20
|
+
return P(e) || X(e);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Y(e) {
|
|
23
23
|
return e === "date" || e === "datetime" || e === "time" || e === "duration";
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return e === "string" || e === "boolean" || e === "null" ||
|
|
25
|
+
function wt(e) {
|
|
26
|
+
return e === "string" || e === "boolean" || e === "null" || Tt(e) || Y(e) || e === "uuid" || e === "uri" || e === "binary";
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function Qn(e) {
|
|
29
29
|
return e === "object" || e === "array" || e === "set" || e === "map" || e === "tuple" || e === "choice" || e === "any";
|
|
30
30
|
}
|
|
31
31
|
function O(e) {
|
|
32
32
|
return typeof e == "object" && e !== null && "$ref" in e;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function jt(e) {
|
|
35
35
|
return typeof e == "object" && e !== null && !("type" in e) && !("$ref" in e) && !("enum" in e) && !("const" in e);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Mt(e) {
|
|
38
38
|
return typeof e == "object" && e !== null && ("type" in e || "$ref" in e || "enum" in e || "const" in e);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function C(e) {
|
|
41
41
|
return e.type === "object" && "properties" in e;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function he(e) {
|
|
44
44
|
return e.type === "array" && "items" in e;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function be(e) {
|
|
47
47
|
return e.type === "set" && "items" in e;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function ve(e) {
|
|
50
50
|
return e.type === "map" && "values" in e;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function xe(e) {
|
|
53
53
|
return e.type === "tuple" && "tuple" in e;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function $e(e) {
|
|
56
56
|
return e.type === "choice" && "choices" in e;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function St(e) {
|
|
59
59
|
return "enum" in e && Array.isArray(e.enum);
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function Dt(e) {
|
|
62
62
|
return "const" in e;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function se(e) {
|
|
65
65
|
return e === void 0 ? null : typeof e == "string" || Array.isArray(e) ? e : (O(e), null);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function At(e) {
|
|
68
68
|
return e === void 0 ? !1 : e === "null" ? !0 : Array.isArray(e) ? e.includes("null") : !1;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function Q(e) {
|
|
71
71
|
return typeof e == "string" ? e === "null" ? [] : [e] : Array.isArray(e) ? e.filter((t) => t !== "null") : [];
|
|
72
72
|
}
|
|
73
73
|
const z = {
|
|
@@ -85,10 +85,10 @@ const z = {
|
|
|
85
85
|
uint64: { min: 0n, max: 18446744073709551615n },
|
|
86
86
|
uint128: { min: 0n, max: 340282366920938463463374607431768211455n }
|
|
87
87
|
};
|
|
88
|
-
function
|
|
88
|
+
function Ot(e) {
|
|
89
89
|
return e.startsWith("#/") ? e.slice(2).split("/") : e.includes("/") ? e.split("/") : ["definitions", e];
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function Ct(e, t) {
|
|
92
92
|
let n = e;
|
|
93
93
|
for (const r of t) {
|
|
94
94
|
if (n == null || typeof n != "object")
|
|
@@ -97,23 +97,23 @@ function Rt(e, t) {
|
|
|
97
97
|
}
|
|
98
98
|
return n;
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
const n =
|
|
100
|
+
function N(e, t) {
|
|
101
|
+
const n = Ot(e), r = Ct(t, n);
|
|
102
102
|
if (r == null) {
|
|
103
103
|
console.warn(`Failed to resolve $ref: ${e}`);
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
if (
|
|
106
|
+
if (Mt(r))
|
|
107
107
|
return r;
|
|
108
|
-
if (
|
|
108
|
+
if (jt(r)) {
|
|
109
109
|
console.warn(`$ref "${e}" points to a namespace, not a type definition`);
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
return
|
|
113
|
+
function er(e, t) {
|
|
114
|
+
return N(e.$ref, t);
|
|
115
115
|
}
|
|
116
|
-
class
|
|
116
|
+
class Nt {
|
|
117
117
|
schema;
|
|
118
118
|
visited = /* @__PURE__ */ new Set();
|
|
119
119
|
constructor(t) {
|
|
@@ -129,7 +129,7 @@ class kt {
|
|
|
129
129
|
}
|
|
130
130
|
this.visited.add(t);
|
|
131
131
|
try {
|
|
132
|
-
const n =
|
|
132
|
+
const n = N(t, this.schema);
|
|
133
133
|
if (n?.type && O(n.type)) {
|
|
134
134
|
const r = this.resolve(n.type.$ref);
|
|
135
135
|
if (r) {
|
|
@@ -162,10 +162,10 @@ class kt {
|
|
|
162
162
|
this.visited.clear();
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
function
|
|
166
|
-
return new
|
|
165
|
+
function ee(e) {
|
|
166
|
+
return new Nt(e);
|
|
167
167
|
}
|
|
168
|
-
class
|
|
168
|
+
class te {
|
|
169
169
|
schema;
|
|
170
170
|
definition;
|
|
171
171
|
path;
|
|
@@ -176,13 +176,13 @@ class re {
|
|
|
176
176
|
suppressLabel;
|
|
177
177
|
refResolver;
|
|
178
178
|
constructor(t) {
|
|
179
|
-
this.schema = t.schema, this.definition = t.definition, this.path = t.path, this.readOnly = t.readOnly ?? !1, this.locale = t.locale, this.widgetRegistry = t.widgetRegistry, this.isPropertyRequired = t.isPropertyRequired ?? !1, this.suppressLabel = t.suppressLabel ?? !1, this.refResolver = t.refResolver ??
|
|
179
|
+
this.schema = t.schema, this.definition = t.definition, this.path = t.path, this.readOnly = t.readOnly ?? !1, this.locale = t.locale, this.widgetRegistry = t.widgetRegistry, this.isPropertyRequired = t.isPropertyRequired ?? !1, this.suppressLabel = t.suppressLabel ?? !1, this.refResolver = t.refResolver ?? ee(t.schema);
|
|
180
180
|
}
|
|
181
181
|
/**
|
|
182
182
|
* Create a new context with updated fields
|
|
183
183
|
*/
|
|
184
184
|
with(t) {
|
|
185
|
-
return new
|
|
185
|
+
return new te({
|
|
186
186
|
schema: this.schema,
|
|
187
187
|
definition: t.definition ?? this.definition,
|
|
188
188
|
path: t.path ?? this.path,
|
|
@@ -227,22 +227,22 @@ class re {
|
|
|
227
227
|
if (!t) return null;
|
|
228
228
|
if (O(t)) {
|
|
229
229
|
const n = this.refResolver.resolve(t.$ref);
|
|
230
|
-
return n?.type ?
|
|
230
|
+
return n?.type ? se(n.type) : null;
|
|
231
231
|
}
|
|
232
|
-
return
|
|
232
|
+
return se(t);
|
|
233
233
|
}
|
|
234
234
|
/**
|
|
235
235
|
* Get the primary type (first non-null type)
|
|
236
236
|
*/
|
|
237
237
|
get primaryType() {
|
|
238
238
|
const t = this.resolvedType;
|
|
239
|
-
return t ? typeof t == "string" ? t === "null" ? null : t :
|
|
239
|
+
return t ? typeof t == "string" ? t === "null" ? null : t : Q(t)[0] ?? null : null;
|
|
240
240
|
}
|
|
241
241
|
/**
|
|
242
242
|
* Check if this type is nullable
|
|
243
243
|
*/
|
|
244
244
|
get isNullable() {
|
|
245
|
-
return
|
|
245
|
+
return At(this.definition.type);
|
|
246
246
|
}
|
|
247
247
|
/**
|
|
248
248
|
* Check if this is a required field
|
|
@@ -273,7 +273,7 @@ class re {
|
|
|
273
273
|
*/
|
|
274
274
|
get isPrimitive() {
|
|
275
275
|
const t = this.primaryType;
|
|
276
|
-
return t != null &&
|
|
276
|
+
return t != null && wt(t);
|
|
277
277
|
}
|
|
278
278
|
/**
|
|
279
279
|
* Get the description from the definition
|
|
@@ -321,7 +321,7 @@ class re {
|
|
|
321
321
|
if (this.definition.name)
|
|
322
322
|
return this.definition.name;
|
|
323
323
|
const t = this.name;
|
|
324
|
-
return t ?
|
|
324
|
+
return t ? Z(Ke(t)) : "";
|
|
325
325
|
}
|
|
326
326
|
/**
|
|
327
327
|
* Get altnames from the definition
|
|
@@ -375,14 +375,14 @@ class re {
|
|
|
375
375
|
return this.definition.format;
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function kt(e, t) {
|
|
379
379
|
let n;
|
|
380
|
-
const r =
|
|
380
|
+
const r = ee(e);
|
|
381
381
|
if (e.$root) {
|
|
382
382
|
const s = r.resolve(e.$root);
|
|
383
383
|
s ? n = s : (console.warn(`Failed to resolve $root: ${e.$root}`), n = e);
|
|
384
384
|
} else e.type || e.properties ? n = e : n = { type: "any" };
|
|
385
|
-
return new
|
|
385
|
+
return new te({
|
|
386
386
|
schema: e,
|
|
387
387
|
definition: n,
|
|
388
388
|
path: [],
|
|
@@ -392,7 +392,7 @@ function Pt(e, t) {
|
|
|
392
392
|
refResolver: r
|
|
393
393
|
});
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function Ie(e, t, n) {
|
|
396
396
|
const r = [], s = [];
|
|
397
397
|
if (!e.$extends)
|
|
398
398
|
return { merged: e, inheritanceChain: r, errors: s };
|
|
@@ -403,51 +403,51 @@ function Te(e, t, n) {
|
|
|
403
403
|
message: "Maximum inheritance depth exceeded"
|
|
404
404
|
}), [];
|
|
405
405
|
const h = [];
|
|
406
|
-
for (const
|
|
407
|
-
if (u.has(
|
|
406
|
+
for (const d of l) {
|
|
407
|
+
if (u.has(d)) {
|
|
408
408
|
s.push({
|
|
409
|
-
path:
|
|
410
|
-
message: `Circular inheritance detected: ${
|
|
409
|
+
path: d,
|
|
410
|
+
message: `Circular inheritance detected: ${d}`
|
|
411
411
|
});
|
|
412
412
|
continue;
|
|
413
413
|
}
|
|
414
|
-
u.add(
|
|
415
|
-
const g =
|
|
414
|
+
u.add(d), r.push(d);
|
|
415
|
+
const g = N(d, t);
|
|
416
416
|
if (!g) {
|
|
417
417
|
s.push({
|
|
418
|
-
path:
|
|
419
|
-
message: `Failed to resolve base type: ${
|
|
418
|
+
path: d,
|
|
419
|
+
message: `Failed to resolve base type: ${d}`
|
|
420
420
|
});
|
|
421
421
|
continue;
|
|
422
422
|
}
|
|
423
423
|
if (g.$extends) {
|
|
424
|
-
const
|
|
425
|
-
h.push(
|
|
424
|
+
const m = Array.isArray(g.$extends) ? g.$extends : [g.$extends], $ = i(m, y + 1);
|
|
425
|
+
h.push(...$);
|
|
426
426
|
}
|
|
427
|
-
h.push(g), u.delete(
|
|
427
|
+
h.push(g), u.delete(d);
|
|
428
428
|
}
|
|
429
429
|
return h;
|
|
430
430
|
}, o = i(a);
|
|
431
|
-
return { merged:
|
|
431
|
+
return { merged: Rt(o, e), inheritanceChain: r, errors: s };
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function Rt(e, t) {
|
|
434
434
|
if (e.length === 0)
|
|
435
435
|
return t;
|
|
436
436
|
let n = { ...e[0] };
|
|
437
437
|
for (let a = 1; a < e.length; a++)
|
|
438
|
-
n =
|
|
439
|
-
n =
|
|
438
|
+
n = ae(n, e[a]);
|
|
439
|
+
n = ae(n, t);
|
|
440
440
|
const { $extends: r, ...s } = n;
|
|
441
441
|
return s;
|
|
442
442
|
}
|
|
443
|
-
function
|
|
444
|
-
return
|
|
443
|
+
function ae(e, t) {
|
|
444
|
+
return C(e) && C(t) ? Pt(e, t) : { ...e, ...t };
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function Pt(e, t) {
|
|
447
447
|
const n = {
|
|
448
448
|
...e.properties ?? {},
|
|
449
449
|
...t.properties ?? {}
|
|
450
|
-
}, r =
|
|
450
|
+
}, r = ue(e.required), s = ue(t.required), a = qt([...r, ...s]), u = {
|
|
451
451
|
...e,
|
|
452
452
|
...t,
|
|
453
453
|
type: "object",
|
|
@@ -455,80 +455,80 @@ function Ft(e, t) {
|
|
|
455
455
|
};
|
|
456
456
|
return a.length > 0 && (u.required = a), u;
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function ue(e) {
|
|
459
459
|
return e ? e.length === 0 ? [] : Array.isArray(e[0]) ? e.flat() : e : [];
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function qt(e) {
|
|
462
462
|
return [...new Set(e)];
|
|
463
463
|
}
|
|
464
|
-
function
|
|
465
|
-
const t =
|
|
464
|
+
function tr(e) {
|
|
465
|
+
const t = ee(e);
|
|
466
466
|
return {
|
|
467
|
-
resolve: (n) => (t.reset(),
|
|
467
|
+
resolve: (n) => (t.reset(), Ie(n, e))
|
|
468
468
|
};
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Ft() {
|
|
471
471
|
return p.span(
|
|
472
|
-
|
|
473
|
-
|
|
472
|
+
f.class("bc-json-structure-deprecated-badge"),
|
|
473
|
+
f.style(
|
|
474
474
|
"font-size: var(--font-size-xs); color: var(--color-warning-500, #d97706); background: var(--color-warning-100, #fef3c7); padding: 0.125em 0.5em; border-radius: var(--radius-sm); margin-inline-start: 0.5em; font-weight: normal;"
|
|
475
475
|
),
|
|
476
476
|
"(deprecated)"
|
|
477
477
|
);
|
|
478
478
|
}
|
|
479
|
-
function
|
|
480
|
-
return !e || !t ? e ?? "" : p.span(e,
|
|
479
|
+
function S(e, t) {
|
|
480
|
+
return !e || !t ? e ?? "" : p.span(e, Ft());
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function Lt(e) {
|
|
483
483
|
const t = e.examples?.[0] != null ? String(e.examples[0]) : void 0;
|
|
484
484
|
return {
|
|
485
|
-
label: e.suppressLabel ? void 0 :
|
|
485
|
+
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
486
486
|
description: e.description,
|
|
487
487
|
required: e.isRequired,
|
|
488
488
|
disabled: e.readOnly || e.isDeprecated,
|
|
489
489
|
placeholder: t
|
|
490
490
|
};
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function Te({
|
|
493
493
|
ctx: e,
|
|
494
494
|
controller: t
|
|
495
495
|
}) {
|
|
496
|
-
const n =
|
|
497
|
-
return b(
|
|
496
|
+
const n = Lt(e);
|
|
497
|
+
return b(ct, {
|
|
498
498
|
...n,
|
|
499
|
-
controller:
|
|
499
|
+
controller: H(t)
|
|
500
500
|
});
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function Et(e) {
|
|
503
503
|
return {
|
|
504
|
-
label: e.suppressLabel ? void 0 :
|
|
504
|
+
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
505
505
|
description: e.description,
|
|
506
506
|
required: e.isRequired,
|
|
507
507
|
disabled: e.readOnly || e.isDeprecated
|
|
508
508
|
};
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function we({
|
|
511
511
|
ctx: e,
|
|
512
512
|
controller: t
|
|
513
513
|
}) {
|
|
514
|
-
const n =
|
|
514
|
+
const n = Et(e), r = b(ne, {
|
|
515
515
|
...n,
|
|
516
516
|
controller: t
|
|
517
517
|
});
|
|
518
|
-
return e.isNullable ? b(
|
|
518
|
+
return e.isNullable ? b(ne, {
|
|
519
519
|
...n,
|
|
520
520
|
controller: t,
|
|
521
|
-
after:
|
|
521
|
+
after: Qe(
|
|
522
522
|
t.signal,
|
|
523
523
|
t.disabled,
|
|
524
524
|
(s) => t.change(s)
|
|
525
525
|
)
|
|
526
526
|
}) : r;
|
|
527
527
|
}
|
|
528
|
-
function
|
|
529
|
-
const n = z[t], r =
|
|
528
|
+
function Vt(e, t) {
|
|
529
|
+
const n = z[t], r = je(e, n.min), s = Me(e, n.max), a = e.examples?.[0] != null ? String(e.examples[0]) : void 0;
|
|
530
530
|
return {
|
|
531
|
-
label: e.suppressLabel ? void 0 :
|
|
531
|
+
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
532
532
|
description: e.description,
|
|
533
533
|
required: e.isRequired,
|
|
534
534
|
disabled: e.readOnly || e.isDeprecated,
|
|
@@ -539,10 +539,10 @@ function Bt(e, t) {
|
|
|
539
539
|
placeholder: a
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
|
-
function
|
|
543
|
-
const n = z[t], r =
|
|
542
|
+
function Ut(e, t) {
|
|
543
|
+
const n = z[t], r = je(e, n.min), s = Me(e, n.max), a = e.examples?.[0] != null ? String(e.examples[0]) : void 0;
|
|
544
544
|
return {
|
|
545
|
-
label: e.suppressLabel ? void 0 :
|
|
545
|
+
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
546
546
|
description: e.description,
|
|
547
547
|
required: e.isRequired,
|
|
548
548
|
disabled: e.readOnly || e.isDeprecated,
|
|
@@ -552,7 +552,7 @@ function Wt(e, t) {
|
|
|
552
552
|
placeholder: a
|
|
553
553
|
};
|
|
554
554
|
}
|
|
555
|
-
function
|
|
555
|
+
function je(e, t) {
|
|
556
556
|
const n = e.definition;
|
|
557
557
|
if (n.minimum !== void 0) {
|
|
558
558
|
const r = typeof n.minimum == "string" ? BigInt(n.minimum) : n.minimum;
|
|
@@ -564,7 +564,7 @@ function Me(e, t) {
|
|
|
564
564
|
}
|
|
565
565
|
return t >= BigInt(Number.MIN_SAFE_INTEGER) && t <= BigInt(Number.MAX_SAFE_INTEGER) ? Number(t) : t;
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function Me(e, t) {
|
|
568
568
|
const n = e.definition;
|
|
569
569
|
if (n.maximum !== void 0) {
|
|
570
570
|
const r = typeof n.maximum == "string" ? BigInt(n.maximum) : n.maximum;
|
|
@@ -576,31 +576,31 @@ function Se(e, t) {
|
|
|
576
576
|
}
|
|
577
577
|
return t >= BigInt(Number.MIN_SAFE_INTEGER) && t <= BigInt(Number.MAX_SAFE_INTEGER) ? Number(t) : t;
|
|
578
578
|
}
|
|
579
|
-
function
|
|
579
|
+
function Se({
|
|
580
580
|
ctx: e,
|
|
581
581
|
controller: t,
|
|
582
582
|
intType: n
|
|
583
583
|
}) {
|
|
584
|
-
if (
|
|
585
|
-
const s =
|
|
586
|
-
return e.isNullable ? b(
|
|
584
|
+
if (It(n)) {
|
|
585
|
+
const s = Ut(e, n);
|
|
586
|
+
return e.isNullable ? b(lt, {
|
|
587
587
|
...s,
|
|
588
588
|
controller: t
|
|
589
|
-
}) : b(
|
|
589
|
+
}) : b(pt, {
|
|
590
590
|
...s,
|
|
591
591
|
controller: t
|
|
592
592
|
});
|
|
593
593
|
}
|
|
594
|
-
const r =
|
|
595
|
-
return e.isNullable ? b(
|
|
594
|
+
const r = Vt(e, n);
|
|
595
|
+
return e.isNullable ? b(de, {
|
|
596
596
|
...r,
|
|
597
597
|
controller: t
|
|
598
|
-
}) : b(
|
|
598
|
+
}) : b(fe, {
|
|
599
599
|
...r,
|
|
600
600
|
controller: t
|
|
601
601
|
});
|
|
602
602
|
}
|
|
603
|
-
function
|
|
603
|
+
function Bt(e, t) {
|
|
604
604
|
const n = e.definition;
|
|
605
605
|
let r;
|
|
606
606
|
n.multipleOf !== void 0 ? r = n.multipleOf : t === "decimal" && n.scale !== void 0 ? r = Math.pow(10, -n.scale) : r = void 0;
|
|
@@ -614,7 +614,7 @@ function _t(e, t) {
|
|
|
614
614
|
}
|
|
615
615
|
const c = e.examples?.[0] != null ? String(e.examples[0]) : void 0;
|
|
616
616
|
return {
|
|
617
|
-
label: e.suppressLabel ? void 0 :
|
|
617
|
+
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
618
618
|
description: o,
|
|
619
619
|
required: e.isRequired,
|
|
620
620
|
disabled: e.readOnly || e.isDeprecated,
|
|
@@ -624,42 +624,42 @@ function _t(e, t) {
|
|
|
624
624
|
placeholder: c
|
|
625
625
|
};
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function De({
|
|
628
628
|
ctx: e,
|
|
629
629
|
controller: t,
|
|
630
630
|
floatType: n
|
|
631
631
|
}) {
|
|
632
|
-
const r =
|
|
633
|
-
return e.isNullable ? b(
|
|
632
|
+
const r = Bt(e, n);
|
|
633
|
+
return e.isNullable ? b(de, {
|
|
634
634
|
...r,
|
|
635
635
|
controller: t
|
|
636
|
-
}) : b(
|
|
636
|
+
}) : b(fe, {
|
|
637
637
|
...r,
|
|
638
638
|
controller: t
|
|
639
639
|
});
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function Wt(e) {
|
|
642
642
|
return {
|
|
643
|
-
label: e.suppressLabel ? void 0 :
|
|
643
|
+
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
644
644
|
description: e.description,
|
|
645
645
|
required: e.isRequired,
|
|
646
646
|
disabled: e.readOnly || e.isDeprecated,
|
|
647
647
|
placeholder: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
648
648
|
};
|
|
649
649
|
}
|
|
650
|
-
function
|
|
650
|
+
function Ae({
|
|
651
651
|
ctx: e,
|
|
652
652
|
controller: t
|
|
653
653
|
}) {
|
|
654
|
-
const n =
|
|
655
|
-
return b(
|
|
654
|
+
const n = Wt(e);
|
|
655
|
+
return b(et, {
|
|
656
656
|
...n,
|
|
657
|
-
controller:
|
|
657
|
+
controller: H(t)
|
|
658
658
|
});
|
|
659
659
|
}
|
|
660
|
-
function
|
|
660
|
+
function _t(e) {
|
|
661
661
|
return {
|
|
662
|
-
label: e.suppressLabel ? void 0 :
|
|
662
|
+
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
663
663
|
description: e.description,
|
|
664
664
|
required: e.isRequired,
|
|
665
665
|
disabled: e.readOnly || e.isDeprecated
|
|
@@ -670,91 +670,91 @@ function Oe({
|
|
|
670
670
|
controller: t,
|
|
671
671
|
temporalType: n
|
|
672
672
|
}) {
|
|
673
|
-
const r =
|
|
673
|
+
const r = _t(e);
|
|
674
674
|
switch (n) {
|
|
675
675
|
case "date":
|
|
676
|
-
return e.isNullable ? b(
|
|
676
|
+
return e.isNullable ? b(ht, {
|
|
677
677
|
...r,
|
|
678
678
|
controller: t
|
|
679
|
-
}) : b(
|
|
679
|
+
}) : b(bt, {
|
|
680
680
|
...r,
|
|
681
681
|
controller: t
|
|
682
682
|
});
|
|
683
683
|
case "datetime":
|
|
684
|
-
return e.isNullable ? b(
|
|
684
|
+
return e.isNullable ? b(yt, {
|
|
685
685
|
...r,
|
|
686
686
|
controller: t
|
|
687
|
-
}) : b(
|
|
687
|
+
}) : b(gt, {
|
|
688
688
|
...r,
|
|
689
689
|
controller: t
|
|
690
690
|
});
|
|
691
691
|
case "time":
|
|
692
|
-
return e.isNullable ? b(
|
|
692
|
+
return e.isNullable ? b(ft, {
|
|
693
693
|
...r,
|
|
694
694
|
controller: t
|
|
695
|
-
}) : b(
|
|
695
|
+
}) : b(mt, {
|
|
696
696
|
...r,
|
|
697
697
|
controller: t
|
|
698
698
|
});
|
|
699
699
|
case "duration":
|
|
700
|
-
return e.isNullable ? b(
|
|
700
|
+
return e.isNullable ? b(tt, {
|
|
701
701
|
...r,
|
|
702
702
|
controller: t
|
|
703
|
-
}) : b(
|
|
703
|
+
}) : b(dt, {
|
|
704
704
|
...r,
|
|
705
705
|
controller: t
|
|
706
706
|
});
|
|
707
707
|
default:
|
|
708
|
-
return console.warn(`Unknown temporal type: ${n}`),
|
|
708
|
+
return console.warn(`Unknown temporal type: ${n}`), q();
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function zt(e) {
|
|
712
712
|
return {
|
|
713
|
-
label: e.suppressLabel ? void 0 :
|
|
713
|
+
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
714
714
|
description: e.description,
|
|
715
715
|
required: e.isRequired,
|
|
716
716
|
disabled: e.readOnly || e.isDeprecated,
|
|
717
717
|
placeholder: "https://example.com"
|
|
718
718
|
};
|
|
719
719
|
}
|
|
720
|
-
function
|
|
720
|
+
function Ce({
|
|
721
721
|
ctx: e,
|
|
722
722
|
controller: t
|
|
723
723
|
}) {
|
|
724
|
-
const n =
|
|
725
|
-
return b(
|
|
724
|
+
const n = zt(e);
|
|
725
|
+
return b(nt, {
|
|
726
726
|
...n,
|
|
727
|
-
controller:
|
|
727
|
+
controller: H(t)
|
|
728
728
|
});
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function Gt(e) {
|
|
731
731
|
return {
|
|
732
|
-
label: e.suppressLabel ? void 0 :
|
|
732
|
+
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
733
733
|
description: e.description,
|
|
734
734
|
required: e.isRequired,
|
|
735
735
|
disabled: e.readOnly || e.isDeprecated
|
|
736
736
|
};
|
|
737
737
|
}
|
|
738
|
-
function
|
|
738
|
+
function Ne({
|
|
739
739
|
ctx: e,
|
|
740
740
|
controller: t
|
|
741
741
|
}) {
|
|
742
|
-
const n =
|
|
743
|
-
return b(
|
|
742
|
+
const n = Gt(e);
|
|
743
|
+
return b(vt, {
|
|
744
744
|
...n,
|
|
745
745
|
controller: t
|
|
746
746
|
});
|
|
747
747
|
}
|
|
748
|
-
function
|
|
748
|
+
function Kt(e) {
|
|
749
749
|
return {
|
|
750
|
-
label: e.suppressLabel ? void 0 :
|
|
750
|
+
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
751
751
|
description: e.description,
|
|
752
752
|
required: e.isRequired,
|
|
753
753
|
disabled: e.readOnly || e.isDeprecated,
|
|
754
754
|
placeholder: "Enter JSON value"
|
|
755
755
|
};
|
|
756
756
|
}
|
|
757
|
-
function
|
|
757
|
+
function Jt(e) {
|
|
758
758
|
return e.transform(
|
|
759
759
|
// To input: serialize value to JSON string
|
|
760
760
|
(t) => t === void 0 ? void 0 : JSON.stringify(t, null, 2),
|
|
@@ -769,24 +769,24 @@ function Ht(e) {
|
|
|
769
769
|
}
|
|
770
770
|
);
|
|
771
771
|
}
|
|
772
|
-
function
|
|
772
|
+
function J({
|
|
773
773
|
ctx: e,
|
|
774
774
|
controller: t
|
|
775
775
|
}) {
|
|
776
|
-
const n =
|
|
777
|
-
return b(
|
|
776
|
+
const n = Kt(e);
|
|
777
|
+
return b(rt, {
|
|
778
778
|
...n,
|
|
779
|
-
controller:
|
|
779
|
+
controller: Jt(t)
|
|
780
780
|
});
|
|
781
781
|
}
|
|
782
|
-
function
|
|
782
|
+
function F(e) {
|
|
783
783
|
return {
|
|
784
784
|
label: e.suppressLabel ? void 0 : e.label,
|
|
785
785
|
description: e.description,
|
|
786
786
|
required: e.isRequired
|
|
787
787
|
};
|
|
788
788
|
}
|
|
789
|
-
function
|
|
789
|
+
function k(e) {
|
|
790
790
|
if (e.default !== void 0)
|
|
791
791
|
return e.default;
|
|
792
792
|
if (e.examples && e.examples.length > 0)
|
|
@@ -814,10 +814,10 @@ function P(e) {
|
|
|
814
814
|
return t === "int8" || t === "int16" || t === "int32" || t === "int64" || t === "int128" || t === "uint8" || t === "uint16" || t === "uint32" || t === "uint64" || t === "uint128" || t === "float" || t === "double" || t === "decimal" ? 0 : void 0;
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function Zt(e, t) {
|
|
818
818
|
return !t || t.length === 0 ? !1 : typeof t[0] == "string" ? t.includes(e) : Array.isArray(t[0]) ? t.some((n) => n.includes(e)) : !1;
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function Ht(e, t = "property") {
|
|
821
821
|
if (!e.has(t)) return t;
|
|
822
822
|
let n = 1;
|
|
823
823
|
for (; e.has(`${t}${n}`); )
|
|
@@ -829,98 +829,109 @@ function ke({
|
|
|
829
829
|
controller: t
|
|
830
830
|
}) {
|
|
831
831
|
const n = e.definition;
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
})
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
832
|
+
if (n.type !== "object" || !("properties" in n))
|
|
833
|
+
return console.warn("StructureObjectControl requires an ObjectTypeDefinition"), p.div("Invalid object definition");
|
|
834
|
+
const r = n.properties, s = n.required, a = n.additionalProperties, u = a !== !1, i = typeof a == "object" && a !== null ? a : { type: "any" }, o = n.minProperties ?? 0, c = n.maxProperties ?? 1 / 0, l = xt(r), y = new Set(
|
|
835
|
+
l.map(([v]) => v)
|
|
836
|
+
), h = l.map(([v, I]) => {
|
|
837
|
+
const T = v, j = t.field(T), w = Zt(T, s);
|
|
838
|
+
return D({
|
|
839
|
+
ctx: e.with({
|
|
840
|
+
definition: I,
|
|
841
|
+
isPropertyRequired: w,
|
|
842
|
+
suppressLabel: !1
|
|
843
|
+
}).append(T),
|
|
844
|
+
controller: j
|
|
845
|
+
});
|
|
846
|
+
}), d = W(t.signal, (v) => {
|
|
847
|
+
const I = Object.keys(v ?? {}), T = I.filter((w) => !y.has(w));
|
|
848
|
+
if (T.length === 0) return pe;
|
|
849
|
+
const j = I.length > o && !e.readOnly;
|
|
850
|
+
return q(
|
|
851
|
+
...T.map((w) => {
|
|
852
|
+
const R = t.field(w);
|
|
853
|
+
return p.div(
|
|
854
|
+
f.class("bc-json-structure-additional-property"),
|
|
855
|
+
p.div(
|
|
856
|
+
f.class("bc-json-structure-additional-property-header"),
|
|
857
|
+
p.strong(`${w}:`),
|
|
858
|
+
U(
|
|
859
|
+
{
|
|
860
|
+
variant: "text",
|
|
861
|
+
size: "xs",
|
|
862
|
+
onClick: () => {
|
|
863
|
+
const E = { ...x.get(t.signal) ?? {} };
|
|
864
|
+
delete E[w], t.change(E);
|
|
865
|
+
},
|
|
866
|
+
disabled: !j
|
|
859
867
|
},
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
868
|
+
"Remove"
|
|
869
|
+
)
|
|
870
|
+
),
|
|
871
|
+
p.div(
|
|
872
|
+
f.class("bc-json-structure-additional-property-value"),
|
|
873
|
+
D({
|
|
874
|
+
ctx: e.with({
|
|
875
|
+
definition: i,
|
|
876
|
+
isPropertyRequired: !1,
|
|
877
|
+
suppressLabel: !0
|
|
878
|
+
}).append(w),
|
|
879
|
+
controller: R
|
|
880
|
+
})
|
|
863
881
|
)
|
|
864
|
-
)
|
|
865
|
-
|
|
866
|
-
m.class("bc-json-structure-additional-property-value"),
|
|
867
|
-
j({
|
|
868
|
-
ctx: e.with({
|
|
869
|
-
definition: o,
|
|
870
|
-
isPropertyRequired: !1,
|
|
871
|
-
suppressLabel: !0
|
|
872
|
-
}).append(x),
|
|
873
|
-
controller: C
|
|
874
|
-
})
|
|
875
|
-
)
|
|
876
|
-
);
|
|
877
|
-
}), q = d ? U(
|
|
878
|
-
{
|
|
879
|
-
variant: "outline",
|
|
880
|
-
size: "sm",
|
|
881
|
-
onClick: () => {
|
|
882
|
-
const x = I.get(t.signal) ?? {}, C = new Set(Object.keys(x)), D = Yt(C), K = P(o);
|
|
883
|
-
t.change({
|
|
884
|
-
...x,
|
|
885
|
-
[D]: K
|
|
886
|
-
});
|
|
887
|
-
}
|
|
888
|
-
},
|
|
889
|
-
"Add Property"
|
|
890
|
-
) : null, A = p.div(
|
|
891
|
-
m.class("bc-json-structure-object-fields"),
|
|
892
|
-
...$,
|
|
893
|
-
...M,
|
|
894
|
-
q
|
|
895
|
-
), N = p.div(
|
|
896
|
-
m.class("bc-json-structure-object"),
|
|
897
|
-
A
|
|
882
|
+
);
|
|
883
|
+
})
|
|
898
884
|
);
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
885
|
+
}), g = u && !e.readOnly ? U(
|
|
886
|
+
{
|
|
887
|
+
variant: "outline",
|
|
888
|
+
size: "sm",
|
|
889
|
+
disabled: x.map(
|
|
890
|
+
t.signal,
|
|
891
|
+
(v) => Object.keys(v ?? {}).length >= c
|
|
892
|
+
),
|
|
893
|
+
onClick: () => {
|
|
894
|
+
const v = x.get(t.signal) ?? {}, I = new Set(Object.keys(v)), T = Ht(I), j = k(i);
|
|
895
|
+
t.change({
|
|
896
|
+
...v,
|
|
897
|
+
[T]: j
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
},
|
|
901
|
+
"Add Property"
|
|
902
|
+
) : null, m = p.div(
|
|
903
|
+
f.class("bc-json-structure-object-fields"),
|
|
904
|
+
...h,
|
|
905
|
+
d,
|
|
906
|
+
g
|
|
907
|
+
), $ = p.div(
|
|
908
|
+
f.class("bc-json-structure-object"),
|
|
909
|
+
m
|
|
910
|
+
);
|
|
911
|
+
return !e.suppressLabel && e.name ? _({
|
|
912
|
+
...F(e),
|
|
913
|
+
content: $
|
|
914
|
+
}) : $;
|
|
904
915
|
}
|
|
905
|
-
function
|
|
916
|
+
function Re({
|
|
906
917
|
ctx: e,
|
|
907
918
|
controller: t
|
|
908
919
|
}) {
|
|
909
920
|
const n = e.definition;
|
|
910
921
|
if (n.type !== "array" || !("items" in n))
|
|
911
922
|
return console.warn("StructureArrayControl requires an ArrayTypeDefinition"), p.div("Invalid array definition");
|
|
912
|
-
const r = n.items, s = n.minItems ?? 0, a = n.maxItems ?? 1 / 0, u =
|
|
913
|
-
return
|
|
914
|
-
...
|
|
923
|
+
const r = n.items, s = n.minItems ?? 0, a = n.maxItems ?? 1 / 0, u = M(t.signal)((o) => (o?.length ?? 0) < a), i = M(t.signal)((o) => (o?.length ?? 0) > s);
|
|
924
|
+
return me({
|
|
925
|
+
...F(e),
|
|
915
926
|
controller: t,
|
|
916
|
-
createItem: () =>
|
|
927
|
+
createItem: () => k(r),
|
|
917
928
|
showAdd: !0,
|
|
918
|
-
addDisabled:
|
|
929
|
+
addDisabled: M(u)((o) => !o || e.readOnly),
|
|
919
930
|
showRemove: !0,
|
|
920
|
-
removeDisabled:
|
|
931
|
+
removeDisabled: M(i)((o) => !o || e.readOnly),
|
|
921
932
|
element: (o) => {
|
|
922
933
|
const c = o.position.index, l = o.item;
|
|
923
|
-
return
|
|
934
|
+
return D({
|
|
924
935
|
ctx: e.with({
|
|
925
936
|
definition: r,
|
|
926
937
|
suppressLabel: !0
|
|
@@ -930,32 +941,32 @@ function Pe({
|
|
|
930
941
|
}
|
|
931
942
|
});
|
|
932
943
|
}
|
|
933
|
-
function
|
|
944
|
+
function Pe({
|
|
934
945
|
ctx: e,
|
|
935
946
|
controller: t
|
|
936
947
|
}) {
|
|
937
948
|
const n = e.definition;
|
|
938
949
|
if (n.type !== "set" || !("items" in n))
|
|
939
950
|
return console.warn("StructureSetControl requires a SetTypeDefinition"), p.div("Invalid set definition");
|
|
940
|
-
const r = n.items, s = n.minItems ?? 0, a = n.maxItems ?? 1 / 0, u =
|
|
951
|
+
const r = n.items, s = n.minItems ?? 0, a = n.maxItems ?? 1 / 0, u = M(t.signal)((c) => (c?.length ?? 0) < a), i = M(t.signal)((c) => (c?.length ?? 0) > s), o = M(t.signal)((c) => {
|
|
941
952
|
if (!c || c.length === 0) return /* @__PURE__ */ new Set();
|
|
942
953
|
const l = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Set();
|
|
943
954
|
for (let h = 0; h < c.length; h++) {
|
|
944
|
-
const
|
|
945
|
-
l.has(
|
|
955
|
+
const d = JSON.stringify(c[h]);
|
|
956
|
+
l.has(d) ? (y.add(l.get(d)), y.add(h)) : l.set(d, h);
|
|
946
957
|
}
|
|
947
958
|
return y;
|
|
948
959
|
});
|
|
949
|
-
return
|
|
950
|
-
...
|
|
960
|
+
return me({
|
|
961
|
+
...F(e),
|
|
951
962
|
controller: t,
|
|
952
|
-
createItem: () =>
|
|
963
|
+
createItem: () => k(r),
|
|
953
964
|
showAdd: !0,
|
|
954
|
-
addDisabled:
|
|
965
|
+
addDisabled: M(u)((c) => !c || e.readOnly),
|
|
955
966
|
showRemove: !0,
|
|
956
|
-
removeDisabled:
|
|
967
|
+
removeDisabled: M(i)((c) => !c || e.readOnly),
|
|
957
968
|
element: (c) => {
|
|
958
|
-
const l = c.position.index, y = c.item, h = o.map((g) => g.has(l)),
|
|
969
|
+
const l = c.position.index, y = c.item, h = o.map((g) => g.has(l)), d = D({
|
|
959
970
|
ctx: e.with({
|
|
960
971
|
definition: r,
|
|
961
972
|
suppressLabel: !0
|
|
@@ -963,91 +974,99 @@ function qe({
|
|
|
963
974
|
controller: y
|
|
964
975
|
});
|
|
965
976
|
return h.map((g) => g ? B(
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
977
|
+
f.class("bc-stack--gap-1"),
|
|
978
|
+
d,
|
|
979
|
+
ge(
|
|
980
|
+
f.class("bc-json-structure-set-error"),
|
|
970
981
|
"⚠️ Duplicate value - sets must contain unique items"
|
|
971
982
|
)
|
|
972
|
-
) :
|
|
983
|
+
) : d);
|
|
973
984
|
}
|
|
974
985
|
});
|
|
975
986
|
}
|
|
976
|
-
function
|
|
987
|
+
function Xt(e, t = "key") {
|
|
977
988
|
if (!e.has(t)) return t;
|
|
978
989
|
let n = 1;
|
|
979
990
|
for (; e.has(`${t}${n}`); )
|
|
980
991
|
n++;
|
|
981
992
|
return `${t}${n}`;
|
|
982
993
|
}
|
|
983
|
-
function
|
|
994
|
+
function qe({
|
|
984
995
|
ctx: e,
|
|
985
996
|
controller: t
|
|
986
997
|
}) {
|
|
987
998
|
const n = e.definition;
|
|
988
999
|
if (n.type !== "map" || !("values" in n))
|
|
989
1000
|
return console.warn("StructureMapControl requires a MapTypeDefinition"), p.div("Invalid map definition");
|
|
990
|
-
const r = n.values, s = n.minProperties ?? 0, a = n.maxProperties ?? 1 / 0
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1001
|
+
const r = n.values, s = n.minProperties ?? 0, a = n.maxProperties ?? 1 / 0, u = W(t.signal, (l) => {
|
|
1002
|
+
const y = Object.keys(l ?? {});
|
|
1003
|
+
if (y.length === 0) return pe;
|
|
1004
|
+
const h = y.length > s && !e.readOnly;
|
|
1005
|
+
return q(
|
|
1006
|
+
...y.map((d) => {
|
|
1007
|
+
const g = t.field(d);
|
|
1008
|
+
return p.div(
|
|
1009
|
+
f.class("bc-json-structure-map-entry"),
|
|
1010
|
+
p.div(
|
|
1011
|
+
f.class("bc-json-structure-map-entry-header"),
|
|
1012
|
+
p.strong(
|
|
1013
|
+
f.class("bc-json-structure-map-entry-key"),
|
|
1014
|
+
`${d}:`
|
|
1015
|
+
),
|
|
1016
|
+
U(
|
|
1017
|
+
{
|
|
1018
|
+
variant: "text",
|
|
1019
|
+
size: "xs",
|
|
1020
|
+
onClick: () => {
|
|
1021
|
+
const m = { ...x.get(t.signal) ?? {} };
|
|
1022
|
+
delete m[d], t.change(m);
|
|
1023
|
+
},
|
|
1024
|
+
disabled: !h
|
|
1006
1025
|
},
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1026
|
+
"Remove"
|
|
1027
|
+
)
|
|
1028
|
+
),
|
|
1029
|
+
p.div(
|
|
1030
|
+
f.class("bc-json-structure-map-entry-value"),
|
|
1031
|
+
D({
|
|
1032
|
+
ctx: e.with({
|
|
1033
|
+
definition: r,
|
|
1034
|
+
suppressLabel: !0
|
|
1035
|
+
}).append(d),
|
|
1036
|
+
controller: g
|
|
1037
|
+
})
|
|
1010
1038
|
)
|
|
1011
|
-
)
|
|
1012
|
-
|
|
1013
|
-
m.class("bc-json-structure-map-entry-value"),
|
|
1014
|
-
j({
|
|
1015
|
-
ctx: e.with({
|
|
1016
|
-
definition: r,
|
|
1017
|
-
suppressLabel: !0
|
|
1018
|
-
}).append(d),
|
|
1019
|
-
controller: v
|
|
1020
|
-
})
|
|
1021
|
-
)
|
|
1022
|
-
);
|
|
1023
|
-
}), h = c ? U(
|
|
1024
|
-
{
|
|
1025
|
-
variant: "outline",
|
|
1026
|
-
size: "sm",
|
|
1027
|
-
onClick: () => {
|
|
1028
|
-
const d = I.get(t.signal) ?? {}, v = new Set(Object.keys(d)), $ = Qt(v), M = P(r);
|
|
1029
|
-
t.change({
|
|
1030
|
-
...d,
|
|
1031
|
-
[$]: M
|
|
1032
|
-
});
|
|
1033
|
-
}
|
|
1034
|
-
},
|
|
1035
|
-
"Add Entry"
|
|
1036
|
-
) : null, f = p.div(
|
|
1037
|
-
m.class("bc-json-structure-map-entries"),
|
|
1038
|
-
...y,
|
|
1039
|
-
h
|
|
1040
|
-
), g = p.div(
|
|
1041
|
-
m.class("bc-json-structure-map"),
|
|
1042
|
-
f
|
|
1039
|
+
);
|
|
1040
|
+
})
|
|
1043
1041
|
);
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1042
|
+
}), i = e.readOnly ? null : U(
|
|
1043
|
+
{
|
|
1044
|
+
variant: "outline",
|
|
1045
|
+
size: "sm",
|
|
1046
|
+
disabled: x.map(
|
|
1047
|
+
t.signal,
|
|
1048
|
+
(l) => Object.keys(l ?? {}).length >= a
|
|
1049
|
+
),
|
|
1050
|
+
onClick: () => {
|
|
1051
|
+
const l = x.get(t.signal) ?? {}, y = new Set(Object.keys(l)), h = Xt(y), d = k(r);
|
|
1052
|
+
t.change({
|
|
1053
|
+
...l,
|
|
1054
|
+
[h]: d
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1058
|
+
"Add Entry"
|
|
1059
|
+
), o = p.div(
|
|
1060
|
+
f.class("bc-json-structure-map-entries"),
|
|
1061
|
+
u,
|
|
1062
|
+
i
|
|
1063
|
+
), c = p.div(f.class("bc-json-structure-map"), o);
|
|
1064
|
+
return !e.suppressLabel && e.name ? _({
|
|
1065
|
+
...F(e),
|
|
1066
|
+
content: c
|
|
1067
|
+
}) : c;
|
|
1049
1068
|
}
|
|
1050
|
-
function
|
|
1069
|
+
function Fe({
|
|
1051
1070
|
ctx: e,
|
|
1052
1071
|
controller: t
|
|
1053
1072
|
}) {
|
|
@@ -1058,54 +1077,54 @@ function Le({
|
|
|
1058
1077
|
if (!Array.isArray(a) || a.length !== r.length) {
|
|
1059
1078
|
const i = r.map((o) => {
|
|
1060
1079
|
const c = s[o];
|
|
1061
|
-
return c ?
|
|
1080
|
+
return c ? k(c) : void 0;
|
|
1062
1081
|
});
|
|
1063
1082
|
t.change(i);
|
|
1064
1083
|
}
|
|
1065
|
-
const u =
|
|
1084
|
+
const u = F(e);
|
|
1066
1085
|
return p.div(
|
|
1067
|
-
|
|
1086
|
+
f.class("bc-json-structure-tuple"),
|
|
1068
1087
|
// Optional label and description
|
|
1069
1088
|
u.label && p.label(
|
|
1070
|
-
|
|
1089
|
+
f.class("bc-json-structure-tuple-label"),
|
|
1071
1090
|
u.label,
|
|
1072
|
-
u.required && p.span(
|
|
1091
|
+
u.required && p.span(f.class("bc-required-indicator"), "*")
|
|
1073
1092
|
),
|
|
1074
1093
|
u.description && p.div(
|
|
1075
|
-
|
|
1094
|
+
f.class("bc-json-structure-tuple-description"),
|
|
1076
1095
|
u.description
|
|
1077
1096
|
),
|
|
1078
1097
|
// Render tuple elements
|
|
1079
1098
|
p.div(
|
|
1080
|
-
|
|
1099
|
+
f.class("bc-json-structure-tuple-elements"),
|
|
1081
1100
|
...r.map((i, o) => {
|
|
1082
1101
|
const c = s[i];
|
|
1083
1102
|
if (!c)
|
|
1084
1103
|
return console.warn(
|
|
1085
1104
|
`Tuple element "${i}" at index ${o} not found in properties`
|
|
1086
1105
|
), p.div(
|
|
1087
|
-
|
|
1106
|
+
f.class("bc-json-structure-tuple-element"),
|
|
1088
1107
|
p.span(`Missing definition for "${i}"`)
|
|
1089
1108
|
);
|
|
1090
1109
|
const l = t.item(o), y = c.name || i;
|
|
1091
1110
|
return p.div(
|
|
1092
|
-
|
|
1111
|
+
f.class("bc-json-structure-tuple-element"),
|
|
1093
1112
|
// Element position indicator and label
|
|
1094
1113
|
p.div(
|
|
1095
|
-
|
|
1114
|
+
f.class("bc-json-structure-tuple-element-header"),
|
|
1096
1115
|
p.span(
|
|
1097
|
-
|
|
1116
|
+
f.class("bc-json-structure-tuple-position"),
|
|
1098
1117
|
`[${o}]`
|
|
1099
1118
|
),
|
|
1100
1119
|
p.span(
|
|
1101
|
-
|
|
1120
|
+
f.class("bc-json-structure-tuple-element-name"),
|
|
1102
1121
|
y
|
|
1103
1122
|
)
|
|
1104
1123
|
),
|
|
1105
1124
|
// Element control
|
|
1106
1125
|
p.div(
|
|
1107
|
-
|
|
1108
|
-
|
|
1126
|
+
f.class("bc-json-structure-tuple-element-control"),
|
|
1127
|
+
D({
|
|
1109
1128
|
ctx: e.with({
|
|
1110
1129
|
definition: c,
|
|
1111
1130
|
suppressLabel: !0
|
|
@@ -1119,13 +1138,13 @@ function Le({
|
|
|
1119
1138
|
)
|
|
1120
1139
|
);
|
|
1121
1140
|
}
|
|
1122
|
-
function
|
|
1141
|
+
function Yt({
|
|
1123
1142
|
options: e,
|
|
1124
1143
|
selected: t,
|
|
1125
1144
|
onChange: n,
|
|
1126
1145
|
disabled: r
|
|
1127
1146
|
}) {
|
|
1128
|
-
return
|
|
1147
|
+
return ye({
|
|
1129
1148
|
options: e.map((s) => ({
|
|
1130
1149
|
type: "value",
|
|
1131
1150
|
value: s.value,
|
|
@@ -1136,13 +1155,13 @@ function en({
|
|
|
1136
1155
|
disabled: r
|
|
1137
1156
|
});
|
|
1138
1157
|
}
|
|
1139
|
-
function
|
|
1158
|
+
function Qt({
|
|
1140
1159
|
ctx: e,
|
|
1141
1160
|
selector: t,
|
|
1142
1161
|
inner: n
|
|
1143
1162
|
}) {
|
|
1144
1163
|
const r = B(
|
|
1145
|
-
|
|
1164
|
+
f.class("bc-stack--gap-2 bc-stack--align-start"),
|
|
1146
1165
|
t,
|
|
1147
1166
|
n
|
|
1148
1167
|
);
|
|
@@ -1153,7 +1172,7 @@ function tn({
|
|
|
1153
1172
|
content: r
|
|
1154
1173
|
});
|
|
1155
1174
|
}
|
|
1156
|
-
function
|
|
1175
|
+
function en(e, t, n) {
|
|
1157
1176
|
if (!e || typeof e != "object")
|
|
1158
1177
|
return null;
|
|
1159
1178
|
const r = e;
|
|
@@ -1170,7 +1189,7 @@ function nn(e, t, n) {
|
|
|
1170
1189
|
}
|
|
1171
1190
|
return null;
|
|
1172
1191
|
}
|
|
1173
|
-
function
|
|
1192
|
+
function tn(e, t, n) {
|
|
1174
1193
|
if (!e || typeof e != "object")
|
|
1175
1194
|
return;
|
|
1176
1195
|
const r = e;
|
|
@@ -1181,7 +1200,7 @@ function rn(e, t, n) {
|
|
|
1181
1200
|
if (t in r)
|
|
1182
1201
|
return r[t];
|
|
1183
1202
|
}
|
|
1184
|
-
function
|
|
1203
|
+
function oe(e, t, n) {
|
|
1185
1204
|
return n ? e && typeof e == "object" ? {
|
|
1186
1205
|
[n]: t,
|
|
1187
1206
|
...e
|
|
@@ -1191,64 +1210,64 @@ function le(e, t, n) {
|
|
|
1191
1210
|
[t]: e
|
|
1192
1211
|
};
|
|
1193
1212
|
}
|
|
1194
|
-
function
|
|
1213
|
+
function Le({
|
|
1195
1214
|
ctx: e,
|
|
1196
1215
|
controller: t
|
|
1197
1216
|
}) {
|
|
1198
1217
|
const n = e.definition;
|
|
1199
1218
|
if (!n.choices || typeof n.choices != "object")
|
|
1200
1219
|
return console.warn("StructureChoiceControl requires choices property"), p.div(
|
|
1201
|
-
|
|
1220
|
+
f.class("bc-json-structure-error"),
|
|
1202
1221
|
"Invalid choice definition: missing choices"
|
|
1203
1222
|
);
|
|
1204
1223
|
const r = n.choices, s = n.selector, a = Object.keys(r);
|
|
1205
1224
|
if (a.length === 0)
|
|
1206
1225
|
return p.div(
|
|
1207
|
-
|
|
1226
|
+
f.class("bc-json-structure-error"),
|
|
1208
1227
|
"Choice type has no variants defined"
|
|
1209
1228
|
);
|
|
1210
|
-
const u = a.map((
|
|
1211
|
-
const
|
|
1212
|
-
return { value:
|
|
1213
|
-
}), i =
|
|
1229
|
+
const u = a.map((m) => {
|
|
1230
|
+
const v = r[m].name || m;
|
|
1231
|
+
return { value: m, label: v };
|
|
1232
|
+
}), i = M(t.signal)((m) => en(m, r, s)), o = x.get(i) || a[0], c = Je(o);
|
|
1214
1233
|
t.onDispose(c.dispose);
|
|
1215
1234
|
let l = !1;
|
|
1216
|
-
const y = i.on((
|
|
1217
|
-
!l &&
|
|
1235
|
+
const y = i.on((m) => {
|
|
1236
|
+
!l && m !== null && c.set(m);
|
|
1218
1237
|
});
|
|
1219
1238
|
t.onDispose(y);
|
|
1220
|
-
const
|
|
1239
|
+
const d = Yt({
|
|
1221
1240
|
options: u,
|
|
1222
1241
|
selected: c,
|
|
1223
|
-
onChange: (
|
|
1224
|
-
l = !0, c.set(
|
|
1225
|
-
const
|
|
1226
|
-
if (
|
|
1227
|
-
const
|
|
1228
|
-
t.change(
|
|
1242
|
+
onChange: (m) => {
|
|
1243
|
+
l = !0, c.set(m);
|
|
1244
|
+
const $ = r[m];
|
|
1245
|
+
if ($) {
|
|
1246
|
+
const v = k($), I = oe(v, m, s);
|
|
1247
|
+
t.change(I);
|
|
1229
1248
|
}
|
|
1230
1249
|
},
|
|
1231
1250
|
disabled: e.readOnly || e.isDeprecated
|
|
1232
|
-
}), g = W(c, (
|
|
1233
|
-
const
|
|
1234
|
-
if (
|
|
1251
|
+
}), g = W(c, (m) => {
|
|
1252
|
+
const $ = r[x.get(m)];
|
|
1253
|
+
if (!$)
|
|
1235
1254
|
return p.div(
|
|
1236
|
-
|
|
1237
|
-
`Choice variant not found: ${
|
|
1255
|
+
f.class("bc-json-structure-error"),
|
|
1256
|
+
`Choice variant not found: ${x.get(m)}`
|
|
1238
1257
|
);
|
|
1239
|
-
const
|
|
1240
|
-
(
|
|
1241
|
-
),
|
|
1242
|
-
const
|
|
1243
|
-
|
|
1244
|
-
|
|
1258
|
+
const v = M(t.signal)(
|
|
1259
|
+
(j) => tn(j, x.get(m), s)
|
|
1260
|
+
), I = (j) => {
|
|
1261
|
+
const w = oe(
|
|
1262
|
+
j,
|
|
1263
|
+
x.get(m),
|
|
1245
1264
|
s
|
|
1246
1265
|
);
|
|
1247
|
-
t.change(
|
|
1248
|
-
},
|
|
1249
|
-
[...t.path,
|
|
1250
|
-
|
|
1251
|
-
|
|
1266
|
+
t.change(w);
|
|
1267
|
+
}, T = new Xe(
|
|
1268
|
+
[...t.path, x.get(m)],
|
|
1269
|
+
I,
|
|
1270
|
+
v,
|
|
1252
1271
|
t.status,
|
|
1253
1272
|
{
|
|
1254
1273
|
disabled: t.disabled
|
|
@@ -1256,35 +1275,35 @@ function Ee({
|
|
|
1256
1275
|
void 0
|
|
1257
1276
|
// Use default equality
|
|
1258
1277
|
);
|
|
1259
|
-
return t.onDispose(() =>
|
|
1278
|
+
return t.onDispose(() => T.dispose()), D({
|
|
1260
1279
|
ctx: e.with({
|
|
1261
|
-
definition:
|
|
1280
|
+
definition: $,
|
|
1262
1281
|
suppressLabel: !0
|
|
1263
1282
|
// Choice selector acts as the label
|
|
1264
|
-
}).append(
|
|
1265
|
-
controller:
|
|
1283
|
+
}).append(x.get(m)),
|
|
1284
|
+
controller: T
|
|
1266
1285
|
});
|
|
1267
1286
|
});
|
|
1268
|
-
return
|
|
1287
|
+
return Qt({
|
|
1269
1288
|
ctx: e,
|
|
1270
|
-
selector:
|
|
1289
|
+
selector: d,
|
|
1271
1290
|
inner: g
|
|
1272
1291
|
});
|
|
1273
1292
|
}
|
|
1274
|
-
function
|
|
1293
|
+
function nn(e) {
|
|
1275
1294
|
return {
|
|
1276
|
-
label: e.suppressLabel ? void 0 :
|
|
1295
|
+
label: e.suppressLabel ? void 0 : S(e.label, e.isDeprecated),
|
|
1277
1296
|
description: e.description,
|
|
1278
1297
|
required: e.isRequired,
|
|
1279
1298
|
disabled: e.readOnly || e.isDeprecated
|
|
1280
1299
|
};
|
|
1281
1300
|
}
|
|
1282
|
-
function
|
|
1301
|
+
function Ee({
|
|
1283
1302
|
ctx: e,
|
|
1284
1303
|
controller: t
|
|
1285
1304
|
}) {
|
|
1286
|
-
const n =
|
|
1287
|
-
return
|
|
1305
|
+
const n = nn(e);
|
|
1306
|
+
return it({
|
|
1288
1307
|
...n,
|
|
1289
1308
|
options: (e.enumValues ?? []).map((r) => ({
|
|
1290
1309
|
type: "value",
|
|
@@ -1294,18 +1313,18 @@ function Ve({
|
|
|
1294
1313
|
controller: t
|
|
1295
1314
|
});
|
|
1296
1315
|
}
|
|
1297
|
-
function
|
|
1316
|
+
function Ve({
|
|
1298
1317
|
ctx: e,
|
|
1299
1318
|
controller: t
|
|
1300
1319
|
}) {
|
|
1301
|
-
return
|
|
1302
|
-
|
|
1303
|
-
|
|
1320
|
+
return q(
|
|
1321
|
+
Ze(() => {
|
|
1322
|
+
x.get(t.signal) !== e.constValue && t.change(e.constValue);
|
|
1304
1323
|
}),
|
|
1305
|
-
|
|
1324
|
+
st($t(e.label, ": "), ge(String(e.constValue)))
|
|
1306
1325
|
);
|
|
1307
1326
|
}
|
|
1308
|
-
function
|
|
1327
|
+
function rn(e) {
|
|
1309
1328
|
return {
|
|
1310
1329
|
label: e.suppressLabel ? void 0 : e.label,
|
|
1311
1330
|
description: e.description,
|
|
@@ -1313,7 +1332,7 @@ function an(e) {
|
|
|
1313
1332
|
disabled: e.readOnly || e.isDeprecated
|
|
1314
1333
|
};
|
|
1315
1334
|
}
|
|
1316
|
-
function
|
|
1335
|
+
function sn(e, t) {
|
|
1317
1336
|
if (e === null) return t.includes("null") ? "null" : null;
|
|
1318
1337
|
if (e === void 0)
|
|
1319
1338
|
return t.includes("string") ? "string" : t[0] ?? null;
|
|
@@ -1343,7 +1362,7 @@ function un(e, t) {
|
|
|
1343
1362
|
return null;
|
|
1344
1363
|
}
|
|
1345
1364
|
}
|
|
1346
|
-
function
|
|
1365
|
+
function an(e, t) {
|
|
1347
1366
|
try {
|
|
1348
1367
|
switch (t) {
|
|
1349
1368
|
case "string":
|
|
@@ -1415,7 +1434,7 @@ function on(e, t) {
|
|
|
1415
1434
|
return { ok: !1 };
|
|
1416
1435
|
}
|
|
1417
1436
|
}
|
|
1418
|
-
function
|
|
1437
|
+
function un(e) {
|
|
1419
1438
|
switch (e) {
|
|
1420
1439
|
case "null":
|
|
1421
1440
|
return null;
|
|
@@ -1432,16 +1451,16 @@ function cn(e) {
|
|
|
1432
1451
|
return;
|
|
1433
1452
|
}
|
|
1434
1453
|
}
|
|
1435
|
-
function
|
|
1454
|
+
function on(e) {
|
|
1436
1455
|
return e.map((t) => ({
|
|
1437
1456
|
key: t,
|
|
1438
|
-
label:
|
|
1439
|
-
detect: (n) =>
|
|
1440
|
-
convert: (n) =>
|
|
1441
|
-
defaultValue: () =>
|
|
1457
|
+
label: Z(t),
|
|
1458
|
+
detect: (n) => sn(n, [t]) === t,
|
|
1459
|
+
convert: (n) => an(n, t),
|
|
1460
|
+
defaultValue: () => un(t)
|
|
1442
1461
|
}));
|
|
1443
1462
|
}
|
|
1444
|
-
function
|
|
1463
|
+
function cn({
|
|
1445
1464
|
options: e,
|
|
1446
1465
|
selected: t,
|
|
1447
1466
|
onChange: n
|
|
@@ -1450,14 +1469,14 @@ function pn({
|
|
|
1450
1469
|
const a = Object.fromEntries(
|
|
1451
1470
|
e.map((u) => [u.value, u.label])
|
|
1452
1471
|
);
|
|
1453
|
-
return
|
|
1472
|
+
return ut({
|
|
1454
1473
|
options: a,
|
|
1455
1474
|
value: t,
|
|
1456
1475
|
onChange: (u) => n(u),
|
|
1457
1476
|
size: "sm"
|
|
1458
1477
|
});
|
|
1459
1478
|
}
|
|
1460
|
-
return
|
|
1479
|
+
return ye({
|
|
1461
1480
|
options: e.map((a) => ({
|
|
1462
1481
|
type: "value",
|
|
1463
1482
|
value: a.value,
|
|
@@ -1467,22 +1486,22 @@ function pn({
|
|
|
1467
1486
|
onChange: n
|
|
1468
1487
|
});
|
|
1469
1488
|
}
|
|
1470
|
-
function
|
|
1489
|
+
function ln({
|
|
1471
1490
|
ctx: e,
|
|
1472
1491
|
showSelector: t,
|
|
1473
1492
|
selector: n,
|
|
1474
1493
|
inner: r
|
|
1475
1494
|
}) {
|
|
1476
|
-
return e.isRoot ? t ? B(
|
|
1477
|
-
...
|
|
1495
|
+
return e.isRoot ? t ? B(f.class("bc-stack--gap-2"), n, r) : r : _({
|
|
1496
|
+
...rn(e),
|
|
1478
1497
|
content: t ? B(
|
|
1479
|
-
|
|
1498
|
+
f.class("bc-stack--gap-2 bc-stack--align-start"),
|
|
1480
1499
|
n,
|
|
1481
1500
|
r
|
|
1482
1501
|
) : r
|
|
1483
1502
|
});
|
|
1484
1503
|
}
|
|
1485
|
-
function
|
|
1504
|
+
function pn({
|
|
1486
1505
|
ctx: e,
|
|
1487
1506
|
controller: t
|
|
1488
1507
|
}) {
|
|
@@ -1491,8 +1510,8 @@ function fn({
|
|
|
1491
1510
|
if (Array.isArray(r))
|
|
1492
1511
|
s = r;
|
|
1493
1512
|
else
|
|
1494
|
-
return console.warn("StructureUnionControl called with non-array type"),
|
|
1495
|
-
const a = s.includes("null"), u =
|
|
1513
|
+
return console.warn("StructureUnionControl called with non-array type"), D({ ctx: e, controller: t });
|
|
1514
|
+
const a = s.includes("null"), u = Q(r), i = a && u.length > 0 ? u : s, o = on(i), c = new at(
|
|
1496
1515
|
t.path,
|
|
1497
1516
|
t.change,
|
|
1498
1517
|
t.signal,
|
|
@@ -1501,31 +1520,31 @@ function fn({
|
|
|
1501
1520
|
o
|
|
1502
1521
|
);
|
|
1503
1522
|
t.onDispose(() => c.dispose());
|
|
1504
|
-
const l = (
|
|
1505
|
-
options: i.map((g) => ({ value: g, label:
|
|
1523
|
+
const l = (d) => cn({
|
|
1524
|
+
options: i.map((g) => ({ value: g, label: Z(g) })),
|
|
1506
1525
|
selected: c.activeBranch,
|
|
1507
|
-
onChange:
|
|
1508
|
-
}), y = (
|
|
1509
|
-
c.switchToBranch(
|
|
1510
|
-
}, h = W(c.activeBranch, (
|
|
1511
|
-
const g =
|
|
1526
|
+
onChange: d
|
|
1527
|
+
}), y = (d) => {
|
|
1528
|
+
c.switchToBranch(d, !1);
|
|
1529
|
+
}, h = W(c.activeBranch, (d) => {
|
|
1530
|
+
const g = x.get(d), m = c.getBranchController(g), $ = e.with({
|
|
1512
1531
|
definition: { ...n, type: g },
|
|
1513
1532
|
// Suppress inner labels only when union is nested (non-root)
|
|
1514
1533
|
suppressLabel: !e.isRoot
|
|
1515
1534
|
});
|
|
1516
|
-
return
|
|
1517
|
-
ctx:
|
|
1518
|
-
controller:
|
|
1535
|
+
return D({
|
|
1536
|
+
ctx: $,
|
|
1537
|
+
controller: m
|
|
1519
1538
|
});
|
|
1520
1539
|
});
|
|
1521
|
-
return
|
|
1540
|
+
return ln({
|
|
1522
1541
|
ctx: e,
|
|
1523
1542
|
showSelector: i.length > 1,
|
|
1524
1543
|
selector: l(y),
|
|
1525
1544
|
inner: h
|
|
1526
1545
|
});
|
|
1527
1546
|
}
|
|
1528
|
-
function
|
|
1547
|
+
function D({
|
|
1529
1548
|
ctx: e,
|
|
1530
1549
|
controller: t
|
|
1531
1550
|
}) {
|
|
@@ -1539,7 +1558,7 @@ function j({
|
|
|
1539
1558
|
}
|
|
1540
1559
|
}
|
|
1541
1560
|
if (n.definition.$extends) {
|
|
1542
|
-
const { merged: i } =
|
|
1561
|
+
const { merged: i } = Ie(n.definition, e.schema);
|
|
1543
1562
|
n = n.with({ definition: i });
|
|
1544
1563
|
}
|
|
1545
1564
|
const s = n.widgetRegistry;
|
|
@@ -1551,149 +1570,149 @@ function j({
|
|
|
1551
1570
|
ctx: n
|
|
1552
1571
|
});
|
|
1553
1572
|
}
|
|
1554
|
-
if (
|
|
1555
|
-
return
|
|
1573
|
+
if (St(n.definition))
|
|
1574
|
+
return Ee({
|
|
1556
1575
|
ctx: n,
|
|
1557
1576
|
controller: t
|
|
1558
1577
|
});
|
|
1559
|
-
if (
|
|
1560
|
-
return
|
|
1578
|
+
if (Dt(n.definition))
|
|
1579
|
+
return Ve({
|
|
1561
1580
|
ctx: n,
|
|
1562
1581
|
controller: t
|
|
1563
1582
|
});
|
|
1564
1583
|
const a = n.resolvedType;
|
|
1565
|
-
if (Array.isArray(a) &&
|
|
1566
|
-
return
|
|
1584
|
+
if (Array.isArray(a) && Q(a).length > 1)
|
|
1585
|
+
return pn({
|
|
1567
1586
|
ctx: n,
|
|
1568
1587
|
controller: t
|
|
1569
1588
|
});
|
|
1570
1589
|
const u = n.primaryType;
|
|
1571
1590
|
if (!u)
|
|
1572
|
-
return
|
|
1591
|
+
return J({
|
|
1573
1592
|
ctx: n,
|
|
1574
1593
|
controller: t
|
|
1575
1594
|
});
|
|
1576
|
-
if (
|
|
1577
|
-
const i = t instanceof
|
|
1595
|
+
if (C(n.definition)) {
|
|
1596
|
+
const i = t instanceof re ? t : t.object();
|
|
1578
1597
|
return ke({
|
|
1579
1598
|
ctx: n,
|
|
1580
1599
|
controller: i
|
|
1581
1600
|
});
|
|
1582
1601
|
}
|
|
1602
|
+
if (he(n.definition)) {
|
|
1603
|
+
const i = t instanceof K ? t : t.array();
|
|
1604
|
+
return Re({
|
|
1605
|
+
ctx: n,
|
|
1606
|
+
controller: i
|
|
1607
|
+
});
|
|
1608
|
+
}
|
|
1583
1609
|
if (be(n.definition)) {
|
|
1584
|
-
const i = t instanceof
|
|
1610
|
+
const i = t instanceof K ? t : t.array();
|
|
1585
1611
|
return Pe({
|
|
1586
1612
|
ctx: n,
|
|
1587
1613
|
controller: i
|
|
1588
1614
|
});
|
|
1589
1615
|
}
|
|
1590
1616
|
if (ve(n.definition)) {
|
|
1591
|
-
const i = t instanceof
|
|
1617
|
+
const i = t instanceof re ? t : t.object();
|
|
1592
1618
|
return qe({
|
|
1593
1619
|
ctx: n,
|
|
1594
1620
|
controller: i
|
|
1595
1621
|
});
|
|
1596
1622
|
}
|
|
1597
1623
|
if (xe(n.definition)) {
|
|
1598
|
-
const i = t instanceof
|
|
1624
|
+
const i = t instanceof K ? t : t.array();
|
|
1599
1625
|
return Fe({
|
|
1600
1626
|
ctx: n,
|
|
1601
1627
|
controller: i
|
|
1602
1628
|
});
|
|
1603
1629
|
}
|
|
1604
|
-
if ($e(n.definition))
|
|
1605
|
-
const i = t instanceof J ? t : t.array();
|
|
1630
|
+
if ($e(n.definition))
|
|
1606
1631
|
return Le({
|
|
1607
|
-
ctx: n,
|
|
1608
|
-
controller: i
|
|
1609
|
-
});
|
|
1610
|
-
}
|
|
1611
|
-
if (Ie(n.definition))
|
|
1612
|
-
return Ee({
|
|
1613
1632
|
ctx: n,
|
|
1614
1633
|
controller: t
|
|
1615
1634
|
});
|
|
1616
1635
|
switch (u) {
|
|
1617
1636
|
case "string":
|
|
1618
|
-
return
|
|
1637
|
+
return Te({
|
|
1619
1638
|
ctx: n,
|
|
1620
1639
|
controller: t
|
|
1621
1640
|
});
|
|
1622
1641
|
case "boolean":
|
|
1623
|
-
return
|
|
1642
|
+
return we({
|
|
1624
1643
|
ctx: n,
|
|
1625
1644
|
controller: t
|
|
1626
1645
|
});
|
|
1627
1646
|
case "uuid":
|
|
1628
|
-
return
|
|
1647
|
+
return Ae({
|
|
1629
1648
|
ctx: n,
|
|
1630
1649
|
controller: t
|
|
1631
1650
|
});
|
|
1632
1651
|
case "uri":
|
|
1633
|
-
return
|
|
1652
|
+
return Ce({
|
|
1634
1653
|
ctx: n,
|
|
1635
1654
|
controller: t
|
|
1636
1655
|
});
|
|
1637
1656
|
case "binary":
|
|
1638
|
-
return
|
|
1657
|
+
return Ne({
|
|
1639
1658
|
ctx: n,
|
|
1640
1659
|
controller: t
|
|
1641
1660
|
});
|
|
1642
1661
|
case "null":
|
|
1643
|
-
return
|
|
1662
|
+
return fn(n);
|
|
1644
1663
|
case "any":
|
|
1645
|
-
return
|
|
1664
|
+
return J({
|
|
1646
1665
|
ctx: n,
|
|
1647
1666
|
controller: t
|
|
1648
1667
|
});
|
|
1649
1668
|
default:
|
|
1650
|
-
return
|
|
1669
|
+
return P(u) ? Se({
|
|
1651
1670
|
ctx: n,
|
|
1652
1671
|
controller: t,
|
|
1653
1672
|
intType: u
|
|
1654
|
-
}) :
|
|
1673
|
+
}) : X(u) ? De({
|
|
1655
1674
|
ctx: n,
|
|
1656
1675
|
controller: t,
|
|
1657
1676
|
floatType: u
|
|
1658
|
-
}) :
|
|
1677
|
+
}) : Y(u) ? Oe({
|
|
1659
1678
|
ctx: n,
|
|
1660
1679
|
controller: t,
|
|
1661
1680
|
temporalType: u
|
|
1662
|
-
}) : (console.warn(`Unknown type: ${u}`),
|
|
1681
|
+
}) : (console.warn(`Unknown type: ${u}`), mn(n, u));
|
|
1663
1682
|
}
|
|
1664
1683
|
}
|
|
1665
|
-
function
|
|
1684
|
+
function dn({
|
|
1666
1685
|
schema: e,
|
|
1667
1686
|
controller: t,
|
|
1668
1687
|
widgetRegistry: n,
|
|
1669
1688
|
readOnly: r,
|
|
1670
1689
|
locale: s
|
|
1671
1690
|
}) {
|
|
1672
|
-
const a =
|
|
1691
|
+
const a = kt(e, {
|
|
1673
1692
|
widgetRegistry: n,
|
|
1674
1693
|
readOnly: r,
|
|
1675
1694
|
locale: s
|
|
1676
1695
|
});
|
|
1677
|
-
return
|
|
1696
|
+
return D({ ctx: a, controller: t });
|
|
1678
1697
|
}
|
|
1679
|
-
function
|
|
1698
|
+
function fn(e) {
|
|
1680
1699
|
return p.div(
|
|
1681
|
-
|
|
1700
|
+
f.class("bc-json-structure-placeholder"),
|
|
1682
1701
|
p.span(`[Null: ${e.label}]`),
|
|
1683
1702
|
p.em("null")
|
|
1684
1703
|
);
|
|
1685
1704
|
}
|
|
1686
|
-
function
|
|
1705
|
+
function mn(e, t) {
|
|
1687
1706
|
return p.div(
|
|
1688
|
-
|
|
1707
|
+
f.class("bc-json-structure-unknown"),
|
|
1689
1708
|
p.span(`Unknown type: ${t}`),
|
|
1690
1709
|
p.em(`at path: ${e.jsonPath}`)
|
|
1691
1710
|
);
|
|
1692
1711
|
}
|
|
1693
|
-
function
|
|
1694
|
-
return new
|
|
1712
|
+
function Ue(e, t) {
|
|
1713
|
+
return new yn(e, t);
|
|
1695
1714
|
}
|
|
1696
|
-
class
|
|
1715
|
+
class yn {
|
|
1697
1716
|
schema;
|
|
1698
1717
|
options;
|
|
1699
1718
|
constructor(t, n) {
|
|
@@ -1783,7 +1802,7 @@ class hn {
|
|
|
1783
1802
|
case "any":
|
|
1784
1803
|
return !0;
|
|
1785
1804
|
default:
|
|
1786
|
-
return
|
|
1805
|
+
return P(n) ? this.validateInteger(t, n, r, s, a) : X(n) ? this.validateFloat(t, r, s, a) : Y(n) ? this.validateTemporal(t, n, s, a) : n === "uuid" ? this.validateUuid(t, s, a) : n === "uri" ? this.validateUri(t, s, a) : n === "binary" ? this.validateBinary(t, s, a) : !1;
|
|
1787
1806
|
}
|
|
1788
1807
|
}
|
|
1789
1808
|
validateString(t, n, r, s) {
|
|
@@ -1815,7 +1834,7 @@ class hn {
|
|
|
1815
1834
|
if (typeof t != "number" && typeof t != "bigint") return !1;
|
|
1816
1835
|
if (typeof t == "number" && !Number.isInteger(t))
|
|
1817
1836
|
return a.push({ path: s, type: "type", expected: n, actual: "float" }), !1;
|
|
1818
|
-
if (
|
|
1837
|
+
if (P(n)) {
|
|
1819
1838
|
const u = z[n], i = typeof t == "bigint" ? t : BigInt(Math.round(t));
|
|
1820
1839
|
(i < u.min || i > u.max) && a.push({
|
|
1821
1840
|
path: s,
|
|
@@ -1892,7 +1911,7 @@ class hn {
|
|
|
1892
1911
|
validateObject(t, n, r, s) {
|
|
1893
1912
|
if (typeof t != "object" || t === null || Array.isArray(t))
|
|
1894
1913
|
return !1;
|
|
1895
|
-
if (!
|
|
1914
|
+
if (!C(n)) return !0;
|
|
1896
1915
|
const a = t, u = n.required;
|
|
1897
1916
|
if (u) {
|
|
1898
1917
|
const i = Array.isArray(u[0]) ? u.flat() : u;
|
|
@@ -1928,7 +1947,7 @@ class hn {
|
|
|
1928
1947
|
}
|
|
1929
1948
|
validateArray(t, n, r, s) {
|
|
1930
1949
|
if (!Array.isArray(t)) return !1;
|
|
1931
|
-
if (!
|
|
1950
|
+
if (!he(n)) return !0;
|
|
1932
1951
|
const a = n;
|
|
1933
1952
|
a.minItems !== void 0 && t.length < a.minItems && s.push({
|
|
1934
1953
|
path: r,
|
|
@@ -1949,7 +1968,7 @@ class hn {
|
|
|
1949
1968
|
}
|
|
1950
1969
|
validateSet(t, n, r, s) {
|
|
1951
1970
|
if (!Array.isArray(t)) return !1;
|
|
1952
|
-
if (!
|
|
1971
|
+
if (!be(n)) return !0;
|
|
1953
1972
|
const a = /* @__PURE__ */ new Set();
|
|
1954
1973
|
for (let u = 0; u < t.length; u++) {
|
|
1955
1974
|
const i = JSON.stringify(t[u]);
|
|
@@ -1964,7 +1983,7 @@ class hn {
|
|
|
1964
1983
|
validateMap(t, n, r, s) {
|
|
1965
1984
|
if (typeof t != "object" || t === null || Array.isArray(t))
|
|
1966
1985
|
return !1;
|
|
1967
|
-
if (!
|
|
1986
|
+
if (!ve(n)) return !0;
|
|
1968
1987
|
const a = t;
|
|
1969
1988
|
for (const [u, i] of Object.entries(a)) {
|
|
1970
1989
|
const o = `${r}/${u}`;
|
|
@@ -1974,7 +1993,7 @@ class hn {
|
|
|
1974
1993
|
}
|
|
1975
1994
|
validateTuple(t, n, r, s) {
|
|
1976
1995
|
if (!Array.isArray(t)) return !1;
|
|
1977
|
-
if (
|
|
1996
|
+
if (!xe(n)) return !0;
|
|
1978
1997
|
const a = n.tuple.length;
|
|
1979
1998
|
t.length !== a && s.push({
|
|
1980
1999
|
path: r,
|
|
@@ -1991,7 +2010,7 @@ class hn {
|
|
|
1991
2010
|
validateChoice(t, n, r, s) {
|
|
1992
2011
|
if (typeof t != "object" || t === null || Array.isArray(t))
|
|
1993
2012
|
return !1;
|
|
1994
|
-
if (
|
|
2013
|
+
if (!$e(n)) return !0;
|
|
1995
2014
|
const a = t, u = Object.keys(n.choices), i = Object.keys(a).find((c) => u.includes(c));
|
|
1996
2015
|
if (!i)
|
|
1997
2016
|
return s.push({
|
|
@@ -2009,39 +2028,39 @@ class hn {
|
|
|
2009
2028
|
), !0;
|
|
2010
2029
|
}
|
|
2011
2030
|
}
|
|
2012
|
-
function
|
|
2013
|
-
return
|
|
2031
|
+
function nr(e, t, n) {
|
|
2032
|
+
return Ue(e, n).validate(t);
|
|
2014
2033
|
}
|
|
2015
|
-
function
|
|
2016
|
-
const n =
|
|
2034
|
+
function gn(e, t) {
|
|
2035
|
+
const n = hn(e, t);
|
|
2017
2036
|
return {
|
|
2018
2037
|
path: e.path,
|
|
2019
2038
|
message: n,
|
|
2020
2039
|
code: e.type
|
|
2021
2040
|
};
|
|
2022
2041
|
}
|
|
2023
|
-
function
|
|
2042
|
+
function Be(e, t) {
|
|
2024
2043
|
return e.map((n) => {
|
|
2025
2044
|
const r = t?.get(n.path);
|
|
2026
|
-
return
|
|
2045
|
+
return gn(n, r);
|
|
2027
2046
|
});
|
|
2028
2047
|
}
|
|
2029
|
-
function
|
|
2048
|
+
function hn(e, t) {
|
|
2030
2049
|
switch (e.type) {
|
|
2031
2050
|
// Type errors
|
|
2032
2051
|
case "type":
|
|
2033
|
-
return `Expected ${
|
|
2052
|
+
return `Expected ${ce(e.expected)}, got ${bn(e.actual)}`;
|
|
2034
2053
|
case "type_mismatch":
|
|
2035
|
-
return `Value must be of type ${
|
|
2054
|
+
return `Value must be of type ${ce(e.expected)}`;
|
|
2036
2055
|
// String validation
|
|
2037
2056
|
case "minLength":
|
|
2038
2057
|
return `Must be at least ${e.expected} characters`;
|
|
2039
2058
|
case "maxLength":
|
|
2040
2059
|
return `Must be no more than ${e.expected} characters`;
|
|
2041
2060
|
case "pattern":
|
|
2042
|
-
return
|
|
2061
|
+
return vn(e, t);
|
|
2043
2062
|
case "format":
|
|
2044
|
-
return
|
|
2063
|
+
return xn(e);
|
|
2045
2064
|
// Numeric validation
|
|
2046
2065
|
case "minimum":
|
|
2047
2066
|
return `Must be at least ${e.expected}`;
|
|
@@ -2054,7 +2073,7 @@ function vn(e, t) {
|
|
|
2054
2073
|
case "multipleOf":
|
|
2055
2074
|
return `Must be a multiple of ${e.expected}`;
|
|
2056
2075
|
case "integer_bounds":
|
|
2057
|
-
return
|
|
2076
|
+
return $n(e);
|
|
2058
2077
|
// Array/Set validation
|
|
2059
2078
|
case "minItems":
|
|
2060
2079
|
return `Must have at least ${e.expected} items`;
|
|
@@ -2078,10 +2097,10 @@ function vn(e, t) {
|
|
|
2078
2097
|
case "additionalProperties":
|
|
2079
2098
|
return `Unknown property: ${e.actual}`;
|
|
2080
2099
|
case "dependentRequired":
|
|
2081
|
-
return
|
|
2100
|
+
return In(e);
|
|
2082
2101
|
// Enum/Const validation
|
|
2083
2102
|
case "enum":
|
|
2084
|
-
return
|
|
2103
|
+
return Tn(e);
|
|
2085
2104
|
case "const":
|
|
2086
2105
|
return `Must be exactly ${JSON.stringify(e.expected)}`;
|
|
2087
2106
|
// Reference errors
|
|
@@ -2096,13 +2115,13 @@ function vn(e, t) {
|
|
|
2096
2115
|
return e.context?.message ?? `Validation error: ${e.type}`;
|
|
2097
2116
|
}
|
|
2098
2117
|
}
|
|
2099
|
-
function
|
|
2100
|
-
return typeof e == "string" ?
|
|
2118
|
+
function ce(e) {
|
|
2119
|
+
return typeof e == "string" ? le(e) : Array.isArray(e) ? e.map(le).join(" or ") : String(e);
|
|
2101
2120
|
}
|
|
2102
|
-
function
|
|
2121
|
+
function bn(e) {
|
|
2103
2122
|
return e === null ? "null" : e === void 0 ? "undefined" : typeof e;
|
|
2104
2123
|
}
|
|
2105
|
-
function
|
|
2124
|
+
function le(e) {
|
|
2106
2125
|
return {
|
|
2107
2126
|
string: "text",
|
|
2108
2127
|
boolean: "true/false",
|
|
@@ -2136,7 +2155,7 @@ function de(e) {
|
|
|
2136
2155
|
null: "empty"
|
|
2137
2156
|
}[e] ?? e;
|
|
2138
2157
|
}
|
|
2139
|
-
function
|
|
2158
|
+
function vn(e, t) {
|
|
2140
2159
|
const n = t?.description;
|
|
2141
2160
|
if (n && e.type === "pattern")
|
|
2142
2161
|
return `Does not match required format: ${n}`;
|
|
@@ -2155,7 +2174,7 @@ function $n(e, t) {
|
|
|
2155
2174
|
}
|
|
2156
2175
|
return "Does not match required format";
|
|
2157
2176
|
}
|
|
2158
|
-
function
|
|
2177
|
+
function xn(e) {
|
|
2159
2178
|
const t = e.expected;
|
|
2160
2179
|
return {
|
|
2161
2180
|
email: "Must be a valid email address",
|
|
@@ -2172,23 +2191,23 @@ function In(e) {
|
|
|
2172
2191
|
"json-pointer": "Must be a valid JSON pointer"
|
|
2173
2192
|
}[t] ?? `Must be a valid ${t}`;
|
|
2174
2193
|
}
|
|
2175
|
-
function
|
|
2194
|
+
function $n(e) {
|
|
2176
2195
|
const t = e.context?.type;
|
|
2177
|
-
if (t &&
|
|
2196
|
+
if (t && P(t)) {
|
|
2178
2197
|
const n = z[t];
|
|
2179
2198
|
return `Must be between ${n.min} and ${n.max}`;
|
|
2180
2199
|
}
|
|
2181
2200
|
return "Value is out of range for this integer type";
|
|
2182
2201
|
}
|
|
2183
|
-
function
|
|
2202
|
+
function In(e) {
|
|
2184
2203
|
const t = e.context?.dependent, n = e.context?.required;
|
|
2185
2204
|
return t && n?.length ? `When "${t}" is present, "${n.join('", "')}" must also be provided` : "Missing required dependent fields";
|
|
2186
2205
|
}
|
|
2187
|
-
function
|
|
2206
|
+
function Tn(e) {
|
|
2188
2207
|
const t = e.expected;
|
|
2189
2208
|
return t && t.length <= 5 ? `Must be one of: ${t.map((r) => JSON.stringify(r)).join(", ")}` : "Invalid value";
|
|
2190
2209
|
}
|
|
2191
|
-
function
|
|
2210
|
+
function rr(e) {
|
|
2192
2211
|
const t = /* @__PURE__ */ new Map();
|
|
2193
2212
|
for (const n of e) {
|
|
2194
2213
|
const r = t.get(n.path) ?? [];
|
|
@@ -2196,13 +2215,13 @@ function sr(e) {
|
|
|
2196
2215
|
}
|
|
2197
2216
|
return t;
|
|
2198
2217
|
}
|
|
2199
|
-
function
|
|
2218
|
+
function ir(e, t) {
|
|
2200
2219
|
return e.filter((n) => n.path === t);
|
|
2201
2220
|
}
|
|
2202
|
-
function
|
|
2221
|
+
function sr(e, t) {
|
|
2203
2222
|
return e.some((n) => n.path === t);
|
|
2204
2223
|
}
|
|
2205
|
-
function
|
|
2224
|
+
function ar(e, t) {
|
|
2206
2225
|
const n = t === "" ? "/" : `${t}/`;
|
|
2207
2226
|
return e.filter((r) => r.path.startsWith(n));
|
|
2208
2227
|
}
|
|
@@ -2276,16 +2295,16 @@ class G {
|
|
|
2276
2295
|
}
|
|
2277
2296
|
}
|
|
2278
2297
|
let V = null;
|
|
2279
|
-
function
|
|
2298
|
+
function L() {
|
|
2280
2299
|
return V || (V = new G()), V;
|
|
2281
2300
|
}
|
|
2282
|
-
function
|
|
2301
|
+
function ur(e) {
|
|
2283
2302
|
V = e;
|
|
2284
2303
|
}
|
|
2285
|
-
function
|
|
2304
|
+
function or(e) {
|
|
2286
2305
|
return new G(e);
|
|
2287
2306
|
}
|
|
2288
|
-
function
|
|
2307
|
+
function cr(e, t, n) {
|
|
2289
2308
|
return {
|
|
2290
2309
|
name: `type:${e}`,
|
|
2291
2310
|
registration: {
|
|
@@ -2298,7 +2317,7 @@ function pr(e, t, n) {
|
|
|
2298
2317
|
}
|
|
2299
2318
|
};
|
|
2300
2319
|
}
|
|
2301
|
-
function
|
|
2320
|
+
function lr(e, t, n) {
|
|
2302
2321
|
return {
|
|
2303
2322
|
name: `format:${e}`,
|
|
2304
2323
|
registration: {
|
|
@@ -2312,7 +2331,7 @@ function dr(e, t, n) {
|
|
|
2312
2331
|
}
|
|
2313
2332
|
};
|
|
2314
2333
|
}
|
|
2315
|
-
function
|
|
2334
|
+
function pr(e, t, n, r) {
|
|
2316
2335
|
return {
|
|
2317
2336
|
name: `type:${e}:format:${t}`,
|
|
2318
2337
|
registration: {
|
|
@@ -2327,7 +2346,7 @@ function fr(e, t, n, r) {
|
|
|
2327
2346
|
}
|
|
2328
2347
|
};
|
|
2329
2348
|
}
|
|
2330
|
-
function
|
|
2349
|
+
function dr(e, t, n, r) {
|
|
2331
2350
|
return {
|
|
2332
2351
|
name: e,
|
|
2333
2352
|
registration: {
|
|
@@ -2341,15 +2360,15 @@ function mr(e, t, n, r) {
|
|
|
2341
2360
|
}
|
|
2342
2361
|
};
|
|
2343
2362
|
}
|
|
2344
|
-
function
|
|
2363
|
+
function wn(e, t) {
|
|
2345
2364
|
if (t) {
|
|
2346
2365
|
const r = t.findBestWidget(e);
|
|
2347
2366
|
if (r)
|
|
2348
2367
|
return r;
|
|
2349
2368
|
}
|
|
2350
|
-
return
|
|
2369
|
+
return L().findBestWidget(e);
|
|
2351
2370
|
}
|
|
2352
|
-
function
|
|
2371
|
+
function fr(e) {
|
|
2353
2372
|
const t = e.definition, n = {};
|
|
2354
2373
|
if (typeof t == "object" && "x:ui" in t) {
|
|
2355
2374
|
const r = t["x:ui"];
|
|
@@ -2364,7 +2383,7 @@ function yr(e) {
|
|
|
2364
2383
|
}
|
|
2365
2384
|
return Object.keys(n).length > 0 ? n : void 0;
|
|
2366
2385
|
}
|
|
2367
|
-
function
|
|
2386
|
+
function We(e) {
|
|
2368
2387
|
const t = e.definition;
|
|
2369
2388
|
if (typeof t == "object" && "x:ui" in t) {
|
|
2370
2389
|
const n = t["x:ui"];
|
|
@@ -2377,18 +2396,18 @@ function _e(e) {
|
|
|
2377
2396
|
return n.type;
|
|
2378
2397
|
}
|
|
2379
2398
|
}
|
|
2380
|
-
function
|
|
2381
|
-
return
|
|
2399
|
+
function mr(e) {
|
|
2400
|
+
return We(e) !== void 0;
|
|
2382
2401
|
}
|
|
2383
|
-
function
|
|
2384
|
-
const n =
|
|
2402
|
+
function yr(e, t) {
|
|
2403
|
+
const n = We(e);
|
|
2385
2404
|
if (n) {
|
|
2386
2405
|
if (t) {
|
|
2387
2406
|
const a = t.get(n);
|
|
2388
2407
|
if (a)
|
|
2389
2408
|
return { name: n, registration: a };
|
|
2390
2409
|
}
|
|
2391
|
-
const s =
|
|
2410
|
+
const s = L().get(n);
|
|
2392
2411
|
if (s)
|
|
2393
2412
|
return { name: n, registration: s };
|
|
2394
2413
|
console.warn(
|
|
@@ -2396,18 +2415,18 @@ function hr(e, t) {
|
|
|
2396
2415
|
{ path: e.jsonPath }
|
|
2397
2416
|
);
|
|
2398
2417
|
}
|
|
2399
|
-
return
|
|
2418
|
+
return wn(e, t);
|
|
2400
2419
|
}
|
|
2401
|
-
function
|
|
2420
|
+
function gr(e, t, n) {
|
|
2402
2421
|
return {
|
|
2403
2422
|
...e,
|
|
2404
2423
|
...t,
|
|
2405
2424
|
...n
|
|
2406
2425
|
};
|
|
2407
2426
|
}
|
|
2408
|
-
function
|
|
2427
|
+
function jn(e = L()) {
|
|
2409
2428
|
e.register("string", {
|
|
2410
|
-
factory: ({ controller: i, ctx: o }) =>
|
|
2429
|
+
factory: ({ controller: i, ctx: o }) => Te({
|
|
2411
2430
|
ctx: o,
|
|
2412
2431
|
controller: i
|
|
2413
2432
|
}),
|
|
@@ -2417,7 +2436,7 @@ function Sn(e = E()) {
|
|
|
2417
2436
|
priority: 0,
|
|
2418
2437
|
canFallback: !0
|
|
2419
2438
|
}), e.register("boolean", {
|
|
2420
|
-
factory: ({ controller: i, ctx: o }) =>
|
|
2439
|
+
factory: ({ controller: i, ctx: o }) => we({
|
|
2421
2440
|
ctx: o,
|
|
2422
2441
|
controller: i
|
|
2423
2442
|
}),
|
|
@@ -2427,7 +2446,7 @@ function Sn(e = E()) {
|
|
|
2427
2446
|
priority: 0,
|
|
2428
2447
|
canFallback: !0
|
|
2429
2448
|
}), e.register("uuid", {
|
|
2430
|
-
factory: ({ controller: i, ctx: o }) =>
|
|
2449
|
+
factory: ({ controller: i, ctx: o }) => Ae({
|
|
2431
2450
|
ctx: o,
|
|
2432
2451
|
controller: i
|
|
2433
2452
|
}),
|
|
@@ -2437,7 +2456,7 @@ function Sn(e = E()) {
|
|
|
2437
2456
|
priority: 0,
|
|
2438
2457
|
canFallback: !0
|
|
2439
2458
|
}), e.register("uri", {
|
|
2440
|
-
factory: ({ controller: i, ctx: o }) =>
|
|
2459
|
+
factory: ({ controller: i, ctx: o }) => Ce({
|
|
2441
2460
|
ctx: o,
|
|
2442
2461
|
controller: i
|
|
2443
2462
|
}),
|
|
@@ -2447,7 +2466,7 @@ function Sn(e = E()) {
|
|
|
2447
2466
|
priority: 0,
|
|
2448
2467
|
canFallback: !0
|
|
2449
2468
|
}), e.register("binary", {
|
|
2450
|
-
factory: ({ controller: i, ctx: o }) =>
|
|
2469
|
+
factory: ({ controller: i, ctx: o }) => Ne({
|
|
2451
2470
|
ctx: o,
|
|
2452
2471
|
controller: i
|
|
2453
2472
|
}),
|
|
@@ -2457,7 +2476,7 @@ function Sn(e = E()) {
|
|
|
2457
2476
|
priority: 0,
|
|
2458
2477
|
canFallback: !0
|
|
2459
2478
|
}), e.register("any", {
|
|
2460
|
-
factory: ({ controller: i, ctx: o }) =>
|
|
2479
|
+
factory: ({ controller: i, ctx: o }) => J({
|
|
2461
2480
|
ctx: o,
|
|
2462
2481
|
controller: i
|
|
2463
2482
|
}),
|
|
@@ -2478,7 +2497,7 @@ function Sn(e = E()) {
|
|
|
2478
2497
|
"uint32",
|
|
2479
2498
|
"uint64",
|
|
2480
2499
|
"uint128"
|
|
2481
|
-
], n = ({ controller: i, ctx: o }) =>
|
|
2500
|
+
], n = ({ controller: i, ctx: o }) => Se({
|
|
2482
2501
|
ctx: o,
|
|
2483
2502
|
controller: i,
|
|
2484
2503
|
intType: o.primaryType
|
|
@@ -2492,7 +2511,7 @@ function Sn(e = E()) {
|
|
|
2492
2511
|
priority: 0,
|
|
2493
2512
|
canFallback: !0
|
|
2494
2513
|
});
|
|
2495
|
-
const r = ["float", "double", "decimal"], s = ({ controller: i, ctx: o }) =>
|
|
2514
|
+
const r = ["float", "double", "decimal"], s = ({ controller: i, ctx: o }) => De({
|
|
2496
2515
|
ctx: o,
|
|
2497
2516
|
controller: i,
|
|
2498
2517
|
floatType: o.primaryType
|
|
@@ -2531,7 +2550,7 @@ function Sn(e = E()) {
|
|
|
2531
2550
|
priority: 0,
|
|
2532
2551
|
canFallback: !0
|
|
2533
2552
|
}), e.register("array", {
|
|
2534
|
-
factory: ({ controller: i, ctx: o }) =>
|
|
2553
|
+
factory: ({ controller: i, ctx: o }) => Re({
|
|
2535
2554
|
ctx: o,
|
|
2536
2555
|
controller: i
|
|
2537
2556
|
}),
|
|
@@ -2541,7 +2560,7 @@ function Sn(e = E()) {
|
|
|
2541
2560
|
priority: 0,
|
|
2542
2561
|
canFallback: !0
|
|
2543
2562
|
}), e.register("set", {
|
|
2544
|
-
factory: ({ controller: i, ctx: o }) =>
|
|
2563
|
+
factory: ({ controller: i, ctx: o }) => Pe({
|
|
2545
2564
|
ctx: o,
|
|
2546
2565
|
controller: i
|
|
2547
2566
|
}),
|
|
@@ -2551,7 +2570,7 @@ function Sn(e = E()) {
|
|
|
2551
2570
|
priority: 0,
|
|
2552
2571
|
canFallback: !0
|
|
2553
2572
|
}), e.register("map", {
|
|
2554
|
-
factory: ({ controller: i, ctx: o }) =>
|
|
2573
|
+
factory: ({ controller: i, ctx: o }) => qe({
|
|
2555
2574
|
ctx: o,
|
|
2556
2575
|
controller: i
|
|
2557
2576
|
}),
|
|
@@ -2561,7 +2580,7 @@ function Sn(e = E()) {
|
|
|
2561
2580
|
priority: 0,
|
|
2562
2581
|
canFallback: !0
|
|
2563
2582
|
}), e.register("tuple", {
|
|
2564
|
-
factory: ({ controller: i, ctx: o }) =>
|
|
2583
|
+
factory: ({ controller: i, ctx: o }) => Fe({
|
|
2565
2584
|
ctx: o,
|
|
2566
2585
|
controller: i
|
|
2567
2586
|
}),
|
|
@@ -2571,7 +2590,7 @@ function Sn(e = E()) {
|
|
|
2571
2590
|
priority: 0,
|
|
2572
2591
|
canFallback: !0
|
|
2573
2592
|
}), e.register("choice", {
|
|
2574
|
-
factory: ({ controller: i, ctx: o }) =>
|
|
2593
|
+
factory: ({ controller: i, ctx: o }) => Le({
|
|
2575
2594
|
ctx: o,
|
|
2576
2595
|
controller: i
|
|
2577
2596
|
}),
|
|
@@ -2581,7 +2600,7 @@ function Sn(e = E()) {
|
|
|
2581
2600
|
priority: 0,
|
|
2582
2601
|
canFallback: !0
|
|
2583
2602
|
}), e.register("enum", {
|
|
2584
|
-
factory: ({ controller: i, ctx: o }) =>
|
|
2603
|
+
factory: ({ controller: i, ctx: o }) => Ee({
|
|
2585
2604
|
ctx: o,
|
|
2586
2605
|
controller: i
|
|
2587
2606
|
}),
|
|
@@ -2592,7 +2611,7 @@ function Sn(e = E()) {
|
|
|
2592
2611
|
canFallback: !1,
|
|
2593
2612
|
matcher: (i) => i.hasEnum
|
|
2594
2613
|
}), e.register("const", {
|
|
2595
|
-
factory: ({ controller: i, ctx: o }) =>
|
|
2614
|
+
factory: ({ controller: i, ctx: o }) => Ve({
|
|
2596
2615
|
ctx: o,
|
|
2597
2616
|
controller: i
|
|
2598
2617
|
}),
|
|
@@ -2604,28 +2623,28 @@ function Sn(e = E()) {
|
|
|
2604
2623
|
matcher: (i) => i.hasConst
|
|
2605
2624
|
});
|
|
2606
2625
|
}
|
|
2607
|
-
function
|
|
2626
|
+
function Mn(e = L()) {
|
|
2608
2627
|
return e.has("string") && e.has("object") && e.has("array");
|
|
2609
2628
|
}
|
|
2610
|
-
function
|
|
2611
|
-
|
|
2629
|
+
function hr(e = L()) {
|
|
2630
|
+
Mn(e) || jn(e);
|
|
2612
2631
|
}
|
|
2613
|
-
function
|
|
2632
|
+
function Sn(e) {
|
|
2614
2633
|
let t = e;
|
|
2615
2634
|
if (e.$root) {
|
|
2616
|
-
const n =
|
|
2635
|
+
const n = N(e.$root, e);
|
|
2617
2636
|
n && (t = n);
|
|
2618
2637
|
}
|
|
2619
|
-
return
|
|
2638
|
+
return A(t, e, /* @__PURE__ */ new Set());
|
|
2620
2639
|
}
|
|
2621
|
-
function
|
|
2640
|
+
function A(e, t, n) {
|
|
2622
2641
|
if (e.type && O(e.type)) {
|
|
2623
2642
|
const r = e.type.$ref;
|
|
2624
2643
|
if (n.has(r))
|
|
2625
2644
|
return;
|
|
2626
2645
|
n.add(r);
|
|
2627
2646
|
try {
|
|
2628
|
-
const s =
|
|
2647
|
+
const s = N(r, t);
|
|
2629
2648
|
if (s) {
|
|
2630
2649
|
const a = {
|
|
2631
2650
|
...s,
|
|
@@ -2633,45 +2652,45 @@ function S(e, t, n) {
|
|
|
2633
2652
|
type: s.type
|
|
2634
2653
|
// Use resolved type, not the ref
|
|
2635
2654
|
};
|
|
2636
|
-
return
|
|
2655
|
+
return A(a, t, n);
|
|
2637
2656
|
}
|
|
2638
2657
|
return;
|
|
2639
2658
|
} finally {
|
|
2640
2659
|
n.delete(r);
|
|
2641
2660
|
}
|
|
2642
2661
|
}
|
|
2643
|
-
return e.default !== void 0 ? e.default : Array.isArray(e.examples) && e.examples.length > 0 ? e.examples[0] : "const" in e && e.const !== void 0 ? e.const : "enum" in e && Array.isArray(e.enum) && e.enum.length > 0 ? e.enum[0] :
|
|
2662
|
+
return e.default !== void 0 ? e.default : Array.isArray(e.examples) && e.examples.length > 0 ? e.examples[0] : "const" in e && e.const !== void 0 ? e.const : "enum" in e && Array.isArray(e.enum) && e.enum.length > 0 ? e.enum[0] : En(e) ? null : Dn(e, t, n);
|
|
2644
2663
|
}
|
|
2645
|
-
function
|
|
2646
|
-
const r =
|
|
2647
|
-
if (
|
|
2648
|
-
return
|
|
2664
|
+
function Dn(e, t, n) {
|
|
2665
|
+
const r = _e(e);
|
|
2666
|
+
if (C(e))
|
|
2667
|
+
return On(e, t, n);
|
|
2649
2668
|
if (r === "choice" && "choices" in e)
|
|
2650
|
-
return
|
|
2669
|
+
return Cn(e, t, n);
|
|
2651
2670
|
if (r === "tuple" && "tuple" in e && "properties" in e)
|
|
2652
|
-
return
|
|
2671
|
+
return Nn(e, t, n);
|
|
2653
2672
|
if (r === "array")
|
|
2654
|
-
return
|
|
2673
|
+
return kn(e, t, n);
|
|
2655
2674
|
if (r === "set")
|
|
2656
|
-
return
|
|
2675
|
+
return Rn(e, t, n);
|
|
2657
2676
|
if (r === "map")
|
|
2658
2677
|
return {};
|
|
2659
2678
|
if (r === "string")
|
|
2679
|
+
return Pn(e);
|
|
2680
|
+
if (Vn(r))
|
|
2681
|
+
return qn(e);
|
|
2682
|
+
if (Un(r))
|
|
2660
2683
|
return Fn(e);
|
|
2661
|
-
if (Bn(r))
|
|
2662
|
-
return Ln(e);
|
|
2663
|
-
if (Wn(r))
|
|
2664
|
-
return En(e);
|
|
2665
2684
|
if (r === "boolean")
|
|
2666
2685
|
return !1;
|
|
2667
2686
|
if (r === "null")
|
|
2668
2687
|
return null;
|
|
2669
|
-
if (
|
|
2670
|
-
return
|
|
2688
|
+
if (Bn(r))
|
|
2689
|
+
return Ln(r);
|
|
2671
2690
|
if (r === "uuid" || r === "uri" || r === "uri-reference" || r === "binary" || r === "bytes")
|
|
2672
2691
|
return "";
|
|
2673
2692
|
}
|
|
2674
|
-
function
|
|
2693
|
+
function An(e) {
|
|
2675
2694
|
if (!e || e.length === 0)
|
|
2676
2695
|
return /* @__PURE__ */ new Set();
|
|
2677
2696
|
if (Array.isArray(e[0])) {
|
|
@@ -2680,10 +2699,10 @@ function On(e) {
|
|
|
2680
2699
|
}
|
|
2681
2700
|
return new Set(e);
|
|
2682
2701
|
}
|
|
2683
|
-
function
|
|
2684
|
-
if (!
|
|
2702
|
+
function On(e, t, n) {
|
|
2703
|
+
if (!C(e))
|
|
2685
2704
|
return {};
|
|
2686
|
-
const r =
|
|
2705
|
+
const r = An(e.required), s = {};
|
|
2687
2706
|
for (const [a, u] of Object.entries(e.properties))
|
|
2688
2707
|
if (r.has(a))
|
|
2689
2708
|
if (u.type && O(u.type)) {
|
|
@@ -2692,25 +2711,25 @@ function Nn(e, t, n) {
|
|
|
2692
2711
|
continue;
|
|
2693
2712
|
n.add(i);
|
|
2694
2713
|
try {
|
|
2695
|
-
const o =
|
|
2714
|
+
const o = N(i, t);
|
|
2696
2715
|
if (o) {
|
|
2697
2716
|
const c = {
|
|
2698
2717
|
...o,
|
|
2699
2718
|
...u,
|
|
2700
2719
|
type: o.type
|
|
2701
|
-
}, l =
|
|
2720
|
+
}, l = A(c, t, n);
|
|
2702
2721
|
l !== void 0 && (s[a] = l);
|
|
2703
2722
|
}
|
|
2704
2723
|
} finally {
|
|
2705
2724
|
n.delete(i);
|
|
2706
2725
|
}
|
|
2707
2726
|
} else {
|
|
2708
|
-
const i =
|
|
2727
|
+
const i = A(u, t, n);
|
|
2709
2728
|
i !== void 0 && (s[a] = i);
|
|
2710
2729
|
}
|
|
2711
2730
|
return s;
|
|
2712
2731
|
}
|
|
2713
|
-
function
|
|
2732
|
+
function Cn(e, t, n) {
|
|
2714
2733
|
if (!("choices" in e))
|
|
2715
2734
|
return;
|
|
2716
2735
|
const r = e.choices, s = Object.keys(r);
|
|
@@ -2718,7 +2737,7 @@ function Rn(e, t, n) {
|
|
|
2718
2737
|
return;
|
|
2719
2738
|
const a = s[0], u = r[a];
|
|
2720
2739
|
if ("selector" in e && e.selector) {
|
|
2721
|
-
const o = e.selector, c =
|
|
2740
|
+
const o = e.selector, c = A(u, t, n);
|
|
2722
2741
|
return typeof c == "object" && c !== null ? {
|
|
2723
2742
|
[o]: a,
|
|
2724
2743
|
...c
|
|
@@ -2726,10 +2745,10 @@ function Rn(e, t, n) {
|
|
|
2726
2745
|
[o]: a
|
|
2727
2746
|
};
|
|
2728
2747
|
}
|
|
2729
|
-
const i =
|
|
2748
|
+
const i = A(u, t, n);
|
|
2730
2749
|
return { [a]: i };
|
|
2731
2750
|
}
|
|
2732
|
-
function
|
|
2751
|
+
function Nn(e, t, n) {
|
|
2733
2752
|
if (!("tuple" in e) || !("properties" in e))
|
|
2734
2753
|
return {};
|
|
2735
2754
|
const r = e.tuple, s = e.properties, a = new Set(
|
|
@@ -2740,38 +2759,38 @@ function kn(e, t, n) {
|
|
|
2740
2759
|
continue;
|
|
2741
2760
|
const o = s[i];
|
|
2742
2761
|
if (o) {
|
|
2743
|
-
const c =
|
|
2762
|
+
const c = A(o, t, n);
|
|
2744
2763
|
c !== void 0 && (u[i] = c);
|
|
2745
2764
|
}
|
|
2746
2765
|
}
|
|
2747
2766
|
return u;
|
|
2748
2767
|
}
|
|
2749
|
-
function
|
|
2768
|
+
function kn(e, t, n) {
|
|
2750
2769
|
const r = ("minItems" in e ? e.minItems : 0) ?? 0;
|
|
2751
2770
|
if (r === 0)
|
|
2752
2771
|
return [];
|
|
2753
2772
|
const s = "items" in e ? e.items : void 0;
|
|
2754
2773
|
if (!s)
|
|
2755
2774
|
return Array(r).fill(null);
|
|
2756
|
-
const a =
|
|
2775
|
+
const a = A(s, t, n);
|
|
2757
2776
|
return Array(r).fill(a ?? null);
|
|
2758
2777
|
}
|
|
2759
|
-
function
|
|
2778
|
+
function Rn(e, t, n) {
|
|
2760
2779
|
const r = ("minItems" in e ? e.minItems : 0) ?? 0;
|
|
2761
2780
|
if (r === 0)
|
|
2762
2781
|
return [];
|
|
2763
2782
|
const s = "items" in e ? e.items : void 0;
|
|
2764
2783
|
if (!s)
|
|
2765
2784
|
return Array(r).fill(null);
|
|
2766
|
-
const a =
|
|
2785
|
+
const a = A(s, t, n);
|
|
2767
2786
|
return Array(r).fill(a ?? null);
|
|
2768
2787
|
}
|
|
2769
|
-
function
|
|
2788
|
+
function Pn(e) {
|
|
2770
2789
|
switch ("format" in e ? e.format : void 0) {
|
|
2771
2790
|
case "date":
|
|
2772
|
-
return
|
|
2791
|
+
return ze();
|
|
2773
2792
|
case "date-time":
|
|
2774
|
-
return
|
|
2793
|
+
return Ge();
|
|
2775
2794
|
case "time":
|
|
2776
2795
|
return "00:00:00";
|
|
2777
2796
|
case "email":
|
|
@@ -2782,8 +2801,8 @@ function Fn(e) {
|
|
|
2782
2801
|
return "";
|
|
2783
2802
|
}
|
|
2784
2803
|
}
|
|
2785
|
-
function
|
|
2786
|
-
const t =
|
|
2804
|
+
function qn(e) {
|
|
2805
|
+
const t = _e(e), n = t === "int64" || t === "uint64" || t === "int128" || t === "uint128";
|
|
2787
2806
|
let r = "minimum" in e ? e.minimum : void 0, s = "maximum" in e ? e.maximum : void 0;
|
|
2788
2807
|
const a = "exclusiveMinimum" in e ? e.exclusiveMinimum : void 0, u = "exclusiveMaximum" in e ? e.exclusiveMaximum : void 0;
|
|
2789
2808
|
a !== void 0 && (r = a + 1), u !== void 0 && (s = u - 1);
|
|
@@ -2792,7 +2811,7 @@ function Ln(e) {
|
|
|
2792
2811
|
const o = "multipleOf" in e ? e.multipleOf : void 0;
|
|
2793
2812
|
return o !== void 0 && o > 0 && (i = Math.round(i / o) * o, r !== void 0 && i < r && (i = Math.ceil(r / o) * o), s !== void 0 && i > s && (i = Math.floor(s / o) * o)), n ? BigInt(Math.round(i)) : Math.round(i);
|
|
2794
2813
|
}
|
|
2795
|
-
function
|
|
2814
|
+
function Fn(e) {
|
|
2796
2815
|
let t = "minimum" in e ? e.minimum : void 0, n = "maximum" in e ? e.maximum : void 0;
|
|
2797
2816
|
const r = "exclusiveMinimum" in e ? e.exclusiveMinimum : void 0, s = "exclusiveMaximum" in e ? e.exclusiveMaximum : void 0, a = "multipleOf" in e ? e.multipleOf : 1e-3;
|
|
2798
2817
|
r !== void 0 && (t = r + a), s !== void 0 && (n = s - a);
|
|
@@ -2801,26 +2820,26 @@ function En(e) {
|
|
|
2801
2820
|
const i = "multipleOf" in e ? e.multipleOf : void 0;
|
|
2802
2821
|
return i !== void 0 && i > 0 && (u = Math.round(u / i) * i, t !== void 0 && u < t && (u = Math.ceil(t / i) * i), n !== void 0 && u > n && (u = Math.floor(n / i) * i)), u;
|
|
2803
2822
|
}
|
|
2804
|
-
function
|
|
2823
|
+
function Ln(e) {
|
|
2805
2824
|
switch (e) {
|
|
2806
2825
|
case "date":
|
|
2807
|
-
return
|
|
2826
|
+
return ze();
|
|
2808
2827
|
case "time":
|
|
2809
2828
|
return "00:00:00";
|
|
2810
2829
|
case "datetime":
|
|
2811
|
-
return
|
|
2830
|
+
return Ge();
|
|
2812
2831
|
case "duration":
|
|
2813
2832
|
return "PT0S";
|
|
2814
2833
|
default:
|
|
2815
2834
|
return "";
|
|
2816
2835
|
}
|
|
2817
2836
|
}
|
|
2818
|
-
function
|
|
2837
|
+
function En(e) {
|
|
2819
2838
|
return Array.isArray(e.type) ? e.type.some(
|
|
2820
2839
|
(t) => typeof t == "string" ? t === "null" : !1
|
|
2821
2840
|
) : !1;
|
|
2822
2841
|
}
|
|
2823
|
-
function
|
|
2842
|
+
function _e(e) {
|
|
2824
2843
|
const t = e.type;
|
|
2825
2844
|
if (typeof t == "string")
|
|
2826
2845
|
return t;
|
|
@@ -2830,7 +2849,7 @@ function ze(e) {
|
|
|
2830
2849
|
return n;
|
|
2831
2850
|
}
|
|
2832
2851
|
}
|
|
2833
|
-
function
|
|
2852
|
+
function Vn(e) {
|
|
2834
2853
|
return e ? [
|
|
2835
2854
|
"int8",
|
|
2836
2855
|
"int16",
|
|
@@ -2844,22 +2863,22 @@ function Bn(e) {
|
|
|
2844
2863
|
"uint128"
|
|
2845
2864
|
].includes(e) : !1;
|
|
2846
2865
|
}
|
|
2847
|
-
function
|
|
2866
|
+
function Un(e) {
|
|
2848
2867
|
return e ? ["float", "double", "decimal"].includes(e) : !1;
|
|
2849
2868
|
}
|
|
2850
|
-
function
|
|
2869
|
+
function Bn(e) {
|
|
2851
2870
|
return e ? ["date", "time", "datetime", "duration"].includes(e) : !1;
|
|
2852
2871
|
}
|
|
2853
|
-
function
|
|
2872
|
+
function ze() {
|
|
2854
2873
|
return (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
2855
2874
|
}
|
|
2856
|
-
function
|
|
2875
|
+
function Ge() {
|
|
2857
2876
|
return (/* @__PURE__ */ new Date()).toISOString();
|
|
2858
2877
|
}
|
|
2859
|
-
function
|
|
2878
|
+
function Wn(e) {
|
|
2860
2879
|
if (e.isValid)
|
|
2861
|
-
return
|
|
2862
|
-
const t =
|
|
2880
|
+
return ie.valid;
|
|
2881
|
+
const t = Be(e.errors), n = /* @__PURE__ */ new Map();
|
|
2863
2882
|
for (const u of t) {
|
|
2864
2883
|
const i = n.get(u.path) || [];
|
|
2865
2884
|
i.push(u), n.set(u.path, i);
|
|
@@ -2890,9 +2909,9 @@ function zn(e) {
|
|
|
2890
2909
|
a[c] = r(l, i);
|
|
2891
2910
|
}
|
|
2892
2911
|
}
|
|
2893
|
-
return Object.keys(a).length > 0 && (s.dependencies = a),
|
|
2912
|
+
return Object.keys(a).length > 0 && (s.dependencies = a), ie.invalid(s);
|
|
2894
2913
|
}
|
|
2895
|
-
function
|
|
2914
|
+
function br({
|
|
2896
2915
|
schema: e,
|
|
2897
2916
|
initialValue: t,
|
|
2898
2917
|
validationMode: n,
|
|
@@ -2904,98 +2923,98 @@ function xr({
|
|
|
2904
2923
|
onValidate: o,
|
|
2905
2924
|
applySchemaDefaults: c = !0
|
|
2906
2925
|
}, l) {
|
|
2907
|
-
const y = t !== void 0 ?
|
|
2908
|
-
let
|
|
2909
|
-
t === void 0 ?
|
|
2926
|
+
const y = t !== void 0 ? x.get(t) : void 0, h = Sn(e);
|
|
2927
|
+
let d;
|
|
2928
|
+
t === void 0 ? d = h ?? {} : c ? d = ot(
|
|
2910
2929
|
h,
|
|
2911
2930
|
y
|
|
2912
|
-
) :
|
|
2913
|
-
const g =
|
|
2914
|
-
const
|
|
2915
|
-
if (o && !
|
|
2916
|
-
const
|
|
2917
|
-
o(
|
|
2931
|
+
) : d = y;
|
|
2932
|
+
const g = Ue(e), m = n ?? "onTouched", $ = (w) => {
|
|
2933
|
+
const R = g.validate(w);
|
|
2934
|
+
if (o && !R.isValid) {
|
|
2935
|
+
const E = Be(R.errors);
|
|
2936
|
+
o(E);
|
|
2918
2937
|
}
|
|
2919
|
-
return
|
|
2920
|
-
}, { controller:
|
|
2921
|
-
initialValue:
|
|
2922
|
-
validationMode:
|
|
2938
|
+
return Wn(R);
|
|
2939
|
+
}, { controller: v, setStatus: I } = Ye({
|
|
2940
|
+
initialValue: d,
|
|
2941
|
+
validationMode: m,
|
|
2923
2942
|
validateDebounceMs: r,
|
|
2924
|
-
validate:
|
|
2943
|
+
validate: m === "onSubmit" ? void 0 : $,
|
|
2925
2944
|
onChange: i
|
|
2926
|
-
}),
|
|
2927
|
-
|
|
2928
|
-
|
|
2945
|
+
}), j = q(
|
|
2946
|
+
He(() => {
|
|
2947
|
+
v.dispose();
|
|
2929
2948
|
}),
|
|
2930
|
-
|
|
2949
|
+
dn({
|
|
2931
2950
|
schema: e,
|
|
2932
|
-
controller:
|
|
2951
|
+
controller: v,
|
|
2933
2952
|
widgetRegistry: s,
|
|
2934
2953
|
readOnly: a,
|
|
2935
2954
|
locale: u
|
|
2936
2955
|
})
|
|
2937
2956
|
);
|
|
2938
|
-
return l({ Form:
|
|
2957
|
+
return l({ Form: j, controller: v, setStatus: I });
|
|
2939
2958
|
}
|
|
2940
2959
|
export {
|
|
2941
2960
|
G as DefaultWidgetRegistry,
|
|
2942
2961
|
z as INTEGER_BOUNDS,
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2962
|
+
br as JSONStructureForm,
|
|
2963
|
+
Nt as RefResolver,
|
|
2964
|
+
te as StructureContext,
|
|
2965
|
+
dn as StructureControl,
|
|
2966
|
+
D as StructureGenericControl,
|
|
2967
|
+
tr as createExtendsResolver,
|
|
2968
|
+
ee as createRefResolver,
|
|
2969
|
+
kt as createStructureContext,
|
|
2970
|
+
Ue as createValidator,
|
|
2971
|
+
or as createWidgetRegistry,
|
|
2972
|
+
hr as ensureDefaultWidgets,
|
|
2973
|
+
Sn as extractStructureDefaults,
|
|
2974
|
+
lr as forFormat,
|
|
2975
|
+
dr as forMatcher,
|
|
2976
|
+
cr as forType,
|
|
2977
|
+
pr as forTypeAndFormat,
|
|
2978
|
+
gn as formatValidationError,
|
|
2979
|
+
Be as formatValidationErrors,
|
|
2980
|
+
ar as getChildErrors,
|
|
2981
|
+
ir as getErrorsForPath,
|
|
2982
|
+
We as getExplicitWidgetName,
|
|
2983
|
+
L as getGlobalWidgetRegistry,
|
|
2984
|
+
Q as getNonNullTypes,
|
|
2985
|
+
se as getResolvedType,
|
|
2986
|
+
fr as getWidgetOptions,
|
|
2987
|
+
rr as groupErrorsByPath,
|
|
2988
|
+
Dt as hasConstValue,
|
|
2989
|
+
mr as hasCustomWidget,
|
|
2990
|
+
Mn as hasDefaultWidgets,
|
|
2991
|
+
St as hasEnumValue,
|
|
2992
|
+
sr as hasErrorsAtPath,
|
|
2993
|
+
he as isArrayTypeDefinition,
|
|
2994
|
+
It as isBigIntType,
|
|
2995
|
+
$e as isChoiceTypeDefinition,
|
|
2996
|
+
Qn as isCompoundType,
|
|
2997
|
+
X as isFloatType,
|
|
2998
|
+
P as isIntegerType,
|
|
2999
|
+
ve as isMapTypeDefinition,
|
|
3000
|
+
jt as isNamespace,
|
|
3001
|
+
At as isNullableType,
|
|
3002
|
+
Tt as isNumericType,
|
|
3003
|
+
C as isObjectTypeDefinition,
|
|
3004
|
+
wt as isPrimitiveType,
|
|
3005
|
+
be as isSetTypeDefinition,
|
|
3006
|
+
Y as isTemporalType,
|
|
3007
|
+
xe as isTupleTypeDefinition,
|
|
3008
|
+
Mt as isTypeDefinition,
|
|
2990
3009
|
O as isTypeReference,
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3010
|
+
gr as mergeWidgetOptions,
|
|
3011
|
+
Ot as parseRefPath,
|
|
3012
|
+
jn as registerDefaultWidgets,
|
|
3013
|
+
Ie as resolveExtends,
|
|
3014
|
+
N as resolveRef,
|
|
3015
|
+
er as resolveTypeReference,
|
|
3016
|
+
wn as resolveWidget,
|
|
3017
|
+
yr as resolveWidgetWithOverride,
|
|
3018
|
+
ur as setGlobalWidgetRegistry,
|
|
3019
|
+
nr as validate
|
|
3001
3020
|
};
|