@wirecore/wirelayer-vue 0.11.0 → 0.12.1
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/{CopyButton-GmqpUNLf.js → CopyButton-Cv9QfFfS.js} +22 -26
- package/dist/{Tree-B-0NXpUq.js → Tree-3o3OJASC.js} +10 -9
- package/dist/chart/Chart.vue.d.ts.map +1 -1
- package/dist/chart/PieChart.vue.d.ts.map +1 -1
- package/dist/chart/SeriesChartView.vue.d.ts.map +1 -1
- package/dist/chart/Sparkline.vue.d.ts.map +1 -1
- package/dist/chart/WaterfallChart.vue.d.ts.map +1 -1
- package/dist/chart.js +219 -218
- package/dist/code.js +1 -1
- package/dist/components/AngleSlider/AngleSlider.vue.d.ts.map +1 -1
- package/dist/components/BlockUi/BlockUi.vue.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.vue.d.ts.map +1 -1
- package/dist/components/Carousel/Carousel.vue.d.ts.map +1 -1
- package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.vue.d.ts.map +1 -1
- package/dist/components/CopyButton/CopyButton.vue.d.ts.map +1 -1
- package/dist/components/DataView/DataView.vue.d.ts.map +1 -1
- package/dist/components/Fieldset/Fieldset.vue.d.ts +2 -0
- package/dist/components/Fieldset/Fieldset.vue.d.ts.map +1 -1
- package/dist/components/Gallery/Gallery.vue.d.ts.map +1 -1
- package/dist/components/JsonViewer/JsonViewer.vue.d.ts +1 -1
- package/dist/components/JsonViewer/JsonViewer.vue.d.ts.map +1 -1
- package/dist/components/Knob/Knob.vue.d.ts +1 -1
- package/dist/components/Knob/Knob.vue.d.ts.map +1 -1
- package/dist/components/Listbox/Listbox.vue.d.ts +1 -1
- package/dist/components/Listbox/Listbox.vue.d.ts.map +1 -1
- package/dist/components/LocaleProvider/LocaleProvider.vue.d.ts +4 -0
- package/dist/components/LocaleProvider/LocaleProvider.vue.d.ts.map +1 -1
- package/dist/components/LogViewer/LogViewer.vue.d.ts.map +1 -1
- package/dist/components/MeterGroup/MeterGroup.vue.d.ts.map +1 -1
- package/dist/components/NavigationMenu/NavigationMenu.vue.d.ts.map +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.vue.d.ts.map +1 -1
- package/dist/components/OrderList/OrderList.vue.d.ts.map +1 -1
- package/dist/components/OrgChart/OrgChart.vue.d.ts.map +1 -1
- package/dist/components/Panel/Panel.vue.d.ts.map +1 -1
- package/dist/components/PickList/PickList.vue.d.ts.map +1 -1
- package/dist/components/PinInput/PinInput.vue.d.ts.map +1 -1
- package/dist/components/ProgressCircle/ProgressCircle.vue.d.ts.map +1 -1
- package/dist/components/Rating/Rating.vue.d.ts.map +1 -1
- package/dist/components/ScrollPanel/ScrollPanel.vue.d.ts.map +1 -1
- package/dist/components/SidebarNav/SidebarNav.vue.d.ts.map +1 -1
- package/dist/components/SignaturePad/SignaturePad.vue.d.ts.map +1 -1
- package/dist/components/Sortable/Sortable.vue.d.ts +9 -1
- package/dist/components/Sortable/Sortable.vue.d.ts.map +1 -1
- package/dist/components/SpeedDial/SpeedDial.vue.d.ts.map +1 -1
- package/dist/components/SplitButton/SplitButton.vue.d.ts.map +1 -1
- package/dist/components/Splitter/Splitter.vue.d.ts.map +1 -1
- package/dist/components/Spoiler/Spoiler.vue.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.vue.d.ts.map +1 -1
- package/dist/components/TableOfContents/TableOfContents.vue.d.ts.map +1 -1
- package/dist/components/Timeline/Timeline.vue.d.ts.map +1 -1
- package/dist/components/Toolbar/Toolbar.vue.d.ts.map +1 -1
- package/dist/components/Tour/Tour.vue.d.ts +12 -0
- package/dist/components/Tour/Tour.vue.d.ts.map +1 -1
- package/dist/components/Tree/Tree.vue.d.ts +1 -1
- package/dist/components/Tree/Tree.vue.d.ts.map +1 -1
- package/dist/components/TreeSelect/TreeSelect.vue.d.ts.map +1 -1
- package/dist/data-table.js +1 -1
- package/dist/editor/Editor.vue.d.ts.map +1 -1
- package/dist/editor.js +347 -345
- package/dist/index.js +5235 -5187
- package/dist/pdf.js +1 -1
- package/dist/virtual/VirtualList.vue.d.ts.map +1 -1
- package/dist/virtual/VirtualTree.vue.d.ts.map +1 -1
- package/dist/virtual.js +171 -170
- package/llms-full.txt +66 -6
- package/package.json +2 -2
package/dist/virtual.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { a as e, n as t } from "./recipes-BlM9aKyt.js";
|
|
2
2
|
import { t as n } from "./attrs-KNjeRUCf.js";
|
|
3
3
|
import { a as r, i, n as a, r as o } from "./Highlight-uwptdaUw.js";
|
|
4
|
-
import { a as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { Check as z, ChevronDown as B, LoaderCircle as V, X as
|
|
7
|
-
import { controlIds as
|
|
8
|
-
import { useFieldContext as
|
|
9
|
-
import { createListCollection as
|
|
10
|
-
import { Select as
|
|
11
|
-
import { TreeView as
|
|
12
|
-
import { defaultRangeExtractor as
|
|
4
|
+
import { a as ee, i as s, n as c, r as te, t as l } from "./useTree-UhG1TMeM.js";
|
|
5
|
+
import { Fragment as u, Teleport as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createSlots as _, createTextVNode as v, createVNode as y, defineComponent as b, guardReactiveProps as x, mergeProps as S, nextTick as C, normalizeClass as w, normalizeProps as T, normalizeStyle as E, onMounted as D, openBlock as O, provide as k, ref as A, renderList as ne, renderSlot as j, resolveDynamicComponent as M, toDisplayString as N, unref as P, useAttrs as re, useId as F, useSlots as I, watch as L, withCtx as R } from "vue";
|
|
6
|
+
import { Check as z, ChevronDown as B, LoaderCircle as V, X as H } from "@lucide/vue";
|
|
7
|
+
import { controlIds as ie, flattenTree as U, select as ae, tree as oe, virtualList as se, virtualListBox as W } from "@wirecore/wirelayer-recipes";
|
|
8
|
+
import { useFieldContext as ce } from "@ark-ui/vue/field";
|
|
9
|
+
import { createListCollection as le } from "@ark-ui/vue/collection";
|
|
10
|
+
import { Select as G } from "@ark-ui/vue/select";
|
|
11
|
+
import { TreeView as K, useTreeView as q } from "@ark-ui/vue/tree-view";
|
|
12
|
+
import { defaultRangeExtractor as ue, useVirtualizer as J } from "@tanstack/vue-virtual";
|
|
13
13
|
//#region src/virtual/VirtualSelect.vue?vue&type=script&setup=true&lang.ts
|
|
14
|
-
var
|
|
14
|
+
var de = ["aria-label", "onClick"], fe = [
|
|
15
15
|
"aria-controls",
|
|
16
16
|
"aria-activedescendant",
|
|
17
17
|
"aria-label",
|
|
18
18
|
"placeholder",
|
|
19
19
|
"value",
|
|
20
20
|
"onInput"
|
|
21
|
-
],
|
|
21
|
+
], Y = /* @__PURE__ */ b({
|
|
22
22
|
inheritAttrs: !1,
|
|
23
23
|
__name: "VirtualSelect",
|
|
24
24
|
props: {
|
|
@@ -61,41 +61,41 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
61
61
|
"filterChange",
|
|
62
62
|
"loadMore"
|
|
63
63
|
],
|
|
64
|
-
setup(i, { emit:
|
|
65
|
-
let
|
|
66
|
-
size:
|
|
67
|
-
clearable:
|
|
68
|
-
})),
|
|
69
|
-
itemValue:
|
|
70
|
-
itemLabel:
|
|
71
|
-
itemDisabled:
|
|
64
|
+
setup(i, { emit: ee }) {
|
|
65
|
+
let s = e(), c = i, te = t("select", ae), l = t("virtualList", se), b = ee, k = re(), j = f(() => n(k)), I = f(() => te({
|
|
66
|
+
size: c.size,
|
|
67
|
+
clearable: c.clearable
|
|
68
|
+
})), U = l(), oe = s.select, W = f(() => ({
|
|
69
|
+
itemValue: c.itemValue,
|
|
70
|
+
itemLabel: c.itemLabel,
|
|
71
|
+
itemDisabled: c.itemDisabled,
|
|
72
72
|
itemGroup: () => void 0,
|
|
73
|
-
valueKey:
|
|
74
|
-
})),
|
|
75
|
-
items: () =>
|
|
76
|
-
source: () =>
|
|
77
|
-
accessors: () =>
|
|
78
|
-
pageSize: () =>
|
|
79
|
-
minSearchLength: () =>
|
|
80
|
-
}), { options:
|
|
73
|
+
valueKey: c.valueKey
|
|
74
|
+
})), K = A(""), q = r({
|
|
75
|
+
items: () => c.items,
|
|
76
|
+
source: () => c.dataSource,
|
|
77
|
+
accessors: () => W.value,
|
|
78
|
+
pageSize: () => c.pageSize,
|
|
79
|
+
minSearchLength: () => c.minSearchLength
|
|
80
|
+
}), { options: ue, visible: Y } = a(() => q.items.value, () => W.value, () => c.filter && !c.manualFilter && !c.dataSource ? K.value : ""), X = f(() => [...ue.value, ...q.resolvedOptions.value]), { selected: pe, keys: me, commit: he, commitKeys: ge } = o({
|
|
81
81
|
multiple: !1,
|
|
82
|
-
model: () =>
|
|
83
|
-
defaultValue:
|
|
84
|
-
accessors: () =>
|
|
85
|
-
items:
|
|
82
|
+
model: () => c.modelValue,
|
|
83
|
+
defaultValue: c.defaultValue,
|
|
84
|
+
accessors: () => W.value,
|
|
85
|
+
items: X,
|
|
86
86
|
emit: (e) => b("update:modelValue", e),
|
|
87
87
|
check: {
|
|
88
88
|
component: "VirtualSelect",
|
|
89
|
-
ready: () => !
|
|
89
|
+
ready: () => !c.dataSource && !c.loading && c.items.length > 0
|
|
90
90
|
}
|
|
91
|
-
}), Z = f(() =>
|
|
92
|
-
items:
|
|
91
|
+
}), Z = f(() => pe.value[0]), _e = f(() => le({
|
|
92
|
+
items: Y.value,
|
|
93
93
|
itemToString: (e) => e.label,
|
|
94
94
|
itemToValue: (e) => e.key,
|
|
95
95
|
isItemDisabled: (e) => e.disabled
|
|
96
|
-
})), ve = F(), ye = A(null), be = A(null), xe = (e) => e ? "$el" in e ? e.$el ?? null : e : null, Q =
|
|
97
|
-
count:
|
|
98
|
-
getScrollElement: () => xe(
|
|
96
|
+
})), ve = F(), ye = A(null), be = A(null), xe = (e) => e ? "$el" in e ? e.$el ?? null : e : null, Q = J(f(() => ({
|
|
97
|
+
count: Y.value.length,
|
|
98
|
+
getScrollElement: () => xe(c.filter ? be.value : ye.value),
|
|
99
99
|
estimateSize: () => 36,
|
|
100
100
|
overscan: 8,
|
|
101
101
|
initialRect: {
|
|
@@ -103,22 +103,22 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
103
103
|
height: 288
|
|
104
104
|
}
|
|
105
105
|
})));
|
|
106
|
-
D(() =>
|
|
107
|
-
let $ = f(() =>
|
|
106
|
+
D(() => q.resolve(me.value, X.value)), L(me, (e) => q.resolve(e, X.value));
|
|
107
|
+
let $ = f(() => c.loading || q.loading.value), Se = f(() => c.hasMore || q.hasMore.value), Ce = f(() => Q.value.getVirtualItems().at(-1)?.index ?? -1);
|
|
108
108
|
L([
|
|
109
109
|
Ce,
|
|
110
|
-
() =>
|
|
110
|
+
() => Y.value.length,
|
|
111
111
|
$,
|
|
112
112
|
Se
|
|
113
113
|
], () => {
|
|
114
|
-
!Se.value || $.value || !
|
|
114
|
+
!Se.value || $.value || !Y.value.length || Ce.value < Y.value.length - 1 || (c.dataSource ? q.loadMore() : b("loadMore"));
|
|
115
115
|
});
|
|
116
116
|
function we(e) {
|
|
117
|
-
|
|
117
|
+
c.clearable && pe.value.length && (e.key === "Backspace" || e.key === "Delete") && (e.preventDefault(), he([]));
|
|
118
118
|
}
|
|
119
119
|
function Te(e, t) {
|
|
120
|
-
|
|
121
|
-
let t =
|
|
120
|
+
K.value = t.target.value, b("filterChange", K.value), c.dataSource && q.search(K.value), !(c.manualFilter || c.dataSource) && C(() => {
|
|
121
|
+
let t = Y.value.find((e) => !e.disabled);
|
|
122
122
|
t && e.setHighlightValue(t.key);
|
|
123
123
|
});
|
|
124
124
|
}
|
|
@@ -126,20 +126,20 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
126
126
|
(e.key === " " || e.key === "Home" || e.key === "End") && e.stopPropagation();
|
|
127
127
|
}
|
|
128
128
|
function De(e) {
|
|
129
|
-
e &&
|
|
129
|
+
e && q.open(), !e && K.value && (K.value = "", b("filterChange", ""), c.dataSource && q.search(""));
|
|
130
130
|
}
|
|
131
131
|
let Oe = (e) => e.highlightedItem ? e.getItemProps({ item: e.highlightedItem }).id : void 0, ke = {
|
|
132
132
|
sameWidth: !0,
|
|
133
133
|
gutter: 4
|
|
134
|
-
}, Ae =
|
|
134
|
+
}, Ae = ce(), je = f(() => ie(c.id, "trigger", {
|
|
135
135
|
label: Ae?.value.ids.label,
|
|
136
136
|
hiddenSelect: Ae?.value.ids.control
|
|
137
137
|
}));
|
|
138
|
-
return (e, t) => (O(), p(P(
|
|
138
|
+
return (e, t) => (O(), p(P(G).Root, S({
|
|
139
139
|
class: I.value.base({ class: j.value.className }),
|
|
140
140
|
style: j.value.style,
|
|
141
141
|
collection: _e.value,
|
|
142
|
-
"model-value": P(
|
|
142
|
+
"model-value": P(me),
|
|
143
143
|
disabled: i.disabled,
|
|
144
144
|
invalid: i.invalid,
|
|
145
145
|
required: i.required,
|
|
@@ -152,8 +152,8 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
152
152
|
onOpenChange: t[1] ||= (e) => De(e.open)
|
|
153
153
|
}), {
|
|
154
154
|
default: R(() => [
|
|
155
|
-
y(P(
|
|
156
|
-
default: R(() => [y(P(
|
|
155
|
+
y(P(G).Control, T(x(i.clearable ? { class: I.value.control() } : {})), {
|
|
156
|
+
default: R(() => [y(P(G).Trigger, S(j.value.rest, {
|
|
157
157
|
class: I.value.trigger(),
|
|
158
158
|
"aria-busy": $.value || void 0,
|
|
159
159
|
onKeydown: we
|
|
@@ -162,11 +162,11 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
162
162
|
key: 0,
|
|
163
163
|
class: w(I.value.icon()),
|
|
164
164
|
"aria-hidden": "true"
|
|
165
|
-
}, null, 8, ["class"])) : m("", !0), y(P(
|
|
165
|
+
}, null, 8, ["class"])) : m("", !0), y(P(G).ValueText, { placeholder: i.placeholder ?? P(s).common.placeholder }, _({ _: 2 }, [Z.value ? {
|
|
166
166
|
name: "default",
|
|
167
167
|
fn: R(() => [v(N(Z.value.label), 1)]),
|
|
168
168
|
key: "0"
|
|
169
|
-
} : void 0]), 1032, ["placeholder"])], 2), y(P(
|
|
169
|
+
} : void 0]), 1032, ["placeholder"])], 2), y(P(G).Indicator, { class: w(I.value.indicator()) }, {
|
|
170
170
|
default: R(() => [$.value ? (O(), p(P(V), {
|
|
171
171
|
key: 0,
|
|
172
172
|
class: w(I.value.spinner()),
|
|
@@ -179,26 +179,26 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
179
179
|
_: 1
|
|
180
180
|
}, 8, ["class"])]),
|
|
181
181
|
_: 1
|
|
182
|
-
}, 16, ["class", "aria-busy"]), i.clearable ? (O(), p(P(
|
|
182
|
+
}, 16, ["class", "aria-busy"]), i.clearable ? (O(), p(P(G).Context, { key: 0 }, {
|
|
183
183
|
default: R((e) => [Z.value && !e.disabled ? (O(), h("button", {
|
|
184
184
|
key: 0,
|
|
185
185
|
type: "button",
|
|
186
186
|
tabindex: "-1",
|
|
187
187
|
class: w(I.value.clear()),
|
|
188
|
-
"aria-label": P(
|
|
188
|
+
"aria-label": P(oe).clear,
|
|
189
189
|
onClick: (t) => {
|
|
190
190
|
P(he)([]), e.focus();
|
|
191
191
|
}
|
|
192
|
-
}, [y(P(
|
|
192
|
+
}, [y(P(H), {
|
|
193
193
|
class: w(I.value.clearIcon()),
|
|
194
194
|
"aria-hidden": "true"
|
|
195
|
-
}, null, 8, ["class"])], 10,
|
|
195
|
+
}, null, 8, ["class"])], 10, de)) : m("", !0)]),
|
|
196
196
|
_: 1
|
|
197
197
|
})) : m("", !0)]),
|
|
198
198
|
_: 1
|
|
199
199
|
}, 16),
|
|
200
|
-
(O(), p(
|
|
201
|
-
default: R(() => [y(P(
|
|
200
|
+
(O(), p(d, { to: "body" }, [y(P(G).Positioner, null, {
|
|
201
|
+
default: R(() => [y(P(G).Content, {
|
|
202
202
|
ref_key: "content",
|
|
203
203
|
ref: ye,
|
|
204
204
|
class: w(I.value.content()),
|
|
@@ -208,7 +208,7 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
208
208
|
default: R(() => [i.filter ? (O(), h("div", {
|
|
209
209
|
key: 0,
|
|
210
210
|
class: w(I.value.header())
|
|
211
|
-
}, [y(P(
|
|
211
|
+
}, [y(P(G).Context, null, {
|
|
212
212
|
default: R((e) => [g("input", {
|
|
213
213
|
type: "text",
|
|
214
214
|
role: "combobox",
|
|
@@ -218,44 +218,44 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
218
218
|
"data-autofocus": "",
|
|
219
219
|
"aria-controls": P(ve),
|
|
220
220
|
"aria-activedescendant": Oe(e),
|
|
221
|
-
"aria-label": P(
|
|
222
|
-
placeholder: P(
|
|
223
|
-
value:
|
|
221
|
+
"aria-label": P(oe).filter,
|
|
222
|
+
placeholder: P(s).combobox.search,
|
|
223
|
+
value: K.value,
|
|
224
224
|
class: w(I.value.search()),
|
|
225
225
|
onInput: (t) => Te(e, t),
|
|
226
226
|
onKeydown: Ee
|
|
227
|
-
}, null, 42,
|
|
227
|
+
}, null, 42, fe)]),
|
|
228
228
|
_: 1
|
|
229
|
-
})], 2)) : m("", !0), i.filter ? (O(), p(P(
|
|
229
|
+
})], 2)) : m("", !0), i.filter ? (O(), p(P(G).List, {
|
|
230
230
|
key: 1,
|
|
231
231
|
id: P(ve),
|
|
232
232
|
ref_key: "scroller",
|
|
233
233
|
ref: be,
|
|
234
|
-
class: w(I.value.list({ class: P(
|
|
234
|
+
class: w(I.value.list({ class: P(U).scroll() }))
|
|
235
235
|
}, {
|
|
236
236
|
default: R(() => [
|
|
237
237
|
g("div", {
|
|
238
|
-
class: w(P(
|
|
238
|
+
class: w(P(U).spacer()),
|
|
239
239
|
style: E({ height: `${P(Q).getTotalSize()}px` })
|
|
240
|
-
}, [(O(!0), h(
|
|
240
|
+
}, [(O(!0), h(u, null, ne(P(Q).getVirtualItems(), (e) => (O(), p(P(G).Item, {
|
|
241
241
|
key: String(e.key),
|
|
242
|
-
item: P(
|
|
243
|
-
class: w(I.value.item({ class: P(
|
|
242
|
+
item: P(Y)[e.index],
|
|
243
|
+
class: w(I.value.item({ class: P(U).item() })),
|
|
244
244
|
style: E({ transform: `translateY(${e.start}px)` }),
|
|
245
|
-
"aria-setsize": P(
|
|
245
|
+
"aria-setsize": P(Y).length,
|
|
246
246
|
"aria-posinset": e.index + 1
|
|
247
247
|
}, {
|
|
248
248
|
default: R(() => [
|
|
249
|
-
P(
|
|
249
|
+
P(Y)[e.index].icon ? (O(), p(M(P(Y)[e.index].icon), {
|
|
250
250
|
key: 0,
|
|
251
251
|
class: w(I.value.icon()),
|
|
252
252
|
"aria-hidden": "true"
|
|
253
253
|
}, null, 8, ["class"])) : m("", !0),
|
|
254
|
-
y(P(
|
|
255
|
-
default: R(() => [v(N(P(
|
|
254
|
+
y(P(G).ItemText, { class: w(I.value.itemText()) }, {
|
|
255
|
+
default: R(() => [v(N(P(Y)[e.index].label), 1)]),
|
|
256
256
|
_: 2
|
|
257
257
|
}, 1032, ["class"]),
|
|
258
|
-
y(P(
|
|
258
|
+
y(P(G).ItemIndicator, null, {
|
|
259
259
|
default: R(() => [y(P(z), {
|
|
260
260
|
class: w(I.value.itemIndicator()),
|
|
261
261
|
"aria-hidden": "true"
|
|
@@ -277,38 +277,38 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
277
277
|
}, [y(P(V), {
|
|
278
278
|
class: w(I.value.loadingIcon()),
|
|
279
279
|
"aria-hidden": "true"
|
|
280
|
-
}, null, 8, ["class"]), v(" " + N(i.loadingText ?? P(
|
|
281
|
-
!P(
|
|
280
|
+
}, null, 8, ["class"]), v(" " + N(i.loadingText ?? P(s).common.loading), 1)], 2)) : m("", !0),
|
|
281
|
+
!P(Y).length && !$.value ? (O(), h("div", {
|
|
282
282
|
key: 1,
|
|
283
283
|
role: "option",
|
|
284
284
|
"aria-disabled": "true",
|
|
285
285
|
class: w(I.value.empty())
|
|
286
|
-
}, N(i.emptyText ?? P(
|
|
286
|
+
}, N(i.emptyText ?? P(q).emptyText.value ?? (K.value ? P(s).common.noResults : P(s).common.empty)), 3)) : m("", !0)
|
|
287
287
|
]),
|
|
288
288
|
_: 1
|
|
289
|
-
}, 8, ["id", "class"])) : (O(), h(
|
|
289
|
+
}, 8, ["id", "class"])) : (O(), h(u, { key: 2 }, [
|
|
290
290
|
g("div", {
|
|
291
|
-
class: w(P(
|
|
291
|
+
class: w(P(U).spacer()),
|
|
292
292
|
style: E({ height: `${P(Q).getTotalSize()}px` })
|
|
293
|
-
}, [(O(!0), h(
|
|
293
|
+
}, [(O(!0), h(u, null, ne(P(Q).getVirtualItems(), (e) => (O(), p(P(G).Item, {
|
|
294
294
|
key: String(e.key),
|
|
295
|
-
item: P(
|
|
296
|
-
class: w(I.value.item({ class: P(
|
|
295
|
+
item: P(Y)[e.index],
|
|
296
|
+
class: w(I.value.item({ class: P(U).item() })),
|
|
297
297
|
style: E({ transform: `translateY(${e.start}px)` }),
|
|
298
|
-
"aria-setsize": P(
|
|
298
|
+
"aria-setsize": P(Y).length,
|
|
299
299
|
"aria-posinset": e.index + 1
|
|
300
300
|
}, {
|
|
301
301
|
default: R(() => [
|
|
302
|
-
P(
|
|
302
|
+
P(Y)[e.index].icon ? (O(), p(M(P(Y)[e.index].icon), {
|
|
303
303
|
key: 0,
|
|
304
304
|
class: w(I.value.icon()),
|
|
305
305
|
"aria-hidden": "true"
|
|
306
306
|
}, null, 8, ["class"])) : m("", !0),
|
|
307
|
-
y(P(
|
|
308
|
-
default: R(() => [v(N(P(
|
|
307
|
+
y(P(G).ItemText, { class: w(I.value.itemText()) }, {
|
|
308
|
+
default: R(() => [v(N(P(Y)[e.index].label), 1)]),
|
|
309
309
|
_: 2
|
|
310
310
|
}, 1032, ["class"]),
|
|
311
|
-
y(P(
|
|
311
|
+
y(P(G).ItemIndicator, null, {
|
|
312
312
|
default: R(() => [y(P(z), {
|
|
313
313
|
class: w(I.value.itemIndicator()),
|
|
314
314
|
"aria-hidden": "true"
|
|
@@ -330,13 +330,13 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
330
330
|
}, [y(P(V), {
|
|
331
331
|
class: w(I.value.loadingIcon()),
|
|
332
332
|
"aria-hidden": "true"
|
|
333
|
-
}, null, 8, ["class"]), v(" " + N(i.loadingText ?? P(
|
|
334
|
-
!P(
|
|
333
|
+
}, null, 8, ["class"]), v(" " + N(i.loadingText ?? P(s).common.loading), 1)], 2)) : m("", !0),
|
|
334
|
+
!P(Y).length && !$.value ? (O(), h("div", {
|
|
335
335
|
key: 1,
|
|
336
336
|
role: "option",
|
|
337
337
|
"aria-disabled": "true",
|
|
338
338
|
class: w(I.value.empty())
|
|
339
|
-
}, N(i.emptyText ?? P(
|
|
339
|
+
}, N(i.emptyText ?? P(q).emptyText.value ?? (K.value ? P(s).common.noResults : P(s).common.empty)), 3)) : m("", !0)
|
|
340
340
|
], 64))]),
|
|
341
341
|
_: 1
|
|
342
342
|
}, 8, [
|
|
@@ -346,12 +346,12 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
346
346
|
])]),
|
|
347
347
|
_: 1
|
|
348
348
|
})])),
|
|
349
|
-
y(P(
|
|
349
|
+
y(P(G).HiddenSelect),
|
|
350
350
|
i.dataSource ? (O(), h("span", {
|
|
351
351
|
key: 0,
|
|
352
352
|
role: "status",
|
|
353
353
|
class: w(I.value.status())
|
|
354
|
-
}, N(P(
|
|
354
|
+
}, N(P(q).announcement.value), 3)) : m("", !0)
|
|
355
355
|
]),
|
|
356
356
|
_: 1
|
|
357
357
|
}, 16, [
|
|
@@ -367,7 +367,7 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
367
367
|
"scroll-to-index-fn"
|
|
368
368
|
]));
|
|
369
369
|
}
|
|
370
|
-
}),
|
|
370
|
+
}), X = ["aria-label", "aria-busy"], pe = ["data-index"], me = [
|
|
371
371
|
"aria-posinset",
|
|
372
372
|
"aria-setsize",
|
|
373
373
|
"data-index"
|
|
@@ -400,7 +400,7 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
400
400
|
},
|
|
401
401
|
emits: ["loadMore", "endReached"],
|
|
402
402
|
setup(n, { expose: r, emit: a }) {
|
|
403
|
-
let o = n,
|
|
403
|
+
let o = n, ee = a, s = t("virtualListBox", W), c = re(), te = e(), l = s(), d = A(null), p = i({
|
|
404
404
|
source: () => o.dataSource,
|
|
405
405
|
pageSize: () => o.pageSize,
|
|
406
406
|
query: () => {
|
|
@@ -414,10 +414,10 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
414
414
|
}), L(() => o.query?.search, (e) => {
|
|
415
415
|
o.dataSource && p.search(e ?? "");
|
|
416
416
|
});
|
|
417
|
-
let _ = f(() => o.dataSource ? p.state.value.items : o.items), b = f(() => o.dataSource ? p.state.value.hasMore : o.hasMore), x = f(() => o.dataSource ? p.state.value.status === "loading" : o.loading || o.loadingMore),
|
|
417
|
+
let _ = f(() => o.dataSource ? p.state.value.items : o.items), b = f(() => o.dataSource ? p.state.value.hasMore : o.hasMore), x = f(() => o.dataSource ? p.state.value.status === "loading" : o.loading || o.loadingMore), C = (e) => {
|
|
418
418
|
let t = o.itemGroup, n = typeof t == "function" ? t(e) : e?.[t];
|
|
419
419
|
return n == null || n === "" ? void 0 : String(n);
|
|
420
|
-
},
|
|
420
|
+
}, T = f(() => {
|
|
421
421
|
if (!o.itemGroup) return _.value.map((e, t) => ({
|
|
422
422
|
kind: "item",
|
|
423
423
|
item: e,
|
|
@@ -425,7 +425,7 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
425
425
|
}));
|
|
426
426
|
let e = [], t;
|
|
427
427
|
return _.value.forEach((n, r) => {
|
|
428
|
-
let i =
|
|
428
|
+
let i = C(n);
|
|
429
429
|
i !== void 0 && i !== t && e.push({
|
|
430
430
|
kind: "header",
|
|
431
431
|
label: i
|
|
@@ -435,85 +435,88 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
435
435
|
index: r
|
|
436
436
|
});
|
|
437
437
|
}), e;
|
|
438
|
-
}),
|
|
439
|
-
count:
|
|
440
|
-
getScrollElement: () =>
|
|
438
|
+
}), k = f(() => T.value.flatMap((e, t) => e.kind === "header" ? [t] : [])), M = (e) => [...k.value].reverse().find((t) => e >= t) ?? -1, F = J(f(() => ({
|
|
439
|
+
count: T.value.length,
|
|
440
|
+
getScrollElement: () => d.value,
|
|
441
441
|
estimateSize: (e) => {
|
|
442
|
-
let t =
|
|
442
|
+
let t = T.value[e];
|
|
443
443
|
return t?.kind === "item" && o.estimateSize ? o.estimateSize(t.item, t.index) : o.itemHeight;
|
|
444
444
|
},
|
|
445
445
|
measureElement: (e) => e.getBoundingClientRect().height || o.itemHeight,
|
|
446
446
|
overscan: 6,
|
|
447
|
-
rangeExtractor:
|
|
448
|
-
let t =
|
|
447
|
+
rangeExtractor: k.value.length ? (e) => {
|
|
448
|
+
let t = M(e.startIndex), n = new Set(ue(e));
|
|
449
449
|
return t >= 0 && n.add(t), [...n].sort((e, t) => e - t);
|
|
450
|
-
} :
|
|
450
|
+
} : ue,
|
|
451
451
|
initialRect: {
|
|
452
452
|
width: 0,
|
|
453
453
|
height: 320
|
|
454
454
|
}
|
|
455
|
-
}))),
|
|
456
|
-
let e =
|
|
457
|
-
return
|
|
458
|
-
}),
|
|
459
|
-
function
|
|
460
|
-
let e =
|
|
461
|
-
e !== void 0 && b.value && !x.value &&
|
|
455
|
+
}))), I = f(() => F.value.getVirtualItems()), R = f(() => {
|
|
456
|
+
let e = I.value.length ? F.value.range : null;
|
|
457
|
+
return k.value.length ? M(e?.startIndex ?? 0) : -1;
|
|
458
|
+
}), z = -1;
|
|
459
|
+
function B() {
|
|
460
|
+
let e = I.value.at(-1)?.index, t = T.value.length;
|
|
461
|
+
e !== void 0 && b.value && !x.value && z !== t && (e < t - 1 - o.endThreshold || (z = t, o.dataSource ? p.loadMore() : (ee("loadMore"), ee("endReached"))));
|
|
462
462
|
}
|
|
463
|
-
D(
|
|
464
|
-
|
|
465
|
-
|
|
463
|
+
D(B), L(() => [
|
|
464
|
+
I.value.at(-1)?.index,
|
|
465
|
+
T.value.length,
|
|
466
466
|
b.value,
|
|
467
467
|
x.value
|
|
468
|
-
],
|
|
469
|
-
let
|
|
468
|
+
], B);
|
|
469
|
+
let H = f(() => !!o.dataSource || o.hasMore || o.loading || o.loadingMore);
|
|
470
470
|
return r({
|
|
471
471
|
scrollToIndex(e, t = {}) {
|
|
472
|
-
let n =
|
|
473
|
-
n >= 0 &&
|
|
472
|
+
let n = T.value.findIndex((t) => t.kind === "item" && t.index === e);
|
|
473
|
+
n >= 0 && F.value.scrollToIndex(n, { align: t.align ?? "auto" });
|
|
474
474
|
},
|
|
475
475
|
refresh: () => p.refresh()
|
|
476
|
-
}), (e, t) => (O(), h(
|
|
476
|
+
}), (e, t) => (O(), h(u, null, [g("div", S({
|
|
477
477
|
ref_key: "scrollElement",
|
|
478
|
-
ref:
|
|
478
|
+
ref: d
|
|
479
|
+
}, {
|
|
480
|
+
...P(c),
|
|
481
|
+
class: P(l).base({ class: w(P(c).class) }),
|
|
482
|
+
style: [{ height: n.height }, P(c).style]
|
|
483
|
+
}, {
|
|
479
484
|
role: "list",
|
|
480
485
|
"aria-label": n.label,
|
|
481
|
-
"aria-busy":
|
|
482
|
-
tabindex: "0"
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
style: E({ height: `${P(M).getTotalSize()}px` })
|
|
488
|
-
}, [(O(!0), h(d, null, ne(F.value, (t) => (O(), h(d, { key: String(t.key) }, [C.value[t.index]?.kind === "header" ? (O(), h("div", {
|
|
486
|
+
"aria-busy": H.value && x.value || void 0,
|
|
487
|
+
tabindex: "0"
|
|
488
|
+
}), [g("div", {
|
|
489
|
+
class: w(P(l).spacer()),
|
|
490
|
+
style: E({ height: `${P(F).getTotalSize()}px` })
|
|
491
|
+
}, [(O(!0), h(u, null, ne(I.value, (t) => (O(), h(u, { key: String(t.key) }, [T.value[t.index]?.kind === "header" ? (O(), h("div", {
|
|
489
492
|
key: 0,
|
|
490
493
|
ref_for: !0,
|
|
491
|
-
ref: (e) => e && P(
|
|
494
|
+
ref: (e) => e && P(F).measureElement(e),
|
|
492
495
|
role: "presentation",
|
|
493
496
|
"data-index": t.index,
|
|
494
|
-
class: w(t.index ===
|
|
495
|
-
style: E(t.index ===
|
|
496
|
-
}, N(
|
|
497
|
+
class: w(t.index === R.value ? P(l).groupHeader({ class: P(l).sticky() }) : P(l).item({ class: P(l).groupHeader() })),
|
|
498
|
+
style: E(t.index === R.value ? void 0 : { transform: `translateY(${t.start}px)` })
|
|
499
|
+
}, N(T.value[t.index].label), 15, pe)) : T.value[t.index] ? (O(), h("div", {
|
|
497
500
|
key: 1,
|
|
498
501
|
ref_for: !0,
|
|
499
|
-
ref: (e) => e && P(
|
|
502
|
+
ref: (e) => e && P(F).measureElement(e),
|
|
500
503
|
role: "listitem",
|
|
501
|
-
"aria-posinset":
|
|
504
|
+
"aria-posinset": T.value[t.index].index + 1,
|
|
502
505
|
"aria-setsize": _.value.length,
|
|
503
506
|
"data-index": t.index,
|
|
504
|
-
class: w(P(
|
|
507
|
+
class: w(P(l).item()),
|
|
505
508
|
style: E({ transform: `translateY(${t.start}px)` })
|
|
506
509
|
}, [j(e.$slots, "default", {
|
|
507
|
-
item:
|
|
508
|
-
index:
|
|
509
|
-
})], 14,
|
|
510
|
+
item: T.value[t.index].item,
|
|
511
|
+
index: T.value[t.index].index
|
|
512
|
+
})], 14, me)) : m("", !0)], 64))), 128))], 6), H.value && x.value && _.value.length ? (O(), h("div", {
|
|
510
513
|
key: 0,
|
|
511
|
-
class: w(P(
|
|
514
|
+
class: w(P(l).loading()),
|
|
512
515
|
"aria-hidden": "true"
|
|
513
|
-
}, [y(P(V), { class: w(P(
|
|
516
|
+
}, [y(P(V), { class: w(P(l).loadingIcon()) }, null, 8, ["class"]), v(" " + N(P(te).dataSource.loadingMore), 1)], 2)) : m("", !0)], 16, X), n.dataSource ? (O(), h("p", {
|
|
514
517
|
key: 0,
|
|
515
518
|
role: "status",
|
|
516
|
-
class: w(P(
|
|
519
|
+
class: w(P(l).status())
|
|
517
520
|
}, N(P(p).announcement.value), 3)) : m("", !0)], 64));
|
|
518
521
|
}
|
|
519
522
|
}), ge = ["data-index"], Z = /* @__PURE__ */ b({
|
|
@@ -572,14 +575,14 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
572
575
|
"loadChildren"
|
|
573
576
|
],
|
|
574
577
|
setup(n, { expose: r, emit: i }) {
|
|
575
|
-
let a = n, o = i,
|
|
576
|
-
k(
|
|
578
|
+
let a = n, o = i, d = I(), b = t("tree", oe, () => a.classes)(), x = re(), C = e(), T = C.tree, D = A(null), M = l(a, o, f(() => D.value?.$el ?? null));
|
|
579
|
+
k(s, M.drag), k(ee, {
|
|
577
580
|
...M,
|
|
578
581
|
showLines: f(() => !1)
|
|
579
582
|
});
|
|
580
583
|
let F = f(() => {
|
|
581
584
|
let e = [];
|
|
582
|
-
for (let t of
|
|
585
|
+
for (let t of U(M.view.value, M.expanded.value)) e.push({
|
|
583
586
|
...t,
|
|
584
587
|
kind: "node"
|
|
585
588
|
}), t.expanded && M.loadingOf(t.node) && e.push({
|
|
@@ -588,7 +591,7 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
588
591
|
level: t.level
|
|
589
592
|
});
|
|
590
593
|
return e;
|
|
591
|
-
}), L = A(null), z =
|
|
594
|
+
}), L = A(null), z = J(f(() => ({
|
|
592
595
|
count: F.value.length,
|
|
593
596
|
getScrollElement: () => L.value?.$el ?? null,
|
|
594
597
|
estimateSize: () => a.itemHeight,
|
|
@@ -603,17 +606,18 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
603
606
|
height: 320
|
|
604
607
|
}
|
|
605
608
|
}))), B = (e) => F.value.findIndex((t) => t.kind === "node" && t.node.id === e);
|
|
606
|
-
function
|
|
609
|
+
function H(e, t = 6) {
|
|
607
610
|
requestAnimationFrame(() => {
|
|
608
611
|
let n = e();
|
|
609
|
-
n ? n.ownerDocument.activeElement !== n && n.focus() : t > 0 &&
|
|
612
|
+
n ? n.ownerDocument.activeElement !== n && n.focus() : t > 0 && H(e, t - 1);
|
|
610
613
|
});
|
|
611
614
|
}
|
|
612
615
|
function ae(e) {
|
|
613
616
|
let t = B(e.node.id);
|
|
614
|
-
t < 0 || (z.value.scrollToIndex(t, { align: "auto" }),
|
|
617
|
+
t < 0 || (z.value.scrollToIndex(t, { align: "auto" }), H(e.getElement));
|
|
615
618
|
}
|
|
616
|
-
let
|
|
619
|
+
let se = f(() => a.label ?? x["aria-label"] ?? C.tree.treeLabel), W = q(f(() => ({
|
|
620
|
+
...ie(x.id, "root"),
|
|
617
621
|
collection: M.collection.value,
|
|
618
622
|
selectionMode: a.selectionMode,
|
|
619
623
|
selectedValue: M.selected.value,
|
|
@@ -622,12 +626,12 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
622
626
|
checkedValue: a.checkedValue,
|
|
623
627
|
defaultCheckedValue: a.defaultCheckedValue
|
|
624
628
|
},
|
|
625
|
-
translations: { treeLabel:
|
|
629
|
+
translations: { treeLabel: se.value },
|
|
626
630
|
scrollToIndexFn: ae,
|
|
627
631
|
onSelectionChange: (e) => M.onSelectionChange(e.selectedValue),
|
|
628
632
|
onExpandedChange: (e) => M.setExpanded(e.expandedValue),
|
|
629
633
|
onCheckedChange: (e) => M.ownChecks.value || M.onArkCheckedChange(e.checkedValue)
|
|
630
|
-
}))),
|
|
634
|
+
}))), ce = f(() => a.emptyText ?? (M.query.value.trim() ? T.noMatches : a.group === void 0 ? void 0 : C.common.empty)), le = f(() => !M.view.value.length && (ce.value !== void 0 || !!d.empty || a.group !== void 0));
|
|
631
635
|
return r({
|
|
632
636
|
expandAll: M.expandAll,
|
|
633
637
|
collapseAll: M.collapseAll,
|
|
@@ -636,23 +640,25 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
636
640
|
let t = B(e);
|
|
637
641
|
t >= 0 && z.value.scrollToIndex(t, { align: "auto" }), requestAnimationFrame(() => M.focusNode(e));
|
|
638
642
|
}
|
|
639
|
-
}), (e, t) => (O(), p(P(
|
|
643
|
+
}), (e, t) => (O(), p(P(K).RootProvider, S({
|
|
644
|
+
...P(x),
|
|
645
|
+
"aria-label": void 0,
|
|
646
|
+
class: P(b).base({ class: w(P(x).class) })
|
|
647
|
+
}, {
|
|
640
648
|
ref_key: "root",
|
|
641
649
|
ref: D,
|
|
642
|
-
value: P(
|
|
643
|
-
class: w(P(b).base({ class: w(P(x).class) })),
|
|
644
|
-
style: E(P(x).style),
|
|
650
|
+
value: P(W),
|
|
645
651
|
onKeydownCapture: P(M).onKeydown
|
|
646
|
-
}, {
|
|
652
|
+
}), {
|
|
647
653
|
default: R(() => [
|
|
648
|
-
n.label ? (O(), p(P(
|
|
654
|
+
n.label ? (O(), p(P(K).Label, {
|
|
649
655
|
key: 0,
|
|
650
656
|
class: w(P(b).label())
|
|
651
657
|
}, {
|
|
652
658
|
default: R(() => [v(N(n.label), 1)]),
|
|
653
659
|
_: 1
|
|
654
660
|
}, 8, ["class"])) : m("", !0),
|
|
655
|
-
y(
|
|
661
|
+
y(c, {
|
|
656
662
|
model: P(M),
|
|
657
663
|
filter: n.filter,
|
|
658
664
|
"filter-mode": n.filterMode,
|
|
@@ -665,7 +671,7 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
665
671
|
"expand-controls",
|
|
666
672
|
"classes"
|
|
667
673
|
]),
|
|
668
|
-
y(P(
|
|
674
|
+
y(P(K).Tree, {
|
|
669
675
|
ref_key: "viewport",
|
|
670
676
|
ref: L,
|
|
671
677
|
class: w(P(b).tree({ class: P(b).viewport() })),
|
|
@@ -675,14 +681,14 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
675
681
|
default: R(() => [g("div", {
|
|
676
682
|
class: w(P(b).spacer()),
|
|
677
683
|
style: E({ height: `${P(z).getTotalSize()}px` })
|
|
678
|
-
}, [(O(!0), h(
|
|
684
|
+
}, [(O(!0), h(u, null, ne(P(z).getVirtualItems(), (t) => (O(), h("div", {
|
|
679
685
|
key: String(t.key),
|
|
680
686
|
ref_for: !0,
|
|
681
687
|
ref: (e) => e && P(z).measureElement(e),
|
|
682
688
|
"data-index": t.index,
|
|
683
689
|
class: w(P(b).row()),
|
|
684
690
|
style: E({ transform: `translateY(${t.start}px)` })
|
|
685
|
-
}, [F.value[t.index].kind === "node" ? (O(), p(
|
|
691
|
+
}, [F.value[t.index].kind === "node" ? (O(), p(te, {
|
|
686
692
|
key: 0,
|
|
687
693
|
node: F.value[t.index].node,
|
|
688
694
|
"index-path": F.value[t.index].indexPath,
|
|
@@ -717,20 +723,15 @@ var fe = ["aria-label", "onClick"], pe = [
|
|
|
717
723
|
class: w(P(b).empty()),
|
|
718
724
|
onDragover: t[0] ||= (...e) => P(M).onEmptyDragOver && P(M).onEmptyDragOver(...e),
|
|
719
725
|
onDrop: t[1] ||= (...e) => P(M).onEmptyDrop && P(M).onEmptyDrop(...e)
|
|
720
|
-
}, [j(e.$slots, "empty", {}, () => [v(N(
|
|
726
|
+
}, [j(e.$slots, "empty", {}, () => [v(N(ce.value), 1)])], 34)) : m("", !0),
|
|
721
727
|
g("p", {
|
|
722
728
|
role: "status",
|
|
723
729
|
class: w(P(b).status())
|
|
724
730
|
}, N(P(M).status.value), 3)
|
|
725
731
|
]),
|
|
726
732
|
_: 3
|
|
727
|
-
},
|
|
728
|
-
"value",
|
|
729
|
-
"class",
|
|
730
|
-
"style",
|
|
731
|
-
"onKeydownCapture"
|
|
732
|
-
]));
|
|
733
|
+
}, 16, ["value", "onKeydownCapture"]));
|
|
733
734
|
}
|
|
734
|
-
}), _e = { useVirtualizer:
|
|
735
|
+
}), _e = { useVirtualizer: J };
|
|
735
736
|
//#endregion
|
|
736
|
-
export { he as VirtualList,
|
|
737
|
+
export { he as VirtualList, Y as VirtualSelect, Z as VirtualTree, _e as virtualRows };
|