vlite3 0.8.7 → 0.8.9

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