vlite3 0.9.3 → 0.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { defineComponent as pe, inject as ye, computed as r, ref as y, watch as g, openBlock as i, createElementBlock as m, createBlock as F, normalizeClass as T, createSlots as K, withCtx as D, renderSlot as x, createVNode as $, createCommentVNode as z, createElementVNode as f, Fragment as A, renderList as B, normalizeStyle as Y, isMemoSame as W, mergeProps as X, unref as q } from "vue";
1
+ import { defineComponent as pe, inject as ye, computed as r, ref as y, watch as g, openBlock as i, createElementBlock as m, createBlock as F, normalizeClass as T, createSlots as K, withCtx as D, renderSlot as x, createVNode as $, createCommentVNode as A, createElementVNode as f, Fragment as N, renderList as B, normalizeStyle as Y, isMemoSame as W, mergeProps as X, unref as q } from "vue";
2
2
  import we from "../CheckBox.vue.js";
3
3
  import Pe from "../Button.vue.js";
4
4
  import Se from "../ConfirmationModal.vue.js";
@@ -69,7 +69,7 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
69
69
  if (n in e[0]) return n;
70
70
  }
71
71
  return "_id";
72
- }, Q = (e) => e.sortKey || e.field, a = o, b = G, N = ye(xe, null), j = r(() => N?.disableSearch ? !1 : a.showSearch), E = r(() => !a.hideSelectable || !!N?.forceSelectable), d = r(() => J(a.rows, a.keyField)), u = y({ field: "", order: "" }), P = y(
72
+ }, Q = (e) => e.sortKey || e.field, a = o, b = G, E = ye(xe, null), j = r(() => E?.disableSearch ? !1 : a.showSearch), R = r(() => E ? E.forceSelectable : !a.hideSelectable), d = r(() => J(a.rows, a.keyField)), u = y({ field: "", order: "" }), P = y(
73
73
  a.pageInfo?.itemsPerPage || a.paginationProps?.itemsPerPage || 10
74
74
  ), h = y(a.pageInfo?.currentPage || 1), p = y(a.search || ""), S = y(!1), Z = r(() => a.loading);
75
75
  g(
@@ -81,7 +81,7 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
81
81
  let V = null;
82
82
  g(p, () => {
83
83
  V && clearTimeout(V), V = setTimeout(() => {
84
- h.value = 1, R();
84
+ h.value = 1, z();
85
85
  }, 300);
86
86
  }), g(
87
87
  () => a.pageInfo?.itemsPerPage,
@@ -134,16 +134,16 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
134
134
  }), b("update:selectedRows", t);
135
135
  }, le = (e) => {
136
136
  const t = a.headers.find((n) => n.field === e), l = t ? Q(t) : e;
137
- u.value.field === l ? u.value.order === "asc" ? u.value.order = "desc" : u.value.order === "desc" ? (u.value.order = "", u.value.field = "") : u.value.order = "asc" : (u.value.field = l, u.value.order = "asc"), h.value = 1, R();
137
+ u.value.field === l ? u.value.order === "asc" ? u.value.order = "desc" : u.value.order === "desc" ? (u.value.order = "", u.value.field = "") : u.value.order = "asc" : (u.value.field = l, u.value.order = "asc"), h.value = 1, z();
138
138
  }, ae = (e) => {
139
- h.value = e, R();
139
+ h.value = e, z();
140
140
  }, oe = (e) => {
141
- P.value = e, h.value = 1, b("update:itemsPerPage", e), R();
141
+ P.value = e, h.value = 1, b("update:itemsPerPage", e), z();
142
142
  }, se = (e) => b("rowClick", e), ne = () => {
143
143
  b("delete", _.value), S.value = !1;
144
144
  };
145
145
  let U = null;
146
- const R = () => {
146
+ const z = () => {
147
147
  U && clearTimeout(U), U = setTimeout(() => {
148
148
  const e = {
149
149
  pagination: { page: h.value, limit: P.value },
@@ -151,7 +151,7 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
151
151
  search: p.value,
152
152
  filter: {}
153
153
  };
154
- b("change", e), N?.onTableChange?.(e);
154
+ b("change", e), E?.onTableChange?.(e);
155
155
  }, 10);
156
156
  };
157
157
  g(
@@ -222,7 +222,7 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
222
222
  ]),
