vlite3 0.3.6 → 0.3.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.
@@ -15,36 +15,15 @@ declare function __VLS_template(): {
15
15
  };
16
16
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
17
  declare const __VLS_component: import('vue').DefineComponent<ScreenProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
18
- change: (payload: {
19
- pageinfo: {
20
- page: number;
21
- limit: number;
22
- };
23
- pagination: {
24
- page: number;
25
- limit: number;
26
- };
27
- search: string;
28
- filter: Record<string, any>;
29
- }) => any;
18
+ delete: (items: any[]) => any;
30
19
  add: () => any;
31
20
  }, string, import('vue').PublicProps, Readonly<ScreenProps> & Readonly<{
32
- onChange?: (payload: {
33
- pageinfo: {
34
- page: number;
35
- limit: number;
36
- };
37
- pagination: {
38
- page: number;
39
- limit: number;
40
- };
41
- search: string;
42
- filter: Record<string, any>;
43
- }) => any;
21
+ onDelete?: (items: any[]) => any;
44
22
  onAdd?: () => any;
45
23
  }>, {
46
24
  title: string;
47
25
  description: string;
26
+ name: string;
48
27
  data: any[];
49
28
  loading: boolean;
50
29
  pagination: boolean;
@@ -1,31 +1,37 @@
1
- import { defineComponent as H, ref as k, watch as I, computed as T, resolveComponent as L, openBlock as t, createElementBlock as d, createElementVNode as s, renderSlot as h, toDisplayString as r, createCommentVNode as v, normalizeClass as j, createVNode as u, createBlock as o, resolveDynamicComponent as A, Fragment as w, mergeProps as c, withCtx as l, createTextVNode as m, unref as O } from "vue";
2
- import Q from "../Input.vue.js";
1
+ import { defineComponent as M, computed as V, ref as h, provide as E, watch as S, resolveComponent as X, openBlock as a, createElementBlock as i, createElementVNode as r, renderSlot as B, toDisplayString as u, createCommentVNode as g, createBlock as o, normalizeClass as F, unref as T, createVNode as c, resolveDynamicComponent as N, Fragment as P, mergeProps as m, withCtx as s, createTextVNode as v } from "vue";
2
+ import Y from "../Input.vue.js";
3
3
  import f from "../Button.vue.js";
4
- import V from "../Icon.vue.js";
5
- import D from "../Modal.vue.js";
6
- import W from "../Pagination/Pagination.vue.js";
7
- import q from "./ScreenFilter.vue.js";
8
- const G = { class: "flex flex-col w-full space-y-8" }, J = {
4
+ import R from "../Icon.vue.js";
5
+ import H from "../Modal.vue.js";
6
+ import Z from "../ConfirmationModal.vue.js";
7
+ import p from "../Pagination/Pagination.vue.js";
8
+ import _ from "./ScreenFilter.vue.js";
9
+ import { usePersistentState as ee } from "../../utils/usePersistentState.js";
10
+ const te = { class: "flex flex-col w-full space-y-8" }, ae = {
9
11
  key: 0,
10
12
  class: "flex flex-col md:flex-row sm:items-start md:items-center justify-between gap-4"
11
- }, K = { class: "flex flex-col shrink-0" }, M = {
13
+ }, ne = { class: "flex flex-col shrink-0" }, le = {
12
14
  key: 0,
13
15
  class: "text-fs-7.5 font-bold text-foreground"
14
- }, X = {
15
- key: 0,
16
- class: "text-sm text-gray-700 mt-1.5 md:max-w-[450px]"
17
- }, Y = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-3 w-full justify-end" }, Z = { class: "flex items-center gap-3 w-full sm:w-auto flex-1 md:flex-none justify-start sm:justify-end" }, p = {
16
+ }, de = {
18
17
  key: 0,
18
+ class: "text-sm text-gray-700 mt-1 md:max-w-[450px]"
19
+ }, ie = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-2.5 w-full justify-end" }, oe = { class: "flex items-center gap-2 w-full sm:w-auto flex-1 md:flex-none justify-start sm:justify-end" }, se = {
20
+ key: 1,
19
21
  class: "flex items-center p-1 rounded-md border border-border shrink-0"
20
- }, _ = {
21
- key: 3,
22
- class: "w-full md:w-64! max-sm:order-last"
23
- }, ee = { class: "flex items-center gap-3 max-sm:w-full sm:w-auto max-sm:order-last" }, te = ["href", "target"], ae = { class: "flex-1 w-full relative min-h-[300px]" }, ne = { class: "flex flex-col items-center justify-center py-16 px-4 text-center bg-card border border-border rounded-lg shadow-sm" }, de = { class: "flex h-16 w-16 items-center justify-center rounded-full bg-muted mb-4" }, le = { class: "text-lg font-semibold text-foreground" }, ie = { class: "mt-2 text-sm text-muted-foreground max-w-sm" }, oe = { class: "mt-6" }, se = ["href", "target"], re = {
22
+ }, re = {
23
+ key: 4,
24
+ class: "w-full md:w-60! max-sm:order-last"
25
+ }, ue = { class: "flex items-center gap-3 max-sm:w-full sm:w-auto max-sm:order-last" }, ce = ["href", "target"], fe = { class: "flex-1 w-full relative min-h-[300px]" }, me = { class: "flex flex-col items-center justify-center py-16 px-4 text-center bg-card border border-border rounded-lg shadow-sm" }, ge = { class: "flex h-16 w-16 items-center justify-center rounded-full bg-muted mb-4" }, ve = { class: "text-lg font-semibold text-foreground" }, ye = { class: "mt-2 text-sm text-muted-foreground max-w-sm" }, he = { class: "mt-6" }, Be = ["href", "target"], be = {
24
26
  key: 1,
25
27
  class: "p-8 text-center text-muted-foreground border border-dashed border-border rounded-lg"
26
- }, ue = { key: 2 }, Be = /* @__PURE__ */ H({
28
+ }, we = {
29
+ key: 2,
30
+ class: "-mt-2"
31
+ }, Se = /* @__PURE__ */ M({
27
32
  __name: "Screen",
28
33
  props: {
34
+ name: { default: "" },
29
35
  title: { default: "" },
30
36
  description: { default: "" },
31
37
  pageInfo: {},
@@ -53,121 +59,141 @@ const G = { class: "flex flex-col w-full space-y-8" }, J = {
53
59
  filterType: { default: "modal" },
54
60
  showRefresh: { type: Boolean, default: !1 }
55
61
  },
56
- emits: ["add", "change"],
57
- setup(e, { emit: R }) {
58
- const i = e, U = R, B = k(i.table ? "table" : "list"), x = k(""), C = k({}), y = k(i.pageInfo?.currentPage || 1), P = k(i.pageInfo?.itemsPerPage || i.paginationProps?.itemsPerPage || 10);
59
- I(
60
- () => i.pageInfo?.currentPage,
61
- (a) => {
62
- a && (y.value = a);
62
+ emits: ["add", "delete"],
63
+ setup(e, { emit: L }) {
64
+ const l = e, j = L, K = V(() => l.name || l.title || "default-screen"), w = ee(
65
+ `view-mode-${K.value}`,
66
+ l.table ? "table" : "list"
67
+ ), C = h(""), D = h({}), b = h(l.pageInfo?.currentPage || 1), $ = h(l.pageInfo?.itemsPerPage || l.paginationProps?.itemsPerPage || 10), y = h([]), U = h([]), k = h(!1);
68
+ E("screen-selected-rows", y), E("screen-request-delete", (t) => I(t));
69
+ const I = (t) => {
70
+ U.value = t, k.value = !0;
71
+ }, O = () => {
72
+ j("delete", U.value), k.value = !1, y.value = [];
73
+ }, Q = (t) => {
74
+ j("delete", t), y.value = [];
75
+ };
76
+ S(
77
+ () => l.pageInfo?.currentPage,
78
+ (t) => {
79
+ t && (b.value = t);
63
80
  }
64
- ), I(
65
- () => i.pageInfo?.itemsPerPage,
66
- (a) => {
67
- a && (P.value = a);
81
+ ), S(
82
+ () => l.pageInfo?.itemsPerPage,
83
+ (t) => {
84
+ t && ($.value = t);
68
85
  }
69
86
  );
70
- let $ = null;
71
- I(x, (a) => {
72
- $ && clearTimeout($), $ = setTimeout(() => {
73
- y.value = 1, b();
87
+ let A = null;
88
+ S(C, (t) => {
89
+ A && clearTimeout(A), A = setTimeout(() => {
90
+ b.value = 1, x();
74
91
  }, 300);
75
92
  });
76
- const z = (a) => {
77
- y.value = a, b();
78
- }, E = (a) => {
79
- P.value = a, y.value = 1, b();
80
- }, b = () => {
81
- const a = {
93
+ const W = (t) => {
94
+ b.value = t, x();
95
+ }, G = (t) => {
96
+ $.value = t, b.value = 1, x();
97
+ }, x = () => {
98
+ const t = {
82
99
  pageinfo: {
83
- page: y.value,
84
- limit: P.value
100
+ page: b.value,
101
+ limit: $.value
85
102
  },
86
103
  pagination: {
87
- page: y.value,
88
- limit: P.value
104
+ page: b.value,
105
+ limit: $.value
89
106
  },
90
- search: x.value,
91
- filter: C.value
107
+ search: C.value,
108
+ filter: D.value
92
109
  };
93
- U("change", a), i.refetch && i.refetch(a);
94
- }, N = T(() => B.value === "table" && i.table ? i.table : i.list), F = T(() => i.data && i.data.length > 0);
95
- return (a, n) => {
96
- const S = L("router-link");
97
- return t(), d("div", G, [
98
- e.customHeader ? h(a.$slots, "custom-header", { key: 1 }) : (t(), d("div", J, [
99
- s("div", K, [
100
- h(a.$slots, "title", {}, () => [
101
- e.title ? (t(), d("h1", M, r(e.title), 1)) : v("", !0)
110
+ l.refetch && l.refetch(t);
111
+ }, z = V(() => w.value === "table" && l.table ? l.table : l.list), J = V(() => l.data && l.data.length > 0);
112
+ return (t, n) => {
113
+ const q = X("router-link");
114
+ return a(), i("div", te, [
115
+ e.customHeader ? B(t.$slots, "custom-header", { key: 1 }) : (a(), i("div", ae, [
116
+ r("div", ne, [
117
+ B(t.$slots, "title", {}, () => [
118
+ e.title ? (a(), i("h1", le, u(e.title), 1)) : g("", !0)
102
119
  ]),
103
- h(a.$slots, "description", {}, () => [
104
- e.description ? (t(), d("p", X, r(e.description), 1)) : v("", !0)
120
+ B(t.$slots, "description", {}, () => [
121
+ e.description ? (a(), i("p", de, u(e.description), 1)) : g("", !0)
105
122
  ])
106
123
  ]),
107
- s("div", Y, [
108
- s("div", Z, [
109
- e.table && e.list ? (t(), d("div", p, [
110
- s("button", {
111
- onClick: n[0] || (n[0] = (g) => B.value = "list"),
112
- class: j(["p-1.5 rounded transition-colors", [
113
- B.value === "list" ? "bg-secondary/70 shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
124
+ r("div", ie, [
125
+ r("div", oe, [
126
+ y.value.length > 0 ? (a(), o(f, {
127
+ key: 0,
128
+ variant: "outline",
129
+ class: "hover:bg-destructive/10 shrink-0 h-9! w-9!",
130
+ icon: "lucide:trash-2",
131
+ title: "Delete Selected",
132
+ onClick: n[0] || (n[0] = (d) => I(y.value))
133
+ })) : g("", !0),
134
+ e.table && e.list ? (a(), i("div", se, [
135
+ r("button", {
136
+ onClick: n[1] || (n[1] = (d) => w.value = "list"),
137
+ class: F(["p-1.5 rounded", [
138
+ T(w) === "list" ? "bg-secondary/85 dark:bg-gray-250 shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
114
139
  ]]),
115
140
  title: "List View"
116
141
  }, [
117
- u(V, {
142
+ c(R, {
118
143
  icon: "lucide:layout-grid",
119
144
  class: "w-4 h-4"
120
145
  })
121
146
  ], 2),
122
- s("button", {
123
- onClick: n[1] || (n[1] = (g) => B.value = "table"),
124
- class: j(["p-1.5 rounded transition-colors", [
125
- B.value === "table" ? "bg-secondary/70 shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
147
+ r("button", {
148
+ onClick: n[2] || (n[2] = (d) => w.value = "table"),
149
+ class: F(["p-1.5 rounded", [
150
+ T(w) === "table" ? "bg-secondary/85 dark:bg-gray-250 shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
126
151
  ]]),
127
152
  title: "Table View"
128
153
  }, [
129
- u(V, {
154
+ c(R, {
130
155
  icon: "lucide:list",
131
156
  class: "w-4 h-4"
132
157
  })
133
158
  ], 2)
134
- ])) : v("", !0),
135
- h(a.$slots, "before-search"),
136
- e.showRefresh ? (t(), o(f, {
137
- key: 1,
159
+ ])) : g("", !0),
160
+ B(t.$slots, "before-search"),
161
+ e.showRefresh ? (a(), o(f, {
162
+ key: 2,
138
163
  variant: "outline",
139
164
  icon: "lucide:refresh-cw",
140
165
  size: "lg",
141
166
  class: "shrink-0 h-9! w-9!",
142
167
  title: "Refresh",
143
168
  disabled: e.loading,
144
- onClick: b
145
- }, null, 8, ["disabled"])) : v("", !0),
146
- e.filterSchema && e.filterSchema.length > 0 ? (t(), o(q, {
147
- key: 2,
169
+ onClick: x
170
+ }, null, 8, ["disabled"])) : g("", !0),
171
+ e.filterSchema && e.filterSchema.length > 0 ? (a(), o(_, {
172
+ key: 3,
148
173
  schema: e.filterSchema,
149
174
  type: e.filterType,
150
- modelValue: C.value,
151
- "onUpdate:modelValue": n[2] || (n[2] = (g) => C.value = g),
152
- onChange: b
153
- }, null, 8, ["schema", "type", "modelValue"])) : v("", !0),
154
- e.canSearch ? (t(), d("div", _, [
155
- u(Q, {
156
- modelValue: x.value,
157
- "onUpdate:modelValue": n[3] || (n[3] = (g) => x.value = g),
175
+ modelValue: D.value,
176
+ "onUpdate:modelValue": n[3] || (n[3] = (d) => D.value = d),
177
+ onChange: x
178
+ }, null, 8, ["schema", "type", "modelValue"])) : g("", !0),
179
+ e.canSearch ? (a(), i("div", re, [
180
+ c(Y, {
181
+ lazy: "",
182
+ modelValue: C.value,
183
+ "onUpdate:modelValue": n[4] || (n[4] = (d) => C.value = d),
158
184
  icon: "lucide:search",
159
185
  placeholder: "Search...",
160
186
  variant: "outline",
161
187
  class: "bg-background w-full",
162
188
  "show-clear-button": !0
163
189
  }, null, 8, ["modelValue"])
164
- ])) : v("", !0)
190
+ ])) : g("", !0)
165
191
  ]),
166
- s("div", ee, [
167
- h(a.$slots, "actions", {}, () => [
168
- e.addComponent ? (t(), o(A(e.addComponent), { key: 0 })) : e.canAdd ? (t(), d(w, { key: 1 }, [
169
- e.addBtn ? (t(), d(w, { key: 0 }, [
170
- e.addBtn.modal ? (t(), o(D, c({
192
+ r("div", ue, [
193
+ B(t.$slots, "actions", {}, () => [
194
+ e.addComponent ? (a(), o(N(e.addComponent), { key: 0 })) : e.canAdd ? (a(), i(P, { key: 1 }, [
195
+ e.addBtn ? (a(), i(P, { key: 0 }, [
196
+ e.addBtn.modal ? (a(), o(H, m({
171
197
  key: 0,
172
198
  body: e.addBtn.modal
173
199
  }, e.addBtn.modalProps, {
@@ -176,195 +202,210 @@ const G = { class: "flex flex-col w-full space-y-8" }, J = {
176
202
  triggerClass: "w-full",
177
203
  loading: e.loading
178
204
  }), {
179
- trigger: l(() => [
180
- u(f, c({
205
+ trigger: s(() => [
206
+ c(f, m({
181
207
  class: "w-full",
182
- icon: e.addBtn.icon || "lucide:plus",
208
+ icon: e.addBtn.icon || "fluent:add-16-filled",
183
209
  variant: e.addBtn.variant || "primary"
184
210
  }, e.addBtn.buttonProps), {
185
- default: l(() => [
186
- m(r(e.addBtn.label || "Add"), 1)
211
+ default: s(() => [
212
+ v(u(e.addBtn.label || "Add"), 1)
187
213
  ]),
188
214
  _: 1
189
215
  }, 16, ["icon", "variant"])
190
216
  ]),
191
217
  _: 1
192
- }, 16, ["body", "refetch", "data", "loading"])) : e.addBtn.to ? (t(), o(S, {
218
+ }, 16, ["body", "refetch", "data", "loading"])) : e.addBtn.to ? (a(), o(q, {
193
219
  key: 1,
194
220
  to: e.addBtn.to,
195
221
  class: "inline-flex w-full sm:w-auto"
196
222
  }, {
197
- default: l(() => [
198
- u(f, c({
223
+ default: s(() => [
224
+ c(f, m({
199
225
  class: "w-full",
200
- icon: e.addBtn.icon || "lucide:plus",
226
+ icon: e.addBtn.icon || "fluent:add-16-filled",
201
227
  variant: e.addBtn.variant || "primary"
202
228
  }, e.addBtn.buttonProps), {
203
- default: l(() => [
204
- m(r(e.addBtn.label || "Add"), 1)
229
+ default: s(() => [
230
+ v(u(e.addBtn.label || "Add"), 1)
205
231
  ]),
206
232
  _: 1
207
233
  }, 16, ["icon", "variant"])
208
234
  ]),
209
235
  _: 1
210
- }, 8, ["to"])) : e.addBtn.href ? (t(), d("a", {
236
+ }, 8, ["to"])) : e.addBtn.href ? (a(), i("a", {
211
237
  key: 2,
212
238
  href: e.addBtn.href,
213
239
  target: e.addBtn.target,
214
240
  class: "inline-flex w-full sm:w-auto"
215
241
  }, [
216
- u(f, c({
242
+ c(f, m({
217
243
  class: "w-full",
218
- icon: e.addBtn.icon || "lucide:plus",
244
+ icon: e.addBtn.icon || "fluent:add-16-filled",
219
245
  variant: e.addBtn.variant || "primary"
220
246
  }, e.addBtn.buttonProps), {
221
- default: l(() => [
222
- m(r(e.addBtn.label || "Add"), 1)
247
+ default: s(() => [
248
+ v(u(e.addBtn.label || "Add"), 1)
223
249
  ]),
224
250
  _: 1
225
251
  }, 16, ["icon", "variant"])
226
- ], 8, te)) : (t(), o(f, c({
252
+ ], 8, ce)) : (a(), o(f, m({
227
253
  key: 3,
228
254
  class: "w-full sm:w-auto",
229
- icon: e.addBtn.icon || "lucide:plus",
255
+ icon: e.addBtn.icon || "fluent:add-16-filled",
230
256
  variant: e.addBtn.variant || "primary"
231
257
  }, e.addBtn.buttonProps, {
232
- onClick: n[4] || (n[4] = (g) => e.addBtn.onClick ? e.addBtn.onClick() : a.$emit("add"))
258
+ onClick: n[5] || (n[5] = (d) => e.addBtn.onClick ? e.addBtn.onClick() : t.$emit("add"))
233
259
  }), {
234
- default: l(() => [
235
- m(r(e.addBtn.label || "Add"), 1)
260
+ default: s(() => [
261
+ v(u(e.addBtn.label || "Add"), 1)
236
262
  ]),
237
263
  _: 1
238
264
  }, 16, ["icon", "variant"]))
239
- ], 64)) : (t(), o(f, {
265
+ ], 64)) : (a(), o(f, {
240
266
  key: 1,
241
267
  class: "w-full sm:w-auto",
242
- icon: "lucide:plus",
268
+ icon: "fluent:add-16-filled",
243
269
  variant: "primary",
244
- onClick: n[5] || (n[5] = (g) => a.$emit("add"))
270
+ onClick: n[6] || (n[6] = (d) => t.$emit("add"))
245
271
  }, {
246
- default: l(() => [...n[8] || (n[8] = [
247
- m(" Add ", -1)
272
+ default: s(() => [...n[12] || (n[12] = [
273
+ v(" Add ", -1)
248
274
  ])]),
249
275
  _: 1
250
276
  }))
251
- ], 64)) : v("", !0)
277
+ ], 64)) : g("", !0)
252
278
  ]),
253
- h(a.$slots, "after-add")
279
+ B(t.$slots, "after-add")
254
280
  ])
255
281
  ])
256
282
  ])),
257
- s("div", ae, [
258
- !F.value && !e.loading ? h(a.$slots, "empty", { key: 0 }, () => [
259
- s("div", ne, [
260
- s("div", de, [
261
- u(V, {
283
+ r("div", fe, [
284
+ !J.value && !e.loading ? B(t.$slots, "empty", { key: 0 }, () => [
285
+ r("div", me, [
286
+ r("div", ge, [
287
+ c(R, {
262
288
  icon: e.emptyIcon,
263
289
  class: "h-8 w-8 text-muted-foreground"
264
290
  }, null, 8, ["icon"])
265
291
  ]),
266
- s("h3", le, r(e.emptyTitle), 1),
267
- s("p", ie, r(e.emptyDescription), 1),
268
- s("div", oe, [
269
- e.addComponent ? (t(), o(A(e.addComponent), { key: 0 })) : e.canAdd ? (t(), d(w, { key: 1 }, [
270
- e.addBtn ? (t(), d(w, { key: 0 }, [
271
- e.addBtn.modal ? (t(), o(D, c({
292
+ r("h3", ve, u(e.emptyTitle), 1),
293
+ r("p", ye, u(e.emptyDescription), 1),
294
+ r("div", he, [
295
+ e.addComponent ? (a(), o(N(e.addComponent), { key: 0 })) : e.canAdd ? (a(), i(P, { key: 1 }, [
296
+ e.addBtn ? (a(), i(P, { key: 0 }, [
297
+ e.addBtn.modal ? (a(), o(H, m({
272
298
  key: 0,
273
299
  body: e.addBtn.modal
274
300
  }, e.addBtn.modalProps), {
275
- trigger: l(() => [
276
- u(f, c({
277
- icon: e.addBtn.icon || "lucide:plus",
301
+ trigger: s(() => [
302
+ c(f, m({
303
+ icon: e.addBtn.icon || "fluent:add-16-filled",
278
304
  variant: e.addBtn.variant || "outline"
279
305
  }, e.addBtn.buttonProps), {
280
- default: l(() => [
281
- m(r(e.addBtn.label || "Add New"), 1)
306
+ default: s(() => [
307
+ v(u(e.addBtn.label || "Add New"), 1)
282
308
  ]),
283
309
  _: 1
284
310
  }, 16, ["icon", "variant"])
285
311
  ]),
286
312
  _: 1
287
- }, 16, ["body"])) : e.addBtn.to ? (t(), o(S, {
313
+ }, 16, ["body"])) : e.addBtn.to ? (a(), o(q, {
288
314
  key: 1,
289
315
  to: e.addBtn.to,
290
316
  class: "inline-flex"
291
317
  }, {
292
- default: l(() => [
293
- u(f, c({
294
- icon: e.addBtn.icon || "lucide:plus",
318
+ default: s(() => [
319
+ c(f, m({
320
+ icon: e.addBtn.icon || "fluent:add-16-filled",
295
321
  variant: e.addBtn.variant || "outline"
296
322
  }, e.addBtn.buttonProps), {
297
- default: l(() => [
298
- m(r(e.addBtn.label || "Add New"), 1)
323
+ default: s(() => [
324
+ v(u(e.addBtn.label || "Add New"), 1)
299
325
  ]),
300
326
  _: 1
301
327
  }, 16, ["icon", "variant"])
302
328
  ]),
303
329
  _: 1
304
- }, 8, ["to"])) : e.addBtn.href ? (t(), d("a", {
330
+ }, 8, ["to"])) : e.addBtn.href ? (a(), i("a", {
305
331
  key: 2,
306
332
  href: e.addBtn.href,
307
333
  target: e.addBtn.target,
308
334
  class: "inline-flex"
309
335
  }, [
310
- u(f, c({
336
+ c(f, m({
311
337
  icon: e.addBtn.icon || "lucide:plus",
312
338
  variant: e.addBtn.variant || "outline"
313
339
  }, e.addBtn.buttonProps), {
314
- default: l(() => [
315
- m(r(e.addBtn.label || "Add New"), 1)
340
+ default: s(() => [
341
+ v(u(e.addBtn.label || "Add New"), 1)
316
342
  ]),
317
343
  _: 1
318
344
  }, 16, ["icon", "variant"])
319
- ], 8, se)) : (t(), o(f, c({
345
+ ], 8, Be)) : (a(), o(f, m({
320
346
  key: 3,
321
347
  icon: e.addBtn.icon || "lucide:plus",
322
348
  variant: e.addBtn.variant || "outline"
323
349
  }, e.addBtn.buttonProps, {
324
- onClick: n[6] || (n[6] = (g) => e.addBtn.onClick ? e.addBtn.onClick() : a.$emit("add"))
350
+ onClick: n[7] || (n[7] = (d) => e.addBtn.onClick ? e.addBtn.onClick() : t.$emit("add"))
325
351
  }), {
326
- default: l(() => [
327
- m(r(e.addBtn.label || "Add New"), 1)
352
+ default: s(() => [
353
+ v(u(e.addBtn.label || "Add New"), 1)
328
354
  ]),
329
355
  _: 1
330
356
  }, 16, ["icon", "variant"]))
331
- ], 64)) : (t(), o(f, {
357
+ ], 64)) : (a(), o(f, {
332
358
  key: 1,
333
359
  icon: "lucide:plus",
334
360
  variant: "outline",
335
- onClick: n[7] || (n[7] = (g) => a.$emit("add"))
361
+ onClick: n[8] || (n[8] = (d) => t.$emit("add"))
336
362
  }, {
337
- default: l(() => [...n[9] || (n[9] = [
338
- m(" Add New ", -1)
363
+ default: s(() => [...n[13] || (n[13] = [
364
+ v(" Add New ", -1)
339
365
  ])]),
340
366
  _: 1
341
367
  }))
342
- ], 64)) : v("", !0)
368
+ ], 64)) : g("", !0)
343
369
  ])
344
370
  ])
345
- ]) : (t(), d(w, { key: 1 }, [
346
- N.value ? (t(), o(A(N.value), {
371
+ ]) : (a(), i(P, { key: 1 }, [
372
+ z.value ? (a(), o(N(z.value), {
347
373
  key: 0,
348
374
  data: e.data,
349
375
  loading: e.loading,
350
- refetch: e.refetch
351
- }, null, 8, ["data", "loading", "refetch"])) : (t(), d("div", re, " Please provide a `:list` or `:table` component. "))
376
+ refetch: e.refetch,
377
+ selectedRows: y.value,
378
+ "onUpdate:selectedRows": n[9] || (n[9] = (d) => y.value = d),
379
+ delete: I,
380
+ onDelete: Q
381
+ }, null, 40, ["data", "loading", "refetch", "selectedRows"])) : (a(), i("div", be, " Please provide a `:list` or `:table` component. "))
352
382
  ], 64))
353
383
  ]),
354
- e.pagination && e.pageInfo && e.pageInfo.totalPages > 1 ? (t(), d("div", ue, [
355
- u(O(W), c({
384
+ e.pagination && e.pageInfo && e.pageInfo.totalPages > 1 ? (a(), i("div", we, [
385
+ c(T(p), m({
356
386
  "current-page": e.pageInfo.currentPage,
357
387
  "total-pages": e.pageInfo.totalPages,
358
388
  "total-items": e.pageInfo.totalItems
359
389
  }, e.paginationProps, {
360
- onChange: z,
361
- "onUpdate:itemsPerPage": E
390
+ onChange: W,
391
+ "onUpdate:itemsPerPage": G
362
392
  }), null, 16, ["current-page", "total-pages", "total-items"])
363
- ])) : v("", !0)
393
+ ])) : g("", !0),
394
+ c(Z, {
395
+ show: k.value,
396
+ "onUpdate:show": n[10] || (n[10] = (d) => k.value = d),
397
+ title: "Confirm Deletion",
398
+ description: "Are you sure you want to delete the selected items? This action cannot be undone.",
399
+ "confirm-text": "Delete",
400
+ "cancel-text": "Cancel",
401
+ variant: "danger",
402
+ onConfirm: O,
403
+ onCancel: n[11] || (n[11] = (d) => k.value = !1)
404
+ }, null, 8, ["show"])
364
405
  ]);
365
406
  };
366
407
  }
367
408
  });
368
409
  export {
369
- Be as default
410
+ Se as default
370
411
  };