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,40 +1,40 @@
1
- import { defineComponent as $e, useSlots as Ie, computed as i, ref as y, provide as z, watch as H, resolveComponent as Te, openBlock as a, createElementBlock as s, normalizeClass as A, createElementVNode as x, renderSlot as w, toDisplayString as m, createBlock as c, withCtx as d, createVNode as u, createCommentVNode as f, unref as p, resolveDynamicComponent as K, Fragment as P, mergeProps as v, createTextVNode as B, renderList as Ve } from "vue";
2
- import Re from "../Input.vue.js";
1
+ import { defineComponent as Ve, useSlots as Re, computed as i, ref as y, markRaw as H, provide as K, watch as J, resolveComponent as Ee, openBlock as a, createElementBlock as s, normalizeClass as N, createElementVNode as w, renderSlot as p, toDisplayString as m, createBlock as c, withCtx as d, createVNode as u, createCommentVNode as f, unref as x, resolveDynamicComponent as Q, Fragment as P, mergeProps as v, createTextVNode as B, renderList as Ae } from "vue";
2
+ import je from "../Input.vue.js";
3
3
  /* empty css */
4
4
  import h from "../Button.vue.js";
5
- import N from "../Icon.vue.js";
6
- import Ee from "../Tooltip.vue.js";
7
- import J from "../Modal.vue.js";
8
- import Oe from "../ConfirmationModal.vue.js";
9
- import je from "../Pagination/Pagination.vue.js";
10
- import Ae from "../Empty/Empty.vue.js";
11
- import Ne from "./ScreenFilter.vue.js";
12
- import Fe from "../Dropdown/Dropdown.vue.js";
13
- import Le from "../ExportData/ExportData.vue.js";
14
- import Me from "../ImportData/ImportData.vue.js";
15
- import { usePersistentState as Ue } from "../../utils/usePersistentState.js";
16
- import { useVLiteConfig as qe } from "../../core/config.js";
5
+ import F from "../Icon.vue.js";
6
+ import Oe from "../Tooltip.vue.js";
7
+ import X from "../Modal.vue.js";
8
+ import Ne from "../ConfirmationModal.vue.js";
9
+ import Fe from "../Pagination/Pagination.vue.js";
10
+ import Me from "../Empty/Empty.vue.js";
11
+ import Le from "./ScreenFilter.vue.js";
12
+ import Ue from "../Dropdown/Dropdown.vue.js";
13
+ import qe from "../ExportData/ExportData.vue.js";
14
+ import ze from "../ImportData/ImportData.vue.js";
15
+ import { usePersistentState as He } from "../../utils/usePersistentState.js";
16
+ import { useVLiteConfig as Ke } from "../../core/config.js";
17
17
  import { $t as r } from "../../utils/i18n.js";
18
- import { SCREEN_CONTEXT_KEY as ze } from "../DataTable/types.js";
19
- const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex-col shrink-0" }, Je = {
18
+ import { SCREEN_CONTEXT_KEY as Je } from "../DataTable/types.js";
19
+ const Qe = { class: "flex flex-col w-full space-y-8" }, Xe = { class: "flex flex-col shrink-0" }, Ye = {
20
20
  key: 0,
21
21
  class: "flex items-center! gap-2"
22
- }, Qe = { class: "text-fs-7.5 font-bold text-foreground" }, Xe = {
22
+ }, Ge = { class: "text-fs-7.5 font-bold text-foreground" }, We = {
23
23
  key: 0,
24
24
  class: "text-sm text-gray-700 mt-1 md:max-w-[450px]"
25
- }, Ye = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-2.5 w-full justify-end" }, Ge = { class: "flex items-center gap-2 w-full sm:w-auto flex-1 md:flex-none justify-start sm:justify-end" }, We = {
25
+ }, Ze = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-2.5 w-full justify-end" }, _e = { class: "flex items-center gap-2 w-full sm:w-auto flex-1 md:flex-none justify-start sm:justify-end" }, et = {
26
26
  key: 1,
27
27
  class: "flex items-center p-1 rounded-md border border-border shrink-0"
