lkt-table 2.0.13 → 2.0.15
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 +899 -869
- 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 +34 -8
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 y, unref as D, openBlock as v, normalizeProps as Re, mergeProps as ve, withCtx as z, createTextVNode as nt, toDisplayString as je, Fragment as x, withModifiers as aa, createCommentVNode as A, resolveDynamicComponent as Ee, useSlots as la, normalizeClass as ne, createElementVNode as Q, createVNode as Te, renderSlot as q, renderList as re, withDirectives as at, vShow as lt, mergeDefaults as Ea, nextTick as yt, 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 ye, 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,
|
|
109
|
-
|
|
108
|
+
}, r = e[(b % e.length + e.length) % e.length].vnode, T = Ta(r, p);
|
|
109
|
+
T.el = null, n.push(T);
|
|
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), T = 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({}, T.value)), k = C((l = e.modelValue) !== null && l !== void 0 ? l : 0), E = C(k.value);
|
|
349
|
+
U(k, (s) => E.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, Z = 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
|
|
361
|
-
|
|
360
|
+
const h = (T.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) => h >= R ? (Object.assign(B, e.breakpoints[R]), B.i18n && Object.assign(B.i18n, T.value.i18n, e.breakpoints[R].i18n), !0) : !1), Object.assign(c, T.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: h }) {
|
|
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 * h
|
|
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: h }) {
|
|
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
|
-
height: B.height *
|
|
385
|
+
height: B.height * h
|
|
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((h) => h[_.value]));
|
|
394
394
|
else {
|
|
395
|
-
const
|
|
396
|
-
r.value = (
|
|
395
|
+
const h = Number(c.itemsToShow), S = (h - 1) * c.gap;
|
|
396
|
+
r.value = (Le.value[_.value] - S) / h;
|
|
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
|
|
416
|
-
const
|
|
417
|
-
if (!(!(
|
|
418
|
-
const
|
|
419
|
-
|
|
420
|
-
|
|
414
|
+
let de;
|
|
415
|
+
const He = (s) => {
|
|
416
|
+
const h = s.target;
|
|
417
|
+
if (!(!(h != null && h.contains(g.value)) || Array.isArray(_e.value) && _e.value.includes(s.animationName)) && (Me.add(h), !de)) {
|
|
418
|
+
const S = () => {
|
|
419
|
+
de = requestAnimationFrame(() => {
|
|
420
|
+
fe(), S();
|
|
421
421
|
});
|
|
422
422
|
};
|
|
423
|
-
|
|
423
|
+
S();
|
|
424
424
|
}
|
|
425
|
-
},
|
|
426
|
-
const
|
|
427
|
-
|
|
428
|
-
},
|
|
429
|
-
typeof document < "u" &&
|
|
430
|
-
|
|
431
|
-
}),
|
|
432
|
-
|
|
425
|
+
}, ct = (s) => {
|
|
426
|
+
const h = s.target;
|
|
427
|
+
h && Me.delete(h), 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 && (Z = new ResizeObserver(dt), Z.observe(g.value)), i("init");
|
|
433
433
|
}), Ca(() => {
|
|
434
|
-
|
|
434
|
+
qe.value = !1, a.cleanup(), Ne && clearTimeout(Ne), de && cancelAnimationFrame(de), ue && clearInterval(ue), Z && (Z.disconnect(), Z = 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
|
+
}, it = () => {
|
|
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
|
|
459
|
-
const
|
|
460
|
-
if (["INPUT", "TEXTAREA", "SELECT"].includes(
|
|
458
|
+
function pt(s) {
|
|
459
|
+
const h = s.target.tagName;
|
|
460
|
+
if (["INPUT", "TEXTAREA", "SELECT"].includes(h) || 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
|
|
469
|
-
|
|
470
|
-
const B =
|
|
471
|
-
isVertical:
|
|
472
|
-
isReversed:
|
|
473
|
-
dragged:
|
|
474
|
-
effectiveSlideSize:
|
|
466
|
+
const $e = Ot((s) => {
|
|
467
|
+
Ye.value = !0;
|
|
468
|
+
const h = "touches" in s ? s.touches[0].clientX : s.clientX, S = "touches" in s ? s.touches[0].clientY : s.clientY;
|
|
469
|
+
oe.x = h - 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
|
-
|
|
477
|
-
val:
|
|
478
|
-
max:
|
|
479
|
-
min:
|
|
480
|
-
}), i("drag", { deltaX:
|
|
476
|
+
E.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(), E.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(E.value), oe.x = 0, oe.y = 0, Ye.value = !1;
|
|
490
|
+
const s = pe ? "touchmove" : "mousemove", h = pe ? "touchend" : "mouseup";
|
|
491
|
+
document.removeEventListener(s, $e), document.removeEventListener(h, 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
|
|
506
|
-
if (!
|
|
505
|
+
function we(s, h = !1) {
|
|
506
|
+
if (!h && 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(() => [T.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),
|
|
550
|
+
if (J.value)
|
|
551
|
+
return { before: f.length, after: f.length };
|
|
552
|
+
const s = Number(c.itemsToShow), h = Math.ceil(s + (c.itemsToScroll - 1)), S = h - E.value, B = h - (b.value - (E.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, h) => s + h[_.value] + c.gap, 0) * -1 : Ue.value.before * d.value * -1 : 0), rt = u(() => {
|
|
558
558
|
var s;
|
|
559
|
-
if (
|
|
560
|
-
const
|
|
559
|
+
if (J.value) {
|
|
560
|
+
const h = (k.value % f.length + f.length) % f.length;
|
|
561
561
|
return Ut({
|
|
562
|
-
slideSize: (s =
|
|
563
|
-
viewportSize:
|
|
562
|
+
slideSize: (s = H.value[h]) === 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
|
|
576
|
-
s =
|
|
573
|
+
if (J.value) {
|
|
574
|
+
if (k.value < 0 ? s = H.value.slice(k.value).reduce((h, S) => h + S[_.value] + c.gap, 0) * -1 : s = H.value.slice(0, k.value).reduce((h, S) => h + S[_.value] + c.gap, 0), s -= rt.value, !c.wrapAround) {
|
|
575
|
+
const h = H.value.reduce((S, B) => S + B[_.value] + c.gap, 0) - Le.value[_.value] - c.gap;
|
|
576
|
+
s = De({
|
|
577
577
|
val: s,
|
|
578
|
-
max:
|
|
578
|
+
max: h,
|
|
579
579
|
min: 0
|
|
580
580
|
});
|
|
581
581
|
}
|
|
582
582
|
} else {
|
|
583
|
-
let
|
|
584
|
-
c.wrapAround || (
|
|
585
|
-
val:
|
|
583
|
+
let h = k.value - rt.value;
|
|
584
|
+
c.wrapAround || (h = De({
|
|
585
|
+
val: h,
|
|
586
586
|
max: b.value - +c.itemsToShow,
|
|
587
587
|
min: 0
|
|
588
|
-
})), s =
|
|
588
|
+
})), s = h * d.value;
|
|
589
589
|
}
|
|
590
|
-
return s * (
|
|
591
|
-
}),
|
|
592
|
-
var s,
|
|
593
|
-
if (!
|
|
594
|
-
const
|
|
590
|
+
return s * (F.value ? 1 : -1);
|
|
591
|
+
}), Et = u(() => {
|
|
592
|
+
var s, h;
|
|
593
|
+
if (!J.value) {
|
|
594
|
+
const R = k.value - rt.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 ee = (
|
|
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 ee = (X % f.length + f.length) % f.length;
|
|
617
|
+
R += ((s = H.value[ee]) === 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, ee) => le + ee[_.value] + c.gap, 0) - Math.abs(Je.value + xe.value) : X = H.value.slice(0, R).reduce((le, ee) => le + ee[_.value] + c.gap, 0) - Math.abs(Je.value); X < Le.value[_.value]; ) {
|
|
625
|
+
const le = (R % f.length + f.length) % f.length;
|
|
626
|
+
X += ((h = H.value[le]) === null || h === void 0 ? void 0 : h[_.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", h = P.value ? oe.y : oe.x;
|
|
638
|
+
let S = Je.value + h;
|
|
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, ee) => le + ee[_.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
|
-
})),
|
|
656
|
-
activeSlide:
|
|
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
|
+
})), ut = { slideTo: we, next: Pe, prev: We }, bt = _t({
|
|
656
|
+
activeSlide: E,
|
|
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: ut,
|
|
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: ut,
|
|
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
|
|
695
|
-
slides:
|
|
694
|
+
const h = o.default || o.slides, S = (h == null ? void 0 : h(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
|
-
}), ee = [...
|
|
701
|
+
toShow: R
|
|
702
|
+
}), ee = [...X, ...S, ...le];
|
|
703
703
|
if (!c.enabled || !ee.length)
|
|
704
704
|
return Y("section", {
|
|
705
705
|
ref: g,
|
|
706
706
|
class: ["carousel", "is-disabled"]
|
|
707
707
|
}, ee);
|
|
708
|
-
const
|
|
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
|
-
}, ee),
|
|
710
|
+
style: { transform: At.value },
|
|
711
|
+
onMousedownCapture: c.mouseDrag ? pt : null,
|
|
712
|
+
onTouchstartPassiveCapture: c.touchDrag ? pt : null
|
|
713
|
+
}, ee), 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: it
|
|
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",
|
|
@@ -795,19 +795,19 @@ const Qt = (e) => e && Wa(e), Zt = ae({
|
|
|
795
795
|
ttb: "arrowDown"
|
|
796
796
|
})[n.normalizedDir], g = u(() => !n.config.wrapAround && n.currentSlide <= n.minSlide), p = u(() => !n.config.wrapAround && n.currentSlide >= n.maxSlide);
|
|
797
797
|
return () => {
|
|
798
|
-
const { i18n: r } = n.config,
|
|
798
|
+
const { i18n: r } = n.config, T = Y("button", Object.assign(Object.assign({ type: "button", disabled: g.value, "aria-label": r.ariaPreviousSlide, title: r.ariaPreviousSlide, onClick: n.nav.prev }, i), { class: [
|
|
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(
|
|
807
|
-
return [
|
|
806
|
+
] }), (l == null ? void 0 : l()) || Y(Qt, { name: b() }));
|
|
807
|
+
return [T, 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,33 +836,33 @@ const Qt = (e) => e && Wa(e), Zt = ae({
|
|
|
836
836
|
return () => {
|
|
837
837
|
var g, p;
|
|
838
838
|
const r = [];
|
|
839
|
-
for (let
|
|
840
|
-
const c =
|
|
841
|
-
slideNumber:
|
|
842
|
-
}),
|
|
839
|
+
for (let T = l.value ? 0 : o.minSlide; T <= (l.value ? f.value - 1 : o.maxSlide); T++) {
|
|
840
|
+
const c = va(o.config.i18n[l.value ? "ariaNavigateToPage" : "ariaNavigateToSlide"], {
|
|
841
|
+
slideNumber: T + 1
|
|
842
|
+
}), k = b(T), E = 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":
|
|
850
|
-
"aria-controls": (p = (g = o.slides[
|
|
849
|
+
"aria-pressed": k,
|
|
850
|
+
"aria-controls": (p = (g = o.slides[T]) === 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,
|
|
853
|
-
onClick: () => o.nav.slideTo(l.value ? Math.floor(
|
|
854
|
-
}), V = Y("li", { class: "carousel__pagination-item", key:
|
|
853
|
+
onClick: () => o.nav.slideTo(l.value ? Math.floor(T * +o.config.itemsToShow + n.value) : T)
|
|
854
|
+
}), V = Y("li", { class: "carousel__pagination-item", key: T }, E);
|
|
855
855
|
r.push(V);
|
|
856
856
|
}
|
|
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,43 +878,43 @@ 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),
|
|
885
|
-
a.value =
|
|
886
|
-
}, b =
|
|
887
|
-
const
|
|
888
|
-
return
|
|
884
|
+
const a = C(e.index), f = (E) => {
|
|
885
|
+
a.value = E;
|
|
886
|
+
}, b = Ba(), g = () => {
|
|
887
|
+
const E = b.vnode.el;
|
|
888
|
+
return E ? E.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),
|
|
895
|
+
const p = u(() => a.value === l.activeSlide), r = u(() => a.value === l.activeSlide - 1), T = u(() => a.value === l.activeSlide + 1), c = u(() => a.value >= l.visibleRange.min && a.value <= l.visibleRange.max), k = u(() => {
|
|
896
896
|
if (l.config.itemsToShow === "auto")
|
|
897
897
|
return;
|
|
898
|
-
const
|
|
898
|
+
const E = l.config.itemsToShow, V = l.config.gap > 0 && E > 1 ? `calc(${100 / E}% - ${l.config.gap * (E - 1) / E}px)` : `${100 / E}%`;
|
|
899
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
|
-
var
|
|
908
|
+
var E, 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,
|
|
914
914
|
"carousel__slide--visible": c.value,
|
|
915
915
|
"carousel__slide--active": p.value,
|
|
916
916
|
"carousel__slide--prev": r.value,
|
|
917
|
-
"carousel__slide--next":
|
|
917
|
+
"carousel__slide--next": T.value,
|
|
918
918
|
"carousel__slide--sliding": l.isSliding
|
|
919
919
|
},
|
|
920
920
|
onFocusin: () => {
|
|
@@ -927,16 +927,16 @@ const Qt = (e) => e && Wa(e), Zt = ae({
|
|
|
927
927
|
isActive: p.value,
|
|
928
928
|
isClone: e.isClone,
|
|
929
929
|
isPrev: r.value,
|
|
930
|
-
isNext:
|
|
930
|
+
isNext: T.value,
|
|
931
931
|
isSliding: l.isSliding,
|
|
932
932
|
isVisible: c.value
|
|
933
|
-
})) : (
|
|
933
|
+
})) : (E = i.default) === null || E === void 0 ? void 0 : E.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
|
+
}, ot = (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 ot(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
|
-
var p, r,
|
|
1003
|
+
var p, r, T, 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 ((
|
|
1007
|
-
let
|
|
1008
|
-
l.value[
|
|
1005
|
+
for (let k in n.column.field.modalData)
|
|
1006
|
+
if (typeof ((T = n.column.field) == null ? void 0 : T.modalData[k]) == "string" && n.column.field.modalData[k].startsWith("prop:")) {
|
|
1007
|
+
let E = n.column.field.modalData[k].substring(5);
|
|
1008
|
+
l.value[E];
|
|
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
|
|
1015
|
-
const
|
|
1016
|
-
return p.column.type === D(
|
|
1017
|
-
default:
|
|
1018
|
-
|
|
1014
|
+
var E, V, Se, $;
|
|
1015
|
+
const T = ke("lkt-anchor"), c = ke("lkt-button"), k = ke("lkt-field");
|
|
1016
|
+
return p.column.type === D(kt).Anchor ? (v(), O(T, Re(ve({ key: 0 }, p.column.anchor)), {
|
|
1017
|
+
default: z(() => [
|
|
1018
|
+
nt(je(D(ot)(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
|
+
nt(je(D(ot)(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
|
-
label: ((
|
|
1030
|
+
label: ((E = p.column.field) == null ? void 0 : E.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(), y(x, { key: 4 }, [
|
|
1044
|
+
nt(je(D(ot)(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 })) : A("", !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 })) : A("", !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
|
},
|
|
@@ -1146,148 +1152,152 @@ const ol = /* @__PURE__ */ ae({
|
|
|
1146
1152
|
],
|
|
1147
1153
|
setup(e, { emit: o }) {
|
|
1148
1154
|
var Z;
|
|
1149
|
-
const i =
|
|
1150
|
-
let
|
|
1151
|
-
|
|
1152
|
-
const b = [
|
|
1153
|
-
for (let
|
|
1154
|
-
const r = (
|
|
1155
|
-
n("show",
|
|
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((Z = l.editButton.anchor) == null ? void 0 : Z.to);
|
|
1159
|
+
for (let d in a.value) p.value = ra(p.value, ":" + d, a.value[d]);
|
|
1160
|
+
const r = (d) => n("click", d), T = (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 !== ""), E = 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(), y("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(), y("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
|
+
Q("i", { class: "lkt-icn-drag-indicator" }, null, -1)
|
|
1190
|
+
]), 10, rl)) : A("", !0),
|
|
1191
|
+
d.addNavigation && d.editModeEnabled ? (v(), y("td", ul, [
|
|
1192
|
+
Q("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(E.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(), y("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(E.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(), y("i", cl))
|
|
1219
1216
|
]),
|
|
1220
1217
|
_: 1
|
|
1221
1218
|
}, 8, ["disabled"])
|
|
1222
1219
|
])
|
|
1223
|
-
])) :
|
|
1224
|
-
|
|
1225
|
-
key:
|
|
1226
|
-
onClick:
|
|
1220
|
+
])) : A("", !0),
|
|
1221
|
+
d.displayHiddenColumnsIndicator ? (v(), y("td", {
|
|
1222
|
+
key: 2,
|
|
1223
|
+
onClick: w[0] || (w[0] = (P) => T(P, d.i)),
|
|
1227
1224
|
"data-role": "show-more",
|
|
1228
|
-
class: ne(
|
|
1229
|
-
}, null, 2)) :
|
|
1230
|
-
D(b) && D(i)[`item-${
|
|
1231
|
-
key: "td" +
|
|
1232
|
-
colspan:
|
|
1225
|
+
class: ne(d.hiddenIsVisible ? "state-open" : "")
|
|
1226
|
+
}, null, 2)) : A("", !0),
|
|
1227
|
+
D(b) && D(i)[`item-${d.i}`] ? (v(), y("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(), y("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), y(x, { key: 5 }, re(d.visibleColumns, (P) => (v(), y(x, null, [
|
|
1258
|
+
D(tl)(P, d.emptyColumns, a.value) ? (v(), y("td", {
|
|
1259
|
+
key: "td" + d.i,
|
|
1260
|
+
"data-column": P.key,
|
|
1261
|
+
colspan: D(zt)(P, a.value),
|
|
1262
|
+
title: D(ot)(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:
|
|
1270
|
-
}, null, 8, ["modelValue", "column", "columns", "edit-mode-enabled", "has-inline-edit-perm", "i"])) :
|
|
1271
|
-
], 10, pl)) :
|
|
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
|
|
1281
|
+
}, null, 8, ["modelValue", "column", "columns", "edit-mode-enabled", "has-inline-edit-perm", "i"])) : A("", !0)
|
|
1282
|
+
], 10, pl)) : A("", !0)
|
|
1272
1283
|
], 64))), 256)),
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
config:
|
|
1284
|
+
d.canDrop && d.editModeEnabled ? (v(), y("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
|
-
])) :
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
config:
|
|
1283
|
-
item: a.value
|
|
1284
|
-
onClick: x
|
|
1290
|
+
])) : A("", !0),
|
|
1291
|
+
d.canEdit && d.editModeEnabled ? (v(), y("td", gl, [
|
|
1292
|
+
Te(ol, {
|
|
1293
|
+
config: d.editButton,
|
|
1294
|
+
item: a.value
|
|
1285
1295
|
}, null, 8, ["config", "item"])
|
|
1286
|
-
])) :
|
|
1287
|
-
], 10,
|
|
1296
|
+
])) : A("", !0)
|
|
1297
|
+
], 10, il);
|
|
1288
1298
|
};
|
|
1289
1299
|
}
|
|
1290
|
-
}),
|
|
1300
|
+
}), hl = { "data-role": "hidden-row" }, yl = ["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) => at((v(), y("tr", hl, [
|
|
1322
|
+
Q("td", { colspan: f.hiddenColumnsColSpan }, [
|
|
1323
|
+
Q("table", null, [
|
|
1324
|
+
Q("tr", null, [
|
|
1325
|
+
(v(!0), y(x, null, re(f.hiddenColumns, (g) => (v(), y("th", {
|
|
1316
1326
|
"data-column": g.key
|
|
1317
1327
|
}, [
|
|
1318
|
-
|
|
1328
|
+
Q("div", null, je(g.label), 1)
|
|
1319
1329
|
], 8, kl))), 256))
|
|
1320
1330
|
]),
|
|
1321
|
-
|
|
1322
|
-
(
|
|
1331
|
+
Q("tr", { "data-i": f.i }, [
|
|
1332
|
+
(v(!0), y(x, null, re(f.hiddenColumns, (g, p) => (v(), y("td", {
|
|
1323
1333
|
"data-column": g.key,
|
|
1324
|
-
title: D(
|
|
1334
|
+
title: D(ot)(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
|
-
], 8,
|
|
1356
|
+
], 8, yl)
|
|
1347
1357
|
], 512)), [
|
|
1348
|
-
[
|
|
1358
|
+
[lt, 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)) {
|
|
@@ -1376,14 +1386,14 @@ const ol = /* @__PURE__ */ ae({
|
|
|
1376
1386
|
return;
|
|
1377
1387
|
}
|
|
1378
1388
|
};
|
|
1379
|
-
return (r,
|
|
1380
|
-
const c =
|
|
1381
|
-
return
|
|
1389
|
+
return (r, T) => {
|
|
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 })) : A("", !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,52 +1412,49 @@ 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,
|
|
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 ? ye.defaultTableSortAscIcon : n.sortDirection === Fe.Desc ? ye.defaultTableSortDescIcon : "" : ""), p = () => i("click", n.column);
|
|
1416
|
+
return (r, T) => (v(), y("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
|
+
Q("div", null, [
|
|
1426
|
+
nt(je(b.value) + " ", 1),
|
|
1427
|
+
g.value ? (v(), y("i", {
|
|
1418
1428
|
key: 0,
|
|
1419
1429
|
class: ne(g.value)
|
|
1420
|
-
}, null, 2)) :
|
|
1430
|
+
}, null, 2)) : A("", !0)
|
|
1421
1431
|
])
|
|
1422
1432
|
], 10, Bl));
|
|
1423
1433
|
}
|
|
1424
|
-
}), Il = ["id"], Tl = {
|
|
1434
|
+
}), Il = ["id"], Tl = { class: "lkt-table-page-buttons" }, El = { class: "switch-edition-mode" }, Al = {
|
|
1425
1435
|
key: 0,
|
|
1426
1436
|
class: "lkt-table-page-buttons"
|
|
1427
|
-
}, El = { class: "switch-edition-mode" }, Al = {
|
|
1428
|
-
key: 1,
|
|
1429
|
-
class: "lkt-table-page-buttons"
|
|
1430
1437
|
}, Vl = {
|
|
1431
|
-
key:
|
|
1438
|
+
key: 1,
|
|
1432
1439
|
class: "lkt-table-page-filters"
|
|
1433
|
-
},
|
|
1440
|
+
}, Rl = { class: "lkt-table" }, Nl = { key: 0 }, Ml = { key: 0 }, Ll = {
|
|
1434
1441
|
key: 0,
|
|
1435
1442
|
"data-role": "drag-indicator"
|
|
1436
|
-
},
|
|
1443
|
+
}, _l = { key: 1 }, $l = { key: 2 }, Ol = {
|
|
1437
1444
|
key: 3,
|
|
1438
1445
|
class: "lkt-table-col-drop"
|
|
1439
1446
|
}, Pl = {
|
|
1440
1447
|
key: 4,
|
|
1441
1448
|
class: "lkt-table-col-edit"
|
|
1442
|
-
},
|
|
1443
|
-
key:
|
|
1449
|
+
}, Ul = ["id"], Fl = ["id"], jl = ["data-i"], zl = ["data-i"], Hl = ["id"], ql = { class: "lkt-carousel-slide" }, Gl = { class: "lkt-carousel-slide" }, Xl = {
|
|
1450
|
+
key: 2,
|
|
1444
1451
|
class: "lkt-table-empty"
|
|
1445
|
-
},
|
|
1446
|
-
key:
|
|
1452
|
+
}, Yl = {
|
|
1453
|
+
key: 4,
|
|
1447
1454
|
class: "lkt-table-page-buttons lkt-table-page-buttons-bottom"
|
|
1448
|
-
},
|
|
1455
|
+
}, Kl = /* @__PURE__ */ ae({
|
|
1449
1456
|
__name: "LktTable",
|
|
1450
|
-
props: /* @__PURE__ */
|
|
1457
|
+
props: /* @__PURE__ */ Ea({
|
|
1451
1458
|
modelValue: {},
|
|
1452
1459
|
type: {},
|
|
1453
1460
|
columns: {},
|
|
@@ -1487,7 +1494,7 @@ const ol = /* @__PURE__ */ ae({
|
|
|
1487
1494
|
wrapContentClass: {},
|
|
1488
1495
|
itemsContainerClass: {},
|
|
1489
1496
|
createEnabledValidator: { type: Function }
|
|
1490
|
-
},
|
|
1497
|
+
}, Va(Ra)),
|
|
1491
1498
|
emits: [
|
|
1492
1499
|
"update:modelValue",
|
|
1493
1500
|
"update:perms",
|
|
@@ -1504,61 +1511,63 @@ const ol = /* @__PURE__ */ ae({
|
|
|
1504
1511
|
],
|
|
1505
1512
|
setup(e, { expose: o, emit: i }) {
|
|
1506
1513
|
var Gt, Xt;
|
|
1507
|
-
const n = i, l =
|
|
1508
|
-
|
|
1509
|
-
const
|
|
1510
|
-
|
|
1511
|
-
|
|
1514
|
+
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), T = C(f), c = C(null), k = C(a.columns), E = 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), Z = 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, ye.defaultSaveButton)), Ce = C(Ae(a.createButton, ye.defaultCreateButton)), dt = C(Ae(a.editModeButton, ye.defaultEditModeButton)), Me = C(Ae(a.dropButton, ye.defaultDropButton));
|
|
1515
|
+
U(() => a.saveButton, (t) => _.value = Ae(a.saveButton, ye.defaultSaveButton)), U(() => a.createButton, (t) => Ce.value = Ae(a.createButton, ye.defaultCreateButton)), U(() => a.editModeButton, (t) => dt.value = Ae(a.editModeButton, ye.defaultEditModeButton)), U(() => a.dropButton, (t) => Me.value = Ae(a.dropButton, ye.defaultDropButton));
|
|
1516
|
+
const H = C(!1);
|
|
1517
|
+
U(V, (t) => n("update:loading", t)), U(E, (t) => n("page", t));
|
|
1518
|
+
const Bt = (t) => {
|
|
1519
|
+
$.value = t;
|
|
1520
|
+
}, Le = (t) => {
|
|
1512
1521
|
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
|
-
|
|
1522
|
+
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, yt(() => {
|
|
1523
|
+
F.value = Ve(), it.value, n("read-response", t);
|
|
1515
1524
|
});
|
|
1516
|
-
},
|
|
1517
|
-
|
|
1518
|
-
},
|
|
1525
|
+
}, Dt = () => yt(() => V.value = !0), fe = () => {
|
|
1526
|
+
G.value.doRefresh();
|
|
1527
|
+
}, se = Na(12), _e = u(() => {
|
|
1519
1528
|
if (!a.hideEmptyColumns) return [];
|
|
1520
1529
|
let t = [];
|
|
1521
|
-
return
|
|
1522
|
-
let
|
|
1530
|
+
return k.value.forEach((m) => {
|
|
1531
|
+
let L = m.key, W = !1;
|
|
1523
1532
|
r.value.forEach((te) => {
|
|
1524
1533
|
if (typeof te.checkEmpty == "function")
|
|
1525
1534
|
return te.checkEmpty(te);
|
|
1526
|
-
te[
|
|
1527
|
-
}), W || t.push(
|
|
1535
|
+
te[L] && (W = !0);
|
|
1536
|
+
}), W || t.push(L);
|
|
1528
1537
|
}), t;
|
|
1529
|
-
}),
|
|
1530
|
-
let t =
|
|
1538
|
+
}), de = u(() => k.value.filter((t) => !t.hidden)), He = u(() => k.value.filter((t) => t.hidden)), ct = u(() => {
|
|
1539
|
+
let t = de.value.length + 1;
|
|
1531
1540
|
return a.sortable && ++t, t;
|
|
1532
|
-
}),
|
|
1541
|
+
}), 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
1542
|
let t = [];
|
|
1534
|
-
for (let m in l)
|
|
1543
|
+
for (let m in l) Ge.value.indexOf(m) !== -1 && t.push(m);
|
|
1535
1544
|
return t;
|
|
1536
|
-
}),
|
|
1545
|
+
}), Xe = u(() => {
|
|
1537
1546
|
let t = [];
|
|
1538
1547
|
for (let m in l) m.indexOf("slide-") !== -1 && t.push(m);
|
|
1539
1548
|
return t;
|
|
1540
|
-
}),
|
|
1549
|
+
}), Ye = u(() => {
|
|
1541
1550
|
var t;
|
|
1542
|
-
return a.hiddenSave || V.value || !((t = _.value) != null && t.resource || _.value.type) ? !1 :
|
|
1543
|
-
}),
|
|
1551
|
+
return a.hiddenSave || V.value || !((t = _.value) != null && t.resource || _.value.type) ? !1 : w.value && H.value ? !0 : w.value;
|
|
1552
|
+
}), It = u(() => ht.value && r.value.length >= a.requiredItemsForTopCreate || xe.value ? !0 : Ye.value || w.value && me.value), it = u(() => {
|
|
1544
1553
|
var t, m;
|
|
1545
|
-
return
|
|
1554
|
+
return F.value, typeof ((t = _.value) == null ? void 0 : t.disabled) == "function" ? _.value.disabled({
|
|
1546
1555
|
value: r.value,
|
|
1547
|
-
dataState:
|
|
1548
|
-
}) : typeof ((m = _.value) == null ? void 0 : m.disabled) == "boolean" ? _.value.disabled : !
|
|
1549
|
-
}),
|
|
1556
|
+
dataState: d.value
|
|
1557
|
+
}) : typeof ((m = _.value) == null ? void 0 : m.disabled) == "boolean" ? _.value.disabled : !H.value;
|
|
1558
|
+
}), vt = u(() => r.value.length), Tt = u(() => {
|
|
1550
1559
|
var t;
|
|
1551
1560
|
return {
|
|
1552
1561
|
items: r.value,
|
|
1553
1562
|
...(t = _.value) == null ? void 0 : t.resourceData
|
|
1554
1563
|
};
|
|
1555
|
-
}),
|
|
1564
|
+
}), ft = u(() => a.titleTag === "" ? "h2" : a.titleTag), pt = u(() => a.wrapContentTag === "" ? "div" : a.wrapContentTag), $e = u(() => ia(a.title)), Ke = u(() => {
|
|
1556
1565
|
var t;
|
|
1557
1566
|
return (t = a.drag) == null ? void 0 : t.enabled;
|
|
1558
|
-
}),
|
|
1567
|
+
}), 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), rt = u(() => {
|
|
1559
1568
|
var t;
|
|
1560
1569
|
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
|
-
}),
|
|
1570
|
+
}), Je = (t) => {
|
|
1562
1571
|
let m = t.target;
|
|
1563
1572
|
if (typeof m.dataset.column > "u")
|
|
1564
1573
|
do
|
|
@@ -1566,34 +1575,34 @@ const ol = /* @__PURE__ */ ae({
|
|
|
1566
1575
|
while (typeof m.dataset.column > "u" && m.tagName !== "TABLE" && m.tagName !== "body");
|
|
1567
1576
|
if (m.tagName === "TD" && (m = m.parentNode, m = m.dataset.i, typeof m < "u"))
|
|
1568
1577
|
return r.value[m];
|
|
1569
|
-
},
|
|
1578
|
+
}, Et = (t) => r.value[t], At = (t) => {
|
|
1570
1579
|
var m;
|
|
1571
1580
|
return (m = c.value) == null ? void 0 : m.querySelector(`[data-i="${t}"]`);
|
|
1572
|
-
},
|
|
1573
|
-
t && t.sortable && (r.value = r.value.sort((m,
|
|
1574
|
-
},
|
|
1581
|
+
}, gt = (t) => T.value["tr_" + t] === !0, ut = (t) => {
|
|
1582
|
+
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]));
|
|
1583
|
+
}, bt = (t) => {
|
|
1575
1584
|
n("click", t);
|
|
1576
|
-
},
|
|
1577
|
-
let
|
|
1578
|
-
|
|
1585
|
+
}, Qe = (t, m) => {
|
|
1586
|
+
let L = "tr_" + m;
|
|
1587
|
+
T.value[L] = typeof T.value[L] > "u" ? !0 : !T.value[L];
|
|
1579
1588
|
}, s = (t) => {
|
|
1580
|
-
var
|
|
1581
|
-
let m = parseInt((
|
|
1582
|
-
return !(typeof ((
|
|
1583
|
-
},
|
|
1584
|
-
var m,
|
|
1585
|
-
return typeof ((m = a.drag) == null ? void 0 : m.isDraggable) == "function" ? (
|
|
1586
|
-
},
|
|
1587
|
-
if (
|
|
1589
|
+
var L, W, te, ie, N, I, M, he;
|
|
1590
|
+
let m = parseInt((ie = (te = (W = (L = t == null ? void 0 : t.originalEvent) == null ? void 0 : L.toElement) == null ? void 0 : W.closest("tr")) == null ? void 0 : te.dataset) == null ? void 0 : ie.i);
|
|
1591
|
+
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" && !((he = a.drag) != null && he.isValid));
|
|
1592
|
+
}, h = (t) => {
|
|
1593
|
+
var m, L;
|
|
1594
|
+
return typeof ((m = a.drag) == null ? void 0 : m.isDraggable) == "function" ? (L = a.drag) == null ? void 0 : L.isDraggable(t) : !0;
|
|
1595
|
+
}, S = () => {
|
|
1596
|
+
if (me.value) {
|
|
1588
1597
|
n("click-create");
|
|
1589
1598
|
return;
|
|
1590
1599
|
}
|
|
1591
|
-
if (
|
|
1600
|
+
if (mt.value)
|
|
1592
1601
|
n("click-create");
|
|
1593
1602
|
else {
|
|
1594
1603
|
if (typeof a.newValueGenerator == "function") {
|
|
1595
1604
|
let t = a.newValueGenerator();
|
|
1596
|
-
if (typeof t == "object" || a.type !==
|
|
1605
|
+
if (typeof t == "object" || a.type !== tt.Table) {
|
|
1597
1606
|
r.value.push(t);
|
|
1598
1607
|
return;
|
|
1599
1608
|
}
|
|
@@ -1602,386 +1611,407 @@ const ol = /* @__PURE__ */ ae({
|
|
|
1602
1611
|
}
|
|
1603
1612
|
}, B = (t) => {
|
|
1604
1613
|
r.value.push(t);
|
|
1605
|
-
},
|
|
1606
|
-
var
|
|
1607
|
-
if (!((
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1614
|
+
}, R = () => V.value = !0, X = () => V.value = !1, le = (t, m) => {
|
|
1615
|
+
var L, W, te;
|
|
1616
|
+
if (!((L = _.value) != null && L.type && [
|
|
1617
|
+
$t.Split,
|
|
1618
|
+
$t.SplitEver,
|
|
1619
|
+
$t.SplitLazy
|
|
1611
1620
|
].includes((W = _.value) == null ? void 0 : W.type))) {
|
|
1612
1621
|
if (n("before-save"), (te = _.value) != null && te.resource && (V.value = !1, !m.success)) {
|
|
1613
1622
|
n("error", m.httpStatus);
|
|
1614
1623
|
return;
|
|
1615
1624
|
}
|
|
1616
|
-
|
|
1625
|
+
d.value.turnStoredIntoOriginal(), H.value = !1, n("save", m);
|
|
1617
1626
|
}
|
|
1618
|
-
}, ee = (t, m,
|
|
1619
|
-
if (
|
|
1620
|
-
let W =
|
|
1627
|
+
}, ee = (t, m, L) => {
|
|
1628
|
+
if (L >= t.length) {
|
|
1629
|
+
let W = L - t.length + 1;
|
|
1621
1630
|
for (; W--; ) t.push(void 0);
|
|
1622
1631
|
}
|
|
1623
|
-
return t.splice(
|
|
1624
|
-
},
|
|
1625
|
-
ee(r.value, t, t - 1),
|
|
1626
|
-
},
|
|
1627
|
-
ee(r.value, t, t + 1),
|
|
1628
|
-
},
|
|
1629
|
-
r.value.splice(t, 1),
|
|
1630
|
-
},
|
|
1632
|
+
return t.splice(L, 0, t.splice(m, 1)[0]), t;
|
|
1633
|
+
}, Vt = (t) => {
|
|
1634
|
+
ee(r.value, t, t - 1), F.value = Ve();
|
|
1635
|
+
}, Rt = (t) => {
|
|
1636
|
+
ee(r.value, t, t + 1), F.value = Ve();
|
|
1637
|
+
}, Ze = (t) => {
|
|
1638
|
+
r.value.splice(t, 1), F.value = Ve();
|
|
1639
|
+
}, ga = () => {
|
|
1631
1640
|
var t;
|
|
1632
1641
|
Z.value && typeof ((t = Z.value) == null ? void 0 : t.destroy) == "function" && (Z.value.destroy(), Z.value = {});
|
|
1633
|
-
},
|
|
1634
|
-
|
|
1642
|
+
}, Ht = () => {
|
|
1643
|
+
P.value || (P.value = document.getElementById("lkt-table-body-" + se)), Z.value = new La(P.value, {
|
|
1635
1644
|
direction: "vertical",
|
|
1636
1645
|
handle: ".handle",
|
|
1637
1646
|
animation: 150,
|
|
1638
1647
|
onEnd: function(t) {
|
|
1639
|
-
let m = t.oldIndex,
|
|
1640
|
-
r.value.splice(
|
|
1648
|
+
let m = t.oldIndex, L = t.newIndex;
|
|
1649
|
+
r.value.splice(L, 0, r.value.splice(m, 1)[0]), F.value = Ve(), n("drag-end", r.value[L]);
|
|
1641
1650
|
},
|
|
1642
1651
|
onMove: function(t, m) {
|
|
1643
1652
|
return s(t);
|
|
1644
1653
|
}
|
|
1645
1654
|
});
|
|
1646
|
-
},
|
|
1647
|
-
let W = [
|
|
1648
|
-
return
|
|
1649
|
-
let
|
|
1650
|
-
|
|
1655
|
+
}, Nt = (t, m, L = !1) => {
|
|
1656
|
+
let W = [F.value, se, "row", m];
|
|
1657
|
+
return L && W.push("hidden"), qe.value.forEach((te) => {
|
|
1658
|
+
let ie = String(t[te.key]).toLowerCase();
|
|
1659
|
+
ie.length > 50 && (ie = ie.substring(0, 50)), ie = ra(ie, " ", "-"), W.push(ie);
|
|
1651
1660
|
}), W.join("-");
|
|
1652
|
-
},
|
|
1653
|
-
|
|
1661
|
+
}, qt = u(() => typeof a.createEnabledValidator == "function" ? a.createEnabledValidator({ items: r.value }) : !0), ht = 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;
|
|
1662
|
+
jt(() => {
|
|
1654
1663
|
var t;
|
|
1655
|
-
a.initialSorting &&
|
|
1656
|
-
|
|
1664
|
+
a.initialSorting && ut(ll(a.columns, g.value)), d.value.store({ items: r.value }).turnStoredIntoOriginal(), H.value = !1, (t = a.drag) != null && t.enabled && yt(() => {
|
|
1665
|
+
Ht();
|
|
1657
1666
|
});
|
|
1658
|
-
}),
|
|
1667
|
+
}), U(() => {
|
|
1659
1668
|
var t;
|
|
1660
1669
|
return (t = a.drag) == null ? void 0 : t.enabled;
|
|
1661
1670
|
}, (t) => {
|
|
1662
|
-
t ?
|
|
1663
|
-
}),
|
|
1671
|
+
t ? Ht() : ga();
|
|
1672
|
+
}), 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
1673
|
r.value = t;
|
|
1665
|
-
}, { deep: !0 }),
|
|
1666
|
-
|
|
1674
|
+
}, { deep: !0 }), U(r, (t) => {
|
|
1675
|
+
d.value.increment({ items: t }), H.value = d.value.changed(), n("update:modelValue", t);
|
|
1667
1676
|
}, { deep: !0 }), o({
|
|
1668
|
-
getItemByEvent:
|
|
1669
|
-
getItemByIndex:
|
|
1670
|
-
getRowByIndex:
|
|
1671
|
-
doRefresh:
|
|
1677
|
+
getItemByEvent: Je,
|
|
1678
|
+
getItemByIndex: Et,
|
|
1679
|
+
getRowByIndex: At,
|
|
1680
|
+
doRefresh: fe,
|
|
1672
1681
|
doRemoveIndex: (t) => {
|
|
1673
|
-
r.value.splice(t, 1),
|
|
1682
|
+
r.value.splice(t, 1), F.value = Ve();
|
|
1674
1683
|
},
|
|
1675
|
-
getHtml: () =>
|
|
1684
|
+
getHtml: () => ue.value,
|
|
1676
1685
|
turnStoredIntoOriginal: () => {
|
|
1677
|
-
|
|
1678
|
-
|
|
1686
|
+
d.value.turnStoredIntoOriginal(), yt(() => {
|
|
1687
|
+
F.value = Ve();
|
|
1679
1688
|
});
|
|
1680
1689
|
}
|
|
1681
1690
|
});
|
|
1682
|
-
const ha = u(() => typeof K.defaultEmptySlot < "u"),
|
|
1691
|
+
const ha = u(() => typeof K.defaultEmptySlot < "u"), ya = 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
1692
|
return (t, m) => {
|
|
1684
|
-
const
|
|
1685
|
-
return
|
|
1693
|
+
const L = ke("lkt-button"), W = ke("lkt-loader"), te = ke("lkt-paginator");
|
|
1694
|
+
return v(), y("section", {
|
|
1686
1695
|
ref_key: "element",
|
|
1687
|
-
ref:
|
|
1696
|
+
ref: ue,
|
|
1688
1697
|
class: "lkt-table-page",
|
|
1689
|
-
id: "lkt-table-page-" + D(
|
|
1698
|
+
id: "lkt-table-page-" + D(se)
|
|
1690
1699
|
}, [
|
|
1691
|
-
|
|
1700
|
+
$e.value || D(l).title ? (v(), y("header", {
|
|
1692
1701
|
key: 0,
|
|
1693
1702
|
class: ne(t.headerClass)
|
|
1694
1703
|
}, [
|
|
1695
|
-
|
|
1696
|
-
default:
|
|
1697
|
-
t.titleIcon ? (
|
|
1704
|
+
$e.value ? (v(), O(Ee(ft.value), { key: 0 }, {
|
|
1705
|
+
default: z(() => [
|
|
1706
|
+
t.titleIcon ? (v(), y("i", {
|
|
1698
1707
|
key: 0,
|
|
1699
1708
|
class: ne(t.titleIcon)
|
|
1700
|
-
}, null, 2)) :
|
|
1701
|
-
|
|
1709
|
+
}, null, 2)) : A("", !0),
|
|
1710
|
+
nt(" " + je($e.value), 1)
|
|
1702
1711
|
]),
|
|
1703
1712
|
_: 1
|
|
1704
|
-
})) :
|
|
1705
|
-
D(l).title ?
|
|
1706
|
-
], 2)) :
|
|
1707
|
-
(
|
|
1713
|
+
})) : A("", !0),
|
|
1714
|
+
D(l).title ? q(t.$slots, "title", { key: 1 }) : A("", !0)
|
|
1715
|
+
], 2)) : A("", !0),
|
|
1716
|
+
(v(), O(Ee(pt.value), {
|
|
1708
1717
|
class: ne(["lkt-table-page-content-wrapper", t.wrapContentClass])
|
|
1709
1718
|
}, {
|
|
1710
|
-
default:
|
|
1711
|
-
var
|
|
1719
|
+
default: z(() => {
|
|
1720
|
+
var ie;
|
|
1712
1721
|
return [
|
|
1713
|
-
|
|
1714
|
-
|
|
1722
|
+
at(Q("div", Tl, [
|
|
1723
|
+
at(Te(L, ve({
|
|
1715
1724
|
class: "lkt-table--save-button",
|
|
1716
1725
|
ref_key: "saveButtonRef",
|
|
1717
|
-
ref:
|
|
1718
|
-
},
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1726
|
+
ref: Ne
|
|
1727
|
+
}, {
|
|
1728
|
+
..._.value,
|
|
1729
|
+
disabled: it.value,
|
|
1730
|
+
resourceData: Tt.value
|
|
1731
|
+
}, {
|
|
1732
|
+
onLoading: R,
|
|
1733
|
+
onLoaded: X,
|
|
1723
1734
|
onClick: le
|
|
1724
1735
|
}), {
|
|
1725
|
-
split:
|
|
1726
|
-
|
|
1727
|
-
doClose:
|
|
1736
|
+
split: z(({ doClose: N, doRootClick: I }) => [
|
|
1737
|
+
q(t.$slots, "button-save-split", {
|
|
1738
|
+
doClose: N,
|
|
1728
1739
|
doRootClick: I,
|
|
1729
|
-
dataState:
|
|
1730
|
-
onButtonLoading:
|
|
1731
|
-
onButtonLoaded:
|
|
1740
|
+
dataState: d.value,
|
|
1741
|
+
onButtonLoading: R,
|
|
1742
|
+
onButtonLoaded: X
|
|
1732
1743
|
})
|
|
1733
1744
|
]),
|
|
1734
|
-
default:
|
|
1735
|
-
D(l)["button-save"] ?
|
|
1745
|
+
default: z(() => [
|
|
1746
|
+
D(l)["button-save"] ? q(t.$slots, "button-save", {
|
|
1736
1747
|
key: 0,
|
|
1737
1748
|
items: r.value,
|
|
1738
1749
|
editMode: t.editMode,
|
|
1739
|
-
canUpdate: !
|
|
1740
|
-
}) :
|
|
1750
|
+
canUpdate: !it.value
|
|
1751
|
+
}) : A("", !0)
|
|
1741
1752
|
]),
|
|
1742
1753
|
_: 3
|
|
1743
|
-
}, 16
|
|
1744
|
-
[
|
|
1754
|
+
}, 16), [
|
|
1755
|
+
[lt, Ye.value]
|
|
1745
1756
|
]),
|
|
1746
|
-
|
|
1757
|
+
ht.value && r.value.length >= t.requiredItemsForTopCreate ? (v(), O(ea, {
|
|
1747
1758
|
key: 0,
|
|
1748
|
-
config:
|
|
1749
|
-
disabled: !
|
|
1750
|
-
onClick:
|
|
1759
|
+
config: Ce.value,
|
|
1760
|
+
disabled: !qt.value,
|
|
1761
|
+
onClick: S,
|
|
1751
1762
|
onAppend: B
|
|
1752
|
-
}, null, 8, ["config", "disabled"])) :
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
"onUpdate:
|
|
1757
|
-
}), null, 16, ["
|
|
1758
|
-
[
|
|
1763
|
+
}, null, 8, ["config", "disabled"])) : A("", !0),
|
|
1764
|
+
Q("div", El, [
|
|
1765
|
+
at(Te(L, ve(dt.value, {
|
|
1766
|
+
checked: w.value,
|
|
1767
|
+
"onUpdate:checked": m[0] || (m[0] = (N) => w.value = N)
|
|
1768
|
+
}), null, 16, ["checked"]), [
|
|
1769
|
+
[lt, xe.value]
|
|
1759
1770
|
])
|
|
1760
1771
|
])
|
|
1761
|
-
]
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1772
|
+
], 512), [
|
|
1773
|
+
[lt, It.value]
|
|
1774
|
+
]),
|
|
1775
|
+
D(l).buttons ? (v(), y("div", Al, [
|
|
1776
|
+
q(t.$slots, "buttons")
|
|
1777
|
+
])) : A("", !0),
|
|
1778
|
+
Se.value && D(l).filters ? (v(), y("div", Vl, [
|
|
1779
|
+
q(t.$slots, "filters", {
|
|
1767
1780
|
items: r.value,
|
|
1768
1781
|
isLoading: V.value
|
|
1769
1782
|
})
|
|
1770
|
-
])) :
|
|
1771
|
-
|
|
1772
|
-
t.type === D(
|
|
1773
|
-
t.hideTableHeader ?
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
t.addNavigation &&
|
|
1777
|
-
|
|
1778
|
-
(
|
|
1779
|
-
|
|
1783
|
+
])) : A("", !0),
|
|
1784
|
+
at(Q("div", Rl, [
|
|
1785
|
+
t.type === D(tt).Table ? (v(), y("table", Nl, [
|
|
1786
|
+
t.hideTableHeader ? A("", !0) : (v(), y("thead", Ml, [
|
|
1787
|
+
Q("tr", null, [
|
|
1788
|
+
Ke.value && w.value ? (v(), y("th", Ll)) : A("", !0),
|
|
1789
|
+
t.addNavigation && w.value ? (v(), y("th", _l)) : A("", !0),
|
|
1790
|
+
pe.value ? (v(), y("th", $l)) : A("", !0),
|
|
1791
|
+
(v(!0), y(x, null, re(de.value, (N) => (v(), y(x, null, [
|
|
1792
|
+
_e.value.indexOf(N.key) === -1 ? (v(), O(Dl, {
|
|
1780
1793
|
key: 0,
|
|
1781
|
-
column:
|
|
1794
|
+
column: N,
|
|
1782
1795
|
"sort-by": g.value,
|
|
1783
1796
|
"sort-direction": p.value,
|
|
1784
1797
|
"amount-of-columns": t.columns.length,
|
|
1785
1798
|
items: r.value,
|
|
1786
|
-
onClick: (I) =>
|
|
1787
|
-
}, null, 8, ["column", "sort-by", "sort-direction", "amount-of-columns", "items", "onClick"])) :
|
|
1799
|
+
onClick: (I) => ut(N)
|
|
1800
|
+
}, null, 8, ["column", "sort-by", "sort-direction", "amount-of-columns", "items", "onClick"])) : A("", !0)
|
|
1788
1801
|
], 64))), 256)),
|
|
1789
|
-
be.value &&
|
|
1790
|
-
ge.value &&
|
|
1802
|
+
be.value && w.value ? (v(), y("th", Ol)) : A("", !0),
|
|
1803
|
+
ge.value && ce.value && w.value ? (v(), y("th", Pl)) : A("", !0)
|
|
1791
1804
|
])
|
|
1792
1805
|
])),
|
|
1793
|
-
|
|
1806
|
+
Q("tbody", {
|
|
1794
1807
|
ref_key: "tableBody",
|
|
1795
1808
|
ref: c,
|
|
1796
|
-
id: "lkt-table-body-" + D(
|
|
1809
|
+
id: "lkt-table-body-" + D(se),
|
|
1797
1810
|
class: ne(t.itemsContainerClass)
|
|
1798
1811
|
}, [
|
|
1799
|
-
(
|
|
1812
|
+
(v(!0), y(x, null, re(r.value, (N, I) => at((v(), O(bl, {
|
|
1800
1813
|
modelValue: r.value[I],
|
|
1801
|
-
"onUpdate:modelValue": (
|
|
1802
|
-
key:
|
|
1814
|
+
"onUpdate:modelValue": (M) => r.value[I] = M,
|
|
1815
|
+
key: Nt(N, I),
|
|
1803
1816
|
i: I,
|
|
1804
|
-
"drop-button":
|
|
1817
|
+
"drop-button": Me.value,
|
|
1805
1818
|
"edit-button": t.editButton,
|
|
1806
|
-
"display-hidden-columns-indicator":
|
|
1807
|
-
"is-draggable":
|
|
1808
|
-
sortable:
|
|
1809
|
-
"visible-columns":
|
|
1810
|
-
"empty-columns":
|
|
1819
|
+
"display-hidden-columns-indicator": pe.value,
|
|
1820
|
+
"is-draggable": h(N),
|
|
1821
|
+
sortable: Ke.value,
|
|
1822
|
+
"visible-columns": de.value,
|
|
1823
|
+
"empty-columns": _e.value,
|
|
1811
1824
|
"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
|
-
"
|
|
1825
|
+
"hidden-is-visible": gt(I),
|
|
1826
|
+
"latest-row": I + 1 === vt.value,
|
|
1827
|
+
"can-drop": be.value && w.value,
|
|
1828
|
+
"can-edit": ge.value && ce.value && w.value,
|
|
1829
|
+
"can-read": Oe.value,
|
|
1830
|
+
"can-create": me.value,
|
|
1831
|
+
"edit-mode-enabled": w.value,
|
|
1832
|
+
"has-inline-edit-perm": we.value,
|
|
1818
1833
|
"row-display-type": t.rowDisplayType,
|
|
1819
|
-
"render-drag":
|
|
1820
|
-
"disabled-drag":
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1834
|
+
"render-drag": ka.value,
|
|
1835
|
+
"disabled-drag": Sa.value,
|
|
1836
|
+
"is-loading": V.value,
|
|
1837
|
+
onClick: bt,
|
|
1838
|
+
onShow: Qe,
|
|
1839
|
+
onItemUp: Vt,
|
|
1840
|
+
onItemDown: Rt,
|
|
1841
|
+
onItemDrop: Ze
|
|
1826
1842
|
}, Yt({ _: 2 }, [
|
|
1827
1843
|
D(l)[`item-${I}`] ? {
|
|
1828
1844
|
name: `item-${I}`,
|
|
1829
|
-
fn:
|
|
1830
|
-
|
|
1831
|
-
[t.slotItemVar || ""]:
|
|
1832
|
-
index: I
|
|
1845
|
+
fn: z((M) => [
|
|
1846
|
+
q(t.$slots, `item-${I}`, Re({
|
|
1847
|
+
[t.slotItemVar || ""]: M.item,
|
|
1848
|
+
index: I,
|
|
1849
|
+
editing: M.editing,
|
|
1850
|
+
canCreate: M.canCreate,
|
|
1851
|
+
canRead: M.canRead,
|
|
1852
|
+
canUpdate: M.canUpdate,
|
|
1853
|
+
canDrop: M.canDrop,
|
|
1854
|
+
isLoading: M.isLoading,
|
|
1855
|
+
doDrop: M.doDrop
|
|
1833
1856
|
}))
|
|
1834
1857
|
]),
|
|
1835
1858
|
key: "0"
|
|
1836
1859
|
} : D(l).item ? {
|
|
1837
1860
|
name: "item",
|
|
1838
|
-
fn:
|
|
1839
|
-
|
|
1840
|
-
[t.slotItemVar || ""]:
|
|
1841
|
-
index: I
|
|
1861
|
+
fn: z((M) => [
|
|
1862
|
+
q(t.$slots, "item", Re({
|
|
1863
|
+
[t.slotItemVar || ""]: M.item,
|
|
1864
|
+
index: I,
|
|
1865
|
+
editing: M.editing,
|
|
1866
|
+
canCreate: M.canCreate,
|
|
1867
|
+
canRead: M.canRead,
|
|
1868
|
+
canUpdate: M.canUpdate,
|
|
1869
|
+
canDrop: M.canDrop,
|
|
1870
|
+
isLoading: M.isLoading,
|
|
1871
|
+
doDrop: M.doDrop
|
|
1842
1872
|
}))
|
|
1843
1873
|
]),
|
|
1844
1874
|
key: "1"
|
|
1845
1875
|
} : void 0,
|
|
1846
|
-
re(
|
|
1847
|
-
name:
|
|
1848
|
-
fn:
|
|
1849
|
-
|
|
1850
|
-
[t.slotItemVar || ""]:
|
|
1851
|
-
value:
|
|
1852
|
-
column:
|
|
1876
|
+
re(oe.value, (M) => ({
|
|
1877
|
+
name: M,
|
|
1878
|
+
fn: z((he) => [
|
|
1879
|
+
q(t.$slots, M, Re({
|
|
1880
|
+
[t.slotItemVar || ""]: he.item,
|
|
1881
|
+
value: he.value,
|
|
1882
|
+
column: he.column
|
|
1853
1883
|
}))
|
|
1854
1884
|
])
|
|
1855
1885
|
}))
|
|
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
|
-
[
|
|
1886
|
+
]), 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"])), [
|
|
1887
|
+
[lt, Mt(r.value[I])]
|
|
1858
1888
|
])), 128)),
|
|
1859
|
-
|
|
1889
|
+
He.value.length > 0 ? (v(!0), y(x, { key: 0 }, re(r.value, (N, I) => (v(), O(wl, {
|
|
1860
1890
|
modelValue: r.value[I],
|
|
1861
|
-
"onUpdate:modelValue": (
|
|
1862
|
-
key:
|
|
1891
|
+
"onUpdate:modelValue": (M) => r.value[I] = M,
|
|
1892
|
+
key: Nt(N, I, !0),
|
|
1863
1893
|
i: I,
|
|
1864
|
-
"hidden-columns":
|
|
1865
|
-
"hidden-columns-col-span":
|
|
1866
|
-
"is-draggable":
|
|
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:
|
|
1894
|
+
"hidden-columns": He.value,
|
|
1895
|
+
"hidden-columns-col-span": ct.value,
|
|
1896
|
+
"is-draggable": h(N),
|
|
1897
|
+
sortable: Ke.value,
|
|
1898
|
+
"visible-columns": de.value,
|
|
1899
|
+
"empty-columns": _e.value,
|
|
1900
|
+
"hidden-is-visible": gt(I),
|
|
1901
|
+
"edit-mode-enabled": w.value,
|
|
1902
|
+
"has-inline-edit-perm": we.value,
|
|
1903
|
+
onClick: bt,
|
|
1904
|
+
onShow: Qe
|
|
1875
1905
|
}, Yt({ _: 2 }, [
|
|
1876
|
-
re(
|
|
1877
|
-
name:
|
|
1878
|
-
fn:
|
|
1879
|
-
|
|
1880
|
-
[t.slotItemVar || ""]:
|
|
1881
|
-
value:
|
|
1882
|
-
column:
|
|
1906
|
+
re(oe.value, (M) => ({
|
|
1907
|
+
name: M,
|
|
1908
|
+
fn: z((he) => [
|
|
1909
|
+
q(t.$slots, M, Re({
|
|
1910
|
+
[t.slotItemVar || ""]: he.item,
|
|
1911
|
+
value: he.value,
|
|
1912
|
+
column: he.column
|
|
1883
1913
|
}))
|
|
1884
1914
|
])
|
|
1885
1915
|
}))
|
|
1886
|
-
]), 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)) :
|
|
1887
|
-
], 10,
|
|
1888
|
-
])) : t.type === D(
|
|
1916
|
+
]), 1032, ["modelValue", "onUpdate:modelValue", "i", "hidden-columns", "hidden-columns-col-span", "is-draggable", "sortable", "visible-columns", "empty-columns", "hidden-is-visible", "edit-mode-enabled", "has-inline-edit-perm"]))), 128)) : A("", !0)
|
|
1917
|
+
], 10, Ul)
|
|
1918
|
+
])) : t.type === D(tt).Item ? (v(), y("div", {
|
|
1889
1919
|
key: 1,
|
|
1890
1920
|
ref_key: "tableBody",
|
|
1891
1921
|
ref: c,
|
|
1892
|
-
id: "lkt-table-body-" + D(
|
|
1922
|
+
id: "lkt-table-body-" + D(se),
|
|
1893
1923
|
class: ne(["lkt-table-items-container", t.itemsContainerClass])
|
|
1894
1924
|
}, [
|
|
1895
|
-
(
|
|
1896
|
-
|
|
1925
|
+
(v(!0), y(x, null, re(r.value, (N, I) => (v(), y(x, null, [
|
|
1926
|
+
Mt(N) ? (v(), y("div", {
|
|
1897
1927
|
class: "lkt-table-item",
|
|
1898
1928
|
"data-i": I,
|
|
1899
|
-
key:
|
|
1929
|
+
key: Nt(N, I)
|
|
1900
1930
|
}, [
|
|
1901
|
-
|
|
1902
|
-
[t.slotItemVar || ""]:
|
|
1931
|
+
q(t.$slots, "item", Re({
|
|
1932
|
+
[t.slotItemVar || ""]: N,
|
|
1903
1933
|
index: I,
|
|
1904
|
-
editing:
|
|
1905
|
-
canCreate:
|
|
1906
|
-
canRead:
|
|
1907
|
-
canUpdate:
|
|
1934
|
+
editing: w.value,
|
|
1935
|
+
canCreate: me.value,
|
|
1936
|
+
canRead: Oe.value,
|
|
1937
|
+
canUpdate: ce.value,
|
|
1908
1938
|
canDrop: be.value,
|
|
1909
1939
|
isLoading: V.value,
|
|
1910
|
-
doDrop: () =>
|
|
1940
|
+
doDrop: () => Ze(I)
|
|
1911
1941
|
}))
|
|
1912
|
-
], 8, jl)) :
|
|
1942
|
+
], 8, jl)) : A("", !0)
|
|
1913
1943
|
], 64))), 256))
|
|
1914
|
-
], 10,
|
|
1944
|
+
], 10, Fl)) : ba.value ? (v(), O(Ee(t.type), {
|
|
1915
1945
|
key: 2,
|
|
1916
1946
|
class: ne(["lkt-table-items-container", t.itemsContainerClass])
|
|
1917
1947
|
}, {
|
|
1918
|
-
default:
|
|
1919
|
-
(
|
|
1920
|
-
|
|
1948
|
+
default: z(() => [
|
|
1949
|
+
(v(!0), y(x, null, re(r.value, (N, I) => (v(), y(x, null, [
|
|
1950
|
+
Mt(N) ? (v(), y("li", {
|
|
1921
1951
|
key: 0,
|
|
1922
1952
|
class: "lkt-table-item",
|
|
1923
1953
|
"data-i": I
|
|
1924
1954
|
}, [
|
|
1925
|
-
|
|
1926
|
-
[t.slotItemVar || ""]:
|
|
1955
|
+
q(t.$slots, "item", Re({
|
|
1956
|
+
[t.slotItemVar || ""]: N,
|
|
1927
1957
|
index: I,
|
|
1928
|
-
editing:
|
|
1929
|
-
canCreate:
|
|
1930
|
-
canRead:
|
|
1931
|
-
canUpdate:
|
|
1958
|
+
editing: w.value,
|
|
1959
|
+
canCreate: me.value,
|
|
1960
|
+
canRead: Oe.value,
|
|
1961
|
+
canUpdate: ce.value,
|
|
1932
1962
|
canDrop: be.value,
|
|
1933
1963
|
isLoading: V.value,
|
|
1934
|
-
doDrop: () =>
|
|
1964
|
+
doDrop: () => Ze(I)
|
|
1935
1965
|
}))
|
|
1936
|
-
], 8, zl)) :
|
|
1966
|
+
], 8, zl)) : A("", !0)
|
|
1937
1967
|
], 64))), 256))
|
|
1938
1968
|
]),
|
|
1939
1969
|
_: 3
|
|
1940
|
-
}, 8, ["class"])) : t.type === D(
|
|
1970
|
+
}, 8, ["class"])) : t.type === D(tt).Carousel ? (v(), y("div", {
|
|
1941
1971
|
key: 3,
|
|
1942
1972
|
ref_key: "tableBody",
|
|
1943
1973
|
ref: c,
|
|
1944
|
-
id: "lkt-table-body-" + D(
|
|
1974
|
+
id: "lkt-table-body-" + D(se),
|
|
1945
1975
|
class: ne(["lkt-table-items-container", t.itemsContainerClass])
|
|
1946
1976
|
}, [
|
|
1947
|
-
|
|
1948
|
-
modelValue:
|
|
1949
|
-
"onUpdate:modelValue": m[1] || (m[1] = (
|
|
1977
|
+
Te(D(Ya), ve({
|
|
1978
|
+
modelValue: J.value,
|
|
1979
|
+
"onUpdate:modelValue": m[1] || (m[1] = (N) => J.value = N)
|
|
1950
1980
|
}, t.carousel, {
|
|
1951
|
-
"wrap-around": ((
|
|
1981
|
+
"wrap-around": ((ie = t.carousel) == null ? void 0 : ie.infinite) === !0
|
|
1952
1982
|
}), {
|
|
1953
|
-
addons:
|
|
1954
|
-
|
|
1955
|
-
|
|
1983
|
+
addons: z(() => [
|
|
1984
|
+
Te(D(xa)),
|
|
1985
|
+
Te(D(Ja))
|
|
1956
1986
|
]),
|
|
1957
|
-
default:
|
|
1958
|
-
(
|
|
1959
|
-
key:
|
|
1987
|
+
default: z(() => [
|
|
1988
|
+
(v(!0), y(x, null, re(Xe.value, (N, I) => (v(), O(D(Zt), {
|
|
1989
|
+
key: N,
|
|
1960
1990
|
index: I
|
|
1961
1991
|
}, {
|
|
1962
|
-
default:
|
|
1963
|
-
|
|
1964
|
-
|
|
1992
|
+
default: z(() => [
|
|
1993
|
+
Q("div", ql, [
|
|
1994
|
+
q(t.$slots, N)
|
|
1965
1995
|
])
|
|
1966
1996
|
]),
|
|
1967
1997
|
_: 2
|
|
1968
1998
|
}, 1032, ["index"]))), 128)),
|
|
1969
|
-
(
|
|
1999
|
+
(v(!0), y(x, null, re(r.value, (N, I) => (v(), O(D(Zt), {
|
|
1970
2000
|
key: t.slide,
|
|
1971
2001
|
index: I
|
|
1972
2002
|
}, {
|
|
1973
|
-
default:
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
[t.slotItemVar || ""]:
|
|
2003
|
+
default: z(() => [
|
|
2004
|
+
Q("div", Gl, [
|
|
2005
|
+
q(t.$slots, "item", Re({
|
|
2006
|
+
[t.slotItemVar || ""]: N,
|
|
1977
2007
|
index: I,
|
|
1978
|
-
editing:
|
|
1979
|
-
canCreate:
|
|
1980
|
-
canRead:
|
|
1981
|
-
canUpdate:
|
|
2008
|
+
editing: w.value,
|
|
2009
|
+
canCreate: me.value,
|
|
2010
|
+
canRead: Oe.value,
|
|
2011
|
+
canUpdate: ce.value,
|
|
1982
2012
|
canDrop: be.value,
|
|
1983
2013
|
isLoading: V.value,
|
|
1984
|
-
doDrop: () =>
|
|
2014
|
+
doDrop: () => Ze(I)
|
|
1985
2015
|
}))
|
|
1986
2016
|
])
|
|
1987
2017
|
]),
|
|
@@ -1990,40 +2020,40 @@ const ol = /* @__PURE__ */ ae({
|
|
|
1990
2020
|
]),
|
|
1991
2021
|
_: 3
|
|
1992
2022
|
}, 16, ["modelValue", "wrap-around"])
|
|
1993
|
-
], 10, Hl)) :
|
|
2023
|
+
], 10, Hl)) : A("", !0)
|
|
1994
2024
|
], 512), [
|
|
1995
|
-
[
|
|
2025
|
+
[lt, rt.value]
|
|
1996
2026
|
]),
|
|
1997
|
-
!V.value && r.value.length === 0 ? (
|
|
1998
|
-
D(l).empty ?
|
|
2027
|
+
!V.value && r.value.length === 0 ? (v(), y("div", Xl, [
|
|
2028
|
+
D(l).empty ? q(t.$slots, "empty", { key: 0 }) : ha.value ? (v(), O(Ee(ya.value), {
|
|
1999
2029
|
key: 1,
|
|
2000
2030
|
message: t.noResultsText
|
|
2001
|
-
}, null, 8, ["message"])) : t.noResultsText ? (
|
|
2002
|
-
|
|
2003
|
-
], 64)) :
|
|
2004
|
-
])) :
|
|
2005
|
-
V.value ? (
|
|
2006
|
-
|
|
2007
|
-
|
|
2031
|
+
}, null, 8, ["message"])) : t.noResultsText ? (v(), y(x, { key: 2 }, [
|
|
2032
|
+
nt(je(t.noResultsText), 1)
|
|
2033
|
+
], 64)) : A("", !0)
|
|
2034
|
+
])) : A("", !0),
|
|
2035
|
+
V.value ? (v(), O(W, { key: 3 })) : A("", !0),
|
|
2036
|
+
ht.value || D(l).bottomButtons ? (v(), y("div", Yl, [
|
|
2037
|
+
ht.value && r.value.length >= t.requiredItemsForBottomCreate ? (v(), O(ea, {
|
|
2008
2038
|
key: 0,
|
|
2009
|
-
config:
|
|
2010
|
-
disabled: !
|
|
2011
|
-
onClick:
|
|
2039
|
+
config: Ce.value,
|
|
2040
|
+
disabled: !qt.value,
|
|
2041
|
+
onClick: S,
|
|
2012
2042
|
onAppend: B
|
|
2013
|
-
}, null, 8, ["config", "disabled"])) :
|
|
2014
|
-
|
|
2015
|
-
])) :
|
|
2016
|
-
t.paginator && Object.keys(t.paginator).length > 0 ? (
|
|
2017
|
-
key:
|
|
2043
|
+
}, null, 8, ["config", "disabled"])) : A("", !0),
|
|
2044
|
+
q(t.$slots, "bottom-buttons")
|
|
2045
|
+
])) : A("", !0),
|
|
2046
|
+
t.paginator && Object.keys(t.paginator).length > 0 ? (v(), O(te, ve({
|
|
2047
|
+
key: 5,
|
|
2018
2048
|
ref_key: "paginatorRef",
|
|
2019
|
-
ref:
|
|
2049
|
+
ref: G
|
|
2020
2050
|
}, t.paginator, {
|
|
2021
|
-
modelValue:
|
|
2022
|
-
"onUpdate:modelValue": m[2] || (m[2] = (
|
|
2023
|
-
onLoading:
|
|
2024
|
-
onPerms:
|
|
2025
|
-
onResponse:
|
|
2026
|
-
}), null, 16, ["modelValue"])) :
|
|
2051
|
+
modelValue: E.value,
|
|
2052
|
+
"onUpdate:modelValue": m[2] || (m[2] = (N) => E.value = N),
|
|
2053
|
+
onLoading: Dt,
|
|
2054
|
+
onPerms: Bt,
|
|
2055
|
+
onResponse: Le
|
|
2056
|
+
}), null, 16, ["modelValue"])) : A("", !0)
|
|
2027
2057
|
];
|
|
2028
2058
|
}),
|
|
2029
2059
|
_: 3
|
|
@@ -2033,7 +2063,7 @@ const ol = /* @__PURE__ */ ae({
|
|
|
2033
2063
|
}
|
|
2034
2064
|
}), an = {
|
|
2035
2065
|
install: (e) => {
|
|
2036
|
-
e.component("lkt-table") === void 0 && e.component("lkt-table",
|
|
2066
|
+
e.component("lkt-table") === void 0 && e.component("lkt-table", Kl);
|
|
2037
2067
|
}
|
|
2038
2068
|
}, ln = (e) => (K.navButtonSlot = e, !0), nn = (e) => (K.dropButtonSlot = e, !0), on = (e) => (K.createButtonSlot = e, !0), rn = (e) => {
|
|
2039
2069
|
K.defaultEmptySlot = e;
|