vlite3 0.7.13 → 0.7.15

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 (58) hide show
  1. package/components/Button.vue.js +1 -1
  2. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  3. package/components/ColorPicker/ColorPicker.vue.js +18 -17
  4. package/components/{CommandPaletteContent.vue.d.ts → CommandPalette/CommandPaletteContent.vue.d.ts} +3 -3
  5. package/components/CommandPalette/CommandPaletteContent.vue.js +7 -0
  6. package/components/CommandPalette/CommandPaletteContent.vue2.js +180 -0
  7. package/components/CommandPalette/CommandPaletteItem.vue.d.ts +15 -0
  8. package/components/CommandPalette/CommandPaletteItem.vue2.js +7 -0
  9. package/components/CommandPalette/CommandPaletteItem.vue3.js +60 -0
  10. package/components/CommandPalette/index.d.ts +5 -0
  11. package/components/CommandPalette/types.d.ts +40 -0
  12. package/components/CommandPalette/useCommandPaletteItems.d.ts +15 -0
  13. package/components/CommandPalette/useCommandPaletteItems.js +99 -0
  14. package/components/CommandPalette/useCommandPaletteNav.d.ts +13 -0
  15. package/components/CommandPalette/useCommandPaletteNav.js +49 -0
  16. package/components/DataList/DataList.vue.js +53 -50
  17. package/components/DataTable/DataTable.vue.js +185 -173
  18. package/components/DatePicker.vue.js +3 -2
  19. package/components/DateRangePicker.vue.js +26 -25
  20. package/components/Dropdown/Dropdown.vue.js +20 -20
  21. package/components/Dropdown/DropdownMenu.vue.js +5 -256
  22. package/components/Dropdown/DropdownMenu.vue2.js +256 -2
  23. package/components/Form/CustomFields.vue.js +1 -1
  24. package/components/Form/CustomFields.vue2.js +102 -97
  25. package/components/Form/Form.vue.d.ts +0 -1
  26. package/components/Form/Form.vue.js +2 -2
  27. package/components/Form/Form.vue2.js +20 -20
  28. package/components/Form/FormFields.vue.js +2 -2
  29. package/components/Form/FormFields.vue2.js +90 -78
  30. package/components/IconPicker.vue.js +3 -2
  31. package/components/ImportData/ImportStep2.vue.js +10 -9
  32. package/components/List/List.vue.js +205 -180
  33. package/components/Modal.vue.js +2 -2
  34. package/components/Modal.vue2.js +82 -96
  35. package/components/MultiSelect/MultiSelect.vue.js +7 -7
  36. package/components/Navbar/Navbar.vue.js +12 -12
  37. package/components/NavbarCommandPalette.vue.d.ts +7 -30
  38. package/components/NavbarCommandPalette.vue.js +40 -40
  39. package/components/PermissionMatrix/PermissionEditorList.vue.js +1 -1
  40. package/components/PermissionMatrix/PermissionEditorList.vue2.js +84 -75
  41. package/components/PermissionMatrix/PermissionEditorMatrix.vue.js +2 -2
  42. package/components/PermissionMatrix/PermissionEditorMatrix.vue2.js +122 -107
  43. package/components/PermissionMatrix/PermissionMatrix.vue.js +2 -2
  44. package/components/PermissionMatrix/PermissionMatrix.vue2.js +161 -138
  45. package/components/PermissionMatrix/PermissionTopBar.vue.js +19 -18
  46. package/components/Screen/Screen.vue.js +169 -166
  47. package/components/Screen/ScreenFilter.vue.js +4 -3
  48. package/components/SidePanel.vue.js +5 -146
  49. package/components/SidePanel.vue2.js +146 -2
  50. package/components/SidebarMenu/SidebarMenuItem.vue.js +26 -25
  51. package/components/Workbook/Sheet.vue.js +3 -2
  52. package/index.d.ts +1 -1
  53. package/index.js +1 -1
  54. package/package.json +1 -1
  55. package/style.css +1 -1
  56. package/components/CommandPaletteContent.vue.js +0 -7
  57. package/components/CommandPaletteContent.vue2.js +0 -311
  58. /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