28
- }, Ze = ["title"], _e = ["title"], et = {
28
+ }, tt = ["title"], lt = ["title"], at = {
29
29
  key: 4,
30
30
  class: "w-full md:w-60! max-sm:order-last"
31
- }, tt = { class: "flex items-center gap-3 max-sm:w-full sm:w-auto max-sm:order-last" }, lt = ["href", "target"], at = ["href", "target"], nt = {
31
+ }, nt = { class: "flex items-center gap-3 max-sm:w-full sm:w-auto max-sm:order-last" }, ot = ["href", "target"], it = ["href", "target"], rt = {
32
32
  key: 4,
33
33
  class: "p-8 text-center text-muted-foreground border border-dashed border-border rounded-lg"
34
- }, ot = {
34
+ }, dt = {
35
35
  key: 2,
36
36
  class: "-mt-2"
37
- }, it = { class: "px-1 py-1 text-sm" }, rt = { class: "font-medium mb-3 text-muted-foreground" }, dt = { class: "space-y-3" }, st = { key: 4 }, It = /* @__PURE__ */ $e({
37
+ }, st = { class: "px-1 py-1 text-sm" }, ct = { class: "font-medium mb-3 text-muted-foreground" }, ut = { class: "space-y-3" }, ft = { key: 4 }, Rt = /* @__PURE__ */ Ve({
38
38
  __name: "Screen",
39
39
  props: {
40
40
  name: { default: "" },
@@ -83,83 +83,86 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
83
83
  canSelectRows: { type: Boolean, default: !0 }
84
84
  },
85
85
  emits: ["add", "delete"],
86
- setup(t, { emit: te }) {
87
- const l = t, S = qe(), Q = te, V = Ie(), le = i(() => l.name || l.title || "default-screen"), k = Ue(
88
- `view-mode-${le.value}`,
86
+ setup(t, { emit: ne }) {
87
+ const l = t, S = Ke(), Y = ne, V = Re(), oe = i(() => l.name || l.title || "default-screen"), k = He(
88
+ `view-mode-${oe.value}`,
89
89
  l.table || V.table ? "table" : "list"
90
- ), $ = y(""), R = y({}), X = y({ field: "", order: "" }), I = y(l.pageInfo?.currentPage || 1), F = y(l.pageInfo?.itemsPerPage || l.paginationProps?.itemsPerPage || 10), g = y([]), E = y([]), T = y(!1), ae = {
90
+ ), $ = y(""), R = y({}), G = y({ field: "", order: "" }), I = y(l.pageInfo?.currentPage || 1), M = y(l.pageInfo?.itemsPerPage || l.paginationProps?.itemsPerPage || 10), g = y([]), E = y([]), T = y(!1), A = i(() => l.addComponent ? H(l.addComponent) : void 0), W = i(() => l.addBtn?.modal ? H(l.addBtn.modal) : void 0), Z = i(() => {
91
+ let e;
92
+ return k.value === "table" ? e = l.table || !!V.table : e = l.list || !!V.list || !!V.grid, typeof e == "object" && e !== null ? H(e) : e;
93
+ }), ie = {
91
94
  disableSearch: !0,
92
95
  forceSelectable: l.canSelectRows,
93
96
  onTableChange: (e) => {
94
- X.value = { field: e.sort.field, order: e.sort.order }, C();
97
+ G.value = { field: e.sort.field, order: e.sort.order }, C();
95
98
  }
96
99
  };
97
- z(ze, ae), z("screen-selected-rows", g), z("screen-request-delete", (e) => D(e));
100
+ K(Je, ie), K("screen-selected-rows", g), K("screen-request-delete", (e) => D(e));
98
101
  const D = (e) => {
99
102
  E.value = e, T.value = !0;
100
- }, ne = () => {
101
- Q("delete", E.value), T.value = !1, g.value = [];
102
- }, oe = (e) => {
103
- Q("delete", e), g.value = [];
103
+ }, re = () => {
104
+ Y("delete", E.value), T.value = !1, g.value = [];
105
+ }, de = (e) => {
106
+ Y("delete", e), g.value = [];
104
107
  };
105
- H(
108
+ J(
106
109
  () => l.pageInfo?.currentPage,
107
110
  (e) => {
108
111
  e && (I.value = e);
109
112
  }
110
- ), H(
113
+ ), J(
111
114
  () => l.pageInfo?.itemsPerPage,
112
115
  (e) => {
113
- e && (F.value = e);
116
+ e && (M.value = e);
114
117
  }
115
118
  );
116
119
  let L = null;
117
- H($, () => {
120
+ J($, () => {
118
121
  L && clearTimeout(L), L = setTimeout(() => {
119
122
  I.value = 1, C();
120
123
  }, 300);
121
124
  });
122
- const ie = (e) => {
125
+ const se = (e) => {
123
126
  I.value = e, C();
124
- }, re = (e) => {
125
- F.value = e, I.value = 1, C();
127
+ }, ce = (e) => {
128
+ M.value = e, I.value = 1, C();
126
129
  }, C = () => {
127
130
  l.refetch && l.refetch({
128
- pagination: { page: I.value, limit: F.value },
131
+ pagination: { page: I.value, limit: M.value },
129
132
  search: $.value,
130
- sort: { ...X.value },
133
+ sort: { ...G.value },
131
134
  filter: { ...R.value }
132
135
  });
133
- }, Y = i(() => k.value === "table" ? l.table || !!V.table : l.list || !!V.list || !!V.grid), de = i(() => l.data && l.data.length > 0), G = i(() => l.titleI18n ? r(l.titleI18n) : l.title), W = i(
136
+ }, ue = i(() => l.data && l.data.length > 0), _ = i(() => l.titleI18n ? r(l.titleI18n) : l.title), ee = i(
134
137
  () => l.descriptionI18n ? r(l.descriptionI18n) : l.description
135
- ), se = i(() => {
138
+ ), fe = i(() => {
136
139
  const e = r("vlite.screen.deleteSelected");
137
140
  return e !== "vlite.screen.deleteSelected" ? e : "Delete Selected";
138
- }), ce = i(() => {
141
+ }), me = i(() => {
139
142
  const e = r("vlite.screen.listView");
140
143
  return e !== "vlite.screen.listView" ? e : "List View";
141
- }), ue = i(() => {
144
+ }), ve = i(() => {
142
145
  const e = r("vlite.screen.tableView");
143
146
  return e !== "vlite.screen.tableView" ? e : "Table View";
144
- }), fe = i(() => {
147
+ }), ge = i(() => {
145
148
  const e = r("vlite.screen.refresh");
146
149
  return e !== "vlite.screen.refresh" ? e : "Refresh";
147
- }), me = i(() => {
150
+ }), he = i(() => {
148
151
  const e = r("vlite.screen.searchPlaceholder");
149
152
  return e !== "vlite.screen.searchPlaceholder" ? e : "Search...";
150
- }), ve = i(() => {
153
+ }), ye = i(() => {
151
154
  const e = r("vlite.screen.confirmDeleteTitle");
152
155
  return e !== "vlite.screen.confirmDeleteTitle" ? e : "Confirm Deletion";
153
- }), ge = i(() => {
156
+ }), we = i(() => {
154
157
  const e = r("vlite.screen.confirmDeleteDesc", { count: E.value.length });
155
158
  return e !== "vlite.screen.confirmDeleteDesc" ? e : `Are you sure you want to delete the selected ${E.value.length > 1 ? "items" : "item"}?`;
156
- }), he = i(() => {
159
+ }), pe = i(() => {
157
160
  const e = r("vlite.screen.confirmDeleteBtn");
158
161
  return e !== "vlite.screen.confirmDeleteBtn" ? e : "Delete";
159
- }), ye = i(() => {
162
+ }), xe = i(() => {
160
163
  const e = r("vlite.screen.cancelBtn");
161
164
  return e !== "vlite.screen.cancelBtn" ? e : "Cancel";
162
- }), xe = i(() => {
165
+ }), be = i(() => {
163
166
  const e = r("vlite.screen.missingView");
164
167
  return e !== "vlite.screen.missingView" ? e : "Please provide a `:list` or `:table` component or slot.";
165
168
  }), b = i(() => {
@@ -167,31 +170,31 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
167
170
  if (l.addBtn?.label) return l.addBtn.label;
168
171
  const e = r("vlite.screen.addNew");
169
172
  return e !== "vlite.screen.addNew" ? e : "Add New";
170
- }), Z = i(
173
+ }), te = i(
171
174
  () => l.exportSchema && l.exportSchema.length > 0 && l.exportProps !== !1 || l.importSchema && l.importSchema.length > 0 && l.importProps !== !1
172
- ), M = i(() => {
175
+ ), U = i(() => {
173
176
  const e = r("vlite.screen.exportData");
174
177
  return e !== "vlite.screen.exportData" ? e : "Export Data";
175
- }), _ = i(() => {
178
+ }), le = i(() => {
176
179
  const e = r("vlite.screen.importData");
177
180
  return e !== "vlite.screen.importData" ? e : "Import Data";
178
- }), we = i(() => {
181
+ }), Be = i(() => {
179
182
  const e = [];
180
- return l.exportProps !== !1 && e.push({ value: "export", label: M.value, icon: "lucide:download" }), l.importProps !== !1 && e.push({ value: "import", label: _.value, icon: "lucide:upload" }), e;
181
- }), U = y(null), pe = y(null), O = y(!1), q = y(!1), be = (e) => {
182
- e.value === "export" ? O.value = !0 : e.value === "import" && (q.value = !0);
183
- }, Be = i(
183
+ return l.exportProps !== !1 && e.push({ value: "export", label: U.value, icon: "lucide:download" }), l.importProps !== !1 && e.push({ value: "import", label: le.value, icon: "lucide:upload" }), e;
184
+ }), q = y(null), ke = y(null), j = y(!1), z = y(!1), Ce = (e) => {
185
+ e.value === "export" ? j.value = !0 : e.value === "import" && (z.value = !0);
186
+ }, De = i(
184
187
  () => (l.exportSchema || []).map((e) => ({
185
188
  field: e.name || e.field,
186
189
  title: e.label || e.title || e.name || e.field
187
190
  }))
188
- ), ke = i(
191
+ ), Pe = i(
189
192
  () => (l.importSchema || []).map((e) => ({
190
193
  field: e.name || e.field,
191
194
  title: e.label || e.title || e.name || e.field,
192
195
  required: e.required || !1
193
196
  }))
194
- ), Ce = async (e) => S?.services?.importApi && l.importType ? await S.services.importApi(l.importType, e) : (console.warn(
197
+ ), Se = async (e) => S?.services?.importApi && l.importType ? await S.services.importApi(l.importType, e) : (console.warn(
195
198
  "VLite Screen: No importApi configured or no importType provided for generic import."
196
199
  ), {
197
200
  processed: e.data.length,
@@ -200,9 +203,9 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
200
203
  skipped: 0,
201
204
  failed: 0,
202
205
  errors: []
203
- }), De = () => C(), Pe = i(
206
+ }), $e = () => C(), Ie = i(
204
207
  () => l.exportMode || S?.exportData?.mode || "frontend"
205
- ), Se = async (e) => {
208
+ ), Te = async (e) => {
206
209
  S?.services?.exportApi && l.exportType ? await S.services.exportApi(l.exportType, {
207
210
  format: e,
208
211
  search: $.value,
@@ -212,24 +215,24 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
212
215
  );
213
216
  };
214
217
  return (e, n) => {
215
- const ee = Te("router-link");
216
- return a(), s("div", He, [
217
- t.customHeader ? w(e.$slots, "custom-header", { key: 1 }) : (a(), s("div", {
218
+ const ae = Ee("router-link");
219
+ return a(), s("div", Qe, [
220
+ t.customHeader ? p(e.$slots, "custom-header", { key: 1 }) : (a(), s("div", {
218
221
  key: 0,
219
- class: A([t.headerClass, "flex flex-col md:flex-row sm:items-start md:items-center justify-between gap-4"])
222
+ class: N([t.headerClass, "flex flex-col md:flex-row sm:items-start md:items-center justify-between gap-4"])
220
223
  }, [
221
- x("div", Ke, [
222
- w(e.$slots, "title", {}, () => [
223
- G.value ? (a(), s("div", Je, [
224
- x("h1", Qe, m(G.value), 1),
225
- t.info || t.infoI18n ? (a(), c(Ee, {
224
+ w("div", Xe, [
225
+ p(e.$slots, "title", {}, () => [
226
+ _.value ? (a(), s("div", Ye, [
227
+ w("h1", Ge, m(_.value), 1),
228
+ t.info || t.infoI18n ? (a(), c(Oe, {
226
229
  key: 0,
227
230
  content: t.info,
228
231
  "content-i18n": t.infoI18n,
229
232
  placement: "right"
230
233
  }, {
231
234
  default: d(() => [
232
- u(N, {
235
+ u(F, {
233
236
  icon: "lucide:info",
234
237
  class: "w-[18px] h-[18px] mt-3! text-muted-foreground hover:text-foreground cursor-pointer transition-colors outline-none"
235
238
  })
@@ -238,58 +241,58 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
238
241
  }, 8, ["content", "content-i18n"])) : f("", !0)
239
242
  ])) : f("", !0)
240
243
  ]),
241
- w(e.$slots, "description", {}, () => [
242
- W.value ? (a(), s("p", Xe, m(W.value), 1)) : f("", !0)
244
+ p(e.$slots, "description", {}, () => [
245
+ ee.value ? (a(), s("p", We, m(ee.value), 1)) : f("", !0)
243
246
  ])
244
247
  ]),
245
- x("div", Ye, [
246
- x("div", Ge, [
248
+ w("div", Ze, [
249
+ w("div", _e, [
247
250
  g.value.length > 0 && t.canSelectRows ? (a(), c(h, {
248
251
  key: 0,
249
252
  variant: "outline",
250
253
  class: "hover:bg-destructive/10 shrink-0 h-9! w-9!",
251
254
  icon: "lucide:trash-2",
252
- title: se.value,
255
+ title: fe.value,
253
256
  onClick: n[0] || (n[0] = (o) => D(g.value))
254
257
  }, null, 8, ["title"])) : f("", !0),
255
- (t.table || e.$slots.table) && (t.list || e.$slots.list || e.$slots.grid) ? (a(), s("div", We, [
256
- x("button", {
258
+ (t.table || e.$slots.table) && (t.list || e.$slots.list || e.$slots.grid) ? (a(), s("div", et, [
259
+ w("button", {
257
260
  onClick: n[1] || (n[1] = (o) => k.value = "list"),
258
- class: A(["p-1.5 rounded", [
259
- p(k) === "list" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
261
+ class: N(["p-1.5 rounded", [
262
+ x(k) === "list" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
260
263
  ]]),
261
- title: ce.value
264
+ title: me.value
262
265
  }, [
263
- u(N, {
266
+ u(F, {
264
267
  icon: "lucide:layout-grid",
265
268
  class: "w-4 h-4"
266
269
  })
267
- ], 10, Ze),
268
- x("button", {
270
+ ], 10, tt),
271
+ w("button", {
269
272
  onClick: n[2] || (n[2] = (o) => k.value = "table"),
270
- class: A(["p-1.5 rounded", [
271
- p(k) === "table" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
273
+ class: N(["p-1.5 rounded", [
274
+ x(k) === "table" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
272
275
  ]]),
273
- title: ue.value
276
+ title: ve.value
274
277
  }, [
275
- u(N, {
278
+ u(F, {
276
279
  icon: "lucide:list",
277
280
  class: "w-4 h-4"
278
281
  })
279
- ], 10, _e)
282
+ ], 10, lt)
280
283
  ])) : f("", !0),
281
- w(e.$slots, "before-search"),
284
+ p(e.$slots, "before-search"),
282
285
  t.showRefresh ? (a(), c(h, {
283
286
  key: 2,
284
287
  variant: "outline",
285
288
  icon: "lucide:refresh-cw",
286
289
  size: "lg",
287
290
  class: "shrink-0 h-9! w-9!",
288
- title: fe.value,
291
+ title: ge.value,
289
292
  disabled: t.loading,
290
293
  onClick: C
291
294
  }, null, 8, ["title", "disabled"])) : f("", !0),
292
- t.filterSchema && t.filterSchema.length > 0 ? (a(), c(Ne, {
295
+ t.filterSchema && t.filterSchema.length > 0 ? (a(), c(Le, {
293
296
  key: 3,
294
297
  schema: t.filterSchema,
295
298
  type: t.filterType,
@@ -297,26 +300,26 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
297
300
  "onUpdate:modelValue": n[3] || (n[3] = (o) => R.value = o),
298
301
  onChange: C
299
302
  }, null, 8, ["schema", "type", "modelValue"])) : f("", !0),
300
- t.canSearch ? (a(), s("div", et, [
301
- u(Re, {
303
+ t.canSearch ? (a(), s("div", at, [
304
+ u(je, {
302
305
  lazy: "",
303
306
  modelValue: $.value,
304
307
  "onUpdate:modelValue": n[4] || (n[4] = (o) => $.value = o),
305
308
  icon: "lucide:search",
306
- placeholder: me.value,
309
+ placeholder: he.value,
307
310
  variant: "outline",
308
311
  class: "bg-background w-full",
309
312
  "show-clear-button": !0
310
313
  }, null, 8, ["modelValue", "placeholder"])
311
314
  ])) : f("", !0)
312
315
  ]),
313
- x("div", tt, [
314
- w(e.$slots, "actions", {}, () => [
315
- t.addComponent ? (a(), c(K(t.addComponent), { key: 0 })) : t.canAdd ? (a(), s(P, { key: 1 }, [
316
+ w("div", nt, [
317
+ p(e.$slots, "actions", {}, () => [
318
+ A.value ? (a(), c(Q(A.value), { key: 0 })) : t.canAdd ? (a(), s(P, { key: 1 }, [
316
319
  t.addBtn ? (a(), s(P, { key: 0 }, [
317
- t.addBtn.modal ? (a(), c(J, v({
320
+ t.addBtn.modal ? (a(), c(X, v({
318
321
  key: 0,
319
- body: t.addBtn.modal
322
+ body: W.value
320
323
  }, t.addBtn.modalProps, {
321
324
  refetch: t.refetch,
322
325
  data: t.data,
@@ -336,7 +339,7 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
336
339
  }, 16, ["icon", "variant"])
337
340
  ]),
338
341
  _: 1
339
- }, 16, ["body", "refetch", "data", "loading"])) : t.addBtn.to ? (a(), c(ee, {
342
+ }, 16, ["body", "refetch", "data", "loading"])) : t.addBtn.to ? (a(), c(ae, {
340
343
  key: 1,
341
344
  to: t.addBtn.to,
342
345
  class: "inline-flex w-full sm:w-auto"
@@ -370,7 +373,7 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
370
373
  ]),
371
374
  _: 1
372
375
  }, 16, ["icon", "variant"])
373
- ], 8, lt)) : (a(), c(h, v({
376
+ ], 8, ot)) : (a(), c(h, v({
374
377
  key: 3,
375
378
  class: "w-full sm:w-auto",
376
379
  icon: t.addBtn.icon || "fluent:add-16-filled",
@@ -386,33 +389,33 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
386
389
  ], 64)) : f("", !0)
387
390
  ], 64)) : f("", !0)
388
391
  ]),
389
- Z.value ? (a(), c(Fe, {
392
+ te.value ? (a(), c(Ue, {
390
393
  key: 0,
391
394
  closeOnSelect: "",
392
395
  position: "bottom-end",
393
- options: we.value,
394
- onOnSelect: be
396
+ options: Be.value,
397
+ onOnSelect: Ce
395
398
  }, {
396
399
  trigger: d(() => [
397
400
  u(h, {
398
401
  variant: "outline",
399
402
  icon: "lucide:more-vertical",
400
403
  class: "px-2!",
401
- title: p(r)("vlite.screen.moreOptions") !== "vlite.screen.moreOptions" ? p(r)("vlite.screen.moreOptions") : "More Options"
404
+ title: x(r)("vlite.screen.moreOptions") !== "vlite.screen.moreOptions" ? x(r)("vlite.screen.moreOptions") : "More Options"
402
405
  }, null, 8, ["title"])
403
406
  ]),
404
407
  _: 1
405
408
  }, 8, ["options"])) : f("", !0),
406
- w(e.$slots, "after-add")
409
+ p(e.$slots, "after-add")
407
410
  ])
408
411
  ])
409
412
  ], 2)),
410
- w(e.$slots, "sub-header"),
411
- x("div", {
412
- class: A(["flex-1 w-full relative", t.containerClass])
413
+ p(e.$slots, "sub-header"),
414
+ w("div", {
415
+ class: N(["flex-1 w-full relative", t.containerClass])
413
416
  }, [
414
- !de.value && !t.loading ? w(e.$slots, "empty", { key: 0 }, () => [
415
- u(p(Ae), {
417
+ !ue.value && !t.loading ? p(e.$slots, "empty", { key: 0 }, () => [
418
+ u(x(Me), {
416
419
  title: t.emptyTitle,
417
420
  titleI18n: t.emptyTitleI18n,
418
421
  description: t.emptyDescription,
@@ -420,11 +423,11 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
420
423
  icon: t.emptyIcon
421
424
  }, {
422
425
  action: d(() => [
423
- t.addComponent ? (a(), c(K(t.addComponent), { key: 0 })) : t.canAdd ? (a(), s(P, { key: 1 }, [
426
+ A.value ? (a(), c(Q(A.value), { key: 0 })) : t.canAdd ? (a(), s(P, { key: 1 }, [
424
427
  t.addBtn ? (a(), s(P, { key: 0 }, [
425
- t.addBtn.modal ? (a(), c(J, v({
428
+ t.addBtn.modal ? (a(), c(X, v({
426
429
  key: 0,
427
- body: t.addBtn.modal
430
+ body: W.value
428
431
  }, t.addBtn.modalProps), {
429
432
  trigger: d(() => [
430
433
  u(h, v({
@@ -440,7 +443,7 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
440
443
  }, 16, ["icon", "variant"])
441
444
  ]),
442
445
  _: 1
443
- }, 16, ["body"])) : t.addBtn.to ? (a(), c(ee, {
446
+ }, 16, ["body"])) : t.addBtn.to ? (a(), c(ae, {
444
447
  key: 1,
445
448
  to: t.addBtn.to,
446
449
  class: "inline-flex"
@@ -472,7 +475,7 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
472
475
  ]),
473
476
  _: 1
474
477
  }, 16, ["icon", "variant"])
475
- ], 8, at)) : (a(), c(h, v({
478
+ ], 8, it)) : (a(), c(h, v({
476
479
  key: 3,
477
480
  icon: t.addBtn.icon || "lucide:plus",
478
481
  variant: t.addBtn.variant || "outline"
@@ -500,28 +503,28 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
500
503
  _: 1
501
504
  }, 8, ["title", "titleI18n", "description", "descriptionI18n", "icon"])
502
505
  ]) : (a(), s(P, { key: 1 }, [
503
- p(k) === "table" && e.$slots.table ? w(e.$slots, "table", {
506
+ x(k) === "table" && e.$slots.table ? p(e.$slots, "table", {
504
507
  key: 0,
505
508
  data: t.data,
506
509
  loading: t.loading,
507
510
  selectedRows: g.value,
508
511
  delete: D,
509
512
  updateSelectedRows: (o) => g.value = o
510
- }) : p(k) === "list" && e.$slots.list ? w(e.$slots, "list", {
513
+ }) : x(k) === "list" && e.$slots.list ? p(e.$slots, "list", {
511
514
  key: 1,
512
515
  data: t.data,
513
516
  loading: t.loading,
514
517
  selectedRows: g.value,
515
518
  delete: D,
516
519
  updateSelectedRows: (o) => g.value = o
517
- }) : p(k) === "list" && e.$slots.grid ? w(e.$slots, "grid", {
520
+ }) : x(k) === "list" && e.$slots.grid ? p(e.$slots, "grid", {
518
521
  key: 2,
519
522
  data: t.data,
520
523
  loading: t.loading,
521
524
  selectedRows: g.value,
522
525
  delete: D,
523
526
  updateSelectedRows: (o) => g.value = o
524
- }) : Y.value ? (a(), c(K(Y.value), v({
527
+ }) : Z.value ? (a(), c(Q(Z.value), v({
525
528
  key: 3,
526
529
  data: t.data,
527
530
  loading: t.loading,
@@ -529,69 +532,69 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
529
532
  selectedRows: g.value,
530
533
  "onUpdate:selectedRows": n[8] || (n[8] = (o) => g.value = o),
531
534
  delete: D,
532
- onDelete: oe
533
- }, t.viewProps), null, 16, ["data", "loading", "refetch", "selectedRows"])) : (a(), s("div", nt, m(xe.value), 1))
535
+ onDelete: de
536
+ }, t.viewProps), null, 16, ["data", "loading", "refetch", "selectedRows"])) : (a(), s("div", rt, m(be.value), 1))
534
537
  ], 64))
535
538
  ], 2),
536
- t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (a(), s("div", ot, [
537
- u(p(je), v({
539
+ t.pagination && t.pageInfo && t.pageInfo.totalPages > 1 ? (a(), s("div", dt, [
540
+ u(x(Fe), v({
538
541
  "current-page": t.pageInfo.currentPage,
539
542
  "total-pages": t.pageInfo.totalPages,
540
543
  "total-items": t.pageInfo.totalItems
541
544
  }, t.paginationProps, {
542
- onChange: ie,
543
- "onUpdate:itemsPerPage": re
545
+ onChange: se,
546
+ "onUpdate:itemsPerPage": ce
544
547
  }), null, 16, ["current-page", "total-pages", "total-items"])
545
548
  ])) : f("", !0),
546
- u(Oe, {
549
+ u(Ne, {
547
550
  show: T.value,
548
551
  "onUpdate:show": n[9] || (n[9] = (o) => T.value = o),
549
- title: ve.value,
550
- description: ge.value,
551
- "confirm-text": he.value,
552
- "cancel-text": ye.value,
552
+ title: ye.value,
553
+ description: we.value,
554
+ "confirm-text": pe.value,
555
+ "cancel-text": xe.value,
553
556
  variant: "danger",
554
- onConfirm: ne,
557
+ onConfirm: re,
555
558
  onCancel: n[10] || (n[10] = (o) => T.value = !1)
556
559
  }, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"]),
557
- O.value ? (a(), c(J, {
560
+ j.value ? (a(), c(X, {
558
561
  key: 3,
559
- show: O.value,
560
- "onUpdate:show": n[11] || (n[11] = (o) => O.value = o),
561
- title: M.value,
562
+ show: j.value,
563
+ "onUpdate:show": n[11] || (n[11] = (o) => j.value = o),
564
+ title: U.value,
562
565
  "max-width": "sm:max-w-[400px]"
563
566
  }, {
564
567
  default: d(({ close: o }) => [
565
- u(Le, v({
568
+ u(qe, v({
566
569
  ref_key: "exportDataRef",
567
- ref: U,
570
+ ref: q,
568
571
  data: t.data || [],
569
- fields: Be.value,
570
- mode: Pe.value,
571
- "on-export": Se
572
+ fields: De.value,
573
+ mode: Ie.value,
574
+ "on-export": Te
572
575
  }, typeof t.exportProps == "object" ? t.exportProps : {}, {
573
- title: M.value,
576
+ title: U.value,
574
577
  class: "hidden!"
575
578
  }), null, 16, ["data", "fields", "mode", "title"]),
576
- x("div", it, [
577
- x("h6", rt, m(p(r)("vlite.exportData.selectFormat") !== "vlite.exportData.selectFormat" ? p(r)("vlite.exportData.selectFormat") : "Select Export Format"), 1),
578
- x("div", dt, [
579
- (a(!0), s(P, null, Ve(U.value?.availableFormats || [
579
+ w("div", st, [
580
+ w("h6", ct, m(x(r)("vlite.exportData.selectFormat") !== "vlite.exportData.selectFormat" ? x(r)("vlite.exportData.selectFormat") : "Select Export Format"), 1),
581
+ w("div", ut, [
582
+ (a(!0), s(P, null, Ae(q.value?.availableFormats || [
580
583
  { value: "excel", label: "Excel (.xlsx)", icon: "lucide:file-spreadsheet" },
581
584
  { value: "csv", label: "CSV (.csv)", icon: "lucide:file-text" },
582
585
  { value: "json", label: "JSON (.json)", icon: "lucide:file-json" }
583
- ], (j) => (a(), c(h, {
584
- key: j.value,
586
+ ], (O) => (a(), c(h, {
587
+ key: O.value,
585
588
  variant: "outline",
586
589
  class: "w-full flex items-center justify-start gap-3 h-12",
587
- onClick: (ct) => U.value?.exportData(j.value, o)
590
+ onClick: (mt) => q.value?.exportData(O.value, o)
588
591
  }, {
589
592
  default: d(() => [
590
- u(N, {
591
- icon: j.icon,
593
+ u(F, {
594
+ icon: O.icon,
592
595
  class: "text-muted-foreground h-5 w-5"
593
596
  }, null, 8, ["icon"]),
594
- x("span", null, m(j.label), 1)
597
+ w("span", null, m(O.label), 1)
595
598
  ]),
596
599
  _: 2
597
600
  }, 1032, ["onClick"]))), 128))
@@ -600,17 +603,17 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
600
603
  ]),
601
604
  _: 1
602
605
  }, 8, ["show", "title"])) : f("", !0),
603
- Z.value ? (a(), s("div", st, [
604
- u(Me, v({
605
- show: q.value,
606
- "onUpdate:show": n[12] || (n[12] = (o) => q.value = o),
606
+ te.value ? (a(), s("div", ft, [
607
+ u(ze, v({
608
+ show: z.value,
609
+ "onUpdate:show": n[12] || (n[12] = (o) => z.value = o),
607
610
  ref_key: "importDataRef",
608
- ref: pe,
609
- fields: ke.value,
610
- processBatch: Ce,
611
- onComplete: De
611
+ ref: ke,
612
+ fields: Pe.value,
613
+ processBatch: Se,
614
+ onComplete: $e
612
615
  }, typeof t.importProps == "object" ? t.importProps : {}, {
613
- title: _.value,
616
+ title: le.value,
614
617
  class: "hidden!"
615
618
  }), null, 16, ["show", "fields", "title"])
616
619
  ])) : f("", !0)
@@ -619,5 +622,5 @@ const He = { class: "flex flex-col w-full space-y-8" }, Ke = { class: "flex flex
619
622
  }
620
623
  });
621
624
  export {
622
- It as default
625
+ Rt as default
623
626
  };