@citruslime/ui 2.4.0 → 2.4.1-beta.0
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 +345 -345
- package/dist/citrus-lime-ui.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Icon as I } from "@iconify/vue";
|
|
2
|
-
import { defineComponent as z, ref as q, openBlock as c, createElementBlock as y, renderSlot as N, normalizeProps as oe, guardReactiveProps as ce, Fragment as L, createElementVNode as f, normalizeClass as j, createVNode as k, unref as p, Transition as me, withCtx as D, withDirectives as M, mergeProps as re, vShow as V, createBlock as B, Teleport as _e, renderList as Y, toDisplayString as O, createCommentVNode as A, nextTick as ye, toHandlers as ll, withModifiers as Z, computed as _, watch as W, normalizeStyle as Ze, vModelText as tl, onMounted as Ae, vModelDynamic as ol, withKeys as $e, onUnmounted as Ie, resolveComponent as nl, createTextVNode as J, watchEffect as
|
|
3
|
-
import { generateStringId as
|
|
2
|
+
import { defineComponent as z, ref as q, openBlock as c, createElementBlock as y, renderSlot as N, normalizeProps as oe, guardReactiveProps as ce, Fragment as L, createElementVNode as f, normalizeClass as j, createVNode as k, unref as p, Transition as me, withCtx as D, withDirectives as M, mergeProps as re, vShow as V, createBlock as B, Teleport as _e, renderList as Y, toDisplayString as O, createCommentVNode as A, nextTick as ye, toHandlers as ll, withModifiers as Z, computed as _, watch as W, normalizeStyle as Ze, vModelText as tl, onMounted as Ae, vModelDynamic as ol, withKeys as $e, onUnmounted as Ie, resolveComponent as nl, createTextVNode as J, watchEffect as al, createSlots as Re } from "vue";
|
|
3
|
+
import { generateStringId as sl } from "@citruslime/utils";
|
|
4
4
|
import { onClickOutside as ze, useTimeoutFn as We, useDebounceFn as Ke, useWindowSize as rl } from "@vueuse/core";
|
|
5
5
|
import { createI18n as cl, useI18n as ne } from "vue-i18n";
|
|
6
6
|
import { DateTime as ke } from "luxon";
|
|
@@ -20,14 +20,14 @@ const ul = { class: "cl-overflow-hidden" }, dl = /* @__PURE__ */ z({
|
|
|
20
20
|
open: !1
|
|
21
21
|
}, l.value.push(i)), i.open;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function a(n) {
|
|
24
24
|
const i = l.value.find((u) => u.id === n);
|
|
25
25
|
i && (o.exclusive && l.value.forEach((u) => {
|
|
26
26
|
u.id !== n && (u.open = !1);
|
|
27
27
|
}), i.open = !i.open);
|
|
28
28
|
}
|
|
29
29
|
return (n, i) => (c(), y("div", ul, [
|
|
30
|
-
N(n.$slots, "default", oe(ce({ isItemOpen: e, toggleItem:
|
|
30
|
+
N(n.$slots, "default", oe(ce({ isItemOpen: e, toggleItem: a })))
|
|
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__ */ z({
|
|
@@ -45,34 +45,34 @@ const ul = { class: "cl-overflow-hidden" }, dl = /* @__PURE__ */ z({
|
|
|
45
45
|
function e() {
|
|
46
46
|
l.disabled || o("toggle");
|
|
47
47
|
}
|
|
48
|
-
return (
|
|
48
|
+
return (a, n) => (c(), y(L, null, [
|
|
49
49
|
f("div", {
|
|
50
50
|
class: j(["cl-border-b cl-border-grey-1 cl-relative", {
|
|
51
|
-
"cl-bg-grey-0":
|
|
52
|
-
"cl-cursor-pointer": !
|
|
51
|
+
"cl-bg-grey-0": a.disabled,
|
|
52
|
+
"cl-cursor-pointer": !a.disabled
|
|
53
53
|
}]),
|
|
54
54
|
onClick: e
|
|
55
55
|
}, [
|
|
56
56
|
f("div", pl, [
|
|
57
57
|
k(p(I), {
|
|
58
58
|
class: j(["cl-duration-300 cl-ease-in-out cl-text-grey-3 cl-transform-gpu cl-transition-transform", {
|
|
59
|
-
"cl-rotate-180":
|
|
59
|
+
"cl-rotate-180": a.open
|
|
60
60
|
}]),
|
|
61
61
|
icon: "ph:caret-down-bold",
|
|
62
62
|
width: "20"
|
|
63
63
|
}, null, 8, ["class"])
|
|
64
64
|
]),
|
|
65
65
|
f("div", fl, [
|
|
66
|
-
N(
|
|
66
|
+
N(a.$slots, "title")
|
|
67
67
|
])
|
|
68
68
|
], 2),
|
|
69
69
|
f("div", ml, [
|
|
70
70
|
k(me, { name: "grow-down" }, {
|
|
71
71
|
default: D(() => [
|
|
72
|
-
M(f("div", re(
|
|
73
|
-
N(
|
|
72
|
+
M(f("div", re(a.$attrs, { class: "cl-ml-10 cl-p-4" }), [
|
|
73
|
+
N(a.$slots, "default")
|
|
74
74
|
], 16), [
|
|
75
|
-
[V,
|
|
75
|
+
[V, a.open]
|
|
76
76
|
])
|
|
77
77
|
]),
|
|
78
78
|
_: 3
|
|
@@ -82,8 +82,8 @@ const ul = { class: "cl-overflow-hidden" }, dl = /* @__PURE__ */ z({
|
|
|
82
82
|
}
|
|
83
83
|
}), pe = (t, o) => {
|
|
84
84
|
const l = t.__vccOpts || t;
|
|
85
|
-
for (const [e,
|
|
86
|
-
l[e] =
|
|
85
|
+
for (const [e, a] of o)
|
|
86
|
+
l[e] = a;
|
|
87
87
|
return l;
|
|
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) {
|
|
@@ -94,7 +94,7 @@ function hl(t, o) {
|
|
|
94
94
|
const yl = /* @__PURE__ */ pe(vl, [["render", hl]]), qe = q([]);
|
|
95
95
|
function De(t) {
|
|
96
96
|
const o = {
|
|
97
|
-
id:
|
|
97
|
+
id: sl(),
|
|
98
98
|
...t
|
|
99
99
|
};
|
|
100
100
|
qe.value.push(o), setTimeout(() => Qe(o), t.duration);
|
|
@@ -121,8 +121,8 @@ 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
|
-
(c(!0), y(L, null, Y(p(qe), (e,
|
|
125
|
-
key:
|
|
124
|
+
(c(!0), y(L, null, Y(p(qe), (e, a) => (c(), y("div", re(o.$attrs, {
|
|
125
|
+
key: a,
|
|
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": e.colour === "default",
|
|
128
128
|
"cl-bg-primary-default": e.colour === "primary",
|
|
@@ -191,7 +191,7 @@ const Se = /* @__PURE__ */ pe(Tl, [["render", Ol], ["__scopeId", "data-v-a21dc5d
|
|
|
191
191
|
focus() {
|
|
192
192
|
l.value && l.value.focus();
|
|
193
193
|
}
|
|
194
|
-
}), (e,
|
|
194
|
+
}), (e, a) => (c(), y(L, null, [
|
|
195
195
|
M(k(Se, { class: "relative" }, null, 512), [
|
|
196
196
|
[V, e.loading]
|
|
197
197
|
]),
|
|
@@ -439,21 +439,21 @@ const Il = {
|
|
|
439
439
|
fallbackWarn: !1,
|
|
440
440
|
warnHtmlMessage: !1
|
|
441
441
|
});
|
|
442
|
-
function
|
|
442
|
+
function Sa(t, o) {
|
|
443
443
|
return Q.global.mergeLocaleMessage(t, o), ye();
|
|
444
444
|
}
|
|
445
|
-
function
|
|
445
|
+
function Na(t, o) {
|
|
446
446
|
return Q.global.mergeNumberFormat(t, o), ye();
|
|
447
447
|
}
|
|
448
|
-
function
|
|
448
|
+
function ja(t, o) {
|
|
449
449
|
return Q.global.mergeDateTimeFormat(t, o), ye();
|
|
450
450
|
}
|
|
451
|
-
function
|
|
451
|
+
function _a(t) {
|
|
452
452
|
return Q.global.locale.value = t, ye();
|
|
453
453
|
}
|
|
454
454
|
const { t: ue } = Q.global;
|
|
455
455
|
function Ul(t, o, l, e) {
|
|
456
|
-
const
|
|
456
|
+
const a = Q.global.locale.value;
|
|
457
457
|
return new Promise((n) => {
|
|
458
458
|
let i = {
|
|
459
459
|
valid: !1,
|
|
@@ -475,10 +475,10 @@ function Ul(t, o, l, e) {
|
|
|
475
475
|
u = e >= (Number(t) || 0), i = de(u, ue("input.greaterOrEqualToValue", { label: l, min: t.toString() }));
|
|
476
476
|
break;
|
|
477
477
|
case "date":
|
|
478
|
-
u = new Date(e).getTime() >= new Date(t).getTime(), i = de(u, ue("input.afterOrEqualToValue", { label: l, min: Q.global.d(new Date(t), x.DATE,
|
|
478
|
+
u = new Date(e).getTime() >= new Date(t).getTime(), i = de(u, ue("input.afterOrEqualToValue", { label: l, min: Q.global.d(new Date(t), x.DATE, a ?? Q.global.locale.value) }));
|
|
479
479
|
break;
|
|
480
480
|
case "datetime":
|
|
481
|
-
u = new Date(e).getTime() >= new Date(t).getTime(), i = de(u, ue("input.afterOrEqualToValue", { label: l, min: Q.global.d(new Date(t), x.DATETIME,
|
|
481
|
+
u = new Date(e).getTime() >= new Date(t).getTime(), i = de(u, ue("input.afterOrEqualToValue", { label: l, min: Q.global.d(new Date(t), x.DATETIME, a ?? Q.global.locale.value) }));
|
|
482
482
|
break;
|
|
483
483
|
default:
|
|
484
484
|
i.valid = !0;
|
|
@@ -489,7 +489,7 @@ function Ul(t, o, l, e) {
|
|
|
489
489
|
});
|
|
490
490
|
}
|
|
491
491
|
function Bl(t, o, l, e) {
|
|
492
|
-
const
|
|
492
|
+
const a = Q.global.locale.value;
|
|
493
493
|
return new Promise((n) => {
|
|
494
494
|
let i = {
|
|
495
495
|
valid: !1,
|
|
@@ -511,10 +511,10 @@ function Bl(t, o, l, e) {
|
|
|
511
511
|
u = e <= (Number(t) || 0), i = de(u, ue("input.lessOrEqualToValue", { label: l, max: t.toString() }));
|
|
512
512
|
break;
|
|
513
513
|
case "date":
|
|
514
|
-
u = new Date(e).getTime() <= new Date(t).getTime(), i = de(u, ue("input.beforeOrEqualToValue", { label: l, max: Q.global.d(new Date(t), x.DATE,
|
|
514
|
+
u = new Date(e).getTime() <= new Date(t).getTime(), i = de(u, ue("input.beforeOrEqualToValue", { label: l, max: Q.global.d(new Date(t), x.DATE, a ?? Q.global.locale.value) }));
|
|
515
515
|
break;
|
|
516
516
|
case "datetime":
|
|
517
|
-
u = new Date(e).getTime() <= new Date(t).getTime(), i = de(u, ue("input.beforeOrEqualToValue", { label: l, min: Q.global.d(new Date(t), x.DATETIME,
|
|
517
|
+
u = new Date(e).getTime() <= new Date(t).getTime(), i = de(u, ue("input.beforeOrEqualToValue", { label: l, min: Q.global.d(new Date(t), x.DATETIME, a ?? Q.global.locale.value) }));
|
|
518
518
|
break;
|
|
519
519
|
default:
|
|
520
520
|
i.valid = !0;
|
|
@@ -526,13 +526,13 @@ function Bl(t, o, l, e) {
|
|
|
526
526
|
}
|
|
527
527
|
function Ml(t, o) {
|
|
528
528
|
return new Promise((l) => {
|
|
529
|
-
const e = o != null && o !== "" && o.toString().trim() !== "",
|
|
530
|
-
l(
|
|
529
|
+
const e = o != null && o !== "" && o.toString().trim() !== "", a = de(e, ue("input.valueIsRequired", { label: t }));
|
|
530
|
+
l(a);
|
|
531
531
|
});
|
|
532
532
|
}
|
|
533
533
|
function Dl(t, o) {
|
|
534
534
|
return new Promise((l) => {
|
|
535
|
-
const
|
|
535
|
+
const a = o === "" || /[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/.exec(o) !== null, n = de(a, ue("input.valueNotValidEmail", { label: t }));
|
|
536
536
|
l(n);
|
|
537
537
|
});
|
|
538
538
|
}
|
|
@@ -563,7 +563,7 @@ const Ll = { class: "cl-relative" }, Vl = ["value", "disabled", "placeholder"],
|
|
|
563
563
|
var e;
|
|
564
564
|
(e = l.value) == null || e.focus();
|
|
565
565
|
}
|
|
566
|
-
}), (e,
|
|
566
|
+
}), (e, a) => (c(), y("div", Ll, [
|
|
567
567
|
f("input", re({
|
|
568
568
|
ref_key: "element",
|
|
569
569
|
ref: l
|
|
@@ -586,13 +586,13 @@ const Ll = { class: "cl-relative" }, Vl = ["value", "disabled", "placeholder"],
|
|
|
586
586
|
key: 0,
|
|
587
587
|
class: "cl-cursor-pointer hover:cl-text-link-light",
|
|
588
588
|
icon: "ph:arrow-counter-clockwise",
|
|
589
|
-
onClick:
|
|
589
|
+
onClick: a[0] || (a[0] = Z((n) => e.$emit("reset"), ["prevent"]))
|
|
590
590
|
})) : A("", !0),
|
|
591
591
|
!e.required && e.date && (e.type !== "time" || e.date !== "00:00") ? (c(), B(p(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
|
-
onClick:
|
|
595
|
+
onClick: a[1] || (a[1] = Z((n) => e.$emit("clear"), ["prevent"]))
|
|
596
596
|
})) : A("", !0)
|
|
597
597
|
]))
|
|
598
598
|
]));
|
|
@@ -613,7 +613,7 @@ const Le = /* @__PURE__ */ pe(Fl, [["__scopeId", "data-v-4c802181"]]), Hl = /* @
|
|
|
613
613
|
},
|
|
614
614
|
emits: ["update:date"],
|
|
615
615
|
setup(t, { expose: o, emit: l }) {
|
|
616
|
-
const e = t,
|
|
616
|
+
const e = t, a = _({
|
|
617
617
|
get() {
|
|
618
618
|
let b = null;
|
|
619
619
|
return e.type === "time" ? b = e.date === null ? "00:00" : e.date : e.date !== null && (b = ke.fromISO(e.date, {
|
|
@@ -621,10 +621,10 @@ const Le = /* @__PURE__ */ pe(Fl, [["__scopeId", "data-v-4c802181"]]), Hl = /* @
|
|
|
621
621
|
}).toJSDate()), b;
|
|
622
622
|
},
|
|
623
623
|
set(b) {
|
|
624
|
-
let
|
|
625
|
-
e.type === "time" ?
|
|
624
|
+
let s = null;
|
|
625
|
+
e.type === "time" ? s = b : b !== null && (s = ke.fromJSDate(b, {
|
|
626
626
|
zone: e.timeZone
|
|
627
|
-
}).setZone(e.timeZone).toISO()), l("update:date",
|
|
627
|
+
}).setZone(e.timeZone).toISO()), l("update:date", s);
|
|
628
628
|
}
|
|
629
629
|
}), { locale: n, t: i } = ne(), u = _(() => {
|
|
630
630
|
let b;
|
|
@@ -647,7 +647,7 @@ const Le = /* @__PURE__ */ pe(Fl, [["__scopeId", "data-v-4c802181"]]), Hl = /* @
|
|
|
647
647
|
});
|
|
648
648
|
function d() {
|
|
649
649
|
let b = ke.now().set({ second: 0, millisecond: 0 }).setZone(e.timeZone);
|
|
650
|
-
e.type === "date" && (b = b.set({ hour: 0, minute: 0 }).setZone(e.timeZone)),
|
|
650
|
+
e.type === "date" && (b = b.set({ hour: 0, minute: 0 }).setZone(e.timeZone)), a.value = b.toJSDate();
|
|
651
651
|
}
|
|
652
652
|
const m = q(null);
|
|
653
653
|
return o({
|
|
@@ -655,10 +655,10 @@ const Le = /* @__PURE__ */ pe(Fl, [["__scopeId", "data-v-4c802181"]]), Hl = /* @
|
|
|
655
655
|
var b;
|
|
656
656
|
(b = m.value) == null || b.focus();
|
|
657
657
|
}
|
|
658
|
-
}), (b,
|
|
658
|
+
}), (b, s) => b.type === "time" ? (c(), B(p(Me), {
|
|
659
659
|
key: 0,
|
|
660
|
-
modelValue:
|
|
661
|
-
"onUpdate:modelValue":
|
|
660
|
+
modelValue: a.value,
|
|
661
|
+
"onUpdate:modelValue": s[1] || (s[1] = (w) => a.value = w),
|
|
662
662
|
modelModifiers: { string: !0 },
|
|
663
663
|
locale: p(n),
|
|
664
664
|
is24hr: p(n) !== "en-US",
|
|
@@ -680,15 +680,15 @@ const Le = /* @__PURE__ */ pe(Fl, [["__scopeId", "data-v-4c802181"]]), Hl = /* @
|
|
|
680
680
|
placeholder: u.value,
|
|
681
681
|
required: b.required,
|
|
682
682
|
disabled: b.disabled,
|
|
683
|
-
onClear:
|
|
683
|
+
onClear: s[0] || (s[0] = (T) => a.value = null),
|
|
684
684
|
onReset: d
|
|
685
685
|
}), null, 16, ["date", "events", "type", "placeholder", "required", "disabled"])
|
|
686
686
|
]),
|
|
687
687
|
_: 1
|
|
688
688
|
}, 8, ["modelValue", "locale", "is24hr", "mode", "is-required", "masks", "popover"])) : (c(), B(p(Me), {
|
|
689
689
|
key: 1,
|
|
690
|
-
modelValue:
|
|
691
|
-
"onUpdate:modelValue":
|
|
690
|
+
modelValue: a.value,
|
|
691
|
+
"onUpdate:modelValue": s[3] || (s[3] = (w) => a.value = w),
|
|
692
692
|
locale: p(n),
|
|
693
693
|
is24hr: p(n) !== "en-US",
|
|
694
694
|
timezone: b.timeZone,
|
|
@@ -711,7 +711,7 @@ const Le = /* @__PURE__ */ pe(Fl, [["__scopeId", "data-v-4c802181"]]), Hl = /* @
|
|
|
711
711
|
placeholder: u.value,
|
|
712
712
|
required: b.required,
|
|
713
713
|
disabled: b.disabled,
|
|
714
|
-
onClear:
|
|
714
|
+
onClear: s[2] || (s[2] = (T) => a.value = null),
|
|
715
715
|
onReset: d
|
|
716
716
|
}), null, 16, ["date", "events", "type", "placeholder", "required", "disabled"])
|
|
717
717
|
]),
|
|
@@ -736,7 +736,7 @@ function xl(t) {
|
|
|
736
736
|
from: "@iconify/vue"
|
|
737
737
|
};
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function Ia() {
|
|
740
740
|
return xl;
|
|
741
741
|
}
|
|
742
742
|
const Gl = [
|
|
@@ -777,13 +777,13 @@ const Gl = [
|
|
|
777
777
|
"update:value": null
|
|
778
778
|
},
|
|
779
779
|
setup(t, { expose: o, emit: l }) {
|
|
780
|
-
const e = t, { n:
|
|
780
|
+
const e = t, { n: a, t: n } = ne(), { debounce: i } = il(), u = q(e.value), r = q(), d = _({
|
|
781
781
|
get: () => e.value,
|
|
782
782
|
set: (h) => l("update:value", h)
|
|
783
783
|
}), m = _(() => e.disabled ? "rgba(153, 153, 153, 0.8)" : "#9acd32"), b = _(() => {
|
|
784
784
|
let h = (d.value - e.min) / (e.max - e.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
|
+
}), s = _(() => e.min <= e.max && e.step > 0);
|
|
787
787
|
function w(h, T) {
|
|
788
788
|
const g = (h == null ? void 0 : h.value) ?? "", E = Math.max(Math.min(parseFloat(g) || e.min, e.max), e.min);
|
|
789
789
|
d.value = e.enforceStep ? Math.ceil(E / e.step) * e.step : E, ye(() => T());
|
|
@@ -793,12 +793,12 @@ const Gl = [
|
|
|
793
793
|
var h;
|
|
794
794
|
(h = r.value) == null || h.focus();
|
|
795
795
|
}
|
|
796
|
-
}), (h, T) =>
|
|
796
|
+
}), (h, T) => s.value ? (c(), y("div", oe(re({ key: 0 }, h.$attrs)), [
|
|
797
797
|
M(f("div", { class: "cl-bg-transparent cl-relative cl-text-center cl-text-sm" }, O(d.value), 513), [
|
|
798
798
|
[V, !h.showNumericInput]
|
|
799
799
|
]),
|
|
800
800
|
f("div", Zl, [
|
|
801
|
-
M(k(p(
|
|
801
|
+
M(k(p(se), {
|
|
802
802
|
modelValue: u.value,
|
|
803
803
|
"onUpdate:modelValue": T[0] || (T[0] = (g) => u.value = g),
|
|
804
804
|
class: "!cl-text-sm md:!cl-w-auto",
|
|
@@ -812,7 +812,7 @@ const Gl = [
|
|
|
812
812
|
[V, h.showNumericInput]
|
|
813
813
|
]),
|
|
814
814
|
f("div", Wl, [
|
|
815
|
-
f("span", Kl, O(p(
|
|
815
|
+
f("span", Kl, O(p(a)(h.min, Number.isInteger(h.min) ? p(K).INTEGER : p(K).DECIMAL)), 1),
|
|
816
816
|
typeof d.value == "number" ? (c(), y("div", Ql, [
|
|
817
817
|
M(f("input", {
|
|
818
818
|
ref_key: "sliderRef",
|
|
@@ -836,7 +836,7 @@ const Gl = [
|
|
|
836
836
|
]
|
|
837
837
|
])
|
|
838
838
|
])) : A("", !0),
|
|
839
|
-
f("span", Yl, O(p(
|
|
839
|
+
f("span", Yl, O(p(a)(h.max, Number.isInteger(h.max) ? p(K).INTEGER : p(K).DECIMAL)), 1)
|
|
840
840
|
])
|
|
841
841
|
])
|
|
842
842
|
], 16)) : (c(), y("div", Xl, O(p(n)("slider.invalidProps")), 1));
|
|
@@ -900,7 +900,7 @@ function Fe(t, o) {
|
|
|
900
900
|
const l = t.target;
|
|
901
901
|
return tt(o) ? l.valueAsNumber : we(o) ? l.checked : l.value;
|
|
902
902
|
}
|
|
903
|
-
const nt = { class: "cl-flex cl-justify-between" },
|
|
903
|
+
const nt = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" }, st = {
|
|
904
904
|
key: 0,
|
|
905
905
|
class: "cl-block cl-left-auto cl-relative cl-text-danger-default"
|
|
906
906
|
}, rt = {
|
|
@@ -949,13 +949,13 @@ const nt = { class: "cl-flex cl-justify-between" }, st = { class: "cl-w-full" },
|
|
|
949
949
|
},
|
|
950
950
|
emits: ["update:model-value", "click", "focus", "input", "change", "validated"],
|
|
951
951
|
setup(t, { expose: o, emit: l }) {
|
|
952
|
-
const e = t,
|
|
952
|
+
const e = t, a = q(null), n = q(!1), i = q(!1), u = _(te), r = _(() => e.placeholderText.trim() !== "" ? e.placeholderText : e.label), d = q(0), m = _({
|
|
953
953
|
get: () => e.modelValue,
|
|
954
954
|
set: (v) => $(v, !1)
|
|
955
955
|
}), b = _({
|
|
956
956
|
get: () => e.modelValue,
|
|
957
|
-
set: (v) =>
|
|
958
|
-
}),
|
|
957
|
+
set: (v) => ae(v)
|
|
958
|
+
}), s = _(() => typeof e.min == "number" ? e.min.toString() : e.min), w = _(() => typeof e.max == "number" ? e.max.toString() : e.max), h = _(() => typeof e.min == "number" || e.min === null ? e.min : parseFloat(e.min)), T = _(() => typeof e.max == "number" || e.max === null ? e.max : parseFloat(e.max)), g = _(() => e.messageWhenValid.trim() !== "" ? e.messageWhenValid : ""), E = q(!0), R = q([]), H = _(() => {
|
|
959
959
|
var v, S;
|
|
960
960
|
return [
|
|
961
961
|
...((v = R.value) == null ? void 0 : v.filter((U) => ((U == null ? void 0 : U.length) ?? 0) > 0)) ?? [],
|
|
@@ -963,7 +963,7 @@ const nt = { class: "cl-flex cl-justify-between" }, st = { class: "cl-w-full" },
|
|
|
963
963
|
].join(`
|
|
964
964
|
`);
|
|
965
965
|
});
|
|
966
|
-
async function
|
|
966
|
+
async function ae(v) {
|
|
967
967
|
e.validateOn === "input" && await P(v), l("update:model-value", v);
|
|
968
968
|
}
|
|
969
969
|
async function $(v, S) {
|
|
@@ -993,21 +993,21 @@ const nt = { class: "cl-flex cl-justify-between" }, st = { class: "cl-w-full" },
|
|
|
993
993
|
we(e.inputType) ? (v.preventDefault(), l("click", v)) : e.inputType === "checkbox" && l("click", v);
|
|
994
994
|
}
|
|
995
995
|
function ve(v) {
|
|
996
|
-
if (
|
|
997
|
-
|
|
996
|
+
if (a.value) {
|
|
997
|
+
a.value.stepUp(), a.value.focus(), $(a.value.valueAsNumber, !1);
|
|
998
998
|
const S = {
|
|
999
|
-
target:
|
|
999
|
+
target: a.value
|
|
1000
1000
|
};
|
|
1001
|
-
l("input", S,
|
|
1001
|
+
l("input", S, a.value.valueAsNumber), l("change", v, a.value.valueAsNumber);
|
|
1002
1002
|
}
|
|
1003
1003
|
}
|
|
1004
1004
|
function Ne(v) {
|
|
1005
|
-
if (
|
|
1006
|
-
|
|
1005
|
+
if (a.value) {
|
|
1006
|
+
a.value.stepDown(), a.value.focus(), $(a.value.valueAsNumber, !1);
|
|
1007
1007
|
const S = {
|
|
1008
|
-
target:
|
|
1008
|
+
target: a.value
|
|
1009
1009
|
};
|
|
1010
|
-
l("input", S,
|
|
1010
|
+
l("input", S, a.value.valueAsNumber), l("change", v, a.value.valueAsNumber);
|
|
1011
1011
|
}
|
|
1012
1012
|
}
|
|
1013
1013
|
function be(v) {
|
|
@@ -1036,14 +1036,14 @@ const nt = { class: "cl-flex cl-justify-between" }, st = { class: "cl-w-full" },
|
|
|
1036
1036
|
e.validateImmediately && $(e.modelValue, !0);
|
|
1037
1037
|
}), W(() => e.isRequired, () => $(e.modelValue, !0)), W(() => e.externalErrors, async () => {
|
|
1038
1038
|
await P(m.value), l("update:model-value", m.value);
|
|
1039
|
-
}), o({
|
|
1039
|
+
}), W(() => e.modelValue, () => $(e.modelValue, !0)), o({
|
|
1040
1040
|
focus() {
|
|
1041
1041
|
var v;
|
|
1042
|
-
(v =
|
|
1042
|
+
(v = a.value) == null || v.focus();
|
|
1043
1043
|
},
|
|
1044
1044
|
blur() {
|
|
1045
1045
|
var v;
|
|
1046
|
-
(v =
|
|
1046
|
+
(v = a.value) == null || v.blur();
|
|
1047
1047
|
}
|
|
1048
1048
|
}), (v, S) => (c(), y("div", {
|
|
1049
1049
|
key: d.value,
|
|
@@ -1054,18 +1054,18 @@ const nt = { class: "cl-flex cl-justify-between" }, st = { class: "cl-w-full" },
|
|
|
1054
1054
|
onMouseleave: S[12] || (S[12] = (U) => be(!1))
|
|
1055
1055
|
}, [
|
|
1056
1056
|
f("div", nt, [
|
|
1057
|
-
f("div",
|
|
1057
|
+
f("div", at, [
|
|
1058
1058
|
M(f("label", { class: "cl-block cl-mb-1 cl-text-grey-4 cl-text-xs cl-tracking-widest" }, O(v.label), 513), [
|
|
1059
1059
|
[V, v.showLabel && v.label !== ""]
|
|
1060
1060
|
])
|
|
1061
1061
|
]),
|
|
1062
|
-
v.isRequired && u.value ? (c(), y("label",
|
|
1062
|
+
v.isRequired && u.value ? (c(), y("label", st, " * ")) : A("", !0),
|
|
1063
1063
|
v.isRequired && !u.value && v.requiredText.length ? (c(), y("label", rt, O(v.requiredText), 1)) : A("", !0)
|
|
1064
1064
|
]),
|
|
1065
1065
|
v.inputType !== "range" && !p(Pe)(v.inputType) ? (c(), y("div", ct, [
|
|
1066
1066
|
M(f("input", re({
|
|
1067
1067
|
ref_key: "inputElement",
|
|
1068
|
-
ref:
|
|
1068
|
+
ref: a,
|
|
1069
1069
|
"onUpdate:modelValue": S[0] || (S[0] = (U) => m.value = U)
|
|
1070
1070
|
}, v.$attrs, {
|
|
1071
1071
|
class: ["!cl-mb-1 cl-block cl-border cl-duration-300 cl-h-full cl-transition cl-w-full focus:cl-outline-none", {
|
|
@@ -1131,7 +1131,7 @@ const nt = { class: "cl-flex cl-justify-between" }, st = { class: "cl-w-full" },
|
|
|
1131
1131
|
})
|
|
1132
1132
|
])) : p(Pe)(v.inputType) ? (c(), B(p(Hl), re({ key: 1 }, v.$attrs, {
|
|
1133
1133
|
ref_key: "inputElement",
|
|
1134
|
-
ref:
|
|
1134
|
+
ref: a,
|
|
1135
1135
|
date: b.value,
|
|
1136
1136
|
"onUpdate:date": S[7] || (S[7] = (U) => b.value = U),
|
|
1137
1137
|
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", {
|
|
@@ -1143,7 +1143,7 @@ const nt = { class: "cl-flex cl-justify-between" }, st = { class: "cl-w-full" },
|
|
|
1143
1143
|
required: v.isRequired,
|
|
1144
1144
|
type: p(ot)(v.inputType),
|
|
1145
1145
|
"time-zone": v.timeZone,
|
|
1146
|
-
min:
|
|
1146
|
+
min: s.value,
|
|
1147
1147
|
max: w.value,
|
|
1148
1148
|
placeholder: r.value,
|
|
1149
1149
|
onBlur: Z(ge, ["self"]),
|
|
@@ -1151,7 +1151,7 @@ const nt = { class: "cl-flex cl-justify-between" }, st = { class: "cl-w-full" },
|
|
|
1151
1151
|
}), null, 16, ["date", "class", "disabled", "required", "type", "time-zone", "min", "max", "placeholder", "onBlur"])) : v.inputType === "range" && typeof m.value == "number" ? (c(), y("div", dt, [
|
|
1152
1152
|
k(p(lt), {
|
|
1153
1153
|
ref_key: "inputElement",
|
|
1154
|
-
ref:
|
|
1154
|
+
ref: a,
|
|
1155
1155
|
value: m.value,
|
|
1156
1156
|
"onUpdate:value": S[9] || (S[9] = (U) => m.value = U),
|
|
1157
1157
|
min: h.value ?? 0,
|
|
@@ -1169,7 +1169,7 @@ const nt = { class: "cl-flex cl-justify-between" }, st = { class: "cl-w-full" },
|
|
|
1169
1169
|
]));
|
|
1170
1170
|
}
|
|
1171
1171
|
});
|
|
1172
|
-
const
|
|
1172
|
+
const se = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-d8904ca5"]]), 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__ */ z({
|
|
1173
1173
|
inheritAttrs: !1,
|
|
1174
1174
|
__name: "cl-ui-modal",
|
|
1175
1175
|
props: {
|
|
@@ -1182,11 +1182,11 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1182
1182
|
function e() {
|
|
1183
1183
|
l.value = !0, document.addEventListener("keydown", n);
|
|
1184
1184
|
}
|
|
1185
|
-
function
|
|
1185
|
+
function a() {
|
|
1186
1186
|
o.preventClose || (l.value = !1, document.removeEventListener("keydown", n));
|
|
1187
1187
|
}
|
|
1188
1188
|
function n(i) {
|
|
1189
|
-
i.key === "Escape" &&
|
|
1189
|
+
i.key === "Escape" && a();
|
|
1190
1190
|
}
|
|
1191
1191
|
return (i, u) => (c(), y(L, null, [
|
|
1192
1192
|
N(i.$slots, "trigger", oe(ce({ open: e }))),
|
|
@@ -1208,8 +1208,8 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1208
1208
|
"cl-text-black hover:cl-text-grey-7": i.headerColour === "white"
|
|
1209
1209
|
}]),
|
|
1210
1210
|
tabindex: 0,
|
|
1211
|
-
onKeypress: $e(
|
|
1212
|
-
onClick:
|
|
1211
|
+
onKeypress: $e(a, ["enter"]),
|
|
1212
|
+
onClick: a
|
|
1213
1213
|
}, [
|
|
1214
1214
|
k(p(I), { icon: "ph:x" })
|
|
1215
1215
|
], 42, vt), [
|
|
@@ -1225,9 +1225,9 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1225
1225
|
N(i.$slots, "title")
|
|
1226
1226
|
], 2),
|
|
1227
1227
|
f("div", bt, [
|
|
1228
|
-
N(i.$slots, "default", oe(ce({ close:
|
|
1228
|
+
N(i.$slots, "default", oe(ce({ close: a })))
|
|
1229
1229
|
]),
|
|
1230
|
-
N(i.$slots, "footer", oe(ce({ close:
|
|
1230
|
+
N(i.$slots, "footer", oe(ce({ close: a })))
|
|
1231
1231
|
], 16)
|
|
1232
1232
|
], 512), [
|
|
1233
1233
|
[V, l.value]
|
|
@@ -1294,7 +1294,7 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1294
1294
|
const l = t, e = _(() => {
|
|
1295
1295
|
var d;
|
|
1296
1296
|
return ((d = l.option) == null ? void 0 : d.name) ?? l.text;
|
|
1297
|
-
}),
|
|
1297
|
+
}), a = _(() => {
|
|
1298
1298
|
var d;
|
|
1299
1299
|
return ((d = l.option) == null ? void 0 : d.parentName) ?? "";
|
|
1300
1300
|
}), n = q(!1);
|
|
@@ -1309,7 +1309,7 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1309
1309
|
l.selectedIndex === l.index ? n.value = !0 : n.value = !1;
|
|
1310
1310
|
}
|
|
1311
1311
|
return W(() => l.selectedIndex, () => r()), (d, m) => {
|
|
1312
|
-
var b,
|
|
1312
|
+
var b, s;
|
|
1313
1313
|
return c(), y("div", {
|
|
1314
1314
|
class: j(["cl-cursor-pointer cl-duration-75 cl-flex cl-p-1 cl-text-left cl-transition-colors", {
|
|
1315
1315
|
"cl-bg-white": n.value === !1,
|
|
@@ -1320,11 +1320,11 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1320
1320
|
onMousemove: m[0] || (m[0] = (w) => u(!0)),
|
|
1321
1321
|
onMouseleave: m[1] || (m[1] = (w) => u(!1))
|
|
1322
1322
|
}, [
|
|
1323
|
-
d.option !== null && ((b = d.option) == null ? void 0 : b.parentId) !== 0 && ((
|
|
1323
|
+
d.option !== null && ((b = d.option) == null ? void 0 : b.parentId) !== 0 && ((s = d.option) == null ? void 0 : s.parentId) !== void 0 ? (c(), y("div", wt, O(a.value), 1)) : A("", !0),
|
|
1324
1324
|
f("div", {
|
|
1325
1325
|
class: j({
|
|
1326
|
-
"cl-w-1/2":
|
|
1327
|
-
"cl-w-full":
|
|
1326
|
+
"cl-w-1/2": a.value !== "",
|
|
1327
|
+
"cl-w-full": a.value === ""
|
|
1328
1328
|
})
|
|
1329
1329
|
}, O(e.value), 3),
|
|
1330
1330
|
M(f("div", $t, [
|
|
@@ -1362,21 +1362,21 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1362
1362
|
"hide-dropdown": null
|
|
1363
1363
|
},
|
|
1364
1364
|
setup(t, { emit: o }) {
|
|
1365
|
-
const l = t, { t: e } = ne(),
|
|
1365
|
+
const l = t, { t: e } = ne(), a = q(""), n = q(!1), i = q(-1), u = _(() => n.value ? -1 : 0), r = q();
|
|
1366
1366
|
function d($) {
|
|
1367
|
-
($ === void 0 || ($ == null ? void 0 : $.code.startsWith("Arrow")) === !1 && ($ == null ? void 0 : $.code.startsWith("Control")) === !1 && ($ == null ? void 0 : $.code.startsWith("Shift")) === !1 && ($ == null ? void 0 : $.code.startsWith("Tab")) === !1 && ($ == null ? void 0 : $.code) !== "Enter") && (o("search",
|
|
1367
|
+
($ === void 0 || ($ == null ? void 0 : $.code.startsWith("Arrow")) === !1 && ($ == null ? void 0 : $.code.startsWith("Control")) === !1 && ($ == null ? void 0 : $.code.startsWith("Shift")) === !1 && ($ == null ? void 0 : $.code.startsWith("Tab")) === !1 && ($ == null ? void 0 : $.code) !== "Enter") && (o("search", a.value), i.value = -2);
|
|
1368
1368
|
}
|
|
1369
1369
|
function m($) {
|
|
1370
1370
|
o("select-object", $);
|
|
1371
1371
|
}
|
|
1372
1372
|
function b() {
|
|
1373
|
-
o("create-object",
|
|
1373
|
+
o("create-object", a.value), s();
|
|
1374
1374
|
}
|
|
1375
|
-
function
|
|
1375
|
+
function s() {
|
|
1376
1376
|
o("hide-dropdown");
|
|
1377
1377
|
}
|
|
1378
1378
|
function w($) {
|
|
1379
|
-
i.value < l.results.length - 1 ? (i.value === -2 &&
|
|
1379
|
+
i.value < l.results.length - 1 ? (i.value === -2 && a.value === "" && i.value++, i.value++) : i.value = $, E();
|
|
1380
1380
|
}
|
|
1381
1381
|
function h($) {
|
|
1382
1382
|
i.value > $ ? i.value-- : i.value = l.results.length - 1, E();
|
|
@@ -1390,7 +1390,7 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1390
1390
|
let le = -1;
|
|
1391
1391
|
for (let X = 0; X < P.length; X++)
|
|
1392
1392
|
P[X] === $.target && (le = X - 1);
|
|
1393
|
-
le >= 0 && (P[le].focus(),
|
|
1393
|
+
le >= 0 && (P[le].focus(), s());
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
1396
|
function E() {
|
|
@@ -1399,18 +1399,18 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1399
1399
|
}
|
|
1400
1400
|
function R() {
|
|
1401
1401
|
let $ = !1;
|
|
1402
|
-
l.results !== null && l.results.length === 1 && ($ =
|
|
1402
|
+
l.results !== null && l.results.length === 1 && ($ = a.value.toUpperCase().trim() === l.results[0].name.toUpperCase().trim()), n.value = l.canCreateNewObject === !0 && l.errorMessage === "" && a.value.trim() !== "" && $ === !1;
|
|
1403
1403
|
}
|
|
1404
1404
|
function H($) {
|
|
1405
1405
|
i.value = $;
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1408
|
-
l.isVisible === !0 && (
|
|
1407
|
+
function ae() {
|
|
1408
|
+
l.isVisible === !0 && (a.value = "", d(), ye(() => {
|
|
1409
1409
|
var $, P;
|
|
1410
1410
|
return (P = ($ = r.value) == null ? void 0 : $.querySelector("input")) == null ? void 0 : P.focus();
|
|
1411
1411
|
}));
|
|
1412
1412
|
}
|
|
1413
|
-
return W(() => l.results, () => R()), W(() => l.errorMessage, () => R()), W(() => l.isVisible, () =>
|
|
1413
|
+
return W(() => l.results, () => R()), W(() => l.errorMessage, () => R()), W(() => l.isVisible, () => ae()), Ae(() => {
|
|
1414
1414
|
var $;
|
|
1415
1415
|
return ($ = r.value) == null ? void 0 : $.addEventListener("keydown", g);
|
|
1416
1416
|
}), Ie(() => {
|
|
@@ -1429,14 +1429,14 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1429
1429
|
onKeyup: $e(Z(T, ["prevent", "stop"]), ["enter"])
|
|
1430
1430
|
}, [
|
|
1431
1431
|
f("div", Ct, [
|
|
1432
|
-
k(
|
|
1433
|
-
modelValue:
|
|
1434
|
-
"onUpdate:modelValue": P[0] || (P[0] = (X) =>
|
|
1432
|
+
k(se, {
|
|
1433
|
+
modelValue: a.value,
|
|
1434
|
+
"onUpdate:modelValue": P[0] || (P[0] = (X) => a.value = X),
|
|
1435
1435
|
class: "!cl-mr-0 cl-w-full",
|
|
1436
1436
|
"input-type": "text",
|
|
1437
1437
|
"placeholder-text": p(e)("comboBox.searchHint", { object: $.objectType }),
|
|
1438
1438
|
onKeyup: d,
|
|
1439
|
-
onBlur:
|
|
1439
|
+
onBlur: s
|
|
1440
1440
|
}, null, 8, ["modelValue", "placeholder-text"]),
|
|
1441
1441
|
M(k(Se, { class: "cl-absolute cl-ml-2 cl-mt-11" }, null, 512), [
|
|
1442
1442
|
[V, $.loading]
|
|
@@ -1454,9 +1454,9 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1454
1454
|
"additional-text": $.objectParentType,
|
|
1455
1455
|
class: "cl-bg-grey-2 cl-mt-1"
|
|
1456
1456
|
}, null, 8, ["text", "additional-text"])) : A("", !0),
|
|
1457
|
-
$.results !== null && ((le = $.results) == null ? void 0 : le.length) === 0 &&
|
|
1457
|
+
$.results !== null && ((le = $.results) == null ? void 0 : le.length) === 0 && a.value.trim() !== "" && $.canCreateNewObject === !1 && $.errorMessage === "" ? (c(), B(Te, {
|
|
1458
1458
|
key: 2,
|
|
1459
|
-
text: p(e)("comboBox.noResults", { value:
|
|
1459
|
+
text: p(e)("comboBox.noResults", { value: a.value })
|
|
1460
1460
|
}, null, 8, ["text"])) : A("", !0),
|
|
1461
1461
|
$.errorMessage !== "" ? (c(), B(Te, {
|
|
1462
1462
|
key: 3,
|
|
@@ -1466,7 +1466,7 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1466
1466
|
n.value ? (c(), B(He, {
|
|
1467
1467
|
key: 4,
|
|
1468
1468
|
"is-create-new-option": !0,
|
|
1469
|
-
text: p(e)("comboBox.addPrompt", { value:
|
|
1469
|
+
text: p(e)("comboBox.addPrompt", { value: a.value, object: $.objectType }),
|
|
1470
1470
|
index: -1,
|
|
1471
1471
|
"selected-index": i.value,
|
|
1472
1472
|
class: "cl-px-2",
|
|
@@ -1513,10 +1513,10 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1513
1513
|
"update:current-object": null
|
|
1514
1514
|
},
|
|
1515
1515
|
setup(t, { expose: o, emit: l }) {
|
|
1516
|
-
const e = t, { t:
|
|
1516
|
+
const e = t, { t: a } = ne(), n = q(!1), i = _({
|
|
1517
1517
|
get: () => e.currentObject,
|
|
1518
1518
|
set: (C) => l("update:current-object", C)
|
|
1519
|
-
}), u = q(null), r = q(null), d = _(() => Ne()), m = q(""), b = q(""),
|
|
1519
|
+
}), u = q(null), r = q(null), d = _(() => Ne()), m = q(""), b = q(""), s = q(), w = q(!0), h = q(!1);
|
|
1520
1520
|
function T(C) {
|
|
1521
1521
|
var te, G;
|
|
1522
1522
|
const F = ((te = ge.value) == null ? void 0 : te.getBoundingClientRect().top) || 0;
|
|
@@ -1532,10 +1532,10 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1532
1532
|
i.value = null, T(!1);
|
|
1533
1533
|
}
|
|
1534
1534
|
function H(C) {
|
|
1535
|
-
const F =
|
|
1535
|
+
const F = ae(C);
|
|
1536
1536
|
i.value = F, T(!1);
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1538
|
+
function ae(C) {
|
|
1539
1539
|
let F = null;
|
|
1540
1540
|
if (e.results !== null) {
|
|
1541
1541
|
for (let te = 0; te < e.results.length; te++)
|
|
@@ -1548,21 +1548,21 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1548
1548
|
}
|
|
1549
1549
|
function $() {
|
|
1550
1550
|
var C;
|
|
1551
|
-
|
|
1551
|
+
s.value = {
|
|
1552
1552
|
name: m.value,
|
|
1553
1553
|
parentId: ((C = r.value) == null ? void 0 : C.id) ?? 0
|
|
1554
|
-
}, l("create-object",
|
|
1554
|
+
}, l("create-object", s.value);
|
|
1555
1555
|
}
|
|
1556
1556
|
function P() {
|
|
1557
|
-
|
|
1557
|
+
s.value = {
|
|
1558
1558
|
name: b.value,
|
|
1559
1559
|
parentId: 0
|
|
1560
|
-
}, l("create-parent-object",
|
|
1560
|
+
}, l("create-parent-object", s.value);
|
|
1561
1561
|
}
|
|
1562
1562
|
function le() {
|
|
1563
1563
|
var C, F;
|
|
1564
1564
|
(C = e.objectCreatedResponse) != null && C.error ? De({
|
|
1565
|
-
message:
|
|
1565
|
+
message: a("comboBox.createFailed", { name: m.value, error: e.objectCreatedResponse.error }),
|
|
1566
1566
|
colour: "danger",
|
|
1567
1567
|
duration: 1e4
|
|
1568
1568
|
}) : (F = e.objectCreatedResponse) != null && F.id && ve();
|
|
@@ -1577,7 +1577,7 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1577
1577
|
function ve() {
|
|
1578
1578
|
var F, te, G, v, S;
|
|
1579
1579
|
De({
|
|
1580
|
-
message:
|
|
1580
|
+
message: a("comboBox.createSuccessful", { object: e.objectType, name: ((F = e.objectCreatedResponse) == null ? void 0 : F.name) ?? "" }),
|
|
1581
1581
|
colour: "primary",
|
|
1582
1582
|
duration: 1e4
|
|
1583
1583
|
});
|
|
@@ -1612,7 +1612,7 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1612
1612
|
class: "cl-relative"
|
|
1613
1613
|
}, [
|
|
1614
1614
|
f("div", Ot, [
|
|
1615
|
-
k(
|
|
1615
|
+
k(se, {
|
|
1616
1616
|
ref_key: "inputRef",
|
|
1617
1617
|
ref: u,
|
|
1618
1618
|
modelValue: d.value,
|
|
@@ -1621,14 +1621,14 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1621
1621
|
"cl-cursor-pointer": C.disabled === !1
|
|
1622
1622
|
}]),
|
|
1623
1623
|
"input-type": "text",
|
|
1624
|
-
"placeholder-text": p(
|
|
1624
|
+
"placeholder-text": p(a)("comboBox.emptyHintText", { object: C.objectType }),
|
|
1625
1625
|
onFocus: F[1] || (F[1] = (G) => {
|
|
1626
1626
|
T(), C.$emit("focus");
|
|
1627
1627
|
})
|
|
1628
1628
|
}, null, 8, ["modelValue", "class", "placeholder-text"]),
|
|
1629
1629
|
M(f("div", qt, [
|
|
1630
1630
|
f("div", At, [
|
|
1631
|
-
J(O(p(
|
|
1631
|
+
J(O(p(a)("comboBox.required")) + " ", 1),
|
|
1632
1632
|
k(p(I), {
|
|
1633
1633
|
class: "cl-ml-1 cl-mt-1",
|
|
1634
1634
|
icon: "ph:warning"
|
|
@@ -1665,7 +1665,7 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1665
1665
|
]),
|
|
1666
1666
|
k(Ye, { size: "small" }, {
|
|
1667
1667
|
title: D(() => [
|
|
1668
|
-
J(O(p(
|
|
1668
|
+
J(O(p(a)("comboBox.createTitle", { object: C.objectType })), 1)
|
|
1669
1669
|
]),
|
|
1670
1670
|
trigger: D(({ open: G }) => [
|
|
1671
1671
|
M(k(Et, {
|
|
@@ -1698,7 +1698,7 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1698
1698
|
onClick: G
|
|
1699
1699
|
}, {
|
|
1700
1700
|
default: D(() => [
|
|
1701
|
-
J(O(p(
|
|
1701
|
+
J(O(p(a)("comboBox.cancel")), 1)
|
|
1702
1702
|
]),
|
|
1703
1703
|
_: 2
|
|
1704
1704
|
}, 1032, ["onClick"]),
|
|
@@ -1711,7 +1711,7 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1711
1711
|
}
|
|
1712
1712
|
}, {
|
|
1713
1713
|
default: D(() => [
|
|
1714
|
-
J(O(p(
|
|
1714
|
+
J(O(p(a)("comboBox.create")), 1)
|
|
1715
1715
|
]),
|
|
1716
1716
|
_: 2
|
|
1717
1717
|
}, 1032, ["disabled", "onClick"])
|
|
@@ -1734,10 +1734,10 @@ const ae = /* @__PURE__ */ pe(mt, [["__scopeId", "data-v-de22c826"]]), gt = { cl
|
|
|
1734
1734
|
onSearch: E,
|
|
1735
1735
|
onCreateObject: P
|
|
1736
1736
|
}, null, 8, ["current-object", "results", "loading", "object-type", "object-created-response", "can-create-new-object", "can-clear-selected-object", "error-message"])) : A("", !0),
|
|
1737
|
-
k(
|
|
1737
|
+
k(se, {
|
|
1738
1738
|
modelValue: m.value,
|
|
1739
1739
|
"onUpdate:modelValue": F[5] || (F[5] = (G) => m.value = G),
|
|
1740
|
-
label: p(
|
|
1740
|
+
label: p(a)("comboBox.createProperty"),
|
|
1741
1741
|
class: "cl-mb-2 cl-pt-3 cl-w-full",
|
|
1742
1742
|
"input-type": "text"
|
|
1743
1743
|
}, null, 8, ["modelValue", "label"])
|
|
@@ -1806,11 +1806,11 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
1806
1806
|
f("strong", null, O(p(o)("grid.gridTools")), 1)
|
|
1807
1807
|
]),
|
|
1808
1808
|
f("div", Ft, [
|
|
1809
|
-
l.columns.some((
|
|
1809
|
+
l.columns.some((a) => a.editable) ? (c(), B(fe, {
|
|
1810
1810
|
key: 0,
|
|
1811
1811
|
size: "small",
|
|
1812
1812
|
colour: "default",
|
|
1813
|
-
onClick: e[0] || (e[0] = Z((
|
|
1813
|
+
onClick: e[0] || (e[0] = Z((a) => l.$emit("update:edit-mode", !l.editMode), ["prevent"]))
|
|
1814
1814
|
}, {
|
|
1815
1815
|
default: D(() => [
|
|
1816
1816
|
l.editMode ? (c(), y(L, { key: 0 }, [
|
|
@@ -1824,12 +1824,12 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
1824
1824
|
l.options.hideViewManager ? A("", !0) : (c(), y("div", Ht, [
|
|
1825
1825
|
N(l.$slots, "view-manager")
|
|
1826
1826
|
])),
|
|
1827
|
-
l.columns.some((
|
|
1827
|
+
l.columns.some((a) => p(Ue)(a) || p(Oe)(a)) ? (c(), y(L, { key: 2 }, [
|
|
1828
1828
|
f("div", xt, [
|
|
1829
1829
|
k(fe, {
|
|
1830
1830
|
class: "cl-w-full",
|
|
1831
1831
|
size: "small",
|
|
1832
|
-
onClick: e[1] || (e[1] = Z((
|
|
1832
|
+
onClick: e[1] || (e[1] = Z((a) => l.$emit("update:filterPanelOpen", !l.filterPanelOpen), ["prevent"]))
|
|
1833
1833
|
}, {
|
|
1834
1834
|
default: D(() => [
|
|
1835
1835
|
J(O(p(o)("grid.modifyFilters")), 1)
|
|
@@ -1839,11 +1839,11 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
1839
1839
|
]),
|
|
1840
1840
|
k(fe, {
|
|
1841
1841
|
size: "small",
|
|
1842
|
-
colour: l.request.filters.some((
|
|
1842
|
+
colour: l.request.filters.some((a) => a.filterValue !== "") ? "danger" : "default",
|
|
1843
1843
|
class: j({
|
|
1844
|
-
"cl-col-span-2": l.columns.some((
|
|
1844
|
+
"cl-col-span-2": l.columns.some((a) => a.editable)
|
|
1845
1845
|
}),
|
|
1846
|
-
onClick: e[2] || (e[2] = Z((
|
|
1846
|
+
onClick: e[2] || (e[2] = Z((a) => l.$emit("clear-filters"), ["prevent"]))
|
|
1847
1847
|
}, {
|
|
1848
1848
|
default: D(() => [
|
|
1849
1849
|
J(O(p(o)("grid.clearFilters")), 1)
|
|
@@ -1872,7 +1872,7 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
1872
1872
|
},
|
|
1873
1873
|
setup(t) {
|
|
1874
1874
|
const o = t, { locale: l, n: e } = ne();
|
|
1875
|
-
function
|
|
1875
|
+
function a(n, i) {
|
|
1876
1876
|
const u = ke.fromISO(n, {
|
|
1877
1877
|
locale: l.value
|
|
1878
1878
|
}).setZone(o.timeZone);
|
|
@@ -1898,18 +1898,18 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
1898
1898
|
}
|
|
1899
1899
|
return r;
|
|
1900
1900
|
}
|
|
1901
|
-
return (n, i) => n.column.type === "slot" ? N(n.$slots, n.column.name, { key: 0 }) : n.column.type === "boolean" && n.column.field !== void 0 ? (c(), B(
|
|
1901
|
+
return (n, i) => n.column.type === "slot" ? N(n.$slots, n.column.name, { key: 0 }) : n.column.type === "boolean" && n.column.field !== void 0 ? (c(), B(se, {
|
|
1902
1902
|
key: 1,
|
|
1903
1903
|
"input-type": "checkbox",
|
|
1904
1904
|
"model-value": n.data[n.column.field],
|
|
1905
1905
|
disabled: !0
|
|
1906
1906
|
}, null, 8, ["model-value"])) : (n.column.type === "date" || n.column.type === "datetime") && n.column.field !== void 0 ? (c(), y(L, { key: 2 }, [
|
|
1907
1907
|
n.column.format !== void 0 ? (c(), y(L, { key: 0 }, [
|
|
1908
|
-
J(O(
|
|
1908
|
+
J(O(a(n.data[n.column.field], n.column.format)), 1)
|
|
1909
1909
|
], 64)) : n.column.type === "date" ? (c(), y(L, { key: 1 }, [
|
|
1910
|
-
J(O(
|
|
1910
|
+
J(O(a(n.data[n.column.field], p(x).DATE)), 1)
|
|
1911
1911
|
], 64)) : (c(), y(L, { key: 2 }, [
|
|
1912
|
-
J(O(
|
|
1912
|
+
J(O(a(n.data[n.column.field], p(x).DATETIME)), 1)
|
|
1913
1913
|
], 64))
|
|
1914
1914
|
], 64)) : n.column.type === "number" && n.column.field !== void 0 ? (c(), y("span", Zt, O(p(e)(n.data[n.column.field], n.column.format ?? p(K).DECIMAL)), 1)) : n.column.field !== void 0 ? (c(), y(L, { key: 4 }, [
|
|
1915
1915
|
n.column.maxLength !== void 0 ? (c(), y("span", Wt, O(n.data[n.column.field].trimToLength(n.column.maxLength, n.column.format !== void 0 ? n.column.format === "ellipsis" : !1)), 1)) : (c(), y("span", Kt, O(n.data[n.column.field]), 1))
|
|
@@ -1925,22 +1925,22 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
1925
1925
|
},
|
|
1926
1926
|
emits: ["edit", "focus", "undo"],
|
|
1927
1927
|
setup(t, { emit: o }) {
|
|
1928
|
-
const l = t, e = q(ie(l.data)),
|
|
1929
|
-
return
|
|
1928
|
+
const l = t, e = q(ie(l.data)), a = _(() => l.column.field !== void 0 && e.value[l.column.field] !== l.data[l.column.field]);
|
|
1929
|
+
return al(() => e.value = ie(l.data)), W(e, (n) => {
|
|
1930
1930
|
const i = l.column.field ?? "";
|
|
1931
1931
|
i !== "" && (n[i] !== l.data[i] ? o("edit", n[i]) : o("undo"));
|
|
1932
1932
|
}, {
|
|
1933
1933
|
deep: !0
|
|
1934
1934
|
}), (n, i) => (c(), y("td", {
|
|
1935
1935
|
class: j(["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", {
|
|
1936
|
-
"cl-bg-link-lighter":
|
|
1936
|
+
"cl-bg-link-lighter": a.value
|
|
1937
1937
|
}])
|
|
1938
1938
|
}, [
|
|
1939
1939
|
f("span", Qt, O(n.column.caption), 1),
|
|
1940
1940
|
n.editMode && n.column.editable === !0 ? N(n.$slots, `${n.column.name}Edit`, oe(re({ key: 0 }, {
|
|
1941
1941
|
cellFocused: () => o("focus"),
|
|
1942
1942
|
column: n.column,
|
|
1943
|
-
edited:
|
|
1943
|
+
edited: a.value,
|
|
1944
1944
|
record: e.value
|
|
1945
1945
|
})), () => [
|
|
1946
1946
|
k(xe, {
|
|
@@ -1977,8 +1977,8 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
1977
1977
|
emits: ["cell-focus", "cell-edit", "cell-undo", "row-select"],
|
|
1978
1978
|
setup(t) {
|
|
1979
1979
|
return (o, l) => (c(), y("tr", null, [
|
|
1980
|
-
(c(!0), y(L, null, Y(o.columns, (e,
|
|
1981
|
-
key:
|
|
1980
|
+
(c(!0), y(L, null, Y(o.columns, (e, a) => (c(), B(Jt, {
|
|
1981
|
+
key: a,
|
|
1982
1982
|
data: o.data,
|
|
1983
1983
|
column: e,
|
|
1984
1984
|
"time-zone": o.timeZone,
|
|
@@ -1999,7 +1999,7 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
1999
1999
|
}), Xt = { key: 1 }, eo = ["colspan"], lo = { class: "cl-flex cl-flex-wrap cl-justify-center cl-text-center cl-text-sm cl-w-full" }, to = { class: "cl-mt-6 cl-w-full" }, oo = {
|
|
2000
2000
|
key: 0,
|
|
2001
2001
|
class: "cl-mt-4"
|
|
2002
|
-
}, no = { class: "cl-mb-2 cl-w-full" },
|
|
2002
|
+
}, no = { class: "cl-mb-2 cl-w-full" }, ao = /* @__PURE__ */ z({
|
|
2003
2003
|
__name: "cl-ui-grid-body",
|
|
2004
2004
|
props: {
|
|
2005
2005
|
columns: {},
|
|
@@ -2012,31 +2012,31 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2012
2012
|
},
|
|
2013
2013
|
emits: ["row-select", "row-edit", "clear-filters"],
|
|
2014
2014
|
setup(t, { emit: o }) {
|
|
2015
|
-
const l = t, { t: e } = ne(),
|
|
2015
|
+
const l = t, { t: e } = ne(), a = q({
|
|
2016
2016
|
index: -1,
|
|
2017
2017
|
record: {}
|
|
2018
2018
|
});
|
|
2019
2019
|
function n() {
|
|
2020
|
-
Object.keys(
|
|
2020
|
+
Object.keys(a.value.record).length !== 0 && (o("row-edit", ie(a.value)), a.value.record = {});
|
|
2021
2021
|
}
|
|
2022
|
-
function i(
|
|
2023
|
-
|
|
2022
|
+
function i(s) {
|
|
2023
|
+
a.value.index !== -1 && a.value.index !== s && n(), a.value.index = s;
|
|
2024
2024
|
}
|
|
2025
|
-
function u(
|
|
2026
|
-
i(
|
|
2025
|
+
function u(s, w) {
|
|
2026
|
+
i(s), w.field !== void 0 && (a.value.record[w.field] = w.value);
|
|
2027
2027
|
}
|
|
2028
|
-
function r(
|
|
2029
|
-
if (
|
|
2030
|
-
const { [
|
|
2031
|
-
|
|
2028
|
+
function r(s) {
|
|
2029
|
+
if (s !== void 0) {
|
|
2030
|
+
const { [s]: w, ...h } = a.value.record;
|
|
2031
|
+
a.value.record = {
|
|
2032
2032
|
...h
|
|
2033
2033
|
};
|
|
2034
2034
|
}
|
|
2035
2035
|
}
|
|
2036
2036
|
const d = q({});
|
|
2037
2037
|
W(() => l.data, () => {
|
|
2038
|
-
var
|
|
2039
|
-
return d.value = Object.fromEntries(((w = (
|
|
2038
|
+
var s, w;
|
|
2039
|
+
return d.value = Object.fromEntries(((w = (s = l.data) == null ? void 0 : s.results) == null ? void 0 : w.map((h, T) => [
|
|
2040
2040
|
[T],
|
|
2041
2041
|
{
|
|
2042
2042
|
count: 0,
|
|
@@ -2050,31 +2050,31 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2050
2050
|
deep: !0,
|
|
2051
2051
|
immediate: !0
|
|
2052
2052
|
});
|
|
2053
|
-
function m(
|
|
2053
|
+
function m(s, w, h) {
|
|
2054
2054
|
const { currentTarget: T } = h;
|
|
2055
|
-
l.selectionEnabled ? o("row-select", w) : (d.value[
|
|
2055
|
+
l.selectionEnabled ? o("row-select", w) : (d.value[s].count++, d.value[s].target = T, d.value[s].count > 1 ? (d.value[s].reset.stop(), d.value[s].count = 0, b(T), d.value[s].target = null, o("row-select", w)) : (d.value[s].reset.start(), b(T)));
|
|
2056
2056
|
}
|
|
2057
|
-
function b(
|
|
2058
|
-
|
|
2057
|
+
function b(s) {
|
|
2058
|
+
s == null || s.classList.toggle("!cl-bg-link-lighter");
|
|
2059
2059
|
}
|
|
2060
2060
|
return W(() => l.editMode, () => {
|
|
2061
|
-
l.editMode || (n(),
|
|
2062
|
-
}), (
|
|
2061
|
+
l.editMode || (n(), a.value.index = -1);
|
|
2062
|
+
}), (s, w) => {
|
|
2063
2063
|
var h;
|
|
2064
2064
|
return c(), y("tbody", null, [
|
|
2065
|
-
|
|
2065
|
+
s.data && ((h = s.data.results) != null && h.length) ? (c(!0), y(L, { key: 0 }, Y(s.data.results, (T, g) => (c(), B(Yt, {
|
|
2066
2066
|
key: g,
|
|
2067
2067
|
data: T,
|
|
2068
|
-
columns:
|
|
2069
|
-
"time-zone":
|
|
2070
|
-
"edit-mode":
|
|
2068
|
+
columns: s.columns,
|
|
2069
|
+
"time-zone": s.timeZone,
|
|
2070
|
+
"edit-mode": s.editMode,
|
|
2071
2071
|
class: j(["cl-bg-opacity-100 cl-cursor-pointer cl-transition-colors", {
|
|
2072
|
-
"cl-bg-white": g % 2 === 0 &&
|
|
2073
|
-
"cl-bg-off-white": g % 2 === 1 ||
|
|
2074
|
-
"cl-cursor-pointer hover:cl-bg-link-lighter":
|
|
2072
|
+
"cl-bg-white": g % 2 === 0 && s.data.totalRecords > 1,
|
|
2073
|
+
"cl-bg-off-white": g % 2 === 1 || s.data.totalRecords === 1,
|
|
2074
|
+
"cl-cursor-pointer hover:cl-bg-link-lighter": s.selectionEnabled && !s.editMode
|
|
2075
2075
|
}]),
|
|
2076
2076
|
onClick: (E) => {
|
|
2077
|
-
|
|
2077
|
+
s.editMode || m(g, T, E);
|
|
2078
2078
|
},
|
|
2079
2079
|
onCellFocus: (E) => {
|
|
2080
2080
|
i(g);
|
|
@@ -2084,24 +2084,24 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2084
2084
|
},
|
|
2085
2085
|
onCellUndo: r
|
|
2086
2086
|
}, Re({ _: 2 }, [
|
|
2087
|
-
Y(
|
|
2087
|
+
Y(s.$slots, (E, R) => ({
|
|
2088
2088
|
name: R,
|
|
2089
2089
|
fn: D((H) => [
|
|
2090
|
-
N(
|
|
2090
|
+
N(s.$slots, R, oe(ce(H)))
|
|
2091
2091
|
])
|
|
2092
2092
|
}))
|
|
2093
|
-
]), 1032, ["data", "columns", "time-zone", "edit-mode", "class", "onClick", "onCellFocus", "onCellEdit"]))), 128)) :
|
|
2093
|
+
]), 1032, ["data", "columns", "time-zone", "edit-mode", "class", "onClick", "onCellFocus", "onCellEdit"]))), 128)) : s.loading ? A("", !0) : (c(), y("tr", Xt, [
|
|
2094
2094
|
f("td", {
|
|
2095
|
-
colspan:
|
|
2095
|
+
colspan: s.columns.length
|
|
2096
2096
|
}, [
|
|
2097
2097
|
f("div", lo, [
|
|
2098
2098
|
f("strong", to, O(p(e)("grid.noData")), 1),
|
|
2099
|
-
|
|
2099
|
+
s.request.filters.length > 0 ? (c(), y("div", oo, [
|
|
2100
2100
|
f("div", no, O(p(e)("grid.noDataFiltersPresent")), 1),
|
|
2101
2101
|
k(fe, {
|
|
2102
2102
|
size: "small",
|
|
2103
2103
|
colour: "danger",
|
|
2104
|
-
onClick: w[0] || (w[0] = Z((T) =>
|
|
2104
|
+
onClick: w[0] || (w[0] = Z((T) => s.$emit("clear-filters"), ["prevent"]))
|
|
2105
2105
|
}, {
|
|
2106
2106
|
default: D(() => [
|
|
2107
2107
|
J(O(p(e)("grid.clearFilters")), 1)
|
|
@@ -2115,7 +2115,7 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2115
2115
|
]);
|
|
2116
2116
|
};
|
|
2117
2117
|
}
|
|
2118
|
-
}),
|
|
2118
|
+
}), so = {
|
|
2119
2119
|
key: 0,
|
|
2120
2120
|
class: "cl-flex cl-flex-wrap cl-justify-end cl-mt-2 cl-w-full"
|
|
2121
2121
|
}, ro = { 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" }, io = { 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" }, uo = { 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" }, po = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, fo = { class: "cl-text-grey-3 cl-w-full lg:cl-mr-2 lg:cl-w-auto" }, mo = { class: "cl-flex cl-flex-wrap cl-text-sm mb:cl-flex-nowrap" }, go = { class: "cl-pr-2" }, vo = ["onClick"], bo = { 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" }, ho = { class: "cl-mb-2 cl-text-grey-3 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, yo = ["onClick"], wo = { class: "cl-mb-2 cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, $o = { 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" }, ko = { class: "cl-block lg:cl-inline-block" }, Co = /* @__PURE__ */ z({
|
|
@@ -2128,24 +2128,24 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2128
2128
|
"update:request": null
|
|
2129
2129
|
},
|
|
2130
2130
|
setup(t, { emit: o }) {
|
|
2131
|
-
const l = t, { n: e, t:
|
|
2132
|
-
var
|
|
2133
|
-
return l.data !== null ? Math.ceil((((
|
|
2131
|
+
const l = t, { n: e, t: a } = ne(), n = _(() => {
|
|
2132
|
+
var s;
|
|
2133
|
+
return l.data !== null ? Math.ceil((((s = l.data) == null ? void 0 : s.totalRecords) ?? 0) / l.request.pageSize) : 1;
|
|
2134
2134
|
}), i = _(() => {
|
|
2135
|
-
const
|
|
2135
|
+
const s = Array.from(Array(n.value + 1).keys());
|
|
2136
2136
|
let w = [];
|
|
2137
|
-
if (
|
|
2137
|
+
if (s.shift(), s.length) {
|
|
2138
2138
|
const h = l.request.pageNumber === n.value || l.request.pageNumber === n.value - 1 ? n.value - 3 : l.request.pageNumber - 1;
|
|
2139
|
-
w =
|
|
2139
|
+
w = s.slice(h, h + 3);
|
|
2140
2140
|
}
|
|
2141
2141
|
return w;
|
|
2142
2142
|
});
|
|
2143
|
-
function u(
|
|
2143
|
+
function u(s) {
|
|
2144
2144
|
const w = ie(l.request);
|
|
2145
|
-
w.pageNumber !==
|
|
2145
|
+
w.pageNumber !== s && (w.pageNumber = Math.max(Math.min(Math.trunc(s), n.value), 1), o("update:request", w));
|
|
2146
2146
|
}
|
|
2147
|
-
function r(
|
|
2148
|
-
const w = parseInt(
|
|
2147
|
+
function r(s) {
|
|
2148
|
+
const w = parseInt(s == null ? void 0 : s.value) || 1;
|
|
2149
2149
|
u(w);
|
|
2150
2150
|
}
|
|
2151
2151
|
const d = [
|
|
@@ -2156,18 +2156,18 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2156
2156
|
100,
|
|
2157
2157
|
200
|
|
2158
2158
|
];
|
|
2159
|
-
function m(
|
|
2159
|
+
function m(s) {
|
|
2160
2160
|
const w = ie(l.request);
|
|
2161
|
-
w.pageSize =
|
|
2161
|
+
w.pageSize = s, w.pageNumber = 1, o("update:request", w);
|
|
2162
2162
|
}
|
|
2163
2163
|
const b = Ke(r, 750);
|
|
2164
|
-
return (
|
|
2164
|
+
return (s, w) => {
|
|
2165
2165
|
var h, T;
|
|
2166
|
-
return (T = (h =
|
|
2166
|
+
return (T = (h = s.data) == null ? void 0 : h.results) != null && T.length && s.request ? (c(), y("div", so, [
|
|
2167
2167
|
f("div", ro, [
|
|
2168
|
-
f("span", co, O(p(
|
|
2169
|
-
k(
|
|
2170
|
-
"model-value":
|
|
2168
|
+
f("span", co, O(p(a)("grid.jumpToPage")), 1),
|
|
2169
|
+
k(se, {
|
|
2170
|
+
"model-value": s.request.pageNumber,
|
|
2171
2171
|
class: "cl-ml-1 cl-mt-0.5 cl-text-sm",
|
|
2172
2172
|
"input-type": "number",
|
|
2173
2173
|
label: "Page",
|
|
@@ -2180,10 +2180,10 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2180
2180
|
f("div", io, [
|
|
2181
2181
|
f("div", uo, [
|
|
2182
2182
|
f("li", po, [
|
|
2183
|
-
f("span", fo, O(p(
|
|
2183
|
+
f("span", fo, O(p(a)("grid.page")), 1)
|
|
2184
2184
|
]),
|
|
2185
2185
|
f("ul", mo, [
|
|
2186
|
-
f("li", go, O(p(e)(
|
|
2186
|
+
f("li", go, O(p(e)(s.request.pageNumber, p(K).INTEGER)) + " / " + O(p(e)(n.value, p(K).INTEGER)), 1),
|
|
2187
2187
|
M(f("li", {
|
|
2188
2188
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2189
2189
|
onClick: w[1] || (w[1] = (g) => u(1))
|
|
@@ -2193,37 +2193,37 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2193
2193
|
size: 14
|
|
2194
2194
|
})
|
|
2195
2195
|
], 512), [
|
|
2196
|
-
[V,
|
|
2196
|
+
[V, s.request.pageNumber > 1]
|
|
2197
2197
|
]),
|
|
2198
2198
|
M(f("li", {
|
|
2199
2199
|
class: "cl-cursor-pointer cl-mt-1 lg:cl-mr-2 mr-1",
|
|
2200
|
-
onClick: w[2] || (w[2] = (g) => u(
|
|
2200
|
+
onClick: w[2] || (w[2] = (g) => u(s.request.pageNumber - 1))
|
|
2201
2201
|
}, [
|
|
2202
2202
|
k(p(I), {
|
|
2203
2203
|
icon: "ph:caret-left",
|
|
2204
2204
|
size: 14
|
|
2205
2205
|
})
|
|
2206
2206
|
], 512), [
|
|
2207
|
-
[V,
|
|
2207
|
+
[V, s.request.pageNumber > 1]
|
|
2208
2208
|
]),
|
|
2209
2209
|
(c(!0), y(L, null, Y(i.value, (g, E) => (c(), y("li", {
|
|
2210
2210
|
key: E,
|
|
2211
2211
|
class: j(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2212
|
-
"cl-text-black cl-font-bold":
|
|
2213
|
-
"cl-text-grey-6":
|
|
2212
|
+
"cl-text-black cl-font-bold": s.request.pageNumber === g,
|
|
2213
|
+
"cl-text-grey-6": s.request.pageNumber !== g
|
|
2214
2214
|
}]),
|
|
2215
2215
|
onClick: (R) => u(g)
|
|
2216
2216
|
}, O(p(e)(g, p(K).INTEGER)), 11, vo))), 128)),
|
|
2217
2217
|
M(f("li", {
|
|
2218
2218
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2219
|
-
onClick: w[3] || (w[3] = (g) => u(
|
|
2219
|
+
onClick: w[3] || (w[3] = (g) => u(s.request.pageNumber + 1))
|
|
2220
2220
|
}, [
|
|
2221
2221
|
k(p(I), {
|
|
2222
2222
|
icon: "ph:caret-right",
|
|
2223
2223
|
size: 14
|
|
2224
2224
|
})
|
|
2225
2225
|
], 512), [
|
|
2226
|
-
[V,
|
|
2226
|
+
[V, s.request.pageNumber < n.value]
|
|
2227
2227
|
]),
|
|
2228
2228
|
M(f("li", {
|
|
2229
2229
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
@@ -2234,24 +2234,24 @@ const Pt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Ft = { class: "cl-gap-1
|
|
|
2234
2234
|
size: 14
|
|
2235
2235
|
})
|
|
2236
2236
|
], 512), [
|
|
2237
|
-
[V,
|
|
2237
|
+
[V, s.request.pageNumber < n.value]
|
|
2238
2238
|
])
|
|
2239
2239
|
])
|
|
2240
2240
|
]),
|
|
2241
2241
|
f("ul", bo, [
|
|
2242
|
-
f("li", ho, O(p(
|
|
2242
|
+
f("li", ho, O(p(a)("grid.pageSize")), 1),
|
|
2243
2243
|
(c(), y(L, null, Y(d, (g, E) => f("li", {
|
|
2244
2244
|
key: E,
|
|
2245
2245
|
class: j(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2246
|
-
"cl-text-black cl-font-bold":
|
|
2247
|
-
"cl-text-grey-6":
|
|
2246
|
+
"cl-text-black cl-font-bold": s.request.pageSize === g,
|
|
2247
|
+
"cl-text-grey-6": s.request.pageSize !== g
|
|
2248
2248
|
}]),
|
|
2249
2249
|
onClick: (R) => m(g)
|
|
2250
2250
|
}, O(p(e)(g, p(K).INTEGER)), 11, yo)), 64))
|
|
2251
2251
|
]),
|
|
2252
2252
|
f("ul", wo, [
|
|
2253
|
-
f("li", $o, O(p(
|
|
2254
|
-
f("li", ko, O(p(e)(
|
|
2253
|
+
f("li", $o, O(p(a)("grid.totalRecords")), 1),
|
|
2254
|
+
f("li", ko, O(p(e)(s.data.totalRecords, p(K).INTEGER)), 1)
|
|
2255
2255
|
])
|
|
2256
2256
|
])
|
|
2257
2257
|
])) : A("", !0);
|
|
@@ -2444,7 +2444,7 @@ const _o = {
|
|
|
2444
2444
|
},
|
|
2445
2445
|
emits: ["update:filter"],
|
|
2446
2446
|
setup(t, { emit: o }) {
|
|
2447
|
-
const l = t, { t: e } = ne(),
|
|
2447
|
+
const l = t, { t: e } = ne(), a = _(() => {
|
|
2448
2448
|
let u = [];
|
|
2449
2449
|
return l.column.type !== "slot" ? u = Ge.filter((r) => r.allowedTypes.includes(l.column.type)) : typeof l.column.slotType < "u" && typeof l.column.field < "u" && (u = Ge.filter((r) => r.allowedTypes.includes(l.column.slotType))), l.column.type === "date" || l.column.type === "datetime" || l.column.slotType === "date" || l.column.slotType === "datetime" ? u.forEach((r) => {
|
|
2450
2450
|
r.description = e(`grid.${r.key}`);
|
|
@@ -2454,7 +2454,7 @@ const _o = {
|
|
|
2454
2454
|
}), n = _(() => {
|
|
2455
2455
|
var r;
|
|
2456
2456
|
let u = (r = l.filter) == null ? void 0 : r.filterMethod;
|
|
2457
|
-
return typeof u > "u" && (u = ee[l.defaultOperation].toLowerCase()),
|
|
2457
|
+
return typeof u > "u" && (u = ee[l.defaultOperation].toLowerCase()), a.value.find((d) => {
|
|
2458
2458
|
var m;
|
|
2459
2459
|
return d.method.toLowerCase() === ((m = u == null ? void 0 : u.removeNonAlphanumeric()) == null ? void 0 : m.toLowerCase());
|
|
2460
2460
|
});
|
|
@@ -2492,14 +2492,14 @@ const _o = {
|
|
|
2492
2492
|
}])
|
|
2493
2493
|
}, [
|
|
2494
2494
|
f("strong", Bo, O(p(e)("grid.availableMethods")), 1),
|
|
2495
|
-
(c(!0), y(L, null, Y(
|
|
2495
|
+
(c(!0), y(L, null, Y(a.value, (d, m) => {
|
|
2496
2496
|
var b;
|
|
2497
2497
|
return c(), y("span", {
|
|
2498
2498
|
key: m,
|
|
2499
2499
|
class: j(["cl-cursor-pointer cl-px-4 cl-py-1 cl-transition-colors cl-w-full hover:cl-bg-grey-0", {
|
|
2500
2500
|
"cl-bg-primary-default cl-opacity-80": d.method === ((b = n.value) == null ? void 0 : b.method)
|
|
2501
2501
|
}]),
|
|
2502
|
-
onClick: Z((
|
|
2502
|
+
onClick: Z((s) => i(d.method), ["prevent"])
|
|
2503
2503
|
}, [
|
|
2504
2504
|
J(O(d.description) + " ", 1),
|
|
2505
2505
|
k(p(I), {
|
|
@@ -2524,7 +2524,7 @@ const _o = {
|
|
|
2524
2524
|
},
|
|
2525
2525
|
emits: ["update:filter"],
|
|
2526
2526
|
setup(t, { emit: o }) {
|
|
2527
|
-
const l = t, { locale: e, t:
|
|
2527
|
+
const l = t, { locale: e, t: a } = ne();
|
|
2528
2528
|
function n() {
|
|
2529
2529
|
return l.column.type === "string" || l.column.slotType === "string" ? ee.CONTAINS : l.column.type === "datetime" || l.column.slotType === "datetime" || l.column.type === "date" || l.column.slotType === "date" ? ee.LESS_THAN : ee.EQUAL;
|
|
2530
2530
|
}
|
|
@@ -2533,10 +2533,10 @@ const _o = {
|
|
|
2533
2533
|
set: (g) => o("update:filter", g)
|
|
2534
2534
|
}), u = _(() => l.column.type === "date" || l.column.type === "datetime" || l.column.type === "slot" && (l.column.slotType === "date" || l.column.slotType === "datetime")), r = _({
|
|
2535
2535
|
get() {
|
|
2536
|
-
var E, R, H,
|
|
2536
|
+
var E, R, H, ae;
|
|
2537
2537
|
let g = (E = i.value) == null ? void 0 : E[0];
|
|
2538
2538
|
if (g && u.value && (((R = l.filter) == null ? void 0 : R.length) ?? 0 > 1)) {
|
|
2539
|
-
const $ = (H = i.value) == null ? void 0 : H.find((le) => le.filterOperation === ee.EQUAL_OR_GREATER_THAN), P = (
|
|
2539
|
+
const $ = (H = i.value) == null ? void 0 : H.find((le) => le.filterOperation === ee.EQUAL_OR_GREATER_THAN), P = (ae = i.value) == null ? void 0 : ae.find((le) => le.filterOperation === ee.LESS_THAN);
|
|
2540
2540
|
$ && P && (g = {
|
|
2541
2541
|
filterOnColumn: l.column.field,
|
|
2542
2542
|
filterOperation: ee.EQUAL,
|
|
@@ -2579,20 +2579,20 @@ const _o = {
|
|
|
2579
2579
|
const m = _(() => {
|
|
2580
2580
|
var g;
|
|
2581
2581
|
return ((g = r.value) == null ? void 0 : g.filterValue) ?? "";
|
|
2582
|
-
}), b = _(() => m.value === "" ? null : m.value),
|
|
2582
|
+
}), b = _(() => m.value === "" ? null : m.value), s = _(() => Intl.NumberFormat(e.value).format(1.1).replace(/[0-9]+/g, "")), w = _(() => Ue(l.column));
|
|
2583
2583
|
function h(g, E) {
|
|
2584
2584
|
var $;
|
|
2585
2585
|
let R, H = !1;
|
|
2586
|
-
const
|
|
2586
|
+
const ae = ((g == null ? void 0 : g.value) ?? E).trim();
|
|
2587
2587
|
if (r.value)
|
|
2588
|
-
H = (($ = r.value) == null ? void 0 : $.filterValue) ===
|
|
2589
|
-
else if (
|
|
2588
|
+
H = (($ = r.value) == null ? void 0 : $.filterValue) === ae, R = ie(r.value), R.filterValue = ae;
|
|
2589
|
+
else if (ae !== "" && typeof l.column.field < "u") {
|
|
2590
2590
|
const P = n();
|
|
2591
2591
|
R = {
|
|
2592
2592
|
filterOnColumn: l.column.field,
|
|
2593
2593
|
filterMethod: ee[P].toLowerCase(),
|
|
2594
2594
|
filterOperation: P,
|
|
2595
|
-
filterValue:
|
|
2595
|
+
filterValue: ae
|
|
2596
2596
|
};
|
|
2597
2597
|
} else
|
|
2598
2598
|
return;
|
|
@@ -2600,7 +2600,7 @@ const _o = {
|
|
|
2600
2600
|
}
|
|
2601
2601
|
function T(g) {
|
|
2602
2602
|
let E;
|
|
2603
|
-
l.column.format === K.INTEGER ? (typeof g == "string" && (g = parseInt(g)), E = Math.round(g)) : (typeof g == "string" && (g = parseFloat(g.replace(
|
|
2603
|
+
l.column.format === K.INTEGER ? (typeof g == "string" && (g = parseInt(g)), E = Math.round(g)) : (typeof g == "string" && (g = parseFloat(g.replace(s.value, "."))), E = g), h(null, isNaN(E) ? "" : E.toString());
|
|
2604
2604
|
}
|
|
2605
2605
|
return (g, E) => w.value ? (c(), y("div", Lo, [
|
|
2606
2606
|
g.column.type === "boolean" || g.column.slotType === "boolean" ? (c(), y("select", {
|
|
@@ -2612,12 +2612,12 @@ const _o = {
|
|
|
2612
2612
|
f("option", {
|
|
2613
2613
|
value: "true",
|
|
2614
2614
|
selected: m.value === "true"
|
|
2615
|
-
}, O(p(
|
|
2615
|
+
}, O(p(a)("grid.true")), 9, Po),
|
|
2616
2616
|
f("option", {
|
|
2617
2617
|
value: "false",
|
|
2618
2618
|
selected: m.value === "false"
|
|
2619
|
-
}, O(p(
|
|
2620
|
-
], 32)) : g.column.type === "date" || g.column.type === "datetime" || g.column.slotType === "date" || g.column.slotType === "datetime" ? (c(), B(
|
|
2619
|
+
}, O(p(a)("grid.false")), 9, Fo)
|
|
2620
|
+
], 32)) : g.column.type === "date" || g.column.type === "datetime" || g.column.slotType === "date" || g.column.slotType === "datetime" ? (c(), B(se, {
|
|
2621
2621
|
key: 1,
|
|
2622
2622
|
"model-value": b.value,
|
|
2623
2623
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
@@ -2626,14 +2626,14 @@ const _o = {
|
|
|
2626
2626
|
"input-type": g.column.type === "slot" ? g.column.slotType : g.column.type,
|
|
2627
2627
|
"time-zone": g.timeZone,
|
|
2628
2628
|
"onUpdate:modelValue": E[1] || (E[1] = (R) => h(null, R ?? ""))
|
|
2629
|
-
}, null, 8, ["model-value", "label", "input-type", "time-zone"])) : g.column.type === "number" || g.column.slotType === "number" ? (c(), B(
|
|
2629
|
+
}, null, 8, ["model-value", "label", "input-type", "time-zone"])) : g.column.type === "number" || g.column.slotType === "number" ? (c(), B(se, {
|
|
2630
2630
|
key: 2,
|
|
2631
2631
|
"model-value": m.value,
|
|
2632
2632
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
2633
2633
|
"input-type": "number",
|
|
2634
2634
|
"show-arrows": !1,
|
|
2635
2635
|
onInput: E[2] || (E[2] = (R, H) => T(H))
|
|
2636
|
-
}, null, 8, ["model-value"])) : g.column.type === "string" || g.column.slotType === "string" ? (c(), B(
|
|
2636
|
+
}, null, 8, ["model-value"])) : g.column.type === "string" || g.column.slotType === "string" ? (c(), B(se, {
|
|
2637
2637
|
key: 3,
|
|
2638
2638
|
"model-value": m.value,
|
|
2639
2639
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
@@ -2660,13 +2660,13 @@ const _o = {
|
|
|
2660
2660
|
},
|
|
2661
2661
|
emits: ["update:request", "update:filterPanelOpen"],
|
|
2662
2662
|
setup(t, { emit: o }) {
|
|
2663
|
-
const l = t, { t: e } = ne(),
|
|
2663
|
+
const l = t, { t: e } = ne(), a = _({
|
|
2664
2664
|
get: () => l.request,
|
|
2665
2665
|
set: (r) => o("update:request", r)
|
|
2666
2666
|
});
|
|
2667
2667
|
function n(r, d) {
|
|
2668
2668
|
var m, b;
|
|
2669
|
-
return ((m =
|
|
2669
|
+
return ((m = a.value.sort) == null ? void 0 : m.sortOnColumn) === r.field && ((b = a.value.sort) == null ? void 0 : b.sortByAscending) === d;
|
|
2670
2670
|
}
|
|
2671
2671
|
function i(r) {
|
|
2672
2672
|
if (typeof r < "u") {
|
|
@@ -2674,16 +2674,16 @@ const _o = {
|
|
|
2674
2674
|
d.sort === null || d.sort.sortOnColumn !== r ? d.sort = {
|
|
2675
2675
|
sortOnColumn: r,
|
|
2676
2676
|
sortByAscending: !0
|
|
2677
|
-
} : d.sort.sortOnColumn === r && d.sort.sortByAscending === !0 ? d.sort.sortByAscending = !1 : d.sort = null,
|
|
2677
|
+
} : d.sort.sortOnColumn === r && d.sort.sortByAscending === !0 ? d.sort.sortByAscending = !1 : d.sort = null, a.value = d;
|
|
2678
2678
|
}
|
|
2679
2679
|
}
|
|
2680
2680
|
function u(r) {
|
|
2681
2681
|
if (r) {
|
|
2682
|
-
const d = ie(
|
|
2682
|
+
const d = ie(a.value);
|
|
2683
2683
|
d.filters = [
|
|
2684
2684
|
...d.filters.filter((m) => m.filterOnColumn !== r[0].filterOnColumn),
|
|
2685
2685
|
...r
|
|
2686
|
-
], d.pageNumber = 1,
|
|
2686
|
+
], d.pageNumber = 1, a.value = d;
|
|
2687
2687
|
}
|
|
2688
2688
|
}
|
|
2689
2689
|
return (r, d) => (c(), y("thead", xo, [
|
|
@@ -2693,7 +2693,7 @@ const _o = {
|
|
|
2693
2693
|
class: j(["cl-text-grey-3 cl-text-sm", {
|
|
2694
2694
|
"cl-cursor-pointer": p(Oe)(m)
|
|
2695
2695
|
}]),
|
|
2696
|
-
onClick: (
|
|
2696
|
+
onClick: (s) => p(Oe)(m) ? i(m.field) : () => {
|
|
2697
2697
|
}
|
|
2698
2698
|
}, [
|
|
2699
2699
|
J(O(m.caption) + " ", 1),
|
|
@@ -2734,7 +2734,7 @@ const _o = {
|
|
|
2734
2734
|
p(Oe)(m) ? (c(), y("div", {
|
|
2735
2735
|
key: 0,
|
|
2736
2736
|
class: "cl-col-span-2 cl-gap-1 cl-span lg:cl-hidden",
|
|
2737
|
-
onClick: (
|
|
2737
|
+
onClick: (s) => i(m.field)
|
|
2738
2738
|
}, [
|
|
2739
2739
|
f("span", Jo, O(p(e)("grid.sortBy")), 1),
|
|
2740
2740
|
n(m, !0) ? (c(), B(p(I), {
|
|
@@ -2753,7 +2753,7 @@ const _o = {
|
|
|
2753
2753
|
], 8, Qo)) : A("", !0),
|
|
2754
2754
|
k(Ho, {
|
|
2755
2755
|
class: "cl-col-span-4",
|
|
2756
|
-
filter:
|
|
2756
|
+
filter: a.value.filters.filter((s) => s.filterOnColumn === m.field),
|
|
2757
2757
|
column: m,
|
|
2758
2758
|
"time-zone": r.timeZone,
|
|
2759
2759
|
"first-half": b <= r.columns.length / 2,
|
|
@@ -2763,7 +2763,7 @@ const _o = {
|
|
|
2763
2763
|
], 2)
|
|
2764
2764
|
]));
|
|
2765
2765
|
}
|
|
2766
|
-
}), Xo = { class: "cl-fixed cl-flex cl-h-full cl-justify-end cl-right-0 cl-shadow-lg cl-top-0 cl-z-50" }, en = { class: "cl-bg-secondary-default cl-h-full cl-overflow-y-auto cl-overscroll-y-none cl-px-10 cl-py-20 cl-relative cl-text-grey-2 cl-w-80" }, ln = { class: "cl-mb-4 cl-text-2xl cl-text-off-white" }, tn = { class: "cl-border-grey-3 cl-border-t cl-flex cl-flex-wrap cl-text-sm cl-w-full" }, on = { class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full" }, nn = { class: "cl-flex-1 cl-py-2" },
|
|
2766
|
+
}), Xo = { class: "cl-fixed cl-flex cl-h-full cl-justify-end cl-right-0 cl-shadow-lg cl-top-0 cl-z-50" }, en = { class: "cl-bg-secondary-default cl-h-full cl-overflow-y-auto cl-overscroll-y-none cl-px-10 cl-py-20 cl-relative cl-text-grey-2 cl-w-80" }, ln = { class: "cl-mb-4 cl-text-2xl cl-text-off-white" }, tn = { class: "cl-border-grey-3 cl-border-t cl-flex cl-flex-wrap cl-text-sm cl-w-full" }, on = { class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full" }, nn = { class: "cl-flex-1 cl-py-2" }, an = { class: "cl-py-2 cl-w-1/4" }, sn = { class: "cl-py-2 cl-w-1/5" }, rn = { class: "cl-flex-1 cl-py-2" }, cn = { class: "cl-py-2 cl-w-1/4" }, un = { class: "cl-py-2 cl-text-off-white cl-w-1/5" }, dn = { key: 1 }, pn = /* @__PURE__ */ z({
|
|
2767
2767
|
inheritAttrs: !1,
|
|
2768
2768
|
__name: "cl-ui-grid-view-manager",
|
|
2769
2769
|
props: {
|
|
@@ -2771,13 +2771,13 @@ const _o = {
|
|
|
2771
2771
|
},
|
|
2772
2772
|
emits: ["update:columns"],
|
|
2773
2773
|
setup(t, { emit: o }) {
|
|
2774
|
-
const l = t, { t: e } = ne(),
|
|
2774
|
+
const l = t, { t: e } = ne(), a = q(!1);
|
|
2775
2775
|
function n(r, d, m) {
|
|
2776
2776
|
m < r.length && m >= 0 && r.splice(m, 0, r.splice(d, 1)[0]);
|
|
2777
2777
|
}
|
|
2778
2778
|
function i(r, d) {
|
|
2779
|
-
const m = ie(l.columns), b = (r == null ? void 0 : r.checked) ?? !1,
|
|
2780
|
-
|
|
2779
|
+
const m = ie(l.columns), b = (r == null ? void 0 : r.checked) ?? !1, s = m.findIndex((w) => w.name === d.name);
|
|
2780
|
+
s >= 0 && (m[s].visible = b), o("update:columns", m);
|
|
2781
2781
|
}
|
|
2782
2782
|
function u(r, d) {
|
|
2783
2783
|
const m = ie(l.columns), b = d === "up" ? r + 1 : r - 1;
|
|
@@ -2787,7 +2787,7 @@ const _o = {
|
|
|
2787
2787
|
k(fe, re(r.$attrs, {
|
|
2788
2788
|
class: "cl-w-full",
|
|
2789
2789
|
size: "small",
|
|
2790
|
-
onClick: d[0] || (d[0] = Z((m) =>
|
|
2790
|
+
onClick: d[0] || (d[0] = Z((m) => a.value = !0, ["prevent"]))
|
|
2791
2791
|
}), {
|
|
2792
2792
|
default: D(() => [
|
|
2793
2793
|
J(O(p(e)("grid.manageView")), 1)
|
|
@@ -2803,14 +2803,14 @@ const _o = {
|
|
|
2803
2803
|
class: "cl-absolute cl-cursor-pointer cl-right-3 cl-text-off-white cl-top-3",
|
|
2804
2804
|
icon: "ph:x",
|
|
2805
2805
|
size: 16,
|
|
2806
|
-
onClick: d[1] || (d[1] = (m) =>
|
|
2806
|
+
onClick: d[1] || (d[1] = (m) => a.value = !1)
|
|
2807
2807
|
}),
|
|
2808
2808
|
f("h3", ln, O(p(e)("grid.manageView")), 1),
|
|
2809
2809
|
f("ul", tn, [
|
|
2810
2810
|
f("li", on, [
|
|
2811
2811
|
f("strong", nn, O(p(e)("grid.column")), 1),
|
|
2812
|
-
f("strong",
|
|
2813
|
-
f("strong",
|
|
2812
|
+
f("strong", an, O(p(e)("grid.visible")), 1),
|
|
2813
|
+
f("strong", sn, O(p(e)("grid.order")), 1)
|
|
2814
2814
|
]),
|
|
2815
2815
|
(c(!0), y(L, null, Y(r.columns, (m, b) => (c(), y("li", {
|
|
2816
2816
|
key: b,
|
|
@@ -2818,10 +2818,10 @@ const _o = {
|
|
|
2818
2818
|
}, [
|
|
2819
2819
|
f("div", rn, O(m.caption), 1),
|
|
2820
2820
|
f("div", cn, [
|
|
2821
|
-
k(
|
|
2821
|
+
k(se, {
|
|
2822
2822
|
"model-value": m.visible === void 0 || m.visible === !0,
|
|
2823
2823
|
"input-type": "checkbox",
|
|
2824
|
-
onClick: (
|
|
2824
|
+
onClick: (s) => i(s.target, m)
|
|
2825
2825
|
}, null, 8, ["model-value", "onClick"])
|
|
2826
2826
|
]),
|
|
2827
2827
|
f("div", un, [
|
|
@@ -2830,13 +2830,13 @@ const _o = {
|
|
|
2830
2830
|
key: 0,
|
|
2831
2831
|
class: "cl-cursor-pointer cl-inline-block cl-mr-2",
|
|
2832
2832
|
icon: "ph:arrow-left",
|
|
2833
|
-
onClick: (
|
|
2833
|
+
onClick: (s) => u(b, "down")
|
|
2834
2834
|
}, null, 8, ["onClick"])) : A("", !0),
|
|
2835
2835
|
b !== r.columns.length - 1 ? (c(), B(p(I), {
|
|
2836
2836
|
key: 1,
|
|
2837
2837
|
class: "cl-cursor-pointer cl-inline-block",
|
|
2838
2838
|
icon: "ph:arrow-right",
|
|
2839
|
-
onClick: (
|
|
2839
|
+
onClick: (s) => u(b, "up")
|
|
2840
2840
|
}, null, 8, ["onClick"])) : A("", !0)
|
|
2841
2841
|
], 64)) : (c(), y("em", dn, O(p(e)("grid.hidden")), 1))
|
|
2842
2842
|
])
|
|
@@ -2844,7 +2844,7 @@ const _o = {
|
|
|
2844
2844
|
])
|
|
2845
2845
|
])
|
|
2846
2846
|
], 512), [
|
|
2847
|
-
[V,
|
|
2847
|
+
[V, a.value]
|
|
2848
2848
|
])
|
|
2849
2849
|
]),
|
|
2850
2850
|
_: 1
|
|
@@ -2867,7 +2867,7 @@ const _o = {
|
|
|
2867
2867
|
const l = t, e = _({
|
|
2868
2868
|
get: () => l.columns,
|
|
2869
2869
|
set: (h) => o("update:columns", h)
|
|
2870
|
-
}),
|
|
2870
|
+
}), a = _(() => e.value.filter((h) => h.visible ?? !0)), n = q({});
|
|
2871
2871
|
function i() {
|
|
2872
2872
|
const h = {};
|
|
2873
2873
|
window.innerWidth >= 1024 && e.value.forEach((T) => {
|
|
@@ -2894,8 +2894,8 @@ const _o = {
|
|
|
2894
2894
|
deep: !0,
|
|
2895
2895
|
immediate: !0
|
|
2896
2896
|
});
|
|
2897
|
-
const b = _(() => l.data),
|
|
2898
|
-
return W(
|
|
2897
|
+
const b = _(() => l.data), s = q(!1), w = q(!1);
|
|
2898
|
+
return W(s, () => s.value ? o("edit-start") : o("edit-end")), (h, T) => (c(), y("div", fn, [
|
|
2899
2899
|
k(me, { name: "fade" }, {
|
|
2900
2900
|
default: D(() => [
|
|
2901
2901
|
M(f("div", mn, [
|
|
@@ -2907,8 +2907,8 @@ const _o = {
|
|
|
2907
2907
|
_: 1
|
|
2908
2908
|
}),
|
|
2909
2909
|
k(Gt, {
|
|
2910
|
-
"edit-mode":
|
|
2911
|
-
"onUpdate:editMode": T[1] || (T[1] = (g) =>
|
|
2910
|
+
"edit-mode": s.value,
|
|
2911
|
+
"onUpdate:editMode": T[1] || (T[1] = (g) => s.value = g),
|
|
2912
2912
|
"filter-panel-open": w.value,
|
|
2913
2913
|
"onUpdate:filterPanelOpen": T[2] || (T[2] = (g) => w.value = g),
|
|
2914
2914
|
columns: h.columns,
|
|
@@ -2931,7 +2931,7 @@ const _o = {
|
|
|
2931
2931
|
}])
|
|
2932
2932
|
}, [
|
|
2933
2933
|
f("colgroup", vn, [
|
|
2934
|
-
(c(!0), y(L, null, Y(
|
|
2934
|
+
(c(!0), y(L, null, Y(a.value, (g, E) => (c(), y("col", {
|
|
2935
2935
|
key: E,
|
|
2936
2936
|
style: Ze(u(g.name)),
|
|
2937
2937
|
span: 1
|
|
@@ -2942,17 +2942,17 @@ const _o = {
|
|
|
2942
2942
|
"onUpdate:request": T[3] || (T[3] = (g) => r.value = g),
|
|
2943
2943
|
"filter-panel-open": w.value,
|
|
2944
2944
|
"onUpdate:filterPanelOpen": T[4] || (T[4] = (g) => w.value = g),
|
|
2945
|
-
columns:
|
|
2945
|
+
columns: a.value,
|
|
2946
2946
|
options: h.options,
|
|
2947
2947
|
"time-zone": h.timeZone
|
|
2948
2948
|
}, null, 8, ["request", "filter-panel-open", "columns", "options", "time-zone"]),
|
|
2949
|
-
k(
|
|
2950
|
-
columns:
|
|
2949
|
+
k(ao, {
|
|
2950
|
+
columns: a.value,
|
|
2951
2951
|
request: r.value,
|
|
2952
2952
|
data: b.value,
|
|
2953
2953
|
"time-zone": h.timeZone,
|
|
2954
2954
|
loading: h.loading,
|
|
2955
|
-
"edit-mode":
|
|
2955
|
+
"edit-mode": s.value,
|
|
2956
2956
|
"selection-enabled": h.options.rowSelectionEnabled,
|
|
2957
2957
|
onClearFilters: d,
|
|
2958
2958
|
onRowEdit: T[5] || (T[5] = (g) => h.$emit("row-edit", g)),
|
|
@@ -3007,8 +3007,8 @@ const _o = {
|
|
|
3007
3007
|
emits: ["update:is-open"],
|
|
3008
3008
|
setup(t, { emit: o }) {
|
|
3009
3009
|
const l = t, e = q();
|
|
3010
|
-
ze(e,
|
|
3011
|
-
function
|
|
3010
|
+
ze(e, a);
|
|
3011
|
+
function a() {
|
|
3012
3012
|
l.isOpen === !0 && o("update:is-open", !1);
|
|
3013
3013
|
}
|
|
3014
3014
|
return (n, i) => (c(), y("div", {
|
|
@@ -3093,12 +3093,12 @@ const Sn = {
|
|
|
3093
3093
|
},
|
|
3094
3094
|
emits: ["language-select"],
|
|
3095
3095
|
setup(t, { emit: o }) {
|
|
3096
|
-
const l = t, { locale: e } = ne(),
|
|
3096
|
+
const l = t, { locale: e } = ne(), a = q(!1), n = _(() => l.supportedLanguages.find((r) => r.localeCode === e.value) ?? l.defaultLangauge), i = _(() => l.supportedLanguages.filter((r) => je(r)).sort((r, d) => r.nativeName > d.nativeName ? 1 : d.nativeName > r.nativeName ? -1 : 0));
|
|
3097
3097
|
function u() {
|
|
3098
|
-
l.disabled || (
|
|
3098
|
+
l.disabled || (a.value = !a.value);
|
|
3099
3099
|
}
|
|
3100
3100
|
return W(() => l.disabled, (r) => {
|
|
3101
|
-
r && (
|
|
3101
|
+
r && (a.value = !1);
|
|
3102
3102
|
}), (r, d) => n.value !== null && p(je)(n.value) ? (c(), y("div", Sn, [
|
|
3103
3103
|
f("div", {
|
|
3104
3104
|
class: j(["cl-flex cl-items-center", {
|
|
@@ -3120,14 +3120,14 @@ const Sn = {
|
|
|
3120
3120
|
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",
|
|
3121
3121
|
"data-localename": m.name,
|
|
3122
3122
|
"data-localecode": m.localeCode,
|
|
3123
|
-
onClick: (
|
|
3123
|
+
onClick: (s) => {
|
|
3124
3124
|
e.value = m.localeCode, u(), o("language-select", m.localeCode);
|
|
3125
3125
|
}
|
|
3126
3126
|
}, [
|
|
3127
3127
|
f("span", _n, O(m.nativeName), 1)
|
|
3128
3128
|
], 8, jn))), 128))
|
|
3129
3129
|
], 512), [
|
|
3130
|
-
[V,
|
|
3130
|
+
[V, a.value]
|
|
3131
3131
|
])
|
|
3132
3132
|
]),
|
|
3133
3133
|
_: 1
|
|
@@ -3148,28 +3148,28 @@ const Sn = {
|
|
|
3148
3148
|
"update:errors": null
|
|
3149
3149
|
},
|
|
3150
3150
|
setup(t, { emit: o }) {
|
|
3151
|
-
const { t: l } = ne(), e = q(""),
|
|
3151
|
+
const { t: l } = ne(), e = q(""), a = q(""), n = q("password"), i = q();
|
|
3152
3152
|
function u() {
|
|
3153
3153
|
const b = {
|
|
3154
3154
|
username: e.value,
|
|
3155
|
-
password:
|
|
3155
|
+
password: a.value
|
|
3156
3156
|
};
|
|
3157
3157
|
o("login", b);
|
|
3158
3158
|
}
|
|
3159
3159
|
function r() {
|
|
3160
3160
|
o("update:errors", []);
|
|
3161
3161
|
}
|
|
3162
|
-
function d(b,
|
|
3162
|
+
function d(b, s) {
|
|
3163
3163
|
const w = {
|
|
3164
3164
|
valid: !0,
|
|
3165
3165
|
message: ""
|
|
3166
3166
|
};
|
|
3167
|
-
return typeof
|
|
3167
|
+
return typeof s == "string" && s.trim() === "" && (w.valid = !1), w;
|
|
3168
3168
|
}
|
|
3169
|
-
function m(b,
|
|
3169
|
+
function m(b, s) {
|
|
3170
3170
|
i.value = b;
|
|
3171
3171
|
}
|
|
3172
|
-
return (b,
|
|
3172
|
+
return (b, s) => (c(), y("div", Rn, [
|
|
3173
3173
|
f("div", zn, [
|
|
3174
3174
|
N(b.$slots, "background")
|
|
3175
3175
|
]),
|
|
@@ -3193,9 +3193,9 @@ const Sn = {
|
|
|
3193
3193
|
icon: "ph:user",
|
|
3194
3194
|
size: 18
|
|
3195
3195
|
}),
|
|
3196
|
-
k(
|
|
3196
|
+
k(se, {
|
|
3197
3197
|
modelValue: e.value,
|
|
3198
|
-
"onUpdate:modelValue":
|
|
3198
|
+
"onUpdate:modelValue": s[0] || (s[0] = (w) => e.value = w),
|
|
3199
3199
|
modelModifiers: { trim: !0 },
|
|
3200
3200
|
class: "!cl-border-2 !cl-mb-1 cl-w-full",
|
|
3201
3201
|
"input-type": "email",
|
|
@@ -3224,7 +3224,7 @@ const Sn = {
|
|
|
3224
3224
|
class: "cl-absolute cl-cursor-pointer cl-right-4 cl-top-2.5 cl-z-10",
|
|
3225
3225
|
icon: "ph:eye",
|
|
3226
3226
|
size: 18,
|
|
3227
|
-
onClick:
|
|
3227
|
+
onClick: s[1] || (s[1] = (w) => n.value = "text")
|
|
3228
3228
|
}, null, 512), [
|
|
3229
3229
|
[V, n.value === "password"]
|
|
3230
3230
|
]),
|
|
@@ -3232,16 +3232,16 @@ const Sn = {
|
|
|
3232
3232
|
class: "cl-absolute cl-cursor-pointer cl-right-4 cl-top-2.5 cl-z-10",
|
|
3233
3233
|
icon: "ph:eye-slash",
|
|
3234
3234
|
size: 18,
|
|
3235
|
-
onClick:
|
|
3235
|
+
onClick: s[2] || (s[2] = (w) => n.value = "password")
|
|
3236
3236
|
}, null, 512), [
|
|
3237
3237
|
[V, n.value === "text"]
|
|
3238
3238
|
]),
|
|
3239
|
-
k(
|
|
3240
|
-
modelValue:
|
|
3241
|
-
"onUpdate:modelValue":
|
|
3239
|
+
k(se, {
|
|
3240
|
+
modelValue: a.value,
|
|
3241
|
+
"onUpdate:modelValue": s[3] || (s[3] = (w) => a.value = w),
|
|
3242
3242
|
class: "!cl-border-2 cl-w-full",
|
|
3243
3243
|
"input-type": n.value,
|
|
3244
|
-
"highlight-when-valid":
|
|
3244
|
+
"highlight-when-valid": a.value !== void 0 && a.value !== "",
|
|
3245
3245
|
label: p(l)("login.password"),
|
|
3246
3246
|
"show-label": !1,
|
|
3247
3247
|
"placeholder-text": p(l)("login.password"),
|
|
@@ -3262,7 +3262,7 @@ const Sn = {
|
|
|
3262
3262
|
class: "cl-w-full",
|
|
3263
3263
|
colour: "blue",
|
|
3264
3264
|
loading: b.loading,
|
|
3265
|
-
disabled: !i.value ||
|
|
3265
|
+
disabled: !i.value || a.value === "",
|
|
3266
3266
|
onClick: Z(u, ["prevent"])
|
|
3267
3267
|
}, {
|
|
3268
3268
|
default: D(() => [
|
|
@@ -3309,18 +3309,18 @@ const Sn = {
|
|
|
3309
3309
|
colour: { default: "default" }
|
|
3310
3310
|
},
|
|
3311
3311
|
setup(t) {
|
|
3312
|
-
const o = q([]), l = _(() => o.value.filter((
|
|
3313
|
-
function e(
|
|
3314
|
-
let w = o.value.find((h) => h.id ===
|
|
3312
|
+
const o = q([]), l = _(() => o.value.filter((s) => s.open === !0).length > 0);
|
|
3313
|
+
function e(s) {
|
|
3314
|
+
let w = o.value.find((h) => h.id === s);
|
|
3315
3315
|
return w || (w = {
|
|
3316
|
-
id:
|
|
3316
|
+
id: s,
|
|
3317
3317
|
open: !1
|
|
3318
3318
|
}, o.value.push(w)), w.open;
|
|
3319
3319
|
}
|
|
3320
|
-
function s
|
|
3321
|
-
const w = o.value.find((h) => h.id ===
|
|
3320
|
+
function a(s) {
|
|
3321
|
+
const w = o.value.find((h) => h.id === s);
|
|
3322
3322
|
w && (w.open = !w.open, o.value.forEach((h) => {
|
|
3323
|
-
h.id !==
|
|
3323
|
+
h.id !== s && (h.open = !1);
|
|
3324
3324
|
}));
|
|
3325
3325
|
}
|
|
3326
3326
|
const n = rl();
|
|
@@ -3339,11 +3339,11 @@ const Sn = {
|
|
|
3339
3339
|
}
|
|
3340
3340
|
const m = q();
|
|
3341
3341
|
function b() {
|
|
3342
|
-
i.value === !1 && l.value === !0 && o.value.forEach((
|
|
3343
|
-
|
|
3342
|
+
i.value === !1 && l.value === !0 && o.value.forEach((s) => {
|
|
3343
|
+
s.open = !1;
|
|
3344
3344
|
});
|
|
3345
3345
|
}
|
|
3346
|
-
return ze(m, b), (
|
|
3346
|
+
return ze(m, b), (s, w) => (c(), y("div", {
|
|
3347
3347
|
ref_key: "navElement",
|
|
3348
3348
|
ref: m,
|
|
3349
3349
|
class: "cl-flex cl-flex-nowrap cl-relative"
|
|
@@ -3351,11 +3351,11 @@ const Sn = {
|
|
|
3351
3351
|
f("div", {
|
|
3352
3352
|
id: "group-container",
|
|
3353
3353
|
class: j(["cl-h-full cl-overflow-y-auto cl-overscroll-y-none cl-pb-20 cl-w-20 cl-z-30 xl:cl-pb-0", {
|
|
3354
|
-
"cl-bg-primary-default":
|
|
3355
|
-
"cl-bg-blue-dark":
|
|
3354
|
+
"cl-bg-primary-default": s.colour === "default",
|
|
3355
|
+
"cl-bg-blue-dark": s.colour === "secondary"
|
|
3356
3356
|
}])
|
|
3357
3357
|
}, [
|
|
3358
|
-
N(
|
|
3358
|
+
N(s.$slots, "icon", re({ navcolour: s.colour }, { groupIsOpen: e, toggleOpen: a }), void 0, !0)
|
|
3359
3359
|
], 2),
|
|
3360
3360
|
u.value ? (c(), y("div", Zn)) : A("", !0),
|
|
3361
3361
|
k(me, { name: "slide-right" }, {
|
|
@@ -3379,7 +3379,7 @@ const Sn = {
|
|
|
3379
3379
|
icon: "ph:push-pin"
|
|
3380
3380
|
}))
|
|
3381
3381
|
]),
|
|
3382
|
-
N(
|
|
3382
|
+
N(s.$slots, "default", oe(ce({ groupIsOpen: e })), void 0, !0)
|
|
3383
3383
|
])
|
|
3384
3384
|
], 2), [
|
|
3385
3385
|
[V, l.value]
|
|
@@ -3416,7 +3416,7 @@ const Qn = /* @__PURE__ */ pe(Kn, [["__scopeId", "data-v-7db412a7"]]), Jn = /* @
|
|
|
3416
3416
|
}), Yn = {
|
|
3417
3417
|
key: 0,
|
|
3418
3418
|
class: "cl-font-bold cl-leading-8 cl-mb-8 cl-pr-8 cl-select-none cl-text-lg cl-text-secondary-default"
|
|
3419
|
-
}, Xn = { class: "cl-flex cl-flex-wrap cl-space-y-8 cl-text-sm cl-w-full" },
|
|
3419
|
+
}, Xn = { class: "cl-flex cl-flex-wrap cl-space-y-8 cl-text-sm cl-w-full" }, ea = /* @__PURE__ */ z({
|
|
3420
3420
|
__name: "cl-ui-navigation-group",
|
|
3421
3421
|
props: {
|
|
3422
3422
|
open: { type: Boolean }
|
|
@@ -3431,27 +3431,27 @@ const Qn = /* @__PURE__ */ pe(Kn, [["__scopeId", "data-v-7db412a7"]]), Jn = /* @
|
|
|
3431
3431
|
])
|
|
3432
3432
|
], 64)) : A("", !0);
|
|
3433
3433
|
}
|
|
3434
|
-
}),
|
|
3434
|
+
}), la = {}, ta = { class: "cl-w-full" }, oa = {
|
|
3435
3435
|
key: 0,
|
|
3436
3436
|
class: "cl-font-bold cl-mb-4 cl-select-none"
|
|
3437
|
-
},
|
|
3438
|
-
function
|
|
3439
|
-
return c(), y("div",
|
|
3440
|
-
t.$slots.title ? (c(), y("div",
|
|
3437
|
+
}, na = { class: "cl-flex cl-flex-wrap cl-space-y-2" };
|
|
3438
|
+
function aa(t, o) {
|
|
3439
|
+
return c(), y("div", ta, [
|
|
3440
|
+
t.$slots.title ? (c(), y("div", oa, [
|
|
3441
3441
|
N(t.$slots, "title")
|
|
3442
3442
|
])) : A("", !0),
|
|
3443
|
-
f("span",
|
|
3443
|
+
f("span", na, [
|
|
3444
3444
|
N(t.$slots, "default")
|
|
3445
3445
|
])
|
|
3446
3446
|
]);
|
|
3447
3447
|
}
|
|
3448
|
-
const
|
|
3449
|
-
function
|
|
3450
|
-
return c(), y("div",
|
|
3448
|
+
const sa = /* @__PURE__ */ pe(la, [["render", aa]]), ra = {}, ca = { class: "cl-cursor-pointer cl-transition-colors cl-w-full hover:cl-text-blue-light" };
|
|
3449
|
+
function ia(t, o) {
|
|
3450
|
+
return c(), y("div", ca, [
|
|
3451
3451
|
N(t.$slots, "default")
|
|
3452
3452
|
]);
|
|
3453
3453
|
}
|
|
3454
|
-
const
|
|
3454
|
+
const ua = /* @__PURE__ */ pe(ra, [["render", ia]]), da = { class: "cl-w-full" }, pa = /* @__PURE__ */ z({
|
|
3455
3455
|
__name: "cl-ui-tab",
|
|
3456
3456
|
props: {
|
|
3457
3457
|
currentTab: { default: 0 },
|
|
@@ -3459,16 +3459,16 @@ const us = /* @__PURE__ */ pe(rs, [["render", is]]), ds = { class: "cl-w-full" }
|
|
|
3459
3459
|
colour: { default: "default" }
|
|
3460
3460
|
},
|
|
3461
3461
|
setup(t) {
|
|
3462
|
-
const o = t, l = q(), e = q(!1),
|
|
3462
|
+
const o = t, l = q(), e = q(!1), a = q(!1);
|
|
3463
3463
|
function n(d) {
|
|
3464
3464
|
return d === o.currentTab;
|
|
3465
3465
|
}
|
|
3466
3466
|
function i() {
|
|
3467
3467
|
if (l.value) {
|
|
3468
3468
|
const d = l.value.scrollWidth - l.value.clientWidth;
|
|
3469
|
-
e.value = l.value.scrollLeft > 0,
|
|
3469
|
+
e.value = l.value.scrollLeft > 0, a.value = l.value.scrollLeft < d;
|
|
3470
3470
|
} else
|
|
3471
|
-
e.value = !1,
|
|
3471
|
+
e.value = !1, a.value = !1;
|
|
3472
3472
|
}
|
|
3473
3473
|
function u() {
|
|
3474
3474
|
i(), window.addEventListener("resize", i);
|
|
@@ -3480,7 +3480,7 @@ const us = /* @__PURE__ */ pe(rs, [["render", is]]), ds = { class: "cl-w-full" }
|
|
|
3480
3480
|
d === "left" && (b = -m), l.value.scroll(l.value.scrollLeft + b, 0);
|
|
3481
3481
|
}
|
|
3482
3482
|
}
|
|
3483
|
-
return Ae(() => u()), Ie(() => window.removeEventListener("resize", i)), (d, m) => (c(), y("div",
|
|
3483
|
+
return Ae(() => u()), Ie(() => window.removeEventListener("resize", i)), (d, m) => (c(), y("div", da, [
|
|
3484
3484
|
f("div", null, [
|
|
3485
3485
|
e.value ? (c(), y("div", {
|
|
3486
3486
|
key: 0,
|
|
@@ -3502,13 +3502,13 @@ const us = /* @__PURE__ */ pe(rs, [["render", is]]), ds = { class: "cl-w-full" }
|
|
|
3502
3502
|
"cl-shadow-[inset_0_-1px_0_#f0506e]": !d.disabled && d.colour === "danger",
|
|
3503
3503
|
"cl-shadow-[inset_0_-1px_0_#1e90ff]": !d.disabled && d.colour === "blue",
|
|
3504
3504
|
"cl-shadow-[inset_0_-1px_0_#d7d7d7]": d.disabled,
|
|
3505
|
-
"cl-mr-4":
|
|
3505
|
+
"cl-mr-4": a.value
|
|
3506
3506
|
}]),
|
|
3507
3507
|
onScrollPassive: i
|
|
3508
3508
|
}, [
|
|
3509
3509
|
N(d.$slots, "headings", oe(ce({ isTabOpen: n, disabled: d.disabled, colour: d.colour })))
|
|
3510
3510
|
], 34),
|
|
3511
|
-
|
|
3511
|
+
a.value ? (c(), y("div", {
|
|
3512
3512
|
key: 1,
|
|
3513
3513
|
class: "cl-bg-white cl-bottom-12 cl-cursor-pointer cl-float-right cl-h-11 cl-relative cl-w-4",
|
|
3514
3514
|
onClick: m[1] || (m[1] = (b) => r("right"))
|
|
@@ -3522,7 +3522,7 @@ const us = /* @__PURE__ */ pe(rs, [["render", is]]), ds = { class: "cl-w-full" }
|
|
|
3522
3522
|
N(d.$slots, "content", oe(ce({ isTabOpen: n, disabled: d.disabled, colour: d.colour })))
|
|
3523
3523
|
]));
|
|
3524
3524
|
}
|
|
3525
|
-
}),
|
|
3525
|
+
}), fa = ["onKeyup"], ma = /* @__PURE__ */ z({
|
|
3526
3526
|
__name: "cl-ui-tab-header",
|
|
3527
3527
|
props: {
|
|
3528
3528
|
id: {},
|
|
@@ -3534,9 +3534,9 @@ const us = /* @__PURE__ */ pe(rs, [["render", is]]), ds = { class: "cl-w-full" }
|
|
|
3534
3534
|
"update:currentTab": null
|
|
3535
3535
|
},
|
|
3536
3536
|
setup(t, { emit: o }) {
|
|
3537
|
-
const l = t, e = q(),
|
|
3537
|
+
const l = t, e = q(), a = q(), n = _(() => l.id === l.currentTab);
|
|
3538
3538
|
function i() {
|
|
3539
|
-
l.disabled || (e.value = !1,
|
|
3539
|
+
l.disabled || (e.value = !1, a.value = !1, o("update:currentTab", l.id));
|
|
3540
3540
|
}
|
|
3541
3541
|
return (u, r) => (c(), y("div", {
|
|
3542
3542
|
class: j(["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", {
|
|
@@ -3560,29 +3560,29 @@ const us = /* @__PURE__ */ pe(rs, [["render", is]]), ds = { class: "cl-w-full" }
|
|
|
3560
3560
|
}]),
|
|
3561
3561
|
tabindex: "0",
|
|
3562
3562
|
onClick: i,
|
|
3563
|
-
onMouseover: r[0] || (r[0] = (d) =>
|
|
3564
|
-
onMouseout: r[1] || (r[1] = (d) =>
|
|
3563
|
+
onMouseover: r[0] || (r[0] = (d) => a.value = !0),
|
|
3564
|
+
onMouseout: r[1] || (r[1] = (d) => a.value = !1),
|
|
3565
3565
|
onFocusin: r[2] || (r[2] = (d) => e.value = !0),
|
|
3566
3566
|
onFocusout: r[3] || (r[3] = (d) => e.value = !1),
|
|
3567
3567
|
onKeyup: $e(Z(i, ["self"]), ["enter"])
|
|
3568
3568
|
}, [
|
|
3569
3569
|
N(u.$slots, "default")
|
|
3570
|
-
], 42,
|
|
3570
|
+
], 42, fa));
|
|
3571
3571
|
}
|
|
3572
|
-
}),
|
|
3573
|
-
function
|
|
3572
|
+
}), ga = {};
|
|
3573
|
+
function va(t, o) {
|
|
3574
3574
|
return N(t.$slots, "default");
|
|
3575
3575
|
}
|
|
3576
|
-
const
|
|
3576
|
+
const ba = /* @__PURE__ */ pe(ga, [["render", va]]), ha = [
|
|
3577
3577
|
"default",
|
|
3578
3578
|
"primary",
|
|
3579
3579
|
"secondary",
|
|
3580
3580
|
"danger",
|
|
3581
3581
|
"blue"
|
|
3582
|
-
],
|
|
3582
|
+
], ya = [
|
|
3583
3583
|
"left",
|
|
3584
3584
|
"right"
|
|
3585
|
-
],
|
|
3585
|
+
], wa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3586
3586
|
__proto__: null,
|
|
3587
3587
|
FilterOperation: ee,
|
|
3588
3588
|
buttonColours: Al,
|
|
@@ -3599,20 +3599,20 @@ const bs = /* @__PURE__ */ pe(gs, [["render", vs]]), hs = [
|
|
|
3599
3599
|
clUiGrid: bn,
|
|
3600
3600
|
clUiHeader: yn,
|
|
3601
3601
|
clUiHeaderMenu: On,
|
|
3602
|
-
clUiInput:
|
|
3602
|
+
clUiInput: se,
|
|
3603
3603
|
clUiLanguageSwitcher: In,
|
|
3604
3604
|
clUiLoadingSpinner: Se,
|
|
3605
3605
|
clUiLogin: Hn,
|
|
3606
3606
|
clUiModal: Ye,
|
|
3607
3607
|
clUiNavigation: Qn,
|
|
3608
|
-
clUiNavigationGroup:
|
|
3608
|
+
clUiNavigationGroup: ea,
|
|
3609
3609
|
clUiNavigationIcon: Jn,
|
|
3610
|
-
clUiNavigationItem:
|
|
3611
|
-
clUiNavigationSection:
|
|
3610
|
+
clUiNavigationItem: ua,
|
|
3611
|
+
clUiNavigationSection: sa,
|
|
3612
3612
|
clUiNotification: Je,
|
|
3613
|
-
clUiTab:
|
|
3614
|
-
clUiTabContent:
|
|
3615
|
-
clUiTabHeader:
|
|
3613
|
+
clUiTab: pa,
|
|
3614
|
+
clUiTabContent: ba,
|
|
3615
|
+
clUiTabHeader: ma,
|
|
3616
3616
|
filterMethodTypes: qo,
|
|
3617
3617
|
gridColumnTypes: To,
|
|
3618
3618
|
inputTypes: Gl,
|
|
@@ -3627,11 +3627,11 @@ const bs = /* @__PURE__ */ pe(gs, [["render", vs]]), hs = [
|
|
|
3627
3627
|
modalColours: Gn,
|
|
3628
3628
|
modalSizes: xn,
|
|
3629
3629
|
stringFormats: Oo,
|
|
3630
|
-
tabColours:
|
|
3631
|
-
tabScroll:
|
|
3630
|
+
tabColours: ha,
|
|
3631
|
+
tabScroll: ya
|
|
3632
3632
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3633
|
-
const
|
|
3634
|
-
t.use(Q), t.component("Icon", I), Object.entries(
|
|
3633
|
+
const Ra = (t) => {
|
|
3634
|
+
t.use(Q), t.component("Icon", I), Object.entries(wa).forEach(([
|
|
3635
3635
|
o,
|
|
3636
3636
|
l
|
|
3637
3637
|
]) => {
|
|
@@ -3639,7 +3639,7 @@ const Rs = (t) => {
|
|
|
3639
3639
|
});
|
|
3640
3640
|
};
|
|
3641
3641
|
export {
|
|
3642
|
-
|
|
3642
|
+
Ia as CitrusLimeUI,
|
|
3643
3643
|
x as DateFormat,
|
|
3644
3644
|
ee as FilterOperation,
|
|
3645
3645
|
K as NumberFormat,
|
|
@@ -3657,22 +3657,22 @@ export {
|
|
|
3657
3657
|
bn as clUiGrid,
|
|
3658
3658
|
yn as clUiHeader,
|
|
3659
3659
|
On as clUiHeaderMenu,
|
|
3660
|
-
|
|
3660
|
+
se as clUiInput,
|
|
3661
3661
|
In as clUiLanguageSwitcher,
|
|
3662
3662
|
Se as clUiLoadingSpinner,
|
|
3663
3663
|
Hn as clUiLogin,
|
|
3664
3664
|
Ye as clUiModal,
|
|
3665
3665
|
Qn as clUiNavigation,
|
|
3666
|
-
|
|
3666
|
+
ea as clUiNavigationGroup,
|
|
3667
3667
|
Jn as clUiNavigationIcon,
|
|
3668
|
-
|
|
3669
|
-
|
|
3668
|
+
ua as clUiNavigationItem,
|
|
3669
|
+
sa as clUiNavigationSection,
|
|
3670
3670
|
Je as clUiNotification,
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3671
|
+
pa as clUiTab,
|
|
3672
|
+
ba as clUiTabContent,
|
|
3673
|
+
ma as clUiTabHeader,
|
|
3674
3674
|
zl as datetimeFormats,
|
|
3675
|
-
|
|
3675
|
+
Ra as default,
|
|
3676
3676
|
qo as filterMethodTypes,
|
|
3677
3677
|
To as gridColumnTypes,
|
|
3678
3678
|
Q as i18n,
|
|
@@ -3689,14 +3689,14 @@ export {
|
|
|
3689
3689
|
Gn as modalColours,
|
|
3690
3690
|
xn as modalSizes,
|
|
3691
3691
|
Rl as numberFormats,
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3692
|
+
_a as setCurrentLocale,
|
|
3693
|
+
ja as setLocaleDateTimeFormats,
|
|
3694
|
+
Sa as setLocaleMessages,
|
|
3695
|
+
Na as setLocaleNumberFormats,
|
|
3696
3696
|
De as showNotification,
|
|
3697
3697
|
Oo as stringFormats,
|
|
3698
|
-
|
|
3699
|
-
|
|
3698
|
+
ha as tabColours,
|
|
3699
|
+
ya as tabScroll,
|
|
3700
3700
|
Dl as validateEmail,
|
|
3701
3701
|
Bl as validateMaxValue,
|
|
3702
3702
|
Ul as validateMinValue
|