@citruslime/ui 2.2.2-beta.0 → 2.2.2-beta.1
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 N } from "@iconify/vue";
|
|
2
|
-
import { defineComponent as q, ref as C, openBlock as i, createElementBlock as g, renderSlot as A, normalizeProps as
|
|
2
|
+
import { defineComponent as q, ref as C, openBlock as i, createElementBlock as g, renderSlot as A, normalizeProps as le, guardReactiveProps as ce, Fragment as z, createElementVNode as u, normalizeClass as D, createVNode as y, unref as a, Transition as pe, withCtx as F, withDirectives as P, vShow as B, createBlock as L, Teleport as ze, renderList as _, mergeProps as fe, toDisplayString as k, createCommentVNode as I, nextTick as ye, computed as S, watch as J, onMounted as Ce, onUnmounted as Re, resolveComponent as el, isRef as be, normalizeStyle as ll, vModelText as ul, withModifiers as Q, vModelDynamic as dl, withKeys as Te, createTextVNode as X, watchEffect as fl, createSlots as Le } from "vue";
|
|
3
3
|
import { generateStringId as ml } from "@citruslime/utils";
|
|
4
|
-
import { createI18n as gl, useI18n as
|
|
5
|
-
import
|
|
6
|
-
import { useDebouncer as bl, copy as
|
|
4
|
+
import { createI18n as gl, useI18n as ne } from "vue-i18n";
|
|
5
|
+
import Ge from "flatpickr";
|
|
6
|
+
import { useDebouncer as bl, copy as ue } from "@citruslime/vue-utils";
|
|
7
7
|
import { useTimeoutFn as tl, useDebounceFn as nl, onClickOutside as al, useWindowSize as vl } from "@vueuse/core";
|
|
8
8
|
const hl = { class: "cl-overflow-hidden" }, pl = /* @__PURE__ */ q({
|
|
9
9
|
__name: "cl-ui-accordion",
|
|
@@ -26,7 +26,7 @@ const hl = { class: "cl-overflow-hidden" }, pl = /* @__PURE__ */ q({
|
|
|
26
26
|
}), s.open = !s.open);
|
|
27
27
|
}
|
|
28
28
|
return (r, s) => (i(), g("div", hl, [
|
|
29
|
-
A(r.$slots, "default",
|
|
29
|
+
A(r.$slots, "default", le(ce({ isItemOpen: l, toggleItem: o })))
|
|
30
30
|
]));
|
|
31
31
|
}
|
|
32
32
|
}), yl = { class: "cl-absolute cl-left-5 cl-top-5" }, wl = { class: "cl-font-semibold cl-ml-10 cl-p-4 cl-select-none cl-text-grey-5" }, xl = { class: "cl-overflow-hidden" }, $l = { class: "cl-ml-10 cl-p-4" }, kl = /* @__PURE__ */ q({
|
|
@@ -65,7 +65,7 @@ const hl = { class: "cl-overflow-hidden" }, pl = /* @__PURE__ */ q({
|
|
|
65
65
|
])
|
|
66
66
|
], 2),
|
|
67
67
|
u("div", xl, [
|
|
68
|
-
y(
|
|
68
|
+
y(pe, { name: "grow-down" }, {
|
|
69
69
|
default: F(() => [
|
|
70
70
|
P(u("div", $l, [
|
|
71
71
|
A(o.$slots, "default")
|
|
@@ -78,7 +78,7 @@ const hl = { class: "cl-overflow-hidden" }, pl = /* @__PURE__ */ q({
|
|
|
78
78
|
])
|
|
79
79
|
], 64));
|
|
80
80
|
}
|
|
81
|
-
}),
|
|
81
|
+
}), me = (e, n) => {
|
|
82
82
|
const t = e.__vccOpts || e;
|
|
83
83
|
for (const [l, o] of n)
|
|
84
84
|
t[l] = o;
|
|
@@ -89,8 +89,8 @@ function Sl(e, n) {
|
|
|
89
89
|
A(e.$slots, "default")
|
|
90
90
|
]);
|
|
91
91
|
}
|
|
92
|
-
const El = /* @__PURE__ */
|
|
93
|
-
function
|
|
92
|
+
const El = /* @__PURE__ */ me(Tl, [["render", Sl]]), Oe = C([]);
|
|
93
|
+
function He(e) {
|
|
94
94
|
const n = {
|
|
95
95
|
id: ml(),
|
|
96
96
|
...e
|
|
@@ -110,7 +110,7 @@ const jl = ["onClick"], Ol = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
110
110
|
position: { default: "top-right" }
|
|
111
111
|
},
|
|
112
112
|
setup(e) {
|
|
113
|
-
return (n, t) => (i(), L(
|
|
113
|
+
return (n, t) => (i(), L(ze, { to: e.container }, [
|
|
114
114
|
u("div", {
|
|
115
115
|
class: D(["cl-fixed cl-w-80 cl-z-40", {
|
|
116
116
|
"cl-top-5 cl-left-5": e.position === "top-left",
|
|
@@ -121,7 +121,7 @@ const jl = ["onClick"], Ol = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
121
121
|
"cl-bottom-5 cl-right-5": e.position === "bottom-right"
|
|
122
122
|
}])
|
|
123
123
|
}, [
|
|
124
|
-
(i(!0), g(z, null,
|
|
124
|
+
(i(!0), g(z, null, _(a(Oe), (l, o) => (i(), g("div", fe(n.$attrs, {
|
|
125
125
|
key: o,
|
|
126
126
|
class: ["cl-break-words cl-cursor-pointer cl-flex cl-font-semibold cl-group cl-mb-2 cl-overflow-hidden cl-p-4 cl-rounded cl-shadow-lg cl-text-sm", {
|
|
127
127
|
"cl-bg-white": l.colour === "default",
|
|
@@ -176,9 +176,9 @@ const Nl = {}, Dl = { class: "loading-spinner" };
|
|
|
176
176
|
function ql(e, n) {
|
|
177
177
|
return i(), g("div", Dl);
|
|
178
178
|
}
|
|
179
|
-
const
|
|
179
|
+
const Pe = /* @__PURE__ */ me(Nl, [["render", ql], ["__scopeId", "data-v-a21dc5d2"]]), Rl = ["disabled"], Pl = {
|
|
180
180
|
inheritAttrs: !1
|
|
181
|
-
},
|
|
181
|
+
}, ve = /* @__PURE__ */ q({
|
|
182
182
|
...Pl,
|
|
183
183
|
__name: "cl-ui-button",
|
|
184
184
|
props: {
|
|
@@ -194,10 +194,10 @@ const Fe = /* @__PURE__ */ ge(Nl, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
194
194
|
t.value && t.value.focus();
|
|
195
195
|
}
|
|
196
196
|
}), (l, o) => (i(), g(z, null, [
|
|
197
|
-
P(y(
|
|
197
|
+
P(y(Pe, { class: "relative" }, null, 512), [
|
|
198
198
|
[B, e.loading]
|
|
199
199
|
]),
|
|
200
|
-
P(u("button",
|
|
200
|
+
P(u("button", fe(l.$attrs, {
|
|
201
201
|
ref_key: "buttonRef",
|
|
202
202
|
ref: t,
|
|
203
203
|
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", {
|
|
@@ -209,6 +209,7 @@ const Fe = /* @__PURE__ */ ge(Nl, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
209
209
|
"cl-border-secondary-default cl-bg-secondary-default cl-text-white hover:cl-bg-secondary-light hover:cl-border-secondary-light": e.colour === "secondary",
|
|
210
210
|
"cl-border-danger-default cl-bg-danger-default cl-text-white hover:cl-bg-danger-dark hover:cl-border-danger-dark": e.colour === "danger",
|
|
211
211
|
"cl-border-link-default cl-bg-link-default cl-text-white hover:cl-bg-link-light hover:cl-border-link-light": e.colour === "blue",
|
|
212
|
+
"cl-border-orange-default cl-bg-orange-default cl-opacity-100 cl-text-white hover:cl-bg-orange-dark hover:cl-border-orange-dark": e.colour === "orange",
|
|
212
213
|
"!cl-border-grey-3 !cl-bg-grey-3 cl-text-grey-0 hover:!cl-bg-grey-3 hover:!cl-border-grey-3 cl-cursor-default": e.disabled
|
|
213
214
|
}],
|
|
214
215
|
disabled: e.disabled
|
|
@@ -224,7 +225,8 @@ const Fe = /* @__PURE__ */ ge(Nl, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
224
225
|
"primary",
|
|
225
226
|
"secondary",
|
|
226
227
|
"danger",
|
|
227
|
-
"blue"
|
|
228
|
+
"blue",
|
|
229
|
+
"orange"
|
|
228
230
|
], Bl = [
|
|
229
231
|
"small",
|
|
230
232
|
"medium",
|
|
@@ -282,7 +284,7 @@ const Fe = /* @__PURE__ */ ge(Nl, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
282
284
|
"medium",
|
|
283
285
|
"large"
|
|
284
286
|
];
|
|
285
|
-
var
|
|
287
|
+
var ee = /* @__PURE__ */ ((e) => (e.CURRENCY = "currency", e.PERCENTAGE = "percentage", e.INTEGER = "integer", e.DECIMAL = "decimal", e.MULTIPLIER = "multiplier", e))(ee || {}), G = /* @__PURE__ */ ((e) => (e.SHORT_DATE = "short-date", e.SHORT_DATETIME = "short-datetime", e.DATE = "date", e.DATETIME = "datetime", e.LONG_DATE = "long-date", e.LONG_DATETIME = "long-datetime", e.TIME = "time", e.MONTH_YEAR = "month-year", e))(G || {});
|
|
286
288
|
const Vl = {
|
|
287
289
|
"en-GB": {
|
|
288
290
|
comboBox: {
|
|
@@ -362,16 +364,16 @@ const Vl = {
|
|
|
362
364
|
}
|
|
363
365
|
}, Gl = {
|
|
364
366
|
"en-GB": {
|
|
365
|
-
[
|
|
367
|
+
[ee.PERCENTAGE]: {
|
|
366
368
|
style: "percent"
|
|
367
369
|
},
|
|
368
|
-
[
|
|
370
|
+
[ee.INTEGER]: {
|
|
369
371
|
maximumFractionDigits: 0
|
|
370
372
|
},
|
|
371
|
-
[
|
|
373
|
+
[ee.DECIMAL]: {
|
|
372
374
|
minimumFractionDigits: 1
|
|
373
375
|
},
|
|
374
|
-
[
|
|
376
|
+
[ee.CURRENCY]: {
|
|
375
377
|
style: "currency",
|
|
376
378
|
currency: "GBP",
|
|
377
379
|
currencyDisplay: "symbol"
|
|
@@ -424,7 +426,7 @@ const Vl = {
|
|
|
424
426
|
year: "numeric"
|
|
425
427
|
}
|
|
426
428
|
}
|
|
427
|
-
},
|
|
429
|
+
}, Y = gl({
|
|
428
430
|
locale: "en-GB",
|
|
429
431
|
fallbackLocale: "en-GB",
|
|
430
432
|
messages: Vl,
|
|
@@ -436,20 +438,20 @@ const Vl = {
|
|
|
436
438
|
warnHtmlMessage: !1
|
|
437
439
|
});
|
|
438
440
|
function Zo(e, n) {
|
|
439
|
-
return
|
|
441
|
+
return Y.global.mergeLocaleMessage(e, n), ye();
|
|
440
442
|
}
|
|
441
443
|
function Qo(e, n) {
|
|
442
|
-
return
|
|
444
|
+
return Y.global.mergeNumberFormat(e, n), ye();
|
|
443
445
|
}
|
|
444
446
|
function Yo(e, n) {
|
|
445
|
-
return
|
|
447
|
+
return Y.global.mergeDateTimeFormat(e, n), ye();
|
|
446
448
|
}
|
|
447
449
|
function Xo(e) {
|
|
448
|
-
return
|
|
450
|
+
return Y.global.locale.value = e, ye();
|
|
449
451
|
}
|
|
450
|
-
const { t:
|
|
452
|
+
const { t: se } = Y.global;
|
|
451
453
|
function Wl(e, n, t, l) {
|
|
452
|
-
const o =
|
|
454
|
+
const o = Y.global.locale.value;
|
|
453
455
|
return l instanceof Date && (l = l.getTime()), new Promise((r) => {
|
|
454
456
|
let s = {
|
|
455
457
|
valid: !1,
|
|
@@ -464,20 +466,20 @@ function Wl(e, n, t, l) {
|
|
|
464
466
|
case "tel":
|
|
465
467
|
case "text":
|
|
466
468
|
case "url":
|
|
467
|
-
m = ((l == null ? void 0 : l.length) ?? 0) >= e, s =
|
|
469
|
+
m = ((l == null ? void 0 : l.length) ?? 0) >= e, s = ie(m, se("input.greaterOrEqualToCharacters", { label: t, min: e.toString() }));
|
|
468
470
|
break;
|
|
469
471
|
case "number":
|
|
470
472
|
case "range":
|
|
471
|
-
m = l >= e, s =
|
|
473
|
+
m = l >= e, s = ie(m, se("input.greaterOrEqualToValue", { label: t, min: e.toString() }));
|
|
472
474
|
break;
|
|
473
475
|
case "date":
|
|
474
|
-
m = l >= new Date(e).getTime(), s =
|
|
476
|
+
m = l >= new Date(e).getTime(), s = ie(m, se("input.afterOrEqualToValue", { label: t, min: new Date(e).toLocaleDateString(o) }));
|
|
475
477
|
break;
|
|
476
478
|
case "datetime":
|
|
477
|
-
m = l >= new Date(e).getTime(), s =
|
|
479
|
+
m = l >= new Date(e).getTime(), s = ie(m, se("input.afterOrEqualToValue", { label: t, min: Y.global.d(new Date(e), G.DATETIME, o ?? Y.global.locale.value) }));
|
|
478
480
|
break;
|
|
479
481
|
case "time":
|
|
480
|
-
c = e.toDateFromTime(), m = l >= c, s =
|
|
482
|
+
c = e.toDateFromTime(), m = l >= c, s = ie(m, se("input.afterOrEqualToValue", { label: t, min: Y.global.d(new Date(c), G.TIME, o ?? Y.global.locale.value) }));
|
|
481
483
|
break;
|
|
482
484
|
default:
|
|
483
485
|
s.valid = !0;
|
|
@@ -488,7 +490,7 @@ function Wl(e, n, t, l) {
|
|
|
488
490
|
});
|
|
489
491
|
}
|
|
490
492
|
function Jl(e, n, t, l) {
|
|
491
|
-
const o =
|
|
493
|
+
const o = Y.global.locale.value;
|
|
492
494
|
return l instanceof Date && (l = l.getTime()), new Promise((r) => {
|
|
493
495
|
let s = {
|
|
494
496
|
valid: !1,
|
|
@@ -503,20 +505,20 @@ function Jl(e, n, t, l) {
|
|
|
503
505
|
case "tel":
|
|
504
506
|
case "text":
|
|
505
507
|
case "url":
|
|
506
|
-
m = ((l == null ? void 0 : l.length) ?? 0) <= e, s =
|
|
508
|
+
m = ((l == null ? void 0 : l.length) ?? 0) <= e, s = ie(m, se("input.lessOrEqualToCharacters", { label: t, max: e.toString() }));
|
|
507
509
|
break;
|
|
508
510
|
case "number":
|
|
509
511
|
case "range":
|
|
510
|
-
m = l <= e, s =
|
|
512
|
+
m = l <= e, s = ie(m, se("input.lessOrEqualToValue", { label: t, max: e.toString() }));
|
|
511
513
|
break;
|
|
512
514
|
case "date":
|
|
513
|
-
m = l <= new Date(e).getTime(), s =
|
|
515
|
+
m = l <= new Date(e).getTime(), s = ie(m, se("input.beforeOrEqualToValue", { label: t, max: new Date(e).toLocaleDateString(o) }));
|
|
514
516
|
break;
|
|
515
517
|
case "datetime":
|
|
516
|
-
m = l <= new Date(e).getTime(), s =
|
|
518
|
+
m = l <= new Date(e).getTime(), s = ie(m, se("input.afterOrEqualToValue", { label: t, min: Y.global.d(new Date(e), G.DATETIME, o ?? Y.global.locale.value) }));
|
|
517
519
|
break;
|
|
518
520
|
case "time":
|
|
519
|
-
c = e.toDateFromTime(), m = l <= c, s =
|
|
521
|
+
c = e.toDateFromTime(), m = l <= c, s = ie(m, se("input.afterOrEqualToValue", { label: t, min: Y.global.d(new Date(c), G.TIME, o ?? Y.global.locale.value) }));
|
|
520
522
|
break;
|
|
521
523
|
default:
|
|
522
524
|
s.valid = !0;
|
|
@@ -528,17 +530,17 @@ function Jl(e, n, t, l) {
|
|
|
528
530
|
}
|
|
529
531
|
function Kl(e, n) {
|
|
530
532
|
return new Promise((t) => {
|
|
531
|
-
const l = n != null && n !== "" && n.toString().trim() !== "", o =
|
|
533
|
+
const l = n != null && n !== "" && n.toString().trim() !== "", o = ie(l, se("input.valueIsRequired", { label: e }));
|
|
532
534
|
t(o);
|
|
533
535
|
});
|
|
534
536
|
}
|
|
535
537
|
function Zl(e, n) {
|
|
536
538
|
return new Promise((t) => {
|
|
537
|
-
const o = n === "" || /[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/.exec(n) !== null, r =
|
|
539
|
+
const o = n === "" || /[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/.exec(n) !== null, r = ie(o, se("input.valueNotValidEmail", { label: e }));
|
|
538
540
|
t(r);
|
|
539
541
|
});
|
|
540
542
|
}
|
|
541
|
-
function
|
|
543
|
+
function ie(e, n) {
|
|
542
544
|
return {
|
|
543
545
|
valid: e,
|
|
544
546
|
message: e ? "" : n
|
|
@@ -1029,7 +1031,7 @@ function ot(e) {
|
|
|
1029
1031
|
}
|
|
1030
1032
|
return n;
|
|
1031
1033
|
}
|
|
1032
|
-
function
|
|
1034
|
+
function We(e, n) {
|
|
1033
1035
|
let t;
|
|
1034
1036
|
if (e.indexOf("/") > -1 || e.indexOf("-") > -1) {
|
|
1035
1037
|
const l = new Date(e).toLocaleString(n), o = l.indexOf(",");
|
|
@@ -1037,7 +1039,7 @@ function Je(e, n) {
|
|
|
1037
1039
|
}
|
|
1038
1040
|
return t;
|
|
1039
1041
|
}
|
|
1040
|
-
function
|
|
1042
|
+
function Je(e) {
|
|
1041
1043
|
let n;
|
|
1042
1044
|
if (/([0-9]{2}:[0-9]{2})/.exec(e) !== null) {
|
|
1043
1045
|
const l = e.indexOf("T");
|
|
@@ -1061,14 +1063,14 @@ const ct = ["placeholder", "disabled"], st = { class: "cl-absolute cl-bg-white c
|
|
|
1061
1063
|
"update:date": null
|
|
1062
1064
|
},
|
|
1063
1065
|
setup(e, { expose: n, emit: t }) {
|
|
1064
|
-
const l = e, { d: o, getDateTimeFormat: r, locale: s, t: m } =
|
|
1066
|
+
const l = e, { d: o, getDateTimeFormat: r, locale: s, t: m } = ne(), c = C(null), f = C(null), d = S(() => o(nt(), l.type)), h = S(() => r(s.value)[l.type]), v = S(() => U()), p = S(() => oe()), b = S(() => K()), x = S(() => We(l.min, s.value)), w = S(() => We(l.max, s.value)), E = C(!1), H = S(() => {
|
|
1065
1067
|
var $, M;
|
|
1066
1068
|
let O = "H", W = "Y";
|
|
1067
1069
|
return (($ = h.value) == null ? void 0 : $.hour12) === !0 && (O = "h"), ((M = h.value) == null ? void 0 : M.year) === "2-digit" && (W = "y"), at(d.value, O, W);
|
|
1068
|
-
}),
|
|
1070
|
+
}), te = S(() => {
|
|
1069
1071
|
var W, $;
|
|
1070
1072
|
const O = {
|
|
1071
|
-
...
|
|
1073
|
+
...Ge.defaultConfig,
|
|
1072
1074
|
allowInput: !0,
|
|
1073
1075
|
dateFormat: H.value,
|
|
1074
1076
|
disableMobile: !0,
|
|
@@ -1086,7 +1088,7 @@ const ct = ["placeholder", "disabled"], st = { class: "cl-absolute cl-bg-white c
|
|
|
1086
1088
|
};
|
|
1087
1089
|
return l.date !== null && (O.defaultDate = l.date), O;
|
|
1088
1090
|
});
|
|
1089
|
-
function
|
|
1091
|
+
function de(O, W, $) {
|
|
1090
1092
|
const M = O.length > 0 ? O[0] : null;
|
|
1091
1093
|
M !== l.date && !E.value && t("update:date", M), E.value = !1;
|
|
1092
1094
|
}
|
|
@@ -1101,16 +1103,16 @@ const ct = ["placeholder", "disabled"], st = { class: "cl-absolute cl-bg-white c
|
|
|
1101
1103
|
l.type === "time" ? W = l.min.toDateFromTime() : W = new Date(l.min), W > O && (O = W), E.value = !0, t("update:date", O);
|
|
1102
1104
|
}
|
|
1103
1105
|
}
|
|
1104
|
-
function
|
|
1105
|
-
c.value === null && f.value !== null && (c.value =
|
|
1106
|
+
function ae() {
|
|
1107
|
+
c.value === null && f.value !== null && (c.value = Ge(f.value, te.value), c.value.config.onChange.push(de));
|
|
1106
1108
|
}
|
|
1107
|
-
function
|
|
1108
|
-
c.value !== null && (c.value.set(
|
|
1109
|
+
function Z() {
|
|
1110
|
+
c.value !== null && (c.value.set(te.value), c.value.config.onChange.push(de));
|
|
1109
1111
|
}
|
|
1110
|
-
function
|
|
1112
|
+
function he(O) {
|
|
1111
1113
|
c.value !== null && c.value.setDate(O, !0);
|
|
1112
1114
|
}
|
|
1113
|
-
function
|
|
1115
|
+
function we() {
|
|
1114
1116
|
c.value !== null && c.value.clear();
|
|
1115
1117
|
}
|
|
1116
1118
|
function j() {
|
|
@@ -1134,31 +1136,31 @@ const ct = ["placeholder", "disabled"], st = { class: "cl-absolute cl-bg-white c
|
|
|
1134
1136
|
}
|
|
1135
1137
|
return O;
|
|
1136
1138
|
}
|
|
1137
|
-
function
|
|
1139
|
+
function oe() {
|
|
1138
1140
|
let O;
|
|
1139
|
-
return (l.type === G.TIME || l.type === G.DATETIME) && (O =
|
|
1141
|
+
return (l.type === G.TIME || l.type === G.DATETIME) && (O = Je(l.min)), O;
|
|
1140
1142
|
}
|
|
1141
1143
|
function K() {
|
|
1142
1144
|
let O;
|
|
1143
|
-
return (l.type === G.TIME || l.type === G.DATETIME) && (O =
|
|
1145
|
+
return (l.type === G.TIME || l.type === G.DATETIME) && (O = Je(l.max)), O;
|
|
1144
1146
|
}
|
|
1145
1147
|
return J(() => l.date, (O, W) => {
|
|
1146
|
-
O !== null && W !== null ? O.getTime() !== W.getTime() &&
|
|
1148
|
+
O !== null && W !== null ? O.getTime() !== W.getTime() && he(O) : O === null && W !== null && we();
|
|
1147
1149
|
}, {
|
|
1148
1150
|
deep: !0
|
|
1149
|
-
}), J(() =>
|
|
1151
|
+
}), J(() => te.value, Z, {
|
|
1150
1152
|
deep: !0
|
|
1151
1153
|
}), J(() => l.type, () => {
|
|
1152
|
-
j(),
|
|
1154
|
+
j(), ye(() => ae());
|
|
1153
1155
|
}, {
|
|
1154
1156
|
immediate: !1
|
|
1155
|
-
}), Ce(() =>
|
|
1157
|
+
}), Ce(() => ae()), Re(() => j()), n({
|
|
1156
1158
|
focus() {
|
|
1157
1159
|
var O;
|
|
1158
1160
|
(O = f.value) == null || O.focus();
|
|
1159
1161
|
}
|
|
1160
|
-
}), (O, W) => (i(), g("div",
|
|
1161
|
-
u("input",
|
|
1162
|
+
}), (O, W) => (i(), g("div", fe(O.$attrs, { class: "cl-relative" }), [
|
|
1163
|
+
u("input", fe({
|
|
1162
1164
|
ref_key: "element",
|
|
1163
1165
|
ref: f
|
|
1164
1166
|
}, O.$attrs, {
|
|
@@ -1206,7 +1208,7 @@ const ct = ["placeholder", "disabled"], st = { class: "cl-absolute cl-bg-white c
|
|
|
1206
1208
|
], 16));
|
|
1207
1209
|
}
|
|
1208
1210
|
});
|
|
1209
|
-
const rt = /* @__PURE__ */
|
|
1211
|
+
const rt = /* @__PURE__ */ me(it, [["__scopeId", "data-v-c2730954"]]), Ue = [
|
|
1210
1212
|
"date",
|
|
1211
1213
|
"datetime",
|
|
1212
1214
|
"time"
|
|
@@ -1231,7 +1233,7 @@ const rt = /* @__PURE__ */ ge(it, [["__scopeId", "data-v-c2730954"]]), Pe = [
|
|
|
1231
1233
|
"update:value": null
|
|
1232
1234
|
},
|
|
1233
1235
|
setup(e, { expose: n, emit: t }) {
|
|
1234
|
-
const l = e, { n: o, t: r } =
|
|
1236
|
+
const l = e, { n: o, t: r } = ne(), { debounce: s } = bl(), m = C(l.value), c = C(), f = S({
|
|
1235
1237
|
get: () => l.value,
|
|
1236
1238
|
set: (b) => t("update:value", b)
|
|
1237
1239
|
}), d = S(() => l.disabled ? "rgba(153, 153, 153, 0.8)" : "#9acd32"), h = S(() => {
|
|
@@ -1240,7 +1242,7 @@ const rt = /* @__PURE__ */ ge(it, [["__scopeId", "data-v-c2730954"]]), Pe = [
|
|
|
1240
1242
|
}), v = S(() => l.min <= l.max && l.step > 0);
|
|
1241
1243
|
function p(b, x) {
|
|
1242
1244
|
const w = (b == null ? void 0 : b.value) ?? "", E = Math.max(Math.min(parseFloat(w) || l.min, l.max), l.min);
|
|
1243
|
-
f.value = l.enforceStep ? Math.ceil(E / l.step) * l.step : E,
|
|
1245
|
+
f.value = l.enforceStep ? Math.ceil(E / l.step) * l.step : E, ye(() => x());
|
|
1244
1246
|
}
|
|
1245
1247
|
return J(() => l.value, () => m.value = l.value), n({
|
|
1246
1248
|
focus() {
|
|
@@ -1248,8 +1250,8 @@ const rt = /* @__PURE__ */ ge(it, [["__scopeId", "data-v-c2730954"]]), Pe = [
|
|
|
1248
1250
|
(b = c.value) == null || b.focus();
|
|
1249
1251
|
}
|
|
1250
1252
|
}), (b, x) => {
|
|
1251
|
-
const w =
|
|
1252
|
-
return a(v) ? (i(), g("div",
|
|
1253
|
+
const w = el("cl-ui-input");
|
|
1254
|
+
return a(v) ? (i(), g("div", le(fe({ key: 0 }, b.$attrs)), [
|
|
1253
1255
|
P(u("div", { class: "cl-bg-transparent cl-relative cl-text-center cl-text-sm" }, k(a(f)), 513), [
|
|
1254
1256
|
[B, !e.showNumericInput]
|
|
1255
1257
|
]),
|
|
@@ -1268,12 +1270,12 @@ const rt = /* @__PURE__ */ ge(it, [["__scopeId", "data-v-c2730954"]]), Pe = [
|
|
|
1268
1270
|
[B, e.showNumericInput]
|
|
1269
1271
|
]),
|
|
1270
1272
|
u("div", dt, [
|
|
1271
|
-
u("span", ft, k(a(o)(e.min, Number.isInteger(e.min) ? a(
|
|
1273
|
+
u("span", ft, k(a(o)(e.min, Number.isInteger(e.min) ? a(ee).INTEGER : a(ee).DECIMAL)), 1),
|
|
1272
1274
|
typeof a(f) == "number" ? (i(), g("div", mt, [
|
|
1273
1275
|
P(u("input", {
|
|
1274
1276
|
ref_key: "sliderRef",
|
|
1275
1277
|
ref: c,
|
|
1276
|
-
"onUpdate:modelValue": x[2] || (x[2] = (E) =>
|
|
1278
|
+
"onUpdate:modelValue": x[2] || (x[2] = (E) => be(f) ? f.value = E : null),
|
|
1277
1279
|
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",
|
|
1278
1280
|
style: ll({
|
|
1279
1281
|
background: `linear-gradient(to right, ${a(d)} 0%, ${a(d)} ${a(h)}%, white ${a(h)}%, white 100%)`
|
|
@@ -1292,15 +1294,15 @@ const rt = /* @__PURE__ */ ge(it, [["__scopeId", "data-v-c2730954"]]), Pe = [
|
|
|
1292
1294
|
]
|
|
1293
1295
|
])
|
|
1294
1296
|
])) : I("", !0),
|
|
1295
|
-
u("span", bt, k(a(o)(e.max, Number.isInteger(e.max) ? a(
|
|
1297
|
+
u("span", bt, k(a(o)(e.max, Number.isInteger(e.max) ? a(ee).INTEGER : a(ee).DECIMAL)), 1)
|
|
1296
1298
|
])
|
|
1297
1299
|
])
|
|
1298
1300
|
], 16)) : (i(), g("div", vt, k(a(r)("slider.invalidProps")), 1));
|
|
1299
1301
|
};
|
|
1300
1302
|
}
|
|
1301
1303
|
});
|
|
1302
|
-
const pt = /* @__PURE__ */
|
|
1303
|
-
function
|
|
1304
|
+
const pt = /* @__PURE__ */ me(ht, [["__scopeId", "data-v-47d8e44f"]]);
|
|
1305
|
+
function Ke(e) {
|
|
1304
1306
|
let n = !1;
|
|
1305
1307
|
switch (e) {
|
|
1306
1308
|
case "email":
|
|
@@ -1320,7 +1322,7 @@ function Ze(e) {
|
|
|
1320
1322
|
function yt(e) {
|
|
1321
1323
|
return e === "number" || e === "range";
|
|
1322
1324
|
}
|
|
1323
|
-
function
|
|
1325
|
+
function Ze(e) {
|
|
1324
1326
|
let n = !1;
|
|
1325
1327
|
switch (e) {
|
|
1326
1328
|
case "date":
|
|
@@ -1355,19 +1357,19 @@ function xt(e) {
|
|
|
1355
1357
|
let n;
|
|
1356
1358
|
switch (e) {
|
|
1357
1359
|
case "datetime":
|
|
1358
|
-
n =
|
|
1360
|
+
n = Ue[1];
|
|
1359
1361
|
break;
|
|
1360
1362
|
case "time":
|
|
1361
|
-
n =
|
|
1363
|
+
n = Ue[2];
|
|
1362
1364
|
break;
|
|
1363
1365
|
case "date":
|
|
1364
1366
|
default:
|
|
1365
|
-
n =
|
|
1367
|
+
n = Ue[0];
|
|
1366
1368
|
break;
|
|
1367
1369
|
}
|
|
1368
1370
|
return n;
|
|
1369
1371
|
}
|
|
1370
|
-
function
|
|
1372
|
+
function Qe(e, n) {
|
|
1371
1373
|
const t = e.target;
|
|
1372
1374
|
return yt(n) ? t.valueAsNumber : wt(n) ? t.valueAsDate : ke(n) ? t.checked : t.value;
|
|
1373
1375
|
}
|
|
@@ -1420,8 +1422,8 @@ const $t = { class: "cl-flex cl-justify-between" }, kt = { class: "cl-w-full" },
|
|
|
1420
1422
|
set: ($) => T($, !1)
|
|
1421
1423
|
}), h = S({
|
|
1422
1424
|
get: () => l.modelValue,
|
|
1423
|
-
set: ($) =>
|
|
1424
|
-
}), v = S(() => typeof l.min == "number" ? l.min.toString() : l.min), p = S(() => typeof l.max == "number" ? l.max.toString() : l.max), b = S(() => typeof l.min == "number" ? l.min : parseFloat(l.min)), x = S(() => typeof l.max == "number" ? l.max : parseFloat(l.max)), w = S(() => l.messageWhenValid.trim() !== "" ? l.messageWhenValid : ""), E = C(!0), H = C([]),
|
|
1425
|
+
set: ($) => de($)
|
|
1426
|
+
}), v = S(() => typeof l.min == "number" ? l.min.toString() : l.min), p = S(() => typeof l.max == "number" ? l.max.toString() : l.max), b = S(() => typeof l.min == "number" ? l.min : parseFloat(l.min)), x = S(() => typeof l.max == "number" ? l.max : parseFloat(l.max)), w = S(() => l.messageWhenValid.trim() !== "" ? l.messageWhenValid : ""), E = C(!0), H = C([]), te = S(() => {
|
|
1425
1427
|
var $, M;
|
|
1426
1428
|
return [
|
|
1427
1429
|
...(($ = H.value) == null ? void 0 : $.filter((R) => ((R == null ? void 0 : R.length) ?? 0) > 0)) ?? [],
|
|
@@ -1429,7 +1431,7 @@ const $t = { class: "cl-flex cl-justify-between" }, kt = { class: "cl-w-full" },
|
|
|
1429
1431
|
].join(`
|
|
1430
1432
|
`);
|
|
1431
1433
|
});
|
|
1432
|
-
async function
|
|
1434
|
+
async function de($) {
|
|
1433
1435
|
l.validateOn === "input" && await V($), t("update:model-value", $);
|
|
1434
1436
|
}
|
|
1435
1437
|
async function T($, M) {
|
|
@@ -1447,18 +1449,18 @@ const $t = { class: "cl-flex cl-justify-between" }, kt = { class: "cl-w-full" },
|
|
|
1447
1449
|
})
|
|
1448
1450
|
];
|
|
1449
1451
|
return (typeof $ == "string" || typeof $ == "number" || $ instanceof Date) && (R.push(Wl(l.min, l.inputType, l.label, $)), R.push(Jl(l.max, l.inputType, l.label, $))), l.isRequired && R.push(Kl(l.label, $)), l.inputType === "email" && typeof $ == "string" && R.push(Zl(l.label, $)), Promise.all(R).then((xe) => {
|
|
1450
|
-
const rl = [...xe.map((Se) => Se.message)],
|
|
1451
|
-
|
|
1452
|
+
const rl = [...xe.map((Se) => Se.message)], Ve = xe.some((Se) => Se.message.length > 0 && Se.valid === !1) || l.externalErrors.length > 0;
|
|
1453
|
+
Ve ? (H.value = rl, t("validated", !1, $)) : (H.value = [], t("validated", !0, $)), E.value = !Ve;
|
|
1452
1454
|
});
|
|
1453
1455
|
}
|
|
1454
|
-
function
|
|
1456
|
+
function ae() {
|
|
1455
1457
|
let $ = "";
|
|
1456
1458
|
return l.inputType === "color" && d.value && (l.disabled ? $ = "background: #999999" : $ = `background: ${d.value};`), $;
|
|
1457
1459
|
}
|
|
1458
|
-
function
|
|
1460
|
+
function Z($) {
|
|
1459
1461
|
ke(l.inputType) ? ($.preventDefault(), t("click", $)) : l.inputType === "checkbox" && t("click", $);
|
|
1460
1462
|
}
|
|
1461
|
-
function
|
|
1463
|
+
function he() {
|
|
1462
1464
|
if (o.value) {
|
|
1463
1465
|
o.value.stepUp(), o.value.focus(), T(o.value.valueAsNumber, !1);
|
|
1464
1466
|
const $ = {
|
|
@@ -1467,7 +1469,7 @@ const $t = { class: "cl-flex cl-justify-between" }, kt = { class: "cl-w-full" },
|
|
|
1467
1469
|
t("input", $, o.value.valueAsNumber);
|
|
1468
1470
|
}
|
|
1469
1471
|
}
|
|
1470
|
-
function
|
|
1472
|
+
function we() {
|
|
1471
1473
|
if (o.value) {
|
|
1472
1474
|
o.value.stepDown(), o.value.focus(), T(o.value.valueAsNumber, !1);
|
|
1473
1475
|
const $ = {
|
|
@@ -1482,7 +1484,7 @@ const $t = { class: "cl-flex cl-justify-between" }, kt = { class: "cl-w-full" },
|
|
|
1482
1484
|
function U() {
|
|
1483
1485
|
s.value = !0, j(!1);
|
|
1484
1486
|
}
|
|
1485
|
-
function
|
|
1487
|
+
function oe() {
|
|
1486
1488
|
f.value++;
|
|
1487
1489
|
}
|
|
1488
1490
|
function K($) {
|
|
@@ -1495,7 +1497,7 @@ const $t = { class: "cl-flex cl-justify-between" }, kt = { class: "cl-w-full" },
|
|
|
1495
1497
|
return r.value ? $ = M : s.value && ((R = d.value) == null ? void 0 : R.toString().trim()) === "" && ($ = !1), $;
|
|
1496
1498
|
}
|
|
1497
1499
|
async function W($) {
|
|
1498
|
-
const M =
|
|
1500
|
+
const M = Qe($, l.inputType);
|
|
1499
1501
|
l.validateOn === "change" && await V(M), t("change", $, M);
|
|
1500
1502
|
}
|
|
1501
1503
|
return Ce(() => {
|
|
@@ -1524,11 +1526,11 @@ const $t = { class: "cl-flex cl-justify-between" }, kt = { class: "cl-w-full" },
|
|
|
1524
1526
|
e.isRequired && a(m) ? (i(), g("label", Tt, " * ")) : I("", !0),
|
|
1525
1527
|
e.isRequired && !a(m) && e.requiredText.length ? (i(), g("label", Ct, k(e.requiredText), 1)) : I("", !0)
|
|
1526
1528
|
]),
|
|
1527
|
-
e.inputType !== "range" && !a(
|
|
1529
|
+
e.inputType !== "range" && !a(Ze)(e.inputType) ? P((i(), g("input", fe({
|
|
1528
1530
|
key: 0,
|
|
1529
1531
|
ref_key: "inputElement",
|
|
1530
1532
|
ref: o,
|
|
1531
|
-
"onUpdate:modelValue": M[0] || (M[0] = (R) =>
|
|
1533
|
+
"onUpdate:modelValue": M[0] || (M[0] = (R) => be(d) ? d.value = R : null)
|
|
1532
1534
|
}, $.$attrs, {
|
|
1533
1535
|
class: ["cl-block cl-border cl-duration-300 cl-h-full cl-mb-1 cl-transition cl-w-full focus:cl-outline-none", {
|
|
1534
1536
|
"hover:!cl-border-grey-3": e.disabled === !1 && !a(ke)(e.inputType),
|
|
@@ -1540,35 +1542,35 @@ const $t = { class: "cl-flex cl-justify-between" }, kt = { class: "cl-w-full" },
|
|
|
1540
1542
|
"cl-p-3 cl-rounded-lg": !a(ke)(e.inputType),
|
|
1541
1543
|
[`${e.inputSpecificClasses}`]: e.inputSpecificClasses !== ""
|
|
1542
1544
|
}],
|
|
1543
|
-
style:
|
|
1545
|
+
style: ae(),
|
|
1544
1546
|
type: e.inputType,
|
|
1545
1547
|
disabled: e.disabled,
|
|
1546
1548
|
min: e.min,
|
|
1547
1549
|
max: e.max,
|
|
1548
|
-
minlength: a(
|
|
1549
|
-
maxlength: a(
|
|
1550
|
+
minlength: a(Ke)(e.inputType) ? e.min : 0,
|
|
1551
|
+
maxlength: a(Ke)(e.inputType) ? e.max : 0,
|
|
1550
1552
|
step: e.step,
|
|
1551
1553
|
placeholder: a(c),
|
|
1552
1554
|
accept: e.fileExtensions,
|
|
1553
1555
|
name: e.group,
|
|
1554
1556
|
autocomplete: e.autocomplete,
|
|
1555
|
-
onClick: M[1] || (M[1] = (R) =>
|
|
1557
|
+
onClick: M[1] || (M[1] = (R) => Z(R)),
|
|
1556
1558
|
onFocus: M[2] || (M[2] = (R) => t("focus")),
|
|
1557
|
-
onBlur: M[3] || (M[3] =
|
|
1558
|
-
U(),
|
|
1559
|
+
onBlur: M[3] || (M[3] = Q((R) => {
|
|
1560
|
+
U(), oe();
|
|
1559
1561
|
}, ["self"])),
|
|
1560
1562
|
onMousewheelPassive: K,
|
|
1561
1563
|
onInput: M[4] || (M[4] = (R) => {
|
|
1562
|
-
t("input", R, a(
|
|
1564
|
+
t("input", R, a(Qe)(R, e.inputType));
|
|
1563
1565
|
}),
|
|
1564
1566
|
onChange: W
|
|
1565
1567
|
}), null, 16, St)), [
|
|
1566
1568
|
[dl, a(d)]
|
|
1567
|
-
]) : a(
|
|
1569
|
+
]) : a(Ze)(e.inputType) ? (i(), L(a(rt), fe({ key: 1 }, $.$attrs, {
|
|
1568
1570
|
ref_key: "inputElement",
|
|
1569
1571
|
ref: o,
|
|
1570
1572
|
date: a(h),
|
|
1571
|
-
"onUpdate:date": M[5] || (M[5] = (R) =>
|
|
1573
|
+
"onUpdate:date": M[5] || (M[5] = (R) => be(h) ? h.value = R : null),
|
|
1572
1574
|
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", {
|
|
1573
1575
|
"hover:cl-border-grey-3": !e.disabled,
|
|
1574
1576
|
"!cl-border-danger-default": !E.value,
|
|
@@ -1581,20 +1583,20 @@ const $t = { class: "cl-flex cl-justify-between" }, kt = { class: "cl-w-full" },
|
|
|
1581
1583
|
"date-placeholder": a(c),
|
|
1582
1584
|
"date-time-placeholder": a(c),
|
|
1583
1585
|
"time-placeholder": a(c),
|
|
1584
|
-
onBlur:
|
|
1586
|
+
onBlur: Q(U, ["self"]),
|
|
1585
1587
|
onFocus: M[6] || (M[6] = (R) => t("focus"))
|
|
1586
1588
|
}), null, 16, ["date", "class", "disabled", "type", "min", "max", "date-placeholder", "date-time-placeholder", "time-placeholder", "onBlur"])) : e.inputType === "range" && typeof a(d) == "number" ? (i(), g("div", Et, [
|
|
1587
1589
|
y(a(pt), {
|
|
1588
1590
|
ref_key: "inputElement",
|
|
1589
1591
|
ref: o,
|
|
1590
1592
|
value: a(d),
|
|
1591
|
-
"onUpdate:value": M[7] || (M[7] = (R) =>
|
|
1593
|
+
"onUpdate:value": M[7] || (M[7] = (R) => be(d) ? d.value = R : null),
|
|
1592
1594
|
min: a(b),
|
|
1593
1595
|
max: a(x),
|
|
1594
1596
|
step: e.step,
|
|
1595
1597
|
disabled: e.disabled,
|
|
1596
1598
|
"show-numeric-input": !1,
|
|
1597
|
-
onBlur:
|
|
1599
|
+
onBlur: Q(U, ["self"]),
|
|
1598
1600
|
onFocus: M[8] || (M[8] = (R) => t("focus"))
|
|
1599
1601
|
}, null, 8, ["value", "min", "max", "step", "disabled", "onBlur"])
|
|
1600
1602
|
])) : I("", !0),
|
|
@@ -1609,8 +1611,8 @@ const $t = { class: "cl-flex cl-justify-between" }, kt = { class: "cl-w-full" },
|
|
|
1609
1611
|
y(a(N), {
|
|
1610
1612
|
icon: "ph:caret-up-bold",
|
|
1611
1613
|
class: "cl-bg-link-default cl-rounded-md cl-text-sm cl-text-white hover:cl-bg-link-light hover:cl-cursor-pointer",
|
|
1612
|
-
onClick:
|
|
1613
|
-
onMousedown: M[9] || (M[9] =
|
|
1614
|
+
onClick: he,
|
|
1615
|
+
onMousedown: M[9] || (M[9] = Q(() => {
|
|
1614
1616
|
}, ["prevent"]))
|
|
1615
1617
|
})
|
|
1616
1618
|
], 2)) : I("", !0),
|
|
@@ -1623,19 +1625,19 @@ const $t = { class: "cl-flex cl-justify-between" }, kt = { class: "cl-w-full" },
|
|
|
1623
1625
|
y(a(N), {
|
|
1624
1626
|
icon: "ph:caret-down-bold",
|
|
1625
1627
|
class: "cl-bg-link-default cl-rounded-md cl-text-sm cl-text-white hover:cl-bg-link-light hover:cl-cursor-pointer",
|
|
1626
|
-
onClick:
|
|
1627
|
-
onMousedown: M[10] || (M[10] =
|
|
1628
|
+
onClick: we,
|
|
1629
|
+
onMousedown: M[10] || (M[10] = Q(() => {
|
|
1628
1630
|
}, ["prevent"]))
|
|
1629
1631
|
})
|
|
1630
1632
|
], 2)) : I("", !0)
|
|
1631
1633
|
])
|
|
1632
1634
|
], 32),
|
|
1633
1635
|
E.value && a(w) ? (i(), g("div", Ot, k(a(w)), 1)) : I("", !0),
|
|
1634
|
-
!E.value && a(
|
|
1636
|
+
!E.value && a(te).length > 0 ? (i(), g("div", At, k(a(te)), 1)) : I("", !0)
|
|
1635
1637
|
]));
|
|
1636
1638
|
}
|
|
1637
1639
|
});
|
|
1638
|
-
const
|
|
1640
|
+
const re = /* @__PURE__ */ me(Mt, [["__scopeId", "data-v-8c189c84"]]), It = { 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" }, Nt = ["onKeypress"], Dt = { class: "cl-overflow-y-auto cl-overscroll-y-none cl-p-2 cl-w-full" }, qt = {
|
|
1639
1641
|
inheritAttrs: !1
|
|
1640
1642
|
}, sl = /* @__PURE__ */ q({
|
|
1641
1643
|
...qt,
|
|
@@ -1657,12 +1659,12 @@ const ue = /* @__PURE__ */ ge(Mt, [["__scopeId", "data-v-8c189c84"]]), It = { cl
|
|
|
1657
1659
|
s.key === "Escape" && o();
|
|
1658
1660
|
}
|
|
1659
1661
|
return (s, m) => (i(), g(z, null, [
|
|
1660
|
-
A(s.$slots, "trigger",
|
|
1661
|
-
(i(), L(
|
|
1662
|
-
y(
|
|
1662
|
+
A(s.$slots, "trigger", le(ce({ open: l }))),
|
|
1663
|
+
(i(), L(ze, { to: "body" }, [
|
|
1664
|
+
y(pe, { name: "fade" }, {
|
|
1663
1665
|
default: F(() => [
|
|
1664
1666
|
P(u("div", It, [
|
|
1665
|
-
u("div",
|
|
1667
|
+
u("div", fe(s.$attrs, {
|
|
1666
1668
|
class: ["cl-bg-white cl-flex cl-flex-wrap cl-max-h-[calc(100vh-8rem)] cl-mx-0 cl-my-auto cl-overflow-y-auto cl-overscroll-y-none cl-relative cl-rounded-lg cl-shadow-lg", {
|
|
1667
1669
|
"lg:cl-w-2/12 cl-w-10/12": e.size === "x-small",
|
|
1668
1670
|
"cl-w-6/12": e.size === "small",
|
|
@@ -1693,9 +1695,9 @@ const ue = /* @__PURE__ */ ge(Mt, [["__scopeId", "data-v-8c189c84"]]), It = { cl
|
|
|
1693
1695
|
A(s.$slots, "title")
|
|
1694
1696
|
], 2),
|
|
1695
1697
|
u("div", Dt, [
|
|
1696
|
-
A(s.$slots, "default",
|
|
1698
|
+
A(s.$slots, "default", le(ce({ close: o })))
|
|
1697
1699
|
]),
|
|
1698
|
-
A(s.$slots, "footer",
|
|
1700
|
+
A(s.$slots, "footer", le(ce({ close: o })))
|
|
1699
1701
|
], 16)
|
|
1700
1702
|
], 512), [
|
|
1701
1703
|
[B, t.value]
|
|
@@ -1744,7 +1746,7 @@ const ue = /* @__PURE__ */ ge(Mt, [["__scopeId", "data-v-8c189c84"]]), It = { cl
|
|
|
1744
1746
|
}), Ut = {
|
|
1745
1747
|
key: 0,
|
|
1746
1748
|
class: "cl-w-1/2"
|
|
1747
|
-
}, Bt = { class: "cl-float-right cl-py-1" },
|
|
1749
|
+
}, Bt = { class: "cl-float-right cl-py-1" }, Ye = /* @__PURE__ */ q({
|
|
1748
1750
|
__name: "cl-ui-combo-box-selectable",
|
|
1749
1751
|
props: {
|
|
1750
1752
|
isCreateNewOption: { type: Boolean, default: !1 },
|
|
@@ -1830,7 +1832,7 @@ const ue = /* @__PURE__ */ ge(Mt, [["__scopeId", "data-v-8c189c84"]]), It = { cl
|
|
|
1830
1832
|
"hide-dropdown": null
|
|
1831
1833
|
},
|
|
1832
1834
|
setup(e, { emit: n }) {
|
|
1833
|
-
const t = e, { t: l } =
|
|
1835
|
+
const t = e, { t: l } = ne(), o = C(""), r = C(!1), s = C(-1), m = S(() => r.value ? -1 : 0), c = C();
|
|
1834
1836
|
function f(T) {
|
|
1835
1837
|
(T === void 0 || (T == null ? void 0 : T.code.startsWith("Arrow")) === !1 && (T == null ? void 0 : T.code.startsWith("Control")) === !1 && (T == null ? void 0 : T.code.startsWith("Shift")) === !1 && (T == null ? void 0 : T.code.startsWith("Tab")) === !1 && (T == null ? void 0 : T.code) !== "Enter") && (n("search", o.value), s.value = -2);
|
|
1836
1838
|
}
|
|
@@ -1855,10 +1857,10 @@ const ue = /* @__PURE__ */ ge(Mt, [["__scopeId", "data-v-8c189c84"]]), It = { cl
|
|
|
1855
1857
|
function w(T) {
|
|
1856
1858
|
if (T.key === "Tab" && T.shiftKey === !0) {
|
|
1857
1859
|
const V = document.getElementsByTagName("input");
|
|
1858
|
-
let
|
|
1859
|
-
for (let
|
|
1860
|
-
V[
|
|
1861
|
-
|
|
1860
|
+
let ae = -1;
|
|
1861
|
+
for (let Z = 0; Z < V.length; Z++)
|
|
1862
|
+
V[Z] === T.target && (ae = Z - 1);
|
|
1863
|
+
ae >= 0 && (V[ae].focus(), v());
|
|
1862
1864
|
}
|
|
1863
1865
|
}
|
|
1864
1866
|
function E() {
|
|
@@ -1869,45 +1871,44 @@ const ue = /* @__PURE__ */ ge(Mt, [["__scopeId", "data-v-8c189c84"]]), It = { cl
|
|
|
1869
1871
|
let T = !1;
|
|
1870
1872
|
t.results !== null && t.results.length === 1 && (T = o.value.toUpperCase().trim() === t.results[0].name.toUpperCase().trim()), r.value = t.canCreateNewObject === !0 && t.errorMessage === "" && o.value.trim() !== "" && T === !1;
|
|
1871
1873
|
}
|
|
1872
|
-
function
|
|
1874
|
+
function te(T) {
|
|
1873
1875
|
s.value = T;
|
|
1874
1876
|
}
|
|
1875
|
-
function
|
|
1876
|
-
t.isVisible === !0 && (o.value = "", f(),
|
|
1877
|
+
function de() {
|
|
1878
|
+
t.isVisible === !0 && (o.value = "", f(), ye(() => {
|
|
1877
1879
|
var T, V;
|
|
1878
1880
|
return (V = (T = c.value) == null ? void 0 : T.querySelector("input")) == null ? void 0 : V.focus();
|
|
1879
1881
|
}));
|
|
1880
1882
|
}
|
|
1881
|
-
return J(() => t.results, () => H()), J(() => t.errorMessage, () => H()), J(() => t.isVisible, () =>
|
|
1883
|
+
return J(() => t.results, () => H()), J(() => t.errorMessage, () => H()), J(() => t.isVisible, () => de()), Ce(() => {
|
|
1882
1884
|
var T;
|
|
1883
1885
|
return (T = c.value) == null ? void 0 : T.addEventListener("keydown", w);
|
|
1884
1886
|
}), Re(() => {
|
|
1885
1887
|
var T;
|
|
1886
1888
|
return (T = c.value) == null ? void 0 : T.removeEventListener("keydown", w);
|
|
1887
1889
|
}), (T, V) => {
|
|
1888
|
-
var
|
|
1889
|
-
const ce = ze("cl-ui-loading-spinner");
|
|
1890
|
+
var ae;
|
|
1890
1891
|
return i(), g("div", {
|
|
1891
1892
|
ref_key: "container",
|
|
1892
1893
|
ref: c,
|
|
1893
1894
|
class: "cl-bg-white cl-border cl-border-collapse cl-border-grey-0 cl-h-52 cl-overflow-y-auto cl-overscroll-y-none cl-p-2 cl-rounded cl-text-sm",
|
|
1894
1895
|
onKeydown: [
|
|
1895
|
-
V[2] || (V[2] = Te(
|
|
1896
|
-
V[3] || (V[3] = Te(
|
|
1896
|
+
V[2] || (V[2] = Te(Q((Z) => b(a(m)), ["prevent", "stop"]), ["up"])),
|
|
1897
|
+
V[3] || (V[3] = Te(Q((Z) => p(a(m)), ["prevent", "stop"]), ["down"]))
|
|
1897
1898
|
],
|
|
1898
|
-
onKeyup: Te(
|
|
1899
|
+
onKeyup: Te(Q(x, ["prevent", "stop"]), ["enter"])
|
|
1899
1900
|
}, [
|
|
1900
1901
|
u("div", Lt, [
|
|
1901
|
-
y(
|
|
1902
|
+
y(re, {
|
|
1902
1903
|
modelValue: o.value,
|
|
1903
|
-
"onUpdate:modelValue": V[0] || (V[0] = (
|
|
1904
|
+
"onUpdate:modelValue": V[0] || (V[0] = (Z) => o.value = Z),
|
|
1904
1905
|
class: "!cl-mr-0 cl-mb-1 cl-w-full",
|
|
1905
1906
|
"input-type": "text",
|
|
1906
1907
|
"placeholder-text": a(l)("comboBox.searchHint", { object: e.objectType }),
|
|
1907
1908
|
onKeyup: f,
|
|
1908
1909
|
onBlur: v
|
|
1909
1910
|
}, null, 8, ["modelValue", "placeholder-text"]),
|
|
1910
|
-
P(y(
|
|
1911
|
+
P(y(Pe, { class: "cl-absolute cl-ml-2 cl-mt-11" }, null, 512), [
|
|
1911
1912
|
[B, e.loading]
|
|
1912
1913
|
])
|
|
1913
1914
|
]),
|
|
@@ -1915,7 +1916,7 @@ const ue = /* @__PURE__ */ ge(Mt, [["__scopeId", "data-v-8c189c84"]]), It = { cl
|
|
|
1915
1916
|
key: 0,
|
|
1916
1917
|
"show-clear-button": e.canClearSelectedObject,
|
|
1917
1918
|
text: e.currentObjectName,
|
|
1918
|
-
onClearObject: V[1] || (V[1] = (
|
|
1919
|
+
onClearObject: V[1] || (V[1] = (Z) => T.$emit("clear-object"))
|
|
1919
1920
|
}, null, 8, ["show-clear-button", "text"])) : I("", !0),
|
|
1920
1921
|
e.objectParentType !== "" && e.results !== void 0 && e.results.length > 0 && e.errorMessage === "" ? (i(), L(Ee, {
|
|
1921
1922
|
key: 1,
|
|
@@ -1923,7 +1924,7 @@ const ue = /* @__PURE__ */ ge(Mt, [["__scopeId", "data-v-8c189c84"]]), It = { cl
|
|
|
1923
1924
|
"additional-text": e.objectParentType,
|
|
1924
1925
|
class: "cl-bg-grey-2 cl-mt-1"
|
|
1925
1926
|
}, null, 8, ["text", "additional-text"])) : I("", !0),
|
|
1926
|
-
e.results !== null && ((
|
|
1927
|
+
e.results !== null && ((ae = e.results) == null ? void 0 : ae.length) === 0 && o.value.trim() !== "" && e.canCreateNewObject === !1 && e.errorMessage === "" ? (i(), L(Ee, {
|
|
1927
1928
|
key: 2,
|
|
1928
1929
|
text: a(l)("comboBox.noResults", { value: o.value })
|
|
1929
1930
|
}, null, 8, ["text"])) : I("", !0),
|
|
@@ -1932,23 +1933,23 @@ const ue = /* @__PURE__ */ ge(Mt, [["__scopeId", "data-v-8c189c84"]]), It = { cl
|
|
|
1932
1933
|
class: "!cl-bg-danger-light cl-border-danger-light cl-rounded cl-text-danger-dark",
|
|
1933
1934
|
text: a(l)("comboBox.errorMessage", { error: e.errorMessage })
|
|
1934
1935
|
}, null, 8, ["text"])) : I("", !0),
|
|
1935
|
-
r.value ? (i(), L(
|
|
1936
|
+
r.value ? (i(), L(Ye, {
|
|
1936
1937
|
key: 4,
|
|
1937
1938
|
"is-create-new-option": !0,
|
|
1938
1939
|
text: a(l)("comboBox.addPrompt", { value: o.value, object: e.objectType }),
|
|
1939
1940
|
index: -1,
|
|
1940
1941
|
"selected-index": s.value,
|
|
1941
1942
|
onCreateObject: h,
|
|
1942
|
-
onOptionHighlighted:
|
|
1943
|
+
onOptionHighlighted: te
|
|
1943
1944
|
}, null, 8, ["text", "selected-index"])) : I("", !0),
|
|
1944
1945
|
e.errorMessage === "" && e.results !== null ? (i(), g("div", Ft, [
|
|
1945
|
-
(i(!0), g(z, null,
|
|
1946
|
-
key:
|
|
1947
|
-
option:
|
|
1948
|
-
index:
|
|
1946
|
+
(i(!0), g(z, null, _(e.results, (Z, he) => (i(), L(Ye, {
|
|
1947
|
+
key: he,
|
|
1948
|
+
option: Z,
|
|
1949
|
+
index: he,
|
|
1949
1950
|
"selected-index": s.value,
|
|
1950
1951
|
onSelectObject: d,
|
|
1951
|
-
onOptionHighlighted:
|
|
1952
|
+
onOptionHighlighted: te
|
|
1952
1953
|
}, null, 8, ["option", "index", "selected-index"]))), 128))
|
|
1953
1954
|
])) : I("", !0)
|
|
1954
1955
|
], 40, zt);
|
|
@@ -1980,10 +1981,10 @@ const ue = /* @__PURE__ */ ge(Mt, [["__scopeId", "data-v-8c189c84"]]), It = { cl
|
|
|
1980
1981
|
"update:current-object": null
|
|
1981
1982
|
},
|
|
1982
1983
|
setup(e, { expose: n, emit: t }) {
|
|
1983
|
-
const l = e, { t: o } =
|
|
1984
|
+
const l = e, { t: o } = ne(), r = C(!1), s = S({
|
|
1984
1985
|
get: () => l.currentObject,
|
|
1985
1986
|
set: (j) => t("update:current-object", j)
|
|
1986
|
-
}), m = C(null), c = C(null), f = S(() =>
|
|
1987
|
+
}), m = C(null), c = C(null), f = S(() => he()), d = C(""), h = C(""), v = C(), p = C(!0);
|
|
1987
1988
|
function b(j) {
|
|
1988
1989
|
l.disabled || (typeof j < "u" ? r.value = j : r.value = !r.value);
|
|
1989
1990
|
}
|
|
@@ -1997,21 +1998,21 @@ const ue = /* @__PURE__ */ ge(Mt, [["__scopeId", "data-v-8c189c84"]]), It = { cl
|
|
|
1997
1998
|
s.value = null, b(!1);
|
|
1998
1999
|
}
|
|
1999
2000
|
function H(j) {
|
|
2000
|
-
const U =
|
|
2001
|
+
const U = te(j);
|
|
2001
2002
|
s.value = U, b(!1);
|
|
2002
2003
|
}
|
|
2003
|
-
function
|
|
2004
|
+
function te(j) {
|
|
2004
2005
|
let U = null;
|
|
2005
2006
|
if (l.results !== null) {
|
|
2006
|
-
for (let
|
|
2007
|
-
if (l.results[
|
|
2008
|
-
U = l.results[
|
|
2007
|
+
for (let oe = 0; oe < l.results.length; oe++)
|
|
2008
|
+
if (l.results[oe].id === j) {
|
|
2009
|
+
U = l.results[oe];
|
|
2009
2010
|
break;
|
|
2010
2011
|
}
|
|
2011
2012
|
}
|
|
2012
2013
|
return U;
|
|
2013
2014
|
}
|
|
2014
|
-
function
|
|
2015
|
+
function de() {
|
|
2015
2016
|
var j;
|
|
2016
2017
|
v.value = {
|
|
2017
2018
|
name: d.value,
|
|
@@ -2026,56 +2027,56 @@ const ue = /* @__PURE__ */ ge(Mt, [["__scopeId", "data-v-8c189c84"]]), It = { cl
|
|
|
2026
2027
|
}
|
|
2027
2028
|
function V() {
|
|
2028
2029
|
var j, U;
|
|
2029
|
-
(j = l.objectCreatedResponse) != null && j.error ?
|
|
2030
|
+
(j = l.objectCreatedResponse) != null && j.error ? He({
|
|
2030
2031
|
message: o("comboBox.createFailed", { name: d.value, error: l.objectCreatedResponse.error }),
|
|
2031
2032
|
colour: "danger",
|
|
2032
2033
|
duration: 1e4
|
|
2033
|
-
}) : (U = l.objectCreatedResponse) != null && U.id &&
|
|
2034
|
+
}) : (U = l.objectCreatedResponse) != null && U.id && Z();
|
|
2034
2035
|
}
|
|
2035
|
-
function
|
|
2036
|
+
function ae() {
|
|
2036
2037
|
var j;
|
|
2037
2038
|
(j = l.parentObjectCreatedResponse) != null && j.id && (c.value = {
|
|
2038
2039
|
id: l.parentObjectCreatedResponse.id,
|
|
2039
2040
|
name: l.parentObjectCreatedResponse.name ?? ""
|
|
2040
2041
|
});
|
|
2041
2042
|
}
|
|
2042
|
-
function
|
|
2043
|
-
var U,
|
|
2044
|
-
|
|
2043
|
+
function Z() {
|
|
2044
|
+
var U, oe, K, O, W;
|
|
2045
|
+
He({
|
|
2045
2046
|
message: o("comboBox.createSuccessful", { object: l.objectType, name: ((U = l.objectCreatedResponse) == null ? void 0 : U.name) ?? "" }),
|
|
2046
2047
|
colour: "primary",
|
|
2047
2048
|
duration: 1e4
|
|
2048
2049
|
});
|
|
2049
2050
|
let j = "";
|
|
2050
|
-
c.value && c.value.id === ((
|
|
2051
|
+
c.value && c.value.id === ((oe = l.objectCreatedResponse) == null ? void 0 : oe.parentId) && (j = c.value.name), s.value = {
|
|
2051
2052
|
id: ((K = l.objectCreatedResponse) == null ? void 0 : K.id) ?? 0,
|
|
2052
2053
|
name: ((O = l.objectCreatedResponse) == null ? void 0 : O.name) ?? "",
|
|
2053
2054
|
parentId: ((W = l.objectCreatedResponse) == null ? void 0 : W.parentId) ?? 0,
|
|
2054
2055
|
parentName: j
|
|
2055
2056
|
};
|
|
2056
2057
|
}
|
|
2057
|
-
function
|
|
2058
|
+
function he() {
|
|
2058
2059
|
let j = "";
|
|
2059
2060
|
return s.value && (s.value.parentName ? j = s.value.parentName + "; " + s.value.name : j = s.value.name), j;
|
|
2060
2061
|
}
|
|
2061
|
-
function
|
|
2062
|
+
function we() {
|
|
2062
2063
|
let j = !0;
|
|
2063
2064
|
d.value === "" && (j = !1), l.objectParentType !== "" && c.value === null && (j = !1), p.value = j;
|
|
2064
2065
|
}
|
|
2065
|
-
return J(() => l.objectCreatedResponse, () => V()), J(() => l.parentObjectCreatedResponse, () =>
|
|
2066
|
+
return J(() => l.objectCreatedResponse, () => V()), J(() => l.parentObjectCreatedResponse, () => ae()), J(() => d.value, () => we()), J(() => c.value, () => we()), n({
|
|
2066
2067
|
focus() {
|
|
2067
2068
|
var j;
|
|
2068
2069
|
(j = m.value) == null || j.focus();
|
|
2069
2070
|
}
|
|
2070
2071
|
}), (j, U) => {
|
|
2071
|
-
const
|
|
2072
|
+
const oe = el("cl-ui-combo-box", !0);
|
|
2072
2073
|
return i(), g("div", null, [
|
|
2073
2074
|
u("div", Gt, [
|
|
2074
|
-
y(
|
|
2075
|
+
y(re, {
|
|
2075
2076
|
ref_key: "inputRef",
|
|
2076
2077
|
ref: m,
|
|
2077
2078
|
modelValue: a(f),
|
|
2078
|
-
"onUpdate:modelValue": U[0] || (U[0] = (K) =>
|
|
2079
|
+
"onUpdate:modelValue": U[0] || (U[0] = (K) => be(f) ? f.value = K : null),
|
|
2079
2080
|
class: D(["!cl-bg-transparent !cl-mr-0 cl-mb-0 cl-rounded-r-none cl-w-full cl-z-10", {
|
|
2080
2081
|
"cl-cursor-pointer": e.disabled === !1
|
|
2081
2082
|
}]),
|
|
@@ -2087,7 +2088,7 @@ const ue = /* @__PURE__ */ ge(Mt, [["__scopeId", "data-v-8c189c84"]]), It = { cl
|
|
|
2087
2088
|
}, null, 8, ["modelValue", "class", "placeholder-text"]),
|
|
2088
2089
|
P(u("div", Ht, [
|
|
2089
2090
|
u("div", Wt, [
|
|
2090
|
-
|
|
2091
|
+
X(k(a(o)("comboBox.required")) + " ", 1),
|
|
2091
2092
|
y(a(N), {
|
|
2092
2093
|
class: "cl-ml-1 cl-mt-1",
|
|
2093
2094
|
icon: "ph:warning"
|
|
@@ -2124,7 +2125,7 @@ const ue = /* @__PURE__ */ ge(Mt, [["__scopeId", "data-v-8c189c84"]]), It = { cl
|
|
|
2124
2125
|
]),
|
|
2125
2126
|
y(sl, { size: "x-small" }, {
|
|
2126
2127
|
title: F(() => [
|
|
2127
|
-
|
|
2128
|
+
X(k(a(o)("comboBox.createTitle", { object: e.objectType })), 1)
|
|
2128
2129
|
]),
|
|
2129
2130
|
trigger: F(({ open: K }) => [
|
|
2130
2131
|
P(y(Vt, {
|
|
@@ -2148,27 +2149,27 @@ const ue = /* @__PURE__ */ ge(Mt, [["__scopeId", "data-v-8c189c84"]]), It = { cl
|
|
|
2148
2149
|
]),
|
|
2149
2150
|
footer: F(({ close: K }) => [
|
|
2150
2151
|
u("div", Kt, [
|
|
2151
|
-
y(
|
|
2152
|
+
y(ve, {
|
|
2152
2153
|
class: "cl-mr-3",
|
|
2153
2154
|
colour: "default",
|
|
2154
2155
|
size: "small",
|
|
2155
2156
|
onClick: K
|
|
2156
2157
|
}, {
|
|
2157
2158
|
default: F(() => [
|
|
2158
|
-
|
|
2159
|
+
X(k(a(o)("comboBox.cancel")), 1)
|
|
2159
2160
|
]),
|
|
2160
2161
|
_: 2
|
|
2161
2162
|
}, 1032, ["onClick"]),
|
|
2162
|
-
y(
|
|
2163
|
+
y(ve, {
|
|
2163
2164
|
colour: "primary",
|
|
2164
2165
|
size: "small",
|
|
2165
2166
|
disabled: !p.value,
|
|
2166
2167
|
onClick: (O) => {
|
|
2167
|
-
|
|
2168
|
+
de(), K();
|
|
2168
2169
|
}
|
|
2169
2170
|
}, {
|
|
2170
2171
|
default: F(() => [
|
|
2171
|
-
|
|
2172
|
+
X(k(a(o)("comboBox.create")), 1)
|
|
2172
2173
|
]),
|
|
2173
2174
|
_: 2
|
|
2174
2175
|
}, 1032, ["disabled", "onClick"])
|
|
@@ -2176,7 +2177,7 @@ const ue = /* @__PURE__ */ ge(Mt, [["__scopeId", "data-v-8c189c84"]]), It = { cl
|
|
|
2176
2177
|
]),
|
|
2177
2178
|
default: F(() => [
|
|
2178
2179
|
u("div", Jt, [
|
|
2179
|
-
e.objectParentType ? (i(), L(
|
|
2180
|
+
e.objectParentType ? (i(), L(oe, {
|
|
2180
2181
|
key: 0,
|
|
2181
2182
|
"current-object": c.value,
|
|
2182
2183
|
"onUpdate:currentObject": U[5] || (U[5] = (K) => c.value = K),
|
|
@@ -2191,7 +2192,7 @@ const ue = /* @__PURE__ */ ge(Mt, [["__scopeId", "data-v-8c189c84"]]), It = { cl
|
|
|
2191
2192
|
onSearch: w,
|
|
2192
2193
|
onCreateObject: T
|
|
2193
2194
|
}, null, 8, ["current-object", "results", "loading", "object-type", "object-created-response", "can-create-new-object", "can-clear-selected-object", "error-message"])) : I("", !0),
|
|
2194
|
-
y(
|
|
2195
|
+
y(re, {
|
|
2195
2196
|
modelValue: d.value,
|
|
2196
2197
|
"onUpdate:modelValue": U[6] || (U[6] = (K) => d.value = K),
|
|
2197
2198
|
label: a(o)("comboBox.createProperty"),
|
|
@@ -2234,12 +2235,12 @@ function an(e, n) {
|
|
|
2234
2235
|
])) : I("", !0)
|
|
2235
2236
|
]);
|
|
2236
2237
|
}
|
|
2237
|
-
const on = /* @__PURE__ */
|
|
2238
|
+
const on = /* @__PURE__ */ me(Xt, [["render", an]]);
|
|
2238
2239
|
function je(e) {
|
|
2239
2240
|
const n = e.type !== "slot" || e.slotType !== void 0 && e.field !== void 0, t = e.sortable ?? !0;
|
|
2240
2241
|
return n && t;
|
|
2241
2242
|
}
|
|
2242
|
-
function
|
|
2243
|
+
function Fe(e) {
|
|
2243
2244
|
const n = e.type !== "slot" || e.slotType !== void 0 && e.field !== void 0, t = e.filterable ?? !0;
|
|
2244
2245
|
return n && t;
|
|
2245
2246
|
}
|
|
@@ -2256,23 +2257,23 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2256
2257
|
},
|
|
2257
2258
|
emits: ["update:edit-mode", "update:filterPanelOpen", "clear-filters"],
|
|
2258
2259
|
setup(e) {
|
|
2259
|
-
const { t: n } =
|
|
2260
|
+
const { t: n } = ne();
|
|
2260
2261
|
return (t, l) => (i(), g(z, null, [
|
|
2261
2262
|
u("div", cn, [
|
|
2262
2263
|
u("strong", null, k(a(n)("grid.gridTools")), 1)
|
|
2263
2264
|
]),
|
|
2264
2265
|
u("div", sn, [
|
|
2265
|
-
e.columns.some((o) => o.editable) ? (i(), L(
|
|
2266
|
+
e.columns.some((o) => o.editable) ? (i(), L(ve, {
|
|
2266
2267
|
key: 0,
|
|
2267
2268
|
size: "small",
|
|
2268
2269
|
colour: "default",
|
|
2269
|
-
onClick: l[0] || (l[0] =
|
|
2270
|
+
onClick: l[0] || (l[0] = Q((o) => t.$emit("update:edit-mode", !e.editMode), ["prevent"]))
|
|
2270
2271
|
}, {
|
|
2271
2272
|
default: F(() => [
|
|
2272
2273
|
e.editMode ? (i(), g(z, { key: 0 }, [
|
|
2273
|
-
|
|
2274
|
+
X(k(a(n)("grid.finishEditing")), 1)
|
|
2274
2275
|
], 64)) : (i(), g(z, { key: 1 }, [
|
|
2275
|
-
|
|
2276
|
+
X(k(a(n)("grid.editData")), 1)
|
|
2276
2277
|
], 64))
|
|
2277
2278
|
]),
|
|
2278
2279
|
_: 1
|
|
@@ -2280,24 +2281,24 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2280
2281
|
e.options.hideViewManager ? I("", !0) : (i(), g("div", rn, [
|
|
2281
2282
|
A(t.$slots, "view-manager")
|
|
2282
2283
|
])),
|
|
2283
|
-
e.columns.some((o) => a(
|
|
2284
|
-
y(
|
|
2284
|
+
e.columns.some((o) => a(Fe)(o) || a(je)(o)) ? (i(), g(z, { key: 2 }, [
|
|
2285
|
+
y(ve, {
|
|
2285
2286
|
size: "small",
|
|
2286
|
-
onClick: l[1] || (l[1] =
|
|
2287
|
+
onClick: l[1] || (l[1] = Q((o) => t.$emit("clear-filters"), ["prevent"]))
|
|
2287
2288
|
}, {
|
|
2288
2289
|
default: F(() => [
|
|
2289
|
-
|
|
2290
|
+
X(k(a(n)("grid.clearFilters")), 1)
|
|
2290
2291
|
]),
|
|
2291
2292
|
_: 1
|
|
2292
2293
|
}),
|
|
2293
2294
|
u("div", un, [
|
|
2294
|
-
y(
|
|
2295
|
+
y(ve, {
|
|
2295
2296
|
class: "cl-w-full",
|
|
2296
2297
|
size: "small",
|
|
2297
|
-
onClick: l[2] || (l[2] =
|
|
2298
|
+
onClick: l[2] || (l[2] = Q((o) => t.$emit("update:filterPanelOpen", !e.filterPanelOpen), ["prevent"]))
|
|
2298
2299
|
}, {
|
|
2299
2300
|
default: F(() => [
|
|
2300
|
-
|
|
2301
|
+
X(k(a(n)("grid.modifyFilters")), 1)
|
|
2301
2302
|
]),
|
|
2302
2303
|
_: 1
|
|
2303
2304
|
})
|
|
@@ -2312,26 +2313,26 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2312
2313
|
}, mn = {
|
|
2313
2314
|
key: 1,
|
|
2314
2315
|
class: "cl-inline-block cl-whitespace-nowrap"
|
|
2315
|
-
},
|
|
2316
|
+
}, Xe = /* @__PURE__ */ q({
|
|
2316
2317
|
__name: "cl-ui-grid-cell-value",
|
|
2317
2318
|
props: {
|
|
2318
2319
|
data: null,
|
|
2319
2320
|
column: null
|
|
2320
2321
|
},
|
|
2321
2322
|
setup(e) {
|
|
2322
|
-
const { d: n } =
|
|
2323
|
-
return (t, l) => e.column.type === "slot" ? A(t.$slots, e.column.name, { key: 0 }) : e.column.type === "boolean" && e.column.field !== void 0 ? (i(), L(
|
|
2323
|
+
const { d: n } = ne();
|
|
2324
|
+
return (t, l) => e.column.type === "slot" ? A(t.$slots, e.column.name, { key: 0 }) : e.column.type === "boolean" && e.column.field !== void 0 ? (i(), L(re, {
|
|
2324
2325
|
key: 1,
|
|
2325
2326
|
"input-type": "checkbox",
|
|
2326
2327
|
"model-value": e.data[e.column.field],
|
|
2327
2328
|
disabled: !0
|
|
2328
2329
|
}, null, 8, ["model-value"])) : (e.column.type === "date" || e.column.type === "datetime") && e.column.field !== void 0 ? (i(), g(z, { key: 2 }, [
|
|
2329
2330
|
e.column.format !== void 0 ? (i(), g(z, { key: 0 }, [
|
|
2330
|
-
|
|
2331
|
+
X(k(a(n)(new Date(e.data[e.column.field]), e.column.format)), 1)
|
|
2331
2332
|
], 64)) : e.column.type === "date" ? (i(), g(z, { key: 1 }, [
|
|
2332
|
-
|
|
2333
|
+
X(k(a(n)(new Date(e.data[e.column.field]), a(G).DATE)), 1)
|
|
2333
2334
|
], 64)) : (i(), g(z, { key: 2 }, [
|
|
2334
|
-
|
|
2335
|
+
X(k(a(n)(new Date(e.data[e.column.field]), a(G).DATETIME)), 1)
|
|
2335
2336
|
], 64))
|
|
2336
2337
|
], 64)) : e.column.field !== void 0 ? (i(), g(z, { key: 3 }, [
|
|
2337
2338
|
e.column.maxLength !== void 0 ? (i(), g("span", fn, k(e.data[e.column.field].trimToLength(e.column.maxLength, e.column.format !== void 0 ? e.column.format === "ellipsis" : !1)), 1)) : (i(), g("span", mn, k(e.data[e.column.field]), 1))
|
|
@@ -2346,8 +2347,8 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2346
2347
|
},
|
|
2347
2348
|
emits: ["edit", "focus", "undo"],
|
|
2348
2349
|
setup(e, { emit: n }) {
|
|
2349
|
-
const t = e, l = C(
|
|
2350
|
-
return fl(() => l.value =
|
|
2350
|
+
const t = e, l = C(ue(t.data)), o = S(() => t.column.field !== void 0 && l.value[t.column.field] !== t.data[t.column.field]);
|
|
2351
|
+
return fl(() => l.value = ue(t.data)), J(l, (r) => {
|
|
2351
2352
|
const s = t.column.field ?? "";
|
|
2352
2353
|
s !== "" && (r[s] !== t.data[s] ? n("edit", r[s]) : n("undo"));
|
|
2353
2354
|
}, {
|
|
@@ -2358,28 +2359,28 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2358
2359
|
}])
|
|
2359
2360
|
}, [
|
|
2360
2361
|
u("span", gn, k(e.column.caption), 1),
|
|
2361
|
-
e.editMode && e.column.editable === !0 ? A(r.$slots, `${e.column.name}Edit`,
|
|
2362
|
+
e.editMode && e.column.editable === !0 ? A(r.$slots, `${e.column.name}Edit`, le(fe({ key: 0 }, {
|
|
2362
2363
|
cellFocused: () => n("focus"),
|
|
2363
2364
|
column: e.column,
|
|
2364
2365
|
edited: a(o),
|
|
2365
2366
|
record: l.value
|
|
2366
2367
|
})), () => [
|
|
2367
|
-
y(
|
|
2368
|
+
y(Xe, {
|
|
2368
2369
|
column: e.column,
|
|
2369
2370
|
data: e.data
|
|
2370
2371
|
}, {
|
|
2371
2372
|
[e.column.name]: F(() => [
|
|
2372
|
-
A(r.$slots, e.column.name,
|
|
2373
|
+
A(r.$slots, e.column.name, le(ce({ column: e.column, data: e.data })))
|
|
2373
2374
|
]),
|
|
2374
2375
|
_: 2
|
|
2375
2376
|
}, 1032, ["column", "data"])
|
|
2376
|
-
]) : (i(), L(
|
|
2377
|
+
]) : (i(), L(Xe, {
|
|
2377
2378
|
key: 1,
|
|
2378
2379
|
column: e.column,
|
|
2379
2380
|
data: e.data
|
|
2380
2381
|
}, {
|
|
2381
2382
|
[e.column.name]: F(() => [
|
|
2382
|
-
A(r.$slots, e.column.name,
|
|
2383
|
+
A(r.$slots, e.column.name, le(ce({ column: e.column, record: e.data })))
|
|
2383
2384
|
]),
|
|
2384
2385
|
_: 2
|
|
2385
2386
|
}, 1032, ["column", "data"]))
|
|
@@ -2395,7 +2396,7 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2395
2396
|
emits: ["cell-focus", "cell-edit", "cell-undo", "row-select"],
|
|
2396
2397
|
setup(e) {
|
|
2397
2398
|
return (n, t) => (i(), g("tr", null, [
|
|
2398
|
-
(i(!0), g(z, null,
|
|
2399
|
+
(i(!0), g(z, null, _(e.columns, (l, o) => (i(), L(bn, {
|
|
2399
2400
|
key: o,
|
|
2400
2401
|
data: e.data,
|
|
2401
2402
|
column: l,
|
|
@@ -2404,10 +2405,10 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2404
2405
|
onEdit: (r) => n.$emit("cell-edit", { field: l.field, value: r }),
|
|
2405
2406
|
onUndo: (r) => n.$emit("cell-undo", l.field)
|
|
2406
2407
|
}, Le({ _: 2 }, [
|
|
2407
|
-
|
|
2408
|
+
_(n.$slots, (r, s) => ({
|
|
2408
2409
|
name: s,
|
|
2409
2410
|
fn: F((m) => [
|
|
2410
|
-
A(n.$slots, s,
|
|
2411
|
+
A(n.$slots, s, le(ce(m)))
|
|
2411
2412
|
])
|
|
2412
2413
|
}))
|
|
2413
2414
|
]), 1032, ["data", "column", "edit-mode", "onEdit", "onUndo"]))), 128))
|
|
@@ -2428,12 +2429,12 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2428
2429
|
},
|
|
2429
2430
|
emits: ["row-select", "row-edit", "clear-filters"],
|
|
2430
2431
|
setup(e, { emit: n }) {
|
|
2431
|
-
const t = e, { t: l } =
|
|
2432
|
+
const t = e, { t: l } = ne(), o = C({
|
|
2432
2433
|
index: -1,
|
|
2433
2434
|
record: {}
|
|
2434
2435
|
});
|
|
2435
2436
|
function r() {
|
|
2436
|
-
Object.keys(o.value.record).length !== 0 && (n("row-edit",
|
|
2437
|
+
Object.keys(o.value.record).length !== 0 && (n("row-edit", ue(o.value)), o.value.record = {});
|
|
2437
2438
|
}
|
|
2438
2439
|
function s(h) {
|
|
2439
2440
|
o.value.index !== -1 && o.value.index !== h && r(), o.value.index = h;
|
|
@@ -2473,7 +2474,7 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2473
2474
|
}), (h, v) => {
|
|
2474
2475
|
var p;
|
|
2475
2476
|
return i(), g("tbody", null, [
|
|
2476
|
-
e.data && ((p = e.data.results) != null && p.length) ? (i(!0), g(z, { key: 0 },
|
|
2477
|
+
e.data && ((p = e.data.results) != null && p.length) ? (i(!0), g(z, { key: 0 }, _(e.data.results, (b, x) => (i(), L(vn, {
|
|
2477
2478
|
key: x,
|
|
2478
2479
|
data: b,
|
|
2479
2480
|
columns: e.columns,
|
|
@@ -2494,10 +2495,10 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2494
2495
|
},
|
|
2495
2496
|
onCellUndo: c
|
|
2496
2497
|
}, Le({ _: 2 }, [
|
|
2497
|
-
|
|
2498
|
+
_(h.$slots, (w, E) => ({
|
|
2498
2499
|
name: E,
|
|
2499
2500
|
fn: F((H) => [
|
|
2500
|
-
A(h.$slots, E,
|
|
2501
|
+
A(h.$slots, E, le(ce(H)))
|
|
2501
2502
|
])
|
|
2502
2503
|
}))
|
|
2503
2504
|
]), 1032, ["data", "columns", "edit-mode", "class", "onClick", "onCellFocus", "onCellEdit"]))), 128)) : e.loading ? I("", !0) : (i(), g("tr", hn, [
|
|
@@ -2508,12 +2509,12 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2508
2509
|
u("strong", wn, k(a(l)("grid.noData")), 1),
|
|
2509
2510
|
e.request.filters.length > 0 ? (i(), g("div", xn, [
|
|
2510
2511
|
u("div", $n, k(a(l)("grid.noDataFiltersPresent")), 1),
|
|
2511
|
-
y(
|
|
2512
|
+
y(ve, {
|
|
2512
2513
|
size: "small",
|
|
2513
|
-
onClick: v[0] || (v[0] =
|
|
2514
|
+
onClick: v[0] || (v[0] = Q((b) => h.$emit("clear-filters"), ["prevent"]))
|
|
2514
2515
|
}, {
|
|
2515
2516
|
default: F(() => [
|
|
2516
|
-
|
|
2517
|
+
X(k(a(l)("grid.clearFilters")), 1)
|
|
2517
2518
|
]),
|
|
2518
2519
|
_: 1
|
|
2519
2520
|
})
|
|
@@ -2537,7 +2538,7 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2537
2538
|
"update:request": null
|
|
2538
2539
|
},
|
|
2539
2540
|
setup(e, { emit: n }) {
|
|
2540
|
-
const t = e, { n: l, t: o } =
|
|
2541
|
+
const t = e, { n: l, t: o } = ne(), r = S(() => {
|
|
2541
2542
|
var v;
|
|
2542
2543
|
return t.data !== null ? Math.ceil((((v = t.data) == null ? void 0 : v.totalRecords) ?? 0) / t.request.pageSize) : 1;
|
|
2543
2544
|
}), s = S(() => {
|
|
@@ -2550,7 +2551,7 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2550
2551
|
return p;
|
|
2551
2552
|
});
|
|
2552
2553
|
function m(v) {
|
|
2553
|
-
const p =
|
|
2554
|
+
const p = ue(t.request);
|
|
2554
2555
|
p.pageNumber !== v && (p.pageNumber = Math.max(Math.min(Math.trunc(v), r.value), 1), n("update:request", p));
|
|
2555
2556
|
}
|
|
2556
2557
|
function c(v) {
|
|
@@ -2558,6 +2559,7 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2558
2559
|
m(p);
|
|
2559
2560
|
}
|
|
2560
2561
|
const f = [
|
|
2562
|
+
5,
|
|
2561
2563
|
10,
|
|
2562
2564
|
20,
|
|
2563
2565
|
50,
|
|
@@ -2565,7 +2567,7 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2565
2567
|
200
|
|
2566
2568
|
];
|
|
2567
2569
|
function d(v) {
|
|
2568
|
-
const p =
|
|
2570
|
+
const p = ue(t.request);
|
|
2569
2571
|
p.pageSize = v, p.pageNumber = 1, n("update:request", p);
|
|
2570
2572
|
}
|
|
2571
2573
|
const h = nl(c, 750);
|
|
@@ -2574,7 +2576,7 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2574
2576
|
return (x = (b = e.data) == null ? void 0 : b.results) != null && x.length && e.request ? (i(), g("div", Tn, [
|
|
2575
2577
|
u("div", Cn, [
|
|
2576
2578
|
u("span", Sn, k(a(o)("grid.jumpToPage")), 1),
|
|
2577
|
-
y(
|
|
2579
|
+
y(re, {
|
|
2578
2580
|
"model-value": e.request.pageNumber,
|
|
2579
2581
|
class: "cl-ml-1 cl-mt-0.5 cl-text-sm",
|
|
2580
2582
|
"input-type": "number",
|
|
@@ -2591,7 +2593,7 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2591
2593
|
u("span", An, k(a(o)("grid.page")), 1)
|
|
2592
2594
|
]),
|
|
2593
2595
|
u("ul", Mn, [
|
|
2594
|
-
u("li", In, k(a(l)(e.request.pageNumber, a(
|
|
2596
|
+
u("li", In, k(a(l)(e.request.pageNumber, a(ee).INTEGER)) + " / " + k(a(l)(a(r), a(ee).INTEGER)), 1),
|
|
2595
2597
|
P(u("li", {
|
|
2596
2598
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2597
2599
|
onClick: p[1] || (p[1] = (w) => m(1))
|
|
@@ -2614,14 +2616,14 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2614
2616
|
], 512), [
|
|
2615
2617
|
[B, e.request.pageNumber > 1]
|
|
2616
2618
|
]),
|
|
2617
|
-
(i(!0), g(z, null,
|
|
2619
|
+
(i(!0), g(z, null, _(a(s), (w, E) => (i(), g("li", {
|
|
2618
2620
|
key: E,
|
|
2619
2621
|
class: D(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2620
2622
|
"cl-text-black cl-font-bold": e.request.pageNumber === w,
|
|
2621
2623
|
"cl-text-grey-6": e.request.pageNumber !== w
|
|
2622
2624
|
}]),
|
|
2623
2625
|
onClick: (H) => m(w)
|
|
2624
|
-
}, k(a(l)(w, a(
|
|
2626
|
+
}, k(a(l)(w, a(ee).INTEGER)), 11, Nn))), 128)),
|
|
2625
2627
|
P(u("li", {
|
|
2626
2628
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2627
2629
|
onClick: p[3] || (p[3] = (w) => m(e.request.pageNumber + 1))
|
|
@@ -2648,18 +2650,18 @@ const cn = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, sn = { class: "cl-gap-1
|
|
|
2648
2650
|
]),
|
|
2649
2651
|
u("ul", Dn, [
|
|
2650
2652
|
u("li", qn, k(a(o)("grid.pageSize")), 1),
|
|
2651
|
-
(i(), g(z, null,
|
|
2653
|
+
(i(), g(z, null, _(f, (w, E) => u("li", {
|
|
2652
2654
|
key: E,
|
|
2653
2655
|
class: D(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2654
2656
|
"cl-text-black cl-font-bold": e.request.pageSize === w,
|
|
2655
2657
|
"cl-text-grey-6": e.request.pageSize !== w
|
|
2656
2658
|
}]),
|
|
2657
2659
|
onClick: (H) => d(w)
|
|
2658
|
-
}, k(a(l)(w, a(
|
|
2660
|
+
}, k(a(l)(w, a(ee).INTEGER)), 11, Rn)), 64))
|
|
2659
2661
|
]),
|
|
2660
2662
|
u("ul", Pn, [
|
|
2661
2663
|
u("li", Un, k(a(o)("grid.totalRecords")), 1),
|
|
2662
|
-
u("li", Bn, k(a(l)(e.data.totalRecords, a(
|
|
2664
|
+
u("li", Bn, k(a(l)(e.data.totalRecords, a(ee).INTEGER)), 1)
|
|
2663
2665
|
])
|
|
2664
2666
|
])
|
|
2665
2667
|
])) : I("", !0);
|
|
@@ -2688,7 +2690,7 @@ function Fn(e) {
|
|
|
2688
2690
|
return n;
|
|
2689
2691
|
}
|
|
2690
2692
|
const Vn = ["ellipsis"];
|
|
2691
|
-
var
|
|
2693
|
+
var ge = /* @__PURE__ */ ((e) => (e[e.CONTAINS = 0] = "CONTAINS", e[e.NOT_CONTAINS = 1] = "NOT_CONTAINS", e[e.EQUAL = 2] = "EQUAL", e[e.NOT_EQUAL = 3] = "NOT_EQUAL", e[e.STARTS_WITH = 4] = "STARTS_WITH", e[e.ENDS_WITH = 5] = "ENDS_WITH", e[e.GREATER_THAN = 6] = "GREATER_THAN", e[e.LESS_THAN = 7] = "LESS_THAN", e[e.EQUAL_OR_GREATER_THAN = 8] = "EQUAL_OR_GREATER_THAN", e[e.EQUAL_OR_LESS_THAN = 9] = "EQUAL_OR_LESS_THAN", e))(ge || {});
|
|
2692
2694
|
const Gn = [
|
|
2693
2695
|
"equal",
|
|
2694
2696
|
"notequal",
|
|
@@ -2753,7 +2755,7 @@ const Zn = {
|
|
|
2753
2755
|
"date",
|
|
2754
2756
|
"datetime"
|
|
2755
2757
|
]
|
|
2756
|
-
},
|
|
2758
|
+
}, _e = [
|
|
2757
2759
|
Qn,
|
|
2758
2760
|
{
|
|
2759
2761
|
method: "notcontains",
|
|
@@ -2826,15 +2828,15 @@ const Zn = {
|
|
|
2826
2828
|
},
|
|
2827
2829
|
emits: ["update:filter"],
|
|
2828
2830
|
setup(e, { emit: n }) {
|
|
2829
|
-
const t = e, { t: l } =
|
|
2831
|
+
const t = e, { t: l } = ne(), o = S(() => {
|
|
2830
2832
|
let m = [];
|
|
2831
|
-
return t.column.type !== "slot" ? m =
|
|
2833
|
+
return t.column.type !== "slot" ? m = _e.filter((c) => c.allowedTypes.includes(t.column.type)) : typeof t.column.slotType < "u" && typeof t.column.field < "u" && (m = _e.filter((c) => c.allowedTypes.includes(t.column.slotType))), m.forEach((c) => {
|
|
2832
2834
|
c.description = l(`grid.${c.method}`);
|
|
2833
2835
|
}), m;
|
|
2834
2836
|
}), r = S(() => {
|
|
2835
2837
|
var c;
|
|
2836
2838
|
let m = (c = t.filter) == null ? void 0 : c.filterMethod;
|
|
2837
|
-
return typeof m > "u" && (m =
|
|
2839
|
+
return typeof m > "u" && (m = ge[t.defaultOperation]), o.value.find((f) => {
|
|
2838
2840
|
var d;
|
|
2839
2841
|
return f.method.toLowerCase() === ((d = m == null ? void 0 : m.removeNonAlphanumeric()) == null ? void 0 : d.toLowerCase());
|
|
2840
2842
|
});
|
|
@@ -2842,12 +2844,12 @@ const Zn = {
|
|
|
2842
2844
|
function s(m) {
|
|
2843
2845
|
let c;
|
|
2844
2846
|
if (t.filter)
|
|
2845
|
-
c =
|
|
2847
|
+
c = ue(t.filter), c.filterOperation = ge[m.toUpperCase()], c.filterMethod = m.toUpperCase();
|
|
2846
2848
|
else if (typeof t.column.field < "u")
|
|
2847
2849
|
c = {
|
|
2848
2850
|
filterOnColumn: t.column.field,
|
|
2849
2851
|
filterMethod: m.toUpperCase(),
|
|
2850
|
-
filterOperation:
|
|
2852
|
+
filterOperation: ge[m.toUpperCase()],
|
|
2851
2853
|
filterValue: ""
|
|
2852
2854
|
};
|
|
2853
2855
|
else
|
|
@@ -2870,16 +2872,16 @@ const Zn = {
|
|
|
2870
2872
|
}])
|
|
2871
2873
|
}, [
|
|
2872
2874
|
u("strong", ea, k(a(l)("grid.availableMethods")), 1),
|
|
2873
|
-
(i(!0), g(z, null,
|
|
2875
|
+
(i(!0), g(z, null, _(a(o), (d, h) => {
|
|
2874
2876
|
var v;
|
|
2875
2877
|
return i(), g("span", {
|
|
2876
2878
|
key: h,
|
|
2877
2879
|
class: D(["cl-cursor-pointer cl-px-4 cl-py-1 cl-transition-colors cl-w-full hover:cl-bg-grey-0", {
|
|
2878
2880
|
"cl-bg-off-white": d.method === ((v = a(r)) == null ? void 0 : v.method)
|
|
2879
2881
|
}]),
|
|
2880
|
-
onClick:
|
|
2882
|
+
onClick: Q((p) => s(d.method), ["prevent"])
|
|
2881
2883
|
}, [
|
|
2882
|
-
|
|
2884
|
+
X(k(d.description) + " ", 1),
|
|
2883
2885
|
y(a(N), {
|
|
2884
2886
|
icon: d.icon,
|
|
2885
2887
|
class: "cl-float-right cl-text-grey-4 cl-text-sm"
|
|
@@ -2902,9 +2904,9 @@ const Zn = {
|
|
|
2902
2904
|
},
|
|
2903
2905
|
emits: ["update:filter"],
|
|
2904
2906
|
setup(e, { emit: n }) {
|
|
2905
|
-
const t = e, { locale: l, t: o } =
|
|
2907
|
+
const t = e, { locale: l, t: o } = ne();
|
|
2906
2908
|
function r() {
|
|
2907
|
-
return t.column.type === "string" || t.column.slotType === "string" ?
|
|
2909
|
+
return t.column.type === "string" || t.column.slotType === "string" ? ge.CONTAINS : t.column.type === "datetime" || t.column.slotType === "datetime" ? ge.LESS_THAN : ge.EQUAL;
|
|
2908
2910
|
}
|
|
2909
2911
|
const s = S({
|
|
2910
2912
|
get: () => t.filter,
|
|
@@ -2912,19 +2914,19 @@ const Zn = {
|
|
|
2912
2914
|
}), m = S(() => {
|
|
2913
2915
|
var b;
|
|
2914
2916
|
return ((b = s.value) == null ? void 0 : b.filterValue) ?? "";
|
|
2915
|
-
}), c = S(() => m.value !== "" ? new Date(m.value) : null), f = S(() => Intl.NumberFormat(l.value).format(1.1).replace(/[0-9]+/g, "")), d = S(() =>
|
|
2917
|
+
}), c = S(() => m.value !== "" ? new Date(m.value) : null), f = S(() => Intl.NumberFormat(l.value).format(1.1).replace(/[0-9]+/g, "")), d = S(() => Fe(t.column));
|
|
2916
2918
|
function h(b, x) {
|
|
2917
|
-
var
|
|
2919
|
+
var te;
|
|
2918
2920
|
let w, E = !1;
|
|
2919
2921
|
const H = ((b == null ? void 0 : b.value) ?? x).trim();
|
|
2920
2922
|
if (s.value)
|
|
2921
|
-
E = ((
|
|
2923
|
+
E = ((te = s.value) == null ? void 0 : te.filterValue) === H, w = ue(s.value), w.filterValue = H;
|
|
2922
2924
|
else if (H !== "" && typeof t.column.field < "u") {
|
|
2923
|
-
const
|
|
2925
|
+
const de = r();
|
|
2924
2926
|
w = {
|
|
2925
2927
|
filterOnColumn: t.column.field,
|
|
2926
|
-
filterMethod:
|
|
2927
|
-
filterOperation:
|
|
2928
|
+
filterMethod: ge[de],
|
|
2929
|
+
filterOperation: de,
|
|
2928
2930
|
filterValue: H
|
|
2929
2931
|
};
|
|
2930
2932
|
} else
|
|
@@ -2933,7 +2935,7 @@ const Zn = {
|
|
|
2933
2935
|
}
|
|
2934
2936
|
function v(b) {
|
|
2935
2937
|
let x;
|
|
2936
|
-
t.column.format ===
|
|
2938
|
+
t.column.format === ee.INTEGER ? (typeof b == "string" && (b = parseInt(b)), x = Math.round(b)) : (typeof b == "string" && (b = parseFloat(b.replace(f.value, "."))), x = b), h(null, isNaN(x) ? "" : x.toString());
|
|
2937
2939
|
}
|
|
2938
2940
|
function p(b) {
|
|
2939
2941
|
h(null, (b == null ? void 0 : b.toISOString()) ?? "");
|
|
@@ -2941,7 +2943,7 @@ const Zn = {
|
|
|
2941
2943
|
return (b, x) => a(d) ? (i(), g("div", na, [
|
|
2942
2944
|
y(ta, {
|
|
2943
2945
|
filter: a(s),
|
|
2944
|
-
"onUpdate:filter": x[0] || (x[0] = (w) =>
|
|
2946
|
+
"onUpdate:filter": x[0] || (x[0] = (w) => be(s) ? s.value = w : null),
|
|
2945
2947
|
column: e.column,
|
|
2946
2948
|
"default-operation": r(),
|
|
2947
2949
|
"first-half": e.firstHalf
|
|
@@ -2960,7 +2962,7 @@ const Zn = {
|
|
|
2960
2962
|
value: "false",
|
|
2961
2963
|
selected: a(m) === "false"
|
|
2962
2964
|
}, k(a(o)("grid.false")), 9, ca)
|
|
2963
|
-
], 32)) : e.column.type === "date" || e.column.type === "datetime" || e.column.slotType === "date" || e.column.slotType === "datetime" ? (i(), L(
|
|
2965
|
+
], 32)) : e.column.type === "date" || e.column.type === "datetime" || e.column.slotType === "date" || e.column.slotType === "datetime" ? (i(), L(re, {
|
|
2964
2966
|
key: 1,
|
|
2965
2967
|
"model-value": a(c),
|
|
2966
2968
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-h-[2.5rem] lg:!cl-text-base",
|
|
@@ -2970,14 +2972,14 @@ const Zn = {
|
|
|
2970
2972
|
"show-label": !1,
|
|
2971
2973
|
"input-type": e.column.type === "slot" ? e.column.slotType : e.column.type,
|
|
2972
2974
|
"onUpdate:modelValue": x[2] || (x[2] = (w) => p(w))
|
|
2973
|
-
}, null, 8, ["model-value", "label", "input-type"])) : e.column.type === "number" || e.column.slotType === "number" ? (i(), L(
|
|
2975
|
+
}, null, 8, ["model-value", "label", "input-type"])) : e.column.type === "number" || e.column.slotType === "number" ? (i(), L(re, {
|
|
2974
2976
|
key: 2,
|
|
2975
2977
|
"model-value": a(m),
|
|
2976
2978
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-h-[2.5rem] lg:!cl-text-base",
|
|
2977
2979
|
"input-type": "number",
|
|
2978
2980
|
"show-arrows": !1,
|
|
2979
2981
|
onInput: x[3] || (x[3] = (w, E) => v(E))
|
|
2980
|
-
}, null, 8, ["model-value"])) : e.column.type === "string" || e.column.slotType === "string" ? (i(), L(
|
|
2982
|
+
}, null, 8, ["model-value"])) : e.column.type === "string" || e.column.slotType === "string" ? (i(), L(re, {
|
|
2981
2983
|
key: 3,
|
|
2982
2984
|
"model-value": a(m),
|
|
2983
2985
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-h-[2.5rem] lg:!cl-text-base",
|
|
@@ -2996,7 +2998,7 @@ const Zn = {
|
|
|
2996
2998
|
},
|
|
2997
2999
|
emits: ["update:request", "update:filterPanelOpen"],
|
|
2998
3000
|
setup(e, { emit: n }) {
|
|
2999
|
-
const t = e, { t: l } =
|
|
3001
|
+
const t = e, { t: l } = ne(), o = S({
|
|
3000
3002
|
get: () => t.request,
|
|
3001
3003
|
set: (c) => n("update:request", c)
|
|
3002
3004
|
});
|
|
@@ -3006,7 +3008,7 @@ const Zn = {
|
|
|
3006
3008
|
}
|
|
3007
3009
|
function s(c) {
|
|
3008
3010
|
if (typeof c < "u") {
|
|
3009
|
-
const f =
|
|
3011
|
+
const f = ue(t.request);
|
|
3010
3012
|
f.sort === null || f.sort.sortOnColumn !== c ? f.sort = {
|
|
3011
3013
|
sortOnColumn: c,
|
|
3012
3014
|
sortByAscending: !0
|
|
@@ -3015,13 +3017,13 @@ const Zn = {
|
|
|
3015
3017
|
}
|
|
3016
3018
|
function m(c) {
|
|
3017
3019
|
if (c) {
|
|
3018
|
-
const f =
|
|
3020
|
+
const f = ue(o.value), d = f.filters.findIndex((h) => h.filterOnColumn === c.filterOnColumn);
|
|
3019
3021
|
d > -1 ? f.filters[d] = c : f.filters.push(c), f.pageNumber = 1, o.value = f;
|
|
3020
3022
|
}
|
|
3021
3023
|
}
|
|
3022
3024
|
return (c, f) => (i(), g("thead", ia, [
|
|
3023
3025
|
u("tr", ra, [
|
|
3024
|
-
(i(!0), g(z, null,
|
|
3026
|
+
(i(!0), g(z, null, _(e.columns, (d, h) => (i(), g("th", {
|
|
3025
3027
|
key: h,
|
|
3026
3028
|
class: D(["cl-text-grey-3 cl-text-sm", {
|
|
3027
3029
|
"cl-cursor-pointer": a(je)(d)
|
|
@@ -3029,7 +3031,7 @@ const Zn = {
|
|
|
3029
3031
|
onClick: (v) => a(je)(d) ? s(d.field) : () => {
|
|
3030
3032
|
}
|
|
3031
3033
|
}, [
|
|
3032
|
-
|
|
3034
|
+
X(k(d.caption) + " ", 1),
|
|
3033
3035
|
P(y(a(N), {
|
|
3034
3036
|
class: "cl-inline-block",
|
|
3035
3037
|
icon: "ph:caret-up"
|
|
@@ -3054,13 +3056,13 @@ const Zn = {
|
|
|
3054
3056
|
class: "cl-text-grey-4",
|
|
3055
3057
|
icon: "ph:x",
|
|
3056
3058
|
size: 16,
|
|
3057
|
-
onClick: f[0] || (f[0] =
|
|
3059
|
+
onClick: f[0] || (f[0] = Q((d) => c.$emit("update:filterPanelOpen", !1), ["prevent"]))
|
|
3058
3060
|
})
|
|
3059
3061
|
]),
|
|
3060
|
-
(i(!0), g(z, null,
|
|
3062
|
+
(i(!0), g(z, null, _(e.columns, (d, h) => (i(), g("th", {
|
|
3061
3063
|
key: h,
|
|
3062
3064
|
class: D(["cl-grid cl-grid-cols-4 cl-py-1 cl-text-xs cl-w-full lg:cl-table-cell lg:cl-w-auto", {
|
|
3063
|
-
"cl-hidden lg:cl-table-cell": !a(
|
|
3065
|
+
"cl-hidden lg:cl-table-cell": !a(Fe)(d)
|
|
3064
3066
|
}])
|
|
3065
3067
|
}, [
|
|
3066
3068
|
u("div", fa, k(d.caption), 1),
|
|
@@ -3105,31 +3107,31 @@ const Zn = {
|
|
|
3105
3107
|
},
|
|
3106
3108
|
emits: ["update:columns"],
|
|
3107
3109
|
setup(e, { emit: n }) {
|
|
3108
|
-
const t = e, { t: l } =
|
|
3110
|
+
const t = e, { t: l } = ne(), o = C(!1);
|
|
3109
3111
|
function r(c, f, d) {
|
|
3110
3112
|
d < c.length && d >= 0 && c.splice(d, 0, c.splice(f, 1)[0]);
|
|
3111
3113
|
}
|
|
3112
3114
|
function s(c, f) {
|
|
3113
|
-
const d =
|
|
3115
|
+
const d = ue(t.columns), h = (c == null ? void 0 : c.checked) ?? !1, v = d.findIndex((p) => p.name === f.name);
|
|
3114
3116
|
v >= 0 && (d[v].visible = h), n("update:columns", d);
|
|
3115
3117
|
}
|
|
3116
3118
|
function m(c, f) {
|
|
3117
|
-
const d =
|
|
3119
|
+
const d = ue(t.columns), h = f === "up" ? c + 1 : c - 1;
|
|
3118
3120
|
r(d, c, h), n("update:columns", d);
|
|
3119
3121
|
}
|
|
3120
3122
|
return (c, f) => (i(), g(z, null, [
|
|
3121
|
-
y(
|
|
3123
|
+
y(ve, fe(c.$attrs, {
|
|
3122
3124
|
class: "cl-w-full",
|
|
3123
3125
|
size: "small",
|
|
3124
|
-
onClick: f[0] || (f[0] =
|
|
3126
|
+
onClick: f[0] || (f[0] = Q((d) => o.value = !0, ["prevent"]))
|
|
3125
3127
|
}), {
|
|
3126
3128
|
default: F(() => [
|
|
3127
|
-
|
|
3129
|
+
X(k(a(l)("grid.manageView")), 1)
|
|
3128
3130
|
]),
|
|
3129
3131
|
_: 1
|
|
3130
3132
|
}, 16),
|
|
3131
|
-
(i(), L(
|
|
3132
|
-
y(
|
|
3133
|
+
(i(), L(ze, { to: "body" }, [
|
|
3134
|
+
y(pe, { name: "slide-left" }, {
|
|
3133
3135
|
default: F(() => [
|
|
3134
3136
|
P(u("div", va, [
|
|
3135
3137
|
u("div", ha, [
|
|
@@ -3146,13 +3148,13 @@ const Zn = {
|
|
|
3146
3148
|
u("strong", $a, k(a(l)("grid.visible")), 1),
|
|
3147
3149
|
u("strong", ka, k(a(l)("grid.order")), 1)
|
|
3148
3150
|
]),
|
|
3149
|
-
(i(!0), g(z, null,
|
|
3151
|
+
(i(!0), g(z, null, _(e.columns, (d, h) => (i(), g("li", {
|
|
3150
3152
|
key: h,
|
|
3151
3153
|
class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full"
|
|
3152
3154
|
}, [
|
|
3153
3155
|
u("div", Ta, k(d.caption), 1),
|
|
3154
3156
|
u("div", Ca, [
|
|
3155
|
-
y(
|
|
3157
|
+
y(re, {
|
|
3156
3158
|
"model-value": d.visible === void 0 || d.visible === !0,
|
|
3157
3159
|
"input-type": "checkbox",
|
|
3158
3160
|
onClick: (v) => s(v.target, d)
|
|
@@ -3219,7 +3221,7 @@ const Zn = {
|
|
|
3219
3221
|
set: (b) => n("update:request", b)
|
|
3220
3222
|
});
|
|
3221
3223
|
function f() {
|
|
3222
|
-
const b =
|
|
3224
|
+
const b = ue(c.value);
|
|
3223
3225
|
b.pageNumber = 1, b.filters = [], c.value = b;
|
|
3224
3226
|
}
|
|
3225
3227
|
const d = nl(() => n("data-request"), 750);
|
|
@@ -3231,10 +3233,10 @@ const Zn = {
|
|
|
3231
3233
|
return J(v, () => {
|
|
3232
3234
|
v.value ? n("edit-start") : n("edit-end");
|
|
3233
3235
|
}), (b, x) => (i(), g("div", Aa, [
|
|
3234
|
-
y(
|
|
3236
|
+
y(pe, { name: "fade" }, {
|
|
3235
3237
|
default: F(() => [
|
|
3236
3238
|
P(u("div", Ma, [
|
|
3237
|
-
y(
|
|
3239
|
+
y(Pe)
|
|
3238
3240
|
], 512), [
|
|
3239
3241
|
[B, e.loading]
|
|
3240
3242
|
])
|
|
@@ -3253,7 +3255,7 @@ const Zn = {
|
|
|
3253
3255
|
"view-manager": F(() => [
|
|
3254
3256
|
y(Oa, {
|
|
3255
3257
|
columns: a(l),
|
|
3256
|
-
"onUpdate:columns": x[0] || (x[0] = (w) =>
|
|
3258
|
+
"onUpdate:columns": x[0] || (x[0] = (w) => be(l) ? l.value = w : null)
|
|
3257
3259
|
}, null, 8, ["columns"])
|
|
3258
3260
|
]),
|
|
3259
3261
|
_: 1
|
|
@@ -3265,7 +3267,7 @@ const Zn = {
|
|
|
3265
3267
|
}])
|
|
3266
3268
|
}, [
|
|
3267
3269
|
u("colgroup", Na, [
|
|
3268
|
-
(i(!0), g(z, null,
|
|
3270
|
+
(i(!0), g(z, null, _(a(o), (w, E) => (i(), g("col", {
|
|
3269
3271
|
key: E,
|
|
3270
3272
|
style: ll(m(w.name)),
|
|
3271
3273
|
span: 1
|
|
@@ -3273,7 +3275,7 @@ const Zn = {
|
|
|
3273
3275
|
]),
|
|
3274
3276
|
y(ba, {
|
|
3275
3277
|
request: a(c),
|
|
3276
|
-
"onUpdate:request": x[3] || (x[3] = (w) =>
|
|
3278
|
+
"onUpdate:request": x[3] || (x[3] = (w) => be(c) ? c.value = w : null),
|
|
3277
3279
|
"filter-panel-open": p.value,
|
|
3278
3280
|
"onUpdate:filterPanelOpen": x[4] || (x[4] = (w) => p.value = w),
|
|
3279
3281
|
columns: a(o),
|
|
@@ -3290,10 +3292,10 @@ const Zn = {
|
|
|
3290
3292
|
onRowEdit: x[5] || (x[5] = (w) => b.$emit("row-edit", w)),
|
|
3291
3293
|
onRowSelect: x[6] || (x[6] = (w) => b.$emit("row-select", w))
|
|
3292
3294
|
}, Le({ _: 2 }, [
|
|
3293
|
-
|
|
3295
|
+
_(b.$slots, (w, E) => ({
|
|
3294
3296
|
name: E,
|
|
3295
3297
|
fn: F((H) => [
|
|
3296
|
-
A(b.$slots, E,
|
|
3298
|
+
A(b.$slots, E, le(ce(H)))
|
|
3297
3299
|
])
|
|
3298
3300
|
}))
|
|
3299
3301
|
]), 1032, ["columns", "request", "data", "loading", "edit-mode", "selection-enabled"])
|
|
@@ -3301,7 +3303,7 @@ const Zn = {
|
|
|
3301
3303
|
]),
|
|
3302
3304
|
y(zn, {
|
|
3303
3305
|
request: a(c),
|
|
3304
|
-
"onUpdate:request": x[7] || (x[7] = (w) =>
|
|
3306
|
+
"onUpdate:request": x[7] || (x[7] = (w) => be(c) ? c.value = w : null),
|
|
3305
3307
|
data: e.data
|
|
3306
3308
|
}, null, 8, ["request", "data"])
|
|
3307
3309
|
]));
|
|
@@ -3372,7 +3374,7 @@ const Zn = {
|
|
|
3372
3374
|
}, null, 8, ["class"])
|
|
3373
3375
|
])
|
|
3374
3376
|
]),
|
|
3375
|
-
y(
|
|
3377
|
+
y(pe, { name: "fade" }, {
|
|
3376
3378
|
default: F(() => [
|
|
3377
3379
|
P(u("div", Va, [
|
|
3378
3380
|
A(r.$slots, "default")
|
|
@@ -3404,7 +3406,7 @@ const Zn = {
|
|
|
3404
3406
|
"time",
|
|
3405
3407
|
"url"
|
|
3406
3408
|
];
|
|
3407
|
-
function
|
|
3409
|
+
function Be(e) {
|
|
3408
3410
|
return /[a-z]{2}-[A-Z]{2}/gm.test(e.localeCode);
|
|
3409
3411
|
}
|
|
3410
3412
|
function Wa(e) {
|
|
@@ -3433,13 +3435,13 @@ const Ka = {
|
|
|
3433
3435
|
},
|
|
3434
3436
|
emits: ["language-select"],
|
|
3435
3437
|
setup(e, { emit: n }) {
|
|
3436
|
-
const t = e, { locale: l } =
|
|
3438
|
+
const t = e, { locale: l } = ne(), o = C(!1), r = S(() => t.supportedLanguages.find((c) => c.localeCode === l.value) ?? t.defaultLangauge), s = S(() => t.supportedLanguages.filter((c) => Be(c)).sort((c, f) => c.nativeName > f.nativeName ? 1 : f.nativeName > c.nativeName ? -1 : 0));
|
|
3437
3439
|
function m() {
|
|
3438
3440
|
t.disabled || (o.value = !o.value);
|
|
3439
3441
|
}
|
|
3440
3442
|
return J(() => t.disabled, (c) => {
|
|
3441
3443
|
c && (o.value = !1);
|
|
3442
|
-
}), (c, f) => a(r) !== null && a(
|
|
3444
|
+
}), (c, f) => a(r) !== null && a(Be)(a(r)) ? (i(), g("div", Ka, [
|
|
3443
3445
|
u("div", {
|
|
3444
3446
|
class: D(["cl-flex cl-items-center", {
|
|
3445
3447
|
"cl-cursor-pointer": !e.disabled
|
|
@@ -3452,10 +3454,10 @@ const Ka = {
|
|
|
3452
3454
|
}])
|
|
3453
3455
|
}, k(a(r).nativeName), 3)
|
|
3454
3456
|
], 2),
|
|
3455
|
-
y(
|
|
3457
|
+
y(pe, { name: "fade" }, {
|
|
3456
3458
|
default: F(() => [
|
|
3457
3459
|
P(u("div", Za, [
|
|
3458
|
-
(i(!0), g(z, null,
|
|
3460
|
+
(i(!0), g(z, null, _(a(s), (d, h) => (i(), g("div", {
|
|
3459
3461
|
key: h,
|
|
3460
3462
|
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",
|
|
3461
3463
|
"data-localename": d.name,
|
|
@@ -3488,7 +3490,7 @@ const Ka = {
|
|
|
3488
3490
|
"update:errors": null
|
|
3489
3491
|
},
|
|
3490
3492
|
setup(e, { emit: n }) {
|
|
3491
|
-
const { t } =
|
|
3493
|
+
const { t } = ne(), l = C(""), o = C(""), r = C("password"), s = C();
|
|
3492
3494
|
function m() {
|
|
3493
3495
|
const h = {
|
|
3494
3496
|
username: l.value,
|
|
@@ -3533,7 +3535,7 @@ const Ka = {
|
|
|
3533
3535
|
icon: "ph:user",
|
|
3534
3536
|
size: 18
|
|
3535
3537
|
}),
|
|
3536
|
-
y(
|
|
3538
|
+
y(re, {
|
|
3537
3539
|
modelValue: l.value,
|
|
3538
3540
|
"onUpdate:modelValue": v[0] || (v[0] = (p) => l.value = p),
|
|
3539
3541
|
modelModifiers: { trim: !0 },
|
|
@@ -3576,7 +3578,7 @@ const Ka = {
|
|
|
3576
3578
|
}, null, 512), [
|
|
3577
3579
|
[B, r.value === "text"]
|
|
3578
3580
|
]),
|
|
3579
|
-
y(
|
|
3581
|
+
y(re, {
|
|
3580
3582
|
modelValue: o.value,
|
|
3581
3583
|
"onUpdate:modelValue": v[3] || (v[3] = (p) => o.value = p),
|
|
3582
3584
|
class: "!cl-border-2 cl-w-full",
|
|
@@ -3598,26 +3600,26 @@ const Ka = {
|
|
|
3598
3600
|
"cl-mt-1.5 cl-mb-1 md:cl-mt-0.5 md:cl-mb-7 lg:cl-mb-0": e.loading
|
|
3599
3601
|
}])
|
|
3600
3602
|
}, [
|
|
3601
|
-
y(
|
|
3603
|
+
y(ve, {
|
|
3602
3604
|
class: "cl-w-full",
|
|
3603
3605
|
colour: "blue",
|
|
3604
3606
|
loading: e.loading,
|
|
3605
3607
|
disabled: !s.value || o.value === "",
|
|
3606
|
-
onClick:
|
|
3608
|
+
onClick: Q(m, ["prevent"])
|
|
3607
3609
|
}, {
|
|
3608
3610
|
default: F(() => [
|
|
3609
|
-
|
|
3611
|
+
X(k(a(t)("login.login")), 1)
|
|
3610
3612
|
]),
|
|
3611
3613
|
_: 1
|
|
3612
3614
|
}, 8, ["loading", "disabled", "onClick"])
|
|
3613
3615
|
], 2)
|
|
3614
3616
|
], 2),
|
|
3615
|
-
y(
|
|
3617
|
+
y(pe, { name: "cl-grow-down" }, {
|
|
3616
3618
|
default: F(() => {
|
|
3617
3619
|
var p;
|
|
3618
3620
|
return [
|
|
3619
3621
|
P(u("span", io, [
|
|
3620
|
-
(i(!0), g(z, null,
|
|
3622
|
+
(i(!0), g(z, null, _(e.errors, (b, x) => (i(), g("div", {
|
|
3621
3623
|
key: x,
|
|
3622
3624
|
class: "cl-font-semibold"
|
|
3623
3625
|
}, k(b), 1))), 128))
|
|
@@ -3689,10 +3691,10 @@ const Ka = {
|
|
|
3689
3691
|
class: "cl-flex cl-flex-nowrap cl-relative"
|
|
3690
3692
|
}, [
|
|
3691
3693
|
u("div", mo, [
|
|
3692
|
-
A(v.$slots, "icon",
|
|
3694
|
+
A(v.$slots, "icon", le(ce({ groupIsOpen: l, toggleOpen: o })), void 0, !0)
|
|
3693
3695
|
]),
|
|
3694
3696
|
m.value ? (i(), g("div", go)) : I("", !0),
|
|
3695
|
-
y(
|
|
3697
|
+
y(pe, { name: "slide-right" }, {
|
|
3696
3698
|
default: F(() => [
|
|
3697
3699
|
P(u("div", {
|
|
3698
3700
|
class: D(["cl-bg-grey-0 cl-border-grey-2 cl-border-r cl-duration-75 cl-h-full cl-min-w-[260px] cl-overflow-y-auto cl-overscroll-y-none cl-p-8 cl-pb-24 cl-top-0 cl-transition-shadow cl-w-[260px] cl-z-20 xl:cl-pb-0", {
|
|
@@ -3713,7 +3715,7 @@ const Ka = {
|
|
|
3713
3715
|
icon: "ph:push-pin"
|
|
3714
3716
|
}))
|
|
3715
3717
|
]),
|
|
3716
|
-
A(v.$slots, "default",
|
|
3718
|
+
A(v.$slots, "default", le(ce({ groupIsOpen: l })), void 0, !0)
|
|
3717
3719
|
])
|
|
3718
3720
|
], 2), [
|
|
3719
3721
|
[B, a(t)]
|
|
@@ -3724,7 +3726,7 @@ const Ka = {
|
|
|
3724
3726
|
], 512));
|
|
3725
3727
|
}
|
|
3726
3728
|
});
|
|
3727
|
-
const ho = /* @__PURE__ */
|
|
3729
|
+
const ho = /* @__PURE__ */ me(vo, [["__scopeId", "data-v-5f879ad8"]]), po = /* @__PURE__ */ q({
|
|
3728
3730
|
__name: "cl-ui-navigation-icon",
|
|
3729
3731
|
props: {
|
|
3730
3732
|
iconValue: null,
|
|
@@ -3775,13 +3777,13 @@ function So(e, n) {
|
|
|
3775
3777
|
])
|
|
3776
3778
|
]);
|
|
3777
3779
|
}
|
|
3778
|
-
const Eo = /* @__PURE__ */
|
|
3780
|
+
const Eo = /* @__PURE__ */ me($o, [["render", So]]), jo = {}, Oo = { class: "cl-cursor-pointer cl-transition-colors cl-w-full hover:cl-text-blue-light" };
|
|
3779
3781
|
function Ao(e, n) {
|
|
3780
3782
|
return i(), g("div", Oo, [
|
|
3781
3783
|
A(e.$slots, "default")
|
|
3782
3784
|
]);
|
|
3783
3785
|
}
|
|
3784
|
-
const Mo = /* @__PURE__ */
|
|
3786
|
+
const Mo = /* @__PURE__ */ me(jo, [["render", Ao]]), Io = { class: "cl-w-full" }, No = /* @__PURE__ */ q({
|
|
3785
3787
|
__name: "cl-ui-tab",
|
|
3786
3788
|
props: {
|
|
3787
3789
|
currentTab: { default: 0 },
|
|
@@ -3836,7 +3838,7 @@ const Mo = /* @__PURE__ */ ge(jo, [["render", Ao]]), Io = { class: "cl-w-full" }
|
|
|
3836
3838
|
}]),
|
|
3837
3839
|
onScrollPassive: s
|
|
3838
3840
|
}, [
|
|
3839
|
-
A(f.$slots, "headings",
|
|
3841
|
+
A(f.$slots, "headings", le(ce({ isTabOpen: r, disabled: e.disabled, colour: e.colour })))
|
|
3840
3842
|
], 34),
|
|
3841
3843
|
o.value ? (i(), g("div", {
|
|
3842
3844
|
key: 1,
|
|
@@ -3849,7 +3851,7 @@ const Mo = /* @__PURE__ */ ge(jo, [["render", Ao]]), Io = { class: "cl-w-full" }
|
|
|
3849
3851
|
})
|
|
3850
3852
|
])) : I("", !0)
|
|
3851
3853
|
]),
|
|
3852
|
-
A(f.$slots, "content",
|
|
3854
|
+
A(f.$slots, "content", le(ce({ isTabOpen: r, disabled: e.disabled, colour: e.colour })))
|
|
3853
3855
|
]));
|
|
3854
3856
|
}
|
|
3855
3857
|
}), Do = ["onKeyup"], qo = /* @__PURE__ */ q({
|
|
@@ -3894,7 +3896,7 @@ const Mo = /* @__PURE__ */ ge(jo, [["render", Ao]]), Io = { class: "cl-w-full" }
|
|
|
3894
3896
|
onMouseout: c[1] || (c[1] = (f) => o.value = !1),
|
|
3895
3897
|
onFocusin: c[2] || (c[2] = (f) => l.value = !0),
|
|
3896
3898
|
onFocusout: c[3] || (c[3] = (f) => l.value = !1),
|
|
3897
|
-
onKeyup: Te(
|
|
3899
|
+
onKeyup: Te(Q(s, ["self"]), ["enter"])
|
|
3898
3900
|
}, [
|
|
3899
3901
|
A(m.$slots, "default")
|
|
3900
3902
|
], 42, Do));
|
|
@@ -3903,7 +3905,7 @@ const Mo = /* @__PURE__ */ ge(jo, [["render", Ao]]), Io = { class: "cl-w-full" }
|
|
|
3903
3905
|
function Po(e, n) {
|
|
3904
3906
|
return A(e.$slots, "default");
|
|
3905
3907
|
}
|
|
3906
|
-
const Uo = /* @__PURE__ */
|
|
3908
|
+
const Uo = /* @__PURE__ */ me(Ro, [["render", Po]]), Bo = [
|
|
3907
3909
|
"default",
|
|
3908
3910
|
"primary",
|
|
3909
3911
|
"secondary",
|
|
@@ -3914,7 +3916,7 @@ const Uo = /* @__PURE__ */ ge(Ro, [["render", Po]]), Bo = [
|
|
|
3914
3916
|
"right"
|
|
3915
3917
|
], Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3916
3918
|
__proto__: null,
|
|
3917
|
-
FilterOperation:
|
|
3919
|
+
FilterOperation: ge,
|
|
3918
3920
|
buttonColours: Ul,
|
|
3919
3921
|
buttonSizes: Bl,
|
|
3920
3922
|
cardSizes: Fl,
|
|
@@ -3922,16 +3924,16 @@ const Uo = /* @__PURE__ */ ge(Ro, [["render", Po]]), Bo = [
|
|
|
3922
3924
|
clUiAccordionHeader: El,
|
|
3923
3925
|
clUiAccordionItem: kl,
|
|
3924
3926
|
clUiApp: Il,
|
|
3925
|
-
clUiButton:
|
|
3927
|
+
clUiButton: ve,
|
|
3926
3928
|
clUiCard: Ll,
|
|
3927
3929
|
clUiComboBox: Zt,
|
|
3928
3930
|
clUiFooter: on,
|
|
3929
3931
|
clUiGrid: Da,
|
|
3930
3932
|
clUiHeader: Ra,
|
|
3931
3933
|
clUiHeaderMenu: Ga,
|
|
3932
|
-
clUiInput:
|
|
3934
|
+
clUiInput: re,
|
|
3933
3935
|
clUiLanguageSwitcher: Xa,
|
|
3934
|
-
clUiLoadingSpinner:
|
|
3936
|
+
clUiLoadingSpinner: Pe,
|
|
3935
3937
|
clUiLogin: ro,
|
|
3936
3938
|
clUiModal: sl,
|
|
3937
3939
|
clUiNavigation: ho,
|
|
@@ -3953,7 +3955,7 @@ const Uo = /* @__PURE__ */ ge(Ro, [["render", Po]]), Bo = [
|
|
|
3953
3955
|
isGridColumn: il,
|
|
3954
3956
|
isGridColumnArray: Fn,
|
|
3955
3957
|
isLanguageArray: Wa,
|
|
3956
|
-
isLanguageLocaleFormat:
|
|
3958
|
+
isLanguageLocaleFormat: Be,
|
|
3957
3959
|
modalColours: fo,
|
|
3958
3960
|
modalSizes: uo,
|
|
3959
3961
|
stringFormats: Vn,
|
|
@@ -3961,7 +3963,7 @@ const Uo = /* @__PURE__ */ ge(Ro, [["render", Po]]), Bo = [
|
|
|
3961
3963
|
tabScroll: zo
|
|
3962
3964
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3963
3965
|
const ec = (e) => {
|
|
3964
|
-
e.use(
|
|
3966
|
+
e.use(Y), e.component("Icon", N), Object.entries(Lo).forEach(([
|
|
3965
3967
|
n,
|
|
3966
3968
|
t
|
|
3967
3969
|
]) => {
|
|
@@ -3971,8 +3973,8 @@ const ec = (e) => {
|
|
|
3971
3973
|
export {
|
|
3972
3974
|
_o as CitrusLimeUI,
|
|
3973
3975
|
G as DateFormat,
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
+
ge as FilterOperation,
|
|
3977
|
+
ee as NumberFormat,
|
|
3976
3978
|
Ul as buttonColours,
|
|
3977
3979
|
Bl as buttonSizes,
|
|
3978
3980
|
Fl as cardSizes,
|
|
@@ -3980,16 +3982,16 @@ export {
|
|
|
3980
3982
|
El as clUiAccordionHeader,
|
|
3981
3983
|
kl as clUiAccordionItem,
|
|
3982
3984
|
Il as clUiApp,
|
|
3983
|
-
|
|
3985
|
+
ve as clUiButton,
|
|
3984
3986
|
Ll as clUiCard,
|
|
3985
3987
|
Zt as clUiComboBox,
|
|
3986
3988
|
on as clUiFooter,
|
|
3987
3989
|
Da as clUiGrid,
|
|
3988
3990
|
Ra as clUiHeader,
|
|
3989
3991
|
Ga as clUiHeaderMenu,
|
|
3990
|
-
|
|
3992
|
+
re as clUiInput,
|
|
3991
3993
|
Xa as clUiLanguageSwitcher,
|
|
3992
|
-
|
|
3994
|
+
Pe as clUiLoadingSpinner,
|
|
3993
3995
|
ro as clUiLogin,
|
|
3994
3996
|
sl as clUiModal,
|
|
3995
3997
|
ho as clUiNavigation,
|
|
@@ -4005,7 +4007,7 @@ export {
|
|
|
4005
4007
|
ec as default,
|
|
4006
4008
|
Gn as filterMethodTypes,
|
|
4007
4009
|
Ln as gridColumnTypes,
|
|
4008
|
-
|
|
4010
|
+
Y as i18n,
|
|
4009
4011
|
Ha as inputTypes,
|
|
4010
4012
|
Yt as isComboBoxCreateRequest,
|
|
4011
4013
|
Qt as isComboBoxItem,
|
|
@@ -4014,7 +4016,7 @@ export {
|
|
|
4014
4016
|
il as isGridColumn,
|
|
4015
4017
|
Fn as isGridColumnArray,
|
|
4016
4018
|
Wa as isLanguageArray,
|
|
4017
|
-
|
|
4019
|
+
Be as isLanguageLocaleFormat,
|
|
4018
4020
|
Vl as messages,
|
|
4019
4021
|
fo as modalColours,
|
|
4020
4022
|
uo as modalSizes,
|
|
@@ -4023,7 +4025,7 @@ export {
|
|
|
4023
4025
|
Yo as setLocaleDateTimeFormats,
|
|
4024
4026
|
Zo as setLocaleMessages,
|
|
4025
4027
|
Qo as setLocaleNumberFormats,
|
|
4026
|
-
|
|
4028
|
+
He as showNotification,
|
|
4027
4029
|
Vn as stringFormats,
|
|
4028
4030
|
Bo as tabColours,
|
|
4029
4031
|
zo as tabScroll,
|