vlite3 1.4.37 → 1.4.40

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