@knime/jsonforms 1.14.2 → 1.15.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/CHANGELOG.md +32 -0
- package/dist/{AnyOfTwinlist-Cwxtyt0Q.js → AnyOfTwinlist-Co_sJAsc.js} +3 -3
- package/dist/{Button-BxuGKyL5.js → Button-Cqwayw73.js} +4 -4
- package/dist/CheckboxControl-C10_DX1N.js +40 -0
- package/dist/{Checkboxes-DIPjJhPO.js → Checkboxes-DWOxHiUX.js} +2 -2
- package/dist/{CheckboxesControl-5QlPmjwv.js → CheckboxesControl-BMRFgmO_.js} +7 -10
- package/dist/{ComboBoxControl-Dk02x7sN.js → ComboBoxControl-R0DlbAdT.js} +26 -29
- package/dist/{DateControl-CddCObVg.js → DateControl-DAGAM92B.js} +3 -3
- package/dist/DateTimeControl-DJhIb_U4.js +45 -0
- package/dist/{DateTimeFormatInput-bO1zHUyp.js → DateTimeFormatInput-BhLQzC-P.js} +74 -82
- package/dist/{DateTimeFormatPickerControl-Dq25_JV2.js → DateTimeFormatPickerControl-V7pxRYaW.js} +5 -8
- package/dist/{DateTimeFormatPickerWithTypeControl-DZib_x-B.js → DateTimeFormatPickerWithTypeControl-3fa75rGw.js} +6 -9
- package/dist/{DateTimeInput-CEYEV8dt.js → DateTimeInput-Cs0KqlOS.js} +4629 -4556
- package/dist/Dropdown-BEx-cvXH.js +608 -0
- package/dist/{DropdownControl-BNQKWzTT.js → DropdownControl-DEIA5VD4.js} +4 -4
- package/dist/{HorizontalLayout-6GwurgkR.js → HorizontalLayout-DCfhMNq4.js} +2 -2
- package/dist/{InputField-BYxW_-G3.js → InputField-OkFB9VHZ.js} +11 -11
- package/dist/{IntegerControl-DZIY-wb_.js → IntegerControl-Om8J7hch.js} +3 -3
- package/dist/{IntervalControl-Yts36_MI.js → IntervalControl-B7UbyyD-.js} +99 -100
- package/dist/{LoadingDropdown-Dw-0WQ8x.js → LoadingDropdown-CINkq_Sw.js} +6 -6
- package/dist/{ManualTwinlistControl-C3NnAug1.js → ManualTwinlistControl-BLTfr2gT.js} +24 -30
- package/dist/MultiSelectListBoxControl-j1TaFtQj.js +31 -0
- package/dist/{MultimodeTwinlistControl-B2Jven29.js → MultimodeTwinlistControl-BsFqHRFM.js} +97 -108
- package/dist/{MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_37fe7036_lang-DGKMWtLi.js → MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_37fe7036_lang-2fVBipAl.js} +1 -1
- package/dist/{MultiselectListBox-CHvGxAhY.js → MultiselectListBox-CMTJnAWr.js} +18 -23
- package/dist/{NameFilter-D0hKO5Fr.js → NameFilter-d5k6rDVY.js} +3 -3
- package/dist/{NumberControl-DkeQT1iR.js → NumberControl-Kc3hvVef.js} +3 -3
- package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-BOCR1qXG.js +50 -0
- package/dist/{NumberInput-DJ38AGiR.js → NumberInput-BepS3tAK.js} +5 -5
- package/dist/{OneOfDropdown-NAgE-mPP.js → OneOfDropdown-CLwVXrbC.js} +10 -11
- package/dist/{RadioControl-DjrysNQ_.js → RadioControl-DpziR8nA.js} +4 -4
- package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-DVIeg5W1.js +104 -0
- package/dist/{RichTextControl-CXY1ULxR.js → RichTextControl-CE6whfV5.js} +4524 -4079
- package/dist/SectionHeading-D7znCZXu.js +19 -0
- package/dist/SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-DR31vaIu.js +15431 -0
- package/dist/{SectionLayout-CJP4sYyB.js → SectionLayout-BhXDOzqB.js} +4 -4
- package/dist/SettingsSubPanel-x9uWGoiu.js +5 -0
- package/dist/{SettingsSubPanelLayout-YBNVPQOD.js → SettingsSubPanelLayout-BPHBM5n5.js} +12 -11
- package/dist/{SimpleButtonControl-ejyUwJdL.js → SimpleButtonControl-DfCSlgZS.js} +9 -9
- package/dist/SimpleTwinlistControl-CBalniCf.js +25 -0
- package/dist/{SingleSelectControl-B0JgDv7j.js → SingleSelectControl-DC4w0ata.js} +4 -4
- package/dist/{SingleSelectListBoxControl-ClQOxnxW.js → SingleSelectListBoxControl-CKj-p8jZ.js} +33 -36
- package/dist/{SortListControl-mvJofiWn.js → SortListControl-BIUyPjCi.js} +122 -120
- package/dist/{StyledListItem-BXz08pEQ.js → StyledListItem-D-HJWfo5.js} +3 -3
- package/dist/{TextAreaControl-S4aoqAv1.js → TextAreaControl-D28TQZEY.js} +23 -26
- package/dist/{TextControl-rJrjrBw8.js → TextControl-DUDBWcHy.js} +1 -1
- package/dist/{TextControl.vue_vue_type_script_setup_true_lang-Bf6GB1zX.js → TextControl.vue_vue_type_script_setup_true_lang-DpAd3yOu.js} +16 -19
- package/dist/TimeControl-HRooO_z3.js +36 -0
- package/dist/{TwinlistControlBase-D1l9t7Up.js → TwinlistControlBase-Brfh5pqZ.js} +5 -5
- package/dist/{TwinlistLoadingInfo-CQRx9cEu.js → TwinlistLoadingInfo-C4Tta00d.js} +150 -167
- package/dist/TypedStringFilter-CdvgPKhD.js +26 -0
- package/dist/{ValueSwitch-CUYV7v67.js → ValueSwitch-W4y1YvNM.js} +8 -8
- package/dist/{ValueSwitchControl-IP9SxrUs.js → ValueSwitchControl-BaXH8Cjx.js} +3 -3
- package/dist/{VerticalLayout-D2eQSYgv.js → VerticalLayout-ChAmRKNj.js} +5 -5
- package/dist/VerticalLayoutBase-DAk4vfH5.js +20 -0
- package/dist/ZonedDateTimeControl-Qb57KmMT.js +69 -0
- package/dist/{_baseEach-cjHvi5iT.js → _baseEach-DdH9cM67.js} +4 -4
- package/dist/{_baseIteratee-CIxt0KWU.js → _baseIteratee-BGt-t7Os.js} +27 -27
- package/dist/{_getTag-sLUyzSDj.js → _getTag-DAFySze4.js} +10 -10
- package/dist/{arrow-dropdown-DdgjzLAO.js → arrow-dropdown-BAFsD8Su.js} +2 -2
- package/dist/{arrow-next-CIOU5o42.js → arrow-next-BQVCxGb8.js} +2 -2
- package/dist/{close-BuY4mhXV.js → close-DGt8x-x_.js} +2 -2
- package/dist/floating-ui.vue-CDo9Kas1.js +1055 -0
- package/dist/{hotkeys-kwHHtFKz.js → hotkeys-rxnt4egK.js} +1 -1
- package/dist/index-CpKfM262.js +376 -0
- package/dist/knime-jsonforms.css +1 -1
- package/dist/knime-jsonforms.js +64 -67
- package/dist/{localTimeUtils-Dv-1R88J.js → localTimeUtils-NIKgHnIr.js} +179 -181
- package/dist/magic-string.es-BQ9KnLz-.js +659 -0
- package/dist/navigator-e30QQMkl.js +4 -0
- package/dist/popper-LGjf7Wza.js +905 -0
- package/dist/{reload-BVbCGubF.js → reload-DCdbNLa2.js} +2 -2
- package/dist/src/higherOrderComponents/control/LabeledControl.vue.d.ts +26 -22
- package/dist/src/higherOrderComponents/control/errorMessage/ErrorLine.vue.d.ts +3 -4
- package/dist/src/higherOrderComponents/control/errorMessage/ErrorMessages.vue.d.ts +16 -10
- package/dist/src/higherOrderComponents/control/errorMessage/withErrorMessage.d.ts +1 -1
- package/dist/src/higherOrderComponents/control/util.d.ts +7 -33
- package/dist/src/higherOrderComponents/layout/util.d.ts +1 -17
- package/dist/src/layoutComponents/Form.vue.d.ts +12 -4
- package/dist/src/layoutComponents/HorizontalLayout.vue.d.ts +1 -1
- package/dist/src/layoutComponents/SectionLayout.vue.d.ts +13 -5
- package/dist/src/layoutComponents/VerticalLayout.vue.d.ts +1 -1
- package/dist/src/layoutComponents/VerticalLayoutBase.vue.d.ts +16 -9
- package/dist/src/layoutComponents/section/SectionHeading.vue.d.ts +13 -6
- package/dist/src/layoutComponents/settingsSubPanel/SettingsSubPanel.vue.d.ts +2 -2
- package/dist/src/layoutComponents/settingsSubPanel/SettingsSubPanelBackArrow.vue.d.ts +1 -1
- package/dist/src/renderers/dateTimeFormatPickerRenderer.d.ts +2 -2
- package/dist/src/renderers/defaultRenderers.d.ts +966 -151
- package/dist/src/renderers/dropdownRenderer.d.ts +1 -1
- package/dist/src/renderers/fallbackRenderers.d.ts +8 -8
- package/dist/src/renderers/horizontalLayoutRenderer.d.ts +1 -1
- package/dist/src/renderers/sectionLayoutRenderer.d.ts +4 -4
- package/dist/src/renderers/simpleButtonRenderer.d.ts +7 -89
- package/dist/src/renderers/sortListRenderer.d.ts +853 -20
- package/dist/src/renderers/textMessageRenderer.d.ts +65 -1
- package/dist/src/renderers/textRenderer.d.ts +1 -1
- package/dist/src/renderers/verticalLayoutRenderer.d.ts +2 -2
- package/dist/src/renderers/zonedDateTimeRenderer.d.ts +1 -1
- package/dist/src/uiComponents/CheckboxControl.vue.d.ts +15 -6
- package/dist/src/uiComponents/CheckboxesControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/ComboBoxControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/DateControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/DateTimeControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/DateTimeFormatPickerControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/DateTimeFormatPickerWithTypeControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/DropdownControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/IntegerControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/IntervalControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/MultiSelectListBoxControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/NumberControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/NumberControlBase.vue.d.ts +5 -9
- package/dist/src/uiComponents/OneOfDropdown.vue.d.ts +2 -1
- package/dist/src/uiComponents/RadioControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/RadioControlBase.vue.d.ts +4 -8
- package/dist/src/uiComponents/SimpleButtonControl.vue.d.ts +5 -129
- package/dist/src/uiComponents/SingleSelectControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/SingleSelectListBoxControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/SortListControl.vue.d.ts +845 -12
- package/dist/src/uiComponents/TextAreaControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/TextControl.vue.d.ts +203 -3
- package/dist/src/uiComponents/TextMessageControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/TimeControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/ValueSwitchControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/ZonedDateTimeControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/composables/useProvidedState.d.ts +1 -1
- package/dist/src/uiComponents/loading/TwinlistLoadingInfo.vue.d.ts +1 -1
- package/dist/src/uiComponents/richTextControl/DialogLinkModal.vue.d.ts +3 -1
- package/dist/src/uiComponents/richTextControl/RichTextControl.vue.d.ts +230 -1
- package/dist/src/uiComponents/twinlist/AnyOfTwinlist.vue.d.ts +2 -1
- package/dist/src/uiComponents/twinlist/ManualTwinlistControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/twinlist/MultimodeTwinlistControl.vue.d.ts +8 -15
- package/dist/src/uiComponents/twinlist/NameFilter.vue.d.ts +2 -1
- package/dist/src/uiComponents/twinlist/SimpleTwinlistControl.vue.d.ts +2 -1
- package/dist/src/uiComponents/twinlist/TwinlistControlBase.vue.d.ts +5 -10
- package/dist/src/uiComponents/twinlist/TypedStringFilter.vue.d.ts +2 -1
- package/dist/{svgWithTitle-Cr3Pu3wr.js → svgWithTitle-CnTmPYAB.js} +4 -4
- package/dist/testUtils/component.d.ts +18 -18
- package/dist/testing.js +8688 -8655
- package/dist/{toString-C_MqBj3_.js → toString-BhubvA3m.js} +1 -1
- package/dist/{useBuiltinValidations-DP7OS71z.js → useBuiltinValidations-Boxrm71q.js} +1 -1
- package/dist/useDropdownNavigation-BfCXUheD.js +817 -0
- package/dist/usePossibleValues-DXuWWBh_.js +16 -0
- package/package.json +14 -14
- package/dist/CheckboxControl-Oe97HhY3.js +0 -40
- package/dist/DateTimeControl-DyXUJBHE.js +0 -54
- package/dist/Dropdown-CJj0CUA8.js +0 -604
- package/dist/MultiSelectListBoxControl-3Q41S4aA.js +0 -34
- package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-B9K5qEs3.js +0 -53
- package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-WaVJMdQq.js +0 -114
- package/dist/SectionHeading-BU1W5lDr.js +0 -19
- package/dist/SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-CsYyUtDa.js +0 -14015
- package/dist/SettingsSubPanel-KxEyzlB6.js +0 -5
- package/dist/SimpleTwinlistControl-qXQxRI7h.js +0 -28
- package/dist/TimeControl-DfhE8yu9.js +0 -42
- package/dist/TypedStringFilter-C6JhWCCC.js +0 -29
- package/dist/VerticalLayoutBase-DRfHwc4t.js +0 -20
- package/dist/ZonedDateTimeControl-Bi8cV34A.js +0 -75
- package/dist/floating-ui.vue-B-MrqKCT.js +0 -1019
- package/dist/index-CoRworrE.js +0 -322
- package/dist/magic-string.es-D-aKzDFf.js +0 -858
- package/dist/navigator-D_R-txCf.js +0 -7
- package/dist/popper-CRR--9mA.js +0 -907
- package/dist/src/JsonFormsDialog.vue.d.ts +0 -46
- package/dist/useDropdownNavigation-7o7SRJSo.js +0 -781
- package/dist/usePossibleValues-lz0Rcu_N.js +0 -20
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i } from "./navigator-
|
|
1
|
+
import { i } from "./navigator-e30QQMkl.js";
|
|
2
2
|
const s = (r) => r.ctrlKey || r.metaKey || r.altKey || r.shiftKey, a = (r, t) => (Array.isArray(t) ? t : [t]).includes(r.key) && !s(r), o = () => i() ? "metaKey" : "ctrlKey";
|
|
3
3
|
export {
|
|
4
4
|
o as g,
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
import { watch as E, getCurrentScope as K, onScopeDispose as N, onMounted as M, nextTick as q, getCurrentInstance as W, toRef as U, readonly as X, ref as C, customRef as Y, computed as R, toValue as b, unref as J, shallowRef as L } from "vue";
|
|
2
|
+
function V(e) {
|
|
3
|
+
return K() ? (N(e), !0) : !1;
|
|
4
|
+
}
|
|
5
|
+
const $ = typeof window < "u" && typeof document < "u";
|
|
6
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
7
|
+
const Q = Object.prototype.toString, Z = (e) => Q.call(e) === "[object Object]", T = () => {
|
|
8
|
+
}, F = /* @__PURE__ */ ee();
|
|
9
|
+
function ee() {
|
|
10
|
+
var e, t;
|
|
11
|
+
return $ && ((e = window?.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window?.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
|
|
12
|
+
}
|
|
13
|
+
function ve(...e) {
|
|
14
|
+
if (e.length !== 1)
|
|
15
|
+
return U(...e);
|
|
16
|
+
const t = e[0];
|
|
17
|
+
return typeof t == "function" ? X(Y(() => ({ get: t, set: T }))) : C(t);
|
|
18
|
+
}
|
|
19
|
+
function O(e) {
|
|
20
|
+
return Array.isArray(e) ? e : [e];
|
|
21
|
+
}
|
|
22
|
+
function te(e) {
|
|
23
|
+
return W();
|
|
24
|
+
}
|
|
25
|
+
function ne(e, t = !0, n) {
|
|
26
|
+
te() ? M(e, n) : t ? e() : q(e);
|
|
27
|
+
}
|
|
28
|
+
function oe(e, t, n) {
|
|
29
|
+
return E(
|
|
30
|
+
e,
|
|
31
|
+
t,
|
|
32
|
+
{
|
|
33
|
+
...n,
|
|
34
|
+
immediate: !0
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
const x = $ ? window : void 0;
|
|
39
|
+
function y(e) {
|
|
40
|
+
var t;
|
|
41
|
+
const n = b(e);
|
|
42
|
+
return (t = n?.$el) != null ? t : n;
|
|
43
|
+
}
|
|
44
|
+
function A(...e) {
|
|
45
|
+
const t = [], n = () => {
|
|
46
|
+
t.forEach((o) => o()), t.length = 0;
|
|
47
|
+
}, r = (o, c, a, p) => (o.addEventListener(c, a, p), () => o.removeEventListener(c, a, p)), s = R(() => {
|
|
48
|
+
const o = O(b(e[0])).filter((c) => c != null);
|
|
49
|
+
return o.every((c) => typeof c != "string") ? o : void 0;
|
|
50
|
+
}), i = oe(
|
|
51
|
+
() => {
|
|
52
|
+
var o, c;
|
|
53
|
+
return [
|
|
54
|
+
(c = (o = s.value) == null ? void 0 : o.map((a) => y(a))) != null ? c : [x].filter((a) => a != null),
|
|
55
|
+
O(b(s.value ? e[1] : e[0])),
|
|
56
|
+
O(J(s.value ? e[2] : e[1])),
|
|
57
|
+
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
58
|
+
b(s.value ? e[3] : e[2])
|
|
59
|
+
];
|
|
60
|
+
},
|
|
61
|
+
([o, c, a, p]) => {
|
|
62
|
+
if (n(), !o?.length || !c?.length || !a?.length)
|
|
63
|
+
return;
|
|
64
|
+
const l = Z(p) ? { ...p } : p;
|
|
65
|
+
t.push(
|
|
66
|
+
...o.flatMap(
|
|
67
|
+
(v) => c.flatMap(
|
|
68
|
+
(h) => a.map((m) => r(v, h, m, l))
|
|
69
|
+
)
|
|
70
|
+
)
|
|
71
|
+
);
|
|
72
|
+
},
|
|
73
|
+
{ flush: "post" }
|
|
74
|
+
), f = () => {
|
|
75
|
+
i(), n();
|
|
76
|
+
};
|
|
77
|
+
return V(n), f;
|
|
78
|
+
}
|
|
79
|
+
let k = !1;
|
|
80
|
+
function he(e, t, n = {}) {
|
|
81
|
+
const { window: r = x, ignore: s = [], capture: i = !0, detectIframe: f = !1, controls: o = !1 } = n;
|
|
82
|
+
if (!r)
|
|
83
|
+
return o ? { stop: T, cancel: T, trigger: T } : T;
|
|
84
|
+
if (F && !k) {
|
|
85
|
+
k = !0;
|
|
86
|
+
const u = { passive: !0 };
|
|
87
|
+
Array.from(r.document.body.children).forEach((d) => d.addEventListener("click", T, u)), r.document.documentElement.addEventListener("click", T, u);
|
|
88
|
+
}
|
|
89
|
+
let c = !0;
|
|
90
|
+
const a = (u) => b(s).some((d) => {
|
|
91
|
+
if (typeof d == "string")
|
|
92
|
+
return Array.from(r.document.querySelectorAll(d)).some((g) => g === u.target || u.composedPath().includes(g));
|
|
93
|
+
{
|
|
94
|
+
const g = y(d);
|
|
95
|
+
return g && (u.target === g || u.composedPath().includes(g));
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
function p(u) {
|
|
99
|
+
const d = b(u);
|
|
100
|
+
return d && d.$.subTree.shapeFlag === 16;
|
|
101
|
+
}
|
|
102
|
+
function l(u, d) {
|
|
103
|
+
const g = b(u), P = g.$.subTree && g.$.subTree.children;
|
|
104
|
+
return P == null || !Array.isArray(P) ? !1 : P.some((S) => S.el === d.target || d.composedPath().includes(S.el));
|
|
105
|
+
}
|
|
106
|
+
const v = (u) => {
|
|
107
|
+
const d = y(e);
|
|
108
|
+
if (u.target != null && !(!(d instanceof Element) && p(e) && l(e, u)) && !(!d || d === u.target || u.composedPath().includes(d))) {
|
|
109
|
+
if ("detail" in u && u.detail === 0 && (c = !a(u)), !c) {
|
|
110
|
+
c = !0;
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
t(u);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
let h = !1;
|
|
117
|
+
const m = [
|
|
118
|
+
A(r, "click", (u) => {
|
|
119
|
+
h || (h = !0, setTimeout(() => {
|
|
120
|
+
h = !1;
|
|
121
|
+
}, 0), v(u));
|
|
122
|
+
}, { passive: !0, capture: i }),
|
|
123
|
+
A(r, "pointerdown", (u) => {
|
|
124
|
+
const d = y(e);
|
|
125
|
+
c = !a(u) && !!(d && !u.composedPath().includes(d));
|
|
126
|
+
}, { passive: !0 }),
|
|
127
|
+
f && A(r, "blur", (u) => {
|
|
128
|
+
setTimeout(() => {
|
|
129
|
+
var d;
|
|
130
|
+
const g = y(e);
|
|
131
|
+
((d = r.document.activeElement) == null ? void 0 : d.tagName) === "IFRAME" && !g?.contains(r.document.activeElement) && t(u);
|
|
132
|
+
}, 0);
|
|
133
|
+
}, { passive: !0 })
|
|
134
|
+
].filter(Boolean), w = () => m.forEach((u) => u());
|
|
135
|
+
return o ? {
|
|
136
|
+
stop: w,
|
|
137
|
+
cancel: () => {
|
|
138
|
+
c = !1;
|
|
139
|
+
},
|
|
140
|
+
trigger: (u) => {
|
|
141
|
+
c = !0, v(u), c = !1;
|
|
142
|
+
}
|
|
143
|
+
} : w;
|
|
144
|
+
}
|
|
145
|
+
// @__NO_SIDE_EFFECTS__
|
|
146
|
+
function re() {
|
|
147
|
+
const e = L(!1), t = W();
|
|
148
|
+
return t && M(() => {
|
|
149
|
+
e.value = !0;
|
|
150
|
+
}, t), e;
|
|
151
|
+
}
|
|
152
|
+
// @__NO_SIDE_EFFECTS__
|
|
153
|
+
function se(e) {
|
|
154
|
+
const t = /* @__PURE__ */ re();
|
|
155
|
+
return R(() => (t.value, !!e()));
|
|
156
|
+
}
|
|
157
|
+
function ce(e) {
|
|
158
|
+
return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
|
|
159
|
+
}
|
|
160
|
+
function ue(...e) {
|
|
161
|
+
let t, n, r = {};
|
|
162
|
+
e.length === 3 ? (t = e[0], n = e[1], r = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, n = e[0], r = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);
|
|
163
|
+
const {
|
|
164
|
+
target: s = x,
|
|
165
|
+
eventName: i = "keydown",
|
|
166
|
+
passive: f = !1,
|
|
167
|
+
dedupe: o = !1
|
|
168
|
+
} = r, c = ce(t);
|
|
169
|
+
return A(s, i, (p) => {
|
|
170
|
+
p.repeat && b(o) || c(p) && n(p);
|
|
171
|
+
}, f);
|
|
172
|
+
}
|
|
173
|
+
function me(e, t, n = {}) {
|
|
174
|
+
return ue(e, t, { ...n, eventName: "keydown" });
|
|
175
|
+
}
|
|
176
|
+
function ie(e, t, n = {}) {
|
|
177
|
+
const { window: r = x, ...s } = n;
|
|
178
|
+
let i;
|
|
179
|
+
const f = /* @__PURE__ */ se(() => r && "ResizeObserver" in r), o = () => {
|
|
180
|
+
i && (i.disconnect(), i = void 0);
|
|
181
|
+
}, c = R(() => {
|
|
182
|
+
const l = b(e);
|
|
183
|
+
return Array.isArray(l) ? l.map((v) => y(v)) : [y(l)];
|
|
184
|
+
}), a = E(
|
|
185
|
+
c,
|
|
186
|
+
(l) => {
|
|
187
|
+
if (o(), f.value && r) {
|
|
188
|
+
i = new ResizeObserver(t);
|
|
189
|
+
for (const v of l)
|
|
190
|
+
v && i.observe(v, s);
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{ immediate: !0, flush: "post" }
|
|
194
|
+
), p = () => {
|
|
195
|
+
o(), a();
|
|
196
|
+
};
|
|
197
|
+
return V(p), {
|
|
198
|
+
isSupported: f,
|
|
199
|
+
stop: p
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
function le(e, t = { width: 0, height: 0 }, n = {}) {
|
|
203
|
+
const { window: r = x, box: s = "content-box" } = n, i = R(() => {
|
|
204
|
+
var l, v;
|
|
205
|
+
return (v = (l = y(e)) == null ? void 0 : l.namespaceURI) == null ? void 0 : v.includes("svg");
|
|
206
|
+
}), f = L(t.width), o = L(t.height), { stop: c } = ie(
|
|
207
|
+
e,
|
|
208
|
+
([l]) => {
|
|
209
|
+
const v = s === "border-box" ? l.borderBoxSize : s === "content-box" ? l.contentBoxSize : l.devicePixelContentBoxSize;
|
|
210
|
+
if (r && i.value) {
|
|
211
|
+
const h = y(e);
|
|
212
|
+
if (h) {
|
|
213
|
+
const m = h.getBoundingClientRect();
|
|
214
|
+
f.value = m.width, o.value = m.height;
|
|
215
|
+
}
|
|
216
|
+
} else if (v) {
|
|
217
|
+
const h = O(v);
|
|
218
|
+
f.value = h.reduce((m, { inlineSize: w }) => m + w, 0), o.value = h.reduce((m, { blockSize: w }) => m + w, 0);
|
|
219
|
+
} else
|
|
220
|
+
f.value = l.contentRect.width, o.value = l.contentRect.height;
|
|
221
|
+
},
|
|
222
|
+
n
|
|
223
|
+
);
|
|
224
|
+
ne(() => {
|
|
225
|
+
const l = y(e);
|
|
226
|
+
l && (f.value = "offsetWidth" in l ? l.offsetWidth : t.width, o.value = "offsetHeight" in l ? l.offsetHeight : t.height);
|
|
227
|
+
});
|
|
228
|
+
const a = E(
|
|
229
|
+
() => y(e),
|
|
230
|
+
(l) => {
|
|
231
|
+
f.value = l ? t.width : 0, o.value = l ? t.height : 0;
|
|
232
|
+
}
|
|
233
|
+
);
|
|
234
|
+
function p() {
|
|
235
|
+
c(), a();
|
|
236
|
+
}
|
|
237
|
+
return {
|
|
238
|
+
width: f,
|
|
239
|
+
height: o,
|
|
240
|
+
stop: p
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
function ge(e, t) {
|
|
244
|
+
const { containerStyle: n, wrapperProps: r, scrollTo: s, calculateRange: i, currentList: f, containerRef: o } = "itemHeight" in t ? de(t, e) : fe(t, e);
|
|
245
|
+
return {
|
|
246
|
+
list: f,
|
|
247
|
+
scrollTo: s,
|
|
248
|
+
containerProps: {
|
|
249
|
+
ref: o,
|
|
250
|
+
onScroll: () => {
|
|
251
|
+
i();
|
|
252
|
+
},
|
|
253
|
+
style: n
|
|
254
|
+
},
|
|
255
|
+
wrapperProps: r
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
function z(e) {
|
|
259
|
+
const t = L(null), n = le(t), r = C([]), s = L(e);
|
|
260
|
+
return { state: C({ start: 0, end: 10 }), source: s, currentList: r, size: n, containerRef: t };
|
|
261
|
+
}
|
|
262
|
+
function I(e, t, n) {
|
|
263
|
+
return (r) => {
|
|
264
|
+
if (typeof n == "number")
|
|
265
|
+
return Math.ceil(r / n);
|
|
266
|
+
const { start: s = 0 } = e.value;
|
|
267
|
+
let i = 0, f = 0;
|
|
268
|
+
for (let o = s; o < t.value.length; o++) {
|
|
269
|
+
const c = n(o);
|
|
270
|
+
if (i += c, f = o, i > r)
|
|
271
|
+
break;
|
|
272
|
+
}
|
|
273
|
+
return f - s;
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
function B(e, t) {
|
|
277
|
+
return (n) => {
|
|
278
|
+
if (typeof t == "number")
|
|
279
|
+
return Math.floor(n / t) + 1;
|
|
280
|
+
let r = 0, s = 0;
|
|
281
|
+
for (let i = 0; i < e.value.length; i++) {
|
|
282
|
+
const f = t(i);
|
|
283
|
+
if (r += f, r >= n) {
|
|
284
|
+
s = i;
|
|
285
|
+
break;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return s + 1;
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
function H(e, t, n, r, { containerRef: s, state: i, currentList: f, source: o }) {
|
|
292
|
+
return () => {
|
|
293
|
+
const c = s.value;
|
|
294
|
+
if (c) {
|
|
295
|
+
const a = n(e === "vertical" ? c.scrollTop : c.scrollLeft), p = r(e === "vertical" ? c.clientHeight : c.clientWidth), l = a - t, v = a + p + t;
|
|
296
|
+
i.value = {
|
|
297
|
+
start: l < 0 ? 0 : l,
|
|
298
|
+
end: v > o.value.length ? o.value.length : v
|
|
299
|
+
}, f.value = o.value.slice(i.value.start, i.value.end).map((h, m) => ({
|
|
300
|
+
data: h,
|
|
301
|
+
index: m + i.value.start
|
|
302
|
+
}));
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
function D(e, t) {
|
|
307
|
+
return (n) => typeof e == "number" ? n * e : t.value.slice(0, n).reduce((s, i, f) => s + e(f), 0);
|
|
308
|
+
}
|
|
309
|
+
function G(e, t, n, r) {
|
|
310
|
+
E([e.width, e.height, () => b(t), n], () => {
|
|
311
|
+
r();
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
function j(e, t) {
|
|
315
|
+
return R(() => typeof e == "number" ? t.value.length * e : t.value.reduce((n, r, s) => n + e(s), 0));
|
|
316
|
+
}
|
|
317
|
+
const ae = {
|
|
318
|
+
horizontal: "scrollLeft",
|
|
319
|
+
vertical: "scrollTop"
|
|
320
|
+
};
|
|
321
|
+
function _(e, t, n, r) {
|
|
322
|
+
return (s) => {
|
|
323
|
+
r.value && (r.value[ae[e]] = n(s), t());
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
function fe(e, t) {
|
|
327
|
+
const n = z(t), { state: r, source: s, currentList: i, size: f, containerRef: o } = n, c = { overflowX: "auto" }, { itemWidth: a, overscan: p = 5 } = e, l = I(r, s, a), v = B(s, a), h = H("horizontal", p, v, l, n), m = D(a, s), w = R(() => m(r.value.start)), u = j(a, s);
|
|
328
|
+
G(f, t, o, h);
|
|
329
|
+
const d = _("horizontal", h, m, o), g = R(() => ({
|
|
330
|
+
style: {
|
|
331
|
+
height: "100%",
|
|
332
|
+
width: `${u.value - w.value}px`,
|
|
333
|
+
marginLeft: `${w.value}px`,
|
|
334
|
+
display: "flex"
|
|
335
|
+
}
|
|
336
|
+
}));
|
|
337
|
+
return {
|
|
338
|
+
scrollTo: d,
|
|
339
|
+
calculateRange: h,
|
|
340
|
+
wrapperProps: g,
|
|
341
|
+
containerStyle: c,
|
|
342
|
+
currentList: i,
|
|
343
|
+
containerRef: o
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
function de(e, t) {
|
|
347
|
+
const n = z(t), { state: r, source: s, currentList: i, size: f, containerRef: o } = n, c = { overflowY: "auto" }, { itemHeight: a, overscan: p = 5 } = e, l = I(r, s, a), v = B(s, a), h = H("vertical", p, v, l, n), m = D(a, s), w = R(() => m(r.value.start)), u = j(a, s);
|
|
348
|
+
G(f, t, o, h);
|
|
349
|
+
const d = _("vertical", h, m, o), g = R(() => ({
|
|
350
|
+
style: {
|
|
351
|
+
width: "100%",
|
|
352
|
+
height: `${u.value - w.value}px`,
|
|
353
|
+
marginTop: `${w.value}px`
|
|
354
|
+
}
|
|
355
|
+
}));
|
|
356
|
+
return {
|
|
357
|
+
calculateRange: h,
|
|
358
|
+
scrollTo: d,
|
|
359
|
+
containerStyle: c,
|
|
360
|
+
wrapperProps: g,
|
|
361
|
+
currentList: i,
|
|
362
|
+
containerRef: o
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
export {
|
|
366
|
+
me as a,
|
|
367
|
+
V as b,
|
|
368
|
+
O as c,
|
|
369
|
+
Z as d,
|
|
370
|
+
$ as e,
|
|
371
|
+
F as i,
|
|
372
|
+
he as o,
|
|
373
|
+
ve as t,
|
|
374
|
+
ge as u,
|
|
375
|
+
oe as w
|
|
376
|
+
};
|