vlite3 0.7.4 → 0.7.7

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