@citruslime/ui 2.4.1-beta.6 → 2.4.1-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Icon as _ } from "@iconify/vue";
|
|
2
|
-
import { defineComponent as M, ref as
|
|
2
|
+
import { defineComponent as M, ref as q, openBlock as c, createElementBlock as v, renderSlot as j, normalizeProps as le, guardReactiveProps as ne, Fragment as F, createElementVNode as p, normalizeClass as I, createVNode as k, unref as d, Transition as me, withCtx as P, withDirectives as L, mergeProps as se, vShow as H, createBlock as V, Teleport as Ie, renderList as Q, toDisplayString as T, createCommentVNode as N, nextTick as ge, toHandlers as tl, withModifiers as W, computed as S, watch as K, normalizeStyle as We, vModelText as ol, onMounted as qe, vModelDynamic as nl, withKeys as we, onUnmounted as _e, resolveComponent as sl, createTextVNode as ee, watchEffect as al, createSlots as Re } from "vue";
|
|
3
3
|
import { generateStringId as rl } from "@citruslime/utils";
|
|
4
|
-
import { onClickOutside as ze, useTimeoutFn as Ke, useDebounceFn as Qe, useWindowSize as
|
|
5
|
-
import { createI18n as
|
|
4
|
+
import { onClickOutside as ze, useTimeoutFn as Ke, useDebounceFn as Qe, useWindowSize as il } from "@vueuse/core";
|
|
5
|
+
import { createI18n as cl, useI18n as oe } from "vue-i18n";
|
|
6
6
|
import { DateTime as $e } from "luxon";
|
|
7
7
|
import { DatePicker as Me } from "v-calendar";
|
|
8
8
|
import { useDebouncer as ul, copy as re } from "@citruslime/vue-utils";
|
|
@@ -12,22 +12,22 @@ const dl = { class: "cl-overflow-hidden" }, pl = /* @__PURE__ */ M({
|
|
|
12
12
|
exclusive: { type: Boolean, default: !1 }
|
|
13
13
|
},
|
|
14
14
|
setup(t) {
|
|
15
|
-
const o = t,
|
|
16
|
-
function
|
|
17
|
-
let n =
|
|
15
|
+
const o = t, l = q([]);
|
|
16
|
+
function e(m) {
|
|
17
|
+
let n = l.value.find((a) => a.id === m);
|
|
18
18
|
return n || (n = {
|
|
19
19
|
id: m,
|
|
20
20
|
open: !1
|
|
21
|
-
},
|
|
21
|
+
}, l.value.push(n)), n.open;
|
|
22
22
|
}
|
|
23
23
|
function s(m) {
|
|
24
|
-
const n =
|
|
25
|
-
n && (o.exclusive &&
|
|
24
|
+
const n = l.value.find((a) => a.id === m);
|
|
25
|
+
n && (o.exclusive && l.value.forEach((a) => {
|
|
26
26
|
a.id !== m && (a.open = !1);
|
|
27
27
|
}), n.open = !n.open);
|
|
28
28
|
}
|
|
29
|
-
return (m, n) => (
|
|
30
|
-
j(m.$slots, "default", le(ne({ isItemOpen:
|
|
29
|
+
return (m, n) => (c(), v("div", dl, [
|
|
30
|
+
j(m.$slots, "default", le(ne({ isItemOpen: e, toggleItem: s })))
|
|
31
31
|
]));
|
|
32
32
|
}
|
|
33
33
|
}), fl = { class: "cl-absolute cl-left-5 cl-top-5" }, ml = { class: "cl-font-semibold cl-ml-10 cl-p-4 cl-select-none cl-text-grey-5" }, gl = { class: "cl-overflow-hidden" }, vl = /* @__PURE__ */ M({
|
|
@@ -41,17 +41,17 @@ const dl = { class: "cl-overflow-hidden" }, pl = /* @__PURE__ */ M({
|
|
|
41
41
|
toggle: null
|
|
42
42
|
},
|
|
43
43
|
setup(t, { emit: o }) {
|
|
44
|
-
const
|
|
45
|
-
function
|
|
46
|
-
|
|
44
|
+
const l = t;
|
|
45
|
+
function e() {
|
|
46
|
+
l.disabled || o("toggle");
|
|
47
47
|
}
|
|
48
|
-
return (s, m) => (
|
|
48
|
+
return (s, m) => (c(), v(F, null, [
|
|
49
49
|
p("div", {
|
|
50
50
|
class: I(["cl-border-b cl-border-grey-1 cl-relative", {
|
|
51
51
|
"cl-bg-grey-0": s.disabled,
|
|
52
52
|
"cl-cursor-pointer": !s.disabled
|
|
53
53
|
}]),
|
|
54
|
-
onClick:
|
|
54
|
+
onClick: e
|
|
55
55
|
}, [
|
|
56
56
|
p("div", fl, [
|
|
57
57
|
k(d(_), {
|
|
@@ -81,26 +81,26 @@ const dl = { class: "cl-overflow-hidden" }, pl = /* @__PURE__ */ M({
|
|
|
81
81
|
], 64));
|
|
82
82
|
}
|
|
83
83
|
}), de = (t, o) => {
|
|
84
|
-
const
|
|
85
|
-
for (const [
|
|
86
|
-
e
|
|
87
|
-
return
|
|
84
|
+
const l = t.__vccOpts || t;
|
|
85
|
+
for (const [e, s] of o)
|
|
86
|
+
l[e] = s;
|
|
87
|
+
return l;
|
|
88
88
|
}, bl = {}, hl = { 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 yl(t, o) {
|
|
90
|
-
return
|
|
90
|
+
return c(), v("div", hl, [
|
|
91
91
|
j(t.$slots, "default")
|
|
92
92
|
]);
|
|
93
93
|
}
|
|
94
|
-
const wl = /* @__PURE__ */ de(bl, [["render", yl]]),
|
|
94
|
+
const wl = /* @__PURE__ */ de(bl, [["render", yl]]), Ae = q([]);
|
|
95
95
|
function Ve(t) {
|
|
96
96
|
const o = {
|
|
97
97
|
id: rl(),
|
|
98
98
|
...t
|
|
99
99
|
};
|
|
100
|
-
|
|
100
|
+
Ae.value.push(o), setTimeout(() => Je(o), t.duration);
|
|
101
101
|
}
|
|
102
102
|
function Je(t) {
|
|
103
|
-
|
|
103
|
+
Ae.value = Ae.value.filter((o) => o.id !== t.id);
|
|
104
104
|
}
|
|
105
105
|
const $l = ["onClick"], kl = { class: "cl-flex-1 cl-select-none cl-text-ellipsis cl-w-64" }, Ye = /* @__PURE__ */ M({
|
|
106
106
|
inheritAttrs: !1,
|
|
@@ -110,7 +110,7 @@ const $l = ["onClick"], kl = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
110
110
|
position: { default: "top-right" }
|
|
111
111
|
},
|
|
112
112
|
setup(t) {
|
|
113
|
-
return (o,
|
|
113
|
+
return (o, l) => (c(), V(Ie, { to: o.container }, [
|
|
114
114
|
p("div", {
|
|
115
115
|
class: I(["cl-fixed cl-w-80 cl-z-40", {
|
|
116
116
|
"cl-top-5 cl-left-5": o.position === "top-left",
|
|
@@ -121,18 +121,18 @@ const $l = ["onClick"], kl = { 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
|
-
(
|
|
124
|
+
(c(!0), v(F, null, Q(d(Ae), (e, s) => (c(), v("div", se(o.$attrs, {
|
|
125
125
|
key: s,
|
|
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
|
-
"cl-bg-white":
|
|
128
|
-
"cl-bg-primary-default":
|
|
129
|
-
"cl-bg-secondary-default":
|
|
130
|
-
"cl-bg-danger-default":
|
|
131
|
-
"cl-bg-warning-default":
|
|
127
|
+
"cl-bg-white": e.colour === "default",
|
|
128
|
+
"cl-bg-primary-default": e.colour === "primary",
|
|
129
|
+
"cl-bg-secondary-default": e.colour === "secondary",
|
|
130
|
+
"cl-bg-danger-default": e.colour === "danger",
|
|
131
|
+
"cl-bg-warning-default": e.colour === "warning"
|
|
132
132
|
}],
|
|
133
|
-
onClick: (m) => d(Je)(
|
|
133
|
+
onClick: (m) => d(Je)(e)
|
|
134
134
|
}), [
|
|
135
|
-
p("span", kl, T(
|
|
135
|
+
p("span", kl, T(e.message), 1),
|
|
136
136
|
k(d(_), {
|
|
137
137
|
class: "cl-inline-block cl-opacity-0 cl-transition-opacity group-hover:cl-opacity-100",
|
|
138
138
|
icon: "ph:x",
|
|
@@ -149,7 +149,7 @@ const $l = ["onClick"], kl = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
149
149
|
removePadding: { type: Boolean, default: !1 }
|
|
150
150
|
},
|
|
151
151
|
setup(t) {
|
|
152
|
-
return (o,
|
|
152
|
+
return (o, l) => (c(), v(F, null, [
|
|
153
153
|
k(Ye),
|
|
154
154
|
p("div", Cl, [
|
|
155
155
|
j(o.$slots, "header"),
|
|
@@ -173,10 +173,10 @@ const $l = ["onClick"], kl = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
173
173
|
}
|
|
174
174
|
});
|
|
175
175
|
const El = {}, Ol = { class: "loading-spinner" };
|
|
176
|
-
function
|
|
177
|
-
return
|
|
176
|
+
function Al(t, o) {
|
|
177
|
+
return c(), v("div", Ol);
|
|
178
178
|
}
|
|
179
|
-
const Se = /* @__PURE__ */ de(El, [["render",
|
|
179
|
+
const Se = /* @__PURE__ */ de(El, [["render", Al], ["__scopeId", "data-v-a21dc5d2"]]), ql = ["disabled"], fe = /* @__PURE__ */ M({
|
|
180
180
|
inheritAttrs: !1,
|
|
181
181
|
__name: "cl-ui-button",
|
|
182
182
|
props: {
|
|
@@ -186,35 +186,35 @@ const Se = /* @__PURE__ */ de(El, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
186
186
|
disabled: { type: Boolean, default: !1 }
|
|
187
187
|
},
|
|
188
188
|
setup(t, { expose: o }) {
|
|
189
|
-
const
|
|
189
|
+
const l = q(null);
|
|
190
190
|
return o({
|
|
191
191
|
focus() {
|
|
192
|
-
|
|
192
|
+
l.value && l.value.focus();
|
|
193
193
|
}
|
|
194
|
-
}), (
|
|
194
|
+
}), (e, s) => (c(), v(F, null, [
|
|
195
195
|
L(k(Se, { class: "relative" }, null, 512), [
|
|
196
|
-
[H,
|
|
196
|
+
[H, e.loading]
|
|
197
197
|
]),
|
|
198
|
-
L(p("button", se(
|
|
198
|
+
L(p("button", se(e.$attrs, {
|
|
199
199
|
ref_key: "buttonRef",
|
|
200
|
-
ref:
|
|
200
|
+
ref: l,
|
|
201
201
|
class: ["cl-align-middle cl-border cl-font-semibold cl-inline-block cl-rounded cl-select-none cl-shadow cl-text-center cl-transition-colors", {
|
|
202
|
-
"cl-py-[5px] cl-px-4 cl-text-sm":
|
|
203
|
-
"cl-py-[9px] cl-px-8 cl-text-sm":
|
|
204
|
-
"cl-px-10 cl-py-4":
|
|
205
|
-
"cl-bg-white cl-border-grey-0 hover:cl-border-grey-2 cl-text-secondary":
|
|
206
|
-
"cl-border-primary-default cl-bg-primary-default cl-text-white hover:cl-bg-primary-dark hover:cl-border-primary-dark":
|
|
207
|
-
"cl-border-secondary-default cl-bg-secondary-default cl-text-white hover:cl-bg-secondary-light hover:cl-border-secondary-light":
|
|
208
|
-
"cl-border-danger-default cl-bg-danger-default cl-text-white hover:cl-bg-danger-dark hover:cl-border-danger-dark":
|
|
209
|
-
"cl-border-link-default cl-bg-link-default cl-text-white hover:cl-bg-link-light hover:cl-border-link-light":
|
|
210
|
-
"cl-border-orange-default cl-bg-orange-default cl-opacity-100 cl-text-white hover:cl-bg-orange-dark hover:cl-border-orange-dark":
|
|
211
|
-
"!cl-border-grey-3 !cl-bg-grey-3 cl-text-grey-0 hover:!cl-bg-grey-3 hover:!cl-border-grey-3 cl-cursor-default":
|
|
202
|
+
"cl-py-[5px] cl-px-4 cl-text-sm": e.size === "small",
|
|
203
|
+
"cl-py-[9px] cl-px-8 cl-text-sm": e.size === "medium",
|
|
204
|
+
"cl-px-10 cl-py-4": e.size === "large",
|
|
205
|
+
"cl-bg-white cl-border-grey-0 hover:cl-border-grey-2 cl-text-secondary": e.colour === "default",
|
|
206
|
+
"cl-border-primary-default cl-bg-primary-default cl-text-white hover:cl-bg-primary-dark hover:cl-border-primary-dark": e.colour === "primary",
|
|
207
|
+
"cl-border-secondary-default cl-bg-secondary-default cl-text-white hover:cl-bg-secondary-light hover:cl-border-secondary-light": e.colour === "secondary",
|
|
208
|
+
"cl-border-danger-default cl-bg-danger-default cl-text-white hover:cl-bg-danger-dark hover:cl-border-danger-dark": e.colour === "danger",
|
|
209
|
+
"cl-border-link-default cl-bg-link-default cl-text-white hover:cl-bg-link-light hover:cl-border-link-light": e.colour === "blue",
|
|
210
|
+
"cl-border-orange-default cl-bg-orange-default cl-opacity-100 cl-text-white hover:cl-bg-orange-dark hover:cl-border-orange-dark": e.colour === "orange",
|
|
211
|
+
"!cl-border-grey-3 !cl-bg-grey-3 cl-text-grey-0 hover:!cl-bg-grey-3 hover:!cl-border-grey-3 cl-cursor-default": e.disabled
|
|
212
212
|
}],
|
|
213
|
-
disabled:
|
|
213
|
+
disabled: e.disabled
|
|
214
214
|
}), [
|
|
215
|
-
j(
|
|
216
|
-
], 16,
|
|
217
|
-
[H, !
|
|
215
|
+
j(e.$slots, "default")
|
|
216
|
+
], 16, ql), [
|
|
217
|
+
[H, !e.loading]
|
|
218
218
|
])
|
|
219
219
|
], 64));
|
|
220
220
|
}
|
|
@@ -236,15 +236,15 @@ const Se = /* @__PURE__ */ de(El, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
236
236
|
hover: { type: Boolean, default: !1 }
|
|
237
237
|
},
|
|
238
238
|
setup(t) {
|
|
239
|
-
return (o,
|
|
239
|
+
return (o, l) => (c(), v("div", {
|
|
240
240
|
class: I(["cl-border cl-border-transparent cl-overflow-hidden cl-relative cl-rounded-md cl-shadow-lg cl-transition-all", {
|
|
241
241
|
"cl-cursor-pointer hover:cl-shadow-xl hover:cl-border-grey-0": o.hover
|
|
242
242
|
}])
|
|
243
243
|
}, [
|
|
244
|
-
o.$slots.image ? (
|
|
244
|
+
o.$slots.image ? (c(), v("div", jl, [
|
|
245
245
|
j(o.$slots, "image")
|
|
246
246
|
])) : N("", !0),
|
|
247
|
-
o.$slots.title ? (
|
|
247
|
+
o.$slots.title ? (c(), v("div", {
|
|
248
248
|
key: 1,
|
|
249
249
|
class: I(["cl-border-grey-2 cl-font-normal", {
|
|
250
250
|
"cl-p-2 cl-text-2xl cl-leading-8": o.size === "small",
|
|
@@ -265,7 +265,7 @@ const Se = /* @__PURE__ */ de(El, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
265
265
|
}, [
|
|
266
266
|
j(o.$slots, "default")
|
|
267
267
|
], 2),
|
|
268
|
-
o.$slots.footer ? (
|
|
268
|
+
o.$slots.footer ? (c(), v("div", {
|
|
269
269
|
key: 2,
|
|
270
270
|
class: I(["cl-border-grey-2 cl-border-t", {
|
|
271
271
|
"cl-p-2": o.size === "small",
|
|
@@ -428,7 +428,7 @@ const Rl = {
|
|
|
428
428
|
year: "numeric"
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
}, X =
|
|
431
|
+
}, X = cl({
|
|
432
432
|
locale: "en-GB",
|
|
433
433
|
fallbackLocale: "en-GB",
|
|
434
434
|
messages: Rl,
|
|
@@ -451,8 +451,8 @@ function Ms(t, o) {
|
|
|
451
451
|
function Vs(t) {
|
|
452
452
|
return X.global.locale.value = t, ge();
|
|
453
453
|
}
|
|
454
|
-
const { t:
|
|
455
|
-
function Bl(t, o,
|
|
454
|
+
const { t: ce } = X.global;
|
|
455
|
+
function Bl(t, o, l, e) {
|
|
456
456
|
const s = X.global.locale.value;
|
|
457
457
|
return new Promise((m) => {
|
|
458
458
|
let n = {
|
|
@@ -468,17 +468,17 @@ function Bl(t, o, e, l) {
|
|
|
468
468
|
case "tel":
|
|
469
469
|
case "text":
|
|
470
470
|
case "url":
|
|
471
|
-
a = ((
|
|
471
|
+
a = ((e == null ? void 0 : e.length) ?? 0) >= (Number(t) || 0), n = ue(a, ce("input.greaterOrEqualToCharacters", { label: l, min: t.toString() }));
|
|
472
472
|
break;
|
|
473
473
|
case "number":
|
|
474
474
|
case "range":
|
|
475
|
-
a =
|
|
475
|
+
a = e >= (Number(t) || 0), n = ue(a, ce("input.greaterOrEqualToValue", { label: l, min: t.toString() }));
|
|
476
476
|
break;
|
|
477
477
|
case "date":
|
|
478
|
-
a = new Date(
|
|
478
|
+
a = new Date(e).getTime() >= new Date(t).getTime(), n = ue(a, ce("input.afterOrEqualToValue", { label: l, min: X.global.d(new Date(t), G.DATE, s ?? X.global.locale.value) }));
|
|
479
479
|
break;
|
|
480
480
|
case "datetime":
|
|
481
|
-
a = new Date(
|
|
481
|
+
a = new Date(e).getTime() >= new Date(t).getTime(), n = ue(a, ce("input.afterOrEqualToValue", { label: l, min: X.global.d(new Date(t), G.DATETIME, s ?? X.global.locale.value) }));
|
|
482
482
|
break;
|
|
483
483
|
default:
|
|
484
484
|
n.valid = !0;
|
|
@@ -488,7 +488,7 @@ function Bl(t, o, e, l) {
|
|
|
488
488
|
m(n);
|
|
489
489
|
});
|
|
490
490
|
}
|
|
491
|
-
function Ml(t, o,
|
|
491
|
+
function Ml(t, o, l, e) {
|
|
492
492
|
const s = X.global.locale.value;
|
|
493
493
|
return new Promise((m) => {
|
|
494
494
|
let n = {
|
|
@@ -504,17 +504,17 @@ function Ml(t, o, e, l) {
|
|
|
504
504
|
case "tel":
|
|
505
505
|
case "text":
|
|
506
506
|
case "url":
|
|
507
|
-
a = ((
|
|
507
|
+
a = ((e == null ? void 0 : e.length) ?? 0) <= (Number(t) || 0), n = ue(a, ce("input.lessOrEqualToCharacters", { label: l, max: t.toString() }));
|
|
508
508
|
break;
|
|
509
509
|
case "number":
|
|
510
510
|
case "range":
|
|
511
|
-
a =
|
|
511
|
+
a = e <= (Number(t) || 0), n = ue(a, ce("input.lessOrEqualToValue", { label: l, max: t.toString() }));
|
|
512
512
|
break;
|
|
513
513
|
case "date":
|
|
514
|
-
a = new Date(
|
|
514
|
+
a = new Date(e).getTime() <= new Date(t).getTime(), n = ue(a, ce("input.beforeOrEqualToValue", { label: l, max: X.global.d(new Date(t), G.DATE, s ?? X.global.locale.value) }));
|
|
515
515
|
break;
|
|
516
516
|
case "datetime":
|
|
517
|
-
a = new Date(
|
|
517
|
+
a = new Date(e).getTime() <= new Date(t).getTime(), n = ue(a, ce("input.beforeOrEqualToValue", { label: l, min: X.global.d(new Date(t), G.DATETIME, s ?? X.global.locale.value) }));
|
|
518
518
|
break;
|
|
519
519
|
default:
|
|
520
520
|
n.valid = !0;
|
|
@@ -525,15 +525,15 @@ function Ml(t, o, e, l) {
|
|
|
525
525
|
});
|
|
526
526
|
}
|
|
527
527
|
function Vl(t, o) {
|
|
528
|
-
return new Promise((
|
|
529
|
-
const
|
|
530
|
-
|
|
528
|
+
return new Promise((l) => {
|
|
529
|
+
const e = o != null && o !== "" && o.toString().trim() !== "", s = ue(e, ce("input.valueIsRequired", { label: t }));
|
|
530
|
+
l(s);
|
|
531
531
|
});
|
|
532
532
|
}
|
|
533
533
|
function Dl(t, o) {
|
|
534
|
-
return new Promise((
|
|
535
|
-
const s = 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, m = ue(s,
|
|
536
|
-
|
|
534
|
+
return new Promise((l) => {
|
|
535
|
+
const s = 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, m = ue(s, ce("input.valueNotValidEmail", { label: t }));
|
|
536
|
+
l(m);
|
|
537
537
|
});
|
|
538
538
|
}
|
|
539
539
|
function ue(t, o) {
|
|
@@ -557,42 +557,42 @@ const Ll = { class: "cl-relative" }, Pl = ["value", "disabled", "placeholder"],
|
|
|
557
557
|
},
|
|
558
558
|
emits: ["clear", "reset"],
|
|
559
559
|
setup(t, { expose: o }) {
|
|
560
|
-
const
|
|
560
|
+
const l = q(null);
|
|
561
561
|
return o({
|
|
562
562
|
focus() {
|
|
563
|
-
var
|
|
564
|
-
(
|
|
563
|
+
var e;
|
|
564
|
+
(e = l.value) == null || e.focus();
|
|
565
565
|
}
|
|
566
|
-
}), (
|
|
566
|
+
}), (e, s) => (c(), v("div", Ll, [
|
|
567
567
|
p("input", se({
|
|
568
568
|
ref_key: "element",
|
|
569
|
-
ref:
|
|
570
|
-
},
|
|
571
|
-
value:
|
|
569
|
+
ref: l
|
|
570
|
+
}, e.$attrs, {
|
|
571
|
+
value: e.date,
|
|
572
572
|
type: "text",
|
|
573
|
-
disabled:
|
|
574
|
-
placeholder:
|
|
575
|
-
}, tl(
|
|
573
|
+
disabled: e.disabled,
|
|
574
|
+
placeholder: e.placeholder
|
|
575
|
+
}, tl(e.events, !0)), null, 16, Pl),
|
|
576
576
|
L(k(d(_), {
|
|
577
577
|
class: I(["cl-absolute cl-bg-transparent cl-left-2 cl-text-grey-4 cl-top-3.5 icon", {
|
|
578
|
-
"!cl-bg-off-white":
|
|
578
|
+
"!cl-bg-off-white": e.disabled
|
|
579
579
|
}]),
|
|
580
|
-
icon:
|
|
580
|
+
icon: e.type === "time" ? "ph-clock" : "ph:calendar"
|
|
581
581
|
}, null, 8, ["class", "icon"]), [
|
|
582
|
-
[H, !
|
|
582
|
+
[H, !e.disabled]
|
|
583
583
|
]),
|
|
584
|
-
|
|
585
|
-
|
|
584
|
+
e.disabled ? N("", !0) : (c(), v("div", Fl, [
|
|
585
|
+
e.type !== "time" ? (c(), V(d(_), {
|
|
586
586
|
key: 0,
|
|
587
587
|
class: "cl-cursor-pointer hover:cl-text-link-light",
|
|
588
588
|
icon: "ph:arrow-counter-clockwise",
|
|
589
|
-
onClick: s[0] || (s[0] = W((m) =>
|
|
589
|
+
onClick: s[0] || (s[0] = W((m) => e.$emit("reset"), ["prevent"]))
|
|
590
590
|
})) : N("", !0),
|
|
591
|
-
!
|
|
591
|
+
!e.required && e.date && (e.type !== "time" || e.date !== "00:00") ? (c(), V(d(_), {
|
|
592
592
|
key: 1,
|
|
593
593
|
class: "cl-cursor-pointer hover:cl-text-link-light md:cl-ml-0.5",
|
|
594
594
|
icon: "ph:x",
|
|
595
|
-
onClick: s[1] || (s[1] = W((m) =>
|
|
595
|
+
onClick: s[1] || (s[1] = W((m) => e.$emit("clear"), ["prevent"]))
|
|
596
596
|
})) : N("", !0)
|
|
597
597
|
]))
|
|
598
598
|
]));
|
|
@@ -612,23 +612,23 @@ const De = /* @__PURE__ */ de(Hl, [["__scopeId", "data-v-4c802181"]]), xl = /* @
|
|
|
612
612
|
placeholder: { default: null }
|
|
613
613
|
},
|
|
614
614
|
emits: ["update:date"],
|
|
615
|
-
setup(t, { expose: o, emit:
|
|
616
|
-
const
|
|
615
|
+
setup(t, { expose: o, emit: l }) {
|
|
616
|
+
const e = t, s = S({
|
|
617
617
|
get() {
|
|
618
618
|
let b = null;
|
|
619
|
-
return
|
|
620
|
-
zone:
|
|
619
|
+
return e.type === "time" ? b = e.date === null ? "00:00" : e.date : e.date !== null && (b = $e.fromISO(e.date, {
|
|
620
|
+
zone: e.timeZone
|
|
621
621
|
}).toJSDate()), b;
|
|
622
622
|
},
|
|
623
623
|
set(b) {
|
|
624
624
|
let r = null;
|
|
625
|
-
|
|
626
|
-
zone:
|
|
627
|
-
}).setZone(
|
|
625
|
+
e.type === "time" ? r = b : b !== null && (r = $e.fromJSDate(b, {
|
|
626
|
+
zone: e.timeZone
|
|
627
|
+
}).setZone(e.timeZone).toISO()), l("update:date", r);
|
|
628
628
|
}
|
|
629
629
|
}), { locale: m, t: n } = oe(), a = S(() => {
|
|
630
630
|
let b;
|
|
631
|
-
switch (
|
|
631
|
+
switch (e.type) {
|
|
632
632
|
case "date":
|
|
633
633
|
b = n("calendar.datePlaceholder");
|
|
634
634
|
break;
|
|
@@ -639,23 +639,23 @@ const De = /* @__PURE__ */ de(Hl, [["__scopeId", "data-v-4c802181"]]), xl = /* @
|
|
|
639
639
|
b = n("calendar.timePlaceholder");
|
|
640
640
|
break;
|
|
641
641
|
}
|
|
642
|
-
return
|
|
643
|
-
}),
|
|
642
|
+
return e.placeholder ?? b;
|
|
643
|
+
}), i = S(() => e.disabled ? !1 : {
|
|
644
644
|
visibility: "focus",
|
|
645
645
|
showDelay: 150,
|
|
646
646
|
hideDelay: 100
|
|
647
647
|
});
|
|
648
648
|
function u() {
|
|
649
|
-
let b = $e.now().set({ second: 0, millisecond: 0 }).setZone(
|
|
650
|
-
|
|
649
|
+
let b = $e.now().set({ second: 0, millisecond: 0 }).setZone(e.timeZone);
|
|
650
|
+
e.type === "date" && (b = b.set({ hour: 0, minute: 0 }).setZone(e.timeZone)), s.value = b.toJSDate();
|
|
651
651
|
}
|
|
652
|
-
const g =
|
|
652
|
+
const g = q(null);
|
|
653
653
|
return o({
|
|
654
654
|
focus() {
|
|
655
655
|
var b;
|
|
656
656
|
(b = g.value) == null || b.focus();
|
|
657
657
|
}
|
|
658
|
-
}), (b, r) => b.type === "time" ? (
|
|
658
|
+
}), (b, r) => b.type === "time" ? (c(), V(d(Me), {
|
|
659
659
|
key: 0,
|
|
660
660
|
modelValue: s.value,
|
|
661
661
|
"onUpdate:modelValue": r[1] || (r[1] = (w) => s.value = w),
|
|
@@ -668,7 +668,7 @@ const De = /* @__PURE__ */ de(Hl, [["__scopeId", "data-v-4c802181"]]), xl = /* @
|
|
|
668
668
|
color: "primary",
|
|
669
669
|
"title-position": "left",
|
|
670
670
|
"hide-time-header": "",
|
|
671
|
-
popover:
|
|
671
|
+
popover: i.value
|
|
672
672
|
}, {
|
|
673
673
|
default: P(({ inputValue: w, inputEvents: h }) => [
|
|
674
674
|
k(De, se(b.$attrs, {
|
|
@@ -680,12 +680,12 @@ const De = /* @__PURE__ */ de(Hl, [["__scopeId", "data-v-4c802181"]]), xl = /* @
|
|
|
680
680
|
placeholder: a.value,
|
|
681
681
|
required: b.required,
|
|
682
682
|
disabled: b.disabled,
|
|
683
|
-
onClear: r[0] || (r[0] = (
|
|
683
|
+
onClear: r[0] || (r[0] = (A) => s.value = null),
|
|
684
684
|
onReset: u
|
|
685
685
|
}), null, 16, ["date", "events", "type", "placeholder", "required", "disabled"])
|
|
686
686
|
]),
|
|
687
687
|
_: 1
|
|
688
|
-
}, 8, ["modelValue", "locale", "is24hr", "mode", "is-required", "masks", "popover"])) : (
|
|
688
|
+
}, 8, ["modelValue", "locale", "is24hr", "mode", "is-required", "masks", "popover"])) : (c(), V(d(Me), {
|
|
689
689
|
key: 1,
|
|
690
690
|
modelValue: s.value,
|
|
691
691
|
"onUpdate:modelValue": r[3] || (r[3] = (w) => s.value = w),
|
|
@@ -699,7 +699,7 @@ const De = /* @__PURE__ */ de(Hl, [["__scopeId", "data-v-4c802181"]]), xl = /* @
|
|
|
699
699
|
color: "primary",
|
|
700
700
|
"title-position": "left",
|
|
701
701
|
"hide-time-header": "",
|
|
702
|
-
popover:
|
|
702
|
+
popover: i.value
|
|
703
703
|
}, {
|
|
704
704
|
default: P(({ inputValue: w, inputEvents: h }) => [
|
|
705
705
|
k(De, se(b.$attrs, {
|
|
@@ -711,7 +711,7 @@ const De = /* @__PURE__ */ de(Hl, [["__scopeId", "data-v-4c802181"]]), xl = /* @
|
|
|
711
711
|
placeholder: a.value,
|
|
712
712
|
required: b.required,
|
|
713
713
|
disabled: b.disabled,
|
|
714
|
-
onClear: r[2] || (r[2] = (
|
|
714
|
+
onClear: r[2] || (r[2] = (A) => s.value = null),
|
|
715
715
|
onReset: u
|
|
716
716
|
}), null, 16, ["date", "events", "type", "placeholder", "required", "disabled"])
|
|
717
717
|
]),
|
|
@@ -776,48 +776,48 @@ const Zl = [
|
|
|
776
776
|
emits: {
|
|
777
777
|
"update:value": null
|
|
778
778
|
},
|
|
779
|
-
setup(t, { expose: o, emit:
|
|
780
|
-
const
|
|
781
|
-
get: () =>
|
|
782
|
-
set: (h) =>
|
|
783
|
-
}), g = S(() =>
|
|
784
|
-
let h = (u.value -
|
|
779
|
+
setup(t, { expose: o, emit: l }) {
|
|
780
|
+
const e = t, { n: s, t: m } = oe(), { debounce: n } = ul(), a = q(e.value), i = q(), u = S({
|
|
781
|
+
get: () => e.value,
|
|
782
|
+
set: (h) => l("update:value", h)
|
|
783
|
+
}), g = S(() => e.disabled ? "rgba(153, 153, 153, 0.8)" : "#9acd32"), b = S(() => {
|
|
784
|
+
let h = (u.value - e.min) / (e.max - e.min) * 100;
|
|
785
785
|
return h < 35 && h > 0 ? h < 20 ? h += 0.5 : h += 0.25 : h > 65 && h < 100 && (h > 80 ? h -= 0.5 : h -= 0.25), h;
|
|
786
|
-
}), r = S(() =>
|
|
787
|
-
function w(h,
|
|
788
|
-
const $ = (h == null ? void 0 : h.value) ?? "", R = Math.max(Math.min(parseFloat($) ||
|
|
789
|
-
u.value =
|
|
786
|
+
}), r = S(() => e.min <= e.max && e.step > 0);
|
|
787
|
+
function w(h, A) {
|
|
788
|
+
const $ = (h == null ? void 0 : h.value) ?? "", R = Math.max(Math.min(parseFloat($) || e.min, e.max), e.min);
|
|
789
|
+
u.value = e.enforceStep ? Math.ceil(R / e.step) * e.step : R, ge(() => A());
|
|
790
790
|
}
|
|
791
|
-
return K(() =>
|
|
791
|
+
return K(() => e.value, () => a.value = e.value), o({
|
|
792
792
|
focus() {
|
|
793
793
|
var h;
|
|
794
|
-
(h =
|
|
794
|
+
(h = i.value) == null || h.focus();
|
|
795
795
|
}
|
|
796
|
-
}), (h,
|
|
796
|
+
}), (h, A) => r.value ? (c(), v("div", le(se({ key: 0 }, h.$attrs)), [
|
|
797
797
|
L(p("div", { class: "cl-bg-transparent cl-relative cl-text-center cl-text-sm" }, T(u.value), 513), [
|
|
798
798
|
[H, !h.showNumericInput]
|
|
799
799
|
]),
|
|
800
800
|
p("div", Wl, [
|
|
801
801
|
L(k(d(ae), {
|
|
802
802
|
modelValue: a.value,
|
|
803
|
-
"onUpdate:modelValue":
|
|
803
|
+
"onUpdate:modelValue": A[0] || (A[0] = ($) => a.value = $),
|
|
804
804
|
class: "!cl-text-sm md:!cl-w-auto",
|
|
805
805
|
"input-type": "number",
|
|
806
806
|
min: h.min,
|
|
807
807
|
max: h.max,
|
|
808
808
|
step: h.step,
|
|
809
809
|
disabled: h.disabled,
|
|
810
|
-
onInput:
|
|
810
|
+
onInput: A[1] || (A[1] = ($) => d(n)(w, $.target, h.$forceUpdate))
|
|
811
811
|
}, null, 8, ["modelValue", "min", "max", "step", "disabled"]), [
|
|
812
812
|
[H, h.showNumericInput]
|
|
813
813
|
]),
|
|
814
814
|
p("div", Kl, [
|
|
815
815
|
p("span", Ql, T(d(s)(h.min, Number.isInteger(h.min) ? d(Y).INTEGER : d(Y).DECIMAL)), 1),
|
|
816
|
-
typeof u.value == "number" ? (
|
|
816
|
+
typeof u.value == "number" ? (c(), v("div", Jl, [
|
|
817
817
|
L(p("input", {
|
|
818
818
|
ref_key: "sliderRef",
|
|
819
|
-
ref:
|
|
820
|
-
"onUpdate:modelValue":
|
|
819
|
+
ref: i,
|
|
820
|
+
"onUpdate:modelValue": A[2] || (A[2] = ($) => u.value = $),
|
|
821
821
|
class: "cl-align-middle cl-appearance-none cl-bg-gradient-to-r cl-border cl-border-grey-2 cl-delay-500 cl-ease-in cl-flex-1 cl-h-5 cl-mb-2 cl-outline-none cl-rounded-full cl-transition-colors cl-w-full",
|
|
822
822
|
style: We({
|
|
823
823
|
background: `linear-gradient(to right, ${g.value} 0%, ${g.value} ${b.value}%, white ${b.value}%, white 100%)`
|
|
@@ -839,7 +839,7 @@ const Zl = [
|
|
|
839
839
|
p("span", Xl, T(d(s)(h.max, Number.isInteger(h.max) ? d(Y).INTEGER : d(Y).DECIMAL)), 1)
|
|
840
840
|
])
|
|
841
841
|
])
|
|
842
|
-
], 16)) : (
|
|
842
|
+
], 16)) : (c(), v("div", et, T(d(m)("slider.invalidProps")), 1));
|
|
843
843
|
}
|
|
844
844
|
});
|
|
845
845
|
const tt = /* @__PURE__ */ de(lt, [["__scopeId", "data-v-849763cf"]]);
|
|
@@ -897,16 +897,16 @@ function nt(t) {
|
|
|
897
897
|
return o;
|
|
898
898
|
}
|
|
899
899
|
function Fe(t, o) {
|
|
900
|
-
const
|
|
901
|
-
return ot(o) ?
|
|
900
|
+
const l = t.target;
|
|
901
|
+
return ot(o) ? l.valueAsNumber : ye(o) ? l.checked : l.value;
|
|
902
902
|
}
|
|
903
903
|
const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" }, rt = {
|
|
904
904
|
key: 0,
|
|
905
905
|
class: "cl-block cl-left-auto cl-relative cl-text-danger-default"
|
|
906
|
-
},
|
|
906
|
+
}, it = {
|
|
907
907
|
key: 1,
|
|
908
908
|
class: "cl-bg-danger-light cl-block cl-max-h-6 cl-mb-1 cl-ml-2 cl-px-2 cl-rounded-md cl-text-center cl-text-danger-default cl-text-xs"
|
|
909
|
-
},
|
|
909
|
+
}, ct = {
|
|
910
910
|
key: 0,
|
|
911
911
|
class: "cl-relative"
|
|
912
912
|
}, ut = ["type", "disabled", "min", "max", "minlength", "maxlength", "step", "placeholder", "accept", "name", "autocomplete"], dt = { key: 0 }, pt = {
|
|
@@ -946,60 +946,61 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
946
946
|
highlightWhenValid: { type: Boolean, default: !1 },
|
|
947
947
|
messageWhenValid: { default: "" },
|
|
948
948
|
inputSpecificClasses: { default: "" },
|
|
949
|
-
showValidationMessages: { type: Boolean, default: !0 }
|
|
949
|
+
showValidationMessages: { type: Boolean, default: !0 },
|
|
950
|
+
hideRequiredAsterisk: { type: Boolean, default: !1 }
|
|
950
951
|
},
|
|
951
952
|
emits: ["update:model-value", "click", "focus", "input", "change", "validated"],
|
|
952
|
-
setup(t, { expose: o, emit:
|
|
953
|
-
const
|
|
954
|
-
get: () =>
|
|
953
|
+
setup(t, { expose: o, emit: l }) {
|
|
954
|
+
const e = t, s = q(null), m = q(!1), n = q(!1), a = S(C), i = S(() => e.placeholderText.trim() !== "" ? e.placeholderText : e.label), u = q(0), g = S({
|
|
955
|
+
get: () => e.modelValue,
|
|
955
956
|
set: (f) => y(f, !1)
|
|
956
957
|
}), b = S({
|
|
957
|
-
get: () =>
|
|
958
|
+
get: () => e.modelValue,
|
|
958
959
|
set: (f) => U(f)
|
|
959
|
-
}), r = S(() => typeof
|
|
960
|
+
}), r = S(() => typeof e.min == "number" ? e.min.toString() : e.min), w = S(() => typeof e.max == "number" ? e.max.toString() : e.max), h = S(() => typeof e.min == "number" || e.min === null ? e.min : parseFloat(e.min)), A = S(() => typeof e.max == "number" || e.max === null ? e.max : parseFloat(e.max)), $ = S(() => e.messageWhenValid.trim() !== "" ? e.messageWhenValid : ""), R = q(!0), O = q([]), z = S(() => {
|
|
960
961
|
var f, E;
|
|
961
962
|
return [
|
|
962
963
|
...((f = O.value) == null ? void 0 : f.filter((B) => ((B == null ? void 0 : B.length) ?? 0) > 0)) ?? [],
|
|
963
|
-
...((E =
|
|
964
|
+
...((E = e.externalErrors) == null ? void 0 : E.filter((B) => ((B == null ? void 0 : B.length) ?? 0) > 0)) ?? []
|
|
964
965
|
].join(`
|
|
965
966
|
`);
|
|
966
967
|
});
|
|
967
968
|
async function U(f) {
|
|
968
|
-
|
|
969
|
+
e.validateOn === "input" && await D(f), l("update:model-value", f);
|
|
969
970
|
}
|
|
970
971
|
async function y(f, E) {
|
|
971
|
-
|
|
972
|
+
e.onInputFunction !== void 0 && (f = e.onInputFunction(f)), (E || e.validateOn === "input") && await D(f), l("update:model-value", f);
|
|
972
973
|
}
|
|
973
974
|
function D(f) {
|
|
974
975
|
const E = {
|
|
975
976
|
message: "",
|
|
976
977
|
valid: !0
|
|
977
978
|
}, B = [
|
|
978
|
-
|
|
979
|
+
e.customValidationFunction === null || e.customValidationFunction === void 0 ? new Promise((pe) => {
|
|
979
980
|
pe(E);
|
|
980
981
|
}) : new Promise((pe) => {
|
|
981
|
-
pe(
|
|
982
|
+
pe(e.customValidationFunction(e.label, f));
|
|
982
983
|
})
|
|
983
984
|
];
|
|
984
|
-
return (typeof f == "string" || typeof f == "number") && (B.push(Bl(
|
|
985
|
-
const ll = [...pe.map((Ce) => Ce.message)], Be = pe.some((Ce) => Ce.message.length > 0 && Ce.valid === !1) ||
|
|
986
|
-
Be ? (O.value = ll,
|
|
985
|
+
return (typeof f == "string" || typeof f == "number") && (B.push(Bl(e.min, e.inputType, e.label, f)), B.push(Ml(e.max, e.inputType, e.label, f))), e.isRequired && B.push(Vl(e.label, f)), e.inputType === "email" && typeof f == "string" && B.push(Dl(e.label, f)), Promise.all(B).then((pe) => {
|
|
986
|
+
const ll = [...pe.map((Ce) => Ce.message)], Be = pe.some((Ce) => Ce.message.length > 0 && Ce.valid === !1) || e.externalErrors.length > 0;
|
|
987
|
+
Be ? (O.value = ll, l("validated", !1, f)) : (O.value = [], l("validated", !0, f)), R.value = !Be;
|
|
987
988
|
});
|
|
988
989
|
}
|
|
989
990
|
function J() {
|
|
990
991
|
let f = "";
|
|
991
|
-
return
|
|
992
|
+
return e.inputType === "color" && g.value && (e.disabled ? f = "background: #999999" : f = `background: ${g.value};`), f;
|
|
992
993
|
}
|
|
993
994
|
function Z(f) {
|
|
994
|
-
ye(
|
|
995
|
+
ye(e.inputType) ? (f.preventDefault(), l("click", f)) : e.inputType === "checkbox" && l("click", f);
|
|
995
996
|
}
|
|
996
|
-
function
|
|
997
|
+
function ie(f) {
|
|
997
998
|
if (s.value) {
|
|
998
999
|
s.value.stepUp(), s.value.focus(), y(s.value.valueAsNumber, !1);
|
|
999
1000
|
const E = {
|
|
1000
1001
|
target: s.value
|
|
1001
1002
|
};
|
|
1002
|
-
|
|
1003
|
+
l("input", E, s.value.valueAsNumber), l("change", f, s.value.valueAsNumber);
|
|
1003
1004
|
}
|
|
1004
1005
|
}
|
|
1005
1006
|
function Ne(f) {
|
|
@@ -1008,7 +1009,7 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
1008
1009
|
const E = {
|
|
1009
1010
|
target: s.value
|
|
1010
1011
|
};
|
|
1011
|
-
|
|
1012
|
+
l("input", E, s.value.valueAsNumber), l("change", f, s.value.valueAsNumber);
|
|
1012
1013
|
}
|
|
1013
1014
|
}
|
|
1014
1015
|
function ve(f) {
|
|
@@ -1027,17 +1028,17 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
1027
1028
|
var B;
|
|
1028
1029
|
let f = !0;
|
|
1029
1030
|
const E = a.value;
|
|
1030
|
-
return m.value ? f = E : n.value && ((B = g.value) == null ? void 0 : B.toString().trim()) === "" && (f = !1), f;
|
|
1031
|
+
return m.value ? f = E : n.value && ((B = g.value) == null ? void 0 : B.toString().trim()) === "" && (f = !1), !e.hideRequiredAsterisk && f;
|
|
1031
1032
|
}
|
|
1032
1033
|
async function x(f) {
|
|
1033
|
-
const E = Fe(f,
|
|
1034
|
-
|
|
1035
|
-
}
|
|
1036
|
-
return
|
|
1037
|
-
|
|
1038
|
-
}), K(() =>
|
|
1039
|
-
await D(g.value),
|
|
1040
|
-
}), K(() =>
|
|
1034
|
+
const E = Fe(f, e.inputType);
|
|
1035
|
+
e.validateOn === "change" && await D(E), l("change", f, E);
|
|
1036
|
+
}
|
|
1037
|
+
return qe(() => {
|
|
1038
|
+
e.validateImmediately && y(e.modelValue, !0);
|
|
1039
|
+
}), K(() => e.isRequired, () => y(e.modelValue, !0)), K(() => e.externalErrors, async () => {
|
|
1040
|
+
await D(g.value), l("update:model-value", g.value);
|
|
1041
|
+
}), K(() => e.modelValue, () => y(e.modelValue, !0)), o({
|
|
1041
1042
|
focus() {
|
|
1042
1043
|
var f;
|
|
1043
1044
|
(f = s.value) == null || f.focus();
|
|
@@ -1046,7 +1047,7 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
1046
1047
|
var f;
|
|
1047
1048
|
(f = s.value) == null || f.blur();
|
|
1048
1049
|
}
|
|
1049
|
-
}), (f, E) => (
|
|
1050
|
+
}), (f, E) => (c(), v("div", se({ ...f.$attrs, id: void 0 }, {
|
|
1050
1051
|
key: u.value,
|
|
1051
1052
|
class: "cl-align-top cl-border-none cl-inline-block cl-text-left"
|
|
1052
1053
|
}), [
|
|
@@ -1060,10 +1061,10 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
1060
1061
|
[H, f.showLabel && f.label !== ""]
|
|
1061
1062
|
])
|
|
1062
1063
|
]),
|
|
1063
|
-
f.isRequired && a.value ? (
|
|
1064
|
-
f.isRequired && !a.value && f.requiredText.length ? (
|
|
1064
|
+
f.isRequired && a.value ? (c(), v("label", rt, " * ")) : N("", !0),
|
|
1065
|
+
f.isRequired && !a.value && f.requiredText.length ? (c(), v("label", it, T(f.requiredText), 1)) : N("", !0)
|
|
1065
1066
|
]),
|
|
1066
|
-
f.inputType !== "range" && !d(Pe)(f.inputType) ? (
|
|
1067
|
+
f.inputType !== "range" && !d(Pe)(f.inputType) ? (c(), v("div", ct, [
|
|
1067
1068
|
L(p("input", se({
|
|
1068
1069
|
ref_key: "inputElement",
|
|
1069
1070
|
ref: s,
|
|
@@ -1087,18 +1088,18 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
1087
1088
|
minlength: f.min !== null && d(Le)(f.inputType) ? f.min : void 0,
|
|
1088
1089
|
maxlength: f.max !== null && d(Le)(f.inputType) ? f.max : void 0,
|
|
1089
1090
|
step: f.step,
|
|
1090
|
-
placeholder:
|
|
1091
|
+
placeholder: i.value,
|
|
1091
1092
|
accept: f.fileExtensions,
|
|
1092
1093
|
name: f.group,
|
|
1093
1094
|
autocomplete: f.autocomplete,
|
|
1094
1095
|
onClick: E[1] || (E[1] = (B) => Z(B)),
|
|
1095
|
-
onFocus: E[2] || (E[2] = (B) =>
|
|
1096
|
+
onFocus: E[2] || (E[2] = (B) => l("focus")),
|
|
1096
1097
|
onBlur: E[3] || (E[3] = W((B) => {
|
|
1097
1098
|
be(), ke();
|
|
1098
1099
|
}, ["self"])),
|
|
1099
1100
|
onMousewheelPassive: he,
|
|
1100
1101
|
onInput: E[4] || (E[4] = (B) => {
|
|
1101
|
-
|
|
1102
|
+
l("input", B, d(Fe)(B, f.inputType));
|
|
1102
1103
|
}),
|
|
1103
1104
|
onChange: x
|
|
1104
1105
|
}), null, 16, ut), [
|
|
@@ -1109,11 +1110,11 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
1109
1110
|
duration: 300
|
|
1110
1111
|
}, {
|
|
1111
1112
|
default: P(() => [
|
|
1112
|
-
f.inputType === "number" && !f.disabled && f.showArrows ? L((
|
|
1113
|
+
f.inputType === "number" && !f.disabled && f.showArrows ? L((c(), v("div", dt, [
|
|
1113
1114
|
k(d(_), {
|
|
1114
1115
|
icon: "ph:caret-up-bold",
|
|
1115
1116
|
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",
|
|
1116
|
-
onClick:
|
|
1117
|
+
onClick: ie,
|
|
1117
1118
|
onMousedown: E[5] || (E[5] = W(() => {
|
|
1118
1119
|
}, ["prevent"]))
|
|
1119
1120
|
}),
|
|
@@ -1130,7 +1131,7 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
1130
1131
|
]),
|
|
1131
1132
|
_: 1
|
|
1132
1133
|
})
|
|
1133
|
-
])) : d(Pe)(f.inputType) ? (
|
|
1134
|
+
])) : d(Pe)(f.inputType) ? (c(), V(d(xl), se({ key: 1 }, f.$attrs, {
|
|
1134
1135
|
ref_key: "inputElement",
|
|
1135
1136
|
ref: s,
|
|
1136
1137
|
date: b.value,
|
|
@@ -1146,31 +1147,31 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
1146
1147
|
"time-zone": f.timeZone,
|
|
1147
1148
|
min: r.value,
|
|
1148
1149
|
max: w.value,
|
|
1149
|
-
placeholder:
|
|
1150
|
+
placeholder: i.value,
|
|
1150
1151
|
onBlur: W(be, ["self"]),
|
|
1151
|
-
onFocus: E[8] || (E[8] = (B) =>
|
|
1152
|
-
}), null, 16, ["date", "class", "disabled", "required", "type", "time-zone", "min", "max", "placeholder", "onBlur"])) : f.inputType === "range" && typeof g.value == "number" ? (
|
|
1152
|
+
onFocus: E[8] || (E[8] = (B) => l("focus"))
|
|
1153
|
+
}), null, 16, ["date", "class", "disabled", "required", "type", "time-zone", "min", "max", "placeholder", "onBlur"])) : f.inputType === "range" && typeof g.value == "number" ? (c(), v("div", pt, [
|
|
1153
1154
|
k(d(tt), {
|
|
1154
1155
|
ref_key: "inputElement",
|
|
1155
1156
|
ref: s,
|
|
1156
1157
|
value: g.value,
|
|
1157
1158
|
"onUpdate:value": E[9] || (E[9] = (B) => g.value = B),
|
|
1158
1159
|
min: h.value ?? 0,
|
|
1159
|
-
max:
|
|
1160
|
+
max: A.value ?? 1e3,
|
|
1160
1161
|
step: f.step,
|
|
1161
1162
|
disabled: f.disabled,
|
|
1162
1163
|
"show-numeric-input": !1,
|
|
1163
1164
|
onBlur: W(be, ["self"]),
|
|
1164
|
-
onFocus: E[10] || (E[10] = (B) =>
|
|
1165
|
+
onFocus: E[10] || (E[10] = (B) => l("focus"))
|
|
1165
1166
|
}, null, 8, ["value", "min", "max", "step", "disabled", "onBlur"])
|
|
1166
1167
|
])) : N("", !0)
|
|
1167
1168
|
], 32),
|
|
1168
|
-
R.value && $.value ? (
|
|
1169
|
-
!R.value && z.value.length > 0 && f.showValidationMessages ? (
|
|
1169
|
+
R.value && $.value ? (c(), v("div", ft, T($.value), 1)) : N("", !0),
|
|
1170
|
+
!R.value && z.value.length > 0 && f.showValidationMessages ? (c(), v("div", mt, T(z.value), 1)) : N("", !0)
|
|
1170
1171
|
], 16));
|
|
1171
1172
|
}
|
|
1172
1173
|
});
|
|
1173
|
-
const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-
|
|
1174
|
+
const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-2832cc65"]]), vt = { 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" }, bt = ["onKeypress"], ht = { class: "cl-overflow-y-auto cl-overscroll-y-none cl-p-2 cl-w-full" }, Xe = /* @__PURE__ */ M({
|
|
1174
1175
|
inheritAttrs: !1,
|
|
1175
1176
|
__name: "cl-ui-modal",
|
|
1176
1177
|
props: {
|
|
@@ -1179,19 +1180,19 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { cl
|
|
|
1179
1180
|
size: { default: "medium" }
|
|
1180
1181
|
},
|
|
1181
1182
|
setup(t) {
|
|
1182
|
-
const o = t,
|
|
1183
|
-
function
|
|
1184
|
-
|
|
1183
|
+
const o = t, l = q(!1);
|
|
1184
|
+
function e() {
|
|
1185
|
+
l.value = !0, document.addEventListener("keydown", m);
|
|
1185
1186
|
}
|
|
1186
1187
|
function s() {
|
|
1187
|
-
o.preventClose || (
|
|
1188
|
+
o.preventClose || (l.value = !1, document.removeEventListener("keydown", m));
|
|
1188
1189
|
}
|
|
1189
1190
|
function m(n) {
|
|
1190
1191
|
n.key === "Escape" && s();
|
|
1191
1192
|
}
|
|
1192
|
-
return (n, a) => (
|
|
1193
|
-
j(n.$slots, "trigger", le(ne({ open:
|
|
1194
|
-
(
|
|
1193
|
+
return (n, a) => (c(), v(F, null, [
|
|
1194
|
+
j(n.$slots, "trigger", le(ne({ open: e }))),
|
|
1195
|
+
(c(), V(Ie, { to: "body" }, [
|
|
1195
1196
|
k(me, { name: "fade" }, {
|
|
1196
1197
|
default: P(() => [
|
|
1197
1198
|
L(p("div", vt, [
|
|
@@ -1231,7 +1232,7 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { cl
|
|
|
1231
1232
|
j(n.$slots, "footer", le(ne({ close: s })))
|
|
1232
1233
|
], 16)
|
|
1233
1234
|
], 512), [
|
|
1234
|
-
[H,
|
|
1235
|
+
[H, l.value]
|
|
1235
1236
|
])
|
|
1236
1237
|
]),
|
|
1237
1238
|
_: 3
|
|
@@ -1253,8 +1254,8 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { cl
|
|
|
1253
1254
|
"clear-object": null
|
|
1254
1255
|
},
|
|
1255
1256
|
setup(t) {
|
|
1256
|
-
return (o,
|
|
1257
|
-
o.additionalText !== "" ? (
|
|
1257
|
+
return (o, l) => (c(), v("div", yt, [
|
|
1258
|
+
o.additionalText !== "" ? (c(), v("div", wt, T(o.additionalText), 1)) : N("", !0),
|
|
1258
1259
|
p("div", {
|
|
1259
1260
|
class: I({
|
|
1260
1261
|
"cl-w-1/2": o.additionalText !== "",
|
|
@@ -1263,7 +1264,7 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { cl
|
|
|
1263
1264
|
}, T(o.text), 3),
|
|
1264
1265
|
L(p("div", {
|
|
1265
1266
|
class: "cl-cursor-pointer cl-float-right",
|
|
1266
|
-
onMousedown:
|
|
1267
|
+
onMousedown: l[0] || (l[0] = (e) => o.$emit("clear-object"))
|
|
1267
1268
|
}, [
|
|
1268
1269
|
k(d(_), {
|
|
1269
1270
|
class: "cl-mt-1 cl-transition-colors hover:cl-text-link-default",
|
|
@@ -1292,26 +1293,26 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { cl
|
|
|
1292
1293
|
"option-highlighted": null
|
|
1293
1294
|
},
|
|
1294
1295
|
setup(t, { emit: o }) {
|
|
1295
|
-
const
|
|
1296
|
+
const l = t, e = S(() => {
|
|
1296
1297
|
var u;
|
|
1297
|
-
return ((u =
|
|
1298
|
+
return ((u = l.option) == null ? void 0 : u.name) ?? l.text;
|
|
1298
1299
|
}), s = S(() => {
|
|
1299
1300
|
var u;
|
|
1300
|
-
return ((u =
|
|
1301
|
-
}), m =
|
|
1301
|
+
return ((u = l.option) == null ? void 0 : u.parentName) ?? "";
|
|
1302
|
+
}), m = q(!1);
|
|
1302
1303
|
function n() {
|
|
1303
1304
|
var u;
|
|
1304
|
-
|
|
1305
|
+
l.isCreateNewOption === !0 ? o("create-object") : o("select-object", (u = l.option) == null ? void 0 : u.id);
|
|
1305
1306
|
}
|
|
1306
1307
|
function a(u) {
|
|
1307
|
-
u === !0 ? (m.value = !0, o("option-highlighted",
|
|
1308
|
+
u === !0 ? (m.value = !0, o("option-highlighted", l.index)) : l.index !== l.selectedIndex && (m.value = !1);
|
|
1308
1309
|
}
|
|
1309
|
-
function
|
|
1310
|
-
|
|
1310
|
+
function i() {
|
|
1311
|
+
l.selectedIndex === l.index ? m.value = !0 : m.value = !1;
|
|
1311
1312
|
}
|
|
1312
|
-
return K(() =>
|
|
1313
|
+
return K(() => l.selectedIndex, () => i()), (u, g) => {
|
|
1313
1314
|
var b, r;
|
|
1314
|
-
return
|
|
1315
|
+
return c(), v("div", {
|
|
1315
1316
|
class: I(["cl-cursor-pointer cl-duration-75 cl-flex cl-p-1 cl-text-left cl-transition-colors", {
|
|
1316
1317
|
"cl-bg-white": m.value === !1,
|
|
1317
1318
|
"cl-bg-link-light cl-text-white cl-opacity-90": m.value && u.isCreateNewOption === !1,
|
|
@@ -1321,13 +1322,13 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { cl
|
|
|
1321
1322
|
onMousemove: g[0] || (g[0] = (w) => a(!0)),
|
|
1322
1323
|
onMouseleave: g[1] || (g[1] = (w) => a(!1))
|
|
1323
1324
|
}, [
|
|
1324
|
-
u.option !== null && ((b = u.option) == null ? void 0 : b.parentId) !== 0 && ((r = u.option) == null ? void 0 : r.parentId) !== void 0 ? (
|
|
1325
|
+
u.option !== null && ((b = u.option) == null ? void 0 : b.parentId) !== 0 && ((r = u.option) == null ? void 0 : r.parentId) !== void 0 ? (c(), v("div", $t, T(s.value), 1)) : N("", !0),
|
|
1325
1326
|
p("div", {
|
|
1326
1327
|
class: I({
|
|
1327
1328
|
"cl-w-1/2": s.value !== "",
|
|
1328
1329
|
"cl-w-full": s.value === ""
|
|
1329
1330
|
})
|
|
1330
|
-
}, T(
|
|
1331
|
+
}, T(e.value), 3),
|
|
1331
1332
|
L(p("div", kt, [
|
|
1332
1333
|
k(d(_), {
|
|
1333
1334
|
class: I(["cl-transition-colors", {
|
|
@@ -1364,7 +1365,7 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { cl
|
|
|
1364
1365
|
"hide-dropdown": null
|
|
1365
1366
|
},
|
|
1366
1367
|
setup(t, { emit: o }) {
|
|
1367
|
-
const
|
|
1368
|
+
const l = t, { t: e } = oe(), s = q(""), m = q(!1), n = q(-1), a = S(() => m.value ? -1 : 0), i = q();
|
|
1368
1369
|
function u(y) {
|
|
1369
1370
|
(y === void 0 || (y == null ? void 0 : y.code.startsWith("Arrow")) === !1 && (y == null ? void 0 : y.code.startsWith("Control")) === !1 && (y == null ? void 0 : y.code.startsWith("Shift")) === !1 && (y == null ? void 0 : y.code.startsWith("Tab")) === !1 && (y == null ? void 0 : y.code) !== "Enter") && (o("search", s.value), n.value = -2);
|
|
1370
1371
|
}
|
|
@@ -1378,13 +1379,13 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { cl
|
|
|
1378
1379
|
o("hide-dropdown");
|
|
1379
1380
|
}
|
|
1380
1381
|
function w(y) {
|
|
1381
|
-
n.value <
|
|
1382
|
+
n.value < l.results.length - 1 ? (n.value === -2 && s.value === "" && n.value++, n.value++) : n.value = y, R();
|
|
1382
1383
|
}
|
|
1383
1384
|
function h(y) {
|
|
1384
|
-
n.value > y ? n.value-- : n.value =
|
|
1385
|
+
n.value > y ? n.value-- : n.value = l.results.length - 1, R();
|
|
1385
1386
|
}
|
|
1386
|
-
function
|
|
1387
|
-
n.value >= 0 &&
|
|
1387
|
+
function A() {
|
|
1388
|
+
n.value >= 0 && l.results !== void 0 ? g(l.results[n.value].id) : n.value === -1 && b();
|
|
1388
1389
|
}
|
|
1389
1390
|
function $(y) {
|
|
1390
1391
|
if (y.key === "Tab" && y.shiftKey === !0) {
|
|
@@ -1397,38 +1398,38 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { cl
|
|
|
1397
1398
|
}
|
|
1398
1399
|
function R() {
|
|
1399
1400
|
var y;
|
|
1400
|
-
|
|
1401
|
+
l.results && l.results.length > 1 && ((y = i.value) == null || y.scrollTo(0, (n.value + 1) * 34 - 34 * 2));
|
|
1401
1402
|
}
|
|
1402
1403
|
function O() {
|
|
1403
1404
|
let y = !1;
|
|
1404
|
-
|
|
1405
|
+
l.results !== null && l.results.length === 1 && (y = s.value.toUpperCase().trim() === l.results[0].name.toUpperCase().trim()), m.value = l.canCreateNewObject === !0 && l.errorMessage === "" && s.value.trim() !== "" && y === !1;
|
|
1405
1406
|
}
|
|
1406
1407
|
function z(y) {
|
|
1407
1408
|
n.value = y;
|
|
1408
1409
|
}
|
|
1409
1410
|
function U() {
|
|
1410
|
-
|
|
1411
|
+
l.isVisible === !0 && (s.value = "", u(), ge(() => {
|
|
1411
1412
|
var y, D;
|
|
1412
|
-
return (D = (y =
|
|
1413
|
+
return (D = (y = i.value) == null ? void 0 : y.querySelector("input")) == null ? void 0 : D.focus();
|
|
1413
1414
|
}));
|
|
1414
1415
|
}
|
|
1415
|
-
return K(() =>
|
|
1416
|
+
return K(() => l.results, () => O()), K(() => l.errorMessage, () => O()), K(() => l.isVisible, () => U()), qe(() => {
|
|
1416
1417
|
var y;
|
|
1417
|
-
return (y =
|
|
1418
|
+
return (y = i.value) == null ? void 0 : y.addEventListener("keydown", $);
|
|
1418
1419
|
}), _e(() => {
|
|
1419
1420
|
var y;
|
|
1420
|
-
return (y =
|
|
1421
|
+
return (y = i.value) == null ? void 0 : y.removeEventListener("keydown", $);
|
|
1421
1422
|
}), (y, D) => {
|
|
1422
1423
|
var J;
|
|
1423
|
-
return
|
|
1424
|
+
return c(), v("div", {
|
|
1424
1425
|
ref_key: "container",
|
|
1425
|
-
ref:
|
|
1426
|
+
ref: i,
|
|
1426
1427
|
class: "cl-absolute cl-bg-white cl-border cl-border-collapse cl-border-grey-0 cl-h-52 cl-overflow-y-auto cl-overscroll-y-none cl-rounded cl-text-sm cl-w-full cl-z-20",
|
|
1427
1428
|
onKeydown: [
|
|
1428
1429
|
D[2] || (D[2] = we(W((Z) => h(a.value), ["prevent", "stop"]), ["up"])),
|
|
1429
1430
|
D[3] || (D[3] = we(W((Z) => w(a.value), ["prevent", "stop"]), ["down"]))
|
|
1430
1431
|
],
|
|
1431
|
-
onKeyup: we(W(
|
|
1432
|
+
onKeyup: we(W(A, ["prevent", "stop"]), ["enter"])
|
|
1432
1433
|
}, [
|
|
1433
1434
|
p("div", Tt, [
|
|
1434
1435
|
k(ae, {
|
|
@@ -1444,42 +1445,42 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { cl
|
|
|
1444
1445
|
[H, y.loading]
|
|
1445
1446
|
])
|
|
1446
1447
|
]),
|
|
1447
|
-
y.currentObjectName !== "" ? (
|
|
1448
|
+
y.currentObjectName !== "" ? (c(), V(Te, {
|
|
1448
1449
|
key: 0,
|
|
1449
1450
|
"show-clear-button": y.canClearSelectedObject,
|
|
1450
1451
|
text: y.currentObjectName,
|
|
1451
1452
|
onClearObject: D[1] || (D[1] = (Z) => y.$emit("clear-object"))
|
|
1452
1453
|
}, null, 8, ["show-clear-button", "text"])) : N("", !0),
|
|
1453
|
-
y.objectParentType !== "" && y.results !== void 0 && y.results.length > 0 && y.errorMessage === "" ? (
|
|
1454
|
+
y.objectParentType !== "" && y.results !== void 0 && y.results.length > 0 && y.errorMessage === "" ? (c(), V(Te, {
|
|
1454
1455
|
key: 1,
|
|
1455
1456
|
text: y.objectType,
|
|
1456
1457
|
"additional-text": y.objectParentType,
|
|
1457
1458
|
class: "cl-bg-grey-2 cl-mt-1"
|
|
1458
1459
|
}, null, 8, ["text", "additional-text"])) : N("", !0),
|
|
1459
|
-
y.results !== null && ((J = y.results) == null ? void 0 : J.length) === 0 && s.value.trim() !== "" && y.canCreateNewObject === !1 && y.errorMessage === "" ? (
|
|
1460
|
+
y.results !== null && ((J = y.results) == null ? void 0 : J.length) === 0 && s.value.trim() !== "" && y.canCreateNewObject === !1 && y.errorMessage === "" ? (c(), V(Te, {
|
|
1460
1461
|
key: 2,
|
|
1461
|
-
text: d(
|
|
1462
|
+
text: d(e)("comboBox.noResults", { value: s.value })
|
|
1462
1463
|
}, null, 8, ["text"])) : N("", !0),
|
|
1463
|
-
y.errorMessage !== "" ? (
|
|
1464
|
+
y.errorMessage !== "" ? (c(), V(Te, {
|
|
1464
1465
|
key: 3,
|
|
1465
1466
|
class: "!cl-bg-danger-light cl-border-danger-light cl-rounded cl-text-danger-dark",
|
|
1466
|
-
text: d(
|
|
1467
|
+
text: d(e)("comboBox.errorMessage", { error: y.errorMessage })
|
|
1467
1468
|
}, null, 8, ["text"])) : N("", !0),
|
|
1468
|
-
m.value ? (
|
|
1469
|
+
m.value ? (c(), V(He, {
|
|
1469
1470
|
key: 4,
|
|
1470
1471
|
"is-create-new-option": !0,
|
|
1471
|
-
text: d(
|
|
1472
|
+
text: d(e)("comboBox.addPrompt", { value: s.value, object: y.objectType }),
|
|
1472
1473
|
index: -1,
|
|
1473
1474
|
"selected-index": n.value,
|
|
1474
1475
|
class: "cl-px-2",
|
|
1475
1476
|
onCreateObject: b,
|
|
1476
1477
|
onOptionHighlighted: z
|
|
1477
1478
|
}, null, 8, ["text", "selected-index"])) : N("", !0),
|
|
1478
|
-
y.errorMessage === "" && y.results !== null ? (
|
|
1479
|
-
(
|
|
1480
|
-
key:
|
|
1479
|
+
y.errorMessage === "" && y.results !== null ? (c(), v("div", Et, [
|
|
1480
|
+
(c(!0), v(F, null, Q(y.results, (Z, ie) => (c(), V(He, {
|
|
1481
|
+
key: ie,
|
|
1481
1482
|
option: Z,
|
|
1482
|
-
index:
|
|
1483
|
+
index: ie,
|
|
1483
1484
|
class: "cl-px-2",
|
|
1484
1485
|
"selected-index": n.value,
|
|
1485
1486
|
onSelectObject: g,
|
|
@@ -1489,7 +1490,7 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { cl
|
|
|
1489
1490
|
], 40, Ct);
|
|
1490
1491
|
};
|
|
1491
1492
|
}
|
|
1492
|
-
}),
|
|
1493
|
+
}), At = { class: "cl-flex" }, qt = { class: "cl-relative cl-right-20 cl-top-0.5" }, St = { class: "cl-absolute cl-flex cl-float-right cl-font-semibold cl-mt-2 cl-text-danger-default cl-text-sm cl-z-10" }, Nt = { class: "cl-min-h-[16rem] cl-mx-4" }, jt = { class: "cl-p-2 cl-text-right cl-w-full" }, It = /* @__PURE__ */ M({
|
|
1493
1494
|
__name: "cl-ui-combo-box",
|
|
1494
1495
|
props: {
|
|
1495
1496
|
loading: { type: Boolean, default: !1 },
|
|
@@ -1516,35 +1517,35 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { cl
|
|
|
1516
1517
|
"create-parent-object": null,
|
|
1517
1518
|
"update:current-object": null
|
|
1518
1519
|
},
|
|
1519
|
-
setup(t, { expose: o, emit:
|
|
1520
|
-
const
|
|
1521
|
-
get: () =>
|
|
1522
|
-
set: (C) =>
|
|
1523
|
-
}), u =
|
|
1520
|
+
setup(t, { expose: o, emit: l }) {
|
|
1521
|
+
const e = t, s = S(() => e.placeholderText ? e.placeholderText : n("comboBox.emptyHintText", { object: e.objectType })), m = S(() => e.searchHint ? e.searchHint : n("comboBox.searchHint", { object: e.objectType })), { t: n } = oe(), a = q(!1), i = S({
|
|
1522
|
+
get: () => e.currentObject,
|
|
1523
|
+
set: (C) => l("update:current-object", C)
|
|
1524
|
+
}), u = q(null), g = q(null), b = S(() => be()), r = q(""), w = q(""), h = q(), A = q(!0), $ = q(!1);
|
|
1524
1525
|
function R(C) {
|
|
1525
1526
|
var f, E;
|
|
1526
1527
|
const x = ((f = he.value) == null ? void 0 : f.getBoundingClientRect().top) || 0;
|
|
1527
|
-
$.value = window.innerHeight - x < 280,
|
|
1528
|
+
$.value = window.innerHeight - x < 280, e.disabled || (typeof C < "u" ? a.value = C : a.value = !a.value), (E = u.value) == null || E.blur();
|
|
1528
1529
|
}
|
|
1529
1530
|
function O(C) {
|
|
1530
|
-
r.value = C,
|
|
1531
|
+
r.value = C, l("search", C);
|
|
1531
1532
|
}
|
|
1532
1533
|
function z(C) {
|
|
1533
|
-
w.value = C,
|
|
1534
|
+
w.value = C, l("search-parent", C);
|
|
1534
1535
|
}
|
|
1535
1536
|
function U() {
|
|
1536
|
-
|
|
1537
|
+
i.value = null, R(!1);
|
|
1537
1538
|
}
|
|
1538
1539
|
function y(C) {
|
|
1539
1540
|
const x = D(C);
|
|
1540
|
-
|
|
1541
|
+
i.value = x, R(!1);
|
|
1541
1542
|
}
|
|
1542
1543
|
function D(C) {
|
|
1543
1544
|
let x = null;
|
|
1544
|
-
if (
|
|
1545
|
-
for (let f = 0; f <
|
|
1546
|
-
if (
|
|
1547
|
-
x =
|
|
1545
|
+
if (e.results !== null) {
|
|
1546
|
+
for (let f = 0; f < e.results.length; f++)
|
|
1547
|
+
if (e.results[f].id === C) {
|
|
1548
|
+
x = e.results[f];
|
|
1548
1549
|
break;
|
|
1549
1550
|
}
|
|
1550
1551
|
}
|
|
@@ -1555,67 +1556,67 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { cl
|
|
|
1555
1556
|
h.value = {
|
|
1556
1557
|
name: r.value,
|
|
1557
1558
|
parentId: ((C = g.value) == null ? void 0 : C.id) ?? 0
|
|
1558
|
-
},
|
|
1559
|
+
}, l("create-object", h.value);
|
|
1559
1560
|
}
|
|
1560
1561
|
function Z() {
|
|
1561
1562
|
h.value = {
|
|
1562
1563
|
name: w.value,
|
|
1563
1564
|
parentId: 0
|
|
1564
|
-
},
|
|
1565
|
+
}, l("create-parent-object", h.value);
|
|
1565
1566
|
}
|
|
1566
|
-
function
|
|
1567
|
+
function ie() {
|
|
1567
1568
|
var C, x;
|
|
1568
|
-
(C =
|
|
1569
|
-
message: n("comboBox.createFailed", { name: r.value, error:
|
|
1569
|
+
(C = e.objectCreatedResponse) != null && C.error ? Ve({
|
|
1570
|
+
message: n("comboBox.createFailed", { name: r.value, error: e.objectCreatedResponse.error }),
|
|
1570
1571
|
colour: "danger",
|
|
1571
1572
|
duration: 1e4
|
|
1572
|
-
}) : (x =
|
|
1573
|
+
}) : (x = e.objectCreatedResponse) != null && x.id && ve();
|
|
1573
1574
|
}
|
|
1574
1575
|
function Ne() {
|
|
1575
1576
|
var C;
|
|
1576
|
-
(C =
|
|
1577
|
-
id:
|
|
1578
|
-
name:
|
|
1577
|
+
(C = e.parentObjectCreatedResponse) != null && C.id && (g.value = {
|
|
1578
|
+
id: e.parentObjectCreatedResponse.id,
|
|
1579
|
+
name: e.parentObjectCreatedResponse.name ?? ""
|
|
1579
1580
|
});
|
|
1580
1581
|
}
|
|
1581
1582
|
function ve() {
|
|
1582
1583
|
var x, f, E, B, pe;
|
|
1583
1584
|
Ve({
|
|
1584
|
-
message: n("comboBox.createSuccessful", { object:
|
|
1585
|
+
message: n("comboBox.createSuccessful", { object: e.objectType, name: ((x = e.objectCreatedResponse) == null ? void 0 : x.name) ?? "" }),
|
|
1585
1586
|
colour: "primary",
|
|
1586
1587
|
duration: 1e4
|
|
1587
1588
|
});
|
|
1588
1589
|
let C = "";
|
|
1589
|
-
g.value && g.value.id === ((f =
|
|
1590
|
-
id: ((E =
|
|
1591
|
-
name: ((B =
|
|
1592
|
-
parentId: ((pe =
|
|
1590
|
+
g.value && g.value.id === ((f = e.objectCreatedResponse) == null ? void 0 : f.parentId) && (C = g.value.name), i.value = {
|
|
1591
|
+
id: ((E = e.objectCreatedResponse) == null ? void 0 : E.id) ?? 0,
|
|
1592
|
+
name: ((B = e.objectCreatedResponse) == null ? void 0 : B.name) ?? "",
|
|
1593
|
+
parentId: ((pe = e.objectCreatedResponse) == null ? void 0 : pe.parentId) ?? 0,
|
|
1593
1594
|
parentName: C
|
|
1594
1595
|
};
|
|
1595
1596
|
}
|
|
1596
1597
|
function be() {
|
|
1597
1598
|
let C = "";
|
|
1598
|
-
return
|
|
1599
|
+
return i.value && (i.value.parentName ? C = i.value.parentName + "; " + i.value.name : C = i.value.name), C;
|
|
1599
1600
|
}
|
|
1600
1601
|
function ke() {
|
|
1601
1602
|
let C = !0;
|
|
1602
|
-
r.value === "" && (C = !1),
|
|
1603
|
+
r.value === "" && (C = !1), e.objectParentType !== "" && g.value === null && (C = !1), A.value = C;
|
|
1603
1604
|
}
|
|
1604
|
-
K(() =>
|
|
1605
|
+
K(() => e.objectCreatedResponse, () => ie()), K(() => e.parentObjectCreatedResponse, () => Ne()), K(() => r.value, () => ke()), K(() => g.value, () => ke()), o({
|
|
1605
1606
|
focus() {
|
|
1606
1607
|
var C;
|
|
1607
1608
|
(C = u.value) == null || C.focus();
|
|
1608
1609
|
}
|
|
1609
1610
|
});
|
|
1610
|
-
const he =
|
|
1611
|
+
const he = q();
|
|
1611
1612
|
return ze(he, () => a.value ? R(!1) : ""), (C, x) => {
|
|
1612
1613
|
const f = sl("cl-ui-combo-box", !0);
|
|
1613
|
-
return
|
|
1614
|
+
return c(), v("div", {
|
|
1614
1615
|
ref_key: "outsideRef",
|
|
1615
1616
|
ref: he,
|
|
1616
1617
|
class: "cl-relative"
|
|
1617
1618
|
}, [
|
|
1618
|
-
p("div",
|
|
1619
|
+
p("div", At, [
|
|
1619
1620
|
k(ae, {
|
|
1620
1621
|
ref_key: "inputRef",
|
|
1621
1622
|
ref: u,
|
|
@@ -1630,7 +1631,7 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { cl
|
|
|
1630
1631
|
R(), C.$emit("focus");
|
|
1631
1632
|
})
|
|
1632
1633
|
}, null, 8, ["modelValue", "class", "placeholder-text"]),
|
|
1633
|
-
L(p("div",
|
|
1634
|
+
L(p("div", qt, [
|
|
1634
1635
|
p("div", St, [
|
|
1635
1636
|
ee(T(d(n)("comboBox.required")) + " ", 1),
|
|
1636
1637
|
k(d(_), {
|
|
@@ -1641,7 +1642,7 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { cl
|
|
|
1641
1642
|
], 512), [
|
|
1642
1643
|
[H, C.required && C.disabled === !1 && C.currentObject === null]
|
|
1643
1644
|
]),
|
|
1644
|
-
a.value ? (
|
|
1645
|
+
a.value ? (c(), v("div", {
|
|
1645
1646
|
key: 1,
|
|
1646
1647
|
class: I(["cl-bg-white cl-border cl-border-grey-1 cl-float-right cl-h-10 cl-rounded cl-rounded-l-none cl-text-grey-3 cl-transition-colors cl-w-[27px] hover:cl-bg-link-light hover:cl-opacity-90 hover:cl-text-white", {
|
|
1647
1648
|
"cl-cursor-default": C.disabled,
|
|
@@ -1653,7 +1654,7 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { cl
|
|
|
1653
1654
|
icon: "ph:caret-up-bold",
|
|
1654
1655
|
class: "cl-ml-[5px] cl-mt-[12px]"
|
|
1655
1656
|
})
|
|
1656
|
-
], 2)) : (
|
|
1657
|
+
], 2)) : (c(), v("div", {
|
|
1657
1658
|
key: 0,
|
|
1658
1659
|
class: I(["cl-bg-white cl-border cl-border-grey-1 cl-float-right cl-h-10 cl-rounded cl-rounded-l-none cl-text-grey-3 cl-transition-colors cl-w-[27px] hover:cl-bg-link-light hover:cl-opacity-90 hover:cl-text-white", {
|
|
1659
1660
|
"cl-cursor-default": C.disabled,
|
|
@@ -1710,7 +1711,7 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { cl
|
|
|
1710
1711
|
k(fe, {
|
|
1711
1712
|
colour: "primary",
|
|
1712
1713
|
size: "small",
|
|
1713
|
-
disabled: !
|
|
1714
|
+
disabled: !A.value,
|
|
1714
1715
|
onClick: (B) => {
|
|
1715
1716
|
J(), E();
|
|
1716
1717
|
}
|
|
@@ -1724,7 +1725,7 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { cl
|
|
|
1724
1725
|
]),
|
|
1725
1726
|
default: P(() => [
|
|
1726
1727
|
p("div", Nt, [
|
|
1727
|
-
C.objectParentType ? (
|
|
1728
|
+
C.objectParentType ? (c(), V(f, {
|
|
1728
1729
|
key: 0,
|
|
1729
1730
|
"current-object": g.value,
|
|
1730
1731
|
"onUpdate:currentObject": x[4] || (x[4] = (E) => g.value = E),
|
|
@@ -1768,11 +1769,11 @@ const zt = {}, Ut = { class: "cl-flex cl-flex-wrap cl-left-0 cl-mt-4 cl-w-full"
|
|
|
1768
1769
|
class: "cl-leading-10 cl-text-sm cl-w-full"
|
|
1769
1770
|
}, Vt = { class: "cl-float-left" }, Dt = { class: "cl-float-right" };
|
|
1770
1771
|
function Lt(t, o) {
|
|
1771
|
-
return
|
|
1772
|
-
t.$slots.default ? (
|
|
1772
|
+
return c(), v("div", Ut, [
|
|
1773
|
+
t.$slots.default ? (c(), v("div", Bt, [
|
|
1773
1774
|
j(t.$slots, "default")
|
|
1774
1775
|
])) : N("", !0),
|
|
1775
|
-
t.$slots.left || t.$slots.right ? (
|
|
1776
|
+
t.$slots.left || t.$slots.right ? (c(), v("div", Mt, [
|
|
1776
1777
|
p("span", Vt, [
|
|
1777
1778
|
j(t.$slots, "left")
|
|
1778
1779
|
]),
|
|
@@ -1784,12 +1785,12 @@ function Lt(t, o) {
|
|
|
1784
1785
|
}
|
|
1785
1786
|
const Pt = /* @__PURE__ */ de(zt, [["render", Lt]]);
|
|
1786
1787
|
function Oe(t) {
|
|
1787
|
-
const o = t.type !== "slot" || t.slotType !== void 0 && t.field !== void 0,
|
|
1788
|
-
return o &&
|
|
1788
|
+
const o = t.type !== "slot" || t.slotType !== void 0 && t.field !== void 0, l = t.sortable ?? !0;
|
|
1789
|
+
return o && l;
|
|
1789
1790
|
}
|
|
1790
1791
|
function Ue(t) {
|
|
1791
|
-
const o = t.type !== "slot" || t.slotType !== void 0 && t.field !== void 0,
|
|
1792
|
-
return o &&
|
|
1792
|
+
const o = t.type !== "slot" || t.slotType !== void 0 && t.field !== void 0, l = t.filterable ?? !0;
|
|
1793
|
+
return o && l;
|
|
1793
1794
|
}
|
|
1794
1795
|
function Ft(t) {
|
|
1795
1796
|
return t.some((o) => Oe(o));
|
|
@@ -1813,42 +1814,42 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
1813
1814
|
emits: ["update:edit-mode", "update:filterPanelOpen", "clear-filters"],
|
|
1814
1815
|
setup(t) {
|
|
1815
1816
|
const { t: o } = oe();
|
|
1816
|
-
return (
|
|
1817
|
+
return (l, e) => (c(), v(F, null, [
|
|
1817
1818
|
p("div", Ht, [
|
|
1818
1819
|
p("strong", null, T(d(o)("grid.gridTools")), 1)
|
|
1819
1820
|
]),
|
|
1820
1821
|
p("div", xt, [
|
|
1821
1822
|
p("div", Gt, [
|
|
1822
|
-
j(
|
|
1823
|
-
loading:
|
|
1824
|
-
editMode:
|
|
1823
|
+
j(l.$slots, "additional-grid-actions", le(ne({
|
|
1824
|
+
loading: l.loading,
|
|
1825
|
+
editMode: l.editMode
|
|
1825
1826
|
})))
|
|
1826
1827
|
]),
|
|
1827
1828
|
Zt,
|
|
1828
|
-
|
|
1829
|
+
l.columns.some((s) => s.editable) ? (c(), V(fe, {
|
|
1829
1830
|
key: 0,
|
|
1830
1831
|
size: "small",
|
|
1831
1832
|
colour: "default",
|
|
1832
|
-
onClick:
|
|
1833
|
+
onClick: e[0] || (e[0] = W((s) => l.$emit("update:edit-mode", !l.editMode), ["prevent"]))
|
|
1833
1834
|
}, {
|
|
1834
1835
|
default: P(() => [
|
|
1835
|
-
|
|
1836
|
+
l.editMode ? (c(), v(F, { key: 0 }, [
|
|
1836
1837
|
ee(T(d(o)("grid.finishEditing")), 1)
|
|
1837
|
-
], 64)) : (
|
|
1838
|
+
], 64)) : (c(), v(F, { key: 1 }, [
|
|
1838
1839
|
ee(T(d(o)("grid.editData")), 1)
|
|
1839
1840
|
], 64))
|
|
1840
1841
|
]),
|
|
1841
1842
|
_: 1
|
|
1842
1843
|
})) : N("", !0),
|
|
1843
|
-
|
|
1844
|
-
j(
|
|
1844
|
+
l.options.hideViewManager ? N("", !0) : (c(), v("div", Wt, [
|
|
1845
|
+
j(l.$slots, "view-manager")
|
|
1845
1846
|
])),
|
|
1846
|
-
d(xe)(
|
|
1847
|
+
d(xe)(l.columns) || d(Ft)(l.columns) ? (c(), v(F, { key: 2 }, [
|
|
1847
1848
|
p("div", Kt, [
|
|
1848
1849
|
k(fe, {
|
|
1849
1850
|
class: "cl-w-full",
|
|
1850
1851
|
size: "small",
|
|
1851
|
-
onClick:
|
|
1852
|
+
onClick: e[1] || (e[1] = W((s) => l.$emit("update:filterPanelOpen", !l.filterPanelOpen), ["prevent"]))
|
|
1852
1853
|
}, {
|
|
1853
1854
|
default: P(() => [
|
|
1854
1855
|
ee(T(d(o)("grid.modifyFilters")), 1)
|
|
@@ -1856,14 +1857,14 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
1856
1857
|
_: 1
|
|
1857
1858
|
})
|
|
1858
1859
|
]),
|
|
1859
|
-
d(xe)(
|
|
1860
|
+
d(xe)(l.columns) ? (c(), V(fe, {
|
|
1860
1861
|
key: 0,
|
|
1861
1862
|
size: "small",
|
|
1862
|
-
colour:
|
|
1863
|
+
colour: l.request.filters.some((s) => s.filterValue !== "") ? "danger" : "default",
|
|
1863
1864
|
class: I({
|
|
1864
|
-
"cl-col-span-2":
|
|
1865
|
+
"cl-col-span-2": l.columns.some((s) => s.editable)
|
|
1865
1866
|
}),
|
|
1866
|
-
onClick:
|
|
1867
|
+
onClick: e[2] || (e[2] = W((s) => l.$emit("clear-filters"), ["prevent"]))
|
|
1867
1868
|
}, {
|
|
1868
1869
|
default: P(() => [
|
|
1869
1870
|
ee(T(d(o)("grid.clearFilters")), 1)
|
|
@@ -1894,50 +1895,50 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
1894
1895
|
timeZone: {}
|
|
1895
1896
|
},
|
|
1896
1897
|
setup(t) {
|
|
1897
|
-
const o = t, { t:
|
|
1898
|
+
const o = t, { t: l, locale: e, n: s } = oe();
|
|
1898
1899
|
function m(n, a) {
|
|
1899
|
-
const
|
|
1900
|
-
locale:
|
|
1900
|
+
const i = $e.fromISO(n, {
|
|
1901
|
+
locale: e.value
|
|
1901
1902
|
}).setZone(o.timeZone);
|
|
1902
1903
|
let u = "";
|
|
1903
1904
|
switch (a) {
|
|
1904
1905
|
case G.SHORT_DATE:
|
|
1905
1906
|
case G.DATE:
|
|
1906
|
-
u =
|
|
1907
|
+
u = i.toFormat("D");
|
|
1907
1908
|
break;
|
|
1908
1909
|
case G.LONG_DATE:
|
|
1909
|
-
u =
|
|
1910
|
+
u = i.toFormat("DDD");
|
|
1910
1911
|
break;
|
|
1911
1912
|
case G.SHORT_DATETIME:
|
|
1912
1913
|
case G.DATETIME:
|
|
1913
|
-
u =
|
|
1914
|
+
u = i.toFormat("f");
|
|
1914
1915
|
break;
|
|
1915
1916
|
case G.LONG_DATETIME:
|
|
1916
|
-
u =
|
|
1917
|
+
u = i.toFormat("fff");
|
|
1917
1918
|
break;
|
|
1918
1919
|
case G.TIME:
|
|
1919
|
-
u =
|
|
1920
|
+
u = i.toFormat("t");
|
|
1920
1921
|
break;
|
|
1921
1922
|
}
|
|
1922
1923
|
return u;
|
|
1923
1924
|
}
|
|
1924
1925
|
return (n, a) => {
|
|
1925
|
-
var
|
|
1926
|
-
return n.column.type === "slot" ? j(n.$slots, n.column.name, { key: 0 }) : n.column.type === "boolean" && n.column.field !== void 0 ? (
|
|
1926
|
+
var i;
|
|
1927
|
+
return n.column.type === "slot" ? j(n.$slots, n.column.name, { key: 0 }) : n.column.type === "boolean" && n.column.field !== void 0 ? (c(), V(ae, {
|
|
1927
1928
|
key: 1,
|
|
1928
1929
|
"input-type": "checkbox",
|
|
1929
1930
|
"model-value": n.data[n.column.field],
|
|
1930
1931
|
disabled: !0
|
|
1931
|
-
}, null, 8, ["model-value"])) : (n.column.type === "date" || n.column.type === "datetime") && n.column.field !== void 0 ? (
|
|
1932
|
-
n.column.format !== void 0 ? (
|
|
1932
|
+
}, null, 8, ["model-value"])) : (n.column.type === "date" || n.column.type === "datetime") && n.column.field !== void 0 ? (c(), v(F, { key: 2 }, [
|
|
1933
|
+
n.column.format !== void 0 ? (c(), v(F, { key: 0 }, [
|
|
1933
1934
|
ee(T(m(n.data[n.column.field], n.column.format)), 1)
|
|
1934
|
-
], 64)) : n.column.type === "date" ? (
|
|
1935
|
+
], 64)) : n.column.type === "date" ? (c(), v(F, { key: 1 }, [
|
|
1935
1936
|
ee(T(m(n.data[n.column.field], d(G).DATE)), 1)
|
|
1936
|
-
], 64)) : (
|
|
1937
|
+
], 64)) : (c(), v(F, { key: 2 }, [
|
|
1937
1938
|
ee(T(m(n.data[n.column.field], d(G).DATETIME)), 1)
|
|
1938
1939
|
], 64))
|
|
1939
|
-
], 64)) : n.column.type === "list" && n.column.field !== void 0 && n.column.listEntries !== void 0 ? (
|
|
1940
|
-
n.column.maxLength !== void 0 ? (
|
|
1940
|
+
], 64)) : n.column.type === "list" && n.column.field !== void 0 && n.column.listEntries !== void 0 ? (c(), v("span", Jt, T(d(l)(((i = n.column.listEntries.find((u) => u.value === n.data[n.column.field])) == null ? void 0 : i.translationKey) ?? "")), 1)) : n.column.type === "number" && n.column.field !== void 0 ? (c(), v("span", Yt, T(d(s)(n.data[n.column.field], n.column.format ?? d(Y).DECIMAL)), 1)) : n.column.field !== void 0 ? (c(), v(F, { key: 5 }, [
|
|
1941
|
+
n.column.maxLength !== void 0 ? (c(), v("span", Xt, T(n.data[n.column.field].trimToLength(n.column.maxLength, n.column.format !== void 0 ? n.column.format === "ellipsis" : !1)), 1)) : (c(), v("span", eo, T(n.data[n.column.field]), 1))
|
|
1941
1942
|
], 64)) : N("", !0);
|
|
1942
1943
|
};
|
|
1943
1944
|
}
|
|
@@ -1951,19 +1952,19 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
1951
1952
|
},
|
|
1952
1953
|
emits: ["edit", "focus", "undo"],
|
|
1953
1954
|
setup(t, { emit: o }) {
|
|
1954
|
-
const
|
|
1955
|
+
const l = t, { t: e } = oe(), s = q(re(l.data)), m = S(() => l.column.field !== void 0 && s.value[l.column.field] !== l.data[l.column.field]), n = S(() => {
|
|
1955
1956
|
var a;
|
|
1956
|
-
return ((a =
|
|
1957
|
+
return ((a = l.column.listEntries) == null ? void 0 : a.map((i, u) => ({
|
|
1957
1958
|
id: u,
|
|
1958
|
-
name:
|
|
1959
|
+
name: e(i.translationKey)
|
|
1959
1960
|
}))) ?? [];
|
|
1960
1961
|
});
|
|
1961
|
-
return al(() => s.value = re(
|
|
1962
|
-
const
|
|
1963
|
-
|
|
1962
|
+
return al(() => s.value = re(l.data)), K(s, (a) => {
|
|
1963
|
+
const i = l.column.field ?? "";
|
|
1964
|
+
i !== "" && (a[i] !== l.data[i] ? o("edit", a[i]) : o("undo"));
|
|
1964
1965
|
}, {
|
|
1965
1966
|
deep: !0
|
|
1966
|
-
}), (a,
|
|
1967
|
+
}), (a, i) => (c(), v("td", {
|
|
1967
1968
|
class: I(["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", {
|
|
1968
1969
|
"cl-bg-link-lighter": m.value
|
|
1969
1970
|
}])
|
|
@@ -1986,7 +1987,7 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
1986
1987
|
]),
|
|
1987
1988
|
_: 2
|
|
1988
1989
|
}, 1032, ["column", "data", "time-zone"])
|
|
1989
|
-
]) : (
|
|
1990
|
+
]) : (c(), V(Ge, {
|
|
1990
1991
|
key: 1,
|
|
1991
1992
|
column: a.column,
|
|
1992
1993
|
data: a.data,
|
|
@@ -2009,16 +2010,16 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
2009
2010
|
},
|
|
2010
2011
|
emits: ["cell-focus", "cell-edit", "cell-undo", "row-select"],
|
|
2011
2012
|
setup(t) {
|
|
2012
|
-
return (o,
|
|
2013
|
-
(
|
|
2013
|
+
return (o, l) => (c(), v("tr", null, [
|
|
2014
|
+
(c(!0), v(F, null, Q(o.columns, (e, s) => (c(), V(to, {
|
|
2014
2015
|
key: s,
|
|
2015
2016
|
data: o.data,
|
|
2016
|
-
column:
|
|
2017
|
+
column: e,
|
|
2017
2018
|
"time-zone": o.timeZone,
|
|
2018
2019
|
"edit-mode": o.editMode,
|
|
2019
|
-
onFocus:
|
|
2020
|
-
onEdit: (m) => o.$emit("cell-edit", { field:
|
|
2021
|
-
onUndo: (m) => o.$emit("cell-undo",
|
|
2020
|
+
onFocus: l[0] || (l[0] = (m) => o.$emit("cell-focus")),
|
|
2021
|
+
onEdit: (m) => o.$emit("cell-edit", { field: e.field, value: m }),
|
|
2022
|
+
onUndo: (m) => o.$emit("cell-undo", e.field)
|
|
2022
2023
|
}, Re({ _: 2 }, [
|
|
2023
2024
|
Q(o.$slots, (m, n) => ({
|
|
2024
2025
|
name: n,
|
|
@@ -2029,10 +2030,10 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
2029
2030
|
]), 1032, ["data", "column", "time-zone", "edit-mode", "onEdit", "onUndo"]))), 128))
|
|
2030
2031
|
]));
|
|
2031
2032
|
}
|
|
2032
|
-
}), no = { key: 1 }, so = ["colspan"], ao = { class: "cl-flex cl-flex-wrap cl-justify-center cl-text-center cl-text-sm cl-w-full" }, ro = { class: "cl-mt-6 cl-w-full" },
|
|
2033
|
+
}), no = { key: 1 }, so = ["colspan"], ao = { class: "cl-flex cl-flex-wrap cl-justify-center cl-text-center cl-text-sm cl-w-full" }, ro = { class: "cl-mt-6 cl-w-full" }, io = {
|
|
2033
2034
|
key: 0,
|
|
2034
2035
|
class: "cl-mt-4"
|
|
2035
|
-
},
|
|
2036
|
+
}, co = { class: "cl-mb-2 cl-w-full" }, uo = /* @__PURE__ */ M({
|
|
2036
2037
|
__name: "cl-ui-grid-body",
|
|
2037
2038
|
props: {
|
|
2038
2039
|
columns: {},
|
|
@@ -2045,7 +2046,7 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
2045
2046
|
},
|
|
2046
2047
|
emits: ["row-select", "row-edit", "clear-filters"],
|
|
2047
2048
|
setup(t, { emit: o }) {
|
|
2048
|
-
const
|
|
2049
|
+
const l = t, { t: e } = oe(), s = q({
|
|
2049
2050
|
index: -1,
|
|
2050
2051
|
record: {}
|
|
2051
2052
|
});
|
|
@@ -2058,7 +2059,7 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
2058
2059
|
function a(r, w) {
|
|
2059
2060
|
n(r), w.field !== void 0 && (s.value.record[w.field] = w.value);
|
|
2060
2061
|
}
|
|
2061
|
-
function
|
|
2062
|
+
function i(r) {
|
|
2062
2063
|
if (r !== void 0) {
|
|
2063
2064
|
const { [r]: w, ...h } = s.value.record;
|
|
2064
2065
|
s.value.record = {
|
|
@@ -2066,16 +2067,16 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
2066
2067
|
};
|
|
2067
2068
|
}
|
|
2068
2069
|
}
|
|
2069
|
-
const u =
|
|
2070
|
-
K(() =>
|
|
2070
|
+
const u = q({});
|
|
2071
|
+
K(() => l.data, () => {
|
|
2071
2072
|
var r, w;
|
|
2072
|
-
return u.value = Object.fromEntries(((w = (r =
|
|
2073
|
-
[
|
|
2073
|
+
return u.value = Object.fromEntries(((w = (r = l.data) == null ? void 0 : r.results) == null ? void 0 : w.map((h, A) => [
|
|
2074
|
+
[A],
|
|
2074
2075
|
{
|
|
2075
2076
|
count: 0,
|
|
2076
2077
|
target: null,
|
|
2077
2078
|
reset: Ke(() => {
|
|
2078
|
-
u.value[
|
|
2079
|
+
u.value[A] && (u.value[A].count = 0, b(u.value[A].target), u.value[A].target = null);
|
|
2079
2080
|
}, 2500, { immediate: !1 })
|
|
2080
2081
|
}
|
|
2081
2082
|
])) ?? []);
|
|
@@ -2084,20 +2085,20 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
2084
2085
|
immediate: !0
|
|
2085
2086
|
});
|
|
2086
2087
|
function g(r, w, h) {
|
|
2087
|
-
const { currentTarget:
|
|
2088
|
-
|
|
2088
|
+
const { currentTarget: A } = h;
|
|
2089
|
+
l.selectionEnabled ? o("row-select", w) : (u.value[r].count++, u.value[r].target = A, u.value[r].count > 1 ? (u.value[r].reset.stop(), u.value[r].count = 0, b(A), u.value[r].target = null, o("row-select", w)) : (u.value[r].reset.start(), b(A)));
|
|
2089
2090
|
}
|
|
2090
2091
|
function b(r) {
|
|
2091
2092
|
r == null || r.classList.toggle("!cl-bg-link-lighter");
|
|
2092
2093
|
}
|
|
2093
|
-
return K(() =>
|
|
2094
|
-
|
|
2094
|
+
return K(() => l.editMode, () => {
|
|
2095
|
+
l.editMode || (m(), s.value.index = -1);
|
|
2095
2096
|
}), (r, w) => {
|
|
2096
2097
|
var h;
|
|
2097
|
-
return
|
|
2098
|
-
r.data && ((h = r.data.results) != null && h.length) ? (
|
|
2098
|
+
return c(), v("tbody", null, [
|
|
2099
|
+
r.data && ((h = r.data.results) != null && h.length) ? (c(!0), v(F, { key: 0 }, Q(r.data.results, (A, $) => (c(), V(oo, {
|
|
2099
2100
|
key: $,
|
|
2100
|
-
data:
|
|
2101
|
+
data: A,
|
|
2101
2102
|
columns: r.columns,
|
|
2102
2103
|
"time-zone": r.timeZone,
|
|
2103
2104
|
"edit-mode": r.editMode,
|
|
@@ -2107,7 +2108,7 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
2107
2108
|
"cl-cursor-pointer hover:cl-bg-link-lighter": r.selectionEnabled && !r.editMode
|
|
2108
2109
|
}]),
|
|
2109
2110
|
onClick: (R) => {
|
|
2110
|
-
r.editMode || g($,
|
|
2111
|
+
r.editMode || g($, A, R);
|
|
2111
2112
|
},
|
|
2112
2113
|
onCellFocus: (R) => {
|
|
2113
2114
|
n($);
|
|
@@ -2115,7 +2116,7 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
2115
2116
|
onCellEdit: (R) => {
|
|
2116
2117
|
a($, R);
|
|
2117
2118
|
},
|
|
2118
|
-
onCellUndo:
|
|
2119
|
+
onCellUndo: i
|
|
2119
2120
|
}, Re({ _: 2 }, [
|
|
2120
2121
|
Q(r.$slots, (R, O) => ({
|
|
2121
2122
|
name: O,
|
|
@@ -2123,21 +2124,21 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
2123
2124
|
j(r.$slots, O, le(ne(z)))
|
|
2124
2125
|
])
|
|
2125
2126
|
}))
|
|
2126
|
-
]), 1032, ["data", "columns", "time-zone", "edit-mode", "class", "onClick", "onCellFocus", "onCellEdit"]))), 128)) : r.loading ? N("", !0) : (
|
|
2127
|
+
]), 1032, ["data", "columns", "time-zone", "edit-mode", "class", "onClick", "onCellFocus", "onCellEdit"]))), 128)) : r.loading ? N("", !0) : (c(), v("tr", no, [
|
|
2127
2128
|
p("td", {
|
|
2128
2129
|
colspan: r.columns.length
|
|
2129
2130
|
}, [
|
|
2130
2131
|
p("div", ao, [
|
|
2131
|
-
p("strong", ro, T(d(
|
|
2132
|
-
r.request.filters.length > 0 ? (
|
|
2133
|
-
p("div",
|
|
2132
|
+
p("strong", ro, T(d(e)("grid.noData")), 1),
|
|
2133
|
+
r.request.filters.length > 0 ? (c(), v("div", io, [
|
|
2134
|
+
p("div", co, T(d(e)("grid.noDataFiltersPresent")), 1),
|
|
2134
2135
|
k(fe, {
|
|
2135
2136
|
size: "small",
|
|
2136
2137
|
colour: "danger",
|
|
2137
|
-
onClick: w[0] || (w[0] = W((
|
|
2138
|
+
onClick: w[0] || (w[0] = W((A) => r.$emit("clear-filters"), ["prevent"]))
|
|
2138
2139
|
}, {
|
|
2139
2140
|
default: P(() => [
|
|
2140
|
-
ee(T(d(
|
|
2141
|
+
ee(T(d(e)("grid.clearFilters")), 1)
|
|
2141
2142
|
]),
|
|
2142
2143
|
_: 1
|
|
2143
2144
|
})
|
|
@@ -2151,7 +2152,7 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
2151
2152
|
}), po = {
|
|
2152
2153
|
key: 0,
|
|
2153
2154
|
class: "cl-flex cl-flex-wrap cl-justify-end cl-mt-2 cl-w-full"
|
|
2154
|
-
}, fo = { class: "cl-bg-off-white cl-border cl-border-grey-1 cl-flex cl-items-center cl-mb-2 cl-px-3 cl-rounded cl-shadow-md cl-text-sm cl-w-full lg:cl-w-auto" }, mo = { class: "cl-text-grey-3 cl-w-max" }, go = { class: "cl-bg-off-white cl-border cl-border-grey-1 cl-flex cl-flex-wrap cl-items-center cl-mb-2 cl-px-3 cl-py-2 cl-rounded cl-shadow-md cl-text-sm cl-w-full lg:cl-ml-2 lg:cl-w-auto mb:cl-flex-nowrap" }, vo = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-text-sm cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, bo = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, ho = { class: "cl-text-grey-3 cl-w-full lg:cl-mr-2 lg:cl-w-auto" }, yo = { class: "cl-flex cl-flex-wrap cl-text-sm mb:cl-flex-nowrap" }, wo = { class: "cl-pr-2" }, $o = ["onClick"], ko = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-text-sm cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, Co = { class: "cl-mb-2 cl-text-grey-3 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, To = ["onClick"], Eo = { class: "cl-mb-2 cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, Oo = { class: "cl-block cl-mb-2 cl-text-grey-3 cl-w-full lg:cl-inline-block lg:cl-mb-0 lg:cl-mr-1 lg:cl-w-auto" },
|
|
2155
|
+
}, fo = { class: "cl-bg-off-white cl-border cl-border-grey-1 cl-flex cl-items-center cl-mb-2 cl-px-3 cl-rounded cl-shadow-md cl-text-sm cl-w-full lg:cl-w-auto" }, mo = { class: "cl-text-grey-3 cl-w-max" }, go = { class: "cl-bg-off-white cl-border cl-border-grey-1 cl-flex cl-flex-wrap cl-items-center cl-mb-2 cl-px-3 cl-py-2 cl-rounded cl-shadow-md cl-text-sm cl-w-full lg:cl-ml-2 lg:cl-w-auto mb:cl-flex-nowrap" }, vo = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-text-sm cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, bo = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, ho = { class: "cl-text-grey-3 cl-w-full lg:cl-mr-2 lg:cl-w-auto" }, yo = { class: "cl-flex cl-flex-wrap cl-text-sm mb:cl-flex-nowrap" }, wo = { class: "cl-pr-2" }, $o = ["onClick"], ko = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-text-sm cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, Co = { class: "cl-mb-2 cl-text-grey-3 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, To = ["onClick"], Eo = { class: "cl-mb-2 cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, Oo = { class: "cl-block cl-mb-2 cl-text-grey-3 cl-w-full lg:cl-inline-block lg:cl-mb-0 lg:cl-mr-1 lg:cl-w-auto" }, Ao = { class: "cl-block lg:cl-inline-block" }, qo = /* @__PURE__ */ M({
|
|
2155
2156
|
__name: "cl-ui-grid-footer",
|
|
2156
2157
|
props: {
|
|
2157
2158
|
request: {},
|
|
@@ -2161,23 +2162,23 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
2161
2162
|
"update:request": null
|
|
2162
2163
|
},
|
|
2163
2164
|
setup(t, { emit: o }) {
|
|
2164
|
-
const
|
|
2165
|
+
const l = t, { n: e, t: s } = oe(), m = S(() => {
|
|
2165
2166
|
var r;
|
|
2166
|
-
return
|
|
2167
|
+
return l.data !== null ? Math.ceil((((r = l.data) == null ? void 0 : r.totalRecords) ?? 0) / l.request.pageSize) : 1;
|
|
2167
2168
|
}), n = S(() => {
|
|
2168
2169
|
const r = Array.from(Array(m.value + 1).keys());
|
|
2169
2170
|
let w = [];
|
|
2170
2171
|
if (r.shift(), r.length) {
|
|
2171
|
-
const h =
|
|
2172
|
+
const h = l.request.pageNumber === m.value || l.request.pageNumber === m.value - 1 ? m.value - 3 : l.request.pageNumber - 1;
|
|
2172
2173
|
w = r.slice(h, h + 3);
|
|
2173
2174
|
}
|
|
2174
2175
|
return w;
|
|
2175
2176
|
});
|
|
2176
2177
|
function a(r) {
|
|
2177
|
-
const w = re(
|
|
2178
|
+
const w = re(l.request);
|
|
2178
2179
|
w.pageNumber !== r && (w.pageNumber = Math.max(Math.min(Math.trunc(r), m.value), 1), o("update:request", w));
|
|
2179
2180
|
}
|
|
2180
|
-
function
|
|
2181
|
+
function i(r) {
|
|
2181
2182
|
const w = parseInt(r == null ? void 0 : r.value) || 1;
|
|
2182
2183
|
a(w);
|
|
2183
2184
|
}
|
|
@@ -2190,13 +2191,13 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
2190
2191
|
200
|
|
2191
2192
|
];
|
|
2192
2193
|
function g(r) {
|
|
2193
|
-
const w = re(
|
|
2194
|
+
const w = re(l.request);
|
|
2194
2195
|
w.pageSize = r, w.pageNumber = 1, o("update:request", w);
|
|
2195
2196
|
}
|
|
2196
|
-
const b = Qe(
|
|
2197
|
+
const b = Qe(i, 750);
|
|
2197
2198
|
return (r, w) => {
|
|
2198
|
-
var h,
|
|
2199
|
-
return (
|
|
2199
|
+
var h, A;
|
|
2200
|
+
return (A = (h = r.data) == null ? void 0 : h.results) != null && A.length && r.request ? (c(), v("div", po, [
|
|
2200
2201
|
p("div", fo, [
|
|
2201
2202
|
p("span", mo, T(d(s)("grid.jumpToPage")), 1),
|
|
2202
2203
|
k(ae, {
|
|
@@ -2216,7 +2217,7 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
2216
2217
|
p("span", ho, T(d(s)("grid.page")), 1)
|
|
2217
2218
|
]),
|
|
2218
2219
|
p("ul", yo, [
|
|
2219
|
-
p("li", wo, T(d(
|
|
2220
|
+
p("li", wo, T(d(e)(r.request.pageNumber, d(Y).INTEGER)) + " / " + T(d(e)(m.value, d(Y).INTEGER)), 1),
|
|
2220
2221
|
L(p("li", {
|
|
2221
2222
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2222
2223
|
onClick: w[1] || (w[1] = ($) => a(1))
|
|
@@ -2239,14 +2240,14 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
2239
2240
|
], 512), [
|
|
2240
2241
|
[H, r.request.pageNumber > 1]
|
|
2241
2242
|
]),
|
|
2242
|
-
(
|
|
2243
|
+
(c(!0), v(F, null, Q(n.value, ($, R) => (c(), v("li", {
|
|
2243
2244
|
key: R,
|
|
2244
2245
|
class: I(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2245
2246
|
"cl-text-black cl-font-bold": r.request.pageNumber === $,
|
|
2246
2247
|
"cl-text-grey-6": r.request.pageNumber !== $
|
|
2247
2248
|
}]),
|
|
2248
2249
|
onClick: (O) => a($)
|
|
2249
|
-
}, T(d(
|
|
2250
|
+
}, T(d(e)($, d(Y).INTEGER)), 11, $o))), 128)),
|
|
2250
2251
|
L(p("li", {
|
|
2251
2252
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2252
2253
|
onClick: w[3] || (w[3] = ($) => a(r.request.pageNumber + 1))
|
|
@@ -2273,18 +2274,18 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1
|
|
|
2273
2274
|
]),
|
|
2274
2275
|
p("ul", ko, [
|
|
2275
2276
|
p("li", Co, T(d(s)("grid.pageSize")), 1),
|
|
2276
|
-
(
|
|
2277
|
+
(c(), v(F, null, Q(u, ($, R) => p("li", {
|
|
2277
2278
|
key: R,
|
|
2278
2279
|
class: I(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2279
2280
|
"cl-text-black cl-font-bold": r.request.pageSize === $,
|
|
2280
2281
|
"cl-text-grey-6": r.request.pageSize !== $
|
|
2281
2282
|
}]),
|
|
2282
2283
|
onClick: (O) => g($)
|
|
2283
|
-
}, T(d(
|
|
2284
|
+
}, T(d(e)($, d(Y).INTEGER)), 11, To)), 64))
|
|
2284
2285
|
]),
|
|
2285
2286
|
p("ul", Eo, [
|
|
2286
2287
|
p("li", Oo, T(d(s)("grid.totalRecords")), 1),
|
|
2287
|
-
p("li",
|
|
2288
|
+
p("li", Ao, T(d(e)(r.data.totalRecords, d(Y).INTEGER)), 1)
|
|
2288
2289
|
])
|
|
2289
2290
|
])
|
|
2290
2291
|
])) : N("", !0);
|
|
@@ -2305,8 +2306,8 @@ function el(t) {
|
|
|
2305
2306
|
function No(t) {
|
|
2306
2307
|
let o = Array.isArray(t);
|
|
2307
2308
|
if (o) {
|
|
2308
|
-
for (const
|
|
2309
|
-
if (!el(
|
|
2309
|
+
for (const l of t)
|
|
2310
|
+
if (!el(l)) {
|
|
2310
2311
|
o = !1;
|
|
2311
2312
|
break;
|
|
2312
2313
|
}
|
|
@@ -2336,8 +2337,8 @@ function Ro(t) {
|
|
|
2336
2337
|
function zo(t) {
|
|
2337
2338
|
let o = typeof t.filters == "object" && Array.isArray(t.filters) && typeof t.pageNumber == "number" && typeof t.pageSize == "number" && typeof t.sort == "object" && Ro(t.sort);
|
|
2338
2339
|
if (o) {
|
|
2339
|
-
for (const
|
|
2340
|
-
if (!_o(
|
|
2340
|
+
for (const l of t.filters)
|
|
2341
|
+
if (!_o(l)) {
|
|
2341
2342
|
o = !1;
|
|
2342
2343
|
break;
|
|
2343
2344
|
}
|
|
@@ -2345,15 +2346,15 @@ function zo(t) {
|
|
|
2345
2346
|
return o;
|
|
2346
2347
|
}
|
|
2347
2348
|
function Uo(t, o) {
|
|
2348
|
-
let
|
|
2349
|
-
if (
|
|
2350
|
-
for (const
|
|
2351
|
-
if (!o(
|
|
2352
|
-
|
|
2349
|
+
let l = typeof t.results == "object" && Array.isArray(t.results) && typeof t.totalRecords == "number";
|
|
2350
|
+
if (l) {
|
|
2351
|
+
for (const e of t.results)
|
|
2352
|
+
if (!o(e)) {
|
|
2353
|
+
l = !1;
|
|
2353
2354
|
break;
|
|
2354
2355
|
}
|
|
2355
2356
|
}
|
|
2356
|
-
return
|
|
2357
|
+
return l;
|
|
2357
2358
|
}
|
|
2358
2359
|
const Bo = {
|
|
2359
2360
|
method: "equal",
|
|
@@ -2480,44 +2481,44 @@ const Bo = {
|
|
|
2480
2481
|
},
|
|
2481
2482
|
emits: ["update:filter"],
|
|
2482
2483
|
setup(t, { emit: o }) {
|
|
2483
|
-
const
|
|
2484
|
+
const l = t, { t: e } = oe(), s = S(() => {
|
|
2484
2485
|
let a = [];
|
|
2485
|
-
return
|
|
2486
|
-
|
|
2487
|
-
}) : a.forEach((
|
|
2488
|
-
|
|
2486
|
+
return l.column.type !== "slot" ? a = Ze.filter((i) => i.allowedTypes.includes(l.column.type)) : typeof l.column.slotType < "u" && typeof l.column.field < "u" && (a = Ze.filter((i) => i.allowedTypes.includes(l.column.slotType))), l.column.type === "date" || l.column.type === "datetime" || l.column.slotType === "date" || l.column.slotType === "datetime" ? a.forEach((i) => {
|
|
2487
|
+
i.description = e(`grid.${i.key}`);
|
|
2488
|
+
}) : a.forEach((i) => {
|
|
2489
|
+
i.description = e(`grid.${i.method}`);
|
|
2489
2490
|
}), a;
|
|
2490
2491
|
}), m = S(() => {
|
|
2491
|
-
var
|
|
2492
|
-
let a = (
|
|
2493
|
-
return typeof a > "u" && (a = te[
|
|
2492
|
+
var i;
|
|
2493
|
+
let a = (i = l.filter) == null ? void 0 : i.filterMethod;
|
|
2494
|
+
return typeof a > "u" && (a = te[l.defaultOperation].toLowerCase()), s.value.find((u) => {
|
|
2494
2495
|
var g;
|
|
2495
2496
|
return u.method.toLowerCase() === ((g = a == null ? void 0 : a.removeNonAlphanumeric()) == null ? void 0 : g.toLowerCase());
|
|
2496
2497
|
});
|
|
2497
2498
|
});
|
|
2498
2499
|
function n(a) {
|
|
2499
|
-
let
|
|
2500
|
-
if (
|
|
2501
|
-
|
|
2502
|
-
else if (typeof
|
|
2503
|
-
|
|
2504
|
-
filterOnColumn:
|
|
2500
|
+
let i;
|
|
2501
|
+
if (l.filter)
|
|
2502
|
+
i = re(l.filter), i.filterOperation = te[a.toUpperCase()], i.filterMethod = a.toLowerCase();
|
|
2503
|
+
else if (typeof l.column.field < "u")
|
|
2504
|
+
i = {
|
|
2505
|
+
filterOnColumn: l.column.field,
|
|
2505
2506
|
filterMethod: a.toLowerCase(),
|
|
2506
2507
|
filterOperation: te[a.toUpperCase()],
|
|
2507
2508
|
filterValue: ""
|
|
2508
2509
|
};
|
|
2509
2510
|
else
|
|
2510
2511
|
return;
|
|
2511
|
-
o("update:filter",
|
|
2512
|
+
o("update:filter", i);
|
|
2512
2513
|
}
|
|
2513
|
-
return (a,
|
|
2514
|
+
return (a, i) => (c(), v("div", Do, [
|
|
2514
2515
|
p("div", Lo, [
|
|
2515
|
-
m.value ? (
|
|
2516
|
+
m.value ? (c(), V(d(_), {
|
|
2516
2517
|
key: 0,
|
|
2517
2518
|
icon: m.value.icon,
|
|
2518
2519
|
class: I(["cl-text-lg", {
|
|
2519
|
-
"cl-text-grey-4":
|
|
2520
|
-
"cl-text-primary-default":
|
|
2520
|
+
"cl-text-grey-4": l.filter === void 0 || l.filter.filterValue === "",
|
|
2521
|
+
"cl-text-primary-default": l.filter && l.filter.filterValue !== ""
|
|
2521
2522
|
}])
|
|
2522
2523
|
}, null, 8, ["icon", "class"])) : N("", !0)
|
|
2523
2524
|
]),
|
|
@@ -2527,10 +2528,10 @@ const Bo = {
|
|
|
2527
2528
|
"cl--left-44": !a.firstHalf
|
|
2528
2529
|
}])
|
|
2529
2530
|
}, [
|
|
2530
|
-
p("strong", Po, T(d(
|
|
2531
|
-
(
|
|
2531
|
+
p("strong", Po, T(d(e)("grid.availableMethods")), 1),
|
|
2532
|
+
(c(!0), v(F, null, Q(s.value, (u, g) => {
|
|
2532
2533
|
var b;
|
|
2533
|
-
return
|
|
2534
|
+
return c(), v("span", {
|
|
2534
2535
|
key: g,
|
|
2535
2536
|
class: I(["cl-cursor-pointer cl-px-4 cl-py-1 cl-transition-colors cl-w-full hover:cl-bg-grey-0", {
|
|
2536
2537
|
"cl-bg-primary-default cl-opacity-80": u.method === ((b = m.value) == null ? void 0 : b.method)
|
|
@@ -2560,21 +2561,21 @@ const Bo = {
|
|
|
2560
2561
|
},
|
|
2561
2562
|
emits: ["update:filter"],
|
|
2562
2563
|
setup(t, { emit: o }) {
|
|
2563
|
-
const
|
|
2564
|
+
const l = t, { locale: e, t: s } = oe();
|
|
2564
2565
|
function m() {
|
|
2565
|
-
return
|
|
2566
|
+
return l.column.type === "string" || l.column.slotType === "string" ? te.CONTAINS : l.column.type === "datetime" || l.column.slotType === "datetime" || l.column.type === "date" || l.column.slotType === "date" ? te.LESS_THAN : te.EQUAL;
|
|
2566
2567
|
}
|
|
2567
2568
|
const n = S({
|
|
2568
|
-
get: () =>
|
|
2569
|
+
get: () => l.filter,
|
|
2569
2570
|
set: (O) => o("update:filter", O)
|
|
2570
|
-
}), a = S(() =>
|
|
2571
|
+
}), a = S(() => l.column.type === "date" || l.column.type === "datetime" || l.column.type === "slot" && (l.column.slotType === "date" || l.column.slotType === "datetime")), i = S(() => l.column.type === "list" || l.column.type === "slot" && l.column.slotType === "list"), u = S(() => i.value && l.column.listType === "number"), g = S({
|
|
2571
2572
|
get() {
|
|
2572
2573
|
var z, U, y, D;
|
|
2573
2574
|
let O = (z = n.value) == null ? void 0 : z[0];
|
|
2574
|
-
if (O && a.value && (((U =
|
|
2575
|
-
const J = (y = n.value) == null ? void 0 : y.find((
|
|
2575
|
+
if (O && a.value && (((U = l.filter) == null ? void 0 : U.length) ?? 0 > 1)) {
|
|
2576
|
+
const J = (y = n.value) == null ? void 0 : y.find((ie) => ie.filterOperation === te.EQUAL_OR_GREATER_THAN), Z = (D = n.value) == null ? void 0 : D.find((ie) => ie.filterOperation === te.LESS_THAN);
|
|
2576
2577
|
J && Z && (O = {
|
|
2577
|
-
filterOnColumn:
|
|
2578
|
+
filterOnColumn: l.column.field,
|
|
2578
2579
|
filterOperation: te.EQUAL,
|
|
2579
2580
|
filterMethod: "equal",
|
|
2580
2581
|
filterValue: J.filterValue
|
|
@@ -2585,20 +2586,20 @@ const Bo = {
|
|
|
2585
2586
|
set(O) {
|
|
2586
2587
|
if (O && b(O.filterOperation, O.filterValue)) {
|
|
2587
2588
|
let z = $e.fromISO(O.filterValue, {
|
|
2588
|
-
zone:
|
|
2589
|
+
zone: l.timeZone
|
|
2589
2590
|
}).set({ second: 0, millisecond: 0 });
|
|
2590
2591
|
const U = z.toISO();
|
|
2591
|
-
|
|
2592
|
+
l.column.type === "date" || l.column.type === "slot" && l.column.slotType === "date" ? z = z.plus({ days: 1 }) : z = z.plus({ minutes: 1 });
|
|
2592
2593
|
const y = z.toISO();
|
|
2593
2594
|
n.value = [
|
|
2594
2595
|
{
|
|
2595
|
-
filterOnColumn:
|
|
2596
|
+
filterOnColumn: l.column.field,
|
|
2596
2597
|
filterOperation: te.EQUAL_OR_GREATER_THAN,
|
|
2597
2598
|
filterMethod: "equalorgreaterthan",
|
|
2598
2599
|
filterValue: U
|
|
2599
2600
|
},
|
|
2600
2601
|
{
|
|
2601
|
-
filterOnColumn:
|
|
2602
|
+
filterOnColumn: l.column.field,
|
|
2602
2603
|
filterOperation: te.LESS_THAN,
|
|
2603
2604
|
filterMethod: "lessthan",
|
|
2604
2605
|
filterValue: y
|
|
@@ -2615,17 +2616,17 @@ const Bo = {
|
|
|
2615
2616
|
const r = S(() => {
|
|
2616
2617
|
var O;
|
|
2617
2618
|
return ((O = g.value) == null ? void 0 : O.filterValue) ?? "";
|
|
2618
|
-
}), w = S(() => r.value === "" ? null : r.value), h = S(() => Intl.NumberFormat(
|
|
2619
|
+
}), w = S(() => r.value === "" ? null : r.value), h = S(() => Intl.NumberFormat(e.value).format(1.1).replace(/[0-9]+/g, "")), A = S(() => Ue(l.column));
|
|
2619
2620
|
function $(O, z) {
|
|
2620
2621
|
var J;
|
|
2621
2622
|
let U, y = !1;
|
|
2622
2623
|
const D = ((O == null ? void 0 : O.value) ?? z).trim();
|
|
2623
2624
|
if (g.value)
|
|
2624
2625
|
y = ((J = g.value) == null ? void 0 : J.filterValue) === D, U = re(g.value), U.filterValue = D;
|
|
2625
|
-
else if (D !== "" && typeof
|
|
2626
|
+
else if (D !== "" && typeof l.column.field < "u") {
|
|
2626
2627
|
const Z = m();
|
|
2627
2628
|
U = {
|
|
2628
|
-
filterOnColumn:
|
|
2629
|
+
filterOnColumn: l.column.field,
|
|
2629
2630
|
filterMethod: te[Z].toLowerCase(),
|
|
2630
2631
|
filterOperation: Z,
|
|
2631
2632
|
filterValue: D
|
|
@@ -2636,10 +2637,10 @@ const Bo = {
|
|
|
2636
2637
|
}
|
|
2637
2638
|
function R(O, z) {
|
|
2638
2639
|
let U, y = (O == null ? void 0 : O.value) ?? z ?? 0;
|
|
2639
|
-
|
|
2640
|
+
l.column.format === Y.INTEGER ? (typeof y == "string" && (y = parseInt(y)), U = Math.round(y)) : (typeof y == "string" && (y = parseFloat(y.replace(h.value, "."))), U = y), $(null, isNaN(U) ? "" : U.toString());
|
|
2640
2641
|
}
|
|
2641
|
-
return (O, z) =>
|
|
2642
|
-
O.column.type === "boolean" || O.column.slotType === "boolean" ? (
|
|
2642
|
+
return (O, z) => A.value ? (c(), v("div", xo, [
|
|
2643
|
+
O.column.type === "boolean" || O.column.slotType === "boolean" ? (c(), v("select", {
|
|
2643
2644
|
key: 0,
|
|
2644
2645
|
class: "!cl-h-[2rem] cl-border-none cl-mb-0 cl-rounded-md cl-w-full",
|
|
2645
2646
|
onChange: z[0] || (z[0] = (U) => $(U.target))
|
|
@@ -2653,7 +2654,7 @@ const Bo = {
|
|
|
2653
2654
|
value: "false",
|
|
2654
2655
|
selected: r.value === "false"
|
|
2655
2656
|
}, T(d(s)("grid.false")), 9, Wo)
|
|
2656
|
-
], 32)) : O.column.type === "date" || O.column.type === "datetime" || O.column.slotType === "date" || O.column.slotType === "datetime" ? (
|
|
2657
|
+
], 32)) : O.column.type === "date" || O.column.type === "datetime" || O.column.slotType === "date" || O.column.slotType === "datetime" ? (c(), V(ae, {
|
|
2657
2658
|
key: 1,
|
|
2658
2659
|
"model-value": w.value,
|
|
2659
2660
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
@@ -2662,26 +2663,26 @@ const Bo = {
|
|
|
2662
2663
|
"input-type": O.column.type === "slot" ? O.column.slotType : O.column.type,
|
|
2663
2664
|
"time-zone": O.timeZone,
|
|
2664
2665
|
"onUpdate:modelValue": z[1] || (z[1] = (U) => $(null, U ?? ""))
|
|
2665
|
-
}, null, 8, ["model-value", "label", "input-type", "time-zone"])) : O.column.type === "number" || O.column.slotType === "number" ? (
|
|
2666
|
+
}, null, 8, ["model-value", "label", "input-type", "time-zone"])) : O.column.type === "number" || O.column.slotType === "number" ? (c(), V(ae, {
|
|
2666
2667
|
key: 2,
|
|
2667
2668
|
"model-value": r.value,
|
|
2668
2669
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
2669
2670
|
"input-type": "number",
|
|
2670
2671
|
"show-arrows": !1,
|
|
2671
2672
|
onInput: z[2] || (z[2] = (U, y) => R(null, y))
|
|
2672
|
-
}, null, 8, ["model-value"])) : O.column.type === "string" || O.column.slotType === "string" ? (
|
|
2673
|
+
}, null, 8, ["model-value"])) : O.column.type === "string" || O.column.slotType === "string" ? (c(), V(ae, {
|
|
2673
2674
|
key: 3,
|
|
2674
2675
|
"model-value": r.value,
|
|
2675
2676
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
2676
2677
|
"input-type": "text",
|
|
2677
2678
|
onInput: z[3] || (z[3] = (U, y) => $(null, y))
|
|
2678
|
-
}, null, 8, ["model-value"])) :
|
|
2679
|
+
}, null, 8, ["model-value"])) : i.value ? (c(), v("select", {
|
|
2679
2680
|
key: 4,
|
|
2680
2681
|
class: "!cl-h-[2rem] cl-border-none cl-mb-0 cl-rounded-md cl-w-full",
|
|
2681
2682
|
onChange: z[4] || (z[4] = (U) => u.value ? R(U.target) : $(U.target))
|
|
2682
2683
|
}, [
|
|
2683
2684
|
Ko,
|
|
2684
|
-
(
|
|
2685
|
+
(c(!0), v(F, null, Q(O.column.listEntries ?? [], (U) => (c(), v("option", {
|
|
2685
2686
|
key: U.value,
|
|
2686
2687
|
value: U.value,
|
|
2687
2688
|
selected: r.value === U.value.toString()
|
|
@@ -2707,35 +2708,35 @@ const Bo = {
|
|
|
2707
2708
|
},
|
|
2708
2709
|
emits: ["update:request", "update:filterPanelOpen"],
|
|
2709
2710
|
setup(t, { emit: o }) {
|
|
2710
|
-
const
|
|
2711
|
-
get: () =>
|
|
2712
|
-
set: (
|
|
2711
|
+
const l = t, { t: e } = oe(), s = S({
|
|
2712
|
+
get: () => l.request,
|
|
2713
|
+
set: (i) => o("update:request", i)
|
|
2713
2714
|
});
|
|
2714
|
-
function m(
|
|
2715
|
+
function m(i, u) {
|
|
2715
2716
|
var g, b;
|
|
2716
|
-
return ((g = s.value.sort) == null ? void 0 : g.sortOnColumn) ===
|
|
2717
|
+
return ((g = s.value.sort) == null ? void 0 : g.sortOnColumn) === i.field && ((b = s.value.sort) == null ? void 0 : b.sortByAscending) === u;
|
|
2717
2718
|
}
|
|
2718
|
-
function n(
|
|
2719
|
-
if (typeof
|
|
2720
|
-
const u = re(
|
|
2721
|
-
u.sort === null || u.sort.sortOnColumn !==
|
|
2722
|
-
sortOnColumn:
|
|
2719
|
+
function n(i) {
|
|
2720
|
+
if (typeof i < "u") {
|
|
2721
|
+
const u = re(l.request);
|
|
2722
|
+
u.sort === null || u.sort.sortOnColumn !== i ? u.sort = {
|
|
2723
|
+
sortOnColumn: i,
|
|
2723
2724
|
sortByAscending: !0
|
|
2724
|
-
} : u.sort.sortOnColumn ===
|
|
2725
|
+
} : u.sort.sortOnColumn === i && u.sort.sortByAscending === !0 ? u.sort.sortByAscending = !1 : u.sort = null, s.value = u;
|
|
2725
2726
|
}
|
|
2726
2727
|
}
|
|
2727
|
-
function a(
|
|
2728
|
-
if (
|
|
2728
|
+
function a(i) {
|
|
2729
|
+
if (i) {
|
|
2729
2730
|
const u = re(s.value);
|
|
2730
2731
|
u.filters = [
|
|
2731
|
-
...u.filters.filter((g) => g.filterOnColumn !==
|
|
2732
|
-
...
|
|
2732
|
+
...u.filters.filter((g) => g.filterOnColumn !== i[0].filterOnColumn),
|
|
2733
|
+
...i
|
|
2733
2734
|
], u.pageNumber = 1, s.value = u;
|
|
2734
2735
|
}
|
|
2735
2736
|
}
|
|
2736
|
-
return (
|
|
2737
|
+
return (i, u) => (c(), v("thead", Yo, [
|
|
2737
2738
|
p("tr", Xo, [
|
|
2738
|
-
(
|
|
2739
|
+
(c(!0), v(F, null, Q(i.columns, (g, b) => (c(), v("th", {
|
|
2739
2740
|
key: b,
|
|
2740
2741
|
class: I(["cl-text-grey-3 cl-text-sm", {
|
|
2741
2742
|
"cl-cursor-pointer": d(Oe)(g)
|
|
@@ -2760,7 +2761,7 @@ const Bo = {
|
|
|
2760
2761
|
]),
|
|
2761
2762
|
p("tr", {
|
|
2762
2763
|
class: I(["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", {
|
|
2763
|
-
"cl-hidden lg:cl-table-row": !
|
|
2764
|
+
"cl-hidden lg:cl-table-row": !i.filterPanelOpen
|
|
2764
2765
|
}])
|
|
2765
2766
|
}, [
|
|
2766
2767
|
p("div", ln, [
|
|
@@ -2768,31 +2769,31 @@ const Bo = {
|
|
|
2768
2769
|
class: "cl-text-grey-4 hover:cl-cursor-pointer hover:cl-text-link-default",
|
|
2769
2770
|
icon: "ph:x",
|
|
2770
2771
|
size: 16,
|
|
2771
|
-
onClick: u[0] || (u[0] = W((g) =>
|
|
2772
|
+
onClick: u[0] || (u[0] = W((g) => i.$emit("update:filterPanelOpen", !1), ["prevent"]))
|
|
2772
2773
|
})
|
|
2773
2774
|
]),
|
|
2774
|
-
(
|
|
2775
|
+
(c(!0), v(F, null, Q(i.columns, (g, b) => (c(), v("th", {
|
|
2775
2776
|
key: b,
|
|
2776
2777
|
class: I(["cl-grid cl-grid-cols-4 cl-py-1 cl-text-xs cl-w-full lg:cl-table-cell lg:cl-w-auto", {
|
|
2777
2778
|
"cl-hidden lg:cl-table-cell": !d(Ue)(g)
|
|
2778
2779
|
}])
|
|
2779
2780
|
}, [
|
|
2780
2781
|
p("div", tn, T(g.caption), 1),
|
|
2781
|
-
d(Oe)(g) ? (
|
|
2782
|
+
d(Oe)(g) ? (c(), v("div", {
|
|
2782
2783
|
key: 0,
|
|
2783
2784
|
class: "cl-col-span-2 cl-gap-1 cl-span lg:cl-hidden",
|
|
2784
2785
|
onClick: (r) => n(g.field)
|
|
2785
2786
|
}, [
|
|
2786
|
-
p("span", nn, T(d(
|
|
2787
|
-
m(g, !0) ? (
|
|
2787
|
+
p("span", nn, T(d(e)("grid.sortBy")), 1),
|
|
2788
|
+
m(g, !0) ? (c(), V(d(_), {
|
|
2788
2789
|
key: 0,
|
|
2789
2790
|
class: "cl-cursor-pointer cl-inline-block",
|
|
2790
2791
|
icon: "ph:caret-up"
|
|
2791
|
-
})) : m(g, !1) ? (
|
|
2792
|
+
})) : m(g, !1) ? (c(), V(d(_), {
|
|
2792
2793
|
key: 1,
|
|
2793
2794
|
class: "cl-cursor-pointer cl-inline-block",
|
|
2794
2795
|
icon: "ph:caret-down"
|
|
2795
|
-
})) : (
|
|
2796
|
+
})) : (c(), V(d(_), {
|
|
2796
2797
|
key: 2,
|
|
2797
2798
|
class: "cl-cursor-pointer cl-inline-block",
|
|
2798
2799
|
icon: "ph:minus"
|
|
@@ -2802,8 +2803,8 @@ const Bo = {
|
|
|
2802
2803
|
class: "cl-col-span-4",
|
|
2803
2804
|
filter: s.value.filters.filter((r) => r.filterOnColumn === g.field),
|
|
2804
2805
|
column: g,
|
|
2805
|
-
"time-zone":
|
|
2806
|
-
"first-half": b <=
|
|
2806
|
+
"time-zone": i.timeZone,
|
|
2807
|
+
"first-half": b <= i.columns.length / 2,
|
|
2807
2808
|
"onUpdate:filter": a
|
|
2808
2809
|
}, null, 8, ["filter", "column", "time-zone", "first-half"])
|
|
2809
2810
|
], 2))), 128))
|
|
@@ -2818,30 +2819,30 @@ const Bo = {
|
|
|
2818
2819
|
},
|
|
2819
2820
|
emits: ["update:columns"],
|
|
2820
2821
|
setup(t, { emit: o }) {
|
|
2821
|
-
const
|
|
2822
|
-
function m(
|
|
2823
|
-
g <
|
|
2822
|
+
const l = t, { t: e } = oe(), s = q(!1);
|
|
2823
|
+
function m(i, u, g) {
|
|
2824
|
+
g < i.length && g >= 0 && i.splice(g, 0, i.splice(u, 1)[0]);
|
|
2824
2825
|
}
|
|
2825
|
-
function n(
|
|
2826
|
-
const g = re(
|
|
2826
|
+
function n(i, u) {
|
|
2827
|
+
const g = re(l.columns), b = (i == null ? void 0 : i.checked) ?? !1, r = g.findIndex((w) => w.name === u.name);
|
|
2827
2828
|
r >= 0 && (g[r].visible = b), o("update:columns", g);
|
|
2828
2829
|
}
|
|
2829
|
-
function a(
|
|
2830
|
-
const g = re(
|
|
2831
|
-
m(g,
|
|
2830
|
+
function a(i, u) {
|
|
2831
|
+
const g = re(l.columns), b = u === "up" ? i + 1 : i - 1;
|
|
2832
|
+
m(g, i, b), o("update:columns", g);
|
|
2832
2833
|
}
|
|
2833
|
-
return (
|
|
2834
|
-
k(fe, se(
|
|
2834
|
+
return (i, u) => (c(), v(F, null, [
|
|
2835
|
+
k(fe, se(i.$attrs, {
|
|
2835
2836
|
class: "cl-w-full",
|
|
2836
2837
|
size: "small",
|
|
2837
2838
|
onClick: u[0] || (u[0] = W((g) => s.value = !0, ["prevent"]))
|
|
2838
2839
|
}), {
|
|
2839
2840
|
default: P(() => [
|
|
2840
|
-
ee(T(d(
|
|
2841
|
+
ee(T(d(e)("grid.manageView")), 1)
|
|
2841
2842
|
]),
|
|
2842
2843
|
_: 1
|
|
2843
2844
|
}, 16),
|
|
2844
|
-
(
|
|
2845
|
+
(c(), V(Ie, { to: "body" }, [
|
|
2845
2846
|
k(me, { name: "slide-left" }, {
|
|
2846
2847
|
default: P(() => [
|
|
2847
2848
|
L(p("div", an, [
|
|
@@ -2852,14 +2853,14 @@ const Bo = {
|
|
|
2852
2853
|
size: 16,
|
|
2853
2854
|
onClick: u[1] || (u[1] = (g) => s.value = !1)
|
|
2854
2855
|
}),
|
|
2855
|
-
p("h3", cn, T(d(
|
|
2856
|
+
p("h3", cn, T(d(e)("grid.manageView")), 1),
|
|
2856
2857
|
p("ul", un, [
|
|
2857
2858
|
p("li", dn, [
|
|
2858
|
-
p("strong", pn, T(d(
|
|
2859
|
-
p("strong", fn, T(d(
|
|
2860
|
-
p("strong", mn, T(d(
|
|
2859
|
+
p("strong", pn, T(d(e)("grid.column")), 1),
|
|
2860
|
+
p("strong", fn, T(d(e)("grid.visible")), 1),
|
|
2861
|
+
p("strong", mn, T(d(e)("grid.order")), 1)
|
|
2861
2862
|
]),
|
|
2862
|
-
(
|
|
2863
|
+
(c(!0), v(F, null, Q(i.columns, (g, b) => (c(), v("li", {
|
|
2863
2864
|
key: b,
|
|
2864
2865
|
class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full"
|
|
2865
2866
|
}, [
|
|
@@ -2872,20 +2873,20 @@ const Bo = {
|
|
|
2872
2873
|
}, null, 8, ["model-value", "onClick"])
|
|
2873
2874
|
]),
|
|
2874
2875
|
p("div", bn, [
|
|
2875
|
-
g.visible === void 0 || g.visible === !0 ? (
|
|
2876
|
-
b !== 0 ? (
|
|
2876
|
+
g.visible === void 0 || g.visible === !0 ? (c(), v(F, { key: 0 }, [
|
|
2877
|
+
b !== 0 ? (c(), V(d(_), {
|
|
2877
2878
|
key: 0,
|
|
2878
2879
|
class: "cl-cursor-pointer cl-inline-block cl-mr-2",
|
|
2879
2880
|
icon: "ph:arrow-left",
|
|
2880
2881
|
onClick: (r) => a(b, "down")
|
|
2881
2882
|
}, null, 8, ["onClick"])) : N("", !0),
|
|
2882
|
-
b !==
|
|
2883
|
+
b !== i.columns.length - 1 ? (c(), V(d(_), {
|
|
2883
2884
|
key: 1,
|
|
2884
2885
|
class: "cl-cursor-pointer cl-inline-block",
|
|
2885
2886
|
icon: "ph:arrow-right",
|
|
2886
2887
|
onClick: (r) => a(b, "up")
|
|
2887
2888
|
}, null, 8, ["onClick"])) : N("", !0)
|
|
2888
|
-
], 64)) : (
|
|
2889
|
+
], 64)) : (c(), v("em", hn, T(d(e)("grid.hidden")), 1))
|
|
2889
2890
|
])
|
|
2890
2891
|
]))), 128))
|
|
2891
2892
|
])
|
|
@@ -2911,38 +2912,38 @@ const Bo = {
|
|
|
2911
2912
|
},
|
|
2912
2913
|
emits: ["update:columns", "update:request", "data-request", "row-edit", "edit-start", "edit-end", "row-select"],
|
|
2913
2914
|
setup(t, { emit: o }) {
|
|
2914
|
-
const
|
|
2915
|
-
get: () =>
|
|
2915
|
+
const l = t, e = S({
|
|
2916
|
+
get: () => l.columns,
|
|
2916
2917
|
set: (h) => o("update:columns", h)
|
|
2917
|
-
}), s = S(() =>
|
|
2918
|
+
}), s = S(() => e.value.filter((h) => h.visible ?? !0)), m = q({});
|
|
2918
2919
|
function n() {
|
|
2919
2920
|
const h = {};
|
|
2920
|
-
window.innerWidth >= 1024 &&
|
|
2921
|
-
const $ =
|
|
2922
|
-
h[`${
|
|
2921
|
+
window.innerWidth >= 1024 && e.value.forEach((A) => {
|
|
2922
|
+
const $ = A.width ? `${A.width}px` : "";
|
|
2923
|
+
h[`${A.name}`] = `width: ${$}; min-width: ${$};`;
|
|
2923
2924
|
}), m.value = h;
|
|
2924
2925
|
}
|
|
2925
2926
|
function a(h) {
|
|
2926
2927
|
return m.value[h] ?? "";
|
|
2927
2928
|
}
|
|
2928
|
-
|
|
2929
|
+
qe(() => {
|
|
2929
2930
|
window.addEventListener("resize", n), n();
|
|
2930
2931
|
}), _e(() => window.removeEventListener("resize", n));
|
|
2931
|
-
const
|
|
2932
|
-
get: () =>
|
|
2932
|
+
const i = S({
|
|
2933
|
+
get: () => l.request,
|
|
2933
2934
|
set: (h) => o("update:request", h)
|
|
2934
2935
|
});
|
|
2935
2936
|
function u() {
|
|
2936
|
-
const h = re(
|
|
2937
|
-
h.pageNumber = 1, h.filters = [],
|
|
2937
|
+
const h = re(i.value);
|
|
2938
|
+
h.pageNumber = 1, h.filters = [], i.value = h;
|
|
2938
2939
|
}
|
|
2939
2940
|
const g = Qe(() => o("data-request"), 750);
|
|
2940
|
-
K(
|
|
2941
|
+
K(i, g, {
|
|
2941
2942
|
deep: !0,
|
|
2942
2943
|
immediate: !0
|
|
2943
2944
|
});
|
|
2944
|
-
const b = S(() =>
|
|
2945
|
-
return K(r, () => r.value ? o("edit-start") : o("edit-end")), (h,
|
|
2945
|
+
const b = S(() => l.data), r = q(!1), w = q(!1);
|
|
2946
|
+
return K(r, () => r.value ? o("edit-start") : o("edit-end")), (h, A) => (c(), v("div", wn, [
|
|
2946
2947
|
k(me, { name: "fade" }, {
|
|
2947
2948
|
default: P(() => [
|
|
2948
2949
|
L(p("div", $n, [
|
|
@@ -2955,9 +2956,9 @@ const Bo = {
|
|
|
2955
2956
|
}),
|
|
2956
2957
|
k(Qt, {
|
|
2957
2958
|
"edit-mode": r.value,
|
|
2958
|
-
"onUpdate:editMode":
|
|
2959
|
+
"onUpdate:editMode": A[1] || (A[1] = ($) => r.value = $),
|
|
2959
2960
|
"filter-panel-open": w.value,
|
|
2960
|
-
"onUpdate:filterPanelOpen":
|
|
2961
|
+
"onUpdate:filterPanelOpen": A[2] || (A[2] = ($) => w.value = $),
|
|
2961
2962
|
columns: h.columns,
|
|
2962
2963
|
options: h.options,
|
|
2963
2964
|
request: h.request,
|
|
@@ -2969,8 +2970,8 @@ const Bo = {
|
|
|
2969
2970
|
]),
|
|
2970
2971
|
"view-manager": P(() => [
|
|
2971
2972
|
k(yn, {
|
|
2972
|
-
columns:
|
|
2973
|
-
"onUpdate:columns":
|
|
2973
|
+
columns: e.value,
|
|
2974
|
+
"onUpdate:columns": A[0] || (A[0] = ($) => e.value = $)
|
|
2974
2975
|
}, null, 8, ["columns"])
|
|
2975
2976
|
]),
|
|
2976
2977
|
_: 3
|
|
@@ -2982,32 +2983,32 @@ const Bo = {
|
|
|
2982
2983
|
}])
|
|
2983
2984
|
}, [
|
|
2984
2985
|
p("colgroup", Cn, [
|
|
2985
|
-
(
|
|
2986
|
+
(c(!0), v(F, null, Q(s.value, ($, R) => (c(), v("col", {
|
|
2986
2987
|
key: R,
|
|
2987
2988
|
style: We(a($.name)),
|
|
2988
2989
|
span: 1
|
|
2989
2990
|
}, null, 4))), 128))
|
|
2990
2991
|
]),
|
|
2991
2992
|
k(sn, {
|
|
2992
|
-
request:
|
|
2993
|
-
"onUpdate:request":
|
|
2993
|
+
request: i.value,
|
|
2994
|
+
"onUpdate:request": A[3] || (A[3] = ($) => i.value = $),
|
|
2994
2995
|
"filter-panel-open": w.value,
|
|
2995
|
-
"onUpdate:filterPanelOpen":
|
|
2996
|
+
"onUpdate:filterPanelOpen": A[4] || (A[4] = ($) => w.value = $),
|
|
2996
2997
|
columns: s.value,
|
|
2997
2998
|
options: h.options,
|
|
2998
2999
|
"time-zone": h.timeZone
|
|
2999
3000
|
}, null, 8, ["request", "filter-panel-open", "columns", "options", "time-zone"]),
|
|
3000
3001
|
k(uo, {
|
|
3001
3002
|
columns: s.value,
|
|
3002
|
-
request:
|
|
3003
|
+
request: i.value,
|
|
3003
3004
|
data: b.value,
|
|
3004
3005
|
"time-zone": h.timeZone,
|
|
3005
3006
|
loading: h.loading,
|
|
3006
3007
|
"edit-mode": r.value,
|
|
3007
3008
|
"selection-enabled": h.options.rowSelectionEnabled,
|
|
3008
3009
|
onClearFilters: u,
|
|
3009
|
-
onRowEdit:
|
|
3010
|
-
onRowSelect:
|
|
3010
|
+
onRowEdit: A[5] || (A[5] = ($) => h.$emit("row-edit", $)),
|
|
3011
|
+
onRowSelect: A[6] || (A[6] = ($) => h.$emit("row-select", $))
|
|
3011
3012
|
}, Re({ _: 2 }, [
|
|
3012
3013
|
Q(h.$slots, ($, R) => ({
|
|
3013
3014
|
name: R,
|
|
@@ -3018,9 +3019,9 @@ const Bo = {
|
|
|
3018
3019
|
]), 1032, ["columns", "request", "data", "time-zone", "loading", "edit-mode", "selection-enabled"])
|
|
3019
3020
|
], 2)
|
|
3020
3021
|
]),
|
|
3021
|
-
k(
|
|
3022
|
-
request:
|
|
3023
|
-
"onUpdate:request":
|
|
3022
|
+
k(qo, {
|
|
3023
|
+
request: i.value,
|
|
3024
|
+
"onUpdate:request": A[7] || (A[7] = ($) => i.value = $),
|
|
3024
3025
|
data: h.data
|
|
3025
3026
|
}, null, 8, ["request", "data"])
|
|
3026
3027
|
]));
|
|
@@ -3032,14 +3033,14 @@ const Bo = {
|
|
|
3032
3033
|
},
|
|
3033
3034
|
emits: ["open-click"],
|
|
3034
3035
|
setup(t, { emit: o }) {
|
|
3035
|
-
const
|
|
3036
|
-
return ze(
|
|
3037
|
-
(
|
|
3038
|
-
}), (s, m) => (
|
|
3036
|
+
const l = t, e = q();
|
|
3037
|
+
return ze(e, () => {
|
|
3038
|
+
(l.isOpen ?? !1) && o("open-click");
|
|
3039
|
+
}), (s, m) => (c(), v("header", En, [
|
|
3039
3040
|
j(s.$slots, "logo"),
|
|
3040
3041
|
p("div", {
|
|
3041
3042
|
ref_key: "headerMenuElement",
|
|
3042
|
-
ref:
|
|
3043
|
+
ref: e,
|
|
3043
3044
|
class: "cl-cursor-pointer cl-flex cl-flex-nowrap",
|
|
3044
3045
|
onClick: m[0] || (m[0] = (n) => s.$emit("open-click"))
|
|
3045
3046
|
}, [
|
|
@@ -3048,7 +3049,7 @@ const Bo = {
|
|
|
3048
3049
|
], 512)
|
|
3049
3050
|
]));
|
|
3050
3051
|
}
|
|
3051
|
-
}),
|
|
3052
|
+
}), An = { 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]" }, qn = ["src"], Sn = {
|
|
3052
3053
|
key: 0,
|
|
3053
3054
|
class: "cl-text-ellipsis cl-whitespace-nowrap"
|
|
3054
3055
|
}, Nn = {
|
|
@@ -3065,18 +3066,18 @@ const Bo = {
|
|
|
3065
3066
|
},
|
|
3066
3067
|
setup(t) {
|
|
3067
3068
|
const o = t;
|
|
3068
|
-
return (
|
|
3069
|
+
return (l, e) => (c(), v("div", {
|
|
3069
3070
|
class: I(["md:cl-relative", {
|
|
3070
3071
|
"cl-bg-primary-default": (o == null ? void 0 : o.colour) === "default",
|
|
3071
3072
|
"cl-bg-blue-light": o.colour === "secondary"
|
|
3072
3073
|
}])
|
|
3073
3074
|
}, [
|
|
3074
|
-
p("div",
|
|
3075
|
-
|
|
3075
|
+
p("div", An, [
|
|
3076
|
+
l.image ? (c(), v("img", {
|
|
3076
3077
|
key: 0,
|
|
3077
|
-
src:
|
|
3078
|
+
src: l.image,
|
|
3078
3079
|
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"
|
|
3079
|
-
}, null, 8,
|
|
3080
|
+
}, null, 8, qn)) : (c(), V(d(_), {
|
|
3080
3081
|
key: 1,
|
|
3081
3082
|
class: "cl-hidden cl-m-4 cl-text-white md:cl-block",
|
|
3082
3083
|
icon: "ph:user-circle",
|
|
@@ -3089,13 +3090,13 @@ const Bo = {
|
|
|
3089
3090
|
"cl-text-white": o.colour === "secondary"
|
|
3090
3091
|
}])
|
|
3091
3092
|
}, [
|
|
3092
|
-
|
|
3093
|
-
|
|
3093
|
+
l.username ? (c(), v("div", Sn, T(l.username), 1)) : N("", !0),
|
|
3094
|
+
l.group ? (c(), v("div", Nn, T(l.group), 1)) : N("", !0)
|
|
3094
3095
|
], 2),
|
|
3095
3096
|
p("div", jn, [
|
|
3096
3097
|
k(d(_), {
|
|
3097
3098
|
class: I(["cl-transform-gpu cl-transition-transform", {
|
|
3098
|
-
"cl-rotate-180":
|
|
3099
|
+
"cl-rotate-180": l.isOpen,
|
|
3099
3100
|
"cl-text-secondary-default": o.colour === "default",
|
|
3100
3101
|
"cl-text-white": o.colour === "secondary"
|
|
3101
3102
|
}]),
|
|
@@ -3106,9 +3107,9 @@ const Bo = {
|
|
|
3106
3107
|
k(me, { name: "fade" }, {
|
|
3107
3108
|
default: P(() => [
|
|
3108
3109
|
L(p("div", In, [
|
|
3109
|
-
j(
|
|
3110
|
+
j(l.$slots, "default")
|
|
3110
3111
|
], 512), [
|
|
3111
|
-
[H,
|
|
3112
|
+
[H, l.isOpen]
|
|
3112
3113
|
])
|
|
3113
3114
|
]),
|
|
3114
3115
|
_: 3
|
|
@@ -3122,8 +3123,8 @@ function je(t) {
|
|
|
3122
3123
|
function Rn(t) {
|
|
3123
3124
|
let o = Array.isArray(t);
|
|
3124
3125
|
if (o) {
|
|
3125
|
-
for (const
|
|
3126
|
-
if (!zn(
|
|
3126
|
+
for (const l of t)
|
|
3127
|
+
if (!zn(l)) {
|
|
3127
3128
|
o = !1;
|
|
3128
3129
|
break;
|
|
3129
3130
|
}
|
|
@@ -3145,35 +3146,35 @@ const Un = {
|
|
|
3145
3146
|
},
|
|
3146
3147
|
emits: ["language-select"],
|
|
3147
3148
|
setup(t, { emit: o }) {
|
|
3148
|
-
const
|
|
3149
|
+
const l = t, { locale: e } = oe(), s = q(!1), m = S(() => l.supportedLanguages.find((i) => i.localeCode === e.value) ?? l.defaultLangauge), n = S(() => l.supportedLanguages.filter((i) => je(i)).sort((i, u) => i.nativeName > u.nativeName ? 1 : u.nativeName > i.nativeName ? -1 : 0));
|
|
3149
3150
|
function a() {
|
|
3150
|
-
|
|
3151
|
+
l.disabled || (s.value = !s.value);
|
|
3151
3152
|
}
|
|
3152
|
-
return K(() =>
|
|
3153
|
-
|
|
3154
|
-
}), (
|
|
3153
|
+
return K(() => l.disabled, (i) => {
|
|
3154
|
+
i && (s.value = !1);
|
|
3155
|
+
}), (i, u) => m.value !== null && d(je)(m.value) ? (c(), v("div", Un, [
|
|
3155
3156
|
p("div", {
|
|
3156
3157
|
class: I(["cl-flex cl-items-center", {
|
|
3157
|
-
"cl-cursor-pointer": !
|
|
3158
|
+
"cl-cursor-pointer": !i.disabled
|
|
3158
3159
|
}]),
|
|
3159
3160
|
onClick: a
|
|
3160
3161
|
}, [
|
|
3161
3162
|
p("span", {
|
|
3162
3163
|
class: I(["cl-font-semibold cl-text-xs", {
|
|
3163
|
-
"cl-opacity-50":
|
|
3164
|
+
"cl-opacity-50": i.disabled
|
|
3164
3165
|
}])
|
|
3165
3166
|
}, T(m.value.nativeName), 3)
|
|
3166
3167
|
], 2),
|
|
3167
3168
|
k(me, { name: "fade" }, {
|
|
3168
3169
|
default: P(() => [
|
|
3169
3170
|
L(p("div", Bn, [
|
|
3170
|
-
(
|
|
3171
|
+
(c(!0), v(F, null, Q(n.value, (g, b) => (c(), v("div", {
|
|
3171
3172
|
key: b,
|
|
3172
3173
|
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",
|
|
3173
3174
|
"data-localename": g.name,
|
|
3174
3175
|
"data-localecode": g.localeCode,
|
|
3175
3176
|
onClick: (r) => {
|
|
3176
|
-
|
|
3177
|
+
e.value = g.localeCode, a(), o("language-select", g.localeCode);
|
|
3177
3178
|
}
|
|
3178
3179
|
}, [
|
|
3179
3180
|
p("span", Vn, T(g.nativeName), 1)
|
|
@@ -3200,15 +3201,15 @@ const Un = {
|
|
|
3200
3201
|
"update:errors": null
|
|
3201
3202
|
},
|
|
3202
3203
|
setup(t, { emit: o }) {
|
|
3203
|
-
const { t:
|
|
3204
|
+
const { t: l } = oe(), e = q(""), s = q(""), m = q("password"), n = q();
|
|
3204
3205
|
function a() {
|
|
3205
3206
|
const b = {
|
|
3206
|
-
username:
|
|
3207
|
+
username: e.value,
|
|
3207
3208
|
password: s.value
|
|
3208
3209
|
};
|
|
3209
3210
|
o("login", b);
|
|
3210
3211
|
}
|
|
3211
|
-
function
|
|
3212
|
+
function i() {
|
|
3212
3213
|
o("update:errors", []);
|
|
3213
3214
|
}
|
|
3214
3215
|
function u(b, r) {
|
|
@@ -3221,7 +3222,7 @@ const Un = {
|
|
|
3221
3222
|
function g(b, r) {
|
|
3222
3223
|
n.value = b;
|
|
3223
3224
|
}
|
|
3224
|
-
return (b, r) => (
|
|
3225
|
+
return (b, r) => (c(), v("div", Ln, [
|
|
3225
3226
|
p("div", Pn, [
|
|
3226
3227
|
j(b.$slots, "background")
|
|
3227
3228
|
]),
|
|
@@ -3229,7 +3230,7 @@ const Un = {
|
|
|
3229
3230
|
p("div", Hn, [
|
|
3230
3231
|
j(b.$slots, "logo")
|
|
3231
3232
|
]),
|
|
3232
|
-
b.$slots["language-switcher"] ? (
|
|
3233
|
+
b.$slots["language-switcher"] ? (c(), v("div", xn, [
|
|
3233
3234
|
j(b.$slots, "language-switcher")
|
|
3234
3235
|
])) : N("", !0),
|
|
3235
3236
|
p("div", {
|
|
@@ -3247,21 +3248,21 @@ const Un = {
|
|
|
3247
3248
|
}),
|
|
3248
3249
|
k(ae, {
|
|
3249
3250
|
id: "cl-ui-login-usernameinput",
|
|
3250
|
-
modelValue:
|
|
3251
|
-
"onUpdate:modelValue": r[0] || (r[0] = (w) =>
|
|
3251
|
+
modelValue: e.value,
|
|
3252
|
+
"onUpdate:modelValue": r[0] || (r[0] = (w) => e.value = w),
|
|
3252
3253
|
modelModifiers: { trim: !0 },
|
|
3253
3254
|
class: "!cl-border-2 !cl-mb-1 cl-w-full",
|
|
3254
3255
|
"input-type": "email",
|
|
3255
|
-
"highlight-when-valid":
|
|
3256
|
-
label: d(
|
|
3256
|
+
"highlight-when-valid": e.value !== void 0 && e.value !== "",
|
|
3257
|
+
label: d(l)("login.username"),
|
|
3257
3258
|
"show-label": !1,
|
|
3258
|
-
"placeholder-text": d(
|
|
3259
|
+
"placeholder-text": d(l)("login.email"),
|
|
3259
3260
|
autocomplete: "username",
|
|
3260
3261
|
"validate-immediately": !0,
|
|
3261
3262
|
"custom-validation-function": u,
|
|
3262
3263
|
"input-specific-classes": "!cl-pl-9",
|
|
3263
|
-
"message-when-valid":
|
|
3264
|
-
onInput:
|
|
3264
|
+
"message-when-valid": e.value ? d(l)("login.validEmail") : "",
|
|
3265
|
+
onInput: i,
|
|
3265
3266
|
onValidated: g
|
|
3266
3267
|
}, null, 8, ["modelValue", "highlight-when-valid", "label", "placeholder-text", "message-when-valid"])
|
|
3267
3268
|
])
|
|
@@ -3296,14 +3297,14 @@ const Un = {
|
|
|
3296
3297
|
class: "!cl-border-2 cl-w-full",
|
|
3297
3298
|
"input-type": m.value,
|
|
3298
3299
|
"highlight-when-valid": s.value !== void 0 && s.value !== "",
|
|
3299
|
-
label: d(
|
|
3300
|
+
label: d(l)("login.password"),
|
|
3300
3301
|
"show-label": !1,
|
|
3301
|
-
"placeholder-text": d(
|
|
3302
|
+
"placeholder-text": d(l)("login.password"),
|
|
3302
3303
|
autocomplete: "current-password",
|
|
3303
3304
|
"validate-immediately": !0,
|
|
3304
3305
|
"input-specific-classes": "!cl-pl-9 !cl-pr-9",
|
|
3305
3306
|
"custom-validation-function": u,
|
|
3306
|
-
onInput:
|
|
3307
|
+
onInput: i
|
|
3307
3308
|
}, null, 8, ["modelValue", "input-type", "highlight-when-valid", "label", "placeholder-text"])
|
|
3308
3309
|
])
|
|
3309
3310
|
]),
|
|
@@ -3321,7 +3322,7 @@ const Un = {
|
|
|
3321
3322
|
onClick: W(a, ["prevent"])
|
|
3322
3323
|
}, {
|
|
3323
3324
|
default: P(() => [
|
|
3324
|
-
ee(T(d(
|
|
3325
|
+
ee(T(d(l)("login.login")), 1)
|
|
3325
3326
|
]),
|
|
3326
3327
|
_: 1
|
|
3327
3328
|
}, 8, ["loading", "disabled", "onClick"])
|
|
@@ -3332,9 +3333,9 @@ const Un = {
|
|
|
3332
3333
|
var w;
|
|
3333
3334
|
return [
|
|
3334
3335
|
L(p("span", Qn, [
|
|
3335
|
-
(
|
|
3336
|
+
(c(!0), v(F, null, Q(b.errors, (h, A) => (c(), v("div", {
|
|
3336
3337
|
id: "cl-ui-login-errors",
|
|
3337
|
-
key:
|
|
3338
|
+
key: A,
|
|
3338
3339
|
class: "cl-font-semibold"
|
|
3339
3340
|
}, T(h), 1))), 128))
|
|
3340
3341
|
], 512), [
|
|
@@ -3365,8 +3366,8 @@ const Un = {
|
|
|
3365
3366
|
colour: { default: "default" }
|
|
3366
3367
|
},
|
|
3367
3368
|
setup(t) {
|
|
3368
|
-
const o =
|
|
3369
|
-
function
|
|
3369
|
+
const o = q([]), l = S(() => o.value.filter((r) => r.open === !0).length > 0);
|
|
3370
|
+
function e(r) {
|
|
3370
3371
|
let w = o.value.find((h) => h.id === r);
|
|
3371
3372
|
return w || (w = {
|
|
3372
3373
|
id: r,
|
|
@@ -3379,7 +3380,7 @@ const Un = {
|
|
|
3379
3380
|
h.id !== r && (h.open = !1);
|
|
3380
3381
|
}));
|
|
3381
3382
|
}
|
|
3382
|
-
const m =
|
|
3383
|
+
const m = il();
|
|
3383
3384
|
K(
|
|
3384
3385
|
() => m,
|
|
3385
3386
|
() => {
|
|
@@ -3389,17 +3390,17 @@ const Un = {
|
|
|
3389
3390
|
deep: !0
|
|
3390
3391
|
}
|
|
3391
3392
|
);
|
|
3392
|
-
const n =
|
|
3393
|
+
const n = q(!1), a = q(!1), { start: i } = Ke(() => a.value = !1, 100);
|
|
3393
3394
|
function u() {
|
|
3394
|
-
n.value = !n.value, a.value = !0,
|
|
3395
|
+
n.value = !n.value, a.value = !0, i();
|
|
3395
3396
|
}
|
|
3396
|
-
const g =
|
|
3397
|
+
const g = q();
|
|
3397
3398
|
function b() {
|
|
3398
|
-
n.value === !1 &&
|
|
3399
|
+
n.value === !1 && l.value === !0 && o.value.forEach((r) => {
|
|
3399
3400
|
r.open = !1;
|
|
3400
3401
|
});
|
|
3401
3402
|
}
|
|
3402
|
-
return ze(g, b), (r, w) => (
|
|
3403
|
+
return ze(g, b), (r, w) => (c(), v("div", {
|
|
3403
3404
|
ref_key: "navElement",
|
|
3404
3405
|
ref: g,
|
|
3405
3406
|
class: "cl-flex cl-flex-nowrap cl-relative"
|
|
@@ -3411,9 +3412,9 @@ const Un = {
|
|
|
3411
3412
|
"cl-bg-blue-dark": r.colour === "secondary"
|
|
3412
3413
|
}])
|
|
3413
3414
|
}, [
|
|
3414
|
-
j(r.$slots, "icon", se({ navcolour: r.colour }, { groupIsOpen:
|
|
3415
|
+
j(r.$slots, "icon", se({ navcolour: r.colour }, { groupIsOpen: e, toggleOpen: s }), void 0, !0)
|
|
3415
3416
|
], 2),
|
|
3416
|
-
a.value ? (
|
|
3417
|
+
a.value ? (c(), v("div", es)) : N("", !0),
|
|
3417
3418
|
k(me, { name: "slide-right" }, {
|
|
3418
3419
|
default: P(() => [
|
|
3419
3420
|
L(p("div", {
|
|
@@ -3427,18 +3428,18 @@ const Un = {
|
|
|
3427
3428
|
class: "cl-absolute cl-cursor-pointer cl-hidden cl-right-0 cl-top-1.5 lg:cl-block",
|
|
3428
3429
|
onClick: u
|
|
3429
3430
|
}, [
|
|
3430
|
-
n.value ? (
|
|
3431
|
+
n.value ? (c(), V(d(_), {
|
|
3431
3432
|
key: 1,
|
|
3432
3433
|
icon: "ph:push-pin-slash"
|
|
3433
|
-
})) : (
|
|
3434
|
+
})) : (c(), V(d(_), {
|
|
3434
3435
|
key: 0,
|
|
3435
3436
|
icon: "ph:push-pin"
|
|
3436
3437
|
}))
|
|
3437
3438
|
]),
|
|
3438
|
-
j(r.$slots, "default", le(ne({ groupIsOpen:
|
|
3439
|
+
j(r.$slots, "default", le(ne({ groupIsOpen: e })), void 0, !0)
|
|
3439
3440
|
])
|
|
3440
3441
|
], 2), [
|
|
3441
|
-
[H,
|
|
3442
|
+
[H, l.value]
|
|
3442
3443
|
])
|
|
3443
3444
|
]),
|
|
3444
3445
|
_: 3
|
|
@@ -3454,7 +3455,7 @@ const os = /* @__PURE__ */ de(ts, [["__scopeId", "data-v-7db412a7"]]), ns = /* @
|
|
|
3454
3455
|
colour: { default: "default" }
|
|
3455
3456
|
},
|
|
3456
3457
|
setup(t) {
|
|
3457
|
-
return (o,
|
|
3458
|
+
return (o, l) => (c(), v("div", {
|
|
3458
3459
|
class: I(["cl-cursor-pointer cl-flex cl-h-20 cl-items-center cl-justify-center cl-transition-colors cl-w-20", {
|
|
3459
3460
|
"cl-text-secondary-default hover:cl-bg-primary-dark hover:cl-text-white": o.colour === "default",
|
|
3460
3461
|
"cl-bg-primary-darker cl-text-white": o.open && o.colour === "default",
|
|
@@ -3478,8 +3479,8 @@ const os = /* @__PURE__ */ de(ts, [["__scopeId", "data-v-7db412a7"]]), ns = /* @
|
|
|
3478
3479
|
open: { type: Boolean }
|
|
3479
3480
|
},
|
|
3480
3481
|
setup(t) {
|
|
3481
|
-
return (o,
|
|
3482
|
-
o.$slots.title ? (
|
|
3482
|
+
return (o, l) => o.open ? (c(), v(F, { key: 0 }, [
|
|
3483
|
+
o.$slots.title ? (c(), v("div", ss, [
|
|
3483
3484
|
j(o.$slots, "title")
|
|
3484
3485
|
])) : N("", !0),
|
|
3485
3486
|
p("div", as, [
|
|
@@ -3487,13 +3488,13 @@ const os = /* @__PURE__ */ de(ts, [["__scopeId", "data-v-7db412a7"]]), ns = /* @
|
|
|
3487
3488
|
])
|
|
3488
3489
|
], 64)) : N("", !0);
|
|
3489
3490
|
}
|
|
3490
|
-
}),
|
|
3491
|
+
}), is = {}, cs = { class: "cl-w-full" }, us = {
|
|
3491
3492
|
key: 0,
|
|
3492
3493
|
class: "cl-font-bold cl-mb-4 cl-select-none"
|
|
3493
3494
|
}, ds = { class: "cl-flex cl-flex-wrap cl-space-y-2" };
|
|
3494
3495
|
function ps(t, o) {
|
|
3495
|
-
return
|
|
3496
|
-
t.$slots.title ? (
|
|
3496
|
+
return c(), v("div", cs, [
|
|
3497
|
+
t.$slots.title ? (c(), v("div", us, [
|
|
3497
3498
|
j(t.$slots, "title")
|
|
3498
3499
|
])) : N("", !0),
|
|
3499
3500
|
p("span", ds, [
|
|
@@ -3501,9 +3502,9 @@ function ps(t, o) {
|
|
|
3501
3502
|
])
|
|
3502
3503
|
]);
|
|
3503
3504
|
}
|
|
3504
|
-
const fs = /* @__PURE__ */ de(
|
|
3505
|
+
const fs = /* @__PURE__ */ de(is, [["render", ps]]), ms = {}, gs = { class: "cl-cursor-pointer cl-transition-colors cl-w-full hover:cl-text-blue-light" };
|
|
3505
3506
|
function vs(t, o) {
|
|
3506
|
-
return
|
|
3507
|
+
return c(), v("div", gs, [
|
|
3507
3508
|
j(t.$slots, "default")
|
|
3508
3509
|
]);
|
|
3509
3510
|
}
|
|
@@ -3515,33 +3516,33 @@ const bs = /* @__PURE__ */ de(ms, [["render", vs]]), hs = { class: "cl-w-full" }
|
|
|
3515
3516
|
colour: { default: "default" }
|
|
3516
3517
|
},
|
|
3517
3518
|
setup(t) {
|
|
3518
|
-
const o = t,
|
|
3519
|
+
const o = t, l = q(), e = q(!1), s = q(!1);
|
|
3519
3520
|
function m(u) {
|
|
3520
3521
|
return u === o.currentTab;
|
|
3521
3522
|
}
|
|
3522
3523
|
function n() {
|
|
3523
|
-
if (
|
|
3524
|
-
const u =
|
|
3525
|
-
|
|
3524
|
+
if (l.value) {
|
|
3525
|
+
const u = l.value.scrollWidth - l.value.clientWidth;
|
|
3526
|
+
e.value = l.value.scrollLeft > 0, s.value = l.value.scrollLeft < u;
|
|
3526
3527
|
} else
|
|
3527
|
-
|
|
3528
|
+
e.value = !1, s.value = !1;
|
|
3528
3529
|
}
|
|
3529
3530
|
function a() {
|
|
3530
3531
|
n(), window.addEventListener("resize", n);
|
|
3531
3532
|
}
|
|
3532
|
-
function
|
|
3533
|
-
if (
|
|
3534
|
-
const g =
|
|
3533
|
+
function i(u) {
|
|
3534
|
+
if (l.value) {
|
|
3535
|
+
const g = l.value.scrollWidth / 5;
|
|
3535
3536
|
let b = g;
|
|
3536
|
-
u === "left" && (b = -g),
|
|
3537
|
+
u === "left" && (b = -g), l.value.scroll(l.value.scrollLeft + b, 0);
|
|
3537
3538
|
}
|
|
3538
3539
|
}
|
|
3539
|
-
return
|
|
3540
|
+
return qe(() => a()), _e(() => window.removeEventListener("resize", n)), (u, g) => (c(), v("div", hs, [
|
|
3540
3541
|
p("div", null, [
|
|
3541
|
-
|
|
3542
|
+
e.value ? (c(), v("div", {
|
|
3542
3543
|
key: 0,
|
|
3543
3544
|
class: "cl-bg-white cl-cursor-pointer cl-float-left cl-h-11 cl-w-4",
|
|
3544
|
-
onClick: g[0] || (g[0] = (b) =>
|
|
3545
|
+
onClick: g[0] || (g[0] = (b) => i("left"))
|
|
3545
3546
|
}, [
|
|
3546
3547
|
k(d(_), {
|
|
3547
3548
|
icon: "ph:caret-left",
|
|
@@ -3550,7 +3551,7 @@ const bs = /* @__PURE__ */ de(ms, [["render", vs]]), hs = { class: "cl-w-full" }
|
|
|
3550
3551
|
])) : N("", !0),
|
|
3551
3552
|
p("div", {
|
|
3552
3553
|
ref_key: "headerContainer",
|
|
3553
|
-
ref:
|
|
3554
|
+
ref: l,
|
|
3554
3555
|
class: I(["cl-flex cl-overflow-x-auto cl-overscroll-x-none", {
|
|
3555
3556
|
"cl-shadow-[inset_0_-1px_0_#eeeeee]": !u.disabled && u.colour === "default",
|
|
3556
3557
|
"cl-shadow-[inset_0_-1px_0_#9acd32]": !u.disabled && u.colour === "primary",
|
|
@@ -3564,10 +3565,10 @@ const bs = /* @__PURE__ */ de(ms, [["render", vs]]), hs = { class: "cl-w-full" }
|
|
|
3564
3565
|
}, [
|
|
3565
3566
|
j(u.$slots, "headings", le(ne({ isTabOpen: m, disabled: u.disabled, colour: u.colour })))
|
|
3566
3567
|
], 34),
|
|
3567
|
-
s.value ? (
|
|
3568
|
+
s.value ? (c(), v("div", {
|
|
3568
3569
|
key: 1,
|
|
3569
3570
|
class: "cl-bg-white cl-bottom-12 cl-cursor-pointer cl-float-right cl-h-11 cl-relative cl-w-4",
|
|
3570
|
-
onClick: g[1] || (g[1] = (b) =>
|
|
3571
|
+
onClick: g[1] || (g[1] = (b) => i("right"))
|
|
3571
3572
|
}, [
|
|
3572
3573
|
k(d(_), {
|
|
3573
3574
|
icon: "ph:caret-right",
|
|
@@ -3590,11 +3591,11 @@ const bs = /* @__PURE__ */ de(ms, [["render", vs]]), hs = { class: "cl-w-full" }
|
|
|
3590
3591
|
"update:currentTab": null
|
|
3591
3592
|
},
|
|
3592
3593
|
setup(t, { emit: o }) {
|
|
3593
|
-
const
|
|
3594
|
+
const l = t, e = q(), s = q(), m = S(() => l.id === l.currentTab);
|
|
3594
3595
|
function n() {
|
|
3595
|
-
|
|
3596
|
+
l.disabled || (e.value = !1, s.value = !1, o("update:currentTab", l.id));
|
|
3596
3597
|
}
|
|
3597
|
-
return (a,
|
|
3598
|
+
return (a, i) => (c(), v("div", {
|
|
3598
3599
|
class: I(["cl-border-b cl-cursor-pointer cl-flex cl-items-center cl-px-4 cl-py-2 cl-rounded-b-none cl-rounded-sm cl-select-none cl-text-xl cl-transition cl-whitespace-nowrap focus:cl-outline-none", {
|
|
3599
3600
|
"!cl-cursor-default cl-text-grey-4 !cl-border-grey-2": a.disabled,
|
|
3600
3601
|
"cl-border cl-border-b-0 cl-rounded-t-md cl-shadow-[inset_0_-1px_0_#ffffff] cl-cursor-default": m.value,
|
|
@@ -3608,18 +3609,18 @@ const bs = /* @__PURE__ */ de(ms, [["render", vs]]), hs = { class: "cl-w-full" }
|
|
|
3608
3609
|
"hover:cl-bg-secondary-light focus:cl-text-white hover:cl-text-white": !m.value && !a.disabled && a.colour === "secondary",
|
|
3609
3610
|
"hover:cl-bg-danger-light": !m.value && !a.disabled && a.colour === "danger",
|
|
3610
3611
|
"hover:cl-bg-link-lighter": !m.value && !a.disabled && a.colour === "blue",
|
|
3611
|
-
"cl-bg-grey-0":
|
|
3612
|
-
"cl-bg-primary-light":
|
|
3613
|
-
"cl-bg-secondary-light cl-text-white":
|
|
3614
|
-
"cl-bg-danger-light":
|
|
3615
|
-
"cl-bg-link-lighter":
|
|
3612
|
+
"cl-bg-grey-0": e.value && !a.disabled && a.colour === "default",
|
|
3613
|
+
"cl-bg-primary-light": e.value && !a.disabled && a.colour === "primary",
|
|
3614
|
+
"cl-bg-secondary-light cl-text-white": e.value && !a.disabled && a.colour === "secondary",
|
|
3615
|
+
"cl-bg-danger-light": e.value && !a.disabled && a.colour === "danger",
|
|
3616
|
+
"cl-bg-link-lighter": e.value && !a.disabled && a.colour === "blue"
|
|
3616
3617
|
}]),
|
|
3617
3618
|
tabindex: "0",
|
|
3618
3619
|
onClick: n,
|
|
3619
|
-
onMouseover:
|
|
3620
|
-
onMouseout:
|
|
3621
|
-
onFocusin:
|
|
3622
|
-
onFocusout:
|
|
3620
|
+
onMouseover: i[0] || (i[0] = (u) => s.value = !0),
|
|
3621
|
+
onMouseout: i[1] || (i[1] = (u) => s.value = !1),
|
|
3622
|
+
onFocusin: i[2] || (i[2] = (u) => e.value = !0),
|
|
3623
|
+
onFocusout: i[3] || (i[3] = (u) => e.value = !1),
|
|
3623
3624
|
onKeyup: we(W(n, ["self"]), ["enter"])
|
|
3624
3625
|
}, [
|
|
3625
3626
|
j(a.$slots, "default")
|
|
@@ -3638,7 +3639,7 @@ const Ts = /* @__PURE__ */ de(ks, [["render", Cs]]), Es = [
|
|
|
3638
3639
|
], Os = [
|
|
3639
3640
|
"left",
|
|
3640
3641
|
"right"
|
|
3641
|
-
],
|
|
3642
|
+
], As = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3642
3643
|
__proto__: null,
|
|
3643
3644
|
FilterOperation: te,
|
|
3644
3645
|
buttonColours: Sl,
|
|
@@ -3687,11 +3688,11 @@ const Ts = /* @__PURE__ */ de(ks, [["render", Cs]]), Es = [
|
|
|
3687
3688
|
tabScroll: Os
|
|
3688
3689
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3689
3690
|
const Ls = (t) => {
|
|
3690
|
-
t.use(X), t.component("Icon", _), Object.entries(
|
|
3691
|
+
t.use(X), t.component("Icon", _), Object.entries(As).forEach(([
|
|
3691
3692
|
o,
|
|
3692
|
-
|
|
3693
|
+
l
|
|
3693
3694
|
]) => {
|
|
3694
|
-
t.component(o,
|
|
3695
|
+
t.component(o, l);
|
|
3695
3696
|
});
|
|
3696
3697
|
};
|
|
3697
3698
|
export {
|