@razaman2/reactive-view 0.2.0 → 0.2.1

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,7 +1,7 @@
1
- import { _ as e, c as t, d as n, g as r, h as i, i as a, n as o, p as s, r as c, s as l, t as u, y as d } from "./src-DgPt5VTg.mjs";
2
- import { t as f } from "./Select-CSA5Sk_b.mjs";
3
- import { t as p } from "./Label-B63BpiJm.mjs";
4
- import { r as m, t as h } from "./Editor-BX8prqWt.mjs";
1
+ import { _ as e, b as t, c as n, f as r, g as i, i as a, l as o, m as s, n as c, r as l, t as u, v as d } from "./src-DwXft6y4.mjs";
2
+ import { t as f } from "./Select-x96YoTl5.mjs";
3
+ import { t as p } from "./Label-DD9yGa7V.mjs";
4
+ import { r as m, t as h } from "./Editor-DMCekNFl.mjs";
5
5
  import g from "@razaman2/object-manager";
6
6
  import _ from "@razaman2/data-manager";
7
7
  import { Fragment as v, computed as y, createElementBlock as b, createElementVNode as x, createTextVNode as S, createVNode as C, h as w, markRaw as T, mergeProps as E, onBeforeMount as D, onBeforeUnmount as O, onMounted as k, openBlock as A, provide as j, reactive as M, ref as N, unref as P, watch as F, watchEffect as I } from "vue";
@@ -13,17 +13,17 @@ import W from "inputmask";
13
13
  import { format as te, formatISO as ne, parse as G, parseISO as K } from "date-fns";
14
14
  //#endregion
15
15
  //#region src/components/Button.vue
