@citruslime/ui 3.0.1-beta.11 → 3.0.1-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/citrus-lime-ui.es.js +1015 -1008
- package/dist/citrus-lime-ui.umd.js +2 -2
- package/dist/components/select/cl-ui-select.vue.d.ts +5 -4
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/types.d.ts +4 -0
- package/package.json +1 -1
- package/dist/components/select/select-input/index.d.ts +0 -1
- package/dist/components/select/select-options/index.d.ts +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Icon as x } from "@iconify/vue";
|
|
2
|
-
import { defineComponent as F, ref as
|
|
2
|
+
import { defineComponent as F, ref as I, openBlock as p, createElementBlock as v, renderSlot as N, normalizeProps as fe, guardReactiveProps as ge, Fragment as X, createElementVNode as f, normalizeClass as z, createVNode as q, unref as g, Transition as Se, withCtx as A, withDirectives as _, mergeProps as ee, vShow as oe, createBlock as j, Teleport as cl, renderList as de, toDisplayString as V, createCommentVNode as M, computed as S, mergeModels as me, useModel as $e, createSlots as Ie, vModelDynamic as Rl, watch as ae, toRefs as Nl, withKeys as be, onMounted as We, onUnmounted as el, withModifiers as ne, nextTick as Re, resolveComponent as Me, createTextVNode as ce, inject as ul, vModelCheckbox as rt, toValue as kl, watchEffect as st, useAttrs as Ml, vModelText as dl, useCssVars as Ul, toHandlers as it, pushScopeId as zl, popScopeId as Bl, provide as $l, normalizeStyle as ct } from "vue";
|
|
3
3
|
import { generateStringId as ut, highlightText as dt, validateEmail as pt } from "@citruslime/utils";
|
|
4
|
-
import { onKeyDown as Qe, unrefElement as ft, tryOnScopeDispose as mt, onClickOutside as
|
|
4
|
+
import { onKeyDown as Qe, unrefElement as ft, tryOnScopeDispose as mt, onClickOutside as ll, useTimeoutFn as Fl, useMouseInElement as gt, useFocusWithin as vt, useMediaQuery as Ll, useThrottle as bt, useElementBounding as ht, useDebounceFn as yt, useWindowSize as wt } from "@vueuse/core";
|
|
5
5
|
import { useI18n as ue, createI18n as kt } from "vue-i18n";
|
|
6
6
|
import { createFocusTrap as $t } from "focus-trap";
|
|
7
7
|
import { copy as ve } from "@citruslime/vue-utils";
|
|
8
8
|
import { DateTime as G } from "luxon";
|
|
9
|
-
import { DatePicker as
|
|
9
|
+
import { DatePicker as ze } from "v-calendar";
|
|
10
10
|
import { useCurrencyInput as Ct } from "vue-currency-input";
|
|
11
11
|
const Tt = { class: "cl-overflow-hidden" }, St = /* @__PURE__ */ F({
|
|
12
12
|
__name: "cl-ui-accordion",
|
|
@@ -14,22 +14,22 @@ const Tt = { class: "cl-overflow-hidden" }, St = /* @__PURE__ */ F({
|
|
|
14
14
|
exclusive: { type: Boolean, default: !1 }
|
|
15
15
|
},
|
|
16
16
|
setup(t) {
|
|
17
|
-
const o = t, l =
|
|
17
|
+
const o = t, l = I([]);
|
|
18
18
|
function e(a) {
|
|
19
|
-
let d = l.value.find((
|
|
19
|
+
let d = l.value.find((i) => i.id === a);
|
|
20
20
|
return d || (d = {
|
|
21
21
|
id: a,
|
|
22
22
|
open: !1
|
|
23
23
|
}, l.value.push(d)), d.open;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
const d = l.value.find((
|
|
27
|
-
d && (o.exclusive && l.value.forEach((
|
|
28
|
-
|
|
25
|
+
function n(a) {
|
|
26
|
+
const d = l.value.find((i) => i.id === a);
|
|
27
|
+
d && (o.exclusive && l.value.forEach((i) => {
|
|
28
|
+
i.id !== a && (i.open = !1);
|
|
29
29
|
}), d.open = !d.open);
|
|
30
30
|
}
|
|
31
31
|
return (a, d) => (p(), v("div", Tt, [
|
|
32
|
-
N(a.$slots, "default", fe(ge({ isItemOpen: e, toggleItem:
|
|
32
|
+
N(a.$slots, "default", fe(ge({ isItemOpen: e, toggleItem: n })))
|
|
33
33
|
]));
|
|
34
34
|
}
|
|
35
35
|
}), qt = { class: "cl-absolute cl-left-5 cl-top-5" }, Ot = { class: "cl-font-semibold cl-ml-10 cl-p-4 cl-select-none cl-text-grey-5" }, Dt = { class: "cl-overflow-hidden" }, At = /* @__PURE__ */ F({
|
|
@@ -42,7 +42,7 @@ const Tt = { class: "cl-overflow-hidden" }, St = /* @__PURE__ */ F({
|
|
|
42
42
|
emits: ["toggle"],
|
|
43
43
|
setup(t, { emit: o }) {
|
|
44
44
|
const l = t, e = o;
|
|
45
|
-
function
|
|
45
|
+
function n() {
|
|
46
46
|
l.disabled || e("toggle");
|
|
47
47
|
}
|
|
48
48
|
return (a, d) => (p(), v(X, null, [
|
|
@@ -51,7 +51,7 @@ const Tt = { class: "cl-overflow-hidden" }, St = /* @__PURE__ */ F({
|
|
|
51
51
|
"cl-bg-grey-0": a.disabled,
|
|
52
52
|
"cl-cursor-pointer": !a.disabled
|
|
53
53
|
}]),
|
|
54
|
-
onClick:
|
|
54
|
+
onClick: n
|
|
55
55
|
}, [
|
|
56
56
|
f("div", qt, [
|
|
57
57
|
q(g(x), {
|
|
@@ -82,8 +82,8 @@ const Tt = { class: "cl-overflow-hidden" }, St = /* @__PURE__ */ F({
|
|
|
82
82
|
}
|
|
83
83
|
}), we = (t, o) => {
|
|
84
84
|
const l = t.__vccOpts || t;
|
|
85
|
-
for (const [e,
|
|
86
|
-
l[e] =
|
|
85
|
+
for (const [e, n] of o)
|
|
86
|
+
l[e] = n;
|
|
87
87
|
return l;
|
|
88
88
|
}, Et = {}, Vt = { class: "cl-border-b cl-border-grey-1 cl-font-semibold cl-pl-14 cl-pr-4 cl-py-2 cl-text-grey-3 cl-text-sm" };
|
|
89
89
|
function It(t, o) {
|
|
@@ -91,7 +91,7 @@ function It(t, o) {
|
|
|
91
91
|
N(t.$slots, "default")
|
|
92
92
|
]);
|
|
93
93
|
}
|
|
94
|
-
const Rt = /* @__PURE__ */ we(Et, [["render", It]]), _e =
|
|
94
|
+
const Rt = /* @__PURE__ */ we(Et, [["render", It]]), _e = I([]);
|
|
95
95
|
function Cl(t) {
|
|
96
96
|
const o = {
|
|
97
97
|
id: ut(),
|
|
@@ -121,8 +121,8 @@ const Nt = ["onClick"], Mt = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
121
121
|
"cl-bottom-5 cl-right-5": o.position === "bottom-right"
|
|
122
122
|
}])
|
|
123
123
|
}, [
|
|
124
|
-
(p(!0), v(X, null, de(g(_e), (e,
|
|
125
|
-
key:
|
|
124
|
+
(p(!0), v(X, null, de(g(_e), (e, n) => (p(), v("div", ee(o.$attrs, {
|
|
125
|
+
key: n,
|
|
126
126
|
class: ["cl-break-words cl-cursor-pointer cl-flex cl-font-semibold cl-group cl-mb-2 cl-overflow-hidden cl-p-4 cl-rounded cl-shadow-lg cl-text-sm", {
|
|
127
127
|
"cl-bg-white": e.colour === "default",
|
|
128
128
|
"cl-bg-primary-default": e.colour === "primary",
|
|
@@ -132,7 +132,7 @@ const Nt = ["onClick"], Mt = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
132
132
|
}],
|
|
133
133
|
onClick: (a) => g(jl)(e)
|
|
134
134
|
}), [
|
|
135
|
-
f("span", Mt,
|
|
135
|
+
f("span", Mt, V(e.message), 1),
|
|
136
136
|
q(g(x), {
|
|
137
137
|
class: "cl-inline-block cl-opacity-0 cl-transition-opacity group-hover:cl-opacity-100",
|
|
138
138
|
icon: "ph:x",
|
|
@@ -180,7 +180,7 @@ const Nt = ["onClick"], Mt = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
180
180
|
function Lt(t, o) {
|
|
181
181
|
return p(), v("div", Ft);
|
|
182
182
|
}
|
|
183
|
-
const
|
|
183
|
+
const tl = /* @__PURE__ */ we(Bt, [["render", Lt], ["__scopeId", "data-v-a21dc5d2"]]), jt = ["disabled"], ye = /* @__PURE__ */ F({
|
|
184
184
|
inheritAttrs: !1,
|
|
185
185
|
__name: "cl-ui-button",
|
|
186
186
|
props: {
|
|
@@ -190,13 +190,13 @@ const ll = /* @__PURE__ */ we(Bt, [["render", Lt], ["__scopeId", "data-v-a21dc5d
|
|
|
190
190
|
disabled: { type: Boolean, default: !1 }
|
|
191
191
|
},
|
|
192
192
|
setup(t, { expose: o }) {
|
|
193
|
-
const l =
|
|
193
|
+
const l = I(null);
|
|
194
194
|
return o({
|
|
195
195
|
focus() {
|
|
196
196
|
l.value && l.value.focus();
|
|
197
197
|
}
|
|
198
|
-
}), (e,
|
|
199
|
-
_(q(
|
|
198
|
+
}), (e, n) => (p(), v(X, null, [
|
|
199
|
+
_(q(tl, { class: "relative" }, null, 512), [
|
|
200
200
|
[oe, e.loading]
|
|
201
201
|
]),
|
|
202
202
|
_(f("button", ee(e.$attrs, {
|
|
@@ -305,7 +305,7 @@ const ll = /* @__PURE__ */ we(Bt, [["render", Lt], ["__scopeId", "data-v-a21dc5d
|
|
|
305
305
|
},
|
|
306
306
|
setup(t) {
|
|
307
307
|
const o = t, l = S(() => Object.keys(o.errors ?? []).length > 0);
|
|
308
|
-
return (e,
|
|
308
|
+
return (e, n) => (p(), v("div", xt, [
|
|
309
309
|
f("div", Kt, [
|
|
310
310
|
f("div", Qt, [
|
|
311
311
|
e.$slots.label ? (p(), v("span", _t, [
|
|
@@ -322,7 +322,7 @@ const ll = /* @__PURE__ */ we(Bt, [["render", Lt], ["__scopeId", "data-v-a21dc5d
|
|
|
322
322
|
(p(!0), v(X, null, de(e.errors, (a, d) => (p(), v("div", {
|
|
323
323
|
key: d,
|
|
324
324
|
class: "cl-bg-danger-light cl-px-2 cl-rounded-md cl-text-center cl-text-danger-default cl-text-xs cl-w-full cl-whitespace-pre-line"
|
|
325
|
-
},
|
|
325
|
+
}, V(a), 1))), 128))
|
|
326
326
|
])
|
|
327
327
|
])) : e.errors ? (p(), v("div", lo, " ")) : M("", !0)
|
|
328
328
|
]));
|
|
@@ -343,8 +343,8 @@ const ll = /* @__PURE__ */ we(Bt, [["render", Lt], ["__scopeId", "data-v-a21dc5d
|
|
|
343
343
|
}),
|
|
344
344
|
emits: /* @__PURE__ */ me(["focus", "blur", "keySinglePress"], ["update:modelValue"]),
|
|
345
345
|
setup(t, { expose: o, emit: l }) {
|
|
346
|
-
const e = $e(t, "modelValue"),
|
|
347
|
-
return Qe(!0, (d) =>
|
|
346
|
+
const e = $e(t, "modelValue"), n = l, a = I();
|
|
347
|
+
return Qe(!0, (d) => n("keySinglePress", d.key), {
|
|
348
348
|
target: a,
|
|
349
349
|
dedupe: !0
|
|
350
350
|
}), o({
|
|
@@ -356,7 +356,7 @@ const ll = /* @__PURE__ */ we(Bt, [["render", Lt], ["__scopeId", "data-v-a21dc5d
|
|
|
356
356
|
var d;
|
|
357
357
|
return (d = a.value) == null ? void 0 : d.blur();
|
|
358
358
|
}
|
|
359
|
-
}), (d,
|
|
359
|
+
}), (d, i) => (p(), j(qe, {
|
|
360
360
|
"show-required-asterisk": d.required,
|
|
361
361
|
errors: d.errors
|
|
362
362
|
}, Ie({
|
|
@@ -364,14 +364,14 @@ const ll = /* @__PURE__ */ we(Bt, [["render", Lt], ["__scopeId", "data-v-a21dc5d
|
|
|
364
364
|
_(f("input", ee(d.$attrs, {
|
|
365
365
|
ref_key: "inputRef",
|
|
366
366
|
ref: a,
|
|
367
|
-
"onUpdate:modelValue":
|
|
367
|
+
"onUpdate:modelValue": i[0] || (i[0] = (s) => e.value = s),
|
|
368
368
|
class: "cl-bg-white cl-border cl-border-grey-2 cl-outline-none cl-p-1 cl-px-2 cl-rounded-lg cl-transition-colors cl-w-full disabled:cl-bg-grey-1 disabled:cl-border-grey-2 disabled:cl-placeholder-grey-3 focus-within:cl-border-link-light hover:cl-border-grey-3",
|
|
369
369
|
type: d.type,
|
|
370
370
|
maxlength: d.maxlength ?? void 0,
|
|
371
371
|
disabled: d.disabled,
|
|
372
372
|
placeholder: d.placeholder ?? void 0,
|
|
373
|
-
onFocus:
|
|
374
|
-
onBlur:
|
|
373
|
+
onFocus: i[1] || (i[1] = (s) => n("focus")),
|
|
374
|
+
onBlur: i[2] || (i[2] = (s) => n("blur"))
|
|
375
375
|
}), null, 16, to), [
|
|
376
376
|
[Rl, e.value]
|
|
377
377
|
])
|
|
@@ -390,7 +390,7 @@ const ll = /* @__PURE__ */ we(Bt, [["render", Lt], ["__scopeId", "data-v-a21dc5d
|
|
|
390
390
|
});
|
|
391
391
|
function oo(t, o = {}) {
|
|
392
392
|
let l;
|
|
393
|
-
const { immediate: e, ...
|
|
393
|
+
const { immediate: e, ...n } = o, a = I(!1), d = I(!1), i = (c) => l && l.activate(c), s = (c) => l && l.deactivate(c), r = () => {
|
|
394
394
|
l && (l.pause(), d.value = !0);
|
|
395
395
|
}, u = () => {
|
|
396
396
|
l && (l.unpause(), d.value = !1);
|
|
@@ -399,22 +399,22 @@ function oo(t, o = {}) {
|
|
|
399
399
|
() => ft(t),
|
|
400
400
|
(c) => {
|
|
401
401
|
c && (l = $t(c, {
|
|
402
|
-
...
|
|
402
|
+
...n,
|
|
403
403
|
onActivate() {
|
|
404
404
|
a.value = !0, o.onActivate && o.onActivate();
|
|
405
405
|
},
|
|
406
406
|
onDeactivate() {
|
|
407
407
|
a.value = !1, o.onDeactivate && o.onDeactivate();
|
|
408
408
|
}
|
|
409
|
-
}), e &&
|
|
409
|
+
}), e && i());
|
|
410
410
|
},
|
|
411
411
|
{ flush: "post" }
|
|
412
|
-
), mt(() =>
|
|
412
|
+
), mt(() => s()), {
|
|
413
413
|
hasFocus: a,
|
|
414
414
|
isPaused: d,
|
|
415
|
-
activate:
|
|
416
|
-
deactivate:
|
|
417
|
-
pause:
|
|
415
|
+
activate: i,
|
|
416
|
+
deactivate: s,
|
|
417
|
+
pause: r,
|
|
418
418
|
unpause: u
|
|
419
419
|
};
|
|
420
420
|
}
|
|
@@ -431,73 +431,73 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
431
431
|
trapFocus: { type: Boolean, default: !1 }
|
|
432
432
|
},
|
|
433
433
|
setup(t) {
|
|
434
|
-
const o = t, { trapFocus: l } = Nl(o), e =
|
|
434
|
+
const o = t, { trapFocus: l } = Nl(o), e = I(!1), n = I(), a = oo(n);
|
|
435
435
|
ae([
|
|
436
436
|
l,
|
|
437
437
|
e
|
|
438
438
|
], ([
|
|
439
|
-
|
|
439
|
+
r,
|
|
440
440
|
u
|
|
441
441
|
]) => {
|
|
442
442
|
setTimeout(() => {
|
|
443
|
-
|
|
443
|
+
r === !0 && u === !0 ? a.activate() : a.deactivate();
|
|
444
444
|
});
|
|
445
445
|
});
|
|
446
446
|
function d() {
|
|
447
|
-
e.value = !0, document.addEventListener("keydown",
|
|
447
|
+
e.value = !0, document.addEventListener("keydown", s);
|
|
448
448
|
}
|
|
449
|
-
function
|
|
450
|
-
o.preventClose || (e.value = !1, document.removeEventListener("keydown",
|
|
449
|
+
function i() {
|
|
450
|
+
o.preventClose || (e.value = !1, document.removeEventListener("keydown", s));
|
|
451
451
|
}
|
|
452
|
-
function
|
|
453
|
-
|
|
452
|
+
function s(r) {
|
|
453
|
+
r.key === "Escape" && i();
|
|
454
454
|
}
|
|
455
|
-
return (
|
|
456
|
-
N(
|
|
455
|
+
return (r, u) => (p(), v(X, null, [
|
|
456
|
+
N(r.$slots, "trigger", fe(ge({ open: d }))),
|
|
457
457
|
(p(), j(cl, { to: "body" }, [
|
|
458
458
|
q(Se, { name: "fade" }, {
|
|
459
459
|
default: A(() => [
|
|
460
460
|
_(f("div", {
|
|
461
461
|
ref_key: "clUiModal",
|
|
462
|
-
ref:
|
|
462
|
+
ref: n,
|
|
463
463
|
class: "cl-align-items-center cl-bg-black cl-bg-opacity-40 cl-bottom-0 cl-fixed cl-flex cl-h-full cl-justify-center cl-left-0 cl-right-0 cl-top-0 cl-w-full cl-z-40 xl:cl-h-screen"
|
|
464
464
|
}, [
|
|
465
465
|
ao,
|
|
466
|
-
f("div", ee(
|
|
466
|
+
f("div", ee(r.$attrs, {
|
|
467
467
|
class: ["cl-bg-white cl-flex cl-flex-wrap cl-max-h-[calc(100%-8rem)] cl-mx-0 cl-my-auto cl-overflow-y-auto cl-overscroll-y-none cl-relative cl-rounded-lg cl-shadow-lg xl:cl-max-h-[calc(100vh-8rem)]", {
|
|
468
|
-
"lg:cl-w-2/12 cl-w-10/12":
|
|
469
|
-
"cl-w-6/12":
|
|
470
|
-
"cl-w-8/12":
|
|
471
|
-
"cl-w-10/12":
|
|
468
|
+
"lg:cl-w-2/12 cl-w-10/12": r.size === "x-small",
|
|
469
|
+
"cl-w-6/12": r.size === "small",
|
|
470
|
+
"cl-w-8/12": r.size === "medium",
|
|
471
|
+
"cl-w-10/12": r.size === "large"
|
|
472
472
|
}]
|
|
473
473
|
}), [
|
|
474
474
|
_(f("div", {
|
|
475
475
|
class: z(["cl-absolute cl-cursor-pointer cl-right-4 cl-top-4 cl-transition-colors cl-w-3", {
|
|
476
|
-
"cl-text-white hover:cl-text-off-white":
|
|
477
|
-
"cl-text-secondary hover:cl-text-off-white":
|
|
478
|
-
"cl-text-black hover:cl-text-grey-7":
|
|
476
|
+
"cl-text-white hover:cl-text-off-white": r.headerColour === "secondary",
|
|
477
|
+
"cl-text-secondary hover:cl-text-off-white": r.headerColour === "primary",
|
|
478
|
+
"cl-text-black hover:cl-text-grey-7": r.headerColour === "white"
|
|
479
479
|
}]),
|
|
480
480
|
tabindex: 0,
|
|
481
|
-
onKeypress: be(
|
|
482
|
-
onClick:
|
|
481
|
+
onKeypress: be(i, ["enter"]),
|
|
482
|
+
onClick: i
|
|
483
483
|
}, [
|
|
484
484
|
q(g(x), { icon: "ph:x" })
|
|
485
485
|
], 34), [
|
|
486
|
-
[oe, !
|
|
486
|
+
[oe, !r.preventClose]
|
|
487
487
|
]),
|
|
488
488
|
f("div", {
|
|
489
489
|
class: z(["cl-leading-[2.75rem] cl-min-h-12 cl-overflow-hidden cl-pb-2 cl-pl-4 cl-pr-8 cl-pt-2 cl-text-2xl cl-w-full", {
|
|
490
|
-
"cl-bg-secondary-default cl-text-white":
|
|
491
|
-
"cl-bg-primary-default cl-text-secondary":
|
|
490
|
+
"cl-bg-secondary-default cl-text-white": r.headerColour === "secondary",
|
|
491
|
+
"cl-bg-primary-default cl-text-secondary": r.headerColour === "primary"
|
|
492
492
|
}])
|
|
493
493
|
}, [
|
|
494
|
-
N(
|
|
495
|
-
|
|
494
|
+
N(r.$slots, "title"),
|
|
495
|
+
r.headerColour === "white" ? (p(), v("hr", no)) : M("", !0)
|
|
496
496
|
], 2),
|
|
497
497
|
f("div", ro, [
|
|
498
|
-
N(
|
|
498
|
+
N(r.$slots, "default", fe(ge({ close: i })))
|
|
499
499
|
]),
|
|
500
|
-
N(
|
|
500
|
+
N(r.$slots, "footer", fe(ge({ close: i })))
|
|
501
501
|
], 16)
|
|
502
502
|
], 512), [
|
|
503
503
|
[oe, e.value]
|
|
@@ -521,13 +521,13 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
521
521
|
emits: ["clear-object"],
|
|
522
522
|
setup(t) {
|
|
523
523
|
return (o, l) => (p(), v("div", so, [
|
|
524
|
-
o.additionalText !== "" ? (p(), v("div", io,
|
|
524
|
+
o.additionalText !== "" ? (p(), v("div", io, V(o.additionalText), 1)) : M("", !0),
|
|
525
525
|
f("div", {
|
|
526
526
|
class: z({
|
|
527
527
|
"cl-w-1/2": o.additionalText !== "",
|
|
528
528
|
"cl-w-full": o.additionalText === ""
|
|
529
529
|
})
|
|
530
|
-
},
|
|
530
|
+
}, V(o.text), 3),
|
|
531
531
|
_(f("div", {
|
|
532
532
|
class: "cl-cursor-pointer cl-float-right",
|
|
533
533
|
onMousedown: l[0] || (l[0] = (e) => o.$emit("clear-object"))
|
|
@@ -555,24 +555,24 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
555
555
|
},
|
|
556
556
|
emits: ["create-object", "select-object", "option-highlighted"],
|
|
557
557
|
setup(t, { emit: o }) {
|
|
558
|
-
const l = t, e = o,
|
|
558
|
+
const l = t, e = o, n = S(() => {
|
|
559
559
|
var u;
|
|
560
560
|
return ((u = l.option) == null ? void 0 : u.name) ?? l.text;
|
|
561
561
|
}), a = S(() => {
|
|
562
562
|
var u;
|
|
563
563
|
return ((u = l.option) == null ? void 0 : u.parentName) ?? "";
|
|
564
|
-
}), d =
|
|
565
|
-
function
|
|
564
|
+
}), d = I(!1);
|
|
565
|
+
function i() {
|
|
566
566
|
var u;
|
|
567
567
|
l.isCreateNewOption === !0 ? e("create-object") : e("select-object", (u = l.option) == null ? void 0 : u.id);
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function s(u) {
|
|
570
570
|
u === !0 ? (d.value = !0, e("option-highlighted", l.index)) : l.index !== l.selectedIndex && (d.value = !1);
|
|
571
571
|
}
|
|
572
|
-
function
|
|
572
|
+
function r() {
|
|
573
573
|
l.selectedIndex === l.index ? d.value = !0 : d.value = !1;
|
|
574
574
|
}
|
|
575
|
-
return ae(() => l.selectedIndex, () =>
|
|
575
|
+
return ae(() => l.selectedIndex, () => r()), (u, c) => {
|
|
576
576
|
var m, b;
|
|
577
577
|
return p(), v("div", {
|
|
578
578
|
class: z(["cl-cursor-pointer cl-duration-75 cl-flex cl-p-1 cl-text-left cl-transition-colors", {
|
|
@@ -580,17 +580,17 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
580
580
|
"cl-bg-link-light cl-text-white cl-opacity-90": d.value && u.isCreateNewOption === !1,
|
|
581
581
|
"cl-bg-primary-default cl-text-black cl-opacity-90": d.value && u.isCreateNewOption
|
|
582
582
|
}]),
|
|
583
|
-
onMousedown:
|
|
584
|
-
onMousemove: c[0] || (c[0] = (h) =>
|
|
585
|
-
onMouseleave: c[1] || (c[1] = (h) =>
|
|
583
|
+
onMousedown: i,
|
|
584
|
+
onMousemove: c[0] || (c[0] = (h) => s(!0)),
|
|
585
|
+
onMouseleave: c[1] || (c[1] = (h) => s(!1))
|
|
586
586
|
}, [
|
|
587
|
-
u.option !== null && ((m = u.option) == null ? void 0 : m.parentId) !== 0 && ((b = u.option) == null ? void 0 : b.parentId) !== void 0 ? (p(), v("div", co,
|
|
587
|
+
u.option !== null && ((m = u.option) == null ? void 0 : m.parentId) !== 0 && ((b = u.option) == null ? void 0 : b.parentId) !== void 0 ? (p(), v("div", co, V(a.value), 1)) : M("", !0),
|
|
588
588
|
f("div", {
|
|
589
589
|
class: z({
|
|
590
590
|
"cl-w-1/2": a.value !== "",
|
|
591
591
|
"cl-w-full": a.value === ""
|
|
592
592
|
})
|
|
593
|
-
},
|
|
593
|
+
}, V(n.value), 3),
|
|
594
594
|
_(f("div", uo, [
|
|
595
595
|
q(g(x), {
|
|
596
596
|
class: "cl-transition-colors",
|
|
@@ -621,9 +621,9 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
621
621
|
},
|
|
622
622
|
emits: ["clear-object", "create-object", "select-object", "search", "hide-dropdown"],
|
|
623
623
|
setup(t, { emit: o }) {
|
|
624
|
-
const l = t, e = o, { t:
|
|
624
|
+
const l = t, e = o, { t: n } = ue(), a = I(""), d = I(!1), i = I(-1), s = S(() => d.value ? -1 : 0), r = I();
|
|
625
625
|
function u(E) {
|
|
626
|
-
(E === void 0 || E.code && E.code.startsWith("Arrow") === !1 && E.code.startsWith("Control") === !1 && E.code.startsWith("Shift") === !1 && E.code.startsWith("Tab") === !1 && E.code !== "Enter") && (e("search", a.value),
|
|
626
|
+
(E === void 0 || E.code && E.code.startsWith("Arrow") === !1 && E.code.startsWith("Control") === !1 && E.code.startsWith("Shift") === !1 && E.code.startsWith("Tab") === !1 && E.code !== "Enter") && (e("search", a.value), i.value = -2);
|
|
627
627
|
}
|
|
628
628
|
function c(E) {
|
|
629
629
|
e("select-object", E);
|
|
@@ -635,13 +635,13 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
635
635
|
e("hide-dropdown");
|
|
636
636
|
}
|
|
637
637
|
function h(E) {
|
|
638
|
-
|
|
638
|
+
i.value < l.results.length - 1 ? (i.value === -2 && a.value === "" && i.value++, i.value++) : i.value = E, L();
|
|
639
639
|
}
|
|
640
640
|
function $(E) {
|
|
641
|
-
|
|
641
|
+
i.value > E ? i.value-- : i.value = l.results.length - 1, L();
|
|
642
642
|
}
|
|
643
643
|
function T() {
|
|
644
|
-
|
|
644
|
+
i.value >= 0 && l.results !== void 0 ? c(l.results[i.value].id) : i.value === -1 && m();
|
|
645
645
|
}
|
|
646
646
|
function O(E) {
|
|
647
647
|
if (E.key === "Tab" && E.shiftKey === !0) {
|
|
@@ -654,43 +654,43 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
654
654
|
}
|
|
655
655
|
function L() {
|
|
656
656
|
var E;
|
|
657
|
-
l.results && l.results.length > 1 && ((E =
|
|
657
|
+
l.results && l.results.length > 1 && ((E = r.value) == null || E.scrollTo(0, (i.value + 1) * 34 - 34 * 2));
|
|
658
658
|
}
|
|
659
659
|
function D() {
|
|
660
660
|
let E = !1;
|
|
661
661
|
l.results !== null && l.results.length === 1 && (E = a.value.toUpperCase().trim() === l.results[0].name.toUpperCase().trim()), d.value = l.canCreateNewObject === !0 && l.errorMessage === "" && a.value.trim() !== "" && E === !1;
|
|
662
662
|
}
|
|
663
663
|
function W(E) {
|
|
664
|
-
|
|
664
|
+
i.value = E;
|
|
665
665
|
}
|
|
666
666
|
function Y() {
|
|
667
667
|
l.isVisible === !0 && (a.value = "", u(), Re(() => {
|
|
668
668
|
var E, J;
|
|
669
|
-
return (J = (E =
|
|
669
|
+
return (J = (E = r.value) == null ? void 0 : E.querySelector("input")) == null ? void 0 : J.focus();
|
|
670
670
|
}));
|
|
671
671
|
}
|
|
672
672
|
return ae(() => l.results, () => D()), ae(() => l.errorMessage, () => D()), ae(() => l.isVisible, () => Y()), We(() => {
|
|
673
673
|
var E;
|
|
674
|
-
return (E =
|
|
675
|
-
}),
|
|
674
|
+
return (E = r.value) == null ? void 0 : E.addEventListener("keydown", O);
|
|
675
|
+
}), el(() => {
|
|
676
676
|
var E;
|
|
677
|
-
return (E =
|
|
677
|
+
return (E = r.value) == null ? void 0 : E.removeEventListener("keydown", O);
|
|
678
678
|
}), (E, J) => {
|
|
679
679
|
var se;
|
|
680
680
|
return p(), v("div", {
|
|
681
681
|
ref_key: "container",
|
|
682
|
-
ref:
|
|
682
|
+
ref: r,
|
|
683
683
|
class: z(["cl-absolute cl-bg-white cl-border cl-border-collapse cl-border-grey-0 cl-h-52 cl-mt-2 cl-overflow-y-auto cl-overscroll-y-none cl-rounded cl-text-sm cl-w-full cl-z-20", {
|
|
684
684
|
"cl-overflow-y-hidden": E.loading
|
|
685
685
|
}]),
|
|
686
686
|
onKeydown: [
|
|
687
|
-
J[2] || (J[2] = be(ne((k) => $(
|
|
688
|
-
J[3] || (J[3] = be(ne((k) => h(
|
|
687
|
+
J[2] || (J[2] = be(ne((k) => $(s.value), ["prevent", "stop"]), ["up"])),
|
|
688
|
+
J[3] || (J[3] = be(ne((k) => h(s.value), ["prevent", "stop"]), ["down"]))
|
|
689
689
|
],
|
|
690
690
|
onKeyup: be(ne(T, ["prevent", "stop"]), ["enter"])
|
|
691
691
|
}, [
|
|
692
692
|
E.loading ? (p(), v("div", fo, [
|
|
693
|
-
q(
|
|
693
|
+
q(tl)
|
|
694
694
|
])) : M("", !0),
|
|
695
695
|
f("div", mo, [
|
|
696
696
|
f("div", go, [
|
|
@@ -725,19 +725,19 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
725
725
|
}, null, 8, ["text", "additional-text"])) : M("", !0),
|
|
726
726
|
E.results !== null && ((se = E.results) == null ? void 0 : se.length) === 0 && a.value.trim() !== "" && E.canCreateNewObject === !1 && E.errorMessage === "" ? (p(), j(xe, {
|
|
727
727
|
key: 3,
|
|
728
|
-
text: g(
|
|
728
|
+
text: g(n)("comboBox.noResults", { value: a.value })
|
|
729
729
|
}, null, 8, ["text"])) : M("", !0),
|
|
730
730
|
E.errorMessage !== "" ? (p(), j(xe, {
|
|
731
731
|
key: 4,
|
|
732
732
|
class: "!cl-bg-danger-light cl-border-danger-light cl-rounded cl-text-danger-dark",
|
|
733
|
-
text: g(
|
|
733
|
+
text: g(n)("comboBox.errorMessage", { error: E.errorMessage })
|
|
734
734
|
}, null, 8, ["text"])) : M("", !0),
|
|
735
735
|
d.value ? (p(), j(Tl, {
|
|
736
736
|
key: 5,
|
|
737
737
|
"is-create-new-option": !0,
|
|
738
|
-
text: g(
|
|
738
|
+
text: g(n)("comboBox.addPrompt", { value: a.value, object: E.objectType }),
|
|
739
739
|
index: -1,
|
|
740
|
-
"selected-index":
|
|
740
|
+
"selected-index": i.value,
|
|
741
741
|
class: "cl-px-2",
|
|
742
742
|
onCreateObject: m,
|
|
743
743
|
onOptionHighlighted: W
|
|
@@ -748,7 +748,7 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
748
748
|
option: k,
|
|
749
749
|
index: R,
|
|
750
750
|
class: "cl-px-2",
|
|
751
|
-
"selected-index":
|
|
751
|
+
"selected-index": i.value,
|
|
752
752
|
onSelectObject: c,
|
|
753
753
|
onOptionHighlighted: W
|
|
754
754
|
}, null, 8, ["option", "index", "selected-index"]))), 128))
|
|
@@ -778,27 +778,27 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
778
778
|
},
|
|
779
779
|
emits: ["focus", "search", "search-parent", "create-object", "create-parent-object", "update:current-object"],
|
|
780
780
|
setup(t, { expose: o, emit: l }) {
|
|
781
|
-
const e = t,
|
|
781
|
+
const e = t, n = l, a = S(() => e.placeholderText ? e.placeholderText : i("comboBox.emptyHintText", { object: e.objectType })), d = S(() => e.searchHint ? e.searchHint : i("comboBox.searchHint", { object: e.objectType })), { t: i } = ue(), s = I(!1), r = S({
|
|
782
782
|
get: () => e.currentObject,
|
|
783
|
-
set: (C) =>
|
|
784
|
-
}), u =
|
|
783
|
+
set: (C) => n("update:current-object", C)
|
|
784
|
+
}), u = I(null), c = S(() => U()), m = I(""), b = I(""), h = I(), $ = I(!0), T = I(!1);
|
|
785
785
|
function O(C) {
|
|
786
786
|
var Q;
|
|
787
787
|
const Z = ((Q = P.value) == null ? void 0 : Q.getBoundingClientRect().top) || 0;
|
|
788
|
-
T.value = window.innerHeight - Z < 280, e.disabled || (typeof C < "u" ?
|
|
788
|
+
T.value = window.innerHeight - Z < 280, e.disabled || (typeof C < "u" ? s.value = C : s.value = !s.value);
|
|
789
789
|
}
|
|
790
790
|
function L(C) {
|
|
791
|
-
m.value = C,
|
|
791
|
+
m.value = C, n("search", C);
|
|
792
792
|
}
|
|
793
793
|
function D(C) {
|
|
794
|
-
b.value = C,
|
|
794
|
+
b.value = C, n("search-parent", C);
|
|
795
795
|
}
|
|
796
796
|
function W() {
|
|
797
|
-
|
|
797
|
+
r.value = null, O(!1);
|
|
798
798
|
}
|
|
799
799
|
function Y(C) {
|
|
800
800
|
const Z = E(C ?? 0);
|
|
801
|
-
|
|
801
|
+
r.value = Z, O(!1);
|
|
802
802
|
}
|
|
803
803
|
function E(C) {
|
|
804
804
|
let Z = null;
|
|
@@ -816,18 +816,18 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
816
816
|
h.value = {
|
|
817
817
|
name: m.value,
|
|
818
818
|
parentId: ((C = u.value) == null ? void 0 : C.id) ?? 0
|
|
819
|
-
},
|
|
819
|
+
}, n("create-object", h.value);
|
|
820
820
|
}
|
|
821
821
|
function se() {
|
|
822
822
|
h.value = {
|
|
823
823
|
name: b.value,
|
|
824
824
|
parentId: 0
|
|
825
|
-
},
|
|
825
|
+
}, n("create-parent-object", h.value);
|
|
826
826
|
}
|
|
827
827
|
function k() {
|
|
828
828
|
var C, Z;
|
|
829
829
|
(C = e.objectCreatedResponse) != null && C.error ? Cl({
|
|
830
|
-
message:
|
|
830
|
+
message: i("comboBox.createFailed", {
|
|
831
831
|
name: m.value,
|
|
832
832
|
error: e.objectCreatedResponse.error
|
|
833
833
|
}),
|
|
@@ -845,7 +845,7 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
845
845
|
function w() {
|
|
846
846
|
var Z, Q, re, ie, he;
|
|
847
847
|
Cl({
|
|
848
|
-
message:
|
|
848
|
+
message: i("comboBox.createSuccessful", {
|
|
849
849
|
object: e.objectType,
|
|
850
850
|
name: ((Z = e.objectCreatedResponse) == null ? void 0 : Z.name) ?? ""
|
|
851
851
|
}),
|
|
@@ -853,7 +853,7 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
853
853
|
duration: 1e4
|
|
854
854
|
});
|
|
855
855
|
let C = "";
|
|
856
|
-
u.value && u.value.id === ((Q = e.objectCreatedResponse) == null ? void 0 : Q.parentId) && (C = u.value.name),
|
|
856
|
+
u.value && u.value.id === ((Q = e.objectCreatedResponse) == null ? void 0 : Q.parentId) && (C = u.value.name), r.value = {
|
|
857
857
|
id: ((re = e.objectCreatedResponse) == null ? void 0 : re.id) ?? 0,
|
|
858
858
|
name: ((ie = e.objectCreatedResponse) == null ? void 0 : ie.name) ?? "",
|
|
859
859
|
parentId: ((he = e.objectCreatedResponse) == null ? void 0 : he.parentId) ?? 0,
|
|
@@ -862,17 +862,17 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
862
862
|
}
|
|
863
863
|
function U() {
|
|
864
864
|
let C = "";
|
|
865
|
-
return
|
|
865
|
+
return r.value && (r.value.parentName ? C = r.value.parentName + "; " + r.value.name : C = r.value.name), C;
|
|
866
866
|
}
|
|
867
867
|
function B() {
|
|
868
868
|
let C = !0;
|
|
869
869
|
m.value === "" && (C = !1), e.objectParentType !== "" && u.value === null && (C = !1), $.value = C;
|
|
870
870
|
}
|
|
871
871
|
ae(() => e.objectCreatedResponse, () => k()), ae(() => e.parentObjectCreatedResponse, () => R()), ae(() => m.value, () => B()), ae(() => u.value, () => B());
|
|
872
|
-
const P =
|
|
873
|
-
return
|
|
872
|
+
const P = I();
|
|
873
|
+
return ll(P, () => s.value ? O(!1) : ""), o({
|
|
874
874
|
focus() {
|
|
875
|
-
O(),
|
|
875
|
+
O(), n("focus");
|
|
876
876
|
}
|
|
877
877
|
}), (C, Z) => {
|
|
878
878
|
const Q = Me("cl-ui-combo-box", !0);
|
|
@@ -904,7 +904,7 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
904
904
|
]),
|
|
905
905
|
_(f("div", $o, [
|
|
906
906
|
f("div", Co, [
|
|
907
|
-
ce(
|
|
907
|
+
ce(V(g(i)("comboBox.required")) + " ", 1),
|
|
908
908
|
q(g(x), {
|
|
909
909
|
class: "cl-ml-1 cl-mt-1",
|
|
910
910
|
icon: "ph:warning"
|
|
@@ -913,7 +913,7 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
913
913
|
], 512), [
|
|
914
914
|
[oe, C.required && C.disabled === !1 && C.currentObject === null]
|
|
915
915
|
]),
|
|
916
|
-
|
|
916
|
+
s.value ? (p(), v("div", {
|
|
917
917
|
key: 1,
|
|
918
918
|
class: z(["cl-border cl-border-grey-2 cl-border-l-0 cl-float-right cl-rounded cl-rounded-l-none cl-text-grey-3 cl-transition-colors cl-w-[27px]", {
|
|
919
919
|
"cl-cursor-default cl-bg-off-white": C.disabled,
|
|
@@ -943,7 +943,7 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
943
943
|
]),
|
|
944
944
|
q(Hl, { size: "small" }, {
|
|
945
945
|
title: A(() => [
|
|
946
|
-
ce(
|
|
946
|
+
ce(V(g(i)("comboBox.createTitle", { object: C.objectType })), 1)
|
|
947
947
|
]),
|
|
948
948
|
trigger: A(({ open: re }) => [
|
|
949
949
|
_(q(ho, {
|
|
@@ -955,7 +955,7 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
955
955
|
"object-parent-type": C.objectParentType,
|
|
956
956
|
"error-message": C.errorMessage,
|
|
957
957
|
"current-object-name": c.value,
|
|
958
|
-
"is-visible":
|
|
958
|
+
"is-visible": s.value,
|
|
959
959
|
class: z({
|
|
960
960
|
"cl-bottom-full": T.value
|
|
961
961
|
}),
|
|
@@ -966,7 +966,7 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
966
966
|
onSearch: L,
|
|
967
967
|
onHideDropdown: Z[4] || (Z[4] = (ie) => O(!1))
|
|
968
968
|
}, null, 8, ["can-create-new-object", "can-clear-selected-object", "loading", "results", "object-type", "object-parent-type", "error-message", "current-object-name", "is-visible", "class", "search-hint", "onCreateObject"]), [
|
|
969
|
-
[oe,
|
|
969
|
+
[oe, s.value]
|
|
970
970
|
])
|
|
971
971
|
]),
|
|
972
972
|
footer: A(({ close: re }) => [
|
|
@@ -978,7 +978,7 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
978
978
|
onClick: re
|
|
979
979
|
}, {
|
|
980
980
|
default: A(() => [
|
|
981
|
-
ce(
|
|
981
|
+
ce(V(g(i)("comboBox.cancel")), 1)
|
|
982
982
|
]),
|
|
983
983
|
_: 2
|
|
984
984
|
}, 1032, ["onClick"]),
|
|
@@ -991,7 +991,7 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
991
991
|
}
|
|
992
992
|
}, {
|
|
993
993
|
default: A(() => [
|
|
994
|
-
ce(
|
|
994
|
+
ce(V(g(i)("comboBox.create")), 1)
|
|
995
995
|
]),
|
|
996
996
|
_: 2
|
|
997
997
|
}, 1032, ["disabled", "onClick"])
|
|
@@ -1020,7 +1020,7 @@ const ao = /* @__PURE__ */ f("div", { tabindex: "0" }, null, -1), no = {
|
|
|
1020
1020
|
class: "cl-box-border cl-font-light cl-mb-2 cl-p-2 cl-placeholder-grey-3 cl-text-sm"
|
|
1021
1021
|
}, {
|
|
1022
1022
|
default: A(() => [
|
|
1023
|
-
ce(
|
|
1023
|
+
ce(V(g(i)("comboBox.createProperty")), 1)
|
|
1024
1024
|
]),
|
|
1025
1025
|
_: 1
|
|
1026
1026
|
}, 8, ["modelValue"])
|
|
@@ -1090,10 +1090,10 @@ const Lo = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, jo = { class: "cl-gap-1
|
|
|
1090
1090
|
},
|
|
1091
1091
|
emits: ["update:edit-mode", "update:filterPanelOpen", "clear-filters"],
|
|
1092
1092
|
setup(t) {
|
|
1093
|
-
const o = t, { t: l } = ue(), e = S(() => o.request.filters.some((a) => a.filterValue !== "")),
|
|
1093
|
+
const o = t, { t: l } = ue(), e = S(() => o.request.filters.some((a) => a.filterValue !== "")), n = ul("cl-ui-grid-id") ?? "cl-ui-grid-filter";
|
|
1094
1094
|
return (a, d) => (p(), v(X, null, [
|
|
1095
1095
|
f("div", Lo, [
|
|
1096
|
-
f("strong", null,
|
|
1096
|
+
f("strong", null, V(g(l)("grid.gridTools")), 1)
|
|
1097
1097
|
]),
|
|
1098
1098
|
f("div", jo, [
|
|
1099
1099
|
f("div", Po, [
|
|
@@ -1103,18 +1103,18 @@ const Lo = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, jo = { class: "cl-gap-1
|
|
|
1103
1103
|
})))
|
|
1104
1104
|
]),
|
|
1105
1105
|
Ho,
|
|
1106
|
-
a.columns.some((
|
|
1106
|
+
a.columns.some((i) => i.editable) ? (p(), j(ye, {
|
|
1107
1107
|
key: 0,
|
|
1108
1108
|
size: "small",
|
|
1109
1109
|
colour: "default",
|
|
1110
1110
|
disabled: a.loading,
|
|
1111
|
-
onClick: d[0] || (d[0] = ne((
|
|
1111
|
+
onClick: d[0] || (d[0] = ne((i) => a.$emit("update:edit-mode", !a.editMode), ["prevent"]))
|
|
1112
1112
|
}, {
|
|
1113
1113
|
default: A(() => [
|
|
1114
1114
|
a.editMode ? (p(), v(X, { key: 0 }, [
|
|
1115
|
-
ce(
|
|
1115
|
+
ce(V(g(l)("grid.finishEditing")), 1)
|
|
1116
1116
|
], 64)) : (p(), v(X, { key: 1 }, [
|
|
1117
|
-
ce(
|
|
1117
|
+
ce(V(g(l)("grid.editData")), 1)
|
|
1118
1118
|
], 64))
|
|
1119
1119
|
]),
|
|
1120
1120
|
_: 1
|
|
@@ -1128,27 +1128,27 @@ const Lo = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, jo = { class: "cl-gap-1
|
|
|
1128
1128
|
class: "cl-w-full",
|
|
1129
1129
|
size: "small",
|
|
1130
1130
|
disabled: a.loading,
|
|
1131
|
-
onClick: d[1] || (d[1] = ne((
|
|
1131
|
+
onClick: d[1] || (d[1] = ne((i) => a.$emit("update:filterPanelOpen", !a.filterPanelOpen), ["prevent"]))
|
|
1132
1132
|
}, {
|
|
1133
1133
|
default: A(() => [
|
|
1134
|
-
ce(
|
|
1134
|
+
ce(V(g(l)("grid.modifyFilters")), 1)
|
|
1135
1135
|
]),
|
|
1136
1136
|
_: 1
|
|
1137
1137
|
}, 8, ["disabled"])
|
|
1138
1138
|
]),
|
|
1139
1139
|
g(Sl)(a.columns) ? (p(), j(ye, {
|
|
1140
1140
|
key: 0,
|
|
1141
|
-
id: `${g(
|
|
1141
|
+
id: `${g(n)}-clear-filters`,
|
|
1142
1142
|
size: "small",
|
|
1143
1143
|
colour: "danger",
|
|
1144
1144
|
disabled: !e.value || a.loading,
|
|
1145
1145
|
class: z({
|
|
1146
|
-
"cl-col-span-2": a.columns.some((
|
|
1146
|
+
"cl-col-span-2": a.columns.some((i) => i.editable)
|
|
1147
1147
|
}),
|
|
1148
|
-
onClick: d[2] || (d[2] = ne((
|
|
1148
|
+
onClick: d[2] || (d[2] = ne((i) => a.$emit("clear-filters"), ["prevent"]))
|
|
1149
1149
|
}, {
|
|
1150
1150
|
default: A(() => [
|
|
1151
|
-
ce(
|
|
1151
|
+
ce(V(g(l)("grid.clearFilters")), 1)
|
|
1152
1152
|
]),
|
|
1153
1153
|
_: 1
|
|
1154
1154
|
}, 8, ["id", "disabled", "class"])) : M("", !0)
|
|
@@ -1169,7 +1169,7 @@ const Lo = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, jo = { class: "cl-gap-1
|
|
|
1169
1169
|
}),
|
|
1170
1170
|
emits: /* @__PURE__ */ me(["focus", "blur"], ["update:modelValue"]),
|
|
1171
1171
|
setup(t, { expose: o, emit: l }) {
|
|
1172
|
-
const e = $e(t, "modelValue"),
|
|
1172
|
+
const e = $e(t, "modelValue"), n = l, a = I();
|
|
1173
1173
|
return o({
|
|
1174
1174
|
focus: () => {
|
|
1175
1175
|
var d;
|
|
@@ -1179,7 +1179,7 @@ const Lo = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, jo = { class: "cl-gap-1
|
|
|
1179
1179
|
var d;
|
|
1180
1180
|
return (d = a.value) == null ? void 0 : d.blur();
|
|
1181
1181
|
}
|
|
1182
|
-
}), (d,
|
|
1182
|
+
}), (d, i) => (p(), j(qe, {
|
|
1183
1183
|
"show-required-asterisk": d.required,
|
|
1184
1184
|
errors: d.errors
|
|
1185
1185
|
}, Ie({
|
|
@@ -1188,16 +1188,16 @@ const Lo = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, jo = { class: "cl-gap-1
|
|
|
1188
1188
|
ref_key: "inputRef",
|
|
1189
1189
|
ref: a
|
|
1190
1190
|
}, d.$attrs, {
|
|
1191
|
-
"onUpdate:modelValue":
|
|
1191
|
+
"onUpdate:modelValue": i[0] || (i[0] = (s) => e.value = s),
|
|
1192
1192
|
class: "before:cl-h-2 before:cl-scale-0 before:cl-w-2 checked:before:cl-scale-100 checked:cl-bg-primary-light checked:cl-border-primary-darker cl-appearance-none cl-border-2 cl-border-grey-3 cl-grid cl-h-5 cl-m-0 cl-place-content-center cl-rounded cl-text-secondary-default cl-w-5 disabled:cl-bg-grey-1 disabled:cl-border-grey-2",
|
|
1193
1193
|
type: "checkbox",
|
|
1194
1194
|
required: d.required,
|
|
1195
1195
|
disabled: d.disabled,
|
|
1196
|
-
onKeydown:
|
|
1196
|
+
onKeydown: i[1] || (i[1] = be(ne((s) => {
|
|
1197
1197
|
e.value = !e.value;
|
|
1198
1198
|
}, ["stop", "prevent"]), ["enter"])),
|
|
1199
|
-
onFocus:
|
|
1200
|
-
onBlur:
|
|
1199
|
+
onFocus: i[2] || (i[2] = (s) => n("focus")),
|
|
1200
|
+
onBlur: i[3] || (i[3] = (s) => n("blur"))
|
|
1201
1201
|
}), null, 16, xo), [
|
|
1202
1202
|
[rt, e.value]
|
|
1203
1203
|
])
|
|
@@ -1397,57 +1397,57 @@ const Qo = {
|
|
|
1397
1397
|
fallbackWarn: !1,
|
|
1398
1398
|
warnHtmlMessage: !1
|
|
1399
1399
|
});
|
|
1400
|
-
function
|
|
1400
|
+
function qi(t, o) {
|
|
1401
1401
|
return ke.global.mergeLocaleMessage(t, o), Re();
|
|
1402
1402
|
}
|
|
1403
|
-
function
|
|
1403
|
+
function Oi(t, o) {
|
|
1404
1404
|
return ke.global.mergeNumberFormat(t, o), Re();
|
|
1405
1405
|
}
|
|
1406
|
-
function
|
|
1406
|
+
function Di(t, o) {
|
|
1407
1407
|
return ke.global.mergeDateTimeFormat(t, o), Re();
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1409
|
+
function Ai(t) {
|
|
1410
1410
|
return ke.global.locale.value = t, Re();
|
|
1411
1411
|
}
|
|
1412
|
-
const { locale: Jo, getNumberFormat: Xo } = ke.global,
|
|
1412
|
+
const { locale: Jo, getNumberFormat: Xo } = ke.global, ol = te.DECIMAL;
|
|
1413
1413
|
function Ae(t) {
|
|
1414
1414
|
return Ee(t, te.DECIMAL, { additionalOptions: {
|
|
1415
1415
|
minimumFractionDigits: 0,
|
|
1416
1416
|
maximumFractionDigits: 0
|
|
1417
1417
|
} });
|
|
1418
1418
|
}
|
|
1419
|
-
function
|
|
1419
|
+
function rl(t, o) {
|
|
1420
1420
|
return Ee(t, te.DECIMAL, { additionalOptions: {
|
|
1421
1421
|
minimumFractionDigits: 0,
|
|
1422
1422
|
maximumFractionDigits: o
|
|
1423
1423
|
} });
|
|
1424
1424
|
}
|
|
1425
1425
|
function Ee(t, o, l) {
|
|
1426
|
-
if (
|
|
1427
|
-
const e =
|
|
1426
|
+
if (nl(o)) {
|
|
1427
|
+
const e = Fe(ol, l);
|
|
1428
1428
|
return o.replace(/\{0\}/g, Ol(t, e) ?? "");
|
|
1429
1429
|
} else {
|
|
1430
|
-
const e =
|
|
1431
|
-
let
|
|
1430
|
+
const e = Fe(gl(o), l);
|
|
1431
|
+
let n = Ol(t, e) ?? "";
|
|
1432
1432
|
if (o === "currency-without-symbol") {
|
|
1433
|
-
const a =
|
|
1433
|
+
const a = al(e);
|
|
1434
1434
|
if (a) {
|
|
1435
1435
|
const d = Ne(a, 0, "unit", "currency", "literal");
|
|
1436
|
-
|
|
1436
|
+
n = De(n, d, "");
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
1439
|
-
return
|
|
1439
|
+
return n;
|
|
1440
1440
|
}
|
|
1441
1441
|
}
|
|
1442
1442
|
function Zl(t, o, l) {
|
|
1443
|
-
if (
|
|
1443
|
+
if (nl(o)) {
|
|
1444
1444
|
const e = ea(t, o);
|
|
1445
|
-
return ql(e ?? t,
|
|
1445
|
+
return ql(e ?? t, ol, l);
|
|
1446
1446
|
} else
|
|
1447
1447
|
return ql(t, gl(o), l);
|
|
1448
1448
|
}
|
|
1449
1449
|
function ml(t, o) {
|
|
1450
|
-
return
|
|
1450
|
+
return nl(t) ? Fe(ol, o) : Fe(gl(t), o);
|
|
1451
1451
|
}
|
|
1452
1452
|
function ea(t, o) {
|
|
1453
1453
|
let l = null;
|
|
@@ -1455,13 +1455,13 @@ function ea(t, o) {
|
|
|
1455
1455
|
const e = `!${o}!`.split("{0}");
|
|
1456
1456
|
if (t.startsWith(e[0])) {
|
|
1457
1457
|
t = t.replace(e[0], "");
|
|
1458
|
-
for (let
|
|
1459
|
-
const a = t.indexOf(e[
|
|
1458
|
+
for (let n = 1; n < e.length; ++n) {
|
|
1459
|
+
const a = t.indexOf(e[n]);
|
|
1460
1460
|
if (l !== null && l !== t.substring(0, a)) {
|
|
1461
1461
|
l = null;
|
|
1462
1462
|
break;
|
|
1463
1463
|
}
|
|
1464
|
-
l = t.substring(0, a), t = t.substring(a).replace(e[
|
|
1464
|
+
l = t.substring(0, a), t = t.substring(a).replace(e[n], "");
|
|
1465
1465
|
}
|
|
1466
1466
|
}
|
|
1467
1467
|
return t !== "" && (l = null), l;
|
|
@@ -1469,30 +1469,30 @@ function ea(t, o) {
|
|
|
1469
1469
|
function ql(t, o, l) {
|
|
1470
1470
|
if (!t)
|
|
1471
1471
|
return NaN;
|
|
1472
|
-
const e =
|
|
1473
|
-
if (
|
|
1472
|
+
const e = Fe(o, l), n = al(e);
|
|
1473
|
+
if (n === null)
|
|
1474
1474
|
return NaN;
|
|
1475
1475
|
const a = [
|
|
1476
1476
|
".",
|
|
1477
1477
|
","
|
|
1478
|
-
], d = Ne(
|
|
1478
|
+
], d = Ne(n, 1, "currency", "unit"), i = Ne(n, 1, "percentSign"), s = Ne(n, 1, "plusSign"), r = Ne(n, -1, "minusSign"), u = Ne(n, -10000.11111, "literal", "unknown"), c = r.some((O) => t.startsWith(O) || t.endsWith(O)) || t.startsWith("(") && t.endsWith(")"), m = i.some((O) => t.startsWith(O) || t.endsWith(O)), b = (c ? -1 : 1) * (m ? 0.01 : 1);
|
|
1479
1479
|
let h = t;
|
|
1480
1480
|
if (a.some((O) => t.includes(O)) && T())
|
|
1481
1481
|
return NaN;
|
|
1482
|
-
return h = De(h, a, "."), h = De(h, d, ""), h = De(h,
|
|
1482
|
+
return h = De(h, a, "."), h = De(h, d, ""), h = De(h, i, ""), h = De(h, s, ""), h = De(h, r, ""), h = De(h, u, ""), +h * b;
|
|
1483
1483
|
function T() {
|
|
1484
1484
|
return a.some((O) => h.indexOf(O) !== h.lastIndexOf(O));
|
|
1485
1485
|
}
|
|
1486
1486
|
}
|
|
1487
|
-
function De(t, o, l, e = t.length + 1,
|
|
1487
|
+
function De(t, o, l, e = t.length + 1, n = !1) {
|
|
1488
1488
|
let a = t.substring(0, e);
|
|
1489
1489
|
const d = t.substring(e);
|
|
1490
|
-
return o.forEach((
|
|
1491
|
-
if (
|
|
1492
|
-
const
|
|
1493
|
-
a = a.replace(new RegExp(
|
|
1490
|
+
return o.forEach((i) => {
|
|
1491
|
+
if (n) {
|
|
1492
|
+
const s = i.replace(/[/\-\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
1493
|
+
a = a.replace(new RegExp(s, "g"), l);
|
|
1494
1494
|
} else
|
|
1495
|
-
a = a.replace(
|
|
1495
|
+
a = a.replace(i, l);
|
|
1496
1496
|
}), a + d;
|
|
1497
1497
|
}
|
|
1498
1498
|
function Ne(t, o, ...l) {
|
|
@@ -1500,39 +1500,39 @@ function Ne(t, o, ...l) {
|
|
|
1500
1500
|
}
|
|
1501
1501
|
function Ol(t, o) {
|
|
1502
1502
|
var l;
|
|
1503
|
-
return isNaN(t) ? "" : ((l =
|
|
1503
|
+
return isNaN(t) ? "" : ((l = al(o)) == null ? void 0 : l.format(t)) ?? null;
|
|
1504
1504
|
}
|
|
1505
|
-
function
|
|
1505
|
+
function al(t) {
|
|
1506
1506
|
try {
|
|
1507
1507
|
return new Intl.NumberFormat(t.locale, t);
|
|
1508
1508
|
} catch (o) {
|
|
1509
1509
|
return console.error(o), null;
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
|
-
function
|
|
1513
|
-
const l = kl(o == null ? void 0 : o.locale) || g(Jo), e = Xo(l),
|
|
1512
|
+
function Fe(t, o) {
|
|
1513
|
+
const l = kl(o == null ? void 0 : o.locale) || g(Jo), e = Xo(l), n = ve(kl(o == null ? void 0 : o.additionalOptions) ?? {});
|
|
1514
1514
|
return {
|
|
1515
1515
|
...e[t],
|
|
1516
1516
|
locale: l,
|
|
1517
1517
|
key: t,
|
|
1518
|
-
...
|
|
1518
|
+
...n
|
|
1519
1519
|
};
|
|
1520
1520
|
}
|
|
1521
1521
|
function gl(t) {
|
|
1522
1522
|
return la(t) ? t : te.CURRENCY;
|
|
1523
1523
|
}
|
|
1524
|
-
function
|
|
1524
|
+
function nl(t) {
|
|
1525
1525
|
return t.includes("{0}");
|
|
1526
1526
|
}
|
|
1527
1527
|
function la(t) {
|
|
1528
|
-
return !
|
|
1528
|
+
return !nl(t) && t !== "currency-without-symbol";
|
|
1529
1529
|
}
|
|
1530
1530
|
function ta(t, o) {
|
|
1531
|
-
const l =
|
|
1531
|
+
const l = Fe(ol, o), e = al(l);
|
|
1532
1532
|
if (e === null)
|
|
1533
1533
|
return t;
|
|
1534
|
-
const
|
|
1535
|
-
return De(t,
|
|
1534
|
+
const n = Ne(e, 10000.11111, "group");
|
|
1535
|
+
return De(t, n, "", t.length, !0);
|
|
1536
1536
|
}
|
|
1537
1537
|
function oa(t) {
|
|
1538
1538
|
if (t.startsWith("ClUi"))
|
|
@@ -1546,18 +1546,18 @@ function oa(t) {
|
|
|
1546
1546
|
from: "@iconify/vue"
|
|
1547
1547
|
};
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1549
|
+
function Ei() {
|
|
1550
1550
|
return oa;
|
|
1551
1551
|
}
|
|
1552
1552
|
const { t: Ce } = ke.global;
|
|
1553
|
-
function aa(t, o, l, e,
|
|
1553
|
+
function aa(t, o, l, e, n) {
|
|
1554
1554
|
return new Promise((a) => {
|
|
1555
1555
|
let d = {
|
|
1556
1556
|
valid: !1,
|
|
1557
1557
|
message: ""
|
|
1558
1558
|
};
|
|
1559
1559
|
if (t != null) {
|
|
1560
|
-
let
|
|
1560
|
+
let i, s, r;
|
|
1561
1561
|
switch (o) {
|
|
1562
1562
|
case "email":
|
|
1563
1563
|
case "password":
|
|
@@ -1565,36 +1565,36 @@ function aa(t, o, l, e, r) {
|
|
|
1565
1565
|
case "tel":
|
|
1566
1566
|
case "text":
|
|
1567
1567
|
case "url":
|
|
1568
|
-
|
|
1568
|
+
i = ((e == null ? void 0 : e.length) ?? 0) >= (Number(t) || 0), d = Te(i, Ce("input.greaterOrEqualToCharacters", {
|
|
1569
1569
|
label: l,
|
|
1570
1570
|
min: t.toString()
|
|
1571
1571
|
}));
|
|
1572
1572
|
break;
|
|
1573
1573
|
case "number":
|
|
1574
1574
|
case "range":
|
|
1575
|
-
|
|
1575
|
+
i = e >= (Number(t) || 0), d = Te(i, Ce("input.greaterOrEqualToValue", {
|
|
1576
1576
|
label: l,
|
|
1577
1577
|
min: t.toString()
|
|
1578
1578
|
}));
|
|
1579
1579
|
break;
|
|
1580
1580
|
case "date":
|
|
1581
|
-
|
|
1581
|
+
n ? (s = G.fromISO(e).setZone(n), r = G.fromISO(t).setZone(n)) : (s = G.fromISO(e, {
|
|
1582
1582
|
zone: "UTC"
|
|
1583
|
-
}),
|
|
1583
|
+
}), r = G.fromISO(t, {
|
|
1584
1584
|
zone: "UTC"
|
|
1585
|
-
})),
|
|
1585
|
+
})), i = s >= r, d = Te(i, Ce("input.afterOrEqualToValue", {
|
|
1586
1586
|
label: l,
|
|
1587
|
-
min:
|
|
1587
|
+
min: r.setLocale(ke.global.locale.value).toFormat("D")
|
|
1588
1588
|
}));
|
|
1589
1589
|
break;
|
|
1590
1590
|
case "datetime":
|
|
1591
|
-
|
|
1591
|
+
n ? (s = G.fromISO(e).setZone(n), r = G.fromISO(t).setZone(n)) : (s = G.fromISO(e, {
|
|
1592
1592
|
zone: "UTC"
|
|
1593
|
-
}),
|
|
1593
|
+
}), r = G.fromISO(t, {
|
|
1594
1594
|
zone: "UTC"
|
|
1595
|
-
})),
|
|
1595
|
+
})), i = s >= r, n && (r = r.setZone(n)), d = Te(i, Ce("input.afterOrEqualToValue", {
|
|
1596
1596
|
label: l,
|
|
1597
|
-
min:
|
|
1597
|
+
min: r.setLocale(ke.global.locale.value).toFormat("f")
|
|
1598
1598
|
}));
|
|
1599
1599
|
break;
|
|
1600
1600
|
default:
|
|
@@ -1605,14 +1605,14 @@ function aa(t, o, l, e, r) {
|
|
|
1605
1605
|
a(d);
|
|
1606
1606
|
});
|
|
1607
1607
|
}
|
|
1608
|
-
function na(t, o, l, e,
|
|
1608
|
+
function na(t, o, l, e, n) {
|
|
1609
1609
|
return new Promise((a) => {
|
|
1610
1610
|
let d = {
|
|
1611
1611
|
valid: !1,
|
|
1612
1612
|
message: ""
|
|
1613
1613
|
};
|
|
1614
1614
|
if (t != null) {
|
|
1615
|
-
let
|
|
1615
|
+
let i, s, r;
|
|
1616
1616
|
switch (o) {
|
|
1617
1617
|
case "email":
|
|
1618
1618
|
case "password":
|
|
@@ -1620,36 +1620,36 @@ function na(t, o, l, e, r) {
|
|
|
1620
1620
|
case "tel":
|
|
1621
1621
|
case "text":
|
|
1622
1622
|
case "url":
|
|
1623
|
-
|
|
1623
|
+
i = ((e == null ? void 0 : e.length) ?? 0) <= (Number(t) || 0), d = Te(i, Ce("input.lessOrEqualToCharacters", {
|
|
1624
1624
|
label: l,
|
|
1625
1625
|
max: t.toString()
|
|
1626
1626
|
}));
|
|
1627
1627
|
break;
|
|
1628
1628
|
case "number":
|
|
1629
1629
|
case "range":
|
|
1630
|
-
|
|
1630
|
+
i = e <= (Number(t) || 0), d = Te(i, Ce("input.lessOrEqualToValue", {
|
|
1631
1631
|
label: l,
|
|
1632
1632
|
max: t.toString()
|
|
1633
1633
|
}));
|
|
1634
1634
|
break;
|
|
1635
1635
|
case "date":
|
|
1636
|
-
|
|
1636
|
+
n ? (s = G.fromISO(e).setZone(n), r = G.fromISO(t).setZone(n)) : (s = G.fromISO(e, {
|
|
1637
1637
|
zone: "UTC"
|
|
1638
|
-
}),
|
|
1638
|
+
}), r = G.fromISO(t, {
|
|
1639
1639
|
zone: "UTC"
|
|
1640
|
-
})),
|
|
1640
|
+
})), i = s <= r, d = Te(i, Ce("input.beforeOrEqualToValue", {
|
|
1641
1641
|
label: l,
|
|
1642
|
-
max:
|
|
1642
|
+
max: r.setLocale(ke.global.locale.value).toFormat("D")
|
|
1643
1643
|
}));
|
|
1644
1644
|
break;
|
|
1645
1645
|
case "datetime":
|
|
1646
|
-
|
|
1646
|
+
n ? (s = G.fromISO(e).setZone(n), r = G.fromISO(t).setZone(n)) : (s = G.fromISO(e, {
|
|
1647
1647
|
zone: "UTC"
|
|
1648
|
-
}),
|
|
1648
|
+
}), r = G.fromISO(t, {
|
|
1649
1649
|
zone: "UTC"
|
|
1650
|
-
})),
|
|
1650
|
+
})), i = s <= r, d = Te(i, Ce("input.beforeOrEqualToValue", {
|
|
1651
1651
|
label: l,
|
|
1652
|
-
max:
|
|
1652
|
+
max: r.setLocale(ke.global.locale.value).toFormat("f")
|
|
1653
1653
|
}));
|
|
1654
1654
|
break;
|
|
1655
1655
|
default:
|
|
@@ -1662,13 +1662,13 @@ function na(t, o, l, e, r) {
|
|
|
1662
1662
|
}
|
|
1663
1663
|
function ra(t, o) {
|
|
1664
1664
|
return new Promise((l) => {
|
|
1665
|
-
const e = o != null && o !== "" && o.toString().trim() !== "",
|
|
1666
|
-
l(
|
|
1665
|
+
const e = o != null && o !== "" && o.toString().trim() !== "", n = Te(e, Ce("input.valueIsRequired", { label: t }));
|
|
1666
|
+
l(n);
|
|
1667
1667
|
});
|
|
1668
1668
|
}
|
|
1669
1669
|
function sa(t, o) {
|
|
1670
1670
|
return new Promise((l) => {
|
|
1671
|
-
const
|
|
1671
|
+
const n = o === "" || /[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/.exec(o) !== null, a = Te(n, Ce("input.valueNotValidEmail", { label: t }));
|
|
1672
1672
|
l(a);
|
|
1673
1673
|
});
|
|
1674
1674
|
}
|
|
@@ -1696,17 +1696,17 @@ const ia = {
|
|
|
1696
1696
|
searchValue: {}
|
|
1697
1697
|
},
|
|
1698
1698
|
setup(t) {
|
|
1699
|
-
const o = t, l = ul(Wl), { t: e, locale:
|
|
1700
|
-
function a(
|
|
1699
|
+
const o = t, l = ul(Wl), { t: e, locale: n } = ue();
|
|
1700
|
+
function a(s, r) {
|
|
1701
1701
|
let u;
|
|
1702
|
-
o.timeZone ? u = G.fromISO(
|
|
1703
|
-
locale: (l == null ? void 0 : l.value) ??
|
|
1704
|
-
}).setZone(o.timeZone) : u = G.fromISO(
|
|
1705
|
-
locale: (l == null ? void 0 : l.value) ??
|
|
1702
|
+
o.timeZone ? u = G.fromISO(s, {
|
|
1703
|
+
locale: (l == null ? void 0 : l.value) ?? n.value
|
|
1704
|
+
}).setZone(o.timeZone) : u = G.fromISO(s, {
|
|
1705
|
+
locale: (l == null ? void 0 : l.value) ?? n.value,
|
|
1706
1706
|
zone: "UTC"
|
|
1707
1707
|
});
|
|
1708
1708
|
let c = "";
|
|
1709
|
-
switch (
|
|
1709
|
+
switch (r) {
|
|
1710
1710
|
case pe.SHORT_DATE:
|
|
1711
1711
|
case pe.DATE:
|
|
1712
1712
|
c = u.toFormat("D");
|
|
@@ -1730,34 +1730,34 @@ const ia = {
|
|
|
1730
1730
|
return c;
|
|
1731
1731
|
}
|
|
1732
1732
|
function d() {
|
|
1733
|
-
let
|
|
1734
|
-
return o.column.maxLength && (
|
|
1733
|
+
let s = o.data[o.column.field];
|
|
1734
|
+
return o.column.maxLength && (s = s.trimToLength(o.column.maxLength, o.column.format !== void 0 ? o.column.format === "ellipsis" : !1)), o.searchValue && o.column.searchable && (s = dt(s, o.searchValue.split(" "))), o.column.format === "wrap-text" && (s = `<span class="cl-break-words cl-whitespace-pre-wrap">${s}</span>`), s;
|
|
1735
1735
|
}
|
|
1736
|
-
function s
|
|
1737
|
-
return o.column.format === te.INTEGER ? Ee(
|
|
1738
|
-
locale:
|
|
1736
|
+
function i(s, r) {
|
|
1737
|
+
return o.column.format === te.INTEGER ? Ee(s, te.DECIMAL, {
|
|
1738
|
+
locale: r,
|
|
1739
1739
|
additionalOptions: {
|
|
1740
1740
|
maximumFractionDigits: 0,
|
|
1741
1741
|
minimumFractionDigits: 0
|
|
1742
1742
|
}
|
|
1743
|
-
}) : Ee(
|
|
1743
|
+
}) : Ee(s, o.column.format ?? te.DECIMAL, { locale: r });
|
|
1744
1744
|
}
|
|
1745
|
-
return (
|
|
1745
|
+
return (s, r) => {
|
|
1746
1746
|
var u;
|
|
1747
|
-
return
|
|
1747
|
+
return s.column.type === "slot" ? N(s.$slots, s.column.name, { key: 0 }) : s.column.type === "boolean" && s.column.field !== void 0 ? (p(), j(fl, {
|
|
1748
1748
|
key: 1,
|
|
1749
1749
|
class: "disabled:checked:cl-bg-primary-light disabled:checked:cl-border-primary-light",
|
|
1750
|
-
"model-value":
|
|
1750
|
+
"model-value": s.data[s.column.field],
|
|
1751
1751
|
disabled: !0
|
|
1752
|
-
}, null, 8, ["model-value"])) : (
|
|
1753
|
-
|
|
1754
|
-
ce(
|
|
1755
|
-
], 64)) :
|
|
1756
|
-
ce(
|
|
1752
|
+
}, null, 8, ["model-value"])) : (s.column.type === "date" || s.column.type === "datetime" || s.column.type === "dateRange") && s.column.field !== void 0 ? (p(), v(X, { key: 2 }, [
|
|
1753
|
+
s.column.format !== void 0 ? (p(), v(X, { key: 0 }, [
|
|
1754
|
+
ce(V(a(s.data[s.column.field], s.column.format)), 1)
|
|
1755
|
+
], 64)) : s.column.type === "date" || s.column.type === "dateRange" ? (p(), v(X, { key: 1 }, [
|
|
1756
|
+
ce(V(a(s.data[s.column.field], g(pe).DATE)), 1)
|
|
1757
1757
|
], 64)) : (p(), v(X, { key: 2 }, [
|
|
1758
|
-
ce(
|
|
1758
|
+
ce(V(a(s.data[s.column.field], g(pe).DATETIME)), 1)
|
|
1759
1759
|
], 64))
|
|
1760
|
-
], 64)) :
|
|
1760
|
+
], 64)) : s.column.type === "list" && s.column.field !== void 0 && s.column.listEntries !== void 0 ? (p(), v("span", ia, V(g(e)(((u = s.column.listEntries.find((c) => c.value === s.data[s.column.field])) == null ? void 0 : u.translationKey) ?? "")), 1)) : s.column.type === "number" && s.column.field !== void 0 ? (p(), v("span", ca, V(i(s.data[s.column.field], g(n))), 1)) : s.column.field !== void 0 ? (p(), v("span", ua, [
|
|
1761
1761
|
f("span", {
|
|
1762
1762
|
innerHTML: d()
|
|
1763
1763
|
}, null, 8, da)
|
|
@@ -1775,56 +1775,56 @@ const ia = {
|
|
|
1775
1775
|
},
|
|
1776
1776
|
emits: ["edit", "focus", "undo"],
|
|
1777
1777
|
setup(t, { emit: o }) {
|
|
1778
|
-
const l = t, e = o, { t:
|
|
1779
|
-
var
|
|
1780
|
-
return ((
|
|
1778
|
+
const l = t, e = o, { t: n } = ue(), a = I(ve(l.data)), d = S(() => l.column.field !== void 0 && a.value[l.column.field] !== l.data[l.column.field]), i = S(() => {
|
|
1779
|
+
var s;
|
|
1780
|
+
return ((s = l.column.listEntries) == null ? void 0 : s.map((r, u) => ({
|
|
1781
1781
|
id: u,
|
|
1782
|
-
name: r
|
|
1782
|
+
name: n(r.translationKey)
|
|
1783
1783
|
}))) ?? [];
|
|
1784
1784
|
});
|
|
1785
|
-
return st(() => a.value = ve(l.data)), ae(a, (
|
|
1786
|
-
const
|
|
1787
|
-
|
|
1785
|
+
return st(() => a.value = ve(l.data)), ae(a, (s) => {
|
|
1786
|
+
const r = l.column.field ?? "";
|
|
1787
|
+
r !== "" && (s[r] !== l.data[r] ? e("edit", s[r]) : e("undo"));
|
|
1788
1788
|
}, {
|
|
1789
1789
|
deep: !0
|
|
1790
|
-
}), (
|
|
1790
|
+
}), (s, r) => (p(), v("td", {
|
|
1791
1791
|
class: z(["cl-border-b cl-border-grey-1 cl-gap-1 cl-grid cl-grid-cols-2 cl-m-1 cl-mb-0 cl-py-2 cl-text-xs lg:cl-border-b-0 lg:cl-m-0 lg:cl-px-1 lg:cl-table-cell lg:cl-text-base", {
|
|
1792
1792
|
"cl-bg-link-lighter": d.value
|
|
1793
1793
|
}])
|
|
1794
1794
|
}, [
|
|
1795
|
-
f("span", pa,
|
|
1796
|
-
|
|
1795
|
+
f("span", pa, V(s.column.caption), 1),
|
|
1796
|
+
s.editMode && s.column.editable === !0 ? N(s.$slots, `${s.column.name}Edit`, fe(ee({ key: 0 }, {
|
|
1797
1797
|
cellFocused: () => e("focus"),
|
|
1798
|
-
column:
|
|
1798
|
+
column: s.column,
|
|
1799
1799
|
edited: d.value,
|
|
1800
1800
|
record: a.value,
|
|
1801
|
-
listEntries:
|
|
1802
|
-
searchValue:
|
|
1801
|
+
listEntries: i.value,
|
|
1802
|
+
searchValue: s.searchValue
|
|
1803
1803
|
})), () => [
|
|
1804
1804
|
q(Dl, {
|
|
1805
|
-
column:
|
|
1806
|
-
data:
|
|
1807
|
-
"time-zone":
|
|
1808
|
-
"search-value":
|
|
1805
|
+
column: s.column,
|
|
1806
|
+
data: s.data,
|
|
1807
|
+
"time-zone": s.timeZone,
|
|
1808
|
+
"search-value": s.searchValue
|
|
1809
1809
|
}, {
|
|
1810
|
-
[
|
|
1811
|
-
N(
|
|
1812
|
-
column:
|
|
1813
|
-
record:
|
|
1814
|
-
searchValue:
|
|
1810
|
+
[s.column.name]: A(() => [
|
|
1811
|
+
N(s.$slots, s.column.name, fe(ge({
|
|
1812
|
+
column: s.column,
|
|
1813
|
+
record: s.data,
|
|
1814
|
+
searchValue: s.searchValue
|
|
1815
1815
|
})))
|
|
1816
1816
|
]),
|
|
1817
1817
|
_: 2
|
|
1818
1818
|
}, 1032, ["column", "data", "time-zone", "search-value"])
|
|
1819
1819
|
]) : (p(), j(Dl, {
|
|
1820
1820
|
key: 1,
|
|
1821
|
-
column:
|
|
1822
|
-
data:
|
|
1823
|
-
"time-zone":
|
|
1824
|
-
"search-value":
|
|
1821
|
+
column: s.column,
|
|
1822
|
+
data: s.data,
|
|
1823
|
+
"time-zone": s.timeZone,
|
|
1824
|
+
"search-value": s.searchValue
|
|
1825
1825
|
}, {
|
|
1826
|
-
[
|
|
1827
|
-
N(
|
|
1826
|
+
[s.column.name]: A(() => [
|
|
1827
|
+
N(s.$slots, s.column.name, fe(ge({ column: s.column, record: s.data, searchValue: s.searchValue })))
|
|
1828
1828
|
]),
|
|
1829
1829
|
_: 2
|
|
1830
1830
|
}, 1032, ["column", "data", "time-zone", "search-value"]))
|
|
@@ -1842,8 +1842,8 @@ const ia = {
|
|
|
1842
1842
|
emits: ["cell-focus", "cell-edit", "cell-undo"],
|
|
1843
1843
|
setup(t) {
|
|
1844
1844
|
return (o, l) => (p(), v("tr", null, [
|
|
1845
|
-
(p(!0), v(X, null, de(o.columns, (e,
|
|
1846
|
-
key:
|
|
1845
|
+
(p(!0), v(X, null, de(o.columns, (e, n) => (p(), j(fa, {
|
|
1846
|
+
key: n,
|
|
1847
1847
|
data: o.data,
|
|
1848
1848
|
column: e,
|
|
1849
1849
|
"time-zone": o.timeZone,
|
|
@@ -1855,8 +1855,8 @@ const ia = {
|
|
|
1855
1855
|
}, Ie({ _: 2 }, [
|
|
1856
1856
|
de(o.$slots, (a, d) => ({
|
|
1857
1857
|
name: d,
|
|
1858
|
-
fn: A((
|
|
1859
|
-
N(o.$slots, d, fe(ge(
|
|
1858
|
+
fn: A((i) => [
|
|
1859
|
+
N(o.$slots, d, fe(ge(i)))
|
|
1860
1860
|
])
|
|
1861
1861
|
}))
|
|
1862
1862
|
]), 1032, ["data", "column", "time-zone", "search-value", "edit-mode", "onEdit", "onUndo"]))), 128))
|
|
@@ -1879,20 +1879,20 @@ const ia = {
|
|
|
1879
1879
|
},
|
|
1880
1880
|
emits: ["row-select", "row-edit", "row-edit-cancelled", "clear-filters"],
|
|
1881
1881
|
setup(t, { emit: o }) {
|
|
1882
|
-
const l = t, e = o, { t:
|
|
1882
|
+
const l = t, e = o, { t: n } = ue(), a = I({
|
|
1883
1883
|
index: -1,
|
|
1884
1884
|
record: {}
|
|
1885
1885
|
});
|
|
1886
1886
|
function d() {
|
|
1887
1887
|
Object.keys(a.value.record).length !== 0 && (e("row-edit", ve(a.value)), a.value.record = {});
|
|
1888
1888
|
}
|
|
1889
|
-
function
|
|
1889
|
+
function i(b) {
|
|
1890
1890
|
a.value.index !== -1 && a.value.index !== b && d(), a.value.index = b;
|
|
1891
1891
|
}
|
|
1892
|
-
function
|
|
1893
|
-
|
|
1892
|
+
function s(b, h) {
|
|
1893
|
+
i(b), h.field !== void 0 && (a.value.record[h.field] = h.value);
|
|
1894
1894
|
}
|
|
1895
|
-
function
|
|
1895
|
+
function r(b) {
|
|
1896
1896
|
if (b !== void 0) {
|
|
1897
1897
|
const { [b]: h, ...$ } = a.value.record;
|
|
1898
1898
|
a.value.record = {
|
|
@@ -1900,7 +1900,7 @@ const ia = {
|
|
|
1900
1900
|
}, e("row-edit-cancelled", ve(a.value));
|
|
1901
1901
|
}
|
|
1902
1902
|
}
|
|
1903
|
-
const u =
|
|
1903
|
+
const u = I({});
|
|
1904
1904
|
ae(() => l.data, () => {
|
|
1905
1905
|
var b, h;
|
|
1906
1906
|
return u.value = Object.fromEntries(((h = (b = l.data) == null ? void 0 : b.results) == null ? void 0 : h.map(($, T) => [
|
|
@@ -1946,12 +1946,12 @@ const ia = {
|
|
|
1946
1946
|
b.editMode || c(O, T, L);
|
|
1947
1947
|
},
|
|
1948
1948
|
onCellFocus: (L) => {
|
|
1949
|
-
|
|
1949
|
+
i(O);
|
|
1950
1950
|
},
|
|
1951
1951
|
onCellEdit: (L) => {
|
|
1952
|
-
|
|
1952
|
+
s(O, L);
|
|
1953
1953
|
},
|
|
1954
|
-
onCellUndo:
|
|
1954
|
+
onCellUndo: r
|
|
1955
1955
|
}, Ie({ _: 2 }, [
|
|
1956
1956
|
de(b.$slots, (L, D) => ({
|
|
1957
1957
|
name: D,
|
|
@@ -1964,16 +1964,16 @@ const ia = {
|
|
|
1964
1964
|
colspan: b.columns.length
|
|
1965
1965
|
}, [
|
|
1966
1966
|
f("div", ba, [
|
|
1967
|
-
f("strong", ha,
|
|
1967
|
+
f("strong", ha, V(g(n)("grid.noData")), 1),
|
|
1968
1968
|
b.request.filters.some((T) => T.filterValue !== "") ? (p(), v("div", ya, [
|
|
1969
|
-
f("div", wa,
|
|
1969
|
+
f("div", wa, V(g(n)("grid.noDataFiltersPresent")), 1),
|
|
1970
1970
|
q(ye, {
|
|
1971
1971
|
size: "small",
|
|
1972
1972
|
colour: "danger",
|
|
1973
1973
|
onClick: h[0] || (h[0] = ne((T) => b.$emit("clear-filters"), ["prevent"]))
|
|
1974
1974
|
}, {
|
|
1975
1975
|
default: A(() => [
|
|
1976
|
-
ce(
|
|
1976
|
+
ce(V(g(n)("grid.clearFilters")), 1)
|
|
1977
1977
|
]),
|
|
1978
1978
|
_: 1
|
|
1979
1979
|
})
|
|
@@ -2006,7 +2006,7 @@ const ia = {
|
|
|
2006
2006
|
}),
|
|
2007
2007
|
emits: /* @__PURE__ */ me(["focus", "blur", "keySinglePress"], ["update:modelValue"]),
|
|
2008
2008
|
setup(t, { expose: o, emit: l }) {
|
|
2009
|
-
const e = t,
|
|
2009
|
+
const e = t, n = $e(t, "modelValue"), a = l, d = I(0), i = I(), s = I(), { isOutside: r } = gt(s), { focused: u } = vt(i), c = S(() => e.showArrows && r.value === !1);
|
|
2010
2010
|
ae(u, () => {
|
|
2011
2011
|
u.value ? (O.value = ta(D.value, {
|
|
2012
2012
|
locale: e.locale
|
|
@@ -2021,13 +2021,13 @@ const ia = {
|
|
|
2021
2021
|
})), b = S(() => e.format ? ml(e.format, {
|
|
2022
2022
|
locale: e.locale,
|
|
2023
2023
|
additionalOptions: m.value
|
|
2024
|
-
}) : m.value), h = S(() => Math.pow(10, b.value.maximumFractionDigits ?? 0)), $ = S(() => Math.pow(10, e.format === te.PERCENTAGE ? 2 : 0)), T = S(() => h.value * $.value), O =
|
|
2025
|
-
ae(
|
|
2024
|
+
}) : m.value), h = S(() => Math.pow(10, b.value.maximumFractionDigits ?? 0)), $ = S(() => Math.pow(10, e.format === te.PERCENTAGE ? 2 : 0)), T = S(() => h.value * $.value), O = I(void 0);
|
|
2025
|
+
ae(n, () => O.value = void 0);
|
|
2026
2026
|
const L = S({
|
|
2027
|
-
get: () => O.value ? J(O.value) :
|
|
2027
|
+
get: () => O.value ? J(O.value) : n.value,
|
|
2028
2028
|
set: (k) => O.value = E(k)
|
|
2029
2029
|
}), D = S({
|
|
2030
|
-
get: () => O.value ?? E(
|
|
2030
|
+
get: () => O.value ?? E(n.value),
|
|
2031
2031
|
set: (k) => O.value = k
|
|
2032
2032
|
});
|
|
2033
2033
|
function W(k) {
|
|
@@ -2035,10 +2035,10 @@ const ia = {
|
|
|
2035
2035
|
}
|
|
2036
2036
|
function Y(k, R) {
|
|
2037
2037
|
if (e.allowEmpty && k === "")
|
|
2038
|
-
|
|
2038
|
+
n.value = null;
|
|
2039
2039
|
else if (k !== "") {
|
|
2040
2040
|
let w = typeof k == "number" ? k : J(k);
|
|
2041
|
-
R && e.format === te.PERCENTAGE && (w = w / $.value), isNaN(w) === !1 && (
|
|
2041
|
+
R && e.format === te.PERCENTAGE && (w = w / $.value), isNaN(w) === !1 && (n.value = W(Math.round(w * T.value) / T.value));
|
|
2042
2042
|
}
|
|
2043
2043
|
}
|
|
2044
2044
|
function E(k) {
|
|
@@ -2058,16 +2058,16 @@ const ia = {
|
|
|
2058
2058
|
Y(R, !1);
|
|
2059
2059
|
}
|
|
2060
2060
|
return Qe(!0, (k) => Re(() => a("keySinglePress", k.key)), {
|
|
2061
|
-
target:
|
|
2061
|
+
target: s,
|
|
2062
2062
|
dedupe: !0
|
|
2063
2063
|
}), o({
|
|
2064
2064
|
focus: () => {
|
|
2065
2065
|
var k;
|
|
2066
|
-
return (k =
|
|
2066
|
+
return (k = s.value) == null ? void 0 : k.focus();
|
|
2067
2067
|
},
|
|
2068
2068
|
blur: () => {
|
|
2069
2069
|
var k;
|
|
2070
|
-
return (k =
|
|
2070
|
+
return (k = s.value) == null ? void 0 : k.blur();
|
|
2071
2071
|
}
|
|
2072
2072
|
}), (k, R) => {
|
|
2073
2073
|
const w = Me("icon");
|
|
@@ -2078,12 +2078,12 @@ const ia = {
|
|
|
2078
2078
|
default: A(() => [
|
|
2079
2079
|
f("div", {
|
|
2080
2080
|
ref_key: "focusWithinRef",
|
|
2081
|
-
ref:
|
|
2081
|
+
ref: i,
|
|
2082
2082
|
class: "cl-relative cl-w-full"
|
|
2083
2083
|
}, [
|
|
2084
2084
|
(p(), v("input", ee(k.$attrs, {
|
|
2085
2085
|
ref_key: "inputRef",
|
|
2086
|
-
ref:
|
|
2086
|
+
ref: s,
|
|
2087
2087
|
key: d.value,
|
|
2088
2088
|
value: D.value,
|
|
2089
2089
|
class: "cl-bg-white cl-border cl-border-grey-2 cl-outline-none cl-p-1 cl-px-2 cl-rounded-lg cl-transition-colors disabled:cl-bg-grey-1 disabled:cl-border-grey-2 disabled:cl-placeholder-grey-3 focus-within:cl-border-link-light hover:cl-border-grey-3",
|
|
@@ -2151,7 +2151,7 @@ const ia = {
|
|
|
2151
2151
|
},
|
|
2152
2152
|
emits: ["update:request"],
|
|
2153
2153
|
setup(t, { emit: o }) {
|
|
2154
|
-
const l = t, e = o, { t:
|
|
2154
|
+
const l = t, e = o, { t: n } = ue(), a = S(() => {
|
|
2155
2155
|
var u;
|
|
2156
2156
|
return l.data !== null ? Math.ceil((((u = l.data) == null ? void 0 : u.totalRecords) ?? 0) / l.request.pageSize) : 1;
|
|
2157
2157
|
}), d = S(() => {
|
|
@@ -2163,13 +2163,13 @@ const ia = {
|
|
|
2163
2163
|
}
|
|
2164
2164
|
return c;
|
|
2165
2165
|
});
|
|
2166
|
-
function
|
|
2167
|
-
if (l.showUnsavedChangesWarning === !1 || window.confirm(
|
|
2166
|
+
function i(u) {
|
|
2167
|
+
if (l.showUnsavedChangesWarning === !1 || window.confirm(n("grid.unsavedChangesWarningMessage"))) {
|
|
2168
2168
|
const c = ve(l.request);
|
|
2169
2169
|
u ?? (u = 1), c.pageNumber !== u && (c.pageNumber = Math.max(Math.min(Math.trunc(u), a.value), 1), e("update:request", c));
|
|
2170
2170
|
}
|
|
2171
2171
|
}
|
|
2172
|
-
const
|
|
2172
|
+
const s = [
|
|
2173
2173
|
5,
|
|
2174
2174
|
10,
|
|
2175
2175
|
20,
|
|
@@ -2177,8 +2177,8 @@ const ia = {
|
|
|
2177
2177
|
100,
|
|
2178
2178
|
200
|
|
2179
2179
|
];
|
|
2180
|
-
function
|
|
2181
|
-
if (l.showUnsavedChangesWarning === !1 || window.confirm(
|
|
2180
|
+
function r(u) {
|
|
2181
|
+
if (l.showUnsavedChangesWarning === !1 || window.confirm(n("grid.unsavedChangesWarningMessage"))) {
|
|
2182
2182
|
const c = ve(l.request);
|
|
2183
2183
|
c.pageSize = u, c.pageNumber = 1, e("update:request", c);
|
|
2184
2184
|
}
|
|
@@ -2187,7 +2187,7 @@ const ia = {
|
|
|
2187
2187
|
var m, b;
|
|
2188
2188
|
return (b = (m = u.data) == null ? void 0 : m.results) != null && b.length && u.request ? (p(), v("div", qa, [
|
|
2189
2189
|
f("div", Oa, [
|
|
2190
|
-
f("span", Da,
|
|
2190
|
+
f("span", Da, V(g(n)("grid.jumpToPage")), 1),
|
|
2191
2191
|
q(Ze, {
|
|
2192
2192
|
"model-value": u.request.pageNumber,
|
|
2193
2193
|
class: "cl-ml-1 cl-mt-0.5 cl-text-sm cl-w-full",
|
|
@@ -2195,7 +2195,7 @@ const ia = {
|
|
|
2195
2195
|
max: a.value,
|
|
2196
2196
|
step: 1,
|
|
2197
2197
|
disabled: u.loading,
|
|
2198
|
-
"onUpdate:modelValue":
|
|
2198
|
+
"onUpdate:modelValue": i
|
|
2199
2199
|
}, {
|
|
2200
2200
|
default: A(() => [
|
|
2201
2201
|
Aa
|
|
@@ -2206,13 +2206,13 @@ const ia = {
|
|
|
2206
2206
|
f("div", Ea, [
|
|
2207
2207
|
f("div", Va, [
|
|
2208
2208
|
f("li", Ia, [
|
|
2209
|
-
f("span", Ra,
|
|
2209
|
+
f("span", Ra, V(g(n)("grid.page")), 1)
|
|
2210
2210
|
]),
|
|
2211
2211
|
f("ul", Na, [
|
|
2212
|
-
f("li", Ma,
|
|
2212
|
+
f("li", Ma, V(g(Ae)(u.request.pageNumber)) + " / " + V(g(Ae)(a.value)), 1),
|
|
2213
2213
|
_(f("li", {
|
|
2214
2214
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2215
|
-
onClick: c[0] || (c[0] = (h) =>
|
|
2215
|
+
onClick: c[0] || (c[0] = (h) => i(1))
|
|
2216
2216
|
}, [
|
|
2217
2217
|
q(g(x), {
|
|
2218
2218
|
icon: "ph:caret-double-left",
|
|
@@ -2223,7 +2223,7 @@ const ia = {
|
|
|
2223
2223
|
]),
|
|
2224
2224
|
_(f("li", {
|
|
2225
2225
|
class: "cl-cursor-pointer cl-mt-1 lg:cl-mr-2 mr-1",
|
|
2226
|
-
onClick: c[1] || (c[1] = (h) =>
|
|
2226
|
+
onClick: c[1] || (c[1] = (h) => i(u.request.pageNumber - 1))
|
|
2227
2227
|
}, [
|
|
2228
2228
|
q(g(x), {
|
|
2229
2229
|
icon: "ph:caret-left",
|
|
@@ -2238,11 +2238,11 @@ const ia = {
|
|
|
2238
2238
|
"cl-text-black cl-font-bold": u.request.pageNumber === h,
|
|
2239
2239
|
"cl-text-grey-6": u.request.pageNumber !== h
|
|
2240
2240
|
}]),
|
|
2241
|
-
onClick: (T) =>
|
|
2242
|
-
},
|
|
2241
|
+
onClick: (T) => i(h)
|
|
2242
|
+
}, V(g(Ae)(h)), 11, Ua))), 128)),
|
|
2243
2243
|
_(f("li", {
|
|
2244
2244
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2245
|
-
onClick: c[2] || (c[2] = (h) =>
|
|
2245
|
+
onClick: c[2] || (c[2] = (h) => i(u.request.pageNumber + 1))
|
|
2246
2246
|
}, [
|
|
2247
2247
|
q(g(x), {
|
|
2248
2248
|
icon: "ph:caret-right",
|
|
@@ -2253,7 +2253,7 @@ const ia = {
|
|
|
2253
2253
|
]),
|
|
2254
2254
|
_(f("li", {
|
|
2255
2255
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2256
|
-
onClick: c[3] || (c[3] = (h) =>
|
|
2256
|
+
onClick: c[3] || (c[3] = (h) => i(a.value))
|
|
2257
2257
|
}, [
|
|
2258
2258
|
q(g(x), {
|
|
2259
2259
|
icon: "ph:caret-double-right",
|
|
@@ -2265,39 +2265,39 @@ const ia = {
|
|
|
2265
2265
|
])
|
|
2266
2266
|
]),
|
|
2267
2267
|
f("ul", za, [
|
|
2268
|
-
f("li", Ba,
|
|
2269
|
-
(p(), v(X, null, de(
|
|
2268
|
+
f("li", Ba, V(g(n)("grid.pageSize")), 1),
|
|
2269
|
+
(p(), v(X, null, de(s, (h, $) => f("li", {
|
|
2270
2270
|
key: $,
|
|
2271
2271
|
class: z(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2272
2272
|
"cl-text-black cl-font-bold": u.request.pageSize === h,
|
|
2273
2273
|
"cl-text-grey-6": u.request.pageSize !== h
|
|
2274
2274
|
}]),
|
|
2275
|
-
onClick: (T) =>
|
|
2276
|
-
},
|
|
2275
|
+
onClick: (T) => r(h)
|
|
2276
|
+
}, V(g(Ae)(h)), 11, Fa)), 64))
|
|
2277
2277
|
]),
|
|
2278
2278
|
f("ul", La, [
|
|
2279
|
-
f("li", ja,
|
|
2280
|
-
f("li", Pa,
|
|
2279
|
+
f("li", ja, V(g(n)("grid.totalRecords")), 1),
|
|
2280
|
+
f("li", Pa, V(g(Ae)(u.data.totalRecords)), 1)
|
|
2281
2281
|
])
|
|
2282
2282
|
])
|
|
2283
2283
|
])) : M("", !0);
|
|
2284
2284
|
};
|
|
2285
2285
|
}
|
|
2286
2286
|
});
|
|
2287
|
-
function
|
|
2288
|
-
const
|
|
2289
|
-
let a = G.fromJSDate(t, { zone:
|
|
2287
|
+
function Be(t, o, l, e) {
|
|
2288
|
+
const n = e ?? "UTC";
|
|
2289
|
+
let a = G.fromJSDate(t, { zone: n }).setZone(n);
|
|
2290
2290
|
o === "start" ? a = a.startOf("day") : o === "end" && (a = a.endOf("day").set({ millisecond: 0 }));
|
|
2291
2291
|
let d = a.toISO({ includeOffset: l });
|
|
2292
2292
|
return e === null && (d = (d == null ? void 0 : d.replace("Z", "")) ?? null), d;
|
|
2293
2293
|
}
|
|
2294
2294
|
function Gl(t, o, l, e) {
|
|
2295
|
-
let
|
|
2296
|
-
return
|
|
2295
|
+
let n = hl(G.now(), l, e);
|
|
2296
|
+
return n = Yl(o, l, n, e), n = _l(t, l, n, e), n.toJSDate();
|
|
2297
2297
|
}
|
|
2298
|
-
function Wa(t, o, l, e,
|
|
2298
|
+
function Wa(t, o, l, e, n) {
|
|
2299
2299
|
let a = G.fromJSDate(l, { zone: e });
|
|
2300
|
-
return a = Yl(o, e, a,
|
|
2300
|
+
return a = Yl(o, e, a, n), a = _l(t, e, a, n), a.toJSDate();
|
|
2301
2301
|
}
|
|
2302
2302
|
function xl(t, o) {
|
|
2303
2303
|
const l = G.fromObject({
|
|
@@ -2332,39 +2332,39 @@ function vl(t, o) {
|
|
|
2332
2332
|
};
|
|
2333
2333
|
}
|
|
2334
2334
|
function bl(t, o, l, e) {
|
|
2335
|
-
let
|
|
2335
|
+
let n;
|
|
2336
2336
|
if (t && e !== "dateRange")
|
|
2337
|
-
|
|
2337
|
+
n = G.fromISO(t, {
|
|
2338
2338
|
zone: l
|
|
2339
2339
|
});
|
|
2340
2340
|
else if (t && e === "dateRange") {
|
|
2341
2341
|
const a = t;
|
|
2342
|
-
|
|
2342
|
+
n = G.fromISO(a.start, {
|
|
2343
2343
|
zone: l
|
|
2344
2344
|
});
|
|
2345
2345
|
} else
|
|
2346
|
-
o ?
|
|
2346
|
+
o ? n = G.fromISO(o, {
|
|
2347
2347
|
zone: l
|
|
2348
|
-
}) :
|
|
2349
|
-
return
|
|
2348
|
+
}) : n = G.utc().setZone(l);
|
|
2349
|
+
return n;
|
|
2350
2350
|
}
|
|
2351
2351
|
function Kl(t, o) {
|
|
2352
|
-
const l = t.range, e = t.scope === "past" ? -1 : t.scope === "current" ? 0 : 1,
|
|
2352
|
+
const l = t.range, e = t.scope === "past" ? -1 : t.scope === "current" ? 0 : 1, n = G.now().setZone(o).startOf(l).plus({
|
|
2353
2353
|
days: l === "day" ? e : 0,
|
|
2354
2354
|
weeks: l === "week" ? e : 0,
|
|
2355
2355
|
months: l === "month" ? e : 0,
|
|
2356
2356
|
years: l === "year" ? e : 0
|
|
2357
|
-
}), a =
|
|
2357
|
+
}), a = n.endOf(l);
|
|
2358
2358
|
return {
|
|
2359
|
-
start:
|
|
2359
|
+
start: n.toJSDate(),
|
|
2360
2360
|
end: a.toJSDate()
|
|
2361
2361
|
};
|
|
2362
2362
|
}
|
|
2363
2363
|
function Ql(t, o, l) {
|
|
2364
2364
|
let e = "";
|
|
2365
2365
|
if (t && t.start && t.end) {
|
|
2366
|
-
const
|
|
2367
|
-
e = `${
|
|
2366
|
+
const n = G.fromJSDate(t.start).setZone(o).setLocale(l).toLocaleString(G.DATETIME_SHORT), a = G.fromJSDate(t.end).setZone(o).setLocale(l).toLocaleString(G.DATETIME_SHORT);
|
|
2367
|
+
e = `${n} - ${a}`;
|
|
2368
2368
|
}
|
|
2369
2369
|
return e;
|
|
2370
2370
|
}
|
|
@@ -2380,15 +2380,15 @@ function hl(t, o, l) {
|
|
|
2380
2380
|
}
|
|
2381
2381
|
function _l(t, o, l, e) {
|
|
2382
2382
|
if (t) {
|
|
2383
|
-
const
|
|
2384
|
-
l <
|
|
2383
|
+
const n = G.fromISO(t).setZone(o);
|
|
2384
|
+
l < n && (l = hl(n, o, e), l.equals(n) || (e === "date" ? l = l.plus({ days: 1 }) : l = l.plus({ minutes: 1 })));
|
|
2385
2385
|
}
|
|
2386
2386
|
return l;
|
|
2387
2387
|
}
|
|
2388
2388
|
function Yl(t, o, l, e) {
|
|
2389
2389
|
if (t) {
|
|
2390
|
-
const
|
|
2391
|
-
l >
|
|
2390
|
+
const n = G.fromISO(t).setZone(o);
|
|
2391
|
+
l > n && (l = hl(n, o, e), l.equals(n) || (e === "date" ? l = l.minus({ days: 1 }) : l = l.minus({ minutes: 1 })));
|
|
2392
2392
|
}
|
|
2393
2393
|
return l;
|
|
2394
2394
|
}
|
|
@@ -2401,18 +2401,18 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
2401
2401
|
emits: ["quick-date-selected"],
|
|
2402
2402
|
setup(t, { emit: o }) {
|
|
2403
2403
|
const l = o, { t: e } = ue();
|
|
2404
|
-
return (
|
|
2405
|
-
(p(!0), v(X, null, de(
|
|
2406
|
-
var
|
|
2404
|
+
return (n, a) => (p(), v("div", Za, [
|
|
2405
|
+
(p(!0), v(X, null, de(n.dates, (d, i) => {
|
|
2406
|
+
var s, r;
|
|
2407
2407
|
return p(), v("button", {
|
|
2408
|
-
key:
|
|
2408
|
+
key: i,
|
|
2409
2409
|
class: z(["cl-border cl-cursor-pointer cl-py-1 cl-rounded-md cl-text-center", {
|
|
2410
|
-
"cl-bg-primary-lighter cl-bg-opacity-30 cl-border-primary-default cl-font-bold hover:cl-border-primary-darker": ((
|
|
2411
|
-
"cl-border-grey-2 hover:cl-border-grey-3 hover:cl-opacity-95 cl-opacity-60": ((
|
|
2410
|
+
"cl-bg-primary-lighter cl-bg-opacity-30 cl-border-primary-default cl-font-bold hover:cl-border-primary-darker": ((s = n.selectedQuickDate) == null ? void 0 : s.name) === d.name,
|
|
2411
|
+
"cl-border-grey-2 hover:cl-border-grey-3 hover:cl-opacity-95 cl-opacity-60": ((r = n.selectedQuickDate) == null ? void 0 : r.name) !== d.name
|
|
2412
2412
|
}]),
|
|
2413
2413
|
onClick: (u) => l("quick-date-selected", d)
|
|
2414
2414
|
}, [
|
|
2415
|
-
f("span", null,
|
|
2415
|
+
f("span", null, V(g(e)(d.translationKey)), 1)
|
|
2416
2416
|
], 10, Ga);
|
|
2417
2417
|
}), 128))
|
|
2418
2418
|
]));
|
|
@@ -2520,7 +2520,7 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
2520
2520
|
},
|
|
2521
2521
|
emits: ["quick-date-selected"],
|
|
2522
2522
|
setup(t, { emit: o }) {
|
|
2523
|
-
const l = t, e = o, { t:
|
|
2523
|
+
const l = t, e = o, { t: n } = ue(), a = S(() => {
|
|
2524
2524
|
const d = [];
|
|
2525
2525
|
switch (l.scope) {
|
|
2526
2526
|
case "past":
|
|
@@ -2533,29 +2533,29 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
2533
2533
|
d.push(Pe), d.push(Ye), d.push(Je);
|
|
2534
2534
|
break;
|
|
2535
2535
|
default: {
|
|
2536
|
-
const
|
|
2537
|
-
for (const
|
|
2538
|
-
const
|
|
2539
|
-
|
|
2536
|
+
const i = [];
|
|
2537
|
+
for (const s of l.scope) {
|
|
2538
|
+
const r = Jl.find((u) => u.name === s);
|
|
2539
|
+
r && i.push(r);
|
|
2540
2540
|
}
|
|
2541
|
-
d.push(
|
|
2541
|
+
d.push(i);
|
|
2542
2542
|
break;
|
|
2543
2543
|
}
|
|
2544
2544
|
}
|
|
2545
2545
|
return d;
|
|
2546
2546
|
});
|
|
2547
|
-
return (d,
|
|
2548
|
-
f("div", null,
|
|
2549
|
-
(p(!0), v(X, null, de(a.value, (
|
|
2550
|
-
key:
|
|
2547
|
+
return (d, i) => (p(), v("div", Qa, [
|
|
2548
|
+
f("div", null, V(g(n)("quickDates.quickDatesHeader")), 1),
|
|
2549
|
+
(p(!0), v(X, null, de(a.value, (s, r) => (p(), v("div", {
|
|
2550
|
+
key: r,
|
|
2551
2551
|
class: "cl-pt-2"
|
|
2552
2552
|
}, [
|
|
2553
2553
|
q(xa, {
|
|
2554
|
-
dates:
|
|
2554
|
+
dates: s,
|
|
2555
2555
|
"selected-quick-date": d.selectedQuickDate,
|
|
2556
|
-
onQuickDateSelected:
|
|
2556
|
+
onQuickDateSelected: i[0] || (i[0] = (u) => e("quick-date-selected", u))
|
|
2557
2557
|
}, null, 8, ["dates", "selected-quick-date"]),
|
|
2558
|
-
|
|
2558
|
+
r < a.value.length - 1 ? (p(), v("div", _a)) : M("", !0)
|
|
2559
2559
|
]))), 128))
|
|
2560
2560
|
]));
|
|
2561
2561
|
}
|
|
@@ -2570,10 +2570,10 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
2570
2570
|
emits: ["togglePopover", "clear"],
|
|
2571
2571
|
setup(t) {
|
|
2572
2572
|
const { t: o } = ue(), l = S(() => {
|
|
2573
|
-
const { class: e, ...
|
|
2574
|
-
return
|
|
2573
|
+
const { class: e, ...n } = Ml();
|
|
2574
|
+
return n;
|
|
2575
2575
|
});
|
|
2576
|
-
return (e,
|
|
2576
|
+
return (e, n) => {
|
|
2577
2577
|
const a = Me("icon");
|
|
2578
2578
|
return p(), v("div", {
|
|
2579
2579
|
class: z(["cl-border cl-border-grey-1 cl-flex cl-flex-nowrap cl-flex-row cl-overflow-hidden cl-rounded-sm range-input", [
|
|
@@ -2589,7 +2589,7 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
2589
2589
|
"cl-text-primary-darker hover:cl-text-primary-dark": e.dateRangeSelected && !e.disabled
|
|
2590
2590
|
}],
|
|
2591
2591
|
disabled: e.disabled,
|
|
2592
|
-
onClick:
|
|
2592
|
+
onClick: n[0] || (n[0] = (d) => e.$emit("togglePopover"))
|
|
2593
2593
|
}), {
|
|
2594
2594
|
default: A(() => [
|
|
2595
2595
|
q(a, {
|
|
@@ -2609,7 +2609,7 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
2609
2609
|
"cl-text-danger-dark hover:cl-text-danger-default": e.dateRangeSelected && !e.disabled
|
|
2610
2610
|
}]),
|
|
2611
2611
|
disabled: e.disabled,
|
|
2612
|
-
onClick:
|
|
2612
|
+
onClick: n[1] || (n[1] = (d) => e.$emit("clear"))
|
|
2613
2613
|
}, {
|
|
2614
2614
|
default: A(() => [
|
|
2615
2615
|
q(a, {
|
|
@@ -2641,7 +2641,7 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
2641
2641
|
}),
|
|
2642
2642
|
emits: ["update:modelValue"],
|
|
2643
2643
|
setup(t) {
|
|
2644
|
-
const o = t, l = $e(t, "modelValue"), e = S(() => o.timeZone ?? "UTC"),
|
|
2644
|
+
const o = t, l = $e(t, "modelValue"), e = S(() => o.timeZone ?? "UTC"), n = S({
|
|
2645
2645
|
get() {
|
|
2646
2646
|
let $ = null;
|
|
2647
2647
|
return l.value !== null && ($ = {
|
|
@@ -2657,16 +2657,16 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
2657
2657
|
if ($ !== null) {
|
|
2658
2658
|
const T = $;
|
|
2659
2659
|
l.value = {
|
|
2660
|
-
start:
|
|
2661
|
-
end:
|
|
2660
|
+
start: Be(T.start, "start", !1, o.timeZone) ?? "",
|
|
2661
|
+
end: Be(T.end, "end", !1, o.timeZone) ?? ""
|
|
2662
2662
|
};
|
|
2663
2663
|
} else
|
|
2664
2664
|
l.value = null;
|
|
2665
2665
|
}
|
|
2666
|
-
}), { locale: a } = ue(), d = S(() => o.dateFormatLocale ?? a.value),
|
|
2666
|
+
}), { locale: a } = ue(), d = S(() => o.dateFormatLocale ?? a.value), i = S(() => vl(o.disabled, o.popoverPlacement)), s = S(() => bl(l.value, o.initialCalendarDate, e.value, "dateRange")), r = S(() => Ql(n.value, e.value, d.value)), u = I(null), c = I(null);
|
|
2667
2667
|
function m($) {
|
|
2668
2668
|
const T = Kl($, e.value);
|
|
2669
|
-
|
|
2669
|
+
n.value = T, u.value = $, c.value.move(T.start), c.value.hidePopover();
|
|
2670
2670
|
}
|
|
2671
2671
|
const b = Ll("(min-width: 768px)"), h = S(() => b.value ? 2 : 1);
|
|
2672
2672
|
return ($, T) => (p(), j(qe, { "show-required-asterisk": $.required }, {
|
|
@@ -2674,11 +2674,11 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
2674
2674
|
N($.$slots, "default")
|
|
2675
2675
|
]),
|
|
2676
2676
|
default: A(() => [
|
|
2677
|
-
q(g(
|
|
2677
|
+
q(g(ze), {
|
|
2678
2678
|
ref_key: "calendar",
|
|
2679
2679
|
ref: c,
|
|
2680
|
-
modelValue:
|
|
2681
|
-
"onUpdate:modelValue": T[1] || (T[1] = (O) =>
|
|
2680
|
+
modelValue: n.value,
|
|
2681
|
+
"onUpdate:modelValue": T[1] || (T[1] = (O) => n.value = O),
|
|
2682
2682
|
modelModifiers: { range: !0 },
|
|
2683
2683
|
mode: "date",
|
|
2684
2684
|
color: "primary",
|
|
@@ -2686,21 +2686,21 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
2686
2686
|
locale: d.value,
|
|
2687
2687
|
timezone: e.value,
|
|
2688
2688
|
columns: h.value,
|
|
2689
|
-
popover:
|
|
2689
|
+
popover: i.value,
|
|
2690
2690
|
"min-date": $.minDate,
|
|
2691
2691
|
"max-date": $.maxDate,
|
|
2692
|
-
"initial-page":
|
|
2692
|
+
"initial-page": s.value,
|
|
2693
2693
|
onDayclick: T[2] || (T[2] = (O) => u.value = null)
|
|
2694
2694
|
}, {
|
|
2695
2695
|
default: A(({ togglePopover: O }) => [
|
|
2696
2696
|
q(yl, ee($.$attrs, {
|
|
2697
2697
|
required: $.required,
|
|
2698
2698
|
disabled: $.disabled,
|
|
2699
|
-
"date-range-selected": !!
|
|
2700
|
-
title:
|
|
2699
|
+
"date-range-selected": !!n.value,
|
|
2700
|
+
title: r.value,
|
|
2701
2701
|
onTogglePopover: O,
|
|
2702
2702
|
onClear: T[0] || (T[0] = (L) => {
|
|
2703
|
-
|
|
2703
|
+
n.value = null, u.value = null, c.value.hidePopover();
|
|
2704
2704
|
})
|
|
2705
2705
|
}), null, 16, ["required", "disabled", "date-range-selected", "title", "onTogglePopover"])
|
|
2706
2706
|
]),
|
|
@@ -2738,14 +2738,14 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
2738
2738
|
}),
|
|
2739
2739
|
emits: /* @__PURE__ */ me(["focus", "blur"], ["update:modelValue"]),
|
|
2740
2740
|
setup(t, { expose: o }) {
|
|
2741
|
-
const l = t, e = $e(t, "modelValue"), { resizability:
|
|
2741
|
+
const l = t, e = $e(t, "modelValue"), { resizability: n } = Nl(l), a = I();
|
|
2742
2742
|
ae([
|
|
2743
2743
|
e,
|
|
2744
2744
|
a,
|
|
2745
|
-
|
|
2745
|
+
n
|
|
2746
2746
|
], () => {
|
|
2747
2747
|
Re(() => {
|
|
2748
|
-
a.value &&
|
|
2748
|
+
a.value && n.value === "auto" && (a.value.style.height = "auto", d());
|
|
2749
2749
|
});
|
|
2750
2750
|
}, {
|
|
2751
2751
|
immediate: !0
|
|
@@ -2753,53 +2753,53 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
2753
2753
|
function d() {
|
|
2754
2754
|
if (a.value)
|
|
2755
2755
|
if (a.value.scrollHeight === 0) {
|
|
2756
|
-
const
|
|
2757
|
-
if (
|
|
2758
|
-
const
|
|
2759
|
-
|
|
2756
|
+
const i = new IntersectionObserver((s) => {
|
|
2757
|
+
if (s.length > 0 && s[0].target.scrollHeight > 0) {
|
|
2758
|
+
const r = s[0].target;
|
|
2759
|
+
r.style.height = r.scrollHeight + 2 + "px", i.disconnect();
|
|
2760
2760
|
}
|
|
2761
2761
|
});
|
|
2762
|
-
|
|
2762
|
+
i.observe(a.value);
|
|
2763
2763
|
} else
|
|
2764
2764
|
a.value.style.height = a.value.scrollHeight + 2 + "px";
|
|
2765
2765
|
}
|
|
2766
2766
|
return o({
|
|
2767
2767
|
focus: () => {
|
|
2768
|
-
var
|
|
2769
|
-
return (
|
|
2768
|
+
var i;
|
|
2769
|
+
return (i = a.value) == null ? void 0 : i.focus();
|
|
2770
2770
|
},
|
|
2771
2771
|
blur: () => {
|
|
2772
|
-
var
|
|
2773
|
-
return (
|
|
2772
|
+
var i;
|
|
2773
|
+
return (i = a.value) == null ? void 0 : i.blur();
|
|
2774
2774
|
}
|
|
2775
|
-
}), (
|
|
2776
|
-
errors:
|
|
2777
|
-
"show-required-asterisk":
|
|
2775
|
+
}), (i, s) => (p(), j(qe, {
|
|
2776
|
+
errors: i.errors,
|
|
2777
|
+
"show-required-asterisk": i.required
|
|
2778
2778
|
}, Ie({
|
|
2779
2779
|
default: A(() => [
|
|
2780
2780
|
_(f("textarea", ee({
|
|
2781
2781
|
ref_key: "inputRef",
|
|
2782
2782
|
ref: a
|
|
2783
|
-
},
|
|
2784
|
-
"onUpdate:modelValue":
|
|
2783
|
+
}, i.$attrs, {
|
|
2784
|
+
"onUpdate:modelValue": s[0] || (s[0] = (r) => e.value = r),
|
|
2785
2785
|
class: ["cl-bg-white cl-border cl-border-grey-2 cl-outline-none cl-p-1 cl-px-2 cl-rounded-lg cl-transition-colors cl-w-full disabled:cl-bg-grey-1 disabled:cl-border-grey-2 disabled:cl-placeholder-grey-3 focus-within:cl-border-link-light hover:cl-border-grey-3", {
|
|
2786
|
-
"cl-resize-none": g(
|
|
2787
|
-
"cl-resize-y": g(
|
|
2788
|
-
"cl-resize-x": g(
|
|
2789
|
-
"cl-resize": g(
|
|
2786
|
+
"cl-resize-none": g(n) === "none" || g(n) === "auto",
|
|
2787
|
+
"cl-resize-y": g(n) === "vertical",
|
|
2788
|
+
"cl-resize-x": g(n) === "horizontal",
|
|
2789
|
+
"cl-resize": g(n) === "both"
|
|
2790
2790
|
}],
|
|
2791
|
-
onFocus:
|
|
2792
|
-
onBlur:
|
|
2791
|
+
onFocus: s[1] || (s[1] = (r) => i.$emit("focus")),
|
|
2792
|
+
onBlur: s[2] || (s[2] = (r) => i.$emit("blur"))
|
|
2793
2793
|
}), null, 16), [
|
|
2794
2794
|
[dl, e.value]
|
|
2795
2795
|
])
|
|
2796
2796
|
]),
|
|
2797
2797
|
_: 2
|
|
2798
2798
|
}, [
|
|
2799
|
-
|
|
2799
|
+
i.$slots.default ? {
|
|
2800
2800
|
name: "label",
|
|
2801
2801
|
fn: A(() => [
|
|
2802
|
-
N(
|
|
2802
|
+
N(i.$slots, "default")
|
|
2803
2803
|
]),
|
|
2804
2804
|
key: "0"
|
|
2805
2805
|
} : {
|
|
@@ -2829,9 +2829,9 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
2829
2829
|
emits: ["update:modelValue"],
|
|
2830
2830
|
setup(t, { expose: o }) {
|
|
2831
2831
|
Ul((c) => ({
|
|
2832
|
-
"5aa4acec":
|
|
2832
|
+
"5aa4acec": i.value
|
|
2833
2833
|
}));
|
|
2834
|
-
const l = t, e = $e(t, "modelValue"), { t:
|
|
2834
|
+
const l = t, e = $e(t, "modelValue"), { t: n } = ue(), a = I(), d = I(), i = S(() => `${100 * (e.value - l.min) / (l.max - l.min)}%`), s = I(!1), r = bt(e, 50);
|
|
2835
2835
|
function u(c) {
|
|
2836
2836
|
var m;
|
|
2837
2837
|
e.value = c, (m = a.value) == null || m.focus();
|
|
@@ -2857,7 +2857,7 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
2857
2857
|
disabled: c.disabled,
|
|
2858
2858
|
class: "active:cl-bg-grey-0 cl-bg-white cl-border cl-border-grey-2 cl-leading-none cl-min-w-[26px] cl-p-[5px] cl-rounded-full cl-shadow cl-text-xs cl-transition-colors disabled:cl-bg-grey-1 hover:cl-bg-off-white",
|
|
2859
2859
|
onClick: m[0] || (m[0] = (h) => u(c.min))
|
|
2860
|
-
},
|
|
2860
|
+
}, V(g(rl)(c.min, c.precision)), 9, en),
|
|
2861
2861
|
f("div", ln, [
|
|
2862
2862
|
_(f("div", tn, [
|
|
2863
2863
|
_(f("input", ee({
|
|
@@ -2880,9 +2880,9 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
2880
2880
|
{ number: !0 }
|
|
2881
2881
|
]
|
|
2882
2882
|
]),
|
|
2883
|
-
f("div", an,
|
|
2883
|
+
f("div", an, V(g(rl)(g(r), c.precision)), 1)
|
|
2884
2884
|
], 512), [
|
|
2885
|
-
[oe,
|
|
2885
|
+
[oe, s.value === !1]
|
|
2886
2886
|
]),
|
|
2887
2887
|
_(q(Ze, ee({
|
|
2888
2888
|
ref_key: "inputRef",
|
|
@@ -2897,19 +2897,19 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
2897
2897
|
disabled: c.disabled,
|
|
2898
2898
|
max: c.max
|
|
2899
2899
|
}), null, 16, ["modelValue", "min", "precision", "placeholder", "disabled", "max"]), [
|
|
2900
|
-
[oe,
|
|
2900
|
+
[oe, s.value]
|
|
2901
2901
|
])
|
|
2902
2902
|
]),
|
|
2903
2903
|
f("button", {
|
|
2904
2904
|
disabled: c.disabled,
|
|
2905
2905
|
class: "active:cl-bg-grey-0 cl-bg-white cl-border cl-border-grey-2 cl-leading-none cl-min-w-[26px] cl-p-[5px] cl-rounded-full cl-shadow cl-text-xs cl-transition-colors disabled:cl-bg-grey-1 hover:cl-bg-off-white",
|
|
2906
2906
|
onClick: m[3] || (m[3] = (h) => u(c.max))
|
|
2907
|
-
},
|
|
2907
|
+
}, V(g(rl)(c.max, c.precision)), 9, nn),
|
|
2908
2908
|
f("button", {
|
|
2909
2909
|
disabled: c.disabled,
|
|
2910
2910
|
class: "active:cl-bg-grey-0 cl-bg-white cl-border cl-border-grey-2 cl-leading-none cl-min-w-0 cl-p-[5px] cl-rounded-full cl-shadow cl-text-xs cl-transition-colors disabled:cl-bg-grey-1 hover:cl-bg-off-white",
|
|
2911
|
-
title: g(
|
|
2912
|
-
onClick: m[4] || (m[4] = (h) =>
|
|
2911
|
+
title: g(n)("input.switchInputMode"),
|
|
2912
|
+
onClick: m[4] || (m[4] = (h) => s.value = !s.value)
|
|
2913
2913
|
}, [
|
|
2914
2914
|
q(b, { icon: "ph:arrows-left-right-thin" })
|
|
2915
2915
|
], 8, rn)
|
|
@@ -2963,61 +2963,61 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
2963
2963
|
},
|
|
2964
2964
|
emits: ["clear", "reset", "togglePopover"],
|
|
2965
2965
|
setup(t, { expose: o }) {
|
|
2966
|
-
const l = t, e =
|
|
2967
|
-
function
|
|
2968
|
-
var
|
|
2969
|
-
(
|
|
2966
|
+
const l = t, e = I(null);
|
|
2967
|
+
function n() {
|
|
2968
|
+
var i;
|
|
2969
|
+
(i = e.value) == null || i.focus();
|
|
2970
2970
|
}
|
|
2971
2971
|
const { t: a } = ue(), d = S(() => {
|
|
2972
|
-
let
|
|
2972
|
+
let i = "";
|
|
2973
2973
|
switch (l.type) {
|
|
2974
2974
|
case "date":
|
|
2975
|
-
|
|
2975
|
+
i = a("calendar.datePlaceholder");
|
|
2976
2976
|
break;
|
|
2977
2977
|
case "datetime":
|
|
2978
|
-
|
|
2978
|
+
i = a("calendar.dateTimePlaceholder");
|
|
2979
2979
|
break;
|
|
2980
2980
|
case "time":
|
|
2981
|
-
|
|
2981
|
+
i = a("calendar.timePlaceholder");
|
|
2982
2982
|
break;
|
|
2983
2983
|
}
|
|
2984
|
-
return l.placeholder ??
|
|
2984
|
+
return l.placeholder ?? i;
|
|
2985
2985
|
});
|
|
2986
2986
|
return o({
|
|
2987
|
-
focus:
|
|
2988
|
-
}), (
|
|
2989
|
-
disabled: !!
|
|
2990
|
-
required:
|
|
2991
|
-
"date-range-selected": !!
|
|
2992
|
-
onTogglePopover:
|
|
2993
|
-
onClear:
|
|
2987
|
+
focus: n
|
|
2988
|
+
}), (i, s) => i.type === "dateRange" ? (p(), j(g(yl), ee({ key: 0 }, i.$attrs, {
|
|
2989
|
+
disabled: !!i.disabled,
|
|
2990
|
+
required: i.required,
|
|
2991
|
+
"date-range-selected": !!i.rangeSelected,
|
|
2992
|
+
onTogglePopover: s[0] || (s[0] = (r) => i.$emit("togglePopover")),
|
|
2993
|
+
onClear: s[1] || (s[1] = (r) => i.$emit("clear"))
|
|
2994
2994
|
}), null, 16, ["disabled", "required", "date-range-selected"])) : (p(), v("div", dn, [
|
|
2995
2995
|
f("input", ee({
|
|
2996
2996
|
ref_key: "element",
|
|
2997
2997
|
ref: e
|
|
2998
|
-
},
|
|
2999
|
-
value:
|
|
2998
|
+
}, i.$attrs, {
|
|
2999
|
+
value: i.date,
|
|
3000
3000
|
type: "text",
|
|
3001
|
-
disabled:
|
|
3001
|
+
disabled: i.disabled,
|
|
3002
3002
|
placeholder: d.value
|
|
3003
|
-
}, it(
|
|
3003
|
+
}, it(i.events, !0)), null, 16, pn),
|
|
3004
3004
|
q(g(x), {
|
|
3005
3005
|
class: "cl-absolute cl-bg-transparent cl-cursor-text cl-left-2 cl-text-grey-4 cl-top-3.5 icon",
|
|
3006
|
-
icon:
|
|
3007
|
-
onClick:
|
|
3006
|
+
icon: i.type === "time" ? "ph-clock" : "ph:calendar",
|
|
3007
|
+
onClick: n
|
|
3008
3008
|
}, null, 8, ["icon"]),
|
|
3009
|
-
|
|
3010
|
-
|
|
3009
|
+
i.disabled ? M("", !0) : (p(), v("div", fn, [
|
|
3010
|
+
i.type !== "time" ? (p(), j(g(x), {
|
|
3011
3011
|
key: 0,
|
|
3012
3012
|
class: "cl-cursor-pointer hover:cl-text-link-light",
|
|
3013
3013
|
icon: "ph:arrow-counter-clockwise",
|
|
3014
|
-
onClick:
|
|
3014
|
+
onClick: s[2] || (s[2] = ne((r) => i.$emit("reset"), ["prevent"]))
|
|
3015
3015
|
})) : M("", !0),
|
|
3016
|
-
!
|
|
3016
|
+
!i.required && i.date && (i.type !== "time" || i.date !== "00:00") ? (p(), j(g(x), {
|
|
3017
3017
|
key: 1,
|
|
3018
3018
|
class: "cl-cursor-pointer clear-icon hover:cl-text-link-light md:cl-ml-0.5",
|
|
3019
3019
|
icon: "ph:x",
|
|
3020
|
-
onClick:
|
|
3020
|
+
onClick: s[3] || (s[3] = ne((r) => i.$emit("clear"), ["prevent"]))
|
|
3021
3021
|
})) : M("", !0)
|
|
3022
3022
|
]))
|
|
3023
3023
|
]));
|
|
@@ -3042,22 +3042,22 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
3042
3042
|
}),
|
|
3043
3043
|
emits: /* @__PURE__ */ me(["focus"], ["update:modelValue"]),
|
|
3044
3044
|
setup(t, { expose: o, emit: l }) {
|
|
3045
|
-
const e = t,
|
|
3045
|
+
const e = t, n = $e(t, "modelValue"), a = l, d = S(() => e.timeZone ?? "UTC"), i = S({
|
|
3046
3046
|
get() {
|
|
3047
3047
|
let h = null;
|
|
3048
|
-
return e.type === "time" ? h =
|
|
3048
|
+
return e.type === "time" ? h = n.value === null ? "00:00" : n.value : n.value !== null && (h = G.fromISO(n.value, {
|
|
3049
3049
|
zone: d.value
|
|
3050
3050
|
}).toJSDate()), h;
|
|
3051
3051
|
},
|
|
3052
3052
|
set(h) {
|
|
3053
|
-
e.type === "time" ?
|
|
3053
|
+
e.type === "time" ? n.value = h : h !== null ? n.value = Be(h, null, !0, e.timeZone) : n.value = null;
|
|
3054
3054
|
}
|
|
3055
|
-
}), { locale:
|
|
3055
|
+
}), { locale: s } = ue(), r = S(() => e.dateFormatLocale ?? s.value), u = S(() => vl(e.disabled, e.popoverPlacement)), c = S(() => xl(r.value, e.type)), m = I(null), b = S(() => bl(n.value, e.initialCalendarDate, d.value, e.type));
|
|
3056
3056
|
return ae(() => [
|
|
3057
3057
|
e.minDate,
|
|
3058
3058
|
e.maxDate
|
|
3059
3059
|
], () => {
|
|
3060
|
-
e.type !== "time" && (
|
|
3060
|
+
e.type !== "time" && (i.value instanceof Date || i.value === null) && (i.value = Wa(e.minDate, e.maxDate, i.value, d.value, e.type));
|
|
3061
3061
|
}), o({
|
|
3062
3062
|
focus() {
|
|
3063
3063
|
var h;
|
|
@@ -3068,13 +3068,13 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
3068
3068
|
N(h.$slots, "default")
|
|
3069
3069
|
]),
|
|
3070
3070
|
default: A(() => [
|
|
3071
|
-
h.type === "time" ? (p(), j(g(
|
|
3071
|
+
h.type === "time" ? (p(), j(g(ze), {
|
|
3072
3072
|
key: 0,
|
|
3073
|
-
modelValue:
|
|
3074
|
-
"onUpdate:modelValue": $[1] || ($[1] = (T) =>
|
|
3073
|
+
modelValue: i.value,
|
|
3074
|
+
"onUpdate:modelValue": $[1] || ($[1] = (T) => i.value = T),
|
|
3075
3075
|
modelModifiers: { string: !0 },
|
|
3076
|
-
locale: g(
|
|
3077
|
-
is24hr: g(
|
|
3076
|
+
locale: g(s),
|
|
3077
|
+
is24hr: g(s) !== "en-US",
|
|
3078
3078
|
mode: h.type,
|
|
3079
3079
|
"is-required": h.required,
|
|
3080
3080
|
"update-on-input": !1,
|
|
@@ -3094,16 +3094,16 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
3094
3094
|
placeholder: h.placeholder,
|
|
3095
3095
|
required: h.required,
|
|
3096
3096
|
disabled: h.disabled,
|
|
3097
|
-
onClear: $[0] || ($[0] = (L) =>
|
|
3097
|
+
onClear: $[0] || ($[0] = (L) => i.value = null)
|
|
3098
3098
|
}), null, 16, ["date", "events", "type", "placeholder", "required", "disabled"])
|
|
3099
3099
|
]),
|
|
3100
3100
|
_: 1
|
|
3101
|
-
}, 8, ["modelValue", "locale", "is24hr", "mode", "is-required", "masks", "popover"])) : (p(), j(g(
|
|
3101
|
+
}, 8, ["modelValue", "locale", "is24hr", "mode", "is-required", "masks", "popover"])) : (p(), j(g(ze), {
|
|
3102
3102
|
key: 1,
|
|
3103
|
-
modelValue:
|
|
3104
|
-
"onUpdate:modelValue": $[4] || ($[4] = (T) =>
|
|
3105
|
-
locale: g(
|
|
3106
|
-
is24hr: g(
|
|
3103
|
+
modelValue: i.value,
|
|
3104
|
+
"onUpdate:modelValue": $[4] || ($[4] = (T) => i.value = T),
|
|
3105
|
+
locale: g(s),
|
|
3106
|
+
is24hr: g(s) !== "en-US",
|
|
3107
3107
|
timezone: d.value,
|
|
3108
3108
|
mode: h.type,
|
|
3109
3109
|
"min-date": h.minDate,
|
|
@@ -3127,8 +3127,8 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
3127
3127
|
placeholder: h.placeholder,
|
|
3128
3128
|
required: h.required,
|
|
3129
3129
|
disabled: h.disabled,
|
|
3130
|
-
onClear: $[2] || ($[2] = (L) =>
|
|
3131
|
-
onReset: $[3] || ($[3] = (L) =>
|
|
3130
|
+
onClear: $[2] || ($[2] = (L) => i.value = null),
|
|
3131
|
+
onReset: $[3] || ($[3] = (L) => i.value = g(Gl)(h.minDate, h.maxDate, d.value, h.type))
|
|
3132
3132
|
}), null, 16, ["date", "events", "type", "placeholder", "required", "disabled"])
|
|
3133
3133
|
]),
|
|
3134
3134
|
_: 1
|
|
@@ -3137,7 +3137,7 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
3137
3137
|
_: 3
|
|
3138
3138
|
}, 8, ["show-required-asterisk"]));
|
|
3139
3139
|
}
|
|
3140
|
-
}),
|
|
3140
|
+
}), Xe = /* @__PURE__ */ F({
|
|
3141
3141
|
inheritAttrs: !1,
|
|
3142
3142
|
__name: "cl-ui-select-input",
|
|
3143
3143
|
emits: ["toggleModal"],
|
|
@@ -3151,7 +3151,7 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
3151
3151
|
}), gn = { class: "cl-relative cl-w-full" }, vn = { class: "cl-overflow-hidden cl-text-ellipsis cl-w-full cl-whitespace-nowrap" }, bn = {
|
|
3152
3152
|
key: 0,
|
|
3153
3153
|
class: "cl-text-grey-3"
|
|
3154
|
-
}, hn = { key: 1 }, yn = ["disabled"], sl = /* @__PURE__ */ F({
|
|
3154
|
+
}, hn = { key: 1 }, yn = { key: 2 }, wn = ["disabled"], sl = /* @__PURE__ */ F({
|
|
3155
3155
|
inheritAttrs: !1,
|
|
3156
3156
|
__name: "cl-ui-select",
|
|
3157
3157
|
props: /* @__PURE__ */ me({
|
|
@@ -3159,78 +3159,81 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
3159
3159
|
disabled: { type: Boolean, default: !1 },
|
|
3160
3160
|
placeholder: { default: null },
|
|
3161
3161
|
canClear: { type: Boolean, default: !1 },
|
|
3162
|
-
errors: { default:
|
|
3162
|
+
errors: { default: null }
|
|
3163
3163
|
}, {
|
|
3164
3164
|
modelValue: { required: !0 },
|
|
3165
3165
|
modelModifiers: {}
|
|
3166
3166
|
}),
|
|
3167
3167
|
emits: ["update:modelValue"],
|
|
3168
3168
|
setup(t) {
|
|
3169
|
-
const o = t, l = $e(t, "modelValue"), e =
|
|
3170
|
-
function d(
|
|
3171
|
-
typeof
|
|
3169
|
+
const o = t, l = $e(t, "modelValue"), e = I(), n = I(!1), a = S(() => Array.isArray(l.value));
|
|
3170
|
+
function d(r) {
|
|
3171
|
+
typeof r < "u" ? n.value = r : o.disabled === !1 && (n.value = !n.value);
|
|
3172
3172
|
}
|
|
3173
|
-
function
|
|
3174
|
-
a.value ?
|
|
3175
|
-
function
|
|
3176
|
-
var
|
|
3173
|
+
function i(r) {
|
|
3174
|
+
a.value ? u(r) : o.canClear && l.value === r ? l.value = null : l.value = r, d();
|
|
3175
|
+
function u(c) {
|
|
3176
|
+
var m;
|
|
3177
3177
|
if (Array.isArray(l.value)) {
|
|
3178
|
-
const
|
|
3179
|
-
|
|
3178
|
+
const b = l.value.indexOf(c);
|
|
3179
|
+
b > -1 ? (l.value.length > 1 || o.canClear) && l.value.splice(b, 1) : (m = l.value) == null || m.push(c);
|
|
3180
3180
|
}
|
|
3181
3181
|
}
|
|
3182
3182
|
}
|
|
3183
|
-
|
|
3184
|
-
|
|
3183
|
+
function s(r) {
|
|
3184
|
+
return r.name !== void 0 && r.id !== void 0;
|
|
3185
|
+
}
|
|
3186
|
+
return ll(e, () => n.value ? d(!1) : ""), (r, u) => {
|
|
3187
|
+
const c = Me("icon");
|
|
3185
3188
|
return p(), v("div", {
|
|
3186
3189
|
ref_key: "outsideRef",
|
|
3187
3190
|
ref: e,
|
|
3188
3191
|
class: "cl-w-full"
|
|
3189
3192
|
}, [
|
|
3190
3193
|
q(qe, {
|
|
3191
|
-
"show-required-asterisk":
|
|
3192
|
-
errors:
|
|
3194
|
+
"show-required-asterisk": r.required,
|
|
3195
|
+
errors: r.errors
|
|
3193
3196
|
}, {
|
|
3194
3197
|
label: A(() => [
|
|
3195
|
-
N(
|
|
3198
|
+
N(r.$slots, "label")
|
|
3196
3199
|
]),
|
|
3197
3200
|
default: A(() => [
|
|
3198
3201
|
f("div", gn, [
|
|
3199
|
-
N(
|
|
3200
|
-
a.value === !1 ? (p(), j(
|
|
3202
|
+
N(r.$slots, "input", fe(ge({ selectModalVisible: n.value, toggleSelectModalState: d })), () => [
|
|
3203
|
+
a.value === !1 ? (p(), j(Xe, {
|
|
3201
3204
|
key: 0,
|
|
3202
3205
|
class: z(["cl-border cl-border-grey-2 cl-flex cl-gap-2 cl-items-center cl-justify-between cl-min-h-8 cl-px-2 cl-py-1 cl-rounded-lg cl-select-none cl-transition-colors cl-w-full disabled:cl-bg-grey-1 disabled:cl-border-grey-2 disabled:cl-placeholder-grey-3", {
|
|
3203
|
-
"cl-cursor-pointer cl-bg-white":
|
|
3204
|
-
"cl-border-b-transparent cl-rounded-b-none":
|
|
3205
|
-
"cl-bg-off-white":
|
|
3206
|
+
"cl-cursor-pointer cl-bg-white": r.disabled === !1,
|
|
3207
|
+
"cl-border-b-transparent cl-rounded-b-none": n.value,
|
|
3208
|
+
"cl-bg-off-white": r.disabled
|
|
3206
3209
|
}]),
|
|
3207
3210
|
onToggleModal: d
|
|
3208
3211
|
}, {
|
|
3209
3212
|
default: A(() => [
|
|
3210
3213
|
f("div", vn, [
|
|
3211
|
-
l.value === null || l.value === void 0 ? (p(), v("span", bn,
|
|
3214
|
+
l.value === null || l.value === void 0 ? (p(), v("span", bn, V(r.placeholder), 1)) : s(l.value) ? (p(), v("span", hn, V(l.value.name), 1)) : (p(), v("span", yn, V(l.value), 1))
|
|
3212
3215
|
]),
|
|
3213
3216
|
f("div", {
|
|
3214
3217
|
class: "cl-flex cl-items-center cl-relative cl-text-grey-3 cl-z-10",
|
|
3215
|
-
disabled:
|
|
3218
|
+
disabled: r.disabled
|
|
3216
3219
|
}, [
|
|
3217
|
-
q(
|
|
3218
|
-
icon:
|
|
3220
|
+
q(c, {
|
|
3221
|
+
icon: n.value ? "ph:caret-up-bold" : "ph:caret-down-bold"
|
|
3219
3222
|
}, null, 8, ["icon"])
|
|
3220
|
-
], 8,
|
|
3223
|
+
], 8, wn)
|
|
3221
3224
|
]),
|
|
3222
3225
|
_: 1
|
|
3223
3226
|
}, 8, ["class"])) : M("", !0)
|
|
3224
3227
|
]),
|
|
3225
|
-
|
|
3228
|
+
n.value || a.value ? (p(), v("div", ee({ key: 0 }, r.$attrs, {
|
|
3226
3229
|
class: ["cl-bg-white cl-border cl-border-grey-2 cl-flex cl-flex-col cl-rounded-lg cl-w-full cl-z-20", {
|
|
3227
3230
|
"cl-absolute cl-border-t-0 cl-left-0 cl-rounded-t-none cl-top-8 cl-min-h-20 cl-max-h-56 cl-text-sm": a.value === !1,
|
|
3228
3231
|
"cl-max-h-28": a.value,
|
|
3229
|
-
"cl-overflow-y-auto":
|
|
3230
|
-
"cl-overflow-hidden":
|
|
3232
|
+
"cl-overflow-y-auto": r.disabled === !1,
|
|
3233
|
+
"cl-overflow-hidden": r.disabled
|
|
3231
3234
|
}]
|
|
3232
3235
|
}), [
|
|
3233
|
-
N(
|
|
3236
|
+
N(r.$slots, "default", fe(ge({ select: i })))
|
|
3234
3237
|
], 16)) : M("", !0)
|
|
3235
3238
|
])
|
|
3236
3239
|
]),
|
|
@@ -3239,7 +3242,7 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
3239
3242
|
], 512);
|
|
3240
3243
|
};
|
|
3241
3244
|
}
|
|
3242
|
-
}),
|
|
3245
|
+
}), Ue = /* @__PURE__ */ F({
|
|
3243
3246
|
__name: "cl-ui-select-option",
|
|
3244
3247
|
props: {
|
|
3245
3248
|
isSelected: { type: Boolean, default: !1 },
|
|
@@ -3248,19 +3251,19 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
3248
3251
|
emits: ["select"],
|
|
3249
3252
|
setup(t, { emit: o }) {
|
|
3250
3253
|
const l = o;
|
|
3251
|
-
return (e,
|
|
3254
|
+
return (e, n) => (p(), v("div", {
|
|
3252
3255
|
class: z(["cl-px-2 cl-py-0.5", {
|
|
3253
3256
|
"cl-bg-primary-lighter": e.isSelected && e.disabled === !1,
|
|
3254
3257
|
"hover:cl-bg-link-lighter": e.isSelected === !1 && e.disabled === !1,
|
|
3255
3258
|
"cl-cursor-pointer": e.disabled === !1,
|
|
3256
3259
|
"cl-bg-off-white": e.disabled
|
|
3257
3260
|
}]),
|
|
3258
|
-
onClick:
|
|
3261
|
+
onClick: n[0] || (n[0] = (a) => e.disabled ? null : l("select"))
|
|
3259
3262
|
}, [
|
|
3260
3263
|
N(e.$slots, "default")
|
|
3261
3264
|
], 2));
|
|
3262
3265
|
}
|
|
3263
|
-
}),
|
|
3266
|
+
}), kn = [
|
|
3264
3267
|
"string",
|
|
3265
3268
|
"boolean",
|
|
3266
3269
|
"number",
|
|
@@ -3273,7 +3276,7 @@ const Za = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, Ga = ["onClick"], xa =
|
|
|
3273
3276
|
function ot(t) {
|
|
3274
3277
|
return typeof t.caption == "string" && typeof t.name == "string" && typeof t.type == "string";
|
|
3275
3278
|
}
|
|
3276
|
-
function
|
|
3279
|
+
function $n(t) {
|
|
3277
3280
|
let o = Array.isArray(t);
|
|
3278
3281
|
if (o) {
|
|
3279
3282
|
for (const l of t)
|
|
@@ -3284,12 +3287,12 @@ function kn(t) {
|
|
|
3284
3287
|
}
|
|
3285
3288
|
return o;
|
|
3286
3289
|
}
|
|
3287
|
-
const
|
|
3290
|
+
const Cn = [
|
|
3288
3291
|
"ellipsis",
|
|
3289
3292
|
"wrap-text"
|
|
3290
3293
|
];
|
|
3291
3294
|
var le = /* @__PURE__ */ ((t) => (t[t.CONTAINS = 0] = "CONTAINS", t[t.NOT_CONTAINS = 1] = "NOT_CONTAINS", t[t.EQUAL = 2] = "EQUAL", t[t.NOT_EQUAL = 3] = "NOT_EQUAL", t[t.STARTS_WITH = 4] = "STARTS_WITH", t[t.ENDS_WITH = 5] = "ENDS_WITH", t[t.GREATER_THAN = 6] = "GREATER_THAN", t[t.LESS_THAN = 7] = "LESS_THAN", t[t.EQUAL_OR_GREATER_THAN = 8] = "EQUAL_OR_GREATER_THAN", t[t.EQUAL_OR_LESS_THAN = 9] = "EQUAL_OR_LESS_THAN", t[t.AND_CONTAINS = 10] = "AND_CONTAINS", t))(le || {});
|
|
3292
|
-
const
|
|
3295
|
+
const Tn = [
|
|
3293
3296
|
"equal",
|
|
3294
3297
|
"notequal",
|
|
3295
3298
|
"contains",
|
|
@@ -3302,24 +3305,24 @@ const Cn = [
|
|
|
3302
3305
|
"equalorgreaterthan",
|
|
3303
3306
|
"andcontains"
|
|
3304
3307
|
];
|
|
3305
|
-
function
|
|
3308
|
+
function Sn(t) {
|
|
3306
3309
|
return typeof t.filterOnColumn == "string" && typeof t.filterOperation == "number" && typeof t.filterValue == "string";
|
|
3307
3310
|
}
|
|
3308
|
-
function
|
|
3311
|
+
function qn(t) {
|
|
3309
3312
|
return t === null || typeof t.sortByAscending == "boolean" && typeof t.sortOnColumn == "string";
|
|
3310
3313
|
}
|
|
3311
|
-
function
|
|
3312
|
-
let o = typeof t.filters == "object" && Array.isArray(t.filters) && typeof t.pageNumber == "number" && typeof t.pageSize == "number" && typeof t.sort == "object" &&
|
|
3314
|
+
function On(t) {
|
|
3315
|
+
let o = typeof t.filters == "object" && Array.isArray(t.filters) && typeof t.pageNumber == "number" && typeof t.pageSize == "number" && typeof t.sort == "object" && qn(t.sort);
|
|
3313
3316
|
if (o) {
|
|
3314
3317
|
for (const l of t.filters)
|
|
3315
|
-
if (!
|
|
3318
|
+
if (!Sn(l)) {
|
|
3316
3319
|
o = !1;
|
|
3317
3320
|
break;
|
|
3318
3321
|
}
|
|
3319
3322
|
}
|
|
3320
3323
|
return o;
|
|
3321
3324
|
}
|
|
3322
|
-
function
|
|
3325
|
+
function Dn(t, o) {
|
|
3323
3326
|
let l = typeof t.results == "object" && Array.isArray(t.results) && typeof t.totalRecords == "number";
|
|
3324
3327
|
if (l) {
|
|
3325
3328
|
for (const e of t.results)
|
|
@@ -3330,7 +3333,7 @@ function On(t, o) {
|
|
|
3330
3333
|
}
|
|
3331
3334
|
return l;
|
|
3332
3335
|
}
|
|
3333
|
-
const
|
|
3336
|
+
const An = {
|
|
3334
3337
|
method: "equal",
|
|
3335
3338
|
icon: "mdi:equal",
|
|
3336
3339
|
description: "Equals",
|
|
@@ -3343,12 +3346,12 @@ const Dn = {
|
|
|
3343
3346
|
"list"
|
|
3344
3347
|
],
|
|
3345
3348
|
key: "equal"
|
|
3346
|
-
},
|
|
3349
|
+
}, En = {
|
|
3347
3350
|
method: "contains",
|
|
3348
3351
|
icon: "mdi:format-letter-matches",
|
|
3349
3352
|
description: "Contains",
|
|
3350
3353
|
allowedTypes: ["string"]
|
|
3351
|
-
},
|
|
3354
|
+
}, Vn = {
|
|
3352
3355
|
method: "lessthan",
|
|
3353
3356
|
icon: "mdi:less-than",
|
|
3354
3357
|
description: "Before",
|
|
@@ -3358,7 +3361,7 @@ const Dn = {
|
|
|
3358
3361
|
],
|
|
3359
3362
|
key: "before"
|
|
3360
3363
|
}, Al = [
|
|
3361
|
-
|
|
3364
|
+
En,
|
|
3362
3365
|
{
|
|
3363
3366
|
method: "notcontains",
|
|
3364
3367
|
icon: "mdi:format-letter-spacing-variant",
|
|
@@ -3377,7 +3380,7 @@ const Dn = {
|
|
|
3377
3380
|
description: "Ends with",
|
|
3378
3381
|
allowedTypes: ["string"]
|
|
3379
3382
|
},
|
|
3380
|
-
|
|
3383
|
+
An,
|
|
3381
3384
|
{
|
|
3382
3385
|
method: "notequal",
|
|
3383
3386
|
icon: "mdi:not-equal",
|
|
@@ -3390,7 +3393,7 @@ const Dn = {
|
|
|
3390
3393
|
],
|
|
3391
3394
|
key: "notequal"
|
|
3392
3395
|
},
|
|
3393
|
-
|
|
3396
|
+
Vn,
|
|
3394
3397
|
{
|
|
3395
3398
|
method: "greaterthan",
|
|
3396
3399
|
icon: "mdi:greater-than",
|
|
@@ -3445,7 +3448,7 @@ const Dn = {
|
|
|
3445
3448
|
description: "Less than",
|
|
3446
3449
|
allowedTypes: ["number"]
|
|
3447
3450
|
}
|
|
3448
|
-
],
|
|
3451
|
+
], In = { class: "cl-bg-off-white cl-border-grey-1 cl-border-r cl-flex cl-h-full cl-items-center cl-justify-center cl-rounded-md cl-w-10" }, Rn = { class: "cl-p-2 cl-select-none" }, Nn = ["onClick"], Mn = /* @__PURE__ */ F({
|
|
3449
3452
|
__name: "cl-ui-grid-method-selector",
|
|
3450
3453
|
props: {
|
|
3451
3454
|
filter: {},
|
|
@@ -3455,12 +3458,12 @@ const Dn = {
|
|
|
3455
3458
|
},
|
|
3456
3459
|
emits: ["update:filter"],
|
|
3457
3460
|
setup(t, { emit: o }) {
|
|
3458
|
-
const l = t, e = o, { t:
|
|
3461
|
+
const l = t, e = o, { t: n } = ue(), a = S(() => {
|
|
3459
3462
|
let c = [];
|
|
3460
3463
|
return l.column.type !== "slot" ? c = Al.filter((m) => m.allowedTypes.includes(l.column.type)) : typeof l.column.slotType < "u" && typeof l.column.field < "u" && (c = Al.filter((m) => m.allowedTypes.includes(l.column.slotType))), l.column.type === "date" || l.column.type === "datetime" || l.column.slotType === "date" || l.column.slotType === "datetime" ? c.forEach((m) => {
|
|
3461
|
-
m.description =
|
|
3464
|
+
m.description = n(`grid.${m.key}`);
|
|
3462
3465
|
}) : c.forEach((m) => {
|
|
3463
|
-
m.description =
|
|
3466
|
+
m.description = n(`grid.${m.method}`);
|
|
3464
3467
|
}), c;
|
|
3465
3468
|
}), d = S(() => {
|
|
3466
3469
|
var m;
|
|
@@ -3470,7 +3473,7 @@ const Dn = {
|
|
|
3470
3473
|
return b.method.toLowerCase() === ((h = c == null ? void 0 : c.removeNonAlphanumeric()) == null ? void 0 : h.toLowerCase());
|
|
3471
3474
|
});
|
|
3472
3475
|
});
|
|
3473
|
-
function
|
|
3476
|
+
function i(c) {
|
|
3474
3477
|
let m;
|
|
3475
3478
|
if (l.filter)
|
|
3476
3479
|
m = ve(l.filter), m.filterOperation = le[c.toUpperCase()], m.filterMethod = c.toLowerCase();
|
|
@@ -3485,13 +3488,13 @@ const Dn = {
|
|
|
3485
3488
|
return;
|
|
3486
3489
|
e("update:filter", m);
|
|
3487
3490
|
}
|
|
3488
|
-
const
|
|
3491
|
+
const s = I(), { left: r } = ht(s), u = S(() => r.value / 2 < 208);
|
|
3489
3492
|
return (c, m) => (p(), v("div", {
|
|
3490
3493
|
ref_key: "gridMethodSelectElement",
|
|
3491
|
-
ref:
|
|
3494
|
+
ref: s,
|
|
3492
3495
|
class: "cl-group cl-inline cl-relative cl-w-auto"
|
|
3493
3496
|
}, [
|
|
3494
|
-
f("div",
|
|
3497
|
+
f("div", In, [
|
|
3495
3498
|
d.value ? (p(), j(g(x), {
|
|
3496
3499
|
key: 0,
|
|
3497
3500
|
icon: d.value.icon,
|
|
@@ -3508,7 +3511,7 @@ const Dn = {
|
|
|
3508
3511
|
"cl-left-0": u.value
|
|
3509
3512
|
}])
|
|
3510
3513
|
}, [
|
|
3511
|
-
f("strong",
|
|
3514
|
+
f("strong", Rn, V(g(n)("grid.availableMethods")), 1),
|
|
3512
3515
|
(p(!0), v(X, null, de(a.value, (b, h) => {
|
|
3513
3516
|
var $;
|
|
3514
3517
|
return p(), v("span", {
|
|
@@ -3516,31 +3519,31 @@ const Dn = {
|
|
|
3516
3519
|
class: z(["cl-cursor-pointer cl-px-4 cl-py-1 cl-transition-colors cl-w-full hover:cl-bg-grey-0", {
|
|
3517
3520
|
"cl-bg-primary-default cl-opacity-80": b.method === (($ = d.value) == null ? void 0 : $.method)
|
|
3518
3521
|
}]),
|
|
3519
|
-
onClick: ne((T) =>
|
|
3522
|
+
onClick: ne((T) => i(b.method), ["prevent"])
|
|
3520
3523
|
}, [
|
|
3521
|
-
ce(
|
|
3524
|
+
ce(V(b.description) + " ", 1),
|
|
3522
3525
|
q(g(x), {
|
|
3523
3526
|
icon: b.icon,
|
|
3524
3527
|
class: "cl-float-right cl-text-grey-4 cl-text-sm"
|
|
3525
3528
|
}, null, 8, ["icon"])
|
|
3526
|
-
], 10,
|
|
3529
|
+
], 10, Nn);
|
|
3527
3530
|
}), 128))
|
|
3528
3531
|
], 2)
|
|
3529
3532
|
], 512));
|
|
3530
3533
|
}
|
|
3531
|
-
}), at = (t) => (zl("data-v-e571aad9"), t = t(), Bl(), t),
|
|
3534
|
+
}), at = (t) => (zl("data-v-e571aad9"), t = t(), Bl(), t), Un = {
|
|
3532
3535
|
key: 0,
|
|
3533
3536
|
class: "cl-border cl-border-grey-2 cl-flex cl-overflow-hidden cl-rounded-md lg:cl-overflow-visible"
|
|
3534
|
-
},
|
|
3537
|
+
}, zn = { class: "!cl-h-[2rem] cl-bg-white cl-flex cl-font-normal cl-items-center cl-mb-0 cl-rounded-md cl-w-full" }, Bn = { class: "cl-p-1" }, Fn = ["disabled"], Ln = {
|
|
3535
3538
|
key: 2,
|
|
3536
3539
|
class: "cl-w-full"
|
|
3537
|
-
},
|
|
3540
|
+
}, jn = {
|
|
3538
3541
|
key: 3,
|
|
3539
3542
|
class: "cl-w-full"
|
|
3540
|
-
},
|
|
3543
|
+
}, Pn = /* @__PURE__ */ at(() => /* @__PURE__ */ f("span", null, null, -1)), Hn = {
|
|
3541
3544
|
key: 4,
|
|
3542
3545
|
class: "cl-w-full"
|
|
3543
|
-
},
|
|
3546
|
+
}, Wn = /* @__PURE__ */ at(() => /* @__PURE__ */ f("span", null, null, -1)), Zn = { class: "!cl-h-[2rem] cl-bg-white cl-flex cl-font-normal cl-items-center cl-mb-0 cl-rounded-md cl-w-full" }, Gn = { class: "cl-p-1" }, xn = ["disabled"], Kn = /* @__PURE__ */ F({
|
|
3544
3547
|
__name: "cl-ui-grid-filter",
|
|
3545
3548
|
props: {
|
|
3546
3549
|
loading: { type: Boolean },
|
|
@@ -3552,21 +3555,21 @@ const Dn = {
|
|
|
3552
3555
|
},
|
|
3553
3556
|
emits: ["update:filter", "perform-data-request"],
|
|
3554
3557
|
setup(t, { emit: o }) {
|
|
3555
|
-
const l = t, e = o, { t:
|
|
3558
|
+
const l = t, e = o, { t: n, locale: a } = ue();
|
|
3556
3559
|
function d() {
|
|
3557
3560
|
return l.column.type === "string" || l.column.slotType === "string" ? le.CONTAINS : l.column.type === "datetime" || l.column.slotType === "datetime" || l.column.type === "date" || l.column.slotType === "date" ? le.LESS_THAN : le.EQUAL;
|
|
3558
3561
|
}
|
|
3559
|
-
const
|
|
3562
|
+
const i = S({
|
|
3560
3563
|
get: () => l.filter,
|
|
3561
3564
|
set: (w) => e("update:filter", w)
|
|
3562
|
-
}),
|
|
3565
|
+
}), s = S(() => l.column.type === "date" || l.column.type === "datetime" || l.column.type === "slot" && (l.column.slotType === "date" || l.column.slotType === "datetime")), r = S(() => l.column.type === "dateRange" || l.column.type === "slot" && l.column.slotType === "dateRange"), u = S(() => l.column.type === "list" || l.column.type === "slot" && l.column.slotType === "list"), c = S(() => u.value && l.column.listType === "number"), m = S(() => l.column.format === te.INTEGER ? te.DECIMAL : l.column.format ?? te.DECIMAL), b = S({
|
|
3563
3566
|
get() {
|
|
3564
3567
|
var U, B, P, C, Z, Q, re;
|
|
3565
|
-
let w = (U =
|
|
3568
|
+
let w = (U = i.value) == null ? void 0 : U[0];
|
|
3566
3569
|
if (w) {
|
|
3567
|
-
if (
|
|
3570
|
+
if (s.value) {
|
|
3568
3571
|
if ((((B = l.filter) == null ? void 0 : B.length) ?? 0) > 1) {
|
|
3569
|
-
const ie = (P =
|
|
3572
|
+
const ie = (P = i.value) == null ? void 0 : P.find((y) => y.filterOperation === le.EQUAL_OR_GREATER_THAN), he = (C = i.value) == null ? void 0 : C.find((y) => y.filterOperation === le.LESS_THAN);
|
|
3570
3573
|
ie && he && (w = {
|
|
3571
3574
|
filterOnColumn: l.column.field,
|
|
3572
3575
|
filterOperation: le.EQUAL,
|
|
@@ -3584,8 +3587,8 @@ const Dn = {
|
|
|
3584
3587
|
filterValue: ie.plus({ milliseconds: 1 }).toISO() ?? ""
|
|
3585
3588
|
};
|
|
3586
3589
|
}
|
|
3587
|
-
} else if (
|
|
3588
|
-
const ie = (Q =
|
|
3590
|
+
} else if (r.value && (((Z = l.filter) == null ? void 0 : Z.length) ?? 0) > 1) {
|
|
3591
|
+
const ie = (Q = i.value) == null ? void 0 : Q.find((y) => y.filterOperation === le.EQUAL_OR_GREATER_THAN), he = (re = i.value) == null ? void 0 : re.find((y) => y.filterOperation === le.EQUAL_OR_LESS_THAN);
|
|
3589
3592
|
ie && he && (w = {
|
|
3590
3593
|
filterOnColumn: l.column.field,
|
|
3591
3594
|
filterOperation: le.EQUAL,
|
|
@@ -3601,7 +3604,7 @@ const Dn = {
|
|
|
3601
3604
|
},
|
|
3602
3605
|
set(w) {
|
|
3603
3606
|
let U = null;
|
|
3604
|
-
if (
|
|
3607
|
+
if (s.value) {
|
|
3605
3608
|
const B = w, P = (B == null ? void 0 : B.filterMethod) && $(B.filterMethod, B.filterValue, "equal"), C = (B == null ? void 0 : B.filterMethod) && $(B.filterMethod, B.filterValue, "equalorlessthan"), Z = (B == null ? void 0 : B.filterMethod) && $(B.filterMethod, B.filterValue, "greaterthan");
|
|
3606
3609
|
if (P) {
|
|
3607
3610
|
let Q = G.fromISO(B.filterValue, {
|
|
@@ -3643,7 +3646,7 @@ const Dn = {
|
|
|
3643
3646
|
}
|
|
3644
3647
|
];
|
|
3645
3648
|
}
|
|
3646
|
-
} else if (
|
|
3649
|
+
} else if (r.value && (w != null && w.filterValue)) {
|
|
3647
3650
|
const B = w.filterValue, P = G.fromISO(B.start, {
|
|
3648
3651
|
zone: l.timeZone ?? "UTC"
|
|
3649
3652
|
}).toISO(), C = G.fromISO(B.end, {
|
|
@@ -3668,10 +3671,10 @@ const Dn = {
|
|
|
3668
3671
|
const B = w;
|
|
3669
3672
|
U = B && [B];
|
|
3670
3673
|
}
|
|
3671
|
-
if (U && (
|
|
3674
|
+
if (U && (s.value || r.value))
|
|
3672
3675
|
for (const B of U)
|
|
3673
3676
|
l.timeZone ? B.filterValue = G.fromISO(B.filterValue).setZone("UTC").toISO() ?? "" : B.filterValue = B.filterValue.replace("Z", "");
|
|
3674
|
-
|
|
3677
|
+
i.value = U;
|
|
3675
3678
|
}
|
|
3676
3679
|
}), h = S({
|
|
3677
3680
|
get: () => b.value,
|
|
@@ -3680,7 +3683,7 @@ const Dn = {
|
|
|
3680
3683
|
}
|
|
3681
3684
|
});
|
|
3682
3685
|
function $(w, U, B) {
|
|
3683
|
-
return U !== void 0 && U !== "" && w === B &&
|
|
3686
|
+
return U !== void 0 && U !== "" && w === B && s.value;
|
|
3684
3687
|
}
|
|
3685
3688
|
const T = S(() => {
|
|
3686
3689
|
var w;
|
|
@@ -3737,7 +3740,7 @@ const Dn = {
|
|
|
3737
3740
|
function J(w) {
|
|
3738
3741
|
w === "Enter" && e("perform-data-request");
|
|
3739
3742
|
}
|
|
3740
|
-
const se =
|
|
3743
|
+
const se = I(), k = I();
|
|
3741
3744
|
Qe("Enter", () => e("perform-data-request"), {
|
|
3742
3745
|
target: se,
|
|
3743
3746
|
dedupe: !0
|
|
@@ -3748,7 +3751,7 @@ const Dn = {
|
|
|
3748
3751
|
const R = ul("cl-ui-grid-id") ?? "cl-ui-grid-filter";
|
|
3749
3752
|
return (w, U) => {
|
|
3750
3753
|
const B = Me("icon");
|
|
3751
|
-
return D.value ? (p(), v("div",
|
|
3754
|
+
return D.value ? (p(), v("div", Un, [
|
|
3752
3755
|
w.column.type === "boolean" || w.column.type === "slot" && w.column.slotType === "boolean" ? (p(), j(sl, {
|
|
3753
3756
|
key: 0,
|
|
3754
3757
|
id: "`${gridId}-${column.name}`",
|
|
@@ -3758,10 +3761,10 @@ const Dn = {
|
|
|
3758
3761
|
"onUpdate:modelValue": U[0] || (U[0] = (P) => W(null, P))
|
|
3759
3762
|
}, {
|
|
3760
3763
|
input: A(({ selectModalVisible: P, toggleSelectModalState: C }) => [
|
|
3761
|
-
q(
|
|
3764
|
+
q(Xe, { onToggleModal: C }, {
|
|
3762
3765
|
default: A(() => [
|
|
3763
|
-
f("div",
|
|
3764
|
-
f("span",
|
|
3766
|
+
f("div", zn, [
|
|
3767
|
+
f("span", Bn, V(T.value === "" ? "" : T.value === "true" ? g(n)("grid.true") : g(n)("grid.false")), 1),
|
|
3765
3768
|
f("div", {
|
|
3766
3769
|
class: "cl-absolute cl-flex cl-items-center cl-right-1 cl-text-grey-3 cl-z-10",
|
|
3767
3770
|
disabled: w.loading
|
|
@@ -3769,14 +3772,14 @@ const Dn = {
|
|
|
3769
3772
|
q(B, {
|
|
3770
3773
|
icon: P ? "ph:caret-up-bold" : "ph:caret-down-bold"
|
|
3771
3774
|
}, null, 8, ["icon"])
|
|
3772
|
-
], 8,
|
|
3775
|
+
], 8, Fn)
|
|
3773
3776
|
])
|
|
3774
3777
|
]),
|
|
3775
3778
|
_: 2
|
|
3776
3779
|
}, 1032, ["onToggleModal"])
|
|
3777
3780
|
]),
|
|
3778
3781
|
default: A(({ select: P }) => [
|
|
3779
|
-
q(
|
|
3782
|
+
q(Ue, {
|
|
3780
3783
|
class: "!cl-py-0 cl-text-xs",
|
|
3781
3784
|
onSelect: (C) => P("")
|
|
3782
3785
|
}, {
|
|
@@ -3785,29 +3788,29 @@ const Dn = {
|
|
|
3785
3788
|
]),
|
|
3786
3789
|
_: 2
|
|
3787
3790
|
}, 1032, ["onSelect"]),
|
|
3788
|
-
q(
|
|
3791
|
+
q(Ue, {
|
|
3789
3792
|
"is-selected": T.value === "true",
|
|
3790
3793
|
class: "!cl-py-0 cl-text-xs",
|
|
3791
3794
|
onSelect: (C) => P("true")
|
|
3792
3795
|
}, {
|
|
3793
3796
|
default: A(() => [
|
|
3794
|
-
ce(
|
|
3797
|
+
ce(V(g(n)("grid.true")), 1)
|
|
3795
3798
|
]),
|
|
3796
3799
|
_: 2
|
|
3797
3800
|
}, 1032, ["is-selected", "onSelect"]),
|
|
3798
|
-
q(
|
|
3801
|
+
q(Ue, {
|
|
3799
3802
|
"is-selected": T.value === "false",
|
|
3800
3803
|
class: "!cl-py-0 cl-text-xs",
|
|
3801
3804
|
onSelect: (C) => P("false")
|
|
3802
3805
|
}, {
|
|
3803
3806
|
default: A(() => [
|
|
3804
|
-
ce(
|
|
3807
|
+
ce(V(g(n)("grid.false")), 1)
|
|
3805
3808
|
]),
|
|
3806
3809
|
_: 2
|
|
3807
3810
|
}, 1032, ["is-selected", "onSelect"])
|
|
3808
3811
|
]),
|
|
3809
3812
|
_: 1
|
|
3810
|
-
}, 8, ["disabled", "model-value"])) :
|
|
3813
|
+
}, 8, ["disabled", "model-value"])) : s.value ? (p(), j(tt, {
|
|
3811
3814
|
key: 1,
|
|
3812
3815
|
id: `${g(R)}-${w.column.name}`,
|
|
3813
3816
|
"model-value": O.value,
|
|
@@ -3817,7 +3820,7 @@ const Dn = {
|
|
|
3817
3820
|
class: "!cl-h-[2rem] cl-border-none cl-mb-0 cl-text-xs cl-w-full lg:!cl-text-base readonly-filter",
|
|
3818
3821
|
"popover-placement": "bottom-start",
|
|
3819
3822
|
"onUpdate:modelValue": U[1] || (U[1] = (P) => W(null, P ?? ""))
|
|
3820
|
-
}, null, 8, ["id", "model-value", "time-zone", "readonly", "type"])) :
|
|
3823
|
+
}, null, 8, ["id", "model-value", "time-zone", "readonly", "type"])) : r.value ? (p(), v("div", Ln, [
|
|
3821
3824
|
q(et, {
|
|
3822
3825
|
id: `${g(R)}-${w.column.name}`,
|
|
3823
3826
|
"model-value": L.value,
|
|
@@ -3828,7 +3831,7 @@ const Dn = {
|
|
|
3828
3831
|
"popover-placement": "bottom-start",
|
|
3829
3832
|
"onUpdate:modelValue": U[2] || (U[2] = (P) => E(P))
|
|
3830
3833
|
}, null, 8, ["id", "model-value", "disabled", "time-zone", "quick-date-scope"])
|
|
3831
|
-
])) : w.column.type === "number" || w.column.type === "slot" && w.column.slotType === "number" ? (p(), v("div",
|
|
3834
|
+
])) : w.column.type === "number" || w.column.type === "slot" && w.column.slotType === "number" ? (p(), v("div", jn, [
|
|
3832
3835
|
q(Ze, {
|
|
3833
3836
|
id: `${g(R)}-${w.column.name}`,
|
|
3834
3837
|
"model-value": T.value === "" || isNaN(+T.value) ? null : +T.value,
|
|
@@ -3842,11 +3845,11 @@ const Dn = {
|
|
|
3842
3845
|
onKeySinglePress: J
|
|
3843
3846
|
}, {
|
|
3844
3847
|
default: A(() => [
|
|
3845
|
-
|
|
3848
|
+
Pn
|
|
3846
3849
|
]),
|
|
3847
3850
|
_: 1
|
|
3848
3851
|
}, 8, ["id", "model-value", "format", "precision", "readonly"])
|
|
3849
|
-
])) : w.column.type === "string" || w.column.type === "slot" && w.column.slotType === "string" ? (p(), v("div",
|
|
3852
|
+
])) : w.column.type === "string" || w.column.type === "slot" && w.column.slotType === "string" ? (p(), v("div", Hn, [
|
|
3850
3853
|
q(Ve, {
|
|
3851
3854
|
id: `${g(R)}-${w.column.name}`,
|
|
3852
3855
|
"model-value": T.value,
|
|
@@ -3856,7 +3859,7 @@ const Dn = {
|
|
|
3856
3859
|
onKeySinglePress: J
|
|
3857
3860
|
}, {
|
|
3858
3861
|
default: A(() => [
|
|
3859
|
-
|
|
3862
|
+
Wn
|
|
3860
3863
|
]),
|
|
3861
3864
|
_: 1
|
|
3862
3865
|
}, 8, ["id", "model-value", "readonly"])
|
|
@@ -3869,12 +3872,12 @@ const Dn = {
|
|
|
3869
3872
|
"onUpdate:modelValue": U[5] || (U[5] = (P) => c.value ? Y(null, P) : W(null, P))
|
|
3870
3873
|
}, {
|
|
3871
3874
|
input: A(({ selectModalVisible: P, toggleSelectModalState: C }) => [
|
|
3872
|
-
q(
|
|
3875
|
+
q(Xe, { onToggleModal: C }, {
|
|
3873
3876
|
default: A(() => {
|
|
3874
3877
|
var Z, Q;
|
|
3875
3878
|
return [
|
|
3876
|
-
f("div",
|
|
3877
|
-
f("span",
|
|
3879
|
+
f("div", Zn, [
|
|
3880
|
+
f("span", Gn, V(g(n)(((Q = (Z = w.column.listEntries) == null ? void 0 : Z.find((re) => re.value.toString() === T.value)) == null ? void 0 : Q.translationKey) ?? "")), 1),
|
|
3878
3881
|
f("div", {
|
|
3879
3882
|
class: "cl-absolute cl-flex cl-items-center cl-right-1 cl-text-grey-3 cl-z-10",
|
|
3880
3883
|
disabled: w.loading
|
|
@@ -3882,7 +3885,7 @@ const Dn = {
|
|
|
3882
3885
|
q(B, {
|
|
3883
3886
|
icon: P ? "ph:caret-up-bold" : "ph:caret-down-bold"
|
|
3884
3887
|
}, null, 8, ["icon"])
|
|
3885
|
-
], 8,
|
|
3888
|
+
], 8, xn)
|
|
3886
3889
|
])
|
|
3887
3890
|
];
|
|
3888
3891
|
}),
|
|
@@ -3890,7 +3893,7 @@ const Dn = {
|
|
|
3890
3893
|
}, 1032, ["onToggleModal"])
|
|
3891
3894
|
]),
|
|
3892
3895
|
default: A(({ select: P }) => [
|
|
3893
|
-
q(
|
|
3896
|
+
q(Ue, {
|
|
3894
3897
|
class: "!cl-py-0 cl-text-xs",
|
|
3895
3898
|
onSelect: (C) => P("")
|
|
3896
3899
|
}, {
|
|
@@ -3899,21 +3902,21 @@ const Dn = {
|
|
|
3899
3902
|
]),
|
|
3900
3903
|
_: 2
|
|
3901
3904
|
}, 1032, ["onSelect"]),
|
|
3902
|
-
(p(!0), v(X, null, de(w.column.listEntries ?? [], (C) => (p(), j(
|
|
3905
|
+
(p(!0), v(X, null, de(w.column.listEntries ?? [], (C) => (p(), j(Ue, {
|
|
3903
3906
|
key: C.value,
|
|
3904
3907
|
"is-selected": T.value === C.value.toString(),
|
|
3905
3908
|
class: "!cl-py-0 cl-text-xs",
|
|
3906
3909
|
onSelect: (Z) => P(C.value)
|
|
3907
3910
|
}, {
|
|
3908
3911
|
default: A(() => [
|
|
3909
|
-
ce(
|
|
3912
|
+
ce(V(g(n)(C.translationKey)), 1)
|
|
3910
3913
|
]),
|
|
3911
3914
|
_: 2
|
|
3912
3915
|
}, 1032, ["is-selected", "onSelect"]))), 128))
|
|
3913
3916
|
]),
|
|
3914
3917
|
_: 1
|
|
3915
3918
|
}, 8, ["id", "model-value", "disabled"])) : M("", !0),
|
|
3916
|
-
|
|
3919
|
+
r.value ? M("", !0) : (p(), j(Mn, {
|
|
3917
3920
|
key: 6,
|
|
3918
3921
|
filter: h.value,
|
|
3919
3922
|
"onUpdate:filter": U[6] || (U[6] = (P) => h.value = P),
|
|
@@ -3924,7 +3927,7 @@ const Dn = {
|
|
|
3924
3927
|
])) : M("", !0);
|
|
3925
3928
|
};
|
|
3926
3929
|
}
|
|
3927
|
-
}),
|
|
3930
|
+
}), Qn = /* @__PURE__ */ we(Kn, [["__scopeId", "data-v-e571aad9"]]), _n = { class: "-cl-top-1 cl-bg-white cl-shadow-sm cl-sticky cl-z-20 lg:cl-bg-transparent lg:cl-relative lg:cl-shadow-none" }, Yn = { class: "cl-hidden lg:cl-table-row" }, Jn = ["onClick"], Xn = { class: "cl-flex cl-justify-end cl-w-full lg:cl-hidden" }, er = { class: "cl-col-span-2 lg:cl-hidden" }, lr = ["onClick"], tr = { class: "cl-font-normal cl-mr-1" }, or = /* @__PURE__ */ F({
|
|
3928
3931
|
__name: "cl-ui-grid-header",
|
|
3929
3932
|
props: {
|
|
3930
3933
|
request: {},
|
|
@@ -3936,43 +3939,43 @@ const Dn = {
|
|
|
3936
3939
|
},
|
|
3937
3940
|
emits: ["update:request", "update:filterPanelOpen", "perform-data-request"],
|
|
3938
3941
|
setup(t, { emit: o }) {
|
|
3939
|
-
const l = t, e = o, { t:
|
|
3942
|
+
const l = t, e = o, { t: n } = ue(), a = S({
|
|
3940
3943
|
get: () => l.request,
|
|
3941
|
-
set: (
|
|
3944
|
+
set: (r) => e("update:request", r)
|
|
3942
3945
|
});
|
|
3943
|
-
function d(
|
|
3946
|
+
function d(r, u) {
|
|
3944
3947
|
var c, m;
|
|
3945
|
-
return ((c = a.value.sort) == null ? void 0 : c.sortOnColumn) ===
|
|
3948
|
+
return ((c = a.value.sort) == null ? void 0 : c.sortOnColumn) === r.field && ((m = a.value.sort) == null ? void 0 : m.sortByAscending) === u;
|
|
3946
3949
|
}
|
|
3947
|
-
function
|
|
3948
|
-
if (typeof
|
|
3950
|
+
function i(r) {
|
|
3951
|
+
if (typeof r < "u") {
|
|
3949
3952
|
const u = ve(l.request);
|
|
3950
|
-
u.sort === null || u.sort.sortOnColumn !==
|
|
3951
|
-
sortOnColumn:
|
|
3953
|
+
u.sort === null || u.sort.sortOnColumn !== r ? u.sort = {
|
|
3954
|
+
sortOnColumn: r,
|
|
3952
3955
|
sortByAscending: !0
|
|
3953
|
-
} : u.sort.sortOnColumn ===
|
|
3956
|
+
} : u.sort.sortOnColumn === r && u.sort.sortByAscending === !0 ? u.sort.sortByAscending = !1 : u.sort = null, a.value = u;
|
|
3954
3957
|
}
|
|
3955
3958
|
}
|
|
3956
|
-
function
|
|
3957
|
-
if (
|
|
3959
|
+
function s(r) {
|
|
3960
|
+
if (r) {
|
|
3958
3961
|
const u = ve(a.value);
|
|
3959
3962
|
u.filters = [
|
|
3960
|
-
...u.filters.filter((c) => c.filterOnColumn !==
|
|
3961
|
-
...
|
|
3963
|
+
...u.filters.filter((c) => c.filterOnColumn !== r[0].filterOnColumn),
|
|
3964
|
+
...r
|
|
3962
3965
|
], u.pageNumber = 1, a.value = u;
|
|
3963
3966
|
}
|
|
3964
3967
|
}
|
|
3965
|
-
return (
|
|
3966
|
-
f("tr",
|
|
3967
|
-
(p(!0), v(X, null, de(
|
|
3968
|
+
return (r, u) => (p(), v("thead", _n, [
|
|
3969
|
+
f("tr", Yn, [
|
|
3970
|
+
(p(!0), v(X, null, de(r.columns, (c, m) => (p(), v("th", {
|
|
3968
3971
|
key: m,
|
|
3969
3972
|
class: z(["cl-text-grey-3 cl-text-sm", {
|
|
3970
|
-
"cl-cursor-pointer": g(Ke)(c) &&
|
|
3973
|
+
"cl-cursor-pointer": g(Ke)(c) && r.loading === !1
|
|
3971
3974
|
}]),
|
|
3972
|
-
onClick: (b) => g(Ke)(c) &&
|
|
3975
|
+
onClick: (b) => g(Ke)(c) && r.loading === !1 ? i(c.field) : () => {
|
|
3973
3976
|
}
|
|
3974
3977
|
}, [
|
|
3975
|
-
ce(
|
|
3978
|
+
ce(V(c.caption) + " ", 1),
|
|
3976
3979
|
_(q(g(x), {
|
|
3977
3980
|
class: "cl-inline-block",
|
|
3978
3981
|
icon: "ph:caret-up"
|
|
@@ -3985,34 +3988,34 @@ const Dn = {
|
|
|
3985
3988
|
}, null, 512), [
|
|
3986
3989
|
[oe, d(c, !1)]
|
|
3987
3990
|
])
|
|
3988
|
-
], 10,
|
|
3991
|
+
], 10, Jn))), 128))
|
|
3989
3992
|
]),
|
|
3990
3993
|
f("tr", {
|
|
3991
3994
|
class: z(["cl-border cl-border-grey-2 cl-flex cl-flex-wrap cl-p-2 lg:cl-border-none lg:cl-p-0 lg:cl-table-row", {
|
|
3992
|
-
"cl-hidden lg:cl-table-row": !
|
|
3995
|
+
"cl-hidden lg:cl-table-row": !r.filterPanelOpen
|
|
3993
3996
|
}])
|
|
3994
3997
|
}, [
|
|
3995
|
-
f("div",
|
|
3998
|
+
f("div", Xn, [
|
|
3996
3999
|
q(g(x), {
|
|
3997
4000
|
class: "cl-text-grey-4 hover:cl-cursor-pointer hover:cl-text-link-default",
|
|
3998
4001
|
icon: "ph:x",
|
|
3999
4002
|
size: 16,
|
|
4000
|
-
onClick: u[0] || (u[0] = ne((c) =>
|
|
4003
|
+
onClick: u[0] || (u[0] = ne((c) => r.loading === !1 ? r.$emit("update:filterPanelOpen", !1) : void 0, ["prevent"]))
|
|
4001
4004
|
})
|
|
4002
4005
|
]),
|
|
4003
|
-
(p(!0), v(X, null, de(
|
|
4006
|
+
(p(!0), v(X, null, de(r.columns, (c, m) => (p(), v("th", {
|
|
4004
4007
|
key: m,
|
|
4005
4008
|
class: z(["cl-grid cl-grid-cols-4 cl-py-1 cl-text-xs cl-w-full lg:cl-table-cell lg:cl-w-auto", {
|
|
4006
4009
|
"cl-hidden lg:cl-table-cell": !g(pl)(c)
|
|
4007
4010
|
}])
|
|
4008
4011
|
}, [
|
|
4009
|
-
f("div",
|
|
4012
|
+
f("div", er, V(c.caption), 1),
|
|
4010
4013
|
g(Ke)(c) ? (p(), v("div", {
|
|
4011
4014
|
key: 0,
|
|
4012
4015
|
class: "cl-col-span-2 cl-gap-1 cl-span lg:cl-hidden",
|
|
4013
|
-
onClick: (b) =>
|
|
4016
|
+
onClick: (b) => r.loading === !1 ? i(c.field) : void 0
|
|
4014
4017
|
}, [
|
|
4015
|
-
f("span",
|
|
4018
|
+
f("span", tr, V(g(n)("grid.sortBy")), 1),
|
|
4016
4019
|
d(c, !0) ? (p(), j(g(x), {
|
|
4017
4020
|
key: 0,
|
|
4018
4021
|
class: "cl-cursor-pointer cl-inline-block",
|
|
@@ -4026,23 +4029,23 @@ const Dn = {
|
|
|
4026
4029
|
class: "cl-cursor-pointer cl-inline-block",
|
|
4027
4030
|
icon: "ph:minus"
|
|
4028
4031
|
}))
|
|
4029
|
-
], 8,
|
|
4030
|
-
q(
|
|
4032
|
+
], 8, lr)) : M("", !0),
|
|
4033
|
+
q(Qn, {
|
|
4031
4034
|
class: "cl-col-span-4",
|
|
4032
|
-
loading:
|
|
4035
|
+
loading: r.loading,
|
|
4033
4036
|
filter: a.value.filters.filter((b) => b.filterOnColumn === c.field),
|
|
4034
4037
|
column: c,
|
|
4035
|
-
"time-zone":
|
|
4038
|
+
"time-zone": r.timeZone,
|
|
4036
4039
|
"quick-date-scope": c.quickDateScope ?? null,
|
|
4037
|
-
"header-display-timezone":
|
|
4038
|
-
"onUpdate:filter":
|
|
4040
|
+
"header-display-timezone": r.headerDisplayTimezone,
|
|
4041
|
+
"onUpdate:filter": s,
|
|
4039
4042
|
onPerformDataRequest: u[1] || (u[1] = (b) => e("perform-data-request"))
|
|
4040
4043
|
}, null, 8, ["loading", "filter", "column", "time-zone", "quick-date-scope", "header-display-timezone"])
|
|
4041
4044
|
], 2))), 128))
|
|
4042
4045
|
], 2)
|
|
4043
4046
|
]));
|
|
4044
4047
|
}
|
|
4045
|
-
}),
|
|
4048
|
+
}), ar = { class: "cl-flex cl-mb-2" }, nr = { class: "cl-basis-full cl-grow" }, rr = /* @__PURE__ */ f("span", null, null, -1), sr = /* @__PURE__ */ F({
|
|
4046
4049
|
__name: "cl-ui-grid-search",
|
|
4047
4050
|
props: /* @__PURE__ */ me({
|
|
4048
4051
|
columns: {},
|
|
@@ -4053,42 +4056,42 @@ const Dn = {
|
|
|
4053
4056
|
}),
|
|
4054
4057
|
emits: /* @__PURE__ */ me(["update:request"], ["update:searchValue"]),
|
|
4055
4058
|
setup(t, { emit: o }) {
|
|
4056
|
-
const l = t, e = $e(t, "searchValue"),
|
|
4059
|
+
const l = t, e = $e(t, "searchValue"), n = o, a = S({
|
|
4057
4060
|
get: () => l.request,
|
|
4058
|
-
set: (
|
|
4061
|
+
set: (s) => n("update:request", s)
|
|
4059
4062
|
});
|
|
4060
|
-
function d(
|
|
4061
|
-
const
|
|
4063
|
+
function d(s) {
|
|
4064
|
+
const r = a.value.filters.filter((u) => u.filterMethod !== "andcontains" && u.filterOperation !== le.AND_CONTAINS);
|
|
4062
4065
|
for (const u of l.columns)
|
|
4063
|
-
u.field &&
|
|
4066
|
+
u.field && s && r.push({
|
|
4064
4067
|
filterOnColumn: u.field,
|
|
4065
4068
|
filterMethod: "andcontains",
|
|
4066
4069
|
filterOperation: le.AND_CONTAINS,
|
|
4067
|
-
filterValue:
|
|
4070
|
+
filterValue: s
|
|
4068
4071
|
});
|
|
4069
4072
|
a.value = {
|
|
4070
4073
|
...a.value,
|
|
4071
|
-
filters:
|
|
4072
|
-
}, e.value =
|
|
4074
|
+
filters: r
|
|
4075
|
+
}, e.value = s;
|
|
4073
4076
|
}
|
|
4074
4077
|
ae(() => l.columns, () => d(e.value));
|
|
4075
|
-
const { t:
|
|
4076
|
-
return (
|
|
4078
|
+
const { t: i } = ue();
|
|
4079
|
+
return (s, r) => {
|
|
4077
4080
|
const u = Me("icon");
|
|
4078
|
-
return N(
|
|
4079
|
-
f("div",
|
|
4080
|
-
f("div",
|
|
4081
|
+
return N(s.$slots, "search", fe(ge({ searchValue: e.value, performSearch: d })), () => [
|
|
4082
|
+
f("div", ar, [
|
|
4083
|
+
f("div", nr, [
|
|
4081
4084
|
q(Ve, {
|
|
4082
4085
|
modelValue: e.value,
|
|
4083
|
-
"onUpdate:modelValue":
|
|
4086
|
+
"onUpdate:modelValue": r[0] || (r[0] = (c) => e.value = c),
|
|
4084
4087
|
class: "cl-box-border cl-font-light cl-p-2 cl-placeholder-grey-3 cl-pr-9 cl-text-sm",
|
|
4085
4088
|
type: "search",
|
|
4086
|
-
placeholder:
|
|
4087
|
-
onKeypress:
|
|
4088
|
-
onBlur:
|
|
4089
|
+
placeholder: s.columns.length > 4 ? g(i)("grid.search") : g(i)("grid.searchSpecific", { columns: s.columns.map((c) => c.caption).join(", ") }),
|
|
4090
|
+
onKeypress: r[1] || (r[1] = be((c) => d(e.value), ["enter"])),
|
|
4091
|
+
onBlur: r[2] || (r[2] = (c) => d(e.value))
|
|
4089
4092
|
}, {
|
|
4090
4093
|
default: A(() => [
|
|
4091
|
-
|
|
4094
|
+
rr
|
|
4092
4095
|
]),
|
|
4093
4096
|
_: 1
|
|
4094
4097
|
}, 8, ["modelValue", "placeholder"])
|
|
@@ -4096,13 +4099,13 @@ const Dn = {
|
|
|
4096
4099
|
q(u, {
|
|
4097
4100
|
class: "cl-absolute cl-cursor-pointer cl-right-1 cl-text-grey-4 cl-top-3 cl-z-10 hover:cl-text-link-light lg:cl-right-4",
|
|
4098
4101
|
icon: "ph:x-bold",
|
|
4099
|
-
onClick:
|
|
4102
|
+
onClick: r[3] || (r[3] = ne((c) => d(""), ["prevent"]))
|
|
4100
4103
|
})
|
|
4101
4104
|
])
|
|
4102
4105
|
]);
|
|
4103
4106
|
};
|
|
4104
4107
|
}
|
|
4105
|
-
}),
|
|
4108
|
+
}), ir = { class: "cl-fixed cl-flex cl-h-full cl-justify-end cl-right-0 cl-shadow-lg cl-top-0 cl-z-40" }, cr = { class: "cl-bg-secondary-default cl-h-full cl-overflow-y-auto cl-overscroll-y-none cl-px-10 cl-py-20 cl-relative cl-text-grey-2 cl-w-80" }, ur = { class: "cl-mb-4 cl-text-2xl cl-text-off-white" }, dr = { class: "cl-border-grey-3 cl-border-t cl-flex cl-flex-wrap cl-text-sm cl-w-full" }, pr = { class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full" }, fr = { class: "cl-flex-1 cl-py-2" }, mr = { class: "cl-py-2 cl-w-1/4" }, gr = { class: "cl-py-2 cl-w-1/5" }, vr = { class: "cl-flex-1 cl-py-2" }, br = { class: "cl-py-2 cl-w-1/4" }, hr = { class: "cl-py-2 cl-text-off-white cl-w-1/5" }, yr = { key: 1 }, wr = /* @__PURE__ */ F({
|
|
4106
4109
|
inheritAttrs: !1,
|
|
4107
4110
|
__name: "cl-ui-grid-view-manager",
|
|
4108
4111
|
props: {
|
|
@@ -4111,74 +4114,74 @@ const Dn = {
|
|
|
4111
4114
|
},
|
|
4112
4115
|
emits: ["update:columns"],
|
|
4113
4116
|
setup(t, { emit: o }) {
|
|
4114
|
-
const l = t, e = o, { t:
|
|
4115
|
-
function d(
|
|
4116
|
-
c <
|
|
4117
|
+
const l = t, e = o, { t: n } = ue(), a = I(!1);
|
|
4118
|
+
function d(r, u, c) {
|
|
4119
|
+
c < r.length && c >= 0 && r.splice(c, 0, r.splice(u, 1)[0]);
|
|
4117
4120
|
}
|
|
4118
|
-
function
|
|
4121
|
+
function i(r, u) {
|
|
4119
4122
|
const c = ve(l.columns), m = c.findIndex((b) => b.name === u.name);
|
|
4120
|
-
m >= 0 && (c[m].visible =
|
|
4123
|
+
m >= 0 && (c[m].visible = r), e("update:columns", c);
|
|
4121
4124
|
}
|
|
4122
|
-
function
|
|
4123
|
-
const c = ve(l.columns), m = u === "up" ?
|
|
4124
|
-
d(c,
|
|
4125
|
+
function s(r, u) {
|
|
4126
|
+
const c = ve(l.columns), m = u === "up" ? r + 1 : r - 1;
|
|
4127
|
+
d(c, r, m), e("update:columns", c);
|
|
4125
4128
|
}
|
|
4126
|
-
return (
|
|
4127
|
-
q(ye, ee(
|
|
4129
|
+
return (r, u) => (p(), v(X, null, [
|
|
4130
|
+
q(ye, ee(r.$attrs, {
|
|
4128
4131
|
class: "cl-w-full",
|
|
4129
4132
|
size: "small",
|
|
4130
|
-
disabled:
|
|
4133
|
+
disabled: r.loading,
|
|
4131
4134
|
onClick: u[0] || (u[0] = ne((c) => a.value = !0, ["prevent"]))
|
|
4132
4135
|
}), {
|
|
4133
4136
|
default: A(() => [
|
|
4134
|
-
ce(
|
|
4137
|
+
ce(V(g(n)("grid.manageView")), 1)
|
|
4135
4138
|
]),
|
|
4136
4139
|
_: 1
|
|
4137
4140
|
}, 16, ["disabled"]),
|
|
4138
4141
|
(p(), j(cl, { to: "body" }, [
|
|
4139
4142
|
q(Se, { name: "slide-left" }, {
|
|
4140
4143
|
default: A(() => [
|
|
4141
|
-
_(f("div",
|
|
4142
|
-
f("div",
|
|
4144
|
+
_(f("div", ir, [
|
|
4145
|
+
f("div", cr, [
|
|
4143
4146
|
q(g(x), {
|
|
4144
4147
|
class: "cl-absolute cl-cursor-pointer cl-right-3 cl-text-off-white cl-top-3",
|
|
4145
4148
|
icon: "ph:x",
|
|
4146
4149
|
size: 16,
|
|
4147
4150
|
onClick: u[1] || (u[1] = (c) => a.value = !1)
|
|
4148
4151
|
}),
|
|
4149
|
-
f("h3",
|
|
4150
|
-
f("ul",
|
|
4151
|
-
f("li",
|
|
4152
|
-
f("strong",
|
|
4153
|
-
f("strong",
|
|
4154
|
-
f("strong",
|
|
4152
|
+
f("h3", ur, V(g(n)("grid.manageView")), 1),
|
|
4153
|
+
f("ul", dr, [
|
|
4154
|
+
f("li", pr, [
|
|
4155
|
+
f("strong", fr, V(g(n)("grid.column")), 1),
|
|
4156
|
+
f("strong", mr, V(g(n)("grid.visible")), 1),
|
|
4157
|
+
f("strong", gr, V(g(n)("grid.order")), 1)
|
|
4155
4158
|
]),
|
|
4156
|
-
(p(!0), v(X, null, de(
|
|
4159
|
+
(p(!0), v(X, null, de(r.columns, (c, m) => (p(), v("li", {
|
|
4157
4160
|
key: m,
|
|
4158
4161
|
class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full"
|
|
4159
4162
|
}, [
|
|
4160
|
-
f("div",
|
|
4161
|
-
f("div",
|
|
4163
|
+
f("div", vr, V(c.caption), 1),
|
|
4164
|
+
f("div", br, [
|
|
4162
4165
|
q(fl, {
|
|
4163
4166
|
"model-value": c.visible === void 0 || c.visible === !0,
|
|
4164
|
-
"onUpdate:modelValue": (b) =>
|
|
4167
|
+
"onUpdate:modelValue": (b) => i(b, c)
|
|
4165
4168
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
4166
4169
|
]),
|
|
4167
|
-
f("div",
|
|
4170
|
+
f("div", hr, [
|
|
4168
4171
|
c.visible === void 0 || c.visible === !0 ? (p(), v(X, { key: 0 }, [
|
|
4169
4172
|
m !== 0 ? (p(), j(g(x), {
|
|
4170
4173
|
key: 0,
|
|
4171
4174
|
class: "cl-cursor-pointer cl-inline-block cl-mr-2",
|
|
4172
4175
|
icon: "ph:arrow-left",
|
|
4173
|
-
onClick: (b) =>
|
|
4176
|
+
onClick: (b) => s(m, "down")
|
|
4174
4177
|
}, null, 8, ["onClick"])) : M("", !0),
|
|
4175
|
-
m !==
|
|
4178
|
+
m !== r.columns.length - 1 ? (p(), j(g(x), {
|
|
4176
4179
|
key: 1,
|
|
4177
4180
|
class: "cl-cursor-pointer cl-inline-block",
|
|
4178
4181
|
icon: "ph:arrow-right",
|
|
4179
|
-
onClick: (b) =>
|
|
4182
|
+
onClick: (b) => s(m, "up")
|
|
4180
4183
|
}, null, 8, ["onClick"])) : M("", !0)
|
|
4181
|
-
], 64)) : (p(), v("em",
|
|
4184
|
+
], 64)) : (p(), v("em", yr, V(g(n)("grid.hidden")), 1))
|
|
4182
4185
|
])
|
|
4183
4186
|
]))), 128))
|
|
4184
4187
|
])
|
|
@@ -4192,7 +4195,7 @@ const Dn = {
|
|
|
4192
4195
|
]))
|
|
4193
4196
|
], 64));
|
|
4194
4197
|
}
|
|
4195
|
-
}),
|
|
4198
|
+
}), kr = { class: "cl-relative cl-w-full grid-wrapper lg:cl-min-h-fit" }, $r = { class: "cl-absolute cl-flex cl-items-center cl-justify-center cl-min-h-full cl-p-28 cl-pt-0 cl-w-full" }, Cr = { class: "cl-overflow-x-auto cl-overscroll-x-none cl-pt-1" }, Tr = { class: "cl-hidden lg:cl-table-column-group" }, Sr = /* @__PURE__ */ F({
|
|
4196
4199
|
__name: "cl-ui-grid",
|
|
4197
4200
|
props: {
|
|
4198
4201
|
columns: {},
|
|
@@ -4207,27 +4210,27 @@ const Dn = {
|
|
|
4207
4210
|
emits: ["update:columns", "update:request", "data-request", "row-edit", "row-edit-cancelled", "edit-start", "edit-end", "row-select"],
|
|
4208
4211
|
setup(t, { emit: o }) {
|
|
4209
4212
|
var se;
|
|
4210
|
-
const l = t, e = o,
|
|
4211
|
-
$l("cl-ui-grid-id",
|
|
4213
|
+
const l = t, e = o, n = Ml();
|
|
4214
|
+
$l("cl-ui-grid-id", n.id);
|
|
4212
4215
|
const a = S(() => l.headerDisplayTimezone ?? l.timeZone), d = S(() => l.dateFormatLocale);
|
|
4213
4216
|
$l(Wl, d);
|
|
4214
|
-
const
|
|
4217
|
+
const i = S({
|
|
4215
4218
|
get: () => l.columns,
|
|
4216
4219
|
set: (k) => e("update:columns", k)
|
|
4217
|
-
}),
|
|
4220
|
+
}), s = S(() => i.value.filter((k) => k.visible ?? !0)), r = I({});
|
|
4218
4221
|
function u() {
|
|
4219
4222
|
const k = {};
|
|
4220
|
-
window.innerWidth >= 1024 &&
|
|
4223
|
+
window.innerWidth >= 1024 && i.value.forEach((R) => {
|
|
4221
4224
|
const w = R.width ? `${R.width}px` : "";
|
|
4222
4225
|
k[`${R.name}`] = `width: ${w}; min-width: ${w};`;
|
|
4223
|
-
}),
|
|
4226
|
+
}), r.value = k;
|
|
4224
4227
|
}
|
|
4225
4228
|
function c(k) {
|
|
4226
|
-
return
|
|
4229
|
+
return r.value[k] ?? "";
|
|
4227
4230
|
}
|
|
4228
4231
|
We(() => {
|
|
4229
4232
|
window.addEventListener("resize", u), u();
|
|
4230
|
-
}),
|
|
4233
|
+
}), el(() => window.removeEventListener("resize", u));
|
|
4231
4234
|
const m = S({
|
|
4232
4235
|
get: () => l.request,
|
|
4233
4236
|
set: (k) => e("update:request", k)
|
|
@@ -4247,7 +4250,7 @@ const Dn = {
|
|
|
4247
4250
|
function T() {
|
|
4248
4251
|
$(!0), h(!1);
|
|
4249
4252
|
}
|
|
4250
|
-
const O = S(() => l.data), L =
|
|
4253
|
+
const O = S(() => l.data), L = I(!1), D = I(!1);
|
|
4251
4254
|
ae(L, () => {
|
|
4252
4255
|
L.value ? e("edit-start") : Re(() => e("edit-end"));
|
|
4253
4256
|
});
|
|
@@ -4270,9 +4273,9 @@ const Dn = {
|
|
|
4270
4273
|
filters: R
|
|
4271
4274
|
};
|
|
4272
4275
|
}
|
|
4273
|
-
}), E =
|
|
4274
|
-
return (k, R) => (p(), v("div",
|
|
4275
|
-
J.value.length > 0 ? (p(), j(
|
|
4276
|
+
}), E = I(((se = l.request.filters.find((k) => k.filterMethod === "andcontains" || k.filterOperation === le.AND_CONTAINS)) == null ? void 0 : se.filterValue) ?? ""), J = S(() => l.columns.filter((k) => (k.type === "string" || k.type === "slot" && k.slotType === "string") && k.searchable));
|
|
4277
|
+
return (k, R) => (p(), v("div", kr, [
|
|
4278
|
+
J.value.length > 0 ? (p(), j(sr, {
|
|
4276
4279
|
key: 0,
|
|
4277
4280
|
"search-value": E.value,
|
|
4278
4281
|
"onUpdate:searchValue": R[0] || (R[0] = (w) => E.value = w),
|
|
@@ -4287,8 +4290,8 @@ const Dn = {
|
|
|
4287
4290
|
}, 8, ["search-value", "request", "columns"])) : M("", !0),
|
|
4288
4291
|
q(Se, { name: "fade" }, {
|
|
4289
4292
|
default: A(() => [
|
|
4290
|
-
_(f("div",
|
|
4291
|
-
q(
|
|
4293
|
+
_(f("div", $r, [
|
|
4294
|
+
q(tl, { class: "after:!cl-h-20 after:!cl-w-20 cl-h-20 cl-w-20" })
|
|
4292
4295
|
], 512), [
|
|
4293
4296
|
[oe, k.loading]
|
|
4294
4297
|
])
|
|
@@ -4310,33 +4313,33 @@ const Dn = {
|
|
|
4310
4313
|
N(k.$slots, "additional-grid-actions", fe(ge(w)))
|
|
4311
4314
|
]),
|
|
4312
4315
|
"view-manager": A(() => [
|
|
4313
|
-
q(
|
|
4314
|
-
columns:
|
|
4315
|
-
"onUpdate:columns": R[2] || (R[2] = (w) =>
|
|
4316
|
+
q(wr, {
|
|
4317
|
+
columns: i.value,
|
|
4318
|
+
"onUpdate:columns": R[2] || (R[2] = (w) => i.value = w),
|
|
4316
4319
|
loading: k.loading
|
|
4317
4320
|
}, null, 8, ["columns", "loading"])
|
|
4318
4321
|
]),
|
|
4319
4322
|
_: 3
|
|
4320
4323
|
}, 8, ["edit-mode", "filter-panel-open", "columns", "options", "request", "loading"]),
|
|
4321
|
-
f("div",
|
|
4324
|
+
f("div", Cr, [
|
|
4322
4325
|
f("table", {
|
|
4323
4326
|
class: z(["cl-delay-75 cl-min-h-[276px] cl-overflow-x-auto cl-overscroll-x-none cl-text-left cl-transition-opacity cl-w-full", {
|
|
4324
4327
|
"cl-opacity-40 cl-pointer-events-none": k.loading
|
|
4325
4328
|
}])
|
|
4326
4329
|
}, [
|
|
4327
|
-
f("colgroup",
|
|
4328
|
-
(p(!0), v(X, null, de(
|
|
4330
|
+
f("colgroup", Tr, [
|
|
4331
|
+
(p(!0), v(X, null, de(s.value, (w, U) => (p(), v("col", {
|
|
4329
4332
|
key: U,
|
|
4330
4333
|
style: ct(c(w.name)),
|
|
4331
4334
|
span: 1
|
|
4332
4335
|
}, null, 4))), 128))
|
|
4333
4336
|
]),
|
|
4334
|
-
q(
|
|
4337
|
+
q(or, {
|
|
4335
4338
|
request: Y.value,
|
|
4336
4339
|
"onUpdate:request": R[5] || (R[5] = (w) => Y.value = w),
|
|
4337
4340
|
"filter-panel-open": D.value,
|
|
4338
4341
|
"onUpdate:filterPanelOpen": R[6] || (R[6] = (w) => D.value = w),
|
|
4339
|
-
columns:
|
|
4342
|
+
columns: s.value,
|
|
4340
4343
|
options: W.value,
|
|
4341
4344
|
loading: k.loading,
|
|
4342
4345
|
"time-zone": k.timeZone,
|
|
@@ -4344,7 +4347,7 @@ const Dn = {
|
|
|
4344
4347
|
onPerformDataRequest: T
|
|
4345
4348
|
}, null, 8, ["request", "filter-panel-open", "columns", "options", "loading", "time-zone", "header-display-timezone"]),
|
|
4346
4349
|
q(ka, {
|
|
4347
|
-
columns:
|
|
4350
|
+
columns: s.value,
|
|
4348
4351
|
request: m.value,
|
|
4349
4352
|
data: O.value,
|
|
4350
4353
|
"time-zone": k.timeZone,
|
|
@@ -4377,38 +4380,38 @@ const Dn = {
|
|
|
4377
4380
|
}, null, 8, ["request", "loading", "show-unsaved-changes-warning", "data"])
|
|
4378
4381
|
]));
|
|
4379
4382
|
}
|
|
4380
|
-
}),
|
|
4383
|
+
}), qr = { class: "cl-absolute cl-bg-secondary-default cl-flex cl-h-20 cl-items-center cl-justify-between cl-left-0 cl-top-0 cl-w-full cl-z-40" }, Or = /* @__PURE__ */ F({
|
|
4381
4384
|
__name: "cl-ui-header",
|
|
4382
4385
|
props: {
|
|
4383
4386
|
isOpen: { type: Boolean }
|
|
4384
4387
|
},
|
|
4385
4388
|
emits: ["open-click"],
|
|
4386
4389
|
setup(t, { emit: o }) {
|
|
4387
|
-
const l = t, e = o,
|
|
4388
|
-
return
|
|
4390
|
+
const l = t, e = o, n = I();
|
|
4391
|
+
return ll(n, () => {
|
|
4389
4392
|
(l.isOpen ?? !1) && e("open-click");
|
|
4390
|
-
}), (a, d) => (p(), v("header",
|
|
4393
|
+
}), (a, d) => (p(), v("header", qr, [
|
|
4391
4394
|
N(a.$slots, "logo"),
|
|
4392
4395
|
f("div", {
|
|
4393
4396
|
ref_key: "headerMenuElement",
|
|
4394
|
-
ref:
|
|
4397
|
+
ref: n,
|
|
4395
4398
|
class: "cl-cursor-pointer cl-flex cl-flex-nowrap",
|
|
4396
|
-
onClick: d[0] || (d[0] = (
|
|
4399
|
+
onClick: d[0] || (d[0] = (i) => a.$emit("open-click"))
|
|
4397
4400
|
}, [
|
|
4398
4401
|
N(a.$slots, "menu"),
|
|
4399
4402
|
N(a.$slots, "icon")
|
|
4400
4403
|
], 512)
|
|
4401
4404
|
]));
|
|
4402
4405
|
}
|
|
4403
|
-
}),
|
|
4406
|
+
}), Dr = { class: "cl-bg-transparent cl-flex cl-items-center cl-select-none hover:cl-bg-opacity-10 hover:cl-bg-white md:cl-min-w-[320px]" }, Ar = ["src"], Er = {
|
|
4404
4407
|
key: 0,
|
|
4405
4408
|
id: "cl-ui-header-menu-username",
|
|
4406
4409
|
class: "cl-text-ellipsis cl-whitespace-nowrap"
|
|
4407
|
-
},
|
|
4410
|
+
}, Vr = {
|
|
4408
4411
|
key: 1,
|
|
4409
4412
|
id: "cl-ui-header-menu-group",
|
|
4410
4413
|
class: "cl-text-ellipsis cl-text-xs cl-whitespace-nowrap"
|
|
4411
|
-
},
|
|
4414
|
+
}, Ir = { class: "cl-content-center cl-flex cl-h-20 cl-items-center cl-justify-center cl-justify-items-center cl-transition-all cl-w-10 md:cl-ml-4 md:cl-w-20" }, Rr = { class: "cl-absolute cl-bg-white cl-right-0 cl-shadow-2xl cl-top-20 cl-w-full cl-z-20" }, Nr = /* @__PURE__ */ F({
|
|
4412
4415
|
__name: "cl-ui-header-menu",
|
|
4413
4416
|
props: {
|
|
4414
4417
|
username: { default: "" },
|
|
@@ -4424,12 +4427,12 @@ const Dn = {
|
|
|
4424
4427
|
"cl-bg-blue-light": o.colour === "secondary"
|
|
4425
4428
|
}])
|
|
4426
4429
|
}, [
|
|
4427
|
-
f("div",
|
|
4430
|
+
f("div", Dr, [
|
|
4428
4431
|
o.image ? (p(), v("img", {
|
|
4429
4432
|
key: 0,
|
|
4430
4433
|
src: o.image,
|
|
4431
4434
|
class: "cl-hidden cl-m-4 cl-max-h-12 cl-max-w-12 cl-ring-2 cl-ring-white cl-rounded-full md:cl-block"
|
|
4432
|
-
}, null, 8,
|
|
4435
|
+
}, null, 8, Ar)) : (p(), j(g(x), {
|
|
4433
4436
|
key: 1,
|
|
4434
4437
|
class: "cl-hidden cl-m-4 cl-text-white md:cl-block",
|
|
4435
4438
|
icon: "ph:user-circle",
|
|
@@ -4442,10 +4445,10 @@ const Dn = {
|
|
|
4442
4445
|
"cl-text-white": o.colour === "secondary"
|
|
4443
4446
|
}])
|
|
4444
4447
|
}, [
|
|
4445
|
-
o.username ? (p(), v("div",
|
|
4446
|
-
o.group ? (p(), v("div",
|
|
4448
|
+
o.username ? (p(), v("div", Er, V(o.username), 1)) : M("", !0),
|
|
4449
|
+
o.group ? (p(), v("div", Vr, V(o.group), 1)) : M("", !0)
|
|
4447
4450
|
], 2),
|
|
4448
|
-
f("div",
|
|
4451
|
+
f("div", Ir, [
|
|
4449
4452
|
q(g(x), {
|
|
4450
4453
|
class: z(["cl-transform-gpu cl-transition-transform", {
|
|
4451
4454
|
"cl-rotate-180": o.isOpen,
|
|
@@ -4458,7 +4461,7 @@ const Dn = {
|
|
|
4458
4461
|
]),
|
|
4459
4462
|
q(Se, { name: "fade" }, {
|
|
4460
4463
|
default: A(() => [
|
|
4461
|
-
_(f("div",
|
|
4464
|
+
_(f("div", Rr, [
|
|
4462
4465
|
N(o.$slots, "default")
|
|
4463
4466
|
], 512), [
|
|
4464
4467
|
[oe, o.isOpen]
|
|
@@ -4468,10 +4471,10 @@ const Dn = {
|
|
|
4468
4471
|
})
|
|
4469
4472
|
], 2));
|
|
4470
4473
|
}
|
|
4471
|
-
}),
|
|
4474
|
+
}), Mr = [
|
|
4472
4475
|
"default",
|
|
4473
4476
|
"secondary"
|
|
4474
|
-
],
|
|
4477
|
+
], Ur = /* @__PURE__ */ F({
|
|
4475
4478
|
inheritAttrs: !1,
|
|
4476
4479
|
__name: "cl-ui-calendar",
|
|
4477
4480
|
props: {
|
|
@@ -4489,7 +4492,7 @@ const Dn = {
|
|
|
4489
4492
|
},
|
|
4490
4493
|
emits: ["update:date"],
|
|
4491
4494
|
setup(t, { expose: o, emit: l }) {
|
|
4492
|
-
const e = t,
|
|
4495
|
+
const e = t, n = l, a = S(() => e.timeZone ?? "UTC"), d = S({
|
|
4493
4496
|
get() {
|
|
4494
4497
|
let D = null;
|
|
4495
4498
|
return e.type === "time" ? D = e.date === null ? "00:00" : e.date : e.date !== null && typeof e.date == "string" ? D = G.fromISO(e.date, {
|
|
@@ -4508,34 +4511,34 @@ const Dn = {
|
|
|
4508
4511
|
if (e.type === "time")
|
|
4509
4512
|
W = D;
|
|
4510
4513
|
else if (D !== null && e.type !== "dateRange")
|
|
4511
|
-
W =
|
|
4514
|
+
W = Be(D, null, !0, e.timeZone);
|
|
4512
4515
|
else if (D !== null) {
|
|
4513
4516
|
const Y = D;
|
|
4514
4517
|
W = {
|
|
4515
|
-
start:
|
|
4516
|
-
end:
|
|
4518
|
+
start: Be(Y.start, "start", !1, e.timeZone) ?? "",
|
|
4519
|
+
end: Be(Y.end, "end", !1, e.timeZone) ?? ""
|
|
4517
4520
|
};
|
|
4518
4521
|
}
|
|
4519
|
-
|
|
4522
|
+
n("update:date", W);
|
|
4520
4523
|
}
|
|
4521
|
-
}), { locale:
|
|
4524
|
+
}), { locale: i } = ue(), s = S(() => e.dateFormatLocale ?? i.value), r = S(() => vl(e.disabled, "auto")), u = S(() => xl(s.value, e.type)), c = I(null), m = S(() => bl(e.date, e.initialDate, a.value, e.type)), b = I(null), h = I();
|
|
4522
4525
|
function $(D) {
|
|
4523
4526
|
const W = Kl(D, a.value);
|
|
4524
4527
|
d.value = W, b.value = D, h.value.move(W.start), h.value.hidePopover();
|
|
4525
4528
|
}
|
|
4526
|
-
const T = S(() => Ql(d.value, a.value,
|
|
4529
|
+
const T = S(() => Ql(d.value, a.value, s.value)), O = Ll("(min-width: 768px)"), L = S(() => O.value ? 2 : 1);
|
|
4527
4530
|
return o({
|
|
4528
4531
|
focus() {
|
|
4529
4532
|
var D;
|
|
4530
4533
|
(D = c.value) == null || D.focus();
|
|
4531
4534
|
}
|
|
4532
|
-
}), (D, W) => D.type === "time" ? (p(), j(g(
|
|
4535
|
+
}), (D, W) => D.type === "time" ? (p(), j(g(ze), {
|
|
4533
4536
|
key: 0,
|
|
4534
4537
|
modelValue: d.value,
|
|
4535
4538
|
"onUpdate:modelValue": W[1] || (W[1] = (Y) => d.value = Y),
|
|
4536
4539
|
modelModifiers: { string: !0 },
|
|
4537
|
-
locale: g(
|
|
4538
|
-
is24hr: g(
|
|
4540
|
+
locale: g(i),
|
|
4541
|
+
is24hr: g(i) !== "en-US",
|
|
4539
4542
|
mode: D.type,
|
|
4540
4543
|
"is-required": D.required,
|
|
4541
4544
|
"update-on-input": !1,
|
|
@@ -4543,7 +4546,7 @@ const Dn = {
|
|
|
4543
4546
|
color: "primary",
|
|
4544
4547
|
"title-position": "left",
|
|
4545
4548
|
"hide-time-header": "",
|
|
4546
|
-
popover:
|
|
4549
|
+
popover: r.value
|
|
4547
4550
|
}, {
|
|
4548
4551
|
default: A(({ inputValue: Y, inputEvents: E }) => [
|
|
4549
4552
|
q(He, ee(D.$attrs, {
|
|
@@ -4559,7 +4562,7 @@ const Dn = {
|
|
|
4559
4562
|
}), null, 16, ["date", "events", "type", "placeholder", "required", "disabled"])
|
|
4560
4563
|
]),
|
|
4561
4564
|
_: 1
|
|
4562
|
-
}, 8, ["modelValue", "locale", "is24hr", "mode", "is-required", "masks", "popover"])) : D.type === "dateRange" ? (p(), j(g(
|
|
4565
|
+
}, 8, ["modelValue", "locale", "is24hr", "mode", "is-required", "masks", "popover"])) : D.type === "dateRange" ? (p(), j(g(ze), {
|
|
4563
4566
|
key: 1,
|
|
4564
4567
|
ref_key: "calendar",
|
|
4565
4568
|
ref: h,
|
|
@@ -4569,11 +4572,11 @@ const Dn = {
|
|
|
4569
4572
|
mode: "date",
|
|
4570
4573
|
color: "primary",
|
|
4571
4574
|
"title-position": "left",
|
|
4572
|
-
locale: g(
|
|
4573
|
-
is24hr: g(
|
|
4575
|
+
locale: g(i),
|
|
4576
|
+
is24hr: g(i) !== "en-US",
|
|
4574
4577
|
timezone: a.value,
|
|
4575
4578
|
columns: L.value,
|
|
4576
|
-
popover:
|
|
4579
|
+
popover: r.value,
|
|
4577
4580
|
"min-date": D.min,
|
|
4578
4581
|
"max-date": D.max,
|
|
4579
4582
|
"initial-page": m.value,
|
|
@@ -4605,12 +4608,12 @@ const Dn = {
|
|
|
4605
4608
|
}, null, 8, ["scope", "selected-quick-date", "current-date-range"])) : M("", !0)
|
|
4606
4609
|
]),
|
|
4607
4610
|
_: 1
|
|
4608
|
-
}, 8, ["modelValue", "locale", "is24hr", "timezone", "columns", "popover", "min-date", "max-date", "initial-page"])) : (p(), j(g(
|
|
4611
|
+
}, 8, ["modelValue", "locale", "is24hr", "timezone", "columns", "popover", "min-date", "max-date", "initial-page"])) : (p(), j(g(ze), {
|
|
4609
4612
|
key: 2,
|
|
4610
4613
|
modelValue: d.value,
|
|
4611
4614
|
"onUpdate:modelValue": W[7] || (W[7] = (Y) => d.value = Y),
|
|
4612
|
-
locale: g(
|
|
4613
|
-
is24hr: g(
|
|
4615
|
+
locale: g(i),
|
|
4616
|
+
is24hr: g(i) !== "en-US",
|
|
4614
4617
|
timezone: a.value,
|
|
4615
4618
|
mode: D.type,
|
|
4616
4619
|
"min-date": D.min,
|
|
@@ -4622,7 +4625,7 @@ const Dn = {
|
|
|
4622
4625
|
color: "primary",
|
|
4623
4626
|
"title-position": "left",
|
|
4624
4627
|
"hide-time-header": "",
|
|
4625
|
-
popover:
|
|
4628
|
+
popover: r.value
|
|
4626
4629
|
}, {
|
|
4627
4630
|
default: A(({ inputValue: Y, inputEvents: E }) => [
|
|
4628
4631
|
q(He, ee(D.$attrs, {
|
|
@@ -4644,7 +4647,7 @@ const Dn = {
|
|
|
4644
4647
|
}), Le = [
|
|
4645
4648
|
...lt,
|
|
4646
4649
|
"dateRange"
|
|
4647
|
-
],
|
|
4650
|
+
], zr = ["disabled", "step", "placeholder", "name"], Br = /* @__PURE__ */ F({
|
|
4648
4651
|
__name: "cl-ui-currency-input",
|
|
4649
4652
|
props: {
|
|
4650
4653
|
modelValue: { type: [String, Object, Number, Boolean, null] },
|
|
@@ -4659,26 +4662,26 @@ const Dn = {
|
|
|
4659
4662
|
},
|
|
4660
4663
|
emits: ["update:modelValue", "focus", "change"],
|
|
4661
4664
|
setup(t, { expose: o, emit: l }) {
|
|
4662
|
-
const e = t,
|
|
4665
|
+
const e = t, n = l, { inputRef: a, setOptions: d, setValue: i, numberValue: s } = Ct(e.currencyOptions, !1), r = S(() => u(e.modelValue) ? e.modelValue : 0);
|
|
4663
4666
|
function u($) {
|
|
4664
4667
|
return typeof $ == "number" && isNaN($) === !1;
|
|
4665
4668
|
}
|
|
4666
4669
|
function c() {
|
|
4667
|
-
u(
|
|
4670
|
+
u(s.value) ? n("update:modelValue", s.value ?? 0) : n("update:modelValue", r.value);
|
|
4668
4671
|
}
|
|
4669
4672
|
function m() {
|
|
4670
|
-
u(
|
|
4673
|
+
u(s.value) === !1 && i(r.value), n("update:modelValue", s.value);
|
|
4671
4674
|
}
|
|
4672
4675
|
function b($) {
|
|
4673
4676
|
return Object.values($).some((T) => T !== "");
|
|
4674
4677
|
}
|
|
4675
4678
|
function h($) {
|
|
4676
|
-
u(
|
|
4679
|
+
u(s.value) && n("change", $, s.value ?? 0);
|
|
4677
4680
|
}
|
|
4678
4681
|
return ae(
|
|
4679
4682
|
() => e.modelValue,
|
|
4680
4683
|
($) => {
|
|
4681
|
-
u($) ?
|
|
4684
|
+
u($) ? i($) : i(0);
|
|
4682
4685
|
}
|
|
4683
4686
|
), ae(
|
|
4684
4687
|
() => e.currencyOptions,
|
|
@@ -4713,13 +4716,13 @@ const Dn = {
|
|
|
4713
4716
|
onKeydown: be(c, ["enter"]),
|
|
4714
4717
|
onChange: h,
|
|
4715
4718
|
onBlur: m,
|
|
4716
|
-
onFocus: T[0] || (T[0] = (O) =>
|
|
4717
|
-
}, null, 42,
|
|
4719
|
+
onFocus: T[0] || (T[0] = (O) => n("focus"))
|
|
4720
|
+
}, null, 42, zr));
|
|
4718
4721
|
}
|
|
4719
|
-
}),
|
|
4722
|
+
}), Fr = (t) => (zl("data-v-5cb4ccea"), t = t(), Bl(), t), Lr = { class: "cl-flex cl-items-start" }, jr = { class: "cl-w-full" }, Pr = /* @__PURE__ */ Fr(() => /* @__PURE__ */ f("span", null, null, -1)), Hr = ["min", "max", "step", "disabled"], Wr = { class: "cl-bg-transparent cl-text-center cl-text-sm cl-w-full" }, Zr = { class: "cl-bg-transparent cl-text-sm" }, Gr = {
|
|
4720
4723
|
key: 1,
|
|
4721
4724
|
class: "cl-emphasis-danger cl-text-sm cl-w-full"
|
|
4722
|
-
},
|
|
4725
|
+
}, xr = /* @__PURE__ */ F({
|
|
4723
4726
|
inheritAttrs: !1,
|
|
4724
4727
|
__name: "cl-ui-slider",
|
|
4725
4728
|
props: /* @__PURE__ */ me({
|
|
@@ -4734,29 +4737,29 @@ const Dn = {
|
|
|
4734
4737
|
}),
|
|
4735
4738
|
emits: ["update:value"],
|
|
4736
4739
|
setup(t, { expose: o }) {
|
|
4737
|
-
Ul((
|
|
4740
|
+
Ul((r) => ({
|
|
4738
4741
|
"59055b28": d.value
|
|
4739
4742
|
}));
|
|
4740
|
-
const l = t, e = $e(t, "value"), { t:
|
|
4741
|
-
let
|
|
4742
|
-
return
|
|
4743
|
-
}),
|
|
4743
|
+
const l = t, e = $e(t, "value"), { t: n } = ue(), a = I(), d = S(() => {
|
|
4744
|
+
let r = (e.value - l.min) / (l.max - l.min) * 100;
|
|
4745
|
+
return r < 35 && r > 0 ? r < 20 ? r += 0.5 : r += 0.25 : r > 65 && r < 100 && (r > 80 ? r -= 0.5 : r -= 0.25), `${r}%`;
|
|
4746
|
+
}), i = S(() => l.min <= l.max && l.step > 0), s = I(!1);
|
|
4744
4747
|
return o({
|
|
4745
4748
|
focus() {
|
|
4746
|
-
var
|
|
4747
|
-
(
|
|
4749
|
+
var r;
|
|
4750
|
+
(r = a.value) == null || r.focus();
|
|
4748
4751
|
}
|
|
4749
|
-
}), (
|
|
4750
|
-
f("div",
|
|
4752
|
+
}), (r, u) => i.value ? (p(), v("div", fe(ee({ key: 0 }, r.$attrs)), [
|
|
4753
|
+
f("div", Lr, [
|
|
4751
4754
|
f("span", {
|
|
4752
4755
|
class: z(["cl-border cl-border-transparent cl-leading-6 cl-mr-1 cl-px-2 cl-rounded-full cl-select-none cl-shadow cl-text-center cl-text-xs", {
|
|
4753
|
-
"cl-bg-white cl-cursor-pointer hover:cl-border-grey-1": !
|
|
4754
|
-
"cl-bg-grey-0":
|
|
4756
|
+
"cl-bg-white cl-cursor-pointer hover:cl-border-grey-1": !r.disabled,
|
|
4757
|
+
"cl-bg-grey-0": r.disabled
|
|
4755
4758
|
}]),
|
|
4756
|
-
onClick: u[0] || (u[0] = (c) => e.value =
|
|
4757
|
-
},
|
|
4758
|
-
f("div",
|
|
4759
|
-
|
|
4759
|
+
onClick: u[0] || (u[0] = (c) => e.value = r.disabled ? e.value : r.min)
|
|
4760
|
+
}, V(Number.isInteger(r.min) ? g(Ae)(r.min) : g(Ee)(r.min, g(te).DECIMAL)), 3),
|
|
4761
|
+
f("div", jr, [
|
|
4762
|
+
s.value ? (p(), j(Ze, {
|
|
4760
4763
|
key: 0,
|
|
4761
4764
|
ref_key: "sliderRef",
|
|
4762
4765
|
ref: a,
|
|
@@ -4764,15 +4767,15 @@ const Dn = {
|
|
|
4764
4767
|
"onUpdate:modelValue": u[1] || (u[1] = (c) => e.value = c),
|
|
4765
4768
|
class: "cl-min-w-[8.5rem] cl-w-full",
|
|
4766
4769
|
format: g(te).DECIMAL,
|
|
4767
|
-
precision: Number.isInteger(
|
|
4768
|
-
min:
|
|
4769
|
-
max:
|
|
4770
|
-
step:
|
|
4771
|
-
disabled:
|
|
4772
|
-
placeholder:
|
|
4770
|
+
precision: Number.isInteger(r.min) ? 0 : g(ml)(g(te).DECIMAL).maximumFractionDigits,
|
|
4771
|
+
min: r.min,
|
|
4772
|
+
max: r.max,
|
|
4773
|
+
step: r.step,
|
|
4774
|
+
disabled: r.disabled,
|
|
4775
|
+
placeholder: r.placeholder
|
|
4773
4776
|
}, {
|
|
4774
4777
|
default: A(() => [
|
|
4775
|
-
|
|
4778
|
+
Pr
|
|
4776
4779
|
]),
|
|
4777
4780
|
_: 1
|
|
4778
4781
|
}, 8, ["modelValue", "format", "precision", "min", "max", "step", "disabled", "placeholder"])) : (p(), v(X, { key: 1 }, [
|
|
@@ -4782,11 +4785,11 @@ const Dn = {
|
|
|
4782
4785
|
"onUpdate:modelValue": u[2] || (u[2] = (c) => e.value = c),
|
|
4783
4786
|
class: "cl-align-middle cl-appearance-none cl-border cl-border-grey-2 cl-delay-500 cl-ease-in cl-flex-1 cl-h-5 cl-min-w-[8.5rem] cl-outline-none cl-rounded-full cl-transition-colors cl-w-full",
|
|
4784
4787
|
type: "range",
|
|
4785
|
-
min:
|
|
4786
|
-
max:
|
|
4787
|
-
step:
|
|
4788
|
-
disabled:
|
|
4789
|
-
}, null, 8,
|
|
4788
|
+
min: r.min,
|
|
4789
|
+
max: r.max,
|
|
4790
|
+
step: r.step,
|
|
4791
|
+
disabled: r.disabled
|
|
4792
|
+
}, null, 8, Hr), [
|
|
4790
4793
|
[
|
|
4791
4794
|
dl,
|
|
4792
4795
|
e.value,
|
|
@@ -4794,28 +4797,28 @@ const Dn = {
|
|
|
4794
4797
|
{ number: !0 }
|
|
4795
4798
|
]
|
|
4796
4799
|
]),
|
|
4797
|
-
f("div",
|
|
4800
|
+
f("div", Wr, V(Number.isInteger(e.value) ? g(Ae)(e.value) : g(Ee)(e.value, g(te).DECIMAL)), 1)
|
|
4798
4801
|
], 64))
|
|
4799
4802
|
]),
|
|
4800
4803
|
f("span", {
|
|
4801
4804
|
class: z(["cl-border cl-border-transparent cl-leading-6 cl-ml-1 cl-px-2 cl-rounded-full cl-select-none cl-shadow cl-text-center cl-text-xs", {
|
|
4802
|
-
"cl-bg-white cl-cursor-pointer hover:cl-border-grey-1": !
|
|
4803
|
-
"cl-bg-grey-0":
|
|
4805
|
+
"cl-bg-white cl-cursor-pointer hover:cl-border-grey-1": !r.disabled,
|
|
4806
|
+
"cl-bg-grey-0": r.disabled
|
|
4804
4807
|
}]),
|
|
4805
|
-
onClick: u[3] || (u[3] = (c) => e.value =
|
|
4806
|
-
},
|
|
4807
|
-
f("div",
|
|
4808
|
+
onClick: u[3] || (u[3] = (c) => e.value = r.disabled ? e.value : r.max)
|
|
4809
|
+
}, V(Number.isInteger(r.max) ? g(Ae)(r.max) : g(Ee)(r.max, g(te).DECIMAL)), 3),
|
|
4810
|
+
f("div", Zr, [
|
|
4808
4811
|
f("div", {
|
|
4809
4812
|
class: "cl-bg-white cl-border cl-border-transparent cl-cursor-pointer cl-float-right cl-p-1.5 cl-px-2 cl-rounded-full cl-shadow cl-text-xs hover:cl-border-grey-1",
|
|
4810
|
-
onClick: u[4] || (u[4] = (c) =>
|
|
4813
|
+
onClick: u[4] || (u[4] = (c) => s.value = !s.value)
|
|
4811
4814
|
}, [
|
|
4812
4815
|
q(g(x), { icon: "ph:arrows-left-right-thin" })
|
|
4813
4816
|
])
|
|
4814
4817
|
])
|
|
4815
4818
|
])
|
|
4816
|
-
], 16)) : (p(), v("div",
|
|
4819
|
+
], 16)) : (p(), v("div", Gr, V(g(n)("slider.invalidProps")), 1));
|
|
4817
4820
|
}
|
|
4818
|
-
}),
|
|
4821
|
+
}), Kr = /* @__PURE__ */ we(xr, [["__scopeId", "data-v-5cb4ccea"]]);
|
|
4819
4822
|
function El(t) {
|
|
4820
4823
|
let o = !1;
|
|
4821
4824
|
switch (t) {
|
|
@@ -4833,7 +4836,7 @@ function El(t) {
|
|
|
4833
4836
|
}
|
|
4834
4837
|
return o;
|
|
4835
4838
|
}
|
|
4836
|
-
function
|
|
4839
|
+
function Qr(t) {
|
|
4837
4840
|
return t === "number" || t === "range";
|
|
4838
4841
|
}
|
|
4839
4842
|
function Vl(t) {
|
|
@@ -4854,7 +4857,7 @@ function Vl(t) {
|
|
|
4854
4857
|
function je(t) {
|
|
4855
4858
|
return t === "button" || t === "submit" || t === "reset";
|
|
4856
4859
|
}
|
|
4857
|
-
function
|
|
4860
|
+
function _r(t) {
|
|
4858
4861
|
let o;
|
|
4859
4862
|
switch (t) {
|
|
4860
4863
|
case "datetime":
|
|
@@ -4875,27 +4878,27 @@ function Qr(t) {
|
|
|
4875
4878
|
}
|
|
4876
4879
|
function Il(t, o) {
|
|
4877
4880
|
const l = t.target;
|
|
4878
|
-
return
|
|
4881
|
+
return Qr(o) ? l.valueAsNumber : je(o) ? l.checked : l.value;
|
|
4879
4882
|
}
|
|
4880
|
-
const
|
|
4883
|
+
const Yr = { class: "cl-flex cl-justify-between" }, Jr = { class: "cl-w-full" }, Xr = {
|
|
4881
4884
|
key: 0,
|
|
4882
4885
|
class: "cl-block cl-left-auto cl-relative cl-text-danger-default"
|
|
4883
|
-
},
|
|
4886
|
+
}, es = {
|
|
4884
4887
|
key: 1,
|
|
4885
4888
|
class: "cl-bg-danger-light cl-block cl-max-h-6 cl-mb-1 cl-ml-2 cl-px-2 cl-rounded-md cl-text-center cl-text-danger-default cl-text-xs"
|
|
4886
|
-
},
|
|
4889
|
+
}, ls = {
|
|
4887
4890
|
key: 0,
|
|
4888
4891
|
class: "cl-relative"
|
|
4889
|
-
},
|
|
4892
|
+
}, ts = ["type", "disabled", "min", "max", "minlength", "maxlength", "step", "placeholder", "name", "autocomplete"], os = { key: 0 }, as = { key: 1 }, ns = {
|
|
4890
4893
|
key: 3,
|
|
4891
4894
|
class: "cl-max-h-[2.75rem] cl-pb-0.5"
|
|
4892
|
-
},
|
|
4895
|
+
}, rs = {
|
|
4893
4896
|
key: 0,
|
|
4894
4897
|
class: "cl-bg-primary-lighter cl-px-2 cl-rounded-md cl-text-center cl-text-secondary-light cl-text-xs cl-w-auto cl-whitespace-pre-line"
|
|
4895
|
-
},
|
|
4898
|
+
}, ss = {
|
|
4896
4899
|
key: 1,
|
|
4897
4900
|
class: "cl-bg-danger-light cl-px-2 cl-rounded-md cl-text-center cl-text-danger-default cl-text-xs cl-w-auto cl-whitespace-pre-line"
|
|
4898
|
-
},
|
|
4901
|
+
}, is = /* @__PURE__ */ F({
|
|
4899
4902
|
inheritAttrs: !1,
|
|
4900
4903
|
__name: "cl-ui-input",
|
|
4901
4904
|
props: {
|
|
@@ -4931,17 +4934,17 @@ const _r = { class: "cl-flex cl-justify-between" }, Yr = { class: "cl-w-full" },
|
|
|
4931
4934
|
},
|
|
4932
4935
|
emits: ["update:model-value", "click", "focus", "input", "change", "validated"],
|
|
4933
4936
|
setup(t, { expose: o, emit: l }) {
|
|
4934
|
-
const e = t,
|
|
4937
|
+
const e = t, n = l, a = I(null), d = I(null), i = I(!1), s = I(!1), r = S(() => {
|
|
4935
4938
|
var H;
|
|
4936
4939
|
let y = e.isRequired;
|
|
4937
|
-
return
|
|
4938
|
-
}), u = S(() => e.placeholderText.trim() !== "" ? e.placeholderText : e.label), c =
|
|
4940
|
+
return s.value && ((H = m.value) == null ? void 0 : H.toString().trim()) === "" && e.requiredText.trim() !== "" && (y = !1), !e.hideRequiredAsterisk && y;
|
|
4941
|
+
}), u = S(() => e.placeholderText.trim() !== "" ? e.placeholderText : e.label), c = I(0), m = S({
|
|
4939
4942
|
get: () => e.modelValue,
|
|
4940
4943
|
set: (y) => k(y, !1)
|
|
4941
4944
|
}), b = S({
|
|
4942
4945
|
get: () => e.modelValue,
|
|
4943
4946
|
set: (y) => se(y)
|
|
4944
|
-
}), h = S(() => typeof e.min == "number" ? e.min.toString() : e.min), $ = S(() => typeof e.max == "number" ? e.max.toString() : e.max), T = S(() => typeof e.min == "number" || e.min === null ? e.min : parseFloat(e.min)), O = S(() => typeof e.max == "number" || e.max === null ? e.max : parseFloat(e.max)), L = S(() => e.messageWhenValid.trim() !== "" ? e.messageWhenValid : ""), D =
|
|
4947
|
+
}), h = S(() => typeof e.min == "number" ? e.min.toString() : e.min), $ = S(() => typeof e.max == "number" ? e.max.toString() : e.max), T = S(() => typeof e.min == "number" || e.min === null ? e.min : parseFloat(e.min)), O = S(() => typeof e.max == "number" || e.max === null ? e.max : parseFloat(e.max)), L = S(() => e.messageWhenValid.trim() !== "" ? e.messageWhenValid : ""), D = I(!0), W = I(!0), Y = I([]), E = S(() => {
|
|
4945
4948
|
var y, H;
|
|
4946
4949
|
return [
|
|
4947
4950
|
...((y = Y.value) == null ? void 0 : y.filter((K) => ((K == null ? void 0 : K.length) ?? 0) > 0)) ?? [],
|
|
@@ -4958,10 +4961,10 @@ const _r = { class: "cl-flex cl-justify-between" }, Yr = { class: "cl-w-full" },
|
|
|
4958
4961
|
...e.currencyOptions
|
|
4959
4962
|
}));
|
|
4960
4963
|
async function se(y) {
|
|
4961
|
-
e.validateOn === "input" && await R(y),
|
|
4964
|
+
e.validateOn === "input" && await R(y), n("update:model-value", y);
|
|
4962
4965
|
}
|
|
4963
4966
|
async function k(y, H) {
|
|
4964
|
-
e.onInputFunction !== void 0 && (y = e.onInputFunction(y)), e.validateOn === "change" && (W.value = !1), (H || e.validateOn === "input") && await R(y),
|
|
4967
|
+
e.onInputFunction !== void 0 && (y = e.onInputFunction(y)), e.validateOn === "change" && (W.value = !1), (H || e.validateOn === "input") && await R(y), n("update:model-value", y);
|
|
4965
4968
|
}
|
|
4966
4969
|
function R(y) {
|
|
4967
4970
|
const H = {
|
|
@@ -4976,7 +4979,7 @@ const _r = { class: "cl-flex cl-justify-between" }, Yr = { class: "cl-w-full" },
|
|
|
4976
4979
|
];
|
|
4977
4980
|
return (typeof y == "string" || typeof y == "number") && (K.push(aa(e.min, e.inputType, e.label, y, e.timeZone)), K.push(na(e.max, e.inputType, e.label, y, e.timeZone))), e.isRequired && K.push(ra(e.label, y)), e.inputType === "email" && typeof y == "string" && K.push(sa(e.label, y)), Promise.all(K).then((Oe) => {
|
|
4978
4981
|
const nt = [...Oe.map((Ge) => Ge.message)], wl = Oe.some((Ge) => Ge.message.length > 0 && Ge.valid === !1) || e.externalErrors.length > 0;
|
|
4979
|
-
W.value = !0, wl ? (Y.value = nt,
|
|
4982
|
+
W.value = !0, wl ? (Y.value = nt, n("validated", !1, y)) : (Y.value = [], n("validated", !0, y)), D.value = !wl;
|
|
4980
4983
|
});
|
|
4981
4984
|
}
|
|
4982
4985
|
function w() {
|
|
@@ -4984,7 +4987,7 @@ const _r = { class: "cl-flex cl-justify-between" }, Yr = { class: "cl-w-full" },
|
|
|
4984
4987
|
return e.inputType === "color" && m.value && (e.disabled ? y = "background: #999999" : y = `background: ${m.value};`), y;
|
|
4985
4988
|
}
|
|
4986
4989
|
function U(y) {
|
|
4987
|
-
je(e.inputType) ? (y.preventDefault(),
|
|
4990
|
+
je(e.inputType) ? (y.preventDefault(), n("click", y)) : e.inputType === "checkbox" && n("click", y);
|
|
4988
4991
|
}
|
|
4989
4992
|
function B(y) {
|
|
4990
4993
|
if (a.value) {
|
|
@@ -4992,7 +4995,7 @@ const _r = { class: "cl-flex cl-justify-between" }, Yr = { class: "cl-w-full" },
|
|
|
4992
4995
|
const H = {
|
|
4993
4996
|
target: a.value
|
|
4994
4997
|
};
|
|
4995
|
-
|
|
4998
|
+
n("input", H, a.value.valueAsNumber), n("change", y, a.value.valueAsNumber);
|
|
4996
4999
|
}
|
|
4997
5000
|
}
|
|
4998
5001
|
function P(y) {
|
|
@@ -5001,14 +5004,14 @@ const _r = { class: "cl-flex cl-justify-between" }, Yr = { class: "cl-w-full" },
|
|
|
5001
5004
|
const H = {
|
|
5002
5005
|
target: a.value
|
|
5003
5006
|
};
|
|
5004
|
-
|
|
5007
|
+
n("input", H, a.value.valueAsNumber), n("change", y, a.value.valueAsNumber);
|
|
5005
5008
|
}
|
|
5006
5009
|
}
|
|
5007
5010
|
function C(y) {
|
|
5008
|
-
|
|
5011
|
+
i.value = y;
|
|
5009
5012
|
}
|
|
5010
5013
|
async function Z() {
|
|
5011
|
-
|
|
5014
|
+
s.value = !0, C(!1), e.validateOn === "change" && await R(m.value);
|
|
5012
5015
|
}
|
|
5013
5016
|
function Q() {
|
|
5014
5017
|
document.querySelectorAll(":-webkit-autofill").length < 1 && c.value++;
|
|
@@ -5019,7 +5022,7 @@ const _r = { class: "cl-flex cl-justify-between" }, Yr = { class: "cl-w-full" },
|
|
|
5019
5022
|
async function ie(y, H) {
|
|
5020
5023
|
if (y) {
|
|
5021
5024
|
const K = e.inputType === "currency" ? H ?? 0 : Il(y, e.inputType);
|
|
5022
|
-
e.validateOn === "change" && await R(K),
|
|
5025
|
+
e.validateOn === "change" && await R(K), n("change", y, K);
|
|
5023
5026
|
}
|
|
5024
5027
|
}
|
|
5025
5028
|
async function he() {
|
|
@@ -5028,7 +5031,7 @@ const _r = { class: "cl-flex cl-justify-between" }, Yr = { class: "cl-w-full" },
|
|
|
5028
5031
|
return We(() => {
|
|
5029
5032
|
e.validateImmediately && k(e.modelValue, !0);
|
|
5030
5033
|
}), ae(() => e.isRequired, () => k(e.modelValue, !0)), ae(() => e.externalErrors, async () => {
|
|
5031
|
-
await R(m.value),
|
|
5034
|
+
await R(m.value), n("update:model-value", m.value);
|
|
5032
5035
|
}), ae(
|
|
5033
5036
|
() => e.modelValue,
|
|
5034
5037
|
() => {
|
|
@@ -5051,15 +5054,15 @@ const _r = { class: "cl-flex cl-justify-between" }, Yr = { class: "cl-w-full" },
|
|
|
5051
5054
|
onMouseenter: H[13] || (H[13] = (K) => C(!0)),
|
|
5052
5055
|
onMouseleave: H[14] || (H[14] = (K) => C(!1))
|
|
5053
5056
|
}, [
|
|
5054
|
-
f("div",
|
|
5055
|
-
f("div",
|
|
5056
|
-
_(f("label", { class: "cl-block cl-mb-1 cl-text-grey-4 cl-text-xs cl-tracking-widest" },
|
|
5057
|
+
f("div", Yr, [
|
|
5058
|
+
f("div", Jr, [
|
|
5059
|
+
_(f("label", { class: "cl-block cl-mb-1 cl-text-grey-4 cl-text-xs cl-tracking-widest" }, V(y.label), 513), [
|
|
5057
5060
|
[oe, y.showLabel && y.label !== ""]
|
|
5058
5061
|
])
|
|
5059
5062
|
]),
|
|
5060
|
-
|
|
5063
|
+
r.value ? (p(), v("label", Xr, " * ")) : y.isRequired && y.requiredText.length ? (p(), v("label", es, V(y.requiredText), 1)) : M("", !0)
|
|
5061
5064
|
]),
|
|
5062
|
-
y.inputType !== "range" && y.inputType !== "currency" && !g(Vl)(y.inputType) ? (p(), v("div",
|
|
5065
|
+
y.inputType !== "range" && y.inputType !== "currency" && !g(Vl)(y.inputType) ? (p(), v("div", ls, [
|
|
5063
5066
|
_(f("input", ee({
|
|
5064
5067
|
ref_key: "inputElement",
|
|
5065
5068
|
ref: a,
|
|
@@ -5087,14 +5090,14 @@ const _r = { class: "cl-flex cl-justify-between" }, Yr = { class: "cl-w-full" },
|
|
|
5087
5090
|
name: y.group,
|
|
5088
5091
|
autocomplete: y.autocomplete,
|
|
5089
5092
|
onClick: H[1] || (H[1] = (K) => U(K)),
|
|
5090
|
-
onFocus: H[2] || (H[2] = (K) =>
|
|
5093
|
+
onFocus: H[2] || (H[2] = (K) => n("focus")),
|
|
5091
5094
|
onBlur: ne(he, ["self"]),
|
|
5092
5095
|
onMousewheelPassive: re,
|
|
5093
5096
|
onInput: H[3] || (H[3] = (K) => {
|
|
5094
|
-
|
|
5097
|
+
n("input", K, g(Il)(K, y.inputType));
|
|
5095
5098
|
}),
|
|
5096
5099
|
onChange: ie
|
|
5097
|
-
}), null, 16,
|
|
5100
|
+
}), null, 16, ts), [
|
|
5098
5101
|
[Rl, m.value]
|
|
5099
5102
|
]),
|
|
5100
5103
|
q(Se, {
|
|
@@ -5102,7 +5105,7 @@ const _r = { class: "cl-flex cl-justify-between" }, Yr = { class: "cl-w-full" },
|
|
|
5102
5105
|
duration: 300
|
|
5103
5106
|
}, {
|
|
5104
5107
|
default: A(() => [
|
|
5105
|
-
y.inputType === "number" && !y.disabled && y.showArrows ? _((p(), v("div",
|
|
5108
|
+
y.inputType === "number" && !y.disabled && y.showArrows ? _((p(), v("div", os, [
|
|
5106
5109
|
q(g(x), {
|
|
5107
5110
|
icon: "ph:caret-up-bold",
|
|
5108
5111
|
class: "cl-absolute cl-bg-link-default cl-right-1 cl-rounded-full cl-text-sm cl-text-white cl-top-1 hover:cl-bg-link-light hover:cl-cursor-pointer",
|
|
@@ -5118,13 +5121,13 @@ const _r = { class: "cl-flex cl-justify-between" }, Yr = { class: "cl-w-full" },
|
|
|
5118
5121
|
}, ["prevent"]))
|
|
5119
5122
|
})
|
|
5120
5123
|
], 512)), [
|
|
5121
|
-
[oe,
|
|
5124
|
+
[oe, i.value]
|
|
5122
5125
|
]) : M("", !0)
|
|
5123
5126
|
]),
|
|
5124
5127
|
_: 1
|
|
5125
5128
|
})
|
|
5126
|
-
])) : y.inputType === "currency" ? (p(), v("div",
|
|
5127
|
-
q(
|
|
5129
|
+
])) : y.inputType === "currency" ? (p(), v("div", as, [
|
|
5130
|
+
q(Br, ee({
|
|
5128
5131
|
ref_key: "currencyInputRef",
|
|
5129
5132
|
ref: d,
|
|
5130
5133
|
modelValue: m.value,
|
|
@@ -5140,10 +5143,10 @@ const _r = { class: "cl-flex cl-justify-between" }, Yr = { class: "cl-w-full" },
|
|
|
5140
5143
|
step: y.step,
|
|
5141
5144
|
"currency-options": J.value,
|
|
5142
5145
|
onChange: H[7] || (H[7] = (K, Oe) => ie(K, Oe)),
|
|
5143
|
-
onFocus: H[8] || (H[8] = (K) =>
|
|
5146
|
+
onFocus: H[8] || (H[8] = (K) => n("focus")),
|
|
5144
5147
|
onBlur: Z
|
|
5145
5148
|
}), null, 16, ["modelValue", "disabled", "placeholder", "is-valid", "highlight-when-valid", "input-specific-classes", "group", "step", "currency-options"])
|
|
5146
|
-
])) : g(Vl)(y.inputType) ? (p(), j(g(
|
|
5149
|
+
])) : g(Vl)(y.inputType) ? (p(), j(g(Ur), ee({ key: 2 }, y.$attrs, {
|
|
5147
5150
|
ref_key: "inputElement",
|
|
5148
5151
|
ref: a,
|
|
5149
5152
|
date: b.value,
|
|
@@ -5155,7 +5158,7 @@ const _r = { class: "cl-flex cl-justify-between" }, Yr = { class: "cl-w-full" },
|
|
|
5155
5158
|
}],
|
|
5156
5159
|
disabled: y.disabled,
|
|
5157
5160
|
required: y.isRequired,
|
|
5158
|
-
type: g(
|
|
5161
|
+
type: g(_r)(y.inputType),
|
|
5159
5162
|
"time-zone": y.timeZone,
|
|
5160
5163
|
min: h.value,
|
|
5161
5164
|
max: $.value,
|
|
@@ -5164,9 +5167,9 @@ const _r = { class: "cl-flex cl-justify-between" }, Yr = { class: "cl-w-full" },
|
|
|
5164
5167
|
"quick-date-scope": y.quickDateScope,
|
|
5165
5168
|
"date-format-locale": y.dateFormatLocale,
|
|
5166
5169
|
onBlur: ne(Z, ["self"]),
|
|
5167
|
-
onFocus: H[10] || (H[10] = (K) =>
|
|
5168
|
-
}), null, 16, ["date", "class", "disabled", "required", "type", "time-zone", "min", "max", "placeholder", "initial-date", "quick-date-scope", "date-format-locale"])) : y.inputType === "range" && typeof m.value == "number" ? (p(), v("div",
|
|
5169
|
-
q(g(
|
|
5170
|
+
onFocus: H[10] || (H[10] = (K) => n("focus"))
|
|
5171
|
+
}), null, 16, ["date", "class", "disabled", "required", "type", "time-zone", "min", "max", "placeholder", "initial-date", "quick-date-scope", "date-format-locale"])) : y.inputType === "range" && typeof m.value == "number" ? (p(), v("div", ns, [
|
|
5172
|
+
q(g(Kr), {
|
|
5170
5173
|
ref_key: "inputElement",
|
|
5171
5174
|
ref: a,
|
|
5172
5175
|
value: m.value,
|
|
@@ -5178,15 +5181,15 @@ const _r = { class: "cl-flex cl-justify-between" }, Yr = { class: "cl-w-full" },
|
|
|
5178
5181
|
"enforce-step": !0,
|
|
5179
5182
|
disabled: y.disabled,
|
|
5180
5183
|
onBlur: ne(Z, ["self"]),
|
|
5181
|
-
onFocus: H[12] || (H[12] = (K) =>
|
|
5184
|
+
onFocus: H[12] || (H[12] = (K) => n("focus"))
|
|
5182
5185
|
}, null, 8, ["value", "min", "max", "step", "placeholder", "disabled"])
|
|
5183
5186
|
])) : M("", !0)
|
|
5184
5187
|
], 32),
|
|
5185
|
-
D.value && L.value && W.value ? (p(), v("div",
|
|
5186
|
-
!D.value && E.value.length > 0 && y.showValidationMessages && W.value ? (p(), v("div",
|
|
5188
|
+
D.value && L.value && W.value ? (p(), v("div", rs, V(L.value), 1)) : M("", !0),
|
|
5189
|
+
!D.value && E.value.length > 0 && y.showValidationMessages && W.value ? (p(), v("div", ss, V(E.value), 1)) : M("", !0)
|
|
5187
5190
|
], 16));
|
|
5188
5191
|
}
|
|
5189
|
-
}),
|
|
5192
|
+
}), cs = /* @__PURE__ */ we(is, [["__scopeId", "data-v-2373f106"]]), us = [
|
|
5190
5193
|
"button",
|
|
5191
5194
|
"checkbox",
|
|
5192
5195
|
"color",
|
|
@@ -5208,24 +5211,24 @@ const _r = { class: "cl-flex cl-justify-between" }, Yr = { class: "cl-w-full" },
|
|
|
5208
5211
|
function il(t) {
|
|
5209
5212
|
return /[a-z]{2}-[A-Z]{2}/gm.test(t.localeCode);
|
|
5210
5213
|
}
|
|
5211
|
-
function
|
|
5214
|
+
function ds(t) {
|
|
5212
5215
|
let o = Array.isArray(t);
|
|
5213
5216
|
if (o) {
|
|
5214
5217
|
for (const l of t)
|
|
5215
|
-
if (!
|
|
5218
|
+
if (!ps(l)) {
|
|
5216
5219
|
o = !1;
|
|
5217
5220
|
break;
|
|
5218
5221
|
}
|
|
5219
5222
|
}
|
|
5220
5223
|
return o;
|
|
5221
5224
|
}
|
|
5222
|
-
function
|
|
5225
|
+
function ps(t) {
|
|
5223
5226
|
return typeof t.name == "string" && typeof t.nativeName == "string" && typeof t.localeCode == "string";
|
|
5224
5227
|
}
|
|
5225
|
-
const
|
|
5228
|
+
const fs = {
|
|
5226
5229
|
key: 0,
|
|
5227
5230
|
class: "cl-flex cl-relative cl-select-none cl-w-auto cl-z-30"
|
|
5228
|
-
},
|
|
5231
|
+
}, ms = { class: "cl-absolute cl-bg-white cl-border cl-border-grey-0 cl-overflow-hidden cl-right-0 cl-rounded cl-shadow-xl cl-text-black cl-top-6 cl-z-30" }, gs = ["data-localename", "data-localecode", "onClick"], vs = { class: "cl-text-xs" }, bs = /* @__PURE__ */ F({
|
|
5229
5232
|
__name: "cl-ui-language-switcher",
|
|
5230
5233
|
props: {
|
|
5231
5234
|
supportedLanguages: {},
|
|
@@ -5234,43 +5237,43 @@ const ps = {
|
|
|
5234
5237
|
},
|
|
5235
5238
|
emits: ["language-select"],
|
|
5236
5239
|
setup(t, { emit: o }) {
|
|
5237
|
-
const l = t, e = o, { locale:
|
|
5238
|
-
function
|
|
5240
|
+
const l = t, e = o, { locale: n } = ue(), a = I(!1), d = S(() => l.supportedLanguages.find((u) => u.localeCode === n.value) ?? s(l.supportedLanguages, n.value) ?? l.defaultLangauge), i = S(() => l.supportedLanguages.filter((u) => il(u)).sort((u, c) => u.nativeName > c.nativeName ? 1 : c.nativeName > u.nativeName ? -1 : 0));
|
|
5241
|
+
function s(u, c) {
|
|
5239
5242
|
const m = c.split("-")[0];
|
|
5240
5243
|
return u.find((h) => h.localeCode.split("-")[0] === m) ?? null;
|
|
5241
5244
|
}
|
|
5242
|
-
function
|
|
5245
|
+
function r() {
|
|
5243
5246
|
l.disabled || (a.value = !a.value);
|
|
5244
5247
|
}
|
|
5245
5248
|
return ae(() => l.disabled, (u) => {
|
|
5246
5249
|
u && (a.value = !1);
|
|
5247
|
-
}), (u, c) => d.value !== null && g(il)(d.value) ? (p(), v("div",
|
|
5250
|
+
}), (u, c) => d.value !== null && g(il)(d.value) ? (p(), v("div", fs, [
|
|
5248
5251
|
f("div", {
|
|
5249
5252
|
class: z(["cl-flex cl-items-center", {
|
|
5250
5253
|
"cl-cursor-pointer": !u.disabled
|
|
5251
5254
|
}]),
|
|
5252
|
-
onClick:
|
|
5255
|
+
onClick: r
|
|
5253
5256
|
}, [
|
|
5254
5257
|
f("span", {
|
|
5255
5258
|
class: z(["cl-font-semibold cl-text-xs", {
|
|
5256
5259
|
"cl-opacity-50": u.disabled
|
|
5257
5260
|
}])
|
|
5258
|
-
},
|
|
5261
|
+
}, V(d.value.nativeName), 3)
|
|
5259
5262
|
], 2),
|
|
5260
5263
|
q(Se, { name: "fade" }, {
|
|
5261
5264
|
default: A(() => [
|
|
5262
|
-
_(f("div",
|
|
5263
|
-
(p(!0), v(X, null, de(
|
|
5265
|
+
_(f("div", ms, [
|
|
5266
|
+
(p(!0), v(X, null, de(i.value, (m, b) => (p(), v("div", {
|
|
5264
5267
|
key: b,
|
|
5265
5268
|
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",
|
|
5266
5269
|
"data-localename": m.name,
|
|
5267
5270
|
"data-localecode": m.localeCode,
|
|
5268
5271
|
onClick: (h) => {
|
|
5269
|
-
|
|
5272
|
+
n.value = m.localeCode, r(), e("language-select", m.localeCode);
|
|
5270
5273
|
}
|
|
5271
5274
|
}, [
|
|
5272
|
-
f("span",
|
|
5273
|
-
], 8,
|
|
5275
|
+
f("span", vs, V(m.nativeName), 1)
|
|
5276
|
+
], 8, gs))), 128))
|
|
5274
5277
|
], 512), [
|
|
5275
5278
|
[oe, a.value]
|
|
5276
5279
|
])
|
|
@@ -5279,13 +5282,13 @@ const ps = {
|
|
|
5279
5282
|
})
|
|
5280
5283
|
])) : M("", !0);
|
|
5281
5284
|
}
|
|
5282
|
-
}),
|
|
5285
|
+
}), hs = { class: "cl-relative" }, ys = { class: "cl-h-full cl-z-0 xl:cl-h-screen" }, ws = { class: "cl-absolute cl-bg-secondary-default cl-gap-y-1 cl-grid cl-grid-cols-1 cl-left-0 cl-opacity-95 cl-p-6 cl-top-0 cl-w-full cl-z-10 lg:cl-gap-x-1 lg:cl-grid-cols-10 lg:cl-p-10" }, ks = { class: "cl-col-span-10 lg:cl-col-span-3" }, $s = {
|
|
5283
5286
|
key: 0,
|
|
5284
5287
|
class: "cl-col-span-10 cl-flex cl-items-start cl-justify-end cl-text-white lg:cl-col-span-1 lg:cl-p-2"
|
|
5285
|
-
},
|
|
5288
|
+
}, Cs = { class: "cl-col-span-3" }, Ts = { class: "cl-relative cl-text-grey-4" }, Ss = { class: "cl-w-full" }, qs = /* @__PURE__ */ f("span", null, null, -1), Os = {
|
|
5286
5289
|
key: 0,
|
|
5287
5290
|
class: "cl-bg-primary-lighter cl-mt-1 cl-rounded-md cl-text-center cl-text-secondary-default cl-text-xs cl-w-full"
|
|
5288
|
-
},
|
|
5291
|
+
}, Ds = { class: "cl-col-span-3" }, As = { class: "cl-relative cl-text-grey-4" }, Es = /* @__PURE__ */ f("span", null, null, -1), Vs = { class: "cl-col-span-10 cl-emphasis-danger cl-mt-10 cl-p-3 cl-rounded-md cl-text-sm md:cl-mt-3" }, Is = /* @__PURE__ */ F({
|
|
5289
5292
|
__name: "cl-ui-login",
|
|
5290
5293
|
props: {
|
|
5291
5294
|
errors: { default: () => [] },
|
|
@@ -5293,10 +5296,10 @@ const ps = {
|
|
|
5293
5296
|
},
|
|
5294
5297
|
emits: ["login", "update:errors"],
|
|
5295
5298
|
setup(t, { emit: o }) {
|
|
5296
|
-
const l = o, { t: e } = ue(),
|
|
5297
|
-
function
|
|
5299
|
+
const l = o, { t: e } = ue(), n = I(""), a = I(""), d = I("password"), i = S(() => pt(n.value)), s = S(() => n.value ? i.value ? null : [e("input.valueNotValidEmail", { label: e("login.email") })] : []);
|
|
5300
|
+
function r() {
|
|
5298
5301
|
const c = {
|
|
5299
|
-
username:
|
|
5302
|
+
username: n.value,
|
|
5300
5303
|
password: a.value
|
|
5301
5304
|
};
|
|
5302
5305
|
l("login", c);
|
|
@@ -5305,17 +5308,17 @@ const ps = {
|
|
|
5305
5308
|
l("update:errors", []);
|
|
5306
5309
|
}
|
|
5307
5310
|
return ae([
|
|
5308
|
-
|
|
5311
|
+
n,
|
|
5309
5312
|
a
|
|
5310
|
-
], u), (c, m) => (p(), v("div",
|
|
5311
|
-
f("div",
|
|
5313
|
+
], u), (c, m) => (p(), v("div", hs, [
|
|
5314
|
+
f("div", ys, [
|
|
5312
5315
|
N(c.$slots, "background")
|
|
5313
5316
|
]),
|
|
5314
|
-
f("form",
|
|
5315
|
-
f("div",
|
|
5317
|
+
f("form", ws, [
|
|
5318
|
+
f("div", ks, [
|
|
5316
5319
|
N(c.$slots, "logo")
|
|
5317
5320
|
]),
|
|
5318
|
-
c.$slots["language-switcher"] ? (p(), v("div",
|
|
5321
|
+
c.$slots["language-switcher"] ? (p(), v("div", $s, [
|
|
5319
5322
|
N(c.$slots, "language-switcher")
|
|
5320
5323
|
])) : M("", !0),
|
|
5321
5324
|
f("div", {
|
|
@@ -5324,39 +5327,39 @@ const ps = {
|
|
|
5324
5327
|
"cl-col-span-6": c.$slots["language-switcher"]
|
|
5325
5328
|
}])
|
|
5326
5329
|
}, [
|
|
5327
|
-
f("div",
|
|
5328
|
-
f("div",
|
|
5330
|
+
f("div", Cs, [
|
|
5331
|
+
f("div", Ts, [
|
|
5329
5332
|
q(g(x), {
|
|
5330
5333
|
class: "cl-absolute cl-left-3 cl-top-3 cl-z-10",
|
|
5331
5334
|
icon: "ph:user",
|
|
5332
5335
|
size: 18
|
|
5333
5336
|
}),
|
|
5334
|
-
f("div",
|
|
5337
|
+
f("div", Ss, [
|
|
5335
5338
|
q(Ve, {
|
|
5336
5339
|
id: "cl-ui-login-usernameinput",
|
|
5337
|
-
modelValue:
|
|
5338
|
-
"onUpdate:modelValue": m[0] || (m[0] = (b) =>
|
|
5340
|
+
modelValue: n.value,
|
|
5341
|
+
"onUpdate:modelValue": m[0] || (m[0] = (b) => n.value = b),
|
|
5339
5342
|
modelModifiers: { trim: !0 },
|
|
5340
5343
|
class: z(["cl-border-2 cl-outline-none cl-p-2 cl-pl-9 cl-text-grey-5 cl-text-sm", {
|
|
5341
|
-
"!cl-border-primary-default hover:!cl-border-grey-3 focus-within:!cl-border-link-light":
|
|
5342
|
-
"!cl-border-danger-dark hover:!cl-border-grey-3 focus-within:!cl-border-link-light":
|
|
5344
|
+
"!cl-border-primary-default hover:!cl-border-grey-3 focus-within:!cl-border-link-light": n.value !== "" && i.value,
|
|
5345
|
+
"!cl-border-danger-dark hover:!cl-border-grey-3 focus-within:!cl-border-link-light": n.value !== "" && !i.value
|
|
5343
5346
|
}]),
|
|
5344
|
-
errors:
|
|
5347
|
+
errors: s.value,
|
|
5345
5348
|
type: "email",
|
|
5346
5349
|
placeholder: g(e)("login.email"),
|
|
5347
5350
|
autocomplete: "username"
|
|
5348
5351
|
}, {
|
|
5349
5352
|
default: A(() => [
|
|
5350
|
-
|
|
5353
|
+
qs
|
|
5351
5354
|
]),
|
|
5352
5355
|
_: 1
|
|
5353
5356
|
}, 8, ["modelValue", "class", "errors", "placeholder"]),
|
|
5354
|
-
|
|
5357
|
+
i.value ? (p(), v("div", Os, V(g(e)("login.validEmail")), 1)) : M("", !0)
|
|
5355
5358
|
])
|
|
5356
5359
|
])
|
|
5357
5360
|
]),
|
|
5358
|
-
f("div",
|
|
5359
|
-
f("div",
|
|
5361
|
+
f("div", Ds, [
|
|
5362
|
+
f("div", As, [
|
|
5360
5363
|
q(g(x), {
|
|
5361
5364
|
class: "cl-absolute cl-left-3 cl-top-3 cl-z-10",
|
|
5362
5365
|
icon: "ph:lock",
|
|
@@ -5390,7 +5393,7 @@ const ps = {
|
|
|
5390
5393
|
autocomplete: "current-password"
|
|
5391
5394
|
}, {
|
|
5392
5395
|
default: A(() => [
|
|
5393
|
-
|
|
5396
|
+
Es
|
|
5394
5397
|
]),
|
|
5395
5398
|
_: 1
|
|
5396
5399
|
}, 8, ["modelValue", "class", "type", "placeholder"])
|
|
@@ -5406,11 +5409,11 @@ const ps = {
|
|
|
5406
5409
|
class: "cl-w-full",
|
|
5407
5410
|
colour: "blue",
|
|
5408
5411
|
loading: c.loading,
|
|
5409
|
-
disabled: !
|
|
5410
|
-
onClick: ne(
|
|
5412
|
+
disabled: !i.value || a.value === "",
|
|
5413
|
+
onClick: ne(r, ["prevent"])
|
|
5411
5414
|
}, {
|
|
5412
5415
|
default: A(() => [
|
|
5413
|
-
ce(
|
|
5416
|
+
ce(V(g(e)("login.login")), 1)
|
|
5414
5417
|
]),
|
|
5415
5418
|
_: 1
|
|
5416
5419
|
}, 8, ["loading", "disabled"])
|
|
@@ -5420,12 +5423,12 @@ const ps = {
|
|
|
5420
5423
|
default: A(() => {
|
|
5421
5424
|
var b;
|
|
5422
5425
|
return [
|
|
5423
|
-
_(f("span",
|
|
5426
|
+
_(f("span", Vs, [
|
|
5424
5427
|
(p(!0), v(X, null, de(c.errors, (h, $) => (p(), v("div", {
|
|
5425
5428
|
id: "cl-ui-login-errors",
|
|
5426
5429
|
key: $,
|
|
5427
5430
|
class: "cl-font-semibold"
|
|
5428
|
-
},
|
|
5431
|
+
}, V(h), 1))), 128))
|
|
5429
5432
|
], 512), [
|
|
5430
5433
|
[oe, (b = c.errors) == null ? void 0 : b.length]
|
|
5431
5434
|
])
|
|
@@ -5436,64 +5439,64 @@ const ps = {
|
|
|
5436
5439
|
])
|
|
5437
5440
|
]));
|
|
5438
5441
|
}
|
|
5439
|
-
}),
|
|
5442
|
+
}), Rs = [
|
|
5440
5443
|
"x-small",
|
|
5441
5444
|
"small",
|
|
5442
5445
|
"medium",
|
|
5443
5446
|
"large"
|
|
5444
|
-
],
|
|
5447
|
+
], Ns = [
|
|
5445
5448
|
"primary",
|
|
5446
5449
|
"secondary",
|
|
5447
5450
|
"white"
|
|
5448
|
-
],
|
|
5451
|
+
], Ms = {
|
|
5449
5452
|
key: 0,
|
|
5450
5453
|
class: "cl-h-0 cl-w-0"
|
|
5451
|
-
},
|
|
5454
|
+
}, Us = { class: "cl-relative cl-w-full" }, zs = /* @__PURE__ */ F({
|
|
5452
5455
|
__name: "cl-ui-navigation",
|
|
5453
5456
|
props: {
|
|
5454
5457
|
colour: { default: "default" }
|
|
5455
5458
|
},
|
|
5456
5459
|
emits: ["pinned-state", "open-state"],
|
|
5457
5460
|
setup(t, { expose: o, emit: l }) {
|
|
5458
|
-
const e = l,
|
|
5461
|
+
const e = l, n = I([]), a = S(() => n.value.filter((T) => T.open === !0).length > 0);
|
|
5459
5462
|
function d(T) {
|
|
5460
|
-
let O =
|
|
5463
|
+
let O = n.value.find((L) => L.id === T);
|
|
5461
5464
|
return O || (O = {
|
|
5462
5465
|
id: T,
|
|
5463
5466
|
open: !1
|
|
5464
|
-
},
|
|
5467
|
+
}, n.value.push(O)), O.open;
|
|
5465
5468
|
}
|
|
5466
|
-
function
|
|
5467
|
-
const O =
|
|
5469
|
+
function i(T) {
|
|
5470
|
+
const O = n.value.find((D) => D.id === T);
|
|
5468
5471
|
let L;
|
|
5469
|
-
O && (O.open = !O.open, O.open && (L = O.id),
|
|
5472
|
+
O && (O.open = !O.open, O.open && (L = O.id), n.value.forEach((D) => {
|
|
5470
5473
|
D.id !== T && (D.open = !1);
|
|
5471
5474
|
})), e("open-state", !!(O != null && O.open), L);
|
|
5472
5475
|
}
|
|
5473
|
-
const
|
|
5476
|
+
const s = wt();
|
|
5474
5477
|
ae(
|
|
5475
|
-
() =>
|
|
5478
|
+
() => s,
|
|
5476
5479
|
() => {
|
|
5477
|
-
|
|
5480
|
+
r.value = !1;
|
|
5478
5481
|
},
|
|
5479
5482
|
{
|
|
5480
5483
|
deep: !0
|
|
5481
5484
|
}
|
|
5482
5485
|
);
|
|
5483
|
-
const
|
|
5486
|
+
const r = I(!1), u = I(!1), { start: c } = Fl(() => u.value = !1, 100);
|
|
5484
5487
|
function m() {
|
|
5485
|
-
|
|
5488
|
+
r.value = !r.value, e("pinned-state", r.value), u.value = !0, c();
|
|
5486
5489
|
}
|
|
5487
|
-
const b =
|
|
5490
|
+
const b = I();
|
|
5488
5491
|
function h(T) {
|
|
5489
|
-
m(), typeof T == "number" &&
|
|
5492
|
+
m(), typeof T == "number" && i(T);
|
|
5490
5493
|
}
|
|
5491
5494
|
function $() {
|
|
5492
|
-
|
|
5495
|
+
r.value === !1 && a.value === !0 && (n.value.forEach((T) => {
|
|
5493
5496
|
T.open = !1;
|
|
5494
5497
|
}), e("open-state", !1, void 0));
|
|
5495
5498
|
}
|
|
5496
|
-
return
|
|
5499
|
+
return ll(b, $), o({
|
|
5497
5500
|
closeNavigation: $,
|
|
5498
5501
|
restorePinnedNavigation: h
|
|
5499
5502
|
}), (T, O) => (p(), v("div", {
|
|
@@ -5508,23 +5511,23 @@ const ps = {
|
|
|
5508
5511
|
"cl-bg-blue-dark": T.colour === "secondary"
|
|
5509
5512
|
}])
|
|
5510
5513
|
}, [
|
|
5511
|
-
N(T.$slots, "icon", ee({ navcolour: T.colour }, { groupIsOpen: d, toggleOpen:
|
|
5514
|
+
N(T.$slots, "icon", ee({ navcolour: T.colour }, { groupIsOpen: d, toggleOpen: i }), void 0, !0)
|
|
5512
5515
|
], 2),
|
|
5513
|
-
u.value ? (p(), v("div",
|
|
5516
|
+
u.value ? (p(), v("div", Ms)) : M("", !0),
|
|
5514
5517
|
q(Se, { name: "slide-right" }, {
|
|
5515
5518
|
default: A(() => [
|
|
5516
5519
|
_(f("div", {
|
|
5517
5520
|
class: z(["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-30 xl:cl-pb-0", {
|
|
5518
|
-
"cl-relative":
|
|
5519
|
-
"cl-absolute cl-left-20 cl-shadow-lg": !
|
|
5521
|
+
"cl-relative": r.value,
|
|
5522
|
+
"cl-absolute cl-left-20 cl-shadow-lg": !r.value
|
|
5520
5523
|
}])
|
|
5521
5524
|
}, [
|
|
5522
|
-
f("div",
|
|
5525
|
+
f("div", Us, [
|
|
5523
5526
|
f("span", {
|
|
5524
5527
|
class: "cl-absolute cl-cursor-pointer cl-hidden cl-right-0 cl-top-1.5 lg:cl-block",
|
|
5525
5528
|
onClick: O[0] || (O[0] = () => m())
|
|
5526
5529
|
}, [
|
|
5527
|
-
|
|
5530
|
+
r.value ? (p(), j(g(x), {
|
|
5528
5531
|
key: 1,
|
|
5529
5532
|
icon: "ph:push-pin-slash"
|
|
5530
5533
|
})) : (p(), j(g(x), {
|
|
@@ -5542,7 +5545,7 @@ const ps = {
|
|
|
5542
5545
|
})
|
|
5543
5546
|
], 512));
|
|
5544
5547
|
}
|
|
5545
|
-
}),
|
|
5548
|
+
}), Bs = /* @__PURE__ */ we(zs, [["__scopeId", "data-v-db3283cd"]]), Fs = /* @__PURE__ */ F({
|
|
5546
5549
|
__name: "cl-ui-navigation-icon",
|
|
5547
5550
|
props: {
|
|
5548
5551
|
iconValue: {},
|
|
@@ -5565,10 +5568,10 @@ const ps = {
|
|
|
5565
5568
|
}, null, 8, ["icon"])
|
|
5566
5569
|
], 2));
|
|
5567
5570
|
}
|
|
5568
|
-
}),
|
|
5571
|
+
}), Ls = {
|
|
5569
5572
|
key: 0,
|
|
5570
5573
|
class: "cl-font-bold cl-leading-8 cl-mb-8 cl-pr-8 cl-select-none cl-text-lg cl-text-secondary-default"
|
|
5571
|
-
},
|
|
5574
|
+
}, js = { class: "cl-flex cl-flex-wrap cl-space-y-8 cl-text-sm cl-w-full" }, Ps = /* @__PURE__ */ F({
|
|
5572
5575
|
__name: "cl-ui-navigation-group",
|
|
5573
5576
|
props: {
|
|
5574
5577
|
open: { type: Boolean }
|
|
@@ -5579,35 +5582,35 @@ const ps = {
|
|
|
5579
5582
|
"cl-hidden": !o.open
|
|
5580
5583
|
})
|
|
5581
5584
|
}, [
|
|
5582
|
-
o.$slots.title ? (p(), v("div",
|
|
5585
|
+
o.$slots.title ? (p(), v("div", Ls, [
|
|
5583
5586
|
N(o.$slots, "title")
|
|
5584
5587
|
])) : M("", !0),
|
|
5585
|
-
f("div",
|
|
5588
|
+
f("div", js, [
|
|
5586
5589
|
N(o.$slots, "default")
|
|
5587
5590
|
])
|
|
5588
5591
|
], 2));
|
|
5589
5592
|
}
|
|
5590
|
-
}),
|
|
5593
|
+
}), Hs = {}, Ws = { class: "cl-w-full" }, Zs = {
|
|
5591
5594
|
key: 0,
|
|
5592
5595
|
class: "cl-font-bold cl-mb-4 cl-select-none"
|
|
5593
|
-
},
|
|
5594
|
-
function
|
|
5595
|
-
return p(), v("div",
|
|
5596
|
-
t.$slots.title ? (p(), v("div",
|
|
5596
|
+
}, Gs = { class: "cl-flex cl-flex-wrap cl-space-y-2" };
|
|
5597
|
+
function xs(t, o) {
|
|
5598
|
+
return p(), v("div", Ws, [
|
|
5599
|
+
t.$slots.title ? (p(), v("div", Zs, [
|
|
5597
5600
|
N(t.$slots, "title")
|
|
5598
5601
|
])) : M("", !0),
|
|
5599
|
-
f("span",
|
|
5602
|
+
f("span", Gs, [
|
|
5600
5603
|
N(t.$slots, "default")
|
|
5601
5604
|
])
|
|
5602
5605
|
]);
|
|
5603
5606
|
}
|
|
5604
|
-
const
|
|
5605
|
-
function
|
|
5606
|
-
return p(), v("div",
|
|
5607
|
+
const Ks = /* @__PURE__ */ we(Hs, [["render", xs]]), Qs = {}, _s = { class: "cl-cursor-pointer cl-transition-colors cl-w-full hover:cl-text-primary-darker" };
|
|
5608
|
+
function Ys(t, o) {
|
|
5609
|
+
return p(), v("div", _s, [
|
|
5607
5610
|
N(t.$slots, "default")
|
|
5608
5611
|
]);
|
|
5609
5612
|
}
|
|
5610
|
-
const
|
|
5613
|
+
const Js = /* @__PURE__ */ we(Qs, [["render", Ys]]), Xs = { class: "cl-basis-full" }, ei = /* @__PURE__ */ F({
|
|
5611
5614
|
__name: "cl-ui-tab",
|
|
5612
5615
|
props: {
|
|
5613
5616
|
colour: { default: "default" },
|
|
@@ -5615,22 +5618,22 @@ const Ys = /* @__PURE__ */ we(Ks, [["render", _s]]), Js = { class: "cl-basis-ful
|
|
|
5615
5618
|
},
|
|
5616
5619
|
emits: ["tab-opened"],
|
|
5617
5620
|
setup(t, { expose: o, emit: l }) {
|
|
5618
|
-
const e = t,
|
|
5621
|
+
const e = t, n = l, a = I([]), d = S(() => a.value.filter((O) => O.open).length > 0), i = I(), s = I(!1), r = I(!1), u = S(() => e.layout === "horizontal");
|
|
5619
5622
|
function c() {
|
|
5620
|
-
if (
|
|
5621
|
-
const O =
|
|
5622
|
-
|
|
5623
|
+
if (i.value) {
|
|
5624
|
+
const O = i.value.scrollWidth - i.value.clientWidth;
|
|
5625
|
+
s.value = i.value.scrollLeft > 0, r.value = i.value.scrollLeft < O;
|
|
5623
5626
|
} else
|
|
5624
|
-
|
|
5627
|
+
s.value = !1, r.value = !1;
|
|
5625
5628
|
}
|
|
5626
5629
|
function m() {
|
|
5627
5630
|
u.value && (c(), window.addEventListener("resize", c));
|
|
5628
5631
|
}
|
|
5629
5632
|
function b(O) {
|
|
5630
|
-
if (
|
|
5631
|
-
const L =
|
|
5633
|
+
if (i.value) {
|
|
5634
|
+
const L = i.value.scrollWidth / 5;
|
|
5632
5635
|
let D = L;
|
|
5633
|
-
O === "left" && (D = -L),
|
|
5636
|
+
O === "left" && (D = -L), i.value.scroll(i.value.scrollLeft + D, 0);
|
|
5634
5637
|
}
|
|
5635
5638
|
}
|
|
5636
5639
|
function h(O) {
|
|
@@ -5644,14 +5647,14 @@ const Ys = /* @__PURE__ */ we(Ks, [["render", _s]]), Js = { class: "cl-basis-ful
|
|
|
5644
5647
|
const L = a.value.find((D) => D.id === O);
|
|
5645
5648
|
L && L.open === !1 && (L.open = !L.open, a.value.forEach((D) => {
|
|
5646
5649
|
D.id !== O && (D.open = !1);
|
|
5647
|
-
}),
|
|
5650
|
+
}), n("tab-opened", O));
|
|
5648
5651
|
}
|
|
5649
5652
|
function T(O) {
|
|
5650
5653
|
typeof O == "number" && $(O);
|
|
5651
5654
|
}
|
|
5652
5655
|
return We(() => {
|
|
5653
5656
|
m(), $(a.value[0].id);
|
|
5654
|
-
}),
|
|
5657
|
+
}), el(() => window.removeEventListener("resize", c)), o({
|
|
5655
5658
|
setTab: T
|
|
5656
5659
|
}), (O, L) => (p(), v("div", {
|
|
5657
5660
|
class: z(["cl-w-full", {
|
|
@@ -5666,7 +5669,7 @@ const Ys = /* @__PURE__ */ we(Ks, [["render", _s]]), Js = { class: "cl-basis-ful
|
|
|
5666
5669
|
}
|
|
5667
5670
|
]])
|
|
5668
5671
|
}, [
|
|
5669
|
-
|
|
5672
|
+
s.value && u.value ? (p(), v("div", {
|
|
5670
5673
|
key: 0,
|
|
5671
5674
|
class: "cl-bg-white cl-cursor-pointer cl-float-left cl-h-11 cl-w-4",
|
|
5672
5675
|
onClick: L[0] || (L[0] = (D) => b("left"))
|
|
@@ -5678,9 +5681,9 @@ const Ys = /* @__PURE__ */ we(Ks, [["render", _s]]), Js = { class: "cl-basis-ful
|
|
|
5678
5681
|
])) : M("", !0),
|
|
5679
5682
|
f("div", {
|
|
5680
5683
|
ref_key: "headerContainer",
|
|
5681
|
-
ref:
|
|
5684
|
+
ref: i,
|
|
5682
5685
|
class: z(["cl-border-b cl-border-grey-1 cl-flex cl-flex-nowrap cl-flex-row", {
|
|
5683
|
-
"cl-mr-4":
|
|
5686
|
+
"cl-mr-4": r.value && u.value,
|
|
5684
5687
|
"cl-mb-4 xl:cl-mb-6 cl-overflow-x-auto cl-overscroll-x-none": u.value,
|
|
5685
5688
|
"cl-flex-col cl-border-b-0": u.value === !1
|
|
5686
5689
|
}]),
|
|
@@ -5688,7 +5691,7 @@ const Ys = /* @__PURE__ */ we(Ks, [["render", _s]]), Js = { class: "cl-basis-ful
|
|
|
5688
5691
|
}, [
|
|
5689
5692
|
N(O.$slots, "headings", fe(ge({ isTabOpen: h, toggleOpen: $, colour: O.colour, layout: O.layout })))
|
|
5690
5693
|
], 34),
|
|
5691
|
-
|
|
5694
|
+
r.value && u.value ? (p(), v("div", {
|
|
5692
5695
|
key: 1,
|
|
5693
5696
|
class: "cl-bg-white cl-cursor-pointer cl-float-right cl-h-11 cl-relative cl-w-4",
|
|
5694
5697
|
onClick: L[1] || (L[1] = (D) => b("right"))
|
|
@@ -5699,14 +5702,14 @@ const Ys = /* @__PURE__ */ we(Ks, [["render", _s]]), Js = { class: "cl-basis-ful
|
|
|
5699
5702
|
})
|
|
5700
5703
|
])) : M("", !0)
|
|
5701
5704
|
], 2),
|
|
5702
|
-
_(f("div",
|
|
5705
|
+
_(f("div", Xs, [
|
|
5703
5706
|
N(O.$slots, "content", fe(ge({ isTabOpen: h })))
|
|
5704
5707
|
], 512), [
|
|
5705
5708
|
[oe, d.value]
|
|
5706
5709
|
])
|
|
5707
5710
|
], 2));
|
|
5708
5711
|
}
|
|
5709
|
-
}),
|
|
5712
|
+
}), li = ["inert"], ti = /* @__PURE__ */ F({
|
|
5710
5713
|
__name: "cl-ui-tab-header",
|
|
5711
5714
|
props: {
|
|
5712
5715
|
open: { type: Boolean },
|
|
@@ -5717,7 +5720,7 @@ const Ys = /* @__PURE__ */ we(Ks, [["render", _s]]), Js = { class: "cl-basis-ful
|
|
|
5717
5720
|
},
|
|
5718
5721
|
setup(t) {
|
|
5719
5722
|
const o = t, l = S(() => o.layout === "horizontal");
|
|
5720
|
-
return (e,
|
|
5723
|
+
return (e, n) => (p(), v("div", {
|
|
5721
5724
|
class: z(["cl-flex cl-font-bold cl-items-center cl-px-4 cl-py-2 cl-whitespace-nowrap xl:cl-px-6 xl:cl-py-3 xl:cl-text-lg", {
|
|
5722
5725
|
"cl-border-b-4": l.value,
|
|
5723
5726
|
"cl-border-b-0 cl-border-r-4": l.value === !1,
|
|
@@ -5732,37 +5735,37 @@ const Ys = /* @__PURE__ */ we(Ks, [["render", _s]]), Js = { class: "cl-basis-ful
|
|
|
5732
5735
|
inert: e.disabled
|
|
5733
5736
|
}, [
|
|
5734
5737
|
N(e.$slots, "default", {}, () => [
|
|
5735
|
-
ce(
|
|
5738
|
+
ce(V(e.title), 1)
|
|
5736
5739
|
])
|
|
5737
|
-
], 10,
|
|
5740
|
+
], 10, li));
|
|
5738
5741
|
}
|
|
5739
|
-
}),
|
|
5742
|
+
}), oi = { key: 0 }, ai = { class: "cl-font-bold cl-mb-4" }, ni = /* @__PURE__ */ F({
|
|
5740
5743
|
__name: "cl-ui-tab-content",
|
|
5741
5744
|
props: {
|
|
5742
5745
|
open: { type: Boolean },
|
|
5743
5746
|
title: { default: "" }
|
|
5744
5747
|
},
|
|
5745
5748
|
setup(t) {
|
|
5746
|
-
return (o, l) => o.open ? (p(), v("div",
|
|
5749
|
+
return (o, l) => o.open ? (p(), v("div", oi, [
|
|
5747
5750
|
N(o.$slots, "header", {}, () => [
|
|
5748
|
-
f("h4",
|
|
5751
|
+
f("h4", ai, V(o.title), 1)
|
|
5749
5752
|
]),
|
|
5750
5753
|
N(o.$slots, "default")
|
|
5751
5754
|
])) : M("", !0);
|
|
5752
5755
|
}
|
|
5753
|
-
}),
|
|
5756
|
+
}), ri = [
|
|
5754
5757
|
"default",
|
|
5755
5758
|
"primary",
|
|
5756
5759
|
"secondary",
|
|
5757
5760
|
"danger",
|
|
5758
5761
|
"blue"
|
|
5759
|
-
],
|
|
5762
|
+
], si = [
|
|
5760
5763
|
"left",
|
|
5761
5764
|
"right"
|
|
5762
|
-
],
|
|
5765
|
+
], ii = [
|
|
5763
5766
|
"horizontal",
|
|
5764
5767
|
"vertical"
|
|
5765
|
-
],
|
|
5768
|
+
], ci = { class: "cl-block cl-h-full cl-w-full" }, ui = ["multiple", "accept", "disabled"], di = ["multiple", "accept", "disabled"], pi = /* @__PURE__ */ F({
|
|
5766
5769
|
inheritAttrs: !1,
|
|
5767
5770
|
__name: "cl-ui-file-uploader",
|
|
5768
5771
|
props: {
|
|
@@ -5774,7 +5777,7 @@ const Ys = /* @__PURE__ */ we(Ks, [["render", _s]]), Js = { class: "cl-basis-ful
|
|
|
5774
5777
|
emits: ["files-uploaded"],
|
|
5775
5778
|
setup(t, { emit: o }) {
|
|
5776
5779
|
const l = t, e = o;
|
|
5777
|
-
function
|
|
5780
|
+
function n(c) {
|
|
5778
5781
|
var m;
|
|
5779
5782
|
if (l.disabled === !1) {
|
|
5780
5783
|
const b = [...(m = c == null ? void 0 : c.dataTransfer) == null ? void 0 : m.files];
|
|
@@ -5792,48 +5795,48 @@ const Ys = /* @__PURE__ */ we(Ks, [["render", _s]]), Js = { class: "cl-basis-ful
|
|
|
5792
5795
|
"dragover",
|
|
5793
5796
|
"dragleave",
|
|
5794
5797
|
"drop"
|
|
5795
|
-
],
|
|
5798
|
+
], i = I(!1);
|
|
5796
5799
|
We(() => {
|
|
5797
5800
|
d.forEach((c) => {
|
|
5798
5801
|
document.body.addEventListener(c, (m) => m.preventDefault());
|
|
5799
5802
|
});
|
|
5800
|
-
}),
|
|
5803
|
+
}), el(() => {
|
|
5801
5804
|
d.forEach((c) => {
|
|
5802
5805
|
document.body.removeEventListener(c, (m) => m.preventDefault());
|
|
5803
5806
|
});
|
|
5804
5807
|
});
|
|
5805
|
-
const
|
|
5808
|
+
const s = I(null), r = I(null);
|
|
5806
5809
|
function u() {
|
|
5807
|
-
|
|
5810
|
+
s.value && (s.value.value = ""), r.value && (r.value.value = "");
|
|
5808
5811
|
}
|
|
5809
|
-
return (c, m) => (p(), v("div",
|
|
5812
|
+
return (c, m) => (p(), v("div", ci, [
|
|
5810
5813
|
c.uploaderType === "dragDrop" ? (p(), v("label", ee({ key: 0 }, c.$attrs, {
|
|
5811
5814
|
role: "button",
|
|
5812
5815
|
class: ["cl-bg-opacity-10 cl-border cl-border-dashed cl-duration-300 cl-ease-in-out cl-flex cl-justify-center cl-relative cl-rounded-lg", {
|
|
5813
5816
|
"cl-bg-grey-3 cl-border-grey-5 cl-cursor-default": c.disabled === !0,
|
|
5814
5817
|
"cl-bg-primary-light cl-border-primary-darker cl-cursor-pointer": c.disabled === !1,
|
|
5815
|
-
"cl-bg-opacity-40 hover:cl-bg-opacity-40":
|
|
5816
|
-
"cl-bg-opacity-10 hover:cl-bg-opacity-40":
|
|
5818
|
+
"cl-bg-opacity-40 hover:cl-bg-opacity-40": i.value === !0 && c.disabled === !1,
|
|
5819
|
+
"cl-bg-opacity-10 hover:cl-bg-opacity-40": i.value === !1 && c.disabled === !1
|
|
5817
5820
|
}],
|
|
5818
|
-
onDrop: ne(
|
|
5819
|
-
onDragenter: m[0] || (m[0] = (b) =>
|
|
5820
|
-
onDragleave: m[1] || (m[1] = (b) =>
|
|
5821
|
+
onDrop: ne(n, ["prevent"]),
|
|
5822
|
+
onDragenter: m[0] || (m[0] = (b) => i.value = !0),
|
|
5823
|
+
onDragleave: m[1] || (m[1] = (b) => i.value = !1)
|
|
5821
5824
|
}), [
|
|
5822
5825
|
f("input", {
|
|
5823
5826
|
ref_key: "fileRefDragDrop",
|
|
5824
|
-
ref:
|
|
5827
|
+
ref: s,
|
|
5825
5828
|
type: "file",
|
|
5826
5829
|
multiple: c.allowMultipleFiles,
|
|
5827
5830
|
class: "cl-hidden",
|
|
5828
5831
|
accept: c.acceptedFileTypes,
|
|
5829
5832
|
disabled: c.disabled,
|
|
5830
5833
|
onInput: a
|
|
5831
|
-
}, null, 40,
|
|
5834
|
+
}, null, 40, ui),
|
|
5832
5835
|
N(c.$slots, "default")
|
|
5833
5836
|
], 16)) : (p(), v("input", {
|
|
5834
5837
|
key: 1,
|
|
5835
5838
|
ref_key: "fileRefClassic",
|
|
5836
|
-
ref:
|
|
5839
|
+
ref: r,
|
|
5837
5840
|
type: "file",
|
|
5838
5841
|
class: z({
|
|
5839
5842
|
"cl-cursor-default": c.disabled === !0,
|
|
@@ -5843,10 +5846,10 @@ const Ys = /* @__PURE__ */ we(Ks, [["render", _s]]), Js = { class: "cl-basis-ful
|
|
|
5843
5846
|
accept: c.acceptedFileTypes,
|
|
5844
5847
|
disabled: c.disabled,
|
|
5845
5848
|
onInput: a
|
|
5846
|
-
}, null, 42,
|
|
5849
|
+
}, null, 42, di))
|
|
5847
5850
|
]));
|
|
5848
5851
|
}
|
|
5849
|
-
}),
|
|
5852
|
+
}), fi = /* @__PURE__ */ F({
|
|
5850
5853
|
inheritAttrs: !1,
|
|
5851
5854
|
__name: "cl-ui-toggle",
|
|
5852
5855
|
props: /* @__PURE__ */ me({
|
|
@@ -5858,39 +5861,39 @@ const Ys = /* @__PURE__ */ we(Ks, [["render", _s]]), Js = { class: "cl-basis-ful
|
|
|
5858
5861
|
}),
|
|
5859
5862
|
emits: /* @__PURE__ */ me(["selection-changed"], ["update:modelValue"]),
|
|
5860
5863
|
setup(t, { emit: o }) {
|
|
5861
|
-
const l = t, e = $e(t, "modelValue"),
|
|
5862
|
-
function a(
|
|
5863
|
-
Array.isArray(e.value) ? d(
|
|
5864
|
+
const l = t, e = $e(t, "modelValue"), n = o;
|
|
5865
|
+
function a(s) {
|
|
5866
|
+
Array.isArray(e.value) ? d(s) : e.value === s && l.required === !1 ? e.value = null : e.value = s;
|
|
5864
5867
|
}
|
|
5865
|
-
function d(
|
|
5866
|
-
Array.isArray(e.value) && (e.value.includes(
|
|
5868
|
+
function d(s) {
|
|
5869
|
+
Array.isArray(e.value) && (e.value.includes(s) ? i.value === !0 && e.value.splice(e.value.indexOf(s), 1) : e.value.push(s));
|
|
5867
5870
|
}
|
|
5868
|
-
const
|
|
5869
|
-
var
|
|
5870
|
-
return Array.isArray(e.value) ? l.required === !1 || (((
|
|
5871
|
+
const i = S(() => {
|
|
5872
|
+
var s;
|
|
5873
|
+
return Array.isArray(e.value) ? l.required === !1 || (((s = e.value) == null ? void 0 : s.length) ?? 0) > 1 : !l.required;
|
|
5871
5874
|
});
|
|
5872
5875
|
return ae(e, () => {
|
|
5873
|
-
|
|
5874
|
-
}), (
|
|
5875
|
-
"show-required-asterisk":
|
|
5876
|
+
n("selection-changed", e.value);
|
|
5877
|
+
}), (s, r) => (p(), j(qe, {
|
|
5878
|
+
"show-required-asterisk": s.required && s.$slots.label !== void 0
|
|
5876
5879
|
}, {
|
|
5877
5880
|
label: A(() => [
|
|
5878
|
-
N(
|
|
5881
|
+
N(s.$slots, "label")
|
|
5879
5882
|
]),
|
|
5880
5883
|
default: A(() => [
|
|
5881
|
-
f("div", ee(
|
|
5884
|
+
f("div", ee(s.$attrs, {
|
|
5882
5885
|
class: ["cl-flex", {
|
|
5883
|
-
"cl-gap-0 [&_button:not(:last-of-type)]:cl-border-r-0 cl-flex-wrap [&_button:first-of-type]:cl-rounded-l-lg [&_button:last-of-type]:cl-rounded-r-lg":
|
|
5884
|
-
"cl-gap-1 cl-flex-col ":
|
|
5886
|
+
"cl-gap-0 [&_button:not(:last-of-type)]:cl-border-r-0 cl-flex-wrap [&_button:first-of-type]:cl-rounded-l-lg [&_button:last-of-type]:cl-rounded-r-lg": s.orientation === "horizontal",
|
|
5887
|
+
"cl-gap-1 cl-flex-col ": s.orientation === "vertical"
|
|
5885
5888
|
}]
|
|
5886
5889
|
}), [
|
|
5887
|
-
N(
|
|
5890
|
+
N(s.$slots, "default", { select: a })
|
|
5888
5891
|
], 16)
|
|
5889
5892
|
]),
|
|
5890
5893
|
_: 3
|
|
5891
5894
|
}, 8, ["show-required-asterisk"]));
|
|
5892
5895
|
}
|
|
5893
|
-
}),
|
|
5896
|
+
}), mi = /* @__PURE__ */ F({
|
|
5894
5897
|
__name: "cl-ui-toggle-button",
|
|
5895
5898
|
props: {
|
|
5896
5899
|
isSelected: { type: Boolean },
|
|
@@ -5910,13 +5913,14 @@ const Ys = /* @__PURE__ */ we(Ks, [["render", _s]]), Js = { class: "cl-basis-ful
|
|
|
5910
5913
|
_: 3
|
|
5911
5914
|
}, 8, ["class"]));
|
|
5912
5915
|
}
|
|
5913
|
-
}),
|
|
5916
|
+
}), gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5914
5917
|
__proto__: null,
|
|
5915
5918
|
FilterOperation: le,
|
|
5916
5919
|
allQuickDates: Jl,
|
|
5917
5920
|
buttonColours: Pt,
|
|
5918
5921
|
buttonSizes: Ht,
|
|
5919
5922
|
cardSizes: Gt,
|
|
5923
|
+
clUISlectInput: Xe,
|
|
5920
5924
|
clUiAccordion: St,
|
|
5921
5925
|
clUiAccordionHeader: Rt,
|
|
5922
5926
|
clUiAccordionItem: At,
|
|
@@ -5924,12 +5928,12 @@ const Ys = /* @__PURE__ */ we(Ks, [["render", _s]]), Js = { class: "cl-basis-ful
|
|
|
5924
5928
|
clUiButton: ye,
|
|
5925
5929
|
clUiCard: Zt,
|
|
5926
5930
|
clUiComboBox: Do,
|
|
5927
|
-
clUiFileUploader:
|
|
5931
|
+
clUiFileUploader: pi,
|
|
5928
5932
|
clUiFooter: Bo,
|
|
5929
|
-
clUiGrid:
|
|
5930
|
-
clUiHeader:
|
|
5931
|
-
clUiHeaderMenu:
|
|
5932
|
-
clUiInput:
|
|
5933
|
+
clUiGrid: Sr,
|
|
5934
|
+
clUiHeader: Or,
|
|
5935
|
+
clUiHeaderMenu: Nr,
|
|
5936
|
+
clUiInput: cs,
|
|
5933
5937
|
clUiInputCheckbox: fl,
|
|
5934
5938
|
clUiInputDateRange: et,
|
|
5935
5939
|
clUiInputDateRangeInput: yl,
|
|
@@ -5938,49 +5942,50 @@ const Ys = /* @__PURE__ */ we(Ks, [["render", _s]]), Js = { class: "cl-basis-ful
|
|
|
5938
5942
|
clUiInputRange: cn,
|
|
5939
5943
|
clUiInputText: Ve,
|
|
5940
5944
|
clUiInputTextArea: Ja,
|
|
5941
|
-
clUiLanguageSwitcher:
|
|
5942
|
-
clUiLoadingSpinner:
|
|
5943
|
-
clUiLogin:
|
|
5945
|
+
clUiLanguageSwitcher: bs,
|
|
5946
|
+
clUiLoadingSpinner: tl,
|
|
5947
|
+
clUiLogin: Is,
|
|
5944
5948
|
clUiModal: Hl,
|
|
5945
|
-
clUiNavigation:
|
|
5946
|
-
clUiNavigationGroup:
|
|
5947
|
-
clUiNavigationIcon:
|
|
5948
|
-
clUiNavigationItem:
|
|
5949
|
-
clUiNavigationSection:
|
|
5949
|
+
clUiNavigation: Bs,
|
|
5950
|
+
clUiNavigationGroup: Ps,
|
|
5951
|
+
clUiNavigationIcon: Fs,
|
|
5952
|
+
clUiNavigationItem: Js,
|
|
5953
|
+
clUiNavigationSection: Ks,
|
|
5950
5954
|
clUiNotification: Pl,
|
|
5951
5955
|
clUiSelect: sl,
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5956
|
+
clUiSelectOption: Ue,
|
|
5957
|
+
clUiTab: ei,
|
|
5958
|
+
clUiTabContent: ni,
|
|
5959
|
+
clUiTabHeader: ti,
|
|
5960
|
+
clUiToggle: fi,
|
|
5961
|
+
clUiToggleButton: mi,
|
|
5957
5962
|
currentQuickDates: Pe,
|
|
5958
5963
|
dateTimeCalendarTypes: lt,
|
|
5959
|
-
filterMethodTypes:
|
|
5964
|
+
filterMethodTypes: Tn,
|
|
5960
5965
|
futureQuickDates: Je,
|
|
5961
|
-
gridColumnTypes:
|
|
5962
|
-
headerColour:
|
|
5966
|
+
gridColumnTypes: kn,
|
|
5967
|
+
headerColour: Mr,
|
|
5963
5968
|
inputTextTypes: Ya,
|
|
5964
|
-
inputTypes:
|
|
5969
|
+
inputTypes: us,
|
|
5965
5970
|
isComboBoxCreateRequest: Eo,
|
|
5966
5971
|
isComboBoxItem: Ao,
|
|
5967
|
-
isFilterRequest:
|
|
5968
|
-
isFilterResponse:
|
|
5972
|
+
isFilterRequest: On,
|
|
5973
|
+
isFilterResponse: Dn,
|
|
5969
5974
|
isGridColumn: ot,
|
|
5970
|
-
isGridColumnArray:
|
|
5971
|
-
isLanguageArray:
|
|
5975
|
+
isGridColumnArray: $n,
|
|
5976
|
+
isLanguageArray: ds,
|
|
5972
5977
|
isLanguageLocaleFormat: il,
|
|
5973
|
-
modalColours:
|
|
5974
|
-
modalSizes:
|
|
5978
|
+
modalColours: Ns,
|
|
5979
|
+
modalSizes: Rs,
|
|
5975
5980
|
pastQuickDates: Ye,
|
|
5976
5981
|
popoverPlacements: un,
|
|
5977
5982
|
quickDateNames: Ka,
|
|
5978
|
-
stringFormats:
|
|
5979
|
-
tabColours:
|
|
5980
|
-
tabLayout:
|
|
5981
|
-
tabScroll:
|
|
5982
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5983
|
-
t.use(ke), t.component("Icon", x), Object.entries(
|
|
5983
|
+
stringFormats: Cn,
|
|
5984
|
+
tabColours: ri,
|
|
5985
|
+
tabLayout: ii,
|
|
5986
|
+
tabScroll: si
|
|
5987
|
+
}, Symbol.toStringTag, { value: "Module" })), Vi = (t) => {
|
|
5988
|
+
t.use(ke), t.component("Icon", x), Object.entries(gi).forEach(([
|
|
5984
5989
|
o,
|
|
5985
5990
|
l
|
|
5986
5991
|
]) => {
|
|
@@ -5988,7 +5993,7 @@ const Ys = /* @__PURE__ */ we(Ks, [["render", _s]]), Js = { class: "cl-basis-ful
|
|
|
5988
5993
|
});
|
|
5989
5994
|
};
|
|
5990
5995
|
export {
|
|
5991
|
-
|
|
5996
|
+
Ei as CitrusLimeUI,
|
|
5992
5997
|
pe as DateFormat,
|
|
5993
5998
|
le as FilterOperation,
|
|
5994
5999
|
te as NumberFormat,
|
|
@@ -5996,6 +6001,7 @@ export {
|
|
|
5996
6001
|
Pt as buttonColours,
|
|
5997
6002
|
Ht as buttonSizes,
|
|
5998
6003
|
Gt as cardSizes,
|
|
6004
|
+
Xe as clUISlectInput,
|
|
5999
6005
|
St as clUiAccordion,
|
|
6000
6006
|
Rt as clUiAccordionHeader,
|
|
6001
6007
|
At as clUiAccordionItem,
|
|
@@ -6003,12 +6009,12 @@ export {
|
|
|
6003
6009
|
ye as clUiButton,
|
|
6004
6010
|
Zt as clUiCard,
|
|
6005
6011
|
Do as clUiComboBox,
|
|
6006
|
-
|
|
6012
|
+
pi as clUiFileUploader,
|
|
6007
6013
|
Bo as clUiFooter,
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6014
|
+
Sr as clUiGrid,
|
|
6015
|
+
Or as clUiHeader,
|
|
6016
|
+
Nr as clUiHeaderMenu,
|
|
6017
|
+
cs as clUiInput,
|
|
6012
6018
|
fl as clUiInputCheckbox,
|
|
6013
6019
|
et as clUiInputDateRange,
|
|
6014
6020
|
yl as clUiInputDateRangeInput,
|
|
@@ -6017,62 +6023,63 @@ export {
|
|
|
6017
6023
|
cn as clUiInputRange,
|
|
6018
6024
|
Ve as clUiInputText,
|
|
6019
6025
|
Ja as clUiInputTextArea,
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6026
|
+
bs as clUiLanguageSwitcher,
|
|
6027
|
+
tl as clUiLoadingSpinner,
|
|
6028
|
+
Is as clUiLogin,
|
|
6023
6029
|
Hl as clUiModal,
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6030
|
+
Bs as clUiNavigation,
|
|
6031
|
+
Ps as clUiNavigationGroup,
|
|
6032
|
+
Fs as clUiNavigationIcon,
|
|
6033
|
+
Js as clUiNavigationItem,
|
|
6034
|
+
Ks as clUiNavigationSection,
|
|
6029
6035
|
Pl as clUiNotification,
|
|
6030
6036
|
sl as clUiSelect,
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
fi as
|
|
6037
|
+
Ue as clUiSelectOption,
|
|
6038
|
+
ei as clUiTab,
|
|
6039
|
+
ni as clUiTabContent,
|
|
6040
|
+
ti as clUiTabHeader,
|
|
6041
|
+
fi as clUiToggle,
|
|
6042
|
+
mi as clUiToggleButton,
|
|
6036
6043
|
Pe as currentQuickDates,
|
|
6037
6044
|
lt as dateTimeCalendarTypes,
|
|
6038
6045
|
Yo as datetimeFormats,
|
|
6039
|
-
|
|
6040
|
-
|
|
6046
|
+
Vi as default,
|
|
6047
|
+
Tn as filterMethodTypes,
|
|
6041
6048
|
Ee as formatNumber,
|
|
6042
|
-
|
|
6049
|
+
rl as formatNumberAsDecimal,
|
|
6043
6050
|
Ae as formatNumberAsInteger,
|
|
6044
6051
|
Je as futureQuickDates,
|
|
6045
6052
|
ml as getMergedFormatOptions,
|
|
6046
|
-
|
|
6047
|
-
|
|
6053
|
+
kn as gridColumnTypes,
|
|
6054
|
+
Mr as headerColour,
|
|
6048
6055
|
ke as i18n,
|
|
6049
6056
|
Ya as inputTextTypes,
|
|
6050
|
-
|
|
6057
|
+
us as inputTypes,
|
|
6051
6058
|
Eo as isComboBoxCreateRequest,
|
|
6052
6059
|
Ao as isComboBoxItem,
|
|
6053
|
-
|
|
6054
|
-
|
|
6060
|
+
On as isFilterRequest,
|
|
6061
|
+
Dn as isFilterResponse,
|
|
6055
6062
|
ot as isGridColumn,
|
|
6056
|
-
|
|
6057
|
-
|
|
6063
|
+
$n as isGridColumnArray,
|
|
6064
|
+
ds as isLanguageArray,
|
|
6058
6065
|
il as isLanguageLocaleFormat,
|
|
6059
6066
|
Qo as messages,
|
|
6060
|
-
|
|
6061
|
-
|
|
6067
|
+
Ns as modalColours,
|
|
6068
|
+
Rs as modalSizes,
|
|
6062
6069
|
_o as numberFormats,
|
|
6063
6070
|
Ye as pastQuickDates,
|
|
6064
6071
|
un as popoverPlacements,
|
|
6065
6072
|
Ka as quickDateNames,
|
|
6066
6073
|
ta as scrubGroupSeparatorsFromFormattedValue,
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6074
|
+
Ai as setCurrentLocale,
|
|
6075
|
+
Di as setLocaleDateTimeFormats,
|
|
6076
|
+
qi as setLocaleMessages,
|
|
6077
|
+
Oi as setLocaleNumberFormats,
|
|
6071
6078
|
Cl as showNotification,
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6079
|
+
Cn as stringFormats,
|
|
6080
|
+
ri as tabColours,
|
|
6081
|
+
ii as tabLayout,
|
|
6082
|
+
si as tabScroll,
|
|
6076
6083
|
Zl as unformatNumber,
|
|
6077
6084
|
sa as validateEmail,
|
|
6078
6085
|
na as validateMaxValue,
|