@wirecore/wirelayer-vue 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Checkbox-D9f77jtl.js → Checkbox-DS2qfQK1.js} +28 -30
- package/dist/ContextMenu-B6agwyf_.js +2311 -0
- package/dist/{Field-B1EsNF84.js → Field-Cqe2BG_x.js} +1 -1
- package/dist/{Highlight-Cg8DvCfq.js → Highlight-uwptdaUw.js} +35 -32
- package/dist/Input-C5dyvZfJ.js +183 -0
- package/dist/{InputStatus-D7kBGlew.js → InputStatus-Cgarj-yu.js} +16 -3
- package/dist/{Select-DAuYpE1c.js → Select-CeZbSy6K.js} +137 -112
- package/dist/Slider-Cpv7Vj3B.js +143 -0
- package/dist/Tree-DgHt0P5P.js +807 -0
- package/dist/chart.js +1 -1
- package/dist/components/Alert/Alert.vue.d.ts +5 -3
- package/dist/components/Alert/Alert.vue.d.ts.map +1 -1
- package/dist/components/AngleSlider/AngleSlider.vue.d.ts +2 -0
- package/dist/components/AngleSlider/AngleSlider.vue.d.ts.map +1 -1
- package/dist/components/Autocomplete/Autocomplete.vue.d.ts +2 -0
- package/dist/components/Autocomplete/Autocomplete.vue.d.ts.map +1 -1
- package/dist/components/Carousel/Carousel.vue.d.ts +2 -0
- package/dist/components/Carousel/Carousel.vue.d.ts.map +1 -1
- package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts +2 -0
- package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.vue.d.ts +28 -23
- package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/ColorInput/ColorInput.vue.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.vue.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPicker.vue.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.vue.d.ts +11 -1
- package/dist/components/Combobox/Combobox.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPalette.vue.d.ts +1 -1
- package/dist/components/Confirm/ConfirmDialog.vue.d.ts +5 -0
- package/dist/components/Confirm/ConfirmDialog.vue.d.ts.map +1 -1
- package/dist/components/Confirm/confirm.d.ts +7 -0
- package/dist/components/Confirm/confirm.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.vue.d.ts +17 -1
- package/dist/components/ContextMenu/ContextMenu.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.vue.d.ts +2 -0
- package/dist/components/DatePicker/DatePicker.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePickerBase.vue.d.ts +2 -0
- package/dist/components/DatePicker/DatePickerBase.vue.d.ts.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.vue.d.ts +2 -0
- package/dist/components/DateRangePicker/DateRangePicker.vue.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.vue.d.ts +1 -1
- package/dist/components/Dialog/DialogContent.vue.d.ts +7 -0
- package/dist/components/Dialog/DialogContent.vue.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.vue.d.ts +1 -1
- package/dist/components/Drawer/DrawerContent.vue.d.ts +2 -0
- package/dist/components/Drawer/DrawerContent.vue.d.ts.map +1 -1
- package/dist/components/DurationInput/DurationInput.vue.d.ts +2 -0
- package/dist/components/DurationInput/DurationInput.vue.d.ts.map +1 -1
- package/dist/components/Fieldset/Fieldset.vue.d.ts +1 -1
- package/dist/components/FilterPanel/FilterPanel.vue.d.ts +1 -1
- package/dist/components/HoverCard/HoverCard.vue.d.ts +1 -1
- package/dist/components/IconButton/IconButton.vue.d.ts +2 -0
- package/dist/components/IconButton/IconButton.vue.d.ts.map +1 -1
- package/dist/components/Input/Input.vue.d.ts +3 -1
- package/dist/components/Input/Input.vue.d.ts.map +1 -1
- package/dist/components/Knob/Knob.vue.d.ts +2 -0
- package/dist/components/Knob/Knob.vue.d.ts.map +1 -1
- package/dist/components/Listbox/Listbox.vue.d.ts +2 -0
- package/dist/components/Listbox/Listbox.vue.d.ts.map +1 -1
- package/dist/components/MaskInput/MaskInput.vue.d.ts +2 -1
- package/dist/components/MaskInput/MaskInput.vue.d.ts.map +1 -1
- package/dist/components/Menu/Menu.vue.d.ts +9 -1
- package/dist/components/Menu/Menu.vue.d.ts.map +1 -1
- package/dist/components/Menu/state.d.ts +22 -0
- package/dist/components/Menu/state.d.ts.map +1 -1
- package/dist/components/MonthPicker/MonthPicker.vue.d.ts +2 -0
- package/dist/components/MonthPicker/MonthPicker.vue.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts +2 -0
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts.map +1 -1
- package/dist/components/NativeSelect/NativeSelect.vue.d.ts +26 -17
- package/dist/components/NativeSelect/NativeSelect.vue.d.ts.map +1 -1
- package/dist/components/NumberInput/NumberInput.vue.d.ts +3 -1
- package/dist/components/NumberInput/NumberInput.vue.d.ts.map +1 -1
- package/dist/components/Panel/Panel.vue.d.ts +1 -1
- package/dist/components/PasswordInput/PasswordInput.vue.d.ts +11 -3
- package/dist/components/PasswordInput/PasswordInput.vue.d.ts.map +1 -1
- package/dist/components/PinInput/PinInput.vue.d.ts +2 -0
- package/dist/components/PinInput/PinInput.vue.d.ts.map +1 -1
- package/dist/components/Popover/Popover.vue.d.ts +1 -1
- package/dist/components/Progress/Progress.vue.d.ts +11 -0
- package/dist/components/Progress/Progress.vue.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.vue.d.ts +24 -25
- package/dist/components/RadioGroup/RadioGroup.vue.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroupItem.vue.d.ts +2 -1
- package/dist/components/RadioGroup/RadioGroupItem.vue.d.ts.map +1 -1
- package/dist/components/RadioGroup/context.d.ts +4 -0
- package/dist/components/RadioGroup/context.d.ts.map +1 -0
- package/dist/components/Rating/Rating.vue.d.ts +2 -0
- package/dist/components/Rating/Rating.vue.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts +23 -22
- package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
- package/dist/components/Select/Select.vue.d.ts +11 -1
- package/dist/components/Select/Select.vue.d.ts.map +1 -1
- package/dist/components/SelectionCard/CheckboxCard.vue.d.ts +2 -0
- package/dist/components/SelectionCard/CheckboxCard.vue.d.ts.map +1 -1
- package/dist/components/Slider/Slider.vue.d.ts +2 -0
- package/dist/components/Slider/Slider.vue.d.ts.map +1 -1
- package/dist/components/Switch/Switch.vue.d.ts +2 -0
- package/dist/components/Switch/Switch.vue.d.ts.map +1 -1
- package/dist/components/TagsInput/TagsInput.vue.d.ts +2 -0
- package/dist/components/TagsInput/TagsInput.vue.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.vue.d.ts +3 -1
- package/dist/components/Textarea/Textarea.vue.d.ts.map +1 -1
- package/dist/components/TimePicker/TimePicker.vue.d.ts +2 -0
- package/dist/components/TimePicker/TimePicker.vue.d.ts.map +1 -1
- package/dist/components/TimeRangePicker/TimeRangePicker.vue.d.ts +2 -0
- package/dist/components/TimeRangePicker/TimeRangePicker.vue.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.vue.d.ts +3 -0
- package/dist/components/Tooltip/Tooltip.vue.d.ts.map +1 -1
- package/dist/components/TreeSelect/TreeSelect.vue.d.ts +2 -0
- package/dist/components/TreeSelect/TreeSelect.vue.d.ts.map +1 -1
- package/dist/components/YearPicker/YearPicker.vue.d.ts +2 -0
- package/dist/components/YearPicker/YearPicker.vue.d.ts.map +1 -1
- package/dist/data-table/DataTable.vue.d.ts +9 -1
- package/dist/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/data-table.js +1007 -994
- package/dist/editor.js +1 -1
- package/dist/form/FormField.vue.d.ts +3 -0
- package/dist/form/FormField.vue.d.ts.map +1 -1
- package/dist/form.js +8 -5
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5834 -5626
- package/dist/label-for-eQvYjsM5.js +8 -0
- package/dist/pdf.js +3 -3
- package/dist/sources/ActionBar.css +1 -0
- package/dist/sources/AppShell.css +1 -0
- package/dist/sources/ChatPrompt.css +1 -0
- package/dist/sources/Gallery.css +1 -0
- package/dist/sources/IconButton.css +1 -0
- package/dist/sources/Image.css +1 -0
- package/dist/sources/ImageCropper.css +1 -0
- package/dist/sources/InlineEdit.css +1 -0
- package/dist/sources/Marquee.css +1 -0
- package/dist/sources/MegaMenu.css +1 -0
- package/dist/sources/Menubar.css +1 -0
- package/dist/sources/OrderList.css +1 -0
- package/dist/sources/PickList.css +1 -0
- package/dist/sources/ScrollTop.css +1 -0
- package/dist/{useTree-H8XsFHMk.js → useTree-UhG1TMeM.js} +1 -1
- package/dist/utils/label-for.d.ts +3 -0
- package/dist/utils/label-for.d.ts.map +1 -0
- package/dist/utils/list.d.ts +5 -0
- package/dist/utils/list.d.ts.map +1 -1
- package/dist/utils/text-field.d.ts +16 -0
- package/dist/utils/text-field.d.ts.map +1 -0
- package/dist/virtual/VirtualSelect.vue.d.ts +2 -0
- package/dist/virtual/VirtualSelect.vue.d.ts.map +1 -1
- package/dist/virtual.js +207 -197
- package/fonts.css +2 -0
- package/llms-full.txt +254 -23
- package/llms.txt +9 -5
- package/package.json +7 -3
- package/theme.css +14 -0
- package/dist/ContextMenu-C5JKyNlX.js +0 -2209
- package/dist/Input-BhnYMKjE.js +0 -168
- package/dist/Slider-CyoZc5A8.js +0 -135
- package/dist/Tree-DWxqSrO6.js +0 -789
package/dist/virtual.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { a as e, n as t } from "./recipes-BlM9aKyt.js";
|
|
2
2
|
import { t as n } from "./attrs-KNjeRUCf.js";
|
|
3
|
-
import { a as r, i, n as a, r as o } from "./Highlight-
|
|
4
|
-
import { a as
|
|
5
|
-
import { Fragment as
|
|
3
|
+
import { a as r, i, n as a, r as o } from "./Highlight-uwptdaUw.js";
|
|
4
|
+
import { a as s, i as c, n as l, r as ee, t as u } from "./useTree-UhG1TMeM.js";
|
|
5
|
+
import { Fragment as d, Teleport as te, 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
6
|
import { Check as z, ChevronDown as B, LoaderCircle as V, X as ie } from "@lucide/vue";
|
|
7
|
-
import { flattenTree as H, select as
|
|
8
|
-
import {
|
|
7
|
+
import { controlIds as ae, flattenTree as H, select as oe, tree as se, virtualList as ce, virtualListBox as U } from "@wirecore/wirelayer-recipes";
|
|
8
|
+
import { useFieldContext as le } from "@ark-ui/vue/field";
|
|
9
|
+
import { createListCollection as ue } from "@ark-ui/vue/collection";
|
|
9
10
|
import { Select as W } from "@ark-ui/vue/select";
|
|
10
11
|
import { TreeView as G, useTreeView as K } from "@ark-ui/vue/tree-view";
|
|
11
|
-
import { defaultRangeExtractor as
|
|
12
|
+
import { defaultRangeExtractor as de, useVirtualizer as q } from "@tanstack/vue-virtual";
|
|
12
13
|
//#region src/virtual/VirtualSelect.vue?vue&type=script&setup=true&lang.ts
|
|
13
|
-
var
|
|
14
|
+
var fe = ["aria-label", "onClick"], pe = [
|
|
14
15
|
"aria-controls",
|
|
15
16
|
"aria-activedescendant",
|
|
16
17
|
"aria-label",
|
|
@@ -52,44 +53,49 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
52
53
|
hasMore: { type: Boolean },
|
|
53
54
|
dataSource: { default: void 0 },
|
|
54
55
|
pageSize: {},
|
|
55
|
-
minSearchLength: {}
|
|
56
|
+
minSearchLength: {},
|
|
57
|
+
id: {}
|
|
56
58
|
},
|
|
57
59
|
emits: [
|
|
58
60
|
"update:modelValue",
|
|
59
61
|
"filterChange",
|
|
60
62
|
"loadMore"
|
|
61
63
|
],
|
|
62
|
-
setup(i, { emit:
|
|
63
|
-
let
|
|
64
|
-
size:
|
|
65
|
-
clearable:
|
|
66
|
-
})), H =
|
|
67
|
-
itemValue:
|
|
68
|
-
itemLabel:
|
|
69
|
-
itemDisabled:
|
|
64
|
+
setup(i, { emit: s }) {
|
|
65
|
+
let c = e(), l = i, ee = t("select", oe), u = t("virtualList", ce), b = s, k = re(), j = f(() => n(k)), I = f(() => ee({
|
|
66
|
+
size: l.size,
|
|
67
|
+
clearable: l.clearable
|
|
68
|
+
})), H = u(), se = c.select, U = f(() => ({
|
|
69
|
+
itemValue: l.itemValue,
|
|
70
|
+
itemLabel: l.itemLabel,
|
|
71
|
+
itemDisabled: l.itemDisabled,
|
|
70
72
|
itemGroup: () => void 0,
|
|
71
|
-
valueKey:
|
|
72
|
-
})), G =
|
|
73
|
-
items: () =>
|
|
74
|
-
source: () =>
|
|
73
|
+
valueKey: l.valueKey
|
|
74
|
+
})), G = A(""), K = r({
|
|
75
|
+
items: () => l.items,
|
|
76
|
+
source: () => l.dataSource,
|
|
75
77
|
accessors: () => U.value,
|
|
76
|
-
pageSize: () =>
|
|
77
|
-
minSearchLength: () =>
|
|
78
|
-
}), { options:
|
|
78
|
+
pageSize: () => l.pageSize,
|
|
79
|
+
minSearchLength: () => l.minSearchLength
|
|
80
|
+
}), { options: de, visible: J } = a(() => K.items.value, () => U.value, () => l.filter && !l.manualFilter && !l.dataSource ? G.value : ""), Y = f(() => [...de.value, ...K.resolvedOptions.value]), { selected: me, keys: X, commit: he, commitKeys: ge } = o({
|
|
79
81
|
multiple: !1,
|
|
80
|
-
model: () =>
|
|
81
|
-
defaultValue:
|
|
82
|
+
model: () => l.modelValue,
|
|
83
|
+
defaultValue: l.defaultValue,
|
|
82
84
|
accessors: () => U.value,
|
|
83
85
|
items: Y,
|
|
84
|
-
emit: (e) => b("update:modelValue", e)
|
|
85
|
-
|
|
86
|
+
emit: (e) => b("update:modelValue", e),
|
|
87
|
+
check: {
|
|
88
|
+
component: "VirtualSelect",
|
|
89
|
+
ready: () => !l.dataSource && !l.loading && l.items.length > 0
|
|
90
|
+
}
|
|
91
|
+
}), Z = f(() => me.value[0]), _e = f(() => ue({
|
|
86
92
|
items: J.value,
|
|
87
93
|
itemToString: (e) => e.label,
|
|
88
94
|
itemToValue: (e) => e.key,
|
|
89
95
|
isItemDisabled: (e) => e.disabled
|
|
90
|
-
})),
|
|
96
|
+
})), ve = F(), ye = A(null), be = A(null), xe = (e) => e ? "$el" in e ? e.$el ?? null : e : null, Q = q(f(() => ({
|
|
91
97
|
count: J.value.length,
|
|
92
|
-
getScrollElement: () =>
|
|
98
|
+
getScrollElement: () => xe(l.filter ? be.value : ye.value),
|
|
93
99
|
estimateSize: () => 36,
|
|
94
100
|
overscan: 8,
|
|
95
101
|
initialRect: {
|
|
@@ -97,107 +103,111 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
97
103
|
height: 288
|
|
98
104
|
}
|
|
99
105
|
})));
|
|
100
|
-
|
|
101
|
-
let $ = f(() =>
|
|
106
|
+
D(() => K.resolve(X.value, Y.value)), L(X, (e) => K.resolve(e, Y.value));
|
|
107
|
+
let $ = f(() => l.loading || K.loading.value), Se = f(() => l.hasMore || K.hasMore.value), Ce = f(() => Q.value.getVirtualItems().at(-1)?.index ?? -1);
|
|
102
108
|
L([
|
|
103
|
-
|
|
109
|
+
Ce,
|
|
104
110
|
() => J.value.length,
|
|
105
111
|
$,
|
|
106
|
-
|
|
112
|
+
Se
|
|
107
113
|
], () => {
|
|
108
|
-
!
|
|
114
|
+
!Se.value || $.value || !J.value.length || Ce.value < J.value.length - 1 || (l.dataSource ? K.loadMore() : b("loadMore"));
|
|
109
115
|
});
|
|
110
|
-
function
|
|
111
|
-
|
|
116
|
+
function we(e) {
|
|
117
|
+
l.clearable && me.value.length && (e.key === "Backspace" || e.key === "Delete") && (e.preventDefault(), he([]));
|
|
112
118
|
}
|
|
113
|
-
function
|
|
114
|
-
G.value = t.target.value, b("filterChange", G.value),
|
|
119
|
+
function Te(e, t) {
|
|
120
|
+
G.value = t.target.value, b("filterChange", G.value), l.dataSource && K.search(G.value), !(l.manualFilter || l.dataSource) && C(() => {
|
|
115
121
|
let t = J.value.find((e) => !e.disabled);
|
|
116
122
|
t && e.setHighlightValue(t.key);
|
|
117
123
|
});
|
|
118
124
|
}
|
|
119
|
-
function
|
|
125
|
+
function Ee(e) {
|
|
120
126
|
(e.key === " " || e.key === "Home" || e.key === "End") && e.stopPropagation();
|
|
121
127
|
}
|
|
122
|
-
function
|
|
123
|
-
e && K.open(), !e && G.value && (G.value = "", b("filterChange", ""),
|
|
128
|
+
function De(e) {
|
|
129
|
+
e && K.open(), !e && G.value && (G.value = "", b("filterChange", ""), l.dataSource && K.search(""));
|
|
124
130
|
}
|
|
125
|
-
let
|
|
131
|
+
let Oe = (e) => e.highlightedItem ? e.getItemProps({ item: e.highlightedItem }).id : void 0, ke = {
|
|
126
132
|
sameWidth: !0,
|
|
127
133
|
gutter: 4
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
134
|
+
}, Ae = le(), je = f(() => ae(l.id, "trigger", {
|
|
135
|
+
label: Ae?.value.ids.label,
|
|
136
|
+
hiddenSelect: Ae?.value.ids.control
|
|
137
|
+
}));
|
|
138
|
+
return (e, t) => (O(), p(P(W).Root, S({
|
|
139
|
+
class: I.value.base({ class: j.value.className }),
|
|
140
|
+
style: j.value.style,
|
|
141
|
+
collection: _e.value,
|
|
133
142
|
"model-value": P(X),
|
|
134
143
|
disabled: i.disabled,
|
|
135
144
|
invalid: i.invalid,
|
|
136
145
|
required: i.required,
|
|
137
146
|
name: i.name,
|
|
138
|
-
positioning:
|
|
139
|
-
composite: !i.filter
|
|
147
|
+
positioning: ke,
|
|
148
|
+
composite: !i.filter
|
|
149
|
+
}, je.value, {
|
|
140
150
|
"scroll-to-index-fn": (e) => P(Q).scrollToIndex(e.index, { align: "auto" }),
|
|
141
|
-
onValueChange: t[0] ||= (e) => P(
|
|
142
|
-
onOpenChange: t[1] ||= (e) =>
|
|
143
|
-
}, {
|
|
151
|
+
onValueChange: t[0] ||= (e) => P(ge)(e.value, e.items),
|
|
152
|
+
onOpenChange: t[1] ||= (e) => De(e.open)
|
|
153
|
+
}), {
|
|
144
154
|
default: R(() => [
|
|
145
|
-
y(P(W).Control,
|
|
146
|
-
default: R(() => [y(P(W).Trigger,
|
|
155
|
+
y(P(W).Control, T(x(i.clearable ? { class: I.value.control() } : {})), {
|
|
156
|
+
default: R(() => [y(P(W).Trigger, S(j.value.rest, {
|
|
147
157
|
class: I.value.trigger(),
|
|
148
158
|
"aria-busy": $.value || void 0,
|
|
149
|
-
onKeydown:
|
|
159
|
+
onKeydown: we
|
|
150
160
|
}), {
|
|
151
|
-
default: R(() => [g("span", { class:
|
|
161
|
+
default: R(() => [g("span", { class: w(I.value.value()) }, [Z.value?.icon ? (O(), p(M(Z.value.icon), {
|
|
152
162
|
key: 0,
|
|
153
|
-
class:
|
|
163
|
+
class: w(I.value.icon()),
|
|
154
164
|
"aria-hidden": "true"
|
|
155
|
-
}, null, 8, ["class"])) : m("", !0), y(P(W).ValueText, { placeholder: i.placeholder ?? P(
|
|
165
|
+
}, null, 8, ["class"])) : m("", !0), y(P(W).ValueText, { placeholder: i.placeholder ?? P(c).common.placeholder }, _({ _: 2 }, [Z.value ? {
|
|
156
166
|
name: "default",
|
|
157
167
|
fn: R(() => [v(N(Z.value.label), 1)]),
|
|
158
168
|
key: "0"
|
|
159
|
-
} : void 0]), 1032, ["placeholder"])], 2), y(P(W).Indicator, { class:
|
|
160
|
-
default: R(() => [$.value ? (
|
|
169
|
+
} : void 0]), 1032, ["placeholder"])], 2), y(P(W).Indicator, { class: w(I.value.indicator()) }, {
|
|
170
|
+
default: R(() => [$.value ? (O(), p(P(V), {
|
|
161
171
|
key: 0,
|
|
162
|
-
class:
|
|
172
|
+
class: w(I.value.spinner()),
|
|
163
173
|
"aria-hidden": "true"
|
|
164
|
-
}, null, 8, ["class"])) : (
|
|
174
|
+
}, null, 8, ["class"])) : (O(), p(P(B), {
|
|
165
175
|
key: 1,
|
|
166
|
-
class:
|
|
176
|
+
class: w(I.value.indicatorIcon()),
|
|
167
177
|
"aria-hidden": "true"
|
|
168
178
|
}, null, 8, ["class"]))]),
|
|
169
179
|
_: 1
|
|
170
180
|
}, 8, ["class"])]),
|
|
171
181
|
_: 1
|
|
172
|
-
}, 16, ["class", "aria-busy"]), i.clearable ? (
|
|
173
|
-
default: R((e) => [Z.value && !e.disabled ? (
|
|
182
|
+
}, 16, ["class", "aria-busy"]), i.clearable ? (O(), p(P(W).Context, { key: 0 }, {
|
|
183
|
+
default: R((e) => [Z.value && !e.disabled ? (O(), h("button", {
|
|
174
184
|
key: 0,
|
|
175
185
|
type: "button",
|
|
176
186
|
tabindex: "-1",
|
|
177
|
-
class:
|
|
178
|
-
"aria-label": P(
|
|
187
|
+
class: w(I.value.clear()),
|
|
188
|
+
"aria-label": P(se).clear,
|
|
179
189
|
onClick: (t) => {
|
|
180
|
-
P(
|
|
190
|
+
P(he)([]), e.focus();
|
|
181
191
|
}
|
|
182
192
|
}, [y(P(ie), {
|
|
183
|
-
class:
|
|
193
|
+
class: w(I.value.clearIcon()),
|
|
184
194
|
"aria-hidden": "true"
|
|
185
|
-
}, null, 8, ["class"])], 10,
|
|
195
|
+
}, null, 8, ["class"])], 10, fe)) : m("", !0)]),
|
|
186
196
|
_: 1
|
|
187
197
|
})) : m("", !0)]),
|
|
188
198
|
_: 1
|
|
189
199
|
}, 16),
|
|
190
|
-
(
|
|
200
|
+
(O(), p(te, { to: "body" }, [y(P(W).Positioner, null, {
|
|
191
201
|
default: R(() => [y(P(W).Content, {
|
|
192
202
|
ref_key: "content",
|
|
193
|
-
ref:
|
|
194
|
-
class:
|
|
203
|
+
ref: ye,
|
|
204
|
+
class: w(I.value.content()),
|
|
195
205
|
"aria-busy": $.value || void 0,
|
|
196
206
|
"aria-label": i.filter ? j.value.rest["aria-label"] : void 0
|
|
197
207
|
}, {
|
|
198
|
-
default: R(() => [i.filter ? (
|
|
208
|
+
default: R(() => [i.filter ? (O(), h("div", {
|
|
199
209
|
key: 0,
|
|
200
|
-
class:
|
|
210
|
+
class: w(I.value.header())
|
|
201
211
|
}, [y(P(W).Context, null, {
|
|
202
212
|
default: R((e) => [g("input", {
|
|
203
213
|
type: "text",
|
|
@@ -206,48 +216,48 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
206
216
|
"aria-autocomplete": "list",
|
|
207
217
|
"aria-expanded": "true",
|
|
208
218
|
"data-autofocus": "",
|
|
209
|
-
"aria-controls": P(
|
|
210
|
-
"aria-activedescendant":
|
|
211
|
-
"aria-label": P(
|
|
212
|
-
placeholder: P(
|
|
219
|
+
"aria-controls": P(ve),
|
|
220
|
+
"aria-activedescendant": Oe(e),
|
|
221
|
+
"aria-label": P(se).filter,
|
|
222
|
+
placeholder: P(c).combobox.search,
|
|
213
223
|
value: G.value,
|
|
214
|
-
class:
|
|
215
|
-
onInput: (t) =>
|
|
216
|
-
onKeydown:
|
|
217
|
-
}, null, 42,
|
|
224
|
+
class: w(I.value.search()),
|
|
225
|
+
onInput: (t) => Te(e, t),
|
|
226
|
+
onKeydown: Ee
|
|
227
|
+
}, null, 42, pe)]),
|
|
218
228
|
_: 1
|
|
219
|
-
})], 2)) : m("", !0), i.filter ? (
|
|
229
|
+
})], 2)) : m("", !0), i.filter ? (O(), p(P(W).List, {
|
|
220
230
|
key: 1,
|
|
221
|
-
id: P(
|
|
231
|
+
id: P(ve),
|
|
222
232
|
ref_key: "scroller",
|
|
223
|
-
ref:
|
|
224
|
-
class:
|
|
233
|
+
ref: be,
|
|
234
|
+
class: w(I.value.list({ class: P(H).scroll() }))
|
|
225
235
|
}, {
|
|
226
236
|
default: R(() => [
|
|
227
237
|
g("div", {
|
|
228
|
-
class:
|
|
229
|
-
style:
|
|
230
|
-
}, [(
|
|
238
|
+
class: w(P(H).spacer()),
|
|
239
|
+
style: E({ height: `${P(Q).getTotalSize()}px` })
|
|
240
|
+
}, [(O(!0), h(d, null, ne(P(Q).getVirtualItems(), (e) => (O(), p(P(W).Item, {
|
|
231
241
|
key: String(e.key),
|
|
232
242
|
item: P(J)[e.index],
|
|
233
|
-
class:
|
|
234
|
-
style:
|
|
243
|
+
class: w(I.value.item({ class: P(H).item() })),
|
|
244
|
+
style: E({ transform: `translateY(${e.start}px)` }),
|
|
235
245
|
"aria-setsize": P(J).length,
|
|
236
246
|
"aria-posinset": e.index + 1
|
|
237
247
|
}, {
|
|
238
248
|
default: R(() => [
|
|
239
|
-
P(J)[e.index].icon ? (
|
|
249
|
+
P(J)[e.index].icon ? (O(), p(M(P(J)[e.index].icon), {
|
|
240
250
|
key: 0,
|
|
241
|
-
class:
|
|
251
|
+
class: w(I.value.icon()),
|
|
242
252
|
"aria-hidden": "true"
|
|
243
253
|
}, null, 8, ["class"])) : m("", !0),
|
|
244
|
-
y(P(W).ItemText, { class:
|
|
254
|
+
y(P(W).ItemText, { class: w(I.value.itemText()) }, {
|
|
245
255
|
default: R(() => [v(N(P(J)[e.index].label), 1)]),
|
|
246
256
|
_: 2
|
|
247
257
|
}, 1032, ["class"]),
|
|
248
258
|
y(P(W).ItemIndicator, null, {
|
|
249
259
|
default: R(() => [y(P(z), {
|
|
250
|
-
class:
|
|
260
|
+
class: w(I.value.itemIndicator()),
|
|
251
261
|
"aria-hidden": "true"
|
|
252
262
|
}, null, 8, ["class"])]),
|
|
253
263
|
_: 1
|
|
@@ -261,46 +271,46 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
261
271
|
"aria-setsize",
|
|
262
272
|
"aria-posinset"
|
|
263
273
|
]))), 128))], 6),
|
|
264
|
-
$.value ? (
|
|
274
|
+
$.value ? (O(), h("div", {
|
|
265
275
|
key: 0,
|
|
266
|
-
class:
|
|
276
|
+
class: w(I.value.loading())
|
|
267
277
|
}, [y(P(V), {
|
|
268
|
-
class:
|
|
278
|
+
class: w(I.value.loadingIcon()),
|
|
269
279
|
"aria-hidden": "true"
|
|
270
|
-
}, null, 8, ["class"]), v(" " + N(i.loadingText ?? P(
|
|
271
|
-
!P(J).length && !$.value ? (
|
|
280
|
+
}, null, 8, ["class"]), v(" " + N(i.loadingText ?? P(c).common.loading), 1)], 2)) : m("", !0),
|
|
281
|
+
!P(J).length && !$.value ? (O(), h("div", {
|
|
272
282
|
key: 1,
|
|
273
283
|
role: "option",
|
|
274
284
|
"aria-disabled": "true",
|
|
275
|
-
class:
|
|
276
|
-
}, N(i.emptyText ?? P(K).emptyText.value ?? (G.value ? P(
|
|
285
|
+
class: w(I.value.empty())
|
|
286
|
+
}, N(i.emptyText ?? P(K).emptyText.value ?? (G.value ? P(c).common.noResults : P(c).common.empty)), 3)) : m("", !0)
|
|
277
287
|
]),
|
|
278
288
|
_: 1
|
|
279
|
-
}, 8, ["id", "class"])) : (
|
|
289
|
+
}, 8, ["id", "class"])) : (O(), h(d, { key: 2 }, [
|
|
280
290
|
g("div", {
|
|
281
|
-
class:
|
|
282
|
-
style:
|
|
283
|
-
}, [(
|
|
291
|
+
class: w(P(H).spacer()),
|
|
292
|
+
style: E({ height: `${P(Q).getTotalSize()}px` })
|
|
293
|
+
}, [(O(!0), h(d, null, ne(P(Q).getVirtualItems(), (e) => (O(), p(P(W).Item, {
|
|
284
294
|
key: String(e.key),
|
|
285
295
|
item: P(J)[e.index],
|
|
286
|
-
class:
|
|
287
|
-
style:
|
|
296
|
+
class: w(I.value.item({ class: P(H).item() })),
|
|
297
|
+
style: E({ transform: `translateY(${e.start}px)` }),
|
|
288
298
|
"aria-setsize": P(J).length,
|
|
289
299
|
"aria-posinset": e.index + 1
|
|
290
300
|
}, {
|
|
291
301
|
default: R(() => [
|
|
292
|
-
P(J)[e.index].icon ? (
|
|
302
|
+
P(J)[e.index].icon ? (O(), p(M(P(J)[e.index].icon), {
|
|
293
303
|
key: 0,
|
|
294
|
-
class:
|
|
304
|
+
class: w(I.value.icon()),
|
|
295
305
|
"aria-hidden": "true"
|
|
296
306
|
}, null, 8, ["class"])) : m("", !0),
|
|
297
|
-
y(P(W).ItemText, { class:
|
|
307
|
+
y(P(W).ItemText, { class: w(I.value.itemText()) }, {
|
|
298
308
|
default: R(() => [v(N(P(J)[e.index].label), 1)]),
|
|
299
309
|
_: 2
|
|
300
310
|
}, 1032, ["class"]),
|
|
301
311
|
y(P(W).ItemIndicator, null, {
|
|
302
312
|
default: R(() => [y(P(z), {
|
|
303
|
-
class:
|
|
313
|
+
class: w(I.value.itemIndicator()),
|
|
304
314
|
"aria-hidden": "true"
|
|
305
315
|
}, null, 8, ["class"])]),
|
|
306
316
|
_: 1
|
|
@@ -314,19 +324,19 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
314
324
|
"aria-setsize",
|
|
315
325
|
"aria-posinset"
|
|
316
326
|
]))), 128))], 6),
|
|
317
|
-
$.value ? (
|
|
327
|
+
$.value ? (O(), h("div", {
|
|
318
328
|
key: 0,
|
|
319
|
-
class:
|
|
329
|
+
class: w(I.value.loading())
|
|
320
330
|
}, [y(P(V), {
|
|
321
|
-
class:
|
|
331
|
+
class: w(I.value.loadingIcon()),
|
|
322
332
|
"aria-hidden": "true"
|
|
323
|
-
}, null, 8, ["class"]), v(" " + N(i.loadingText ?? P(
|
|
324
|
-
!P(J).length && !$.value ? (
|
|
333
|
+
}, null, 8, ["class"]), v(" " + N(i.loadingText ?? P(c).common.loading), 1)], 2)) : m("", !0),
|
|
334
|
+
!P(J).length && !$.value ? (O(), h("div", {
|
|
325
335
|
key: 1,
|
|
326
336
|
role: "option",
|
|
327
337
|
"aria-disabled": "true",
|
|
328
|
-
class:
|
|
329
|
-
}, N(i.emptyText ?? P(K).emptyText.value ?? (G.value ? P(
|
|
338
|
+
class: w(I.value.empty())
|
|
339
|
+
}, N(i.emptyText ?? P(K).emptyText.value ?? (G.value ? P(c).common.noResults : P(c).common.empty)), 3)) : m("", !0)
|
|
330
340
|
], 64))]),
|
|
331
341
|
_: 1
|
|
332
342
|
}, 8, [
|
|
@@ -337,14 +347,14 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
337
347
|
_: 1
|
|
338
348
|
})])),
|
|
339
349
|
y(P(W).HiddenSelect),
|
|
340
|
-
i.dataSource ? (
|
|
350
|
+
i.dataSource ? (O(), h("span", {
|
|
341
351
|
key: 0,
|
|
342
352
|
role: "status",
|
|
343
|
-
class:
|
|
353
|
+
class: w(I.value.status())
|
|
344
354
|
}, N(P(K).announcement.value), 3)) : m("", !0)
|
|
345
355
|
]),
|
|
346
356
|
_: 1
|
|
347
|
-
},
|
|
357
|
+
}, 16, [
|
|
348
358
|
"class",
|
|
349
359
|
"style",
|
|
350
360
|
"collection",
|
|
@@ -357,11 +367,11 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
357
367
|
"scroll-to-index-fn"
|
|
358
368
|
]));
|
|
359
369
|
}
|
|
360
|
-
}), Y = ["aria-label", "aria-busy"],
|
|
370
|
+
}), Y = ["aria-label", "aria-busy"], me = ["data-index"], X = [
|
|
361
371
|
"aria-posinset",
|
|
362
372
|
"aria-setsize",
|
|
363
373
|
"data-index"
|
|
364
|
-
],
|
|
374
|
+
], he = /* @__PURE__ */ b({
|
|
365
375
|
inheritAttrs: !1,
|
|
366
376
|
__name: "VirtualList",
|
|
367
377
|
props: {
|
|
@@ -390,7 +400,7 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
390
400
|
},
|
|
391
401
|
emits: ["loadMore", "endReached"],
|
|
392
402
|
setup(n, { expose: r, emit: a }) {
|
|
393
|
-
let o = n,
|
|
403
|
+
let o = n, s = a, c = t("virtualListBox", U), l = re(), ee = e(), u = c(), te = A(null), p = i({
|
|
394
404
|
source: () => o.dataSource,
|
|
395
405
|
pageSize: () => o.pageSize,
|
|
396
406
|
query: () => {
|
|
@@ -399,15 +409,15 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
399
409
|
return delete e.search, e;
|
|
400
410
|
}
|
|
401
411
|
});
|
|
402
|
-
|
|
412
|
+
D(() => {
|
|
403
413
|
o.dataSource && p.search(o.query?.search ?? "", !1);
|
|
404
414
|
}), L(() => o.query?.search, (e) => {
|
|
405
415
|
o.dataSource && p.search(e ?? "");
|
|
406
416
|
});
|
|
407
|
-
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), S = (e) => {
|
|
408
418
|
let t = o.itemGroup, n = typeof t == "function" ? t(e) : e?.[t];
|
|
409
419
|
return n == null || n === "" ? void 0 : String(n);
|
|
410
|
-
},
|
|
420
|
+
}, C = f(() => {
|
|
411
421
|
if (!o.itemGroup) return _.value.map((e, t) => ({
|
|
412
422
|
kind: "item",
|
|
413
423
|
item: e,
|
|
@@ -415,7 +425,7 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
415
425
|
}));
|
|
416
426
|
let e = [], t;
|
|
417
427
|
return _.value.forEach((n, r) => {
|
|
418
|
-
let i =
|
|
428
|
+
let i = S(n);
|
|
419
429
|
i !== void 0 && i !== t && e.push({
|
|
420
430
|
kind: "header",
|
|
421
431
|
label: i
|
|
@@ -425,88 +435,88 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
425
435
|
index: r
|
|
426
436
|
});
|
|
427
437
|
}), e;
|
|
428
|
-
}),
|
|
429
|
-
count:
|
|
430
|
-
getScrollElement: () =>
|
|
438
|
+
}), T = f(() => C.value.flatMap((e, t) => e.kind === "header" ? [t] : [])), k = (e) => [...T.value].reverse().find((t) => e >= t) ?? -1, M = q(f(() => ({
|
|
439
|
+
count: C.value.length,
|
|
440
|
+
getScrollElement: () => te.value,
|
|
431
441
|
estimateSize: (e) => {
|
|
432
|
-
let t =
|
|
442
|
+
let t = C.value[e];
|
|
433
443
|
return t?.kind === "item" && o.estimateSize ? o.estimateSize(t.item, t.index) : o.itemHeight;
|
|
434
444
|
},
|
|
435
445
|
measureElement: (e) => e.getBoundingClientRect().height || o.itemHeight,
|
|
436
446
|
overscan: 6,
|
|
437
|
-
rangeExtractor:
|
|
438
|
-
let t =
|
|
447
|
+
rangeExtractor: T.value.length ? (e) => {
|
|
448
|
+
let t = k(e.startIndex), n = new Set(de(e));
|
|
439
449
|
return t >= 0 && n.add(t), [...n].sort((e, t) => e - t);
|
|
440
|
-
} :
|
|
450
|
+
} : de,
|
|
441
451
|
initialRect: {
|
|
442
452
|
width: 0,
|
|
443
453
|
height: 320
|
|
444
454
|
}
|
|
445
455
|
}))), F = f(() => M.value.getVirtualItems()), I = f(() => {
|
|
446
456
|
let e = F.value.length ? M.value.range : null;
|
|
447
|
-
return
|
|
457
|
+
return T.value.length ? k(e?.startIndex ?? 0) : -1;
|
|
448
458
|
}), R = -1;
|
|
449
459
|
function z() {
|
|
450
|
-
let e = F.value.at(-1)?.index, t =
|
|
451
|
-
e !== void 0 && b.value && !x.value && R !== t && (e < t - 1 - o.endThreshold || (R = t, o.dataSource ? p.loadMore() : (
|
|
460
|
+
let e = F.value.at(-1)?.index, t = C.value.length;
|
|
461
|
+
e !== void 0 && b.value && !x.value && R !== t && (e < t - 1 - o.endThreshold || (R = t, o.dataSource ? p.loadMore() : (s("loadMore"), s("endReached"))));
|
|
452
462
|
}
|
|
453
|
-
|
|
463
|
+
D(z), L(() => [
|
|
454
464
|
F.value.at(-1)?.index,
|
|
455
|
-
|
|
465
|
+
C.value.length,
|
|
456
466
|
b.value,
|
|
457
467
|
x.value
|
|
458
468
|
], z);
|
|
459
469
|
let B = f(() => !!o.dataSource || o.hasMore || o.loading || o.loadingMore);
|
|
460
470
|
return r({
|
|
461
471
|
scrollToIndex(e, t = {}) {
|
|
462
|
-
let n =
|
|
472
|
+
let n = C.value.findIndex((t) => t.kind === "item" && t.index === e);
|
|
463
473
|
n >= 0 && M.value.scrollToIndex(n, { align: t.align ?? "auto" });
|
|
464
474
|
},
|
|
465
475
|
refresh: () => p.refresh()
|
|
466
|
-
}), (e, t) => (
|
|
476
|
+
}), (e, t) => (O(), h(d, null, [g("div", {
|
|
467
477
|
ref_key: "scrollElement",
|
|
468
|
-
ref:
|
|
478
|
+
ref: te,
|
|
469
479
|
role: "list",
|
|
470
480
|
"aria-label": n.label,
|
|
471
481
|
"aria-busy": B.value && x.value || void 0,
|
|
472
482
|
tabindex: "0",
|
|
473
|
-
class:
|
|
474
|
-
style:
|
|
483
|
+
class: w(P(u).base({ class: w(P(l).class) })),
|
|
484
|
+
style: E([{ height: n.height }, P(l).style])
|
|
475
485
|
}, [g("div", {
|
|
476
|
-
class:
|
|
477
|
-
style:
|
|
478
|
-
}, [(
|
|
486
|
+
class: w(P(u).spacer()),
|
|
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", {
|
|
479
489
|
key: 0,
|
|
480
490
|
ref_for: !0,
|
|
481
491
|
ref: (e) => e && P(M).measureElement(e),
|
|
482
492
|
role: "presentation",
|
|
483
493
|
"data-index": t.index,
|
|
484
|
-
class:
|
|
485
|
-
style:
|
|
486
|
-
}, N(
|
|
494
|
+
class: w(t.index === I.value ? P(u).groupHeader({ class: P(u).sticky() }) : P(u).item({ class: P(u).groupHeader() })),
|
|
495
|
+
style: E(t.index === I.value ? void 0 : { transform: `translateY(${t.start}px)` })
|
|
496
|
+
}, N(C.value[t.index].label), 15, me)) : C.value[t.index] ? (O(), h("div", {
|
|
487
497
|
key: 1,
|
|
488
498
|
ref_for: !0,
|
|
489
499
|
ref: (e) => e && P(M).measureElement(e),
|
|
490
500
|
role: "listitem",
|
|
491
|
-
"aria-posinset":
|
|
501
|
+
"aria-posinset": C.value[t.index].index + 1,
|
|
492
502
|
"aria-setsize": _.value.length,
|
|
493
503
|
"data-index": t.index,
|
|
494
|
-
class:
|
|
495
|
-
style:
|
|
504
|
+
class: w(P(u).item()),
|
|
505
|
+
style: E({ transform: `translateY(${t.start}px)` })
|
|
496
506
|
}, [j(e.$slots, "default", {
|
|
497
|
-
item:
|
|
498
|
-
index:
|
|
499
|
-
})], 14, X)) : m("", !0)], 64))), 128))], 6), B.value && x.value && _.value.length ? (
|
|
507
|
+
item: C.value[t.index].item,
|
|
508
|
+
index: C.value[t.index].index
|
|
509
|
+
})], 14, X)) : m("", !0)], 64))), 128))], 6), B.value && x.value && _.value.length ? (O(), h("div", {
|
|
500
510
|
key: 0,
|
|
501
|
-
class:
|
|
511
|
+
class: w(P(u).loading()),
|
|
502
512
|
"aria-hidden": "true"
|
|
503
|
-
}, [y(P(V), { class:
|
|
513
|
+
}, [y(P(V), { class: w(P(u).loadingIcon()) }, null, 8, ["class"]), v(" " + N(P(ee).dataSource.loadingMore), 1)], 2)) : m("", !0)], 14, Y), n.dataSource ? (O(), h("p", {
|
|
504
514
|
key: 0,
|
|
505
515
|
role: "status",
|
|
506
|
-
class:
|
|
516
|
+
class: w(P(u).status())
|
|
507
517
|
}, N(P(p).announcement.value), 3)) : m("", !0)], 64));
|
|
508
518
|
}
|
|
509
|
-
}),
|
|
519
|
+
}), ge = ["data-index"], Z = /* @__PURE__ */ b({
|
|
510
520
|
inheritAttrs: !1,
|
|
511
521
|
__name: "VirtualTree",
|
|
512
522
|
props: {
|
|
@@ -562,8 +572,8 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
562
572
|
"loadChildren"
|
|
563
573
|
],
|
|
564
574
|
setup(n, { expose: r, emit: i }) {
|
|
565
|
-
let a = n, o = i,
|
|
566
|
-
|
|
575
|
+
let a = n, o = i, te = I(), b = t("tree", se, () => a.classes)(), x = re(), C = e(), T = C.tree, D = A(null), M = u(a, o, f(() => D.value?.$el ?? null));
|
|
576
|
+
k(c, M.drag), k(s, {
|
|
567
577
|
...M,
|
|
568
578
|
showLines: f(() => !1)
|
|
569
579
|
});
|
|
@@ -578,7 +588,7 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
578
588
|
level: t.level
|
|
579
589
|
});
|
|
580
590
|
return e;
|
|
581
|
-
}), L =
|
|
591
|
+
}), L = A(null), z = q(f(() => ({
|
|
582
592
|
count: F.value.length,
|
|
583
593
|
getScrollElement: () => L.value?.$el ?? null,
|
|
584
594
|
estimateSize: () => a.itemHeight,
|
|
@@ -603,7 +613,7 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
603
613
|
let t = B(e.node.id);
|
|
604
614
|
t < 0 || (z.value.scrollToIndex(t, { align: "auto" }), ie(e.getElement));
|
|
605
615
|
}
|
|
606
|
-
let
|
|
616
|
+
let oe = f(() => a.label ?? x["aria-label"] ?? C.tree.treeLabel), ce = K(f(() => ({
|
|
607
617
|
collection: M.collection.value,
|
|
608
618
|
selectionMode: a.selectionMode,
|
|
609
619
|
selectedValue: M.selected.value,
|
|
@@ -612,12 +622,12 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
612
622
|
checkedValue: a.checkedValue,
|
|
613
623
|
defaultCheckedValue: a.defaultCheckedValue
|
|
614
624
|
},
|
|
615
|
-
translations: { treeLabel:
|
|
625
|
+
translations: { treeLabel: oe.value },
|
|
616
626
|
scrollToIndexFn: ae,
|
|
617
627
|
onSelectionChange: (e) => M.onSelectionChange(e.selectedValue),
|
|
618
628
|
onExpandedChange: (e) => M.setExpanded(e.expandedValue),
|
|
619
629
|
onCheckedChange: (e) => M.ownChecks.value || M.onArkCheckedChange(e.checkedValue)
|
|
620
|
-
}))),
|
|
630
|
+
}))), U = f(() => a.emptyText ?? (M.query.value.trim() ? T.noMatches : a.group === void 0 ? void 0 : C.common.empty)), le = f(() => !M.view.value.length && (U.value !== void 0 || !!te.empty || a.group !== void 0));
|
|
621
631
|
return r({
|
|
622
632
|
expandAll: M.expandAll,
|
|
623
633
|
collapseAll: M.collapseAll,
|
|
@@ -626,23 +636,23 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
626
636
|
let t = B(e);
|
|
627
637
|
t >= 0 && z.value.scrollToIndex(t, { align: "auto" }), requestAnimationFrame(() => M.focusNode(e));
|
|
628
638
|
}
|
|
629
|
-
}), (e, t) => (
|
|
639
|
+
}), (e, t) => (O(), p(P(G).RootProvider, {
|
|
630
640
|
ref_key: "root",
|
|
631
|
-
ref:
|
|
632
|
-
value: P(
|
|
633
|
-
class:
|
|
634
|
-
style:
|
|
641
|
+
ref: D,
|
|
642
|
+
value: P(ce),
|
|
643
|
+
class: w(P(b).base({ class: w(P(x).class) })),
|
|
644
|
+
style: E(P(x).style),
|
|
635
645
|
onKeydownCapture: P(M).onKeydown
|
|
636
646
|
}, {
|
|
637
647
|
default: R(() => [
|
|
638
|
-
n.label ? (
|
|
648
|
+
n.label ? (O(), p(P(G).Label, {
|
|
639
649
|
key: 0,
|
|
640
|
-
class:
|
|
650
|
+
class: w(P(b).label())
|
|
641
651
|
}, {
|
|
642
652
|
default: R(() => [v(N(n.label), 1)]),
|
|
643
653
|
_: 1
|
|
644
654
|
}, 8, ["class"])) : m("", !0),
|
|
645
|
-
y(
|
|
655
|
+
y(l, {
|
|
646
656
|
model: P(M),
|
|
647
657
|
filter: n.filter,
|
|
648
658
|
"filter-mode": n.filterMode,
|
|
@@ -658,21 +668,21 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
658
668
|
y(P(G).Tree, {
|
|
659
669
|
ref_key: "viewport",
|
|
660
670
|
ref: L,
|
|
661
|
-
class:
|
|
662
|
-
style:
|
|
663
|
-
hidden:
|
|
671
|
+
class: w(P(b).tree({ class: P(b).viewport() })),
|
|
672
|
+
style: E({ height: n.height }),
|
|
673
|
+
hidden: le.value || void 0
|
|
664
674
|
}, {
|
|
665
675
|
default: R(() => [g("div", {
|
|
666
|
-
class:
|
|
667
|
-
style:
|
|
668
|
-
}, [(
|
|
676
|
+
class: w(P(b).spacer()),
|
|
677
|
+
style: E({ height: `${P(z).getTotalSize()}px` })
|
|
678
|
+
}, [(O(!0), h(d, null, ne(P(z).getVirtualItems(), (t) => (O(), h("div", {
|
|
669
679
|
key: String(t.key),
|
|
670
680
|
ref_for: !0,
|
|
671
681
|
ref: (e) => e && P(z).measureElement(e),
|
|
672
682
|
"data-index": t.index,
|
|
673
|
-
class:
|
|
674
|
-
style:
|
|
675
|
-
}, [F.value[t.index].kind === "node" ? (
|
|
683
|
+
class: w(P(b).row()),
|
|
684
|
+
style: E({ transform: `translateY(${t.start}px)` })
|
|
685
|
+
}, [F.value[t.index].kind === "node" ? (O(), p(ee, {
|
|
676
686
|
key: 0,
|
|
677
687
|
node: F.value[t.index].node,
|
|
678
688
|
"index-path": F.value[t.index].indexPath,
|
|
@@ -682,7 +692,7 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
682
692
|
setsize: F.value[t.index].setsize
|
|
683
693
|
}, _({ _: 2 }, [e.$slots.node ? {
|
|
684
694
|
name: "node",
|
|
685
|
-
fn: R((t) => [j(e.$slots, "node",
|
|
695
|
+
fn: R((t) => [j(e.$slots, "node", S({ ref_for: !0 }, t))]),
|
|
686
696
|
key: "0"
|
|
687
697
|
} : void 0]), 1032, [
|
|
688
698
|
"node",
|
|
@@ -690,27 +700,27 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
690
700
|
"checkable",
|
|
691
701
|
"posinset",
|
|
692
702
|
"setsize"
|
|
693
|
-
])) : (
|
|
703
|
+
])) : (O(), h("div", {
|
|
694
704
|
key: 1,
|
|
695
|
-
class:
|
|
696
|
-
style:
|
|
705
|
+
class: w(P(b).loadingRow()),
|
|
706
|
+
style: E({ "--depth": F.value[t.index].level }),
|
|
697
707
|
"aria-hidden": "true"
|
|
698
|
-
}, [y(P(V), { class:
|
|
708
|
+
}, [y(P(V), { class: w(P(b).loadingIcon()) }, null, 8, ["class"]), v(" " + N(P(T).loadingRow), 1)], 6))], 14, ge))), 128))], 6)]),
|
|
699
709
|
_: 3
|
|
700
710
|
}, 8, [
|
|
701
711
|
"class",
|
|
702
712
|
"style",
|
|
703
713
|
"hidden"
|
|
704
714
|
]),
|
|
705
|
-
|
|
715
|
+
le.value ? (O(), h("div", {
|
|
706
716
|
key: 1,
|
|
707
|
-
class:
|
|
717
|
+
class: w(P(b).empty()),
|
|
708
718
|
onDragover: t[0] ||= (...e) => P(M).onEmptyDragOver && P(M).onEmptyDragOver(...e),
|
|
709
719
|
onDrop: t[1] ||= (...e) => P(M).onEmptyDrop && P(M).onEmptyDrop(...e)
|
|
710
|
-
}, [j(e.$slots, "empty", {}, () => [v(N(
|
|
720
|
+
}, [j(e.$slots, "empty", {}, () => [v(N(U.value), 1)])], 34)) : m("", !0),
|
|
711
721
|
g("p", {
|
|
712
722
|
role: "status",
|
|
713
|
-
class:
|
|
723
|
+
class: w(P(b).status())
|
|
714
724
|
}, N(P(M).status.value), 3)
|
|
715
725
|
]),
|
|
716
726
|
_: 3
|
|
@@ -721,6 +731,6 @@ var ue = ["aria-label", "onClick"], de = [
|
|
|
721
731
|
"onKeydownCapture"
|
|
722
732
|
]));
|
|
723
733
|
}
|
|
724
|
-
}),
|
|
734
|
+
}), _e = { useVirtualizer: q };
|
|
725
735
|
//#endregion
|
|
726
|
-
export {
|
|
736
|
+
export { he as VirtualList, J as VirtualSelect, Z as VirtualTree, _e as virtualRows };
|