lkt-table 2.0.7 → 2.0.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.
package/dist/build.js CHANGED
@@ -1,126 +1,1053 @@
1
- import { defineComponent as te, ref as h, watch as F, computed as i, resolveComponent as z, createBlock as S, createElementBlock as p, unref as y, openBlock as u, normalizeProps as oe, mergeProps as Q, withCtx as L, createTextVNode as ee, toDisplayString as ue, Fragment as P, withModifiers as rt, createCommentVNode as f, resolveDynamicComponent as Z, useSlots as it, normalizeClass as K, createElementVNode as O, createVNode as pe, renderSlot as T, renderList as J, withDirectives as ge, vShow as ke, mergeDefaults as Wt, onMounted as Gt, nextTick as Be, createSlots as nt } from "vue";
2
- import { __ as Jt } from "lkt-i18n";
3
- import { SortDirection as ne, Column as st, ColumnType as Se, prepareResourceData as dt, TableRowType as de, extractI18nValue as pt, LktSettings as me, ensureButtonConfig as De, TablePermission as X, PaginatorType as Ie, TableType as be, getDefaultValues as Qt, Table as Xt, ButtonType as Ne } from "lkt-vue-kernel";
4
- import { Column as ra, createColumn as ia } from "lkt-vue-kernel";
5
- import { replaceAll as mt, generateRandomString as Yt } from "lkt-string-tools";
6
- import { DataState as Zt } from "lkt-data-state";
7
- import xt from "sortablejs";
8
- import { time as ae } from "lkt-date-tools";
9
- const el = (o, v, c, l) => {
10
- if (!c) return 0;
11
- let n = String(o[c.key]).toLowerCase(), t = String(v[c.key]).toLowerCase();
12
- if (l === ne.Asc) {
13
- if (n > t) return 1;
14
- if (t > n) return -1;
1
+ import { defineComponent as ae, computed as u, ref as C, shallowReactive as Pt, watch as H, watchEffect as Rt, onMounted as jt, onBeforeUnmount as Sa, reactive as $t, provide as ea, h as X, useId as wa, inject as ut, getCurrentInstance as Ca, onUnmounted as Da, onUpdated as Ba, cloneVNode as Ia, resolveComponent as ve, createBlock as $, createElementBlock as h, unref as B, openBlock as d, normalizeProps as Ee, mergeProps as fe, withCtx as F, createTextVNode as Ae, toDisplayString as Pe, Fragment as x, withModifiers as ta, createCommentVNode as A, resolveDynamicComponent as Ie, useSlots as aa, normalizeClass as re, createElementVNode as J, createVNode as Be, renderSlot as z, renderList as ie, withDirectives as it, vShow as rt, mergeDefaults as Ta, nextTick as bt, createSlots as Gt } from "vue";
2
+ import { __ as Ea } from "lkt-i18n";
3
+ import { SortDirection as Oe, Column as la, ColumnType as yt, prepareResourceData as na, TableRowType as Ze, extractI18nValue as oa, LktSettings as tt, ensureButtonConfig as ht, TablePermission as we, PaginatorType as kt, TableType as et, getDefaultValues as Aa, Table as Va, ButtonType as Lt } from "lkt-vue-kernel";
4
+ import { Column as un, createColumn as sn } from "lkt-vue-kernel";
5
+ import { replaceAll as ia, generateRandomString as Na } from "lkt-string-tools";
6
+ import { DataState as _a } from "lkt-data-state";
7
+ import Ma from "sortablejs";
8
+ import { time as Le } from "lkt-date-tools";
9
+ /**
10
+ * Vue 3 Carousel 0.14.0
11
+ * (c) 2025
12
+ * @license MIT
13
+ */
14
+ const ra = ["viewport", "carousel"], wt = {
15
+ "bottom-to-top": "btt",
16
+ "left-to-right": "ltr",
17
+ "right-to-left": "rtl",
18
+ "top-to-bottom": "ttb"
19
+ }, ua = [
20
+ "ltr",
21
+ "left-to-right",
22
+ "rtl",
23
+ "right-to-left",
24
+ "ttb",
25
+ "top-to-bottom",
26
+ "btt",
27
+ "bottom-to-top"
28
+ ], Ra = {
29
+ ariaGallery: "Gallery",
30
+ ariaNavigateToPage: "Navigate to page {slideNumber}",
31
+ ariaNavigateToSlide: "Navigate to slide {slideNumber}",
32
+ ariaNextSlide: "Navigate to next slide",
33
+ ariaPreviousSlide: "Navigate to previous slide",
34
+ iconArrowDown: "Arrow pointing downwards",
35
+ iconArrowLeft: "Arrow pointing to the left",
36
+ iconArrowRight: "Arrow pointing to the right",
37
+ iconArrowUp: "Arrow pointing upwards",
38
+ itemXofY: "Item {currentSlide} of {slidesCount}"
39
+ }, sa = ["slide", "fade"], da = [
40
+ "center",
41
+ "start",
42
+ "end",
43
+ "center-even",
44
+ "center-odd"
45
+ ], P = {
46
+ autoplay: 0,
47
+ breakpointMode: ra[0],
48
+ breakpoints: void 0,
49
+ dir: ua[0],
50
+ enabled: !0,
51
+ gap: 0,
52
+ height: "auto",
53
+ i18n: Ra,
54
+ ignoreAnimations: !1,
55
+ itemsToScroll: 1,
56
+ itemsToShow: 1,
57
+ modelValue: 0,
58
+ mouseDrag: !0,
59
+ pauseAutoplayOnHover: !1,
60
+ preventExcessiveDragging: !1,
61
+ slideEffect: sa[0],
62
+ snapAlign: da[0],
63
+ touchDrag: !0,
64
+ transition: 300,
65
+ wrapAround: !1
66
+ }, Fe = Symbol("carousel"), $a = (e) => {
67
+ const o = Pt([]), i = (n) => {
68
+ n !== void 0 ? o.slice(n).forEach((l, a) => {
69
+ var v;
70
+ (v = l.exposed) === null || v === void 0 || v.setIndex(n + a);
71
+ }) : o.forEach((l, a) => {
72
+ var v;
73
+ (v = l.exposed) === null || v === void 0 || v.setIndex(a);
74
+ });
75
+ };
76
+ return {
77
+ cleanup: () => {
78
+ o.splice(0, o.length);
79
+ },
80
+ getSlides: () => o,
81
+ registerSlide: (n, l) => {
82
+ if (!n || n.props.isClone)
83
+ return;
84
+ const a = l ?? o.length;
85
+ o.splice(a, 0, n), i(a), e("slide-registered", { slide: n, index: a });
86
+ },
87
+ unregisterSlide: (n) => {
88
+ const l = o.indexOf(n);
89
+ l !== -1 && (e("slide-unregistered", { slide: n, index: l }), o.splice(l, 1), i(l));
90
+ }
91
+ };
92
+ };
93
+ function La(e) {
94
+ return e.length === 0 ? 0 : e.reduce((i, n) => i + n, 0) / e.length;
95
+ }
96
+ function Xt({ slides: e, position: o, toShow: i }) {
97
+ const n = [], l = o === "before", a = l ? -i : 0, v = l ? 0 : i;
98
+ if (e.length <= 0)
99
+ return n;
100
+ for (let b = a; b < v; b++) {
101
+ const m = {
102
+ index: l ? b : b + e.length,
103
+ isClone: !0,
104
+ position: o,
105
+ id: void 0,
106
+ // Make sure we don't duplicate the id which would be invalid html
107
+ key: `clone-${o}-${b}`
108
+ }, r = e[(b % e.length + e.length) % e.length].vnode, T = Ia(r, m);
109
+ T.el = null, n.push(T);
110
+ }
111
+ return n;
112
+ }
113
+ const Oa = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])';
114
+ function Yt(e) {
115
+ if (!e.el || !(e.el instanceof Element))
116
+ return;
117
+ const o = e.el.querySelectorAll(Oa);
118
+ for (const i of o)
119
+ i instanceof HTMLElement && !i.hasAttribute("disabled") && i.getAttribute("aria-hidden") !== "true" && i.setAttribute("tabindex", "-1");
120
+ }
121
+ function Pa(e, o) {
122
+ return Object.keys(e).filter((i) => !o.includes(i)).reduce((i, n) => (i[n] = e[n], i), {});
123
+ }
124
+ function Fa(e) {
125
+ const { isVertical: o, isReversed: i, dragged: n, effectiveSlideSize: l } = e, a = o ? n.y : n.x;
126
+ if (a === 0)
127
+ return 0;
128
+ const v = Math.round(a / l);
129
+ return i ? v : -v;
130
+ }
131
+ function Ce({ val: e, max: o, min: i }) {
132
+ return o < i ? e : Math.min(Math.max(e, isNaN(i) ? e : i), isNaN(o) ? e : o);
133
+ }
134
+ function Ua(e) {
135
+ const { transform: o } = window.getComputedStyle(e);
136
+ return o.split(/[(,)]/).slice(1, -1).map((i) => parseFloat(i));
137
+ }
138
+ function ja(e) {
139
+ let o = 1, i = 1;
140
+ return e.forEach((n) => {
141
+ const l = Ua(n);
142
+ l.length === 6 && (o /= l[0], i /= l[3]);
143
+ }), { widthMultiplier: o, heightMultiplier: i };
144
+ }
145
+ function za(e, o) {
146
+ switch (e) {
147
+ case "start":
148
+ return 0;
149
+ case "center":
150
+ case "center-odd":
151
+ return (o - 1) / 2;
152
+ case "center-even":
153
+ return (o - 2) / 2;
154
+ case "end":
155
+ return o - 1;
156
+ default:
157
+ return 0;
158
+ }
159
+ }
160
+ function Ha(e, o, i) {
161
+ switch (e) {
162
+ case "start":
163
+ return 0;
164
+ case "center":
165
+ case "center-odd":
166
+ return (i - o) / 2;
167
+ case "center-even":
168
+ return i / 2 - o;
169
+ case "end":
170
+ return i - o;
171
+ default:
172
+ return 0;
173
+ }
174
+ }
175
+ function Ft({ slideSize: e, viewportSize: o, align: i, itemsToShow: n }) {
176
+ return n !== void 0 ? za(i, n) : e !== void 0 && o !== void 0 ? Ha(i, e, o) : 0;
177
+ }
178
+ function ca(e = "", o = {}) {
179
+ return Object.entries(o).reduce((i, [n, l]) => i.replace(`{${n}}`, String(l)), e);
180
+ }
181
+ function va({ val: e, max: o, min: i = 0 }) {
182
+ const n = o - i + 1;
183
+ return ((e - i) % n + n) % n + i;
184
+ }
185
+ function Ot(e, o = 0) {
186
+ let i = !1, n = 0, l = null;
187
+ function a(...v) {
188
+ if (i)
189
+ return;
190
+ i = !0;
191
+ const b = () => {
192
+ l = requestAnimationFrame((g) => {
193
+ g - n > o ? (n = g, e(...v), i = !1) : b();
194
+ });
195
+ };
196
+ b();
197
+ }
198
+ return a.cancel = () => {
199
+ l && (cancelAnimationFrame(l), l = null, i = !1);
200
+ }, a;
201
+ }
202
+ function St(e, o = "px") {
203
+ if (!(e == null || e === ""))
204
+ return typeof e == "number" || parseFloat(e).toString() === e ? `${e}${o}` : e;
205
+ }
206
+ const xa = ae({
207
+ name: "CarouselAria",
208
+ setup() {
209
+ const e = ut(Fe);
210
+ return e ? () => X("div", {
211
+ class: ["carousel__liveregion", "carousel__sr-only"],
212
+ "aria-live": "polite",
213
+ "aria-atomic": "true"
214
+ }, ca(e.config.i18n.itemXofY, {
215
+ currentSlide: e.currentSlide + 1,
216
+ slidesCount: e.slidesCount
217
+ })) : () => "";
218
+ }
219
+ }), qa = {
220
+ // time to auto advance slides in ms
221
+ autoplay: {
222
+ default: P.autoplay,
223
+ type: Number
224
+ },
225
+ // an object to store breakpoints
226
+ breakpoints: {
227
+ default: P.breakpoints,
228
+ type: Object
229
+ },
230
+ // controls the breakpoint mode relative to the carousel container or the viewport
231
+ breakpointMode: {
232
+ default: P.breakpointMode,
233
+ validator(e) {
234
+ return ra.includes(e);
235
+ }
236
+ },
237
+ // enable/disable the carousel component
238
+ enabled: {
239
+ default: P.enabled,
240
+ type: Boolean
241
+ },
242
+ // control the gap between slides
243
+ gap: {
244
+ default: P.gap,
245
+ type: Number
246
+ },
247
+ // control the gap between slides
248
+ height: {
249
+ default: P.height,
250
+ type: [Number, String]
251
+ },
252
+ ignoreAnimations: {
253
+ default: !1,
254
+ type: [Array, Boolean, String]
255
+ },
256
+ // count of items to be scrolled
257
+ itemsToScroll: {
258
+ default: P.itemsToScroll,
259
+ type: Number
260
+ },
261
+ // count of items to showed per view
262
+ itemsToShow: {
263
+ default: P.itemsToShow,
264
+ type: [Number, String]
265
+ },
266
+ // aria-labels and additional text labels
267
+ i18n: {
268
+ default: P.i18n,
269
+ type: Object
270
+ },
271
+ // slide number number of initial slide
272
+ modelValue: {
273
+ default: void 0,
274
+ type: Number
275
+ },
276
+ // toggle mouse dragging.
277
+ mouseDrag: {
278
+ default: P.mouseDrag,
279
+ type: Boolean
280
+ },
281
+ // toggle mouse dragging.
282
+ touchDrag: {
283
+ default: P.touchDrag,
284
+ type: Boolean
285
+ },
286
+ pauseAutoplayOnHover: {
287
+ default: P.pauseAutoplayOnHover,
288
+ type: Boolean
289
+ },
290
+ preventExcessiveDragging: {
291
+ default: !1,
292
+ type: Boolean,
293
+ validator(e, o) {
294
+ return e && o.wrapAround && console.warn('[vue3-carousel warn]: "preventExcessiveDragging" cannot be used with wrapAround. The setting will be ignored.'), !0;
295
+ }
296
+ },
297
+ // control snap position alignment
298
+ snapAlign: {
299
+ default: P.snapAlign,
300
+ validator(e) {
301
+ return da.includes(e);
302
+ }
303
+ },
304
+ slideEffect: {
305
+ type: String,
306
+ default: P.slideEffect,
307
+ validator(e) {
308
+ return sa.includes(e);
309
+ }
310
+ },
311
+ // sliding transition time in ms
312
+ transition: {
313
+ default: P.transition,
314
+ type: Number
315
+ },
316
+ // control the gap between slides
317
+ dir: {
318
+ type: String,
319
+ default: P.dir,
320
+ validator(e, o) {
321
+ if (!ua.includes(e))
322
+ return !1;
323
+ const i = e in wt ? wt[e] : e;
324
+ return ["ttb", "btt"].includes(i) && (!o.height || o.height === "auto") && console.warn(`[vue3-carousel warn]: The dir "${e}" is not supported with height "auto".`), !0;
325
+ }
326
+ },
327
+ // control infinite scrolling mode
328
+ wrapAround: {
329
+ default: P.wrapAround,
330
+ type: Boolean
331
+ }
332
+ }, Ga = ae({
333
+ name: "VueCarousel",
334
+ props: qa,
335
+ emits: [
336
+ "before-init",
337
+ "drag",
338
+ "init",
339
+ "loop",
340
+ "slide-end",
341
+ "slide-registered",
342
+ "slide-start",
343
+ "slide-unregistered",
344
+ "update:modelValue"
345
+ ],
346
+ setup(e, { slots: o, emit: i, expose: n }) {
347
+ var l;
348
+ const a = $a(i), v = a.getSlides(), b = u(() => v.length), g = C(null), m = C(null), r = C(0), T = u(() => Object.assign(Object.assign(Object.assign({}, P), Pa(e, ["breakpoints", "modelValue"])), { i18n: Object.assign(Object.assign({}, P.i18n), e.i18n) })), c = Pt(Object.assign({}, T.value)), S = C((l = e.modelValue) !== null && l !== void 0 ? l : 0), E = C(S.value);
349
+ H(S, (s) => E.value = s);
350
+ const V = C(0), he = u(() => Math.ceil((b.value - 1) / 2)), O = u(() => b.value - 1), q = u(() => 0);
351
+ let ne = null, Ve = null, Z = null;
352
+ const f = u(() => r.value + c.gap), k = u(() => {
353
+ const s = c.dir || "ltr";
354
+ return s in wt ? wt[s] : s;
355
+ }), U = u(() => ["rtl", "btt"].includes(k.value)), L = u(() => ["ttb", "btt"].includes(k.value)), Q = u(() => c.itemsToShow === "auto"), R = u(() => L.value ? "height" : "width");
356
+ function Te() {
357
+ var s;
358
+ if (!ze.value)
359
+ return;
360
+ const y = (T.value.breakpointMode === "carousel" ? (s = g.value) === null || s === void 0 ? void 0 : s.getBoundingClientRect().width : typeof window < "u" ? window.innerWidth : 0) || 0, w = Object.keys(e.breakpoints || {}).map((N) => Number(N)).sort((N, G) => +G - +N), D = {};
361
+ w.some((N) => y >= N ? (Object.assign(D, e.breakpoints[N]), D.i18n && Object.assign(D.i18n, T.value.i18n, e.breakpoints[N].i18n), !0) : !1), Object.assign(c, T.value, D);
362
+ }
363
+ const Ct = Ot(() => {
364
+ Te(), ue(), me();
365
+ }), Ue = Pt(/* @__PURE__ */ new Set()), j = C([]);
366
+ function Dt({ widthMultiplier: s, heightMultiplier: y }) {
367
+ j.value = v.map((w) => {
368
+ var D;
369
+ const N = (D = w.exposed) === null || D === void 0 ? void 0 : D.getBoundingRect();
370
+ return {
371
+ width: N.width * s,
372
+ height: N.height * y
373
+ };
374
+ });
375
+ }
376
+ const Ne = C({
377
+ width: 0,
378
+ height: 0
379
+ });
380
+ function Bt({ widthMultiplier: s, heightMultiplier: y }) {
381
+ var w;
382
+ const D = ((w = m.value) === null || w === void 0 ? void 0 : w.getBoundingClientRect()) || { width: 0, height: 0 };
383
+ Ne.value = {
384
+ width: D.width * s,
385
+ height: D.height * y
386
+ };
387
+ }
388
+ function me() {
389
+ if (!m.value)
390
+ return;
391
+ const s = ja(Ue);
392
+ if (Bt(s), Dt(s), Q.value)
393
+ r.value = La(j.value.map((y) => y[R.value]));
394
+ else {
395
+ const y = Number(c.itemsToShow), w = (y - 1) * c.gap;
396
+ r.value = (Ne.value[R.value] - w) / y;
397
+ }
398
+ }
399
+ function ue() {
400
+ !c.wrapAround && b.value > 0 && (S.value = Ce({
401
+ val: S.value,
402
+ max: O.value,
403
+ min: q.value
404
+ })), Q.value || (c.itemsToShow = Ce({
405
+ val: Number(c.itemsToShow),
406
+ max: b.value,
407
+ min: 1
408
+ }));
409
+ }
410
+ const _e = u(() => typeof e.ignoreAnimations == "string" ? e.ignoreAnimations.split(",") : Array.isArray(e.ignoreAnimations) ? e.ignoreAnimations : e.ignoreAnimations ? !1 : []);
411
+ Rt(() => ue()), Rt(() => {
412
+ me();
413
+ });
414
+ let se;
415
+ const je = (s) => {
416
+ const y = s.target;
417
+ if (!(!(y != null && y.contains(g.value)) || Array.isArray(_e.value) && _e.value.includes(s.animationName)) && (Ue.add(y), !se)) {
418
+ const w = () => {
419
+ se = requestAnimationFrame(() => {
420
+ me(), w();
421
+ });
422
+ };
423
+ w();
424
+ }
425
+ }, st = (s) => {
426
+ const y = s.target;
427
+ y && Ue.delete(y), se && Ue.size === 0 && (cancelAnimationFrame(se), me());
428
+ }, ze = C(!1);
429
+ typeof document < "u" && Rt(() => {
430
+ ze.value && _e.value !== !1 ? (document.addEventListener("animationstart", je), document.addEventListener("animationend", st)) : (document.removeEventListener("animationstart", je), document.removeEventListener("animationend", st));
431
+ }), jt(() => {
432
+ ze.value = !0, Te(), ke(), g.value && (Z = new ResizeObserver(Ct), Z.observe(g.value)), i("init");
433
+ }), Sa(() => {
434
+ ze.value = !1, a.cleanup(), Ve && clearTimeout(Ve), se && cancelAnimationFrame(se), ne && clearInterval(ne), Z && (Z.disconnect(), Z = null), typeof document < "u" && ct(), g.value && (g.value.removeEventListener("transitionend", me), g.value.removeEventListener("animationiteration", me));
435
+ });
436
+ let pe = !1;
437
+ const He = { x: 0, y: 0 }, oe = $t({ x: 0, y: 0 }), xe = C(!1), qe = C(!1), It = () => {
438
+ xe.value = !0;
439
+ }, lt = () => {
440
+ xe.value = !1;
441
+ }, dt = Ot((s) => {
442
+ if (!s.ctrlKey)
443
+ switch (s.key) {
444
+ case "ArrowLeft":
445
+ case "ArrowUp":
446
+ L.value === s.key.endsWith("Up") && (U.value ? Re(!0) : Ye(!0));
447
+ break;
448
+ case "ArrowRight":
449
+ case "ArrowDown":
450
+ L.value === s.key.endsWith("Down") && (U.value ? Ye(!0) : Re(!0));
451
+ break;
452
+ }
453
+ }, 200), Tt = () => {
454
+ document.addEventListener("keydown", dt);
455
+ }, ct = () => {
456
+ document.removeEventListener("keydown", dt);
457
+ };
458
+ function vt(s) {
459
+ const y = s.target.tagName;
460
+ if (["INPUT", "TEXTAREA", "SELECT"].includes(y) || ge.value || (pe = s.type === "touchstart", !pe && (s.preventDefault(), s.button !== 0)))
461
+ return;
462
+ He.x = "touches" in s ? s.touches[0].clientX : s.clientX, He.y = "touches" in s ? s.touches[0].clientY : s.clientY;
463
+ const w = pe ? "touchmove" : "mousemove", D = pe ? "touchend" : "mouseup";
464
+ document.addEventListener(w, Me, { passive: !1 }), document.addEventListener(D, Ge, { passive: !0 });
465
+ }
466
+ const Me = Ot((s) => {
467
+ qe.value = !0;
468
+ const y = "touches" in s ? s.touches[0].clientX : s.clientX, w = "touches" in s ? s.touches[0].clientY : s.clientY;
469
+ oe.x = y - He.x, oe.y = w - He.y;
470
+ const D = Fa({
471
+ isVertical: L.value,
472
+ isReversed: U.value,
473
+ dragged: oe,
474
+ effectiveSlideSize: f.value
475
+ });
476
+ E.value = c.wrapAround ? S.value + D : Ce({
477
+ val: S.value + D,
478
+ max: O.value,
479
+ min: q.value
480
+ }), i("drag", { deltaX: oe.x, deltaY: oe.y });
481
+ });
482
+ function Ge() {
483
+ if (Me.cancel(), E.value !== S.value && !pe) {
484
+ const w = (D) => {
485
+ D.preventDefault(), window.removeEventListener("click", w);
486
+ };
487
+ window.addEventListener("click", w);
488
+ }
489
+ Se(E.value), oe.x = 0, oe.y = 0, qe.value = !1;
490
+ const s = pe ? "touchmove" : "mousemove", y = pe ? "touchend" : "mouseup";
491
+ document.removeEventListener(s, Me), document.removeEventListener(y, Ge);
492
+ }
493
+ function ke() {
494
+ !c.autoplay || c.autoplay <= 0 || (ne = setInterval(() => {
495
+ c.pauseAutoplayOnHover && xe.value || Re();
496
+ }, c.autoplay));
497
+ }
498
+ function Xe() {
499
+ ne && (clearInterval(ne), ne = null);
500
+ }
501
+ function de() {
502
+ Xe(), ke();
503
+ }
504
+ const ge = C(!1);
505
+ function Se(s, y = !1) {
506
+ if (!y && ge.value)
507
+ return;
508
+ let w = s, D = s;
509
+ V.value = S.value, c.wrapAround ? D = va({
510
+ val: w,
511
+ max: O.value,
512
+ min: q.value
513
+ }) : w = Ce({
514
+ val: w,
515
+ max: O.value,
516
+ min: q.value
517
+ }), i("slide-start", {
518
+ slidingToIndex: s,
519
+ currentSlideIndex: S.value,
520
+ prevSlideIndex: V.value,
521
+ slidesCount: b.value
522
+ }), Xe(), ge.value = !0, S.value = w, D !== w && be.pause(), i("update:modelValue", D), Ve = setTimeout(() => {
523
+ c.wrapAround && D !== w && (be.resume(), S.value = D, i("loop", {
524
+ currentSlideIndex: S.value,
525
+ slidingToIndex: s
526
+ })), i("slide-end", {
527
+ currentSlideIndex: S.value,
528
+ prevSlideIndex: V.value,
529
+ slidesCount: b.value
530
+ }), ge.value = !1, de();
531
+ }, c.transition);
532
+ }
533
+ function Re(s = !1) {
534
+ Se(S.value + c.itemsToScroll, s);
535
+ }
536
+ function Ye(s = !1) {
537
+ Se(S.value - c.itemsToScroll, s);
538
+ }
539
+ function ft() {
540
+ Te(), ue(), me(), de();
541
+ }
542
+ H(() => [T.value, e.breakpoints], () => Te(), { deep: !0 }), H(() => e.autoplay, () => de());
543
+ const be = H(() => e.modelValue, (s) => {
544
+ s !== S.value && Se(Number(s), !0);
545
+ });
546
+ i("before-init");
547
+ const $e = u(() => {
548
+ if (!c.wrapAround)
549
+ return { before: 0, after: 0 };
550
+ if (Q.value)
551
+ return { before: v.length, after: v.length };
552
+ const s = Number(c.itemsToShow), y = Math.ceil(s + (c.itemsToScroll - 1)), w = y - E.value, D = y - (b.value - (E.value + 1));
553
+ return {
554
+ before: Math.max(0, w),
555
+ after: Math.max(0, D)
556
+ };
557
+ }), Ke = u(() => $e.value.before ? Q.value ? j.value.slice(-1 * $e.value.before).reduce((s, y) => s + y[R.value] + c.gap, 0) * -1 : $e.value.before * f.value * -1 : 0), nt = u(() => {
558
+ var s;
559
+ if (Q.value) {
560
+ const y = (S.value % v.length + v.length) % v.length;
561
+ return Ft({
562
+ slideSize: (s = j.value[y]) === null || s === void 0 ? void 0 : s[R.value],
563
+ viewportSize: Ne.value[R.value],
564
+ align: c.snapAlign
565
+ });
566
+ }
567
+ return Ft({
568
+ align: c.snapAlign,
569
+ itemsToShow: +c.itemsToShow
570
+ });
571
+ }), We = u(() => {
572
+ let s = 0;
573
+ if (Q.value) {
574
+ if (S.value < 0 ? s = j.value.slice(S.value).reduce((y, w) => y + w[R.value] + c.gap, 0) * -1 : s = j.value.slice(0, S.value).reduce((y, w) => y + w[R.value] + c.gap, 0), s -= nt.value, !c.wrapAround) {
575
+ const y = j.value.reduce((w, D) => w + D[R.value] + c.gap, 0) - Ne.value[R.value] - c.gap;
576
+ s = Ce({
577
+ val: s,
578
+ max: y,
579
+ min: 0
580
+ });
581
+ }
582
+ } else {
583
+ let y = S.value - nt.value;
584
+ c.wrapAround || (y = Ce({
585
+ val: y,
586
+ max: b.value - +c.itemsToShow,
587
+ min: 0
588
+ })), s = y * f.value;
589
+ }
590
+ return s * (U.value ? 1 : -1);
591
+ }), Et = u(() => {
592
+ var s, y;
593
+ if (!Q.value) {
594
+ const N = S.value - nt.value;
595
+ return c.wrapAround ? {
596
+ min: Math.floor(N),
597
+ max: Math.ceil(N + Number(c.itemsToShow) - 1)
598
+ } : {
599
+ min: Math.floor(Ce({
600
+ val: N,
601
+ max: b.value - Number(c.itemsToShow),
602
+ min: 0
603
+ })),
604
+ max: Math.ceil(Ce({
605
+ val: N + Number(c.itemsToShow) - 1,
606
+ max: b.value - 1,
607
+ min: 0
608
+ }))
609
+ };
610
+ }
611
+ let w = 0;
612
+ {
613
+ let N = 0, G = 0 - $e.value.before;
614
+ const le = Math.abs(We.value + Ke.value);
615
+ for (; N <= le; ) {
616
+ const ee = (G % v.length + v.length) % v.length;
617
+ N += ((s = j.value[ee]) === null || s === void 0 ? void 0 : s[R.value]) + c.gap, G++;
618
+ }
619
+ w = G - 1;
620
+ }
621
+ let D = 0;
622
+ {
623
+ let N = w, G = 0;
624
+ for (N < 0 ? G = j.value.slice(0, N).reduce((le, ee) => le + ee[R.value] + c.gap, 0) - Math.abs(We.value + Ke.value) : G = j.value.slice(0, N).reduce((le, ee) => le + ee[R.value] + c.gap, 0) - Math.abs(We.value); G < Ne.value[R.value]; ) {
625
+ const le = (N % v.length + v.length) % v.length;
626
+ G += ((y = j.value[le]) === null || y === void 0 ? void 0 : y[R.value]) + c.gap, N++;
627
+ }
628
+ D = N - 1;
629
+ }
630
+ return {
631
+ min: Math.floor(w),
632
+ max: Math.ceil(D)
633
+ };
634
+ }), At = u(() => {
635
+ if (c.slideEffect === "fade")
636
+ return;
637
+ const s = L.value ? "Y" : "X", y = L.value ? oe.y : oe.x;
638
+ let w = We.value + y;
639
+ if (!c.wrapAround && c.preventExcessiveDragging) {
640
+ let D = 0;
641
+ Q.value ? D = j.value.reduce((le, ee) => le + ee[R.value], 0) : D = (b.value - Number(c.itemsToShow)) * f.value;
642
+ const N = U.value ? 0 : -1 * D, G = U.value ? D : 0;
643
+ w = Ce({
644
+ val: w,
645
+ min: N,
646
+ max: G
647
+ });
648
+ }
649
+ return `translate${s}(${w}px)`;
650
+ }), mt = u(() => ({
651
+ "--vc-transition-duration": ge.value ? St(c.transition, "ms") : void 0,
652
+ "--vc-slide-gap": St(c.gap),
653
+ "--vc-carousel-height": St(c.height),
654
+ "--vc-cloned-offset": St(Ke.value)
655
+ })), ot = { slideTo: Se, next: Re, prev: Ye }, pt = $t({
656
+ activeSlide: E,
657
+ config: c,
658
+ currentSlide: S,
659
+ isSliding: ge,
660
+ isVertical: L,
661
+ maxSlide: O,
662
+ minSlide: q,
663
+ nav: ot,
664
+ normalizedDir: k,
665
+ slideRegistry: a,
666
+ slideSize: r,
667
+ slides: v,
668
+ slidesCount: b,
669
+ viewport: m,
670
+ visibleRange: Et
671
+ });
672
+ ea(Fe, pt);
673
+ const Je = $t({
674
+ config: c,
675
+ currentSlide: S,
676
+ maxSlide: O,
677
+ middleSlide: he,
678
+ minSlide: q,
679
+ slideSize: r,
680
+ slidesCount: b
681
+ });
682
+ return n({
683
+ data: Je,
684
+ nav: ot,
685
+ next: Re,
686
+ prev: Ye,
687
+ restartCarousel: ft,
688
+ slideTo: Se,
689
+ updateBreakpointsConfig: Te,
690
+ updateSlideSize: me,
691
+ updateSlidesData: ue
692
+ }), () => {
693
+ var s;
694
+ const y = o.default || o.slides, w = (y == null ? void 0 : y(Je)) || [], { before: D, after: N } = $e.value, G = Xt({
695
+ slides: v,
696
+ position: "before",
697
+ toShow: D
698
+ }), le = Xt({
699
+ slides: v,
700
+ position: "after",
701
+ toShow: N
702
+ }), ee = [...G, ...w, ...le];
703
+ if (!c.enabled || !ee.length)
704
+ return X("section", {
705
+ ref: g,
706
+ class: ["carousel", "is-disabled"]
707
+ }, ee);
708
+ const Vt = ((s = o.addons) === null || s === void 0 ? void 0 : s.call(o, Je)) || [], Nt = X("ol", {
709
+ class: "carousel__track",
710
+ style: { transform: At.value },
711
+ onMousedownCapture: c.mouseDrag ? vt : null,
712
+ onTouchstartPassiveCapture: c.touchDrag ? vt : null
713
+ }, ee), Qe = X("div", { class: "carousel__viewport", ref: m }, Nt);
714
+ return X("section", {
715
+ ref: g,
716
+ class: [
717
+ "carousel",
718
+ `is-${k.value}`,
719
+ `is-effect-${c.slideEffect}`,
720
+ {
721
+ "is-vertical": L.value,
722
+ "is-sliding": ge.value,
723
+ "is-dragging": qe.value,
724
+ "is-hover": xe.value
725
+ }
726
+ ],
727
+ dir: k.value,
728
+ style: mt.value,
729
+ "aria-label": c.i18n.ariaGallery,
730
+ tabindex: "0",
731
+ onFocus: Tt,
732
+ onBlur: ct,
733
+ onMouseenter: It,
734
+ onMouseleave: lt
735
+ }, [Qe, Vt, X(xa)]);
736
+ };
737
+ }
738
+ });
739
+ var Ut;
740
+ (function(e) {
741
+ e.arrowDown = "arrowDown", e.arrowLeft = "arrowLeft", e.arrowRight = "arrowRight", e.arrowUp = "arrowUp";
742
+ })(Ut || (Ut = {}));
743
+ const Kt = (e) => `icon${e.charAt(0).toUpperCase() + e.slice(1)}`, Xa = {
744
+ arrowDown: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",
745
+ arrowLeft: "M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z",
746
+ arrowRight: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",
747
+ arrowUp: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"
748
+ };
749
+ function Ya(e) {
750
+ return e in Ut;
751
+ }
752
+ const Wt = (e) => e && Ya(e), Jt = ae({
753
+ props: {
754
+ name: {
755
+ type: String,
756
+ required: !0,
757
+ validator: Wt
758
+ },
759
+ title: {
760
+ type: String,
761
+ default: (e) => e.name ? P.i18n[Kt(e.name)] : ""
762
+ }
763
+ },
764
+ setup(e) {
765
+ const o = ut(Fe, null);
766
+ return () => {
767
+ const i = e.name;
768
+ if (!i || !Wt(i))
769
+ return;
770
+ const n = Xa[i], l = X("path", { d: n }), a = (o == null ? void 0 : o.config.i18n[Kt(i)]) || e.title, v = X("title", a);
771
+ return X("svg", {
772
+ class: "carousel__icon",
773
+ viewBox: "0 0 24 24",
774
+ role: "img",
775
+ "aria-label": a
776
+ }, [v, l]);
777
+ };
778
+ }
779
+ }), Ka = ae({
780
+ name: "CarouselNavigation",
781
+ inheritAttrs: !1,
782
+ setup(e, { slots: o, attrs: i }) {
783
+ const n = ut(Fe);
784
+ if (!n)
785
+ return () => "";
786
+ const { next: l, prev: a } = o, v = () => ({
787
+ btt: "arrowDown",
788
+ ltr: "arrowLeft",
789
+ rtl: "arrowRight",
790
+ ttb: "arrowUp"
791
+ })[n.normalizedDir], b = () => ({
792
+ btt: "arrowUp",
793
+ ltr: "arrowRight",
794
+ rtl: "arrowLeft",
795
+ ttb: "arrowDown"
796
+ })[n.normalizedDir], g = u(() => !n.config.wrapAround && n.currentSlide <= n.minSlide), m = u(() => !n.config.wrapAround && n.currentSlide >= n.maxSlide);
797
+ return () => {
798
+ const { i18n: r } = n.config, T = X("button", Object.assign(Object.assign({ type: "button", disabled: g.value, "aria-label": r.ariaPreviousSlide, title: r.ariaPreviousSlide, onClick: n.nav.prev }, i), { class: [
799
+ "carousel__prev",
800
+ { "carousel__prev--disabled": g.value },
801
+ i.class
802
+ ] }), (a == null ? void 0 : a()) || X(Jt, { name: v() })), c = X("button", Object.assign(Object.assign({ type: "button", disabled: m.value, "aria-label": r.ariaNextSlide, title: r.ariaNextSlide, onClick: n.nav.next }, i), { class: [
803
+ "carousel__next",
804
+ { "carousel__next--disabled": m.value },
805
+ i.class
806
+ ] }), (l == null ? void 0 : l()) || X(Jt, { name: b() }));
807
+ return [T, c];
808
+ };
809
+ }
810
+ }), Wa = ae({
811
+ name: "CarouselPagination",
812
+ props: {
813
+ disableOnClick: {
814
+ type: Boolean
815
+ },
816
+ paginateByItemsToShow: {
817
+ type: Boolean
818
+ }
819
+ },
820
+ setup(e) {
821
+ const o = ut(Fe);
822
+ if (!o)
823
+ return () => "";
824
+ const i = u(() => o.config.itemsToShow), n = u(() => Ft({
825
+ align: o.config.snapAlign,
826
+ itemsToShow: i.value
827
+ })), l = u(() => e.paginateByItemsToShow && i.value > 1), a = u(() => Math.ceil((o.activeSlide - n.value) / i.value)), v = u(() => Math.ceil(o.slidesCount / i.value)), b = (g) => va(l.value ? {
828
+ val: a.value,
829
+ max: v.value - 1,
830
+ min: 0
831
+ } : {
832
+ val: o.activeSlide,
833
+ max: o.maxSlide,
834
+ min: o.minSlide
835
+ }) === g;
836
+ return () => {
837
+ var g, m;
838
+ const r = [];
839
+ for (let T = l.value ? 0 : o.minSlide; T <= (l.value ? v.value - 1 : o.maxSlide); T++) {
840
+ const c = ca(o.config.i18n[l.value ? "ariaNavigateToPage" : "ariaNavigateToSlide"], {
841
+ slideNumber: T + 1
842
+ }), S = b(T), E = X("button", {
843
+ type: "button",
844
+ class: {
845
+ "carousel__pagination-button": !0,
846
+ "carousel__pagination-button--active": S
847
+ },
848
+ "aria-label": c,
849
+ "aria-pressed": S,
850
+ "aria-controls": (m = (g = o.slides[T]) === null || g === void 0 ? void 0 : g.exposed) === null || m === void 0 ? void 0 : m.id,
851
+ title: c,
852
+ disabled: e.disableOnClick,
853
+ onClick: () => o.nav.slideTo(l.value ? Math.floor(T * +o.config.itemsToShow + n.value) : T)
854
+ }), V = X("li", { class: "carousel__pagination-item", key: T }, E);
855
+ r.push(V);
856
+ }
857
+ return X("ol", { class: "carousel__pagination" }, r);
858
+ };
859
+ }
860
+ }), Qt = ae({
861
+ name: "CarouselSlide",
862
+ props: {
863
+ id: {
864
+ type: String,
865
+ default: (e) => e.isClone ? void 0 : wa()
866
+ },
867
+ index: {
868
+ type: Number,
869
+ default: void 0
870
+ },
871
+ isClone: {
872
+ type: Boolean,
873
+ default: !1
874
+ },
875
+ position: {
876
+ type: String,
877
+ default: void 0
878
+ }
879
+ },
880
+ setup(e, { attrs: o, slots: i, expose: n }) {
881
+ const l = ut(Fe);
882
+ if (ea(Fe, void 0), !l)
883
+ return () => "";
884
+ const a = C(e.index), v = (E) => {
885
+ a.value = E;
886
+ }, b = Ca(), g = () => {
887
+ const E = b.vnode.el;
888
+ return E ? E.getBoundingClientRect() : { width: 0, height: 0 };
889
+ };
890
+ n({
891
+ id: e.id,
892
+ setIndex: v,
893
+ getBoundingRect: g
894
+ });
895
+ const m = u(() => a.value === l.activeSlide), r = u(() => a.value === l.activeSlide - 1), T = u(() => a.value === l.activeSlide + 1), c = u(() => a.value >= l.visibleRange.min && a.value <= l.visibleRange.max), S = u(() => {
896
+ if (l.config.itemsToShow === "auto")
897
+ return;
898
+ const E = l.config.itemsToShow, V = l.config.gap > 0 && E > 1 ? `calc(${100 / E}% - ${l.config.gap * (E - 1) / E}px)` : `${100 / E}%`;
899
+ return l.isVertical ? { height: V } : { width: V };
900
+ });
901
+ return l.slideRegistry.registerSlide(b, e.index), Da(() => {
902
+ l.slideRegistry.unregisterSlide(b);
903
+ }), e.isClone && (jt(() => {
904
+ Yt(b.vnode);
905
+ }), Ba(() => {
906
+ Yt(b.vnode);
907
+ })), () => {
908
+ var E, V;
909
+ return l.config.enabled ? X("li", {
910
+ style: [o.style, Object.assign({}, S.value)],
911
+ class: {
912
+ carousel__slide: !0,
913
+ "carousel__slide--clone": e.isClone,
914
+ "carousel__slide--visible": c.value,
915
+ "carousel__slide--active": m.value,
916
+ "carousel__slide--prev": r.value,
917
+ "carousel__slide--next": T.value,
918
+ "carousel__slide--sliding": l.isSliding
919
+ },
920
+ onFocusin: () => {
921
+ l.viewport && (l.viewport.scrollLeft = 0), l.nav.slideTo(a.value);
922
+ },
923
+ id: e.isClone ? void 0 : e.id,
924
+ "aria-hidden": e.isClone || void 0
925
+ }, (V = i.default) === null || V === void 0 ? void 0 : V.call(i, {
926
+ currentIndex: a.value,
927
+ isActive: m.value,
928
+ isClone: e.isClone,
929
+ isPrev: r.value,
930
+ isNext: T.value,
931
+ isSliding: l.isSliding,
932
+ isVisible: c.value
933
+ })) : (E = i.default) === null || E === void 0 ? void 0 : E.call(i);
934
+ };
935
+ }
936
+ }), Ja = (e, o, i, n) => {
937
+ if (!i) return 0;
938
+ let l = String(e[i.key]).toLowerCase(), a = String(o[i.key]).toLowerCase();
939
+ if (n === Oe.Asc) {
940
+ if (l > a) return 1;
941
+ if (a > l) return -1;
15
942
  } else {
16
- if (n > t) return -1;
17
- if (t > n) return 1;
943
+ if (l > a) return -1;
944
+ if (a > l) return 1;
18
945
  }
19
946
  return 0;
20
- }, ve = (o, v, c, l = []) => {
21
- if (o.extractTitleFromColumn) {
22
- let n = l.find((t) => t.key === o.extractTitleFromColumn);
23
- if (n)
24
- return ve(n, v, c, l);
947
+ }, at = (e, o, i, n = []) => {
948
+ if (e.extractTitleFromColumn) {
949
+ let l = n.find((a) => a.key === e.extractTitleFromColumn);
950
+ if (l)
951
+ return at(l, o, i, n);
25
952
  }
26
- if (o.formatter && typeof o.formatter == "function") {
27
- let n = o.formatter(v[o.key], v, o, c);
28
- return n.startsWith("__:") ? Jt(n.substring(3)) : n;
953
+ if (e.formatter && typeof e.formatter == "function") {
954
+ let l = e.formatter(o[e.key], o, e, i);
955
+ return l.startsWith("__:") ? Ea(l.substring(3)) : l;
29
956
  }
30
- return v[o.key];
31
- }, tl = (o, v, c) => {
32
- if (!o.colspan) return -1;
33
- let l = v;
34
- return c.forEach((n) => {
35
- let t = Fe(o, n);
36
- t > 0 && t < l && (l = t);
37
- }), l;
38
- }, Fe = (o, v) => o.colspan === !1 ? !1 : typeof o.colspan == "function" ? o.colspan(v) : o.colspan, ll = (o, v) => typeof o.preferSlot > "u" ? !0 : o.preferSlot === !1 ? !1 : typeof o.preferSlot == "function" ? o.preferSlot(v) : !0, al = (o, v, c) => {
39
- if (typeof o != "object" || !o.key || v.indexOf(o.key) > -1) return !1;
40
- let l = Fe(o, c);
41
- return typeof o.colspan > "u" ? !0 : (typeof o.colspan < "u" && (typeof o.colspan == "function" ? l = parseInt(o.colspan(c)) : l = parseInt(o.colspan)), l > 0);
42
- }, ol = (o = []) => {
43
- if (o.length > 0) {
44
- for (let v = 0; v < o.length; ++v)
45
- if (o[v].sortable) return o[v].key;
957
+ return o[e.key];
958
+ }, Qa = (e, o, i) => {
959
+ if (!e.colspan) return -1;
960
+ let n = o;
961
+ return i.forEach((l) => {
962
+ let a = zt(e, l);
963
+ a > 0 && a < n && (n = a);
964
+ }), n;
965
+ }, zt = (e, o) => e.colspan === !1 ? !1 : typeof e.colspan == "function" ? e.colspan(o) : e.colspan, Za = (e, o) => typeof e.preferSlot > "u" ? !0 : e.preferSlot === !1 ? !1 : typeof e.preferSlot == "function" ? e.preferSlot(o) : !0, el = (e, o, i) => {
966
+ if (typeof e != "object" || !e.key || o.indexOf(e.key) > -1) return !1;
967
+ let n = zt(e, i);
968
+ return typeof e.colspan > "u" ? !0 : (typeof e.colspan < "u" && (typeof e.colspan == "function" ? n = parseInt(e.colspan(i)) : n = parseInt(e.colspan)), n > 0);
969
+ }, tl = (e = []) => {
970
+ if (e.length > 0) {
971
+ for (let o = 0; o < e.length; ++o)
972
+ if (e[o].sortable) return e[o].key;
46
973
  }
47
974
  return "";
48
- }, nl = (o, v) => {
49
- if (o.length > 0) {
50
- for (let c = 0; c < o.length; ++c)
51
- if (o[c].key === v) return o[c];
975
+ }, al = (e, o) => {
976
+ if (e.length > 0) {
977
+ for (let i = 0; i < e.length; ++i)
978
+ if (e[i].key === o) return e[i];
52
979
  }
53
980
  return null;
54
- }, vt = (o) => o.type ? `is-${o.type}` : "", ft = /* @__PURE__ */ te({
981
+ }, fa = (e) => e.type ? `is-${e.type}` : "", ma = /* @__PURE__ */ ae({
55
982
  __name: "LktTableCell",
56
983
  props: {
57
984
  modelValue: { default: () => ({}) },
58
- column: { default: () => new st() },
985
+ column: { default: () => new la() },
59
986
  columns: { default: () => [] },
60
987
  i: { default: 0 },
61
988
  editModeEnabled: { type: Boolean, default: !1 },
62
989
  hasInlineEditPerm: { type: Boolean, default: !1 }
63
990
  },
64
991
  emits: ["update:modelValue"],
65
- setup(o, { emit: v }) {
66
- const c = v, l = o, n = h(l.modelValue), t = h(n.value[l.column.key]), b = h(null);
67
- F(t, (s) => {
68
- const a = JSON.parse(JSON.stringify(n.value));
69
- a[l.column.key] = s, c("update:modelValue", a);
70
- }), F(() => l.modelValue, (s) => {
71
- n.value = s, t.value = n.value[l.column.key];
992
+ setup(e, { emit: o }) {
993
+ const i = o, n = e, l = C(n.modelValue), a = C(l.value[n.column.key]), v = C(null);
994
+ H(a, (m) => {
995
+ const r = JSON.parse(JSON.stringify(l.value));
996
+ r[n.column.key] = m, i("update:modelValue", r);
997
+ }), H(() => n.modelValue, (m) => {
998
+ l.value = m, a.value = l.value[n.column.key];
72
999
  });
73
- const D = i(() => ({ ...l.column.slotData, item: n.value })), k = i(() => {
74
- var s, a, U, _;
75
- if ((s = l.column.field) != null && s.modalData && typeof ((a = l.column.field) == null ? void 0 : a.modalData) == "object")
76
- for (let w in l.column.field.modalData)
77
- if (typeof ((U = l.column.field) == null ? void 0 : U.modalData[w]) == "string" && l.column.field.modalData[w].startsWith("prop:")) {
78
- let H = l.column.field.modalData[w].substring(5);
79
- n.value[H];
1000
+ const b = u(() => ({ ...n.column.slotData, item: l.value })), g = u(() => {
1001
+ var m, r, T, c;
1002
+ if ((m = n.column.field) != null && m.modalData && typeof ((r = n.column.field) == null ? void 0 : r.modalData) == "object")
1003
+ for (let S in n.column.field.modalData)
1004
+ if (typeof ((T = n.column.field) == null ? void 0 : T.modalData[S]) == "string" && n.column.field.modalData[S].startsWith("prop:")) {
1005
+ let E = n.column.field.modalData[S].substring(5);
1006
+ l.value[E];
80
1007
  } else
81
- l.column.field.modalData[w];
82
- return (_ = l.column.field) == null ? void 0 : _.modalData;
1008
+ n.column.field.modalData[S];
1009
+ return (c = n.column.field) == null ? void 0 : c.modalData;
83
1010
  });
84
- return (s, a) => {
85
- var H, I, le, V;
86
- const U = z("lkt-anchor"), _ = z("lkt-button"), w = z("lkt-field");
87
- return s.column.type === y(Se).Anchor ? (u(), S(U, oe(Q({ key: 0 }, s.column.anchor)), {
88
- default: L(() => [
89
- ee(ue(y(ve)(s.column, n.value, s.i)), 1)
1011
+ return (m, r) => {
1012
+ var E, V, he, O;
1013
+ const T = ve("lkt-anchor"), c = ve("lkt-button"), S = ve("lkt-field");
1014
+ return m.column.type === B(yt).Anchor ? (d(), $(T, Ee(fe({ key: 0 }, m.column.anchor)), {
1015
+ default: F(() => [
1016
+ Ae(Pe(B(at)(m.column, l.value, m.i)), 1)
90
1017
  ]),
91
1018
  _: 1
92
- }, 16)) : s.column.type === y(Se).Button ? (u(), S(_, Q({ key: 1 }, s.column.button, { prop: n.value }), {
93
- default: L(() => [
94
- ee(ue(y(ve)(s.column, n.value, s.i)), 1)
1019
+ }, 16)) : m.column.type === B(yt).Button ? (d(), $(c, fe({ key: 1 }, m.column.button, { prop: l.value }), {
1020
+ default: F(() => [
1021
+ Ae(Pe(B(at)(m.column, l.value, m.i)), 1)
95
1022
  ]),
96
1023
  _: 1
97
- }, 16, ["prop"])) : s.column.type === y(Se).Field && s.hasInlineEditPerm ? (u(), S(w, Q({ key: 2 }, s.column.field, {
98
- "read-mode": !s.column.editable || !s.editModeEnabled,
99
- ref: (W) => b.value = W,
100
- "slot-data": D.value,
101
- label: ((H = s.column.field) == null ? void 0 : H.type) === "switch" || ((I = s.column.field) == null ? void 0 : I.type) === "check" ? s.column.label : "",
102
- "modal-data": k.value,
103
- prop: n.value,
104
- modelValue: t.value,
105
- "onUpdate:modelValue": a[0] || (a[0] = (W) => t.value = W)
106
- }), null, 16, ["read-mode", "slot-data", "label", "modal-data", "prop", "modelValue"])) : s.column.type === y(Se).Field ? (u(), S(w, Q({ key: 3 }, s.column.field, {
1024
+ }, 16, ["prop"])) : m.column.type === B(yt).Field && m.hasInlineEditPerm ? (d(), $(S, fe({ key: 2 }, m.column.field, {
1025
+ "read-mode": !m.column.editable || !m.editModeEnabled,
1026
+ ref: (q) => v.value = q,
1027
+ "slot-data": b.value,
1028
+ label: ((E = m.column.field) == null ? void 0 : E.type) === "switch" || ((V = m.column.field) == null ? void 0 : V.type) === "check" ? m.column.label : "",
1029
+ "modal-data": g.value,
1030
+ prop: l.value,
1031
+ modelValue: a.value,
1032
+ "onUpdate:modelValue": r[0] || (r[0] = (q) => a.value = q)
1033
+ }), null, 16, ["read-mode", "slot-data", "label", "modal-data", "prop", "modelValue"])) : m.column.type === B(yt).Field ? (d(), $(S, fe({ key: 3 }, m.column.field, {
107
1034
  "read-mode": "",
108
- ref: (W) => b.value = W,
109
- "slot-data": D.value,
110
- label: ((le = s.column.field) == null ? void 0 : le.type) === "switch" || ((V = s.column.field) == null ? void 0 : V.type) === "check" ? s.column.label : "",
111
- "modal-data": k.value,
112
- prop: n.value,
113
- "model-value": t.value
114
- }), null, 16, ["slot-data", "label", "modal-data", "prop", "model-value"])) : (u(), p(P, { key: 4 }, [
115
- ee(ue(y(ve)(s.column, n.value, s.i, s.columns)), 1)
1035
+ ref: (q) => v.value = q,
1036
+ "slot-data": b.value,
1037
+ label: ((he = m.column.field) == null ? void 0 : he.type) === "switch" || ((O = m.column.field) == null ? void 0 : O.type) === "check" ? m.column.label : "",
1038
+ "modal-data": g.value,
1039
+ prop: l.value,
1040
+ "model-value": a.value
1041
+ }), null, 16, ["slot-data", "label", "modal-data", "prop", "model-value"])) : (d(), h(x, { key: 4 }, [
1042
+ Ae(Pe(B(at)(m.column, l.value, m.i, m.columns)), 1)
116
1043
  ], 64));
117
1044
  };
118
1045
  }
119
- }), Y = class Y {
1046
+ }), De = class De {
120
1047
  };
121
- Y.navButtonSlot = "", Y.dropButtonSlot = "", Y.editButtonSlot = "", Y.createButtonSlot = "", Y.defaultEmptySlot = void 0, Y.defaultSaveIcon = "", Y.defaultNoResultsMessage = "No results";
122
- let $ = Y;
123
- const ul = /* @__PURE__ */ te({
1048
+ De.navButtonSlot = "", De.dropButtonSlot = "", De.editButtonSlot = "", De.createButtonSlot = "", De.defaultEmptySlot = void 0, De.defaultSaveIcon = "", De.defaultNoResultsMessage = "No results";
1049
+ let Y = De;
1050
+ const ll = /* @__PURE__ */ ae({
124
1051
  __name: "DropButtonComponent",
125
1052
  props: {
126
1053
  config: {},
@@ -128,23 +1055,23 @@ const ul = /* @__PURE__ */ te({
128
1055
  disabled: { type: Boolean, default: !1 }
129
1056
  },
130
1057
  emits: ["click"],
131
- setup(o, { emit: v }) {
132
- const c = v, l = o, n = i(() => $.dropButtonSlot !== ""), t = i(() => $.dropButtonSlot), b = i(() => dt(l.config.resourceData, l.item));
133
- return (D, k) => {
134
- const s = z("lkt-button");
135
- return u(), S(s, Q({ palette: "table-delete" }, l.config, {
136
- disabled: D.disabled,
137
- "resource-data": b.value,
138
- onClick: k[0] || (k[0] = rt((a) => c("click", a), ["prevent", "stop"]))
1058
+ setup(e, { emit: o }) {
1059
+ const i = o, n = e, l = u(() => Y.dropButtonSlot !== ""), a = u(() => Y.dropButtonSlot), v = u(() => na(n.config.resourceData, n.item));
1060
+ return (b, g) => {
1061
+ const m = ve("lkt-button");
1062
+ return d(), $(m, fe({ palette: "table-delete" }, n.config, {
1063
+ disabled: b.disabled,
1064
+ "resource-data": v.value,
1065
+ onClick: g[0] || (g[0] = ta((r) => i("click", r), ["prevent", "stop"]))
139
1066
  }), {
140
- default: L(() => [
141
- n.value ? (u(), S(Z(t.value), { key: 0 })) : f("", !0)
1067
+ default: F(() => [
1068
+ l.value ? (d(), $(Ie(a.value), { key: 0 })) : A("", !0)
142
1069
  ]),
143
1070
  _: 1
144
1071
  }, 16, ["disabled", "resource-data"]);
145
1072
  };
146
1073
  }
147
- }), rl = /* @__PURE__ */ te({
1074
+ }), nl = /* @__PURE__ */ ae({
148
1075
  __name: "EditButtonComponent",
149
1076
  props: {
150
1077
  config: {},
@@ -152,35 +1079,35 @@ const ul = /* @__PURE__ */ te({
152
1079
  disabled: { type: Boolean, default: !1 }
153
1080
  },
154
1081
  emits: ["click"],
155
- setup(o, { emit: v }) {
156
- const c = v, l = o, n = i(() => $.editButtonSlot !== ""), t = i(() => $.editButtonSlot), b = i(() => dt(l.config.resourceData, l.item));
157
- return (D, k) => {
158
- const s = z("lkt-button");
159
- return u(), S(s, Q({ palette: "table-edit" }, l.config, {
160
- disabled: D.disabled,
161
- "resource-data": b.value,
162
- onClick: k[0] || (k[0] = rt((a) => c("click"), ["prevent", "stop"]))
1082
+ setup(e, { emit: o }) {
1083
+ const i = o, n = e, l = u(() => Y.editButtonSlot !== ""), a = u(() => Y.editButtonSlot), v = u(() => na(n.config.resourceData, n.item));
1084
+ return (b, g) => {
1085
+ const m = ve("lkt-button");
1086
+ return d(), $(m, fe({ palette: "table-edit" }, n.config, {
1087
+ disabled: b.disabled,
1088
+ "resource-data": v.value,
1089
+ onClick: g[0] || (g[0] = ta((r) => i("click"), ["prevent", "stop"]))
163
1090
  }), {
164
- default: L(() => [
165
- n.value ? (u(), S(Z(t.value), { key: 0 })) : f("", !0)
1091
+ default: F(() => [
1092
+ l.value ? (d(), $(Ie(a.value), { key: 0 })) : A("", !0)
166
1093
  ]),
167
1094
  _: 1
168
1095
  }, 16, ["disabled", "resource-data"]);
169
1096
  };
170
1097
  }
171
- }), il = ["data-i", "data-draggable"], sl = ["data-i"], dl = {
1098
+ }), ol = ["data-i", "data-draggable"], il = ["data-i"], rl = {
172
1099
  key: 1,
173
1100
  "data-role": "invalid-drag-indicator"
174
- }, pl = {
1101
+ }, ul = {
175
1102
  key: 2,
176
1103
  class: "lkt-table-nav-cell"
177
- }, ml = { class: "lkt-table-nav-container" }, vl = ["colspan"], fl = ["colspan"], cl = ["data-column", "colspan", "title"], yl = {
1104
+ }, sl = { class: "lkt-table-nav-container" }, dl = ["colspan"], cl = ["colspan"], vl = ["data-column", "colspan", "title"], fl = {
178
1105
  key: 7,
179
1106
  class: "lkt-table-col-drop"
180
- }, bl = {
1107
+ }, ml = {
181
1108
  key: 8,
182
1109
  class: "lkt-table-col-edit"
183
- }, gl = /* @__PURE__ */ te({
1110
+ }, pl = /* @__PURE__ */ ae({
184
1111
  __name: "LktTableRow",
185
1112
  props: {
186
1113
  modelValue: { default: () => ({}) },
@@ -199,151 +1126,151 @@ const ul = /* @__PURE__ */ te({
199
1126
  i: { default: 0 },
200
1127
  visibleColumns: { default: () => [] },
201
1128
  emptyColumns: { default: () => [] },
202
- rowDisplayType: { type: [Number, Function], default: de.Auto },
1129
+ rowDisplayType: { type: [Number, Function], default: Ze.Auto },
203
1130
  renderDrag: { type: [Boolean, Function], default: !0 },
204
1131
  disabledDrag: { type: [Boolean, Function], default: !0 }
205
1132
  },
206
1133
  emits: ["update:modelValue", "click", "show", "item-up", "item-down", "item-drop"],
207
- setup(o, { emit: v }) {
208
- var x;
209
- const c = it(), l = v, n = o, t = h(n.modelValue);
210
- let b = typeof n.rowDisplayType == "function" ? n.rowDisplayType(t.value, n.i) : n.rowDisplayType;
211
- b || (b = de.Auto);
212
- const D = [de.Auto, de.PreferCustomItem].includes(b), k = [de.Auto, de.PreferItem].includes(b), s = h((x = n.editButton.anchor) == null ? void 0 : x.to);
213
- for (let r in t.value) s.value = mt(s.value, ":" + r, t.value[r]);
214
- const a = (r) => l("click", r), U = (r, m) => {
215
- l("show", r, m);
216
- }, _ = i(() => {
217
- let r = [], m = !1;
218
- return typeof n.disabledDrag == "function" ? m = n.disabledDrag(t.value) : m = Ve.value === !0, !m && n.sortable && n.isDraggable ? r.push("handle") : m && r.push("disabled"), r.join(" ");
219
- }), w = i(() => $.navButtonSlot !== ""), H = i(() => $.navButtonSlot), I = () => {
220
- l("item-up", n.i);
221
- }, le = () => {
222
- l("item-down", n.i);
223
- }, V = () => {
224
- l("item-drop", n.i);
225
- }, W = () => {
1134
+ setup(e, { emit: o }) {
1135
+ var Z;
1136
+ const i = aa(), n = o, l = e, a = C(l.modelValue);
1137
+ let v = typeof l.rowDisplayType == "function" ? l.rowDisplayType(a.value, l.i) : l.rowDisplayType;
1138
+ v || (v = Ze.Auto);
1139
+ const b = [Ze.Auto, Ze.PreferCustomItem].includes(v), g = [Ze.Auto, Ze.PreferItem].includes(v), m = C((Z = l.editButton.anchor) == null ? void 0 : Z.to);
1140
+ for (let f in a.value) m.value = ia(m.value, ":" + f, a.value[f]);
1141
+ const r = (f) => n("click", f), T = (f, k) => {
1142
+ n("show", f, k);
1143
+ }, c = u(() => {
1144
+ let f = [], k = !1;
1145
+ return typeof l.disabledDrag == "function" ? k = l.disabledDrag(a.value) : k = Ve.value === !0, !k && l.sortable && l.isDraggable ? f.push("handle") : k && f.push("disabled"), f.join(" ");
1146
+ }), S = u(() => Y.navButtonSlot !== ""), E = u(() => Y.navButtonSlot), V = () => {
1147
+ n("item-up", l.i);
1148
+ }, he = () => {
1149
+ n("item-down", l.i);
1150
+ }, O = () => {
1151
+ n("item-drop", l.i);
1152
+ }, q = () => {
226
1153
  };
227
- F(() => n.modelValue, (r) => t.value = r), F(t, (r) => {
228
- l("update:modelValue", r);
1154
+ H(() => l.modelValue, (f) => a.value = f), H(a, (f) => {
1155
+ n("update:modelValue", f);
229
1156
  }, { deep: !0 });
230
- const fe = i(() => typeof n.renderDrag == "function" ? n.renderDrag(t.value) : n.renderDrag === !0), Ve = i(() => typeof n.disabledDrag == "function" ? n.disabledDrag(t.value) : n.disabledDrag === !0);
231
- return (r, m) => {
232
- const j = z("lkt-button");
233
- return u(), p("tr", {
234
- "data-i": r.i,
235
- "data-draggable": r.isDraggable,
236
- class: K({ "type-custom-item": y(D), "type-item": y(k) })
1157
+ const ne = u(() => typeof l.renderDrag == "function" ? l.renderDrag(a.value) : l.renderDrag === !0), Ve = u(() => typeof l.disabledDrag == "function" ? l.disabledDrag(a.value) : l.disabledDrag === !0);
1158
+ return (f, k) => {
1159
+ const U = ve("lkt-button");
1160
+ return d(), h("tr", {
1161
+ "data-i": f.i,
1162
+ "data-draggable": f.isDraggable,
1163
+ class: re({ "type-custom-item": B(b), "type-item": B(g) })
237
1164
  }, [
238
- r.sortable && r.isDraggable && r.editModeEnabled && fe.value ? (u(), p("td", {
1165
+ f.sortable && f.isDraggable && f.editModeEnabled && ne.value ? (d(), h("td", {
239
1166
  key: 0,
240
1167
  "data-role": "drag-indicator",
241
- class: K(_.value),
242
- "data-i": r.i
243
- }, null, 10, sl)) : r.sortable && r.editModeEnabled && fe.value ? (u(), p("td", dl)) : f("", !0),
244
- r.addNavigation && r.editModeEnabled ? (u(), p("td", pl, [
245
- O("div", ml, [
246
- pe(j, {
1168
+ class: re(c.value),
1169
+ "data-i": f.i
1170
+ }, null, 10, il)) : f.sortable && f.editModeEnabled && ne.value ? (d(), h("td", rl)) : A("", !0),
1171
+ f.addNavigation && f.editModeEnabled ? (d(), h("td", ul, [
1172
+ J("div", sl, [
1173
+ Be(U, {
247
1174
  palette: "table-nav",
248
- disabled: r.i === 0,
249
- onClick: I
1175
+ disabled: f.i === 0,
1176
+ onClick: V
250
1177
  }, {
251
- default: L(() => [
252
- w.value ? (u(), S(Z(H.value), {
1178
+ default: F(() => [
1179
+ S.value ? (d(), $(Ie(E.value), {
253
1180
  key: 0,
254
1181
  direction: "up"
255
- })) : (u(), p(P, { key: 1 }, [
256
- m[3] || (m[3] = O("i", { class: "" }, null, -1)),
257
- m[4] || (m[4] = ee(" UP "))
1182
+ })) : (d(), h(x, { key: 1 }, [
1183
+ k[3] || (k[3] = J("i", { class: "" }, null, -1)),
1184
+ k[4] || (k[4] = Ae(" UP "))
258
1185
  ], 64))
259
1186
  ]),
260
1187
  _: 1
261
1188
  }, 8, ["disabled"]),
262
- pe(j, {
1189
+ Be(U, {
263
1190
  palette: "table-nav",
264
- disabled: r.latestRow,
265
- onClick: le
1191
+ disabled: f.latestRow,
1192
+ onClick: he
266
1193
  }, {
267
- default: L(() => [
268
- w.value ? (u(), S(Z(H.value), {
1194
+ default: F(() => [
1195
+ S.value ? (d(), $(Ie(E.value), {
269
1196
  key: 0,
270
1197
  direction: "down"
271
- })) : (u(), p(P, { key: 1 }, [
272
- m[5] || (m[5] = O("i", { class: "" }, null, -1)),
273
- m[6] || (m[6] = ee(" DOWN "))
1198
+ })) : (d(), h(x, { key: 1 }, [
1199
+ k[5] || (k[5] = J("i", { class: "" }, null, -1)),
1200
+ k[6] || (k[6] = Ae(" DOWN "))
274
1201
  ], 64))
275
1202
  ]),
276
1203
  _: 1
277
1204
  }, 8, ["disabled"])
278
1205
  ])
279
- ])) : f("", !0),
280
- r.displayHiddenColumnsIndicator ? (u(), p("td", {
1206
+ ])) : A("", !0),
1207
+ f.displayHiddenColumnsIndicator ? (d(), h("td", {
281
1208
  key: 3,
282
- onClick: m[0] || (m[0] = (E) => U(E, r.i)),
1209
+ onClick: k[0] || (k[0] = (L) => T(L, f.i)),
283
1210
  "data-role": "show-more",
284
- class: K(r.hiddenIsVisible ? "state-open" : "")
285
- }, null, 2)) : f("", !0),
286
- y(D) && y(c)[`item-${r.i}`] ? (u(), p("td", {
287
- key: "td" + r.i,
288
- colspan: r.visibleColumns.length
1211
+ class: re(f.hiddenIsVisible ? "state-open" : "")
1212
+ }, null, 2)) : A("", !0),
1213
+ B(b) && B(i)[`item-${f.i}`] ? (d(), h("td", {
1214
+ key: "td" + f.i,
1215
+ colspan: f.visibleColumns.length
289
1216
  }, [
290
- T(r.$slots, `item-${r.i}`, {
291
- item: t.value,
292
- index: r.i
1217
+ z(f.$slots, `item-${f.i}`, {
1218
+ item: a.value,
1219
+ index: f.i
293
1220
  })
294
- ], 8, vl)) : y(k) && y(c).item ? (u(), p("td", {
295
- key: "td" + r.i,
296
- colspan: r.visibleColumns.length
1221
+ ], 8, dl)) : B(g) && B(i).item ? (d(), h("td", {
1222
+ key: "td" + f.i,
1223
+ colspan: f.visibleColumns.length
297
1224
  }, [
298
- T(r.$slots, "item", {
299
- item: t.value,
300
- index: r.i
1225
+ z(f.$slots, "item", {
1226
+ item: a.value,
1227
+ index: f.i
301
1228
  })
302
- ], 8, fl)) : (u(!0), p(P, { key: 6 }, J(r.visibleColumns, (E) => (u(), p(P, null, [
303
- y(al)(E, r.emptyColumns, t.value) ? (u(), p("td", {
304
- key: "td" + r.i,
305
- "data-column": E.key,
306
- colspan: y(Fe)(E, t.value),
307
- title: y(ve)(E, t.value, r.i, r.visibleColumns),
308
- class: K(y(vt)(E)),
309
- onClick: m[2] || (m[2] = (N) => a(N))
1229
+ ], 8, cl)) : (d(!0), h(x, { key: 6 }, ie(f.visibleColumns, (L) => (d(), h(x, null, [
1230
+ B(el)(L, f.emptyColumns, a.value) ? (d(), h("td", {
1231
+ key: "td" + f.i,
1232
+ "data-column": L.key,
1233
+ colspan: B(zt)(L, a.value),
1234
+ title: B(at)(L, a.value, f.i, f.visibleColumns),
1235
+ class: re(B(fa)(L)),
1236
+ onClick: k[2] || (k[2] = (Q) => r(Q))
310
1237
  }, [
311
- r.$slots[E.key] && y(ll)(E, t.value) ? T(r.$slots, E.key, {
1238
+ f.$slots[L.key] && B(Za)(L, a.value) ? z(f.$slots, L.key, {
312
1239
  key: 0,
313
- value: t.value[E.key],
314
- item: t.value,
315
- column: E,
316
- i: r.i
317
- }) : t.value ? (u(), S(ft, {
1240
+ value: a.value[L.key],
1241
+ item: a.value,
1242
+ column: L,
1243
+ i: f.i
1244
+ }) : a.value ? (d(), $(ma, {
318
1245
  key: 1,
319
- modelValue: t.value,
320
- "onUpdate:modelValue": m[1] || (m[1] = (N) => t.value = N),
321
- column: E,
322
- columns: r.visibleColumns,
323
- "edit-mode-enabled": r.editModeEnabled,
324
- "has-inline-edit-perm": r.hasInlineEditPerm,
325
- i: r.i
326
- }, null, 8, ["modelValue", "column", "columns", "edit-mode-enabled", "has-inline-edit-perm", "i"])) : f("", !0)
327
- ], 10, cl)) : f("", !0)
1246
+ modelValue: a.value,
1247
+ "onUpdate:modelValue": k[1] || (k[1] = (Q) => a.value = Q),
1248
+ column: L,
1249
+ columns: f.visibleColumns,
1250
+ "edit-mode-enabled": f.editModeEnabled,
1251
+ "has-inline-edit-perm": f.hasInlineEditPerm,
1252
+ i: f.i
1253
+ }, null, 8, ["modelValue", "column", "columns", "edit-mode-enabled", "has-inline-edit-perm", "i"])) : A("", !0)
1254
+ ], 10, vl)) : A("", !0)
328
1255
  ], 64))), 256)),
329
- r.canDrop && r.editModeEnabled ? (u(), p("td", yl, [
330
- pe(ul, {
331
- config: r.dropButton,
332
- item: t.value,
333
- onClick: V
1256
+ f.canDrop && f.editModeEnabled ? (d(), h("td", fl, [
1257
+ Be(ll, {
1258
+ config: f.dropButton,
1259
+ item: a.value,
1260
+ onClick: O
334
1261
  }, null, 8, ["config", "item"])
335
- ])) : f("", !0),
336
- r.canEdit && r.editModeEnabled ? (u(), p("td", bl, [
337
- pe(rl, {
338
- config: r.editButton,
339
- item: t.value,
340
- onClick: W
1262
+ ])) : A("", !0),
1263
+ f.canEdit && f.editModeEnabled ? (d(), h("td", ml, [
1264
+ Be(nl, {
1265
+ config: f.editButton,
1266
+ item: a.value,
1267
+ onClick: q
341
1268
  }, null, 8, ["config", "item"])
342
- ])) : f("", !0)
343
- ], 10, il);
1269
+ ])) : A("", !0)
1270
+ ], 10, ol);
344
1271
  };
345
1272
  }
346
- }), kl = { "data-role": "hidden-row" }, hl = ["colspan"], Cl = ["data-column"], Bl = ["data-i"], Sl = ["data-column", "title"], Dl = /* @__PURE__ */ te({
1273
+ }), gl = { "data-role": "hidden-row" }, bl = ["colspan"], yl = ["data-column"], hl = ["data-i"], kl = ["data-column", "title"], Sl = /* @__PURE__ */ ae({
347
1274
  __name: "LktHiddenRow",
348
1275
  props: {
349
1276
  modelValue: { default: () => ({}) },
@@ -359,143 +1286,143 @@ const ul = /* @__PURE__ */ te({
359
1286
  hasInlineEditPerm: { type: Boolean, default: !1 }
360
1287
  },
361
1288
  emits: ["update:modelValue", "click"],
362
- setup(o, { emit: v }) {
363
- const c = v, l = o, n = h(l.modelValue), t = (b) => c("click", b);
364
- return F(() => l.modelValue, (b) => n.value = b), F(n, () => c("update:modelValue", n.value)), (b, D) => ge((u(), p("tr", kl, [
365
- O("td", { colspan: b.hiddenColumnsColSpan }, [
366
- O("table", null, [
367
- O("tr", null, [
368
- (u(!0), p(P, null, J(b.hiddenColumns, (k) => (u(), p("th", {
369
- "data-column": k.key
1289
+ setup(e, { emit: o }) {
1290
+ const i = o, n = e, l = C(n.modelValue), a = (v) => i("click", v);
1291
+ return H(() => n.modelValue, (v) => l.value = v), H(l, () => i("update:modelValue", l.value)), (v, b) => it((d(), h("tr", gl, [
1292
+ J("td", { colspan: v.hiddenColumnsColSpan }, [
1293
+ J("table", null, [
1294
+ J("tr", null, [
1295
+ (d(!0), h(x, null, ie(v.hiddenColumns, (g) => (d(), h("th", {
1296
+ "data-column": g.key
370
1297
  }, [
371
- O("div", null, ue(k.label), 1)
372
- ], 8, Cl))), 256))
1298
+ J("div", null, Pe(g.label), 1)
1299
+ ], 8, yl))), 256))
373
1300
  ]),
374
- O("tr", { "data-i": b.i }, [
375
- (u(!0), p(P, null, J(b.hiddenColumns, (k, s) => (u(), p("td", {
376
- "data-column": k.key,
377
- title: y(ve)(k, n.value, s, b.hiddenColumns),
378
- onClick: D[1] || (D[1] = (a) => t(a))
1301
+ J("tr", { "data-i": v.i }, [
1302
+ (d(!0), h(x, null, ie(v.hiddenColumns, (g, m) => (d(), h("td", {
1303
+ "data-column": g.key,
1304
+ title: B(at)(g, l.value, m, v.hiddenColumns),
1305
+ onClick: b[1] || (b[1] = (r) => a(r))
379
1306
  }, [
380
- b.$slots[k.key] ? T(b.$slots, k.key, {
1307
+ v.$slots[g.key] ? z(v.$slots, g.key, {
381
1308
  key: 0,
382
- value: n.value[k.key],
383
- item: n.value,
384
- column: k,
385
- i: s
386
- }) : (u(), S(ft, {
1309
+ value: l.value[g.key],
1310
+ item: l.value,
1311
+ column: g,
1312
+ i: m
1313
+ }) : (d(), $(ma, {
387
1314
  key: 1,
388
- column: k,
389
- columns: b.hiddenColumns,
390
- modelValue: n.value,
391
- "onUpdate:modelValue": D[0] || (D[0] = (a) => n.value = a),
392
- i: s,
393
- "edit-mode-enabled": b.editModeEnabled,
394
- "has-inline-edit-perm": b.hasInlineEditPerm
1315
+ column: g,
1316
+ columns: v.hiddenColumns,
1317
+ modelValue: l.value,
1318
+ "onUpdate:modelValue": b[0] || (b[0] = (r) => l.value = r),
1319
+ i: m,
1320
+ "edit-mode-enabled": v.editModeEnabled,
1321
+ "has-inline-edit-perm": v.hasInlineEditPerm
395
1322
  }, null, 8, ["column", "columns", "modelValue", "i", "edit-mode-enabled", "has-inline-edit-perm"]))
396
- ], 8, Sl))), 256))
397
- ], 8, Bl)
1323
+ ], 8, kl))), 256))
1324
+ ], 8, hl)
398
1325
  ])
399
- ], 8, hl)
1326
+ ], 8, bl)
400
1327
  ], 512)), [
401
- [ke, b.hiddenIsVisible]
1328
+ [rt, v.hiddenIsVisible]
402
1329
  ]);
403
1330
  }
404
- }), ut = /* @__PURE__ */ te({
1331
+ }), Zt = /* @__PURE__ */ ae({
405
1332
  __name: "CreateButton",
406
1333
  props: {
407
1334
  config: { default: void 0 },
408
1335
  disabled: { type: Boolean, default: !1 }
409
1336
  },
410
1337
  emits: ["click", "append"],
411
- setup(o, { emit: v }) {
412
- var s;
413
- const c = v, l = o, n = i(() => $.createButtonSlot !== ""), t = i(() => $.createButtonSlot), b = {
414
- ...(s = l.config) == null ? void 0 : s.modalData,
415
- beforeClose: (a) => {
416
- "itemCreated" in a && a.itemCreated === !0 && c("append", a.item);
1338
+ setup(e, { emit: o }) {
1339
+ var m;
1340
+ const i = o, n = e, l = u(() => Y.createButtonSlot !== ""), a = u(() => Y.createButtonSlot), v = {
1341
+ ...(m = n.config) == null ? void 0 : m.modalData,
1342
+ beforeClose: (r) => {
1343
+ "itemCreated" in r && r.itemCreated === !0 && i("append", r.item);
417
1344
  }
418
- }, D = {
419
- ...l.config
1345
+ }, b = {
1346
+ ...n.config
420
1347
  };
421
- D.modalData = b;
422
- const k = () => {
423
- var a;
424
- if (!((a = l.config) != null && a.modal)) {
425
- c("click");
1348
+ b.modalData = v;
1349
+ const g = () => {
1350
+ var r;
1351
+ if (!((r = n.config) != null && r.modal)) {
1352
+ i("click");
426
1353
  return;
427
1354
  }
428
1355
  };
429
- return (a, U) => {
430
- const _ = z("lkt-button");
431
- return u(), S(_, Q(D, {
432
- disabled: a.disabled,
433
- onClick: k
1356
+ return (r, T) => {
1357
+ const c = ve("lkt-button");
1358
+ return d(), $(c, fe(b, {
1359
+ disabled: r.disabled,
1360
+ onClick: g
434
1361
  }), {
435
- default: L(() => [
436
- n.value ? (u(), S(Z(t.value), { key: 0 })) : f("", !0)
1362
+ default: F(() => [
1363
+ l.value ? (d(), $(Ie(a.value), { key: 0 })) : A("", !0)
437
1364
  ]),
438
1365
  _: 1
439
1366
  }, 16, ["disabled"]);
440
1367
  };
441
1368
  }
442
- }), Il = ["data-column", "data-sortable", "data-sort", "colspan", "title"], Vl = /* @__PURE__ */ te({
1369
+ }), wl = ["data-column", "data-sortable", "data-sort", "colspan", "title"], Cl = /* @__PURE__ */ ae({
443
1370
  __name: "TableHeader",
444
1371
  props: {
445
- column: { default: () => new st() },
1372
+ column: { default: () => new la() },
446
1373
  sortBy: { default: "" },
447
1374
  sortDirection: { default: "" },
448
1375
  amountOfColumns: { default: 0 },
449
1376
  items: { default: () => [] }
450
1377
  },
451
1378
  emits: ["click"],
452
- setup(o, { emit: v }) {
453
- const c = v, l = o, n = i(() => tl(l.column, l.amountOfColumns, l.items)), t = i(() => l.column.sortable === !0), b = i(() => t.value && l.sortBy === l.column.key ? l.sortDirection : ""), D = i(() => pt(l.column.label)), k = i(() => t.value && l.sortBy === l.column.key ? l.sortDirection === ne.Asc ? me.defaultTableSortAscIcon : l.sortDirection === ne.Desc ? me.defaultTableSortDescIcon : "" : ""), s = () => c("click", l.column);
454
- return (a, U) => (u(), p("th", {
455
- "data-column": a.column.key,
456
- "data-sortable": t.value,
457
- "data-sort": b.value,
458
- colspan: n.value,
459
- title: D.value,
460
- class: K(y(vt)(a.column)),
461
- onClick: s
1379
+ setup(e, { emit: o }) {
1380
+ const i = o, n = e, l = u(() => Qa(n.column, n.amountOfColumns, n.items)), a = u(() => n.column.sortable === !0), v = u(() => a.value && n.sortBy === n.column.key ? n.sortDirection : ""), b = u(() => oa(n.column.label)), g = u(() => a.value && n.sortBy === n.column.key ? n.sortDirection === Oe.Asc ? tt.defaultTableSortAscIcon : n.sortDirection === Oe.Desc ? tt.defaultTableSortDescIcon : "" : ""), m = () => i("click", n.column);
1381
+ return (r, T) => (d(), h("th", {
1382
+ "data-column": r.column.key,
1383
+ "data-sortable": a.value,
1384
+ "data-sort": v.value,
1385
+ colspan: l.value,
1386
+ title: b.value,
1387
+ class: re(B(fa)(r.column)),
1388
+ onClick: m
462
1389
  }, [
463
- O("div", null, [
464
- ee(ue(D.value) + " ", 1),
465
- k.value ? (u(), p("i", {
1390
+ J("div", null, [
1391
+ Ae(Pe(b.value) + " ", 1),
1392
+ g.value ? (d(), h("i", {
466
1393
  key: 0,
467
- class: K(k.value)
468
- }, null, 2)) : f("", !0)
1394
+ class: re(g.value)
1395
+ }, null, 2)) : A("", !0)
469
1396
  ])
470
- ], 10, Il));
1397
+ ], 10, wl));
471
1398
  }
472
- }), wl = ["id"], El = {
1399
+ }), Dl = ["id"], Bl = {
473
1400
  key: 0,
474
1401
  class: "lkt-table-page-buttons"
475
- }, Tl = { class: "switch-edition-mode" }, $l = {
1402
+ }, Il = { class: "switch-edition-mode" }, Tl = {
476
1403
  key: 1,
477
1404
  class: "lkt-table-page-buttons"
478
- }, Rl = {
1405
+ }, El = {
479
1406
  key: 2,
480
1407
  class: "lkt-table-page-filters"
481
- }, Ml = { class: "lkt-table" }, Ll = { key: 0 }, Pl = {
1408
+ }, Al = { class: "lkt-table" }, Vl = { key: 0 }, Nl = {
482
1409
  key: 0,
483
1410
  "data-role": "drag-indicator"
484
- }, Nl = { key: 1 }, Fl = { key: 2 }, Al = {
1411
+ }, _l = { key: 1 }, Ml = { key: 2 }, Rl = {
485
1412
  key: 3,
486
1413
  class: "lkt-table-col-drop"
487
- }, Ol = {
1414
+ }, $l = {
488
1415
  key: 4,
489
1416
  class: "lkt-table-col-edit"
490
- }, Ul = ["id"], _l = ["id"], jl = ["data-i"], Hl = ["data-i"], ql = {
1417
+ }, Ll = ["id"], Ol = ["id"], Pl = ["data-i"], Fl = ["data-i"], Ul = ["id"], jl = { class: "lkt-carousel-slide" }, zl = { class: "lkt-carousel-slide" }, Hl = {
491
1418
  key: 3,
492
1419
  class: "lkt-table-empty"
493
- }, Kl = {
1420
+ }, xl = {
494
1421
  key: 5,
495
1422
  class: "lkt-table-page-buttons lkt-table-page-buttons-bottom"
496
- }, zl = /* @__PURE__ */ te({
1423
+ }, ql = /* @__PURE__ */ ae({
497
1424
  __name: "LktTable",
498
- props: /* @__PURE__ */ Wt({
1425
+ props: /* @__PURE__ */ Ta({
499
1426
  modelValue: {},
500
1427
  type: {},
501
1428
  columns: {},
@@ -534,7 +1461,7 @@ const ul = /* @__PURE__ */ te({
534
1461
  wrapContentClass: {},
535
1462
  itemsContainerClass: {},
536
1463
  createEnabledValidator: { type: Function }
537
- }, Qt(Xt)),
1464
+ }, Aa(Va)),
538
1465
  emits: [
539
1466
  "update:modelValue",
540
1467
  "update:perms",
@@ -549,485 +1476,540 @@ const ul = /* @__PURE__ */ te({
549
1476
  "page",
550
1477
  "drag-end"
551
1478
  ],
552
- setup(o, { expose: v, emit: c }) {
553
- var ot;
554
- const l = c, n = it(), t = o, b = {}, D = h(typeof t.sorter == "function" ? t.sorter : el), k = h(ol(t.columns)), s = h(ne.Asc), a = h(t.modelValue), U = h(b), _ = h(null), w = h(t.columns), H = h((ot = t.paginator) == null ? void 0 : ot.modelValue), I = h(t.loading), le = h(!1), V = h(t.perms), W = h(null), fe = h(null), Ve = h(null), x = h({}), r = h(new Zt({ items: a.value }, t.dataStateConfig)), m = h(t.editMode), j = h(0), E = h(null), N = h(De(t.saveButton, me.defaultSaveButton)), Ae = h(De(t.createButton, me.defaultCreateButton)), ct = h(De(t.editModeButton, me.defaultEditModeButton)), yt = h(De(t.dropButton, me.defaultDropButton)), re = h(!1);
555
- F(I, (e) => l("update:loading", e)), F(H, (e) => l("page", e));
556
- const bt = (e) => {
557
- V.value = e;
558
- }, gt = (e) => {
559
- var d;
560
- Array.isArray(e.data) && ((!t.paginator || ![Ie.LoadMore, Ie.Infinite].includes((d = t.paginator) == null ? void 0 : d.type)) && a.value.splice(0, a.value.length), a.value = [...a.value, ...e.data]), I.value = !1, le.value = !0, r.value.store({ items: a.value }).turnStoredIntoOriginal(), re.value = !1, Be(() => {
561
- j.value = ae(), Te.value, l("read-response", e);
1479
+ setup(e, { expose: o, emit: i }) {
1480
+ var qt;
1481
+ const n = i, l = aa(), a = e, v = {}, b = C(typeof a.sorter == "function" ? a.sorter : Ja), g = C(tl(a.columns)), m = C(Oe.Asc), r = C(a.modelValue), T = C(v), c = C(null), S = C(a.columns), E = C((qt = a.paginator) == null ? void 0 : qt.modelValue), V = C(a.loading), he = C(!1), O = C(a.perms), q = C(null), ne = C(null), Ve = C(null), Z = C({}), f = C(new _a({ items: r.value }, a.dataStateConfig)), k = C(a.editMode), U = C(0), L = C(null), Q = C(1), R = C(ht(a.saveButton, tt.defaultSaveButton)), Te = C(ht(a.createButton, tt.defaultCreateButton)), Ct = C(ht(a.editModeButton, tt.defaultEditModeButton)), Ue = C(ht(a.dropButton, tt.defaultDropButton)), j = C(!1);
1482
+ H(V, (t) => n("update:loading", t)), H(E, (t) => n("page", t));
1483
+ const Dt = (t) => {
1484
+ O.value = t;
1485
+ }, Ne = (t) => {
1486
+ var p;
1487
+ Array.isArray(t.data) && ((!a.paginator || ![kt.LoadMore, kt.Infinite].includes((p = a.paginator) == null ? void 0 : p.type)) && r.value.splice(0, r.value.length), r.value = [...r.value, ...t.data]), V.value = !1, he.value = !0, f.value.store({ items: r.value }).turnStoredIntoOriginal(), j.value = !1, bt(() => {
1488
+ U.value = Le(), lt.value, n("read-response", t);
562
1489
  });
563
- }, kt = () => Be(() => I.value = !0), ht = () => {
564
- W.value.doRefresh();
565
- }, ce = Yt(12), we = i(() => {
566
- if (!t.hideEmptyColumns) return [];
567
- let e = [];
568
- return w.value.forEach((d) => {
569
- let C = d.key, R = !1;
570
- a.value.forEach((A) => {
571
- if (typeof A.checkEmpty == "function")
572
- return A.checkEmpty(A);
573
- A[C] && (R = !0);
574
- }), R || e.push(C);
575
- }), e;
576
- }), he = i(() => w.value.filter((e) => !e.hidden)), Ee = i(() => w.value.filter((e) => e.hidden)), Ct = i(() => {
577
- let e = he.value.length + 1;
578
- return t.sortable && ++e, e;
579
- }), Bt = i(() => w.value.filter((e) => e.isForRowKey)), Oe = i(() => Ee.value.length > 0 && !t.sortable), St = i(() => w.value.map((e) => e.key)), Ue = i(() => {
580
- let e = [];
581
- for (let d in n) St.value.indexOf(d) !== -1 && e.push(d);
582
- return e;
583
- }), _e = i(() => {
584
- var e;
585
- return t.hiddenSave || I.value || !((e = N.value) != null && e.resource || N.value.type) ? !1 : m.value && re.value ? !0 : m.value;
586
- }), Dt = i(() => Ce.value && a.value.length >= t.requiredItemsForTopCreate || ze.value ? !0 : _e.value || m.value && ye.value), Te = i(() => {
587
- var e, d;
588
- return j.value, typeof ((e = N.value) == null ? void 0 : e.disabled) == "function" ? N.value.disabled({
589
- value: a.value,
590
- dataState: r.value
591
- }) : typeof ((d = N.value) == null ? void 0 : d.disabled) == "boolean" ? N.value.disabled : !re.value;
592
- }), It = i(() => a.value.length), Vt = i(() => {
593
- var e;
1490
+ }, Bt = () => bt(() => V.value = !0), me = () => {
1491
+ q.value.doRefresh();
1492
+ }, ue = Na(12), _e = u(() => {
1493
+ if (!a.hideEmptyColumns) return [];
1494
+ let t = [];
1495
+ return S.value.forEach((p) => {
1496
+ let M = p.key, K = !1;
1497
+ r.value.forEach((te) => {
1498
+ if (typeof te.checkEmpty == "function")
1499
+ return te.checkEmpty(te);
1500
+ te[M] && (K = !0);
1501
+ }), K || t.push(M);
1502
+ }), t;
1503
+ }), se = u(() => S.value.filter((t) => !t.hidden)), je = u(() => S.value.filter((t) => t.hidden)), st = u(() => {
1504
+ let t = se.value.length + 1;
1505
+ return a.sortable && ++t, t;
1506
+ }), ze = u(() => S.value.filter((t) => t.isForRowKey)), pe = u(() => je.value.length > 0 && !a.sortable), He = u(() => S.value.map((t) => t.key)), oe = u(() => {
1507
+ let t = [];
1508
+ for (let p in l) He.value.indexOf(p) !== -1 && t.push(p);
1509
+ return t;
1510
+ }), xe = u(() => {
1511
+ let t = [];
1512
+ for (let p in l) p.indexOf("slide-") !== -1 && t.push(p);
1513
+ return t;
1514
+ }), qe = u(() => {
1515
+ var t;
1516
+ return a.hiddenSave || V.value || !((t = R.value) != null && t.resource || R.value.type) ? !1 : k.value && j.value ? !0 : k.value;
1517
+ }), It = u(() => gt.value && r.value.length >= a.requiredItemsForTopCreate || Ke.value ? !0 : qe.value || k.value && ke.value), lt = u(() => {
1518
+ var t, p;
1519
+ return U.value, typeof ((t = R.value) == null ? void 0 : t.disabled) == "function" ? R.value.disabled({
1520
+ value: r.value,
1521
+ dataState: f.value
1522
+ }) : typeof ((p = R.value) == null ? void 0 : p.disabled) == "boolean" ? R.value.disabled : !j.value;
1523
+ }), dt = u(() => r.value.length), Tt = u(() => {
1524
+ var t;
594
1525
  return {
595
- items: a.value,
596
- ...(e = N.value) == null ? void 0 : e.resourceData
1526
+ items: r.value,
1527
+ ...(t = R.value) == null ? void 0 : t.resourceData
597
1528
  };
598
- }), wt = i(() => t.titleTag === "" ? "h2" : t.titleTag), Et = i(() => t.wrapContentTag === "" ? "div" : t.wrapContentTag), $e = i(() => pt(t.title)), Re = i(() => {
599
- var e;
600
- return (e = t.drag) == null ? void 0 : e.enabled;
601
- }), ye = i(() => V.value.includes(X.Create)), je = i(() => V.value.includes("read")), ie = i(() => V.value.includes(X.Update)), He = i(() => V.value.includes(X.Edit)), qe = i(() => V.value.includes(X.InlineEdit)), Tt = i(() => V.value.includes(X.ModalCreate)), $t = i(() => V.value.includes(X.InlineCreate)), Ke = i(() => V.value.includes(X.InlineCreateEver)), se = i(() => V.value.includes(X.Drop)), Rt = i(() => V.value.includes(X.SwitchEditMode)), ze = i(() => !Rt.value || !ie.value && !se.value || !ie.value && se.value ? !1 : !I.value), Mt = i(() => {
602
- var e;
603
- return (typeof ((e = t.paginator) == null ? void 0 : e.type) < "u" && [Ie.LoadMore, Ie.Infinite].includes(t.paginator.type) || !I.value) && a.value.length > 0;
604
- }), Lt = (e) => {
605
- let d = e.target;
606
- if (typeof d.dataset.column > "u")
1529
+ }), ct = u(() => a.titleTag === "" ? "h2" : a.titleTag), vt = u(() => a.wrapContentTag === "" ? "div" : a.wrapContentTag), Me = u(() => oa(a.title)), Ge = u(() => {
1530
+ var t;
1531
+ return (t = a.drag) == null ? void 0 : t.enabled;
1532
+ }), ke = u(() => O.value.includes(we.Create)), Xe = u(() => O.value.includes("read")), de = u(() => O.value.includes(we.Update)), ge = u(() => O.value.includes(we.Edit)), Se = u(() => O.value.includes(we.InlineEdit)), Re = u(() => O.value.includes(we.ModalCreate)), Ye = u(() => O.value.includes(we.InlineCreate)), ft = u(() => O.value.includes(we.InlineCreateEver)), be = u(() => O.value.includes(we.Drop)), $e = u(() => O.value.includes(we.SwitchEditMode)), Ke = u(() => !$e.value || !de.value && !be.value || !de.value && be.value ? !1 : !V.value), nt = u(() => {
1533
+ var t;
1534
+ return (typeof ((t = a.paginator) == null ? void 0 : t.type) < "u" && [kt.LoadMore, kt.Infinite].includes(a.paginator.type) || !V.value) && r.value.length > 0;
1535
+ }), We = (t) => {
1536
+ let p = t.target;
1537
+ if (typeof p.dataset.column > "u")
607
1538
  do
608
- d = d.parentNode;
609
- while (typeof d.dataset.column > "u" && d.tagName !== "TABLE" && d.tagName !== "body");
610
- if (d.tagName === "TD" && (d = d.parentNode, d = d.dataset.i, typeof d < "u"))
611
- return a.value[d];
612
- }, Pt = (e) => a.value[e], Nt = (e) => {
613
- var d;
614
- return (d = _.value) == null ? void 0 : d.querySelector(`[data-i="${e}"]`);
615
- }, We = (e) => U.value["tr_" + e] === !0, Ge = (e) => {
616
- e && e.sortable && (a.value = a.value.sort((d, C) => D.value(d, C, e, s.value)), s.value = s.value === ne.Asc ? ne.Desc : ne.Asc, k.value = e.key, j.value = ae(), l("sort", [k.value, s.value]));
617
- }, Je = (e) => {
618
- l("click", e);
619
- }, Qe = (e, d) => {
620
- let C = "tr_" + d;
621
- U.value[C] = typeof U.value[C] > "u" ? !0 : !U.value[C];
622
- }, Ft = (e) => {
623
- var C, R, A, q, B, g, M, G;
624
- let d = parseInt((q = (A = (R = (C = e == null ? void 0 : e.originalEvent) == null ? void 0 : C.toElement) == null ? void 0 : R.closest("tr")) == null ? void 0 : A.dataset) == null ? void 0 : q.i);
625
- return !(typeof ((B = t.drag) == null ? void 0 : B.isValid) == "function" && !((g = t.drag) != null && g.isValid(a.value[d])) || typeof ((M = t.drag) == null ? void 0 : M.isValid) == "boolean" && !((G = t.drag) != null && G.isValid));
626
- }, Xe = (e) => {
627
- var d, C;
628
- return typeof ((d = t.drag) == null ? void 0 : d.isDraggable) == "function" ? (C = t.drag) == null ? void 0 : C.isDraggable(e) : !0;
629
- }, Ye = () => {
630
- if (ye.value) {
631
- l("click-create");
1539
+ p = p.parentNode;
1540
+ while (typeof p.dataset.column > "u" && p.tagName !== "TABLE" && p.tagName !== "body");
1541
+ if (p.tagName === "TD" && (p = p.parentNode, p = p.dataset.i, typeof p < "u"))
1542
+ return r.value[p];
1543
+ }, Et = (t) => r.value[t], At = (t) => {
1544
+ var p;
1545
+ return (p = c.value) == null ? void 0 : p.querySelector(`[data-i="${t}"]`);
1546
+ }, mt = (t) => T.value["tr_" + t] === !0, ot = (t) => {
1547
+ t && t.sortable && (r.value = r.value.sort((p, M) => b.value(p, M, t, m.value)), m.value = m.value === Oe.Asc ? Oe.Desc : Oe.Asc, g.value = t.key, U.value = Le(), n("sort", [g.value, m.value]));
1548
+ }, pt = (t) => {
1549
+ n("click", t);
1550
+ }, Je = (t, p) => {
1551
+ let M = "tr_" + p;
1552
+ T.value[M] = typeof T.value[M] > "u" ? !0 : !T.value[M];
1553
+ }, s = (t) => {
1554
+ var M, K, te, ce, _, I, W, ye;
1555
+ let p = parseInt((ce = (te = (K = (M = t == null ? void 0 : t.originalEvent) == null ? void 0 : M.toElement) == null ? void 0 : K.closest("tr")) == null ? void 0 : te.dataset) == null ? void 0 : ce.i);
1556
+ return !(typeof ((_ = a.drag) == null ? void 0 : _.isValid) == "function" && !((I = a.drag) != null && I.isValid(r.value[p])) || typeof ((W = a.drag) == null ? void 0 : W.isValid) == "boolean" && !((ye = a.drag) != null && ye.isValid));
1557
+ }, y = (t) => {
1558
+ var p, M;
1559
+ return typeof ((p = a.drag) == null ? void 0 : p.isDraggable) == "function" ? (M = a.drag) == null ? void 0 : M.isDraggable(t) : !0;
1560
+ }, w = () => {
1561
+ if (ke.value) {
1562
+ n("click-create");
632
1563
  return;
633
1564
  }
634
- if (Ke.value)
635
- l("click-create");
1565
+ if (ft.value)
1566
+ n("click-create");
636
1567
  else {
637
- if (typeof t.newValueGenerator == "function") {
638
- let e = t.newValueGenerator();
639
- if (typeof e == "object" || t.type !== be.Table) {
640
- a.value.push(e);
1568
+ if (typeof a.newValueGenerator == "function") {
1569
+ let t = a.newValueGenerator();
1570
+ if (typeof t == "object" || a.type !== et.Table) {
1571
+ r.value.push(t);
641
1572
  return;
642
1573
  }
643
1574
  }
644
- a.value.push({});
1575
+ r.value.push({});
645
1576
  }
646
- }, Ze = (e) => {
647
- a.value.push(e);
648
- }, xe = () => I.value = !0, et = () => I.value = !1, At = (e, d) => {
649
- var C, R, A;
650
- if (!((C = N.value) != null && C.type && [
651
- Ne.Split,
652
- Ne.SplitEver,
653
- Ne.SplitLazy
654
- ].includes((R = N.value) == null ? void 0 : R.type))) {
655
- if (l("before-save"), (A = N.value) != null && A.resource && (I.value = !1, !d.success)) {
656
- l("error", d.httpStatus);
1577
+ }, D = (t) => {
1578
+ r.value.push(t);
1579
+ }, N = () => V.value = !0, G = () => V.value = !1, le = (t, p) => {
1580
+ var M, K, te;
1581
+ if (!((M = R.value) != null && M.type && [
1582
+ Lt.Split,
1583
+ Lt.SplitEver,
1584
+ Lt.SplitLazy
1585
+ ].includes((K = R.value) == null ? void 0 : K.type))) {
1586
+ if (n("before-save"), (te = R.value) != null && te.resource && (V.value = !1, !p.success)) {
1587
+ n("error", p.httpStatus);
657
1588
  return;
658
1589
  }
659
- r.value.turnStoredIntoOriginal(), re.value = !1, l("save", d);
1590
+ f.value.turnStoredIntoOriginal(), j.value = !1, n("save", p);
660
1591
  }
661
- }, tt = (e, d, C) => {
662
- if (C >= e.length) {
663
- let R = C - e.length + 1;
664
- for (; R--; ) e.push(void 0);
1592
+ }, ee = (t, p, M) => {
1593
+ if (M >= t.length) {
1594
+ let K = M - t.length + 1;
1595
+ for (; K--; ) t.push(void 0);
665
1596
  }
666
- return e.splice(C, 0, e.splice(d, 1)[0]), e;
667
- }, Ot = (e) => {
668
- tt(a.value, e, e - 1), j.value = ae();
669
- }, Ut = (e) => {
670
- tt(a.value, e, e + 1), j.value = ae();
671
- }, Me = (e) => {
672
- a.value.splice(e, 1), j.value = ae();
673
- }, _t = () => {
674
- var e;
675
- x.value && typeof ((e = x.value) == null ? void 0 : e.destroy) == "function" && (x.value.destroy(), x.value = {});
676
- }, lt = () => {
677
- E.value || (E.value = document.getElementById("lkt-table-body-" + ce)), x.value = new xt(E.value, {
1597
+ return t.splice(M, 0, t.splice(p, 1)[0]), t;
1598
+ }, Vt = (t) => {
1599
+ ee(r.value, t, t - 1), U.value = Le();
1600
+ }, Nt = (t) => {
1601
+ ee(r.value, t, t + 1), U.value = Le();
1602
+ }, Qe = (t) => {
1603
+ r.value.splice(t, 1), U.value = Le();
1604
+ }, pa = () => {
1605
+ var t;
1606
+ Z.value && typeof ((t = Z.value) == null ? void 0 : t.destroy) == "function" && (Z.value.destroy(), Z.value = {});
1607
+ }, Ht = () => {
1608
+ L.value || (L.value = document.getElementById("lkt-table-body-" + ue)), Z.value = new Ma(L.value, {
678
1609
  direction: "vertical",
679
1610
  handle: ".handle",
680
1611
  animation: 150,
681
- onEnd: function(e) {
682
- let d = e.oldIndex, C = e.newIndex;
683
- a.value.splice(C, 0, a.value.splice(d, 1)[0]), j.value = ae(), l("drag-end", a.value[C]);
1612
+ onEnd: function(t) {
1613
+ let p = t.oldIndex, M = t.newIndex;
1614
+ r.value.splice(M, 0, r.value.splice(p, 1)[0]), U.value = Le(), n("drag-end", r.value[M]);
684
1615
  },
685
- onMove: function(e, d) {
686
- return Ft(e);
1616
+ onMove: function(t, p) {
1617
+ return s(t);
687
1618
  }
688
1619
  });
689
- }, Le = (e, d, C = !1) => {
690
- let R = [j.value, ce, "row", d];
691
- return C && R.push("hidden"), Bt.value.forEach((A) => {
692
- let q = String(e[A.key]).toLowerCase();
693
- q.length > 50 && (q = q.substring(0, 50)), q = mt(q, " ", "-"), R.push(q);
694
- }), R.join("-");
695
- }, at = i(() => typeof t.createEnabledValidator == "function" ? t.createEnabledValidator({ items: a.value }) : !0), Ce = i(() => Ke.value || ye.value && m.value || $t.value && m.value || Tt.value && m.value), jt = i(() => [be.Ol, be.Ul].includes(t.type)), Pe = (e, d) => typeof t.itemDisplayChecker == "function" ? t.itemDisplayChecker(e) : !0;
696
- Gt(() => {
697
- var e;
698
- t.initialSorting && Ge(nl(t.columns, k.value)), r.value.store({ items: a.value }).turnStoredIntoOriginal(), re.value = !1, (e = t.drag) != null && e.enabled && Be(() => {
699
- lt();
1620
+ }, _t = (t, p, M = !1) => {
1621
+ let K = [U.value, ue, "row", p];
1622
+ return M && K.push("hidden"), ze.value.forEach((te) => {
1623
+ let ce = String(t[te.key]).toLowerCase();
1624
+ ce.length > 50 && (ce = ce.substring(0, 50)), ce = ia(ce, " ", "-"), K.push(ce);
1625
+ }), K.join("-");
1626
+ }, xt = u(() => typeof a.createEnabledValidator == "function" ? a.createEnabledValidator({ items: r.value }) : !0), gt = u(() => ft.value || ke.value && k.value || Ye.value && k.value || Re.value && k.value), ga = u(() => [et.Ol, et.Ul].includes(a.type)), Mt = (t, p) => typeof a.itemDisplayChecker == "function" ? a.itemDisplayChecker(t) : !0;
1627
+ jt(() => {
1628
+ var t;
1629
+ a.initialSorting && ot(al(a.columns, g.value)), f.value.store({ items: r.value }).turnStoredIntoOriginal(), j.value = !1, (t = a.drag) != null && t.enabled && bt(() => {
1630
+ Ht();
700
1631
  });
701
- }), F(() => {
702
- var e;
703
- return (e = t.drag) == null ? void 0 : e.enabled;
704
- }, (e) => {
705
- e ? lt() : _t();
706
- }), F(() => t.perms, (e) => V.value = e), F(V, (e) => l("update:perms", e)), F(() => t.editMode, (e) => m.value = e), F(() => t.columns, (e) => w.value = e, { deep: !0 }), F(() => t.modelValue, (e) => a.value = e, { deep: !0 }), F(a, (e) => {
707
- r.value.increment({ items: e }), re.value = r.value.changed(), l("update:modelValue", e);
708
- }, { deep: !0 }), v({
709
- getItemByEvent: Lt,
710
- getItemByIndex: Pt,
711
- getRowByIndex: Nt,
712
- doRefresh: ht,
713
- getHtml: () => fe.value,
1632
+ }), H(() => {
1633
+ var t;
1634
+ return (t = a.drag) == null ? void 0 : t.enabled;
1635
+ }, (t) => {
1636
+ t ? Ht() : pa();
1637
+ }), H(() => a.perms, (t) => O.value = t), H(O, (t) => n("update:perms", t)), H(() => a.editMode, (t) => k.value = t), H(() => a.columns, (t) => S.value = t, { deep: !0 }), H(() => a.modelValue, (t) => r.value = t, { deep: !0 }), H(r, (t) => {
1638
+ f.value.increment({ items: t }), j.value = f.value.changed(), n("update:modelValue", t);
1639
+ }, { deep: !0 }), o({
1640
+ getItemByEvent: We,
1641
+ getItemByIndex: Et,
1642
+ getRowByIndex: At,
1643
+ doRefresh: me,
1644
+ getHtml: () => ne.value,
714
1645
  turnStoredIntoOriginal: () => {
715
- r.value.turnStoredIntoOriginal(), Be(() => {
716
- j.value = ae();
1646
+ f.value.turnStoredIntoOriginal(), bt(() => {
1647
+ U.value = Le();
717
1648
  });
718
1649
  }
719
1650
  });
720
- const Ht = i(() => typeof $.defaultEmptySlot < "u"), qt = i(() => $.defaultEmptySlot), Kt = i(() => !t.drag || Object.keys(t.drag).length === 0 || !t.drag.enabled ? !1 : typeof t.drag.canRender > "u" ? !0 : t.drag.canRender), zt = i(() => !t.drag || Object.keys(t.drag).length === 0 || !t.drag.enabled || typeof t.drag.isDisabled > "u" ? !1 : t.drag.isDisabled);
721
- return (e, d) => {
722
- const C = z("lkt-button"), R = z("lkt-field"), A = z("lkt-loader"), q = z("lkt-paginator");
723
- return u(), p("section", {
1651
+ const ba = u(() => typeof Y.defaultEmptySlot < "u"), ya = u(() => Y.defaultEmptySlot), ha = u(() => !a.drag || Object.keys(a.drag).length === 0 || !a.drag.enabled ? !1 : typeof a.drag.canRender > "u" ? !0 : a.drag.canRender), ka = u(() => !a.drag || Object.keys(a.drag).length === 0 || !a.drag.enabled || typeof a.drag.isDisabled > "u" ? !1 : a.drag.isDisabled);
1652
+ return (t, p) => {
1653
+ const M = ve("lkt-button"), K = ve("lkt-field"), te = ve("lkt-loader"), ce = ve("lkt-paginator");
1654
+ return d(), h("section", {
724
1655
  ref_key: "element",
725
- ref: fe,
1656
+ ref: ne,
726
1657
  class: "lkt-table-page",
727
- id: "lkt-table-page-" + y(ce)
1658
+ id: "lkt-table-page-" + B(ue)
728
1659
  }, [
729
- $e.value || y(n).title ? (u(), p("header", {
1660
+ Me.value || B(l).title ? (d(), h("header", {
730
1661
  key: 0,
731
- class: K(e.headerClass)
1662
+ class: re(t.headerClass)
732
1663
  }, [
733
- $e.value ? (u(), S(Z(wt.value), { key: 0 }, {
734
- default: L(() => [
735
- e.titleIcon ? (u(), p("i", {
1664
+ Me.value ? (d(), $(Ie(ct.value), { key: 0 }, {
1665
+ default: F(() => [
1666
+ t.titleIcon ? (d(), h("i", {
736
1667
  key: 0,
737
- class: K(e.titleIcon)
738
- }, null, 2)) : f("", !0),
739
- ee(" " + ue($e.value), 1)
1668
+ class: re(t.titleIcon)
1669
+ }, null, 2)) : A("", !0),
1670
+ Ae(" " + Pe(Me.value), 1)
740
1671
  ]),
741
1672
  _: 1
742
- })) : f("", !0),
743
- y(n).title ? T(e.$slots, "title", { key: 1 }) : f("", !0)
744
- ], 2)) : f("", !0),
745
- (u(), S(Z(Et.value), {
746
- class: K(["lkt-table-page-content-wrapper", e.wrapContentClass])
1673
+ })) : A("", !0),
1674
+ B(l).title ? z(t.$slots, "title", { key: 1 }) : A("", !0)
1675
+ ], 2)) : A("", !0),
1676
+ (d(), $(Ie(vt.value), {
1677
+ class: re(["lkt-table-page-content-wrapper", t.wrapContentClass])
747
1678
  }, {
748
- default: L(() => [
749
- Dt.value ? (u(), p("div", El, [
750
- ge(pe(C, Q({
1679
+ default: F(() => [
1680
+ It.value ? (d(), h("div", Bl, [
1681
+ it(Be(M, fe({
751
1682
  class: "lkt-table--save-button",
752
1683
  ref_key: "saveButtonRef",
753
1684
  ref: Ve
754
- }, N.value, {
755
- disabled: Te.value,
756
- "modal-data": Vt.value,
757
- onLoading: xe,
758
- onLoaded: et,
759
- onClick: At
1685
+ }, R.value, {
1686
+ disabled: lt.value,
1687
+ "modal-data": Tt.value,
1688
+ onLoading: N,
1689
+ onLoaded: G,
1690
+ onClick: le
760
1691
  }), {
761
- split: L(({ doClose: B, doRootClick: g }) => [
762
- T(e.$slots, "button-save-split", {
763
- doClose: B,
764
- doRootClick: g,
765
- dataState: r.value,
766
- onButtonLoading: xe,
767
- onButtonLoaded: et
1692
+ split: F(({ doClose: _, doRootClick: I }) => [
1693
+ z(t.$slots, "button-save-split", {
1694
+ doClose: _,
1695
+ doRootClick: I,
1696
+ dataState: f.value,
1697
+ onButtonLoading: N,
1698
+ onButtonLoaded: G
768
1699
  })
769
1700
  ]),
770
- default: L(() => [
771
- y(n)["button-save"] ? T(e.$slots, "button-save", {
1701
+ default: F(() => [
1702
+ B(l)["button-save"] ? z(t.$slots, "button-save", {
772
1703
  key: 0,
773
- items: a.value,
774
- editMode: e.editMode,
775
- canUpdate: !Te.value
776
- }) : f("", !0)
1704
+ items: r.value,
1705
+ editMode: t.editMode,
1706
+ canUpdate: !lt.value
1707
+ }) : A("", !0)
777
1708
  ]),
778
1709
  _: 3
779
1710
  }, 16, ["disabled", "modal-data"]), [
780
- [ke, _e.value]
1711
+ [rt, qe.value]
781
1712
  ]),
782
- Ce.value && a.value.length >= e.requiredItemsForTopCreate ? (u(), S(ut, {
1713
+ gt.value && r.value.length >= t.requiredItemsForTopCreate ? (d(), $(Zt, {
783
1714
  key: 0,
784
- config: Ae.value,
785
- disabled: !at.value,
786
- onClick: Ye,
787
- onAppend: Ze
788
- }, null, 8, ["config", "disabled"])) : f("", !0),
789
- O("div", Tl, [
790
- ge(pe(R, Q(ct.value, {
791
- modelValue: m.value,
792
- "onUpdate:modelValue": d[0] || (d[0] = (B) => m.value = B)
1715
+ config: Te.value,
1716
+ disabled: !xt.value,
1717
+ onClick: w,
1718
+ onAppend: D
1719
+ }, null, 8, ["config", "disabled"])) : A("", !0),
1720
+ J("div", Il, [
1721
+ it(Be(K, fe(Ct.value, {
1722
+ modelValue: k.value,
1723
+ "onUpdate:modelValue": p[0] || (p[0] = (_) => k.value = _)
793
1724
  }), null, 16, ["modelValue"]), [
794
- [ke, ze.value]
1725
+ [rt, Ke.value]
795
1726
  ])
796
1727
  ])
797
- ])) : f("", !0),
798
- y(n).buttons ? (u(), p("div", $l, [
799
- T(e.$slots, "buttons")
800
- ])) : f("", !0),
801
- le.value && y(n).filters ? (u(), p("div", Rl, [
802
- T(e.$slots, "filters", {
803
- items: a.value,
804
- isLoading: I.value
1728
+ ])) : A("", !0),
1729
+ B(l).buttons ? (d(), h("div", Tl, [
1730
+ z(t.$slots, "buttons")
1731
+ ])) : A("", !0),
1732
+ he.value && B(l).filters ? (d(), h("div", El, [
1733
+ z(t.$slots, "filters", {
1734
+ items: r.value,
1735
+ isLoading: V.value
805
1736
  })
806
- ])) : f("", !0),
807
- ge(O("div", Ml, [
808
- e.type === y(be).Table ? (u(), p("table", Ll, [
809
- O("thead", null, [
810
- O("tr", null, [
811
- Re.value && m.value ? (u(), p("th", Pl)) : f("", !0),
812
- e.addNavigation && m.value ? (u(), p("th", Nl)) : f("", !0),
813
- Oe.value ? (u(), p("th", Fl)) : f("", !0),
814
- (u(!0), p(P, null, J(he.value, (B) => (u(), p(P, null, [
815
- we.value.indexOf(B.key) === -1 ? (u(), S(Vl, {
1737
+ ])) : A("", !0),
1738
+ it(J("div", Al, [
1739
+ t.type === B(et).Table ? (d(), h("table", Vl, [
1740
+ J("thead", null, [
1741
+ J("tr", null, [
1742
+ Ge.value && k.value ? (d(), h("th", Nl)) : A("", !0),
1743
+ t.addNavigation && k.value ? (d(), h("th", _l)) : A("", !0),
1744
+ pe.value ? (d(), h("th", Ml)) : A("", !0),
1745
+ (d(!0), h(x, null, ie(se.value, (_) => (d(), h(x, null, [
1746
+ _e.value.indexOf(_.key) === -1 ? (d(), $(Cl, {
816
1747
  key: 0,
817
- column: B,
818
- "sort-by": k.value,
819
- "sort-direction": s.value,
820
- "amount-of-columns": e.columns.length,
821
- items: a.value,
822
- onClick: (g) => Ge(B)
823
- }, null, 8, ["column", "sort-by", "sort-direction", "amount-of-columns", "items", "onClick"])) : f("", !0)
1748
+ column: _,
1749
+ "sort-by": g.value,
1750
+ "sort-direction": m.value,
1751
+ "amount-of-columns": t.columns.length,
1752
+ items: r.value,
1753
+ onClick: (I) => ot(_)
1754
+ }, null, 8, ["column", "sort-by", "sort-direction", "amount-of-columns", "items", "onClick"])) : A("", !0)
824
1755
  ], 64))), 256)),
825
- se.value && m.value ? (u(), p("th", Al)) : f("", !0),
826
- He.value && ie.value && m.value ? (u(), p("th", Ol)) : f("", !0)
1756
+ be.value && k.value ? (d(), h("th", Rl)) : A("", !0),
1757
+ ge.value && de.value && k.value ? (d(), h("th", $l)) : A("", !0)
827
1758
  ])
828
1759
  ]),
829
- O("tbody", {
1760
+ J("tbody", {
830
1761
  ref_key: "tableBody",
831
- ref: _,
832
- id: "lkt-table-body-" + y(ce)
1762
+ ref: c,
1763
+ id: "lkt-table-body-" + B(ue)
833
1764
  }, [
834
- (u(!0), p(P, null, J(a.value, (B, g) => ge((u(), S(gl, {
835
- modelValue: a.value[g],
836
- "onUpdate:modelValue": (M) => a.value[g] = M,
837
- key: Le(B, g),
838
- i: g,
839
- "drop-button": yt.value,
840
- "edit-button": e.editButton,
841
- "display-hidden-columns-indicator": Oe.value,
842
- "is-draggable": Xe(B),
843
- sortable: Re.value,
844
- "visible-columns": he.value,
845
- "empty-columns": we.value,
846
- "add-navigation": e.addNavigation,
847
- "hidden-is-visible": We(g),
848
- "latest-row": g + 1 === It.value,
849
- "can-drop": se.value && m.value,
850
- "can-edit": He.value && ie.value && m.value,
851
- "edit-mode-enabled": m.value,
852
- "has-inline-edit-perm": qe.value,
853
- "row-display-type": e.rowDisplayType,
854
- "render-drag": Kt.value,
855
- "disabled-drag": zt.value,
856
- onClick: Je,
857
- onShow: Qe,
858
- onItemUp: Ot,
859
- onItemDown: Ut,
860
- onItemDrop: Me
861
- }, nt({ _: 2 }, [
862
- y(n)[`item-${g}`] ? {
863
- name: `item-${g}`,
864
- fn: L((M) => [
865
- T(e.$slots, `item-${g}`, oe({
866
- [e.slotItemVar || ""]: M.item,
867
- index: g
1765
+ (d(!0), h(x, null, ie(r.value, (_, I) => it((d(), $(pl, {
1766
+ modelValue: r.value[I],
1767
+ "onUpdate:modelValue": (W) => r.value[I] = W,
1768
+ key: _t(_, I),
1769
+ i: I,
1770
+ "drop-button": Ue.value,
1771
+ "edit-button": t.editButton,
1772
+ "display-hidden-columns-indicator": pe.value,
1773
+ "is-draggable": y(_),
1774
+ sortable: Ge.value,
1775
+ "visible-columns": se.value,
1776
+ "empty-columns": _e.value,
1777
+ "add-navigation": t.addNavigation,
1778
+ "hidden-is-visible": mt(I),
1779
+ "latest-row": I + 1 === dt.value,
1780
+ "can-drop": be.value && k.value,
1781
+ "can-edit": ge.value && de.value && k.value,
1782
+ "edit-mode-enabled": k.value,
1783
+ "has-inline-edit-perm": Se.value,
1784
+ "row-display-type": t.rowDisplayType,
1785
+ "render-drag": ha.value,
1786
+ "disabled-drag": ka.value,
1787
+ onClick: pt,
1788
+ onShow: Je,
1789
+ onItemUp: Vt,
1790
+ onItemDown: Nt,
1791
+ onItemDrop: Qe
1792
+ }, Gt({ _: 2 }, [
1793
+ B(l)[`item-${I}`] ? {
1794
+ name: `item-${I}`,
1795
+ fn: F((W) => [
1796
+ z(t.$slots, `item-${I}`, Ee({
1797
+ [t.slotItemVar || ""]: W.item,
1798
+ index: I
868
1799
  }))
869
1800
  ]),
870
1801
  key: "0"
871
- } : y(n).item ? {
1802
+ } : B(l).item ? {
872
1803
  name: "item",
873
- fn: L((M) => [
874
- T(e.$slots, "item", oe({
875
- [e.slotItemVar || ""]: M.item,
876
- index: g
1804
+ fn: F((W) => [
1805
+ z(t.$slots, "item", Ee({
1806
+ [t.slotItemVar || ""]: W.item,
1807
+ index: I
877
1808
  }))
878
1809
  ]),
879
1810
  key: "1"
880
1811
  } : void 0,
881
- J(Ue.value, (M) => ({
882
- name: M,
883
- fn: L((G) => [
884
- T(e.$slots, M, oe({
885
- [e.slotItemVar || ""]: G.item,
886
- value: G.value,
887
- column: G.column
1812
+ ie(oe.value, (W) => ({
1813
+ name: W,
1814
+ fn: F((ye) => [
1815
+ z(t.$slots, W, Ee({
1816
+ [t.slotItemVar || ""]: ye.item,
1817
+ value: ye.value,
1818
+ column: ye.column
888
1819
  }))
889
1820
  ])
890
1821
  }))
891
1822
  ]), 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", "edit-mode-enabled", "has-inline-edit-perm", "row-display-type", "render-drag", "disabled-drag"])), [
892
- [ke, Pe(a.value[g])]
1823
+ [rt, Mt(r.value[I])]
893
1824
  ])), 128)),
894
- Ee.value.length > 0 ? (u(!0), p(P, { key: 0 }, J(a.value, (B, g) => (u(), S(Dl, {
895
- modelValue: a.value[g],
896
- "onUpdate:modelValue": (M) => a.value[g] = M,
897
- key: Le(B, g, !0),
898
- i: g,
899
- "hidden-columns": Ee.value,
900
- "hidden-columns-col-span": Ct.value,
901
- "is-draggable": Xe(B),
902
- sortable: Re.value,
903
- "visible-columns": he.value,
904
- "empty-columns": we.value,
905
- "hidden-is-visible": We(g),
906
- "edit-mode-enabled": m.value,
907
- "has-inline-edit-perm": qe.value,
908
- onClick: Je,
909
- onShow: Qe
910
- }, nt({ _: 2 }, [
911
- J(Ue.value, (M) => ({
912
- name: M,
913
- fn: L((G) => [
914
- T(e.$slots, M, oe({
915
- [e.slotItemVar || ""]: G.item,
916
- value: G.value,
917
- column: G.column
1825
+ je.value.length > 0 ? (d(!0), h(x, { key: 0 }, ie(r.value, (_, I) => (d(), $(Sl, {
1826
+ modelValue: r.value[I],
1827
+ "onUpdate:modelValue": (W) => r.value[I] = W,
1828
+ key: _t(_, I, !0),
1829
+ i: I,
1830
+ "hidden-columns": je.value,
1831
+ "hidden-columns-col-span": st.value,
1832
+ "is-draggable": y(_),
1833
+ sortable: Ge.value,
1834
+ "visible-columns": se.value,
1835
+ "empty-columns": _e.value,
1836
+ "hidden-is-visible": mt(I),
1837
+ "edit-mode-enabled": k.value,
1838
+ "has-inline-edit-perm": Se.value,
1839
+ onClick: pt,
1840
+ onShow: Je
1841
+ }, Gt({ _: 2 }, [
1842
+ ie(oe.value, (W) => ({
1843
+ name: W,
1844
+ fn: F((ye) => [
1845
+ z(t.$slots, W, Ee({
1846
+ [t.slotItemVar || ""]: ye.item,
1847
+ value: ye.value,
1848
+ column: ye.column
918
1849
  }))
919
1850
  ])
920
1851
  }))
921
- ]), 1032, ["modelValue", "onUpdate:modelValue", "i", "hidden-columns", "hidden-columns-col-span", "is-draggable", "sortable", "visible-columns", "empty-columns", "hidden-is-visible", "edit-mode-enabled", "has-inline-edit-perm"]))), 128)) : f("", !0)
922
- ], 8, Ul)
923
- ])) : e.type === y(be).Item ? (u(), p("div", {
1852
+ ]), 1032, ["modelValue", "onUpdate:modelValue", "i", "hidden-columns", "hidden-columns-col-span", "is-draggable", "sortable", "visible-columns", "empty-columns", "hidden-is-visible", "edit-mode-enabled", "has-inline-edit-perm"]))), 128)) : A("", !0)
1853
+ ], 8, Ll)
1854
+ ])) : t.type === B(et).Item ? (d(), h("div", {
924
1855
  key: 1,
925
1856
  ref_key: "tableBody",
926
- ref: _,
927
- id: "lkt-table-body-" + y(ce),
928
- class: K(["lkt-table-items-container", e.itemsContainerClass])
1857
+ ref: c,
1858
+ id: "lkt-table-body-" + B(ue),
1859
+ class: re(["lkt-table-items-container", t.itemsContainerClass])
929
1860
  }, [
930
- (u(!0), p(P, null, J(a.value, (B, g) => (u(), p(P, null, [
931
- Pe(B) ? (u(), p("div", {
1861
+ (d(!0), h(x, null, ie(r.value, (_, I) => (d(), h(x, null, [
1862
+ Mt(_) ? (d(), h("div", {
932
1863
  class: "lkt-table-item",
933
- "data-i": g,
934
- key: Le(B, g)
1864
+ "data-i": I,
1865
+ key: _t(_, I)
935
1866
  }, [
936
- T(e.$slots, "item", oe({
937
- [e.slotItemVar || ""]: B,
938
- index: g,
939
- editing: m.value,
940
- canCreate: ye.value,
941
- canRead: je.value,
942
- canUpdate: ie.value,
943
- canDrop: se.value,
944
- isLoading: I.value,
945
- doDrop: () => Me(g)
1867
+ z(t.$slots, "item", Ee({
1868
+ [t.slotItemVar || ""]: _,
1869
+ index: I,
1870
+ editing: k.value,
1871
+ canCreate: ke.value,
1872
+ canRead: Xe.value,
1873
+ canUpdate: de.value,
1874
+ canDrop: be.value,
1875
+ isLoading: V.value,
1876
+ doDrop: () => Qe(I)
946
1877
  }))
947
- ], 8, jl)) : f("", !0)
1878
+ ], 8, Pl)) : A("", !0)
948
1879
  ], 64))), 256))
949
- ], 10, _l)) : jt.value ? (u(), S(Z(e.type), {
1880
+ ], 10, Ol)) : ga.value ? (d(), $(Ie(t.type), {
950
1881
  key: 2,
951
- class: K(["lkt-table-items-container", e.itemsContainerClass])
1882
+ class: re(["lkt-table-items-container", t.itemsContainerClass])
952
1883
  }, {
953
- default: L(() => [
954
- (u(!0), p(P, null, J(a.value, (B, g) => (u(), p(P, null, [
955
- Pe(B) ? (u(), p("li", {
1884
+ default: F(() => [
1885
+ (d(!0), h(x, null, ie(r.value, (_, I) => (d(), h(x, null, [
1886
+ Mt(_) ? (d(), h("li", {
956
1887
  key: 0,
957
1888
  class: "lkt-table-item",
958
- "data-i": g
1889
+ "data-i": I
959
1890
  }, [
960
- T(e.$slots, "item", oe({
961
- [e.slotItemVar || ""]: B,
962
- index: g,
963
- editing: m.value,
964
- canCreate: ye.value,
965
- canRead: je.value,
966
- canUpdate: ie.value,
967
- canDrop: se.value,
968
- isLoading: I.value,
969
- doDrop: () => Me(g)
1891
+ z(t.$slots, "item", Ee({
1892
+ [t.slotItemVar || ""]: _,
1893
+ index: I,
1894
+ editing: k.value,
1895
+ canCreate: ke.value,
1896
+ canRead: Xe.value,
1897
+ canUpdate: de.value,
1898
+ canDrop: be.value,
1899
+ isLoading: V.value,
1900
+ doDrop: () => Qe(I)
970
1901
  }))
971
- ], 8, Hl)) : f("", !0)
1902
+ ], 8, Fl)) : A("", !0)
972
1903
  ], 64))), 256))
973
1904
  ]),
974
1905
  _: 3
975
- }, 8, ["class"])) : f("", !0)
1906
+ }, 8, ["class"])) : t.type === B(et).Carousel ? (d(), h("div", {
1907
+ key: 3,
1908
+ ref_key: "tableBody",
1909
+ ref: c,
1910
+ id: "lkt-table-body-" + B(ue),
1911
+ class: re(["lkt-table-items-container", t.itemsContainerClass])
1912
+ }, [
1913
+ Be(B(Ga), fe({
1914
+ modelValue: Q.value,
1915
+ "onUpdate:modelValue": p[1] || (p[1] = (_) => Q.value = _)
1916
+ }, t.carousel), {
1917
+ addons: F(() => [
1918
+ Be(B(Ka)),
1919
+ Be(B(Wa))
1920
+ ]),
1921
+ default: F(() => [
1922
+ (d(!0), h(x, null, ie(xe.value, (_, I) => (d(), $(B(Qt), {
1923
+ key: _,
1924
+ index: I
1925
+ }, {
1926
+ default: F(() => [
1927
+ J("div", jl, [
1928
+ z(t.$slots, _)
1929
+ ])
1930
+ ]),
1931
+ _: 2
1932
+ }, 1032, ["index"]))), 128)),
1933
+ (d(!0), h(x, null, ie(r.value, (_, I) => (d(), $(B(Qt), {
1934
+ key: t.slide,
1935
+ index: I
1936
+ }, {
1937
+ default: F(() => [
1938
+ J("div", zl, [
1939
+ z(t.$slots, "item", Ee({
1940
+ [t.slotItemVar || ""]: _,
1941
+ index: I,
1942
+ editing: k.value,
1943
+ canCreate: ke.value,
1944
+ canRead: Xe.value,
1945
+ canUpdate: de.value,
1946
+ canDrop: be.value,
1947
+ isLoading: V.value,
1948
+ doDrop: () => Qe(I)
1949
+ }))
1950
+ ])
1951
+ ]),
1952
+ _: 2
1953
+ }, 1032, ["index"]))), 128))
1954
+ ]),
1955
+ _: 3
1956
+ }, 16, ["modelValue"])
1957
+ ], 10, Ul)) : A("", !0)
976
1958
  ], 512), [
977
- [ke, Mt.value]
1959
+ [rt, nt.value]
978
1960
  ]),
979
- !I.value && a.value.length === 0 ? (u(), p("div", ql, [
980
- y(n).empty ? T(e.$slots, "empty", { key: 0 }) : Ht.value ? (u(), S(Z(qt.value), {
1961
+ !V.value && r.value.length === 0 ? (d(), h("div", Hl, [
1962
+ B(l).empty ? z(t.$slots, "empty", { key: 0 }) : ba.value ? (d(), $(Ie(ya.value), {
981
1963
  key: 1,
982
- message: e.noResultsText
983
- }, null, 8, ["message"])) : e.noResultsText ? (u(), p(P, { key: 2 }, [
984
- ee(ue(e.noResultsText), 1)
985
- ], 64)) : f("", !0)
986
- ])) : f("", !0),
987
- I.value ? (u(), S(A, { key: 4 })) : f("", !0),
988
- Ce.value || y(n).bottomButtons ? (u(), p("div", Kl, [
989
- Ce.value && a.value.length >= e.requiredItemsForBottomCreate ? (u(), S(ut, {
1964
+ message: t.noResultsText
1965
+ }, null, 8, ["message"])) : t.noResultsText ? (d(), h(x, { key: 2 }, [
1966
+ Ae(Pe(t.noResultsText), 1)
1967
+ ], 64)) : A("", !0)
1968
+ ])) : A("", !0),
1969
+ V.value ? (d(), $(te, { key: 4 })) : A("", !0),
1970
+ gt.value || B(l).bottomButtons ? (d(), h("div", xl, [
1971
+ gt.value && r.value.length >= t.requiredItemsForBottomCreate ? (d(), $(Zt, {
990
1972
  key: 0,
991
- config: Ae.value,
992
- disabled: !at.value,
993
- onClick: Ye,
994
- onAppend: Ze
995
- }, null, 8, ["config", "disabled"])) : f("", !0),
996
- T(e.$slots, "bottom-buttons")
997
- ])) : f("", !0),
998
- e.paginator && Object.keys(e.paginator).length > 0 ? (u(), S(q, Q({
1973
+ config: Te.value,
1974
+ disabled: !xt.value,
1975
+ onClick: w,
1976
+ onAppend: D
1977
+ }, null, 8, ["config", "disabled"])) : A("", !0),
1978
+ z(t.$slots, "bottom-buttons")
1979
+ ])) : A("", !0),
1980
+ t.paginator && Object.keys(t.paginator).length > 0 ? (d(), $(ce, fe({
999
1981
  key: 6,
1000
1982
  ref_key: "paginatorRef",
1001
- ref: W
1002
- }, e.paginator, {
1003
- modelValue: H.value,
1004
- "onUpdate:modelValue": d[1] || (d[1] = (B) => H.value = B),
1005
- onLoading: kt,
1006
- onPerms: bt,
1007
- onResponse: gt
1008
- }), null, 16, ["modelValue"])) : f("", !0)
1983
+ ref: q
1984
+ }, t.paginator, {
1985
+ modelValue: E.value,
1986
+ "onUpdate:modelValue": p[2] || (p[2] = (_) => E.value = _),
1987
+ onLoading: Bt,
1988
+ onPerms: Dt,
1989
+ onResponse: Ne
1990
+ }), null, 16, ["modelValue"])) : A("", !0)
1009
1991
  ]),
1010
1992
  _: 3
1011
1993
  }, 8, ["class"]))
1012
- ], 8, wl);
1994
+ ], 8, Dl);
1013
1995
  };
1014
1996
  }
1015
- }), xl = {
1016
- install: (o) => {
1017
- o.component("lkt-table") === void 0 && o.component("lkt-table", zl);
1997
+ }), Zl = {
1998
+ install: (e) => {
1999
+ e.component("lkt-table") === void 0 && e.component("lkt-table", ql);
1018
2000
  }
1019
- }, ea = (o) => ($.navButtonSlot = o, !0), ta = (o) => ($.dropButtonSlot = o, !0), la = (o) => ($.createButtonSlot = o, !0), aa = (o) => {
1020
- $.defaultEmptySlot = o;
1021
- }, oa = (o) => {
1022
- $.defaultSaveIcon = o;
2001
+ }, en = (e) => (Y.navButtonSlot = e, !0), tn = (e) => (Y.dropButtonSlot = e, !0), an = (e) => (Y.createButtonSlot = e, !0), ln = (e) => {
2002
+ Y.defaultEmptySlot = e;
2003
+ }, nn = (e) => {
2004
+ Y.defaultSaveIcon = e;
1023
2005
  };
1024
2006
  export {
1025
- ra as Column,
1026
- ia as createColumn,
1027
- xl as default,
1028
- la as setTableCreateButtonSlot,
1029
- ta as setTableDropButtonSlot,
1030
- aa as setTableEmptySlot,
1031
- ea as setTableNavButtonSlot,
1032
- oa as setTableSaveIcon
2007
+ un as Column,
2008
+ sn as createColumn,
2009
+ Zl as default,
2010
+ an as setTableCreateButtonSlot,
2011
+ tn as setTableDropButtonSlot,
2012
+ ln as setTableEmptySlot,
2013
+ en as setTableNavButtonSlot,
2014
+ nn as setTableSaveIcon
1033
2015
  };