vlite3 0.7.8 → 0.7.9
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/components/Dropdown/Dropdown.vue.js +131 -142
- package/components/Dropdown/composables/useDropdownHydration.d.ts +105 -0
- package/components/Dropdown/composables/useDropdownHydration.js +32 -0
- package/components/MultiSelect/MultiSelect.vue.js +90 -92
- package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +97 -0
- package/components/MultiSelect/composables/useMultiSelectHydration.js +30 -0
- package/components/MultiSelect/index.d.ts +1 -0
- package/index.js +121 -119
- package/package.json +1 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as K, ref as i, computed as m, watch as T, provide as Q, reactive as W, toRefs as X, openBlock as H, createElementBlock as Y, normalizeStyle as Z, createVNode as B, unref as v, withCtx as c, renderSlot as d, createBlock as _, normalizeClass as ee, createSlots as te, normalizeProps as M, guardReactiveProps as L, createCommentVNode as le } from "vue";
|
|
2
|
+
import oe from "v-tooltip-lite";
|
|
3
3
|
import "v-tooltip-lite/style.css";
|
|
4
4
|
import ne from "./DropdownMenu.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useDropdownIds as
|
|
8
|
-
import { useDropdownSelection as
|
|
9
|
-
|
|
5
|
+
import ae from "./DropdownTrigger.vue.js";
|
|
6
|
+
import ie from "../ConfirmationModal.vue.js";
|
|
7
|
+
import { useDropdownIds as se } from "./composables/useDropdownIds.js";
|
|
8
|
+
import { useDropdownSelection as re } from "./composables/useDropdownSelection.js";
|
|
9
|
+
import { useDropdownHydration as ue } from "./composables/useDropdownHydration.js";
|
|
10
|
+
const be = /* @__PURE__ */ K({
|
|
10
11
|
__name: "Dropdown",
|
|
11
12
|
props: {
|
|
12
13
|
selected: {},
|
|
@@ -45,228 +46,216 @@ const pe = /* @__PURE__ */ J({
|
|
|
45
46
|
isNested: { type: Boolean, default: !1 }
|
|
46
47
|
},
|
|
47
48
|
emits: ["onSelect", "update:modelValue", "onOpen", "onClose", "update:isOpen", "load-more", "search"],
|
|
48
|
-
setup(
|
|
49
|
-
const
|
|
49
|
+
setup(l, { emit: V }) {
|
|
50
|
+
const n = l, p = V, h = i(!1), f = i(null), s = i({
|
|
50
51
|
title: "Confirm Selection",
|
|
51
52
|
description: "Are you sure you want to select this option?",
|
|
52
53
|
confirmText: "Confirm",
|
|
53
54
|
cancelText: "Cancel",
|
|
54
55
|
variant: "primary"
|
|
55
|
-
}),
|
|
56
|
-
|
|
57
|
-
() =>
|
|
56
|
+
}), R = m(() => n.position ? n.position : n.direction === "rtl" ? "bottom-end" : "bottom-start"), z = m(() => n.nestedPosition ? n.nestedPosition : n.direction === "rtl" ? "left-start" : "right-start"), O = i(n.isOpen || !1), y = i(0);
|
|
57
|
+
T(
|
|
58
|
+
() => n.isOpen,
|
|
58
59
|
(e) => {
|
|
59
|
-
e !== void 0 && (
|
|
60
|
+
e !== void 0 && (O.value = e);
|
|
60
61
|
}
|
|
61
62
|
);
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
|
|
63
|
+
const P = (e) => {
|
|
64
|
+
O.value = e, p("update:isOpen", e), p(e ? "onOpen" : "onClose");
|
|
65
|
+
}, g = () => {
|
|
66
|
+
P(!1);
|
|
66
67
|
};
|
|
67
|
-
|
|
68
|
-
close:
|
|
68
|
+
Q("dropdown-context", {
|
|
69
|
+
close: g,
|
|
69
70
|
onChildToggle: (e) => {
|
|
70
|
-
e ?
|
|
71
|
+
e ? y.value++ : y.value = Math.max(0, y.value - 1);
|
|
71
72
|
}
|
|
72
73
|
});
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
const b = m(() => n.options ? n.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), C = i([]), I = i(!1), S = i(!1);
|
|
75
|
+
T(
|
|
76
|
+
b,
|
|
76
77
|
(e) => {
|
|
77
|
-
if (e)
|
|
78
|
-
if (
|
|
79
|
-
const
|
|
78
|
+
if (e) {
|
|
79
|
+
if (n.remote) {
|
|
80
|
+
const o = [...C.value];
|
|
80
81
|
e.forEach((t) => {
|
|
81
|
-
|
|
82
|
-
}),
|
|
82
|
+
o.some((a) => a.value !== void 0 && t.value !== void 0 ? typeof a.value == "object" && a.key && t.key ? a.key === t.key && a.value[a.key] === t.value[t.key] : a.value === t.value : a.label === t.label) || o.push(t);
|
|
83
|
+
}), C.value = o;
|
|
83
84
|
} else
|
|
84
|
-
|
|
85
|
+
C.value = e;
|
|
86
|
+
!I.value && e.length > 0 && (I.value = !0, setTimeout(() => {
|
|
87
|
+
S.value = !0, N($.value);
|
|
88
|
+
}, 10));
|
|
89
|
+
}
|
|
85
90
|
},
|
|
86
91
|
{ immediate: !0 }
|
|
87
92
|
// Performance fix: Removed deep: true to prevent heavy recursion mapping
|
|
88
93
|
);
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const t = l.filter((i) => {
|
|
94
|
-
const a = v.value.has(i), x = m.value.some((c) => (c.value ?? c.label) === i);
|
|
95
|
-
return !a && !x;
|
|
96
|
-
});
|
|
97
|
-
if (t.length) {
|
|
98
|
-
k.value = !0;
|
|
99
|
-
try {
|
|
100
|
-
(await o.fetchSelected(t)).forEach((a) => {
|
|
101
|
-
v.value.set(a.value ?? a.label, a);
|
|
102
|
-
});
|
|
103
|
-
} catch (i) {
|
|
104
|
-
console.error("[Dropdown] Hydration failed:", i);
|
|
105
|
-
} finally {
|
|
106
|
-
k.value = !1;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}, h = y(() => {
|
|
110
|
-
const e = [...m.value], l = new Set(e.map((t) => t.value ?? t.label));
|
|
111
|
-
return v.value.forEach((t, i) => {
|
|
112
|
-
l.has(i) || (e.unshift(t), l.add(i));
|
|
94
|
+
const u = m(() => {
|
|
95
|
+
const e = [...C.value], o = new Set(e.map((t) => t.value ?? t.label));
|
|
96
|
+
return k.value.forEach((t, r) => {
|
|
97
|
+
o.has(r) || (e.unshift(t), o.add(r));
|
|
113
98
|
}), e;
|
|
114
|
-
}), {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
99
|
+
}), { selectedBuffer: k, isHydrating: D, hydrateSelected: N } = ue({
|
|
100
|
+
fetchSelected: n.fetchSelected,
|
|
101
|
+
getAvailableOptions: () => u.value,
|
|
102
|
+
isReady: () => S.value
|
|
103
|
+
}), { getAllRecursiveIds: E } = se(), j = W({
|
|
104
|
+
...X(n),
|
|
105
|
+
options: u
|
|
106
|
+
}), { currentValue: $, selectedLabel: x, selectOption: U } = re(
|
|
107
|
+
j,
|
|
119
108
|
p
|
|
120
|
-
),
|
|
121
|
-
const e =
|
|
122
|
-
return [.../* @__PURE__ */ new Set([...e, ...
|
|
109
|
+
), q = m(() => {
|
|
110
|
+
const e = n.ignoreClickOutside || [], o = E(u.value);
|
|
111
|
+
return [.../* @__PURE__ */ new Set([...e, ...o])];
|
|
123
112
|
});
|
|
124
|
-
|
|
125
|
-
() =>
|
|
113
|
+
T(
|
|
114
|
+
() => $.value,
|
|
126
115
|
(e) => {
|
|
127
|
-
|
|
116
|
+
S.value && N(e);
|
|
128
117
|
},
|
|
129
|
-
{
|
|
118
|
+
{ deep: !0 }
|
|
130
119
|
);
|
|
131
|
-
const
|
|
132
|
-
|
|
120
|
+
const F = (e) => {
|
|
121
|
+
n.doubleConfirmation || !!e.confirmation ? (f.value = e, typeof e.confirmation == "object" ? s.value = {
|
|
133
122
|
title: e.confirmation.title || "Confirm Selection",
|
|
134
123
|
description: e.confirmation.description || "Are you sure you want to select this option?",
|
|
135
124
|
confirmText: e.confirmation.confirmText || "Confirm",
|
|
136
125
|
cancelText: e.confirmation.cancelText || "Cancel",
|
|
137
126
|
variant: e.confirmation.variant || "primary"
|
|
138
|
-
} :
|
|
127
|
+
} : s.value = {
|
|
139
128
|
title: "Confirm Selection",
|
|
140
129
|
description: `Are you sure you want to select "${e.label}"?`,
|
|
141
130
|
confirmText: "Confirm",
|
|
142
131
|
cancelText: "Cancel",
|
|
143
132
|
variant: "primary"
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
const t =
|
|
149
|
-
if (!
|
|
150
|
-
const
|
|
151
|
-
(e._path || [
|
|
152
|
-
typeof
|
|
133
|
+
}, h.value = !0, g()) : (A(e), n.closeOnSelect && g());
|
|
134
|
+
}, A = (e) => {
|
|
135
|
+
const o = e.value ?? e.label;
|
|
136
|
+
k.value.has(o) || k.value.set(o, e);
|
|
137
|
+
const t = U(e);
|
|
138
|
+
if (!n.isNested) {
|
|
139
|
+
const r = e._originalOption || e, a = r.value ?? r.label;
|
|
140
|
+
(e._path || [r]).forEach((w) => {
|
|
141
|
+
typeof w.onSelect == "function" && w.onSelect({
|
|
153
142
|
value: a,
|
|
154
|
-
option:
|
|
155
|
-
data:
|
|
143
|
+
option: w,
|
|
144
|
+
data: u.value || [],
|
|
156
145
|
values: t
|
|
157
146
|
});
|
|
158
147
|
});
|
|
159
148
|
}
|
|
160
|
-
}, q = () => {
|
|
161
|
-
f.value && (N(f.value), f.value = null, g.value = !1);
|
|
162
149
|
}, G = () => {
|
|
163
|
-
f.value = null,
|
|
150
|
+
f.value && (A(f.value), f.value = null, h.value = !1);
|
|
151
|
+
}, J = () => {
|
|
152
|
+
f.value = null, h.value = !1;
|
|
164
153
|
};
|
|
165
|
-
return (e,
|
|
154
|
+
return (e, o) => (H(), Y("div", {
|
|
166
155
|
class: "relative inline-block text-left",
|
|
167
|
-
style:
|
|
156
|
+
style: Z({ direction: l.direction })
|
|
168
157
|
}, [
|
|
169
|
-
|
|
158
|
+
B(v(oe), {
|
|
170
159
|
content: "",
|
|
171
160
|
trigger: "click",
|
|
172
161
|
arrow: !1,
|
|
173
|
-
teleport:
|
|
174
|
-
offset:
|
|
175
|
-
placement:
|
|
176
|
-
isOpen:
|
|
177
|
-
keepAlive:
|
|
178
|
-
menuId:
|
|
179
|
-
ignoreClickOutside:
|
|
162
|
+
teleport: l.teleport,
|
|
163
|
+
offset: l.offset,
|
|
164
|
+
placement: R.value,
|
|
165
|
+
isOpen: O.value,
|
|
166
|
+
keepAlive: y.value > 0,
|
|
167
|
+
menuId: l.menuId,
|
|
168
|
+
ignoreClickOutside: q.value,
|
|
180
169
|
class: "w-full",
|
|
181
|
-
className: "dropdown " + (
|
|
182
|
-
onOnShow:
|
|
183
|
-
onOnHide:
|
|
184
|
-
"onUpdate:isOpen":
|
|
170
|
+
className: "dropdown " + (l.className || ""),
|
|
171
|
+
onOnShow: o[2] || (o[2] = (t) => e.$emit("onOpen")),
|
|
172
|
+
onOnHide: o[3] || (o[3] = (t) => e.$emit("onClose")),
|
|
173
|
+
"onUpdate:isOpen": P,
|
|
185
174
|
triggerClass: "w-full",
|
|
186
175
|
styles: { padding: "0" }
|
|
187
176
|
}, {
|
|
188
|
-
trigger:
|
|
189
|
-
d(e.$slots, "trigger", M(
|
|
190
|
-
|
|
191
|
-
"selected-label":
|
|
177
|
+
trigger: c(({ isOpen: t }) => [
|
|
178
|
+
d(e.$slots, "trigger", M(L({ selectedLabel: v(x), isOpen: t })), () => [
|
|
179
|
+
B(ae, {
|
|
180
|
+
"selected-label": v(x),
|
|
192
181
|
"is-open": t,
|
|
193
|
-
direction:
|
|
194
|
-
triggerProps:
|
|
182
|
+
direction: l.direction,
|
|
183
|
+
triggerProps: l.triggerProps,
|
|
195
184
|
class: "w-full"
|
|
196
185
|
}, null, 8, ["selected-label", "is-open", "direction", "triggerProps"])
|
|
197
186
|
])
|
|
198
187
|
]),
|
|
199
|
-
default:
|
|
188
|
+
default: c(() => [
|
|
200
189
|
d(e.$slots, "default"),
|
|
201
|
-
|
|
190
|
+
b.value.length || u.value.length || e.$slots.menu || e.$slots.item || l.remote || l.searchable ? (H(), _(ne, {
|
|
202
191
|
key: 0,
|
|
203
|
-
options:
|
|
204
|
-
cachedOptions:
|
|
205
|
-
class:
|
|
206
|
-
selected:
|
|
207
|
-
selectedIndex:
|
|
208
|
-
maxHeight:
|
|
209
|
-
nestedPosition:
|
|
210
|
-
nestedOffset:
|
|
211
|
-
selectable:
|
|
212
|
-
direction:
|
|
213
|
-
layout:
|
|
214
|
-
columns:
|
|
215
|
-
loading:
|
|
216
|
-
hasMore:
|
|
217
|
-
searchable:
|
|
218
|
-
remote:
|
|
219
|
-
debounceTime:
|
|
220
|
-
onSelect:
|
|
221
|
-
onClose:
|
|
222
|
-
onLoadMore:
|
|
223
|
-
onSearch:
|
|
224
|
-
},
|
|
192
|
+
options: b.value,
|
|
193
|
+
cachedOptions: u.value,
|
|
194
|
+
class: ee(l.className),
|
|
195
|
+
selected: v($),
|
|
196
|
+
selectedIndex: l.selectedIndex,
|
|
197
|
+
maxHeight: l.maxHeight,
|
|
198
|
+
nestedPosition: z.value,
|
|
199
|
+
nestedOffset: l.nestedOffset,
|
|
200
|
+
selectable: l.selectable,
|
|
201
|
+
direction: l.direction,
|
|
202
|
+
layout: l.layout,
|
|
203
|
+
columns: l.columns,
|
|
204
|
+
loading: l.loading || v(D),
|
|
205
|
+
hasMore: l.hasMore,
|
|
206
|
+
searchable: l.searchable,
|
|
207
|
+
remote: l.remote,
|
|
208
|
+
debounceTime: l.debounceTime,
|
|
209
|
+
onSelect: F,
|
|
210
|
+
onClose: g,
|
|
211
|
+
onLoadMore: o[0] || (o[0] = (t) => e.$emit("load-more")),
|
|
212
|
+
onSearch: o[1] || (o[1] = (t) => e.$emit("search", t))
|
|
213
|
+
}, te({ _: 2 }, [
|
|
225
214
|
e.$slots.menu ? {
|
|
226
215
|
name: "menu",
|
|
227
|
-
fn:
|
|
216
|
+
fn: c(() => [
|
|
228
217
|
d(e.$slots, "menu")
|
|
229
218
|
]),
|
|
230
219
|
key: "0"
|
|
231
220
|
} : void 0,
|
|
232
221
|
e.$slots.item ? {
|
|
233
222
|
name: "item",
|
|
234
|
-
fn:
|
|
235
|
-
d(e.$slots, "item", M(
|
|
223
|
+
fn: c((t) => [
|
|
224
|
+
d(e.$slots, "item", M(L(t)))
|
|
236
225
|
]),
|
|
237
226
|
key: "1"
|
|
238
227
|
} : void 0,
|
|
239
228
|
e.$slots.header ? {
|
|
240
229
|
name: "header",
|
|
241
|
-
fn:
|
|
230
|
+
fn: c(() => [
|
|
242
231
|
d(e.$slots, "header")
|
|
243
232
|
]),
|
|
244
233
|
key: "2"
|
|
245
234
|
} : void 0,
|
|
246
235
|
e.$slots.footer ? {
|
|
247
236
|
name: "footer",
|
|
248
|
-
fn:
|
|
237
|
+
fn: c(() => [
|
|
249
238
|
d(e.$slots, "footer")
|
|
250
239
|
]),
|
|
251
240
|
key: "3"
|
|
252
241
|
} : void 0
|
|
253
|
-
]), 1032, ["options", "cachedOptions", "class", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) :
|
|
242
|
+
]), 1032, ["options", "cachedOptions", "class", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) : le("", !0)
|
|
254
243
|
]),
|
|
255
244
|
_: 3
|
|
256
245
|
}, 8, ["teleport", "offset", "placement", "isOpen", "keepAlive", "menuId", "ignoreClickOutside", "className"]),
|
|
257
|
-
|
|
258
|
-
show:
|
|
259
|
-
title:
|
|
260
|
-
description:
|
|
261
|
-
"confirm-text":
|
|
262
|
-
"cancel-text":
|
|
263
|
-
variant:
|
|
264
|
-
onConfirm:
|
|
265
|
-
onCancel:
|
|
246
|
+
B(ie, {
|
|
247
|
+
show: h.value,
|
|
248
|
+
title: s.value.title,
|
|
249
|
+
description: s.value.description,
|
|
250
|
+
"confirm-text": s.value.confirmText,
|
|
251
|
+
"cancel-text": s.value.cancelText,
|
|
252
|
+
variant: s.value.variant,
|
|
253
|
+
onConfirm: G,
|
|
254
|
+
onCancel: J
|
|
266
255
|
}, null, 8, ["show", "title", "description", "confirm-text", "cancel-text", "variant"])
|
|
267
256
|
], 4));
|
|
268
257
|
}
|
|
269
258
|
});
|
|
270
259
|
export {
|
|
271
|
-
|
|
260
|
+
be as default
|
|
272
261
|
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { IDropdownOption } from '../../../types';
|
|
2
|
+
interface UseDropdownHydrationOptions {
|
|
3
|
+
fetchSelected?: (ids: any[]) => Promise<IDropdownOption[]>;
|
|
4
|
+
/**
|
|
5
|
+
* Returns the current set of options that are already available.
|
|
6
|
+
* Hydration will skip IDs found here.
|
|
7
|
+
*/
|
|
8
|
+
getAvailableOptions: () => IDropdownOption[];
|
|
9
|
+
/**
|
|
10
|
+
* Must return true before hydration is allowed to run.
|
|
11
|
+
* Use this to gate hydration until the initial options fetch + delay is done.
|
|
12
|
+
*/
|
|
13
|
+
isReady: () => boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Manages hydration of selected values whose labels are not yet in the option list.
|
|
17
|
+
* Defers fetching until isReady() returns true, so it never fires for IDs already
|
|
18
|
+
* present in the initial options batch.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useDropdownHydration(opts: UseDropdownHydrationOptions): {
|
|
21
|
+
selectedBuffer: import('vue').Ref<Map<any, {
|
|
22
|
+
label: string;
|
|
23
|
+
labelI18n?: string;
|
|
24
|
+
value?: any;
|
|
25
|
+
subtitle?: string;
|
|
26
|
+
subtitleI18n?: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
descriptionI18n?: string;
|
|
29
|
+
icon?: string;
|
|
30
|
+
emoji?: string;
|
|
31
|
+
disabled?: {
|
|
32
|
+
valueOf: () => boolean;
|
|
33
|
+
};
|
|
34
|
+
iconClass?: string;
|
|
35
|
+
iconStyle?: any;
|
|
36
|
+
length?: number;
|
|
37
|
+
values?: any;
|
|
38
|
+
data?: any;
|
|
39
|
+
class?: string;
|
|
40
|
+
triggerClass?: string;
|
|
41
|
+
children?: /*elided*/ any[];
|
|
42
|
+
key?: string;
|
|
43
|
+
position?: any;
|
|
44
|
+
offset?: [number, number];
|
|
45
|
+
showChevron?: boolean;
|
|
46
|
+
confirmation?: boolean | {
|
|
47
|
+
title?: string;
|
|
48
|
+
description?: string;
|
|
49
|
+
confirmText?: string;
|
|
50
|
+
cancelText?: string;
|
|
51
|
+
variant?: "danger" | "primary" | "warning" | "success" | "info";
|
|
52
|
+
};
|
|
53
|
+
onSelect?: (payload: {
|
|
54
|
+
value: any;
|
|
55
|
+
option: IDropdownOption;
|
|
56
|
+
data: IDropdownOption[];
|
|
57
|
+
values?: any;
|
|
58
|
+
}) => void;
|
|
59
|
+
_originalOption?: /*elided*/ any;
|
|
60
|
+
_path?: /*elided*/ any[];
|
|
61
|
+
}> & Omit<Map<any, IDropdownOption>, keyof Map<any, any>>, Map<any, IDropdownOption> | (Map<any, {
|
|
62
|
+
label: string;
|
|
63
|
+
labelI18n?: string;
|
|
64
|
+
value?: any;
|
|
65
|
+
subtitle?: string;
|
|
66
|
+
subtitleI18n?: string;
|
|
67
|
+
description?: string;
|
|
68
|
+
descriptionI18n?: string;
|
|
69
|
+
icon?: string;
|
|
70
|
+
emoji?: string;
|
|
71
|
+
disabled?: {
|
|
72
|
+
valueOf: () => boolean;
|
|
73
|
+
};
|
|
74
|
+
iconClass?: string;
|
|
75
|
+
iconStyle?: any;
|
|
76
|
+
length?: number;
|
|
77
|
+
values?: any;
|
|
78
|
+
data?: any;
|
|
79
|
+
class?: string;
|
|
80
|
+
triggerClass?: string;
|
|
81
|
+
children?: /*elided*/ any[];
|
|
82
|
+
key?: string;
|
|
83
|
+
position?: any;
|
|
84
|
+
offset?: [number, number];
|
|
85
|
+
showChevron?: boolean;
|
|
86
|
+
confirmation?: boolean | {
|
|
87
|
+
title?: string;
|
|
88
|
+
description?: string;
|
|
89
|
+
confirmText?: string;
|
|
90
|
+
cancelText?: string;
|
|
91
|
+
variant?: "danger" | "primary" | "warning" | "success" | "info";
|
|
92
|
+
};
|
|
93
|
+
onSelect?: (payload: {
|
|
94
|
+
value: any;
|
|
95
|
+
option: IDropdownOption;
|
|
96
|
+
data: IDropdownOption[];
|
|
97
|
+
values?: any;
|
|
98
|
+
}) => void;
|
|
99
|
+
_originalOption?: /*elided*/ any;
|
|
100
|
+
_path?: /*elided*/ any[];
|
|
101
|
+
}> & Omit<Map<any, IDropdownOption>, keyof Map<any, any>>)>;
|
|
102
|
+
isHydrating: import('vue').Ref<boolean, boolean>;
|
|
103
|
+
hydrateSelected: (val: any) => Promise<void>;
|
|
104
|
+
};
|
|
105
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ref as f } from "vue";
|
|
2
|
+
function h(n) {
|
|
3
|
+
const l = f(/* @__PURE__ */ new Map()), c = f(!1);
|
|
4
|
+
return {
|
|
5
|
+
selectedBuffer: l,
|
|
6
|
+
isHydrating: c,
|
|
7
|
+
hydrateSelected: async (e) => {
|
|
8
|
+
if (!n.fetchSelected || e === void 0 || e === null || !n.isReady()) return;
|
|
9
|
+
let a = [];
|
|
10
|
+
Array.isArray(e) ? a = e : typeof e == "object" ? a = Object.values(e) : a = [e];
|
|
11
|
+
const o = n.getAvailableOptions(), i = a.filter((t) => {
|
|
12
|
+
const r = l.value.has(t), d = o.some((s) => (s.value ?? s.label) === t);
|
|
13
|
+
return !r && !d;
|
|
14
|
+
});
|
|
15
|
+
if (i.length) {
|
|
16
|
+
c.value = !0;
|
|
17
|
+
try {
|
|
18
|
+
(await n.fetchSelected(i)).forEach((r) => {
|
|
19
|
+
l.value.set(r.value ?? r.label, r);
|
|
20
|
+
});
|
|
21
|
+
} catch (t) {
|
|
22
|
+
console.error("[Dropdown] Hydration failed:", t);
|
|
23
|
+
} finally {
|
|
24
|
+
c.value = !1;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
h as useDropdownHydration
|
|
32
|
+
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { $t as
|
|
1
|
+
import { defineComponent as F, ref as x, computed as r, watch as $, openBlock as s, createBlock as f, unref as v, withCtx as p, createVNode as V, createElementVNode as d, normalizeClass as M, createElementBlock as h, toDisplayString as w, Fragment as I, renderList as P, withModifiers as T, createCommentVNode as S, createTextVNode as R } from "vue";
|
|
2
|
+
import k from "../Icon.vue.js";
|
|
3
|
+
import U from "../Dropdown/Dropdown.vue.js";
|
|
4
|
+
import q from "../Dropdown/DropdownMenu.vue.js";
|
|
5
|
+
import { $t as O } from "../../utils/i18n.js";
|
|
6
6
|
import z from "../Badge.vue.js";
|
|
7
|
-
|
|
7
|
+
import { useMultiSelectHydration as G } from "./composables/useMultiSelectHydration.js";
|
|
8
|
+
const J = { class: "flex flex-wrap gap-1.5 items-center flex-1 min-w-0 py-0.5" }, K = {
|
|
8
9
|
key: 0,
|
|
9
10
|
class: "text-muted-foreground pl-1"
|
|
10
|
-
},
|
|
11
|
+
}, Q = { class: "truncate" }, W = ["onClick"], X = { class: "flex items-center gap-2 pl-2 shrink-0 text-muted-foreground" }, oe = /* @__PURE__ */ F({
|
|
11
12
|
__name: "MultiSelect",
|
|
12
13
|
props: {
|
|
13
14
|
modelValue: { default: () => [] },
|
|
@@ -27,139 +28,136 @@ const Q = { class: "flex flex-wrap gap-1.5 items-center flex-1 min-w-0 py-0.5" }
|
|
|
27
28
|
layout: { default: "default" }
|
|
28
29
|
},
|
|
29
30
|
emits: ["update:modelValue", "change", "load-more", "search"],
|
|
30
|
-
setup(
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
33
|
-
if (
|
|
34
|
-
const e =
|
|
31
|
+
setup(n, { emit: L }) {
|
|
32
|
+
const l = n, i = L, c = x(!1), N = r(() => {
|
|
33
|
+
if (l.placeholderI18n) return O(l.placeholderI18n);
|
|
34
|
+
if (l.placeholder) return l.placeholder;
|
|
35
|
+
const e = O("vlite.multiSelect.placeholder");
|
|
35
36
|
return e !== "vlite.multiSelect.placeholder" ? e : "Select items...";
|
|
36
|
-
}),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const n = u.value.has(l), C = p.value.some(($) => ($.value ?? $.label) === l);
|
|
40
|
-
return !n && !C;
|
|
41
|
-
});
|
|
42
|
-
if (t.length) {
|
|
43
|
-
b.value = !0;
|
|
44
|
-
try {
|
|
45
|
-
(await a.fetchSelected(t)).forEach((n) => {
|
|
46
|
-
u.value.set(n.value ?? n.label, n);
|
|
47
|
-
});
|
|
48
|
-
} catch (l) {
|
|
49
|
-
console.error("[MultiSelect] Hydration failed:", l);
|
|
50
|
-
} finally {
|
|
51
|
-
b.value = !1;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
U(
|
|
56
|
-
() => a.modelValue,
|
|
37
|
+
}), b = r(() => l.options ? l.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), B = x(!1), g = x(!1);
|
|
38
|
+
$(
|
|
39
|
+
b,
|
|
57
40
|
(e) => {
|
|
58
|
-
|
|
41
|
+
!B.value && e.length > 0 && (B.value = !0, setTimeout(() => {
|
|
42
|
+
g.value = !0, u.hydrateSelected(l.modelValue || []);
|
|
43
|
+
}, 10));
|
|
59
44
|
},
|
|
60
|
-
{ immediate: !0
|
|
45
|
+
{ immediate: !0 }
|
|
61
46
|
);
|
|
62
|
-
const
|
|
63
|
-
const e = [...
|
|
64
|
-
return u.value.forEach((
|
|
65
|
-
t.has(
|
|
47
|
+
const y = r(() => {
|
|
48
|
+
const e = [...b.value], t = new Set(e.map((a) => a.value ?? a.label));
|
|
49
|
+
return u.selectedBuffer.value.forEach((a, o) => {
|
|
50
|
+
t.has(o) || (e.unshift(a), t.add(o));
|
|
66
51
|
}), e;
|
|
67
|
-
}),
|
|
52
|
+
}), u = G({
|
|
53
|
+
fetchSelected: l.fetchSelected,
|
|
54
|
+
getValues: () => l.modelValue || [],
|
|
55
|
+
getOptions: () => y.value,
|
|
56
|
+
isInitialLoadDone: () => g.value
|
|
57
|
+
});
|
|
58
|
+
$(
|
|
59
|
+
() => l.modelValue,
|
|
60
|
+
(e) => {
|
|
61
|
+
g.value && u.hydrateSelected(e || []);
|
|
62
|
+
},
|
|
63
|
+
{ deep: !0 }
|
|
64
|
+
);
|
|
65
|
+
const m = r(() => y.value.filter((e) => {
|
|
68
66
|
const t = e.value ?? e.label;
|
|
69
|
-
return
|
|
70
|
-
})),
|
|
67
|
+
return l.modelValue.includes(t);
|
|
68
|
+
})), E = r(() => m.value.slice(0, l.maxVisible)), C = r(() => m.value.length - l.maxVisible), j = (e) => {
|
|
71
69
|
const t = e.value ?? e.label;
|
|
72
|
-
u.value.has(t) || u.value.set(t, e);
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
const t =
|
|
70
|
+
u.selectedBuffer.value.has(t) || u.selectedBuffer.value.set(t, e);
|
|
71
|
+
const a = [...l.modelValue], o = a.indexOf(t);
|
|
72
|
+
o === -1 ? a.push(t) : a.splice(o, 1), i("update:modelValue", a), i("change", a);
|
|
73
|
+
}, D = (e) => {
|
|
74
|
+
const t = l.modelValue.filter((a) => a !== e);
|
|
77
75
|
i("update:modelValue", t), i("change", t);
|
|
78
|
-
},
|
|
76
|
+
}, H = () => {
|
|
79
77
|
i("update:modelValue", []), i("change", []);
|
|
80
|
-
},
|
|
78
|
+
}, A = r(() => [
|
|
81
79
|
"flex items-center justify-between w-full px-3 py-1.5 rounded-md border text-sm transition-colors cursor-pointer",
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
l.disabled ? "opacity-50 cursor-not-allowed bg-muted" : l.variant === "floating" ? "bg-transparent text-foreground" : "bg-background hover:bg-gray-50/70",
|
|
81
|
+
l.variant === "outline" || l.variant === "floating" ? "border-input" : "border-transparent bg-muted",
|
|
84
82
|
c.value ? "border-primary/20" : ""
|
|
85
83
|
].join(" "));
|
|
86
|
-
return r(() =>
|
|
84
|
+
return r(() => l.size === "sm" ? "xs" : "sm"), (e, t) => (s(), f(v(U), {
|
|
87
85
|
isOpen: c.value,
|
|
88
|
-
"onUpdate:isOpen": t[3] || (t[3] = (
|
|
86
|
+
"onUpdate:isOpen": t[3] || (t[3] = (a) => c.value = a),
|
|
89
87
|
"close-on-select": !1,
|
|
90
88
|
selectable: !0,
|
|
91
|
-
disabled:
|
|
89
|
+
disabled: n.disabled
|
|
92
90
|
}, {
|
|
93
|
-
trigger:
|
|
91
|
+
trigger: p(({ isOpen: a }) => [
|
|
94
92
|
d("div", {
|
|
95
|
-
class: M(
|
|
93
|
+
class: M(A.value)
|
|
96
94
|
}, [
|
|
97
|
-
d("div",
|
|
98
|
-
|
|
99
|
-
(s(!0), h(I, null,
|
|
100
|
-
key:
|
|
95
|
+
d("div", J, [
|
|
96
|
+
m.value.length === 0 ? (s(), h("span", K, w(N.value), 1)) : (s(), h(I, { key: 1 }, [
|
|
97
|
+
(s(!0), h(I, null, P(E.value, (o) => (s(), f(z, {
|
|
98
|
+
key: o.value,
|
|
101
99
|
variant: "secondary",
|
|
102
100
|
class: "gap-1 pr-1 truncate max-w-[150px]"
|
|
103
101
|
}, {
|
|
104
|
-
default:
|
|
105
|
-
d("span",
|
|
106
|
-
|
|
102
|
+
default: p(() => [
|
|
103
|
+
d("span", Q, w(o.labelI18n ? v(O)(o.labelI18n) : o.label), 1),
|
|
104
|
+
n.disabled ? S("", !0) : (s(), h("button", {
|
|
107
105
|
key: 0,
|
|
108
106
|
type: "button",
|
|
109
|
-
onClick: T((
|
|
107
|
+
onClick: T((Y) => D(o.value), ["stop"]),
|
|
110
108
|
class: "hover:bg-destructive/10 hover:text-destructive rounded-full p-0.5 transition-colors"
|
|
111
109
|
}, [
|
|
112
|
-
|
|
110
|
+
V(k, {
|
|
113
111
|
icon: "lucide:x",
|
|
114
112
|
class: "w-3 h-3"
|
|
115
113
|
})
|
|
116
|
-
], 8,
|
|
114
|
+
], 8, W))
|
|
117
115
|
]),
|
|
118
116
|
_: 2
|
|
119
117
|
}, 1024))), 128)),
|
|
120
|
-
|
|
118
|
+
C.value > 0 ? (s(), f(z, {
|
|
121
119
|
key: 0,
|
|
122
120
|
variant: "secondary",
|
|
123
121
|
class: "font-normal text-muted-foreground"
|
|
124
122
|
}, {
|
|
125
|
-
default:
|
|
126
|
-
|
|
123
|
+
default: p(() => [
|
|
124
|
+
R(" +" + w(C.value), 1)
|
|
127
125
|
]),
|
|
128
126
|
_: 1
|
|
129
|
-
})) :
|
|
127
|
+
})) : S("", !0)
|
|
130
128
|
], 64))
|
|
131
129
|
]),
|
|
132
|
-
d("div",
|
|
133
|
-
|
|
130
|
+
d("div", X, [
|
|
131
|
+
m.value.length > 0 && !n.disabled ? (s(), f(k, {
|
|
134
132
|
key: 0,
|
|
135
133
|
icon: "lucide:x",
|
|
136
134
|
class: "w-4 h-4 hover:text-foreground transition-colors",
|
|
137
|
-
onClick: T(
|
|
138
|
-
})) :
|
|
135
|
+
onClick: T(H, ["stop"])
|
|
136
|
+
})) : S("", !0),
|
|
139
137
|
t[4] || (t[4] = d("div", { class: "w-px h-4 bg-border mx-0.5" }, null, -1)),
|
|
140
|
-
|
|
138
|
+
V(k, {
|
|
141
139
|
icon: "lucide:chevron-down",
|
|
142
|
-
class: M(["w-4 h-4 transition-transform duration-200", { "rotate-180":
|
|
140
|
+
class: M(["w-4 h-4 transition-transform duration-200", { "rotate-180": a }])
|
|
143
141
|
}, null, 8, ["class"])
|
|
144
142
|
])
|
|
145
143
|
], 2)
|
|
146
144
|
]),
|
|
147
|
-
default:
|
|
148
|
-
|
|
149
|
-
options:
|
|
150
|
-
cachedOptions:
|
|
151
|
-
selected:
|
|
145
|
+
default: p(() => [
|
|
146
|
+
V(v(q), {
|
|
147
|
+
options: b.value,
|
|
148
|
+
cachedOptions: y.value,
|
|
149
|
+
selected: n.modelValue,
|
|
152
150
|
class: "min-w-[300px]",
|
|
153
|
-
loading:
|
|
154
|
-
hasMore:
|
|
155
|
-
searchable:
|
|
156
|
-
remote:
|
|
157
|
-
debounceTime:
|
|
158
|
-
layout:
|
|
159
|
-
onSelect:
|
|
160
|
-
onClose: t[0] || (t[0] = (
|
|
161
|
-
onLoadMore: t[1] || (t[1] = (
|
|
162
|
-
onSearch: t[2] || (t[2] = (
|
|
151
|
+
loading: n.loading || v(u).isHydrating.value,
|
|
152
|
+
hasMore: n.hasMore,
|
|
153
|
+
searchable: n.searchable,
|
|
154
|
+
remote: n.remote,
|
|
155
|
+
debounceTime: n.debounceTime,
|
|
156
|
+
layout: n.layout,
|
|
157
|
+
onSelect: j,
|
|
158
|
+
onClose: t[0] || (t[0] = (a) => c.value = !1),
|
|
159
|
+
onLoadMore: t[1] || (t[1] = (a) => e.$emit("load-more")),
|
|
160
|
+
onSearch: t[2] || (t[2] = (a) => e.$emit("search", a))
|
|
163
161
|
}, null, 8, ["options", "cachedOptions", "selected", "loading", "hasMore", "searchable", "remote", "debounceTime", "layout"])
|
|
164
162
|
]),
|
|
165
163
|
_: 1
|
|
@@ -167,5 +165,5 @@ const Q = { class: "flex flex-wrap gap-1.5 items-center flex-1 min-w-0 py-0.5" }
|
|
|
167
165
|
}
|
|
168
166
|
});
|
|
169
167
|
export {
|
|
170
|
-
|
|
168
|
+
oe as default
|
|
171
169
|
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { IDropdownOption } from '../../../types';
|
|
2
|
+
interface UseMultiSelectHydrationOptions {
|
|
3
|
+
getValues: () => any[];
|
|
4
|
+
getOptions: () => IDropdownOption[];
|
|
5
|
+
fetchSelected?: (ids: any[]) => Promise<IDropdownOption[]>;
|
|
6
|
+
isInitialLoadDone: () => boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Handles hydration of selected values that are not present in the current options list.
|
|
10
|
+
* Waits until initial options load is complete before checking for missing IDs.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useMultiSelectHydration(opts: UseMultiSelectHydrationOptions): {
|
|
13
|
+
selectedBuffer: import('vue').Ref<Map<any, {
|
|
14
|
+
label: string;
|
|
15
|
+
labelI18n?: string;
|
|
16
|
+
value?: any;
|
|
17
|
+
subtitle?: string;
|
|
18
|
+
subtitleI18n?: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
descriptionI18n?: string;
|
|
21
|
+
icon?: string;
|
|
22
|
+
emoji?: string;
|
|
23
|
+
disabled?: {
|
|
24
|
+
valueOf: () => boolean;
|
|
25
|
+
};
|
|
26
|
+
iconClass?: string;
|
|
27
|
+
iconStyle?: any;
|
|
28
|
+
length?: number;
|
|
29
|
+
values?: any;
|
|
30
|
+
data?: any;
|
|
31
|
+
class?: string;
|
|
32
|
+
triggerClass?: string;
|
|
33
|
+
children?: /*elided*/ any[];
|
|
34
|
+
key?: string;
|
|
35
|
+
position?: any;
|
|
36
|
+
offset?: [number, number];
|
|
37
|
+
showChevron?: boolean;
|
|
38
|
+
confirmation?: boolean | {
|
|
39
|
+
title?: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
confirmText?: string;
|
|
42
|
+
cancelText?: string;
|
|
43
|
+
variant?: "danger" | "primary" | "warning" | "success" | "info";
|
|
44
|
+
};
|
|
45
|
+
onSelect?: (payload: {
|
|
46
|
+
value: any;
|
|
47
|
+
option: IDropdownOption;
|
|
48
|
+
data: IDropdownOption[];
|
|
49
|
+
values?: any;
|
|
50
|
+
}) => void;
|
|
51
|
+
_originalOption?: /*elided*/ any;
|
|
52
|
+
_path?: /*elided*/ any[];
|
|
53
|
+
}> & Omit<Map<any, IDropdownOption>, keyof Map<any, any>>, Map<any, IDropdownOption> | (Map<any, {
|
|
54
|
+
label: string;
|
|
55
|
+
labelI18n?: string;
|
|
56
|
+
value?: any;
|
|
57
|
+
subtitle?: string;
|
|
58
|
+
subtitleI18n?: string;
|
|
59
|
+
description?: string;
|
|
60
|
+
descriptionI18n?: string;
|
|
61
|
+
icon?: string;
|
|
62
|
+
emoji?: string;
|
|
63
|
+
disabled?: {
|
|
64
|
+
valueOf: () => boolean;
|
|
65
|
+
};
|
|
66
|
+
iconClass?: string;
|
|
67
|
+
iconStyle?: any;
|
|
68
|
+
length?: number;
|
|
69
|
+
values?: any;
|
|
70
|
+
data?: any;
|
|
71
|
+
class?: string;
|
|
72
|
+
triggerClass?: string;
|
|
73
|
+
children?: /*elided*/ any[];
|
|
74
|
+
key?: string;
|
|
75
|
+
position?: any;
|
|
76
|
+
offset?: [number, number];
|
|
77
|
+
showChevron?: boolean;
|
|
78
|
+
confirmation?: boolean | {
|
|
79
|
+
title?: string;
|
|
80
|
+
description?: string;
|
|
81
|
+
confirmText?: string;
|
|
82
|
+
cancelText?: string;
|
|
83
|
+
variant?: "danger" | "primary" | "warning" | "success" | "info";
|
|
84
|
+
};
|
|
85
|
+
onSelect?: (payload: {
|
|
86
|
+
value: any;
|
|
87
|
+
option: IDropdownOption;
|
|
88
|
+
data: IDropdownOption[];
|
|
89
|
+
values?: any;
|
|
90
|
+
}) => void;
|
|
91
|
+
_originalOption?: /*elided*/ any;
|
|
92
|
+
_path?: /*elided*/ any[];
|
|
93
|
+
}> & Omit<Map<any, IDropdownOption>, keyof Map<any, any>>)>;
|
|
94
|
+
isHydrating: import('vue').Ref<boolean, boolean>;
|
|
95
|
+
hydrateSelected: (values: any[]) => Promise<void>;
|
|
96
|
+
};
|
|
97
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ref as s } from "vue";
|
|
2
|
+
function h(n) {
|
|
3
|
+
const r = s(/* @__PURE__ */ new Map()), l = s(!1);
|
|
4
|
+
return {
|
|
5
|
+
selectedBuffer: r,
|
|
6
|
+
isHydrating: l,
|
|
7
|
+
hydrateSelected: async (c) => {
|
|
8
|
+
if (!n.fetchSelected || !c?.length || !n.isInitialLoadDone()) return;
|
|
9
|
+
const f = n.getOptions(), a = c.filter((e) => {
|
|
10
|
+
const t = r.value.has(e), o = f.some((i) => (i.value ?? i.label) === e);
|
|
11
|
+
return !t && !o;
|
|
12
|
+
});
|
|
13
|
+
if (a.length) {
|
|
14
|
+
l.value = !0;
|
|
15
|
+
try {
|
|
16
|
+
(await n.fetchSelected(a)).forEach((t) => {
|
|
17
|
+
r.value.set(t.value ?? t.label, t);
|
|
18
|
+
});
|
|
19
|
+
} catch (e) {
|
|
20
|
+
console.error("[MultiSelect] Hydration failed:", e);
|
|
21
|
+
} finally {
|
|
22
|
+
l.value = !1;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
h as useMultiSelectHydration
|
|
30
|
+
};
|
package/index.js
CHANGED
|
@@ -2,14 +2,14 @@ import { default as f } from "vue3-google-signin";
|
|
|
2
2
|
import { deepMerge as l } from "./utils/object.js";
|
|
3
3
|
import { camelCase as p, capitalize as d, copyToClipboard as u, debounce as x, delay as i, downloadFile as n, flattenArray as c, formatCurrency as T, getUniqueId as S, isAppleDevice as b, isEmpty as g, randomNumber as P, removeExtraProperties as C, slugify as I, throttle as D, truncate as v } from "./utils/functions.js";
|
|
4
4
|
import { lazySearch as h, resetSearchIndex as A, search as B } from "./utils/search.util.js";
|
|
5
|
-
import { env as
|
|
6
|
-
import { $t as
|
|
5
|
+
import { env as y } from "./utils/env.js";
|
|
6
|
+
import { $t as k } from "./utils/i18n.js";
|
|
7
7
|
import { default as E } from "./components/Chip/Chip.vue.js";
|
|
8
8
|
import { default as R } from "./components/Form/Form.vue.js";
|
|
9
9
|
import { default as O } from "./components/Form/FormField.vue.js";
|
|
10
10
|
import { default as G } from "./components/Form/FormFields.vue.js";
|
|
11
11
|
import { default as _ } from "./components/Form/CustomFields.vue.js";
|
|
12
|
-
import { useForm as
|
|
12
|
+
import { useForm as V } from "./components/Form/composables/useForm.js";
|
|
13
13
|
import { useFileUpload as j } from "./components/Form/composables/useFileUpload.js";
|
|
14
14
|
import { default as Q } from "./components/Tabes/Tabes.vue.js";
|
|
15
15
|
import { default as X } from "./components/Stats/Stats.vue.js";
|
|
@@ -30,14 +30,14 @@ import { MASONRY_BREAKPOINTS as Ie } from "./components/Masonry/types.js";
|
|
|
30
30
|
import { default as ve } from "./components/Spinner/Spinner.vue.js";
|
|
31
31
|
import { default as he } from "./components/Barcode/Barcode.vue.js";
|
|
32
32
|
import { barcodesConstants as Be } from "./components/Barcode/types.js";
|
|
33
|
-
import { default as
|
|
34
|
-
import { default as
|
|
33
|
+
import { default as ye } from "./components/Carousel/Carousel.vue.js";
|
|
34
|
+
import { default as ke } from "./components/Dropdown/Dropdown.vue.js";
|
|
35
35
|
import { default as Ee } from "./components/Dropdown/DropdownMenu.vue.js";
|
|
36
36
|
import { default as Re } from "./components/Dropdown/DropdownTrigger.vue.js";
|
|
37
37
|
import { default as Oe } from "./components/Dropdown/DropdownItem.vue.js";
|
|
38
38
|
import { useDropdownSelection as Ge } from "./components/Dropdown/composables/useDropdownSelection.js";
|
|
39
39
|
import { useDropdownIds as _e } from "./components/Dropdown/composables/useDropdownIds.js";
|
|
40
|
-
import { default as
|
|
40
|
+
import { default as Ve } from "./components/Breadcrumb/Breadcrumb.vue.js";
|
|
41
41
|
import { default as je } from "./components/Breadcrumb/BreadcrumbItem.vue.js";
|
|
42
42
|
import { default as Qe } from "./components/FileTree/FileTree.vue.js";
|
|
43
43
|
import { default as Xe } from "./components/FileTree/FileTreeNode.vue.js";
|
|
@@ -55,98 +55,99 @@ import { default as Do } from "./components/Accordion/AccordionItem.vue.js";
|
|
|
55
55
|
import { default as No } from "./components/Accordion/AccordionTrigger.vue.js";
|
|
56
56
|
import { default as Ao } from "./components/Accordion/AccordionContent.vue.js";
|
|
57
57
|
import { default as Fo } from "./components/ChoiceBox/ChoiceBox.vue.js";
|
|
58
|
-
import { default as
|
|
59
|
-
import { default as
|
|
58
|
+
import { default as Mo } from "./components/DataTable/DataTable.vue.js";
|
|
59
|
+
import { default as wo } from "./components/DataTable/DataTableHeader.vue.js";
|
|
60
60
|
import { default as Lo } from "./components/DataTable/DataTableRow.vue.js";
|
|
61
61
|
import { SCREEN_CONTEXT_KEY as Ko } from "./components/DataTable/types.js";
|
|
62
62
|
import { initializeTheme as zo, useTheme as Go } from "./composables/useTheme.js";
|
|
63
63
|
import { default as _o } from "./components/FilePicker/FilePicker.vue.js";
|
|
64
|
-
import { default as
|
|
64
|
+
import { default as Vo } from "./components/Pagination/Pagination.vue.js";
|
|
65
65
|
import { default as jo } from "./components/ExportData/ExportData.vue.js";
|
|
66
66
|
import { default as Qo } from "./components/ImportData/ImportData.vue.js";
|
|
67
67
|
import { default as Xo } from "./components/MultiSelect/MultiSelect.vue.js";
|
|
68
|
-
import {
|
|
69
|
-
import { default as er } from "./components/PricingPlan/
|
|
70
|
-
import { default as rr } from "./components/
|
|
71
|
-
import { default as ar } from "./components/SidebarMenu/
|
|
68
|
+
import { useMultiSelectHydration as Jo } from "./components/MultiSelect/composables/useMultiSelectHydration.js";
|
|
69
|
+
import { default as er } from "./components/PricingPlan/PricingPlan.vue.js";
|
|
70
|
+
import { default as rr } from "./components/PricingPlan/PricingPlanItem.vue.js";
|
|
71
|
+
import { default as ar } from "./components/SidebarMenu/SidebarMenu.vue.js";
|
|
72
|
+
import { default as mr } from "./components/SidebarMenu/SidebarMenuItem.vue.js";
|
|
72
73
|
/* empty css */
|
|
73
|
-
import { default as
|
|
74
|
-
import { default as
|
|
75
|
-
import { default as
|
|
76
|
-
import { useAdvancedKeyStroke as
|
|
77
|
-
import { vScrollReveal as
|
|
78
|
-
import { default as
|
|
79
|
-
import { configure as
|
|
80
|
-
import { default as
|
|
81
|
-
import { default as
|
|
74
|
+
import { default as sr } from "./components/ProgressBar/ProgressBar.vue.js";
|
|
75
|
+
import { default as dr } from "./components/PermissionMatrix/PermissionMatrix.vue.js";
|
|
76
|
+
import { default as xr } from "./components/PermissionMatrix/PermissionEditor.vue.js";
|
|
77
|
+
import { useAdvancedKeyStroke as nr, useKeyStroke as cr } from "./composables/useKeyStroke.js";
|
|
78
|
+
import { vScrollReveal as Sr } from "./directives/vScrollReveal.js";
|
|
79
|
+
import { default as gr } from "./components/AvatarUploader/AvatarUploader.vue.js";
|
|
80
|
+
import { configure as Cr, pauseTimers as Ir, removeToast as Dr, resumeTimers as vr, showToast as Nr, toast as hr, useNotifications as Ar } from "./composables/useNotifications.js";
|
|
81
|
+
import { default as Fr } from "./components/Timeline/Timeline.vue.js";
|
|
82
|
+
import { default as Mr } from "./components/Timeline/TimelineItem.vue.js";
|
|
82
83
|
import { default as wr } from "./components/Timeline/TimelineIndicator.vue.js";
|
|
83
|
-
import { default as
|
|
84
|
-
import { default as
|
|
85
|
-
import { default as
|
|
86
|
-
import { default as
|
|
87
|
-
import { default as
|
|
84
|
+
import { default as Lr } from "./components/Icon.vue.js";
|
|
85
|
+
import { default as Kr } from "./components/Logo.vue.js";
|
|
86
|
+
import { default as zr } from "./components/Alert.vue.js";
|
|
87
|
+
import { default as Ur } from "./components/Badge.vue.js";
|
|
88
|
+
import { default as Hr } from "./components/Input.vue.js";
|
|
88
89
|
/* empty css */
|
|
89
|
-
import { default as
|
|
90
|
-
import { default as
|
|
91
|
-
import { default as
|
|
92
|
-
import { default as
|
|
93
|
-
import { default as
|
|
94
|
-
import { default as
|
|
95
|
-
import { default as
|
|
96
|
-
import { default as
|
|
97
|
-
import { default as
|
|
98
|
-
import { default as
|
|
99
|
-
import { default as
|
|
100
|
-
import { default as
|
|
101
|
-
import { default as
|
|
102
|
-
import { default as
|
|
103
|
-
import { default as
|
|
104
|
-
import { default as
|
|
105
|
-
import { default as
|
|
106
|
-
import { default as
|
|
107
|
-
import { default as
|
|
108
|
-
import { default as
|
|
109
|
-
import { default as
|
|
90
|
+
import { default as Yr } from "./components/Label.vue.js";
|
|
91
|
+
import { default as qr } from "./components/Modal.vue.js";
|
|
92
|
+
import { default as Wr } from "./components/Avatar.vue.js";
|
|
93
|
+
import { default as $r } from "./components/Button.vue.js";
|
|
94
|
+
import { default as Zr } from "./components/BackButton.vue.js";
|
|
95
|
+
import { default as ot } from "./components/Slider.vue.js";
|
|
96
|
+
import { default as tt } from "./components/Switch.vue.js";
|
|
97
|
+
import { default as ft } from "./components/Tooltip.vue.js";
|
|
98
|
+
import { default as lt } from "./components/CheckBox.vue.js";
|
|
99
|
+
import { default as pt } from "./components/Textarea.vue.js";
|
|
100
|
+
import { default as ut } from "./components/SidePanel.vue.js";
|
|
101
|
+
import { default as it } from "./components/DatePicker.vue.js";
|
|
102
|
+
import { default as ct } from "./components/IconPicker.vue.js";
|
|
103
|
+
import { default as St } from "./components/ButtonGroup.vue.js";
|
|
104
|
+
import { default as gt } from "./components/NumberInput.vue.js";
|
|
105
|
+
import { default as Ct } from "./components/ThemeToggle.vue.js";
|
|
106
|
+
import { default as Dt } from "./components/GoogleLogin.vue.js";
|
|
107
|
+
import { default as Nt } from "./components/ColorPicker/ColorPicker.vue.js";
|
|
108
|
+
import { default as At } from "./components/ConfirmationModal.vue.js";
|
|
109
|
+
import { default as Ft } from "./components/ToastNotification.vue.js";
|
|
110
|
+
import { default as Mt } from "./components/CommandPaletteContent.vue.js";
|
|
110
111
|
import { default as wt } from "./components/NavbarCommandPalette.vue.js";
|
|
111
|
-
import { default as
|
|
112
|
-
import { createVLite as
|
|
113
|
-
import { default as
|
|
114
|
-
import { STATUS_MAP as
|
|
115
|
-
import { default as
|
|
116
|
-
import { default as
|
|
117
|
-
import { useVLiteConfig as
|
|
112
|
+
import { default as Lt } from "./components/DateRangePicker.vue.js";
|
|
113
|
+
import { createVLite as Kt } from "./core/index.js";
|
|
114
|
+
import { default as zt } from "./components/StatusChip/StatusChip.vue.js";
|
|
115
|
+
import { STATUS_MAP as Ut, normalizeStatus as _t, resolveStatus as Ht } from "./components/StatusChip/status-map.js";
|
|
116
|
+
import { default as Yt } from "./components/Price/Price.vue.js";
|
|
117
|
+
import { default as qt } from "./components/Date/Date.vue.js";
|
|
118
|
+
import { useVLiteConfig as Wt } from "./core/config.js";
|
|
118
119
|
export {
|
|
119
|
-
|
|
120
|
+
k as $t,
|
|
120
121
|
Co as Accordion,
|
|
121
122
|
Ao as AccordionContent,
|
|
122
123
|
Do as AccordionItem,
|
|
123
124
|
No as AccordionTrigger,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
zr as Alert,
|
|
126
|
+
Wr as Avatar,
|
|
127
|
+
gr as AvatarUploader,
|
|
128
|
+
Zr as BackButton,
|
|
129
|
+
Ur as Badge,
|
|
129
130
|
he as Barcode,
|
|
130
|
-
|
|
131
|
+
Ve as Breadcrumb,
|
|
131
132
|
je as BreadcrumbItem,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
$r as Button,
|
|
134
|
+
St as ButtonGroup,
|
|
135
|
+
ye as Carousel,
|
|
136
|
+
lt as CheckBox,
|
|
136
137
|
E as Chip,
|
|
137
138
|
Fo as ChoiceBox,
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
Nt as ColorPicker,
|
|
140
|
+
Mt as CommandPaletteContent,
|
|
141
|
+
At as ConfirmationModal,
|
|
141
142
|
_ as CustomFields,
|
|
142
143
|
mo as DataList,
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
Mo as DataTable,
|
|
145
|
+
wo as DataTableHeader,
|
|
145
146
|
Lo as DataTableRow,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
qt as Date,
|
|
148
|
+
it as DatePicker,
|
|
149
|
+
Lt as DateRangePicker,
|
|
150
|
+
ke as Dropdown,
|
|
150
151
|
Oe as DropdownItem,
|
|
151
152
|
Ee as DropdownMenu,
|
|
152
153
|
Re as DropdownTrigger,
|
|
@@ -158,71 +159,71 @@ export {
|
|
|
158
159
|
R as Form,
|
|
159
160
|
O as FormField,
|
|
160
161
|
G as FormFields,
|
|
161
|
-
|
|
162
|
+
Dt as GoogleLogin,
|
|
162
163
|
f as GoogleSignInPlugin,
|
|
163
164
|
be as Heatmap,
|
|
164
|
-
|
|
165
|
-
|
|
165
|
+
Lr as Icon,
|
|
166
|
+
ct as IconPicker,
|
|
166
167
|
Qo as ImportData,
|
|
167
|
-
|
|
168
|
+
Hr as Input,
|
|
168
169
|
J as Kanban,
|
|
169
170
|
ee as KanbanBoard,
|
|
170
|
-
|
|
171
|
+
Yr as Label,
|
|
171
172
|
so as List,
|
|
172
173
|
uo as ListFieldRow,
|
|
173
|
-
|
|
174
|
+
Kr as Logo,
|
|
174
175
|
Ie as MASONRY_BREAKPOINTS,
|
|
175
176
|
Pe as Masonry,
|
|
176
|
-
|
|
177
|
+
qr as Modal,
|
|
177
178
|
Xo as MultiSelect,
|
|
178
179
|
ae as Navbar,
|
|
179
180
|
wt as NavbarCommandPalette,
|
|
180
181
|
se as NavbarGroup,
|
|
181
182
|
me as NavbarItem,
|
|
182
183
|
de as NavbarTabs,
|
|
183
|
-
|
|
184
|
+
gt as NumberInput,
|
|
184
185
|
eo as OTPInput,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
186
|
+
Vo as Pagination,
|
|
187
|
+
xr as PermissionEditor,
|
|
188
|
+
dr as PermissionMatrix,
|
|
189
|
+
Yt as Price,
|
|
190
|
+
er as PricingPlan,
|
|
191
|
+
rr as PricingPlanItem,
|
|
192
|
+
sr as ProgressBar,
|
|
192
193
|
xe as QRCode,
|
|
193
194
|
Ko as SCREEN_CONTEXT_KEY,
|
|
194
|
-
|
|
195
|
+
Ut as STATUS_MAP,
|
|
195
196
|
ne as Screen,
|
|
196
197
|
Te as ScreenFilter,
|
|
197
198
|
ao as Sheet,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
199
|
+
ut as SidePanel,
|
|
200
|
+
ar as SidebarMenu,
|
|
201
|
+
mr as SidebarMenuItem,
|
|
202
|
+
ot as Slider,
|
|
202
203
|
ve as Spinner,
|
|
203
204
|
X as Stats,
|
|
204
|
-
|
|
205
|
-
|
|
205
|
+
zt as StatusChip,
|
|
206
|
+
tt as Switch,
|
|
206
207
|
Q as Tabes,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
pt as Textarea,
|
|
209
|
+
Ct as ThemeToggle,
|
|
210
|
+
Fr as Timeline,
|
|
210
211
|
wr as TimelineIndicator,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
Mr as TimelineItem,
|
|
213
|
+
Ft as ToastNotification,
|
|
214
|
+
ft as Tooltip,
|
|
214
215
|
ro as Workbook,
|
|
215
216
|
Be as barcodesConstants,
|
|
216
217
|
p as camelCase,
|
|
217
218
|
d as capitalize,
|
|
218
|
-
|
|
219
|
+
Cr as configure,
|
|
219
220
|
u as copyToClipboard,
|
|
220
|
-
|
|
221
|
+
Kt as createVLite,
|
|
221
222
|
x as debounce,
|
|
222
223
|
l as deepMerge,
|
|
223
224
|
i as delay,
|
|
224
225
|
n as downloadFile,
|
|
225
|
-
|
|
226
|
+
y as env,
|
|
226
227
|
c as flattenArray,
|
|
227
228
|
T as formatCurrency,
|
|
228
229
|
io as formatDate,
|
|
@@ -235,30 +236,31 @@ export {
|
|
|
235
236
|
b as isAppleDevice,
|
|
236
237
|
g as isEmpty,
|
|
237
238
|
h as lazySearch,
|
|
238
|
-
|
|
239
|
-
|
|
239
|
+
_t as normalizeStatus,
|
|
240
|
+
Ir as pauseTimers,
|
|
240
241
|
P as randomNumber,
|
|
241
242
|
C as removeExtraProperties,
|
|
242
|
-
|
|
243
|
+
Dr as removeToast,
|
|
243
244
|
A as resetSearchIndex,
|
|
244
|
-
|
|
245
|
-
|
|
245
|
+
Ht as resolveStatus,
|
|
246
|
+
vr as resumeTimers,
|
|
246
247
|
B as search,
|
|
247
|
-
|
|
248
|
+
Nr as showToast,
|
|
248
249
|
I as slugify,
|
|
249
250
|
D as throttle,
|
|
250
|
-
|
|
251
|
+
hr as toast,
|
|
251
252
|
v as truncate,
|
|
252
|
-
|
|
253
|
+
nr as useAdvancedKeyStroke,
|
|
253
254
|
_e as useDropdownIds,
|
|
254
255
|
Ge as useDropdownSelection,
|
|
255
256
|
j as useFileUpload,
|
|
256
|
-
|
|
257
|
+
V as useForm,
|
|
257
258
|
re as useKanbanBoard,
|
|
258
|
-
|
|
259
|
-
|
|
259
|
+
cr as useKeyStroke,
|
|
260
|
+
Jo as useMultiSelectHydration,
|
|
261
|
+
Ar as useNotifications,
|
|
260
262
|
Go as useTheme,
|
|
261
263
|
Je as useTreeSelection,
|
|
262
|
-
|
|
263
|
-
|
|
264
|
+
Wt as useVLiteConfig,
|
|
265
|
+
Sr as vScrollReveal
|
|
264
266
|
};
|