@@ -1,24 +1,24 @@
1
- import { defineComponent as me, inject as ve, computed as r, ref as b, watch as h, openBlock as i, createElementBlock as u, createBlock as N, normalizeClass as C, createSlots as V, withCtx as k, renderSlot as I, createVNode as S, createCommentVNode as $, createElementVNode as f, Fragment as B, renderList as T, normalizeStyle as j, mergeProps as O, unref as L } from "vue";
2
- import he from "../CheckBox.vue.js";
3
- import ge from "../Button.vue.js";
4
- import pe from "../ConfirmationModal.vue.js";
5
- import be from "../Pagination/Pagination.vue.js";
6
- import ye from "../Empty/Empty.vue.js";
7
- import we from "./DataTableHeader.vue.js";
8
- import Pe from "./DataTableRow.vue.js";
9
- import Ce from "./DataTableToolbar.vue.js";
10
- import { $t as y } from "../../utils/i18n.js";
11
- import { SCREEN_CONTEXT_KEY as ke } from "./types.js";
12
- const Ie = { class: "space-y-6.5" }, Se = { class: "overflow-x-auto w-full" }, Te = { class: "hover:bg-transparent" }, De = {
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";
2
+ import we from "../CheckBox.vue.js";
3
+ import Pe from "../Button.vue.js";
4
+ import ke from "../ConfirmationModal.vue.js";
5
+ import Ce from "../Pagination/Pagination.vue.js";
6
+ import Se from "../Empty/Empty.vue.js";
7
+ import Ie from "./DataTableHeader.vue.js";
8
+ import Te from "./DataTableRow.vue.js";
9
+ import De from "./DataTableToolbar.vue.js";
10
+ import { $t as w } from "../../utils/i18n.js";
11
+ import { SCREEN_CONTEXT_KEY as xe } from "./types.js";
12
+ const $e = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, Ee = { class: "hover:bg-transparent" }, Re = {
13
13
  key: 0,
14
14
  scope: "col",
15
15
  class: "w-[48px] px-0 text-center font-medium text-muted-foreground",
16
16
  style: { width: "48px" }
17
- }, xe = { class: "flex items-center justify-center" }, $e = { class: "[&_tr:last-child]:border-0" }, Be = {
17
+ }, ze = { class: "flex items-center justify-center" }, Ae = { class: "[&_tr:last-child]:border-0" }, Ne = {
18
18
  key: 0,
19
19
  class: "w-[48px] px-0 py-4 align-middle text-center",
20
20
  style: { width: "48px" }
21
- }, Ee = { key: 2 }, Re = ["colspan"], ze = { key: 1 }, We = /* @__PURE__ */ me({
21
+ }, Ve = { key: 2 }, Me = ["colspan"], Ue = { key: 1 }, Je = /* @__PURE__ */ pe({
22
22
  __name: "DataTable",
23
23
  props: {
24
24
  rows: { default: () => [] },
@@ -57,280 +57,292 @@ const Ie = { class: "space-y-6.5" }, Se = { class: "overflow-x-auto w-full" }, T
57
57
  variant: { default: "default" }
58
58
  },
59
59
  emits: ["change", "select", "rowClick", "update:itemsPerPage", "update:selectedRows", "delete"],
60
- setup(o, { emit: Y }) {
61
- const W = (e, t) => {
60
+ setup(o, { emit: G }) {
61
+ const H = (e, t) => {
62
62
  if (!(!e || !t))
63
- return t.includes(".") ? t.split(".").reduce((l, s) => l?.[s], e) : e[t];
64
- }, m = (e, t) => W(e, t), X = (e, t) => {
63
+ return t.includes(".") ? t.split(".").reduce((l, n) => l?.[n], e) : e[t];
64
+ }, c = (e, t) => H(e, t), J = (e, t) => {
65
65
  const l = ["id", "_id"];
66
66
  if (t && t !== "auto") return t;
67
67
  if (e && e.length > 0) {
68
- for (const s of l)
69
- if (s in e[0]) return s;
68
+ for (const n of l)
69
+ if (n in e[0]) return n;
70
70
  }
71
71
  return "_id";
72
- }, q = (e) => e.sortKey || e.field, a = o, g = Y, E = ve(ke, null), U = r(() => E?.disableSearch ? !1 : a.showSearch), D = r(() => a.selectable || !!E?.forceSelectable), d = r(() => X(a.rows, a.keyField)), c = b({ field: "", order: "" }), w = b(
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.selectable || !!N?.forceSelectable), d = r(() => J(a.rows, a.keyField)), u = y({ field: "", order: "" }), P = y(
73
73
  a.pageInfo?.itemsPerPage || a.paginationProps?.itemsPerPage || 10
74
- ), v = b(a.pageInfo?.currentPage || 1), p = b(a.search || ""), P = b(!1), G = r(() => a.loading);
75
- h(
74
+ ), h = y(a.pageInfo?.currentPage || 1), p = y(a.search || ""), k = y(!1), Z = r(() => a.loading);
75
+ g(
76
76
  () => a.search,
77
77
  (e) => {
78
78
  e !== void 0 && e !== p.value && (p.value = e);
79
79
  }
80
80
  );
81
- let R = null;
82
- h(p, () => {
83
- R && clearTimeout(R), R = setTimeout(() => {
84
- v.value = 1, x();
81
+ let V = null;
82
+ g(p, () => {
83
+ V && clearTimeout(V), V = setTimeout(() => {
84
+ h.value = 1, R();
85
85
  }, 300);
86
- }), h(() => a.pageInfo?.itemsPerPage, (e) => {
87
- e !== void 0 && (w.value = e);
88
- }), h(() => a.paginationProps?.itemsPerPage, (e) => {
89
- e !== void 0 && (w.value = e);
90
- }), h(() => a.pageInfo?.currentPage, (e) => {
91
- e && (v.value = e);
86
+ }), g(() => a.pageInfo?.itemsPerPage, (e) => {
87
+ e !== void 0 && (P.value = e);
88
+ }), g(() => a.paginationProps?.itemsPerPage, (e) => {
89
+ e !== void 0 && (P.value = e);
90
+ }), g(() => a.pageInfo?.currentPage, (e) => {
91
+ e && (h.value = e);
92
92
  });
93
- const n = b(/* @__PURE__ */ new Set());
94
- h(
93
+ const s = y(/* @__PURE__ */ new Set());
94
+ g(
95
95
  () => a.selectedRows,
96
96
  (e) => {
97
- const t = new Set((e || []).map((l) => m(l, d.value)));
98
- (t.size !== n.value.size || [...t].some((l) => !n.value.has(l))) && (n.value = t);
97
+ const t = new Set((e || []).map((l) => c(l, d.value)));
98
+ (t.size !== s.value.size || [...t].some((l) => !s.value.has(l))) && (s.value = t);
99
99
  },
100
100
  { immediate: !0, deep: !0 }
101
101
  );
102
- const z = r(
103
- () => a.rows.length > 0 && a.rows.every((e) => n.value.has(m(e, d.value)))
104
- ), F = r(() => n.value.size > 0 && !z.value), H = r(() => {
102
+ const M = r(
103
+ () => a.rows.length > 0 && a.rows.every((e) => s.value.has(c(e, d.value)))
104
+ ), O = r(() => s.value.size > 0 && !M.value), _ = r(() => {
105
105
  const e = [...a.selectedRows || [], ...a.rows], t = /* @__PURE__ */ new Map();
106
- return e.forEach((l) => t.set(m(l, d.value), l)), Array.from(n.value).map((l) => t.get(l)).filter(Boolean);
107
- }), J = (e) => {
108
- e ? a.rows.forEach((t) => n.value.add(m(t, d.value))) : a.rows.forEach((t) => n.value.delete(m(t, d.value))), K();
109
- }, Q = (e) => {
110
- n.value.has(e) ? n.value.delete(e) : n.value.add(e), K();
111
- }, K = () => {
106
+ return e.forEach((l) => t.set(c(l, d.value), l)), Array.from(s.value).map((l) => t.get(l)).filter(Boolean);
107
+ }), ee = (e) => {
108
+ const t = new Set(s.value);
109
+ e ? a.rows.forEach((l) => t.add(c(l, d.value))) : a.rows.forEach((l) => t.delete(c(l, d.value))), s.value = t, L();
110
+ }, te = (e) => {
111
+ const t = new Set(s.value);
112
+ t.has(e) ? t.delete(e) : t.add(e), s.value = t, L();
113
+ }, L = () => {
112
114
  const e = /* @__PURE__ */ new Set(), t = [];
113
115
  a.rows.forEach((l) => {
114
- const s = m(l, d.value);
115
- n.value.has(s) && (t.push(l), e.add(s));
116
+ const n = c(l, d.value);
117
+ s.value.has(n) && (t.push(l), e.add(n));
116
118
  }), (a.selectedRows || []).forEach((l) => {
117
- const s = m(l, d.value);
118
- !e.has(s) && n.value.has(s) && (t.push(l), e.add(s));
119
- }), g("select", { selected: t, all: z.value, indeterminate: F.value }), g("update:selectedRows", t);
120
- }, Z = (e) => {
121
- const t = a.headers.find((s) => s.field === e), l = t ? q(t) : e;
122
- c.value.field === l ? c.value.order === "asc" ? c.value.order = "desc" : c.value.order === "desc" ? (c.value.order = "", c.value.field = "") : c.value.order = "asc" : (c.value.field = l, c.value.order = "asc"), v.value = 1, x();
123
- }, _ = (e) => {
124
- v.value = e, x();
125
- }, ee = (e) => {
126
- w.value = e, v.value = 1, g("update:itemsPerPage", e), x();
127
- }, te = (e) => g("rowClick", e), le = () => {
128
- g("delete", H.value), P.value = !1;
119
+ const n = c(l, d.value);
120
+ !e.has(n) && s.value.has(n) && (t.push(l), e.add(n));
121
+ }), b("select", { selected: t, all: M.value, indeterminate: O.value }), b("update:selectedRows", t);
122
+ }, le = (e) => {
123
+ const t = a.headers.find((n) => n.field === e), l = t ? Q(t) : e;
124
+ 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();
125
+ }, ae = (e) => {
126
+ h.value = e, R();
127
+ }, oe = (e) => {
128
+ P.value = e, h.value = 1, b("update:itemsPerPage", e), R();
129
+ }, se = (e) => b("rowClick", e), ne = () => {
130
+ b("delete", _.value), k.value = !1;
129
131
  };
130
- let A = null;
131
- const x = () => {
132
- A && clearTimeout(A), A = setTimeout(() => {
132
+ let U = null;
133
+ const R = () => {
134
+ U && clearTimeout(U), U = setTimeout(() => {
133
135
  const e = {
134
- pagination: { page: v.value, limit: w.value },
135
- sort: { ...c.value },
136
+ pagination: { page: h.value, limit: P.value },
137
+ sort: { ...u.value },
136
138
  search: p.value,
137
139
  filter: {}
138
140
  };
139
- g("change", e), E?.onTableChange?.(e);
141
+ b("change", e), N?.onTableChange?.(e);
140
142
  }, 10);
141
143
  };
142
- h(
144
+ g(
143
145
  () => a.rows,
144
146
  () => {
145
- const e = new Set(a.rows.map((t) => m(t, d.value)));
146
- n.value = new Set([...n.value].filter((t) => e.has(t)));
147
+ const e = new Set(a.rows.map((t) => c(t, d.value)));
148
+ s.value = new Set([...s.value].filter((t) => e.has(t)));
147
149
  }
148
150
  );
149
- const ae = r(() => [
151
+ const re = r(() => [
150
152
  "w-full flex flex-col",
151
153
  a.variant === "raised" ? "bg-background shadow-sm p-2 rounded-lg" : "bg-background rounded",
152
154
  "overflow-hidden",
153
155
  a.bordered ? "border border-border" : "",
154
156
  a.class
155
- ].join(" ")), oe = r(() => ["w-full caption-bottom -text-fs-1", a.tableClass].join(" ")), se = (e) => e.width || "auto", ne = r(() => a.emptyTitleI18n ? y(a.emptyTitleI18n) : a.emptyTitle), re = r(() => a.emptyDescriptionI18n ? y(a.emptyDescriptionI18n) : a.emptyDescription), ie = r(() => {
156
- const e = y("vlite.dataTable.confirmDeleteTitle");
157
+ ].join(" ")), ie = r(() => ["w-full caption-bottom -text-fs-1", a.tableClass].join(" ")), de = (e) => e.width || "auto", ce = r(() => a.emptyTitleI18n ? w(a.emptyTitleI18n) : a.emptyTitle), ue = r(() => a.emptyDescriptionI18n ? w(a.emptyDescriptionI18n) : a.emptyDescription), me = r(() => {
158
+ const e = w("vlite.dataTable.confirmDeleteTitle");
157
159
  return e !== "vlite.dataTable.confirmDeleteTitle" ? e : "Confirm Deletion";
158
- }), de = r(() => {
159
- const e = y("vlite.dataTable.confirmDeleteDesc");
160
+ }), fe = r(() => {
161
+ const e = w("vlite.dataTable.confirmDeleteDesc");
160
162
  return e !== "vlite.dataTable.confirmDeleteDesc" ? e : "Are you sure you want to delete the selected items?";
161
- }), ce = r(() => {
162
- const e = y("vlite.dataTable.deleteBtn");
163
+ }), ve = r(() => {
164
+ const e = w("vlite.dataTable.deleteBtn");
163
165
  return e !== "vlite.dataTable.deleteBtn" ? e : "Delete";
164
- }), ue = r(() => {
165
- const e = y("vlite.dataTable.cancelBtn");
166
+ }), he = r(() => {
167
+ const e = w("vlite.dataTable.cancelBtn");
166
168
  return e !== "vlite.dataTable.cancelBtn" ? e : "Cancel";
167
169
  });
168
- return (e, t) => (i(), u("div", Ie, [
169
- U.value || e.$slots?.["toolbar-left"] || e.$slots?.["toolbar-right"] ? (i(), N(Ce, {
170
+ return (e, t) => (i(), m("div", $e, [
171
+ j.value || e.$slots?.["toolbar-left"] || e.$slots?.["toolbar-right"] ? (i(), F(De, {
170
172
  key: 0,
171
173
  modelValue: p.value,
172
174
  "onUpdate:modelValue": t[1] || (t[1] = (l) => p.value = l),
173
- "show-search": U.value,
175
+ "show-search": j.value,
174
176
  placeholder: o.searchPlaceholder,
175
177
  placeholderI18n: o.searchPlaceholderI18n,
176
- class: C(o.toolbarClass),
178
+ class: T(o.toolbarClass),
177
179
  "search-class": o.toolbarSearchClass
178
- }, V({ _: 2 }, [
180
+ }, K({ _: 2 }, [
179
181
  e.$slots?.["toolbar-left"] ? {
180
182
  name: "left",
181
- fn: k(() => [
182
- I(e.$slots, "toolbar-left")
183
+ fn: D(() => [
184
+ x(e.$slots, "toolbar-left")
183
185
  ]),
184
186
  key: "0"
185
187
  } : void 0,
186
- n.value.size > 0 ? {
188
+ s.value.size > 0 ? {
187
189
  name: "delete",
188
- fn: k(() => [
189
- S(ge, {
190
+ fn: D(() => [
191
+ $(Pe, {
190
192
  rounded: "full",
191
193
  variant: "outline",
192
194
  size: "lg",
193
195
  icon: "lucide:trash-2",
194
- onClick: t[0] || (t[0] = (l) => P.value = !0)
196
+ onClick: t[0] || (t[0] = (l) => k.value = !0)
195
197
  })
196
198
  ]),
197
199
  key: "1"
198
200
  } : void 0,
199
201
  e.$slots?.["toolbar-right"] ? {
200
202
  name: "right",
201
- fn: k(() => [
202
- I(e.$slots, "toolbar-right")
203
+ fn: D(() => [
204
+ x(e.$slots, "toolbar-right")
203
205
  ]),
204
206
  key: "2"
205
207
  } : void 0
206
- ]), 1032, ["modelValue", "show-search", "placeholder", "placeholderI18n", "class", "search-class"])) : $("", !0),
208
+ ]), 1032, ["modelValue", "show-search", "placeholder", "placeholderI18n", "class", "search-class"])) : z("", !0),
207
209
  f("div", {
208
- class: C(ae.value)
210
+ class: T(re.value)
209
211
  }, [
210
- f("div", Se, [
212
+ f("div", Be, [
211
213
  f("table", {
212
- class: C([oe.value, "data-table"])
214
+ class: T([ie.value, "data-table"])
213
215
  }, [
214
216
  f("thead", {
215
- class: C([
217
+ class: T([
216
218
  "[&_tr]:border-b [&_tr]:border-border bg-muted",
217
219
  o.variant === "raised" ? "[&_th:first-child]:rounded-tl-lg [&_th:last-child]:rounded-tr-lg" : ""
218
220
  ])
219
221
  }, [
220
- f("tr", Te, [
221
- D.value ? (i(), u("th", De, [
222
- f("div", xe, [
223
- S(he, {
224
- "model-value": z.value,
225
- indeterminate: F.value,
222
+ f("tr", Ee, [
223
+ E.value ? (i(), m("th", Re, [
224
+ f("div", ze, [
225
+ $(we, {
226
+ "model-value": M.value,
227
+ indeterminate: O.value,
226
228
  size: "xs",
227
- "onUpdate:modelValue": J
229
+ "onUpdate:modelValue": ee
228
230
  }, null, 8, ["model-value", "indeterminate"])
229
231
  ])
230
- ])) : $("", !0),
231
- (i(!0), u(B, null, T(o.headers, (l) => (i(), N(we, {
232
+ ])) : z("", !0),
233
+ (i(!0), m(A, null, B(o.headers, (l) => (i(), F(Ie, {
232
234
  key: l.field,
233
235
  header: l,
234
- "sort-config": c.value,
236
+ "sort-config": u.value,
235
237
  compact: o.compact,
236
238
  "table-sortable": o.sortable,
237
- onSort: Z,
239
+ onSort: le,
238
240
  class: "last:pr-5!",
239
- style: j({ width: se(l) })
241
+ style: Y({ width: de(l) })
240
242
  }, null, 8, ["header", "sort-config", "compact", "table-sortable", "style"]))), 128))
241
243
  ])
242
244
  ], 2),
243
- f("tbody", $e, [
244
- G.value ? (i(!0), u(B, { key: 0 }, T(Math.min(w.value, 15), (l) => (i(), u("tr", {
245
- key: "skeleton-" + l,
246
- class: "border-b border-border/70 bg-background transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
247
- }, [
248
- D.value ? (i(), u("td", Be, [...t[4] || (t[4] = [
249
- f("div", { class: "flex items-center justify-center" }, [
250
- f("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
251
- ], -1)
252
- ])])) : $("", !0),
253
- (i(!0), u(B, null, T(o.headers, (s) => (i(), u("td", {
254
- key: s.field,
255
- class: C(["p-5! align-middle last:pr-6!", [s.hideOnMobile ? "hidden md:table-cell" : ""]])
245
+ f("tbody", Ae, [
246
+ Z.value ? (i(!0), m(A, { key: 0 }, B(Math.min(P.value, 15), (l, n, ge, v) => {
247
+ const C = [];
248
+ if (v && v.key === "skeleton-" + l && W(v, C)) return v;
249
+ const S = (i(), m("tr", {
250
+ key: "skeleton-" + l,
251
+ class: "border-b border-border/70 bg-background transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
256
252
  }, [
257
- f("div", {
258
- class: "rounded-md bg-muted/50 animate-pulse h-4",
259
- style: j({ width: `${50 + Math.random() * 40}%` })
260
- }, null, 4)
261
- ], 2))), 128))
262
- ]))), 128)) : o.rows.length > 0 ? (i(!0), u(B, { key: 1 }, T(o.rows, (l, s) => (i(), N(Pe, {
263
- key: m(l, d.value),
264
- row: l,
265
- headers: o.headers,
266
- index: s,
267
- "key-field": d.value,
268
- selectable: D.value,
269
- "is-selected": n.value.has(m(l, d.value)),
270
- hoverable: o.hoverable,
271
- striped: o.striped,
272
- compact: o.compact,
273
- onSelect: Q,
274
- onRowClick: te,
275
- class: "[&_td:last-child]:pr-3.5!"
276
- }, V({ _: 2 }, [
277
- T(o.headers, (M) => ({
278
- name: M.field,
279
- fn: k((fe) => [
280
- I(e.$slots, M.field, O({ ref_for: !0 }, fe))
281
- ])
282
- }))
283
- ]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact"]))), 128)) : (i(), u("tr", Ee, [
253
+ E.value ? (i(), m("td", Ne, [...t[8] || (t[8] = [
254
+ f("div", { class: "flex items-center justify-center" }, [
255
+ f("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
256
+ ], -1)
257
+ ])])) : z("", !0),
258
+ (i(!0), m(A, null, B(o.headers, (I) => (i(), m("td", {
259
+ key: I.field,
260
+ class: T(["p-5! align-middle last:pr-6!", [I.hideOnMobile ? "hidden md:table-cell" : ""]])
261
+ }, [
262
+ f("div", {
263
+ class: "rounded-md bg-muted/50 animate-pulse h-4",
264
+ style: Y({ width: `${50 + Math.random() * 40}%` })
265
+ }, null, 4)
266
+ ], 2))), 128))
267
+ ]));
268
+ return S.memo = C, S;
269
+ }, t, 2), 128)) : o.rows.length > 0 ? (i(!0), m(A, { key: 1 }, B(o.rows, (l, n, ge, v) => {
270
+ const C = [l, s.value.has(c(l, d.value)), o.compact, o.striped, o.hoverable];
271
+ if (v && v.key === c(l, d.value) && W(v, C)) return v;
272
+ const S = (i(), F(Te, {
273
+ key: c(l, d.value),
274
+ row: l,
275
+ headers: o.headers,
276
+ index: n,
277
+ "key-field": d.value,
278
+ selectable: E.value,
279
+ "is-selected": s.value.has(c(l, d.value)),
280
+ hoverable: o.hoverable,
281
+ striped: o.striped,
282
+ compact: o.compact,
283
+ onSelect: te,
284
+ onRowClick: se,
285
+ class: "[&_td:last-child]:pr-3.5!"
286
+ }, K({ _: 2 }, [
287
+ B(o.headers, (I) => ({
288
+ name: I.field,
289
+ fn: D((be) => [
290
+ x(e.$slots, I.field, X({ ref_for: !0 }, be))
291
+ ])
292
+ }))
293
+ ]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact"]));
294
+ return S.memo = C, S;
295
+ }, t, 4), 128)) : (i(), m("tr", Ve, [
284
296
  f("td", {
285
- colspan: D.value ? o.headers.length + 1 : o.headers.length,
297
+ colspan: E.value ? o.headers.length + 1 : o.headers.length,
286
298
  class: "align-middle hover:bg-transparent"
287
299
  }, [
288
- I(e.$slots, "empty", {}, () => [
289
- S(L(ye), {
290
- title: ne.value,
291
- description: re.value,
300
+ x(e.$slots, "empty", {}, () => [
301
+ $(q(Se), {
302
+ title: ce.value,
303
+ description: ue.value,
292
304
  icon: o.emptyIcon,
293
305
  class: "border-none! bg-transparent! py-16!"
294
- }, V({ _: 2 }, [
306
+ }, K({ _: 2 }, [
295
307
  e.$slots["empty-action"] ? {
296
308
  name: "action",
297
- fn: k(() => [
298
- I(e.$slots, "empty-action")
309
+ fn: D(() => [
310
+ x(e.$slots, "empty-action")
299
311
  ]),
300
312
  key: "0"
301
313
  } : void 0
302
314
  ]), 1032, ["title", "description", "icon"])
303
315
  ])
304
- ], 8, Re)
316
+ ], 8, Me)
305
317
  ]))
306
318
  ])
307
319
  ], 2)
308
320
  ])
309
321
  ], 2),
310
- o.showPagination && o.pageInfo && o.pageInfo.totalPages > 1 ? (i(), u("div", ze, [
311
- S(L(be), O({
312
- "current-page": v.value,
322
+ o.showPagination && o.pageInfo && o.pageInfo.totalPages > 1 ? (i(), m("div", Ue, [
323
+ $(q(Ce), X({
324
+ "current-page": h.value,
313
325
  "total-pages": o.pageInfo.totalPages,
314
326
  "total-items": o.pageInfo.totalItems
315
327
  }, o.paginationProps, {
316
- onChange: _,
317
- "onUpdate:itemsPerPage": ee
328
+ onChange: ae,
329
+ "onUpdate:itemsPerPage": oe
318
330
  }), null, 16, ["current-page", "total-pages", "total-items"])
319
- ])) : $("", !0),
320
- S(pe, {
321
- show: P.value,
322
- "onUpdate:show": t[2] || (t[2] = (l) => P.value = l),
323
- title: ie.value,
324
- description: de.value,
325
- "confirm-text": ce.value,
326
- "cancel-text": ue.value,
331
+ ])) : z("", !0),
332
+ $(ke, {
333
+ show: k.value,
334
+ "onUpdate:show": t[6] || (t[6] = (l) => k.value = l),
335
+ title: me.value,
336
+ description: fe.value,
337
+ "confirm-text": ve.value,
338
+ "cancel-text": he.value,
327
339
  variant: "danger",
328
- onConfirm: le,
329
- onCancel: t[3] || (t[3] = (l) => P.value = !1)
340
+ onConfirm: ne,
341
+ onCancel: t[7] || (t[7] = (l) => k.value = !1)
330
342
  }, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"])
331
343
  ]));
332
344
  }
333
345
  });
334
346
  export {
335
- We as default
347
+ Je as default
336
348
  };
@@ -4,9 +4,10 @@ import w from "./Dropdown/Dropdown.vue.js";
4
4
  import "@iconify/vue";
5
5
  import { $t as y } from "../utils/i18n.js";
6
6
  /* empty css */
7
+ /* empty css */
7
8
  import I, { TimePicker as z } from "v-datepicker-lite";
8
9
  import "v-datepicker-lite/style.css";
9
- const S = { class: "overflow-hidden min-w-[300px]" }, U = /* @__PURE__ */ P({
10
+ const S = { class: "overflow-hidden min-w-[300px]" }, E = /* @__PURE__ */ P({
10
11
  __name: "DatePicker",
11
12
  props: {
12
13
  placeholder: {},
@@ -129,5 +130,5 @@ const S = { class: "overflow-hidden min-w-[300px]" }, U = /* @__PURE__ */ P({
129
130
  }
130
131
  });
131
132
  export {
132
- U as default
133
+ E as default
133
134
  };