@knime/jsonforms 1.5.10 → 1.5.12
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 +17 -0
- package/dist/{AnyOfTwinlist-DMizLIwn.js → AnyOfTwinlist-DTggNnXP.js} +1 -1
- package/dist/{BaseButton-ew6uEaHi.js → BaseButton-I5M4pn6f.js} +1 -1
- package/dist/{Button-DI7EKUmu.js → Button-rLCsKJpO.js} +2 -2
- package/dist/{Checkbox-DPq-j4rC.js → Checkbox-DrJQzBqF.js} +1 -1
- package/dist/{CheckboxControl-Tnv1xVel.js → CheckboxControl-BGwhQMs-.js} +2 -2
- package/dist/{Checkboxes-CtN15klz.js → Checkboxes-Br3FkfqS.js} +2 -2
- package/dist/{CheckboxesControl-DcVkxf7W.js → CheckboxesControl-C5BkhWew.js} +2 -2
- package/dist/{ColumnFilter-Cw2PtnrT.js → ColumnFilter-DfAP8buV.js} +1 -1
- package/dist/{ColumnSelect-Df-m3Md2.js → ColumnSelect-vXE_85cR.js} +2 -2
- package/dist/{ComboBoxControl-DC3W4kPq.js → ComboBoxControl-CTMdhcN-.js} +4 -4
- package/dist/{DateControl-D70zb_g8.js → DateControl-B40Ar3uG.js} +1 -1
- package/dist/{DateTimeControl-C-ef6bOV.js → DateTimeControl-CUy0OZUE.js} +2 -2
- package/dist/{DateTimeFormatInput-t-O7ZqrA.js → DateTimeFormatInput-U6oDnsJW.js} +5 -5
- package/dist/{DateTimeFormatPickerControl-BbOu24lA.js → DateTimeFormatPickerControl-ARLARGoo.js} +2 -2
- package/dist/{DateTimeFormatPickerWithTypeControl-9e1ef9Hf.js → DateTimeFormatPickerWithTypeControl-Bu3NEwvJ.js} +3 -3
- package/dist/{DateTimeInput-C32yoECp.js → DateTimeInput-C7e1Z-XE.js} +3524 -3603
- package/dist/Dropdown-CPOTGnA1.js +605 -0
- package/dist/{DropdownControl-YplxM6ck.js → DropdownControl-CzD81Ycz.js} +1 -1
- package/dist/{DropdownControl.vue_vue_type_script_setup_true_lang-ByoiTkIU.js → DropdownControl.vue_vue_type_script_setup_true_lang-L2a_FDVR.js} +4 -4
- package/dist/{FunctionButton-Cee1Q-EN.js → FunctionButton-dHu7h3Y1.js} +2 -2
- package/dist/{HorizontalLayout-BtuP4oCU.js → HorizontalLayout-DpJ-y9Ro.js} +1 -1
- package/dist/{InputField-DHXXBWSv.js → InputField-BKnMLu77.js} +1 -1
- package/dist/{IntegerControl-B64xghdA.js → IntegerControl-Cly4hd8V.js} +1 -1
- package/dist/{IntervalControl-NldC56aj.js → IntervalControl-Bm-31Ea-.js} +6 -6
- package/dist/{MultiselectListBox-BUWB5ZWr.js → MultiselectListBox-OkLLUNac.js} +2 -2
- package/dist/{NameFilter-BQhzv9F3.js → NameFilter-DvtQFRJE.js} +1 -1
- package/dist/{NumberControl-EVY_3Hwl.js → NumberControl-C7SHCfb3.js} +1 -1
- package/dist/{NumberControlBase.vue_vue_type_script_setup_true_lang-CA0OxGuU.js → NumberControlBase.vue_vue_type_script_setup_true_lang-QqzXKwDy.js} +2 -2
- package/dist/{NumberInput-CI1ee8it.js → NumberInput-AOsXRph2.js} +1 -1
- package/dist/{OneOfDropdown-BPZeE-Bn.js → OneOfDropdown-DwbMw791.js} +1 -1
- package/dist/{RadioControl-DbX_Wfuv.js → RadioControl-DeFDT7X0.js} +2 -2
- package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-BJdqHTLu.js → RadioControlBase.vue_vue_type_script_setup_true_lang-DO2v2uzO.js} +2 -2
- package/dist/{RichTextControl-Dl4V0nno.js → RichTextControl-BNvBtINB.js} +7 -7
- package/dist/{SectionLayout-CF6zovCM.js → SectionLayout-BUlQGeSC.js} +2 -2
- package/dist/{SimpleButtonControl-BwlE_a5H.js → SimpleButtonControl-BKhxWUOQ.js} +2 -2
- package/dist/{SimpleTwinlistControl-Cbwa6xtL.js → SimpleTwinlistControl-C1U5ZsHa.js} +12 -13
- package/dist/{SortListControl-BzbPvx8-.js → SortListControl-CXDHaj82.js} +4 -4
- package/dist/{TextAreaControl-BdTbCiQe.js → TextAreaControl-BFu0t-I2.js} +1 -1
- package/dist/{TextControl-PPpaK3OZ.js → TextControl-Bn47wzh9.js} +1 -1
- package/dist/{TextControl.vue_vue_type_script_setup_true_lang-DndraaDL.js → TextControl.vue_vue_type_script_setup_true_lang-xxo3RxnK.js} +3 -3
- package/dist/{TimeControl-CHQYhf6G.js → TimeControl-C_QqGr_G.js} +2 -2
- package/dist/{TwinlistControl-CqDn6X1h.js → TwinlistControl-BJthx4lq.js} +70 -71
- package/dist/{TwinlistLoadingInfo-PbU9BJjv.js → TwinlistLoadingInfo-a_ymAtQP.js} +69 -89
- package/dist/{ValueSwitch-CA4_rkUU.js → ValueSwitch-DeFP0rns.js} +1 -1
- package/dist/{ValueSwitchControl-5uuRkxf2.js → ValueSwitchControl-BzNmmWQq.js} +1 -1
- package/dist/{VerticalLayout-C4FOz-7p.js → VerticalLayout-56JEav8u.js} +2 -2
- package/dist/{VerticalLayoutBase-DQCRpzUA.js → VerticalLayoutBase-DOyKtPzP.js} +1 -1
- package/dist/VerticalLayoutBase.vue_vue_type_style_index_0_scoped_99aa13c1_lang-BagkGlzo.js +13312 -0
- package/dist/{ZonedDateTimeControl-BcZrk010.js → ZonedDateTimeControl-CC-rPJr7.js} +4 -4
- package/dist/{floating-ui.vue.esm-B1dY_Hbh.js → floating-ui.vue-B-MrqKCT.js} +375 -342
- package/dist/index-Bf0xDq3g.js +373 -0
- package/dist/knime-jsonforms.css +1 -1
- package/dist/knime-jsonforms.js +5 -5
- package/dist/{localTimeUtils-ClDpVqfn.js → localTimeUtils-D3Z9JesA.js} +1 -1
- package/dist/{magic-string.es-D4UQQyt0.js → magic-string.es-DDd2I1su.js} +264 -265
- package/dist/{svgWithTitle-C6ghivXy.js → svgWithTitle-B7gWnKbY.js} +1 -1
- package/dist/testing.js +2 -2
- package/package.json +6 -11
- package/dist/Dropdown-B6CD0Mt_.js +0 -692
- package/dist/VerticalLayoutBase.vue_vue_type_style_index_0_scoped_99aa13c1_lang-Bke7i9o8.js +0 -14934
- package/dist/index-CkuSIXs2.js +0 -331
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
import { getCurrentScope as $, onScopeDispose as G, unref as N, toRef as j, readonly as K, customRef as q, ref as g, onMounted as C, nextTick as U, getCurrentInstance as k, computed as w, watch as A, shallowRef as X } from "vue";
|
|
2
|
+
function S(e) {
|
|
3
|
+
return $() ? (G(e), !0) : !1;
|
|
4
|
+
}
|
|
5
|
+
function E(e) {
|
|
6
|
+
return typeof e == "function" ? e() : N(e);
|
|
7
|
+
}
|
|
8
|
+
const M = typeof window < "u" && typeof document < "u";
|
|
9
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
10
|
+
const Y = (e) => e != null, J = Object.prototype.toString, Q = (e) => J.call(e) === "[object Object]", R = () => {
|
|
11
|
+
}, Z = /* @__PURE__ */ F();
|
|
12
|
+
function F() {
|
|
13
|
+
var e, t;
|
|
14
|
+
return M && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
15
|
+
}
|
|
16
|
+
function ee(e) {
|
|
17
|
+
return k();
|
|
18
|
+
}
|
|
19
|
+
function de(...e) {
|
|
20
|
+
if (e.length !== 1)
|
|
21
|
+
return j(...e);
|
|
22
|
+
const t = e[0];
|
|
23
|
+
return typeof t == "function" ? K(q(() => ({ get: t, set: R }))) : g(t);
|
|
24
|
+
}
|
|
25
|
+
function te(e, t = !0, n) {
|
|
26
|
+
ee() ? C(e, n) : t ? e() : U(e);
|
|
27
|
+
}
|
|
28
|
+
function h(e) {
|
|
29
|
+
var t;
|
|
30
|
+
const n = E(e);
|
|
31
|
+
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
32
|
+
}
|
|
33
|
+
const y = M ? window : void 0;
|
|
34
|
+
function b(...e) {
|
|
35
|
+
let t, n, o, u;
|
|
36
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, u] = e, t = y) : [t, n, o, u] = e, !t)
|
|
37
|
+
return R;
|
|
38
|
+
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
39
|
+
const s = [], f = () => {
|
|
40
|
+
s.forEach((i) => i()), s.length = 0;
|
|
41
|
+
}, c = (i, l, r, a) => (i.addEventListener(l, r, a), () => i.removeEventListener(l, r, a)), p = A(
|
|
42
|
+
() => [h(t), E(u)],
|
|
43
|
+
([i, l]) => {
|
|
44
|
+
if (f(), !i)
|
|
45
|
+
return;
|
|
46
|
+
const r = Q(l) ? { ...l } : l;
|
|
47
|
+
s.push(
|
|
48
|
+
...n.flatMap((a) => o.map((v) => c(i, a, v, r)))
|
|
49
|
+
);
|
|
50
|
+
},
|
|
51
|
+
{ immediate: !0, flush: "post" }
|
|
52
|
+
), d = () => {
|
|
53
|
+
p(), f();
|
|
54
|
+
};
|
|
55
|
+
return S(d), d;
|
|
56
|
+
}
|
|
57
|
+
let T = !1;
|
|
58
|
+
function pe(e, t, n = {}) {
|
|
59
|
+
const { window: o = y, ignore: u = [], capture: s = !0, detectIframe: f = !1 } = n;
|
|
60
|
+
if (!o)
|
|
61
|
+
return R;
|
|
62
|
+
Z && !T && (T = !0, Array.from(o.document.body.children).forEach((r) => r.addEventListener("click", R)), o.document.documentElement.addEventListener("click", R));
|
|
63
|
+
let c = !0;
|
|
64
|
+
const p = (r) => u.some((a) => {
|
|
65
|
+
if (typeof a == "string")
|
|
66
|
+
return Array.from(o.document.querySelectorAll(a)).some((v) => v === r.target || r.composedPath().includes(v));
|
|
67
|
+
{
|
|
68
|
+
const v = h(a);
|
|
69
|
+
return v && (r.target === v || r.composedPath().includes(v));
|
|
70
|
+
}
|
|
71
|
+
}), i = [
|
|
72
|
+
b(o, "click", (r) => {
|
|
73
|
+
const a = h(e);
|
|
74
|
+
if (!(!a || a === r.target || r.composedPath().includes(a))) {
|
|
75
|
+
if (r.detail === 0 && (c = !p(r)), !c) {
|
|
76
|
+
c = !0;
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
t(r);
|
|
80
|
+
}
|
|
81
|
+
}, { passive: !0, capture: s }),
|
|
82
|
+
b(o, "pointerdown", (r) => {
|
|
83
|
+
const a = h(e);
|
|
84
|
+
c = !p(r) && !!(a && !r.composedPath().includes(a));
|
|
85
|
+
}, { passive: !0 }),
|
|
86
|
+
f && b(o, "blur", (r) => {
|
|
87
|
+
setTimeout(() => {
|
|
88
|
+
var a;
|
|
89
|
+
const v = h(e);
|
|
90
|
+
((a = o.document.activeElement) == null ? void 0 : a.tagName) === "IFRAME" && !(v != null && v.contains(o.document.activeElement)) && t(r);
|
|
91
|
+
}, 0);
|
|
92
|
+
})
|
|
93
|
+
].filter(Boolean);
|
|
94
|
+
return () => i.forEach((r) => r());
|
|
95
|
+
}
|
|
96
|
+
function ne(e) {
|
|
97
|
+
return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
|
|
98
|
+
}
|
|
99
|
+
function oe(...e) {
|
|
100
|
+
let t, n, o = {};
|
|
101
|
+
e.length === 3 ? (t = e[0], n = e[1], o = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, n = e[0], o = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);
|
|
102
|
+
const {
|
|
103
|
+
target: u = y,
|
|
104
|
+
eventName: s = "keydown",
|
|
105
|
+
passive: f = !1,
|
|
106
|
+
dedupe: c = !1
|
|
107
|
+
} = o, p = ne(t);
|
|
108
|
+
return b(u, s, (i) => {
|
|
109
|
+
i.repeat && E(c) || p(i) && n(i);
|
|
110
|
+
}, f);
|
|
111
|
+
}
|
|
112
|
+
function ve(e, t, n = {}) {
|
|
113
|
+
return oe(e, t, { ...n, eventName: "keydown" });
|
|
114
|
+
}
|
|
115
|
+
function re() {
|
|
116
|
+
const e = g(!1), t = k();
|
|
117
|
+
return t && C(() => {
|
|
118
|
+
e.value = !0;
|
|
119
|
+
}, t), e;
|
|
120
|
+
}
|
|
121
|
+
function P(e) {
|
|
122
|
+
const t = re();
|
|
123
|
+
return w(() => (t.value, !!e()));
|
|
124
|
+
}
|
|
125
|
+
function se(e, t, n = {}) {
|
|
126
|
+
const { window: o = y, ...u } = n;
|
|
127
|
+
let s;
|
|
128
|
+
const f = P(() => o && "MutationObserver" in o), c = () => {
|
|
129
|
+
s && (s.disconnect(), s = void 0);
|
|
130
|
+
}, p = w(() => {
|
|
131
|
+
const r = E(e), a = (Array.isArray(r) ? r : [r]).map(h).filter(Y);
|
|
132
|
+
return new Set(a);
|
|
133
|
+
}), d = A(
|
|
134
|
+
() => p.value,
|
|
135
|
+
(r) => {
|
|
136
|
+
c(), f.value && r.size && (s = new MutationObserver(t), r.forEach((a) => s.observe(a, u)));
|
|
137
|
+
},
|
|
138
|
+
{ immediate: !0, flush: "post" }
|
|
139
|
+
), i = () => s == null ? void 0 : s.takeRecords(), l = () => {
|
|
140
|
+
c(), d();
|
|
141
|
+
};
|
|
142
|
+
return S(l), {
|
|
143
|
+
isSupported: f,
|
|
144
|
+
stop: l,
|
|
145
|
+
takeRecords: i
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
function he(e = {}) {
|
|
149
|
+
var t;
|
|
150
|
+
const {
|
|
151
|
+
window: n = y,
|
|
152
|
+
deep: o = !0,
|
|
153
|
+
triggerOnRemoval: u = !1
|
|
154
|
+
} = e, s = (t = e.document) != null ? t : n == null ? void 0 : n.document, f = () => {
|
|
155
|
+
var d;
|
|
156
|
+
let i = s == null ? void 0 : s.activeElement;
|
|
157
|
+
if (o)
|
|
158
|
+
for (; i != null && i.shadowRoot; )
|
|
159
|
+
i = (d = i == null ? void 0 : i.shadowRoot) == null ? void 0 : d.activeElement;
|
|
160
|
+
return i;
|
|
161
|
+
}, c = g(), p = () => {
|
|
162
|
+
c.value = f();
|
|
163
|
+
};
|
|
164
|
+
return n && (b(n, "blur", (d) => {
|
|
165
|
+
d.relatedTarget === null && p();
|
|
166
|
+
}, !0), b(n, "focus", p, !0)), u && se(s, (d) => {
|
|
167
|
+
d.filter((i) => i.removedNodes.length).map((i) => Array.from(i.removedNodes)).flat().forEach((i) => {
|
|
168
|
+
i === c.value && p();
|
|
169
|
+
});
|
|
170
|
+
}, {
|
|
171
|
+
childList: !0,
|
|
172
|
+
subtree: !0
|
|
173
|
+
}), p(), c;
|
|
174
|
+
}
|
|
175
|
+
function ue(e, t, n = {}) {
|
|
176
|
+
const { window: o = y, ...u } = n;
|
|
177
|
+
let s;
|
|
178
|
+
const f = P(() => o && "ResizeObserver" in o), c = () => {
|
|
179
|
+
s && (s.disconnect(), s = void 0);
|
|
180
|
+
}, p = w(() => Array.isArray(e) ? e.map((l) => h(l)) : [h(e)]), d = A(
|
|
181
|
+
p,
|
|
182
|
+
(l) => {
|
|
183
|
+
if (c(), f.value && o) {
|
|
184
|
+
s = new ResizeObserver(t);
|
|
185
|
+
for (const r of l)
|
|
186
|
+
r && s.observe(r, u);
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
{ immediate: !0, flush: "post" }
|
|
190
|
+
), i = () => {
|
|
191
|
+
c(), d();
|
|
192
|
+
};
|
|
193
|
+
return S(i), {
|
|
194
|
+
isSupported: f,
|
|
195
|
+
stop: i
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function ce(e, t = { width: 0, height: 0 }, n = {}) {
|
|
199
|
+
const { window: o = y, box: u = "content-box" } = n, s = w(() => {
|
|
200
|
+
var l, r;
|
|
201
|
+
return (r = (l = h(e)) == null ? void 0 : l.namespaceURI) == null ? void 0 : r.includes("svg");
|
|
202
|
+
}), f = g(t.width), c = g(t.height), { stop: p } = ue(
|
|
203
|
+
e,
|
|
204
|
+
([l]) => {
|
|
205
|
+
const r = u === "border-box" ? l.borderBoxSize : u === "content-box" ? l.contentBoxSize : l.devicePixelContentBoxSize;
|
|
206
|
+
if (o && s.value) {
|
|
207
|
+
const a = h(e);
|
|
208
|
+
if (a) {
|
|
209
|
+
const v = a.getBoundingClientRect();
|
|
210
|
+
f.value = v.width, c.value = v.height;
|
|
211
|
+
}
|
|
212
|
+
} else if (r) {
|
|
213
|
+
const a = Array.isArray(r) ? r : [r];
|
|
214
|
+
f.value = a.reduce((v, { inlineSize: m }) => v + m, 0), c.value = a.reduce((v, { blockSize: m }) => v + m, 0);
|
|
215
|
+
} else
|
|
216
|
+
f.value = l.contentRect.width, c.value = l.contentRect.height;
|
|
217
|
+
},
|
|
218
|
+
n
|
|
219
|
+
);
|
|
220
|
+
te(() => {
|
|
221
|
+
const l = h(e);
|
|
222
|
+
l && (f.value = "offsetWidth" in l ? l.offsetWidth : t.width, c.value = "offsetHeight" in l ? l.offsetHeight : t.height);
|
|
223
|
+
});
|
|
224
|
+
const d = A(
|
|
225
|
+
() => h(e),
|
|
226
|
+
(l) => {
|
|
227
|
+
f.value = l ? t.width : 0, c.value = l ? t.height : 0;
|
|
228
|
+
}
|
|
229
|
+
);
|
|
230
|
+
function i() {
|
|
231
|
+
p(), d();
|
|
232
|
+
}
|
|
233
|
+
return {
|
|
234
|
+
width: f,
|
|
235
|
+
height: c,
|
|
236
|
+
stop: i
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
function me(e, t) {
|
|
240
|
+
const { containerStyle: n, wrapperProps: o, scrollTo: u, calculateRange: s, currentList: f, containerRef: c } = "itemHeight" in t ? ae(t, e) : le(t, e);
|
|
241
|
+
return {
|
|
242
|
+
list: f,
|
|
243
|
+
scrollTo: u,
|
|
244
|
+
containerProps: {
|
|
245
|
+
ref: c,
|
|
246
|
+
onScroll: () => {
|
|
247
|
+
s();
|
|
248
|
+
},
|
|
249
|
+
style: n
|
|
250
|
+
},
|
|
251
|
+
wrapperProps: o
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
function W(e) {
|
|
255
|
+
const t = g(null), n = ce(t), o = g([]), u = X(e);
|
|
256
|
+
return { state: g({ start: 0, end: 10 }), source: u, currentList: o, size: n, containerRef: t };
|
|
257
|
+
}
|
|
258
|
+
function _(e, t, n) {
|
|
259
|
+
return (o) => {
|
|
260
|
+
if (typeof n == "number")
|
|
261
|
+
return Math.ceil(o / n);
|
|
262
|
+
const { start: u = 0 } = e.value;
|
|
263
|
+
let s = 0, f = 0;
|
|
264
|
+
for (let c = u; c < t.value.length; c++) {
|
|
265
|
+
const p = n(c);
|
|
266
|
+
if (s += p, f = c, s > o)
|
|
267
|
+
break;
|
|
268
|
+
}
|
|
269
|
+
return f - u;
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
function z(e, t) {
|
|
273
|
+
return (n) => {
|
|
274
|
+
if (typeof t == "number")
|
|
275
|
+
return Math.floor(n / t) + 1;
|
|
276
|
+
let o = 0, u = 0;
|
|
277
|
+
for (let s = 0; s < e.value.length; s++) {
|
|
278
|
+
const f = t(s);
|
|
279
|
+
if (o += f, o >= n) {
|
|
280
|
+
u = s;
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
return u + 1;
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
function V(e, t, n, o, { containerRef: u, state: s, currentList: f, source: c }) {
|
|
288
|
+
return () => {
|
|
289
|
+
const p = u.value;
|
|
290
|
+
if (p) {
|
|
291
|
+
const d = n(e === "vertical" ? p.scrollTop : p.scrollLeft), i = o(e === "vertical" ? p.clientHeight : p.clientWidth), l = d - t, r = d + i + t;
|
|
292
|
+
s.value = {
|
|
293
|
+
start: l < 0 ? 0 : l,
|
|
294
|
+
end: r > c.value.length ? c.value.length : r
|
|
295
|
+
}, f.value = c.value.slice(s.value.start, s.value.end).map((a, v) => ({
|
|
296
|
+
data: a,
|
|
297
|
+
index: v + s.value.start
|
|
298
|
+
}));
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
function I(e, t) {
|
|
303
|
+
return (n) => typeof e == "number" ? n * e : t.value.slice(0, n).reduce((u, s, f) => u + e(f), 0);
|
|
304
|
+
}
|
|
305
|
+
function B(e, t, n, o) {
|
|
306
|
+
A([e.width, e.height, t, n], () => {
|
|
307
|
+
o();
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
function D(e, t) {
|
|
311
|
+
return w(() => typeof e == "number" ? t.value.length * e : t.value.reduce((n, o, u) => n + e(u), 0));
|
|
312
|
+
}
|
|
313
|
+
const ie = {
|
|
314
|
+
horizontal: "scrollLeft",
|
|
315
|
+
vertical: "scrollTop"
|
|
316
|
+
};
|
|
317
|
+
function H(e, t, n, o) {
|
|
318
|
+
return (u) => {
|
|
319
|
+
o.value && (o.value[ie[e]] = n(u), t());
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
function le(e, t) {
|
|
323
|
+
const n = W(t), { state: o, source: u, currentList: s, size: f, containerRef: c } = n, p = { overflowX: "auto" }, { itemWidth: d, overscan: i = 5 } = e, l = _(o, u, d), r = z(u, d), a = V("horizontal", i, r, l, n), v = I(d, u), m = w(() => v(o.value.start)), L = D(d, u);
|
|
324
|
+
B(f, t, c, a);
|
|
325
|
+
const O = H("horizontal", a, v, c), x = w(() => ({
|
|
326
|
+
style: {
|
|
327
|
+
height: "100%",
|
|
328
|
+
width: `${L.value - m.value}px`,
|
|
329
|
+
marginLeft: `${m.value}px`,
|
|
330
|
+
display: "flex"
|
|
331
|
+
}
|
|
332
|
+
}));
|
|
333
|
+
return {
|
|
334
|
+
scrollTo: O,
|
|
335
|
+
calculateRange: a,
|
|
336
|
+
wrapperProps: x,
|
|
337
|
+
containerStyle: p,
|
|
338
|
+
currentList: s,
|
|
339
|
+
containerRef: c
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
function ae(e, t) {
|
|
343
|
+
const n = W(t), { state: o, source: u, currentList: s, size: f, containerRef: c } = n, p = { overflowY: "auto" }, { itemHeight: d, overscan: i = 5 } = e, l = _(o, u, d), r = z(u, d), a = V("vertical", i, r, l, n), v = I(d, u), m = w(() => v(o.value.start)), L = D(d, u);
|
|
344
|
+
B(f, t, c, a);
|
|
345
|
+
const O = H("vertical", a, v, c), x = w(() => ({
|
|
346
|
+
style: {
|
|
347
|
+
width: "100%",
|
|
348
|
+
height: `${L.value - m.value}px`,
|
|
349
|
+
marginTop: `${m.value}px`
|
|
350
|
+
}
|
|
351
|
+
}));
|
|
352
|
+
return {
|
|
353
|
+
calculateRange: a,
|
|
354
|
+
scrollTo: O,
|
|
355
|
+
containerStyle: p,
|
|
356
|
+
wrapperProps: x,
|
|
357
|
+
currentList: s,
|
|
358
|
+
containerRef: c
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
export {
|
|
362
|
+
ve as a,
|
|
363
|
+
me as b,
|
|
364
|
+
E as c,
|
|
365
|
+
S as d,
|
|
366
|
+
Q as e,
|
|
367
|
+
M as f,
|
|
368
|
+
Z as i,
|
|
369
|
+
R as n,
|
|
370
|
+
pe as o,
|
|
371
|
+
de as t,
|
|
372
|
+
he as u
|
|
373
|
+
};
|