@citruslime/ui 2.4.1-beta.1 → 2.4.1-beta.2
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/citrus-lime-ui.es.js +527 -522
- package/dist/citrus-lime-ui.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Icon as I } from "@iconify/vue";
|
|
2
|
-
import { defineComponent as U, ref as
|
|
2
|
+
import { defineComponent as U, ref as A, openBlock as u, createElementBlock as v, renderSlot as j, normalizeProps as se, guardReactiveProps as ie, Fragment as P, createElementVNode as f, normalizeClass as _, createVNode as $, unref as d, Transition as ge, withCtx as F, withDirectives as L, mergeProps as ae, vShow as H, createBlock as V, Teleport as _e, renderList as J, toDisplayString as E, createCommentVNode as q, nextTick as ye, toHandlers as ll, withModifiers as K, computed as S, watch as Q, normalizeStyle as xe, vModelText as tl, onMounted as qe, vModelDynamic as ol, withKeys as $e, onUnmounted as Ie, resolveComponent as nl, createTextVNode as le, watchEffect as sl, createSlots as Re } from "vue";
|
|
3
3
|
import { generateStringId as al } from "@citruslime/utils";
|
|
4
4
|
import { onClickOutside as ze, useTimeoutFn as We, useDebounceFn as Ke, useWindowSize as rl } from "@vueuse/core";
|
|
5
|
-
import { createI18n as
|
|
5
|
+
import { createI18n as il, useI18n as oe } from "vue-i18n";
|
|
6
6
|
import { DateTime as ke } from "luxon";
|
|
7
7
|
import { DatePicker as Me } from "v-calendar";
|
|
8
|
-
import { useDebouncer as
|
|
8
|
+
import { useDebouncer as cl, copy as ce } from "@citruslime/vue-utils";
|
|
9
9
|
const ul = { class: "cl-overflow-hidden" }, dl = /* @__PURE__ */ U({
|
|
10
10
|
__name: "cl-ui-accordion",
|
|
11
11
|
props: {
|
|
12
12
|
exclusive: { type: Boolean, default: !1 }
|
|
13
13
|
},
|
|
14
14
|
setup(t) {
|
|
15
|
-
const o = t, e =
|
|
15
|
+
const o = t, e = A([]);
|
|
16
16
|
function l(p) {
|
|
17
17
|
let s = e.value.find((a) => a.id === p);
|
|
18
18
|
return s || (s = {
|
|
@@ -26,8 +26,8 @@ const ul = { class: "cl-overflow-hidden" }, dl = /* @__PURE__ */ U({
|
|
|
26
26
|
a.id !== p && (a.open = !1);
|
|
27
27
|
}), s.open = !s.open);
|
|
28
28
|
}
|
|
29
|
-
return (p, s) => (u(),
|
|
30
|
-
j(p.$slots, "default", se(
|
|
29
|
+
return (p, s) => (u(), v("div", ul, [
|
|
30
|
+
j(p.$slots, "default", se(ie({ isItemOpen: l, toggleItem: n })))
|
|
31
31
|
]));
|
|
32
32
|
}
|
|
33
33
|
}), pl = { class: "cl-absolute cl-left-5 cl-top-5" }, fl = { class: "cl-font-semibold cl-ml-10 cl-p-4 cl-select-none cl-text-grey-5" }, ml = { class: "cl-overflow-hidden" }, gl = /* @__PURE__ */ U({
|
|
@@ -45,7 +45,7 @@ const ul = { class: "cl-overflow-hidden" }, dl = /* @__PURE__ */ U({
|
|
|
45
45
|
function l() {
|
|
46
46
|
e.disabled || o("toggle");
|
|
47
47
|
}
|
|
48
|
-
return (n, p) => (u(),
|
|
48
|
+
return (n, p) => (u(), v(P, null, [
|
|
49
49
|
f("div", {
|
|
50
50
|
class: _(["cl-border-b cl-border-grey-1 cl-relative", {
|
|
51
51
|
"cl-bg-grey-0": n.disabled,
|
|
@@ -69,7 +69,7 @@ const ul = { class: "cl-overflow-hidden" }, dl = /* @__PURE__ */ U({
|
|
|
69
69
|
f("div", ml, [
|
|
70
70
|
$(ge, { name: "grow-down" }, {
|
|
71
71
|
default: F(() => [
|
|
72
|
-
L(f("div",
|
|
72
|
+
L(f("div", ae(n.$attrs, { class: "cl-ml-10 cl-p-4" }), [
|
|
73
73
|
j(n.$slots, "default")
|
|
74
74
|
], 16), [
|
|
75
75
|
[H, n.open]
|
|
@@ -87,20 +87,20 @@ const ul = { class: "cl-overflow-hidden" }, dl = /* @__PURE__ */ U({
|
|
|
87
87
|
return e;
|
|
88
88
|
}, vl = {}, bl = { class: "cl-border-b cl-border-grey-1 cl-font-semibold cl-pl-14 cl-pr-4 cl-py-2 cl-text-grey-3 cl-text-sm" };
|
|
89
89
|
function hl(t, o) {
|
|
90
|
-
return u(),
|
|
90
|
+
return u(), v("div", bl, [
|
|
91
91
|
j(t.$slots, "default")
|
|
92
92
|
]);
|
|
93
93
|
}
|
|
94
|
-
const yl = /* @__PURE__ */ fe(vl, [["render", hl]]),
|
|
94
|
+
const yl = /* @__PURE__ */ fe(vl, [["render", hl]]), Ae = A([]);
|
|
95
95
|
function Ve(t) {
|
|
96
96
|
const o = {
|
|
97
97
|
id: al(),
|
|
98
98
|
...t
|
|
99
99
|
};
|
|
100
|
-
|
|
100
|
+
Ae.value.push(o), setTimeout(() => Qe(o), t.duration);
|
|
101
101
|
}
|
|
102
102
|
function Qe(t) {
|
|
103
|
-
|
|
103
|
+
Ae.value = Ae.value.filter((o) => o.id !== t.id);
|
|
104
104
|
}
|
|
105
105
|
const wl = ["onClick"], $l = { class: "cl-flex-1 cl-select-none cl-text-ellipsis cl-w-64" }, Je = /* @__PURE__ */ U({
|
|
106
106
|
inheritAttrs: !1,
|
|
@@ -121,7 +121,7 @@ const wl = ["onClick"], $l = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
121
121
|
"cl-bottom-5 cl-right-5": o.position === "bottom-right"
|
|
122
122
|
}])
|
|
123
123
|
}, [
|
|
124
|
-
(u(!0),
|
|
124
|
+
(u(!0), v(P, null, J(d(Ae), (l, n) => (u(), v("div", ae(o.$attrs, {
|
|
125
125
|
key: n,
|
|
126
126
|
class: ["cl-break-words cl-cursor-pointer cl-flex cl-font-semibold cl-group cl-mb-2 cl-overflow-hidden cl-p-4 cl-rounded cl-shadow-lg cl-text-sm", {
|
|
127
127
|
"cl-bg-white": l.colour === "default",
|
|
@@ -149,7 +149,7 @@ const wl = ["onClick"], $l = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
149
149
|
removePadding: { type: Boolean, default: !1 }
|
|
150
150
|
},
|
|
151
151
|
setup(t) {
|
|
152
|
-
return (o, e) => (u(),
|
|
152
|
+
return (o, e) => (u(), v(P, null, [
|
|
153
153
|
$(Je),
|
|
154
154
|
f("div", kl, [
|
|
155
155
|
j(o.$slots, "header"),
|
|
@@ -174,9 +174,9 @@ const wl = ["onClick"], $l = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
174
174
|
});
|
|
175
175
|
const Tl = {}, El = { class: "loading-spinner" };
|
|
176
176
|
function Ol(t, o) {
|
|
177
|
-
return u(),
|
|
177
|
+
return u(), v("div", El);
|
|
178
178
|
}
|
|
179
|
-
const Se = /* @__PURE__ */ fe(Tl, [["render", Ol], ["__scopeId", "data-v-a21dc5d2"]]),
|
|
179
|
+
const Se = /* @__PURE__ */ fe(Tl, [["render", Ol], ["__scopeId", "data-v-a21dc5d2"]]), Al = ["disabled"], me = /* @__PURE__ */ U({
|
|
180
180
|
inheritAttrs: !1,
|
|
181
181
|
__name: "cl-ui-button",
|
|
182
182
|
props: {
|
|
@@ -186,16 +186,16 @@ const Se = /* @__PURE__ */ fe(Tl, [["render", Ol], ["__scopeId", "data-v-a21dc5d
|
|
|
186
186
|
disabled: { type: Boolean, default: !1 }
|
|
187
187
|
},
|
|
188
188
|
setup(t, { expose: o }) {
|
|
189
|
-
const e =
|
|
189
|
+
const e = A(null);
|
|
190
190
|
return o({
|
|
191
191
|
focus() {
|
|
192
192
|
e.value && e.value.focus();
|
|
193
193
|
}
|
|
194
|
-
}), (l, n) => (u(),
|
|
194
|
+
}), (l, n) => (u(), v(P, null, [
|
|
195
195
|
L($(Se, { class: "relative" }, null, 512), [
|
|
196
196
|
[H, l.loading]
|
|
197
197
|
]),
|
|
198
|
-
L(f("button",
|
|
198
|
+
L(f("button", ae(l.$attrs, {
|
|
199
199
|
ref_key: "buttonRef",
|
|
200
200
|
ref: e,
|
|
201
201
|
class: ["cl-align-middle cl-border cl-font-semibold cl-inline-block cl-rounded cl-select-none cl-shadow cl-text-center cl-transition-colors", {
|
|
@@ -213,12 +213,12 @@ const Se = /* @__PURE__ */ fe(Tl, [["render", Ol], ["__scopeId", "data-v-a21dc5d
|
|
|
213
213
|
disabled: l.disabled
|
|
214
214
|
}), [
|
|
215
215
|
j(l.$slots, "default")
|
|
216
|
-
], 16,
|
|
216
|
+
], 16, Al), [
|
|
217
217
|
[H, !l.loading]
|
|
218
218
|
])
|
|
219
219
|
], 64));
|
|
220
220
|
}
|
|
221
|
-
}),
|
|
221
|
+
}), ql = [
|
|
222
222
|
"default",
|
|
223
223
|
"primary",
|
|
224
224
|
"secondary",
|
|
@@ -236,15 +236,15 @@ const Se = /* @__PURE__ */ fe(Tl, [["render", Ol], ["__scopeId", "data-v-a21dc5d
|
|
|
236
236
|
hover: { type: Boolean, default: !1 }
|
|
237
237
|
},
|
|
238
238
|
setup(t) {
|
|
239
|
-
return (o, e) => (u(),
|
|
239
|
+
return (o, e) => (u(), v("div", {
|
|
240
240
|
class: _(["cl-border cl-border-transparent cl-overflow-hidden cl-relative cl-rounded-md cl-shadow-lg cl-transition-all", {
|
|
241
241
|
"cl-cursor-pointer hover:cl-shadow-xl hover:cl-border-grey-0": o.hover
|
|
242
242
|
}])
|
|
243
243
|
}, [
|
|
244
|
-
o.$slots.image ? (u(),
|
|
244
|
+
o.$slots.image ? (u(), v("div", Nl, [
|
|
245
245
|
j(o.$slots, "image")
|
|
246
|
-
])) :
|
|
247
|
-
o.$slots.title ? (u(),
|
|
246
|
+
])) : q("", !0),
|
|
247
|
+
o.$slots.title ? (u(), v("div", {
|
|
248
248
|
key: 1,
|
|
249
249
|
class: _(["cl-border-grey-2 cl-font-normal", {
|
|
250
250
|
"cl-p-2 cl-text-2xl cl-leading-8": o.size === "small",
|
|
@@ -254,7 +254,7 @@ const Se = /* @__PURE__ */ fe(Tl, [["render", Ol], ["__scopeId", "data-v-a21dc5d
|
|
|
254
254
|
}])
|
|
255
255
|
}, [
|
|
256
256
|
j(o.$slots, "title")
|
|
257
|
-
], 2)) :
|
|
257
|
+
], 2)) : q("", !0),
|
|
258
258
|
f("div", {
|
|
259
259
|
class: _(["cl-border-grey-2", {
|
|
260
260
|
"cl-p-2": o.size === "small",
|
|
@@ -265,7 +265,7 @@ const Se = /* @__PURE__ */ fe(Tl, [["render", Ol], ["__scopeId", "data-v-a21dc5d
|
|
|
265
265
|
}, [
|
|
266
266
|
j(o.$slots, "default")
|
|
267
267
|
], 2),
|
|
268
|
-
o.$slots.footer ? (u(),
|
|
268
|
+
o.$slots.footer ? (u(), v("div", {
|
|
269
269
|
key: 2,
|
|
270
270
|
class: _(["cl-border-grey-2 cl-border-t", {
|
|
271
271
|
"cl-p-2": o.size === "small",
|
|
@@ -274,7 +274,7 @@ const Se = /* @__PURE__ */ fe(Tl, [["render", Ol], ["__scopeId", "data-v-a21dc5d
|
|
|
274
274
|
}])
|
|
275
275
|
}, [
|
|
276
276
|
j(o.$slots, "footer")
|
|
277
|
-
], 2)) :
|
|
277
|
+
], 2)) : q("", !0)
|
|
278
278
|
], 2));
|
|
279
279
|
}
|
|
280
280
|
}), _l = [
|
|
@@ -282,7 +282,7 @@ const Se = /* @__PURE__ */ fe(Tl, [["render", Ol], ["__scopeId", "data-v-a21dc5d
|
|
|
282
282
|
"medium",
|
|
283
283
|
"large"
|
|
284
284
|
];
|
|
285
|
-
var X = /* @__PURE__ */ ((t) => (t.CURRENCY = "currency", t.PERCENTAGE = "percentage", t.INTEGER = "integer", t.DECIMAL = "decimal", t.MULTIPLIER = "multiplier", t))(X || {}),
|
|
285
|
+
var X = /* @__PURE__ */ ((t) => (t.CURRENCY = "currency", t.PERCENTAGE = "percentage", t.INTEGER = "integer", t.DECIMAL = "decimal", t.MULTIPLIER = "multiplier", t))(X || {}), Z = /* @__PURE__ */ ((t) => (t.SHORT_DATE = "short-date", t.SHORT_DATETIME = "short-datetime", t.DATE = "date", t.DATETIME = "datetime", t.LONG_DATE = "long-date", t.LONG_DATETIME = "long-datetime", t.TIME = "time", t.MONTH_YEAR = "month-year", t))(Z || {});
|
|
286
286
|
const Il = {
|
|
287
287
|
"en-GB": {
|
|
288
288
|
comboBox: {
|
|
@@ -383,52 +383,52 @@ const Il = {
|
|
|
383
383
|
}
|
|
384
384
|
}, zl = {
|
|
385
385
|
"en-GB": {
|
|
386
|
-
[
|
|
386
|
+
[Z.SHORT_DATE]: {
|
|
387
387
|
day: "numeric",
|
|
388
388
|
month: "numeric",
|
|
389
389
|
year: "2-digit"
|
|
390
390
|
},
|
|
391
|
-
[
|
|
391
|
+
[Z.SHORT_DATETIME]: {
|
|
392
392
|
day: "numeric",
|
|
393
393
|
month: "numeric",
|
|
394
394
|
year: "2-digit",
|
|
395
395
|
hour: "numeric",
|
|
396
396
|
minute: "numeric"
|
|
397
397
|
},
|
|
398
|
-
[
|
|
398
|
+
[Z.DATE]: {
|
|
399
399
|
day: "numeric",
|
|
400
400
|
month: "numeric",
|
|
401
401
|
year: "numeric"
|
|
402
402
|
},
|
|
403
|
-
[
|
|
403
|
+
[Z.DATETIME]: {
|
|
404
404
|
day: "numeric",
|
|
405
405
|
month: "numeric",
|
|
406
406
|
year: "numeric",
|
|
407
407
|
hour: "numeric",
|
|
408
408
|
minute: "numeric"
|
|
409
409
|
},
|
|
410
|
-
[
|
|
410
|
+
[Z.LONG_DATE]: {
|
|
411
411
|
day: "numeric",
|
|
412
412
|
month: "long",
|
|
413
413
|
year: "numeric"
|
|
414
414
|
},
|
|
415
|
-
[
|
|
415
|
+
[Z.LONG_DATETIME]: {
|
|
416
416
|
day: "numeric",
|
|
417
417
|
month: "long",
|
|
418
418
|
year: "numeric",
|
|
419
419
|
hour: "numeric",
|
|
420
420
|
minute: "numeric"
|
|
421
421
|
},
|
|
422
|
-
[
|
|
422
|
+
[Z.TIME]: {
|
|
423
423
|
hour: "numeric",
|
|
424
424
|
minute: "numeric"
|
|
425
425
|
},
|
|
426
|
-
[
|
|
426
|
+
[Z.MONTH_YEAR]: {
|
|
427
427
|
month: "long",
|
|
428
428
|
year: "numeric"
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
}, ee =
|
|
431
|
+
}, ee = il({
|
|
432
432
|
locale: "en-GB",
|
|
433
433
|
fallbackLocale: "en-GB",
|
|
434
434
|
messages: Il,
|
|
@@ -475,10 +475,10 @@ function Ul(t, o, e, l) {
|
|
|
475
475
|
a = l >= (Number(t) || 0), s = pe(a, de("input.greaterOrEqualToValue", { label: e, min: t.toString() }));
|
|
476
476
|
break;
|
|
477
477
|
case "date":
|
|
478
|
-
a = new Date(l).getTime() >= new Date(t).getTime(), s = pe(a, de("input.afterOrEqualToValue", { label: e, min: ee.global.d(new Date(t),
|
|
478
|
+
a = new Date(l).getTime() >= new Date(t).getTime(), s = pe(a, de("input.afterOrEqualToValue", { label: e, min: ee.global.d(new Date(t), Z.DATE, n ?? ee.global.locale.value) }));
|
|
479
479
|
break;
|
|
480
480
|
case "datetime":
|
|
481
|
-
a = new Date(l).getTime() >= new Date(t).getTime(), s = pe(a, de("input.afterOrEqualToValue", { label: e, min: ee.global.d(new Date(t),
|
|
481
|
+
a = new Date(l).getTime() >= new Date(t).getTime(), s = pe(a, de("input.afterOrEqualToValue", { label: e, min: ee.global.d(new Date(t), Z.DATETIME, n ?? ee.global.locale.value) }));
|
|
482
482
|
break;
|
|
483
483
|
default:
|
|
484
484
|
s.valid = !0;
|
|
@@ -511,10 +511,10 @@ function Bl(t, o, e, l) {
|
|
|
511
511
|
a = l <= (Number(t) || 0), s = pe(a, de("input.lessOrEqualToValue", { label: e, max: t.toString() }));
|
|
512
512
|
break;
|
|
513
513
|
case "date":
|
|
514
|
-
a = new Date(l).getTime() <= new Date(t).getTime(), s = pe(a, de("input.beforeOrEqualToValue", { label: e, max: ee.global.d(new Date(t),
|
|
514
|
+
a = new Date(l).getTime() <= new Date(t).getTime(), s = pe(a, de("input.beforeOrEqualToValue", { label: e, max: ee.global.d(new Date(t), Z.DATE, n ?? ee.global.locale.value) }));
|
|
515
515
|
break;
|
|
516
516
|
case "datetime":
|
|
517
|
-
a = new Date(l).getTime() <= new Date(t).getTime(), s = pe(a, de("input.beforeOrEqualToValue", { label: e, min: ee.global.d(new Date(t),
|
|
517
|
+
a = new Date(l).getTime() <= new Date(t).getTime(), s = pe(a, de("input.beforeOrEqualToValue", { label: e, min: ee.global.d(new Date(t), Z.DATETIME, n ?? ee.global.locale.value) }));
|
|
518
518
|
break;
|
|
519
519
|
default:
|
|
520
520
|
s.valid = !0;
|
|
@@ -557,14 +557,14 @@ const Dl = { class: "cl-relative" }, Ll = ["value", "disabled", "placeholder"],
|
|
|
557
557
|
},
|
|
558
558
|
emits: ["clear", "reset"],
|
|
559
559
|
setup(t, { expose: o }) {
|
|
560
|
-
const e =
|
|
560
|
+
const e = A(null);
|
|
561
561
|
return o({
|
|
562
562
|
focus() {
|
|
563
563
|
var l;
|
|
564
564
|
(l = e.value) == null || l.focus();
|
|
565
565
|
}
|
|
566
|
-
}), (l, n) => (u(),
|
|
567
|
-
f("input",
|
|
566
|
+
}), (l, n) => (u(), v("div", Dl, [
|
|
567
|
+
f("input", ae({
|
|
568
568
|
ref_key: "element",
|
|
569
569
|
ref: e
|
|
570
570
|
}, l.$attrs, {
|
|
@@ -581,19 +581,19 @@ const Dl = { class: "cl-relative" }, Ll = ["value", "disabled", "placeholder"],
|
|
|
581
581
|
}, null, 8, ["class", "icon"]), [
|
|
582
582
|
[H, !l.disabled]
|
|
583
583
|
]),
|
|
584
|
-
l.disabled ?
|
|
584
|
+
l.disabled ? q("", !0) : (u(), v("div", Pl, [
|
|
585
585
|
l.type !== "time" ? (u(), V(d(I), {
|
|
586
586
|
key: 0,
|
|
587
587
|
class: "cl-cursor-pointer hover:cl-text-link-light",
|
|
588
588
|
icon: "ph:arrow-counter-clockwise",
|
|
589
589
|
onClick: n[0] || (n[0] = K((p) => l.$emit("reset"), ["prevent"]))
|
|
590
|
-
})) :
|
|
590
|
+
})) : q("", !0),
|
|
591
591
|
!l.required && l.date && (l.type !== "time" || l.date !== "00:00") ? (u(), V(d(I), {
|
|
592
592
|
key: 1,
|
|
593
593
|
class: "cl-cursor-pointer hover:cl-text-link-light md:cl-ml-0.5",
|
|
594
594
|
icon: "ph:x",
|
|
595
595
|
onClick: n[1] || (n[1] = K((p) => l.$emit("clear"), ["prevent"]))
|
|
596
|
-
})) :
|
|
596
|
+
})) : q("", !0)
|
|
597
597
|
]))
|
|
598
598
|
]));
|
|
599
599
|
}
|
|
@@ -640,16 +640,16 @@ const De = /* @__PURE__ */ fe(Fl, [["__scopeId", "data-v-4c802181"]]), Hl = /* @
|
|
|
640
640
|
break;
|
|
641
641
|
}
|
|
642
642
|
return l.placeholder ?? b;
|
|
643
|
-
}),
|
|
643
|
+
}), i = S(() => l.disabled ? !1 : {
|
|
644
644
|
visibility: "focus",
|
|
645
645
|
showDelay: 150,
|
|
646
646
|
hideDelay: 100
|
|
647
647
|
});
|
|
648
|
-
function
|
|
648
|
+
function c() {
|
|
649
649
|
let b = ke.now().set({ second: 0, millisecond: 0 }).setZone(l.timeZone);
|
|
650
650
|
l.type === "date" && (b = b.set({ hour: 0, minute: 0 }).setZone(l.timeZone)), n.value = b.toJSDate();
|
|
651
651
|
}
|
|
652
|
-
const m =
|
|
652
|
+
const m = A(null);
|
|
653
653
|
return o({
|
|
654
654
|
focus() {
|
|
655
655
|
var b;
|
|
@@ -668,10 +668,10 @@ const De = /* @__PURE__ */ fe(Fl, [["__scopeId", "data-v-4c802181"]]), Hl = /* @
|
|
|
668
668
|
color: "primary",
|
|
669
669
|
"title-position": "left",
|
|
670
670
|
"hide-time-header": "",
|
|
671
|
-
popover:
|
|
671
|
+
popover: i.value
|
|
672
672
|
}, {
|
|
673
673
|
default: F(({ inputValue: w, inputEvents: h }) => [
|
|
674
|
-
$(De,
|
|
674
|
+
$(De, ae(b.$attrs, {
|
|
675
675
|
ref_key: "input",
|
|
676
676
|
ref: m,
|
|
677
677
|
date: w,
|
|
@@ -681,7 +681,7 @@ const De = /* @__PURE__ */ fe(Fl, [["__scopeId", "data-v-4c802181"]]), Hl = /* @
|
|
|
681
681
|
required: b.required,
|
|
682
682
|
disabled: b.disabled,
|
|
683
683
|
onClear: r[0] || (r[0] = (T) => n.value = null),
|
|
684
|
-
onReset:
|
|
684
|
+
onReset: c
|
|
685
685
|
}), null, 16, ["date", "events", "type", "placeholder", "required", "disabled"])
|
|
686
686
|
]),
|
|
687
687
|
_: 1
|
|
@@ -699,10 +699,10 @@ const De = /* @__PURE__ */ fe(Fl, [["__scopeId", "data-v-4c802181"]]), Hl = /* @
|
|
|
699
699
|
color: "primary",
|
|
700
700
|
"title-position": "left",
|
|
701
701
|
"hide-time-header": "",
|
|
702
|
-
popover:
|
|
702
|
+
popover: i.value
|
|
703
703
|
}, {
|
|
704
704
|
default: F(({ inputValue: w, inputEvents: h }) => [
|
|
705
|
-
$(De,
|
|
705
|
+
$(De, ae(b.$attrs, {
|
|
706
706
|
ref_key: "input",
|
|
707
707
|
ref: m,
|
|
708
708
|
date: w,
|
|
@@ -712,7 +712,7 @@ const De = /* @__PURE__ */ fe(Fl, [["__scopeId", "data-v-4c802181"]]), Hl = /* @
|
|
|
712
712
|
required: b.required,
|
|
713
713
|
disabled: b.disabled,
|
|
714
714
|
onClear: r[2] || (r[2] = (T) => n.value = null),
|
|
715
|
-
onReset:
|
|
715
|
+
onReset: c
|
|
716
716
|
}), null, 16, ["date", "events", "type", "placeholder", "required", "disabled"])
|
|
717
717
|
]),
|
|
718
718
|
_: 1
|
|
@@ -739,7 +739,7 @@ function Gl(t) {
|
|
|
739
739
|
function Us() {
|
|
740
740
|
return Gl;
|
|
741
741
|
}
|
|
742
|
-
const
|
|
742
|
+
const Zl = [
|
|
743
743
|
"button",
|
|
744
744
|
"checkbox",
|
|
745
745
|
"color",
|
|
@@ -756,7 +756,7 @@ const xl = [
|
|
|
756
756
|
"text",
|
|
757
757
|
"url",
|
|
758
758
|
...Ee
|
|
759
|
-
],
|
|
759
|
+
], xl = { class: "cl-flex cl-flex-wrap cl-items-center" }, Wl = { class: "cl-flex cl-flex-1 cl-flex-wrap cl-items-center cl-mb-2 cl-mt-3 cl-relative md:cl-mt-0" }, Kl = { class: "cl-absolute cl-bg-grey-0 cl-leading-6 cl-ml-0 cl-px-3 cl-rounded-full cl-text-center cl-text-xs cl-top-full" }, Ql = {
|
|
760
760
|
key: 0,
|
|
761
761
|
class: "cl-w-full"
|
|
762
762
|
}, Jl = ["min", "max", "step", "disabled"], Yl = { class: "cl-absolute cl-bg-grey-0 cl-leading-6 cl-ml-2 cl-px-3 cl-right-0 cl-rounded-full cl-text-center cl-text-xs cl-top-full" }, Xl = {
|
|
@@ -777,28 +777,28 @@ const xl = [
|
|
|
777
777
|
"update:value": null
|
|
778
778
|
},
|
|
779
779
|
setup(t, { expose: o, emit: e }) {
|
|
780
|
-
const l = t, { n, t: p } = oe(), { debounce: s } =
|
|
780
|
+
const l = t, { n, t: p } = oe(), { debounce: s } = cl(), a = A(l.value), i = A(), c = S({
|
|
781
781
|
get: () => l.value,
|
|
782
782
|
set: (h) => e("update:value", h)
|
|
783
783
|
}), m = S(() => l.disabled ? "rgba(153, 153, 153, 0.8)" : "#9acd32"), b = S(() => {
|
|
784
|
-
let h = (
|
|
784
|
+
let h = (c.value - l.min) / (l.max - l.min) * 100;
|
|
785
785
|
return h < 35 && h > 0 ? h < 20 ? h += 0.5 : h += 0.25 : h > 65 && h < 100 && (h > 80 ? h -= 0.5 : h -= 0.25), h;
|
|
786
786
|
}), r = S(() => l.min <= l.max && l.step > 0);
|
|
787
787
|
function w(h, T) {
|
|
788
788
|
const k = (h == null ? void 0 : h.value) ?? "", B = Math.max(Math.min(parseFloat(k) || l.min, l.max), l.min);
|
|
789
|
-
|
|
789
|
+
c.value = l.enforceStep ? Math.ceil(B / l.step) * l.step : B, ye(() => T());
|
|
790
790
|
}
|
|
791
791
|
return Q(() => l.value, () => a.value = l.value), o({
|
|
792
792
|
focus() {
|
|
793
793
|
var h;
|
|
794
|
-
(h =
|
|
794
|
+
(h = i.value) == null || h.focus();
|
|
795
795
|
}
|
|
796
|
-
}), (h, T) => r.value ? (u(),
|
|
797
|
-
L(f("div", { class: "cl-bg-transparent cl-relative cl-text-center cl-text-sm" }, E(
|
|
796
|
+
}), (h, T) => r.value ? (u(), v("div", se(ae({ key: 0 }, h.$attrs)), [
|
|
797
|
+
L(f("div", { class: "cl-bg-transparent cl-relative cl-text-center cl-text-sm" }, E(c.value), 513), [
|
|
798
798
|
[H, !h.showNumericInput]
|
|
799
799
|
]),
|
|
800
|
-
f("div",
|
|
801
|
-
L($(d(
|
|
800
|
+
f("div", xl, [
|
|
801
|
+
L($(d(re), {
|
|
802
802
|
modelValue: a.value,
|
|
803
803
|
"onUpdate:modelValue": T[0] || (T[0] = (k) => a.value = k),
|
|
804
804
|
class: "!cl-text-sm md:!cl-w-auto",
|
|
@@ -813,13 +813,13 @@ const xl = [
|
|
|
813
813
|
]),
|
|
814
814
|
f("div", Wl, [
|
|
815
815
|
f("span", Kl, E(d(n)(h.min, Number.isInteger(h.min) ? d(X).INTEGER : d(X).DECIMAL)), 1),
|
|
816
|
-
typeof
|
|
816
|
+
typeof c.value == "number" ? (u(), v("div", Ql, [
|
|
817
817
|
L(f("input", {
|
|
818
818
|
ref_key: "sliderRef",
|
|
819
|
-
ref:
|
|
820
|
-
"onUpdate:modelValue": T[2] || (T[2] = (k) =>
|
|
819
|
+
ref: i,
|
|
820
|
+
"onUpdate:modelValue": T[2] || (T[2] = (k) => c.value = k),
|
|
821
821
|
class: "cl-align-middle cl-appearance-none cl-bg-gradient-to-r cl-border cl-border-grey-2 cl-delay-500 cl-ease-in cl-flex-1 cl-h-5 cl-mb-2 cl-outline-none cl-rounded-full cl-transition-colors cl-w-full",
|
|
822
|
-
style:
|
|
822
|
+
style: xe({
|
|
823
823
|
background: `linear-gradient(to right, ${m.value} 0%, ${m.value} ${b.value}%, white ${b.value}%, white 100%)`
|
|
824
824
|
}),
|
|
825
825
|
type: "range",
|
|
@@ -830,16 +830,16 @@ const xl = [
|
|
|
830
830
|
}, null, 12, Jl), [
|
|
831
831
|
[
|
|
832
832
|
tl,
|
|
833
|
-
|
|
833
|
+
c.value,
|
|
834
834
|
void 0,
|
|
835
835
|
{ number: !0 }
|
|
836
836
|
]
|
|
837
837
|
])
|
|
838
|
-
])) :
|
|
838
|
+
])) : q("", !0),
|
|
839
839
|
f("span", Yl, E(d(n)(h.max, Number.isInteger(h.max) ? d(X).INTEGER : d(X).DECIMAL)), 1)
|
|
840
840
|
])
|
|
841
841
|
])
|
|
842
|
-
], 16)) : (u(),
|
|
842
|
+
], 16)) : (u(), v("div", Xl, E(d(p)("slider.invalidProps")), 1));
|
|
843
843
|
}
|
|
844
844
|
});
|
|
845
845
|
const lt = /* @__PURE__ */ fe(et, [["__scopeId", "data-v-849763cf"]]);
|
|
@@ -906,10 +906,10 @@ const nt = { class: "cl-flex cl-justify-between" }, st = { class: "cl-w-full" },
|
|
|
906
906
|
}, rt = {
|
|
907
907
|
key: 1,
|
|
908
908
|
class: "cl-bg-danger-light cl-block cl-max-h-6 cl-mb-1 cl-ml-2 cl-px-2 cl-rounded-md cl-text-center cl-text-danger-default cl-text-xs"
|
|
909
|
-
},
|
|
909
|
+
}, it = {
|
|
910
910
|
key: 0,
|
|
911
911
|
class: "cl-relative"
|
|
912
|
-
},
|
|
912
|
+
}, ct = ["type", "disabled", "min", "max", "minlength", "maxlength", "step", "placeholder", "accept", "name", "autocomplete"], ut = { key: 0 }, dt = {
|
|
913
913
|
key: 2,
|
|
914
914
|
class: "cl-h-[5.78rem] cl-pb-2 md:cl-h-20"
|
|
915
915
|
}, pt = {
|
|
@@ -919,6 +919,7 @@ const nt = { class: "cl-flex cl-justify-between" }, st = { class: "cl-w-full" },
|
|
|
919
919
|
key: 1,
|
|
920
920
|
class: "cl-bg-danger-light cl-px-2 cl-rounded-md cl-text-center cl-text-danger-default cl-text-xs cl-w-auto cl-whitespace-pre-line"
|
|
921
921
|
}, mt = /* @__PURE__ */ U({
|
|
922
|
+
inheritAttrs: !1,
|
|
922
923
|
__name: "cl-ui-input",
|
|
923
924
|
props: {
|
|
924
925
|
inputType: { default: "text" },
|
|
@@ -949,27 +950,27 @@ const nt = { class: "cl-flex cl-justify-between" }, st = { class: "cl-w-full" },
|
|
|
949
950
|
},
|
|
950
951
|
emits: ["update:model-value", "click", "focus", "input", "change", "validated"],
|
|
951
952
|
setup(t, { expose: o, emit: e }) {
|
|
952
|
-
const l = t, n =
|
|
953
|
+
const l = t, n = A(null), p = A(!1), s = A(!1), a = S(ne), i = S(() => l.placeholderText.trim() !== "" ? l.placeholderText : l.label), c = A(0), m = S({
|
|
953
954
|
get: () => l.modelValue,
|
|
954
|
-
set: (
|
|
955
|
+
set: (g) => y(g, !1)
|
|
955
956
|
}), b = S({
|
|
956
957
|
get: () => l.modelValue,
|
|
957
|
-
set: (
|
|
958
|
-
}), r = S(() => typeof l.min == "number" ? l.min.toString() : l.min), w = S(() => typeof l.max == "number" ? l.max.toString() : l.max), h = S(() => typeof l.min == "number" || l.min === null ? l.min : parseFloat(l.min)), T = S(() => typeof l.max == "number" || l.max === null ? l.max : parseFloat(l.max)), k = S(() => l.messageWhenValid.trim() !== "" ? l.messageWhenValid : ""), B =
|
|
959
|
-
var
|
|
958
|
+
set: (g) => z(g)
|
|
959
|
+
}), r = S(() => typeof l.min == "number" ? l.min.toString() : l.min), w = S(() => typeof l.max == "number" ? l.max.toString() : l.max), h = S(() => typeof l.min == "number" || l.min === null ? l.min : parseFloat(l.min)), T = S(() => typeof l.max == "number" || l.max === null ? l.max : parseFloat(l.max)), k = S(() => l.messageWhenValid.trim() !== "" ? l.messageWhenValid : ""), B = A(!0), O = A([]), R = S(() => {
|
|
960
|
+
var g, N;
|
|
960
961
|
return [
|
|
961
|
-
...((
|
|
962
|
+
...((g = O.value) == null ? void 0 : g.filter((M) => ((M == null ? void 0 : M.length) ?? 0) > 0)) ?? [],
|
|
962
963
|
...((N = l.externalErrors) == null ? void 0 : N.filter((M) => ((M == null ? void 0 : M.length) ?? 0) > 0)) ?? []
|
|
963
964
|
].join(`
|
|
964
965
|
`);
|
|
965
966
|
});
|
|
966
|
-
async function z(
|
|
967
|
-
l.validateOn === "input" && await D(
|
|
967
|
+
async function z(g) {
|
|
968
|
+
l.validateOn === "input" && await D(g), e("update:model-value", g);
|
|
968
969
|
}
|
|
969
|
-
async function y(
|
|
970
|
-
l.onInputFunction !== void 0 && (
|
|
970
|
+
async function y(g, N) {
|
|
971
|
+
l.onInputFunction !== void 0 && (g = l.onInputFunction(g)), (N || l.validateOn === "input") && await D(g), e("update:model-value", g);
|
|
971
972
|
}
|
|
972
|
-
function D(
|
|
973
|
+
function D(g) {
|
|
973
974
|
const N = {
|
|
974
975
|
message: "",
|
|
975
976
|
valid: !0
|
|
@@ -977,119 +978,119 @@ const nt = { class: "cl-flex cl-justify-between" }, st = { class: "cl-w-full" },
|
|
|
977
978
|
l.customValidationFunction === null || l.customValidationFunction === void 0 ? new Promise((he) => {
|
|
978
979
|
he(N);
|
|
979
980
|
}) : new Promise((he) => {
|
|
980
|
-
he(l.customValidationFunction(l.label,
|
|
981
|
+
he(l.customValidationFunction(l.label, g));
|
|
981
982
|
})
|
|
982
983
|
];
|
|
983
|
-
return (typeof
|
|
984
|
+
return (typeof g == "string" || typeof g == "number") && (M.push(Ul(l.min, l.inputType, l.label, g)), M.push(Bl(l.max, l.inputType, l.label, g))), l.isRequired && M.push(Ml(l.label, g)), l.inputType === "email" && typeof g == "string" && M.push(Vl(l.label, g)), Promise.all(M).then((he) => {
|
|
984
985
|
const el = [...he.map((Ce) => Ce.message)], Be = he.some((Ce) => Ce.message.length > 0 && Ce.valid === !1) || l.externalErrors.length > 0;
|
|
985
|
-
Be ? (O.value = el, e("validated", !1,
|
|
986
|
+
Be ? (O.value = el, e("validated", !1, g)) : (O.value = [], e("validated", !0, g)), B.value = !Be;
|
|
986
987
|
});
|
|
987
988
|
}
|
|
988
989
|
function Y() {
|
|
989
|
-
let
|
|
990
|
-
return l.inputType === "color" && m.value && (l.disabled ?
|
|
990
|
+
let g = "";
|
|
991
|
+
return l.inputType === "color" && m.value && (l.disabled ? g = "background: #999999" : g = `background: ${m.value};`), g;
|
|
991
992
|
}
|
|
992
|
-
function W(
|
|
993
|
-
we(l.inputType) ? (
|
|
993
|
+
function W(g) {
|
|
994
|
+
we(l.inputType) ? (g.preventDefault(), e("click", g)) : l.inputType === "checkbox" && e("click", g);
|
|
994
995
|
}
|
|
995
|
-
function ue(
|
|
996
|
+
function ue(g) {
|
|
996
997
|
if (n.value) {
|
|
997
998
|
n.value.stepUp(), n.value.focus(), y(n.value.valueAsNumber, !1);
|
|
998
999
|
const N = {
|
|
999
1000
|
target: n.value
|
|
1000
1001
|
};
|
|
1001
|
-
e("input", N, n.value.valueAsNumber), e("change",
|
|
1002
|
+
e("input", N, n.value.valueAsNumber), e("change", g, n.value.valueAsNumber);
|
|
1002
1003
|
}
|
|
1003
1004
|
}
|
|
1004
|
-
function Ne(
|
|
1005
|
+
function Ne(g) {
|
|
1005
1006
|
if (n.value) {
|
|
1006
1007
|
n.value.stepDown(), n.value.focus(), y(n.value.valueAsNumber, !1);
|
|
1007
1008
|
const N = {
|
|
1008
1009
|
target: n.value
|
|
1009
1010
|
};
|
|
1010
|
-
e("input", N, n.value.valueAsNumber), e("change",
|
|
1011
|
+
e("input", N, n.value.valueAsNumber), e("change", g, n.value.valueAsNumber);
|
|
1011
1012
|
}
|
|
1012
1013
|
}
|
|
1013
|
-
function be(
|
|
1014
|
-
p.value =
|
|
1014
|
+
function be(g) {
|
|
1015
|
+
p.value = g;
|
|
1015
1016
|
}
|
|
1016
1017
|
function ve() {
|
|
1017
1018
|
s.value = !0, be(!1);
|
|
1018
1019
|
}
|
|
1019
1020
|
function C() {
|
|
1020
|
-
|
|
1021
|
+
c.value++;
|
|
1021
1022
|
}
|
|
1022
|
-
function G(
|
|
1023
|
-
|
|
1023
|
+
function G(g) {
|
|
1024
|
+
g.target.blur();
|
|
1024
1025
|
}
|
|
1025
1026
|
function ne() {
|
|
1026
1027
|
var M;
|
|
1027
|
-
let
|
|
1028
|
+
let g = !0;
|
|
1028
1029
|
const N = a.value;
|
|
1029
|
-
return p.value ?
|
|
1030
|
+
return p.value ? g = N : s.value && ((M = m.value) == null ? void 0 : M.toString().trim()) === "" && (g = !1), g;
|
|
1030
1031
|
}
|
|
1031
|
-
async function
|
|
1032
|
-
const N = Fe(
|
|
1033
|
-
l.validateOn === "change" && await D(N), e("change",
|
|
1032
|
+
async function x(g) {
|
|
1033
|
+
const N = Fe(g, l.inputType);
|
|
1034
|
+
l.validateOn === "change" && await D(N), e("change", g, N);
|
|
1034
1035
|
}
|
|
1035
|
-
return
|
|
1036
|
+
return qe(() => {
|
|
1036
1037
|
l.validateImmediately && y(l.modelValue, !0);
|
|
1037
1038
|
}), Q(() => l.isRequired, () => y(l.modelValue, !0)), Q(() => l.externalErrors, async () => {
|
|
1038
1039
|
await D(m.value), e("update:model-value", m.value);
|
|
1039
1040
|
}), Q(() => l.modelValue, () => y(l.modelValue, !0)), o({
|
|
1040
1041
|
focus() {
|
|
1041
|
-
var
|
|
1042
|
-
(
|
|
1042
|
+
var g;
|
|
1043
|
+
(g = n.value) == null || g.focus();
|
|
1043
1044
|
},
|
|
1044
1045
|
blur() {
|
|
1045
|
-
var
|
|
1046
|
-
(
|
|
1046
|
+
var g;
|
|
1047
|
+
(g = n.value) == null || g.blur();
|
|
1047
1048
|
}
|
|
1048
|
-
}), (
|
|
1049
|
-
key:
|
|
1049
|
+
}), (g, N) => (u(), v("div", ae({ ...g.$attrs, id: void 0 }, {
|
|
1050
|
+
key: c.value,
|
|
1050
1051
|
class: "cl-align-top cl-border-none cl-inline-block cl-text-left"
|
|
1051
|
-
}, [
|
|
1052
|
+
}), [
|
|
1052
1053
|
f("div", {
|
|
1053
1054
|
onMouseenter: N[11] || (N[11] = (M) => be(!0)),
|
|
1054
1055
|
onMouseleave: N[12] || (N[12] = (M) => be(!1))
|
|
1055
1056
|
}, [
|
|
1056
1057
|
f("div", nt, [
|
|
1057
1058
|
f("div", st, [
|
|
1058
|
-
L(f("label", { class: "cl-block cl-mb-1 cl-text-grey-4 cl-text-xs cl-tracking-widest" }, E(
|
|
1059
|
-
[H,
|
|
1059
|
+
L(f("label", { class: "cl-block cl-mb-1 cl-text-grey-4 cl-text-xs cl-tracking-widest" }, E(g.label), 513), [
|
|
1060
|
+
[H, g.showLabel && g.label !== ""]
|
|
1060
1061
|
])
|
|
1061
1062
|
]),
|
|
1062
|
-
|
|
1063
|
-
|
|
1063
|
+
g.isRequired && a.value ? (u(), v("label", at, " * ")) : q("", !0),
|
|
1064
|
+
g.isRequired && !a.value && g.requiredText.length ? (u(), v("label", rt, E(g.requiredText), 1)) : q("", !0)
|
|
1064
1065
|
]),
|
|
1065
|
-
|
|
1066
|
-
L(f("input",
|
|
1066
|
+
g.inputType !== "range" && !d(Pe)(g.inputType) ? (u(), v("div", it, [
|
|
1067
|
+
L(f("input", ae({
|
|
1067
1068
|
ref_key: "inputElement",
|
|
1068
1069
|
ref: n,
|
|
1069
1070
|
"onUpdate:modelValue": N[0] || (N[0] = (M) => m.value = M)
|
|
1070
|
-
},
|
|
1071
|
+
}, g.$attrs, {
|
|
1071
1072
|
class: ["!cl-mb-1 cl-block cl-border cl-duration-300 cl-h-full cl-transition cl-w-full focus:cl-outline-none", {
|
|
1072
|
-
"hover:!cl-border-grey-3":
|
|
1073
|
-
"!cl-cursor-default":
|
|
1073
|
+
"hover:!cl-border-grey-3": g.disabled === !1 && !d(we)(g.inputType),
|
|
1074
|
+
"!cl-cursor-default": g.disabled,
|
|
1074
1075
|
"!cl-border-danger-default": !B.value,
|
|
1075
|
-
"!cl-border-primary-default": B.value &&
|
|
1076
|
-
"cl-border-grey-0 focus:cl-border-blue-light": B.value && !d(we)(
|
|
1077
|
-
"!cl-p-2":
|
|
1078
|
-
"cl-p-3 cl-rounded-lg": !d(we)(
|
|
1079
|
-
[`${
|
|
1076
|
+
"!cl-border-primary-default": B.value && g.highlightWhenValid,
|
|
1077
|
+
"cl-border-grey-0 focus:cl-border-blue-light": B.value && !d(we)(g.inputType),
|
|
1078
|
+
"!cl-p-2": g.inputType === "checkbox" || g.inputType === "radio",
|
|
1079
|
+
"cl-p-3 cl-rounded-lg": !d(we)(g.inputType),
|
|
1080
|
+
[`${g.inputSpecificClasses}`]: g.inputSpecificClasses !== ""
|
|
1080
1081
|
}],
|
|
1081
1082
|
style: Y(),
|
|
1082
|
-
type:
|
|
1083
|
-
disabled:
|
|
1084
|
-
min:
|
|
1085
|
-
max:
|
|
1086
|
-
minlength:
|
|
1087
|
-
maxlength:
|
|
1088
|
-
step:
|
|
1089
|
-
placeholder:
|
|
1090
|
-
accept:
|
|
1091
|
-
name:
|
|
1092
|
-
autocomplete:
|
|
1083
|
+
type: g.inputType,
|
|
1084
|
+
disabled: g.disabled,
|
|
1085
|
+
min: g.min ?? void 0,
|
|
1086
|
+
max: g.max ?? void 0,
|
|
1087
|
+
minlength: g.min !== null && d(Le)(g.inputType) ? g.min : void 0,
|
|
1088
|
+
maxlength: g.max !== null && d(Le)(g.inputType) ? g.max : void 0,
|
|
1089
|
+
step: g.step,
|
|
1090
|
+
placeholder: i.value,
|
|
1091
|
+
accept: g.fileExtensions,
|
|
1092
|
+
name: g.group,
|
|
1093
|
+
autocomplete: g.autocomplete,
|
|
1093
1094
|
onClick: N[1] || (N[1] = (M) => W(M)),
|
|
1094
1095
|
onFocus: N[2] || (N[2] = (M) => e("focus")),
|
|
1095
1096
|
onBlur: N[3] || (N[3] = K((M) => {
|
|
@@ -1097,10 +1098,10 @@ const nt = { class: "cl-flex cl-justify-between" }, st = { class: "cl-w-full" },
|
|
|
1097
1098
|
}, ["self"])),
|
|
1098
1099
|
onMousewheelPassive: G,
|
|
1099
1100
|
onInput: N[4] || (N[4] = (M) => {
|
|
1100
|
-
e("input", M, d(Fe)(M,
|
|
1101
|
+
e("input", M, d(Fe)(M, g.inputType));
|
|
1101
1102
|
}),
|
|
1102
|
-
onChange:
|
|
1103
|
-
}), null, 16,
|
|
1103
|
+
onChange: x
|
|
1104
|
+
}), null, 16, ct), [
|
|
1104
1105
|
[ol, m.value]
|
|
1105
1106
|
]),
|
|
1106
1107
|
$(ge, {
|
|
@@ -1108,7 +1109,7 @@ const nt = { class: "cl-flex cl-justify-between" }, st = { class: "cl-w-full" },
|
|
|
1108
1109
|
duration: 300
|
|
1109
1110
|
}, {
|
|
1110
1111
|
default: F(() => [
|
|
1111
|
-
|
|
1112
|
+
g.inputType === "number" && !g.disabled && g.showArrows ? L((u(), v("div", ut, [
|
|
1112
1113
|
$(d(I), {
|
|
1113
1114
|
icon: "ph:caret-up-bold",
|
|
1114
1115
|
class: "cl-absolute cl-bg-link-default cl-right-1 cl-rounded-full cl-text-sm cl-text-white cl-top-1 hover:cl-bg-link-light hover:cl-cursor-pointer",
|
|
@@ -1125,30 +1126,30 @@ const nt = { class: "cl-flex cl-justify-between" }, st = { class: "cl-w-full" },
|
|
|
1125
1126
|
})
|
|
1126
1127
|
], 512)), [
|
|
1127
1128
|
[H, p.value]
|
|
1128
|
-
]) :
|
|
1129
|
+
]) : q("", !0)
|
|
1129
1130
|
]),
|
|
1130
1131
|
_: 1
|
|
1131
1132
|
})
|
|
1132
|
-
])) : d(Pe)(
|
|
1133
|
+
])) : d(Pe)(g.inputType) ? (u(), V(d(Hl), ae({ key: 1 }, g.$attrs, {
|
|
1133
1134
|
ref_key: "inputElement",
|
|
1134
1135
|
ref: n,
|
|
1135
1136
|
date: b.value,
|
|
1136
1137
|
"onUpdate:date": N[7] || (N[7] = (M) => b.value = M),
|
|
1137
1138
|
class: ["cl-block cl-duration-300 cl-h-fit cl-mb-1 cl-rounded-lg cl-text-sm cl-transition cl-w-full focus:cl-outline-none", {
|
|
1138
|
-
"hover:cl-border-grey-3": !
|
|
1139
|
+
"hover:cl-border-grey-3": !g.disabled,
|
|
1139
1140
|
"!cl-border-danger-default": !B.value,
|
|
1140
|
-
"!cl-border-primary-default": B.value &&
|
|
1141
|
+
"!cl-border-primary-default": B.value && g.highlightWhenValid
|
|
1141
1142
|
}],
|
|
1142
|
-
disabled:
|
|
1143
|
-
required:
|
|
1144
|
-
type: d(ot)(
|
|
1145
|
-
"time-zone":
|
|
1143
|
+
disabled: g.disabled,
|
|
1144
|
+
required: g.isRequired,
|
|
1145
|
+
type: d(ot)(g.inputType),
|
|
1146
|
+
"time-zone": g.timeZone,
|
|
1146
1147
|
min: r.value,
|
|
1147
1148
|
max: w.value,
|
|
1148
|
-
placeholder:
|
|
1149
|
+
placeholder: i.value,
|
|
1149
1150
|
onBlur: K(ve, ["self"]),
|
|
1150
1151
|
onFocus: N[8] || (N[8] = (M) => e("focus"))
|
|
1151
|
-
}), null, 16, ["date", "class", "disabled", "required", "type", "time-zone", "min", "max", "placeholder", "onBlur"])) :
|
|
1152
|
+
}), null, 16, ["date", "class", "disabled", "required", "type", "time-zone", "min", "max", "placeholder", "onBlur"])) : g.inputType === "range" && typeof m.value == "number" ? (u(), v("div", dt, [
|
|
1152
1153
|
$(d(lt), {
|
|
1153
1154
|
ref_key: "inputElement",
|
|
1154
1155
|
ref: n,
|
|
@@ -1156,20 +1157,20 @@ const nt = { class: "cl-flex cl-justify-between" }, st = { class: "cl-w-full" },
|
|
|
1156
1157
|
"onUpdate:value": N[9] || (N[9] = (M) => m.value = M),
|
|
1157
1158
|
min: h.value ?? 0,
|
|
1158
1159
|
max: T.value ?? 1e3,
|
|
1159
|
-
step:
|
|
1160
|
-
disabled:
|
|
1160
|
+
step: g.step,
|
|
1161
|
+
disabled: g.disabled,
|
|
1161
1162
|
"show-numeric-input": !1,
|
|
1162
1163
|
onBlur: K(ve, ["self"]),
|
|
1163
1164
|
onFocus: N[10] || (N[10] = (M) => e("focus"))
|
|
1164
1165
|
}, null, 8, ["value", "min", "max", "step", "disabled", "onBlur"])
|
|
1165
|
-
])) :
|
|
1166
|
+
])) : q("", !0)
|
|
1166
1167
|
], 32),
|
|
1167
|
-
B.value && k.value ? (u(),
|
|
1168
|
-
!B.value && R.value.length > 0 &&
|
|
1169
|
-
]));
|
|
1168
|
+
B.value && k.value ? (u(), v("div", pt, E(k.value), 1)) : q("", !0),
|
|
1169
|
+
!B.value && R.value.length > 0 && g.showValidationMessages ? (u(), v("div", ft, E(R.value), 1)) : q("", !0)
|
|
1170
|
+
], 16));
|
|
1170
1171
|
}
|
|
1171
1172
|
});
|
|
1172
|
-
const
|
|
1173
|
+
const re = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d01c4a47"]]), gt = { class: "cl-align-items-center cl-bg-black cl-bg-opacity-40 cl-bottom-0 cl-fixed cl-flex cl-h-screen cl-justify-center cl-left-0 cl-right-0 cl-top-0 cl-w-full cl-z-40" }, vt = ["onKeypress"], bt = { class: "cl-overflow-y-auto cl-overscroll-y-none cl-p-2 cl-w-full" }, Ye = /* @__PURE__ */ U({
|
|
1173
1174
|
inheritAttrs: !1,
|
|
1174
1175
|
__name: "cl-ui-modal",
|
|
1175
1176
|
props: {
|
|
@@ -1178,7 +1179,7 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1178
1179
|
size: { default: "medium" }
|
|
1179
1180
|
},
|
|
1180
1181
|
setup(t) {
|
|
1181
|
-
const o = t, e =
|
|
1182
|
+
const o = t, e = A(!1);
|
|
1182
1183
|
function l() {
|
|
1183
1184
|
e.value = !0, document.addEventListener("keydown", p);
|
|
1184
1185
|
}
|
|
@@ -1188,13 +1189,13 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1188
1189
|
function p(s) {
|
|
1189
1190
|
s.key === "Escape" && n();
|
|
1190
1191
|
}
|
|
1191
|
-
return (s, a) => (u(),
|
|
1192
|
-
j(s.$slots, "trigger", se(
|
|
1192
|
+
return (s, a) => (u(), v(P, null, [
|
|
1193
|
+
j(s.$slots, "trigger", se(ie({ open: l }))),
|
|
1193
1194
|
(u(), V(_e, { to: "body" }, [
|
|
1194
1195
|
$(ge, { name: "fade" }, {
|
|
1195
1196
|
default: F(() => [
|
|
1196
1197
|
L(f("div", gt, [
|
|
1197
|
-
f("div",
|
|
1198
|
+
f("div", ae(s.$attrs, {
|
|
1198
1199
|
class: ["cl-bg-white cl-flex cl-flex-wrap cl-max-h-[calc(100vh-8rem)] cl-mx-0 cl-my-auto cl-overflow-y-auto cl-overscroll-y-none cl-relative cl-rounded-lg cl-shadow-lg", {
|
|
1199
1200
|
"lg:cl-w-2/12 cl-w-10/12": s.size === "x-small",
|
|
1200
1201
|
"cl-w-6/12": s.size === "small",
|
|
@@ -1225,9 +1226,9 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1225
1226
|
j(s.$slots, "title")
|
|
1226
1227
|
], 2),
|
|
1227
1228
|
f("div", bt, [
|
|
1228
|
-
j(s.$slots, "default", se(
|
|
1229
|
+
j(s.$slots, "default", se(ie({ close: n })))
|
|
1229
1230
|
]),
|
|
1230
|
-
j(s.$slots, "footer", se(
|
|
1231
|
+
j(s.$slots, "footer", se(ie({ close: n })))
|
|
1231
1232
|
], 16)
|
|
1232
1233
|
], 512), [
|
|
1233
1234
|
[H, e.value]
|
|
@@ -1252,8 +1253,8 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1252
1253
|
"clear-object": null
|
|
1253
1254
|
},
|
|
1254
1255
|
setup(t) {
|
|
1255
|
-
return (o, e) => (u(),
|
|
1256
|
-
o.additionalText !== "" ? (u(),
|
|
1256
|
+
return (o, e) => (u(), v("div", ht, [
|
|
1257
|
+
o.additionalText !== "" ? (u(), v("div", yt, E(o.additionalText), 1)) : q("", !0),
|
|
1257
1258
|
f("div", {
|
|
1258
1259
|
class: _({
|
|
1259
1260
|
"cl-w-1/2": o.additionalText !== "",
|
|
@@ -1292,35 +1293,35 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1292
1293
|
},
|
|
1293
1294
|
setup(t, { emit: o }) {
|
|
1294
1295
|
const e = t, l = S(() => {
|
|
1295
|
-
var
|
|
1296
|
-
return ((
|
|
1296
|
+
var c;
|
|
1297
|
+
return ((c = e.option) == null ? void 0 : c.name) ?? e.text;
|
|
1297
1298
|
}), n = S(() => {
|
|
1298
|
-
var
|
|
1299
|
-
return ((
|
|
1300
|
-
}), p =
|
|
1299
|
+
var c;
|
|
1300
|
+
return ((c = e.option) == null ? void 0 : c.parentName) ?? "";
|
|
1301
|
+
}), p = A(!1);
|
|
1301
1302
|
function s() {
|
|
1302
|
-
var
|
|
1303
|
-
e.isCreateNewOption === !0 ? o("create-object") : o("select-object", (
|
|
1303
|
+
var c;
|
|
1304
|
+
e.isCreateNewOption === !0 ? o("create-object") : o("select-object", (c = e.option) == null ? void 0 : c.id);
|
|
1304
1305
|
}
|
|
1305
|
-
function a(
|
|
1306
|
-
|
|
1306
|
+
function a(c) {
|
|
1307
|
+
c === !0 ? (p.value = !0, o("option-highlighted", e.index)) : e.index !== e.selectedIndex && (p.value = !1);
|
|
1307
1308
|
}
|
|
1308
|
-
function
|
|
1309
|
+
function i() {
|
|
1309
1310
|
e.selectedIndex === e.index ? p.value = !0 : p.value = !1;
|
|
1310
1311
|
}
|
|
1311
|
-
return Q(() => e.selectedIndex, () =>
|
|
1312
|
+
return Q(() => e.selectedIndex, () => i()), (c, m) => {
|
|
1312
1313
|
var b, r;
|
|
1313
|
-
return u(),
|
|
1314
|
+
return u(), v("div", {
|
|
1314
1315
|
class: _(["cl-cursor-pointer cl-duration-75 cl-flex cl-p-1 cl-text-left cl-transition-colors", {
|
|
1315
1316
|
"cl-bg-white": p.value === !1,
|
|
1316
|
-
"cl-bg-link-light cl-text-white cl-opacity-90": p.value &&
|
|
1317
|
-
"cl-bg-primary-default cl-text-white cl-opacity-90": p.value &&
|
|
1317
|
+
"cl-bg-link-light cl-text-white cl-opacity-90": p.value && c.isCreateNewOption === !1,
|
|
1318
|
+
"cl-bg-primary-default cl-text-white cl-opacity-90": p.value && c.isCreateNewOption
|
|
1318
1319
|
}]),
|
|
1319
1320
|
onMousedown: s,
|
|
1320
1321
|
onMousemove: m[0] || (m[0] = (w) => a(!0)),
|
|
1321
1322
|
onMouseleave: m[1] || (m[1] = (w) => a(!1))
|
|
1322
1323
|
}, [
|
|
1323
|
-
|
|
1324
|
+
c.option !== null && ((b = c.option) == null ? void 0 : b.parentId) !== 0 && ((r = c.option) == null ? void 0 : r.parentId) !== void 0 ? (u(), v("div", wt, E(n.value), 1)) : q("", !0),
|
|
1324
1325
|
f("div", {
|
|
1325
1326
|
class: _({
|
|
1326
1327
|
"cl-w-1/2": n.value !== "",
|
|
@@ -1336,7 +1337,7 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1336
1337
|
icon: "ph:plus"
|
|
1337
1338
|
}, null, 8, ["class"])
|
|
1338
1339
|
], 512), [
|
|
1339
|
-
[H,
|
|
1340
|
+
[H, c.isCreateNewOption]
|
|
1340
1341
|
])
|
|
1341
1342
|
], 34);
|
|
1342
1343
|
};
|
|
@@ -1362,8 +1363,8 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1362
1363
|
"hide-dropdown": null
|
|
1363
1364
|
},
|
|
1364
1365
|
setup(t, { emit: o }) {
|
|
1365
|
-
const e = t, { t: l } = oe(), n =
|
|
1366
|
-
function
|
|
1366
|
+
const e = t, { t: l } = oe(), n = A(""), p = A(!1), s = A(-1), a = S(() => p.value ? -1 : 0), i = A();
|
|
1367
|
+
function c(y) {
|
|
1367
1368
|
(y === void 0 || (y == null ? void 0 : y.code.startsWith("Arrow")) === !1 && (y == null ? void 0 : y.code.startsWith("Control")) === !1 && (y == null ? void 0 : y.code.startsWith("Shift")) === !1 && (y == null ? void 0 : y.code.startsWith("Tab")) === !1 && (y == null ? void 0 : y.code) !== "Enter") && (o("search", n.value), s.value = -2);
|
|
1368
1369
|
}
|
|
1369
1370
|
function m(y) {
|
|
@@ -1395,7 +1396,7 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1395
1396
|
}
|
|
1396
1397
|
function B() {
|
|
1397
1398
|
var y;
|
|
1398
|
-
e.results && e.results.length > 1 && ((y =
|
|
1399
|
+
e.results && e.results.length > 1 && ((y = i.value) == null || y.scrollTo(0, (s.value + 1) * 34 - 34 * 2));
|
|
1399
1400
|
}
|
|
1400
1401
|
function O() {
|
|
1401
1402
|
let y = !1;
|
|
@@ -1405,22 +1406,22 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1405
1406
|
s.value = y;
|
|
1406
1407
|
}
|
|
1407
1408
|
function z() {
|
|
1408
|
-
e.isVisible === !0 && (n.value = "",
|
|
1409
|
+
e.isVisible === !0 && (n.value = "", c(), ye(() => {
|
|
1409
1410
|
var y, D;
|
|
1410
|
-
return (D = (y =
|
|
1411
|
+
return (D = (y = i.value) == null ? void 0 : y.querySelector("input")) == null ? void 0 : D.focus();
|
|
1411
1412
|
}));
|
|
1412
1413
|
}
|
|
1413
|
-
return Q(() => e.results, () => O()), Q(() => e.errorMessage, () => O()), Q(() => e.isVisible, () => z()),
|
|
1414
|
+
return Q(() => e.results, () => O()), Q(() => e.errorMessage, () => O()), Q(() => e.isVisible, () => z()), qe(() => {
|
|
1414
1415
|
var y;
|
|
1415
|
-
return (y =
|
|
1416
|
+
return (y = i.value) == null ? void 0 : y.addEventListener("keydown", k);
|
|
1416
1417
|
}), Ie(() => {
|
|
1417
1418
|
var y;
|
|
1418
|
-
return (y =
|
|
1419
|
+
return (y = i.value) == null ? void 0 : y.removeEventListener("keydown", k);
|
|
1419
1420
|
}), (y, D) => {
|
|
1420
1421
|
var Y;
|
|
1421
|
-
return u(),
|
|
1422
|
+
return u(), v("div", {
|
|
1422
1423
|
ref_key: "container",
|
|
1423
|
-
ref:
|
|
1424
|
+
ref: i,
|
|
1424
1425
|
class: "cl-absolute cl-bg-white cl-border cl-border-collapse cl-border-grey-0 cl-h-52 cl-overflow-y-auto cl-overscroll-y-none cl-rounded cl-text-sm cl-w-full cl-z-20",
|
|
1425
1426
|
onKeydown: [
|
|
1426
1427
|
D[2] || (D[2] = $e(K((W) => h(a.value), ["prevent", "stop"]), ["up"])),
|
|
@@ -1429,13 +1430,13 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1429
1430
|
onKeyup: $e(K(T, ["prevent", "stop"]), ["enter"])
|
|
1430
1431
|
}, [
|
|
1431
1432
|
f("div", Ct, [
|
|
1432
|
-
$(
|
|
1433
|
+
$(re, {
|
|
1433
1434
|
modelValue: n.value,
|
|
1434
1435
|
"onUpdate:modelValue": D[0] || (D[0] = (W) => n.value = W),
|
|
1435
1436
|
class: "!cl-mr-0 cl-w-full",
|
|
1436
1437
|
"input-type": "text",
|
|
1437
1438
|
"placeholder-text": d(l)("comboBox.searchHint", { object: y.objectType }),
|
|
1438
|
-
onKeyup:
|
|
1439
|
+
onKeyup: c,
|
|
1439
1440
|
onBlur: r
|
|
1440
1441
|
}, null, 8, ["modelValue", "placeholder-text"]),
|
|
1441
1442
|
L($(Se, { class: "cl-absolute cl-ml-2 cl-mt-11" }, null, 512), [
|
|
@@ -1447,22 +1448,22 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1447
1448
|
"show-clear-button": y.canClearSelectedObject,
|
|
1448
1449
|
text: y.currentObjectName,
|
|
1449
1450
|
onClearObject: D[1] || (D[1] = (W) => y.$emit("clear-object"))
|
|
1450
|
-
}, null, 8, ["show-clear-button", "text"])) :
|
|
1451
|
+
}, null, 8, ["show-clear-button", "text"])) : q("", !0),
|
|
1451
1452
|
y.objectParentType !== "" && y.results !== void 0 && y.results.length > 0 && y.errorMessage === "" ? (u(), V(Te, {
|
|
1452
1453
|
key: 1,
|
|
1453
1454
|
text: y.objectType,
|
|
1454
1455
|
"additional-text": y.objectParentType,
|
|
1455
1456
|
class: "cl-bg-grey-2 cl-mt-1"
|
|
1456
|
-
}, null, 8, ["text", "additional-text"])) :
|
|
1457
|
+
}, null, 8, ["text", "additional-text"])) : q("", !0),
|
|
1457
1458
|
y.results !== null && ((Y = y.results) == null ? void 0 : Y.length) === 0 && n.value.trim() !== "" && y.canCreateNewObject === !1 && y.errorMessage === "" ? (u(), V(Te, {
|
|
1458
1459
|
key: 2,
|
|
1459
1460
|
text: d(l)("comboBox.noResults", { value: n.value })
|
|
1460
|
-
}, null, 8, ["text"])) :
|
|
1461
|
+
}, null, 8, ["text"])) : q("", !0),
|
|
1461
1462
|
y.errorMessage !== "" ? (u(), V(Te, {
|
|
1462
1463
|
key: 3,
|
|
1463
1464
|
class: "!cl-bg-danger-light cl-border-danger-light cl-rounded cl-text-danger-dark",
|
|
1464
1465
|
text: d(l)("comboBox.errorMessage", { error: y.errorMessage })
|
|
1465
|
-
}, null, 8, ["text"])) :
|
|
1466
|
+
}, null, 8, ["text"])) : q("", !0),
|
|
1466
1467
|
p.value ? (u(), V(He, {
|
|
1467
1468
|
key: 4,
|
|
1468
1469
|
"is-create-new-option": !0,
|
|
@@ -1472,9 +1473,9 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1472
1473
|
class: "cl-px-2",
|
|
1473
1474
|
onCreateObject: b,
|
|
1474
1475
|
onOptionHighlighted: R
|
|
1475
|
-
}, null, 8, ["text", "selected-index"])) :
|
|
1476
|
-
y.errorMessage === "" && y.results !== null ? (u(),
|
|
1477
|
-
(u(!0),
|
|
1476
|
+
}, null, 8, ["text", "selected-index"])) : q("", !0),
|
|
1477
|
+
y.errorMessage === "" && y.results !== null ? (u(), v("div", Tt, [
|
|
1478
|
+
(u(!0), v(P, null, J(y.results, (W, ue) => (u(), V(He, {
|
|
1478
1479
|
key: ue,
|
|
1479
1480
|
option: W,
|
|
1480
1481
|
index: ue,
|
|
@@ -1483,11 +1484,11 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1483
1484
|
onSelectObject: m,
|
|
1484
1485
|
onOptionHighlighted: R
|
|
1485
1486
|
}, null, 8, ["option", "index", "selected-index"]))), 128))
|
|
1486
|
-
])) :
|
|
1487
|
+
])) : q("", !0)
|
|
1487
1488
|
], 40, kt);
|
|
1488
1489
|
};
|
|
1489
1490
|
}
|
|
1490
|
-
}), Ot = { class: "cl-flex" },
|
|
1491
|
+
}), Ot = { class: "cl-flex" }, At = { class: "cl-relative cl-right-20 cl-top-0.5" }, qt = { class: "cl-absolute cl-flex cl-float-right cl-font-semibold cl-mt-2 cl-text-danger-default cl-text-sm cl-z-10" }, St = { class: "cl-min-h-[16rem] cl-mx-4" }, Nt = { class: "cl-p-2 cl-text-right cl-w-full" }, jt = /* @__PURE__ */ U({
|
|
1491
1492
|
__name: "cl-ui-combo-box",
|
|
1492
1493
|
props: {
|
|
1493
1494
|
loading: { type: Boolean, default: !1 },
|
|
@@ -1513,14 +1514,14 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1513
1514
|
"update:current-object": null
|
|
1514
1515
|
},
|
|
1515
1516
|
setup(t, { expose: o, emit: e }) {
|
|
1516
|
-
const l = t, { t: n } = oe(), p =
|
|
1517
|
+
const l = t, { t: n } = oe(), p = A(!1), s = S({
|
|
1517
1518
|
get: () => l.currentObject,
|
|
1518
1519
|
set: (C) => e("update:current-object", C)
|
|
1519
|
-
}), a =
|
|
1520
|
+
}), a = A(null), i = A(null), c = S(() => Ne()), m = A(""), b = A(""), r = A(), w = A(!0), h = A(!1);
|
|
1520
1521
|
function T(C) {
|
|
1521
|
-
var ne,
|
|
1522
|
+
var ne, x;
|
|
1522
1523
|
const G = ((ne = ve.value) == null ? void 0 : ne.getBoundingClientRect().top) || 0;
|
|
1523
|
-
h.value = window.innerHeight - G < 280, l.disabled || (typeof C < "u" ? p.value = C : p.value = !p.value), (
|
|
1524
|
+
h.value = window.innerHeight - G < 280, l.disabled || (typeof C < "u" ? p.value = C : p.value = !p.value), (x = a.value) == null || x.blur();
|
|
1524
1525
|
}
|
|
1525
1526
|
function k(C) {
|
|
1526
1527
|
m.value = C, e("search", C);
|
|
@@ -1550,7 +1551,7 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1550
1551
|
var C;
|
|
1551
1552
|
r.value = {
|
|
1552
1553
|
name: m.value,
|
|
1553
|
-
parentId: ((C =
|
|
1554
|
+
parentId: ((C = i.value) == null ? void 0 : C.id) ?? 0
|
|
1554
1555
|
}, e("create-object", r.value);
|
|
1555
1556
|
}
|
|
1556
1557
|
function D() {
|
|
@@ -1569,22 +1570,22 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1569
1570
|
}
|
|
1570
1571
|
function W() {
|
|
1571
1572
|
var C;
|
|
1572
|
-
(C = l.parentObjectCreatedResponse) != null && C.id && (
|
|
1573
|
+
(C = l.parentObjectCreatedResponse) != null && C.id && (i.value = {
|
|
1573
1574
|
id: l.parentObjectCreatedResponse.id,
|
|
1574
1575
|
name: l.parentObjectCreatedResponse.name ?? ""
|
|
1575
1576
|
});
|
|
1576
1577
|
}
|
|
1577
1578
|
function ue() {
|
|
1578
|
-
var G, ne,
|
|
1579
|
+
var G, ne, x, g, N;
|
|
1579
1580
|
Ve({
|
|
1580
1581
|
message: n("comboBox.createSuccessful", { object: l.objectType, name: ((G = l.objectCreatedResponse) == null ? void 0 : G.name) ?? "" }),
|
|
1581
1582
|
colour: "primary",
|
|
1582
1583
|
duration: 1e4
|
|
1583
1584
|
});
|
|
1584
1585
|
let C = "";
|
|
1585
|
-
|
|
1586
|
-
id: ((
|
|
1587
|
-
name: ((
|
|
1586
|
+
i.value && i.value.id === ((ne = l.objectCreatedResponse) == null ? void 0 : ne.parentId) && (C = i.value.name), s.value = {
|
|
1587
|
+
id: ((x = l.objectCreatedResponse) == null ? void 0 : x.id) ?? 0,
|
|
1588
|
+
name: ((g = l.objectCreatedResponse) == null ? void 0 : g.name) ?? "",
|
|
1588
1589
|
parentId: ((N = l.objectCreatedResponse) == null ? void 0 : N.parentId) ?? 0,
|
|
1589
1590
|
parentName: C
|
|
1590
1591
|
};
|
|
@@ -1595,39 +1596,39 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1595
1596
|
}
|
|
1596
1597
|
function be() {
|
|
1597
1598
|
let C = !0;
|
|
1598
|
-
m.value === "" && (C = !1), l.objectParentType !== "" &&
|
|
1599
|
+
m.value === "" && (C = !1), l.objectParentType !== "" && i.value === null && (C = !1), w.value = C;
|
|
1599
1600
|
}
|
|
1600
|
-
Q(() => l.objectCreatedResponse, () => Y()), Q(() => l.parentObjectCreatedResponse, () => W()), Q(() => m.value, () => be()), Q(() =>
|
|
1601
|
+
Q(() => l.objectCreatedResponse, () => Y()), Q(() => l.parentObjectCreatedResponse, () => W()), Q(() => m.value, () => be()), Q(() => i.value, () => be()), o({
|
|
1601
1602
|
focus() {
|
|
1602
1603
|
var C;
|
|
1603
1604
|
(C = a.value) == null || C.focus();
|
|
1604
1605
|
}
|
|
1605
1606
|
});
|
|
1606
|
-
const ve =
|
|
1607
|
+
const ve = A();
|
|
1607
1608
|
return ze(ve, () => p.value ? T(!1) : ""), (C, G) => {
|
|
1608
1609
|
const ne = nl("cl-ui-combo-box", !0);
|
|
1609
|
-
return u(),
|
|
1610
|
+
return u(), v("div", {
|
|
1610
1611
|
ref_key: "outsideRef",
|
|
1611
1612
|
ref: ve,
|
|
1612
1613
|
class: "cl-relative"
|
|
1613
1614
|
}, [
|
|
1614
1615
|
f("div", Ot, [
|
|
1615
|
-
$(
|
|
1616
|
+
$(re, {
|
|
1616
1617
|
ref_key: "inputRef",
|
|
1617
1618
|
ref: a,
|
|
1618
|
-
modelValue:
|
|
1619
|
-
"onUpdate:modelValue": G[0] || (G[0] = (
|
|
1619
|
+
modelValue: c.value,
|
|
1620
|
+
"onUpdate:modelValue": G[0] || (G[0] = (x) => c.value = x),
|
|
1620
1621
|
class: _(["!cl-mr-0 cl-mb-0 cl-rounded-r-none cl-w-full cl-z-10", {
|
|
1621
1622
|
"cl-cursor-pointer": C.disabled === !1
|
|
1622
1623
|
}]),
|
|
1623
1624
|
"input-type": "text",
|
|
1624
1625
|
"placeholder-text": d(n)("comboBox.emptyHintText", { object: C.objectType }),
|
|
1625
|
-
onFocus: G[1] || (G[1] = (
|
|
1626
|
+
onFocus: G[1] || (G[1] = (x) => {
|
|
1626
1627
|
T(), C.$emit("focus");
|
|
1627
1628
|
})
|
|
1628
1629
|
}, null, 8, ["modelValue", "class", "placeholder-text"]),
|
|
1629
|
-
L(f("div",
|
|
1630
|
-
f("div",
|
|
1630
|
+
L(f("div", At, [
|
|
1631
|
+
f("div", qt, [
|
|
1631
1632
|
le(E(d(n)("comboBox.required")) + " ", 1),
|
|
1632
1633
|
$(d(I), {
|
|
1633
1634
|
class: "cl-ml-1 cl-mt-1",
|
|
@@ -1637,25 +1638,25 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1637
1638
|
], 512), [
|
|
1638
1639
|
[H, C.required && C.disabled === !1 && C.currentObject === null]
|
|
1639
1640
|
]),
|
|
1640
|
-
p.value ? (u(),
|
|
1641
|
+
p.value ? (u(), v("div", {
|
|
1641
1642
|
key: 1,
|
|
1642
1643
|
class: _(["cl-bg-white cl-border cl-border-grey-1 cl-float-right cl-h-10 cl-rounded cl-rounded-l-none cl-text-grey-3 cl-transition-colors cl-w-[27px] hover:cl-bg-link-light hover:cl-opacity-90 hover:cl-text-white", {
|
|
1643
1644
|
"cl-cursor-default": C.disabled,
|
|
1644
1645
|
"cl-cursor-pointer": C.disabled === !1
|
|
1645
1646
|
}]),
|
|
1646
|
-
onClick: G[3] || (G[3] = (
|
|
1647
|
+
onClick: G[3] || (G[3] = (x) => T(!1))
|
|
1647
1648
|
}, [
|
|
1648
1649
|
$(d(I), {
|
|
1649
1650
|
icon: "ph:caret-up-bold",
|
|
1650
1651
|
class: "cl-ml-[5px] cl-mt-[12px]"
|
|
1651
1652
|
})
|
|
1652
|
-
], 2)) : (u(),
|
|
1653
|
+
], 2)) : (u(), v("div", {
|
|
1653
1654
|
key: 0,
|
|
1654
1655
|
class: _(["cl-bg-white cl-border cl-border-grey-1 cl-float-right cl-h-10 cl-rounded cl-rounded-l-none cl-text-grey-3 cl-transition-colors cl-w-[27px] hover:cl-bg-link-light hover:cl-opacity-90 hover:cl-text-white", {
|
|
1655
1656
|
"cl-cursor-default": C.disabled,
|
|
1656
1657
|
"cl-cursor-pointer": C.disabled === !1
|
|
1657
1658
|
}]),
|
|
1658
|
-
onClick: G[2] || (G[2] = (
|
|
1659
|
+
onClick: G[2] || (G[2] = (x) => T(!0))
|
|
1659
1660
|
}, [
|
|
1660
1661
|
$(d(I), {
|
|
1661
1662
|
icon: "ph:caret-down-bold",
|
|
@@ -1667,7 +1668,7 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1667
1668
|
title: F(() => [
|
|
1668
1669
|
le(E(d(n)("comboBox.createTitle", { object: C.objectType })), 1)
|
|
1669
1670
|
]),
|
|
1670
|
-
trigger: F(({ open:
|
|
1671
|
+
trigger: F(({ open: x }) => [
|
|
1671
1672
|
L($(Et, {
|
|
1672
1673
|
"can-create-new-object": C.canCreateNewObject,
|
|
1673
1674
|
"can-clear-selected-object": C.canClearSelectedObject,
|
|
@@ -1676,12 +1677,12 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1676
1677
|
"object-type": C.objectType,
|
|
1677
1678
|
"object-parent-type": C.objectParentType,
|
|
1678
1679
|
"error-message": C.errorMessage,
|
|
1679
|
-
"current-object-name":
|
|
1680
|
+
"current-object-name": c.value,
|
|
1680
1681
|
"is-visible": p.value,
|
|
1681
1682
|
class: _({
|
|
1682
1683
|
"cl-bottom-full": h.value
|
|
1683
1684
|
}),
|
|
1684
|
-
onCreateObject:
|
|
1685
|
+
onCreateObject: x,
|
|
1685
1686
|
onSelectObject: R,
|
|
1686
1687
|
onClearObject: O,
|
|
1687
1688
|
onSearch: k
|
|
@@ -1689,13 +1690,13 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1689
1690
|
[H, p.value]
|
|
1690
1691
|
])
|
|
1691
1692
|
]),
|
|
1692
|
-
footer: F(({ close:
|
|
1693
|
+
footer: F(({ close: x }) => [
|
|
1693
1694
|
f("div", Nt, [
|
|
1694
1695
|
$(me, {
|
|
1695
1696
|
class: "cl-mr-3",
|
|
1696
1697
|
colour: "default",
|
|
1697
1698
|
size: "small",
|
|
1698
|
-
onClick:
|
|
1699
|
+
onClick: x
|
|
1699
1700
|
}, {
|
|
1700
1701
|
default: F(() => [
|
|
1701
1702
|
le(E(d(n)("comboBox.cancel")), 1)
|
|
@@ -1706,8 +1707,8 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1706
1707
|
colour: "primary",
|
|
1707
1708
|
size: "small",
|
|
1708
1709
|
disabled: !w.value,
|
|
1709
|
-
onClick: (
|
|
1710
|
-
y(),
|
|
1710
|
+
onClick: (g) => {
|
|
1711
|
+
y(), x();
|
|
1711
1712
|
}
|
|
1712
1713
|
}, {
|
|
1713
1714
|
default: F(() => [
|
|
@@ -1721,8 +1722,8 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1721
1722
|
f("div", St, [
|
|
1722
1723
|
C.objectParentType ? (u(), V(ne, {
|
|
1723
1724
|
key: 0,
|
|
1724
|
-
"current-object":
|
|
1725
|
-
"onUpdate:currentObject": G[4] || (G[4] = (
|
|
1725
|
+
"current-object": i.value,
|
|
1726
|
+
"onUpdate:currentObject": G[4] || (G[4] = (x) => i.value = x),
|
|
1726
1727
|
class: "cl-mt-3",
|
|
1727
1728
|
results: C.parentResults,
|
|
1728
1729
|
loading: C.loading,
|
|
@@ -1733,10 +1734,10 @@ const ae = /* @__PURE__ */ fe(mt, [["__scopeId", "data-v-d8904ca5"]]), gt = { cl
|
|
|
1733
1734
|
"error-message": C.errorMessage,
|
|
1734
1735
|
onSearch: B,
|
|
1735
1736
|
onCreateObject: D
|
|
1736
|
-
}, null, 8, ["current-object", "results", "loading", "object-type", "object-created-response", "can-create-new-object", "can-clear-selected-object", "error-message"])) :
|
|
1737
|
-
$(
|
|
1737
|
+
}, null, 8, ["current-object", "results", "loading", "object-type", "object-created-response", "can-create-new-object", "can-clear-selected-object", "error-message"])) : q("", !0),
|
|
1738
|
+
$(re, {
|
|
1738
1739
|
modelValue: m.value,
|
|
1739
|
-
"onUpdate:modelValue": G[5] || (G[5] = (
|
|
1740
|
+
"onUpdate:modelValue": G[5] || (G[5] = (x) => m.value = x),
|
|
1740
1741
|
label: d(n)("comboBox.createProperty"),
|
|
1741
1742
|
class: "cl-mb-2 cl-pt-3 cl-w-full",
|
|
1742
1743
|
"input-type": "text"
|
|
@@ -1763,18 +1764,18 @@ const Rt = {}, zt = { class: "cl-flex cl-flex-wrap cl-left-0 cl-mt-4 cl-w-full"
|
|
|
1763
1764
|
class: "cl-leading-10 cl-text-sm cl-w-full"
|
|
1764
1765
|
}, Mt = { class: "cl-float-left" }, Vt = { class: "cl-float-right" };
|
|
1765
1766
|
function Dt(t, o) {
|
|
1766
|
-
return u(),
|
|
1767
|
-
t.$slots.default ? (u(),
|
|
1767
|
+
return u(), v("div", zt, [
|
|
1768
|
+
t.$slots.default ? (u(), v("div", Ut, [
|
|
1768
1769
|
j(t.$slots, "default")
|
|
1769
|
-
])) :
|
|
1770
|
-
t.$slots.left || t.$slots.right ? (u(),
|
|
1770
|
+
])) : q("", !0),
|
|
1771
|
+
t.$slots.left || t.$slots.right ? (u(), v("div", Bt, [
|
|
1771
1772
|
f("span", Mt, [
|
|
1772
1773
|
j(t.$slots, "left")
|
|
1773
1774
|
]),
|
|
1774
1775
|
f("span", Vt, [
|
|
1775
1776
|
j(t.$slots, "right")
|
|
1776
1777
|
])
|
|
1777
|
-
])) :
|
|
1778
|
+
])) : q("", !0)
|
|
1778
1779
|
]);
|
|
1779
1780
|
}
|
|
1780
1781
|
const Lt = /* @__PURE__ */ fe(Rt, [["render", Dt]]);
|
|
@@ -1789,7 +1790,7 @@ function Ue(t) {
|
|
|
1789
1790
|
const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1 cl-grid cl-grid-cols-2 cl-justify-end cl-mb-2 lg:cl-flex lg:cl-gap-2" }, Ht = {
|
|
1790
1791
|
key: 1,
|
|
1791
1792
|
class: "cl-hidden lg:cl-block"
|
|
1792
|
-
}, Gt = { class: "cl-block lg:cl-hidden" },
|
|
1793
|
+
}, Gt = { class: "cl-block lg:cl-hidden" }, Zt = /* @__PURE__ */ U({
|
|
1793
1794
|
__name: "cl-ui-grid-action-row",
|
|
1794
1795
|
props: {
|
|
1795
1796
|
editMode: { type: Boolean },
|
|
@@ -1801,7 +1802,7 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
1801
1802
|
emits: ["update:edit-mode", "update:filterPanelOpen", "clear-filters"],
|
|
1802
1803
|
setup(t) {
|
|
1803
1804
|
const { t: o } = oe();
|
|
1804
|
-
return (e, l) => (u(),
|
|
1805
|
+
return (e, l) => (u(), v(P, null, [
|
|
1805
1806
|
f("div", Pt, [
|
|
1806
1807
|
f("strong", null, E(d(o)("grid.gridTools")), 1)
|
|
1807
1808
|
]),
|
|
@@ -1813,18 +1814,18 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
1813
1814
|
onClick: l[0] || (l[0] = K((n) => e.$emit("update:edit-mode", !e.editMode), ["prevent"]))
|
|
1814
1815
|
}, {
|
|
1815
1816
|
default: F(() => [
|
|
1816
|
-
e.editMode ? (u(),
|
|
1817
|
+
e.editMode ? (u(), v(P, { key: 0 }, [
|
|
1817
1818
|
le(E(d(o)("grid.finishEditing")), 1)
|
|
1818
|
-
], 64)) : (u(),
|
|
1819
|
+
], 64)) : (u(), v(P, { key: 1 }, [
|
|
1819
1820
|
le(E(d(o)("grid.editData")), 1)
|
|
1820
1821
|
], 64))
|
|
1821
1822
|
]),
|
|
1822
1823
|
_: 1
|
|
1823
|
-
})) :
|
|
1824
|
-
e.options.hideViewManager ?
|
|
1824
|
+
})) : q("", !0),
|
|
1825
|
+
e.options.hideViewManager ? q("", !0) : (u(), v("div", Ht, [
|
|
1825
1826
|
j(e.$slots, "view-manager")
|
|
1826
1827
|
])),
|
|
1827
|
-
e.columns.some((n) => d(Ue)(n) || d(Oe)(n)) ? (u(),
|
|
1828
|
+
e.columns.some((n) => d(Ue)(n) || d(Oe)(n)) ? (u(), v(P, { key: 2 }, [
|
|
1828
1829
|
f("div", Gt, [
|
|
1829
1830
|
$(me, {
|
|
1830
1831
|
class: "cl-w-full",
|
|
@@ -1850,11 +1851,11 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
1850
1851
|
]),
|
|
1851
1852
|
_: 1
|
|
1852
1853
|
}, 8, ["colour", "class"])
|
|
1853
|
-
], 64)) :
|
|
1854
|
+
], 64)) : q("", !0)
|
|
1854
1855
|
])
|
|
1855
1856
|
], 64));
|
|
1856
1857
|
}
|
|
1857
|
-
}),
|
|
1858
|
+
}), xt = {
|
|
1858
1859
|
key: 3,
|
|
1859
1860
|
class: "cl-inline-block cl-whitespace-nowrap"
|
|
1860
1861
|
}, Wt = {
|
|
@@ -1876,49 +1877,49 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
1876
1877
|
setup(t) {
|
|
1877
1878
|
const o = t, { t: e, locale: l, n } = oe();
|
|
1878
1879
|
function p(s, a) {
|
|
1879
|
-
const
|
|
1880
|
+
const i = ke.fromISO(s, {
|
|
1880
1881
|
locale: l.value
|
|
1881
1882
|
}).setZone(o.timeZone);
|
|
1882
|
-
let
|
|
1883
|
+
let c = "";
|
|
1883
1884
|
switch (a) {
|
|
1884
|
-
case
|
|
1885
|
-
case
|
|
1886
|
-
|
|
1885
|
+
case Z.SHORT_DATE:
|
|
1886
|
+
case Z.DATE:
|
|
1887
|
+
c = i.toFormat("D");
|
|
1887
1888
|
break;
|
|
1888
|
-
case
|
|
1889
|
-
|
|
1889
|
+
case Z.LONG_DATE:
|
|
1890
|
+
c = i.toFormat("DDD");
|
|
1890
1891
|
break;
|
|
1891
|
-
case
|
|
1892
|
-
case
|
|
1893
|
-
|
|
1892
|
+
case Z.SHORT_DATETIME:
|
|
1893
|
+
case Z.DATETIME:
|
|
1894
|
+
c = i.toFormat("f");
|
|
1894
1895
|
break;
|
|
1895
|
-
case
|
|
1896
|
-
|
|
1896
|
+
case Z.LONG_DATETIME:
|
|
1897
|
+
c = i.toFormat("fff");
|
|
1897
1898
|
break;
|
|
1898
|
-
case
|
|
1899
|
-
|
|
1899
|
+
case Z.TIME:
|
|
1900
|
+
c = i.toFormat("t");
|
|
1900
1901
|
break;
|
|
1901
1902
|
}
|
|
1902
|
-
return
|
|
1903
|
+
return c;
|
|
1903
1904
|
}
|
|
1904
1905
|
return (s, a) => {
|
|
1905
|
-
var
|
|
1906
|
-
return s.column.type === "slot" ? j(s.$slots, s.column.name, { key: 0 }) : s.column.type === "boolean" && s.column.field !== void 0 ? (u(), V(
|
|
1906
|
+
var i;
|
|
1907
|
+
return s.column.type === "slot" ? j(s.$slots, s.column.name, { key: 0 }) : s.column.type === "boolean" && s.column.field !== void 0 ? (u(), V(re, {
|
|
1907
1908
|
key: 1,
|
|
1908
1909
|
"input-type": "checkbox",
|
|
1909
1910
|
"model-value": s.data[s.column.field],
|
|
1910
1911
|
disabled: !0
|
|
1911
|
-
}, null, 8, ["model-value"])) : (s.column.type === "date" || s.column.type === "datetime") && s.column.field !== void 0 ? (u(),
|
|
1912
|
-
s.column.format !== void 0 ? (u(),
|
|
1912
|
+
}, null, 8, ["model-value"])) : (s.column.type === "date" || s.column.type === "datetime") && s.column.field !== void 0 ? (u(), v(P, { key: 2 }, [
|
|
1913
|
+
s.column.format !== void 0 ? (u(), v(P, { key: 0 }, [
|
|
1913
1914
|
le(E(p(s.data[s.column.field], s.column.format)), 1)
|
|
1914
|
-
], 64)) : s.column.type === "date" ? (u(),
|
|
1915
|
-
le(E(p(s.data[s.column.field], d(
|
|
1916
|
-
], 64)) : (u(),
|
|
1917
|
-
le(E(p(s.data[s.column.field], d(
|
|
1915
|
+
], 64)) : s.column.type === "date" ? (u(), v(P, { key: 1 }, [
|
|
1916
|
+
le(E(p(s.data[s.column.field], d(Z).DATE)), 1)
|
|
1917
|
+
], 64)) : (u(), v(P, { key: 2 }, [
|
|
1918
|
+
le(E(p(s.data[s.column.field], d(Z).DATETIME)), 1)
|
|
1918
1919
|
], 64))
|
|
1919
|
-
], 64)) : s.column.type === "list" && s.column.field !== void 0 && s.column.listEntries !== void 0 ? (u(),
|
|
1920
|
-
s.column.maxLength !== void 0 ? (u(),
|
|
1921
|
-
], 64)) :
|
|
1920
|
+
], 64)) : s.column.type === "list" && s.column.field !== void 0 && s.column.listEntries !== void 0 ? (u(), v("span", xt, E(d(e)(((i = s.column.listEntries.find((c) => c.value === s.data[s.column.field])) == null ? void 0 : i.translationKey) ?? "")), 1)) : s.column.type === "number" && s.column.field !== void 0 ? (u(), v("span", Wt, E(d(n)(s.data[s.column.field], s.column.format ?? d(X).DECIMAL)), 1)) : s.column.field !== void 0 ? (u(), v(P, { key: 5 }, [
|
|
1921
|
+
s.column.maxLength !== void 0 ? (u(), v("span", Kt, E(s.data[s.column.field].trimToLength(s.column.maxLength, s.column.format !== void 0 ? s.column.format === "ellipsis" : !1)), 1)) : (u(), v("span", Qt, E(s.data[s.column.field]), 1))
|
|
1922
|
+
], 64)) : q("", !0);
|
|
1922
1923
|
};
|
|
1923
1924
|
}
|
|
1924
1925
|
}), Jt = { class: "cl-font-semibold lg:cl-hidden" }, Yt = /* @__PURE__ */ U({
|
|
@@ -1931,25 +1932,25 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
1931
1932
|
},
|
|
1932
1933
|
emits: ["edit", "focus", "undo"],
|
|
1933
1934
|
setup(t, { emit: o }) {
|
|
1934
|
-
const e = t, { t: l } = oe(), n =
|
|
1935
|
+
const e = t, { t: l } = oe(), n = A(ce(e.data)), p = S(() => e.column.field !== void 0 && n.value[e.column.field] !== e.data[e.column.field]), s = S(() => {
|
|
1935
1936
|
var a;
|
|
1936
|
-
return ((a = e.column.listEntries) == null ? void 0 : a.map((
|
|
1937
|
-
id:
|
|
1938
|
-
name: l(
|
|
1937
|
+
return ((a = e.column.listEntries) == null ? void 0 : a.map((i, c) => ({
|
|
1938
|
+
id: c,
|
|
1939
|
+
name: l(i.translationKey)
|
|
1939
1940
|
}))) ?? [];
|
|
1940
1941
|
});
|
|
1941
|
-
return sl(() => n.value =
|
|
1942
|
-
const
|
|
1943
|
-
|
|
1942
|
+
return sl(() => n.value = ce(e.data)), Q(n, (a) => {
|
|
1943
|
+
const i = e.column.field ?? "";
|
|
1944
|
+
i !== "" && (a[i] !== e.data[i] ? o("edit", a[i]) : o("undo"));
|
|
1944
1945
|
}, {
|
|
1945
1946
|
deep: !0
|
|
1946
|
-
}), (a,
|
|
1947
|
+
}), (a, i) => (u(), v("td", {
|
|
1947
1948
|
class: _(["cl-border-b cl-border-grey-1 cl-gap-1 cl-grid cl-grid-cols-2 cl-m-1 cl-mb-0 cl-py-2 cl-text-xs lg:cl-border-b-0 lg:cl-m-0 lg:cl-px-1 lg:cl-table-cell lg:cl-text-base", {
|
|
1948
1949
|
"cl-bg-link-lighter": p.value
|
|
1949
1950
|
}])
|
|
1950
1951
|
}, [
|
|
1951
1952
|
f("span", Jt, E(a.column.caption), 1),
|
|
1952
|
-
a.editMode && a.column.editable === !0 ? j(a.$slots, `${a.column.name}Edit`, se(
|
|
1953
|
+
a.editMode && a.column.editable === !0 ? j(a.$slots, `${a.column.name}Edit`, se(ae({ key: 0 }, {
|
|
1953
1954
|
cellFocused: () => o("focus"),
|
|
1954
1955
|
column: a.column,
|
|
1955
1956
|
edited: p.value,
|
|
@@ -1962,7 +1963,7 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
1962
1963
|
"time-zone": a.timeZone
|
|
1963
1964
|
}, {
|
|
1964
1965
|
[a.column.name]: F(() => [
|
|
1965
|
-
j(a.$slots, a.column.name, se(
|
|
1966
|
+
j(a.$slots, a.column.name, se(ie({ column: a.column, record: a.data })))
|
|
1966
1967
|
]),
|
|
1967
1968
|
_: 2
|
|
1968
1969
|
}, 1032, ["column", "data", "time-zone"])
|
|
@@ -1973,7 +1974,7 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
1973
1974
|
"time-zone": a.timeZone
|
|
1974
1975
|
}, {
|
|
1975
1976
|
[a.column.name]: F(() => [
|
|
1976
|
-
j(a.$slots, a.column.name, se(
|
|
1977
|
+
j(a.$slots, a.column.name, se(ie({ column: a.column, record: a.data })))
|
|
1977
1978
|
]),
|
|
1978
1979
|
_: 2
|
|
1979
1980
|
}, 1032, ["column", "data", "time-zone"]))
|
|
@@ -1989,8 +1990,8 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
1989
1990
|
},
|
|
1990
1991
|
emits: ["cell-focus", "cell-edit", "cell-undo", "row-select"],
|
|
1991
1992
|
setup(t) {
|
|
1992
|
-
return (o, e) => (u(),
|
|
1993
|
-
(u(!0),
|
|
1993
|
+
return (o, e) => (u(), v("tr", null, [
|
|
1994
|
+
(u(!0), v(P, null, J(o.columns, (l, n) => (u(), V(Yt, {
|
|
1994
1995
|
key: n,
|
|
1995
1996
|
data: o.data,
|
|
1996
1997
|
column: l,
|
|
@@ -2003,7 +2004,7 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2003
2004
|
J(o.$slots, (p, s) => ({
|
|
2004
2005
|
name: s,
|
|
2005
2006
|
fn: F((a) => [
|
|
2006
|
-
j(o.$slots, s, se(
|
|
2007
|
+
j(o.$slots, s, se(ie(a)))
|
|
2007
2008
|
])
|
|
2008
2009
|
}))
|
|
2009
2010
|
]), 1032, ["data", "column", "time-zone", "edit-mode", "onEdit", "onUndo"]))), 128))
|
|
@@ -2025,12 +2026,12 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2025
2026
|
},
|
|
2026
2027
|
emits: ["row-select", "row-edit", "clear-filters"],
|
|
2027
2028
|
setup(t, { emit: o }) {
|
|
2028
|
-
const e = t, { t: l } = oe(), n =
|
|
2029
|
+
const e = t, { t: l } = oe(), n = A({
|
|
2029
2030
|
index: -1,
|
|
2030
2031
|
record: {}
|
|
2031
2032
|
});
|
|
2032
2033
|
function p() {
|
|
2033
|
-
Object.keys(n.value.record).length !== 0 && (o("row-edit",
|
|
2034
|
+
Object.keys(n.value.record).length !== 0 && (o("row-edit", ce(n.value)), n.value.record = {});
|
|
2034
2035
|
}
|
|
2035
2036
|
function s(r) {
|
|
2036
2037
|
n.value.index !== -1 && n.value.index !== r && p(), n.value.index = r;
|
|
@@ -2038,7 +2039,7 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2038
2039
|
function a(r, w) {
|
|
2039
2040
|
s(r), w.field !== void 0 && (n.value.record[w.field] = w.value);
|
|
2040
2041
|
}
|
|
2041
|
-
function
|
|
2042
|
+
function i(r) {
|
|
2042
2043
|
if (r !== void 0) {
|
|
2043
2044
|
const { [r]: w, ...h } = n.value.record;
|
|
2044
2045
|
n.value.record = {
|
|
@@ -2046,16 +2047,16 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2046
2047
|
};
|
|
2047
2048
|
}
|
|
2048
2049
|
}
|
|
2049
|
-
const
|
|
2050
|
+
const c = A({});
|
|
2050
2051
|
Q(() => e.data, () => {
|
|
2051
2052
|
var r, w;
|
|
2052
|
-
return
|
|
2053
|
+
return c.value = Object.fromEntries(((w = (r = e.data) == null ? void 0 : r.results) == null ? void 0 : w.map((h, T) => [
|
|
2053
2054
|
[T],
|
|
2054
2055
|
{
|
|
2055
2056
|
count: 0,
|
|
2056
2057
|
target: null,
|
|
2057
2058
|
reset: We(() => {
|
|
2058
|
-
|
|
2059
|
+
c.value[T] && (c.value[T].count = 0, b(c.value[T].target), c.value[T].target = null);
|
|
2059
2060
|
}, 2500, { immediate: !1 })
|
|
2060
2061
|
}
|
|
2061
2062
|
])) ?? []);
|
|
@@ -2065,7 +2066,7 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2065
2066
|
});
|
|
2066
2067
|
function m(r, w, h) {
|
|
2067
2068
|
const { currentTarget: T } = h;
|
|
2068
|
-
e.selectionEnabled ? o("row-select", w) : (
|
|
2069
|
+
e.selectionEnabled ? o("row-select", w) : (c.value[r].count++, c.value[r].target = T, c.value[r].count > 1 ? (c.value[r].reset.stop(), c.value[r].count = 0, b(T), c.value[r].target = null, o("row-select", w)) : (c.value[r].reset.start(), b(T)));
|
|
2069
2070
|
}
|
|
2070
2071
|
function b(r) {
|
|
2071
2072
|
r == null || r.classList.toggle("!cl-bg-link-lighter");
|
|
@@ -2074,8 +2075,8 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2074
2075
|
e.editMode || (p(), n.value.index = -1);
|
|
2075
2076
|
}), (r, w) => {
|
|
2076
2077
|
var h;
|
|
2077
|
-
return u(),
|
|
2078
|
-
r.data && ((h = r.data.results) != null && h.length) ? (u(!0),
|
|
2078
|
+
return u(), v("tbody", null, [
|
|
2079
|
+
r.data && ((h = r.data.results) != null && h.length) ? (u(!0), v(P, { key: 0 }, J(r.data.results, (T, k) => (u(), V(Xt, {
|
|
2079
2080
|
key: k,
|
|
2080
2081
|
data: T,
|
|
2081
2082
|
columns: r.columns,
|
|
@@ -2095,21 +2096,21 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2095
2096
|
onCellEdit: (B) => {
|
|
2096
2097
|
a(k, B);
|
|
2097
2098
|
},
|
|
2098
|
-
onCellUndo:
|
|
2099
|
+
onCellUndo: i
|
|
2099
2100
|
}, Re({ _: 2 }, [
|
|
2100
2101
|
J(r.$slots, (B, O) => ({
|
|
2101
2102
|
name: O,
|
|
2102
2103
|
fn: F((R) => [
|
|
2103
|
-
j(r.$slots, O, se(
|
|
2104
|
+
j(r.$slots, O, se(ie(R)))
|
|
2104
2105
|
])
|
|
2105
2106
|
}))
|
|
2106
|
-
]), 1032, ["data", "columns", "time-zone", "edit-mode", "class", "onClick", "onCellFocus", "onCellEdit"]))), 128)) : r.loading ?
|
|
2107
|
+
]), 1032, ["data", "columns", "time-zone", "edit-mode", "class", "onClick", "onCellFocus", "onCellEdit"]))), 128)) : r.loading ? q("", !0) : (u(), v("tr", eo, [
|
|
2107
2108
|
f("td", {
|
|
2108
2109
|
colspan: r.columns.length
|
|
2109
2110
|
}, [
|
|
2110
2111
|
f("div", to, [
|
|
2111
2112
|
f("strong", oo, E(d(l)("grid.noData")), 1),
|
|
2112
|
-
r.request.filters.length > 0 ? (u(),
|
|
2113
|
+
r.request.filters.length > 0 ? (u(), v("div", no, [
|
|
2113
2114
|
f("div", so, E(d(l)("grid.noDataFiltersPresent")), 1),
|
|
2114
2115
|
$(me, {
|
|
2115
2116
|
size: "small",
|
|
@@ -2121,7 +2122,7 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2121
2122
|
]),
|
|
2122
2123
|
_: 1
|
|
2123
2124
|
})
|
|
2124
|
-
])) :
|
|
2125
|
+
])) : q("", !0)
|
|
2125
2126
|
])
|
|
2126
2127
|
], 8, lo)
|
|
2127
2128
|
]))
|
|
@@ -2131,7 +2132,7 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2131
2132
|
}), ro = {
|
|
2132
2133
|
key: 0,
|
|
2133
2134
|
class: "cl-flex cl-flex-wrap cl-justify-end cl-mt-2 cl-w-full"
|
|
2134
|
-
},
|
|
2135
|
+
}, io = { class: "cl-bg-off-white cl-border cl-border-grey-1 cl-flex cl-items-center cl-mb-2 cl-px-3 cl-rounded cl-shadow-md cl-text-sm cl-w-full lg:cl-w-auto" }, co = { class: "cl-text-grey-3 cl-w-max" }, uo = { class: "cl-bg-off-white cl-border cl-border-grey-1 cl-flex cl-flex-wrap cl-items-center cl-mb-2 cl-px-3 cl-py-2 cl-rounded cl-shadow-md cl-text-sm cl-w-full lg:cl-ml-2 lg:cl-w-auto mb:cl-flex-nowrap" }, po = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-text-sm cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, fo = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, mo = { class: "cl-text-grey-3 cl-w-full lg:cl-mr-2 lg:cl-w-auto" }, go = { class: "cl-flex cl-flex-wrap cl-text-sm mb:cl-flex-nowrap" }, vo = { class: "cl-pr-2" }, bo = ["onClick"], ho = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-text-sm cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, yo = { class: "cl-mb-2 cl-text-grey-3 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, wo = ["onClick"], $o = { class: "cl-mb-2 cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, ko = { class: "cl-block cl-mb-2 cl-text-grey-3 cl-w-full lg:cl-inline-block lg:cl-mb-0 lg:cl-mr-1 lg:cl-w-auto" }, Co = { class: "cl-block lg:cl-inline-block" }, To = /* @__PURE__ */ U({
|
|
2135
2136
|
__name: "cl-ui-grid-footer",
|
|
2136
2137
|
props: {
|
|
2137
2138
|
request: {},
|
|
@@ -2154,14 +2155,14 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2154
2155
|
return w;
|
|
2155
2156
|
});
|
|
2156
2157
|
function a(r) {
|
|
2157
|
-
const w =
|
|
2158
|
+
const w = ce(e.request);
|
|
2158
2159
|
w.pageNumber !== r && (w.pageNumber = Math.max(Math.min(Math.trunc(r), p.value), 1), o("update:request", w));
|
|
2159
2160
|
}
|
|
2160
|
-
function
|
|
2161
|
+
function i(r) {
|
|
2161
2162
|
const w = parseInt(r == null ? void 0 : r.value) || 1;
|
|
2162
2163
|
a(w);
|
|
2163
2164
|
}
|
|
2164
|
-
const
|
|
2165
|
+
const c = [
|
|
2165
2166
|
5,
|
|
2166
2167
|
10,
|
|
2167
2168
|
20,
|
|
@@ -2170,16 +2171,16 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2170
2171
|
200
|
|
2171
2172
|
];
|
|
2172
2173
|
function m(r) {
|
|
2173
|
-
const w =
|
|
2174
|
+
const w = ce(e.request);
|
|
2174
2175
|
w.pageSize = r, w.pageNumber = 1, o("update:request", w);
|
|
2175
2176
|
}
|
|
2176
|
-
const b = Ke(
|
|
2177
|
+
const b = Ke(i, 750);
|
|
2177
2178
|
return (r, w) => {
|
|
2178
2179
|
var h, T;
|
|
2179
|
-
return (T = (h = r.data) == null ? void 0 : h.results) != null && T.length && r.request ? (u(),
|
|
2180
|
-
f("div",
|
|
2181
|
-
f("span",
|
|
2182
|
-
$(
|
|
2180
|
+
return (T = (h = r.data) == null ? void 0 : h.results) != null && T.length && r.request ? (u(), v("div", ro, [
|
|
2181
|
+
f("div", io, [
|
|
2182
|
+
f("span", co, E(d(n)("grid.jumpToPage")), 1),
|
|
2183
|
+
$(re, {
|
|
2183
2184
|
"model-value": r.request.pageNumber,
|
|
2184
2185
|
class: "cl-ml-1 cl-mt-0.5 cl-text-sm",
|
|
2185
2186
|
"input-type": "number",
|
|
@@ -2219,7 +2220,7 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2219
2220
|
], 512), [
|
|
2220
2221
|
[H, r.request.pageNumber > 1]
|
|
2221
2222
|
]),
|
|
2222
|
-
(u(!0),
|
|
2223
|
+
(u(!0), v(P, null, J(s.value, (k, B) => (u(), v("li", {
|
|
2223
2224
|
key: B,
|
|
2224
2225
|
class: _(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2225
2226
|
"cl-text-black cl-font-bold": r.request.pageNumber === k,
|
|
@@ -2253,7 +2254,7 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2253
2254
|
]),
|
|
2254
2255
|
f("ul", ho, [
|
|
2255
2256
|
f("li", yo, E(d(n)("grid.pageSize")), 1),
|
|
2256
|
-
(u(),
|
|
2257
|
+
(u(), v(P, null, J(c, (k, B) => f("li", {
|
|
2257
2258
|
key: B,
|
|
2258
2259
|
class: _(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2259
2260
|
"cl-text-black cl-font-bold": r.request.pageSize === k,
|
|
@@ -2267,7 +2268,7 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2267
2268
|
f("li", Co, E(d(l)(r.data.totalRecords, d(X).INTEGER)), 1)
|
|
2268
2269
|
])
|
|
2269
2270
|
])
|
|
2270
|
-
])) :
|
|
2271
|
+
])) : q("", !0);
|
|
2271
2272
|
};
|
|
2272
2273
|
}
|
|
2273
2274
|
}), Eo = [
|
|
@@ -2293,9 +2294,9 @@ function Oo(t) {
|
|
|
2293
2294
|
}
|
|
2294
2295
|
return o;
|
|
2295
2296
|
}
|
|
2296
|
-
const
|
|
2297
|
+
const Ao = ["ellipsis"];
|
|
2297
2298
|
var te = /* @__PURE__ */ ((t) => (t[t.CONTAINS = 0] = "CONTAINS", t[t.NOT_CONTAINS = 1] = "NOT_CONTAINS", t[t.EQUAL = 2] = "EQUAL", t[t.NOT_EQUAL = 3] = "NOT_EQUAL", t[t.STARTS_WITH = 4] = "STARTS_WITH", t[t.ENDS_WITH = 5] = "ENDS_WITH", t[t.GREATER_THAN = 6] = "GREATER_THAN", t[t.LESS_THAN = 7] = "LESS_THAN", t[t.EQUAL_OR_GREATER_THAN = 8] = "EQUAL_OR_GREATER_THAN", t[t.EQUAL_OR_LESS_THAN = 9] = "EQUAL_OR_LESS_THAN", t))(te || {});
|
|
2298
|
-
const
|
|
2299
|
+
const qo = [
|
|
2299
2300
|
"equal",
|
|
2300
2301
|
"notequal",
|
|
2301
2302
|
"contains",
|
|
@@ -2362,7 +2363,7 @@ const Io = {
|
|
|
2362
2363
|
"datetime"
|
|
2363
2364
|
],
|
|
2364
2365
|
key: "before"
|
|
2365
|
-
},
|
|
2366
|
+
}, Ze = [
|
|
2366
2367
|
Ro,
|
|
2367
2368
|
{
|
|
2368
2369
|
method: "notcontains",
|
|
@@ -2462,25 +2463,25 @@ const Io = {
|
|
|
2462
2463
|
setup(t, { emit: o }) {
|
|
2463
2464
|
const e = t, { t: l } = oe(), n = S(() => {
|
|
2464
2465
|
let a = [];
|
|
2465
|
-
return e.column.type !== "slot" ? a =
|
|
2466
|
-
|
|
2467
|
-
}) : a.forEach((
|
|
2468
|
-
|
|
2466
|
+
return e.column.type !== "slot" ? a = Ze.filter((i) => i.allowedTypes.includes(e.column.type)) : typeof e.column.slotType < "u" && typeof e.column.field < "u" && (a = Ze.filter((i) => i.allowedTypes.includes(e.column.slotType))), e.column.type === "date" || e.column.type === "datetime" || e.column.slotType === "date" || e.column.slotType === "datetime" ? a.forEach((i) => {
|
|
2467
|
+
i.description = l(`grid.${i.key}`);
|
|
2468
|
+
}) : a.forEach((i) => {
|
|
2469
|
+
i.description = l(`grid.${i.method}`);
|
|
2469
2470
|
}), a;
|
|
2470
2471
|
}), p = S(() => {
|
|
2471
|
-
var
|
|
2472
|
-
let a = (
|
|
2473
|
-
return typeof a > "u" && (a = te[e.defaultOperation].toLowerCase()), n.value.find((
|
|
2472
|
+
var i;
|
|
2473
|
+
let a = (i = e.filter) == null ? void 0 : i.filterMethod;
|
|
2474
|
+
return typeof a > "u" && (a = te[e.defaultOperation].toLowerCase()), n.value.find((c) => {
|
|
2474
2475
|
var m;
|
|
2475
|
-
return
|
|
2476
|
+
return c.method.toLowerCase() === ((m = a == null ? void 0 : a.removeNonAlphanumeric()) == null ? void 0 : m.toLowerCase());
|
|
2476
2477
|
});
|
|
2477
2478
|
});
|
|
2478
2479
|
function s(a) {
|
|
2479
|
-
let
|
|
2480
|
+
let i;
|
|
2480
2481
|
if (e.filter)
|
|
2481
|
-
|
|
2482
|
+
i = ce(e.filter), i.filterOperation = te[a.toUpperCase()], i.filterMethod = a.toLowerCase();
|
|
2482
2483
|
else if (typeof e.column.field < "u")
|
|
2483
|
-
|
|
2484
|
+
i = {
|
|
2484
2485
|
filterOnColumn: e.column.field,
|
|
2485
2486
|
filterMethod: a.toLowerCase(),
|
|
2486
2487
|
filterOperation: te[a.toUpperCase()],
|
|
@@ -2488,9 +2489,9 @@ const Io = {
|
|
|
2488
2489
|
};
|
|
2489
2490
|
else
|
|
2490
2491
|
return;
|
|
2491
|
-
o("update:filter",
|
|
2492
|
+
o("update:filter", i);
|
|
2492
2493
|
}
|
|
2493
|
-
return (a,
|
|
2494
|
+
return (a, i) => (u(), v("div", Uo, [
|
|
2494
2495
|
f("div", Bo, [
|
|
2495
2496
|
p.value ? (u(), V(d(I), {
|
|
2496
2497
|
key: 0,
|
|
@@ -2499,7 +2500,7 @@ const Io = {
|
|
|
2499
2500
|
"cl-text-grey-4": e.filter === void 0 || e.filter.filterValue === "",
|
|
2500
2501
|
"cl-text-primary-default": e.filter && e.filter.filterValue !== ""
|
|
2501
2502
|
}])
|
|
2502
|
-
}, null, 8, ["icon", "class"])) :
|
|
2503
|
+
}, null, 8, ["icon", "class"])) : q("", !0)
|
|
2503
2504
|
]),
|
|
2504
2505
|
f("div", {
|
|
2505
2506
|
class: _(["cl-absolute cl-bg-white cl-border cl-border-grey-0 cl-flex-wrap cl-font-normal cl-h-0 cl-hidden cl-rounded cl-shadow-lg cl-text-left cl-text-xs cl-top-8 cl-z-10 group-hover:cl-flex group-hover:cl-h-auto group-hover:cl-w-52", {
|
|
@@ -2508,18 +2509,18 @@ const Io = {
|
|
|
2508
2509
|
}])
|
|
2509
2510
|
}, [
|
|
2510
2511
|
f("strong", Mo, E(d(l)("grid.availableMethods")), 1),
|
|
2511
|
-
(u(!0),
|
|
2512
|
+
(u(!0), v(P, null, J(n.value, (c, m) => {
|
|
2512
2513
|
var b;
|
|
2513
|
-
return u(),
|
|
2514
|
+
return u(), v("span", {
|
|
2514
2515
|
key: m,
|
|
2515
2516
|
class: _(["cl-cursor-pointer cl-px-4 cl-py-1 cl-transition-colors cl-w-full hover:cl-bg-grey-0", {
|
|
2516
|
-
"cl-bg-primary-default cl-opacity-80":
|
|
2517
|
+
"cl-bg-primary-default cl-opacity-80": c.method === ((b = p.value) == null ? void 0 : b.method)
|
|
2517
2518
|
}]),
|
|
2518
|
-
onClick: K((r) => s(
|
|
2519
|
+
onClick: K((r) => s(c.method), ["prevent"])
|
|
2519
2520
|
}, [
|
|
2520
|
-
le(E(
|
|
2521
|
+
le(E(c.description) + " ", 1),
|
|
2521
2522
|
$(d(I), {
|
|
2522
|
-
icon:
|
|
2523
|
+
icon: c.icon,
|
|
2523
2524
|
class: "cl-float-right cl-text-grey-4 cl-text-sm"
|
|
2524
2525
|
}, null, 8, ["icon"])
|
|
2525
2526
|
], 10, Vo);
|
|
@@ -2530,7 +2531,7 @@ const Io = {
|
|
|
2530
2531
|
}), Lo = {
|
|
2531
2532
|
key: 0,
|
|
2532
2533
|
class: "cl-border cl-border-grey-2 cl-flex cl-overflow-hidden cl-rounded-md lg:cl-overflow-visible"
|
|
2533
|
-
}, Po = /* @__PURE__ */ f("option", { value: void 0 }, null, -1), Fo = ["selected"], Ho = ["selected"], Go = /* @__PURE__ */ f("option", { value: void 0 }, null, -1),
|
|
2534
|
+
}, Po = /* @__PURE__ */ f("option", { value: void 0 }, null, -1), Fo = ["selected"], Ho = ["selected"], Go = /* @__PURE__ */ f("option", { value: void 0 }, null, -1), Zo = ["value", "selected"], xo = /* @__PURE__ */ U({
|
|
2534
2535
|
__name: "cl-ui-grid-filter",
|
|
2535
2536
|
props: {
|
|
2536
2537
|
filter: {},
|
|
@@ -2547,7 +2548,7 @@ const Io = {
|
|
|
2547
2548
|
const s = S({
|
|
2548
2549
|
get: () => e.filter,
|
|
2549
2550
|
set: (O) => o("update:filter", O)
|
|
2550
|
-
}), a = S(() => e.column.type === "date" || e.column.type === "datetime" || e.column.type === "slot" && (e.column.slotType === "date" || e.column.slotType === "datetime")),
|
|
2551
|
+
}), a = S(() => e.column.type === "date" || e.column.type === "datetime" || e.column.type === "slot" && (e.column.slotType === "date" || e.column.slotType === "datetime")), i = S(() => e.column.type === "list" || e.column.type === "slot" && e.column.slotType === "list"), c = S(() => i.value && e.column.listType === "number"), m = S({
|
|
2551
2552
|
get() {
|
|
2552
2553
|
var R, z, y, D;
|
|
2553
2554
|
let O = (R = s.value) == null ? void 0 : R[0];
|
|
@@ -2601,7 +2602,7 @@ const Io = {
|
|
|
2601
2602
|
let z, y = !1;
|
|
2602
2603
|
const D = ((O == null ? void 0 : O.value) ?? R).trim();
|
|
2603
2604
|
if (m.value)
|
|
2604
|
-
y = ((Y = m.value) == null ? void 0 : Y.filterValue) === D, z =
|
|
2605
|
+
y = ((Y = m.value) == null ? void 0 : Y.filterValue) === D, z = ce(m.value), z.filterValue = D;
|
|
2605
2606
|
else if (D !== "" && typeof e.column.field < "u") {
|
|
2606
2607
|
const W = p();
|
|
2607
2608
|
z = {
|
|
@@ -2618,8 +2619,8 @@ const Io = {
|
|
|
2618
2619
|
let z, y = (O == null ? void 0 : O.value) ?? R ?? 0;
|
|
2619
2620
|
e.column.format === X.INTEGER ? (typeof y == "string" && (y = parseInt(y)), z = Math.round(y)) : (typeof y == "string" && (y = parseFloat(y.replace(h.value, "."))), z = y), k(null, isNaN(z) ? "" : z.toString());
|
|
2620
2621
|
}
|
|
2621
|
-
return (O, R) => T.value ? (u(),
|
|
2622
|
-
O.column.type === "boolean" || O.column.slotType === "boolean" ? (u(),
|
|
2622
|
+
return (O, R) => T.value ? (u(), v("div", Lo, [
|
|
2623
|
+
O.column.type === "boolean" || O.column.slotType === "boolean" ? (u(), v("select", {
|
|
2623
2624
|
key: 0,
|
|
2624
2625
|
class: "!cl-h-[2rem] cl-border-none cl-mb-0 cl-rounded-md cl-w-full",
|
|
2625
2626
|
onChange: R[0] || (R[0] = (z) => k(z.target))
|
|
@@ -2633,7 +2634,7 @@ const Io = {
|
|
|
2633
2634
|
value: "false",
|
|
2634
2635
|
selected: r.value === "false"
|
|
2635
2636
|
}, E(d(n)("grid.false")), 9, Ho)
|
|
2636
|
-
], 32)) : O.column.type === "date" || O.column.type === "datetime" || O.column.slotType === "date" || O.column.slotType === "datetime" ? (u(), V(
|
|
2637
|
+
], 32)) : O.column.type === "date" || O.column.type === "datetime" || O.column.slotType === "date" || O.column.slotType === "datetime" ? (u(), V(re, {
|
|
2637
2638
|
key: 1,
|
|
2638
2639
|
"model-value": w.value,
|
|
2639
2640
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
@@ -2642,31 +2643,31 @@ const Io = {
|
|
|
2642
2643
|
"input-type": O.column.type === "slot" ? O.column.slotType : O.column.type,
|
|
2643
2644
|
"time-zone": O.timeZone,
|
|
2644
2645
|
"onUpdate:modelValue": R[1] || (R[1] = (z) => k(null, z ?? ""))
|
|
2645
|
-
}, null, 8, ["model-value", "label", "input-type", "time-zone"])) : O.column.type === "number" || O.column.slotType === "number" ? (u(), V(
|
|
2646
|
+
}, null, 8, ["model-value", "label", "input-type", "time-zone"])) : O.column.type === "number" || O.column.slotType === "number" ? (u(), V(re, {
|
|
2646
2647
|
key: 2,
|
|
2647
2648
|
"model-value": r.value,
|
|
2648
2649
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
2649
2650
|
"input-type": "number",
|
|
2650
2651
|
"show-arrows": !1,
|
|
2651
2652
|
onInput: R[2] || (R[2] = (z, y) => B(null, y))
|
|
2652
|
-
}, null, 8, ["model-value"])) : O.column.type === "string" || O.column.slotType === "string" ? (u(), V(
|
|
2653
|
+
}, null, 8, ["model-value"])) : O.column.type === "string" || O.column.slotType === "string" ? (u(), V(re, {
|
|
2653
2654
|
key: 3,
|
|
2654
2655
|
"model-value": r.value,
|
|
2655
2656
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
2656
2657
|
"input-type": "text",
|
|
2657
2658
|
onInput: R[3] || (R[3] = (z, y) => k(null, y))
|
|
2658
|
-
}, null, 8, ["model-value"])) :
|
|
2659
|
+
}, null, 8, ["model-value"])) : i.value ? (u(), v("select", {
|
|
2659
2660
|
key: 4,
|
|
2660
2661
|
class: "!cl-h-[2rem] cl-border-none cl-mb-0 cl-rounded-md cl-w-full",
|
|
2661
|
-
onChange: R[4] || (R[4] = (z) =>
|
|
2662
|
+
onChange: R[4] || (R[4] = (z) => c.value ? B(z.target) : k(z.target))
|
|
2662
2663
|
}, [
|
|
2663
2664
|
Go,
|
|
2664
|
-
(u(!0),
|
|
2665
|
+
(u(!0), v(P, null, J(O.column.listEntries ?? [], (z) => (u(), v("option", {
|
|
2665
2666
|
key: z.value,
|
|
2666
2667
|
value: z.value,
|
|
2667
2668
|
selected: r.value === z.value.toString()
|
|
2668
|
-
}, E(d(n)(z.translationKey)), 9,
|
|
2669
|
-
], 32)) :
|
|
2669
|
+
}, E(d(n)(z.translationKey)), 9, Zo))), 128))
|
|
2670
|
+
], 32)) : q("", !0),
|
|
2670
2671
|
$(Do, {
|
|
2671
2672
|
filter: m.value,
|
|
2672
2673
|
"onUpdate:filter": R[5] || (R[5] = (z) => m.value = z),
|
|
@@ -2674,7 +2675,7 @@ const Io = {
|
|
|
2674
2675
|
"default-operation": p(),
|
|
2675
2676
|
"first-half": O.firstHalf
|
|
2676
2677
|
}, null, 8, ["filter", "column", "default-operation", "first-half"])
|
|
2677
|
-
])) :
|
|
2678
|
+
])) : q("", !0);
|
|
2678
2679
|
}
|
|
2679
2680
|
}), Wo = { class: "-cl-top-1 cl-bg-white cl-shadow-sm cl-sticky cl-z-30 lg:cl-bg-transparent lg:cl-relative lg:cl-shadow-none" }, Ko = { class: "cl-hidden lg:cl-table-row" }, Qo = ["onClick"], Jo = { class: "cl-flex cl-justify-end cl-w-full lg:cl-hidden" }, Yo = { class: "cl-col-span-2 lg:cl-hidden" }, Xo = ["onClick"], en = { class: "cl-font-normal cl-mr-1" }, ln = /* @__PURE__ */ U({
|
|
2680
2681
|
__name: "cl-ui-grid-header",
|
|
@@ -2689,33 +2690,33 @@ const Io = {
|
|
|
2689
2690
|
setup(t, { emit: o }) {
|
|
2690
2691
|
const e = t, { t: l } = oe(), n = S({
|
|
2691
2692
|
get: () => e.request,
|
|
2692
|
-
set: (
|
|
2693
|
+
set: (i) => o("update:request", i)
|
|
2693
2694
|
});
|
|
2694
|
-
function p(
|
|
2695
|
+
function p(i, c) {
|
|
2695
2696
|
var m, b;
|
|
2696
|
-
return ((m = n.value.sort) == null ? void 0 : m.sortOnColumn) ===
|
|
2697
|
+
return ((m = n.value.sort) == null ? void 0 : m.sortOnColumn) === i.field && ((b = n.value.sort) == null ? void 0 : b.sortByAscending) === c;
|
|
2697
2698
|
}
|
|
2698
|
-
function s(
|
|
2699
|
-
if (typeof
|
|
2700
|
-
const
|
|
2701
|
-
|
|
2702
|
-
sortOnColumn:
|
|
2699
|
+
function s(i) {
|
|
2700
|
+
if (typeof i < "u") {
|
|
2701
|
+
const c = ce(e.request);
|
|
2702
|
+
c.sort === null || c.sort.sortOnColumn !== i ? c.sort = {
|
|
2703
|
+
sortOnColumn: i,
|
|
2703
2704
|
sortByAscending: !0
|
|
2704
|
-
} :
|
|
2705
|
+
} : c.sort.sortOnColumn === i && c.sort.sortByAscending === !0 ? c.sort.sortByAscending = !1 : c.sort = null, n.value = c;
|
|
2705
2706
|
}
|
|
2706
2707
|
}
|
|
2707
|
-
function a(
|
|
2708
|
-
if (
|
|
2709
|
-
const
|
|
2710
|
-
|
|
2711
|
-
...
|
|
2712
|
-
...
|
|
2713
|
-
],
|
|
2708
|
+
function a(i) {
|
|
2709
|
+
if (i) {
|
|
2710
|
+
const c = ce(n.value);
|
|
2711
|
+
c.filters = [
|
|
2712
|
+
...c.filters.filter((m) => m.filterOnColumn !== i[0].filterOnColumn),
|
|
2713
|
+
...i
|
|
2714
|
+
], c.pageNumber = 1, n.value = c;
|
|
2714
2715
|
}
|
|
2715
2716
|
}
|
|
2716
|
-
return (
|
|
2717
|
+
return (i, c) => (u(), v("thead", Wo, [
|
|
2717
2718
|
f("tr", Ko, [
|
|
2718
|
-
(u(!0),
|
|
2719
|
+
(u(!0), v(P, null, J(i.columns, (m, b) => (u(), v("th", {
|
|
2719
2720
|
key: b,
|
|
2720
2721
|
class: _(["cl-text-grey-3 cl-text-sm", {
|
|
2721
2722
|
"cl-cursor-pointer": d(Oe)(m)
|
|
@@ -2740,7 +2741,7 @@ const Io = {
|
|
|
2740
2741
|
]),
|
|
2741
2742
|
f("tr", {
|
|
2742
2743
|
class: _(["cl-border cl-border-grey-2 cl-flex cl-flex-wrap cl-p-2 lg:cl-border-none lg:cl-p-0 lg:cl-table-row", {
|
|
2743
|
-
"cl-hidden lg:cl-table-row": !
|
|
2744
|
+
"cl-hidden lg:cl-table-row": !i.filterPanelOpen
|
|
2744
2745
|
}])
|
|
2745
2746
|
}, [
|
|
2746
2747
|
f("div", Jo, [
|
|
@@ -2748,17 +2749,17 @@ const Io = {
|
|
|
2748
2749
|
class: "cl-text-grey-4 hover:cl-cursor-pointer hover:cl-text-link-default",
|
|
2749
2750
|
icon: "ph:x",
|
|
2750
2751
|
size: 16,
|
|
2751
|
-
onClick:
|
|
2752
|
+
onClick: c[0] || (c[0] = K((m) => i.$emit("update:filterPanelOpen", !1), ["prevent"]))
|
|
2752
2753
|
})
|
|
2753
2754
|
]),
|
|
2754
|
-
(u(!0),
|
|
2755
|
+
(u(!0), v(P, null, J(i.columns, (m, b) => (u(), v("th", {
|
|
2755
2756
|
key: b,
|
|
2756
2757
|
class: _(["cl-grid cl-grid-cols-4 cl-py-1 cl-text-xs cl-w-full lg:cl-table-cell lg:cl-w-auto", {
|
|
2757
2758
|
"cl-hidden lg:cl-table-cell": !d(Ue)(m)
|
|
2758
2759
|
}])
|
|
2759
2760
|
}, [
|
|
2760
2761
|
f("div", Yo, E(m.caption), 1),
|
|
2761
|
-
d(Oe)(m) ? (u(),
|
|
2762
|
+
d(Oe)(m) ? (u(), v("div", {
|
|
2762
2763
|
key: 0,
|
|
2763
2764
|
class: "cl-col-span-2 cl-gap-1 cl-span lg:cl-hidden",
|
|
2764
2765
|
onClick: (r) => s(m.field)
|
|
@@ -2777,13 +2778,13 @@ const Io = {
|
|
|
2777
2778
|
class: "cl-cursor-pointer cl-inline-block",
|
|
2778
2779
|
icon: "ph:minus"
|
|
2779
2780
|
}))
|
|
2780
|
-
], 8, Xo)) :
|
|
2781
|
-
$(
|
|
2781
|
+
], 8, Xo)) : q("", !0),
|
|
2782
|
+
$(xo, {
|
|
2782
2783
|
class: "cl-col-span-4",
|
|
2783
2784
|
filter: n.value.filters.filter((r) => r.filterOnColumn === m.field),
|
|
2784
2785
|
column: m,
|
|
2785
|
-
"time-zone":
|
|
2786
|
-
"first-half": b <=
|
|
2786
|
+
"time-zone": i.timeZone,
|
|
2787
|
+
"first-half": b <= i.columns.length / 2,
|
|
2787
2788
|
"onUpdate:filter": a
|
|
2788
2789
|
}, null, 8, ["filter", "column", "time-zone", "first-half"])
|
|
2789
2790
|
], 2))), 128))
|
|
@@ -2798,23 +2799,23 @@ const Io = {
|
|
|
2798
2799
|
},
|
|
2799
2800
|
emits: ["update:columns"],
|
|
2800
2801
|
setup(t, { emit: o }) {
|
|
2801
|
-
const e = t, { t: l } = oe(), n =
|
|
2802
|
-
function p(
|
|
2803
|
-
m <
|
|
2802
|
+
const e = t, { t: l } = oe(), n = A(!1);
|
|
2803
|
+
function p(i, c, m) {
|
|
2804
|
+
m < i.length && m >= 0 && i.splice(m, 0, i.splice(c, 1)[0]);
|
|
2804
2805
|
}
|
|
2805
|
-
function s(
|
|
2806
|
-
const m =
|
|
2806
|
+
function s(i, c) {
|
|
2807
|
+
const m = ce(e.columns), b = (i == null ? void 0 : i.checked) ?? !1, r = m.findIndex((w) => w.name === c.name);
|
|
2807
2808
|
r >= 0 && (m[r].visible = b), o("update:columns", m);
|
|
2808
2809
|
}
|
|
2809
|
-
function a(
|
|
2810
|
-
const m =
|
|
2811
|
-
p(m,
|
|
2810
|
+
function a(i, c) {
|
|
2811
|
+
const m = ce(e.columns), b = c === "up" ? i + 1 : i - 1;
|
|
2812
|
+
p(m, i, b), o("update:columns", m);
|
|
2812
2813
|
}
|
|
2813
|
-
return (
|
|
2814
|
-
$(me,
|
|
2814
|
+
return (i, c) => (u(), v(P, null, [
|
|
2815
|
+
$(me, ae(i.$attrs, {
|
|
2815
2816
|
class: "cl-w-full",
|
|
2816
2817
|
size: "small",
|
|
2817
|
-
onClick:
|
|
2818
|
+
onClick: c[0] || (c[0] = K((m) => n.value = !0, ["prevent"]))
|
|
2818
2819
|
}), {
|
|
2819
2820
|
default: F(() => [
|
|
2820
2821
|
le(E(d(l)("grid.manageView")), 1)
|
|
@@ -2830,7 +2831,7 @@ const Io = {
|
|
|
2830
2831
|
class: "cl-absolute cl-cursor-pointer cl-right-3 cl-text-off-white cl-top-3",
|
|
2831
2832
|
icon: "ph:x",
|
|
2832
2833
|
size: 16,
|
|
2833
|
-
onClick:
|
|
2834
|
+
onClick: c[1] || (c[1] = (m) => n.value = !1)
|
|
2834
2835
|
}),
|
|
2835
2836
|
f("h3", nn, E(d(l)("grid.manageView")), 1),
|
|
2836
2837
|
f("ul", sn, [
|
|
@@ -2839,33 +2840,33 @@ const Io = {
|
|
|
2839
2840
|
f("strong", cn, E(d(l)("grid.visible")), 1),
|
|
2840
2841
|
f("strong", un, E(d(l)("grid.order")), 1)
|
|
2841
2842
|
]),
|
|
2842
|
-
(u(!0),
|
|
2843
|
+
(u(!0), v(P, null, J(i.columns, (m, b) => (u(), v("li", {
|
|
2843
2844
|
key: b,
|
|
2844
2845
|
class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full"
|
|
2845
2846
|
}, [
|
|
2846
2847
|
f("div", dn, E(m.caption), 1),
|
|
2847
2848
|
f("div", pn, [
|
|
2848
|
-
$(
|
|
2849
|
+
$(re, {
|
|
2849
2850
|
"model-value": m.visible === void 0 || m.visible === !0,
|
|
2850
2851
|
"input-type": "checkbox",
|
|
2851
2852
|
onClick: (r) => s(r.target, m)
|
|
2852
2853
|
}, null, 8, ["model-value", "onClick"])
|
|
2853
2854
|
]),
|
|
2854
2855
|
f("div", fn, [
|
|
2855
|
-
m.visible === void 0 || m.visible === !0 ? (u(),
|
|
2856
|
+
m.visible === void 0 || m.visible === !0 ? (u(), v(P, { key: 0 }, [
|
|
2856
2857
|
b !== 0 ? (u(), V(d(I), {
|
|
2857
2858
|
key: 0,
|
|
2858
2859
|
class: "cl-cursor-pointer cl-inline-block cl-mr-2",
|
|
2859
2860
|
icon: "ph:arrow-left",
|
|
2860
2861
|
onClick: (r) => a(b, "down")
|
|
2861
|
-
}, null, 8, ["onClick"])) :
|
|
2862
|
-
b !==
|
|
2862
|
+
}, null, 8, ["onClick"])) : q("", !0),
|
|
2863
|
+
b !== i.columns.length - 1 ? (u(), V(d(I), {
|
|
2863
2864
|
key: 1,
|
|
2864
2865
|
class: "cl-cursor-pointer cl-inline-block",
|
|
2865
2866
|
icon: "ph:arrow-right",
|
|
2866
2867
|
onClick: (r) => a(b, "up")
|
|
2867
|
-
}, null, 8, ["onClick"])) :
|
|
2868
|
-
], 64)) : (u(),
|
|
2868
|
+
}, null, 8, ["onClick"])) : q("", !0)
|
|
2869
|
+
], 64)) : (u(), v("em", mn, E(d(l)("grid.hidden")), 1))
|
|
2869
2870
|
])
|
|
2870
2871
|
]))), 128))
|
|
2871
2872
|
])
|
|
@@ -2894,7 +2895,7 @@ const Io = {
|
|
|
2894
2895
|
const e = t, l = S({
|
|
2895
2896
|
get: () => e.columns,
|
|
2896
2897
|
set: (h) => o("update:columns", h)
|
|
2897
|
-
}), n = S(() => l.value.filter((h) => h.visible ?? !0)), p =
|
|
2898
|
+
}), n = S(() => l.value.filter((h) => h.visible ?? !0)), p = A({});
|
|
2898
2899
|
function s() {
|
|
2899
2900
|
const h = {};
|
|
2900
2901
|
window.innerWidth >= 1024 && l.value.forEach((T) => {
|
|
@@ -2905,24 +2906,24 @@ const Io = {
|
|
|
2905
2906
|
function a(h) {
|
|
2906
2907
|
return p.value[h] ?? "";
|
|
2907
2908
|
}
|
|
2908
|
-
|
|
2909
|
+
qe(() => {
|
|
2909
2910
|
window.addEventListener("resize", s), s();
|
|
2910
2911
|
}), Ie(() => window.removeEventListener("resize", s));
|
|
2911
|
-
const
|
|
2912
|
+
const i = S({
|
|
2912
2913
|
get: () => e.request,
|
|
2913
2914
|
set: (h) => o("update:request", h)
|
|
2914
2915
|
});
|
|
2915
|
-
function
|
|
2916
|
-
const h =
|
|
2917
|
-
h.pageNumber = 1, h.filters = [],
|
|
2916
|
+
function c() {
|
|
2917
|
+
const h = ce(i.value);
|
|
2918
|
+
h.pageNumber = 1, h.filters = [], i.value = h;
|
|
2918
2919
|
}
|
|
2919
2920
|
const m = Ke(() => o("data-request"), 750);
|
|
2920
|
-
Q(
|
|
2921
|
+
Q(i, m, {
|
|
2921
2922
|
deep: !0,
|
|
2922
2923
|
immediate: !0
|
|
2923
2924
|
});
|
|
2924
|
-
const b = S(() => e.data), r =
|
|
2925
|
-
return Q(r, () => r.value ? o("edit-start") : o("edit-end")), (h, T) => (u(),
|
|
2925
|
+
const b = S(() => e.data), r = A(!1), w = A(!1);
|
|
2926
|
+
return Q(r, () => r.value ? o("edit-start") : o("edit-end")), (h, T) => (u(), v("div", vn, [
|
|
2926
2927
|
$(ge, { name: "fade" }, {
|
|
2927
2928
|
default: F(() => [
|
|
2928
2929
|
L(f("div", bn, [
|
|
@@ -2933,7 +2934,7 @@ const Io = {
|
|
|
2933
2934
|
]),
|
|
2934
2935
|
_: 1
|
|
2935
2936
|
}),
|
|
2936
|
-
$(
|
|
2937
|
+
$(Zt, {
|
|
2937
2938
|
"edit-mode": r.value,
|
|
2938
2939
|
"onUpdate:editMode": T[1] || (T[1] = (k) => r.value = k),
|
|
2939
2940
|
"filter-panel-open": w.value,
|
|
@@ -2941,7 +2942,7 @@ const Io = {
|
|
|
2941
2942
|
columns: h.columns,
|
|
2942
2943
|
options: h.options,
|
|
2943
2944
|
request: h.request,
|
|
2944
|
-
onClearFilters:
|
|
2945
|
+
onClearFilters: c
|
|
2945
2946
|
}, {
|
|
2946
2947
|
"view-manager": F(() => [
|
|
2947
2948
|
$(gn, {
|
|
@@ -2958,15 +2959,15 @@ const Io = {
|
|
|
2958
2959
|
}])
|
|
2959
2960
|
}, [
|
|
2960
2961
|
f("colgroup", yn, [
|
|
2961
|
-
(u(!0),
|
|
2962
|
+
(u(!0), v(P, null, J(n.value, (k, B) => (u(), v("col", {
|
|
2962
2963
|
key: B,
|
|
2963
|
-
style:
|
|
2964
|
+
style: xe(a(k.name)),
|
|
2964
2965
|
span: 1
|
|
2965
2966
|
}, null, 4))), 128))
|
|
2966
2967
|
]),
|
|
2967
2968
|
$(ln, {
|
|
2968
|
-
request:
|
|
2969
|
-
"onUpdate:request": T[3] || (T[3] = (k) =>
|
|
2969
|
+
request: i.value,
|
|
2970
|
+
"onUpdate:request": T[3] || (T[3] = (k) => i.value = k),
|
|
2970
2971
|
"filter-panel-open": w.value,
|
|
2971
2972
|
"onUpdate:filterPanelOpen": T[4] || (T[4] = (k) => w.value = k),
|
|
2972
2973
|
columns: n.value,
|
|
@@ -2975,28 +2976,28 @@ const Io = {
|
|
|
2975
2976
|
}, null, 8, ["request", "filter-panel-open", "columns", "options", "time-zone"]),
|
|
2976
2977
|
$(ao, {
|
|
2977
2978
|
columns: n.value,
|
|
2978
|
-
request:
|
|
2979
|
+
request: i.value,
|
|
2979
2980
|
data: b.value,
|
|
2980
2981
|
"time-zone": h.timeZone,
|
|
2981
2982
|
loading: h.loading,
|
|
2982
2983
|
"edit-mode": r.value,
|
|
2983
2984
|
"selection-enabled": h.options.rowSelectionEnabled,
|
|
2984
|
-
onClearFilters:
|
|
2985
|
+
onClearFilters: c,
|
|
2985
2986
|
onRowEdit: T[5] || (T[5] = (k) => h.$emit("row-edit", k)),
|
|
2986
2987
|
onRowSelect: T[6] || (T[6] = (k) => h.$emit("row-select", k))
|
|
2987
2988
|
}, Re({ _: 2 }, [
|
|
2988
2989
|
J(h.$slots, (k, B) => ({
|
|
2989
2990
|
name: B,
|
|
2990
2991
|
fn: F((O) => [
|
|
2991
|
-
j(h.$slots, B, se(
|
|
2992
|
+
j(h.$slots, B, se(ie(O)))
|
|
2992
2993
|
])
|
|
2993
2994
|
}))
|
|
2994
2995
|
]), 1032, ["columns", "request", "data", "time-zone", "loading", "edit-mode", "selection-enabled"])
|
|
2995
2996
|
], 2)
|
|
2996
2997
|
]),
|
|
2997
2998
|
$(To, {
|
|
2998
|
-
request:
|
|
2999
|
-
"onUpdate:request": T[7] || (T[7] = (k) =>
|
|
2999
|
+
request: i.value,
|
|
3000
|
+
"onUpdate:request": T[7] || (T[7] = (k) => i.value = k),
|
|
3000
3001
|
data: h.data
|
|
3001
3002
|
}, null, 8, ["request", "data"])
|
|
3002
3003
|
]));
|
|
@@ -3005,7 +3006,7 @@ const Io = {
|
|
|
3005
3006
|
__name: "cl-ui-header",
|
|
3006
3007
|
emits: ["open-click"],
|
|
3007
3008
|
setup(t) {
|
|
3008
|
-
return (o, e) => (u(),
|
|
3009
|
+
return (o, e) => (u(), v("header", $n, [
|
|
3009
3010
|
j(o.$slots, "logo"),
|
|
3010
3011
|
f("div", {
|
|
3011
3012
|
class: "cl-cursor-pointer cl-flex cl-flex-nowrap",
|
|
@@ -3022,7 +3023,7 @@ const Io = {
|
|
|
3022
3023
|
}, On = {
|
|
3023
3024
|
key: 1,
|
|
3024
3025
|
class: "cl-text-ellipsis cl-text-xs cl-whitespace-nowrap"
|
|
3025
|
-
},
|
|
3026
|
+
}, An = { class: "cl-content-center cl-flex cl-h-20 cl-items-center cl-justify-center cl-justify-items-center cl-transition-all cl-w-10 md:cl-ml-4 md:cl-w-20" }, qn = { class: "cl-absolute cl-bg-white cl-right-0 cl-shadow-2xl cl-top-20 cl-w-full cl-z-20" }, Sn = /* @__PURE__ */ U({
|
|
3026
3027
|
__name: "cl-ui-header-menu",
|
|
3027
3028
|
props: {
|
|
3028
3029
|
username: { default: "" },
|
|
@@ -3033,12 +3034,12 @@ const Io = {
|
|
|
3033
3034
|
},
|
|
3034
3035
|
emits: ["update:is-open"],
|
|
3035
3036
|
setup(t, { emit: o }) {
|
|
3036
|
-
const e = t, l =
|
|
3037
|
+
const e = t, l = A();
|
|
3037
3038
|
ze(l, n);
|
|
3038
3039
|
function n() {
|
|
3039
3040
|
e.isOpen === !0 && o("update:is-open", !1);
|
|
3040
3041
|
}
|
|
3041
|
-
return (p, s) => (u(),
|
|
3042
|
+
return (p, s) => (u(), v("div", {
|
|
3042
3043
|
ref_key: "headerMenuElement",
|
|
3043
3044
|
ref: l,
|
|
3044
3045
|
class: _(["md:cl-relative", {
|
|
@@ -3047,7 +3048,7 @@ const Io = {
|
|
|
3047
3048
|
}])
|
|
3048
3049
|
}, [
|
|
3049
3050
|
f("div", Cn, [
|
|
3050
|
-
p.image ? (u(),
|
|
3051
|
+
p.image ? (u(), v("img", {
|
|
3051
3052
|
key: 0,
|
|
3052
3053
|
src: p.image,
|
|
3053
3054
|
class: "cl-hidden cl-m-4 cl-max-h-12 cl-max-w-12 cl-ring-2 cl-ring-white cl-rounded-full md:cl-block"
|
|
@@ -3064,10 +3065,10 @@ const Io = {
|
|
|
3064
3065
|
"cl-text-white": e.colour === "secondary"
|
|
3065
3066
|
}])
|
|
3066
3067
|
}, [
|
|
3067
|
-
p.username ? (u(),
|
|
3068
|
-
p.group ? (u(),
|
|
3068
|
+
p.username ? (u(), v("div", En, E(p.username), 1)) : q("", !0),
|
|
3069
|
+
p.group ? (u(), v("div", On, E(p.group), 1)) : q("", !0)
|
|
3069
3070
|
], 2),
|
|
3070
|
-
f("div",
|
|
3071
|
+
f("div", An, [
|
|
3071
3072
|
$(d(I), {
|
|
3072
3073
|
class: _(["cl-transform-gpu cl-transition-transform", {
|
|
3073
3074
|
"cl-rotate-180": p.isOpen,
|
|
@@ -3080,7 +3081,7 @@ const Io = {
|
|
|
3080
3081
|
]),
|
|
3081
3082
|
$(ge, { name: "fade" }, {
|
|
3082
3083
|
default: F(() => [
|
|
3083
|
-
L(f("div",
|
|
3084
|
+
L(f("div", qn, [
|
|
3084
3085
|
j(p.$slots, "default")
|
|
3085
3086
|
], 512), [
|
|
3086
3087
|
[H, p.isOpen]
|
|
@@ -3120,29 +3121,29 @@ const _n = {
|
|
|
3120
3121
|
},
|
|
3121
3122
|
emits: ["language-select"],
|
|
3122
3123
|
setup(t, { emit: o }) {
|
|
3123
|
-
const e = t, { locale: l } = oe(), n =
|
|
3124
|
+
const e = t, { locale: l } = oe(), n = A(!1), p = S(() => e.supportedLanguages.find((i) => i.localeCode === l.value) ?? e.defaultLangauge), s = S(() => e.supportedLanguages.filter((i) => je(i)).sort((i, c) => i.nativeName > c.nativeName ? 1 : c.nativeName > i.nativeName ? -1 : 0));
|
|
3124
3125
|
function a() {
|
|
3125
3126
|
e.disabled || (n.value = !n.value);
|
|
3126
3127
|
}
|
|
3127
|
-
return Q(() => e.disabled, (
|
|
3128
|
-
|
|
3129
|
-
}), (
|
|
3128
|
+
return Q(() => e.disabled, (i) => {
|
|
3129
|
+
i && (n.value = !1);
|
|
3130
|
+
}), (i, c) => p.value !== null && d(je)(p.value) ? (u(), v("div", _n, [
|
|
3130
3131
|
f("div", {
|
|
3131
3132
|
class: _(["cl-flex cl-items-center", {
|
|
3132
|
-
"cl-cursor-pointer": !
|
|
3133
|
+
"cl-cursor-pointer": !i.disabled
|
|
3133
3134
|
}]),
|
|
3134
3135
|
onClick: a
|
|
3135
3136
|
}, [
|
|
3136
3137
|
f("span", {
|
|
3137
3138
|
class: _(["cl-font-semibold cl-text-xs", {
|
|
3138
|
-
"cl-opacity-50":
|
|
3139
|
+
"cl-opacity-50": i.disabled
|
|
3139
3140
|
}])
|
|
3140
3141
|
}, E(p.value.nativeName), 3)
|
|
3141
3142
|
], 2),
|
|
3142
3143
|
$(ge, { name: "fade" }, {
|
|
3143
3144
|
default: F(() => [
|
|
3144
3145
|
L(f("div", In, [
|
|
3145
|
-
(u(!0),
|
|
3146
|
+
(u(!0), v(P, null, J(s.value, (m, b) => (u(), v("div", {
|
|
3146
3147
|
key: b,
|
|
3147
3148
|
class: "cl-border-b cl-border-grey-0 cl-cursor-pointer cl-flex cl-items-center cl-justify-center cl-p-1 cl-text-center cl-transition-colors cl-w-28 hover:cl-bg-grey-0 last-child:cl-border-b-0 last:cl-border-b-0 lg:cl-p-2",
|
|
3148
3149
|
"data-localename": m.name,
|
|
@@ -3159,12 +3160,12 @@ const _n = {
|
|
|
3159
3160
|
]),
|
|
3160
3161
|
_: 1
|
|
3161
3162
|
})
|
|
3162
|
-
])) :
|
|
3163
|
+
])) : q("", !0);
|
|
3163
3164
|
}
|
|
3164
3165
|
}), Bn = { class: "cl-relative" }, Mn = { class: "cl-h-screen cl-z-0" }, Vn = { class: "cl-absolute cl-bg-secondary-default cl-gap-y-1 cl-grid cl-grid-cols-1 cl-left-0 cl-opacity-95 cl-p-6 cl-top-0 cl-w-full cl-z-10 lg:cl-gap-x-1 lg:cl-grid-cols-10 lg:cl-p-10" }, Dn = { class: "cl-col-span-10 lg:cl-col-span-3" }, Ln = {
|
|
3165
3166
|
key: 0,
|
|
3166
3167
|
class: "cl-col-span-10 cl-flex cl-items-start cl-justify-end cl-text-white lg:cl-col-span-1 lg:cl-p-2"
|
|
3167
|
-
}, Pn = { class: "cl-col-span-3" }, Fn = { class: "cl-inline cl-relative cl-text-grey-4" }, Hn = { class: "cl-col-span-3" }, Gn = { class: "cl-inline cl-relative cl-text-grey-4" },
|
|
3168
|
+
}, Pn = { class: "cl-col-span-3" }, Fn = { class: "cl-inline cl-relative cl-text-grey-4" }, Hn = { class: "cl-col-span-3" }, Gn = { class: "cl-inline cl-relative cl-text-grey-4" }, Zn = { class: "cl-col-span-10 cl-emphasis-danger cl-mt-10 cl-p-3 cl-rounded-md cl-text-sm md:cl-mt-3" }, xn = /* @__PURE__ */ U({
|
|
3168
3169
|
__name: "cl-ui-login",
|
|
3169
3170
|
props: {
|
|
3170
3171
|
errors: { default: () => [] },
|
|
@@ -3175,7 +3176,7 @@ const _n = {
|
|
|
3175
3176
|
"update:errors": null
|
|
3176
3177
|
},
|
|
3177
3178
|
setup(t, { emit: o }) {
|
|
3178
|
-
const { t: e } = oe(), l =
|
|
3179
|
+
const { t: e } = oe(), l = A(""), n = A(""), p = A("password"), s = A();
|
|
3179
3180
|
function a() {
|
|
3180
3181
|
const b = {
|
|
3181
3182
|
username: l.value,
|
|
@@ -3183,10 +3184,10 @@ const _n = {
|
|
|
3183
3184
|
};
|
|
3184
3185
|
o("login", b);
|
|
3185
3186
|
}
|
|
3186
|
-
function
|
|
3187
|
+
function i() {
|
|
3187
3188
|
o("update:errors", []);
|
|
3188
3189
|
}
|
|
3189
|
-
function
|
|
3190
|
+
function c(b, r) {
|
|
3190
3191
|
const w = {
|
|
3191
3192
|
valid: !0,
|
|
3192
3193
|
message: ""
|
|
@@ -3196,7 +3197,7 @@ const _n = {
|
|
|
3196
3197
|
function m(b, r) {
|
|
3197
3198
|
s.value = b;
|
|
3198
3199
|
}
|
|
3199
|
-
return (b, r) => (u(),
|
|
3200
|
+
return (b, r) => (u(), v("div", Bn, [
|
|
3200
3201
|
f("div", Mn, [
|
|
3201
3202
|
j(b.$slots, "background")
|
|
3202
3203
|
]),
|
|
@@ -3204,9 +3205,9 @@ const _n = {
|
|
|
3204
3205
|
f("div", Dn, [
|
|
3205
3206
|
j(b.$slots, "logo")
|
|
3206
3207
|
]),
|
|
3207
|
-
b.$slots["language-switcher"] ? (u(),
|
|
3208
|
+
b.$slots["language-switcher"] ? (u(), v("div", Ln, [
|
|
3208
3209
|
j(b.$slots, "language-switcher")
|
|
3209
|
-
])) :
|
|
3210
|
+
])) : q("", !0),
|
|
3210
3211
|
f("div", {
|
|
3211
3212
|
class: _(["cl-gap-y-4 cl-grid cl-grid-cols-1 lg:cl-gap-x-2 lg:cl-grid-cols-8", {
|
|
3212
3213
|
"cl-col-span-7": !b.$slots["language-switcher"],
|
|
@@ -3220,7 +3221,8 @@ const _n = {
|
|
|
3220
3221
|
icon: "ph:user",
|
|
3221
3222
|
size: 18
|
|
3222
3223
|
}),
|
|
3223
|
-
$(
|
|
3224
|
+
$(re, {
|
|
3225
|
+
id: "cl-ui-login-usernameinput",
|
|
3224
3226
|
modelValue: l.value,
|
|
3225
3227
|
"onUpdate:modelValue": r[0] || (r[0] = (w) => l.value = w),
|
|
3226
3228
|
modelModifiers: { trim: !0 },
|
|
@@ -3232,10 +3234,10 @@ const _n = {
|
|
|
3232
3234
|
"placeholder-text": d(e)("login.email"),
|
|
3233
3235
|
autocomplete: "username",
|
|
3234
3236
|
"validate-immediately": !0,
|
|
3235
|
-
"custom-validation-function":
|
|
3237
|
+
"custom-validation-function": c,
|
|
3236
3238
|
"input-specific-classes": "!cl-pl-9",
|
|
3237
3239
|
"message-when-valid": l.value ? d(e)("login.validEmail") : "",
|
|
3238
|
-
onInput:
|
|
3240
|
+
onInput: i,
|
|
3239
3241
|
onValidated: m
|
|
3240
3242
|
}, null, 8, ["modelValue", "highlight-when-valid", "label", "placeholder-text", "message-when-valid"])
|
|
3241
3243
|
])
|
|
@@ -3263,7 +3265,8 @@ const _n = {
|
|
|
3263
3265
|
}, null, 512), [
|
|
3264
3266
|
[H, p.value === "text"]
|
|
3265
3267
|
]),
|
|
3266
|
-
$(
|
|
3268
|
+
$(re, {
|
|
3269
|
+
id: "cl-ui-login-passwordinput",
|
|
3267
3270
|
modelValue: n.value,
|
|
3268
3271
|
"onUpdate:modelValue": r[3] || (r[3] = (w) => n.value = w),
|
|
3269
3272
|
class: "!cl-border-2 cl-w-full",
|
|
@@ -3275,8 +3278,8 @@ const _n = {
|
|
|
3275
3278
|
autocomplete: "current-password",
|
|
3276
3279
|
"validate-immediately": !0,
|
|
3277
3280
|
"input-specific-classes": "!cl-pl-9 !cl-pr-9",
|
|
3278
|
-
"custom-validation-function":
|
|
3279
|
-
onInput:
|
|
3281
|
+
"custom-validation-function": c,
|
|
3282
|
+
onInput: i
|
|
3280
3283
|
}, null, 8, ["modelValue", "input-type", "highlight-when-valid", "label", "placeholder-text"])
|
|
3281
3284
|
])
|
|
3282
3285
|
]),
|
|
@@ -3286,6 +3289,7 @@ const _n = {
|
|
|
3286
3289
|
}])
|
|
3287
3290
|
}, [
|
|
3288
3291
|
$(me, {
|
|
3292
|
+
id: "cl-ui-login-loginbutton",
|
|
3289
3293
|
class: "cl-w-full",
|
|
3290
3294
|
colour: "blue",
|
|
3291
3295
|
loading: b.loading,
|
|
@@ -3303,8 +3307,9 @@ const _n = {
|
|
|
3303
3307
|
default: F(() => {
|
|
3304
3308
|
var w;
|
|
3305
3309
|
return [
|
|
3306
|
-
L(f("span",
|
|
3307
|
-
(u(!0),
|
|
3310
|
+
L(f("span", Zn, [
|
|
3311
|
+
(u(!0), v(P, null, J(b.errors, (h, T) => (u(), v("div", {
|
|
3312
|
+
id: "cl-ui-login-errors",
|
|
3308
3313
|
key: T,
|
|
3309
3314
|
class: "cl-font-semibold"
|
|
3310
3315
|
}, E(h), 1))), 128))
|
|
@@ -3336,7 +3341,7 @@ const _n = {
|
|
|
3336
3341
|
colour: { default: "default" }
|
|
3337
3342
|
},
|
|
3338
3343
|
setup(t) {
|
|
3339
|
-
const o =
|
|
3344
|
+
const o = A([]), e = S(() => o.value.filter((r) => r.open === !0).length > 0);
|
|
3340
3345
|
function l(r) {
|
|
3341
3346
|
let w = o.value.find((h) => h.id === r);
|
|
3342
3347
|
return w || (w = {
|
|
@@ -3360,17 +3365,17 @@ const _n = {
|
|
|
3360
3365
|
deep: !0
|
|
3361
3366
|
}
|
|
3362
3367
|
);
|
|
3363
|
-
const s =
|
|
3364
|
-
function
|
|
3365
|
-
s.value = !s.value, a.value = !0,
|
|
3368
|
+
const s = A(!1), a = A(!1), { start: i } = We(() => a.value = !1, 100);
|
|
3369
|
+
function c() {
|
|
3370
|
+
s.value = !s.value, a.value = !0, i();
|
|
3366
3371
|
}
|
|
3367
|
-
const m =
|
|
3372
|
+
const m = A();
|
|
3368
3373
|
function b() {
|
|
3369
3374
|
s.value === !1 && e.value === !0 && o.value.forEach((r) => {
|
|
3370
3375
|
r.open = !1;
|
|
3371
3376
|
});
|
|
3372
3377
|
}
|
|
3373
|
-
return ze(m, b), (r, w) => (u(),
|
|
3378
|
+
return ze(m, b), (r, w) => (u(), v("div", {
|
|
3374
3379
|
ref_key: "navElement",
|
|
3375
3380
|
ref: m,
|
|
3376
3381
|
class: "cl-flex cl-flex-nowrap cl-relative"
|
|
@@ -3382,9 +3387,9 @@ const _n = {
|
|
|
3382
3387
|
"cl-bg-blue-dark": r.colour === "secondary"
|
|
3383
3388
|
}])
|
|
3384
3389
|
}, [
|
|
3385
|
-
j(r.$slots, "icon",
|
|
3390
|
+
j(r.$slots, "icon", ae({ navcolour: r.colour }, { groupIsOpen: l, toggleOpen: n }), void 0, !0)
|
|
3386
3391
|
], 2),
|
|
3387
|
-
a.value ? (u(),
|
|
3392
|
+
a.value ? (u(), v("div", Qn)) : q("", !0),
|
|
3388
3393
|
$(ge, { name: "slide-right" }, {
|
|
3389
3394
|
default: F(() => [
|
|
3390
3395
|
L(f("div", {
|
|
@@ -3396,7 +3401,7 @@ const _n = {
|
|
|
3396
3401
|
f("div", Jn, [
|
|
3397
3402
|
f("span", {
|
|
3398
3403
|
class: "cl-absolute cl-cursor-pointer cl-hidden cl-right-0 cl-top-1.5 lg:cl-block",
|
|
3399
|
-
onClick:
|
|
3404
|
+
onClick: c
|
|
3400
3405
|
}, [
|
|
3401
3406
|
s.value ? (u(), V(d(I), {
|
|
3402
3407
|
key: 1,
|
|
@@ -3406,7 +3411,7 @@ const _n = {
|
|
|
3406
3411
|
icon: "ph:push-pin"
|
|
3407
3412
|
}))
|
|
3408
3413
|
]),
|
|
3409
|
-
j(r.$slots, "default", se(
|
|
3414
|
+
j(r.$slots, "default", se(ie({ groupIsOpen: l })), void 0, !0)
|
|
3410
3415
|
])
|
|
3411
3416
|
], 2), [
|
|
3412
3417
|
[H, e.value]
|
|
@@ -3425,7 +3430,7 @@ const Xn = /* @__PURE__ */ fe(Yn, [["__scopeId", "data-v-7db412a7"]]), es = /* @
|
|
|
3425
3430
|
colour: { default: "default" }
|
|
3426
3431
|
},
|
|
3427
3432
|
setup(t) {
|
|
3428
|
-
return (o, e) => (u(),
|
|
3433
|
+
return (o, e) => (u(), v("div", {
|
|
3429
3434
|
class: _(["cl-cursor-pointer cl-flex cl-h-20 cl-items-center cl-justify-center cl-transition-colors cl-w-20", {
|
|
3430
3435
|
"cl-text-secondary-default hover:cl-bg-primary-dark hover:cl-text-white": o.colour === "default",
|
|
3431
3436
|
"cl-bg-primary-darker cl-text-white": o.open && o.colour === "default",
|
|
@@ -3449,32 +3454,32 @@ const Xn = /* @__PURE__ */ fe(Yn, [["__scopeId", "data-v-7db412a7"]]), es = /* @
|
|
|
3449
3454
|
open: { type: Boolean }
|
|
3450
3455
|
},
|
|
3451
3456
|
setup(t) {
|
|
3452
|
-
return (o, e) => o.open ? (u(),
|
|
3453
|
-
o.$slots.title ? (u(),
|
|
3457
|
+
return (o, e) => o.open ? (u(), v(P, { key: 0 }, [
|
|
3458
|
+
o.$slots.title ? (u(), v("div", ls, [
|
|
3454
3459
|
j(o.$slots, "title")
|
|
3455
|
-
])) :
|
|
3460
|
+
])) : q("", !0),
|
|
3456
3461
|
f("div", ts, [
|
|
3457
3462
|
j(o.$slots, "default")
|
|
3458
3463
|
])
|
|
3459
|
-
], 64)) :
|
|
3464
|
+
], 64)) : q("", !0);
|
|
3460
3465
|
}
|
|
3461
3466
|
}), ns = {}, ss = { class: "cl-w-full" }, as = {
|
|
3462
3467
|
key: 0,
|
|
3463
3468
|
class: "cl-font-bold cl-mb-4 cl-select-none"
|
|
3464
3469
|
}, rs = { class: "cl-flex cl-flex-wrap cl-space-y-2" };
|
|
3465
|
-
function
|
|
3466
|
-
return u(),
|
|
3467
|
-
t.$slots.title ? (u(),
|
|
3470
|
+
function is(t, o) {
|
|
3471
|
+
return u(), v("div", ss, [
|
|
3472
|
+
t.$slots.title ? (u(), v("div", as, [
|
|
3468
3473
|
j(t.$slots, "title")
|
|
3469
|
-
])) :
|
|
3474
|
+
])) : q("", !0),
|
|
3470
3475
|
f("span", rs, [
|
|
3471
3476
|
j(t.$slots, "default")
|
|
3472
3477
|
])
|
|
3473
3478
|
]);
|
|
3474
3479
|
}
|
|
3475
|
-
const
|
|
3480
|
+
const cs = /* @__PURE__ */ fe(ns, [["render", is]]), us = {}, ds = { class: "cl-cursor-pointer cl-transition-colors cl-w-full hover:cl-text-blue-light" };
|
|
3476
3481
|
function ps(t, o) {
|
|
3477
|
-
return u(),
|
|
3482
|
+
return u(), v("div", ds, [
|
|
3478
3483
|
j(t.$slots, "default")
|
|
3479
3484
|
]);
|
|
3480
3485
|
}
|
|
@@ -3486,67 +3491,67 @@ const fs = /* @__PURE__ */ fe(us, [["render", ps]]), ms = { class: "cl-w-full" }
|
|
|
3486
3491
|
colour: { default: "default" }
|
|
3487
3492
|
},
|
|
3488
3493
|
setup(t) {
|
|
3489
|
-
const o = t, e =
|
|
3490
|
-
function p(
|
|
3491
|
-
return
|
|
3494
|
+
const o = t, e = A(), l = A(!1), n = A(!1);
|
|
3495
|
+
function p(c) {
|
|
3496
|
+
return c === o.currentTab;
|
|
3492
3497
|
}
|
|
3493
3498
|
function s() {
|
|
3494
3499
|
if (e.value) {
|
|
3495
|
-
const
|
|
3496
|
-
l.value = e.value.scrollLeft > 0, n.value = e.value.scrollLeft <
|
|
3500
|
+
const c = e.value.scrollWidth - e.value.clientWidth;
|
|
3501
|
+
l.value = e.value.scrollLeft > 0, n.value = e.value.scrollLeft < c;
|
|
3497
3502
|
} else
|
|
3498
3503
|
l.value = !1, n.value = !1;
|
|
3499
3504
|
}
|
|
3500
3505
|
function a() {
|
|
3501
3506
|
s(), window.addEventListener("resize", s);
|
|
3502
3507
|
}
|
|
3503
|
-
function c
|
|
3508
|
+
function i(c) {
|
|
3504
3509
|
if (e.value) {
|
|
3505
3510
|
const m = e.value.scrollWidth / 5;
|
|
3506
3511
|
let b = m;
|
|
3507
|
-
|
|
3512
|
+
c === "left" && (b = -m), e.value.scroll(e.value.scrollLeft + b, 0);
|
|
3508
3513
|
}
|
|
3509
3514
|
}
|
|
3510
|
-
return
|
|
3515
|
+
return qe(() => a()), Ie(() => window.removeEventListener("resize", s)), (c, m) => (u(), v("div", ms, [
|
|
3511
3516
|
f("div", null, [
|
|
3512
|
-
l.value ? (u(),
|
|
3517
|
+
l.value ? (u(), v("div", {
|
|
3513
3518
|
key: 0,
|
|
3514
3519
|
class: "cl-bg-white cl-cursor-pointer cl-float-left cl-h-11 cl-w-4",
|
|
3515
|
-
onClick: m[0] || (m[0] = (b) =>
|
|
3520
|
+
onClick: m[0] || (m[0] = (b) => i("left"))
|
|
3516
3521
|
}, [
|
|
3517
3522
|
$(d(I), {
|
|
3518
3523
|
icon: "ph:caret-left",
|
|
3519
3524
|
class: "cl-mt-4 cl-text-secondary-default"
|
|
3520
3525
|
})
|
|
3521
|
-
])) :
|
|
3526
|
+
])) : q("", !0),
|
|
3522
3527
|
f("div", {
|
|
3523
3528
|
ref_key: "headerContainer",
|
|
3524
3529
|
ref: e,
|
|
3525
3530
|
class: _(["cl-flex cl-overflow-x-auto cl-overscroll-x-none", {
|
|
3526
|
-
"cl-shadow-[inset_0_-1px_0_#eeeeee]": !
|
|
3527
|
-
"cl-shadow-[inset_0_-1px_0_#9acd32]": !
|
|
3528
|
-
"cl-shadow-[inset_0_-1px_0_#30363e]": !
|
|
3529
|
-
"cl-shadow-[inset_0_-1px_0_#f0506e]": !
|
|
3530
|
-
"cl-shadow-[inset_0_-1px_0_#1e90ff]": !
|
|
3531
|
-
"cl-shadow-[inset_0_-1px_0_#d7d7d7]":
|
|
3531
|
+
"cl-shadow-[inset_0_-1px_0_#eeeeee]": !c.disabled && c.colour === "default",
|
|
3532
|
+
"cl-shadow-[inset_0_-1px_0_#9acd32]": !c.disabled && c.colour === "primary",
|
|
3533
|
+
"cl-shadow-[inset_0_-1px_0_#30363e]": !c.disabled && c.colour === "secondary",
|
|
3534
|
+
"cl-shadow-[inset_0_-1px_0_#f0506e]": !c.disabled && c.colour === "danger",
|
|
3535
|
+
"cl-shadow-[inset_0_-1px_0_#1e90ff]": !c.disabled && c.colour === "blue",
|
|
3536
|
+
"cl-shadow-[inset_0_-1px_0_#d7d7d7]": c.disabled,
|
|
3532
3537
|
"cl-mr-4": n.value
|
|
3533
3538
|
}]),
|
|
3534
3539
|
onScrollPassive: s
|
|
3535
3540
|
}, [
|
|
3536
|
-
j(
|
|
3541
|
+
j(c.$slots, "headings", se(ie({ isTabOpen: p, disabled: c.disabled, colour: c.colour })))
|
|
3537
3542
|
], 34),
|
|
3538
|
-
n.value ? (u(),
|
|
3543
|
+
n.value ? (u(), v("div", {
|
|
3539
3544
|
key: 1,
|
|
3540
3545
|
class: "cl-bg-white cl-bottom-12 cl-cursor-pointer cl-float-right cl-h-11 cl-relative cl-w-4",
|
|
3541
|
-
onClick: m[1] || (m[1] = (b) =>
|
|
3546
|
+
onClick: m[1] || (m[1] = (b) => i("right"))
|
|
3542
3547
|
}, [
|
|
3543
3548
|
$(d(I), {
|
|
3544
3549
|
icon: "ph:caret-right",
|
|
3545
3550
|
class: "cl-mt-4 cl-text-secondary-default"
|
|
3546
3551
|
})
|
|
3547
|
-
])) :
|
|
3552
|
+
])) : q("", !0)
|
|
3548
3553
|
]),
|
|
3549
|
-
j(
|
|
3554
|
+
j(c.$slots, "content", se(ie({ isTabOpen: p, disabled: c.disabled, colour: c.colour })))
|
|
3550
3555
|
]));
|
|
3551
3556
|
}
|
|
3552
3557
|
}), vs = ["onKeyup"], bs = /* @__PURE__ */ U({
|
|
@@ -3561,11 +3566,11 @@ const fs = /* @__PURE__ */ fe(us, [["render", ps]]), ms = { class: "cl-w-full" }
|
|
|
3561
3566
|
"update:currentTab": null
|
|
3562
3567
|
},
|
|
3563
3568
|
setup(t, { emit: o }) {
|
|
3564
|
-
const e = t, l =
|
|
3569
|
+
const e = t, l = A(), n = A(), p = S(() => e.id === e.currentTab);
|
|
3565
3570
|
function s() {
|
|
3566
3571
|
e.disabled || (l.value = !1, n.value = !1, o("update:currentTab", e.id));
|
|
3567
3572
|
}
|
|
3568
|
-
return (a,
|
|
3573
|
+
return (a, i) => (u(), v("div", {
|
|
3569
3574
|
class: _(["cl-border-b cl-cursor-pointer cl-flex cl-items-center cl-px-4 cl-py-2 cl-rounded-b-none cl-rounded-sm cl-select-none cl-text-xl cl-transition cl-whitespace-nowrap focus:cl-outline-none", {
|
|
3570
3575
|
"!cl-cursor-default cl-text-grey-4 !cl-border-grey-2": a.disabled,
|
|
3571
3576
|
"cl-border cl-border-b-0 cl-rounded-t-md cl-shadow-[inset_0_-1px_0_#ffffff] cl-cursor-default": p.value,
|
|
@@ -3587,10 +3592,10 @@ const fs = /* @__PURE__ */ fe(us, [["render", ps]]), ms = { class: "cl-w-full" }
|
|
|
3587
3592
|
}]),
|
|
3588
3593
|
tabindex: "0",
|
|
3589
3594
|
onClick: s,
|
|
3590
|
-
onMouseover:
|
|
3591
|
-
onMouseout:
|
|
3592
|
-
onFocusin:
|
|
3593
|
-
onFocusout:
|
|
3595
|
+
onMouseover: i[0] || (i[0] = (c) => n.value = !0),
|
|
3596
|
+
onMouseout: i[1] || (i[1] = (c) => n.value = !1),
|
|
3597
|
+
onFocusin: i[2] || (i[2] = (c) => l.value = !0),
|
|
3598
|
+
onFocusout: i[3] || (i[3] = (c) => l.value = !1),
|
|
3594
3599
|
onKeyup: $e(K(s, ["self"]), ["enter"])
|
|
3595
3600
|
}, [
|
|
3596
3601
|
j(a.$slots, "default")
|
|
@@ -3612,7 +3617,7 @@ const ws = /* @__PURE__ */ fe(hs, [["render", ys]]), $s = [
|
|
|
3612
3617
|
], Cs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3613
3618
|
__proto__: null,
|
|
3614
3619
|
FilterOperation: te,
|
|
3615
|
-
buttonColours:
|
|
3620
|
+
buttonColours: ql,
|
|
3616
3621
|
buttonSizes: Sl,
|
|
3617
3622
|
cardSizes: _l,
|
|
3618
3623
|
clUiAccordion: dl,
|
|
@@ -3626,23 +3631,23 @@ const ws = /* @__PURE__ */ fe(hs, [["render", ys]]), $s = [
|
|
|
3626
3631
|
clUiGrid: wn,
|
|
3627
3632
|
clUiHeader: kn,
|
|
3628
3633
|
clUiHeaderMenu: Sn,
|
|
3629
|
-
clUiInput:
|
|
3634
|
+
clUiInput: re,
|
|
3630
3635
|
clUiLanguageSwitcher: Un,
|
|
3631
3636
|
clUiLoadingSpinner: Se,
|
|
3632
|
-
clUiLogin:
|
|
3637
|
+
clUiLogin: xn,
|
|
3633
3638
|
clUiModal: Ye,
|
|
3634
3639
|
clUiNavigation: Xn,
|
|
3635
3640
|
clUiNavigationGroup: os,
|
|
3636
3641
|
clUiNavigationIcon: es,
|
|
3637
3642
|
clUiNavigationItem: fs,
|
|
3638
|
-
clUiNavigationSection:
|
|
3643
|
+
clUiNavigationSection: cs,
|
|
3639
3644
|
clUiNotification: Je,
|
|
3640
3645
|
clUiTab: gs,
|
|
3641
3646
|
clUiTabContent: ws,
|
|
3642
3647
|
clUiTabHeader: bs,
|
|
3643
|
-
filterMethodTypes:
|
|
3648
|
+
filterMethodTypes: qo,
|
|
3644
3649
|
gridColumnTypes: Eo,
|
|
3645
|
-
inputTypes:
|
|
3650
|
+
inputTypes: Zl,
|
|
3646
3651
|
isComboBoxCreateRequest: It,
|
|
3647
3652
|
isComboBoxItem: _t,
|
|
3648
3653
|
isFilterRequest: jo,
|
|
@@ -3653,7 +3658,7 @@ const ws = /* @__PURE__ */ fe(hs, [["render", ys]]), $s = [
|
|
|
3653
3658
|
isLanguageLocaleFormat: je,
|
|
3654
3659
|
modalColours: Kn,
|
|
3655
3660
|
modalSizes: Wn,
|
|
3656
|
-
stringFormats:
|
|
3661
|
+
stringFormats: Ao,
|
|
3657
3662
|
tabColours: $s,
|
|
3658
3663
|
tabScroll: ks
|
|
3659
3664
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -3667,10 +3672,10 @@ const Bs = (t) => {
|
|
|
3667
3672
|
};
|
|
3668
3673
|
export {
|
|
3669
3674
|
Us as CitrusLimeUI,
|
|
3670
|
-
|
|
3675
|
+
Z as DateFormat,
|
|
3671
3676
|
te as FilterOperation,
|
|
3672
3677
|
X as NumberFormat,
|
|
3673
|
-
|
|
3678
|
+
ql as buttonColours,
|
|
3674
3679
|
Sl as buttonSizes,
|
|
3675
3680
|
_l as cardSizes,
|
|
3676
3681
|
dl as clUiAccordion,
|
|
@@ -3684,26 +3689,26 @@ export {
|
|
|
3684
3689
|
wn as clUiGrid,
|
|
3685
3690
|
kn as clUiHeader,
|
|
3686
3691
|
Sn as clUiHeaderMenu,
|
|
3687
|
-
|
|
3692
|
+
re as clUiInput,
|
|
3688
3693
|
Un as clUiLanguageSwitcher,
|
|
3689
3694
|
Se as clUiLoadingSpinner,
|
|
3690
|
-
|
|
3695
|
+
xn as clUiLogin,
|
|
3691
3696
|
Ye as clUiModal,
|
|
3692
3697
|
Xn as clUiNavigation,
|
|
3693
3698
|
os as clUiNavigationGroup,
|
|
3694
3699
|
es as clUiNavigationIcon,
|
|
3695
3700
|
fs as clUiNavigationItem,
|
|
3696
|
-
|
|
3701
|
+
cs as clUiNavigationSection,
|
|
3697
3702
|
Je as clUiNotification,
|
|
3698
3703
|
gs as clUiTab,
|
|
3699
3704
|
ws as clUiTabContent,
|
|
3700
3705
|
bs as clUiTabHeader,
|
|
3701
3706
|
zl as datetimeFormats,
|
|
3702
3707
|
Bs as default,
|
|
3703
|
-
|
|
3708
|
+
qo as filterMethodTypes,
|
|
3704
3709
|
Eo as gridColumnTypes,
|
|
3705
3710
|
ee as i18n,
|
|
3706
|
-
|
|
3711
|
+
Zl as inputTypes,
|
|
3707
3712
|
It as isComboBoxCreateRequest,
|
|
3708
3713
|
_t as isComboBoxItem,
|
|
3709
3714
|
jo as isFilterRequest,
|
|
@@ -3721,7 +3726,7 @@ export {
|
|
|
3721
3726
|
_s as setLocaleMessages,
|
|
3722
3727
|
Is as setLocaleNumberFormats,
|
|
3723
3728
|
Ve as showNotification,
|
|
3724
|
-
|
|
3729
|
+
Ao as stringFormats,
|
|
3725
3730
|
$s as tabColours,
|
|
3726
3731
|
ks as tabScroll,
|
|
3727
3732
|
Vl as validateEmail,
|