lkt-table 2.0.22 → 2.0.23

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.
package/dist/build.js CHANGED
@@ -1,8 +1,8 @@
1
- import { defineComponent as re, computed as s, ref as k, shallowReactive as Ft, watch as j, watchEffect as $t, onMounted as Ht, onBeforeUnmount as Ba, reactive as Ot, provide as aa, h as K, useId as Da, inject as ft, getCurrentInstance as Ia, onUnmounted as Ta, onUpdated as Ea, cloneVNode as Aa, resolveComponent as Se, createBlock as $, createElementBlock as y, unref as C, openBlock as c, normalizeProps as $e, mergeProps as ie, withCtx as F, createTextVNode as lt, toDisplayString as Ge, Fragment as x, withModifiers as la, createCommentVNode as B, resolveDynamicComponent as Ae, useSlots as na, normalizeClass as ae, createElementVNode as ee, createVNode as pe, renderSlot as U, renderList as de, withDirectives as Oe, vShow as _e, mergeDefaults as Va, nextTick as St, createSlots as Wt } from "vue";
1
+ import { defineComponent as re, computed as s, ref as k, shallowReactive as jt, watch as F, watchEffect as Ot, onMounted as qt, onBeforeUnmount as Ba, reactive as _t, provide as la, h as K, useId as Da, inject as ft, getCurrentInstance as Ia, onUnmounted as Ta, onUpdated as Ea, cloneVNode as Aa, resolveComponent as Se, createBlock as $, createElementBlock as y, unref as C, openBlock as c, normalizeProps as $e, mergeProps as ie, withCtx as j, createTextVNode as lt, toDisplayString as Ge, Fragment as x, withModifiers as na, createCommentVNode as B, resolveDynamicComponent as Ae, useSlots as oa, normalizeClass as ae, createElementVNode as ee, createVNode as pe, renderSlot as U, renderList as de, withDirectives as Oe, vShow as _e, mergeDefaults as Va, nextTick as St, createSlots as Jt } from "vue";
2
2
  import { __ as Ra } from "lkt-i18n";
3
- import { SortDirection as qe, Column as oa, extractPropValue as Ma, ColumnType as Ct, prepareResourceData as ia, TableRowType as tt, extractI18nValue as ra, LktSettings as fe, ensureButtonConfig as De, TablePermission as Ie, PaginatorType as wt, TableType as at, getDefaultValues as Na, Table as La, ButtonType as _t } from "lkt-vue-kernel";
3
+ import { SortDirection as qe, Column as ia, extractPropValue as Ma, ColumnType as Ct, prepareResourceData as ra, TableRowType as tt, extractI18nValue as ua, LktSettings as fe, ensureButtonConfig as De, TablePermission as Ie, PaginatorType as wt, TableType as at, getDefaultValues as Na, Table as La, ButtonType as Pt } from "lkt-vue-kernel";
4
4
  import { Column as gn, createColumn as bn } from "lkt-vue-kernel";
5
- import { replaceAll as ua, generateRandomString as $a } from "lkt-string-tools";
5
+ import { replaceAll as sa, generateRandomString as $a } from "lkt-string-tools";
6
6
  import { DataState as Oa } from "lkt-data-state";
7
7
  import _a from "sortablejs";
8
8
  import { time as Pa } from "lkt-date-tools";
@@ -11,12 +11,12 @@ import { time as Pa } from "lkt-date-tools";
11
11
  * (c) 2025
12
12
  * @license MIT
13
13
  */
