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