223
223
  key: "2"
224
224
  } : void 0
225
- ]), 1032, ["modelValue", "show-search", "placeholder", "placeholderI18n", "class", "search-class"])) : z("", !0),
225
+ ]), 1032, ["modelValue", "show-search", "placeholder", "placeholderI18n", "class", "search-class"])) : A("", !0),
226
226
  f("div", {
227
227
  class: T(re.value)
228
228
  }, [
@@ -237,7 +237,7 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
237
237
  ])
238
238
  }, [
239
239
  f("tr", Ee, [
240
- E.value ? (i(), m("th", Re, [
240
+ R.value ? (i(), m("th", Re, [
241
241
  f("div", ze, [
242
242
  $(we, {
243
243
  "model-value": M.value,
@@ -246,8 +246,8 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
246
246
  "onUpdate:modelValue": ee
247
247
  }, null, 8, ["model-value", "indeterminate"])
248
248
  ])
249
- ])) : z("", !0),
250
- (i(!0), m(A, null, B(o.headers, (l) => (i(), F(Ie, {
249
+ ])) : A("", !0),
250
+ (i(!0), m(N, null, B(o.headers, (l) => (i(), F(Ie, {
251
251
  key: l.field,
252
252
  header: l,
253
253
  "sort-config": u.value,
@@ -260,19 +260,19 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
260
260
  ])
261
261
  ], 2),
262
262
  f("tbody", Ae, [
263
- Z.value ? (i(!0), m(A, { key: 0 }, B(Math.min(P.value, 15), (l, n, ge, v) => {
263
+ Z.value ? (i(!0), m(N, { key: 0 }, B(Math.min(P.value, 15), (l, n, ge, v) => {
264
264
  const k = [];
265
265
  if (v && v.key === "skeleton-" + l && W(v, k)) return v;
266
266
  const C = (i(), m("tr", {
267
267
  key: "skeleton-" + l,
268
268
  class: "border-b border-border/70 bg-background transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
269
269
  }, [
270
- E.value ? (i(), m("td", Ne, [...t[8] || (t[8] = [
270
+ R.value ? (i(), m("td", Ne, [...t[8] || (t[8] = [
271
271
  f("div", { class: "flex items-center justify-center" }, [
272
272
  f("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
273
273
  ], -1)
274
- ])])) : z("", !0),
275
- (i(!0), m(A, null, B(o.headers, (I) => (i(), m("td", {
274
+ ])])) : A("", !0),
275
+ (i(!0), m(N, null, B(o.headers, (I) => (i(), m("td", {
276
276
  key: I.field,
277
277
  class: T(["p-5! align-middle last:pr-6!", [I.hideOnMobile ? "hidden md:table-cell" : ""]])
278
278
  }, [
@@ -283,7 +283,7 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
283
283
  ], 2))), 128))
284
284
  ]));
285
285
  return C.memo = k, C;
286
- }, t, 2), 128)) : o.rows.length > 0 ? (i(!0), m(A, { key: 1 }, B(o.rows, (l, n, ge, v) => {
286
+ }, t, 2), 128)) : o.rows.length > 0 ? (i(!0), m(N, { key: 1 }, B(o.rows, (l, n, ge, v) => {
287
287
  const k = [
288
288
  l,
289
289
  s.value.has(c(l, d.value)),
@@ -298,7 +298,7 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
298
298
  headers: o.headers,
299
299
  index: n,
300
300
  "key-field": d.value,
301
- selectable: E.value,
301
+ selectable: R.value,
302
302
  "is-selected": s.value.has(c(l, d.value)),
303
303
  hoverable: o.hoverable,
304
304
  striped: o.striped,
@@ -317,7 +317,7 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
317
317
  return C.memo = k, C;
318
318
  }, t, 4), 128)) : (i(), m("tr", Ve, [
319
319
  f("td", {
320
- colspan: E.value ? o.headers.length + 1 : o.headers.length,
320
+ colspan: R.value ? o.headers.length + 1 : o.headers.length,
321
321
  class: "align-middle hover:bg-transparent"
322
322
  }, [
323
323
  x(e.$slots, "empty", {}, () => [
@@ -351,7 +351,7 @@ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, E
351
351
  onChange: ae,
352
352
  "onUpdate:itemsPerPage": oe
353
353
  }), null, 16, ["current-page", "total-pages", "total-items"])
354
- ])) : z("", !0),
354
+ ])) : A("", !0),
355
355
  $(Se, {
356
356
  show: S.value,
357
357
  "onUpdate:show": t[6] || (t[6] = (l) => S.value = l),
@@ -1,4 +1,4 @@
1
- import { defineComponent as le, ref as i, computed as c, inject as ne, onMounted as oe, onUnmounted as ae, watch as P, provide as ie, reactive as se, toRefs as re, openBlock as x, createElementBlock as V, normalizeStyle as de, createVNode as M, unref as g, withCtx as f, renderSlot as m, createCommentVNode as R, createBlock as ue, normalizeClass as ce, createSlots as fe, normalizeProps as z, guardReactiveProps as E } from "vue";
1
+ import { defineComponent as ne, ref as i, computed as c, inject as oe, onMounted as ae, onUnmounted as ie, watch as P, provide as V, reactive as se, toRefs as re, openBlock as x, createElementBlock as R, normalizeStyle as de, createVNode as M, unref as g, withCtx as f, renderSlot as m, createCommentVNode as z, createBlock as ue, normalizeClass as ce, createSlots as fe, normalizeProps as E, guardReactiveProps as j } from "vue";
2
2
  import me from "v-tooltip-lite";
3
3
  import "v-tooltip-lite/style.css";
4
4
  import ve from "./DropdownMenu.vue.js";
@@ -10,7 +10,7 @@ import { useDropdownHydration as be } from "./composables/useDropdownHydration.j
10
10
  const Ce = {
11
11
  key: 0,
12
12
  tabindex: "0"
13
- }, Me = /* @__PURE__ */ le({
13
+ }, Me = /* @__PURE__ */ ne({
14
14
  __name: "Dropdown",
15
15
  props: {
16
16
  selected: {},
@@ -50,21 +50,21 @@ const Ce = {
50
50
  disabled: { type: Boolean, default: !1 }
51
51
  },
52
52
  emits: ["onSelect", "update:modelValue", "onOpen", "onClose", "update:isOpen", "load-more", "search"],
53
- setup(l, { emit: j }) {
54
- const o = l, v = j, y = i(!1), h = i(null), r = i({
53
+ setup(l, { emit: U }) {
54
+ const o = l, v = U, y = i(!1), h = i(null), r = i({
55
55
  title: "Confirm Selection",
56
56
  description: "Are you sure you want to select this option?",
57
57
  confirmText: "Confirm",
58
58
  cancelText: "Cancel",
59
59
  variant: "primary"
60
- }), U = c(() => o.position ? o.position : o.direction === "rtl" ? "bottom-end" : "bottom-start"), q = c(() => o.nestedPosition ? o.nestedPosition : o.direction === "rtl" ? "left-start" : "right-start"), b = i(o.isOpen || !1), C = i(0), F = `dropdown-${Math.random().toString(36).substring(2, 9)}`, $ = c(() => o.menuId || F), p = i([]), s = ne("dropdown-context", null), G = (e) => {
60
+ }), q = c(() => o.position ? o.position : o.direction === "rtl" ? "bottom-end" : "bottom-start"), F = c(() => o.nestedPosition ? o.nestedPosition : o.direction === "rtl" ? "left-start" : "right-start"), b = i(o.isOpen || !1), C = i(0), G = `dropdown-${Math.random().toString(36).substring(2, 9)}`, $ = c(() => o.menuId || G), p = i([]), s = oe("dropdown-context", null), J = (e) => {
61
61
  p.value.includes(e) || p.value.push(e), s?.registerChildId?.(e);
62
- }, J = (e) => {
62
+ }, K = (e) => {
63
63
  p.value = p.value.filter((n) => n !== e), s?.unregisterChildId?.(e);
64
64
  };
65
- oe(() => {
65
+ ae(() => {
66
66
  s?.registerChildId && s.registerChildId(`#${$.value}`);
67
- }), ae(() => {
67
+ }), ie(() => {
68
68
  s?.unregisterChildId && s.unregisterChildId(`#${$.value}`);
69
69
  }), P(
70
70
  () => o.isOpen,
@@ -83,17 +83,17 @@ const Ce = {
83
83
  b.value = e, v("update:isOpen", e), v(e ? "onOpen" : "onClose"), s?.onChildToggle?.(e);
84
84
  }, O = () => {
85
85
  N(!1);
86
- }, K = (e) => {
86
+ }, Q = (e) => {
87
87
  e ? C.value++ : C.value = Math.max(0, C.value - 1);
88
88
  };
89
- ie("dropdown-context", {
89
+ V("dropdown-context", {
90
90
  close: O,
91
91
  onChildToggle: (e) => {
92
- K(e), s?.onChildToggle?.(e);
92
+ Q(e), s?.onChildToggle?.(e);
93
93
  },
94
- registerChildId: G,
95
- unregisterChildId: J
96
- });
94
+ registerChildId: J,
95
+ unregisterChildId: K
96
+ }), V("modal-context", null);
97
97
  const w = c(() => o.options ? o.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), S = i([]), A = i(!1), k = i(!1);
98
98
  P(
99
99
  w,
@@ -118,18 +118,18 @@ const Ce = {
118
118
  return I.value.forEach((t, d) => {
119
119
  n.has(d) || (e.unshift(t), n.add(d));
120
120
  }), e;
121
- }), { selectedBuffer: I, isHydrating: Q, hydrateSelected: H } = be({
121
+ }), { selectedBuffer: I, isHydrating: W, hydrateSelected: H } = be({
122
122
  fetchSelected: o.fetchSelected,
123
123
  getAvailableOptions: () => u.value,
124
124
  isReady: () => k.value
125
- }), { getAllRecursiveIds: W } = ge(), X = se({
125
+ }), { getAllRecursiveIds: X } = ge(), Y = se({
126
126
  ...re(o),
127
127
  options: u
128
- }), { currentValue: T, selectedLabel: D, selectOption: Y } = ye(
129
- X,
128
+ }), { currentValue: T, selectedLabel: D, selectOption: Z } = ye(
129
+ Y,
130
130
  v
131
- ), Z = c(() => {
132
- const e = o.ignoreClickOutside || [], n = W(u.value);
131
+ ), _ = c(() => {
132
+ const e = o.ignoreClickOutside || [], n = X(u.value);
133
133
  return [.../* @__PURE__ */ new Set([...e, ...n, ...p.value])];
134
134
  });
135
135
  P(
@@ -139,7 +139,7 @@ const Ce = {
139
139
  },
140
140
  { deep: !0 }
141
141
  );
142
- const _ = (e) => {
142
+ const ee = (e) => {
143
143
  if (o.disabled || e.disabled) return;
144
144
  o.doubleConfirmation || !!e.confirmation ? (h.value = e, typeof e.confirmation == "object" ? r.value = {
145
145
  title: e.confirmation.title || "Confirm Selection",
@@ -158,7 +158,7 @@ const Ce = {
158
158
  if (o.disabled || e.disabled) return;
159
159
  const n = e.value ?? e.label;
160
160
  I.value.has(n) || I.value.set(n, e);
161
- const t = Y(e);
161
+ const t = Z(e);
162
162
  if (!o.isNested) {
163
163
  const d = e._originalOption || e, a = d.value ?? d.label;
164
164
  (e._path || [d]).forEach((B) => {
@@ -170,12 +170,12 @@ const Ce = {
170
170
  });
171
171
  });
172
172
  }
173
- }, ee = () => {
174
- h.value && (L(h.value), h.value = null, y.value = !1);
175
173
  }, te = () => {
174
+ h.value && (L(h.value), h.value = null, y.value = !1);
175
+ }, le = () => {
176
176
  h.value = null, y.value = !1;
177
177
  };
178
- return (e, n) => (x(), V("div", {
178
+ return (e, n) => (x(), R("div", {
179
179
  class: "relative inline-block text-left",
180
180
  style: de({ direction: l.direction })
181
181
  }, [
@@ -185,11 +185,11 @@ const Ce = {
185
185
  arrow: !1,
186
186
  teleport: l.teleport,
187
187
  offset: l.offset,
188
- placement: U.value,
188
+ placement: q.value,
189
189
  isOpen: b.value,
190
190
  keepAlive: C.value > 0,
191
191
  menuId: $.value,
192
- ignoreClickOutside: Z.value,
192
+ ignoreClickOutside: _.value,
193
193
  class: "w-full",
194
194
  className: "dropdown " + (l.className || ""),
195
195
  onOnShow: n[2] || (n[2] = (t) => e.$emit("onOpen")),
@@ -199,7 +199,7 @@ const Ce = {
199
199
  styles: { padding: "0" }
200
200
  }, {
201
201
  trigger: f(({ isOpen: t }) => [
202
- m(e.$slots, "trigger", z(E({ selectedLabel: g(D), isOpen: t })), () => [
202
+ m(e.$slots, "trigger", E(j({ selectedLabel: g(D), isOpen: t })), () => [
203
203
  M(he, {
204
204
  "selected-label": g(D),
205
205
  "is-open": t,
@@ -211,9 +211,9 @@ const Ce = {
211
211
  ])
212
212
  ]),
213
213
  default: f(() => [
214
- e.$slots?.default ? (x(), V("span", Ce, [
214
+ e.$slots?.default ? (x(), R("span", Ce, [
215
215
  m(e.$slots, "default")
216
- ])) : R("", !0),
216
+ ])) : z("", !0),
217
217
  !l.disabled && (w.value.length || u.value.length || e.$slots.menu || e.$slots.item || l.remote || l.searchable) ? (x(), ue(ve, {
218
218
  key: 1,
219
219
  options: w.value,
@@ -222,18 +222,18 @@ const Ce = {
222
222
  selected: g(T),
223
223
  selectedIndex: l.selectedIndex,
224
224
  maxHeight: l.maxHeight,
225
- nestedPosition: q.value,
225
+ nestedPosition: F.value,
226
226
  nestedOffset: l.nestedOffset,
227
227
  selectable: l.selectable,
228
228
  direction: l.direction,
229
229
  layout: l.layout,
230
230
  columns: l.columns,
231
- loading: l.loading || g(Q),
231
+ loading: l.loading || g(W),
232
232
  hasMore: l.hasMore,
233
233
  searchable: l.searchable,
234
234
  remote: l.remote,
235
235
  debounceTime: l.debounceTime,
236
- onSelect: _,
236
+ onSelect: ee,
237
237
  onClose: O,
238
238
  onLoadMore: n[0] || (n[0] = (t) => e.$emit("load-more")),
239
239
  onSearch: n[1] || (n[1] = (t) => e.$emit("search", t))
@@ -248,7 +248,7 @@ const Ce = {
248
248
  e.$slots.item ? {
249
249
  name: "item",
250
250
  fn: f((t) => [
251
- m(e.$slots, "item", z(E(t)))
251
+ m(e.$slots, "item", E(j(t)))
252
252
  ]),
253
253
  key: "1"
254
254
  } : void 0,
@@ -266,7 +266,7 @@ const Ce = {
266
266
  ]),
267
267
  key: "3"
268
268
  } : void 0
269
- ]), 1032, ["options", "cachedOptions", "class", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) : R("", !0)
269
+ ]), 1032, ["options", "cachedOptions", "class", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) : z("", !0)
270
270
  ]),
271
271
  _: 3
272
272
  }, 8, ["teleport", "offset", "placement", "isOpen", "keepAlive", "menuId", "ignoreClickOutside", "className"]),
@@ -277,8 +277,8 @@ const Ce = {
277
277
  "confirm-text": r.value.confirmText,
278
278
  "cancel-text": r.value.cancelText,
279
279
  variant: r.value.variant,
280
- onConfirm: ee,
281
- onCancel: te
280
+ onConfirm: te,
281
+ onCancel: le
282
282
  }, null, 8, ["show", "title", "description", "confirm-text", "cancel-text", "variant"])
283
283
  ], 4));
284
284
  }
@@ -1,7 +1,7 @@
1
1
  import o from "./CustomFields.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-877e3c1c"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-90c3a6e8"]]);
5
5
  export {
6
6
  r as default
7
7
  };