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