14
- const sa = ["viewport", "carousel"], Dt = {
14
+ const da = ["viewport", "carousel"], Dt = {
15
15
  "bottom-to-top": "btt",
16
16
  "left-to-right": "ltr",
17
17
  "right-to-left": "rtl",
18
18
  "top-to-bottom": "ttb"
19
- }, da = [
19
+ }, ca = [
20
20
  "ltr",
21
21
  "left-to-right",
22
22
  "rtl",
@@ -36,7 +36,7 @@ const sa = ["viewport", "carousel"], Dt = {
36
36
  iconArrowRight: "Arrow pointing to the right",
37
37
  iconArrowUp: "Arrow pointing upwards",
38
38
  itemXofY: "Item {currentSlide} of {slidesCount}"
39
- }, ca = ["slide", "fade"], va = [
39
+ }, va = ["slide", "fade"], fa = [
40
40
  "center",
41
41
  "start",
42
42
  "end",
@@ -44,9 +44,9 @@ const sa = ["viewport", "carousel"], Dt = {
44
44
  "center-odd"
45
45
  ], z = {
46
46
  autoplay: 0,
47
- breakpointMode: sa[0],
47
+ breakpointMode: da[0],
48
48
  breakpoints: void 0,
49
- dir: da[0],
49
+ dir: ca[0],
50
50
  enabled: !0,
51
51
  gap: 0,
52
52
  height: "auto",
@@ -58,13 +58,13 @@ const sa = ["viewport", "carousel"], Dt = {
58
58
  mouseDrag: !0,
59
59
  pauseAutoplayOnHover: !1,
60
60
  preventExcessiveDragging: !1,
61
- slideEffect: ca[0],
62
- snapAlign: va[0],
61
+ slideEffect: va[0],
62
+ snapAlign: fa[0],
63
63
  touchDrag: !0,
64
64
  transition: 300,
65
65
  wrapAround: !1
66
66
  }, Xe = Symbol("carousel"), Fa = (e) => {
67
- const i = Ft([]), r = (n) => {
67
+ const i = jt([]), r = (n) => {
68
68
  n !== void 0 ? i.slice(n).forEach((l, a) => {
69
69
  var f;
70
70
  (f = l.exposed) === null || f === void 0 || f.setIndex(n + a);
@@ -93,7 +93,7 @@ const sa = ["viewport", "carousel"], Dt = {
93
93
  function ja(e) {
94
94
  return e.length === 0 ? 0 : e.reduce((r, n) => r + n, 0) / e.length;
95
95
  }
96
- function Jt({ slides: e, position: i, toShow: r }) {
96
+ function Qt({ slides: e, position: i, toShow: r }) {
97
97
  const n = [], l = i === "before", a = l ? -r : 0, f = l ? 0 : r;
98
98
  if (e.length <= 0)
99
99
  return n;
@@ -111,7 +111,7 @@ function Jt({ slides: e, position: i, toShow: r }) {
111
111
  return n;
112
112
  }
113
113
  const za = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])';
114
- function Qt(e) {
114
+ function Zt(e) {
115
115
  if (!e.el || !(e.el instanceof Element))
116
116
  return;
117
117
  const i = e.el.querySelectorAll(za);
@@ -172,17 +172,17 @@ function Ka(e, i, r) {
172
172
  return 0;
173
173
  }
174
174
  }
175
- function jt({ slideSize: e, viewportSize: i, align: r, itemsToShow: n }) {
175
+ function zt({ slideSize: e, viewportSize: i, align: r, itemsToShow: n }) {
176
176
  return n !== void 0 ? Ya(r, n) : e !== void 0 && i !== void 0 ? Ka(r, e, i) : 0;
177
177
  }
178
- function fa(e = "", i = {}) {
178
+ function pa(e = "", i = {}) {
179
179
  return Object.entries(i).reduce((r, [n, l]) => r.replace(`{${n}}`, String(l)), e);
180
180
  }
181
- function pa({ val: e, max: i, min: r = 0 }) {
181
+ function ma({ val: e, max: i, min: r = 0 }) {
182
182
  const n = i - r + 1;
183
183
  return ((e - r) % n + n) % n + r;
184
184
  }
185
- function Pt(e, i = 0) {
185
+ function Ut(e, i = 0) {
186
186
  let r = !1, n = 0, l = null;
187
187
  function a(...f) {
188
188
  if (r)
@@ -211,7 +211,7 @@ const Wa = re({
211
211
  class: ["carousel__liveregion", "carousel__sr-only"],
212
212
  "aria-live": "polite",
213
213
  "aria-atomic": "true"
214
- }, fa(e.config.i18n.itemXofY, {
214
+ }, pa(e.config.i18n.itemXofY, {
215
215
  currentSlide: e.currentSlide + 1,
216
216
  slidesCount: e.slidesCount
217
217
  })) : () => "";
@@ -231,7 +231,7 @@ const Wa = re({
231
231
  breakpointMode: {
232
232
  default: z.breakpointMode,
233
233
  validator(e) {
234
- return sa.includes(e);
234
+ return da.includes(e);
235
235
  }
236
236
  },
237
237
  // enable/disable the carousel component
@@ -298,14 +298,14 @@ const Wa = re({
298
298
  snapAlign: {
299
299
  default: z.snapAlign,
300
300
  validator(e) {
301
- return va.includes(e);
301
+ return fa.includes(e);
302
302
  }
303
303
  },
304
304
  slideEffect: {
305
305
  type: String,
306
306
  default: z.slideEffect,
307
307
  validator(e) {
308
- return ca.includes(e);
308
+ return va.includes(e);
309
309
  }
310
310
  },
311
311
  // sliding transition time in ms
@@ -318,7 +318,7 @@ const Wa = re({
318
318
  type: String,
319
319
  default: z.dir,
320
320
  validator(e, i) {
321
- if (!da.includes(e))
321
+ if (!ca.includes(e))
322
322
  return !1;
323
323
  const r = e in Dt ? Dt[e] : e;
324
324
  return ["ttb", "btt"].includes(r) && (!i.height || i.height === "auto") && console.warn(`[vue3-carousel warn]: The dir "${e}" is not supported with height "auto".`), !0;
@@ -345,8 +345,8 @@ const Wa = re({
345
345
  ],
346
346
  setup(e, { slots: i, emit: r, expose: n }) {
347
347
  var l;
348
- const a = Fa(r), f = a.getSlides(), g = s(() => f.length), m = k(null), D = k(null), o = k(0), T = s(() => Object.assign(Object.assign(Object.assign({}, z), Ha(e, ["breakpoints", "modelValue"])), { i18n: Object.assign(Object.assign({}, z.i18n), e.i18n) })), v = Ft(Object.assign({}, T.value)), S = k((l = e.modelValue) !== null && l !== void 0 ? l : 0), E = k(S.value);
349
- j(S, (d) => E.value = d);
348
+ const a = Fa(r), f = a.getSlides(), g = s(() => f.length), m = k(null), D = k(null), o = k(0), T = s(() => Object.assign(Object.assign(Object.assign({}, z), Ha(e, ["breakpoints", "modelValue"])), { i18n: Object.assign(Object.assign({}, z.i18n), e.i18n) })), v = jt(Object.assign({}, T.value)), S = k((l = e.modelValue) !== null && l !== void 0 ? l : 0), E = k(S.value);
349
+ F(S, (d) => E.value = d);
350
350
  const V = k(0), Ce = s(() => Math.ceil((g.value - 1) / 2)), O = s(() => g.value - 1), le = s(() => 0);
351
351
  let G = null, Ve = null, ue = null;
352
352
  const X = s(() => o.value + v.gap), u = s(() => {
@@ -360,9 +360,9 @@ const Wa = re({
360
360
  const b = (T.value.breakpointMode === "carousel" ? (d = m.value) === null || d === void 0 ? void 0 : d.getBoundingClientRect().width : typeof window < "u" ? window.innerWidth : 0) || 0, h = Object.keys(e.breakpoints || {}).map((R) => Number(R)).sort((R, q) => +q - +R), I = {};
361
361
  h.some((R) => b >= R ? (Object.assign(I, e.breakpoints[R]), I.i18n && Object.assign(I.i18n, T.value.i18n, e.breakpoints[R].i18n), !0) : !1), Object.assign(v, T.value, I);
362
362
  }
363
- const ot = Pt(() => {
363
+ const ot = Ut(() => {
364
364
  me(), Ye(), ge();
365
- }), Pe = Ft(/* @__PURE__ */ new Set()), ne = k([]);
365
+ }), Pe = jt(/* @__PURE__ */ new Set()), ne = k([]);
366
366
  function Re({ widthMultiplier: d, heightMultiplier: b }) {
367
367
  ne.value = f.map((h) => {
368
368
  var I;
@@ -408,7 +408,7 @@ const Wa = re({
408
408
  }));
409
409
  }
410
410
  const be = s(() => typeof e.ignoreAnimations == "string" ? e.ignoreAnimations.split(",") : Array.isArray(e.ignoreAnimations) ? e.ignoreAnimations : e.ignoreAnimations ? !1 : []);
411
- $t(() => Ye()), $t(() => {
411
+ Ot(() => Ye()), Ot(() => {
412
412
  ge();
413
413
  });
414
414
  let ye;
@@ -426,19 +426,19 @@ const Wa = re({
426
426
  const b = d.target;
427
427
  b && Pe.delete(b), ye && Pe.size === 0 && (cancelAnimationFrame(ye), ge());
428
428
  }, We = k(!1);
429
- typeof document < "u" && $t(() => {
429
+ typeof document < "u" && Ot(() => {
430
430
  We.value && be.value !== !1 ? (document.addEventListener("animationstart", Fe), document.addEventListener("animationend", Ke)) : (document.removeEventListener("animationstart", Fe), document.removeEventListener("animationend", Ke));
431
- }), Ht(() => {
431
+ }), qt(() => {
432
432
  We.value = !0, me(), Qe(), m.value && (ue = new ResizeObserver(ot), ue.observe(m.value)), r("init");
433
433
  }), Ba(() => {
434
434
  We.value = !1, a.cleanup(), Ve && clearTimeout(Ve), ye && cancelAnimationFrame(ye), G && clearInterval(G), ue && (ue.disconnect(), ue = null), typeof document < "u" && ut(), m.value && (m.value.removeEventListener("transitionend", ge), m.value.removeEventListener("animationiteration", ge));
435
435
  });
436
436
  let we = !1;
437
- const je = { x: 0, y: 0 }, ce = Ot({ x: 0, y: 0 }), ze = k(!1), it = k(!1), rt = () => {
437
+ const je = { x: 0, y: 0 }, ce = _t({ x: 0, y: 0 }), ze = k(!1), it = k(!1), rt = () => {
438
438
  ze.value = !0;
439
439
  }, Tt = () => {
440
440
  ze.value = !1;
441
- }, Me = Pt((d) => {
441
+ }, Me = Ut((d) => {
442
442
  if (!d.ctrlKey)
443
443
  switch (d.key) {
444
444
  case "ArrowLeft":
@@ -463,7 +463,7 @@ const Wa = re({
463
463
  const h = we ? "touchmove" : "mousemove", I = we ? "touchend" : "mouseup";
464
464
  document.addEventListener(h, st, { passive: !1 }), document.addEventListener(I, Je, { passive: !0 });
465
465
  }
466
- const st = Pt((d) => {
466
+ const st = Ut((d) => {
467
467
  it.value = !0;
468
468
  const b = "touches" in d ? d.touches[0].clientX : d.clientX, h = "touches" in d ? d.touches[0].clientY : d.clientY;
469
469
  ce.x = b - je.x, ce.y = h - je.y;
@@ -506,7 +506,7 @@ const Wa = re({
506
506
  if (!b && H.value)
507
507
  return;
508
508
  let h = d, I = d;
509
- V.value = S.value, v.wrapAround ? I = pa({
509
+ V.value = S.value, v.wrapAround ? I = ma({
510
510
  val: h,
511
511
  max: O.value,
512
512
  min: le.value
@@ -539,8 +539,8 @@ const Wa = re({
539
539
  function mt() {
540
540
  me(), Ye(), ge(), Ne();
541
541
  }
542
- j(() => [T.value, e.breakpoints], () => me(), { deep: !0 }), j(() => e.autoplay, () => Ne());
543
- const dt = j(() => e.modelValue, (d) => {
542
+ F(() => [T.value, e.breakpoints], () => me(), { deep: !0 }), F(() => e.autoplay, () => Ne());
543
+ const dt = F(() => e.modelValue, (d) => {
544
544
  d !== S.value && Be(Number(d), !0);
545
545
  });
546
546
  r("before-init");
@@ -558,13 +558,13 @@ const Wa = re({
558
558
  var d;
559
559
  if (P.value) {
560
560
  const b = (S.value % f.length + f.length) % f.length;
561
- return jt({
561
+ return zt({
562
562
  slideSize: (d = ne.value[b]) === null || d === void 0 ? void 0 : d[M.value],
563
563
  viewportSize: Ue.value[M.value],
564
564
  align: v.snapAlign
565
565
  });
566
566
  }
567
- return jt({
567
+ return zt({
568
568
  align: v.snapAlign,
569
569
  itemsToShow: +v.itemsToShow
570
570
  });
@@ -652,7 +652,7 @@ const Wa = re({
652
652
  "--vc-slide-gap": Bt(v.gap),
653
653
  "--vc-carousel-height": Bt(v.height),
654
654
  "--vc-cloned-offset": Bt(ct.value)
655
- })), gt = { slideTo: Be, next: Le, prev: Ze }, bt = Ot({
655
+ })), gt = { slideTo: Be, next: Le, prev: Ze }, bt = _t({
656
656
  activeSlide: E,
657
657
  config: v,
658
658
  currentSlide: S,
@@ -669,8 +669,8 @@ const Wa = re({
669
669
  viewport: D,
670
670
  visibleRange: At
671
671
  });
672
- aa(Xe, bt);
673
- const et = Ot({
672
+ la(Xe, bt);
673
+ const et = _t({
674
674
  config: v,
675
675
  currentSlide: S,
676
676
  maxSlide: O,
@@ -691,11 +691,11 @@ const Wa = re({
691
691
  updateSlidesData: Ye
692
692
  }), () => {
693
693
  var d;
694
- const b = i.default || i.slides, h = (b == null ? void 0 : b(et)) || [], { before: I, after: R } = Y.value, q = Jt({
694
+ const b = i.default || i.slides, h = (b == null ? void 0 : b(et)) || [], { before: I, after: R } = Y.value, q = Qt({
695
695
  slides: f,
696
696
  position: "before",
697
697
  toShow: I
698
- }), J = Jt({
698
+ }), J = Qt({
699
699
  slides: f,
700
700
  position: "after",
701
701
  toShow: R
@@ -736,38 +736,38 @@ const Wa = re({
736
736
  };
737
737
  }
738
738
  });
739
- var zt;
739
+ var Ht;
740
740
  (function(e) {
741
741
  e.arrowDown = "arrowDown", e.arrowLeft = "arrowLeft", e.arrowRight = "arrowRight", e.arrowUp = "arrowUp";
742
- })(zt || (zt = {}));
743
- const Zt = (e) => `icon${e.charAt(0).toUpperCase() + e.slice(1)}`, Za = {
742
+ })(Ht || (Ht = {}));
743
+ const xt = (e) => `icon${e.charAt(0).toUpperCase() + e.slice(1)}`, Za = {
744
744
  arrowDown: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",
745
745
  arrowLeft: "M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z",
746
746
  arrowRight: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",
747
747
  arrowUp: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"
748
748
  };
749
749
  function xa(e) {
750
- return e in zt;
750
+ return e in Ht;
751
751
  }
752
- const xt = (e) => e && xa(e), ea = re({
752
+ const ea = (e) => e && xa(e), ta = re({
753
753
  props: {
754
754
  name: {
755
755
  type: String,
756
756
  required: !0,
757
- validator: xt
757
+ validator: ea
758
758
  },
759
759
  title: {
760
760
  type: String,
761
- default: (e) => e.name ? z.i18n[Zt(e.name)] : ""
761
+ default: (e) => e.name ? z.i18n[xt(e.name)] : ""
762
762
  }
763
763
  },
764
764
  setup(e) {
765
765
  const i = ft(Xe, null);
766
766
  return () => {
767
767
  const r = e.name;
768
- if (!r || !xt(r))
768
+ if (!r || !ea(r))
769
769
  return;
770
- const n = Za[r], l = K("path", { d: n }), a = (i == null ? void 0 : i.config.i18n[Zt(r)]) || e.title, f = K("title", a);
770
+ const n = Za[r], l = K("path", { d: n }), a = (i == null ? void 0 : i.config.i18n[xt(r)]) || e.title, f = K("title", a);
771
771
  return K("svg", {
772
772
  class: "carousel__icon",
773
773
  viewBox: "0 0 24 24",
@@ -799,11 +799,11 @@ const xt = (e) => e && xa(e), ea = re({
799
799
  "carousel__prev",
800
800
  { "carousel__prev--disabled": m.value },
801
801
  r.class
802
- ] }), (a == null ? void 0 : a()) || K(ea, { name: f() })), v = K("button", Object.assign(Object.assign({ type: "button", disabled: D.value, "aria-label": o.ariaNextSlide, title: o.ariaNextSlide, onClick: n.nav.next }, r), { class: [
802
+ ] }), (a == null ? void 0 : a()) || K(ta, { name: f() })), v = K("button", Object.assign(Object.assign({ type: "button", disabled: D.value, "aria-label": o.ariaNextSlide, title: o.ariaNextSlide, onClick: n.nav.next }, r), { class: [
803
803
  "carousel__next",
804
804
  { "carousel__next--disabled": D.value },
805
805
  r.class
806
- ] }), (l == null ? void 0 : l()) || K(ea, { name: g() }));
806
+ ] }), (l == null ? void 0 : l()) || K(ta, { name: g() }));
807
807
  return [T, v];
808
808
  };
809
809
  }
@@ -821,10 +821,10 @@ const xt = (e) => e && xa(e), ea = re({
821
821
  const i = ft(Xe);
822
822
  if (!i)
823
823
  return () => "";
824
- const r = s(() => i.config.itemsToShow), n = s(() => jt({
824
+ const r = s(() => i.config.itemsToShow), n = s(() => zt({
825
825
  align: i.config.snapAlign,
826
826
  itemsToShow: r.value
827
- })), l = s(() => e.paginateByItemsToShow && r.value > 1), a = s(() => Math.ceil((i.activeSlide - n.value) / r.value)), f = s(() => Math.ceil(i.slidesCount / r.value)), g = (m) => pa(l.value ? {
827
+ })), l = s(() => e.paginateByItemsToShow && r.value > 1), a = s(() => Math.ceil((i.activeSlide - n.value) / r.value)), f = s(() => Math.ceil(i.slidesCount / r.value)), g = (m) => ma(l.value ? {
828
828
  val: a.value,
829
829
  max: f.value - 1,
830
830
  min: 0
@@ -837,7 +837,7 @@ const xt = (e) => e && xa(e), ea = re({
837
837
  var m, D;
838
838
  const o = [];
839
839
  for (let T = l.value ? 0 : i.minSlide; T <= (l.value ? f.value - 1 : i.maxSlide); T++) {
840
- const v = fa(i.config.i18n[l.value ? "ariaNavigateToPage" : "ariaNavigateToSlide"], {
840
+ const v = pa(i.config.i18n[l.value ? "ariaNavigateToPage" : "ariaNavigateToSlide"], {
841
841
  slideNumber: T + 1
842
842
  }), S = g(T), E = K("button", {
843
843
  type: "button",
@@ -857,7 +857,7 @@ const xt = (e) => e && xa(e), ea = re({
857
857
  return K("ol", { class: "carousel__pagination" }, o);
858
858
  };
859
859
  }
860
- }), ta = re({
860
+ }), aa = re({
861
861
  name: "CarouselSlide",
862
862
  props: {
863
863
  id: {
@@ -879,7 +879,7 @@ const xt = (e) => e && xa(e), ea = re({
879
879
  },
880
880
  setup(e, { attrs: i, slots: r, expose: n }) {
881
881
  const l = ft(Xe);
882
- if (aa(Xe, void 0), !l)
882
+ if (la(Xe, void 0), !l)
883
883
  return () => "";
884
884
  const a = k(e.index), f = (E) => {
885
885
  a.value = E;
@@ -900,10 +900,10 @@ const xt = (e) => e && xa(e), ea = re({
900
900
  });
901
901
  return l.slideRegistry.registerSlide(g, e.index), Ta(() => {
902
902
  l.slideRegistry.unregisterSlide(g);
903
- }), e.isClone && (Ht(() => {
904
- Qt(g.vnode);
903
+ }), e.isClone && (qt(() => {
904
+ Zt(g.vnode);
905
905
  }), Ea(() => {
906
- Qt(g.vnode);
906
+ Zt(g.vnode);
907
907
  })), () => {
908
908
  var E, V;
909
909
  return l.config.enabled ? K("li", {
@@ -959,12 +959,12 @@ const xt = (e) => e && xa(e), ea = re({
959
959
  if (!e.colspan) return -1;
960
960
  let n = i;
961
961
  return r.forEach((l) => {
962
- let a = qt(e, l);
962
+ let a = Gt(e, l);
963
963
  a > 0 && a < n && (n = a);
964
964
  }), n;
965
- }, qt = (e, i) => e.colspan === !1 ? !1 : typeof e.colspan == "function" ? e.colspan(i) : e.colspan, nl = (e, i) => typeof e.preferSlot > "u" ? !0 : e.preferSlot === !1 ? !1 : typeof e.preferSlot == "function" ? e.preferSlot(i) : !0, ol = (e, i, r) => {
965
+ }, Gt = (e, i) => e.colspan === !1 ? !1 : typeof e.colspan == "function" ? e.colspan(i) : e.colspan, nl = (e, i) => typeof e.preferSlot > "u" ? !0 : e.preferSlot === !1 ? !1 : typeof e.preferSlot == "function" ? e.preferSlot(i) : !0, ol = (e, i, r) => {
966
966
  if (typeof e != "object" || !e.key || i.indexOf(e.key) > -1) return !1;
967
- let n = qt(e, r);
967
+ let n = Gt(e, r);
968
968
  return typeof e.colspan > "u" ? !0 : (typeof e.colspan < "u" && (typeof e.colspan == "function" ? n = parseInt(e.colspan(r)) : n = parseInt(e.colspan)), n > 0);
969
969
  }, il = (e = []) => {
970
970
  if (e.length > 0) {
@@ -978,11 +978,11 @@ const xt = (e) => e && xa(e), ea = re({
978
978
  if (e[r].key === i) return e[r];
979
979
  }
980
980
  return null;
981
- }, ma = (e) => e.type ? `is-${e.type}` : "", ga = /* @__PURE__ */ re({
981
+ }, ga = (e) => e.type ? `is-${e.type}` : "", ba = /* @__PURE__ */ re({
982
982
  __name: "LktTableCell",
983
983
  props: {
984
984
  modelValue: { default: () => ({}) },
985
- column: { default: () => new oa() },
985
+ column: { default: () => new ia() },
986
986
  columns: { default: () => [] },
987
987
  i: { default: 0 },
988
988
  editModeEnabled: { type: Boolean, default: !1 },
@@ -993,10 +993,10 @@ const xt = (e) => e && xa(e), ea = re({
993
993
  ],
994
994
  setup(e, { emit: i }) {
995
995
  const r = i, n = e, l = k(n.modelValue), a = k(l.value[n.column.key]), f = k(null);
996
- j(a, (o) => {
996
+ F(a, (o) => {
997
997
  const T = JSON.parse(JSON.stringify(l.value));
998
998
  T[n.column.key] = o, r("update:modelValue", T);
999
- }), j(() => n.modelValue, (o) => {
999
+ }), F(() => n.modelValue, (o) => {
1000
1000
  l.value = o, a.value = l.value[n.column.key];
1001
1001
  });
1002
1002
  const g = s(() => ({ ...n.column.slotData, item: l.value })), m = s(() => {
@@ -1014,12 +1014,12 @@ const xt = (e) => e && xa(e), ea = re({
1014
1014
  var V, Ce, O, le;
1015
1015
  const v = Se("lkt-anchor"), S = Se("lkt-button"), E = Se("lkt-field");
1016
1016
  return o.column.type === C(Ct).Anchor ? (c(), $(v, $e(ie({ key: 0 }, o.column.anchor)), {
1017
- default: F(() => [
1017
+ default: j(() => [
1018
1018
  lt(Ge(C(nt)(o.column, l.value, o.i)), 1)
1019
1019
  ]),
1020
1020
  _: 1
1021
1021
  }, 16)) : o.column.type === C(Ct).Button ? (c(), $(S, ie({ key: 1 }, o.column.button, { prop: l.value }), {
1022
- default: F(() => [
1022
+ default: j(() => [
1023
1023
  lt(Ge(C(nt)(o.column, l.value, o.i)), 1)
1024
1024
  ]),
1025
1025
  _: 1
@@ -1060,15 +1060,15 @@ const ul = /* @__PURE__ */ re({
1060
1060
  "click"
1061
1061
  ],
1062
1062
  setup(e, { emit: i }) {
1063
- const r = i, n = e, l = s(() => W.dropButtonSlot !== ""), a = s(() => W.dropButtonSlot), f = s(() => ia(n.config.resourceData, n.item));
1063
+ const r = i, n = e, l = s(() => W.dropButtonSlot !== ""), a = s(() => W.dropButtonSlot), f = s(() => ra(n.config.resourceData, n.item));
1064
1064
  return (g, m) => {
1065
1065
  const D = Se("lkt-button");
1066
1066
  return c(), $(D, ie({ palette: "table-delete" }, n.config, {
1067
1067
  disabled: g.disabled,
1068
1068
  "resource-data": f.value,
1069
- onClick: m[0] || (m[0] = la((o) => r("click", o), ["prevent", "stop"]))
1069
+ onClick: m[0] || (m[0] = na((o) => r("click", o), ["prevent", "stop"]))
1070
1070
  }), {
1071
- default: F(() => [
1071
+ default: j(() => [
1072
1072
  l.value ? (c(), $(Ae(a.value), { key: 0 })) : B("", !0)
1073
1073
  ]),
1074
1074
  _: 1
@@ -1086,15 +1086,15 @@ const ul = /* @__PURE__ */ re({
1086
1086
  "click"
1087
1087
  ],
1088
1088
  setup(e, { emit: i }) {
1089
- const r = i, n = e, l = s(() => W.editButtonSlot !== ""), a = s(() => W.editButtonSlot), f = s(() => ia(n.config.resourceData, n.item));
1089
+ const r = i, n = e, l = s(() => W.editButtonSlot !== ""), a = s(() => W.editButtonSlot), f = s(() => ra(n.config.resourceData, n.item));
1090
1090
  return (g, m) => {
1091
1091
  const D = Se("lkt-button");
1092
1092
  return c(), $(D, ie({ palette: "table-edit" }, n.config, {
1093
1093
  disabled: g.disabled,
1094
1094
  "resource-data": f.value,
1095
- onClick: m[0] || (m[0] = la((o) => r("click"), ["prevent", "stop"]))
1095
+ onClick: m[0] || (m[0] = na((o) => r("click"), ["prevent", "stop"]))
1096
1096
  }), {
1097
- default: F(() => [
1097
+ default: j(() => [
1098
1098
  l.value ? (c(), $(Ae(a.value), { key: 0 })) : B("", !0)
1099
1099
  ]),
1100
1100
  _: 1
@@ -1153,11 +1153,11 @@ const ul = /* @__PURE__ */ re({
1153
1153
  ],
1154
1154
  setup(e, { emit: i }) {
1155
1155
  var X;
1156
- const r = na(), n = i, l = e, a = k(l.modelValue);
1156
+ const r = oa(), n = i, l = e, a = k(l.modelValue);
1157
1157
  let f = typeof l.rowDisplayType == "function" ? l.rowDisplayType(a.value, l.i) : l.rowDisplayType;
1158
1158
  f || (f = tt.Auto);
1159
1159
  const g = [tt.Auto, tt.PreferCustomItem].includes(f), m = [tt.Auto, tt.PreferItem].includes(f), D = k((X = l.editButton.anchor) == null ? void 0 : X.to);
1160
- for (let u in a.value) D.value = ua(D.value, ":" + u, a.value[u]);
1160
+ for (let u in a.value) D.value = sa(D.value, ":" + u, a.value[u]);
1161
1161
  const o = (u) => n("click", u), T = (u, _) => {
1162
1162
  n("show", u, _);
1163
1163
  }, v = s(() => {
@@ -1170,7 +1170,7 @@ const ul = /* @__PURE__ */ re({
1170
1170
  }, O = () => {
1171
1171
  n("item-drop", l.i);
1172
1172
  };
1173
- j(() => l.modelValue, (u) => a.value = u), j(a, (u) => {
1173
+ F(() => l.modelValue, (u) => a.value = u), F(a, (u) => {
1174
1174
  n("update:modelValue", u);
1175
1175
  }, { deep: !0 });
1176
1176
  const le = s(() => typeof l.renderDrag == "function" ? l.renderDrag(a.value) : l.renderDrag === !0), G = s(() => typeof l.disabledDrag == "function" ? l.disabledDrag(a.value) : l.disabledDrag === !0), Ve = s(() => v.value.includes("handle") ? "drag-indicator" : "invalid-drag-indicator"), ue = s(() => {
@@ -1199,7 +1199,7 @@ const ul = /* @__PURE__ */ re({
1199
1199
  disabled: u.i === 0,
1200
1200
  onClick: V
1201
1201
  }, {
1202
- default: F(() => [
1202
+ default: j(() => [
1203
1203
  S.value ? (c(), $(Ae(E.value), {
1204
1204
  key: 0,
1205
1205
  direction: "up"
@@ -1212,7 +1212,7 @@ const ul = /* @__PURE__ */ re({
1212
1212
  disabled: u.latestRow,
1213
1213
  onClick: Ce
1214
1214
  }, {
1215
- default: F(() => [
1215
+ default: j(() => [
1216
1216
  S.value ? (c(), $(Ae(E.value), {
1217
1217
  key: 0,
1218
1218
  direction: "down"
@@ -1262,9 +1262,9 @@ const ul = /* @__PURE__ */ re({
1262
1262
  C(ol)(P, u.emptyColumns, a.value) ? (c(), y("td", {
1263
1263
  key: "td" + u.i,
1264
1264
  "data-column": P.key,
1265
- colspan: C(qt)(P, a.value),
1265
+ colspan: C(Gt)(P, a.value),
1266
1266
  title: C(nt)(P, a.value, u.i, u.visibleColumns),
1267
- class: ae(C(ma)(P)),
1267
+ class: ae(C(ga)(P)),
1268
1268
  onClick: _[2] || (_[2] = (M) => o(M))
1269
1269
  }, [
1270
1270
  u.$slots[P.key] && C(nl)(P, a.value) ? U(u.$slots, P.key, {
@@ -1273,7 +1273,7 @@ const ul = /* @__PURE__ */ re({
1273
1273
  item: a.value,
1274
1274
  column: P,
1275
1275
  i: u.i
1276
- }) : a.value ? (c(), $(ga, {
1276
+ }) : a.value ? (c(), $(ba, {
1277
1277
  key: 1,
1278
1278
  modelValue: a.value,
1279
1279
  "onUpdate:modelValue": _[1] || (_[1] = (M) => a.value = M),
@@ -1322,7 +1322,7 @@ const ul = /* @__PURE__ */ re({
1322
1322
  ],
1323
1323
  setup(e, { emit: i }) {
1324
1324
  const r = i, n = e, l = k(n.modelValue), a = (f) => r("click", f);
1325
- return j(() => n.modelValue, (f) => l.value = f), j(l, () => r("update:modelValue", l.value)), (f, g) => Oe((c(), y("tr", Cl, [
1325
+ return F(() => n.modelValue, (f) => l.value = f), F(l, () => r("update:modelValue", l.value)), (f, g) => Oe((c(), y("tr", Cl, [
1326
1326
  ee("td", { colspan: f.hiddenColumnsColSpan }, [
1327
1327
  ee("table", null, [
1328
1328
  ee("tr", null, [
@@ -1344,7 +1344,7 @@ const ul = /* @__PURE__ */ re({
1344
1344
  item: l.value,
1345
1345
  column: m,
1346
1346
  i: D
1347
- }) : (c(), $(ga, {
1347
+ }) : (c(), $(ba, {
1348
1348
  key: 1,
1349
1349
  column: m,
1350
1350
  columns: f.hiddenColumns,
@@ -1362,7 +1362,7 @@ const ul = /* @__PURE__ */ re({
1362
1362
  [_e, f.hiddenIsVisible]
1363
1363
  ]);
1364
1364
  }
1365
- }), Ut = /* @__PURE__ */ re({
1365
+ }), Ft = /* @__PURE__ */ re({
1366
1366
  __name: "CreateButton",
1367
1367
  props: {
1368
1368
  config: { default: void 0 },
@@ -1396,7 +1396,7 @@ const ul = /* @__PURE__ */ re({
1396
1396
  disabled: o.disabled,
1397
1397
  onClick: m
1398
1398
  }), {
1399
- default: F(() => [
1399
+ default: j(() => [
1400
1400
  l.value ? (c(), $(Ae(a.value), { key: 0 })) : B("", !0)
1401
1401
  ]),
1402
1402
  _: 1
@@ -1406,7 +1406,7 @@ const ul = /* @__PURE__ */ re({
1406
1406
  }), El = ["data-column", "data-sortable", "data-sort", "colspan", "title"], Al = /* @__PURE__ */ re({
1407
1407
  __name: "TableHeader",
1408
1408
  props: {
1409
- column: { default: () => new oa() },
1409
+ column: { default: () => new ia() },
1410
1410
  sortBy: { default: "" },
1411
1411
  sortDirection: { default: "" },
1412
1412
  amountOfColumns: { default: 0 },
@@ -1416,14 +1416,14 @@ const ul = /* @__PURE__ */ re({
1416
1416
  "click"
1417
1417
  ],
1418
1418
  setup(e, { emit: i }) {
1419
- const r = i, n = e, l = s(() => ll(n.column, n.amountOfColumns, n.items)), a = s(() => n.column.sortable === !0), f = s(() => a.value && n.sortBy === n.column.key ? n.sortDirection : ""), g = s(() => ra(n.column.label)), m = s(() => a.value && n.sortBy === n.column.key ? n.sortDirection === qe.Asc ? fe.defaultTableSortAscIcon : n.sortDirection === qe.Desc ? fe.defaultTableSortDescIcon : "" : ""), D = () => r("click", n.column);
1419
+ const r = i, n = e, l = s(() => ll(n.column, n.amountOfColumns, n.items)), a = s(() => n.column.sortable === !0), f = s(() => a.value && n.sortBy === n.column.key ? n.sortDirection : ""), g = s(() => ua(n.column.label)), m = s(() => a.value && n.sortBy === n.column.key ? n.sortDirection === qe.Asc ? fe.defaultTableSortAscIcon : n.sortDirection === qe.Desc ? fe.defaultTableSortDescIcon : "" : ""), D = () => r("click", n.column);
1420
1420
  return (o, T) => (c(), y("th", {
1421
1421
  "data-column": o.column.key,
1422
1422
  "data-sortable": a.value,
1423
1423
  "data-sort": f.value,
1424
1424
  colspan: l.value,
1425
1425
  title: g.value,
1426
- class: ae(C(ma)(o.column)),
1426
+ class: ae(C(ga)(o.column)),
1427
1427
  onClick: D
1428
1428
  }, [
1429
1429
  ee("div", null, [
@@ -1505,6 +1505,7 @@ const ul = /* @__PURE__ */ re({
1505
1505
  "update:modelValue",
1506
1506
  "update:perms",
1507
1507
  "update:loading",
1508
+ "update:editMode",
1508
1509
  "sort",
1509
1510
  "click",
1510
1511
  "save",
@@ -1516,11 +1517,11 @@ const ul = /* @__PURE__ */ re({
1516
1517
  "drag-end"
1517
1518
  ],
1518
1519
  setup(e, { expose: i, emit: r }) {
1519
- var Yt, Kt;
1520
- const n = r, l = na(), a = e, f = {}, g = k(typeof a.sorter == "function" ? a.sorter : al), m = k(il(a.columns)), D = k(qe.Asc), o = k(a.modelValue), T = k(f), v = k(null), S = k(a.columns), E = k((Yt = a.paginator) == null ? void 0 : Yt.modelValue), V = k(a.loading), Ce = k(!1), O = k(a.perms), le = k(null), G = k(null), Ve = k(null), ue = k({}), X = k(new Oa({ items: o.value }, a.dataStateConfig)), u = k(a.editMode), _ = k(0), te = k(null), P = k(((Kt = a.carousel) == null ? void 0 : Kt.currentSlide) || 0), M = k(De(a.saveButton, fe.defaultSaveButton)), me = k(De(a.createButton, fe.defaultCreateButton)), ot = k(De(a.editModeButton, fe.defaultEditModeButton)), Pe = k(De(a.dropButton, fe.defaultDropButton)), ne = k(De(a.groupButton, fe.defaultGroupButton));
1521
- j(() => a.saveButton, (t) => M.value = De(a.saveButton, fe.defaultSaveButton)), j(() => a.createButton, (t) => me.value = De(a.createButton, fe.defaultCreateButton)), j(() => a.editModeButton, (t) => ot.value = De(a.editModeButton, fe.defaultEditModeButton)), j(() => a.dropButton, (t) => Pe.value = De(a.dropButton, fe.defaultDropButton));
1520
+ var Kt, Wt;
1521
+ const n = r, l = oa(), a = e, f = {}, g = k(typeof a.sorter == "function" ? a.sorter : al), m = k(il(a.columns)), D = k(qe.Asc), o = k(a.modelValue), T = k(f), v = k(null), S = k(a.columns), E = k((Kt = a.paginator) == null ? void 0 : Kt.modelValue), V = k(a.loading), Ce = k(!1), O = k(a.perms), le = k(null), G = k(null), Ve = k(null), ue = k({}), X = k(new Oa({ items: o.value }, a.dataStateConfig)), u = k(a.editMode), _ = k(0), te = k(null), P = k(((Wt = a.carousel) == null ? void 0 : Wt.currentSlide) || 0), M = k(De(a.saveButton, fe.defaultSaveButton)), me = k(De(a.createButton, fe.defaultCreateButton)), ot = k(De(a.editModeButton, fe.defaultEditModeButton)), Pe = k(De(a.dropButton, fe.defaultDropButton)), ne = k(De(a.groupButton, fe.defaultGroupButton));
1522
+ F(() => a.saveButton, (t) => M.value = De(a.saveButton, fe.defaultSaveButton)), F(() => a.createButton, (t) => me.value = De(a.createButton, fe.defaultCreateButton)), F(() => a.editModeButton, (t) => ot.value = De(a.editModeButton, fe.defaultEditModeButton)), F(() => a.dropButton, (t) => Pe.value = De(a.dropButton, fe.defaultDropButton));
1522
1523
  const Re = k(!1);
1523
- j(V, (t) => n("update:loading", t)), j(E, (t) => n("page", t));
1524
+ F(V, (t) => n("update:loading", t)), F(E, (t) => n("page", t));
1524
1525
  const Ue = (t) => {
1525
1526
  O.value = t;
1526
1527
  }, It = (t) => {
@@ -1567,7 +1568,7 @@ const ul = /* @__PURE__ */ re({
1567
1568
  items: o.value,
1568
1569
  ...(t = M.value) == null ? void 0 : t.resourceData
1569
1570
  };
1570
- }), pt = s(() => a.titleTag === "" ? "h2" : a.titleTag), st = s(() => a.wrapContentTag === "" ? "div" : a.wrapContentTag), Je = s(() => ra(a.title)), Qe = s(() => {
1571
+ }), pt = s(() => a.titleTag === "" ? "h2" : a.titleTag), st = s(() => a.wrapContentTag === "" ? "div" : a.wrapContentTag), Je = s(() => ua(a.title)), Qe = s(() => {
1571
1572
  var t;
1572
1573
  return (t = a.drag) == null ? void 0 : t.enabled;
1573
1574
  }), he = s(() => O.value.includes(Ie.Create)), Ne = s(() => O.value.includes("read")), H = s(() => O.value.includes(Ie.Update)), Be = s(() => O.value.includes(Ie.Edit)), Le = s(() => O.value.includes(Ie.InlineEdit)), Ze = s(() => O.value.includes(Ie.ModalCreate)), mt = s(() => O.value.includes(Ie.InlineCreate)), dt = s(() => O.value.includes(Ie.InlineCreateEver)), Y = s(() => O.value.includes(Ie.Drop)), ct = s(() => O.value.includes(Ie.SwitchEditMode)), He = s(() => !ct.value || !H.value && !Y.value || !H.value && Y.value ? !1 : !V.value), xe = s(() => {
@@ -1621,9 +1622,9 @@ const ul = /* @__PURE__ */ re({
1621
1622
  }, J = () => V.value = !0, Q = () => V.value = !1, yt = (t, p) => {
1622
1623
  var N, Z, oe;
1623
1624
  if (!((N = M.value) != null && N.type && [
1624
- _t.Split,
1625
- _t.SplitEver,
1626
- _t.SplitLazy
1625
+ Pt.Split,
1626
+ Pt.SplitEver,
1627
+ Pt.SplitLazy
1627
1628
  ].includes((Z = M.value) == null ? void 0 : Z.type))) {
1628
1629
  if (n("before-save"), (oe = M.value) != null && oe.resource && (V.value = !1, !p.success)) {
1629
1630
  n("error", p.httpStatus);
@@ -1639,14 +1640,14 @@ const ul = /* @__PURE__ */ re({
1639
1640
  return t.splice(N, 0, t.splice(p, 1)[0]), t;
1640
1641
  }, Rt = (t) => {
1641
1642
  ht(o.value, t, t - 1), ve();
1642
- }, ba = (t) => {
1643
+ }, ya = (t) => {
1643
1644
  ht(o.value, t, t + 1), ve();
1644
1645
  }, kt = (t) => {
1645
1646
  o.value.splice(t, 1), ve();
1646
- }, ya = () => {
1647
+ }, Xt = () => {
1647
1648
  var t;
1648
1649
  ue.value && typeof ((t = ue.value) == null ? void 0 : t.destroy) == "function" && (ue.value.destroy(), ue.value = {});
1649
- }, Gt = () => {
1650
+ }, Mt = () => {
1650
1651
  te.value || (te.value = document.getElementById("lkt-table-body-" + be)), ue.value = new _a(te.value, {
1651
1652
  direction: "vertical",
1652
1653
  handle: ".handle",
@@ -1659,26 +1660,31 @@ const ul = /* @__PURE__ */ re({
1659
1660
  return h(t);
1660
1661
  }
1661
1662
  });
1662
- }, Mt = (t, p, N = !1) => {
1663
+ }, Nt = (t, p, N = !1) => {
1663
1664
  let Z = [_.value, be, "row", p];
1664
1665
  return N && Z.push("hidden"), we.value.forEach((oe) => {
1665
1666
  let se = String(t[oe.key]).toLowerCase();
1666
- se.length > 50 && (se = se.substring(0, 50)), se = ua(se, " ", "-"), Z.push(se);
1667
+ se.length > 50 && (se = se.substring(0, 50)), se = sa(se, " ", "-"), Z.push(se);
1667
1668
  }), Z.join("-");
1668
- }, Nt = s(() => typeof a.createEnabledValidator == "function" ? a.createEnabledValidator({ items: o.value }) : !0), vt = s(() => dt.value || he.value && u.value || mt.value && u.value || Ze.value && u.value), ha = s(() => [at.Ol, at.Ul].includes(a.type)), Lt = (t, p) => typeof a.itemDisplayChecker == "function" ? a.itemDisplayChecker(t) : !0, Xt = (t, p) => typeof a.itemContainerClass == "function" ? a.itemContainerClass(t, p) : a.itemContainerClass;
1669
- Ht(() => {
1669
+ }, Lt = s(() => typeof a.createEnabledValidator == "function" ? a.createEnabledValidator({ items: o.value }) : !0), vt = s(() => dt.value || he.value && u.value || mt.value && u.value || Ze.value && u.value), ha = s(() => [at.Ol, at.Ul].includes(a.type)), $t = (t, p) => typeof a.itemDisplayChecker == "function" ? a.itemDisplayChecker(t) : !0, Yt = (t, p) => typeof a.itemContainerClass == "function" ? a.itemContainerClass(t, p) : a.itemContainerClass;
1670
+ qt(() => {
1670
1671
  var t;
1671
1672
  a.initialSorting && et(rl(a.columns, m.value)), X.value.store({ items: o.value }).turnStoredIntoOriginal(), Re.value = !1, (t = a.drag) != null && t.enabled && St(() => {
1672
- Gt();
1673
+ Mt();
1673
1674
  });
1674
- }), j(() => {
1675
+ }), F(() => {
1675
1676
  var t;
1676
1677
  return (t = a.drag) == null ? void 0 : t.enabled;
1677
1678
  }, (t) => {
1678
- t ? Gt() : ya();
1679
- }), j(() => a.perms, (t) => O.value = t), j(O, (t) => n("update:perms", t)), j(() => a.editMode, (t) => u.value = t), j(() => a.columns, (t) => S.value = t, { deep: !0 }), j(() => a.modelValue, (t) => {
1679
+ t ? Mt() : Xt();
1680
+ }), F(() => a.type, (t) => {
1681
+ var p;
1682
+ (p = a.drag) != null && p.enabled ? Mt() : Xt();
1683
+ }), F(() => a.perms, (t) => O.value = t), F(O, (t) => n("update:perms", t)), F(u, (t) => {
1684
+ n("update:editMode", t);
1685
+ }), F(() => a.editMode, (t) => u.value = t), F(() => a.columns, (t) => S.value = t, { deep: !0 }), F(() => a.modelValue, (t) => {
1680
1686
  o.value = t;
1681
- }, { deep: !0 }), j(o, (t) => {
1687
+ }, { deep: !0 }), F(o, (t) => {
1682
1688
  X.value.increment({ items: t }), Re.value = X.value.changed(), n("update:modelValue", t);
1683
1689
  }, { deep: !0 }), i({
1684
1690
  getItemByEvent: At,
@@ -1710,7 +1716,7 @@ const ul = /* @__PURE__ */ re({
1710
1716
  class: ae(t.headerClass)
1711
1717
  }, [
1712
1718
  Je.value ? (c(), $(Ae(pt.value), { key: 0 }, {
1713
- default: F(() => [
1719
+ default: j(() => [
1714
1720
  t.titleIcon ? (c(), y("i", {
1715
1721
  key: 0,
1716
1722
  class: ae(t.titleIcon)
@@ -1724,7 +1730,7 @@ const ul = /* @__PURE__ */ re({
1724
1730
  (c(), $(Ae(st.value), {
1725
1731
  class: ae(["lkt-table-page-content-wrapper", t.wrapContentClass])
1726
1732
  }, {
1727
- default: F(() => {
1733
+ default: j(() => {
1728
1734
  var se;
1729
1735
  return [
1730
1736
  Oe(ee("div", Rl, [
@@ -1732,7 +1738,7 @@ const ul = /* @__PURE__ */ re({
1732
1738
  key: 0,
1733
1739
  ref: "groupButton"
1734
1740
  }, ne.value, { class: "lkt-item-crud-group-button" }), {
1735
- split: F(() => [
1741
+ split: j(() => [
1736
1742
  ee("div", Ml, [
1737
1743
  Oe(pe(N, ie(ot.value, {
1738
1744
  checked: u.value,
@@ -1766,7 +1772,7 @@ const ul = /* @__PURE__ */ re({
1766
1772
  onLoaded: Q,
1767
1773
  onClick: yt
1768
1774
  }), {
1769
- split: F(({ doClose: A, doRootClick: w }) => [
1775
+ split: j(({ doClose: A, doRootClick: w }) => [
1770
1776
  U(t.$slots, "button-save-split", {
1771
1777
  doClose: A,
1772
1778
  doRootClick: w,
@@ -1775,7 +1781,7 @@ const ul = /* @__PURE__ */ re({
1775
1781
  onButtonLoaded: Q
1776
1782
  })
1777
1783
  ]),
1778
- default: F(() => [
1784
+ default: j(() => [
1779
1785
  C(l)["button-save"] ? U(t.$slots, "button-save", {
1780
1786
  key: 0,
1781
1787
  items: o.value,
@@ -1787,10 +1793,10 @@ const ul = /* @__PURE__ */ re({
1787
1793
  }, 16), [
1788
1794
  [_e, rt.value]
1789
1795
  ]),
1790
- vt.value && o.value.length >= t.requiredItemsForTopCreate ? (c(), $(Ut, {
1796
+ vt.value && o.value.length >= t.requiredItemsForTopCreate ? (c(), $(Ft, {
1791
1797
  key: 2,
1792
1798
  config: me.value,
1793
- disabled: !Nt.value,
1799
+ disabled: !Lt.value,
1794
1800
  onClick: R,
1795
1801
  onAppend: q
1796
1802
  }, null, 8, ["config", "disabled"])) : B("", !0)
@@ -1822,7 +1828,7 @@ const ul = /* @__PURE__ */ re({
1822
1828
  onLoaded: Q,
1823
1829
  onClick: yt
1824
1830
  }), {
1825
- split: F(({ doClose: A, doRootClick: w }) => [
1831
+ split: j(({ doClose: A, doRootClick: w }) => [
1826
1832
  U(t.$slots, "button-save-split", {
1827
1833
  doClose: A,
1828
1834
  doRootClick: w,
@@ -1831,7 +1837,7 @@ const ul = /* @__PURE__ */ re({
1831
1837
  onButtonLoaded: Q
1832
1838
  })
1833
1839
  ]),
1834
- default: F(() => [
1840
+ default: j(() => [
1835
1841
  C(l)["button-save"] ? U(t.$slots, "button-save", {
1836
1842
  key: 0,
1837
1843
  items: o.value,
@@ -1843,10 +1849,10 @@ const ul = /* @__PURE__ */ re({
1843
1849
  }, 16), [
1844
1850
  [_e, rt.value]
1845
1851
  ]),
1846
- vt.value && o.value.length >= t.requiredItemsForTopCreate ? (c(), $(Ut, {
1852
+ vt.value && o.value.length >= t.requiredItemsForTopCreate ? (c(), $(Ft, {
1847
1853
  key: 3,
1848
1854
  config: me.value,
1849
- disabled: !Nt.value,
1855
+ disabled: !Lt.value,
1850
1856
  onClick: R,
1851
1857
  onAppend: q
1852
1858
  }, null, 8, ["config", "disabled"])) : B("", !0),
@@ -1901,7 +1907,7 @@ const ul = /* @__PURE__ */ re({
1901
1907
  (c(!0), y(x, null, de(o.value, (A, w) => Oe((c(), $(Sl, {
1902
1908
  modelValue: o.value[w],
1903
1909
  "onUpdate:modelValue": (L) => o.value[w] = L,
1904
- key: Mt(A, w),
1910
+ key: Nt(A, w),
1905
1911
  i: w,
1906
1912
  "drop-button": Pe.value,
1907
1913
  "edit-button": t.editButton,
@@ -1927,12 +1933,12 @@ const ul = /* @__PURE__ */ re({
1927
1933
  onClick: d,
1928
1934
  onShow: b,
1929
1935
  onItemUp: Rt,
1930
- onItemDown: ba,
1936
+ onItemDown: ya,
1931
1937
  onItemDrop: kt
1932
- }, Wt({ _: 2 }, [
1938
+ }, Jt({ _: 2 }, [
1933
1939
  C(l)[`item-${w}`] ? {
1934
1940
  name: `item-${w}`,
1935
- fn: F((L) => [
1941
+ fn: j((L) => [
1936
1942
  U(t.$slots, `item-${w}`, $e({
1937
1943
  [t.slotItemVar || ""]: L.item,
1938
1944
  index: w,
@@ -1948,7 +1954,7 @@ const ul = /* @__PURE__ */ re({
1948
1954
  key: "0"
1949
1955
  } : C(l).item ? {
1950
1956
  name: "item",
1951
- fn: F((L) => [
1957
+ fn: j((L) => [
1952
1958
  U(t.$slots, "item", $e({
1953
1959
  [t.slotItemVar || ""]: L.item,
1954
1960
  index: w,
@@ -1965,7 +1971,7 @@ const ul = /* @__PURE__ */ re({
1965
1971
  } : void 0,
1966
1972
  de(ze.value, (L) => ({
1967
1973
  name: L,
1968
- fn: F((ke) => [
1974
+ fn: j((ke) => [
1969
1975
  U(t.$slots, L, $e({
1970
1976
  [t.slotItemVar || ""]: ke.item,
1971
1977
  value: ke.value,
@@ -1974,12 +1980,12 @@ const ul = /* @__PURE__ */ re({
1974
1980
  ])
1975
1981
  }))
1976
1982
  ]), 1032, ["modelValue", "onUpdate:modelValue", "i", "drop-button", "edit-button", "display-hidden-columns-indicator", "is-draggable", "sortable", "visible-columns", "empty-columns", "add-navigation", "hidden-is-visible", "latest-row", "can-drop", "can-edit", "can-read", "can-create", "edit-mode-enabled", "has-inline-edit-perm", "row-display-type", "render-drag", "disabled-drag", "is-loading", "item-container-class"])), [
1977
- [_e, Lt(o.value[w])]
1983
+ [_e, $t(o.value[w])]
1978
1984
  ])), 128)),
1979
1985
  Ke.value.length > 0 ? (c(!0), y(x, { key: 0 }, de(o.value, (A, w) => (c(), $(Tl, {
1980
1986
  modelValue: o.value[w],
1981
1987
  "onUpdate:modelValue": (L) => o.value[w] = L,
1982
- key: Mt(A, w, !0),
1988
+ key: Nt(A, w, !0),
1983
1989
  i: w,
1984
1990
  "hidden-columns": Ke.value,
1985
1991
  "hidden-columns-col-span": We.value,
@@ -1992,10 +1998,10 @@ const ul = /* @__PURE__ */ re({
1992
1998
  "has-inline-edit-perm": Le.value,
1993
1999
  onClick: d,
1994
2000
  onShow: b
1995
- }, Wt({ _: 2 }, [
2001
+ }, Jt({ _: 2 }, [
1996
2002
  de(ze.value, (L) => ({
1997
2003
  name: L,
1998
- fn: F((ke) => [
2004
+ fn: j((ke) => [
1999
2005
  U(t.$slots, L, $e({
2000
2006
  [t.slotItemVar || ""]: ke.item,
2001
2007
  value: ke.value,
@@ -2013,10 +2019,10 @@ const ul = /* @__PURE__ */ re({
2013
2019
  class: ae(["lkt-table-items-container", t.itemsContainerClass])
2014
2020
  }, [
2015
2021
  (c(!0), y(x, null, de(o.value, (A, w) => (c(), y(x, null, [
2016
- Lt(A) ? (c(), y("div", {
2017
- class: ae(["lkt-table-item", Xt(A, w)]),
2022
+ $t(A) ? (c(), y("div", {
2023
+ class: ae(["lkt-table-item", Yt(A, w)]),
2018
2024
  "data-i": w,
2019
- key: Mt(A, w)
2025
+ key: Nt(A, w)
2020
2026
  }, [
2021
2027
  U(t.$slots, "item", $e({
2022
2028
  [t.slotItemVar || ""]: A,
@@ -2035,11 +2041,11 @@ const ul = /* @__PURE__ */ re({
2035
2041
  key: 2,
2036
2042
  class: ae(["lkt-table-items-container", t.itemsContainerClass])
2037
2043
  }, {
2038
- default: F(() => [
2044
+ default: j(() => [
2039
2045
  (c(!0), y(x, null, de(o.value, (A, w) => (c(), y(x, null, [
2040
- Lt(A) ? (c(), y("li", {
2046
+ $t(A) ? (c(), y("li", {
2041
2047
  key: 0,
2042
- class: ae(["lkt-table-item", Xt(A, w)]),
2048
+ class: ae(["lkt-table-item", Yt(A, w)]),
2043
2049
  "data-i": w
2044
2050
  }, [
2045
2051
  U(t.$slots, "item", $e({
@@ -2070,27 +2076,27 @@ const ul = /* @__PURE__ */ re({
2070
2076
  }, t.carousel, {
2071
2077
  "wrap-around": ((se = t.carousel) == null ? void 0 : se.infinite) === !0
2072
2078
  }), {
2073
- addons: F(() => [
2079
+ addons: j(() => [
2074
2080
  pe(C(el)),
2075
2081
  pe(C(tl))
2076
2082
  ]),
2077
- default: F(() => [
2078
- (c(!0), y(x, null, de(it.value, (A, w) => (c(), $(C(ta), {
2083
+ default: j(() => [
2084
+ (c(!0), y(x, null, de(it.value, (A, w) => (c(), $(C(aa), {
2079
2085
  key: A,
2080
2086
  index: w
2081
2087
  }, {
2082
- default: F(() => [
2088
+ default: j(() => [
2083
2089
  ee("div", Wl, [
2084
2090
  U(t.$slots, A)
2085
2091
  ])
2086
2092
  ]),
2087
2093
  _: 2
2088
2094
  }, 1032, ["index"]))), 128)),
2089
- (c(!0), y(x, null, de(o.value, (A, w) => (c(), $(C(ta), {
2095
+ (c(!0), y(x, null, de(o.value, (A, w) => (c(), $(C(aa), {
2090
2096
  key: t.slide,
2091
2097
  index: w
2092
2098
  }, {
2093
- default: F(() => [
2099
+ default: j(() => [
2094
2100
  ee("div", Jl, [
2095
2101
  U(t.$slots, "item", $e({
2096
2102
  [t.slotItemVar || ""]: A,
@@ -2124,10 +2130,10 @@ const ul = /* @__PURE__ */ re({
2124
2130
  ])) : B("", !0),
2125
2131
  V.value ? (c(), $(Z, { key: 3 })) : B("", !0),
2126
2132
  vt.value || C(l).bottomButtons ? (c(), y("div", Zl, [
2127
- vt.value && o.value.length >= t.requiredItemsForBottomCreate ? (c(), $(Ut, {
2133
+ vt.value && o.value.length >= t.requiredItemsForBottomCreate ? (c(), $(Ft, {
2128
2134
  key: 0,
2129
2135
  config: me.value,
2130
- disabled: !Nt.value,
2136
+ disabled: !Lt.value,
2131
2137
  onClick: R,
2132
2138
  onAppend: q
2133
2139
  }, null, 8, ["config", "disabled"])) : B("", !0),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lkt-table",
3
- "version": "2.0.22",
3
+ "version": "2.0.23",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "lkt",
@@ -33,6 +33,7 @@ const emit = defineEmits([
33
33
  'update:modelValue',
34
34
  'update:perms',
35
35
  'update:loading',
36
+ 'update:editMode',
36
37
  'sort',
37
38
  'click',
38
39
  'save',
@@ -464,8 +465,19 @@ watch(() => props.drag?.enabled, (v) => {
464
465
  }
465
466
  })
466
467
 
468
+ watch(() => props.type, (v) => {
469
+ if (props.drag?.enabled) {
470
+ initSortable();
471
+ } else {
472
+ stopSortable();
473
+ }
474
+ })
475
+
467
476
  watch(() => props.perms, (v) => permissions.value = v);
468
477
  watch(permissions, (v) => emit('update:perms', v));
478
+ watch(editModeEnabled, (v) => {
479
+ emit('update:editMode', v);
480
+ });
469
481
  watch(() => props.editMode, (v) => editModeEnabled.value = v);
470
482
  watch(() => props.columns, (v) => Columns.value = v, {deep: true});
471
483
  watch(() => props.modelValue, (v) => {