@knime/jsonforms 1.12.4 → 1.12.5
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 +9 -0
- package/dist/{AnyOfTwinlist-D9PZ1pQL.js → AnyOfTwinlist-C64AJ-qM.js} +1 -1
- package/dist/{Button-BmupLxtR.js → Button-BnO2ctHk.js} +1 -1
- package/dist/{CheckboxControl-rZz_eVaX.js → CheckboxControl-CIprz1mr.js} +1 -1
- package/dist/{Checkboxes-DJFEP18W.js → Checkboxes-gk2dQ0ay.js} +1 -1
- package/dist/{CheckboxesControl-DPBgi8ER.js → CheckboxesControl-AxwZBv-d.js} +3 -3
- package/dist/{ComboBoxControl-Nz1Olkkr.js → ComboBoxControl-Di7LvbVo.js} +59 -56
- package/dist/{DateControl-f-Fx1Mvk.js → DateControl-BxIC9FrW.js} +1 -1
- package/dist/{DateTimeControl-BpygMW4x.js → DateTimeControl-CND2Ws6l.js} +2 -2
- package/dist/{DateTimeFormatInput-CDtPOm8O.js → DateTimeFormatInput-q3bE9FDf.js} +4 -4
- package/dist/{DateTimeFormatPickerControl-CLScuIr9.js → DateTimeFormatPickerControl-DyqX449y.js} +2 -2
- package/dist/{DateTimeFormatPickerWithTypeControl-C3A2Z9fy.js → DateTimeFormatPickerWithTypeControl-q9Uy4q6l.js} +3 -3
- package/dist/{DateTimeInput-DBzWaC1M.js → DateTimeInput-DMWRo8Rw.js} +6 -6
- package/dist/{Dropdown-BoJb215Q.js → Dropdown-CkTNCSyg.js} +3 -3
- package/dist/{DropdownControl-DwWRmXkz.js → DropdownControl-BbpLYzdw.js} +2 -2
- package/dist/{HorizontalLayout-OijX1haf.js → HorizontalLayout-L7yybmHw.js} +1 -1
- package/dist/{InputField-COACe1p5.js → InputField-DqiHmU2J.js} +1 -1
- package/dist/{IntegerControl-Cy1uvvLG.js → IntegerControl-D6Brt095.js} +1 -1
- package/dist/{IntervalControl-DkH6yQs_.js → IntervalControl-DGWMCQvo.js} +4 -4
- package/dist/{LoadingDropdown-C4lMKz45.js → LoadingDropdown-1EtneC8N.js} +3 -3
- package/dist/{ManualTwinlistControl-BO_Bb8w3.js → ManualTwinlistControl-V63nnyr_.js} +4 -4
- package/dist/{MultiSelectListBoxControl-DDS-fnJB.js → MultiSelectListBoxControl-B3Mt0AMc.js} +2 -2
- package/dist/{MultimodeTwinlistControl-CZCYZdjb.js → MultimodeTwinlistControl-DTU3GV_1.js} +6 -6
- package/dist/{MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_ca157254_lang-B2MRMh44.js → MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_ca157254_lang-DEB2RPFe.js} +1 -1
- package/dist/{MultiselectListBox-D96AQzGw.js → MultiselectListBox-DMA-bS8g.js} +12 -12
- package/dist/{NameFilter-DMYnVz4i.js → NameFilter-CirK1jbB.js} +1 -1
- package/dist/{NumberControl-CkuaWwJk.js → NumberControl-C2rDPFM6.js} +1 -1
- package/dist/{NumberControlBase.vue_vue_type_script_setup_true_lang-CuLp8s6f.js → NumberControlBase.vue_vue_type_script_setup_true_lang-BhJ-pM0U.js} +2 -2
- package/dist/{NumberInput-CKnd9yS_.js → NumberInput-DgJPSX-t.js} +1 -1
- package/dist/{OneOfDropdown-SDU8lgEU.js → OneOfDropdown-kHNHWYo1.js} +1 -1
- package/dist/{RadioControl-DmYEQoP6.js → RadioControl-Di8ZHzfP.js} +2 -2
- package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-C7PfnM_4.js → RadioControlBase.vue_vue_type_script_setup_true_lang-Dfd0RHVf.js} +3 -3
- package/dist/{RichTextControl-Dmo1oCBw.js → RichTextControl-DkV_1bmO.js} +5 -5
- package/dist/{SectionHeading-6b5kIri7.js → SectionHeading-jyubFaij.js} +1 -1
- package/dist/{SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-jODEm1Ob.js → SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-f4_oWidN.js} +34 -34
- package/dist/{SectionLayout-BDjIuS8E.js → SectionLayout-rsR8zc2o.js} +3 -3
- package/dist/{SettingsSubPanel-BL7fFXlN.js → SettingsSubPanel-Cu9tMmFH.js} +1 -1
- package/dist/{SettingsSubPanelLayout-CDGF-d3Z.js → SettingsSubPanelLayout-IFWJzpyo.js} +4 -4
- package/dist/{SimpleButtonControl-BkiULQms.js → SimpleButtonControl-TaYKjvaZ.js} +2 -2
- package/dist/{SimpleTwinlistControl-AkdBf0Rb.js → SimpleTwinlistControl-DHSEVMNw.js} +2 -2
- package/dist/{SingleSelectControl-Bhl45WII.js → SingleSelectControl-DbvPKelZ.js} +2 -2
- package/dist/{SingleSelectListBoxControl-CrU8jRBo.js → SingleSelectListBoxControl-BxvByTfI.js} +3 -3
- package/dist/{SortListControl-BK3otvxF.js → SortListControl-M2XPJctR.js} +6 -6
- package/dist/{StyledListItem-KNxPwwT0.js → StyledListItem-BZD6Sgly.js} +1 -1
- package/dist/{TextAreaControl-B32paKT6.js → TextAreaControl-C6a_q86j.js} +1 -1
- package/dist/{TextControl-ru6CRq5e.js → TextControl-P30hO_Go.js} +1 -1
- package/dist/{TextControl.vue_vue_type_script_setup_true_lang-BTZ0nH_m.js → TextControl.vue_vue_type_script_setup_true_lang-DXxUGEzp.js} +3 -3
- package/dist/{TimeControl-7AYWY8U9.js → TimeControl-CCkMiZi0.js} +2 -2
- package/dist/{TwinlistControlBase-COvc3pxs.js → TwinlistControlBase-BF0UtrbI.js} +3 -3
- package/dist/{TwinlistLoadingInfo-D3I8oxeT.js → TwinlistLoadingInfo-DSi4-BVf.js} +4 -4
- package/dist/{TypedStringFilter-DU0pTNQn.js → TypedStringFilter-7K-JOtAd.js} +1 -1
- package/dist/{ValueSwitch-CB9CzZn0.js → ValueSwitch-p35zJYHc.js} +1 -1
- package/dist/{ValueSwitchControl-DXkAwwHn.js → ValueSwitchControl-Dn9Q7uZJ.js} +1 -1
- package/dist/{VerticalLayout-Cz5j5WGe.js → VerticalLayout-vUV02amg.js} +2 -2
- package/dist/{VerticalLayoutBase-BkttrwrM.js → VerticalLayoutBase-LcRfVrUV.js} +1 -1
- package/dist/{ZonedDateTimeControl-DPhNa3H1.js → ZonedDateTimeControl-CagN8mx_.js} +4 -4
- package/dist/{_baseEach-B_zeEGN9.js → _baseEach-8BL3bfU1.js} +2 -2
- package/dist/{_baseIteratee-Bx9_04UE.js → _baseIteratee-Dwk5GuFQ.js} +3 -3
- package/dist/{_getTag-C0NMijHn.js → _getTag-CPfnTOpI.js} +1 -1
- package/dist/index-CoRworrE.js +322 -0
- package/dist/knime-jsonforms.css +1 -1
- package/dist/knime-jsonforms.js +7 -7
- package/dist/{localTimeUtils-CCd4er-w.js → localTimeUtils-BA466gCF.js} +1 -1
- package/dist/{magic-string.es-Cxv7HfYh.js → magic-string.es-D13vKDHh.js} +1 -1
- package/dist/{svgWithTitle-CMIq5tX0.js → svgWithTitle-IEX8zkIB.js} +1 -1
- package/dist/testing.js +3 -3
- package/dist/{toString-tjuhZuzw.js → toString-DoCh2Ni9.js} +1 -1
- package/dist/{useBuiltinValidations-DWAxgz8f.js → useBuiltinValidations-Ck98ZbJs.js} +1 -1
- package/dist/{usePossibleValues-BGNVrp_C.js → usePossibleValues-Cjkgr7Bs.js} +1 -1
- package/package.json +4 -4
- package/dist/index-Bf0xDq3g.js +0 -373
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as V, computed as a, openBlock as b, createElementBlock as f, createVNode as r, unref as c } from "vue";
|
|
2
|
-
import { D as h } from "./DateTimeInput-
|
|
3
|
-
import { _ as T } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-
|
|
4
|
-
import { t as w, f as g } from "./localTimeUtils-
|
|
5
|
-
import { D as C } from "./Dropdown-
|
|
2
|
+
import { D as h } from "./DateTimeInput-DMWRo8Rw.js";
|
|
3
|
+
import { _ as T } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-f4_oWidN.js";
|
|
4
|
+
import { t as w, f as g } from "./localTimeUtils-BA466gCF.js";
|
|
5
|
+
import { D as C } from "./Dropdown-CkTNCSyg.js";
|
|
6
6
|
const y = ["id"], D = /* @__PURE__ */ V({
|
|
7
7
|
__name: "ZonedDateTimeControl",
|
|
8
8
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as h } from "./_baseIteratee-
|
|
2
|
-
import { c as b } from "./_getTag-
|
|
1
|
+
import { k as h } from "./_baseIteratee-Dwk5GuFQ.js";
|
|
2
|
+
import { c as b } from "./_getTag-CPfnTOpI.js";
|
|
3
3
|
function g(n) {
|
|
4
4
|
return function(e, r, f) {
|
|
5
5
|
for (var i = -1, a = Object(e), t = f(e), u = t.length; u--; ) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as J, a as $, b as Q, c as fn, d as un, g as ln, M as W, e as H, f as _n } from "./_getTag-
|
|
2
|
-
import { o as V, G as on, S as N, H as F, D as hn } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-
|
|
1
|
+
import { i as J, a as $, b as Q, c as fn, d as un, g as ln, M as W, e as H, f as _n } from "./_getTag-CPfnTOpI.js";
|
|
2
|
+
import { o as V, G as on, S as N, H as F, D as hn } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-f4_oWidN.js";
|
|
3
3
|
import { i as O } from "./isArray-WzO_os3q.js";
|
|
4
|
-
import { t as pn } from "./toString-
|
|
4
|
+
import { t as pn } from "./toString-DoCh2Ni9.js";
|
|
5
5
|
function dn(n) {
|
|
6
6
|
return n;
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as I, I as i, G as o, H as v, J as _ } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-
|
|
1
|
+
import { D as I, I as i, G as o, H as v, J as _ } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-f4_oWidN.js";
|
|
2
2
|
var V = "[object AsyncFunction]", D = "[object Function]", U = "[object GeneratorFunction]", G = "[object Proxy]";
|
|
3
3
|
function E(r) {
|
|
4
4
|
if (!I(r))
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import { getCurrentScope as $, onScopeDispose as D, unref as G, toRef as j, readonly as K, customRef as N, ref as y, onMounted as S, nextTick as q, getCurrentInstance as C, computed as m, watch as L, shallowRef as U } from "vue";
|
|
2
|
+
function P(e) {
|
|
3
|
+
return $() ? (D(e), !0) : !1;
|
|
4
|
+
}
|
|
5
|
+
function T(e) {
|
|
6
|
+
return typeof e == "function" ? e() : G(e);
|
|
7
|
+
}
|
|
8
|
+
const W = typeof window < "u" && typeof document < "u";
|
|
9
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
10
|
+
const X = Object.prototype.toString, Y = (e) => X.call(e) === "[object Object]", g = () => {
|
|
11
|
+
}, J = /* @__PURE__ */ Q();
|
|
12
|
+
function Q() {
|
|
13
|
+
var e, t;
|
|
14
|
+
return W && ((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 Z(e) {
|
|
17
|
+
return C();
|
|
18
|
+
}
|
|
19
|
+
function ae(...e) {
|
|
20
|
+
if (e.length !== 1)
|
|
21
|
+
return j(...e);
|
|
22
|
+
const t = e[0];
|
|
23
|
+
return typeof t == "function" ? K(N(() => ({ get: t, set: g }))) : y(t);
|
|
24
|
+
}
|
|
25
|
+
function F(e, t = !0, n) {
|
|
26
|
+
Z() ? S(e, n) : t ? e() : q(e);
|
|
27
|
+
}
|
|
28
|
+
function v(e) {
|
|
29
|
+
var t;
|
|
30
|
+
const n = T(e);
|
|
31
|
+
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
32
|
+
}
|
|
33
|
+
const b = W ? window : void 0;
|
|
34
|
+
function R(...e) {
|
|
35
|
+
let t, n, o, s;
|
|
36
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, s] = e, t = b) : [t, n, o, s] = e, !t)
|
|
37
|
+
return g;
|
|
38
|
+
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
39
|
+
const u = [], a = () => {
|
|
40
|
+
u.forEach((d) => d()), u.length = 0;
|
|
41
|
+
}, c = (d, i, r, l) => (d.addEventListener(i, r, l), () => d.removeEventListener(i, r, l)), p = L(
|
|
42
|
+
() => [v(t), T(s)],
|
|
43
|
+
([d, i]) => {
|
|
44
|
+
if (a(), !d)
|
|
45
|
+
return;
|
|
46
|
+
const r = Y(i) ? { ...i } : i;
|
|
47
|
+
u.push(
|
|
48
|
+
...n.flatMap((l) => o.map((f) => c(d, l, f, r)))
|
|
49
|
+
);
|
|
50
|
+
},
|
|
51
|
+
{ immediate: !0, flush: "post" }
|
|
52
|
+
), h = () => {
|
|
53
|
+
p(), a();
|
|
54
|
+
};
|
|
55
|
+
return P(h), h;
|
|
56
|
+
}
|
|
57
|
+
let E = !1;
|
|
58
|
+
function fe(e, t, n = {}) {
|
|
59
|
+
const { window: o = b, ignore: s = [], capture: u = !0, detectIframe: a = !1 } = n;
|
|
60
|
+
if (!o)
|
|
61
|
+
return g;
|
|
62
|
+
J && !E && (E = !0, Array.from(o.document.body.children).forEach((r) => r.addEventListener("click", g)), o.document.documentElement.addEventListener("click", g));
|
|
63
|
+
let c = !0;
|
|
64
|
+
const p = (r) => s.some((l) => {
|
|
65
|
+
if (typeof l == "string")
|
|
66
|
+
return Array.from(o.document.querySelectorAll(l)).some((f) => f === r.target || r.composedPath().includes(f));
|
|
67
|
+
{
|
|
68
|
+
const f = v(l);
|
|
69
|
+
return f && (r.target === f || r.composedPath().includes(f));
|
|
70
|
+
}
|
|
71
|
+
}), d = [
|
|
72
|
+
R(o, "click", (r) => {
|
|
73
|
+
const l = v(e);
|
|
74
|
+
if (!(!l || l === r.target || r.composedPath().includes(l))) {
|
|
75
|
+
if (r.detail === 0 && (c = !p(r)), !c) {
|
|
76
|
+
c = !0;
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
t(r);
|
|
80
|
+
}
|
|
81
|
+
}, { passive: !0, capture: u }),
|
|
82
|
+
R(o, "pointerdown", (r) => {
|
|
83
|
+
const l = v(e);
|
|
84
|
+
c = !p(r) && !!(l && !r.composedPath().includes(l));
|
|
85
|
+
}, { passive: !0 }),
|
|
86
|
+
a && R(o, "blur", (r) => {
|
|
87
|
+
setTimeout(() => {
|
|
88
|
+
var l;
|
|
89
|
+
const f = v(e);
|
|
90
|
+
((l = o.document.activeElement) == null ? void 0 : l.tagName) === "IFRAME" && !(f != null && f.contains(o.document.activeElement)) && t(r);
|
|
91
|
+
}, 0);
|
|
92
|
+
})
|
|
93
|
+
].filter(Boolean);
|
|
94
|
+
return () => d.forEach((r) => r());
|
|
95
|
+
}
|
|
96
|
+
function ee(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 te(...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: s = b,
|
|
104
|
+
eventName: u = "keydown",
|
|
105
|
+
passive: a = !1,
|
|
106
|
+
dedupe: c = !1
|
|
107
|
+
} = o, p = ee(t);
|
|
108
|
+
return R(s, u, (d) => {
|
|
109
|
+
d.repeat && T(c) || p(d) && n(d);
|
|
110
|
+
}, a);
|
|
111
|
+
}
|
|
112
|
+
function de(e, t, n = {}) {
|
|
113
|
+
return te(e, t, { ...n, eventName: "keydown" });
|
|
114
|
+
}
|
|
115
|
+
function ne() {
|
|
116
|
+
const e = y(!1), t = C();
|
|
117
|
+
return t && S(() => {
|
|
118
|
+
e.value = !0;
|
|
119
|
+
}, t), e;
|
|
120
|
+
}
|
|
121
|
+
function oe(e) {
|
|
122
|
+
const t = ne();
|
|
123
|
+
return m(() => (t.value, !!e()));
|
|
124
|
+
}
|
|
125
|
+
function re(e, t, n = {}) {
|
|
126
|
+
const { window: o = b, ...s } = n;
|
|
127
|
+
let u;
|
|
128
|
+
const a = oe(() => o && "ResizeObserver" in o), c = () => {
|
|
129
|
+
u && (u.disconnect(), u = void 0);
|
|
130
|
+
}, p = m(() => Array.isArray(e) ? e.map((i) => v(i)) : [v(e)]), h = L(
|
|
131
|
+
p,
|
|
132
|
+
(i) => {
|
|
133
|
+
if (c(), a.value && o) {
|
|
134
|
+
u = new ResizeObserver(t);
|
|
135
|
+
for (const r of i)
|
|
136
|
+
r && u.observe(r, s);
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{ immediate: !0, flush: "post" }
|
|
140
|
+
), d = () => {
|
|
141
|
+
c(), h();
|
|
142
|
+
};
|
|
143
|
+
return P(d), {
|
|
144
|
+
isSupported: a,
|
|
145
|
+
stop: d
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
function se(e, t = { width: 0, height: 0 }, n = {}) {
|
|
149
|
+
const { window: o = b, box: s = "content-box" } = n, u = m(() => {
|
|
150
|
+
var i, r;
|
|
151
|
+
return (r = (i = v(e)) == null ? void 0 : i.namespaceURI) == null ? void 0 : r.includes("svg");
|
|
152
|
+
}), a = y(t.width), c = y(t.height), { stop: p } = re(
|
|
153
|
+
e,
|
|
154
|
+
([i]) => {
|
|
155
|
+
const r = s === "border-box" ? i.borderBoxSize : s === "content-box" ? i.contentBoxSize : i.devicePixelContentBoxSize;
|
|
156
|
+
if (o && u.value) {
|
|
157
|
+
const l = v(e);
|
|
158
|
+
if (l) {
|
|
159
|
+
const f = l.getBoundingClientRect();
|
|
160
|
+
a.value = f.width, c.value = f.height;
|
|
161
|
+
}
|
|
162
|
+
} else if (r) {
|
|
163
|
+
const l = Array.isArray(r) ? r : [r];
|
|
164
|
+
a.value = l.reduce((f, { inlineSize: w }) => f + w, 0), c.value = l.reduce((f, { blockSize: w }) => f + w, 0);
|
|
165
|
+
} else
|
|
166
|
+
a.value = i.contentRect.width, c.value = i.contentRect.height;
|
|
167
|
+
},
|
|
168
|
+
n
|
|
169
|
+
);
|
|
170
|
+
F(() => {
|
|
171
|
+
const i = v(e);
|
|
172
|
+
i && (a.value = "offsetWidth" in i ? i.offsetWidth : t.width, c.value = "offsetHeight" in i ? i.offsetHeight : t.height);
|
|
173
|
+
});
|
|
174
|
+
const h = L(
|
|
175
|
+
() => v(e),
|
|
176
|
+
(i) => {
|
|
177
|
+
a.value = i ? t.width : 0, c.value = i ? t.height : 0;
|
|
178
|
+
}
|
|
179
|
+
);
|
|
180
|
+
function d() {
|
|
181
|
+
p(), h();
|
|
182
|
+
}
|
|
183
|
+
return {
|
|
184
|
+
width: a,
|
|
185
|
+
height: c,
|
|
186
|
+
stop: d
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
function pe(e, t) {
|
|
190
|
+
const { containerStyle: n, wrapperProps: o, scrollTo: s, calculateRange: u, currentList: a, containerRef: c } = "itemHeight" in t ? ie(t, e) : ue(t, e);
|
|
191
|
+
return {
|
|
192
|
+
list: a,
|
|
193
|
+
scrollTo: s,
|
|
194
|
+
containerProps: {
|
|
195
|
+
ref: c,
|
|
196
|
+
onScroll: () => {
|
|
197
|
+
u();
|
|
198
|
+
},
|
|
199
|
+
style: n
|
|
200
|
+
},
|
|
201
|
+
wrapperProps: o
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
function k(e) {
|
|
205
|
+
const t = y(null), n = se(t), o = y([]), s = U(e);
|
|
206
|
+
return { state: y({ start: 0, end: 10 }), source: s, currentList: o, size: n, containerRef: t };
|
|
207
|
+
}
|
|
208
|
+
function M(e, t, n) {
|
|
209
|
+
return (o) => {
|
|
210
|
+
if (typeof n == "number")
|
|
211
|
+
return Math.ceil(o / n);
|
|
212
|
+
const { start: s = 0 } = e.value;
|
|
213
|
+
let u = 0, a = 0;
|
|
214
|
+
for (let c = s; c < t.value.length; c++) {
|
|
215
|
+
const p = n(c);
|
|
216
|
+
if (u += p, a = c, u > o)
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
return a - s;
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
function V(e, t) {
|
|
223
|
+
return (n) => {
|
|
224
|
+
if (typeof t == "number")
|
|
225
|
+
return Math.floor(n / t) + 1;
|
|
226
|
+
let o = 0, s = 0;
|
|
227
|
+
for (let u = 0; u < e.value.length; u++) {
|
|
228
|
+
const a = t(u);
|
|
229
|
+
if (o += a, o >= n) {
|
|
230
|
+
s = u;
|
|
231
|
+
break;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return s + 1;
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
function _(e, t, n, o, { containerRef: s, state: u, currentList: a, source: c }) {
|
|
238
|
+
return () => {
|
|
239
|
+
const p = s.value;
|
|
240
|
+
if (p) {
|
|
241
|
+
const h = n(e === "vertical" ? p.scrollTop : p.scrollLeft), d = o(e === "vertical" ? p.clientHeight : p.clientWidth), i = h - t, r = h + d + t;
|
|
242
|
+
u.value = {
|
|
243
|
+
start: i < 0 ? 0 : i,
|
|
244
|
+
end: r > c.value.length ? c.value.length : r
|
|
245
|
+
}, a.value = c.value.slice(u.value.start, u.value.end).map((l, f) => ({
|
|
246
|
+
data: l,
|
|
247
|
+
index: f + u.value.start
|
|
248
|
+
}));
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
function z(e, t) {
|
|
253
|
+
return (n) => typeof e == "number" ? n * e : t.value.slice(0, n).reduce((s, u, a) => s + e(a), 0);
|
|
254
|
+
}
|
|
255
|
+
function I(e, t, n, o) {
|
|
256
|
+
L([e.width, e.height, t, n], () => {
|
|
257
|
+
o();
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
function B(e, t) {
|
|
261
|
+
return m(() => typeof e == "number" ? t.value.length * e : t.value.reduce((n, o, s) => n + e(s), 0));
|
|
262
|
+
}
|
|
263
|
+
const ce = {
|
|
264
|
+
horizontal: "scrollLeft",
|
|
265
|
+
vertical: "scrollTop"
|
|
266
|
+
};
|
|
267
|
+
function H(e, t, n, o) {
|
|
268
|
+
return (s) => {
|
|
269
|
+
o.value && (o.value[ce[e]] = n(s), t());
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
function ue(e, t) {
|
|
273
|
+
const n = k(t), { state: o, source: s, currentList: u, size: a, containerRef: c } = n, p = { overflowX: "auto" }, { itemWidth: h, overscan: d = 5 } = e, i = M(o, s, h), r = V(s, h), l = _("horizontal", d, r, i, n), f = z(h, s), w = m(() => f(o.value.start)), A = B(h, s);
|
|
274
|
+
I(a, t, c, l);
|
|
275
|
+
const x = H("horizontal", l, f, c), O = m(() => ({
|
|
276
|
+
style: {
|
|
277
|
+
height: "100%",
|
|
278
|
+
width: `${A.value - w.value}px`,
|
|
279
|
+
marginLeft: `${w.value}px`,
|
|
280
|
+
display: "flex"
|
|
281
|
+
}
|
|
282
|
+
}));
|
|
283
|
+
return {
|
|
284
|
+
scrollTo: x,
|
|
285
|
+
calculateRange: l,
|
|
286
|
+
wrapperProps: O,
|
|
287
|
+
containerStyle: p,
|
|
288
|
+
currentList: u,
|
|
289
|
+
containerRef: c
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
function ie(e, t) {
|
|
293
|
+
const n = k(t), { state: o, source: s, currentList: u, size: a, containerRef: c } = n, p = { overflowY: "auto" }, { itemHeight: h, overscan: d = 5 } = e, i = M(o, s, h), r = V(s, h), l = _("vertical", d, r, i, n), f = z(h, s), w = m(() => f(o.value.start)), A = B(h, s);
|
|
294
|
+
I(a, t, c, l);
|
|
295
|
+
const x = H("vertical", l, f, c), O = m(() => ({
|
|
296
|
+
style: {
|
|
297
|
+
width: "100%",
|
|
298
|
+
height: `${A.value - w.value}px`,
|
|
299
|
+
marginTop: `${w.value}px`
|
|
300
|
+
}
|
|
301
|
+
}));
|
|
302
|
+
return {
|
|
303
|
+
calculateRange: l,
|
|
304
|
+
scrollTo: x,
|
|
305
|
+
containerStyle: p,
|
|
306
|
+
wrapperProps: O,
|
|
307
|
+
currentList: u,
|
|
308
|
+
containerRef: c
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
export {
|
|
312
|
+
de as a,
|
|
313
|
+
T as b,
|
|
314
|
+
P as c,
|
|
315
|
+
Y as d,
|
|
316
|
+
W as e,
|
|
317
|
+
J as i,
|
|
318
|
+
g as n,
|
|
319
|
+
fe as o,
|
|
320
|
+
ae as t,
|
|
321
|
+
pe as u
|
|
322
|
+
};
|