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