16
- var q = l({
16
+ var q = n({
17
17
  modelName: "Button",
18
18
  props: {
19
- class: o(),
20
- buttonClass: o(),
21
- split: o({ type: Boolean }),
22
- options: o({
19
+ class: c(),
20
+ buttonClass: c(),
21
+ split: c({ type: Boolean }),
22
+ options: c({
23
23
  type: Array,
24
24
  default: []
25
25
  }),
26
- unstyled: o({ type: Boolean })
26
+ unstyled: c({ type: Boolean })
27
27
  },
28
28
  setup(e, t, n) {
29
29
  return { template: () => {
@@ -54,24 +54,24 @@ function Y(e, t) {
54
54
  var X = T({
55
55
  name: "mdi-close",
56
56
  render: Y
57
- }), Z = l({
57
+ }), Z = n({
58
58
  modelName: "CustomButton",
59
59
  props: {
60
- label: o({ type: [Number, String] }),
61
- tag: o({
60
+ label: c({ type: [Number, String] }),
61
+ tag: c({
62
62
  type: String,
63
63
  default: "button"
64
64
  }),
65
- loading: o({
65
+ loading: c({
66
66
  type: [Boolean, Function],
67
67
  default: !1
68
68
  }),
69
- padding: o({
69
+ padding: c({
70
70
  type: Boolean,
71
71
  default: !0
72
72
  }),
73
- buttonClass: o(),
74
- loadingClass: o()
73
+ buttonClass: c(),
74
+ loadingClass: c()
75
75
  },
76
76
  setup(e, t, n) {
77
77
  let r = typeof n.loading == "function" ? n.loading : () => n.loading, i = N(!1);
@@ -93,10 +93,10 @@ var X = T({
93
93
  }
94
94
  };
95
95
  }
96
- }), re = l({
96
+ }), re = n({
97
97
  modelName: "CustomModal",
98
98
  props: {
99
- title: o({
99
+ title: c({
100
100
  type: [
101
101
  Boolean,
102
102
  Number,
@@ -104,63 +104,63 @@ var X = T({
104
104
  ],
105
105
  default: "Modal Title"
106
106
  }),
107
- persistent: o({ type: Boolean }),
108
- header: o({
107
+ persistent: c({ type: Boolean }),
108
+ header: c({
109
109
  type: Boolean,
110
110
  default: !0
111
111
  }),
112
- actions: o({
112
+ actions: c({
113
113
  type: Boolean,
114
114
  default: !0
115
115
  }),
116
- ok: o({
116
+ ok: c({
117
117
  type: Boolean,
118
118
  default: !0
119
119
  }),
120
- cancel: o({ type: Boolean }),
121
- close: o({
120
+ cancel: c({ type: Boolean }),
121
+ close: c({
122
122
  type: Boolean,
123
123
  default: !0
124
124
  }),
125
- show: o({
125
+ show: c({
126
126
  type: Boolean,
127
127
  default: !0
128
128
  }),
129
- whenOk: o({
129
+ whenOk: c({
130
130
  type: Function,
131
131
  default: () => {}
132
132
  }),
133
- whenCancel: o({
133
+ whenCancel: c({
134
134
  type: Function,
135
135
  default: () => {}
136
136
  }),
137
- whenClose: o({
137
+ whenClose: c({
138
138
  type: Function,
139
139
  default: () => {}
140
140
  }),
141
- whenEscape: o({
141
+ whenEscape: c({
142
142
  type: Function,
143
143
  default: () => {}
144
144
  }),
145
- whenDismiss: o({
145
+ whenDismiss: c({
146
146
  type: Function,
147
147
  default: () => {}
148
148
  }),
149
- whenRouteChange: o({
149
+ whenRouteChange: c({
150
150
  type: Function,
151
151
  default: () => {}
152
152
  }),
153
- class: o(),
154
- headerClass: o(),
155
- titleClass: o(),
156
- actionsClass: o(),
157
- backdropClass: o(),
158
- timeout: o({
153
+ class: c(),
154
+ headerClass: c(),
155
+ titleClass: c(),
156
+ actionsClass: c(),
157
+ backdropClass: c(),
158
+ timeout: c({
159
159
  default: !1,
160
160
  validator: (e) => typeof e == "number" || e === !1
161
161
  }),
162
- modal: o({ type: Boolean }),
163
- id: o({ type: [Number, String] })
162
+ modal: c({ type: Boolean }),
163
+ id: c({ type: [Number, String] })
164
164
  },
165
165
  setup: (e, t, n) => {
166
166
  j("dialog", e);
@@ -269,61 +269,61 @@ var X = T({
269
269
  modalRef: r
270
270
  };
271
271
  }
272
- }), ie = l({
272
+ }), ie = n({
273
273
  cancel: !0,
274
274
  titleClass: "text-left",
275
275
  modelName: "ConfirmationModal",
276
276
  title: (e, t) => a(t).confirmationTitle?.(),
277
277
  slots: (e, t) => () => C(v, null, [C(B, null, null), C("div", { class: "pt-4 px-4 pb-8" }, [a(t).confirmationDescription()])]),
278
- setup(e, r) {
279
- let i = M({ status: !1 });
278
+ setup(e, t) {
279
+ let n = M({ status: !1 });
280
280
  return {
281
281
  confirmationTitle: () => "Confirm",
282
282
  confirmationDescription: () => "Are you sure you sure?",
283
283
  okButton: () => {
284
- let e = a(r).okButton();
285
- if (e) return C(q, E({ unstyled: !0 }, n(e.props, "class"), {
286
- loading: i.status,
284
+ let e = a(t).okButton();
285
+ if (e) return C(q, E({ unstyled: !0 }, r(e.props, "class"), {
286
+ loading: n.status,
287
287
  class: "h-8 normal-case! bg-white! text-(--colors-primary-500)! border-gray-200! rounded-lg! hover:bg-gray-50!",
288
288
  label: "Continue"
289
289
  }), e.children);
290
290
  },
291
291
  cancelButton: () => {
292
- let e = a(r).cancelButton();
293
- if (e) return C(q, E(n(e.props, "class"), {
292
+ let e = a(t).cancelButton();
293
+ if (e) return C(q, E(r(e.props, "class"), {
294
294
  unstyled: !0,
295
295
  class: "h-8 -order-1 normal-case! bg-white! border-gray-200! text-gray-700! rounded-lg! hover:bg-gray-50! hover:text-gray-900!",
296
296
  label: "Cancel"
297
297
  }), e.children);
298
298
  },
299
- closeButton: () => t(r).closeButton({
299
+ closeButton: () => o(t).closeButton({
300
300
  unstyled: !0,
301
301
  buttonClass: "border border-gray-200 bg-white text-gray-400 hover:text-red-500 transition-all duration-500 rounded-md! -{btn}"
302
302
  }, () => C(q, null, { icon: () => C(X, { class: "size-5" }, null) })),
303
303
  triggerOk: () => s({
304
- loading: i,
305
- try: () => a(r).triggerOk()
304
+ loading: n,
305
+ try: () => a(t).triggerOk()
306
306
  })
307
307
  };
308
308
  }
309
309
  }, re), ae = {
310
310
  props: {
311
- setup: d,
312
- title: o({ type: String }),
313
- description: o({ type: String }),
314
- close: o({
311
+ setup: t,
312
+ title: c({ type: String }),
313
+ description: c({ type: String }),
314
+ close: c({
315
315
  type: Boolean,
316
316
  default: !0
317
317
  }),
318
- timeout: o({
318
+ timeout: c({
319
319
  default: 3e3,
320
320
  validator: (e) => typeof e == "number" || e === !1
321
321
  })
322
322
  },
323
- setup(e, t) {
324
- return (e) => C(r, {
323
+ setup(t, n) {
324
+ return (t) => C(e, {
325
325
  modelName: "CustomAlert",
326
- setup: (n) => {
326
+ setup: (e) => {
327
327
  let r = {
328
328
  default: C("path", {
329
329
  "stroke-linecap": "round",
@@ -355,17 +355,17 @@ var X = T({
355
355
  "stroke-width": "2",
356
356
  d: "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"
357
357
  }, null)
358
- }, i = () => /alert-(info|success|warning|error)/.exec(e.$attrs.class)?.shift();
359
- return P(e.timeout) && k(() => {
360
- setTimeout(() => a(n).hide("timeout"), P(e.timeout));
358
+ }, i = () => /alert-(info|success|warning|error)/.exec(t.$attrs.class)?.shift();
359
+ return P(t.timeout) && k(() => {
360
+ setTimeout(() => a(e).hide("timeout"), P(t.timeout));
361
361
  }), {
362
362
  template: () => C("div", {
363
363
  role: "alert",
364
364
  class: "alert"
365
365
  }, [
366
- a(n).alertIcon(),
367
- C("div", null, [a(n).alertTitle(), e.$slots.default ? e.$slots.default({ component: n }) : a(n).alertDescription()]),
368
- a(n).alertClose()
366
+ a(e).alertIcon(),
367
+ C("div", null, [a(e).alertTitle(), t.$slots.default ? t.$slots.default({ component: e }) : a(e).alertDescription()]),
368
+ a(e).alertClose()
369
369
  ]),
370
370
  alertIcon: () => C("svg", {
371
371
  xmlns: "http://www.w3.org/2000/svg",
@@ -376,21 +376,21 @@ var X = T({
376
376
  fill: "none",
377
377
  viewBox: "0 0 24 24"
378
378
  }, [r[i()] || r.default]),
379
- alertTitle: () => C("h3", { class: "font-bold" }, [P(e.title)]),
380
- alertDescription: () => C("div", { class: "text-xs" }, [P(e.description)]),
379
+ alertTitle: () => C("h3", { class: "font-bold" }, [P(t.title)]),
380
+ alertDescription: () => C("div", { class: "text-xs" }, [P(t.description)]),
381
381
  alertClose: () => {
382
- if (P(e.close)) return C(X, {
382
+ if (P(t.close)) return C(X, {
383
383
  id: "alert-close",
384
384
  class: "text-xl cursor-pointer rounded-full hover:scale-80 hover:ring transition duration-500",
385
- onClick: () => a(n).hide("close")
385
+ onClick: () => a(e).hide("close")
386
386
  }, null);
387
387
  },
388
- hide: (n) => {
389
- e.$el.remove(), t.emit("close", n);
388
+ hide: (e) => {
389
+ t.$el.remove(), n.emit("close", e);
390
390
  }
391
391
  };
392
392
  }
393
- }, e.$slots);
393
+ }, t.$slots);
394
394
  }
395
395
  }, oe = {
396
396
  viewBox: "0 0 24 24",
@@ -520,11 +520,11 @@ var Me = T({
520
520
  render: je
521
521
  }), Ne = {
522
522
  props: {
523
- setup: d,
523
+ setup: t,
524
524
  ReactiveView: !0
525
525
  },
526
526
  setup() {
527
- return (e) => C(r, {
527
+ return (t) => C(e, {
528
528
  modelName: "ListPagination",
529
529
  getDefaultData: (e) => ({
530
530
  page: 1,
@@ -634,58 +634,58 @@ var Me = T({
634
634
  a(e).next(),
635
635
  a(e).end()
636
636
  ]),
637
- pagination: (t) => a(a(e).$attrs.list).tid === t.id ? {} : t.index < i.value || t.index >= o.value ? { class: c("hidden") } : {},
637
+ pagination: (t) => a(a(e).$attrs.list).tid === t.id ? {} : t.index < i.value || t.index >= o.value ? { class: l("hidden") } : {},
638
638
  load: () => {},
639
639
  to: o,
640
640
  from: i
641
641
  };
642
642
  }
643
- }, e.$slots);
643
+ }, t.$slots);
644
644
  }
645
- }, Pe = l({
645
+ }, Pe = n({
646
646
  modelName: "ItemsList",
647
647
  props: {
648
- isValid: o({ type: [Boolean, Function] }),
649
- beforeItemAdding: o({ type: Function }),
650
- whenItemAdding: o({ type: Function }),
651
- beforeItemDeleting: o({ type: Function }),
652
- whenItemDeleting: o({ type: Function }),
653
- whenItemActive: o({ type: Function }),
654
- whenItemInactive: o({ type: Function }),
655
- defaultDisplayComponent: o(),
656
- displayComponent: o({ default: () => r }),
657
- itemProps: o({
648
+ isValid: c({ type: [Boolean, Function] }),
649
+ beforeItemAdding: c({ type: Function }),
650
+ whenItemAdding: c({ type: Function }),
651
+ beforeItemDeleting: c({ type: Function }),
652
+ whenItemDeleting: c({ type: Function }),
653
+ whenItemActive: c({ type: Function }),
654
+ whenItemInactive: c({ type: Function }),
655
+ defaultDisplayComponent: c(),
656
+ displayComponent: c({ default: () => e }),
657
+ itemProps: c({
658
658
  type: [Function, Object],
659
659
  default: () => ({})
660
660
  }),
661
- itemSlots: o({
661
+ itemSlots: c({
662
662
  type: [Function, Object],
663
663
  default: () => ({})
664
664
  }),
665
- itemKey: o({
665
+ itemKey: c({
666
666
  type: String,
667
667
  default: "id"
668
668
  }),
669
- paginator: o({ type: [Boolean, Object] }),
670
- draggable: o({ type: Function }),
671
- groupable: o({ type: Function }),
672
- sortable: o({
669
+ paginator: c({ type: [Boolean, Object] }),
670
+ draggable: c({ type: Function }),
671
+ groupable: c({ type: Function }),
672
+ sortable: c({
673
673
  type: Function,
674
674
  default: (e) => e
675
675
  }),
676
- filterable: o({
676
+ filterable: c({
677
677
  type: Function,
678
678
  default: (e) => e
679
679
  }),
680
- clickable: o({
680
+ clickable: c({
681
681
  type: Boolean,
682
682
  default: !0
683
683
  }),
684
- selectable: o({
684
+ selectable: c({
685
685
  type: Boolean,
686
686
  default: !0
687
687
  }),
688
- selected: o({
688
+ selected: c({
689
689
  type: [
690
690
  Boolean,
691
691
  Function,
@@ -695,51 +695,51 @@ var Me = T({
695
695
  ],
696
696
  default: 0
697
697
  }),
698
- duplicate: o({
698
+ duplicate: c({
699
699
  type: Function,
700
700
  default: () => !1
701
701
  }),
702
- addToStart: o({
702
+ addToStart: c({
703
703
  type: Boolean,
704
704
  default: !0
705
705
  }),
706
- multiple: o({ type: Boolean }),
707
- "data:callback_key": o({ type: [
706
+ multiple: c({ type: Boolean }),
707
+ "data:callback_key": c({ type: [
708
708
  Boolean,
709
709
  Function,
710
710
  String
711
711
  ] }),
712
- listPaginationClass: o(),
713
- listDefaultClass: o(),
714
- listTemplateClass: o(),
715
- listClass: o()
712
+ listPaginationClass: c(),
713
+ listDefaultClass: c(),
714
+ listTemplateClass: c(),
715
+ listClass: c()
716
716
  },
717
717
  defaultData: [],
718
- setup(e, t, i) {
718
+ setup(t, n, i) {
719
719
  let o = `component_${U()}`, s = M({}), c = N(U()), l = N(U()), d = N([P(c)]), f = N(), p = N(), m = N(), h = N(), v = y(() => {
720
720
  try {
721
- let t = a(e).activeComponent();
721
+ let e = a(t).activeComponent();
722
722
  return typeof i.isValid == "function" ? i.isValid({
723
- component: t,
724
- list: e
725
- }) : typeof P(i.isValid) == "boolean" ? P(i.isValid) : P(a(t).isValid);
723
+ component: e,
724
+ list: t
725
+ }) : typeof P(i.isValid) == "boolean" ? P(i.isValid) : P(a(e).isValid);
726
726
  } catch {
727
727
  return !1;
728
728
  }
729
729
  }), b = y(() => {
730
730
  try {
731
- return a(e).model.getData().map((t) => {
731
+ return a(t).model.getData().map((e) => {
732
732
  try {
733
- if (["Object"].includes(t.constructor.name)) {
734
- let n = a(e).itemIdentifier(t);
735
- return n || n === 0 ? t : Object.assign(t, { tid: U() });
733
+ if (["Object"].includes(e.constructor.name)) {
734
+ let n = a(t).itemIdentifier(e);
735
+ return n || n === 0 ? e : Object.assign(e, { tid: U() });
736
736
  } else return {
737
- "": t,
737
+ "": e,
738
738
  tid: U()
739
739
  };
740
740
  } catch {
741
741
  return {
742
- "": t,
742
+ "": e,
743
743
  tid: U()
744
744
  };
745
745
  }
@@ -747,20 +747,20 @@ var Me = T({
747
747
  } catch {
748
748
  return [];
749
749
  }
750
- }), x = y(() => i.sortable(i.filterable(P(b), e), e)), S = (e = {}, t = !0) => {
750
+ }), x = y(() => i.sortable(i.filterable(P(b), t), t)), S = (e = {}, t = !0) => {
751
751
  try {
752
752
  return e.hasOwnProperty(i.itemKey) ? i.itemKey : t ? "tid" : i.itemKey;
753
753
  } catch {
754
754
  return t ? "tid" : i.itemKey;
755
755
  }
756
- }, w = (t = {}) => {
756
+ }, w = (e = {}) => {
757
757
  try {
758
- return t[a(e).itemKey(t)];
758
+ return e[a(t).itemKey(e)];
759
759
  } catch {
760
760
  return;
761
761
  }
762
- }, T = (e) => s[e], E = () => i.defaultDisplayComponent === !1 ? C(r, { class: "hidden" }) : i.defaultDisplayComponent === void 0 ? i.displayComponent : i.defaultDisplayComponent, D = () => C(i.displayComponent), O = (t = {}) => t.id === P(c) ? a(e).defaultDisplayComponent() : i.displayComponent, A = (t) => {
763
- let n = a(e).itemIdentifier(t), r = a(e).getComponent(P(l)), o = a(e).getComponent(n);
762
+ }, T = (e) => s[e], E = () => i.defaultDisplayComponent === !1 ? C(e, { class: "hidden" }) : i.defaultDisplayComponent === void 0 ? i.displayComponent : i.defaultDisplayComponent, D = () => C(i.displayComponent), O = (e = {}) => e.id === P(c) ? a(t).defaultDisplayComponent() : i.displayComponent, A = (e) => {
763
+ let n = a(t).itemIdentifier(e), r = a(t).getComponent(P(l)), o = a(t).getComponent(n);
764
764
  if (o && i.duplicate({
765
765
  id: n,
766
766
  tid: P(c),
@@ -771,43 +771,43 @@ var Me = T({
771
771
  {
772
772
  let n = o ?? r;
773
773
  if (n) {
774
- let r = a(e).getComponent(P(c));
775
- a(n).model.replaceData(t ?? I(r));
774
+ let r = a(t).getComponent(P(c));
775
+ a(n).model.replaceData(e ?? I(r));
776
776
  }
777
777
  return n;
778
778
  }
779
- }, j = (t, n) => new Promise(async (r) => {
779
+ }, j = (e, n) => new Promise(async (r) => {
780
780
  let i = P(x).reduce((r, i) => {
781
781
  let { id: o = !0, force: s = !1 } = typeof n == "boolean" ? {
782
782
  id: !0,
783
783
  force: n
784
- } : n ?? {}, c = a(e).itemIdentifier(i), l = a(e).getComponent(c);
785
- return i.hasOwnProperty("tid") || s ? r.concat(t({
786
- list: e,
787
- data: a(e).finalize(l, o),
784
+ } : n ?? {}, c = a(t).itemIdentifier(i), l = a(t).getComponent(c);
785
+ return i.hasOwnProperty("tid") || s ? r.concat(e({
786
+ list: t,
787
+ data: a(t).finalize(l, o),
788
788
  component: l,
789
789
  tid: c
790
790
  })) : r;
791
791
  }, []);
792
792
  r(await Promise.all(i));
793
- }), I = (e) => a(e).model.getData({ raw: !0 }) ?? a(e).model.getData(), L = async (t) => {
794
- let n = i.beforeItemAdding ?? a(t).beforeItemAdding, r = i.whenItemAdding ?? a(t).whenItemAdding, o = {
793
+ }), I = (e) => a(e).model.getData({ raw: !0 }) ?? a(e).model.getData(), L = async (e) => {
794
+ let n = i.beforeItemAdding ?? a(e).beforeItemAdding, r = i.whenItemAdding ?? a(e).whenItemAdding, o = {
795
795
  tid: P(c),
796
- data: V(t),
797
- list: e
796
+ data: V(e),
797
+ list: t
798
798
  };
799
- return (await n?.(Object.assign({}, o, { component: t }), e) ?? !0) && (await r?.(o, e) ? await r(Object.assign({}, o, { component: t }), e) : a(e).set(g.on(I(t)).clone())), t;
800
- }, z = async (t) => {
801
- if (!(a(t).$attrs.default || a(t).$attrs.template)) {
802
- let n = i.beforeItemDeleting ?? a(t).beforeItemDeleting, r = i.whenItemDeleting ?? a(t).whenItemDeleting, o = { list: e };
803
- return (await n?.(Object.assign({}, o, { component: t }), e) ?? !0) && (await r?.(o, e) ? await r(Object.assign({}, o, { component: t }), e) : a(e).unset(g.on(I(t)).clone())), t;
799
+ return (await n?.(Object.assign({}, o, { component: e }), t) ?? !0) && (await r?.(o, t) ? await r(Object.assign({}, o, { component: e }), t) : a(t).set(g.on(I(e)).clone())), e;
800
+ }, z = async (e) => {
801
+ if (!(a(e).$attrs.default || a(e).$attrs.template)) {
802
+ let n = i.beforeItemDeleting ?? a(e).beforeItemDeleting, r = i.whenItemDeleting ?? a(e).whenItemDeleting, o = { list: t };
803
+ return (await n?.(Object.assign({}, o, { component: e }), t) ?? !0) && (await r?.(o, t) ? await r(Object.assign({}, o, { component: e }), t) : a(t).unset(g.on(I(e)).clone())), e;
804
804
  }
805
- }, ee = (t) => {
806
- let n = a(e).itemIdentifier(t);
807
- P(x).findIndex((t) => a(e).itemIdentifier(t) === n) === -1 ? (a(e).model.replaceData(i.addToStart ? [t].concat(P(x)) : P(x).concat(t)), delete s[P(l)], c.value = U(), l.value = U()) : a(e).defaultComponent(t);
808
- }, B = (t) => {
809
- let n = a(e).itemIdentifier(t);
810
- a(e).model.replaceData(P(x).filter((t) => a(e).itemIdentifier(t) !== n)), delete s[n];
805
+ }, ee = (e) => {
806
+ let n = a(t).itemIdentifier(e);
807
+ P(x).findIndex((e) => a(t).itemIdentifier(e) === n) === -1 ? (a(t).model.replaceData(i.addToStart ? [e].concat(P(x)) : P(x).concat(e)), delete s[P(l)], c.value = U(), l.value = U()) : a(t).defaultComponent(e);
808
+ }, B = (e) => {
809
+ let n = a(t).itemIdentifier(e);
810
+ a(t).model.replaceData(P(x).filter((e) => a(t).itemIdentifier(e) !== n)), delete s[n];
811
811
  }, V = (e, t) => {
812
812
  try {
813
813
  let { tid: n, ...r } = I(e);
@@ -816,27 +816,27 @@ var Me = T({
816
816
  return {};
817
817
  }
818
818
  }, H = () => {
819
- let t = a(e).activeItemIdentifier();
820
- return a(e).getComponent(t);
821
- }, W = () => i.selectable ? (i.multiple ? P(d) : P(d)[0]) ?? P(c) : P(c), te = ({ index: t, item: n }) => {
822
- let r = a(e).itemIdentifier(n), o = r === P(l), u = r === P(c), p = (t) => ({
823
- event: { [t]: !0 },
819
+ let e = a(t).activeItemIdentifier();
820
+ return a(t).getComponent(e);
821
+ }, W = () => i.selectable ? (i.multiple ? P(d) : P(d)[0]) ?? P(c) : P(c), te = ({ index: e, item: n }) => {
822
+ let r = a(t).itemIdentifier(n), o = r === P(l), u = r === P(c), p = (e) => ({
823
+ event: { [e]: !0 },
824
824
  source: P(f),
825
- target: a(e).getComponent(r),
825
+ target: a(t).getComponent(r),
826
826
  items: P(x)
827
827
  }), m = {
828
828
  id: r,
829
829
  key: r,
830
- list: e,
830
+ list: t,
831
831
  instance: (e) => s[r] = e,
832
832
  default: u,
833
833
  template: o,
834
834
  selected: P(d).includes(r),
835
- component: a(e).getComponent(r) ?? { model: _.setDefaultData(n) },
835
+ component: a(t).getComponent(r) ?? { model: _.setDefaultData(n) },
836
836
  defaultData: Array.isArray(n) ? [] : {},
837
837
  data: () => {
838
- let n = P(x).find((t) => a(e).itemIdentifier(t) === r);
839
- return n === void 0 ? P(x)[t] : n;
838
+ let n = P(x).find((e) => a(t).itemIdentifier(e) === r);
839
+ return n === void 0 ? P(x)[e] : n;
840
840
  },
841
841
  "data:callback": (e, { component: t }) => {
842
842
  try {
@@ -846,51 +846,51 @@ var Me = T({
846
846
  a(t).model.replaceData(e.after);
847
847
  }
848
848
  },
849
- onClick: (t) => {
850
- let n = a(e).getComponent(r);
851
- i.selectable && (typeof a(n).whenItemSelected == "function" ? a(n).whenItemSelected(t, m) : P(d).includes(r) || (d.value = [r])), i.clickable && typeof a(n).whenItemClicked == "function" && a(n).whenItemClicked(t, m);
849
+ onClick: (e) => {
850
+ let n = a(t).getComponent(r);
851
+ i.selectable && (typeof a(n).whenItemSelected == "function" ? a(n).whenItemSelected(e, m) : P(d).includes(r) || (d.value = [r])), i.clickable && typeof a(n).whenItemClicked == "function" && a(n).whenItemClicked(e, m);
852
852
  },
853
853
  ...o ? { class: "hidden" } : {},
854
- ...typeof t == "number" ? { index: t } : {},
854
+ ...typeof e == "number" ? { index: e } : {},
855
855
  ...i.draggable ? {
856
856
  draggable: !0,
857
- ondragover: (t) => {
858
- t.preventDefault(), i.draggable(p("over"), e);
857
+ ondragover: (e) => {
858
+ e.preventDefault(), i.draggable(p("over"), t);
859
859
  },
860
860
  ondragend: () => {
861
- f.value = void 0, i.draggable(p("end"), e);
861
+ f.value = void 0, i.draggable(p("end"), t);
862
862
  },
863
863
  ondragstart: () => {
864
- f.value = a(e).getComponent(r), i.draggable(p("start"), e);
864
+ f.value = a(t).getComponent(r), i.draggable(p("start"), t);
865
865
  },
866
866
  ondrop: () => {
867
- i.draggable(p("drop"), e);
867
+ i.draggable(p("drop"), t);
868
868
  },
869
869
  ondragenter: () => {
870
- a(e).itemIdentifier(I(f)) !== r && i.draggable(p("enter"), e);
870
+ a(t).itemIdentifier(I(f)) !== r && i.draggable(p("enter"), t);
871
871
  },
872
872
  ondragleave: () => {
873
- a(e).itemIdentifier(I(f)) !== r && i.draggable(p("leave"), e);
873
+ a(t).itemIdentifier(I(f)) !== r && i.draggable(p("leave"), t);
874
874
  }
875
875
  } : {}
876
876
  };
877
877
  return m;
878
878
  }, ne = () => {
879
- let t = a(e).itemOptions({ item: { tid: P(c) } }), r = a(e).itemOptions({ item: { tid: P(l) } });
879
+ let e = a(t).itemOptions({ item: { tid: P(c) } }), n = a(t).itemOptions({ item: { tid: P(l) } });
880
880
  return C("div", { class: i.$attrs.class }, [
881
- C("div", { class: i.listClass }, P(x).reduce((t, n, r) => t.concat(K(a(e).itemOptions({
881
+ C("div", { class: i.listClass }, P(x).reduce((e, n, r) => e.concat(K(a(t).itemOptions({
882
882
  index: r,
883
883
  item: n
884
884
  }))), [])),
885
885
  C("div", {
886
- ...n(t, ["class"]),
887
- class: R(u(t.class, i.listDefaultClass).string, u(i.listDefaultClass).string)
888
- }, [K(t)]),
886
+ ...r(e, ["class"]),
887
+ class: R(u(e.class, i.listDefaultClass).string, u(i.listDefaultClass).string)
888
+ }, [K(e)]),
889
889
  C("div", {
890
- ...n(r, ["class"]),
891
- class: R(u(r.class, i.listTemplateClass).string, u(i.listTemplateClass).string)
892
- }, [K(r)]),
893
- C("div", { class: i.listPaginationClass }, [a(e).paginationComponent()])
890
+ ...r(n, ["class"]),
891
+ class: R(u(n.class, i.listTemplateClass).string, u(i.listTemplateClass).string)
892
+ }, [K(n)]),
893
+ C("div", { class: i.listPaginationClass }, [a(t).paginationComponent()])
894
894
  ]);
895
895
  }, G = (e) => {
896
896
  try {
@@ -898,26 +898,26 @@ var Me = T({
898
898
  } catch {
899
899
  return !1;
900
900
  }
901
- }, K = (t) => {
902
- let o = a(e).activeDisplay(t), s = typeof o == "function" ? o(t) : o, { class: c, ...l } = typeof i.itemProps == "function" ? i.itemProps(t) : i.itemProps, { class: d } = a(e).pageProps(t), { class: f, ...p } = {
903
- ...t,
901
+ }, K = (n) => {
902
+ let o = a(t).activeDisplay(n), s = typeof o == "function" ? o(n) : o, { class: c, ...l } = typeof i.itemProps == "function" ? i.itemProps(n) : i.itemProps, { class: d } = a(t).pageProps(n), { class: f, ...p } = {
903
+ ...n,
904
904
  ...l
905
- }, m = R(u(s.props.class, f, c, d).string, u(c, d).string), h = typeof i.itemSlots == "function" ? i.itemSlots(t) : i.itemSlots;
905
+ }, m = R(u(s.props.class, f, c, d).string, u(c, d).string), h = typeof i.itemSlots == "function" ? i.itemSlots(n) : i.itemSlots;
906
906
  try {
907
907
  return G(s) ? C(s, {
908
908
  ...p,
909
909
  class: m
910
910
  }, h) : G(s.type) ? C(s, {
911
911
  ...p,
912
- ...n(s.props, "class"),
912
+ ...r(s.props, "class"),
913
913
  class: m
914
- }, s.children) : C(r, {
914
+ }, s.children) : C(e, {
915
915
  ...p,
916
- ...n(s.props, "class"),
916
+ ...r(s.props, "class"),
917
917
  class: m
918
918
  }, () => s.children);
919
919
  } catch (e) {
920
- return console.log("component builder failed:", e, s), C("div", t, "Component failed to mount!");
920
+ return console.log("component builder failed:", e, s), C("div", n, "Component failed to mount!");
921
921
  }
922
922
  }, q = (e) => {
923
923
  try {
@@ -927,56 +927,56 @@ var Me = T({
927
927
  }
928
928
  }, J = () => {
929
929
  if (i.paginator) {
930
- let { component: t = Ne, data: n, props: r } = i.paginator?.props?.ReactiveView ? {
930
+ let { component: e = Ne, data: n, props: r } = i.paginator?.props?.ReactiveView ? {
931
931
  component: i.paginator,
932
- props: { list: e }
932
+ props: { list: t }
933
933
  } : i.paginator?.component || i.paginator?.data || i.paginator?.props ? {
934
934
  ...i.paginator,
935
935
  props: {
936
- list: i.paginator.list ?? e,
936
+ list: i.paginator.list ?? t,
937
937
  ...i.paginator.props
938
938
  }
939
- } : { props: { list: e } };
940
- return C(t, {
939
+ } : { props: { list: t } };
940
+ return C(e, {
941
941
  ...r,
942
942
  instance: p,
943
943
  ...n === void 0 ? {} : { data: n }
944
944
  });
945
945
  }
946
- }, Y = (t) => C("button", {
946
+ }, Y = (e) => C("button", {
947
947
  ref: m,
948
948
  class: "btn btn-sm btn-success text-white uppercase",
949
949
  onClick: () => {
950
- let n = a(e).defaultComponent(t);
951
- if (n) return a(e).add(n);
950
+ let n = a(t).defaultComponent(e);
951
+ if (n) return a(t).add(n);
952
952
  },
953
- disabled: !P(a(e).isValid)
954
- }, "add"), X = (t) => {
955
- let n = a(e).getComponent(a(e).itemIdentifier(t));
953
+ disabled: !P(a(t).isValid)
954
+ }, "add"), X = (e) => {
955
+ let n = a(t).getComponent(a(t).itemIdentifier(e));
956
956
  return C("button", {
957
957
  ref: h,
958
958
  class: "btn btn-sm btn-error text-white uppercase",
959
959
  onClick: () => {
960
- if (n) return a(e).remove(n);
960
+ if (n) return a(t).remove(n);
961
961
  },
962
962
  disabled: !n || n === s[P(c)] || n === s[P(l)]
963
963
  }, "delete");
964
964
  }, Z = () => {
965
- F(d, (t, n = []) => {
966
- t.forEach((t) => {
965
+ F(d, (e, n = []) => {
966
+ e.forEach((e) => {
967
967
  setTimeout(() => {
968
- let n = a(e).getComponent(t), r = i.whenItemActive ?? a(n).whenItemActive;
968
+ let n = a(t).getComponent(e), r = i.whenItemActive ?? a(n).whenItemActive;
969
969
  n && r && r({
970
- list: e,
970
+ list: t,
971
971
  data: a(n).model.getData(),
972
972
  component: n
973
973
  });
974
974
  });
975
- }), n.forEach((t) => {
975
+ }), n.forEach((e) => {
976
976
  setTimeout(() => {
977
- let n = a(e).getComponent(t), r = i.whenItemInactive ?? a(n).whenItemInactive;
977
+ let n = a(t).getComponent(e), r = i.whenItemInactive ?? a(n).whenItemInactive;
978
978
  n && r && r({
979
- list: e,
979
+ list: t,
980
980
  data: a(n).model.getData(),
981
981
  component: n
982
982
  });
@@ -984,20 +984,20 @@ var Me = T({
984
984
  });
985
985
  }, { immediate: !0 });
986
986
  }, re = () => {
987
- let t = (t, n = "") => {
988
- if (typeof n == "string") return t.find((t) => t[a(e).itemKey(t)] === n || t[""] === n);
989
- if (typeof n == "function") return t.find((e) => n(e));
990
- if (["Object"].includes(n.constructor.name)) return t.find((t) => t[a(e).itemKey(t)] === n.id || t[a(e).itemKey(t)] === n[a(e).itemKey(n)]);
991
- if (["Number"].includes(n.constructor.name)) return n > -1 ? t[n > t.length ? t.length - 1 : n] ?? t[t.length - 1] : t[t.length - Math.abs(n)] ?? t[0];
987
+ let e = (e, n = "") => {
988
+ if (typeof n == "string") return e.find((e) => e[a(t).itemKey(e)] === n || e[""] === n);
989
+ if (typeof n == "function") return e.find((e) => n(e));
990
+ if (["Object"].includes(n.constructor.name)) return e.find((e) => e[a(t).itemKey(e)] === n.id || e[a(t).itemKey(e)] === n[a(t).itemKey(n)]);
991
+ if (["Number"].includes(n.constructor.name)) return n > -1 ? e[n > e.length ? e.length - 1 : n] ?? e[e.length - 1] : e[e.length - Math.abs(n)] ?? e[0];
992
992
  };
993
993
  F(x, (n, r) => {
994
994
  if (r) {
995
- if (n.length > r.length) d.value = [a(e).itemIdentifier(i.addToStart ? t(n, 0) : t(n, -1))];
995
+ if (n.length > r.length) d.value = [a(t).itemIdentifier(i.addToStart ? e(n, 0) : e(n, -1))];
996
996
  else if (n.length < r.length) {
997
- let i = r.findIndex((t) => a(e).itemIdentifier(t) === P(d)[0]);
998
- i > -1 && (d.value = [a(e).itemIdentifier(t(n, i) ?? t(n, -1)) ?? P(c)]);
997
+ let i = r.findIndex((e) => a(t).itemIdentifier(e) === P(d)[0]);
998
+ i > -1 && (d.value = [a(t).itemIdentifier(e(n, i) ?? e(n, -1)) ?? P(c)]);
999
999
  }
1000
- } else d.value = [a(e).itemIdentifier(t(n, i.selected))];
1000
+ } else d.value = [a(t).itemIdentifier(e(n, i.selected))];
1001
1001
  }, { immediate: !0 });
1002
1002
  };
1003
1003
  return k(() => {
@@ -1031,7 +1031,7 @@ var Me = T({
1031
1031
  id: o
1032
1032
  };
1033
1033
  }
1034
- }), Fe = l({
1034
+ }), Fe = n({
1035
1035
  modelName: "CustomTableRow",
1036
1036
  setup: (e, t, n) => {
1037
1037
  let r = a(a(e).$attrs.list);
@@ -1069,19 +1069,19 @@ var Me = T({
1069
1069
  checkedRef: y(() => P(a(r).checkedRef).has(a(r).itemIdentifier(a(e).model.getData())))
1070
1070
  };
1071
1071
  }
1072
- }), Ie = l({
1072
+ }), Ie = n({
1073
1073
  modelName: "Popover",
1074
1074
  props: {
1075
- autoClose: o({
1075
+ autoClose: c({
1076
1076
  type: Boolean,
1077
1077
  default: !0
1078
1078
  }),
1079
- timeout: o({
1079
+ timeout: c({
1080
1080
  default: 0,
1081
1081
  validator: (e) => /^\d+$/.test(e)
1082
1082
  }),
1083
- containerClass: o(),
1084
- boundary: o({ type: [
1083
+ containerClass: c(),
1084
+ boundary: c({ type: [
1085
1085
  Function,
1086
1086
  Object,
1087
1087
  String
@@ -1151,30 +1151,30 @@ var Me = T({
1151
1151
  popoverRef: i
1152
1152
  };
1153
1153
  }
1154
- }), Le = l({
1154
+ }), Le = n({
1155
1155
  modelName: "CustomTable",
1156
1156
  props: {
1157
- empty: o({ type: Object }),
1158
- isSelectable: o({
1157
+ empty: c({ type: Object }),
1158
+ isSelectable: c({
1159
1159
  type: Boolean,
1160
1160
  default: !0
1161
1161
  }),
1162
- isCollapsible: o({ type: Boolean }),
1163
- hasMenu: o({
1162
+ isCollapsible: c({ type: Boolean }),
1163
+ hasMenu: c({
1164
1164
  type: Boolean,
1165
1165
  default: !0
1166
1166
  }),
1167
- hasHeaderMenu: o({ type: Boolean }),
1168
- headerClass: o(),
1169
- columnLines: o({ type: Boolean }),
1170
- rowLines: o({
1167
+ hasHeaderMenu: c({ type: Boolean }),
1168
+ headerClass: c(),
1169
+ columnLines: c({ type: Boolean }),
1170
+ rowLines: c({
1171
1171
  type: Boolean,
1172
1172
  default: !0
1173
1173
  })
1174
1174
  },
1175
1175
  defaultDisplayComponent: !1,
1176
1176
  displayComponent: Fe,
1177
- setup(e, t, r) {
1177
+ setup(e, t, n) {
1178
1178
  let o = N({
1179
1179
  children: [],
1180
1180
  props: {}
@@ -1192,23 +1192,23 @@ var Me = T({
1192
1192
  a(e).model.getData().forEach((t) => {
1193
1193
  P(a(e).checkedRef).delete(a(e).itemIdentifier(t));
1194
1194
  });
1195
- }, _ = (e) => r.columnLines ? `[&>.sticky]:z-1 [&>.sticky:not(:last-child):not(:has(~.sticky:not(:last-child)))]:-mr-[calc(var(--column-gap,1rem)/2)] [&>.sticky:not(:last-child):not(:has(~.sticky:not(:last-child)))]:shadow-[1px_0_0_var(--colors-EDEFF2)] [&>*:nth-child(n+3):not(:last-child):not(.sticky)]:relative [&>*:nth-child(n+3):not(:last-child)]:after:absolute [&>*:nth-child(n+3):not(:last-child)]:after:w-px [&>*:nth-child(n+3):not(:last-child)]:after:bg-(--colors-EDEFF2) [&>*:nth-child(n+3):not(:last-child)]:after:left-[calc(var(--column-gap,1rem)/-2)] ${e}` : "", b = () => r.rowLines ? "border-(--colors-EDEFF2) border-b last:border-b-0 [&:has(+:not([data-table-row]))]:border-b-0 [[data-table-row]_&]:border-b-0 [[data-table-row]_*_&]:border-t" : "", x = () => R(r.isCollapsible || r.isSelectable ? "" : "[&>:nth-child(2)]:-ml-[calc(var(--column-gap,1rem)-0.75rem)]", r.hasMenu ? "" : "[&>:nth-last-child(2)]:-mr-[calc(var(--column-gap,1rem)-0.75rem)]"), T = (e, t, n) => t ? e.props?.[`data-col-${t}`] ?? n : e.props ?? {}, D = () => C("div", {
1195
+ }, _ = (e) => n.columnLines ? `[&>.sticky]:z-1 [&>.sticky:not(:last-child):not(:has(~.sticky:not(:last-child)))]:-mr-[calc(var(--column-gap,1rem)/2)] [&>.sticky:not(:last-child):not(:has(~.sticky:not(:last-child)))]:shadow-[1px_0_0_var(--colors-EDEFF2)] [&>*:nth-child(n+3):not(:last-child):not(.sticky)]:relative [&>*:nth-child(n+3):not(:last-child)]:after:absolute [&>*:nth-child(n+3):not(:last-child)]:after:w-px [&>*:nth-child(n+3):not(:last-child)]:after:bg-(--colors-EDEFF2) [&>*:nth-child(n+3):not(:last-child)]:after:left-[calc(var(--column-gap,1rem)/-2)] ${e}` : "", b = () => n.rowLines ? "border-(--colors-EDEFF2) border-b last:border-b-0 [&:has(+:not([data-table-row]))]:border-b-0 [[data-table-row]_&]:border-b-0 [[data-table-row]_*_&]:border-t" : "", x = () => R(n.isCollapsible || n.isSelectable ? "" : "[&>:nth-child(2)]:-ml-[calc(var(--column-gap,1rem)-0.75rem)]", n.hasMenu ? "" : "[&>:nth-last-child(2)]:-mr-[calc(var(--column-gap,1rem)-0.75rem)]"), T = (e, t, n) => t ? e.props?.[`data-col-${t}`] ?? n : e.props ?? {}, D = () => C("div", {
1196
1196
  "data-table": !0,
1197
1197
  class: R("flex flex-col", P(o).props.class)
1198
1198
  }, [a(e).tableHead(), a(e).tableBody()]), O = () => {
1199
1199
  if (a(e).model.getData().length) {
1200
1200
  let t = a(e).rowCheckbox({ row: e }), i = a(e).rowMenuButton({ row: e }), s = a(e).leftRowColumnControls({ row: e }), c = a(e).rightRowColumnControls({ row: e }), l = P(o).props["data-header-row-class"] ?? "";
1201
- return C("div", { class: R(u({ "sticky top-0 z-10 bg-(--colors-F9FAFC) grid grid-cols-subgrid col-span-full": !0 }, r.headerClass, l).string, u(r.headerClass, l).string, _("[&>*:nth-child(n+3):not(:last-child)]:after:inset-y-0"), x()) }, [
1202
- C(s.type, s.props, { default: () => [C("div", { class: "h-full bg-inherit flex items-center gap-x-2" }, [a(e).rowCollapseButton({}), t && C(t.type, E(n(t.props, ["onChange"]), { onChange: (e) => e.target.checked ? p() : h() }), t.children)])] }),
1201
+ return C("div", { class: R(u({ "sticky top-0 z-10 bg-(--colors-F9FAFC) grid grid-cols-subgrid col-span-full": !0 }, n.headerClass, l).string, u(n.headerClass, l).string, _("[&>*:nth-child(n+3):not(:last-child)]:after:inset-y-0"), x()) }, [
1202
+ C(s.type, s.props, { default: () => [C("div", { class: "h-full bg-inherit flex items-center gap-x-2" }, [a(e).rowCollapseButton({}), t && C(t.type, E(r(t.props, ["onChange"]), { onChange: (e) => e.target.checked ? p() : h() }), t.children)])] }),
1203
1203
  P(o).children.map((e) => T(e, "element") ?? w(T(e, "type", "div"), { class: R(u(T(e).class).string, u(T(e, "class")).string) }, T(e, "title"))),
1204
- C(c.type, c.props, { default: () => [C("div", { class: "h-full bg-inherit flex items-center" }, [i && C(i, E(n(i.props, ["class"]), { class: R(i.props.class, u({ hidden: !r.hasHeaderMenu }).string) }), i.children)])] })
1204
+ C(c.type, c.props, { default: () => [C("div", { class: "h-full bg-inherit flex items-center" }, [i && C(i, E(r(i.props, ["class"]), { class: R(i.props.class, u({ hidden: !n.hasHeaderMenu }).string) }), i.children)])] })
1205
1205
  ]);
1206
1206
  }
1207
1207
  }, k = () => {
1208
- if (!a(e).model.getData().length && r.empty) return [a(e).emptyTableElement()];
1209
- let [n, i, o, s] = a(t).template().children;
1208
+ if (!a(e).model.getData().length && n.empty) return [a(e).emptyTableElement()];
1209
+ let [r, i, o, s] = a(t).template().children;
1210
1210
  return [
1211
- n.children,
1211
+ r.children,
1212
1212
  i.children,
1213
1213
  o.children,
1214
1214
  a(e).tablePagination(s.children),
@@ -1216,8 +1216,8 @@ var Me = T({
1216
1216
  ];
1217
1217
  }, A = (e) => {
1218
1218
  if (e?.some(Boolean)) return C("div", { class: "sticky bottom-0 z-10 col-span-full px-3 py-2 border-t border-(--colors-EDEFF2) bg-(--colors-white) text-sm" }, [C("div", { class: "sticky right-3 ml-auto w-max" }, [e])]);
1219
- }, j = (...t) => C("div", { class: R("sticky left-0 bg-inherit self-stretch", r.isCollapsible || r.isSelectable ? "px-3" : "px-0") }, [C("div", { class: "h-full flex items-center gap-x-2 bg-inherit" }, [a(e).rowCollapseButton(...t), a(e).rowCheckbox(...t)])]), M = (...t) => C("div", { class: R("sticky right-0 bg-inherit self-stretch", r.hasMenu ? "px-3" : "px-0") }, [C("div", { class: "h-full flex items-center gap-x-2 bg-inherit" }, [a(e).rowMenuButton(...t)])]), I = () => {
1220
- let e = g.on(r.empty);
1219
+ }, j = (...t) => C("div", { class: R("sticky left-0 bg-inherit self-stretch", n.isCollapsible || n.isSelectable ? "px-3" : "px-0") }, [C("div", { class: "h-full flex items-center gap-x-2 bg-inherit" }, [a(e).rowCollapseButton(...t), a(e).rowCheckbox(...t)])]), M = (...t) => C("div", { class: R("sticky right-0 bg-inherit self-stretch", n.hasMenu ? "px-3" : "px-0") }, [C("div", { class: "h-full flex items-center gap-x-2 bg-inherit" }, [a(e).rowMenuButton(...t)])]), I = () => {
1220
+ let e = g.on(n.empty);
1221
1221
  return C("div", { class: {
1222
1222
  hidden: !e.get(),
1223
1223
  "py-8 px-3 flex flex-col gap-y-3 col-span-full": !0
@@ -1227,7 +1227,7 @@ var Me = T({
1227
1227
  C("div", { class: "hidden" }, [a(t).template()])
1228
1228
  ]);
1229
1229
  }, L = ({ row: t } = {}) => {
1230
- if (r.hasMenu) return C(Ie, {
1230
+ if (n.hasMenu) return C(Ie, {
1231
1231
  boundary: "[data-table]",
1232
1232
  setup: (n, r) => ({
1233
1233
  trigger: () => C(q, {
@@ -1262,7 +1262,7 @@ var Me = T({
1262
1262
  });
1263
1263
  }
1264
1264
  }, ee = ({ row: t } = {}) => {
1265
- if (r.isCollapsible) {
1265
+ if (n.isCollapsible) {
1266
1266
  let n = t && a(e).itemIdentifier(a(t).model.getData()), r = t ? P(c).has(n) : P(d);
1267
1267
  return C(q, {
1268
1268
  unstyled: !0,
@@ -1276,7 +1276,7 @@ var Me = T({
1276
1276
  } }, null) });
1277
1277
  }
1278
1278
  }, V = ({ row: t } = {}) => {
1279
- if (r.isSelectable) return C(m, {
1279
+ if (n.isSelectable) return C(m, {
1280
1280
  type: "checkbox",
1281
1281
  size: "large",
1282
1282
  indeterminate: t === e && P(f),
@@ -1289,8 +1289,8 @@ var Me = T({
1289
1289
  }, H = () => {
1290
1290
  if (P(a(e).checkedRef).size) return C("div", { class: "sticky bottom-0 z-20 col-span-full" }, [C("div", { class: "sticky left-1/2 w-0" }, [C("div", { class: {
1291
1291
  "absolute -translate-x-1/2 bg-white rounded-xl shadow-[0_4px_24px_rgba(0,0,0,0.12)] px-5 py-3 flex items-center w-max": !0,
1292
- "bottom-16": !!P(r.$attrs.paginator),
1293
- "bottom-8": !P(r.$attrs.paginator)
1292
+ "bottom-16": !!P(n.$attrs.paginator),
1293
+ "bottom-8": !P(n.$attrs.paginator)
1294
1294
  } }, [
1295
1295
  C("span", { class: "font-medium" }, [P(a(e).checkedRef).size, S(" Selected")]),
1296
1296
  C(B, { layout: "vertical" }, null),
@@ -1336,10 +1336,10 @@ var Me = T({
1336
1336
  } catch (t) {
1337
1337
  try {
1338
1338
  return a(e).rowElement();
1339
- } catch (n) {
1340
- console.warn(`[${r.modelName}]: failed to set table columns`, {
1339
+ } catch (r) {
1340
+ console.warn(`[${n.modelName}]: failed to set table columns`, {
1341
1341
  e1: t,
1342
- e2: n
1342
+ e2: r
1343
1343
  }, a(e));
1344
1344
  }
1345
1345
  }
@@ -1378,39 +1378,39 @@ var Me = T({
1378
1378
  handleCollapsible: J
1379
1379
  };
1380
1380
  }
1381
- }, Pe), Re = l({
1381
+ }, Pe), Re = n({
1382
1382
  props: {
1383
- defaultData: o(),
1384
- filled: o({ type: Boolean }),
1385
- timezone: o({ type: [Boolean, String] }),
1386
- time: o({ type: Boolean }),
1387
- date: o({
1383
+ defaultData: c(),
1384
+ filled: c({ type: Boolean }),
1385
+ timezone: c({ type: [Boolean, String] }),
1386
+ time: c({ type: Boolean }),
1387
+ date: c({
1388
1388
  type: Boolean,
1389
1389
  default: !0
1390
1390
  }),
1391
- type: o({
1391
+ type: c({
1392
1392
  type: String,
1393
1393
  default: "date",
1394
- validator: (t) => {
1395
- let n = [
1394
+ validator: (e) => {
1395
+ let t = [
1396
1396
  "date",
1397
1397
  "dates",
1398
1398
  "range"
1399
1399
  ];
1400
- return n.includes(t) || e(`[Datetime] invalid type. Must be one of ${n.join(", ")}.`);
1400
+ return t.includes(e) || d(`[Datetime] invalid type. Must be one of ${t.join(", ")}.`);
1401
1401
  }
1402
1402
  }),
1403
- options: o({
1403
+ options: c({
1404
1404
  type: Object,
1405
1405
  default: {}
1406
1406
  }),
1407
- minDate: o({
1407
+ minDate: c({
1408
1408
  type: [Boolean, Date],
1409
1409
  default: () => /* @__PURE__ */ new Date(),
1410
1410
  validator: (e) => ["Boolean", "Date"].includes(e?.constructor.name) && e !== !0
1411
1411
  }),
1412
- inputClass: o(),
1413
- panelClass: o()
1412
+ inputClass: c(),
1413
+ panelClass: c()
1414
1414
  },
1415
1415
  defaultData: (e) => P(e.defaultData) ?? {
1416
1416
  date: void 0,
@@ -1498,7 +1498,7 @@ var We = T({
1498
1498
  render: Ue
1499
1499
  }), Ge = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==", Q = null, Ke = (e) => {
1500
1500
  !e?.setDragImage || typeof Image > "u" || (Q || (Q = new Image(), Q.src = Ge), e.setDragImage(Q, 0, 0));
1501
- }, qe = l({
1501
+ }, qe = n({
1502
1502
  modelName: "DraggableList",
1503
1503
  defaultData: [],
1504
1504
  setup(e, t, n) {