vlite3 1.4.37 → 1.4.39

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.
Files changed (41) hide show
  1. package/components/Badge.vue.js +5 -5
  2. package/components/Badge.vue3.js +5 -0
  3. package/components/CategoryManager/CategoryManager.vue2.js +4 -3
  4. package/components/Chip/Chip.vue.js +21 -21
  5. package/components/Chip/Chip.vue3.js +5 -0
  6. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  7. package/components/ColorPicker/ColorPicker.vue.js +2 -2
  8. package/components/Comment/CommentItem.vue2.js +3 -2
  9. package/components/DataTable/DataTable.vue.js +186 -189
  10. package/components/DataTable/DataTableRow.vue.js +54 -51
  11. package/components/DataTable/useDataTableTree.d.ts +4 -3
  12. package/components/DataTable/useDataTableTree.js +102 -92
  13. package/components/FileTree/FileTree.vue.d.ts +3 -1
  14. package/components/FileTree/FileTree.vue.js +1 -1
  15. package/components/FileTree/FileTree.vue2.js +157 -116
  16. package/components/FileTree/FileTreeNode.vue.d.ts +9 -5
  17. package/components/FileTree/FileTreeNode.vue.js +147 -189
  18. package/components/Form/Form.vue2.js +45 -43
  19. package/components/ImportData/ImportData.vue.js +4 -2
  20. package/components/Invoice/InvoiceVariant1.vue.js +3 -2
  21. package/components/Invoice/InvoiceVariant2.vue.js +3 -2
  22. package/components/Invoice/InvoiceVariant3.vue.js +3 -2
  23. package/components/Invoice/InvoiceVariant4.vue.js +3 -2
  24. package/components/MultiSelect/MultiSelect.vue.js +3 -2
  25. package/components/PricingPlan/PricingPlanItem.vue.js +10 -9
  26. package/components/Screen/ScreenFilter.vue.js +19 -18
  27. package/components/StatusChip/StatusChip.vue.js +8 -7
  28. package/components/StatusChip/StatusChip.vue3.js +5 -0
  29. package/components/Timeline/TimelineItem.vue.js +3 -2
  30. package/components/TreeConnectors/TreeConnectors.vue.d.ts +1 -1
  31. package/components/TreeConnectors/TreeConnectors.vue.js +26 -17
  32. package/components/TreeConnectors/geometry.d.ts +29 -3
  33. package/components/TreeConnectors/geometry.js +128 -46
  34. package/components/TreeConnectors/index.d.ts +1 -1
  35. package/index.js +473 -470
  36. package/package.json +1 -1
  37. package/style.css +15 -1
  38. package/components/Badge.vue2.js +0 -4
  39. package/components/Chip/Chip.vue2.js +0 -4
  40. package/components/StatusChip/StatusChip.vue2.js +0 -4
  41. /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
