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.
@@ -1,12 +1,13 @@
1
- import { defineComponent as J, ref as s, computed as y, watch as $, provide as K, reactive as Q, toRefs as W, openBlock as A, createElementBlock as X, normalizeStyle as Y, createVNode as T, unref as O, withCtx as u, renderSlot as d, createBlock as Z, normalizeClass as _, createSlots as ee, normalizeProps as M, guardReactiveProps as H, createCommentVNode as te } from "vue";
2
- import le from "v-tooltip-lite";
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 oe from "./DropdownTrigger.vue.js";
6
- import ae from "../ConfirmationModal.vue.js";
7
- import { useDropdownIds as ie } from "./composables/useDropdownIds.js";
8
- import { useDropdownSelection as se } from "./composables/useDropdownSelection.js";
9
- const pe = /* @__PURE__ */ J({
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(n, { emit: V }) {
49
- const o = n, p = V, g = s(!1), f = s(null), r = s({
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
- }), E = y(() => o.position ? o.position : o.direction === "rtl" ? "bottom-end" : "bottom-start"), L = y(() => o.nestedPosition ? o.nestedPosition : o.direction === "rtl" ? "left-start" : "right-start"), S = s(o.isOpen || !1), b = s(0);
56
- $(
57
- () => o.isOpen,
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 && (S.value = e);
60
+ e !== void 0 && (O.value = e);
60
61
  }
61
62
  );
62
- const B = (e) => {
63
- S.value = e, p("update:isOpen", e), p(e ? "onOpen" : "onClose");
64
- }, C = () => {
65
- B(!1);
63
+ const P = (e) => {
64
+ O.value = e, p("update:isOpen", e), p(e ? "onOpen" : "onClose");
65
+ }, g = () => {
66
+ P(!1);
66
67
  };
67
- K("dropdown-context", {
68
- close: C,
68
+ Q("dropdown-context", {
69
+ close: g,
69
70
  onChildToggle: (e) => {
70
- e ? b.value++ : b.value = Math.max(0, b.value - 1);
71
+ e ? y.value++ : y.value = Math.max(0, y.value - 1);
71
72
  }
72
73
  });
73
- const w = y(() => o.options ? o.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), m = s([]);
74
- $(
75
- w,
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 (o.remote) {
79
- const l = [...m.value];
78
+ if (e) {
79
+ if (n.remote) {
80
+ const o = [...C.value];
80
81
  e.forEach((t) => {
81
- l.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) || l.push(t);
82
- }), m.value = l;
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
- m.value = e;
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 v = s(/* @__PURE__ */ new Map()), k = s(!1), j = async (e) => {
90
- if (!o.fetchSelected || e === void 0 || e === null) return;
91
- let l = [];
92
- Array.isArray(e) ? l = e : typeof e == "object" ? l = Object.values(e) : l = [e];
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
- }), { getAllRecursiveIds: z } = ie(), D = Q({
115
- ...W(o),
116
- options: h
117
- }), { currentValue: P, selectedLabel: I, selectOption: R } = se(
118
- D,
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
- ), F = y(() => {
121
- const e = o.ignoreClickOutside || [], l = z(h.value);
122
- return [.../* @__PURE__ */ new Set([...e, ...l])];
109
+ ), q = m(() => {
110
+ const e = n.ignoreClickOutside || [], o = E(u.value);
111
+ return [.../* @__PURE__ */ new Set([...e, ...o])];
123
112
  });
124
- $(
125
- () => P.value,
113
+ T(
114
+ () => $.value,
126
115
  (e) => {
127
- j(e);
116
+ S.value && N(e);
128
117
  },
129
- { immediate: !0, deep: !0 }
118
+ { deep: !0 }
130
119
  );
131
- const U = (e) => {
132
- o.doubleConfirmation || !!e.confirmation ? (f.value = e, typeof e.confirmation == "object" ? r.value = {
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
- } : r.value = {
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
- }, g.value = !0, C()) : (N(e), o.closeOnSelect && C());
145
- }, N = (e) => {
146
- const l = e.value ?? e.label;
147
- v.value.has(l) || v.value.set(l, e);
148
- const t = R(e);
149
- if (!o.isNested) {
150
- const i = e._originalOption || e, a = i.value ?? i.label;
151
- (e._path || [i]).forEach((c) => {
152
- typeof c.onSelect == "function" && c.onSelect({
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: c,
155
- data: h.value || [],
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, g.value = !1;
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, l) => (A(), X("div", {
154
+ return (e, o) => (H(), Y("div", {
166
155
  class: "relative inline-block text-left",
167
- style: Y({ direction: n.direction })
156
+ style: Z({ direction: l.direction })
168
157
  }, [
169
- T(O(le), {
158
+ B(v(oe), {
170
159
  content: "",
171
160
  trigger: "click",
172
161
  arrow: !1,
173
- teleport: n.teleport,
174
- offset: n.offset,
175
- placement: E.value,
176
- isOpen: S.value,
177
- keepAlive: b.value > 0,
178
- menuId: n.menuId,
179
- ignoreClickOutside: F.value,
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 " + (n.className || ""),
182
- onOnShow: l[2] || (l[2] = (t) => e.$emit("onOpen")),
183
- onOnHide: l[3] || (l[3] = (t) => e.$emit("onClose")),
184
- "onUpdate:isOpen": B,
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: u(({ isOpen: t }) => [
189
- d(e.$slots, "trigger", M(H({ selectedLabel: O(I), isOpen: t })), () => [
190
- T(oe, {
191
- "selected-label": O(I),
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: n.direction,
194
- triggerProps: n.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: u(() => [
188
+ default: c(() => [
200
189
  d(e.$slots, "default"),
201
- w.value.length || h.value.length || e.$slots.menu || e.$slots.item || n.remote || n.searchable ? (A(), Z(ne, {
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: w.value,
204
- cachedOptions: h.value,
205
- class: _(n.className),
206
- selected: O(P),
207
- selectedIndex: n.selectedIndex,
208
- maxHeight: n.maxHeight,
209
- nestedPosition: L.value,
210
- nestedOffset: n.nestedOffset,
211
- selectable: n.selectable,
212
- direction: n.direction,
213
- layout: n.layout,
214
- columns: n.columns,
215
- loading: n.loading || k.value,
216
- hasMore: n.hasMore,
217
- searchable: n.searchable,
218
- remote: n.remote,
219
- debounceTime: n.debounceTime,
220
- onSelect: U,
221
- onClose: C,
222
- onLoadMore: l[0] || (l[0] = (t) => e.$emit("load-more")),
223
- onSearch: l[1] || (l[1] = (t) => e.$emit("search", t))
224
- }, ee({ _: 2 }, [
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: u(() => [
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: u((t) => [
235
- d(e.$slots, "item", M(H(t)))
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: u(() => [
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: u(() => [
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"])) : te("", !0)
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
- T(ae, {
258
- show: g.value,
259
- title: r.value.title,
260
- description: r.value.description,
261
- "confirm-text": r.value.confirmText,
262
- "cancel-text": r.value.cancelText,
263
- variant: r.value.variant,
264
- onConfirm: q,
265
- onCancel: G
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
- pe as default
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 P, ref as g, computed as r, watch as U, openBlock as s, createBlock as m, unref as y, withCtx as v, createVNode as x, createElementVNode as d, normalizeClass as M, createElementBlock as h, toDisplayString as w, Fragment as I, renderList as q, withModifiers as T, createCommentVNode as V, createTextVNode as G } from "vue";
2
- import S from "../Icon.vue.js";
3
- import J from "../Dropdown/Dropdown.vue.js";
4
- import K from "../Dropdown/DropdownMenu.vue.js";
5
- import { $t as k } from "../../utils/i18n.js";
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
- const Q = { class: "flex flex-wrap gap-1.5 items-center flex-1 min-w-0 py-0.5" }, R = {
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
- }, W = { class: "truncate" }, X = ["onClick"], Y = { class: "flex items-center gap-2 pl-2 shrink-0 text-muted-foreground" }, ne = /* @__PURE__ */ P({
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(o, { emit: E }) {
31
- const a = o, i = E, c = g(!1), N = r(() => {
32
- if (a.placeholderI18n) return k(a.placeholderI18n);
33
- if (a.placeholder) return a.placeholder;
34
- const e = k("vlite.multiSelect.placeholder");
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
- }), p = r(() => a.options ? a.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), u = g(/* @__PURE__ */ new Map()), b = g(!1), j = async (e) => {
37
- if (!a.fetchSelected || !e?.length) return;
38
- const t = e.filter((l) => {
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
- j(e || []);
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, deep: !0 }
45
+ { immediate: !0 }
61
46
  );
62
- const O = r(() => {
63
- const e = [...p.value], t = new Set(e.map((l) => l.value ?? l.label));
64
- return u.value.forEach((l, n) => {
65
- t.has(n) || (e.unshift(l), t.add(n));
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
- }), f = r(() => O.value.filter((e) => {
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 a.modelValue.includes(t);
70
- })), H = r(() => f.value.slice(0, a.maxVisible)), B = r(() => f.value.length - a.maxVisible), L = (e) => {
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 l = [...a.modelValue], n = l.indexOf(t);
74
- n === -1 ? l.push(t) : l.splice(n, 1), i("update:modelValue", l), i("change", l);
75
- }, A = (e) => {
76
- const t = a.modelValue.filter((l) => l !== e);
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
- }, D = () => {
76
+ }, H = () => {
79
77
  i("update:modelValue", []), i("change", []);
80
- }, F = r(() => [
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
- a.disabled ? "opacity-50 cursor-not-allowed bg-muted" : a.variant === "floating" ? "bg-transparent text-foreground" : "bg-background hover:bg-gray-50/70",
83
- a.variant === "outline" || a.variant === "floating" ? "border-input" : "border-transparent bg-muted",
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(() => a.size === "sm" ? "xs" : "sm"), (e, t) => (s(), m(y(J), {
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] = (l) => c.value = l),
86
+ "onUpdate:isOpen": t[3] || (t[3] = (a) => c.value = a),
89
87
  "close-on-select": !1,
90
88
  selectable: !0,
91
- disabled: o.disabled
89
+ disabled: n.disabled
92
90
  }, {
93
- trigger: v(({ isOpen: l }) => [
91
+ trigger: p(({ isOpen: a }) => [
94
92
  d("div", {
95
- class: M(F.value)
93
+ class: M(A.value)
96
94
  }, [
97
- d("div", Q, [
98
- f.value.length === 0 ? (s(), h("span", R, w(N.value), 1)) : (s(), h(I, { key: 1 }, [
99
- (s(!0), h(I, null, q(H.value, (n) => (s(), m(z, {
100
- key: n.value,
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: v(() => [
105
- d("span", W, w(n.labelI18n ? y(k)(n.labelI18n) : n.label), 1),
106
- o.disabled ? V("", !0) : (s(), h("button", {
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((C) => A(n.value), ["stop"]),
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
- x(S, {
110
+ V(k, {
113
111
  icon: "lucide:x",
114
112
  class: "w-3 h-3"
115
113
  })
116
- ], 8, X))
114
+ ], 8, W))
117
115
  ]),
118
116
  _: 2
119
117
  }, 1024))), 128)),
120
- B.value > 0 ? (s(), m(z, {
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: v(() => [
126
- G(" +" + w(B.value), 1)
123
+ default: p(() => [
124
+ R(" +" + w(C.value), 1)
127
125
  ]),
128
126
  _: 1
129
- })) : V("", !0)
127
+ })) : S("", !0)
130
128
  ], 64))
131
129
  ]),
132
- d("div", Y, [
133
- f.value.length > 0 && !o.disabled ? (s(), m(S, {
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(D, ["stop"])
138
- })) : V("", !0),
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
- x(S, {
138
+ V(k, {
141
139
  icon: "lucide:chevron-down",
142
- class: M(["w-4 h-4 transition-transform duration-200", { "rotate-180": l }])
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: v(() => [
148
- x(y(K), {
149
- options: p.value,
150
- cachedOptions: O.value,
151
- selected: o.modelValue,
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: o.loading || b.value,
154
- hasMore: o.hasMore,
155
- searchable: o.searchable,
156
- remote: o.remote,
157
- debounceTime: o.debounceTime,
158
- layout: o.layout,
159
- onSelect: L,
160
- onClose: t[0] || (t[0] = (l) => c.value = !1),
161
- onLoadMore: t[1] || (t[1] = (l) => e.$emit("load-more")),
162
- onSearch: t[2] || (t[2] = (l) => e.$emit("search", l))
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
- ne as default
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
+ };
@@ -1 +1,2 @@
1
1
  export { default as MultiSelect } from './MultiSelect.vue';
2
+ export * from './composables/useMultiSelectHydration';
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 k } from "./utils/env.js";
6
- import { $t as y } from "./utils/i18n.js";
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 H } from "./components/Form/composables/useForm.js";
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 ke } from "./components/Carousel/Carousel.vue.js";
34
- import { default as ye } from "./components/Dropdown/Dropdown.vue.js";
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 He } from "./components/Breadcrumb/Breadcrumb.vue.js";
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 wo } from "./components/DataTable/DataTable.vue.js";
59
- import { default as Mo } from "./components/DataTable/DataTableHeader.vue.js";
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 Ho } from "./components/Pagination/Pagination.vue.js";
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 { default as Jo } from "./components/PricingPlan/PricingPlan.vue.js";
69
- import { default as er } from "./components/PricingPlan/PricingPlanItem.vue.js";
70
- import { default as rr } from "./components/SidebarMenu/SidebarMenu.vue.js";
71
- import { default as ar } from "./components/SidebarMenu/SidebarMenuItem.vue.js";
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 mr } from "./components/ProgressBar/ProgressBar.vue.js";
74
- import { default as sr } from "./components/PermissionMatrix/PermissionMatrix.vue.js";
75
- import { default as dr } from "./components/PermissionMatrix/PermissionEditor.vue.js";
76
- import { useAdvancedKeyStroke as xr, useKeyStroke as ir } from "./composables/useKeyStroke.js";
77
- import { vScrollReveal as cr } from "./directives/vScrollReveal.js";
78
- import { default as Sr } from "./components/AvatarUploader/AvatarUploader.vue.js";
79
- import { configure as gr, pauseTimers as Pr, removeToast as Cr, resumeTimers as Ir, showToast as Dr, toast as vr, useNotifications as Nr } from "./composables/useNotifications.js";
80
- import { default as Ar } from "./components/Timeline/Timeline.vue.js";
81
- import { default as Fr } from "./components/Timeline/TimelineItem.vue.js";
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 Mr } from "./components/Icon.vue.js";
84
- import { default as Lr } from "./components/Logo.vue.js";
85
- import { default as Kr } from "./components/Alert.vue.js";
86
- import { default as zr } from "./components/Badge.vue.js";
87
- import { default as Ur } from "./components/Input.vue.js";
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 Vr } from "./components/Label.vue.js";
90
- import { default as Yr } from "./components/Modal.vue.js";
91
- import { default as qr } from "./components/Avatar.vue.js";
92
- import { default as Wr } from "./components/Button.vue.js";
93
- import { default as $r } from "./components/BackButton.vue.js";
94
- import { default as Zr } from "./components/Slider.vue.js";
95
- import { default as ot } from "./components/Switch.vue.js";
96
- import { default as tt } from "./components/Tooltip.vue.js";
97
- import { default as ft } from "./components/CheckBox.vue.js";
98
- import { default as lt } from "./components/Textarea.vue.js";
99
- import { default as pt } from "./components/SidePanel.vue.js";
100
- import { default as ut } from "./components/DatePicker.vue.js";
101
- import { default as it } from "./components/IconPicker.vue.js";
102
- import { default as ct } from "./components/ButtonGroup.vue.js";
103
- import { default as St } from "./components/NumberInput.vue.js";
104
- import { default as gt } from "./components/ThemeToggle.vue.js";
105
- import { default as Ct } from "./components/GoogleLogin.vue.js";
106
- import { default as Dt } from "./components/ColorPicker/ColorPicker.vue.js";
107
- import { default as Nt } from "./components/ConfirmationModal.vue.js";
108
- import { default as At } from "./components/ToastNotification.vue.js";
109
- import { default as Ft } from "./components/CommandPaletteContent.vue.js";
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 Mt } from "./components/DateRangePicker.vue.js";
112
- import { createVLite as Lt } from "./core/index.js";
113
- import { default as Kt } from "./components/StatusChip/StatusChip.vue.js";
114
- import { STATUS_MAP as zt, normalizeStatus as Gt, resolveStatus as Ut } from "./components/StatusChip/status-map.js";
115
- import { default as Vt } from "./components/Price/Price.vue.js";
116
- import { default as Yt } from "./components/Date/Date.vue.js";
117
- import { useVLiteConfig as qt } from "./core/config.js";
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
- y as $t,
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
- Kr as Alert,
125
- qr as Avatar,
126
- Sr as AvatarUploader,
127
- $r as BackButton,
128
- zr as Badge,
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
- He as Breadcrumb,
131
+ Ve as Breadcrumb,
131
132
  je as BreadcrumbItem,
132
- Wr as Button,
133
- ct as ButtonGroup,
134
- ke as Carousel,
135
- ft as CheckBox,
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
- Dt as ColorPicker,
139
- Ft as CommandPaletteContent,
140
- Nt as ConfirmationModal,
139
+ Nt as ColorPicker,
140
+ Mt as CommandPaletteContent,
141
+ At as ConfirmationModal,
141
142
  _ as CustomFields,
142
143
  mo as DataList,
143
- wo as DataTable,
144
- Mo as DataTableHeader,
144
+ Mo as DataTable,
145
+ wo as DataTableHeader,
145
146
  Lo as DataTableRow,
146
- Yt as Date,
147
- ut as DatePicker,
148
- Mt as DateRangePicker,
149
- ye as Dropdown,
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
- Ct as GoogleLogin,
162
+ Dt as GoogleLogin,
162
163
  f as GoogleSignInPlugin,
163
164
  be as Heatmap,
164
- Mr as Icon,
165
- it as IconPicker,
165
+ Lr as Icon,
166
+ ct as IconPicker,
166
167
  Qo as ImportData,
167
- Ur as Input,
168
+ Hr as Input,
168
169
  J as Kanban,
169
170
  ee as KanbanBoard,
170
- Vr as Label,
171
+ Yr as Label,
171
172
  so as List,
172
173
  uo as ListFieldRow,
173
- Lr as Logo,
174
+ Kr as Logo,
174
175
  Ie as MASONRY_BREAKPOINTS,
175
176
  Pe as Masonry,
176
- Yr as Modal,
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
- St as NumberInput,
184
+ gt as NumberInput,
184
185
  eo as OTPInput,
185
- Ho as Pagination,
186
- dr as PermissionEditor,
187
- sr as PermissionMatrix,
188
- Vt as Price,
189
- Jo as PricingPlan,
190
- er as PricingPlanItem,
191
- mr as ProgressBar,
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
- zt as STATUS_MAP,
195
+ Ut as STATUS_MAP,
195
196
  ne as Screen,
196
197
  Te as ScreenFilter,
197
198
  ao as Sheet,
198
- pt as SidePanel,
199
- rr as SidebarMenu,
200
- ar as SidebarMenuItem,
201
- Zr as Slider,
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
- Kt as StatusChip,
205
- ot as Switch,
205
+ zt as StatusChip,
206
+ tt as Switch,
206
207
  Q as Tabes,
207
- lt as Textarea,
208
- gt as ThemeToggle,
209
- Ar as Timeline,
208
+ pt as Textarea,
209
+ Ct as ThemeToggle,
210
+ Fr as Timeline,
210
211
  wr as TimelineIndicator,
211
- Fr as TimelineItem,
212
- At as ToastNotification,
213
- tt as Tooltip,
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
- gr as configure,
219
+ Cr as configure,
219
220
  u as copyToClipboard,
220
- Lt as createVLite,
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
- k as env,
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
- Gt as normalizeStatus,
239
- Pr as pauseTimers,
239
+ _t as normalizeStatus,
240
+ Ir as pauseTimers,
240
241
  P as randomNumber,
241
242
  C as removeExtraProperties,
242
- Cr as removeToast,
243
+ Dr as removeToast,
243
244
  A as resetSearchIndex,
244
- Ut as resolveStatus,
245
- Ir as resumeTimers,
245
+ Ht as resolveStatus,
246
+ vr as resumeTimers,
246
247
  B as search,
247
- Dr as showToast,
248
+ Nr as showToast,
248
249
  I as slugify,
249
250
  D as throttle,
250
- vr as toast,
251
+ hr as toast,
251
252
  v as truncate,
252
- xr as useAdvancedKeyStroke,
253
+ nr as useAdvancedKeyStroke,
253
254
  _e as useDropdownIds,
254
255
  Ge as useDropdownSelection,
255
256
  j as useFileUpload,
256
- H as useForm,
257
+ V as useForm,
257
258
  re as useKanbanBoard,
258
- ir as useKeyStroke,
259
- Nr as useNotifications,
259
+ cr as useKeyStroke,
260
+ Jo as useMultiSelectHydration,
261
+ Ar as useNotifications,
260
262
  Go as useTheme,
261
263
  Je as useTreeSelection,
262
- qt as useVLiteConfig,
263
- cr as vScrollReveal
264
+ Wt as useVLiteConfig,
265
+ Sr as vScrollReveal
264
266
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "private": false,
4
4
  "description": "A Vue 3 UI component library built with Tailwind CSS.",
5
5
  "license": "MIT",
6
- "version": "0.7.8",
6
+ "version": "0.7.9",
7
7
  "type": "module",
8
8
  "main": "index.js",
9
9
  "module": "index.js",