@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,4 +1,4 @@
|
|
|
1
|
-
import { S as s, o as g } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-
|
|
1
|
+
import { S as s, o as g } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-f4_oWidN.js";
|
|
2
2
|
import { i as l } from "./isArray-WzO_os3q.js";
|
|
3
3
|
function p(r, t) {
|
|
4
4
|
for (var n = -1, i = r == null ? 0 : r.length, o = Array(i); ++n < i; )
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { onUnmounted as u, toRef as p, computed as d } from "vue";
|
|
2
|
-
import { u as f } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-
|
|
2
|
+
import { u as f } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-f4_oWidN.js";
|
|
3
3
|
const h = (t = {}) => t.validation || null, m = (t) => t.replace(/^validation\./, ""), v = (t) => {
|
|
4
4
|
const a = (t.providedOptions ?? []).filter(
|
|
5
5
|
(e) => e.startsWith("validation.")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed as a } from "vue";
|
|
2
|
-
import { u as o } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-
|
|
2
|
+
import { u as o } from "./SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-f4_oWidN.js";
|
|
3
3
|
const t = (s) => {
|
|
4
4
|
const e = a(() => s.value.uischema);
|
|
5
5
|
return { possibleValues: o(e, "possibleValues") };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knime/jsonforms",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.5",
|
|
4
4
|
"description": "Internal JSON Forms integration for frontend KNIME projects",
|
|
5
5
|
"homepage": "https://knime.github.io/webapps-common/",
|
|
6
6
|
"license": "GPL 3 and Additional Permissions according to Sec. 7 (SEE the file LICENSE)",
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"focus-trap-vue": "4.0.3",
|
|
16
16
|
"tabbable": "6.2.0",
|
|
17
17
|
"uuid": "10.0.0",
|
|
18
|
-
"@knime/components": "1.29.
|
|
19
|
-
"@knime/rich-text-editor": "1.4.
|
|
18
|
+
"@knime/components": "1.29.1",
|
|
19
|
+
"@knime/rich-text-editor": "1.4.18",
|
|
20
20
|
"@knime/styles": "1.5.0",
|
|
21
|
-
"@knime/utils": "1.4.
|
|
21
|
+
"@knime/utils": "1.4.2"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"consola": "3.x",
|
package/dist/index-Bf0xDq3g.js
DELETED
|
@@ -1,373 +0,0 @@
|
|
|
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
|
-
};
|