@@ -1,26 +1,26 @@
1
- import { defineComponent as ze, inject as $e, computed as u, toRef as _, ref as B, watch as D, openBlock as r, createElementBlock as m, createElementVNode as h, normalizeClass as p, unref as d, createCommentVNode as E, Fragment as R, renderList as I, normalizeStyle as K, createVNode as W, createBlock as ee, isMemoSame as te, createSlots as le, withCtx as ne, renderSlot as U, mergeProps as ae } from "vue";
2
- import We from "../CheckBox.vue.js";
3
- import Le from "../ConfirmationModal.vue.js";
4
- import Ve from "../Pagination/Pagination.vue.js";
5
- import Fe from "../Empty/Empty.vue.js";
6
- import Ae from "./DataTableHeader.vue.js";
7
- import Me from "./DataTableRow.vue.js";
8
- import { useDataTableTree as Ne } from "./useDataTableTree.js";
9
- import { $t as P } from "../../utils/i18n.js";
10
- import { SCREEN_CONTEXT_KEY as je } from "./types.js";
11
- const Ke = { class: "space-y-6.5" }, Ue = { key: 0 }, Oe = {
1
+ import { defineComponent as $e, inject as We, computed as r, toRef as _, ref as W, watch as D, shallowRef as Le, onUnmounted as Ve, openBlock as i, createElementBlock as c, createElementVNode as v, normalizeClass as x, unref as u, createCommentVNode as E, Fragment as R, renderList as P, normalizeStyle as j, createVNode as L, createBlock as ee, isMemoSame as te, createSlots as le, withCtx as ne, renderSlot as K, mergeProps as ae } from "vue";
2
+ import Fe from "../CheckBox.vue.js";
3
+ import Ae from "../ConfirmationModal.vue.js";
4
+ import Me from "../Pagination/Pagination.vue.js";
5
+ import Ne from "../Empty/Empty.vue.js";
6
+ import Ue from "./DataTableHeader.vue.js";
7
+ import je from "./DataTableRow.vue.js";
8
+ import { useDataTableTree as Ke } from "./useDataTableTree.js";
9
+ import { $t as I } from "../../utils/i18n.js";
10
+ import { SCREEN_CONTEXT_KEY as Oe } from "./types.js";
11
+ const Ye = { class: "space-y-6.5" }, Xe = { class: "w-full overflow-x-auto overflow-y-hidden" }, qe = { key: 0 }, Ge = {
12
12
  key: 0,
13
13
  style: { width: "40px" }
14
- }, Ye = { class: "hover:bg-transparent" }, Xe = {
14
+ }, He = { class: "hover:bg-transparent" }, Je = {
15
15
  key: 0,
16
16
  scope: "col",
17
17
  class: "w-[40px] px-0 text-center font-medium text-muted-foreground",
18
18
  style: { width: "40px" }
19
- }, qe = { class: "flex items-center justify-center" }, Ge = { class: "[&_tr:last-child]:border-0" }, He = {
19
+ }, Qe = { class: "flex items-center justify-center" }, Ze = { class: "[&_tr:last-child]:border-0" }, _e = {
20
20
  key: 0,
21
21
  class: "w-[48px] px-0 py-4 align-middle text-center",
22
22
  style: { width: "48px" }
23
- }, Je = { key: 2 }, Qe = ["colspan"], Ze = { key: 0 }, dt = /* @__PURE__ */ ze({
23
+ }, et = { key: 2 }, tt = ["colspan"], lt = { key: 0 }, ft = /* @__PURE__ */ $e({
24
24
  __name: "DataTable",
25
25
  props: {
26
26
  rows: { default: () => [] },
@@ -62,7 +62,7 @@ const Ke = { class: "space-y-6.5" }, Ue = { key: 0 }, Oe = {
62
62
  const se = (e, t) => {
63
63
  if (!(!e || !t))
64
64
  return t.includes(".") ? t.split(".").reduce((l, o) => l?.[o], e) : e[t];
65
- }, g = (e, t) => se(e, t), ie = (e, t) => {
65
+ }, w = (e, t) => se(e, t), ie = (e, t) => {
66
66
  const l = ["id", "_id"];
67
67
  if (t && t !== "auto") return t;
68
68
  if (e && e.length > 0) {
@@ -70,26 +70,27 @@ const Ke = { class: "space-y-6.5" }, Ue = { key: 0 }, Oe = {
70
70
  if (o in e[0]) return o;
71
71
  }
72
72
  return "_id";
73
- }, re = (e) => e.sortKey || e.field, a = n, y = oe, L = $e(je, null), S = u(() => a.hideSelectable ? !1 : L ? L.forceSelectable : !0), v = u(() => ie(a.rows, a.keyField)), {
74
- isTreeMode: b,
75
- flattenVisibleRows: O,
73
+ }, re = (e) => e.sortKey || e.field, a = n, b = oe, V = We(Oe, null), S = r(() => a.hideSelectable ? !1 : V ? V.forceSelectable : !0), h = r(() => ie(a.rows, a.keyField)), {
74
+ isTreeMode: g,
75
+ flattenVisibleRows: F,
76
76
  allLoadedRows: z,
77
+ findParentId: O,
77
78
  isExpandable: Y,
78
79
  isExpanded: X,
79
80
  isLoading: q,
80
81
  collectDescendantIds: G,
81
82
  toggleExpand: de,
82
83
  pruneStaleTreeState: ce,
83
- getChildren: V
84
- } = Ne({
84
+ getChildren: H
85
+ } = Ke({
85
86
  rows: _(a, "rows"),
86
- keyField: v,
87
+ keyField: h,
87
88
  loadChildren: _(a, "loadChildren"),
88
- getRowId: g,
89
- onExpand: (e) => y("expand", e)
90
- }), x = B({ field: "", order: "" }), T = B(
89
+ getRowId: w,
90
+ onExpand: (e) => b("expand", e)
91
+ }), p = W({ field: "", order: "" }), T = W(
91
92
  a.pageInfo?.itemsPerPage || a.paginationProps?.itemsPerPage || 10
92
- ), C = B(a.pageInfo?.currentPage || 1), $ = B(!1), ue = u(() => a.loading);
93
+ ), C = W(a.pageInfo?.currentPage || 1), $ = W(!1), ue = r(() => a.loading);
93
94
  D(
94
95
  () => a.pageInfo?.itemsPerPage,
95
96
  (e) => {
@@ -106,303 +107,299 @@ const Ke = { class: "space-y-6.5" }, Ue = { key: 0 }, Oe = {
106
107
  e && (C.value = e);
107
108
  }
108
109
  );
109
- const i = B(/* @__PURE__ */ new Set());
110
+ const s = Le(/* @__PURE__ */ new Set());
110
111
  D(
111
112
  () => a.selectedRows,
112
113
  (e) => {
113
- const t = new Set((e || []).map((l) => g(l, v.value)));
114
- (t.size !== i.value.size || [...t].some((l) => !i.value.has(l))) && (i.value = t);
114
+ const t = new Set((e || []).map((l) => w(l, h.value)));
115
+ (t.size !== s.value.size || [...t].some((l) => !s.value.has(l))) && (s.value = t);
115
116
  },
116
- { immediate: !0, deep: !0 }
117
+ { immediate: !0 }
117
118
  );
118
- const F = u(() => {
119
- if (!b.value) return a.rows;
119
+ const A = r(() => {
120
+ if (!g.value) return a.rows;
120
121
  const e = [], t = (l) => {
121
122
  for (const o of l) {
122
123
  e.push(o);
123
- for (const c of V(o)) t([c]);
124
+ for (const m of H(o)) t([m]);
124
125
  }
125
126
  };
126
127
  return t(a.rows), e;
127
- }), A = u(() => {
128
- const e = F.value;
129
- return e.length > 0 && e.every((t) => i.value.has(g(t, v.value)));
130
- }), H = u(() => i.value.size > 0 && !A.value), me = u(() => {
128
+ }), M = r(() => {
129
+ const e = A.value;
130
+ return e.length > 0 && e.every((t) => s.value.has(w(t, h.value)));
131
+ }), J = r(() => s.value.size > 0 && !M.value), me = r(() => {
131
132
  const e = new Map(z.value);
132
- return (a.selectedRows || []).forEach((t) => e.set(g(t, v.value), t)), a.rows.forEach((t) => e.set(g(t, v.value), t)), Array.from(i.value).map((t) => e.get(t)).filter(Boolean);
133
- }), J = (e) => {
134
- const t = (o, c) => {
135
- for (const s of o) {
136
- const f = g(s, v.value);
137
- if (f === e) return { found: !0, parentId: c };
138
- const w = t(V(s), f);
139
- if (w.found) return w;
140
- }
141
- return { found: !1, parentId: null };
142
- }, l = t(a.rows, null);
143
- return l.found ? l.parentId : null;
144
- }, Q = (e) => {
145
- if (!b.value) return !1;
133
+ return (a.selectedRows || []).forEach((t) => e.set(w(t, h.value), t)), a.rows.forEach((t) => e.set(w(t, h.value), t)), Array.from(s.value).map((t) => e.get(t)).filter(Boolean);
134
+ }), fe = (e) => {
135
+ if (!g.value) return !1;
146
136
  const t = G(e);
147
137
  if (!t.length) return !1;
148
138
  let l = 0;
149
139
  for (const o of t)
150
- i.value.has(o) && l++;
140
+ s.value.has(o) && l++;
151
141
  return l > 0 && l < t.length;
152
- }, fe = (e, t) => {
153
- let l = J(e);
142
+ }, Q = r(() => {
143
+ const e = /* @__PURE__ */ new Set();
144
+ if (!g.value) return e;
145
+ for (const t of F.value)
146
+ fe(t.row) && e.add(t.id);
147
+ return e;
148
+ }), ve = (e, t) => {
149
+ let l = O(e);
154
150
  for (; l != null; ) {
155
151
  const o = z.value.get(l);
156
152
  if (!o) break;
157
- const c = V(o).map((f) => g(f, v.value));
158
- c.length > 0 && c.every((f) => t.has(f)) ? t.add(l) : t.delete(l), l = J(l);
153
+ const m = H(o).map((f) => w(f, h.value));
154
+ m.length > 0 && m.every((f) => t.has(f)) ? t.add(l) : t.delete(l), l = O(l);
159
155
  }
160
- }, ve = (e) => {
161
- const t = new Set(i.value);
162
- F.value.forEach((l) => {
163
- const o = g(l, v.value);
164
- e ? t.add(o) : t.delete(o);
165
- }), i.value = t, M();
166
156
  }, he = (e) => {
167
- const t = new Set(i.value), l = !t.has(e);
168
- if (b.value) {
157
+ const t = new Set(s.value);
158
+ A.value.forEach((l) => {
159
+ const o = w(l, h.value);
160
+ e ? t.add(o) : t.delete(o);
161
+ }), s.value = t, N();
162
+ }, ge = (e) => {
163
+ const t = new Set(s.value), l = !t.has(e);
164
+ if (g.value) {
169
165
  const o = z.value.get(e);
170
166
  if (o) {
171
- const c = (s, f) => {
172
- f ? t.add(s) : t.delete(s);
167
+ const m = (d, f) => {
168
+ f ? t.add(d) : t.delete(d);
173
169
  };
174
- c(e, l), G(o).forEach((s) => c(s, l)), fe(e, t), i.value = t, M();
170
+ m(e, l), G(o).forEach((d) => m(d, l)), ve(e, t), s.value = t, N();
175
171
  return;
176
172
  }
177
173
  }
178
- t.has(e) ? t.delete(e) : t.add(e), i.value = t, M();
179
- }, M = () => {
174
+ t.has(e) ? t.delete(e) : t.add(e), s.value = t, N();
175
+ }, N = () => {
180
176
  const e = /* @__PURE__ */ new Set(), t = [], l = (o) => {
181
- const c = g(o, v.value);
182
- i.value.has(c) && !e.has(c) && (t.push(o), e.add(c));
177
+ const m = w(o, h.value);
178
+ s.value.has(m) && !e.has(m) && (t.push(o), e.add(m));
183
179
  };
184
- F.value.forEach(l), (a.selectedRows || []).forEach(l), y("select", {
180
+ A.value.forEach(l), (a.selectedRows || []).forEach(l), b("select", {
185
181
  selected: t,
186
- all: A.value,
187
- indeterminate: H.value
188
- }), y("update:selectedRows", t);
189
- }, ge = (e) => {
182
+ all: M.value,
183
+ indeterminate: J.value
184
+ }), b("update:selectedRows", t);
185
+ }, we = (e) => {
190
186
  const t = a.headers.find((o) => o.field === e), l = t ? re(t) : e;
191
- x.value.field === l ? x.value.order = x.value.order === "asc" ? "desc" : "asc" : (x.value.field = l, x.value.order = "asc"), C.value = 1, j();
187
+ p.value.field === l ? p.value.order = p.value.order === "asc" ? "desc" : "asc" : (p.value.field = l, p.value.order = "asc"), C.value = 1, U();
192
188
  }, be = (e) => {
193
- C.value = e, j();
194
- }, we = (e) => {
195
- T.value = e, C.value = 1, y("update:itemsPerPage", e), j();
196
- }, pe = (e) => y("rowClick", e), ye = () => {
197
- y("delete", me.value), $.value = !1;
189
+ C.value = e, U();
190
+ }, pe = (e) => {
191
+ T.value = e, C.value = 1, b("update:itemsPerPage", e), U();
192
+ }, ye = (e) => b("rowClick", e), xe = () => {
193
+ b("delete", me.value), $.value = !1;
198
194
  };
199
- let N = null;
200
- const j = () => {
201
- N && clearTimeout(N), N = setTimeout(() => {
195
+ let y = null;
196
+ const U = () => {
197
+ y && clearTimeout(y), y = setTimeout(() => {
198
+ y = null;
202
199
  const e = {
203
200
  pagination: { page: C.value, limit: T.value },
204
- sort: { ...x.value },
201
+ sort: { ...p.value },
205
202
  filter: {}
206
203
  };
207
- y("change", e), L?.onTableChange?.(e);
204
+ b("change", e), V?.onTableChange?.(e);
208
205
  }, 10);
209
206
  };
210
- D(
207
+ Ve(() => {
208
+ y && (clearTimeout(y), y = null);
209
+ }), D(
211
210
  () => a.rows,
212
211
  () => {
213
212
  ce();
214
213
  const e = new Set(z.value.keys());
215
214
  (a.selectedRows || []).forEach((t) => {
216
- e.add(g(t, v.value));
217
- }), i.value = new Set([...i.value].filter((t) => e.has(t)));
215
+ e.add(w(t, h.value));
216
+ }), s.value = new Set([...s.value].filter((t) => e.has(t)));
218
217
  }
219
218
  );
220
- const xe = u(() => [
219
+ const Se = r(() => [
221
220
  "w-full flex flex-col",
222
221
  a.variant === "raised" ? "bg-background shadow-sm p-2 rounded-lg" : "bg-background rounded",
223
222
  "overflow-hidden",
224
223
  a.bordered ? "border border-border" : "",
225
224
  a.class
226
- ].join(" ")), Se = u(() => {
225
+ ].join(" ")), Ce = r(() => {
227
226
  const e = a.cellBordered ? "[&>thead>tr>th:not(:last-child)]:border-r [&>thead>tr>th]:border-border [&>tbody>tr>td:not(:last-child)]:border-r [&>tbody>tr>td]:border-border [&>tbody>tr>th:not(:last-child)]:border-r [&>tbody>tr>th]:border-border" : "";
228
227
  return [
229
228
  "w-full caption-bottom -text-fs-1",
230
- b.value ? "table-fixed" : "",
229
+ g.value ? "table-fixed" : "",
231
230
  e,
232
231
  a.tableClass
233
232
  ].join(" ");
234
- }), Ce = (e) => {
233
+ }), ke = (e) => {
235
234
  const t = {};
236
- return e.width && !/(?:^|\s|:)w-/.test(e.width) && (t.width = e.width), e.minWidth && !/(?:^|\s|:)min-w-/.test(e.minWidth) && (b.value && !t.width ? t.width = e.minWidth : t.minWidth = e.minWidth), t;
237
- }, ke = (e) => {
235
+ return e.width && !/(?:^|\s|:)w-/.test(e.width) && (t.width = e.width), e.minWidth && !/(?:^|\s|:)min-w-/.test(e.minWidth) && (g.value && !t.width ? t.width = e.minWidth : t.minWidth = e.minWidth), t;
236
+ }, Pe = (e) => {
238
237
  const t = {};
239
238
  return e.width && !/(?:^|\s|:)w-/.test(e.width) ? t.width = e.width : e.minWidth && !/(?:^|\s|:)min-w-/.test(e.minWidth) && (t.width = e.minWidth), t;
240
239
  }, Z = (e) => {
241
240
  const t = [];
242
241
  return e.width && /(?:^|\s|:)w-/.test(e.width) && t.push(e.width), e.minWidth && /(?:^|\s|:)min-w-/.test(e.minWidth) && t.push(e.minWidth), t.join(" ");
243
- }, Ie = u(
244
- () => a.emptyTitleI18n ? P(a.emptyTitleI18n) : a.emptyTitle
245
- ), Pe = u(
246
- () => a.emptyDescriptionI18n ? P(a.emptyDescriptionI18n) : a.emptyDescription
247
- ), Te = u(() => {
248
- const e = P("vlite.dataTable.confirmDeleteTitle");
242
+ }, Ie = r(
243
+ () => a.emptyTitleI18n ? I(a.emptyTitleI18n) : a.emptyTitle
244
+ ), Te = r(
245
+ () => a.emptyDescriptionI18n ? I(a.emptyDescriptionI18n) : a.emptyDescription
246
+ ), Be = r(() => {
247
+ const e = I("vlite.dataTable.confirmDeleteTitle");
249
248
  return e !== "vlite.dataTable.confirmDeleteTitle" ? e : "Confirm Deletion";
250
- }), Be = u(() => {
251
- const e = P("vlite.dataTable.confirmDeleteDesc");
249
+ }), De = r(() => {
250
+ const e = I("vlite.dataTable.confirmDeleteDesc");
252
251
  return e !== "vlite.dataTable.confirmDeleteDesc" ? e : "Are you sure you want to delete the selected items?";
253
- }), De = u(() => {
254
- const e = P("vlite.dataTable.deleteBtn");
252
+ }), Ee = r(() => {
253
+ const e = I("vlite.dataTable.deleteBtn");
255
254
  return e !== "vlite.dataTable.deleteBtn" ? e : "Delete";
256
- }), Ee = u(() => {
257
- const e = P("vlite.dataTable.cancelBtn");
255
+ }), Re = r(() => {
256
+ const e = I("vlite.dataTable.cancelBtn");
258
257
  return e !== "vlite.dataTable.cancelBtn" ? e : "Cancel";
259
258
  });
260
- return (e, t) => (r(), m("div", Ke, [
261
- h("div", {
262
- class: p(xe.value)
259
+ return (e, t) => (i(), c("div", Ye, [
260
+ v("div", {
261
+ class: x(Se.value)
263
262
  }, [
264
- h("div", {
265
- class: p(["overflow-x-auto w-full", d(b) ? "[scrollbar-gutter:stable]" : ""])
266
- }, [
267
- h("table", {
268
- class: p([Se.value, "data-table"])
263
+ v("div", Xe, [
264
+ v("table", {
265
+ class: x([Ce.value, "data-table"])
269
266
  }, [
270
- d(b) ? (r(), m("colgroup", Ue, [
271
- S.value ? (r(), m("col", Oe)) : E("", !0),
272
- (r(!0), m(R, null, I(n.headers, (l) => (r(), m("col", {
267
+ u(g) ? (i(), c("colgroup", qe, [
268
+ S.value ? (i(), c("col", Ge)) : E("", !0),
269
+ (i(!0), c(R, null, P(n.headers, (l) => (i(), c("col", {
273
270
  key: "col-" + l.field,
274
- class: p(Z(l)),
275
- style: K(ke(l))
271
+ class: x(Z(l)),
272
+ style: j(Pe(l))
276
273
  }, null, 6))), 128))
277
274
  ])) : E("", !0),
278
- h("thead", {
279
- class: p([
275
+ v("thead", {
276
+ class: x([
280
277
  "[&_tr]:border-b [&_tr]:border-border",
281
278
  n.headerVariant === "minimal" ? "bg-transparent" : "bg-accent",
282
279
  n.variant === "raised" ? "[&_th:first-child]:rounded-tl-lg [&_th:last-child]:rounded-tr-lg" : ""
283
280
  ])
284
281
  }, [
285
- h("tr", Ye, [
286
- S.value ? (r(), m("th", Xe, [
287
- h("div", qe, [
288
- W(We, {
289
- "model-value": A.value,
290
- indeterminate: H.value,
282
+ v("tr", He, [
283
+ S.value ? (i(), c("th", Je, [
284
+ v("div", Qe, [
285
+ L(Fe, {
286
+ "model-value": M.value,
287
+ indeterminate: J.value,
291
288
  size: "xs",
292
- "onUpdate:modelValue": ve
289
+ "onUpdate:modelValue": he
293
290
  }, null, 8, ["model-value", "indeterminate"])
294
291
  ])
295
292
  ])) : E("", !0),
296
- (r(!0), m(R, null, I(n.headers, (l) => (r(), ee(Ae, {
293
+ (i(!0), c(R, null, P(n.headers, (l) => (i(), ee(Ue, {
297
294
  key: l.field,
298
295
  header: l,
299
- "sort-config": x.value,
296
+ "sort-config": p.value,
300
297
  compact: n.compact,
301
298
  size: n.size,
302
299
  "table-sortable": n.sortable,
303
300
  "cell-bordered": n.cellBordered,
304
- onSort: ge,
305
- class: p([
301
+ onSort: we,
302
+ class: x([
306
303
  n.cellBordered ? "" : "last:pr-5!",
307
304
  Z(l),
308
- d(b) ? "min-w-0! max-w-none!" : ""
305
+ u(g) ? "min-w-0! max-w-none!" : ""
309
306
  ]),
310
- style: K(Ce(l))
307
+ style: j(ke(l))
311
308
  }, null, 8, ["header", "sort-config", "compact", "size", "table-sortable", "cell-bordered", "class", "style"]))), 128))
312
309
  ])
313
310
  ], 2),
314
- h("tbody", Ge, [
315
- ue.value ? (r(!0), m(R, { key: 0 }, I(Math.min(T.value, 15), (l, o, c, s) => {
311
+ v("tbody", Ze, [
312
+ ue.value ? (i(!0), c(R, { key: 0 }, P(Math.min(T.value, 15), (l, o, m, d) => {
316
313
  const f = [];
317
- if (s && s.key === "skeleton-" + l && te(s, f)) return s;
318
- const w = (r(), m("tr", {
314
+ if (d && d.key === "skeleton-" + l && te(d, f)) return d;
315
+ const B = (i(), c("tr", {
319
316
  key: "skeleton-" + l,
320
317
  class: "border-b border-border/70 bg-background transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
321
318
  }, [
322
- S.value ? (r(), m("td", He, [...t[6] || (t[6] = [
323
- h("div", { class: "flex items-center justify-center" }, [
324
- h("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
319
+ S.value ? (i(), c("td", _e, [...t[6] || (t[6] = [
320
+ v("div", { class: "flex items-center justify-center" }, [
321
+ v("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
325
322
  ], -1)
326
323
  ])])) : E("", !0),
327
- (r(!0), m(R, null, I(n.headers, (k) => (r(), m("td", {
324
+ (i(!0), c(R, null, P(n.headers, (k) => (i(), c("td", {
328
325
  key: k.field,
329
- class: p(["align-middle", [
326
+ class: x(["align-middle", [
330
327
  k.hideOnMobile ? "hidden md:table-cell" : "",
331
328
  n.cellBordered ? "px-5! py-3!" : "p-5! last:pr-6!"
332
329
  ]])
333
330
  }, [
334
- h("div", {
331
+ v("div", {
335
332
  class: "rounded-md bg-muted/50 animate-pulse h-4",
336
- style: K({ width: `${50 + Math.random() * 40}%` })
333
+ style: j({ width: `${50 + Math.random() * 40}%` })
337
334
  }, null, 4)
338
335
  ], 2))), 128))
339
336
  ]));
340
- return w.memo = f, w;
341
- }, t, 0), 128)) : d(O).length > 0 ? (r(!0), m(R, { key: 1 }, I(d(O), (l, o, c, s) => {
337
+ return B.memo = f, B;
338
+ }, t, 0), 128)) : u(F).length > 0 ? (i(!0), c(R, { key: 1 }, P(u(F), (l, o, m, d) => {
342
339
  const f = [
343
340
  l.row,
344
- i.value.has(l.id),
345
- Q(l.row),
341
+ s.value.has(l.id),
342
+ Q.value.has(l.id),
346
343
  S.value,
347
344
  n.compact,
348
345
  n.size,
349
346
  n.striped,
350
347
  n.hoverable,
351
348
  n.cellBordered,
352
- d(b),
349
+ u(g),
353
350
  l.depth,
354
351
  l.isLastSibling,
355
352
  l.ancestorLastFlags,
356
- d(X)(l.id),
357
- d(q)(l.id),
358
- d(Y)(l.row),
353
+ u(X)(l.id),
354
+ u(q)(l.id),
355
+ u(Y)(l.row),
359
356
  n.treeIndent
360
357
  ];
361
- if (s && s.key === l.id && te(s, f)) return s;
362
- const w = (r(), ee(Me, {
358
+ if (d && d.key === l.id && te(d, f)) return d;
359
+ const B = (i(), ee(je, {
363
360
  key: l.id,
364
361
  row: l.row,
365
362
  headers: n.headers,
366
363
  index: l.index,
367
- "key-field": v.value,
364
+ "key-field": h.value,
368
365
  selectable: S.value,
369
- "is-selected": i.value.has(l.id),
370
- "is-indeterminate": Q(l.row),
366
+ "is-selected": s.value.has(l.id),
367
+ "is-indeterminate": Q.value.has(l.id),
371
368
  hoverable: n.hoverable,
372
369
  striped: n.striped,
373
370
  compact: n.compact,
374
371
  size: n.size,
375
372
  "cell-bordered": n.cellBordered,
376
- "tree-mode": d(b),
373
+ "tree-mode": u(g),
377
374
  depth: l.depth,
378
375
  "tree-indent": n.treeIndent,
379
- expandable: d(Y)(l.row),
380
- expanded: d(X)(l.id),
381
- "tree-loading": d(q)(l.id),
376
+ expandable: u(Y)(l.row),
377
+ expanded: u(X)(l.id),
378
+ "tree-loading": u(q)(l.id),
382
379
  "is-last-sibling": l.isLastSibling,
383
380
  "ancestor-last-flags": l.ancestorLastFlags,
384
- onSelect: he,
385
- onRowClick: pe,
386
- onToggleExpand: (k) => d(de)(l.row, l.depth),
387
- class: p(n.cellBordered ? "" : "[&_td:last-child]:pr-5!")
381
+ onSelect: ge,
382
+ onRowClick: ye,
383
+ onToggleExpand: (k) => u(de)(l.row, l.depth),
384
+ class: x(n.cellBordered ? "" : "[&_td:last-child]:pr-5!")
388
385
  }, le({ _: 2 }, [
389
- I(n.headers, (k) => ({
386
+ P(n.headers, (k) => ({
390
387
  name: k.field,
391
- fn: ne((Re) => [
392
- U(e.$slots, k.field, ae({ ref_for: !0 }, Re))
388
+ fn: ne((ze) => [
389
+ K(e.$slots, k.field, ae({ ref_for: !0 }, ze))
393
390
  ])
394
391
  }))
395
392
  ]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "is-indeterminate", "hoverable", "striped", "compact", "size", "cell-bordered", "tree-mode", "depth", "tree-indent", "expandable", "expanded", "tree-loading", "is-last-sibling", "ancestor-last-flags", "onToggleExpand", "class"]));
396
- return w.memo = f, w;
397
- }, t, 2), 128)) : (r(), m("tr", Je, [
398
- h("td", {
393
+ return B.memo = f, B;
394
+ }, t, 2), 128)) : (i(), c("tr", et, [
395
+ v("td", {
399
396
  colspan: S.value ? n.headers.length + 1 : n.headers.length,
400
397
  class: "align-middle hover:bg-transparent"
401
398
  }, [
402
- U(e.$slots, "empty", {}, () => [
403
- W(d(Fe), {
399
+ K(e.$slots, "empty", {}, () => [
400
+ L(u(Ne), {
404
401
  title: Ie.value,
405
- description: Pe.value,
402
+ description: Te.value,
406
403
  icon: n.emptyIcon,
407
404
  variant: "variant12",
408
405
  class: "bg-transparent! py-8!"
@@ -410,42 +407,42 @@ const Ke = { class: "space-y-6.5" }, Ue = { key: 0 }, Oe = {
410
407
  e.$slots["empty-action"] ? {
411
408
  name: "action",
412
409
  fn: ne(() => [
413
- U(e.$slots, "empty-action")
410
+ K(e.$slots, "empty-action")
414
411
  ]),
415
412
  key: "0"
416
413
  } : void 0
417
414
  ]), 1032, ["title", "description", "icon"])
418
415
  ])
419
- ], 8, Qe)
416
+ ], 8, tt)
420
417
  ]))
421
418
  ])
422
419
  ], 2)
423
- ], 2)
420
+ ])
424
421
  ], 2),
425
- n.showPagination && n.pageInfo && n.pageInfo.totalPages > 1 ? (r(), m("div", Ze, [
426
- W(d(Ve), ae({
422
+ n.showPagination && n.pageInfo && n.pageInfo.totalPages > 1 ? (i(), c("div", lt, [
423
+ L(u(Me), ae({
427
424
  "current-page": C.value,
428
425
  "total-pages": n.pageInfo.totalPages,
429
426
  "total-items": n.pageInfo.totalItems
430
427
  }, n.paginationProps, {
431
428
  onChange: be,
432
- "onUpdate:itemsPerPage": we
429
+ "onUpdate:itemsPerPage": pe
433
430
  }), null, 16, ["current-page", "total-pages", "total-items"])
434
431
  ])) : E("", !0),
435
- W(Le, {
432
+ L(Ae, {
436
433
  show: $.value,
437
434
  "onUpdate:show": t[4] || (t[4] = (l) => $.value = l),
438
- title: Te.value,
439
- description: Be.value,
440
- "confirm-text": De.value,
441
- "cancel-text": Ee.value,
435
+ title: Be.value,
436
+ description: De.value,
437
+ "confirm-text": Ee.value,
438
+ "cancel-text": Re.value,
442
439
  variant: "danger",
443
- onConfirm: ye,
440
+ onConfirm: xe,
444
441
  onCancel: t[5] || (t[5] = (l) => $.value = !1)
445
442
  }, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"])
446
443
  ]));
447
444
  }
448
445
  });
449
446
  export {
450
- dt as default
447
+ ft as default
451
448
  };