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