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