@citruslime/ui 2.0.2-beta.6 → 2.0.2-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Icon as ol } from "@iconify/vue";
|
|
2
|
-
import { defineComponent as H, ref as M, openBlock as
|
|
2
|
+
import { defineComponent as H, ref as M, openBlock as i, createElementBlock as u, renderSlot as R, normalizeProps as ie, guardReactiveProps as pe, resolveComponent as _, Fragment as z, createElementVNode as r, normalizeClass as U, createVNode as T, Transition as $e, withCtx as Q, withDirectives as L, vShow as V, createBlock as K, Teleport as Pe, renderList as ce, unref as o, mergeProps as de, toDisplayString as $, createCommentVNode as N, nextTick as ke, computed as A, watch as ee, onMounted as Oe, onUnmounted as Ie, isRef as ge, normalizeStyle as Ce, vModelText as cl, withModifiers as ae, vModelDynamic as al, withKeys as Se, createTextVNode as Y, watchEffect as il, createSlots as sl } from "vue";
|
|
3
3
|
import { generateStringId as rl } from "@citruslime/utils";
|
|
4
|
-
import { createI18n as ul, useI18n as
|
|
4
|
+
import { createI18n as ul, useI18n as se } from "vue-i18n";
|
|
5
5
|
import Fe from "flatpickr";
|
|
6
|
-
import { useDebouncer as Ve, copy as
|
|
6
|
+
import { useDebouncer as Ve, copy as be } from "@citruslime/vue-utils";
|
|
7
7
|
const dl = { class: "cl-overflow-hidden" }, fl = /* @__PURE__ */ H({
|
|
8
8
|
__name: "cl-ui-accordion",
|
|
9
9
|
props: {
|
|
@@ -12,20 +12,20 @@ const dl = { class: "cl-overflow-hidden" }, fl = /* @__PURE__ */ H({
|
|
|
12
12
|
setup(e) {
|
|
13
13
|
const n = e, t = M([]);
|
|
14
14
|
function l(d) {
|
|
15
|
-
let
|
|
16
|
-
return
|
|
15
|
+
let s = t.value.find((m) => m.id === d);
|
|
16
|
+
return s || (s = {
|
|
17
17
|
id: d,
|
|
18
18
|
open: !1
|
|
19
|
-
}, t.value.push(
|
|
19
|
+
}, t.value.push(s)), s.open;
|
|
20
20
|
}
|
|
21
21
|
function c(d) {
|
|
22
|
-
const
|
|
23
|
-
|
|
22
|
+
const s = t.value.find((m) => m.id === d);
|
|
23
|
+
s && (n.exclusive && t.value.forEach((m) => {
|
|
24
24
|
m.id !== d && (m.open = !1);
|
|
25
|
-
}),
|
|
25
|
+
}), s.open = !s.open);
|
|
26
26
|
}
|
|
27
|
-
return (d,
|
|
28
|
-
R(d.$slots, "default",
|
|
27
|
+
return (d, s) => (i(), u("div", dl, [
|
|
28
|
+
R(d.$slots, "default", ie(pe({ isItemOpen: l, toggleItem: c })))
|
|
29
29
|
]));
|
|
30
30
|
}
|
|
31
31
|
}), ml = { class: "cl-absolute cl-left-5 cl-top-5" }, gl = { class: "cl-font-semibold cl-ml-10 cl-p-4 cl-select-none cl-text-grey-5" }, bl = { class: "cl-overflow-hidden" }, hl = { class: "cl-ml-10 cl-p-4" }, vl = /* @__PURE__ */ H({
|
|
@@ -43,8 +43,8 @@ const dl = { class: "cl-overflow-hidden" }, fl = /* @__PURE__ */ H({
|
|
|
43
43
|
t.disabled || n("toggle");
|
|
44
44
|
}
|
|
45
45
|
return (c, d) => {
|
|
46
|
-
const
|
|
47
|
-
return
|
|
46
|
+
const s = _("icon");
|
|
47
|
+
return i(), u(z, null, [
|
|
48
48
|
r("div", {
|
|
49
49
|
class: U(["cl-border-b cl-border-grey-1 cl-relative", {
|
|
50
50
|
"cl-bg-grey-0": e.disabled,
|
|
@@ -53,7 +53,7 @@ const dl = { class: "cl-overflow-hidden" }, fl = /* @__PURE__ */ H({
|
|
|
53
53
|
onClick: l
|
|
54
54
|
}, [
|
|
55
55
|
r("div", ml, [
|
|
56
|
-
T(
|
|
56
|
+
T(s, {
|
|
57
57
|
class: U(["cl-duration-300 cl-ease-in-out cl-text-grey-3 cl-transform-gpu cl-transition-transform", {
|
|
58
58
|
"cl-rotate-180": e.open
|
|
59
59
|
}]),
|
|
@@ -80,18 +80,18 @@ const dl = { class: "cl-overflow-hidden" }, fl = /* @__PURE__ */ H({
|
|
|
80
80
|
], 64);
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
}),
|
|
83
|
+
}), he = (e, n) => {
|
|
84
84
|
const t = e.__vccOpts || e;
|
|
85
85
|
for (const [l, c] of n)
|
|
86
86
|
t[l] = c;
|
|
87
87
|
return t;
|
|
88
88
|
}, pl = {}, yl = { 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 wl(e, n) {
|
|
90
|
-
return
|
|
90
|
+
return i(), u("div", yl, [
|
|
91
91
|
R(e.$slots, "default")
|
|
92
92
|
]);
|
|
93
93
|
}
|
|
94
|
-
const xl = /* @__PURE__ */
|
|
94
|
+
const xl = /* @__PURE__ */ he(pl, [["render", wl]]), Me = M([]);
|
|
95
95
|
function He(e) {
|
|
96
96
|
const n = {
|
|
97
97
|
id: rl(),
|
|
@@ -114,7 +114,7 @@ const $l = ["onClick"], kl = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
114
114
|
setup(e) {
|
|
115
115
|
return (n, t) => {
|
|
116
116
|
const l = _("icon");
|
|
117
|
-
return
|
|
117
|
+
return i(), K(Pe, { to: e.container }, [
|
|
118
118
|
r("div", {
|
|
119
119
|
class: U(["cl-fixed cl-w-80 cl-z-40", {
|
|
120
120
|
"cl-top-5 cl-left-5": e.position === "top-left",
|
|
@@ -125,7 +125,7 @@ const $l = ["onClick"], kl = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
125
125
|
"cl-bottom-5 cl-right-5": e.position === "bottom-right"
|
|
126
126
|
}])
|
|
127
127
|
}, [
|
|
128
|
-
(
|
|
128
|
+
(i(!0), u(z, null, ce(o(Me), (c, d) => (i(), u("div", de(n.$attrs, {
|
|
129
129
|
key: d,
|
|
130
130
|
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", {
|
|
131
131
|
"cl-bg-white": c.colour === "default",
|
|
@@ -134,7 +134,7 @@ const $l = ["onClick"], kl = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
134
134
|
"cl-bg-danger-default": c.colour === "danger",
|
|
135
135
|
"cl-bg-warning-default": c.colour === "warning"
|
|
136
136
|
}],
|
|
137
|
-
onClick: (
|
|
137
|
+
onClick: (s) => o(_e)(c)
|
|
138
138
|
}), [
|
|
139
139
|
r("span", kl, $(c.message), 1),
|
|
140
140
|
T(l, {
|
|
@@ -154,7 +154,7 @@ const $l = ["onClick"], kl = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
154
154
|
removePadding: { type: Boolean, default: !1 }
|
|
155
155
|
},
|
|
156
156
|
setup(e) {
|
|
157
|
-
return (n, t) => (
|
|
157
|
+
return (n, t) => (i(), u(z, null, [
|
|
158
158
|
T(el),
|
|
159
159
|
r("div", Cl, [
|
|
160
160
|
R(n.$slots, "header"),
|
|
@@ -176,11 +176,11 @@ const $l = ["onClick"], kl = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
176
176
|
], 64));
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
|
-
const
|
|
179
|
+
const Ol = {}, El = { class: "loading-spinner" };
|
|
180
180
|
function jl(e, n) {
|
|
181
|
-
return
|
|
181
|
+
return i(), u("div", El);
|
|
182
182
|
}
|
|
183
|
-
const ll = /* @__PURE__ */
|
|
183
|
+
const ll = /* @__PURE__ */ he(Ol, [["render", jl], ["__scopeId", "data-v-a21dc5d2"]]), Al = ["disabled"], Ml = {
|
|
184
184
|
inheritAttrs: !1
|
|
185
185
|
}, xe = /* @__PURE__ */ H({
|
|
186
186
|
...Ml,
|
|
@@ -197,17 +197,17 @@ const ll = /* @__PURE__ */ me(El, [["render", jl], ["__scopeId", "data-v-a21dc5d
|
|
|
197
197
|
focus() {
|
|
198
198
|
t.value && t.value.focus();
|
|
199
199
|
}
|
|
200
|
-
}), (l, c) => (
|
|
200
|
+
}), (l, c) => (i(), u(z, null, [
|
|
201
201
|
L(T(ll, { class: "cl-absolute" }, null, 512), [
|
|
202
202
|
[V, e.loading]
|
|
203
203
|
]),
|
|
204
204
|
L(r("button", de(l.$attrs, {
|
|
205
205
|
ref_key: "buttonRef",
|
|
206
206
|
ref: t,
|
|
207
|
-
class: ["cl-align-middle cl-border cl-font-semibold cl-inline-block cl-
|
|
208
|
-
"cl-
|
|
209
|
-
"cl-
|
|
210
|
-
"cl-
|
|
207
|
+
class: ["cl-align-middle cl-border cl-font-semibold cl-inline-block cl-rounded cl-select-none cl-shadow cl-text-center cl-transition-colors", {
|
|
208
|
+
"cl-py-[5px] cl-px-4 cl-text-sm": e.size === "small",
|
|
209
|
+
"cl-py-[9px] cl-px-8 cl-text-sm": e.size === "medium",
|
|
210
|
+
"cl-px-10 cl-py-4": e.size === "large",
|
|
211
211
|
"cl-bg-white cl-border-grey-0 hover:cl-border-grey-2 cl-text-secondary": e.colour === "default",
|
|
212
212
|
"cl-border-primary-default cl-bg-primary-default cl-text-white hover:cl-bg-primary-light hover:cl-border-primary-light": e.colour === "primary",
|
|
213
213
|
"cl-border-secondary-default cl-bg-secondary-default cl-text-white hover:cl-bg-secondary-light hover:cl-border-secondary-light": e.colour === "secondary",
|
|
@@ -240,15 +240,15 @@ const ll = /* @__PURE__ */ me(El, [["render", jl], ["__scopeId", "data-v-a21dc5d
|
|
|
240
240
|
hover: { type: Boolean, default: !1 }
|
|
241
241
|
},
|
|
242
242
|
setup(e) {
|
|
243
|
-
return (n, t) => (
|
|
243
|
+
return (n, t) => (i(), u("div", {
|
|
244
244
|
class: U(["cl-border cl-border-transparent cl-overflow-hidden cl-relative cl-rounded-md cl-shadow-lg cl-transition-all", {
|
|
245
245
|
"cl-cursor-pointer hover:cl-shadow-xl hover:cl-border-grey-0": e.hover
|
|
246
246
|
}])
|
|
247
247
|
}, [
|
|
248
|
-
n.$slots.image ? (
|
|
248
|
+
n.$slots.image ? (i(), u("div", ql, [
|
|
249
249
|
R(n.$slots, "image")
|
|
250
250
|
])) : N("", !0),
|
|
251
|
-
n.$slots.title ? (
|
|
251
|
+
n.$slots.title ? (i(), u("div", {
|
|
252
252
|
key: 1,
|
|
253
253
|
class: U(["cl-border-grey-2 cl-font-normal", {
|
|
254
254
|
"cl-p-2 cl-text-2xl cl-leading-8": e.size === "small",
|
|
@@ -269,7 +269,7 @@ const ll = /* @__PURE__ */ me(El, [["render", jl], ["__scopeId", "data-v-a21dc5d
|
|
|
269
269
|
}, [
|
|
270
270
|
R(n.$slots, "default")
|
|
271
271
|
], 2),
|
|
272
|
-
n.$slots.footer ? (
|
|
272
|
+
n.$slots.footer ? (i(), u("div", {
|
|
273
273
|
key: 2,
|
|
274
274
|
class: U(["cl-border-grey-2 cl-border-t", {
|
|
275
275
|
"cl-p-2": e.size === "small",
|
|
@@ -443,16 +443,16 @@ const Ul = {
|
|
|
443
443
|
fallbackWarn: !1,
|
|
444
444
|
warnHtmlMessage: !1
|
|
445
445
|
});
|
|
446
|
-
function
|
|
446
|
+
function Hc(e, n) {
|
|
447
447
|
return oe.global.mergeLocaleMessage(e, n), ke();
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function Gc(e, n) {
|
|
450
450
|
return oe.global.mergeNumberFormat(e, n), ke();
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function Wc(e, n) {
|
|
453
453
|
return oe.global.mergeDateTimeFormat(e, n), ke();
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function Jc(e) {
|
|
456
456
|
return oe.global.locale.value = e, ke();
|
|
457
457
|
}
|
|
458
458
|
const { t: re } = oe.global;
|
|
@@ -460,7 +460,7 @@ function Ll(e, n, t, l) {
|
|
|
460
460
|
const c = oe.global.locale.value;
|
|
461
461
|
return l instanceof Date && (l = l.getTime()), new Promise((d) => {
|
|
462
462
|
var m;
|
|
463
|
-
let
|
|
463
|
+
let s = {
|
|
464
464
|
valid: !1,
|
|
465
465
|
message: ""
|
|
466
466
|
};
|
|
@@ -473,34 +473,34 @@ function Ll(e, n, t, l) {
|
|
|
473
473
|
case "tel":
|
|
474
474
|
case "text":
|
|
475
475
|
case "url":
|
|
476
|
-
a = ((m = l == null ? void 0 : l.length) != null ? m : 0) >= e,
|
|
476
|
+
a = ((m = l == null ? void 0 : l.length) != null ? m : 0) >= e, s = ue(a, re("input.greaterOrEqualToCharacters", { label: t, min: e.toString() }));
|
|
477
477
|
break;
|
|
478
478
|
case "number":
|
|
479
479
|
case "range":
|
|
480
|
-
a = l >= e,
|
|
480
|
+
a = l >= e, s = ue(a, re("input.greaterOrEqualToValue", { label: t, min: e.toString() }));
|
|
481
481
|
break;
|
|
482
482
|
case "date":
|
|
483
|
-
a = l >= new Date(e).getTime(),
|
|
483
|
+
a = l >= new Date(e).getTime(), s = ue(a, re("input.afterOrEqualToValue", { label: t, min: new Date(e).toLocaleDateString(c) }));
|
|
484
484
|
break;
|
|
485
485
|
case "datetime":
|
|
486
|
-
a = l >= new Date(e).getTime(),
|
|
486
|
+
a = l >= new Date(e).getTime(), s = ue(a, re("input.afterOrEqualToValue", { label: t, min: oe.global.d(new Date(e), Z.DATETIME, c != null ? c : oe.global.locale.value) }));
|
|
487
487
|
break;
|
|
488
488
|
case "time":
|
|
489
|
-
f = e.toDateFromTime(), a = l >= f,
|
|
489
|
+
f = e.toDateFromTime(), a = l >= f, s = ue(a, re("input.afterOrEqualToValue", { label: t, min: oe.global.d(new Date(f), Z.TIME, c != null ? c : oe.global.locale.value) }));
|
|
490
490
|
break;
|
|
491
491
|
default:
|
|
492
|
-
|
|
492
|
+
s.valid = !0;
|
|
493
493
|
break;
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
|
-
d(
|
|
496
|
+
d(s);
|
|
497
497
|
});
|
|
498
498
|
}
|
|
499
499
|
function Pl(e, n, t, l) {
|
|
500
500
|
const c = oe.global.locale.value;
|
|
501
501
|
return l instanceof Date && (l = l.getTime()), new Promise((d) => {
|
|
502
502
|
var m;
|
|
503
|
-
let
|
|
503
|
+
let s = {
|
|
504
504
|
valid: !1,
|
|
505
505
|
message: ""
|
|
506
506
|
};
|
|
@@ -513,27 +513,27 @@ function Pl(e, n, t, l) {
|
|
|
513
513
|
case "tel":
|
|
514
514
|
case "text":
|
|
515
515
|
case "url":
|
|
516
|
-
a = ((m = l == null ? void 0 : l.length) != null ? m : 0) <= e,
|
|
516
|
+
a = ((m = l == null ? void 0 : l.length) != null ? m : 0) <= e, s = ue(a, re("input.lessOrEqualToCharacters", { label: t, max: e.toString() }));
|
|
517
517
|
break;
|
|
518
518
|
case "number":
|
|
519
519
|
case "range":
|
|
520
|
-
a = l <= e,
|
|
520
|
+
a = l <= e, s = ue(a, re("input.lessOrEqualToValue", { label: t, max: e.toString() }));
|
|
521
521
|
break;
|
|
522
522
|
case "date":
|
|
523
|
-
a = l <= new Date(e).getTime(),
|
|
523
|
+
a = l <= new Date(e).getTime(), s = ue(a, re("input.beforeOrEqualToValue", { label: t, max: new Date(e).toLocaleDateString(c) }));
|
|
524
524
|
break;
|
|
525
525
|
case "datetime":
|
|
526
|
-
a = l <= new Date(e).getTime(),
|
|
526
|
+
a = l <= new Date(e).getTime(), s = ue(a, re("input.afterOrEqualToValue", { label: t, min: oe.global.d(new Date(e), Z.DATETIME, c != null ? c : oe.global.locale.value) }));
|
|
527
527
|
break;
|
|
528
528
|
case "time":
|
|
529
|
-
f = e.toDateFromTime(), a = l <= f,
|
|
529
|
+
f = e.toDateFromTime(), a = l <= f, s = ue(a, re("input.afterOrEqualToValue", { label: t, min: oe.global.d(new Date(f), Z.TIME, c != null ? c : oe.global.locale.value) }));
|
|
530
530
|
break;
|
|
531
531
|
default:
|
|
532
|
-
|
|
532
|
+
s.valid = !0;
|
|
533
533
|
break;
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
d(
|
|
536
|
+
d(s);
|
|
537
537
|
});
|
|
538
538
|
}
|
|
539
539
|
function Vl(e, n) {
|
|
@@ -808,8 +808,8 @@ var Ue = { exports: {} };
|
|
|
808
808
|
"d\xE9cembre"
|
|
809
809
|
]
|
|
810
810
|
},
|
|
811
|
-
ordinal: function(
|
|
812
|
-
return
|
|
811
|
+
ordinal: function(s) {
|
|
812
|
+
return s > 1 ? "" : "er";
|
|
813
813
|
},
|
|
814
814
|
rangeSeparator: " au ",
|
|
815
815
|
weekAbbreviation: "Sem",
|
|
@@ -943,8 +943,8 @@ var Be = { exports: {} };
|
|
|
943
943
|
scrollTitle: "Scroll voor volgende / vorige",
|
|
944
944
|
toggleTitle: "Klik om te wisselen",
|
|
945
945
|
time_24hr: !0,
|
|
946
|
-
ordinal: function(
|
|
947
|
-
return
|
|
946
|
+
ordinal: function(s) {
|
|
947
|
+
return s === 1 || s === 8 || s >= 20 ? "ste" : "de";
|
|
948
948
|
}
|
|
949
949
|
};
|
|
950
950
|
l.l10ns.nl = c;
|
|
@@ -1015,11 +1015,11 @@ const Jl = ["placeholder", "disabled"], Kl = { class: "cl-absolute cl-bg-white c
|
|
|
1015
1015
|
valueOutOfRange: null
|
|
1016
1016
|
},
|
|
1017
1017
|
setup(e, { expose: n, emit: t }) {
|
|
1018
|
-
const l = e, { d: c, getDateTimeFormat: d, locale:
|
|
1018
|
+
const l = e, { d: c, getDateTimeFormat: d, locale: s, t: m } = se(), a = M(null), f = M(null), p = A(() => c(Hl(), l.type)), b = A(() => d(s.value)[l.type]), k = A(() => j()), S = A(() => P()), h = A(() => me()), B = A(() => Ge(l.min, s.value)), F = A(() => Ge(l.max, s.value)), I = M(!1), G = A(() => {
|
|
1019
1019
|
var x, D;
|
|
1020
1020
|
let C = "H", J = "Y";
|
|
1021
1021
|
return ((x = b.value) == null ? void 0 : x.hour12) === !0 && (C = "h"), ((D = b.value) == null ? void 0 : D.year) === "2-digit" && (J = "y"), Gl(p.value, C, J);
|
|
1022
|
-
}),
|
|
1022
|
+
}), O = A(() => {
|
|
1023
1023
|
var J, x;
|
|
1024
1024
|
const C = {
|
|
1025
1025
|
...Fe.defaultConfig,
|
|
@@ -1027,7 +1027,7 @@ const Jl = ["placeholder", "disabled"], Kl = { class: "cl-absolute cl-bg-white c
|
|
|
1027
1027
|
dateFormat: G.value,
|
|
1028
1028
|
disableMobile: !0,
|
|
1029
1029
|
enableTime: l.type === Z.DATETIME || l.type === Z.TIME,
|
|
1030
|
-
locale: Wl(
|
|
1030
|
+
locale: Wl(s.value),
|
|
1031
1031
|
maxDate: F.value,
|
|
1032
1032
|
maxTime: h.value,
|
|
1033
1033
|
minDate: B.value,
|
|
@@ -1039,7 +1039,7 @@ const Jl = ["placeholder", "disabled"], Kl = { class: "cl-absolute cl-bg-white c
|
|
|
1039
1039
|
};
|
|
1040
1040
|
return l.date !== null && (C.defaultDate = l.date), C;
|
|
1041
1041
|
});
|
|
1042
|
-
function
|
|
1042
|
+
function E(C, J, x) {
|
|
1043
1043
|
const D = C.length > 0 ? C[0] : null;
|
|
1044
1044
|
D !== l.date && !I.value && (t("update:date", D), D === null && t("valueOutOfRange")), I.value = !1;
|
|
1045
1045
|
}
|
|
@@ -1055,10 +1055,10 @@ const Jl = ["placeholder", "disabled"], Kl = { class: "cl-absolute cl-bg-white c
|
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
1057
|
function w() {
|
|
1058
|
-
a.value === null && f.value !== null && (a.value = Fe(f.value,
|
|
1058
|
+
a.value === null && f.value !== null && (a.value = Fe(f.value, O.value), a.value.config.onChange.push(E));
|
|
1059
1059
|
}
|
|
1060
1060
|
function q() {
|
|
1061
|
-
a.value !== null && (a.value.set(
|
|
1061
|
+
a.value !== null && (a.value.set(O.value), a.value.config.onChange.push(E));
|
|
1062
1062
|
}
|
|
1063
1063
|
function X(C) {
|
|
1064
1064
|
a.value !== null && a.value.setDate(C, !0);
|
|
@@ -1091,7 +1091,7 @@ const Jl = ["placeholder", "disabled"], Kl = { class: "cl-absolute cl-bg-white c
|
|
|
1091
1091
|
let C;
|
|
1092
1092
|
return (l.type === Z.TIME || l.type === Z.DATETIME) && (C = We(l.min)), C;
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1094
|
+
function me() {
|
|
1095
1095
|
let C;
|
|
1096
1096
|
return (l.type === Z.TIME || l.type === Z.DATETIME) && (C = We(l.max)), C;
|
|
1097
1097
|
}
|
|
@@ -1099,20 +1099,20 @@ const Jl = ["placeholder", "disabled"], Kl = { class: "cl-absolute cl-bg-white c
|
|
|
1099
1099
|
C !== null && J !== null ? C.getTime() !== J.getTime() && X(C) : C === null && J !== null && le();
|
|
1100
1100
|
}, {
|
|
1101
1101
|
deep: !0
|
|
1102
|
-
}), ee(() =>
|
|
1102
|
+
}), ee(() => O.value, q, {
|
|
1103
1103
|
deep: !0
|
|
1104
1104
|
}), ee(() => l.type, () => {
|
|
1105
1105
|
g(), ke(() => w());
|
|
1106
1106
|
}, {
|
|
1107
1107
|
immediate: !1
|
|
1108
|
-
}),
|
|
1108
|
+
}), Oe(() => w()), Ie(() => g()), n({
|
|
1109
1109
|
focus() {
|
|
1110
1110
|
var C;
|
|
1111
1111
|
(C = f.value) == null || C.focus();
|
|
1112
1112
|
}
|
|
1113
1113
|
}), (C, J) => {
|
|
1114
1114
|
const x = _("icon");
|
|
1115
|
-
return
|
|
1115
|
+
return i(), u("div", de(C.$attrs, { class: "cl-relative" }), [
|
|
1116
1116
|
r("input", de({
|
|
1117
1117
|
ref_key: "element",
|
|
1118
1118
|
ref: f
|
|
@@ -1162,7 +1162,7 @@ const Jl = ["placeholder", "disabled"], Kl = { class: "cl-absolute cl-bg-white c
|
|
|
1162
1162
|
};
|
|
1163
1163
|
}
|
|
1164
1164
|
});
|
|
1165
|
-
const Ql = /* @__PURE__ */
|
|
1165
|
+
const Ql = /* @__PURE__ */ he(Zl, [["__scopeId", "data-v-d60f7772"]]), Yl = { class: "cl-flex cl-flex-wrap cl-items-center" }, Xl = { class: "cl-flex cl-flex-1 cl-flex-wrap cl-items-center cl-mb-2 cl-mt-3 cl-relative md:cl-mt-0" }, _l = { class: "cl-absolute cl-bg-grey-0 cl-leading-6 cl-ml-0 cl-px-3 cl-rounded-full cl-text-center cl-text-xs cl-top-full" }, et = {
|
|
1166
1166
|
key: 0,
|
|
1167
1167
|
class: "cl-w-full"
|
|
1168
1168
|
}, lt = ["min", "max", "step", "disabled"], tt = { class: "cl-absolute cl-bg-grey-0 cl-leading-6 cl-ml-2 cl-px-3 cl-right-0 cl-rounded-full cl-text-center cl-text-xs cl-top-full" }, nt = {
|
|
@@ -1183,7 +1183,7 @@ const Ql = /* @__PURE__ */ me(Zl, [["__scopeId", "data-v-d60f7772"]]), Yl = { cl
|
|
|
1183
1183
|
"update:value": null
|
|
1184
1184
|
},
|
|
1185
1185
|
setup(e, { expose: n, emit: t }) {
|
|
1186
|
-
const l = e, { n: c, t: d } =
|
|
1186
|
+
const l = e, { n: c, t: d } = se(), { debounce: s } = Ve(), m = M(l.value), a = M(), f = A({
|
|
1187
1187
|
get: () => l.value,
|
|
1188
1188
|
set: (h) => t("update:value", h)
|
|
1189
1189
|
}), p = A(() => l.disabled ? "rgba(153, 153, 153, 0.8)" : "#9acd32"), b = A(() => {
|
|
@@ -1202,7 +1202,7 @@ const Ql = /* @__PURE__ */ me(Zl, [["__scopeId", "data-v-d60f7772"]]), Yl = { cl
|
|
|
1202
1202
|
}
|
|
1203
1203
|
}), (h, B) => {
|
|
1204
1204
|
const F = _("cl-ui-input");
|
|
1205
|
-
return o(k) ? (
|
|
1205
|
+
return o(k) ? (i(), u("div", ie(de({ key: 0 }, h.$attrs)), [
|
|
1206
1206
|
L(r("div", { class: "cl-bg-transparent cl-relative cl-text-center cl-text-sm" }, $(o(f)), 513), [
|
|
1207
1207
|
[V, !e.showNumericInput]
|
|
1208
1208
|
]),
|
|
@@ -1216,17 +1216,17 @@ const Ql = /* @__PURE__ */ me(Zl, [["__scopeId", "data-v-d60f7772"]]), Yl = { cl
|
|
|
1216
1216
|
max: e.max,
|
|
1217
1217
|
step: e.step,
|
|
1218
1218
|
disabled: e.disabled,
|
|
1219
|
-
onInput: B[1] || (B[1] = (I) => o(
|
|
1219
|
+
onInput: B[1] || (B[1] = (I) => o(s)(S, I.target, h.$forceUpdate))
|
|
1220
1220
|
}, null, 8, ["modelValue", "min", "max", "step", "disabled"]), [
|
|
1221
1221
|
[V, e.showNumericInput]
|
|
1222
1222
|
]),
|
|
1223
1223
|
r("div", Xl, [
|
|
1224
1224
|
r("span", _l, $(o(c)(e.min, Number.isInteger(e.min) ? o(ne).INTEGER : o(ne).DECIMAL)), 1),
|
|
1225
|
-
typeof o(f) == "number" ? (
|
|
1225
|
+
typeof o(f) == "number" ? (i(), u("div", et, [
|
|
1226
1226
|
L(r("input", {
|
|
1227
1227
|
ref_key: "sliderRef",
|
|
1228
1228
|
ref: a,
|
|
1229
|
-
"onUpdate:modelValue": B[2] || (B[2] = (I) =>
|
|
1229
|
+
"onUpdate:modelValue": B[2] || (B[2] = (I) => ge(f) ? f.value = I : null),
|
|
1230
1230
|
class: "cl-align-middle cl-appearance-none cl-bg-gradient-to-r cl-border cl-border-grey-2 cl-delay-500 cl-ease-in cl-flex-1 cl-h-5 cl-mb-2 cl-outline-none cl-rounded-full cl-transition-colors cl-w-full",
|
|
1231
1231
|
style: Ce({
|
|
1232
1232
|
background: `linear-gradient(to right, ${o(p)} 0%, ${o(p)} ${o(b)}%, white ${o(b)}%, white 100%)`
|
|
@@ -1248,11 +1248,11 @@ const Ql = /* @__PURE__ */ me(Zl, [["__scopeId", "data-v-d60f7772"]]), Yl = { cl
|
|
|
1248
1248
|
r("span", tt, $(o(c)(e.max, Number.isInteger(e.max) ? o(ne).INTEGER : o(ne).DECIMAL)), 1)
|
|
1249
1249
|
])
|
|
1250
1250
|
])
|
|
1251
|
-
], 16)) : (
|
|
1251
|
+
], 16)) : (i(), u("div", nt, $(o(d)("slider.invalidProps")), 1));
|
|
1252
1252
|
};
|
|
1253
1253
|
}
|
|
1254
1254
|
});
|
|
1255
|
-
const ct = /* @__PURE__ */
|
|
1255
|
+
const ct = /* @__PURE__ */ he(ot, [["__scopeId", "data-v-47d8e44f"]]), Ne = [
|
|
1256
1256
|
"date",
|
|
1257
1257
|
"datetime",
|
|
1258
1258
|
"time"
|
|
@@ -1307,7 +1307,7 @@ function at(e) {
|
|
|
1307
1307
|
}
|
|
1308
1308
|
return n;
|
|
1309
1309
|
}
|
|
1310
|
-
const
|
|
1310
|
+
const it = { class: "cl-align-top cl-border-none cl-inline-block cl-text-left" }, st = { class: "cl-flex cl-justify-between" }, rt = { class: "cl-w-full" }, ut = {
|
|
1311
1311
|
key: 0,
|
|
1312
1312
|
class: "cl-block cl-left-auto cl-relative cl-text-danger-default"
|
|
1313
1313
|
}, dt = {
|
|
@@ -1356,16 +1356,16 @@ const st = { class: "cl-align-top cl-border-none cl-inline-block cl-text-left" }
|
|
|
1356
1356
|
validated: null
|
|
1357
1357
|
},
|
|
1358
1358
|
setup(e, { expose: n, emit: t }) {
|
|
1359
|
-
const l = e, c = M(null), d = M(!1),
|
|
1359
|
+
const l = e, c = M(null), d = M(!1), s = M(!1), m = A(C), a = A(() => l.placeholderText.trim() !== "" ? l.placeholderText : l.label), f = M(!1), { t: p } = se(), b = A({
|
|
1360
1360
|
get: () => l.modelValue,
|
|
1361
1361
|
set: (x) => v(x)
|
|
1362
1362
|
}), k = A({
|
|
1363
1363
|
get: () => l.modelValue,
|
|
1364
1364
|
set: (x) => y(x)
|
|
1365
|
-
}), S = A(() => typeof l.min == "number" ? l.min.toString() : l.min), h = A(() => typeof l.max == "number" ? l.max.toString() : l.max), B = A(() => typeof l.min == "number" ? l.min : parseFloat(l.min)), F = A(() => typeof l.max == "number" ? l.max : parseFloat(l.max)), I = A(() => l.messageWhenValid.trim() !== "" ? l.messageWhenValid : ""), G = M(!0),
|
|
1365
|
+
}), S = A(() => typeof l.min == "number" ? l.min.toString() : l.min), h = A(() => typeof l.max == "number" ? l.max.toString() : l.max), B = A(() => typeof l.min == "number" ? l.min : parseFloat(l.min)), F = A(() => typeof l.max == "number" ? l.max : parseFloat(l.max)), I = A(() => l.messageWhenValid.trim() !== "" ? l.messageWhenValid : ""), G = M(!0), O = M([]), E = A(() => {
|
|
1366
1366
|
var x, D, te, W;
|
|
1367
1367
|
return [
|
|
1368
|
-
...(D = (x =
|
|
1368
|
+
...(D = (x = O.value) == null ? void 0 : x.filter((ve) => {
|
|
1369
1369
|
var ye;
|
|
1370
1370
|
return ((ye = ve == null ? void 0 : ve.length) != null ? ye : 0) > 0;
|
|
1371
1371
|
})) != null ? D : [],
|
|
@@ -1394,9 +1394,9 @@ const st = { class: "cl-align-top cl-border-none cl-inline-block cl-text-left" }
|
|
|
1394
1394
|
})
|
|
1395
1395
|
];
|
|
1396
1396
|
(typeof x == "string" || typeof x == "number" || x instanceof Date) && (te.push(Ll(l.min, l.inputType, l.label, x)), te.push(Pl(l.max, l.inputType, l.label, x))), l.isRequired && te.push(Vl(l.label, x)), l.inputType === "email" && typeof x == "string" && te.push(Fl(l.label, x)), Promise.all(te).then((W) => {
|
|
1397
|
-
const ve = [...W.map((
|
|
1398
|
-
let ye = W.some((
|
|
1399
|
-
f.value && (ve.push(p("input.dateOutOfRange")), ye = !0), ye ? (
|
|
1397
|
+
const ve = [...W.map((Ee) => Ee.message)];
|
|
1398
|
+
let ye = W.some((Ee) => Ee.message.length > 0 && Ee.valid === !1) || l.externalErrors.length > 0;
|
|
1399
|
+
f.value && (ve.push(p("input.dateOutOfRange")), ye = !0), ye ? (O.value = ve, t("validated", !1, x)) : (O.value = [], t("validated", !0, x)), G.value = !ye, t("update:modelValue", x);
|
|
1400
1400
|
});
|
|
1401
1401
|
}
|
|
1402
1402
|
function q() {
|
|
@@ -1428,21 +1428,21 @@ const st = { class: "cl-align-top cl-border-none cl-inline-block cl-text-left" }
|
|
|
1428
1428
|
d.value = x;
|
|
1429
1429
|
}
|
|
1430
1430
|
function P() {
|
|
1431
|
-
|
|
1431
|
+
s.value = !0, j(!1);
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1433
|
+
function me(x) {
|
|
1434
1434
|
x.target.blur();
|
|
1435
1435
|
}
|
|
1436
1436
|
function C() {
|
|
1437
1437
|
var te;
|
|
1438
1438
|
let x = !0;
|
|
1439
1439
|
const D = m.value;
|
|
1440
|
-
return d.value ? x = D :
|
|
1440
|
+
return d.value ? x = D : s.value && ((te = b.value) == null ? void 0 : te.toString().trim()) === "" && (x = !1), x;
|
|
1441
1441
|
}
|
|
1442
1442
|
function J() {
|
|
1443
1443
|
f.value = !0;
|
|
1444
1444
|
}
|
|
1445
|
-
return
|
|
1445
|
+
return Oe(() => {
|
|
1446
1446
|
l.validateImmediately && v(l.modelValue);
|
|
1447
1447
|
}), ee(() => l.isRequired, () => v(l.modelValue)), ee(() => l.externalErrors, () => w(b.value)), n({
|
|
1448
1448
|
focus() {
|
|
@@ -1451,25 +1451,25 @@ const st = { class: "cl-align-top cl-border-none cl-inline-block cl-text-left" }
|
|
|
1451
1451
|
}
|
|
1452
1452
|
}), (x, D) => {
|
|
1453
1453
|
const te = _("icon");
|
|
1454
|
-
return
|
|
1454
|
+
return i(), u("div", it, [
|
|
1455
1455
|
r("div", {
|
|
1456
1456
|
onMouseenter: D[10] || (D[10] = (W) => j(!0)),
|
|
1457
1457
|
onMouseleave: D[11] || (D[11] = (W) => j(!1))
|
|
1458
1458
|
}, [
|
|
1459
|
-
r("div",
|
|
1459
|
+
r("div", st, [
|
|
1460
1460
|
r("div", rt, [
|
|
1461
1461
|
L(r("label", { class: "cl-block cl-mb-1 cl-text-gray-400 cl-text-xs cl-tracking-widest" }, $(e.label), 513), [
|
|
1462
1462
|
[V, e.showLabel && e.label !== ""]
|
|
1463
1463
|
])
|
|
1464
1464
|
]),
|
|
1465
|
-
e.isRequired && o(m) ? (
|
|
1466
|
-
e.isRequired && !o(m) ? (
|
|
1465
|
+
e.isRequired && o(m) ? (i(), u("label", ut, " * ")) : N("", !0),
|
|
1466
|
+
e.isRequired && !o(m) ? (i(), u("label", dt, $(e.requiredText), 1)) : N("", !0)
|
|
1467
1467
|
]),
|
|
1468
|
-
e.inputType !== "range" && !o(Ke)(e.inputType) ? L((
|
|
1468
|
+
e.inputType !== "range" && !o(Ke)(e.inputType) ? L((i(), u("input", de({
|
|
1469
1469
|
key: 0,
|
|
1470
1470
|
ref_key: "inputElement",
|
|
1471
1471
|
ref: c,
|
|
1472
|
-
"onUpdate:modelValue": D[0] || (D[0] = (W) =>
|
|
1472
|
+
"onUpdate:modelValue": D[0] || (D[0] = (W) => ge(b) ? b.value = W : null)
|
|
1473
1473
|
}, x.$attrs, {
|
|
1474
1474
|
class: ["cl-block cl-border cl-duration-300 cl-h-full cl-mb-1 cl-transition cl-w-full focus:cl-outline-none", {
|
|
1475
1475
|
"hover:!cl-border-grey-3": e.disabled === !1 && !o(je)(e.inputType),
|
|
@@ -1496,17 +1496,17 @@ const st = { class: "cl-align-top cl-border-none cl-inline-block cl-text-left" }
|
|
|
1496
1496
|
onClick: D[1] || (D[1] = (W) => X(W)),
|
|
1497
1497
|
onFocus: D[2] || (D[2] = (W) => t("focus")),
|
|
1498
1498
|
onBlur: ae(P, ["self"]),
|
|
1499
|
-
onMousewheelPassive:
|
|
1499
|
+
onMousewheelPassive: me,
|
|
1500
1500
|
onInput: D[3] || (D[3] = (W) => {
|
|
1501
1501
|
t("input", W), x.$forceUpdate();
|
|
1502
1502
|
})
|
|
1503
1503
|
}), null, 16, ft)), [
|
|
1504
1504
|
[al, o(b)]
|
|
1505
|
-
]) : o(Ke)(e.inputType) ? (
|
|
1505
|
+
]) : o(Ke)(e.inputType) ? (i(), K(Ql, de({ key: 1 }, x.$attrs, {
|
|
1506
1506
|
ref_key: "inputElement",
|
|
1507
1507
|
ref: c,
|
|
1508
1508
|
date: o(k),
|
|
1509
|
-
"onUpdate:date": D[4] || (D[4] = (W) =>
|
|
1509
|
+
"onUpdate:date": D[4] || (D[4] = (W) => ge(k) ? k.value = W : null),
|
|
1510
1510
|
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", {
|
|
1511
1511
|
"hover:cl-border-grey-3": !e.disabled,
|
|
1512
1512
|
"!cl-border-danger-default": !G.value,
|
|
@@ -1522,12 +1522,12 @@ const st = { class: "cl-align-top cl-border-none cl-inline-block cl-text-left" }
|
|
|
1522
1522
|
onBlur: ae(P, ["self"]),
|
|
1523
1523
|
onValueOutOfRange: J,
|
|
1524
1524
|
onFocus: D[5] || (D[5] = (W) => t("focus"))
|
|
1525
|
-
}), null, 16, ["date", "class", "disabled", "type", "min", "max", "date-placeholder", "date-time-placeholder", "time-placeholder", "onBlur"])) : e.inputType === "range" && typeof o(b) == "number" ? (
|
|
1525
|
+
}), null, 16, ["date", "class", "disabled", "type", "min", "max", "date-placeholder", "date-time-placeholder", "time-placeholder", "onBlur"])) : e.inputType === "range" && typeof o(b) == "number" ? (i(), u("div", mt, [
|
|
1526
1526
|
T(ct, {
|
|
1527
1527
|
ref_key: "inputElement",
|
|
1528
1528
|
ref: c,
|
|
1529
1529
|
value: o(b),
|
|
1530
|
-
"onUpdate:value": D[6] || (D[6] = (W) =>
|
|
1530
|
+
"onUpdate:value": D[6] || (D[6] = (W) => ge(b) ? b.value = W : null),
|
|
1531
1531
|
min: o(B),
|
|
1532
1532
|
max: o(F),
|
|
1533
1533
|
step: e.step,
|
|
@@ -1538,7 +1538,7 @@ const st = { class: "cl-align-top cl-border-none cl-inline-block cl-text-left" }
|
|
|
1538
1538
|
}, null, 8, ["value", "min", "max", "step", "disabled", "onBlur"])
|
|
1539
1539
|
])) : N("", !0),
|
|
1540
1540
|
r("div", gt, [
|
|
1541
|
-
e.inputType === "number" && !e.disabled && e.showArrows ? (
|
|
1541
|
+
e.inputType === "number" && !e.disabled && e.showArrows ? (i(), u("div", {
|
|
1542
1542
|
key: 0,
|
|
1543
1543
|
class: U(["cl-absolute cl-duration-300 cl-right-1 cl-transition", {
|
|
1544
1544
|
"cl-opacity-0": !d.value
|
|
@@ -1553,7 +1553,7 @@ const st = { class: "cl-align-top cl-border-none cl-inline-block cl-text-left" }
|
|
|
1553
1553
|
}, ["prevent"]))
|
|
1554
1554
|
})
|
|
1555
1555
|
], 2)) : N("", !0),
|
|
1556
|
-
e.inputType === "number" && !e.disabled && e.showArrows ? (
|
|
1556
|
+
e.inputType === "number" && !e.disabled && e.showArrows ? (i(), u("div", {
|
|
1557
1557
|
key: 1,
|
|
1558
1558
|
class: U(["cl-absolute cl-bottom-2 cl-duration-300 cl-right-1 cl-transition", {
|
|
1559
1559
|
"cl-opacity-0": !d.value
|
|
@@ -1569,13 +1569,13 @@ const st = { class: "cl-align-top cl-border-none cl-inline-block cl-text-left" }
|
|
|
1569
1569
|
], 2)) : N("", !0)
|
|
1570
1570
|
])
|
|
1571
1571
|
], 32),
|
|
1572
|
-
G.value && o(I) ? (
|
|
1573
|
-
!G.value && o(
|
|
1572
|
+
G.value && o(I) ? (i(), u("div", bt, $(o(I)), 1)) : N("", !0),
|
|
1573
|
+
!G.value && o(E).length > 0 ? (i(), u("div", ht, $(o(E)), 1)) : N("", !0)
|
|
1574
1574
|
]);
|
|
1575
1575
|
};
|
|
1576
1576
|
}
|
|
1577
1577
|
});
|
|
1578
|
-
const fe = /* @__PURE__ */
|
|
1578
|
+
const fe = /* @__PURE__ */ he(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { 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" }, yt = ["onKeypress"], wt = { class: "cl-overflow-y-auto cl-p-2 cl-w-full" }, xt = {
|
|
1579
1579
|
inheritAttrs: !1
|
|
1580
1580
|
}, tl = /* @__PURE__ */ H({
|
|
1581
1581
|
...xt,
|
|
@@ -1593,18 +1593,18 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
1593
1593
|
function c() {
|
|
1594
1594
|
n.preventClose || (t.value = !1, document.removeEventListener("keydown", d));
|
|
1595
1595
|
}
|
|
1596
|
-
function d(
|
|
1597
|
-
|
|
1596
|
+
function d(s) {
|
|
1597
|
+
s.key === "Escape" && c();
|
|
1598
1598
|
}
|
|
1599
|
-
return (
|
|
1599
|
+
return (s, m) => {
|
|
1600
1600
|
const a = _("icon");
|
|
1601
|
-
return
|
|
1602
|
-
R(
|
|
1603
|
-
(
|
|
1601
|
+
return i(), u(z, null, [
|
|
1602
|
+
R(s.$slots, "trigger", ie(pe({ open: l }))),
|
|
1603
|
+
(i(), K(Pe, { to: "body" }, [
|
|
1604
1604
|
T($e, { name: "fade" }, {
|
|
1605
1605
|
default: Q(() => [
|
|
1606
1606
|
L(r("div", pt, [
|
|
1607
|
-
r("div", de(
|
|
1607
|
+
r("div", de(s.$attrs, {
|
|
1608
1608
|
class: ["cl-bg-white cl-flex cl-flex-wrap cl-mx-0 cl-my-auto cl-overflow-y-auto cl-relative cl-rounded-lg cl-shadow-lg", {
|
|
1609
1609
|
"lg:cl-w-2/12 cl-w-10/12": e.size === "x-small",
|
|
1610
1610
|
"cl-w-6/12": e.size === "small",
|
|
@@ -1632,12 +1632,12 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
1632
1632
|
"cl-bg-primary-default cl-text-white": e.headerColour === "primary"
|
|
1633
1633
|
}])
|
|
1634
1634
|
}, [
|
|
1635
|
-
R(
|
|
1635
|
+
R(s.$slots, "title")
|
|
1636
1636
|
], 2),
|
|
1637
1637
|
r("div", wt, [
|
|
1638
|
-
R(
|
|
1638
|
+
R(s.$slots, "default", ie(pe({ close: c })))
|
|
1639
1639
|
]),
|
|
1640
|
-
R(
|
|
1640
|
+
R(s.$slots, "footer", ie(pe({ close: c })))
|
|
1641
1641
|
], 16)
|
|
1642
1642
|
], 512), [
|
|
1643
1643
|
[V, t.value]
|
|
@@ -1665,8 +1665,8 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
1665
1665
|
setup(e) {
|
|
1666
1666
|
return (n, t) => {
|
|
1667
1667
|
const l = _("icon");
|
|
1668
|
-
return
|
|
1669
|
-
e.additionalText !== "" ? (
|
|
1668
|
+
return i(), u("div", $t, [
|
|
1669
|
+
e.additionalText !== "" ? (i(), u("div", kt, $(e.additionalText), 1)) : N("", !0),
|
|
1670
1670
|
r("div", {
|
|
1671
1671
|
class: U({
|
|
1672
1672
|
"cl-w-1/2": e.additionalText !== "",
|
|
@@ -1712,7 +1712,7 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
1712
1712
|
var f, p;
|
|
1713
1713
|
return (p = (f = t.option) == null ? void 0 : f.parentName) != null ? p : "";
|
|
1714
1714
|
}), d = M(!1);
|
|
1715
|
-
function
|
|
1715
|
+
function s() {
|
|
1716
1716
|
var f;
|
|
1717
1717
|
t.isCreateNewOption === !0 ? n("create-object") : n("select-object", (f = t.option) == null ? void 0 : f.id);
|
|
1718
1718
|
}
|
|
@@ -1725,17 +1725,17 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
1725
1725
|
return ee(() => t.selectedIndex, () => a()), (f, p) => {
|
|
1726
1726
|
var k, S;
|
|
1727
1727
|
const b = _("icon");
|
|
1728
|
-
return
|
|
1728
|
+
return i(), u("div", {
|
|
1729
1729
|
class: U(["cl-cursor-pointer cl-duration-75 cl-flex cl-p-1 cl-transition-colors", {
|
|
1730
1730
|
"cl-bg-white": d.value === !1,
|
|
1731
1731
|
"cl-bg-link-light cl-text-white cl-opacity-90": d.value && e.isCreateNewOption === !1,
|
|
1732
1732
|
"cl-bg-primary-default cl-text-white cl-opacity-90": d.value && e.isCreateNewOption
|
|
1733
1733
|
}]),
|
|
1734
|
-
onMousedown:
|
|
1734
|
+
onMousedown: s,
|
|
1735
1735
|
onMousemove: p[0] || (p[0] = (h) => m(!0)),
|
|
1736
1736
|
onMouseleave: p[1] || (p[1] = (h) => m(!1))
|
|
1737
1737
|
}, [
|
|
1738
|
-
e.option !== null && ((k = e.option) == null ? void 0 : k.parentId) !== 0 && ((S = e.option) == null ? void 0 : S.parentId) !== void 0 ? (
|
|
1738
|
+
e.option !== null && ((k = e.option) == null ? void 0 : k.parentId) !== 0 && ((S = e.option) == null ? void 0 : S.parentId) !== void 0 ? (i(), u("div", Tt, $(o(c)), 1)) : N("", !0),
|
|
1739
1739
|
r("div", {
|
|
1740
1740
|
class: U({
|
|
1741
1741
|
"cl-w-1/2": o(c) !== "",
|
|
@@ -1756,7 +1756,7 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
1756
1756
|
], 34);
|
|
1757
1757
|
};
|
|
1758
1758
|
}
|
|
1759
|
-
}), St = ["onKeyup"],
|
|
1759
|
+
}), St = ["onKeyup"], Ot = { class: "cl-flex" }, Et = { key: 5 }, jt = /* @__PURE__ */ H({
|
|
1760
1760
|
__name: "cl-ui-combo-box-search",
|
|
1761
1761
|
props: {
|
|
1762
1762
|
loading: { type: Boolean, default: !1 },
|
|
@@ -1777,9 +1777,9 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
1777
1777
|
"hide-dropdown": null
|
|
1778
1778
|
},
|
|
1779
1779
|
setup(e, { emit: n }) {
|
|
1780
|
-
const t = e, { t: l } =
|
|
1780
|
+
const t = e, { t: l } = se(), c = M(""), d = M(!1), s = M(-1), m = A(() => d.value ? -1 : 0), a = M();
|
|
1781
1781
|
function f(y) {
|
|
1782
|
-
(y === void 0 || (y == null ? void 0 : y.code.startsWith("Arrow")) === !1 && (y == null ? void 0 : y.code.startsWith("Control")) === !1 && (y == null ? void 0 : y.code.startsWith("Shift")) === !1 && (y == null ? void 0 : y.code.startsWith("Tab")) === !1 && (y == null ? void 0 : y.code) !== "Enter") && (n("search", c.value),
|
|
1782
|
+
(y === void 0 || (y == null ? void 0 : y.code.startsWith("Arrow")) === !1 && (y == null ? void 0 : y.code.startsWith("Control")) === !1 && (y == null ? void 0 : y.code.startsWith("Shift")) === !1 && (y == null ? void 0 : y.code.startsWith("Tab")) === !1 && (y == null ? void 0 : y.code) !== "Enter") && (n("search", c.value), s.value = -2);
|
|
1783
1783
|
}
|
|
1784
1784
|
function p(y) {
|
|
1785
1785
|
n("select-object", y);
|
|
@@ -1791,13 +1791,13 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
1791
1791
|
n("hide-dropdown");
|
|
1792
1792
|
}
|
|
1793
1793
|
function S(y) {
|
|
1794
|
-
|
|
1794
|
+
s.value < t.results.length - 1 ? (s.value === -2 && c.value === "" && s.value++, s.value++) : s.value = y, I();
|
|
1795
1795
|
}
|
|
1796
1796
|
function h(y) {
|
|
1797
|
-
|
|
1797
|
+
s.value > y ? s.value-- : s.value = t.results.length - 1, I();
|
|
1798
1798
|
}
|
|
1799
1799
|
function B() {
|
|
1800
|
-
|
|
1800
|
+
s.value >= 0 && t.results !== void 0 ? p(t.results[s.value].id) : s.value === -1 && b();
|
|
1801
1801
|
}
|
|
1802
1802
|
function F(y) {
|
|
1803
1803
|
if (y.key === "Tab" && y.shiftKey === !0) {
|
|
@@ -1810,22 +1810,22 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
1810
1810
|
}
|
|
1811
1811
|
function I() {
|
|
1812
1812
|
var y;
|
|
1813
|
-
t.results && t.results.length > 1 && ((y = a.value) == null || y.scrollTo(0, (
|
|
1813
|
+
t.results && t.results.length > 1 && ((y = a.value) == null || y.scrollTo(0, (s.value + 1) * 34 - 34 * 2));
|
|
1814
1814
|
}
|
|
1815
1815
|
function G() {
|
|
1816
1816
|
let y = !1;
|
|
1817
1817
|
t.results !== null && t.results.length === 1 && (y = c.value.toUpperCase().trim() === t.results[0].name.toUpperCase().trim()), d.value = t.canCreateNewObject === !0 && t.errorMessage === "" && c.value.trim() !== "" && y === !1;
|
|
1818
1818
|
}
|
|
1819
|
-
function
|
|
1820
|
-
|
|
1819
|
+
function O(y) {
|
|
1820
|
+
s.value = y;
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1822
|
+
function E() {
|
|
1823
1823
|
t.isVisible === !0 && (c.value = "", f(), ke(() => {
|
|
1824
1824
|
var y, v;
|
|
1825
1825
|
return (v = (y = a.value) == null ? void 0 : y.querySelector("input")) == null ? void 0 : v.focus();
|
|
1826
1826
|
}));
|
|
1827
1827
|
}
|
|
1828
|
-
return ee(() => t.results, () => G()), ee(() => t.errorMessage, () => G()), ee(() => t.isVisible, () =>
|
|
1828
|
+
return ee(() => t.results, () => G()), ee(() => t.errorMessage, () => G()), ee(() => t.isVisible, () => E()), Oe(() => {
|
|
1829
1829
|
var y;
|
|
1830
1830
|
return (y = a.value) == null ? void 0 : y.addEventListener("keydown", F);
|
|
1831
1831
|
}), Ie(() => {
|
|
@@ -1834,7 +1834,7 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
1834
1834
|
}), (y, v) => {
|
|
1835
1835
|
var q;
|
|
1836
1836
|
const w = _("cl-ui-loading-spinner");
|
|
1837
|
-
return
|
|
1837
|
+
return i(), u("div", {
|
|
1838
1838
|
ref_key: "container",
|
|
1839
1839
|
ref: a,
|
|
1840
1840
|
class: "cl-bg-white cl-border cl-border-collapse cl-border-grey-0 cl-h-52 cl-overflow-y-auto cl-p-2 cl-rounded cl-text-sm",
|
|
@@ -1844,7 +1844,7 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
1844
1844
|
],
|
|
1845
1845
|
onKeyup: Se(ae(B, ["prevent", "stop"]), ["enter"])
|
|
1846
1846
|
}, [
|
|
1847
|
-
r("div",
|
|
1847
|
+
r("div", Ot, [
|
|
1848
1848
|
T(fe, {
|
|
1849
1849
|
modelValue: c.value,
|
|
1850
1850
|
"onUpdate:modelValue": v[0] || (v[0] = (X) => c.value = X),
|
|
@@ -1858,44 +1858,44 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
1858
1858
|
[V, e.loading]
|
|
1859
1859
|
])
|
|
1860
1860
|
]),
|
|
1861
|
-
e.currentObjectName !== "" ? (
|
|
1861
|
+
e.currentObjectName !== "" ? (i(), K(Ae, {
|
|
1862
1862
|
key: 0,
|
|
1863
1863
|
"show-clear-button": e.canClearSelectedObject,
|
|
1864
1864
|
text: e.currentObjectName,
|
|
1865
1865
|
onClearObject: v[1] || (v[1] = (X) => y.$emit("clear-object"))
|
|
1866
1866
|
}, null, 8, ["show-clear-button", "text"])) : N("", !0),
|
|
1867
|
-
e.objectParentType !== "" && e.results !== void 0 && e.results.length > 0 && e.errorMessage === "" ? (
|
|
1867
|
+
e.objectParentType !== "" && e.results !== void 0 && e.results.length > 0 && e.errorMessage === "" ? (i(), K(Ae, {
|
|
1868
1868
|
key: 1,
|
|
1869
1869
|
text: e.objectType,
|
|
1870
1870
|
"additional-text": e.objectParentType,
|
|
1871
1871
|
class: "cl-bg-grey-2 cl-mt-1"
|
|
1872
1872
|
}, null, 8, ["text", "additional-text"])) : N("", !0),
|
|
1873
|
-
e.results !== null && ((q = e.results) == null ? void 0 : q.length) === 0 && c.value.trim() !== "" && e.canCreateNewObject === !1 && e.errorMessage === "" ? (
|
|
1873
|
+
e.results !== null && ((q = e.results) == null ? void 0 : q.length) === 0 && c.value.trim() !== "" && e.canCreateNewObject === !1 && e.errorMessage === "" ? (i(), K(Ae, {
|
|
1874
1874
|
key: 2,
|
|
1875
1875
|
text: o(l)("comboBox.noResults", { value: c.value })
|
|
1876
1876
|
}, null, 8, ["text"])) : N("", !0),
|
|
1877
|
-
e.errorMessage !== "" ? (
|
|
1877
|
+
e.errorMessage !== "" ? (i(), K(Ae, {
|
|
1878
1878
|
key: 3,
|
|
1879
1879
|
class: "!cl-bg-danger-light cl-border-danger-light cl-rounded cl-text-danger-dark",
|
|
1880
1880
|
text: o(l)("comboBox.errorMessage", { error: e.errorMessage })
|
|
1881
1881
|
}, null, 8, ["text"])) : N("", !0),
|
|
1882
|
-
d.value ? (
|
|
1882
|
+
d.value ? (i(), K(Ze, {
|
|
1883
1883
|
key: 4,
|
|
1884
1884
|
"is-create-new-option": !0,
|
|
1885
1885
|
text: o(l)("comboBox.addPrompt", { value: c.value, object: e.objectType }),
|
|
1886
1886
|
index: -1,
|
|
1887
|
-
"selected-index":
|
|
1887
|
+
"selected-index": s.value,
|
|
1888
1888
|
onCreateObject: b,
|
|
1889
|
-
onOptionHighlighted:
|
|
1889
|
+
onOptionHighlighted: O
|
|
1890
1890
|
}, null, 8, ["text", "selected-index"])) : N("", !0),
|
|
1891
|
-
e.errorMessage === "" && e.results !== null ? (
|
|
1892
|
-
(
|
|
1891
|
+
e.errorMessage === "" && e.results !== null ? (i(), u("div", Et, [
|
|
1892
|
+
(i(!0), u(z, null, ce(e.results, (X, le) => (i(), K(Ze, {
|
|
1893
1893
|
key: le,
|
|
1894
1894
|
option: X,
|
|
1895
1895
|
index: le,
|
|
1896
|
-
"selected-index":
|
|
1896
|
+
"selected-index": s.value,
|
|
1897
1897
|
onSelectObject: p,
|
|
1898
|
-
onOptionHighlighted:
|
|
1898
|
+
onOptionHighlighted: O
|
|
1899
1899
|
}, null, 8, ["option", "index", "selected-index"]))), 128))
|
|
1900
1900
|
])) : N("", !0)
|
|
1901
1901
|
], 40, St);
|
|
@@ -1927,7 +1927,7 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
1927
1927
|
"update:current-object": null
|
|
1928
1928
|
},
|
|
1929
1929
|
setup(e, { expose: n, emit: t }) {
|
|
1930
|
-
const l = e, { t: c } =
|
|
1930
|
+
const l = e, { t: c } = se(), d = M(!1), s = A({
|
|
1931
1931
|
get: () => l.currentObject,
|
|
1932
1932
|
set: (g) => t("update:current-object", g)
|
|
1933
1933
|
}), m = M(null), a = M(null), f = A(() => X()), p = M(""), b = M(""), k = M(), S = M(!0);
|
|
@@ -1941,13 +1941,13 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
1941
1941
|
b.value = g, t("search-parent", g);
|
|
1942
1942
|
}
|
|
1943
1943
|
function I() {
|
|
1944
|
-
|
|
1944
|
+
s.value = null, h(!1);
|
|
1945
1945
|
}
|
|
1946
1946
|
function G(g) {
|
|
1947
|
-
const j =
|
|
1948
|
-
|
|
1947
|
+
const j = O(g);
|
|
1948
|
+
s.value = j, h(!1);
|
|
1949
1949
|
}
|
|
1950
|
-
function
|
|
1950
|
+
function O(g) {
|
|
1951
1951
|
let j = null;
|
|
1952
1952
|
if (l.results !== null) {
|
|
1953
1953
|
for (let P = 0; P < l.results.length; P++)
|
|
@@ -1958,7 +1958,7 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
1958
1958
|
}
|
|
1959
1959
|
return j;
|
|
1960
1960
|
}
|
|
1961
|
-
function
|
|
1961
|
+
function E() {
|
|
1962
1962
|
var g, j;
|
|
1963
1963
|
k.value = {
|
|
1964
1964
|
name: p.value,
|
|
@@ -1987,14 +1987,14 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
1987
1987
|
});
|
|
1988
1988
|
}
|
|
1989
1989
|
function q() {
|
|
1990
|
-
var j, P,
|
|
1990
|
+
var j, P, me, C, J, x, D, te, W;
|
|
1991
1991
|
He({
|
|
1992
1992
|
message: c("comboBox.createSuccessful", { object: l.objectType, name: (P = (j = l.objectCreatedResponse) == null ? void 0 : j.name) != null ? P : "" }),
|
|
1993
1993
|
colour: "primary",
|
|
1994
1994
|
duration: 1e4
|
|
1995
1995
|
});
|
|
1996
1996
|
let g = "";
|
|
1997
|
-
a.value && a.value.id === ((
|
|
1997
|
+
a.value && a.value.id === ((me = l.objectCreatedResponse) == null ? void 0 : me.parentId) && (g = a.value.name), s.value = {
|
|
1998
1998
|
id: (J = (C = l.objectCreatedResponse) == null ? void 0 : C.id) != null ? J : 0,
|
|
1999
1999
|
name: (D = (x = l.objectCreatedResponse) == null ? void 0 : x.name) != null ? D : "",
|
|
2000
2000
|
parentId: (W = (te = l.objectCreatedResponse) == null ? void 0 : te.parentId) != null ? W : 0,
|
|
@@ -2003,7 +2003,7 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
2003
2003
|
}
|
|
2004
2004
|
function X() {
|
|
2005
2005
|
let g = "";
|
|
2006
|
-
return
|
|
2006
|
+
return s.value && (s.value.parentName ? g = s.value.parentName + "; " + s.value.name : g = s.value.name), g;
|
|
2007
2007
|
}
|
|
2008
2008
|
function le() {
|
|
2009
2009
|
let g = !0;
|
|
@@ -2015,14 +2015,14 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
2015
2015
|
(g = m.value) == null || g.focus();
|
|
2016
2016
|
}
|
|
2017
2017
|
}), (g, j) => {
|
|
2018
|
-
const P = _("icon"),
|
|
2019
|
-
return
|
|
2018
|
+
const P = _("icon"), me = _("cl-ui-combo-box", !0);
|
|
2019
|
+
return i(), u("div", null, [
|
|
2020
2020
|
r("div", At, [
|
|
2021
2021
|
T(fe, {
|
|
2022
2022
|
ref_key: "inputRef",
|
|
2023
2023
|
ref: m,
|
|
2024
2024
|
modelValue: o(f),
|
|
2025
|
-
"onUpdate:modelValue": j[0] || (j[0] = (C) =>
|
|
2025
|
+
"onUpdate:modelValue": j[0] || (j[0] = (C) => ge(f) ? f.value = C : null),
|
|
2026
2026
|
class: U(["!cl-bg-transparent !cl-mr-0 cl-mb-0 cl-rounded-r-none cl-w-full cl-z-10", {
|
|
2027
2027
|
"cl-cursor-pointer": e.disabled === !1
|
|
2028
2028
|
}]),
|
|
@@ -2043,7 +2043,7 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
2043
2043
|
], 512), [
|
|
2044
2044
|
[V, e.required && e.disabled === !1 && e.currentObject === null]
|
|
2045
2045
|
]),
|
|
2046
|
-
d.value ? (
|
|
2046
|
+
d.value ? (i(), u("div", {
|
|
2047
2047
|
key: 1,
|
|
2048
2048
|
class: U(["cl-border cl-border-grey-1 cl-float-right cl-h-10 cl-rounded cl-rounded-l-none cl-text-grey-3 cl-transition-colors cl-w-[27px] hover:cl-bg-link-light hover:cl-opacity-90 hover:cl-text-white", {
|
|
2049
2049
|
"cl-cursor-default": e.disabled,
|
|
@@ -2055,7 +2055,7 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
2055
2055
|
icon: "ph:caret-up-bold",
|
|
2056
2056
|
class: "cl-ml-[5px] cl-mt-[12px]"
|
|
2057
2057
|
})
|
|
2058
|
-
], 2)) : (
|
|
2058
|
+
], 2)) : (i(), u("div", {
|
|
2059
2059
|
key: 0,
|
|
2060
2060
|
class: U(["cl-border cl-border-grey-1 cl-float-right cl-h-10 cl-rounded cl-rounded-l-none cl-text-grey-3 cl-transition-colors cl-w-[27px] hover:cl-bg-link-light hover:cl-opacity-90 hover:cl-text-white", {
|
|
2061
2061
|
"cl-cursor-default": e.disabled,
|
|
@@ -2111,7 +2111,7 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
2111
2111
|
size: "small",
|
|
2112
2112
|
disabled: !S.value,
|
|
2113
2113
|
onClick: (J) => {
|
|
2114
|
-
|
|
2114
|
+
E(), C();
|
|
2115
2115
|
}
|
|
2116
2116
|
}, {
|
|
2117
2117
|
default: Q(() => [
|
|
@@ -2123,7 +2123,7 @@ const fe = /* @__PURE__ */ me(vt, [["__scopeId", "data-v-4d513eb1"]]), pt = { cl
|
|
|
2123
2123
|
]),
|
|
2124
2124
|
default: Q(() => [
|
|
2125
2125
|
r("div", Nt, [
|
|
2126
|
-
e.objectParentType ? (
|
|
2126
|
+
e.objectParentType ? (i(), K(me, {
|
|
2127
2127
|
key: 0,
|
|
2128
2128
|
"current-object": a.value,
|
|
2129
2129
|
"onUpdate:current-object": j[5] || (j[5] = (C) => a.value = C),
|
|
@@ -2167,11 +2167,11 @@ const zt = {}, Bt = { class: "cl-flex cl-flex-wrap cl-left-0 cl-mt-4 cl-w-full"
|
|
|
2167
2167
|
class: "cl-leading-10 cl-text-sm cl-w-full"
|
|
2168
2168
|
}, Vt = { class: "cl-float-left" }, Ft = { class: "cl-float-right" };
|
|
2169
2169
|
function Ht(e, n) {
|
|
2170
|
-
return
|
|
2171
|
-
e.$slots.default ? (
|
|
2170
|
+
return i(), u("div", Bt, [
|
|
2171
|
+
e.$slots.default ? (i(), u("div", Lt, [
|
|
2172
2172
|
R(e.$slots, "default")
|
|
2173
2173
|
])) : N("", !0),
|
|
2174
|
-
e.$slots.left || e.$slots.right ? (
|
|
2174
|
+
e.$slots.left || e.$slots.right ? (i(), u("div", Pt, [
|
|
2175
2175
|
r("span", Vt, [
|
|
2176
2176
|
R(e.$slots, "left")
|
|
2177
2177
|
]),
|
|
@@ -2181,7 +2181,7 @@ function Ht(e, n) {
|
|
|
2181
2181
|
])) : N("", !0)
|
|
2182
2182
|
]);
|
|
2183
2183
|
}
|
|
2184
|
-
const Gt = /* @__PURE__ */
|
|
2184
|
+
const Gt = /* @__PURE__ */ he(zt, [["render", Ht]]), Wt = { class: "cl-mr-2 lg:cl-hidden" }, Jt = { class: "cl-mr-2 lg:cl-hidden" }, Kt = {
|
|
2185
2185
|
key: 0,
|
|
2186
2186
|
class: "cl-inline-block cl-whitespace-nowrap"
|
|
2187
2187
|
}, Zt = {
|
|
@@ -2203,7 +2203,7 @@ const Gt = /* @__PURE__ */ me(zt, [["render", Ht]]), Wt = { class: "cl-mr-2 lg:c
|
|
|
2203
2203
|
"undo-edit": null
|
|
2204
2204
|
},
|
|
2205
2205
|
setup(e, { emit: n }) {
|
|
2206
|
-
const t = e, { d: l, n: c } =
|
|
2206
|
+
const t = e, { d: l, n: c } = se(), d = M(be(t.record)), s = A(() => {
|
|
2207
2207
|
var b, k;
|
|
2208
2208
|
return d.value[(b = t.column.field) != null ? b : ""] !== t.record[(k = t.column.field) != null ? k : ""];
|
|
2209
2209
|
});
|
|
@@ -2219,49 +2219,49 @@ const Gt = /* @__PURE__ */ me(zt, [["render", Ht]]), Wt = { class: "cl-mr-2 lg:c
|
|
|
2219
2219
|
function p() {
|
|
2220
2220
|
n("focus");
|
|
2221
2221
|
}
|
|
2222
|
-
return
|
|
2222
|
+
return il(() => d.value = be(t.record)), ee(d, (b) => {
|
|
2223
2223
|
var S;
|
|
2224
2224
|
const k = (S = t.column.field) != null ? S : "";
|
|
2225
2225
|
k !== "" && (b[k] !== t.record[k] ? n("edit", b[k]) : n("undo-edit"));
|
|
2226
2226
|
}, {
|
|
2227
2227
|
deep: !0
|
|
2228
|
-
}), (b, k) => e.editMode && e.column.field && e.column.editable ? (
|
|
2228
|
+
}), (b, k) => e.editMode && e.column.field && e.column.editable ? (i(), u("td", de({ key: 0 }, b.$attrs, {
|
|
2229
2229
|
class: ["cl-transition-colours", {
|
|
2230
|
-
"cl-bg-link-lighter": o(
|
|
2230
|
+
"cl-bg-link-lighter": o(s)
|
|
2231
2231
|
}]
|
|
2232
2232
|
}), [
|
|
2233
2233
|
r("strong", Wt, $(e.column.caption), 1),
|
|
2234
|
-
R(b.$slots, `${e.column.name}Edit`,
|
|
2234
|
+
R(b.$slots, `${e.column.name}Edit`, ie(pe({
|
|
2235
2235
|
cellFocused: p,
|
|
2236
2236
|
column: e.column,
|
|
2237
|
-
edited: o(
|
|
2237
|
+
edited: o(s),
|
|
2238
2238
|
record: d.value
|
|
2239
2239
|
})))
|
|
2240
|
-
], 16)) : (
|
|
2240
|
+
], 16)) : (i(), u("td", ie(de({ key: 1 }, b.$attrs)), [
|
|
2241
2241
|
r("strong", Jt, $(e.column.caption), 1),
|
|
2242
|
-
e.column.type === "slot" ? R(b.$slots, e.column.name,
|
|
2242
|
+
e.column.type === "slot" ? R(b.$slots, e.column.name, ie(de({ key: 0 }, { column: e.column, record: e.record }))) : e.column.type === "boolean" && e.column.field !== void 0 ? (i(), K(fe, {
|
|
2243
2243
|
key: 1,
|
|
2244
2244
|
"input-type": "checkbox",
|
|
2245
2245
|
"model-value": f(e.record, e.column.field),
|
|
2246
2246
|
disabled: !0
|
|
2247
|
-
}, null, 8, ["model-value"])) : (e.column.type === "date" || e.column.type === "datetime") && e.column.field !== void 0 ? (
|
|
2248
|
-
e.column.format !== void 0 ? (
|
|
2247
|
+
}, null, 8, ["model-value"])) : (e.column.type === "date" || e.column.type === "datetime") && e.column.field !== void 0 ? (i(), u(z, { key: 2 }, [
|
|
2248
|
+
e.column.format !== void 0 ? (i(), u(z, { key: 0 }, [
|
|
2249
2249
|
Y($(o(l)(new Date(m(e.record, e.column.field)), e.column.format)), 1)
|
|
2250
|
-
], 64)) : e.column.type === "date" ? (
|
|
2250
|
+
], 64)) : e.column.type === "date" ? (i(), u(z, { key: 1 }, [
|
|
2251
2251
|
Y($(o(l)(new Date(m(e.record, e.column.field)), o(Z).DATE)), 1)
|
|
2252
|
-
], 64)) : (
|
|
2252
|
+
], 64)) : (i(), u(z, { key: 2 }, [
|
|
2253
2253
|
Y($(o(l)(new Date(m(e.record, e.column.field)), o(Z).DATETIME)), 1)
|
|
2254
2254
|
], 64))
|
|
2255
|
-
], 64)) : e.column.type === "number" && e.column.field ? (
|
|
2256
|
-
e.column.format === o(ne).MULTIPLIER ? (
|
|
2255
|
+
], 64)) : e.column.type === "number" && e.column.field ? (i(), u(z, { key: 3 }, [
|
|
2256
|
+
e.column.format === o(ne).MULTIPLIER ? (i(), u(z, { key: 0 }, [
|
|
2257
2257
|
Y(" \xD7" + $(a(e.record, e.column.field)), 1)
|
|
2258
|
-
], 64)) : e.column.format !== void 0 ? (
|
|
2258
|
+
], 64)) : e.column.format !== void 0 ? (i(), u(z, { key: 1 }, [
|
|
2259
2259
|
Y($(o(c)(a(e.record, e.column.field), e.column.format)), 1)
|
|
2260
|
-
], 64)) : (
|
|
2260
|
+
], 64)) : (i(), u(z, { key: 2 }, [
|
|
2261
2261
|
Y($(a(e.record, e.column.field)), 1)
|
|
2262
2262
|
], 64))
|
|
2263
|
-
], 64)) : e.column.field !== void 0 ? (
|
|
2264
|
-
e.column.maxLength !== void 0 ? (
|
|
2263
|
+
], 64)) : e.column.field !== void 0 ? (i(), u(z, { key: 4 }, [
|
|
2264
|
+
e.column.maxLength !== void 0 ? (i(), u("span", Kt, $(m(e.record, e.column.field).trimToLength(e.column.maxLength, e.column.format !== void 0 ? e.column.format === "ellipsis" : !1)), 1)) : (i(), u("span", Zt, $(m(e.record, e.column.field)), 1))
|
|
2265
2265
|
], 64)) : N("", !0)
|
|
2266
2266
|
], 16));
|
|
2267
2267
|
}
|
|
@@ -2433,44 +2433,44 @@ const an = {
|
|
|
2433
2433
|
"update:request": null
|
|
2434
2434
|
},
|
|
2435
2435
|
setup(e, { emit: n }) {
|
|
2436
|
-
const t = e, { locale: l, t: c } =
|
|
2437
|
-
const
|
|
2438
|
-
return
|
|
2439
|
-
|
|
2440
|
-
}),
|
|
2436
|
+
const t = e, { locale: l, t: c } = se(), { debounce: d } = Ve(750), s = A(() => {
|
|
2437
|
+
const O = h();
|
|
2438
|
+
return O.forEach((E) => {
|
|
2439
|
+
E.description = c(`grid.${E.method}`);
|
|
2440
|
+
}), O;
|
|
2441
2441
|
}), m = A(() => {
|
|
2442
|
-
var
|
|
2443
|
-
let
|
|
2444
|
-
return typeof
|
|
2442
|
+
var E;
|
|
2443
|
+
let O = (E = t.request.filters.find((y) => y.filterOnColumn === t.column.field)) == null ? void 0 : E.filterMethod;
|
|
2444
|
+
return typeof O > "u" && (O = we[S()]), s.value.find((y) => {
|
|
2445
2445
|
var v;
|
|
2446
|
-
return y.method.toLowerCase() === ((v =
|
|
2446
|
+
return y.method.toLowerCase() === ((v = O == null ? void 0 : O.removeNonAlphanumeric()) == null ? void 0 : v.toLowerCase());
|
|
2447
2447
|
});
|
|
2448
2448
|
}), a = A(() => {
|
|
2449
|
-
var
|
|
2450
|
-
return (
|
|
2449
|
+
var O, E;
|
|
2450
|
+
return (E = (O = t.request.filters.find((y) => y.filterOnColumn === t.column.field)) == null ? void 0 : O.filterValue) != null ? E : "";
|
|
2451
2451
|
}), f = A(() => a.value !== "" ? new Date(a.value) : null), p = M(a.value), b = A(() => Intl.NumberFormat(l.value).format(1.1).replace(/[0-9]+/g, "")), k = A(() => {
|
|
2452
|
-
let
|
|
2453
|
-
return t.column.slotType === "date" || t.column.type === "date" ?
|
|
2452
|
+
let O = "text";
|
|
2453
|
+
return t.column.slotType === "date" || t.column.type === "date" ? O = "date" : (t.column.slotType === "datetime" || t.column.type === "datetime") && (O = "datetime"), O;
|
|
2454
2454
|
});
|
|
2455
2455
|
function S() {
|
|
2456
2456
|
return t.column.type === "string" || t.column.slotType === "string" ? we.CONTAINS : t.column.type === "datetime" || t.column.slotType === "datetime" ? we.LESS_THAN : we.EQUAL;
|
|
2457
2457
|
}
|
|
2458
2458
|
function h() {
|
|
2459
|
-
let
|
|
2460
|
-
return t.column.type !== "slot" ?
|
|
2459
|
+
let O = [];
|
|
2460
|
+
return t.column.type !== "slot" ? O = Qe.filter((E) => E.allowedTypes.includes(t.column.type)) : typeof t.column.slotType < "u" && typeof t.column.field < "u" && (O = Qe.filter((E) => E.allowedTypes.includes(t.column.slotType))), O;
|
|
2461
2461
|
}
|
|
2462
|
-
function B(
|
|
2463
|
-
const
|
|
2464
|
-
y >= 0 ? (
|
|
2462
|
+
function B(O) {
|
|
2463
|
+
const E = be(t.request), y = E.filters.findIndex((v) => v.filterOnColumn === t.column.field);
|
|
2464
|
+
y >= 0 ? (E.filters[y].filterOperation = we[O.toUpperCase()], E.filters[y].filterMethod = O.toUpperCase()) : typeof t.column.field < "u" && E.filters.push({
|
|
2465
2465
|
filterOnColumn: t.column.field,
|
|
2466
|
-
filterMethod:
|
|
2467
|
-
filterOperation: we[
|
|
2466
|
+
filterMethod: O.toUpperCase(),
|
|
2467
|
+
filterOperation: we[O.toUpperCase()],
|
|
2468
2468
|
filterValue: ""
|
|
2469
|
-
}), n("update:request",
|
|
2469
|
+
}), n("update:request", E);
|
|
2470
2470
|
}
|
|
2471
|
-
function F(
|
|
2471
|
+
function F(O, E) {
|
|
2472
2472
|
var X;
|
|
2473
|
-
const y = ((X =
|
|
2473
|
+
const y = ((X = O == null ? void 0 : O.value) != null ? X : E).trim(), v = be(t.request), w = v.filters.findIndex((le) => le.filterOnColumn === t.column.field);
|
|
2474
2474
|
let q = !1;
|
|
2475
2475
|
if (v.pageNumber = 1, w >= 0)
|
|
2476
2476
|
q = v.filters[w].filterValue === y, v.filters[w].filterValue = y;
|
|
@@ -2485,26 +2485,26 @@ const an = {
|
|
|
2485
2485
|
}
|
|
2486
2486
|
q === !1 && n("update:request", v);
|
|
2487
2487
|
}
|
|
2488
|
-
function I(
|
|
2488
|
+
function I(O) {
|
|
2489
2489
|
var v, w;
|
|
2490
|
-
let
|
|
2491
|
-
t.column.format === ne.INTEGER ? y = parseInt(
|
|
2490
|
+
let E = (w = (v = O == null ? void 0 : O.value) == null ? void 0 : v.replace(new RegExp(`[^0-9\\${b.value}]`, "g"), "")) != null ? w : "", y = "";
|
|
2491
|
+
t.column.format === ne.INTEGER ? y = parseInt(E) : (E = E.replace(b.value, "."), y = parseFloat(E)), typeof y == "number" && isNaN(y) && (y = ""), F(null, y.toString());
|
|
2492
2492
|
}
|
|
2493
|
-
function G(
|
|
2494
|
-
var
|
|
2495
|
-
F(null, (
|
|
2493
|
+
function G(O) {
|
|
2494
|
+
var E;
|
|
2495
|
+
F(null, (E = O == null ? void 0 : O.toISOString()) != null ? E : "");
|
|
2496
2496
|
}
|
|
2497
|
-
return (
|
|
2497
|
+
return (O, E) => {
|
|
2498
2498
|
var v, w;
|
|
2499
2499
|
const y = _("icon");
|
|
2500
|
-
return e.column.filterable === void 0 || e.column.filterable === !0 ? (
|
|
2500
|
+
return e.column.filterable === void 0 || e.column.filterable === !0 ? (i(), u("div", {
|
|
2501
2501
|
key: 0,
|
|
2502
2502
|
class: U(["cl-border-grey-2 cl-flex cl-h-[2.6rem] cl-rounded cl-w-full", {
|
|
2503
2503
|
"cl-border-b cl-p-5": e.column.type === "slot" && (e.column.slotType === void 0 || e.column.field === void 0),
|
|
2504
2504
|
"cl-border": e.column.type !== "slot" || e.column.slotType !== void 0 && e.column.field !== void 0
|
|
2505
2505
|
}])
|
|
2506
2506
|
}, [
|
|
2507
|
-
e.column.type !== "slot" || e.column.slotType !== void 0 && e.column.field !== void 0 ? (
|
|
2507
|
+
e.column.type !== "slot" || e.column.slotType !== void 0 && e.column.field !== void 0 ? (i(), u("div", un, [
|
|
2508
2508
|
r("div", dn, [
|
|
2509
2509
|
T(y, {
|
|
2510
2510
|
icon: "ph:sliders-horizontal",
|
|
@@ -2526,7 +2526,7 @@ const an = {
|
|
|
2526
2526
|
}, null, 8, gn)
|
|
2527
2527
|
]),
|
|
2528
2528
|
r("strong", bn, $(o(c)("grid.availableMethods")), 1),
|
|
2529
|
-
(
|
|
2529
|
+
(i(!0), u(z, null, ce(o(s), (q, X) => (i(), u("span", {
|
|
2530
2530
|
key: X,
|
|
2531
2531
|
class: "cl-cursor-pointer cl-px-4 cl-py-1 cl-transition-colors cl-w-full hover:cl-bg-off-white",
|
|
2532
2532
|
onClick: ae((le) => B(q.method), ["prevent"])
|
|
@@ -2539,10 +2539,10 @@ const an = {
|
|
|
2539
2539
|
], 8, hn))), 128))
|
|
2540
2540
|
], 2)
|
|
2541
2541
|
])) : N("", !0),
|
|
2542
|
-
e.column.type === "boolean" || e.column.slotType === "boolean" && typeof e.column.field < "u" ? (
|
|
2542
|
+
e.column.type === "boolean" || e.column.slotType === "boolean" && typeof e.column.field < "u" ? (i(), u("select", {
|
|
2543
2543
|
key: 1,
|
|
2544
2544
|
class: "cl-border-none cl-w-full",
|
|
2545
|
-
onChange:
|
|
2545
|
+
onChange: E[0] || (E[0] = (q) => F(q.target))
|
|
2546
2546
|
}, [
|
|
2547
2547
|
pn,
|
|
2548
2548
|
r("option", {
|
|
@@ -2553,7 +2553,7 @@ const an = {
|
|
|
2553
2553
|
value: "false",
|
|
2554
2554
|
selected: o(a) === "false"
|
|
2555
2555
|
}, $(o(c)("grid.false")), 9, wn)
|
|
2556
|
-
], 32)) : e.column.type === "date" || e.column.type === "datetime" || (e.column.slotType === "date" || e.column.slotType === "datetime") && typeof e.column.field < "u" ? (
|
|
2556
|
+
], 32)) : e.column.type === "date" || e.column.type === "datetime" || (e.column.slotType === "date" || e.column.slotType === "datetime") && typeof e.column.field < "u" ? (i(), K(fe, {
|
|
2557
2557
|
key: 2,
|
|
2558
2558
|
"model-value": o(f),
|
|
2559
2559
|
class: "!cl-border-none !cl-mb-0 !cl-mr-0 cl-w-full",
|
|
@@ -2562,30 +2562,30 @@ const an = {
|
|
|
2562
2562
|
label: e.column.name,
|
|
2563
2563
|
"show-label": !1,
|
|
2564
2564
|
"input-type": o(k),
|
|
2565
|
-
"onUpdate:modelValue":
|
|
2566
|
-
}, null, 8, ["model-value", "label", "input-type"])) : e.column.type === "number" || e.column.slotType === "number" && typeof e.column.field < "u" ? (
|
|
2565
|
+
"onUpdate:modelValue": E[1] || (E[1] = (q) => G(q))
|
|
2566
|
+
}, null, 8, ["model-value", "label", "input-type"])) : e.column.type === "number" || e.column.slotType === "number" && typeof e.column.field < "u" ? (i(), K(fe, {
|
|
2567
2567
|
key: 3,
|
|
2568
2568
|
modelValue: p.value,
|
|
2569
|
-
"onUpdate:modelValue":
|
|
2569
|
+
"onUpdate:modelValue": E[2] || (E[2] = (q) => p.value = q),
|
|
2570
2570
|
class: "cl-border-none cl-mb-0 cl-w-full",
|
|
2571
2571
|
"input-type": "number",
|
|
2572
2572
|
"show-arrows": !1,
|
|
2573
|
-
onInput:
|
|
2574
|
-
}, null, 8, ["modelValue"])) : e.column.type !== "slot" || e.column.slotType === "string" && typeof e.column.field < "u" ? (
|
|
2573
|
+
onInput: E[3] || (E[3] = (q) => o(d)(I, q.target))
|
|
2574
|
+
}, null, 8, ["modelValue"])) : e.column.type !== "slot" || e.column.slotType === "string" && typeof e.column.field < "u" ? (i(), K(fe, {
|
|
2575
2575
|
key: 4,
|
|
2576
2576
|
modelValue: p.value,
|
|
2577
|
-
"onUpdate:modelValue":
|
|
2577
|
+
"onUpdate:modelValue": E[4] || (E[4] = (q) => p.value = q),
|
|
2578
2578
|
class: "cl-border-none cl-mb-0 cl-w-full",
|
|
2579
2579
|
"input-type": "text",
|
|
2580
|
-
onInput:
|
|
2580
|
+
onInput: E[5] || (E[5] = (q) => o(d)(F, q.target))
|
|
2581
2581
|
}, null, 8, ["modelValue"])) : N("", !0)
|
|
2582
|
-
], 2)) : (
|
|
2582
|
+
], 2)) : (i(), u("div", xn, " \xA0 "));
|
|
2583
2583
|
};
|
|
2584
2584
|
}
|
|
2585
2585
|
}), $n = {
|
|
2586
2586
|
key: 0,
|
|
2587
2587
|
class: "cl-flex cl-flex-wrap cl-justify-end cl-mt-4 cl-w-full"
|
|
2588
|
-
}, kn = { class: "cl-bg-off-white cl-border cl-border-grey-0 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" }, Tn = { class: "cl-text-grey-3 cl-w-max" }, Cn = { class: "cl-bg-off-white cl-border cl-border-grey-0 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" }, Sn = { 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" },
|
|
2588
|
+
}, kn = { class: "cl-bg-off-white cl-border cl-border-grey-0 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" }, Tn = { class: "cl-text-grey-3 cl-w-max" }, Cn = { class: "cl-bg-off-white cl-border cl-border-grey-0 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" }, Sn = { 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" }, On = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, En = { class: "cl-text-grey-3 cl-w-full lg:cl-mr-2 lg:cl-w-auto" }, jn = { class: "cl-flex cl-flex-wrap cl-text-sm mb:cl-flex-nowrap" }, An = { class: "cl-pr-2" }, Mn = ["onClick"], In = { 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" }, Nn = { class: "cl-mb-2 cl-text-grey-3 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, qn = ["onClick"], Dn = { class: "cl-mb-2 cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, Rn = { 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" }, Un = { class: "cl-block lg:cl-inline-block" }, zn = /* @__PURE__ */ H({
|
|
2589
2589
|
__name: "cl-ui-grid-footer",
|
|
2590
2590
|
props: {
|
|
2591
2591
|
request: null,
|
|
@@ -2601,7 +2601,7 @@ const an = {
|
|
|
2601
2601
|
50,
|
|
2602
2602
|
100,
|
|
2603
2603
|
200
|
|
2604
|
-
], { n: c, t: d } =
|
|
2604
|
+
], { n: c, t: d } = se(), { debounce: s } = Ve(), m = M(t.request.pageNumber), a = A(() => {
|
|
2605
2605
|
var S, h;
|
|
2606
2606
|
return t.data !== null ? Math.ceil(((h = (S = t.data) == null ? void 0 : S.totalRecords) != null ? h : 0) / t.request.pageSize) : 1;
|
|
2607
2607
|
}), f = A(() => {
|
|
@@ -2614,7 +2614,7 @@ const an = {
|
|
|
2614
2614
|
return h;
|
|
2615
2615
|
});
|
|
2616
2616
|
function p(S) {
|
|
2617
|
-
const h =
|
|
2617
|
+
const h = be(t.request);
|
|
2618
2618
|
h.pageNumber !== S && (h.pageNumber = Math.max(Math.min(Math.trunc(S), a.value), 1), n("update:request", h));
|
|
2619
2619
|
}
|
|
2620
2620
|
function b(S) {
|
|
@@ -2622,13 +2622,13 @@ const an = {
|
|
|
2622
2622
|
p(h);
|
|
2623
2623
|
}
|
|
2624
2624
|
function k(S) {
|
|
2625
|
-
const h =
|
|
2625
|
+
const h = be(t.request);
|
|
2626
2626
|
h.pageSize = S, h.pageNumber = 1, n("update:request", h);
|
|
2627
2627
|
}
|
|
2628
2628
|
return ee(() => t.request.pageNumber, () => m.value = t.request.pageNumber), (S, h) => {
|
|
2629
2629
|
var F;
|
|
2630
2630
|
const B = _("icon");
|
|
2631
|
-
return e.data && ((F = e.data.results) == null ? void 0 : F.length) && e.request ? (
|
|
2631
|
+
return e.data && ((F = e.data.results) == null ? void 0 : F.length) && e.request ? (i(), u("div", $n, [
|
|
2632
2632
|
r("div", kn, [
|
|
2633
2633
|
r("span", Tn, $(o(d)("grid.jumpToPage")), 1),
|
|
2634
2634
|
T(fe, {
|
|
@@ -2640,13 +2640,13 @@ const an = {
|
|
|
2640
2640
|
"show-label": !1,
|
|
2641
2641
|
min: "1",
|
|
2642
2642
|
max: o(a),
|
|
2643
|
-
onInput: h[1] || (h[1] = (I) => o(
|
|
2643
|
+
onInput: h[1] || (h[1] = (I) => o(s)(b, I.target))
|
|
2644
2644
|
}, null, 8, ["modelValue", "max"])
|
|
2645
2645
|
]),
|
|
2646
2646
|
r("div", Cn, [
|
|
2647
2647
|
r("div", Sn, [
|
|
2648
|
-
r("li",
|
|
2649
|
-
r("span",
|
|
2648
|
+
r("li", On, [
|
|
2649
|
+
r("span", En, $(o(d)("grid.page")), 1)
|
|
2650
2650
|
]),
|
|
2651
2651
|
r("ul", jn, [
|
|
2652
2652
|
r("li", An, $(o(c)(e.request.pageNumber, o(ne).INTEGER)) + " / " + $(o(c)(o(a), o(ne).INTEGER)), 1),
|
|
@@ -2672,13 +2672,13 @@ const an = {
|
|
|
2672
2672
|
], 512), [
|
|
2673
2673
|
[V, e.request.pageNumber > 1]
|
|
2674
2674
|
]),
|
|
2675
|
-
(
|
|
2675
|
+
(i(!0), u(z, null, ce(o(f), (I, G) => (i(), u("li", {
|
|
2676
2676
|
key: G,
|
|
2677
2677
|
class: U(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2678
2678
|
"cl-text-black cl-font-bold": e.request.pageNumber === I,
|
|
2679
2679
|
"cl-text-grey-6": e.request.pageNumber !== I
|
|
2680
2680
|
}]),
|
|
2681
|
-
onClick: (
|
|
2681
|
+
onClick: (O) => p(I)
|
|
2682
2682
|
}, $(o(c)(I, o(ne).INTEGER)), 11, Mn))), 128)),
|
|
2683
2683
|
L(r("li", {
|
|
2684
2684
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
@@ -2706,13 +2706,13 @@ const an = {
|
|
|
2706
2706
|
]),
|
|
2707
2707
|
r("ul", In, [
|
|
2708
2708
|
r("li", Nn, $(o(d)("grid.pageSize")), 1),
|
|
2709
|
-
(
|
|
2709
|
+
(i(), u(z, null, ce(l, (I, G) => r("li", {
|
|
2710
2710
|
key: G,
|
|
2711
2711
|
class: U(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2712
2712
|
"cl-text-black cl-font-bold": e.request.pageSize === I,
|
|
2713
2713
|
"cl-text-grey-6": e.request.pageSize !== I
|
|
2714
2714
|
}]),
|
|
2715
|
-
onClick: (
|
|
2715
|
+
onClick: (O) => k(I)
|
|
2716
2716
|
}, $(o(c)(I, o(ne).INTEGER)), 11, qn)), 64))
|
|
2717
2717
|
]),
|
|
2718
2718
|
r("ul", Dn, [
|
|
@@ -2735,22 +2735,22 @@ const an = {
|
|
|
2735
2735
|
"update:columns": null
|
|
2736
2736
|
},
|
|
2737
2737
|
setup(e, { emit: n }) {
|
|
2738
|
-
const t = e, { t: l } =
|
|
2738
|
+
const t = e, { t: l } = se(), c = M(!1);
|
|
2739
2739
|
function d(a, f, p) {
|
|
2740
2740
|
p < a.length && p >= 0 && a.splice(p, 0, a.splice(f, 1)[0]);
|
|
2741
2741
|
}
|
|
2742
|
-
function
|
|
2742
|
+
function s(a, f) {
|
|
2743
2743
|
var S;
|
|
2744
|
-
const p =
|
|
2744
|
+
const p = be(t.columns), b = (S = a == null ? void 0 : a.checked) != null ? S : !1, k = p.findIndex((h) => h.name === f.name);
|
|
2745
2745
|
k >= 0 && (p[k].visible = b), n("update:columns", p);
|
|
2746
2746
|
}
|
|
2747
2747
|
function m(a, f) {
|
|
2748
|
-
const p =
|
|
2748
|
+
const p = be(t.columns), b = f === "up" ? a + 1 : a - 1;
|
|
2749
2749
|
d(p, a, b), n("update:columns", p);
|
|
2750
2750
|
}
|
|
2751
2751
|
return (a, f) => {
|
|
2752
2752
|
const p = _("icon");
|
|
2753
|
-
return
|
|
2753
|
+
return i(), u(z, null, [
|
|
2754
2754
|
T(xe, de(a.$attrs, {
|
|
2755
2755
|
class: "cl-w-full",
|
|
2756
2756
|
size: "small",
|
|
@@ -2761,7 +2761,7 @@ const an = {
|
|
|
2761
2761
|
]),
|
|
2762
2762
|
_: 1
|
|
2763
2763
|
}, 16),
|
|
2764
|
-
(
|
|
2764
|
+
(i(), K(Pe, { to: "body" }, [
|
|
2765
2765
|
T($e, { name: "slide-left" }, {
|
|
2766
2766
|
default: Q(() => [
|
|
2767
2767
|
L(r("div", Bn, [
|
|
@@ -2779,7 +2779,7 @@ const an = {
|
|
|
2779
2779
|
r("strong", Gn, $(o(l)("grid.visible")), 1),
|
|
2780
2780
|
r("strong", Wn, $(o(l)("grid.order")), 1)
|
|
2781
2781
|
]),
|
|
2782
|
-
(
|
|
2782
|
+
(i(!0), u(z, null, ce(e.columns, (b, k) => (i(), u("li", {
|
|
2783
2783
|
key: k,
|
|
2784
2784
|
class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full"
|
|
2785
2785
|
}, [
|
|
@@ -2788,24 +2788,24 @@ const an = {
|
|
|
2788
2788
|
T(fe, {
|
|
2789
2789
|
"model-value": b.visible === void 0 || b.visible === !0,
|
|
2790
2790
|
"input-type": "checkbox",
|
|
2791
|
-
onClick: (S) =>
|
|
2791
|
+
onClick: (S) => s(S.target, b)
|
|
2792
2792
|
}, null, 8, ["model-value", "onClick"])
|
|
2793
2793
|
]),
|
|
2794
2794
|
r("div", Zn, [
|
|
2795
|
-
b.visible === void 0 || b.visible === !0 ? (
|
|
2796
|
-
k !== 0 ? (
|
|
2795
|
+
b.visible === void 0 || b.visible === !0 ? (i(), u(z, { key: 0 }, [
|
|
2796
|
+
k !== 0 ? (i(), K(p, {
|
|
2797
2797
|
key: 0,
|
|
2798
2798
|
class: "cl-cursor-pointer cl-inline-block cl-mr-2",
|
|
2799
2799
|
icon: "ph:arrow-left",
|
|
2800
2800
|
onClick: (S) => m(k, "down")
|
|
2801
2801
|
}, null, 8, ["onClick"])) : N("", !0),
|
|
2802
|
-
k !== e.columns.length - 1 ? (
|
|
2802
|
+
k !== e.columns.length - 1 ? (i(), K(p, {
|
|
2803
2803
|
key: 1,
|
|
2804
2804
|
class: "cl-cursor-pointer cl-inline-block",
|
|
2805
2805
|
icon: "ph:arrow-right",
|
|
2806
2806
|
onClick: (S) => m(k, "up")
|
|
2807
2807
|
}, null, 8, ["onClick"])) : N("", !0)
|
|
2808
|
-
], 64)) : (
|
|
2808
|
+
], 64)) : (i(), u("em", Qn, $(o(l)("grid.hidden")), 1))
|
|
2809
2809
|
])
|
|
2810
2810
|
]))), 128))
|
|
2811
2811
|
])
|
|
@@ -2844,27 +2844,27 @@ const an = {
|
|
|
2844
2844
|
"update:filter-panel-open": null
|
|
2845
2845
|
},
|
|
2846
2846
|
setup(e, { emit: n }) {
|
|
2847
|
-
const t = e, { t: l } =
|
|
2848
|
-
let
|
|
2847
|
+
const t = e, { t: l } = se(), c = A(() => {
|
|
2848
|
+
let s = !1;
|
|
2849
2849
|
return t.columns.forEach((m) => {
|
|
2850
|
-
(m.filterable === !0 || m.filterable === void 0 || m.sortable === !0 || m.sortable === void 0) && (
|
|
2851
|
-
}),
|
|
2850
|
+
(m.filterable === !0 || m.filterable === void 0 || m.sortable === !0 || m.sortable === void 0) && (s = !0);
|
|
2851
|
+
}), s;
|
|
2852
2852
|
}), d = A({
|
|
2853
2853
|
get: () => t.columns,
|
|
2854
|
-
set: (
|
|
2854
|
+
set: (s) => n("update:columns", s)
|
|
2855
2855
|
});
|
|
2856
|
-
return (
|
|
2857
|
-
e.editEnabled ? (
|
|
2856
|
+
return (s, m) => (i(), u(z, null, [
|
|
2857
|
+
e.editEnabled ? (i(), u("span", _n, [
|
|
2858
2858
|
T(xe, {
|
|
2859
2859
|
class: "cl-w-full lg:cl-w-auto",
|
|
2860
2860
|
size: "small",
|
|
2861
2861
|
colour: "default",
|
|
2862
|
-
onClick: m[0] || (m[0] = (a) =>
|
|
2862
|
+
onClick: m[0] || (m[0] = (a) => s.$emit("update:edit-mode", !e.editMode))
|
|
2863
2863
|
}, {
|
|
2864
2864
|
default: Q(() => [
|
|
2865
|
-
e.editMode ? (
|
|
2865
|
+
e.editMode ? (i(), u(z, { key: 0 }, [
|
|
2866
2866
|
Y($(o(l)("grid.finishEditing")), 1)
|
|
2867
|
-
], 64)) : (
|
|
2867
|
+
], 64)) : (i(), u(z, { key: 1 }, [
|
|
2868
2868
|
Y($(o(l)("grid.editData")), 1)
|
|
2869
2869
|
], 64))
|
|
2870
2870
|
]),
|
|
@@ -2874,14 +2874,14 @@ const an = {
|
|
|
2874
2874
|
r("span", eo, [
|
|
2875
2875
|
T(Xn, {
|
|
2876
2876
|
columns: o(d),
|
|
2877
|
-
"onUpdate:columns": m[1] || (m[1] = (a) =>
|
|
2877
|
+
"onUpdate:columns": m[1] || (m[1] = (a) => ge(d) ? d.value = a : null)
|
|
2878
2878
|
}, null, 8, ["columns"])
|
|
2879
2879
|
]),
|
|
2880
|
-
o(c) ? (
|
|
2880
|
+
o(c) ? (i(), u("span", lo, [
|
|
2881
2881
|
T(xe, {
|
|
2882
2882
|
class: "cl-w-full lg:cl-w-auto",
|
|
2883
2883
|
size: "small",
|
|
2884
|
-
onClick: m[2] || (m[2] = ae((a) =>
|
|
2884
|
+
onClick: m[2] || (m[2] = ae((a) => s.$emit("reset-filters"), ["prevent"]))
|
|
2885
2885
|
}, {
|
|
2886
2886
|
default: Q(() => [
|
|
2887
2887
|
Y($(o(l)("grid.clearFilters")), 1)
|
|
@@ -2889,12 +2889,12 @@ const an = {
|
|
|
2889
2889
|
_: 1
|
|
2890
2890
|
})
|
|
2891
2891
|
])) : N("", !0),
|
|
2892
|
-
o(c) ? (
|
|
2892
|
+
o(c) ? (i(), u("span", to, [
|
|
2893
2893
|
T(xe, {
|
|
2894
2894
|
class: "cl-w-full",
|
|
2895
2895
|
colour: "blue",
|
|
2896
2896
|
size: "small",
|
|
2897
|
-
onClick: m[3] || (m[3] = ae((a) =>
|
|
2897
|
+
onClick: m[3] || (m[3] = ae((a) => s.$emit("update:filter-panel-open", !0), ["prevent"]))
|
|
2898
2898
|
}, {
|
|
2899
2899
|
default: Q(() => [
|
|
2900
2900
|
Y($(o(l)("grid.modifyFilters")), 1)
|
|
@@ -2904,10 +2904,10 @@ const an = {
|
|
|
2904
2904
|
])) : N("", !0)
|
|
2905
2905
|
], 64));
|
|
2906
2906
|
}
|
|
2907
|
-
}), no = { class: "cl-hidden cl-mb-4 cl-w-full lg:cl-block lg:cl-text-right" }, oo = ["data-loading"], co = { class: "cl-absolute cl-bg-white cl-h-full cl-opacity-40 cl-w-full cl-z-20" }, ao = { class: "cl-bg-white cl-flex cl-flex-wrap cl-sticky cl-top-0 cl-w-full lg:cl-hidden" },
|
|
2907
|
+
}), no = { class: "cl-hidden cl-mb-4 cl-w-full lg:cl-block lg:cl-text-right" }, oo = ["data-loading"], co = { class: "cl-absolute cl-bg-white cl-h-full cl-opacity-40 cl-w-full cl-z-20" }, ao = { class: "cl-bg-white cl-flex cl-flex-wrap cl-sticky cl-top-0 cl-w-full lg:cl-hidden" }, io = { class: "cl-border-b cl-border-grey-2 cl-flex cl-flex-wrap cl-px-2 cl-py-4 cl-w-full" }, so = { class: "cl-mb-4 cl-text-sm cl-w-full" }, ro = { class: "cl-flex cl-flex-wrap cl-w-full" }, uo = { class: "!cl-bg-white cl-absolute cl-h-screen cl-overflow-x-auto cl-p-4 cl-text-sm cl-w-full cl-z-10" }, fo = { class: "cl-border-b cl-border-grey-2 cl-mb-2 cl-pb-2 cl-text-right cl-w-full" }, mo = { key: 0 }, go = { key: 1 }, bo = { class: "cl-self-center" }, ho = { key: 1 }, vo = {
|
|
2908
2908
|
key: 3,
|
|
2909
2909
|
class: "cl-ml-2"
|
|
2910
|
-
}, po = { class: "cl-overflow-auto cl-w-full" }, yo = { class: "cl-min-w-full cl-table-fixed" }, wo = { class: "cl-hidden lg:cl-table-column-group" }, xo = { class: "cl-hidden lg:cl-table-header-group" }, $o = ["onClick"], ko = { key: 1 }, To = { key: 0 }, Co = { key: 1 }, So = ["colspan"],
|
|
2910
|
+
}, po = { class: "cl-overflow-auto cl-w-full" }, yo = { class: "cl-min-w-full cl-table-fixed" }, wo = { class: "cl-hidden lg:cl-table-column-group" }, xo = { class: "cl-hidden lg:cl-table-header-group" }, $o = ["onClick"], ko = { key: 1 }, To = { key: 0 }, Co = { key: 1 }, So = ["colspan"], Oo = { class: "cl-my-10 cl-py-1 cl-text-center cl-text-sm cl-w-full" }, Eo = {
|
|
2911
2911
|
key: 0,
|
|
2912
2912
|
class: "cl-w-full"
|
|
2913
2913
|
}, jo = /* @__PURE__ */ H({
|
|
@@ -2927,7 +2927,7 @@ const an = {
|
|
|
2927
2927
|
"edit-end": null
|
|
2928
2928
|
},
|
|
2929
2929
|
setup(e, { emit: n }) {
|
|
2930
|
-
const t = e, { t: l } =
|
|
2930
|
+
const t = e, { t: l } = se(), c = M({}), d = M(!1), s = M({
|
|
2931
2931
|
index: -1,
|
|
2932
2932
|
record: {}
|
|
2933
2933
|
}), m = M(!1), a = A({
|
|
@@ -2960,7 +2960,7 @@ const an = {
|
|
|
2960
2960
|
}
|
|
2961
2961
|
function F(v) {
|
|
2962
2962
|
if (typeof v < "u") {
|
|
2963
|
-
const w =
|
|
2963
|
+
const w = be(t.request);
|
|
2964
2964
|
w.sort === null || w.sort.sortOnColumn !== v ? w.sort = {
|
|
2965
2965
|
sortOnColumn: v,
|
|
2966
2966
|
sortByAscending: !0
|
|
@@ -2968,41 +2968,41 @@ const an = {
|
|
|
2968
2968
|
}
|
|
2969
2969
|
}
|
|
2970
2970
|
function I() {
|
|
2971
|
-
const v =
|
|
2971
|
+
const v = be(f.value);
|
|
2972
2972
|
v.pageNumber = 1, v.filters = [], f.value = v;
|
|
2973
2973
|
}
|
|
2974
2974
|
function G(v) {
|
|
2975
|
-
|
|
2975
|
+
s.value.index !== -1 && s.value.index !== v && y(), s.value.index = v;
|
|
2976
2976
|
}
|
|
2977
|
-
function
|
|
2978
|
-
w !== void 0 && (
|
|
2977
|
+
function O(v, w) {
|
|
2978
|
+
w !== void 0 && (s.value.record[w] = v);
|
|
2979
2979
|
}
|
|
2980
|
-
function
|
|
2980
|
+
function E(v) {
|
|
2981
2981
|
if (v !== void 0) {
|
|
2982
|
-
const { [v]: w, ...q } =
|
|
2983
|
-
|
|
2982
|
+
const { [v]: w, ...q } = s.value.record;
|
|
2983
|
+
s.value.record = {
|
|
2984
2984
|
...q
|
|
2985
2985
|
};
|
|
2986
2986
|
}
|
|
2987
2987
|
}
|
|
2988
2988
|
function y() {
|
|
2989
|
-
Object.keys(
|
|
2989
|
+
Object.keys(s.value.record).length !== 0 && (n("row-edit", be(s.value)), s.value.record = {});
|
|
2990
2990
|
}
|
|
2991
|
-
return
|
|
2991
|
+
return Oe(() => {
|
|
2992
2992
|
window.addEventListener("resize", h), h();
|
|
2993
2993
|
}), Ie(() => window.removeEventListener("resize", h)), ee(() => t.request, () => n("data-request"), {
|
|
2994
2994
|
deep: !0,
|
|
2995
2995
|
immediate: !0
|
|
2996
2996
|
}), ee(() => d.value, () => {
|
|
2997
|
-
d.value ? n("edit-start") : (y(), n("edit-end"),
|
|
2997
|
+
d.value ? n("edit-start") : (y(), n("edit-end"), s.value.index = -1);
|
|
2998
2998
|
}), (v, w) => {
|
|
2999
2999
|
var X, le;
|
|
3000
3000
|
const q = _("icon");
|
|
3001
|
-
return
|
|
3001
|
+
return i(), u(z, null, [
|
|
3002
3002
|
r("div", no, [
|
|
3003
3003
|
T(Xe, {
|
|
3004
3004
|
columns: o(a),
|
|
3005
|
-
"onUpdate:columns": w[0] || (w[0] = (g) =>
|
|
3005
|
+
"onUpdate:columns": w[0] || (w[0] = (g) => ge(a) ? a.value = g : null),
|
|
3006
3006
|
"edit-mode": d.value,
|
|
3007
3007
|
"onUpdate:edit-mode": w[1] || (w[1] = (g) => d.value = g),
|
|
3008
3008
|
"edit-enabled": o(S),
|
|
@@ -3022,12 +3022,12 @@ const an = {
|
|
|
3022
3022
|
_: 1
|
|
3023
3023
|
}),
|
|
3024
3024
|
r("div", ao, [
|
|
3025
|
-
r("div",
|
|
3026
|
-
r("strong",
|
|
3025
|
+
r("div", io, [
|
|
3026
|
+
r("strong", so, $(o(l)("grid.gridTools")), 1),
|
|
3027
3027
|
r("div", ro, [
|
|
3028
3028
|
T(Xe, {
|
|
3029
3029
|
columns: o(a),
|
|
3030
|
-
"onUpdate:columns": w[2] || (w[2] = (g) =>
|
|
3030
|
+
"onUpdate:columns": w[2] || (w[2] = (g) => ge(a) ? a.value = g : null),
|
|
3031
3031
|
"edit-mode": d.value,
|
|
3032
3032
|
"onUpdate:edit-mode": w[3] || (w[3] = (g) => d.value = g),
|
|
3033
3033
|
"filter-panel-open": m.value,
|
|
@@ -3057,41 +3057,41 @@ const an = {
|
|
|
3057
3057
|
}])
|
|
3058
3058
|
}, [
|
|
3059
3059
|
r("div", null, $(o(l)("grid.field")), 1),
|
|
3060
|
-
o(k) ? (
|
|
3061
|
-
o(b) ? (
|
|
3060
|
+
o(k) ? (i(), u("div", mo, $(o(l)("grid.filter")), 1)) : N("", !0),
|
|
3061
|
+
o(b) ? (i(), u("div", go, $(o(l)("grid.sortBy")), 1)) : N("", !0)
|
|
3062
3062
|
], 2),
|
|
3063
|
-
(
|
|
3063
|
+
(i(!0), u(z, null, ce(o(p).filter((g) => g.filterable || g.filterable === void 0 || g.sortable || g.sortable === void 0), (g, j) => (i(), u("div", {
|
|
3064
3064
|
key: j,
|
|
3065
3065
|
class: "cl-grid cl-grid-cols-3 cl-mb-4 cl-w-full"
|
|
3066
3066
|
}, [
|
|
3067
3067
|
r("div", bo, $(g.caption), 1),
|
|
3068
|
-
g.filterable || g.filterable === void 0 ? (
|
|
3068
|
+
g.filterable || g.filterable === void 0 ? (i(), K(Ye, {
|
|
3069
3069
|
key: 0,
|
|
3070
3070
|
request: o(f),
|
|
3071
|
-
"onUpdate:request": w[6] || (w[6] = (P) =>
|
|
3071
|
+
"onUpdate:request": w[6] || (w[6] = (P) => ge(f) ? f.value = P : null),
|
|
3072
3072
|
column: g,
|
|
3073
3073
|
class: U({
|
|
3074
3074
|
"cl-col-span-2": !o(b)
|
|
3075
3075
|
})
|
|
3076
|
-
}, null, 8, ["request", "column", "class"])) : o(k) ? (
|
|
3077
|
-
(g.type !== "slot" || g.slotType !== void 0 && g.field !== void 0) && (g.sortable === void 0 || g.sortable === !0) ? (
|
|
3078
|
-
o(f).sort === null || o(f).sort.sortOnColumn !== g.field ? (
|
|
3076
|
+
}, null, 8, ["request", "column", "class"])) : o(k) ? (i(), u("div", ho)) : N("", !0),
|
|
3077
|
+
(g.type !== "slot" || g.slotType !== void 0 && g.field !== void 0) && (g.sortable === void 0 || g.sortable === !0) ? (i(), u(z, { key: 2 }, [
|
|
3078
|
+
o(f).sort === null || o(f).sort.sortOnColumn !== g.field ? (i(), K(q, {
|
|
3079
3079
|
key: 0,
|
|
3080
3080
|
class: "cl-cursor-pointer cl-ml-2 cl-self-center",
|
|
3081
3081
|
icon: "ph:minus",
|
|
3082
3082
|
onClick: (P) => F(g.field)
|
|
3083
|
-
}, null, 8, ["onClick"])) : o(f).sort.sortByAscending === !1 ? (
|
|
3083
|
+
}, null, 8, ["onClick"])) : o(f).sort.sortByAscending === !1 ? (i(), K(q, {
|
|
3084
3084
|
key: 1,
|
|
3085
3085
|
class: "cl-cursor-pointer cl-ml-2 cl-self-center",
|
|
3086
3086
|
icon: "ph:caret-down",
|
|
3087
3087
|
onClick: (P) => F(g.field)
|
|
3088
|
-
}, null, 8, ["onClick"])) : (
|
|
3088
|
+
}, null, 8, ["onClick"])) : (i(), K(q, {
|
|
3089
3089
|
key: 2,
|
|
3090
3090
|
class: "cl-cursor-pointer cl-ml-2 cl-self-center",
|
|
3091
3091
|
icon: "ph:caret-up",
|
|
3092
3092
|
onClick: (P) => F(g.field)
|
|
3093
3093
|
}, null, 8, ["onClick"]))
|
|
3094
|
-
], 64)) : (
|
|
3094
|
+
], 64)) : (i(), u("div", vo, " \xA0 "))
|
|
3095
3095
|
]))), 128))
|
|
3096
3096
|
], 512), [
|
|
3097
3097
|
[V, m.value]
|
|
@@ -3103,7 +3103,7 @@ const an = {
|
|
|
3103
3103
|
r("div", po, [
|
|
3104
3104
|
r("table", yo, [
|
|
3105
3105
|
r("colgroup", wo, [
|
|
3106
|
-
(
|
|
3106
|
+
(i(!0), u(z, null, ce(o(p), (g, j) => (i(), u("col", {
|
|
3107
3107
|
key: j,
|
|
3108
3108
|
style: Ce(B(g.name)),
|
|
3109
3109
|
span: 1
|
|
@@ -3111,17 +3111,17 @@ const an = {
|
|
|
3111
3111
|
]),
|
|
3112
3112
|
r("thead", xo, [
|
|
3113
3113
|
r("tr", null, [
|
|
3114
|
-
(
|
|
3114
|
+
(i(!0), u(z, null, ce(o(p), (g, j) => {
|
|
3115
3115
|
var P;
|
|
3116
|
-
return
|
|
3116
|
+
return i(), u("th", {
|
|
3117
3117
|
key: j,
|
|
3118
3118
|
class: "cl-border-b cl-border-grey-2 cl-font-semibold cl-p-1 cl-text-grey-3 cl-text-left cl-text-sm",
|
|
3119
3119
|
style: Ce(B(g.name))
|
|
3120
3120
|
}, [
|
|
3121
|
-
e.data && ((P = e.data.results) == null ? void 0 : P.length) && (g.type !== "slot" || g.slotType !== void 0 && g.field !== void 0) && (g.sortable === void 0 || g.sortable === !0) ? (
|
|
3121
|
+
e.data && ((P = e.data.results) == null ? void 0 : P.length) && (g.type !== "slot" || g.slotType !== void 0 && g.field !== void 0) && (g.sortable === void 0 || g.sortable === !0) ? (i(), u("span", {
|
|
3122
3122
|
key: 0,
|
|
3123
3123
|
class: "cl-cursor-pointer",
|
|
3124
|
-
onClick: (
|
|
3124
|
+
onClick: (me) => F(g.field)
|
|
3125
3125
|
}, [
|
|
3126
3126
|
Y($(g.caption) + " ", 1),
|
|
3127
3127
|
L(T(q, {
|
|
@@ -3136,19 +3136,19 @@ const an = {
|
|
|
3136
3136
|
}, null, 512), [
|
|
3137
3137
|
[V, o(f).sort !== null && o(f).sort.sortOnColumn === g.field && o(f).sort.sortByAscending === !1]
|
|
3138
3138
|
])
|
|
3139
|
-
], 8, $o)) : (
|
|
3139
|
+
], 8, $o)) : (i(), u("span", ko, $(g.caption), 1))
|
|
3140
3140
|
], 4);
|
|
3141
3141
|
}), 128))
|
|
3142
3142
|
]),
|
|
3143
|
-
e.data && ((X = e.data.results) == null ? void 0 : X.length) || o(f).filters.length > 0 ? (
|
|
3144
|
-
(
|
|
3143
|
+
e.data && ((X = e.data.results) == null ? void 0 : X.length) || o(f).filters.length > 0 ? (i(), u("tr", To, [
|
|
3144
|
+
(i(!0), u(z, null, ce(o(p), (g, j) => (i(), u("th", {
|
|
3145
3145
|
key: j,
|
|
3146
3146
|
class: "cl-p-1",
|
|
3147
3147
|
style: Ce(B(g.name))
|
|
3148
3148
|
}, [
|
|
3149
3149
|
T(Ye, {
|
|
3150
3150
|
request: o(f),
|
|
3151
|
-
"onUpdate:request": w[7] || (w[7] = (P) =>
|
|
3151
|
+
"onUpdate:request": w[7] || (w[7] = (P) => ge(f) ? f.value = P : null),
|
|
3152
3152
|
column: g,
|
|
3153
3153
|
"first-half": j <= o(p).length / 2
|
|
3154
3154
|
}, null, 8, ["request", "column", "first-half"])
|
|
@@ -3156,15 +3156,15 @@ const an = {
|
|
|
3156
3156
|
])) : N("", !0)
|
|
3157
3157
|
]),
|
|
3158
3158
|
r("tbody", null, [
|
|
3159
|
-
e.data && ((le = e.data.results) == null ? void 0 : le.length) ? (
|
|
3159
|
+
e.data && ((le = e.data.results) == null ? void 0 : le.length) ? (i(!0), u(z, { key: 0 }, ce(e.data.results, (g, j) => (i(), u("tr", {
|
|
3160
3160
|
key: j,
|
|
3161
3161
|
class: U({
|
|
3162
3162
|
"cl-bg-white": j % 2 !== 1,
|
|
3163
3163
|
"cl-bg-off-white": j % 2 === 1
|
|
3164
3164
|
})
|
|
3165
3165
|
}, [
|
|
3166
|
-
(
|
|
3167
|
-
key:
|
|
3166
|
+
(i(!0), u(z, null, ce(o(p), (P, me) => (i(), K(Yt, {
|
|
3167
|
+
key: me,
|
|
3168
3168
|
class: "cl-p-2 cl-rounded cl-whitespace-nowrap",
|
|
3169
3169
|
style: Ce(B(P.name)),
|
|
3170
3170
|
column: P,
|
|
@@ -3172,24 +3172,24 @@ const an = {
|
|
|
3172
3172
|
"edit-mode": d.value,
|
|
3173
3173
|
onFocus: (C) => G(j),
|
|
3174
3174
|
onEdit: (C) => {
|
|
3175
|
-
G(j),
|
|
3175
|
+
G(j), O(C, P.field);
|
|
3176
3176
|
},
|
|
3177
|
-
onUndoEdit: (C) =>
|
|
3178
|
-
},
|
|
3177
|
+
onUndoEdit: (C) => E(P.field)
|
|
3178
|
+
}, sl({ _: 2 }, [
|
|
3179
3179
|
ce(v.$slots, (C, J) => ({
|
|
3180
3180
|
name: J,
|
|
3181
3181
|
fn: Q((x) => [
|
|
3182
|
-
R(v.$slots, J,
|
|
3182
|
+
R(v.$slots, J, ie(pe(x)), void 0, !0)
|
|
3183
3183
|
])
|
|
3184
3184
|
}))
|
|
3185
3185
|
]), 1032, ["style", "column", "record", "edit-mode", "onFocus", "onEdit", "onUndoEdit"]))), 128))
|
|
3186
|
-
], 2))), 128)) : (
|
|
3186
|
+
], 2))), 128)) : (i(), u("tr", Co, [
|
|
3187
3187
|
r("td", {
|
|
3188
3188
|
colspan: o(p).length
|
|
3189
3189
|
}, [
|
|
3190
|
-
r("div",
|
|
3190
|
+
r("div", Oo, [
|
|
3191
3191
|
r("strong", null, $(o(l)("grid.noData")), 1),
|
|
3192
|
-
o(f).filters.length > 0 ? (
|
|
3192
|
+
o(f).filters.length > 0 ? (i(), u("div", Eo, [
|
|
3193
3193
|
Y($(o(l)("grid.noDataFiltersPresent")) + " ", 1),
|
|
3194
3194
|
T(xe, {
|
|
3195
3195
|
size: "small",
|
|
@@ -3209,7 +3209,7 @@ const an = {
|
|
|
3209
3209
|
]),
|
|
3210
3210
|
T(zn, {
|
|
3211
3211
|
request: o(f),
|
|
3212
|
-
"onUpdate:request": w[8] || (w[8] = (g) =>
|
|
3212
|
+
"onUpdate:request": w[8] || (w[8] = (g) => ge(f) ? f.value = g : null),
|
|
3213
3213
|
data: e.data
|
|
3214
3214
|
}, null, 8, ["request", "data"])
|
|
3215
3215
|
], 8, oo)
|
|
@@ -3217,57 +3217,59 @@ const an = {
|
|
|
3217
3217
|
};
|
|
3218
3218
|
}
|
|
3219
3219
|
});
|
|
3220
|
-
const Ao = /* @__PURE__ */
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
R(
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
}
|
|
3230
|
-
|
|
3220
|
+
const Ao = /* @__PURE__ */ he(jo, [["__scopeId", "data-v-fd5a46a8"]]), Mo = { class: "cl-absolute cl-bg-secondary-default cl-flex cl-h-20 cl-items-center cl-justify-between cl-left-0 cl-top-0 cl-w-full cl-z-40" }, Io = /* @__PURE__ */ H({
|
|
3221
|
+
__name: "cl-ui-header",
|
|
3222
|
+
emits: ["open-click"],
|
|
3223
|
+
setup(e) {
|
|
3224
|
+
return (n, t) => (i(), u("header", Mo, [
|
|
3225
|
+
R(n.$slots, "logo"),
|
|
3226
|
+
r("div", {
|
|
3227
|
+
class: "cl-cursor-pointer cl-flex cl-flex-nowrap",
|
|
3228
|
+
onClick: t[0] || (t[0] = (l) => n.$emit("open-click"))
|
|
3229
|
+
}, [
|
|
3230
|
+
R(n.$slots, "menu"),
|
|
3231
|
+
R(n.$slots, "icon")
|
|
3232
|
+
])
|
|
3233
|
+
]));
|
|
3234
|
+
}
|
|
3235
|
+
}), No = { class: "cl-bg-blue-light md:cl-relative" }, qo = { class: "cl-bg-transparent cl-flex cl-items-center cl-select-none hover:cl-bg-opacity-10 hover:cl-bg-white md:cl-min-w-[320px]" }, Do = ["src"], Ro = { class: "cl-grow cl-hidden cl-my-4 cl-text-white md:cl-block" }, Uo = {
|
|
3231
3236
|
key: 0,
|
|
3232
|
-
class: "cl-
|
|
3233
|
-
},
|
|
3237
|
+
class: "cl-text-ellipsis cl-whitespace-nowrap"
|
|
3238
|
+
}, zo = {
|
|
3234
3239
|
key: 1,
|
|
3235
|
-
class: "cl-
|
|
3236
|
-
},
|
|
3240
|
+
class: "cl-text-ellipsis cl-text-xs cl-whitespace-nowrap"
|
|
3241
|
+
}, Bo = { class: "cl-content-center cl-flex cl-h-20 cl-items-center cl-justify-center cl-justify-items-center cl-transition-all cl-w-10 md:cl-ml-4 md:cl-w-20" }, Lo = { class: "cl-absolute cl-bg-white cl-right-0 cl-shadow-2xl cl-top-20 cl-w-full cl-z-20" }, Po = /* @__PURE__ */ H({
|
|
3237
3242
|
__name: "cl-ui-header-menu",
|
|
3238
3243
|
props: {
|
|
3239
3244
|
username: { default: "" },
|
|
3240
3245
|
group: { default: "" },
|
|
3241
|
-
image: { default: "" }
|
|
3246
|
+
image: { default: "" },
|
|
3247
|
+
isOpen: { type: Boolean }
|
|
3242
3248
|
},
|
|
3243
3249
|
setup(e) {
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
e.image ? (s(), u("img", {
|
|
3250
|
+
return (n, t) => {
|
|
3251
|
+
const l = _("icon");
|
|
3252
|
+
return i(), u("div", No, [
|
|
3253
|
+
r("div", qo, [
|
|
3254
|
+
e.image ? (i(), u("img", {
|
|
3250
3255
|
key: 0,
|
|
3251
3256
|
src: e.image,
|
|
3252
3257
|
class: "cl-hidden cl-m-4 cl-max-h-12 cl-max-w-12 cl-ring-2 cl-ring-white cl-rounded-full md:cl-block"
|
|
3253
|
-
}, null, 8,
|
|
3258
|
+
}, null, 8, Do)) : (i(), K(l, {
|
|
3254
3259
|
key: 1,
|
|
3255
3260
|
class: "cl-hidden cl-m-4 cl-text-white md:cl-block",
|
|
3256
3261
|
icon: "ph:user-circle",
|
|
3257
3262
|
width: "48",
|
|
3258
3263
|
height: "48"
|
|
3259
3264
|
})),
|
|
3260
|
-
r("div",
|
|
3261
|
-
e.username ? (
|
|
3262
|
-
e.group ? (
|
|
3265
|
+
r("div", Ro, [
|
|
3266
|
+
e.username ? (i(), u("div", Uo, $(e.username), 1)) : N("", !0),
|
|
3267
|
+
e.group ? (i(), u("div", zo, $(e.group), 1)) : N("", !0)
|
|
3263
3268
|
]),
|
|
3264
|
-
r("div",
|
|
3265
|
-
|
|
3266
|
-
onClick: l[0] || (l[0] = (d) => n.value = !n.value)
|
|
3267
|
-
}, [
|
|
3268
|
-
T(c, {
|
|
3269
|
+
r("div", Bo, [
|
|
3270
|
+
T(l, {
|
|
3269
3271
|
class: U(["cl-text-white cl-transform-gpu cl-transition-transform", {
|
|
3270
|
-
"cl-rotate-180":
|
|
3272
|
+
"cl-rotate-180": e.isOpen
|
|
3271
3273
|
}]),
|
|
3272
3274
|
icon: "ph:caret-down"
|
|
3273
3275
|
}, null, 8, ["class"])
|
|
@@ -3275,10 +3277,10 @@ const Do = /* @__PURE__ */ me(Mo, [["render", qo]]), Ro = { class: "md:cl-relati
|
|
|
3275
3277
|
]),
|
|
3276
3278
|
T($e, { name: "fade" }, {
|
|
3277
3279
|
default: Q(() => [
|
|
3278
|
-
L(r("div",
|
|
3279
|
-
R(
|
|
3280
|
+
L(r("div", Lo, [
|
|
3281
|
+
R(n.$slots, "default")
|
|
3280
3282
|
], 512), [
|
|
3281
|
-
[V,
|
|
3283
|
+
[V, e.isOpen]
|
|
3282
3284
|
])
|
|
3283
3285
|
]),
|
|
3284
3286
|
_: 3
|
|
@@ -3286,7 +3288,7 @@ const Do = /* @__PURE__ */ me(Mo, [["render", qo]]), Ro = { class: "md:cl-relati
|
|
|
3286
3288
|
]);
|
|
3287
3289
|
};
|
|
3288
3290
|
}
|
|
3289
|
-
}),
|
|
3291
|
+
}), Vo = [
|
|
3290
3292
|
"button",
|
|
3291
3293
|
"checkbox",
|
|
3292
3294
|
"color",
|
|
@@ -3309,45 +3311,45 @@ const Do = /* @__PURE__ */ me(Mo, [["render", qo]]), Ro = { class: "md:cl-relati
|
|
|
3309
3311
|
function Le(e) {
|
|
3310
3312
|
return /[a-z]{2}-[A-Z]{2}/gm.test(e.localeCode);
|
|
3311
3313
|
}
|
|
3312
|
-
function
|
|
3314
|
+
function Fo(e) {
|
|
3313
3315
|
let n = Array.isArray(e);
|
|
3314
3316
|
if (n) {
|
|
3315
3317
|
for (const t of e)
|
|
3316
|
-
if (!
|
|
3318
|
+
if (!Ho(t)) {
|
|
3317
3319
|
n = !1;
|
|
3318
3320
|
break;
|
|
3319
3321
|
}
|
|
3320
3322
|
}
|
|
3321
3323
|
return n;
|
|
3322
3324
|
}
|
|
3323
|
-
function
|
|
3325
|
+
function Ho(e) {
|
|
3324
3326
|
return typeof e.name == "string" && typeof e.nativeName == "string" && typeof e.localeCode == "string";
|
|
3325
3327
|
}
|
|
3326
|
-
const
|
|
3328
|
+
const Go = {
|
|
3327
3329
|
key: 0,
|
|
3328
3330
|
class: "cl-flex cl-relative cl-select-none cl-w-auto cl-z-30"
|
|
3329
|
-
},
|
|
3331
|
+
}, Wo = { class: "cl-absolute cl-bg-white cl-border cl-border-grey-0 cl-overflow-hidden cl-right-0 cl-rounded cl-shadow-xl cl-text-black cl-top-6 cl-z-3" }, Jo = ["data-localename", "data-localecode", "onClick"], Ko = { class: "cl-text-xs" }, Zo = /* @__PURE__ */ H({
|
|
3330
3332
|
__name: "cl-ui-language-switcher",
|
|
3331
3333
|
props: {
|
|
3332
3334
|
supportedLanguages: null,
|
|
3333
3335
|
disabled: { type: Boolean, default: !1 }
|
|
3334
3336
|
},
|
|
3335
3337
|
setup(e) {
|
|
3336
|
-
const n = e, { locale: t } =
|
|
3338
|
+
const n = e, { locale: t } = se(), l = M(!1), c = A(() => {
|
|
3337
3339
|
var m;
|
|
3338
3340
|
return (m = n.supportedLanguages.find((a) => a.localeCode === t.value)) != null ? m : null;
|
|
3339
3341
|
}), d = A(() => n.supportedLanguages.filter((m) => Le(m)).sort((m, a) => m.nativeName > a.nativeName ? 1 : a.nativeName > m.nativeName ? -1 : 0));
|
|
3340
|
-
function
|
|
3342
|
+
function s() {
|
|
3341
3343
|
n.disabled || (l.value = !l.value);
|
|
3342
3344
|
}
|
|
3343
3345
|
return ee(() => n.disabled, (m) => {
|
|
3344
3346
|
m && (l.value = !1);
|
|
3345
|
-
}), (m, a) => o(c) !== null && o(Le)(o(c)) ? (
|
|
3347
|
+
}), (m, a) => o(c) !== null && o(Le)(o(c)) ? (i(), u("div", Go, [
|
|
3346
3348
|
r("div", {
|
|
3347
3349
|
class: U(["cl-flex cl-items-center", {
|
|
3348
3350
|
"cl-cursor-pointer": !e.disabled
|
|
3349
3351
|
}]),
|
|
3350
|
-
onClick:
|
|
3352
|
+
onClick: s
|
|
3351
3353
|
}, [
|
|
3352
3354
|
r("span", {
|
|
3353
3355
|
class: U(["cl-font-semibold cl-text-xs", {
|
|
@@ -3357,18 +3359,18 @@ const Jo = {
|
|
|
3357
3359
|
], 2),
|
|
3358
3360
|
T($e, { name: "fade" }, {
|
|
3359
3361
|
default: Q(() => [
|
|
3360
|
-
L(r("div",
|
|
3361
|
-
(
|
|
3362
|
+
L(r("div", Wo, [
|
|
3363
|
+
(i(!0), u(z, null, ce(o(d), (f, p) => (i(), u("div", {
|
|
3362
3364
|
key: p,
|
|
3363
3365
|
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",
|
|
3364
3366
|
"data-localename": f.name,
|
|
3365
3367
|
"data-localecode": f.localeCode,
|
|
3366
3368
|
onClick: (b) => {
|
|
3367
|
-
t.value = f.localeCode,
|
|
3369
|
+
t.value = f.localeCode, s();
|
|
3368
3370
|
}
|
|
3369
3371
|
}, [
|
|
3370
|
-
r("span",
|
|
3371
|
-
], 8,
|
|
3372
|
+
r("span", Ko, $(f.nativeName), 1)
|
|
3373
|
+
], 8, Jo))), 128))
|
|
3372
3374
|
], 512), [
|
|
3373
3375
|
[V, l.value]
|
|
3374
3376
|
])
|
|
@@ -3377,10 +3379,10 @@ const Jo = {
|
|
|
3377
3379
|
})
|
|
3378
3380
|
])) : N("", !0);
|
|
3379
3381
|
}
|
|
3380
|
-
}),
|
|
3382
|
+
}), Qo = { class: "cl-relative" }, Yo = { class: "cl-h-screen cl-z-0" }, Xo = { class: "cl-absolute cl-bg-secondary-default cl-gap-y-1 cl-grid cl-grid-cols-1 cl-left-0 cl-opacity-95 cl-p-6 cl-top-0 cl-w-full cl-z-10 lg:cl-gap-x-1 lg:cl-grid-cols-10 lg:cl-p-10" }, _o = { class: "cl-col-span-10 lg:cl-col-span-3" }, ec = {
|
|
3381
3383
|
key: 0,
|
|
3382
3384
|
class: "cl-col-span-10 cl-flex cl-items-start cl-justify-end cl-text-white lg:cl-col-span-1 lg:cl-p-2"
|
|
3383
|
-
},
|
|
3385
|
+
}, lc = { class: "cl-col-span-3" }, tc = { class: "cl-inline cl-relative cl-text-grey-4" }, nc = { class: "cl-col-span-3" }, oc = { class: "cl-inline cl-relative cl-text-grey-4" }, cc = { class: "cl-col-span-10 cl-emphasis-danger cl-mt-10 cl-p-3 cl-rounded-md cl-text-sm md:cl-mt-3" }, ac = /* @__PURE__ */ H({
|
|
3384
3386
|
__name: "cl-ui-login",
|
|
3385
3387
|
props: {
|
|
3386
3388
|
errors: { default: () => [] },
|
|
@@ -3391,7 +3393,7 @@ const Jo = {
|
|
|
3391
3393
|
"update:errors": null
|
|
3392
3394
|
},
|
|
3393
3395
|
setup(e, { emit: n }) {
|
|
3394
|
-
const { t } =
|
|
3396
|
+
const { t } = se(), l = M(""), c = M(""), d = M("password"), s = M();
|
|
3395
3397
|
function m() {
|
|
3396
3398
|
const b = {
|
|
3397
3399
|
username: l.value,
|
|
@@ -3410,19 +3412,19 @@ const Jo = {
|
|
|
3410
3412
|
return typeof k == "string" && k.trim() === "" && (S.valid = !1), S;
|
|
3411
3413
|
}
|
|
3412
3414
|
function p(b, k) {
|
|
3413
|
-
|
|
3415
|
+
s.value = b;
|
|
3414
3416
|
}
|
|
3415
3417
|
return (b, k) => {
|
|
3416
3418
|
const S = _("icon");
|
|
3417
|
-
return
|
|
3418
|
-
r("div",
|
|
3419
|
+
return i(), u("div", Qo, [
|
|
3420
|
+
r("div", Yo, [
|
|
3419
3421
|
R(b.$slots, "background")
|
|
3420
3422
|
]),
|
|
3421
|
-
r("form",
|
|
3422
|
-
r("div",
|
|
3423
|
+
r("form", Xo, [
|
|
3424
|
+
r("div", _o, [
|
|
3423
3425
|
R(b.$slots, "logo")
|
|
3424
3426
|
]),
|
|
3425
|
-
b.$slots["language-switcher"] ? (
|
|
3427
|
+
b.$slots["language-switcher"] ? (i(), u("div", ec, [
|
|
3426
3428
|
R(b.$slots, "language-switcher")
|
|
3427
3429
|
])) : N("", !0),
|
|
3428
3430
|
r("div", {
|
|
@@ -3431,8 +3433,8 @@ const Jo = {
|
|
|
3431
3433
|
"cl-col-span-6": b.$slots["language-switcher"]
|
|
3432
3434
|
}])
|
|
3433
3435
|
}, [
|
|
3434
|
-
r("div",
|
|
3435
|
-
r("div",
|
|
3436
|
+
r("div", lc, [
|
|
3437
|
+
r("div", tc, [
|
|
3436
3438
|
T(S, {
|
|
3437
3439
|
class: "cl-absolute cl-left-3 cl-top-2.5",
|
|
3438
3440
|
icon: "ph:user",
|
|
@@ -3458,8 +3460,8 @@ const Jo = {
|
|
|
3458
3460
|
}, null, 8, ["modelValue", "highlight-when-valid", "label", "placeholder-text", "message-when-valid"])
|
|
3459
3461
|
])
|
|
3460
3462
|
]),
|
|
3461
|
-
r("div",
|
|
3462
|
-
r("div",
|
|
3463
|
+
r("div", nc, [
|
|
3464
|
+
r("div", oc, [
|
|
3463
3465
|
T(S, {
|
|
3464
3466
|
class: "cl-absolute cl-left-3 cl-top-2.5",
|
|
3465
3467
|
icon: "ph:lock",
|
|
@@ -3507,7 +3509,7 @@ const Jo = {
|
|
|
3507
3509
|
class: "!cl-leading-9 cl-w-full",
|
|
3508
3510
|
colour: "blue",
|
|
3509
3511
|
loading: e.loading,
|
|
3510
|
-
disabled: !
|
|
3512
|
+
disabled: !s.value || c.value === "",
|
|
3511
3513
|
onClick: ae(m, ["prevent"])
|
|
3512
3514
|
}, {
|
|
3513
3515
|
default: Q(() => [
|
|
@@ -3521,8 +3523,8 @@ const Jo = {
|
|
|
3521
3523
|
default: Q(() => {
|
|
3522
3524
|
var h;
|
|
3523
3525
|
return [
|
|
3524
|
-
L(r("span",
|
|
3525
|
-
(
|
|
3526
|
+
L(r("span", cc, [
|
|
3527
|
+
(i(!0), u(z, null, ce(e.errors, (B, F) => (i(), u("div", {
|
|
3526
3528
|
key: F,
|
|
3527
3529
|
class: "cl-font-semibold"
|
|
3528
3530
|
}, $(B), 1))), 128))
|
|
@@ -3537,40 +3539,40 @@ const Jo = {
|
|
|
3537
3539
|
]);
|
|
3538
3540
|
};
|
|
3539
3541
|
}
|
|
3540
|
-
}),
|
|
3542
|
+
}), ic = [
|
|
3541
3543
|
"x-small",
|
|
3542
3544
|
"small",
|
|
3543
3545
|
"medium",
|
|
3544
3546
|
"large"
|
|
3545
|
-
],
|
|
3547
|
+
], sc = [
|
|
3546
3548
|
"primary",
|
|
3547
3549
|
"secondary",
|
|
3548
3550
|
"white"
|
|
3549
|
-
],
|
|
3551
|
+
], rc = { class: "cl-flex cl-flex-nowrap cl-h-full cl-max-h-full cl-min-h-full cl-min-w-20 cl-relative cl-self-start cl-w-auto" }, uc = {
|
|
3550
3552
|
id: "group-container",
|
|
3551
3553
|
class: "cl-bg-blue-default cl-h-full cl-left-0 cl-max-h-full cl-min-h-full cl-min-w-20 cl-overflow-y-auto cl-self-start cl-sticky cl-w-20 cl-z-30"
|
|
3552
|
-
},
|
|
3554
|
+
}, dc = { class: "cl-relative cl-w-full" }, fc = /* @__PURE__ */ H({
|
|
3553
3555
|
__name: "cl-ui-navigation",
|
|
3554
3556
|
setup(e) {
|
|
3555
|
-
const n = A(() => t.value.filter((
|
|
3556
|
-
function c(
|
|
3557
|
-
let m = t.value.find((a) => a.id ===
|
|
3557
|
+
const n = A(() => t.value.filter((s) => s.open === !0).length > 0), t = M([]), l = M(!1);
|
|
3558
|
+
function c(s) {
|
|
3559
|
+
let m = t.value.find((a) => a.id === s);
|
|
3558
3560
|
return m || (m = {
|
|
3559
|
-
id:
|
|
3561
|
+
id: s,
|
|
3560
3562
|
open: !1
|
|
3561
3563
|
}, t.value.push(m)), m.open;
|
|
3562
3564
|
}
|
|
3563
|
-
function d(
|
|
3564
|
-
const m = t.value.find((a) => a.id ===
|
|
3565
|
+
function d(s) {
|
|
3566
|
+
const m = t.value.find((a) => a.id === s);
|
|
3565
3567
|
m && (m.open = !m.open, t.value.forEach((a) => {
|
|
3566
|
-
a.id !==
|
|
3568
|
+
a.id !== s && (a.open = !1);
|
|
3567
3569
|
}));
|
|
3568
3570
|
}
|
|
3569
|
-
return (
|
|
3571
|
+
return (s, m) => {
|
|
3570
3572
|
const a = _("icon");
|
|
3571
|
-
return
|
|
3572
|
-
r("div",
|
|
3573
|
-
R(
|
|
3573
|
+
return i(), u("div", rc, [
|
|
3574
|
+
r("div", uc, [
|
|
3575
|
+
R(s.$slots, "icon", ie(pe({ groupIsOpen: c, toggleOpen: d })), void 0, !0)
|
|
3574
3576
|
]),
|
|
3575
3577
|
T($e, { name: "slide-right" }, {
|
|
3576
3578
|
default: Q(() => [
|
|
@@ -3580,22 +3582,22 @@ const Jo = {
|
|
|
3580
3582
|
"cl-absolute cl-left-20 cl-shadow-lg": !l.value
|
|
3581
3583
|
}])
|
|
3582
3584
|
}, [
|
|
3583
|
-
r("div",
|
|
3585
|
+
r("div", dc, [
|
|
3584
3586
|
r("span", {
|
|
3585
3587
|
class: "cl-absolute cl-cursor-pointer cl-h-8 cl-hidden cl-leading-8 cl-right-0 cl-text-center cl-top-0 cl-w-8 md:cl-inline-block",
|
|
3586
3588
|
onClick: m[0] || (m[0] = (f) => l.value = !l.value)
|
|
3587
3589
|
}, [
|
|
3588
|
-
l.value ? (
|
|
3590
|
+
l.value ? (i(), K(a, {
|
|
3589
3591
|
key: 1,
|
|
3590
3592
|
class: "cl-inline-block",
|
|
3591
3593
|
icon: "ph:push-pin-slash"
|
|
3592
|
-
})) : (
|
|
3594
|
+
})) : (i(), K(a, {
|
|
3593
3595
|
key: 0,
|
|
3594
3596
|
class: "cl-inline-block",
|
|
3595
3597
|
icon: "ph:push-pin"
|
|
3596
3598
|
}))
|
|
3597
3599
|
]),
|
|
3598
|
-
R(
|
|
3600
|
+
R(s.$slots, "default", ie(pe({ groupIsOpen: c })), void 0, !0)
|
|
3599
3601
|
])
|
|
3600
3602
|
], 2), [
|
|
3601
3603
|
[V, o(n)]
|
|
@@ -3607,7 +3609,7 @@ const Jo = {
|
|
|
3607
3609
|
};
|
|
3608
3610
|
}
|
|
3609
3611
|
});
|
|
3610
|
-
const
|
|
3612
|
+
const mc = /* @__PURE__ */ he(fc, [["__scopeId", "data-v-2b734d16"]]), gc = /* @__PURE__ */ H({
|
|
3611
3613
|
__name: "cl-ui-navigation-icon",
|
|
3612
3614
|
props: {
|
|
3613
3615
|
icon: null,
|
|
@@ -3616,7 +3618,7 @@ const bc = /* @__PURE__ */ me(gc, [["__scopeId", "data-v-2b734d16"]]), hc = /* @
|
|
|
3616
3618
|
setup(e) {
|
|
3617
3619
|
return (n, t) => {
|
|
3618
3620
|
const l = _("icon");
|
|
3619
|
-
return
|
|
3621
|
+
return i(), u("div", {
|
|
3620
3622
|
class: U(["cl-cursor-pointer cl-flex cl-h-20 cl-items-center cl-justify-center cl-text-off-white cl-transition-colors cl-w-20 hover:cl-bg-blue-light", {
|
|
3621
3623
|
"cl-bg-blue-light": e.open
|
|
3622
3624
|
}])
|
|
@@ -3629,45 +3631,45 @@ const bc = /* @__PURE__ */ me(gc, [["__scopeId", "data-v-2b734d16"]]), hc = /* @
|
|
|
3629
3631
|
], 2);
|
|
3630
3632
|
};
|
|
3631
3633
|
}
|
|
3632
|
-
}),
|
|
3634
|
+
}), bc = {
|
|
3633
3635
|
key: 0,
|
|
3634
3636
|
class: "cl-font-bold cl-leading-8 cl-mb-8 cl-pr-8 cl-select-none cl-text-blue-light cl-text-lg"
|
|
3635
|
-
},
|
|
3637
|
+
}, hc = { class: "cl-flex cl-flex-wrap cl-space-y-8 cl-text-sm cl-w-full" }, vc = /* @__PURE__ */ H({
|
|
3636
3638
|
__name: "cl-ui-navigation-group",
|
|
3637
3639
|
props: {
|
|
3638
3640
|
open: { type: Boolean }
|
|
3639
3641
|
},
|
|
3640
3642
|
setup(e) {
|
|
3641
|
-
return (n, t) => e.open ? (
|
|
3642
|
-
n.$slots.title ? (
|
|
3643
|
+
return (n, t) => e.open ? (i(), u(z, { key: 0 }, [
|
|
3644
|
+
n.$slots.title ? (i(), u("div", bc, [
|
|
3643
3645
|
R(n.$slots, "title")
|
|
3644
3646
|
])) : N("", !0),
|
|
3645
|
-
r("div",
|
|
3647
|
+
r("div", hc, [
|
|
3646
3648
|
R(n.$slots, "default")
|
|
3647
3649
|
])
|
|
3648
3650
|
], 64)) : N("", !0);
|
|
3649
3651
|
}
|
|
3650
|
-
}),
|
|
3652
|
+
}), pc = {}, yc = { class: "cl-w-full" }, wc = {
|
|
3651
3653
|
key: 0,
|
|
3652
3654
|
class: "cl-font-bold cl-mb-4 cl-select-none"
|
|
3653
|
-
},
|
|
3654
|
-
function
|
|
3655
|
-
return
|
|
3656
|
-
e.$slots.title ? (
|
|
3655
|
+
}, xc = { class: "cl-flex cl-flex-wrap cl-space-y-2" };
|
|
3656
|
+
function $c(e, n) {
|
|
3657
|
+
return i(), u("div", yc, [
|
|
3658
|
+
e.$slots.title ? (i(), u("div", wc, [
|
|
3657
3659
|
R(e.$slots, "title")
|
|
3658
3660
|
])) : N("", !0),
|
|
3659
|
-
r("span",
|
|
3661
|
+
r("span", xc, [
|
|
3660
3662
|
R(e.$slots, "default")
|
|
3661
3663
|
])
|
|
3662
3664
|
]);
|
|
3663
3665
|
}
|
|
3664
|
-
const
|
|
3665
|
-
function
|
|
3666
|
-
return
|
|
3666
|
+
const kc = /* @__PURE__ */ he(pc, [["render", $c]]), Tc = {}, Cc = { class: "cl-cursor-pointer cl-transition-colors cl-w-full hover:cl-text-blue-light" };
|
|
3667
|
+
function Sc(e, n) {
|
|
3668
|
+
return i(), u("div", Cc, [
|
|
3667
3669
|
R(e.$slots, "default")
|
|
3668
3670
|
]);
|
|
3669
3671
|
}
|
|
3670
|
-
const
|
|
3672
|
+
const Oc = /* @__PURE__ */ he(Tc, [["render", Sc]]), Ec = { class: "cl-w-full" }, jc = /* @__PURE__ */ H({
|
|
3671
3673
|
__name: "cl-ui-tab",
|
|
3672
3674
|
props: {
|
|
3673
3675
|
currentTab: { default: 0 },
|
|
@@ -3679,7 +3681,7 @@ const jc = /* @__PURE__ */ me(Sc, [["render", Oc]]), Ac = { class: "cl-w-full" }
|
|
|
3679
3681
|
function d(f) {
|
|
3680
3682
|
return f === n.currentTab;
|
|
3681
3683
|
}
|
|
3682
|
-
function
|
|
3684
|
+
function s() {
|
|
3683
3685
|
if (t.value) {
|
|
3684
3686
|
const f = t.value.scrollWidth - t.value.clientWidth;
|
|
3685
3687
|
l.value = t.value.scrollLeft > 0, c.value = t.value.scrollLeft < f;
|
|
@@ -3687,7 +3689,7 @@ const jc = /* @__PURE__ */ me(Sc, [["render", Oc]]), Ac = { class: "cl-w-full" }
|
|
|
3687
3689
|
l.value = !1, c.value = !1;
|
|
3688
3690
|
}
|
|
3689
3691
|
function m() {
|
|
3690
|
-
|
|
3692
|
+
s(), window.addEventListener("resize", s);
|
|
3691
3693
|
}
|
|
3692
3694
|
function a(f) {
|
|
3693
3695
|
if (t.value) {
|
|
@@ -3696,11 +3698,11 @@ const jc = /* @__PURE__ */ me(Sc, [["render", Oc]]), Ac = { class: "cl-w-full" }
|
|
|
3696
3698
|
f === "left" && (b = -p), t.value.scroll(t.value.scrollLeft + b, 0);
|
|
3697
3699
|
}
|
|
3698
3700
|
}
|
|
3699
|
-
return
|
|
3701
|
+
return Oe(() => m()), Ie(() => window.removeEventListener("resize", s)), (f, p) => {
|
|
3700
3702
|
const b = _("icon");
|
|
3701
|
-
return
|
|
3703
|
+
return i(), u("div", Ec, [
|
|
3702
3704
|
r("div", null, [
|
|
3703
|
-
l.value ? (
|
|
3705
|
+
l.value ? (i(), u("div", {
|
|
3704
3706
|
key: 0,
|
|
3705
3707
|
class: "cl-bg-white cl-cursor-pointer cl-float-left cl-h-11 cl-w-4",
|
|
3706
3708
|
onClick: p[0] || (p[0] = (k) => a("left"))
|
|
@@ -3722,11 +3724,11 @@ const jc = /* @__PURE__ */ me(Sc, [["render", Oc]]), Ac = { class: "cl-w-full" }
|
|
|
3722
3724
|
"cl-shadow-[inset_0_-1px_0_#d7d7d7]": e.disabled,
|
|
3723
3725
|
"cl-mr-4": c.value
|
|
3724
3726
|
}]),
|
|
3725
|
-
onScrollPassive:
|
|
3727
|
+
onScrollPassive: s
|
|
3726
3728
|
}, [
|
|
3727
|
-
R(f.$slots, "headings",
|
|
3729
|
+
R(f.$slots, "headings", ie(pe({ isTabOpen: d, disabled: e.disabled, colour: e.colour })))
|
|
3728
3730
|
], 34),
|
|
3729
|
-
c.value ? (
|
|
3731
|
+
c.value ? (i(), u("div", {
|
|
3730
3732
|
key: 1,
|
|
3731
3733
|
class: "cl-bg-white cl-bottom-12 cl-cursor-pointer cl-float-right cl-h-11 cl-relative cl-w-4",
|
|
3732
3734
|
onClick: p[1] || (p[1] = (k) => a("right"))
|
|
@@ -3737,11 +3739,11 @@ const jc = /* @__PURE__ */ me(Sc, [["render", Oc]]), Ac = { class: "cl-w-full" }
|
|
|
3737
3739
|
})
|
|
3738
3740
|
])) : N("", !0)
|
|
3739
3741
|
]),
|
|
3740
|
-
R(f.$slots, "content",
|
|
3742
|
+
R(f.$slots, "content", ie(pe({ isTabOpen: d, disabled: e.disabled, colour: e.colour })))
|
|
3741
3743
|
]);
|
|
3742
3744
|
};
|
|
3743
3745
|
}
|
|
3744
|
-
}),
|
|
3746
|
+
}), Ac = ["onKeyup"], Mc = /* @__PURE__ */ H({
|
|
3745
3747
|
__name: "cl-ui-tab-header",
|
|
3746
3748
|
props: {
|
|
3747
3749
|
id: null,
|
|
@@ -3754,10 +3756,10 @@ const jc = /* @__PURE__ */ me(Sc, [["render", Oc]]), Ac = { class: "cl-w-full" }
|
|
|
3754
3756
|
},
|
|
3755
3757
|
setup(e, { emit: n }) {
|
|
3756
3758
|
const t = e, l = M(), c = M(), d = A(() => t.id === t.currentTab);
|
|
3757
|
-
function
|
|
3759
|
+
function s() {
|
|
3758
3760
|
t.disabled || (l.value = !1, c.value = !1, n("update:currentTab", t.id));
|
|
3759
3761
|
}
|
|
3760
|
-
return (m, a) => (
|
|
3762
|
+
return (m, a) => (i(), u("div", {
|
|
3761
3763
|
class: U(["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", {
|
|
3762
3764
|
"!cl-cursor-default cl-text-grey-4 !cl-border-grey-2": e.disabled,
|
|
3763
3765
|
"cl-border cl-border-b-0 cl-rounded-t-md cl-shadow-[inset_0_-1px_0_#ffffff] cl-cursor-default": o(d),
|
|
@@ -3778,30 +3780,30 @@ const jc = /* @__PURE__ */ me(Sc, [["render", Oc]]), Ac = { class: "cl-w-full" }
|
|
|
3778
3780
|
"cl-bg-link-lighter": l.value && !e.disabled && e.colour === "blue"
|
|
3779
3781
|
}]),
|
|
3780
3782
|
tabindex: "0",
|
|
3781
|
-
onClick:
|
|
3783
|
+
onClick: s,
|
|
3782
3784
|
onMouseover: a[0] || (a[0] = (f) => c.value = !0),
|
|
3783
3785
|
onMouseout: a[1] || (a[1] = (f) => c.value = !1),
|
|
3784
3786
|
onFocusin: a[2] || (a[2] = (f) => l.value = !0),
|
|
3785
3787
|
onFocusout: a[3] || (a[3] = (f) => l.value = !1),
|
|
3786
|
-
onKeyup: Se(ae(
|
|
3788
|
+
onKeyup: Se(ae(s, ["self"]), ["enter"])
|
|
3787
3789
|
}, [
|
|
3788
3790
|
R(m.$slots, "default")
|
|
3789
|
-
], 42,
|
|
3791
|
+
], 42, Ac));
|
|
3790
3792
|
}
|
|
3791
|
-
}),
|
|
3792
|
-
function
|
|
3793
|
+
}), Ic = {};
|
|
3794
|
+
function Nc(e, n) {
|
|
3793
3795
|
return R(e.$slots, "default");
|
|
3794
3796
|
}
|
|
3795
|
-
const
|
|
3797
|
+
const qc = /* @__PURE__ */ he(Ic, [["render", Nc]]), Dc = [
|
|
3796
3798
|
"default",
|
|
3797
3799
|
"primary",
|
|
3798
3800
|
"secondary",
|
|
3799
3801
|
"danger",
|
|
3800
3802
|
"blue"
|
|
3801
|
-
],
|
|
3803
|
+
], Rc = [
|
|
3802
3804
|
"left",
|
|
3803
3805
|
"right"
|
|
3804
|
-
],
|
|
3806
|
+
], Uc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3805
3807
|
__proto__: null,
|
|
3806
3808
|
clUiAccordion: fl,
|
|
3807
3809
|
clUiAccordionItem: vl,
|
|
@@ -3825,32 +3827,32 @@ const Rc = /* @__PURE__ */ me(qc, [["render", Dc]]), Uc = [
|
|
|
3825
3827
|
filterMethodTypes: ln,
|
|
3826
3828
|
isFilterRequest: on,
|
|
3827
3829
|
isFilterResponse: cn,
|
|
3828
|
-
clUiHeader:
|
|
3829
|
-
clUiHeaderMenu:
|
|
3830
|
+
clUiHeader: Io,
|
|
3831
|
+
clUiHeaderMenu: Po,
|
|
3830
3832
|
clUiInput: fe,
|
|
3831
|
-
inputTypes:
|
|
3832
|
-
clUiLanguageSwitcher:
|
|
3833
|
+
inputTypes: Vo,
|
|
3834
|
+
clUiLanguageSwitcher: Zo,
|
|
3833
3835
|
isLanguageLocaleFormat: Le,
|
|
3834
|
-
isLanguageArray:
|
|
3836
|
+
isLanguageArray: Fo,
|
|
3835
3837
|
clUiLoadingSpinner: ll,
|
|
3836
|
-
clUiLogin:
|
|
3838
|
+
clUiLogin: ac,
|
|
3837
3839
|
clUiModal: tl,
|
|
3838
|
-
modalSizes:
|
|
3839
|
-
modalColours:
|
|
3840
|
-
clUiNavigation:
|
|
3841
|
-
clUiNavigationIcon:
|
|
3842
|
-
clUiNavigationGroup:
|
|
3843
|
-
clUiNavigationSection:
|
|
3844
|
-
clUiNavigationItem:
|
|
3840
|
+
modalSizes: ic,
|
|
3841
|
+
modalColours: sc,
|
|
3842
|
+
clUiNavigation: mc,
|
|
3843
|
+
clUiNavigationIcon: gc,
|
|
3844
|
+
clUiNavigationGroup: vc,
|
|
3845
|
+
clUiNavigationSection: kc,
|
|
3846
|
+
clUiNavigationItem: Oc,
|
|
3845
3847
|
clUiNotification: el,
|
|
3846
|
-
clUiTab:
|
|
3847
|
-
clUiTabHeader:
|
|
3848
|
-
clUiTabContent:
|
|
3849
|
-
tabColours:
|
|
3850
|
-
tabScroll:
|
|
3848
|
+
clUiTab: jc,
|
|
3849
|
+
clUiTabHeader: Mc,
|
|
3850
|
+
clUiTabContent: qc,
|
|
3851
|
+
tabColours: Dc,
|
|
3852
|
+
tabScroll: Rc
|
|
3851
3853
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3852
|
-
const
|
|
3853
|
-
e.use(oe), e.component("Icon", ol), Object.entries(
|
|
3854
|
+
const Kc = (e) => {
|
|
3855
|
+
e.use(oe), e.component("Icon", ol), Object.entries(Uc).forEach(([
|
|
3854
3856
|
n,
|
|
3855
3857
|
t
|
|
3856
3858
|
]) => {
|
|
@@ -3873,48 +3875,48 @@ export {
|
|
|
3873
3875
|
Dt as clUiComboBox,
|
|
3874
3876
|
Gt as clUiFooter,
|
|
3875
3877
|
Ao as clUiGrid,
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
+
Io as clUiHeader,
|
|
3879
|
+
Po as clUiHeaderMenu,
|
|
3878
3880
|
fe as clUiInput,
|
|
3879
|
-
|
|
3881
|
+
Zo as clUiLanguageSwitcher,
|
|
3880
3882
|
ll as clUiLoadingSpinner,
|
|
3881
|
-
|
|
3883
|
+
ac as clUiLogin,
|
|
3882
3884
|
tl as clUiModal,
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3885
|
+
mc as clUiNavigation,
|
|
3886
|
+
vc as clUiNavigationGroup,
|
|
3887
|
+
gc as clUiNavigationIcon,
|
|
3888
|
+
Oc as clUiNavigationItem,
|
|
3889
|
+
kc as clUiNavigationSection,
|
|
3888
3890
|
el as clUiNotification,
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3891
|
+
jc as clUiTab,
|
|
3892
|
+
qc as clUiTabContent,
|
|
3893
|
+
Mc as clUiTabHeader,
|
|
3892
3894
|
Bl as datetimeFormats,
|
|
3893
|
-
|
|
3895
|
+
Kc as default,
|
|
3894
3896
|
ln as filterMethodTypes,
|
|
3895
3897
|
Xt as gridColumnTypes,
|
|
3896
3898
|
oe as i18n,
|
|
3897
|
-
|
|
3899
|
+
Vo as inputTypes,
|
|
3898
3900
|
Ut as isComboBoxCreateRequest,
|
|
3899
3901
|
Rt as isComboBoxItem,
|
|
3900
3902
|
on as isFilterRequest,
|
|
3901
3903
|
cn as isFilterResponse,
|
|
3902
3904
|
nl as isGridColumn,
|
|
3903
3905
|
_t as isGridColumnArray,
|
|
3904
|
-
|
|
3906
|
+
Fo as isLanguageArray,
|
|
3905
3907
|
Le as isLanguageLocaleFormat,
|
|
3906
3908
|
Ul as messages,
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
+
sc as modalColours,
|
|
3910
|
+
ic as modalSizes,
|
|
3909
3911
|
zl as numberFormats,
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3912
|
+
Jc as setCurrentLocale,
|
|
3913
|
+
Wc as setLocaleDateTimeFormats,
|
|
3914
|
+
Hc as setLocaleMessages,
|
|
3915
|
+
Gc as setLocaleNumberFormats,
|
|
3914
3916
|
He as showNotification,
|
|
3915
3917
|
en as stringFormats,
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
+
Dc as tabColours,
|
|
3919
|
+
Rc as tabScroll,
|
|
3918
3920
|
Fl as validateEmail,
|
|
3919
3921
|
Pl as validateMaxValue,
|
|
3920
3922
|
Ll as validateMinValue
|