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