vlite3 0.3.6 → 0.3.8

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