@citruslime/ui 2.0.2-beta.12 → 2.0.2-beta.13
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,35 +1,35 @@
|
|
|
1
1
|
import { Icon as rl } from "@iconify/vue";
|
|
2
|
-
import { defineComponent as
|
|
2
|
+
import { defineComponent as V, ref as M, openBlock as i, createElementBlock as u, renderSlot as D, normalizeProps as ue, guardReactiveProps as ye, resolveComponent as te, Fragment as z, createElementVNode as s, normalizeClass as U, createVNode as k, Transition as Te, withCtx as X, withDirectives as B, vShow as F, createBlock as Q, Teleport as He, renderList as ae, unref as o, mergeProps as be, toDisplayString as x, createCommentVNode as N, nextTick as Ce, computed as j, watch as ne, onMounted as Me, onUnmounted as Re, isRef as ke, normalizeStyle as Ee, vModelText as ul, withModifiers as ie, vModelDynamic as dl, withKeys as je, createTextVNode as le, watchEffect as fl, createSlots as ml } from "vue";
|
|
3
3
|
import { generateStringId as gl } from "@citruslime/utils";
|
|
4
|
-
import { createI18n as bl, useI18n as
|
|
4
|
+
import { createI18n as bl, useI18n as de } from "vue-i18n";
|
|
5
5
|
import We from "flatpickr";
|
|
6
|
-
import { useDebouncer as Ge, copy as
|
|
6
|
+
import { useDebouncer as Ge, copy as ge } from "@citruslime/vue-utils";
|
|
7
7
|
import { onClickOutside as nl } from "@vueuse/core";
|
|
8
|
-
const
|
|
8
|
+
const hl = { class: "cl-overflow-hidden" }, vl = /* @__PURE__ */ V({
|
|
9
9
|
__name: "cl-ui-accordion",
|
|
10
10
|
props: {
|
|
11
11
|
exclusive: { type: Boolean, default: !1 }
|
|
12
12
|
},
|
|
13
13
|
setup(e) {
|
|
14
|
-
const n = e, t =
|
|
15
|
-
function l(
|
|
16
|
-
let r = t.value.find((
|
|
14
|
+
const n = e, t = M([]);
|
|
15
|
+
function l(d) {
|
|
16
|
+
let r = t.value.find((g) => g.id === d);
|
|
17
17
|
return r || (r = {
|
|
18
|
-
id:
|
|
18
|
+
id: d,
|
|
19
19
|
open: !1
|
|
20
20
|
}, t.value.push(r)), r.open;
|
|
21
21
|
}
|
|
22
|
-
function c(
|
|
23
|
-
const r = t.value.find((
|
|
24
|
-
r && (n.exclusive && t.value.forEach((
|
|
25
|
-
|
|
22
|
+
function c(d) {
|
|
23
|
+
const r = t.value.find((g) => g.id === d);
|
|
24
|
+
r && (n.exclusive && t.value.forEach((g) => {
|
|
25
|
+
g.id !== d && (g.open = !1);
|
|
26
26
|
}), r.open = !r.open);
|
|
27
27
|
}
|
|
28
|
-
return (
|
|
29
|
-
D(
|
|
28
|
+
return (d, r) => (i(), u("div", hl, [
|
|
29
|
+
D(d.$slots, "default", ue(ye({ isItemOpen: l, toggleItem: c })))
|
|
30
30
|
]));
|
|
31
31
|
}
|
|
32
|
-
}), pl = { class: "cl-absolute cl-left-5 cl-top-5" }, yl = { class: "cl-font-semibold cl-ml-10 cl-p-4 cl-select-none cl-text-grey-5" }, wl = { class: "cl-overflow-hidden" }, xl = { class: "cl-ml-10 cl-p-4" }, kl = /* @__PURE__ */
|
|
32
|
+
}), pl = { class: "cl-absolute cl-left-5 cl-top-5" }, yl = { class: "cl-font-semibold cl-ml-10 cl-p-4 cl-select-none cl-text-grey-5" }, wl = { class: "cl-overflow-hidden" }, xl = { class: "cl-ml-10 cl-p-4" }, kl = /* @__PURE__ */ V({
|
|
33
33
|
__name: "cl-ui-accordion-item",
|
|
34
34
|
props: {
|
|
35
35
|
open: { type: Boolean },
|
|
@@ -43,9 +43,9 @@ const vl = { class: "cl-overflow-hidden" }, hl = /* @__PURE__ */ H({
|
|
|
43
43
|
function l() {
|
|
44
44
|
t.disabled || n("toggle");
|
|
45
45
|
}
|
|
46
|
-
return (c,
|
|
47
|
-
const r =
|
|
48
|
-
return i(),
|
|
46
|
+
return (c, d) => {
|
|
47
|
+
const r = te("icon");
|
|
48
|
+
return i(), u(z, null, [
|
|
49
49
|
s("div", {
|
|
50
50
|
class: U(["cl-border-b cl-border-grey-1 cl-relative", {
|
|
51
51
|
"cl-bg-grey-0": e.disabled,
|
|
@@ -54,7 +54,7 @@ const vl = { class: "cl-overflow-hidden" }, hl = /* @__PURE__ */ H({
|
|
|
54
54
|
onClick: l
|
|
55
55
|
}, [
|
|
56
56
|
s("div", pl, [
|
|
57
|
-
|
|
57
|
+
k(r, {
|
|
58
58
|
class: U(["cl-duration-300 cl-ease-in-out cl-text-grey-3 cl-transform-gpu cl-transition-transform", {
|
|
59
59
|
"cl-rotate-180": e.open
|
|
60
60
|
}]),
|
|
@@ -67,9 +67,9 @@ const vl = { class: "cl-overflow-hidden" }, hl = /* @__PURE__ */ H({
|
|
|
67
67
|
])
|
|
68
68
|
], 2),
|
|
69
69
|
s("div", wl, [
|
|
70
|
-
|
|
71
|
-
default:
|
|
72
|
-
|
|
70
|
+
k(Te, { name: "grow-down" }, {
|
|
71
|
+
default: X(() => [
|
|
72
|
+
B(s("div", xl, [
|
|
73
73
|
D(c.$slots, "default")
|
|
74
74
|
], 512), [
|
|
75
75
|
[F, e.open]
|
|
@@ -81,31 +81,31 @@ const vl = { class: "cl-overflow-hidden" }, hl = /* @__PURE__ */ H({
|
|
|
81
81
|
], 64);
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
}),
|
|
84
|
+
}), ve = (e, n) => {
|
|
85
85
|
const t = e.__vccOpts || e;
|
|
86
86
|
for (const [l, c] of n)
|
|
87
87
|
t[l] = c;
|
|
88
88
|
return t;
|
|
89
89
|
}, $l = {}, Tl = { 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" };
|
|
90
90
|
function Cl(e, n) {
|
|
91
|
-
return i(),
|
|
91
|
+
return i(), u("div", Tl, [
|
|
92
92
|
D(e.$slots, "default")
|
|
93
93
|
]);
|
|
94
94
|
}
|
|
95
|
-
const Sl = /* @__PURE__ */
|
|
95
|
+
const Sl = /* @__PURE__ */ ve($l, [["render", Cl]]), De = M([]);
|
|
96
96
|
function Je(e) {
|
|
97
97
|
const n = {
|
|
98
98
|
id: gl(),
|
|
99
99
|
...e
|
|
100
100
|
};
|
|
101
|
-
|
|
101
|
+
De.value.push(n), setTimeout(() => ol(n), e.duration);
|
|
102
102
|
}
|
|
103
103
|
function ol(e) {
|
|
104
|
-
|
|
104
|
+
De.value = De.value.filter((n) => n.id !== e.id);
|
|
105
105
|
}
|
|
106
106
|
const Ol = ["onClick"], El = { class: "cl-flex-1 cl-select-none cl-text-ellipsis cl-w-64" }, Al = {
|
|
107
107
|
inheritAttrs: !1
|
|
108
|
-
}, cl = /* @__PURE__ */
|
|
108
|
+
}, cl = /* @__PURE__ */ V({
|
|
109
109
|
...Al,
|
|
110
110
|
__name: "cl-ui-notification",
|
|
111
111
|
props: {
|
|
@@ -114,8 +114,8 @@ const Ol = ["onClick"], El = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
114
114
|
},
|
|
115
115
|
setup(e) {
|
|
116
116
|
return (n, t) => {
|
|
117
|
-
const l =
|
|
118
|
-
return i(),
|
|
117
|
+
const l = te("icon");
|
|
118
|
+
return i(), Q(He, { to: e.container }, [
|
|
119
119
|
s("div", {
|
|
120
120
|
class: U(["cl-fixed cl-w-80 cl-z-40", {
|
|
121
121
|
"cl-top-5 cl-left-5": e.position === "top-left",
|
|
@@ -126,8 +126,8 @@ const Ol = ["onClick"], El = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
126
126
|
"cl-bottom-5 cl-right-5": e.position === "bottom-right"
|
|
127
127
|
}])
|
|
128
128
|
}, [
|
|
129
|
-
(i(!0),
|
|
130
|
-
key:
|
|
129
|
+
(i(!0), u(z, null, ae(o(De), (c, d) => (i(), u("div", be(n.$attrs, {
|
|
130
|
+
key: d,
|
|
131
131
|
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", {
|
|
132
132
|
"cl-bg-white": c.colour === "default",
|
|
133
133
|
"cl-bg-primary-default": c.colour === "primary",
|
|
@@ -137,8 +137,8 @@ const Ol = ["onClick"], El = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
137
137
|
}],
|
|
138
138
|
onClick: (r) => o(ol)(c)
|
|
139
139
|
}), [
|
|
140
|
-
s("span", El,
|
|
141
|
-
|
|
140
|
+
s("span", El, x(c.message), 1),
|
|
141
|
+
k(l, {
|
|
142
142
|
class: "cl-inline-block cl-opacity-0 cl-transition-opacity group-hover:cl-opacity-100",
|
|
143
143
|
icon: "ph:x",
|
|
144
144
|
size: 16,
|
|
@@ -149,14 +149,14 @@ const Ol = ["onClick"], El = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
149
149
|
], 8, ["to"]);
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
|
-
}), jl = { class: "cl-absolute cl-flex cl-flex-wrap cl-h-screen cl-max-h-screen cl-max-w-full cl-min-h-screen cl-min-w-full cl-w-full" }, Ml = /* @__PURE__ */
|
|
152
|
+
}), jl = { class: "cl-absolute cl-flex cl-flex-wrap cl-h-screen cl-max-h-screen cl-max-w-full cl-min-h-screen cl-min-w-full cl-w-full" }, Ml = /* @__PURE__ */ V({
|
|
153
153
|
__name: "cl-ui-app",
|
|
154
154
|
props: {
|
|
155
155
|
removePadding: { type: Boolean, default: !1 }
|
|
156
156
|
},
|
|
157
157
|
setup(e) {
|
|
158
|
-
return (n, t) => (i(),
|
|
159
|
-
|
|
158
|
+
return (n, t) => (i(), u(z, null, [
|
|
159
|
+
k(cl),
|
|
160
160
|
s("div", jl, [
|
|
161
161
|
D(n.$slots, "header"),
|
|
162
162
|
s("div", {
|
|
@@ -177,14 +177,14 @@ const Ol = ["onClick"], El = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
177
177
|
], 64));
|
|
178
178
|
}
|
|
179
179
|
});
|
|
180
|
-
const
|
|
181
|
-
function
|
|
182
|
-
return i(),
|
|
180
|
+
const Nl = {}, Il = { class: "loading-spinner" };
|
|
181
|
+
function Dl(e, n) {
|
|
182
|
+
return i(), u("div", Il);
|
|
183
183
|
}
|
|
184
|
-
const al = /* @__PURE__ */
|
|
184
|
+
const al = /* @__PURE__ */ ve(Nl, [["render", Dl], ["__scopeId", "data-v-a21dc5d2"]]), Rl = ["disabled"], ql = {
|
|
185
185
|
inheritAttrs: !1
|
|
186
|
-
}, $e = /* @__PURE__ */
|
|
187
|
-
...
|
|
186
|
+
}, $e = /* @__PURE__ */ V({
|
|
187
|
+
...ql,
|
|
188
188
|
__name: "cl-ui-button",
|
|
189
189
|
props: {
|
|
190
190
|
colour: { default: "default" },
|
|
@@ -193,16 +193,16 @@ const al = /* @__PURE__ */ pe(Il, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
193
193
|
disabled: { type: Boolean, default: !1 }
|
|
194
194
|
},
|
|
195
195
|
setup(e, { expose: n }) {
|
|
196
|
-
const t =
|
|
196
|
+
const t = M(null);
|
|
197
197
|
return n({
|
|
198
198
|
focus() {
|
|
199
199
|
t.value && t.value.focus();
|
|
200
200
|
}
|
|
201
|
-
}), (l, c) => (i(),
|
|
202
|
-
|
|
201
|
+
}), (l, c) => (i(), u(z, null, [
|
|
202
|
+
B(k(al, null, null, 512), [
|
|
203
203
|
[F, e.loading]
|
|
204
204
|
]),
|
|
205
|
-
|
|
205
|
+
B(s("button", be(l.$attrs, {
|
|
206
206
|
ref_key: "buttonRef",
|
|
207
207
|
ref: t,
|
|
208
208
|
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", {
|
|
@@ -219,7 +219,7 @@ const al = /* @__PURE__ */ pe(Il, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
219
219
|
disabled: e.disabled
|
|
220
220
|
}), [
|
|
221
221
|
D(l.$slots, "default")
|
|
222
|
-
], 16,
|
|
222
|
+
], 16, Rl), [
|
|
223
223
|
[F, !e.loading]
|
|
224
224
|
])
|
|
225
225
|
], 64));
|
|
@@ -234,22 +234,22 @@ const al = /* @__PURE__ */ pe(Il, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
234
234
|
"small",
|
|
235
235
|
"medium",
|
|
236
236
|
"large"
|
|
237
|
-
], Bl = { key: 0 }, Ll = /* @__PURE__ */
|
|
237
|
+
], Bl = { key: 0 }, Ll = /* @__PURE__ */ V({
|
|
238
238
|
__name: "cl-ui-card",
|
|
239
239
|
props: {
|
|
240
240
|
size: { default: "medium" },
|
|
241
241
|
hover: { type: Boolean, default: !1 }
|
|
242
242
|
},
|
|
243
243
|
setup(e) {
|
|
244
|
-
return (n, t) => (i(),
|
|
244
|
+
return (n, t) => (i(), u("div", {
|
|
245
245
|
class: U(["cl-border cl-border-transparent cl-overflow-hidden cl-relative cl-rounded-md cl-shadow-lg cl-transition-all", {
|
|
246
246
|
"cl-cursor-pointer hover:cl-shadow-xl hover:cl-border-grey-0": e.hover
|
|
247
247
|
}])
|
|
248
248
|
}, [
|
|
249
|
-
n.$slots.image ? (i(),
|
|
249
|
+
n.$slots.image ? (i(), u("div", Bl, [
|
|
250
250
|
D(n.$slots, "image")
|
|
251
251
|
])) : N("", !0),
|
|
252
|
-
n.$slots.title ? (i(),
|
|
252
|
+
n.$slots.title ? (i(), u("div", {
|
|
253
253
|
key: 1,
|
|
254
254
|
class: U(["cl-border-grey-2 cl-font-normal", {
|
|
255
255
|
"cl-p-2 cl-text-2xl cl-leading-8": e.size === "small",
|
|
@@ -270,7 +270,7 @@ const al = /* @__PURE__ */ pe(Il, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
270
270
|
}, [
|
|
271
271
|
D(n.$slots, "default")
|
|
272
272
|
], 2),
|
|
273
|
-
n.$slots.footer ? (i(),
|
|
273
|
+
n.$slots.footer ? (i(), u("div", {
|
|
274
274
|
key: 2,
|
|
275
275
|
class: U(["cl-border-grey-2 cl-border-t", {
|
|
276
276
|
"cl-p-2": e.size === "small",
|
|
@@ -287,7 +287,7 @@ const al = /* @__PURE__ */ pe(Il, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
287
287
|
"medium",
|
|
288
288
|
"large"
|
|
289
289
|
];
|
|
290
|
-
var
|
|
290
|
+
var oe = /* @__PURE__ */ ((e) => (e.CURRENCY = "currency", e.PERCENTAGE = "percentage", e.INTEGER = "integer", e.DECIMAL = "decimal", e.MULTIPLIER = "multiplier", e))(oe || {}), Y = /* @__PURE__ */ ((e) => (e.SHORT_DATE = "short-date", e.SHORT_DATETIME = "short-datetime", e.DATE = "date", e.DATETIME = "datetime", e.LONG_DATE = "long-date", e.LONG_DATETIME = "long-datetime", e.TIME = "time", e.MONTH_YEAR = "month-year", e))(Y || {});
|
|
291
291
|
const Fl = {
|
|
292
292
|
"en-GB": {
|
|
293
293
|
comboBox: {
|
|
@@ -371,16 +371,16 @@ const Fl = {
|
|
|
371
371
|
}
|
|
372
372
|
}, Vl = {
|
|
373
373
|
"en-GB": {
|
|
374
|
-
[
|
|
374
|
+
[oe.PERCENTAGE]: {
|
|
375
375
|
style: "percent"
|
|
376
376
|
},
|
|
377
|
-
[
|
|
377
|
+
[oe.INTEGER]: {
|
|
378
378
|
maximumFractionDigits: 0
|
|
379
379
|
},
|
|
380
|
-
[
|
|
380
|
+
[oe.DECIMAL]: {
|
|
381
381
|
minimumFractionDigits: 1
|
|
382
382
|
},
|
|
383
|
-
[
|
|
383
|
+
[oe.CURRENCY]: {
|
|
384
384
|
style: "currency",
|
|
385
385
|
currency: "GBP",
|
|
386
386
|
currencyDisplay: "symbol"
|
|
@@ -388,52 +388,52 @@ const Fl = {
|
|
|
388
388
|
}
|
|
389
389
|
}, Hl = {
|
|
390
390
|
"en-GB": {
|
|
391
|
-
[
|
|
391
|
+
[Y.SHORT_DATE]: {
|
|
392
392
|
day: "numeric",
|
|
393
393
|
month: "numeric",
|
|
394
394
|
year: "2-digit"
|
|
395
395
|
},
|
|
396
|
-
[
|
|
396
|
+
[Y.SHORT_DATETIME]: {
|
|
397
397
|
day: "numeric",
|
|
398
398
|
month: "numeric",
|
|
399
399
|
year: "2-digit",
|
|
400
400
|
hour: "numeric",
|
|
401
401
|
minute: "numeric"
|
|
402
402
|
},
|
|
403
|
-
[
|
|
403
|
+
[Y.DATE]: {
|
|
404
404
|
day: "numeric",
|
|
405
405
|
month: "numeric",
|
|
406
406
|
year: "numeric"
|
|
407
407
|
},
|
|
408
|
-
[
|
|
408
|
+
[Y.DATETIME]: {
|
|
409
409
|
day: "numeric",
|
|
410
410
|
month: "numeric",
|
|
411
411
|
year: "numeric",
|
|
412
412
|
hour: "numeric",
|
|
413
413
|
minute: "numeric"
|
|
414
414
|
},
|
|
415
|
-
[
|
|
415
|
+
[Y.LONG_DATE]: {
|
|
416
416
|
day: "numeric",
|
|
417
417
|
month: "long",
|
|
418
418
|
year: "numeric"
|
|
419
419
|
},
|
|
420
|
-
[
|
|
420
|
+
[Y.LONG_DATETIME]: {
|
|
421
421
|
day: "numeric",
|
|
422
422
|
month: "long",
|
|
423
423
|
year: "numeric",
|
|
424
424
|
hour: "numeric",
|
|
425
425
|
minute: "numeric"
|
|
426
426
|
},
|
|
427
|
-
[
|
|
427
|
+
[Y.TIME]: {
|
|
428
428
|
hour: "numeric",
|
|
429
429
|
minute: "numeric"
|
|
430
430
|
},
|
|
431
|
-
[
|
|
431
|
+
[Y.MONTH_YEAR]: {
|
|
432
432
|
month: "long",
|
|
433
433
|
year: "numeric"
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
},
|
|
436
|
+
}, ce = bl({
|
|
437
437
|
locale: "en-GB",
|
|
438
438
|
fallbackLocale: "en-GB",
|
|
439
439
|
messages: Fl,
|
|
@@ -445,28 +445,28 @@ const Fl = {
|
|
|
445
445
|
warnHtmlMessage: !1
|
|
446
446
|
});
|
|
447
447
|
function Zc(e, n) {
|
|
448
|
-
return
|
|
448
|
+
return ce.global.mergeLocaleMessage(e, n), Ce();
|
|
449
449
|
}
|
|
450
450
|
function Qc(e, n) {
|
|
451
|
-
return
|
|
451
|
+
return ce.global.mergeNumberFormat(e, n), Ce();
|
|
452
452
|
}
|
|
453
453
|
function Yc(e, n) {
|
|
454
|
-
return
|
|
454
|
+
return ce.global.mergeDateTimeFormat(e, n), Ce();
|
|
455
455
|
}
|
|
456
456
|
function Xc(e) {
|
|
457
|
-
return
|
|
457
|
+
return ce.global.locale.value = e, Ce();
|
|
458
458
|
}
|
|
459
|
-
const { t:
|
|
459
|
+
const { t: fe } = ce.global;
|
|
460
460
|
function Gl(e, n, t, l) {
|
|
461
|
-
const c =
|
|
462
|
-
return l instanceof Date && (l = l.getTime()), new Promise((
|
|
463
|
-
var
|
|
461
|
+
const c = ce.global.locale.value;
|
|
462
|
+
return l instanceof Date && (l = l.getTime()), new Promise((d) => {
|
|
463
|
+
var g;
|
|
464
464
|
let r = {
|
|
465
465
|
valid: !1,
|
|
466
466
|
message: ""
|
|
467
467
|
};
|
|
468
468
|
if (e != null) {
|
|
469
|
-
let a,
|
|
469
|
+
let a, f;
|
|
470
470
|
switch (n) {
|
|
471
471
|
case "email":
|
|
472
472
|
case "password":
|
|
@@ -474,39 +474,39 @@ function Gl(e, n, t, l) {
|
|
|
474
474
|
case "tel":
|
|
475
475
|
case "text":
|
|
476
476
|
case "url":
|
|
477
|
-
a = ((
|
|
477
|
+
a = ((g = l == null ? void 0 : l.length) != null ? g : 0) >= e, r = me(a, fe("input.greaterOrEqualToCharacters", { label: t, min: e.toString() }));
|
|
478
478
|
break;
|
|
479
479
|
case "number":
|
|
480
480
|
case "range":
|
|
481
|
-
a = l >= e, r =
|
|
481
|
+
a = l >= e, r = me(a, fe("input.greaterOrEqualToValue", { label: t, min: e.toString() }));
|
|
482
482
|
break;
|
|
483
483
|
case "date":
|
|
484
|
-
a = l >= new Date(e).getTime(), r =
|
|
484
|
+
a = l >= new Date(e).getTime(), r = me(a, fe("input.afterOrEqualToValue", { label: t, min: new Date(e).toLocaleDateString(c) }));
|
|
485
485
|
break;
|
|
486
486
|
case "datetime":
|
|
487
|
-
a = l >= new Date(e).getTime(), r =
|
|
487
|
+
a = l >= new Date(e).getTime(), r = me(a, fe("input.afterOrEqualToValue", { label: t, min: ce.global.d(new Date(e), Y.DATETIME, c != null ? c : ce.global.locale.value) }));
|
|
488
488
|
break;
|
|
489
489
|
case "time":
|
|
490
|
-
|
|
490
|
+
f = e.toDateFromTime(), a = l >= f, r = me(a, fe("input.afterOrEqualToValue", { label: t, min: ce.global.d(new Date(f), Y.TIME, c != null ? c : ce.global.locale.value) }));
|
|
491
491
|
break;
|
|
492
492
|
default:
|
|
493
493
|
r.valid = !0;
|
|
494
494
|
break;
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
|
|
497
|
+
d(r);
|
|
498
498
|
});
|
|
499
499
|
}
|
|
500
500
|
function Wl(e, n, t, l) {
|
|
501
|
-
const c =
|
|
502
|
-
return l instanceof Date && (l = l.getTime()), new Promise((
|
|
503
|
-
var
|
|
501
|
+
const c = ce.global.locale.value;
|
|
502
|
+
return l instanceof Date && (l = l.getTime()), new Promise((d) => {
|
|
503
|
+
var g;
|
|
504
504
|
let r = {
|
|
505
505
|
valid: !1,
|
|
506
506
|
message: ""
|
|
507
507
|
};
|
|
508
508
|
if (e != null) {
|
|
509
|
-
let a,
|
|
509
|
+
let a, f;
|
|
510
510
|
switch (n) {
|
|
511
511
|
case "email":
|
|
512
512
|
case "password":
|
|
@@ -514,52 +514,52 @@ function Wl(e, n, t, l) {
|
|
|
514
514
|
case "tel":
|
|
515
515
|
case "text":
|
|
516
516
|
case "url":
|
|
517
|
-
a = ((
|
|
517
|
+
a = ((g = l == null ? void 0 : l.length) != null ? g : 0) <= e, r = me(a, fe("input.lessOrEqualToCharacters", { label: t, max: e.toString() }));
|
|
518
518
|
break;
|
|
519
519
|
case "number":
|
|
520
520
|
case "range":
|
|
521
|
-
a = l <= e, r =
|
|
521
|
+
a = l <= e, r = me(a, fe("input.lessOrEqualToValue", { label: t, max: e.toString() }));
|
|
522
522
|
break;
|
|
523
523
|
case "date":
|
|
524
|
-
a = l <= new Date(e).getTime(), r =
|
|
524
|
+
a = l <= new Date(e).getTime(), r = me(a, fe("input.beforeOrEqualToValue", { label: t, max: new Date(e).toLocaleDateString(c) }));
|
|
525
525
|
break;
|
|
526
526
|
case "datetime":
|
|
527
|
-
a = l <= new Date(e).getTime(), r =
|
|
527
|
+
a = l <= new Date(e).getTime(), r = me(a, fe("input.afterOrEqualToValue", { label: t, min: ce.global.d(new Date(e), Y.DATETIME, c != null ? c : ce.global.locale.value) }));
|
|
528
528
|
break;
|
|
529
529
|
case "time":
|
|
530
|
-
|
|
530
|
+
f = e.toDateFromTime(), a = l <= f, r = me(a, fe("input.afterOrEqualToValue", { label: t, min: ce.global.d(new Date(f), Y.TIME, c != null ? c : ce.global.locale.value) }));
|
|
531
531
|
break;
|
|
532
532
|
default:
|
|
533
533
|
r.valid = !0;
|
|
534
534
|
break;
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
|
-
|
|
537
|
+
d(r);
|
|
538
538
|
});
|
|
539
539
|
}
|
|
540
540
|
function Jl(e, n) {
|
|
541
541
|
return new Promise((t) => {
|
|
542
|
-
const l = n != null && n !== "" && n.toString().trim() !== "", c =
|
|
542
|
+
const l = n != null && n !== "" && n.toString().trim() !== "", c = me(l, fe("input.valueIsRequired", { label: e }));
|
|
543
543
|
t(c);
|
|
544
544
|
});
|
|
545
545
|
}
|
|
546
546
|
function Kl(e, n) {
|
|
547
547
|
return new Promise((t) => {
|
|
548
|
-
const c = n === "" || /[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/.exec(n) !== null,
|
|
549
|
-
t(
|
|
548
|
+
const c = n === "" || /[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/.exec(n) !== null, d = me(c, fe("input.valueNotValidEmail", { label: e }));
|
|
549
|
+
t(d);
|
|
550
550
|
});
|
|
551
551
|
}
|
|
552
|
-
function
|
|
552
|
+
function me(e, n) {
|
|
553
553
|
return {
|
|
554
554
|
valid: e,
|
|
555
555
|
message: e ? "" : n
|
|
556
556
|
};
|
|
557
557
|
}
|
|
558
|
-
var
|
|
558
|
+
var Oe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ue = { exports: {} };
|
|
559
559
|
(function(e, n) {
|
|
560
560
|
(function(t, l) {
|
|
561
561
|
l(n);
|
|
562
|
-
})(
|
|
562
|
+
})(Oe, function(t) {
|
|
563
563
|
var l = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
|
|
564
564
|
l10ns: {}
|
|
565
565
|
}, c = {
|
|
@@ -613,15 +613,15 @@ var Se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
613
613
|
time_24hr: !0
|
|
614
614
|
};
|
|
615
615
|
l.l10ns.de = c;
|
|
616
|
-
var
|
|
617
|
-
t.German = c, t.default =
|
|
616
|
+
var d = l.l10ns;
|
|
617
|
+
t.German = c, t.default = d, Object.defineProperty(t, "__esModule", { value: !0 });
|
|
618
618
|
});
|
|
619
619
|
})(Ue, Ue.exports);
|
|
620
620
|
var ze = { exports: {} };
|
|
621
621
|
(function(e, n) {
|
|
622
622
|
(function(t, l) {
|
|
623
623
|
l(n);
|
|
624
|
-
})(
|
|
624
|
+
})(Oe, function(t) {
|
|
625
625
|
var l = {
|
|
626
626
|
weekdays: {
|
|
627
627
|
shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -668,10 +668,10 @@ var ze = { exports: {} };
|
|
|
668
668
|
daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
|
|
669
669
|
firstDayOfWeek: 0,
|
|
670
670
|
ordinal: function(c) {
|
|
671
|
-
var
|
|
672
|
-
if (
|
|
671
|
+
var d = c % 100;
|
|
672
|
+
if (d > 3 && d < 21)
|
|
673
673
|
return "th";
|
|
674
|
-
switch (
|
|
674
|
+
switch (d % 10) {
|
|
675
675
|
case 1:
|
|
676
676
|
return "st";
|
|
677
677
|
case 2:
|
|
@@ -700,7 +700,7 @@ var Be = { exports: {} };
|
|
|
700
700
|
(function(e, n) {
|
|
701
701
|
(function(t, l) {
|
|
702
702
|
l(n);
|
|
703
|
-
})(
|
|
703
|
+
})(Oe, function(t) {
|
|
704
704
|
var l = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
|
|
705
705
|
l10ns: {}
|
|
706
706
|
}, c = {
|
|
@@ -754,15 +754,15 @@ var Be = { exports: {} };
|
|
|
754
754
|
time_24hr: !0
|
|
755
755
|
};
|
|
756
756
|
l.l10ns.es = c;
|
|
757
|
-
var
|
|
758
|
-
t.Spanish = c, t.default =
|
|
757
|
+
var d = l.l10ns;
|
|
758
|
+
t.Spanish = c, t.default = d, Object.defineProperty(t, "__esModule", { value: !0 });
|
|
759
759
|
});
|
|
760
760
|
})(Be, Be.exports);
|
|
761
761
|
var Le = { exports: {} };
|
|
762
762
|
(function(e, n) {
|
|
763
763
|
(function(t, l) {
|
|
764
764
|
l(n);
|
|
765
|
-
})(
|
|
765
|
+
})(Oe, function(t) {
|
|
766
766
|
var l = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
|
|
767
767
|
l10ns: {}
|
|
768
768
|
}, c = {
|
|
@@ -819,15 +819,15 @@ var Le = { exports: {} };
|
|
|
819
819
|
time_24hr: !0
|
|
820
820
|
};
|
|
821
821
|
l.l10ns.fr = c;
|
|
822
|
-
var
|
|
823
|
-
t.French = c, t.default =
|
|
822
|
+
var d = l.l10ns;
|
|
823
|
+
t.French = c, t.default = d, Object.defineProperty(t, "__esModule", { value: !0 });
|
|
824
824
|
});
|
|
825
825
|
})(Le, Le.exports);
|
|
826
826
|
var Pe = { exports: {} };
|
|
827
827
|
(function(e, n) {
|
|
828
828
|
(function(t, l) {
|
|
829
829
|
l(n);
|
|
830
|
-
})(
|
|
830
|
+
})(Oe, function(t) {
|
|
831
831
|
var l = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
|
|
832
832
|
l10ns: {}
|
|
833
833
|
}, c = {
|
|
@@ -884,15 +884,15 @@ var Pe = { exports: {} };
|
|
|
884
884
|
time_24hr: !0
|
|
885
885
|
};
|
|
886
886
|
l.l10ns.it = c;
|
|
887
|
-
var
|
|
888
|
-
t.Italian = c, t.default =
|
|
887
|
+
var d = l.l10ns;
|
|
888
|
+
t.Italian = c, t.default = d, Object.defineProperty(t, "__esModule", { value: !0 });
|
|
889
889
|
});
|
|
890
890
|
})(Pe, Pe.exports);
|
|
891
891
|
var Fe = { exports: {} };
|
|
892
892
|
(function(e, n) {
|
|
893
893
|
(function(t, l) {
|
|
894
894
|
l(n);
|
|
895
|
-
})(
|
|
895
|
+
})(Oe, function(t) {
|
|
896
896
|
var l = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
|
|
897
897
|
l10ns: {}
|
|
898
898
|
}, c = {
|
|
@@ -949,8 +949,8 @@ var Fe = { exports: {} };
|
|
|
949
949
|
}
|
|
950
950
|
};
|
|
951
951
|
l.l10ns.nl = c;
|
|
952
|
-
var
|
|
953
|
-
t.Dutch = c, t.default =
|
|
952
|
+
var d = l.l10ns;
|
|
953
|
+
t.Dutch = c, t.default = d, Object.defineProperty(t, "__esModule", { value: !0 });
|
|
954
954
|
});
|
|
955
955
|
})(Fe, Fe.exports);
|
|
956
956
|
function Zl() {
|
|
@@ -999,7 +999,7 @@ function Ze(e) {
|
|
|
999
999
|
}
|
|
1000
1000
|
return n;
|
|
1001
1001
|
}
|
|
1002
|
-
const Xl = ["placeholder", "disabled"], _l = { class: "cl-absolute cl-bg-white cl-flex cl-right-2 cl-text-grey-4 cl-top-3.5" }, et = /* @__PURE__ */
|
|
1002
|
+
const Xl = ["placeholder", "disabled"], _l = { class: "cl-absolute cl-bg-white cl-flex cl-right-2 cl-text-grey-4 cl-top-3.5" }, et = /* @__PURE__ */ V({
|
|
1003
1003
|
__name: "cl-ui-calendar",
|
|
1004
1004
|
props: {
|
|
1005
1005
|
date: { default: null },
|
|
@@ -1016,114 +1016,114 @@ const Xl = ["placeholder", "disabled"], _l = { class: "cl-absolute cl-bg-white c
|
|
|
1016
1016
|
valueOutOfRange: null
|
|
1017
1017
|
},
|
|
1018
1018
|
setup(e, { expose: n, emit: t }) {
|
|
1019
|
-
const l = e, { d: c, getDateTimeFormat:
|
|
1020
|
-
var
|
|
1021
|
-
let
|
|
1022
|
-
return ((
|
|
1023
|
-
}),
|
|
1024
|
-
var
|
|
1025
|
-
const
|
|
1019
|
+
const l = e, { d: c, getDateTimeFormat: d, locale: r, t: g } = de(), a = M(null), f = M(null), m = j(() => c(Zl(), l.type)), v = j(() => d(r.value)[l.type]), p = j(() => I()), O = j(() => w()), b = j(() => Z()), L = j(() => Ke(l.min, r.value)), W = j(() => Ke(l.max, r.value)), h = M(!1), C = j(() => {
|
|
1020
|
+
var ee, se;
|
|
1021
|
+
let y = "H", J = "Y";
|
|
1022
|
+
return ((ee = v.value) == null ? void 0 : ee.hour12) === !0 && (y = "h"), ((se = v.value) == null ? void 0 : se.year) === "2-digit" && (J = "y"), Ql(m.value, y, J);
|
|
1023
|
+
}), P = j(() => {
|
|
1024
|
+
var J, ee;
|
|
1025
|
+
const y = {
|
|
1026
1026
|
...We.defaultConfig,
|
|
1027
1027
|
allowInput: !0,
|
|
1028
|
-
dateFormat:
|
|
1028
|
+
dateFormat: C.value,
|
|
1029
1029
|
disableMobile: !0,
|
|
1030
|
-
enableTime: l.type ===
|
|
1030
|
+
enableTime: l.type === Y.DATETIME || l.type === Y.TIME,
|
|
1031
1031
|
locale: Yl(r.value),
|
|
1032
|
-
maxDate:
|
|
1033
|
-
maxTime:
|
|
1034
|
-
minDate:
|
|
1032
|
+
maxDate: W.value,
|
|
1033
|
+
maxTime: b.value,
|
|
1034
|
+
minDate: L.value,
|
|
1035
1035
|
minTime: O.value,
|
|
1036
1036
|
minuteIncrement: 1,
|
|
1037
1037
|
monthSelectorType: "static",
|
|
1038
|
-
noCalendar: l.type ===
|
|
1039
|
-
time_24hr: typeof ((
|
|
1038
|
+
noCalendar: l.type === Y.TIME,
|
|
1039
|
+
time_24hr: typeof ((J = v.value) == null ? void 0 : J.hour12) > "u" || ((ee = v.value) == null ? void 0 : ee.hour12) === !1
|
|
1040
1040
|
};
|
|
1041
|
-
return l.date !== null && (
|
|
1041
|
+
return l.date !== null && (y.defaultDate = l.date), y;
|
|
1042
1042
|
});
|
|
1043
|
-
function
|
|
1044
|
-
const
|
|
1045
|
-
|
|
1043
|
+
function _(y, J, ee) {
|
|
1044
|
+
const se = y.length > 0 ? y[0] : null;
|
|
1045
|
+
se !== l.date && !h.value && (t("update:date", se), se === null && t("valueOutOfRange")), h.value = !1;
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1048
|
-
|
|
1047
|
+
function T() {
|
|
1048
|
+
h.value = !0, t("update:date", null);
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1050
|
+
function R() {
|
|
1051
1051
|
if (a.value !== null) {
|
|
1052
|
-
let
|
|
1053
|
-
|
|
1054
|
-
let
|
|
1055
|
-
l.type === "time" ?
|
|
1052
|
+
let y = new Date();
|
|
1053
|
+
y.setHours(12, 0, 0, 0);
|
|
1054
|
+
let J;
|
|
1055
|
+
l.type === "time" ? J = l.min.toDateFromTime() : J = new Date(l.min), J > y && (y = J), h.value = !0, t("update:date", y);
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
1058
|
-
function
|
|
1059
|
-
a.value === null &&
|
|
1058
|
+
function H() {
|
|
1059
|
+
a.value === null && f.value !== null && (a.value = We(f.value, P.value), a.value.config.onChange.push(_));
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1062
|
-
a.value !== null && (a.value.set(
|
|
1061
|
+
function $() {
|
|
1062
|
+
a.value !== null && (a.value.set(P.value), a.value.config.onChange.push(_));
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1065
|
-
a.value !== null && a.value.setDate(
|
|
1064
|
+
function E(y) {
|
|
1065
|
+
a.value !== null && a.value.setDate(y, !0);
|
|
1066
1066
|
}
|
|
1067
|
-
function
|
|
1067
|
+
function G() {
|
|
1068
1068
|
a.value !== null && a.value.clear();
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1070
|
+
function A() {
|
|
1071
1071
|
a.value !== null && (a.value.destroy(), a.value = null);
|
|
1072
1072
|
}
|
|
1073
|
-
function
|
|
1074
|
-
let
|
|
1073
|
+
function I() {
|
|
1074
|
+
let y = l.dateTimePlaceholder;
|
|
1075
1075
|
switch (l.type) {
|
|
1076
1076
|
case "date":
|
|
1077
|
-
|
|
1077
|
+
y = l.datePlaceholder === null ? g("calendar.datePlaceholder") : l.datePlaceholder;
|
|
1078
1078
|
break;
|
|
1079
1079
|
case "datetime":
|
|
1080
|
-
|
|
1080
|
+
y = l.dateTimePlaceholder === null ? g("calendar.dateTimePlaceholder") : l.dateTimePlaceholder;
|
|
1081
1081
|
break;
|
|
1082
1082
|
case "time":
|
|
1083
|
-
|
|
1083
|
+
y = l.timePlaceholder === null ? g("calendar.timePlaceholder") : l.timePlaceholder;
|
|
1084
1084
|
break;
|
|
1085
1085
|
default:
|
|
1086
|
-
|
|
1086
|
+
y = l.dateTimePlaceholder === null ? g("calendar.dateTimePlaceholder") : l.dateTimePlaceholder;
|
|
1087
1087
|
break;
|
|
1088
1088
|
}
|
|
1089
|
-
return
|
|
1089
|
+
return y;
|
|
1090
1090
|
}
|
|
1091
|
-
function
|
|
1092
|
-
let
|
|
1093
|
-
return (l.type ===
|
|
1091
|
+
function w() {
|
|
1092
|
+
let y;
|
|
1093
|
+
return (l.type === Y.TIME || l.type === Y.DATETIME) && (y = Ze(l.min)), y;
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1096
|
-
let
|
|
1097
|
-
return (l.type ===
|
|
1095
|
+
function Z() {
|
|
1096
|
+
let y;
|
|
1097
|
+
return (l.type === Y.TIME || l.type === Y.DATETIME) && (y = Ze(l.max)), y;
|
|
1098
1098
|
}
|
|
1099
|
-
return
|
|
1100
|
-
|
|
1099
|
+
return ne(() => l.date, (y, J) => {
|
|
1100
|
+
y !== null && J !== null ? y.getTime() !== J.getTime() && E(y) : y === null && J !== null && G();
|
|
1101
1101
|
}, {
|
|
1102
1102
|
deep: !0
|
|
1103
|
-
}),
|
|
1103
|
+
}), ne(() => P.value, $, {
|
|
1104
1104
|
deep: !0
|
|
1105
|
-
}),
|
|
1106
|
-
|
|
1105
|
+
}), ne(() => l.type, () => {
|
|
1106
|
+
A(), Ce(() => H());
|
|
1107
1107
|
}, {
|
|
1108
1108
|
immediate: !1
|
|
1109
|
-
}),
|
|
1109
|
+
}), Me(() => H()), Re(() => A()), n({
|
|
1110
1110
|
focus() {
|
|
1111
|
-
var
|
|
1112
|
-
(
|
|
1111
|
+
var y;
|
|
1112
|
+
(y = f.value) == null || y.focus();
|
|
1113
1113
|
}
|
|
1114
|
-
}), (
|
|
1115
|
-
const
|
|
1116
|
-
return i(),
|
|
1117
|
-
s("input",
|
|
1114
|
+
}), (y, J) => {
|
|
1115
|
+
const ee = te("icon");
|
|
1116
|
+
return i(), u("div", be(y.$attrs, { class: "cl-relative" }), [
|
|
1117
|
+
s("input", be({
|
|
1118
1118
|
ref_key: "element",
|
|
1119
|
-
ref:
|
|
1120
|
-
},
|
|
1119
|
+
ref: f
|
|
1120
|
+
}, y.$attrs, {
|
|
1121
1121
|
class: ["!cl-text-sm cl-border-grey-1 cl-rounded-lg focus:cl-border-blue-light focus:cl-ring-0", { "cl-bg-off-white": e.disabled }],
|
|
1122
1122
|
type: "text",
|
|
1123
|
-
placeholder: o(
|
|
1123
|
+
placeholder: o(p),
|
|
1124
1124
|
disabled: e.disabled
|
|
1125
1125
|
}), null, 16, Xl),
|
|
1126
|
-
|
|
1126
|
+
B(k(ee, {
|
|
1127
1127
|
class: U(["cl-absolute cl-bg-white cl-right-2 cl-text-grey-4 cl-top-3.5", {
|
|
1128
1128
|
"!cl-bg-off-white": e.disabled
|
|
1129
1129
|
}]),
|
|
@@ -1133,7 +1133,7 @@ const Xl = ["placeholder", "disabled"], _l = { class: "cl-absolute cl-bg-white c
|
|
|
1133
1133
|
}, null, 8, ["class"]), [
|
|
1134
1134
|
[F, (e.date === null || e.disabled) && e.type !== "time"]
|
|
1135
1135
|
]),
|
|
1136
|
-
|
|
1136
|
+
B(k(ee, {
|
|
1137
1137
|
class: U(["cl-absolute cl-bg-white cl-right-2 cl-text-grey-4 cl-top-3.5", {
|
|
1138
1138
|
"!cl-bg-off-white": e.disabled
|
|
1139
1139
|
}]),
|
|
@@ -1143,18 +1143,18 @@ const Xl = ["placeholder", "disabled"], _l = { class: "cl-absolute cl-bg-white c
|
|
|
1143
1143
|
}, null, 8, ["class"]), [
|
|
1144
1144
|
[F, (e.date === null || e.disabled) && e.type === "time"]
|
|
1145
1145
|
]),
|
|
1146
|
-
|
|
1147
|
-
|
|
1146
|
+
B(s("div", _l, [
|
|
1147
|
+
k(ee, {
|
|
1148
1148
|
class: "cl-cursor-pointer cl-mr-0.5 md:cl-mr-1",
|
|
1149
1149
|
icon: "ph:arrow-counter-clockwise",
|
|
1150
1150
|
size: 16,
|
|
1151
|
-
onClick:
|
|
1151
|
+
onClick: R
|
|
1152
1152
|
}),
|
|
1153
|
-
|
|
1153
|
+
k(ee, {
|
|
1154
1154
|
class: "cl-cursor-pointer",
|
|
1155
1155
|
icon: "ph:x",
|
|
1156
1156
|
size: 16,
|
|
1157
|
-
onClick:
|
|
1157
|
+
onClick: T
|
|
1158
1158
|
})
|
|
1159
1159
|
], 512), [
|
|
1160
1160
|
[F, e.date !== null && !e.disabled]
|
|
@@ -1163,7 +1163,7 @@ const Xl = ["placeholder", "disabled"], _l = { class: "cl-absolute cl-bg-white c
|
|
|
1163
1163
|
};
|
|
1164
1164
|
}
|
|
1165
1165
|
});
|
|
1166
|
-
const lt = /* @__PURE__ */
|
|
1166
|
+
const lt = /* @__PURE__ */ ve(et, [["__scopeId", "data-v-d60f7772"]]), qe = [
|
|
1167
1167
|
"date",
|
|
1168
1168
|
"datetime",
|
|
1169
1169
|
"time"
|
|
@@ -1173,7 +1173,7 @@ const lt = /* @__PURE__ */ pe(et, [["__scopeId", "data-v-d60f7772"]]), Re = [
|
|
|
1173
1173
|
}, at = ["min", "max", "step", "disabled"], it = { class: "cl-absolute cl-bg-grey-0 cl-leading-6 cl-ml-2 cl-px-3 cl-right-0 cl-rounded-full cl-text-center cl-text-xs cl-top-full" }, st = {
|
|
1174
1174
|
key: 1,
|
|
1175
1175
|
class: "emphasis-danger text-sm w-full"
|
|
1176
|
-
}, rt = /* @__PURE__ */
|
|
1176
|
+
}, rt = /* @__PURE__ */ V({
|
|
1177
1177
|
__name: "cl-ui-slider",
|
|
1178
1178
|
props: {
|
|
1179
1179
|
value: null,
|
|
@@ -1188,53 +1188,53 @@ const lt = /* @__PURE__ */ pe(et, [["__scopeId", "data-v-d60f7772"]]), Re = [
|
|
|
1188
1188
|
"update:value": null
|
|
1189
1189
|
},
|
|
1190
1190
|
setup(e, { expose: n, emit: t }) {
|
|
1191
|
-
const l = e, { n: c, t:
|
|
1191
|
+
const l = e, { n: c, t: d } = de(), { debounce: r } = Ge(), g = M(l.value), a = M(), f = j({
|
|
1192
1192
|
get: () => l.value,
|
|
1193
|
-
set: (
|
|
1194
|
-
}),
|
|
1195
|
-
let
|
|
1196
|
-
return
|
|
1197
|
-
}),
|
|
1198
|
-
function O(
|
|
1199
|
-
var
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1202
|
-
}
|
|
1203
|
-
return
|
|
1193
|
+
set: (b) => t("update:value", b)
|
|
1194
|
+
}), m = j(() => l.disabled ? "rgba(153, 153, 153, 0.8)" : "#9acd32"), v = j(() => {
|
|
1195
|
+
let b = (f.value - l.min) / (l.max - l.min) * 100;
|
|
1196
|
+
return b < 35 && b > 0 ? b < 20 ? b += 0.5 : b += 0.25 : b > 65 && b < 100 && (b > 80 ? b -= 0.5 : b -= 0.25), b;
|
|
1197
|
+
}), p = j(() => l.min <= l.max && l.step > 0);
|
|
1198
|
+
function O(b, L) {
|
|
1199
|
+
var C;
|
|
1200
|
+
const W = (C = b == null ? void 0 : b.value) != null ? C : "", h = Math.max(Math.min(parseFloat(W) || l.min, l.max), l.min);
|
|
1201
|
+
f.value = l.enforceStep ? Math.ceil(h / l.step) * l.step : h, Ce(() => L());
|
|
1202
|
+
}
|
|
1203
|
+
return ne(() => l.value, () => g.value = l.value), n({
|
|
1204
1204
|
focus() {
|
|
1205
|
-
var
|
|
1206
|
-
(
|
|
1205
|
+
var b;
|
|
1206
|
+
(b = a.value) == null || b.focus();
|
|
1207
1207
|
}
|
|
1208
|
-
}), (
|
|
1209
|
-
const
|
|
1210
|
-
return o(
|
|
1211
|
-
|
|
1208
|
+
}), (b, L) => {
|
|
1209
|
+
const W = te("cl-ui-input");
|
|
1210
|
+
return o(p) ? (i(), u("div", ue(be({ key: 0 }, b.$attrs)), [
|
|
1211
|
+
B(s("div", { class: "cl-bg-transparent cl-relative cl-text-center cl-text-sm" }, x(o(f)), 513), [
|
|
1212
1212
|
[F, !e.showNumericInput]
|
|
1213
1213
|
]),
|
|
1214
1214
|
s("div", tt, [
|
|
1215
|
-
|
|
1216
|
-
modelValue:
|
|
1217
|
-
"onUpdate:modelValue":
|
|
1215
|
+
B(k(W, {
|
|
1216
|
+
modelValue: g.value,
|
|
1217
|
+
"onUpdate:modelValue": L[0] || (L[0] = (h) => g.value = h),
|
|
1218
1218
|
class: "!cl-text-sm md:!cl-w-auto",
|
|
1219
1219
|
"input-type": "number",
|
|
1220
1220
|
min: e.min,
|
|
1221
1221
|
max: e.max,
|
|
1222
1222
|
step: e.step,
|
|
1223
1223
|
disabled: e.disabled,
|
|
1224
|
-
onInput:
|
|
1224
|
+
onInput: L[1] || (L[1] = (h) => o(r)(O, h.target, b.$forceUpdate))
|
|
1225
1225
|
}, null, 8, ["modelValue", "min", "max", "step", "disabled"]), [
|
|
1226
1226
|
[F, e.showNumericInput]
|
|
1227
1227
|
]),
|
|
1228
1228
|
s("div", nt, [
|
|
1229
|
-
s("span", ot,
|
|
1230
|
-
typeof o(
|
|
1231
|
-
|
|
1229
|
+
s("span", ot, x(o(c)(e.min, Number.isInteger(e.min) ? o(oe).INTEGER : o(oe).DECIMAL)), 1),
|
|
1230
|
+
typeof o(f) == "number" ? (i(), u("div", ct, [
|
|
1231
|
+
B(s("input", {
|
|
1232
1232
|
ref_key: "sliderRef",
|
|
1233
1233
|
ref: a,
|
|
1234
|
-
"onUpdate:modelValue":
|
|
1234
|
+
"onUpdate:modelValue": L[2] || (L[2] = (h) => ke(f) ? f.value = h : null),
|
|
1235
1235
|
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",
|
|
1236
|
-
style:
|
|
1237
|
-
background: `linear-gradient(to right, ${o(
|
|
1236
|
+
style: Ee({
|
|
1237
|
+
background: `linear-gradient(to right, ${o(m)} 0%, ${o(m)} ${o(v)}%, white ${o(v)}%, white 100%)`
|
|
1238
1238
|
}),
|
|
1239
1239
|
type: "range",
|
|
1240
1240
|
min: e.min,
|
|
@@ -1244,20 +1244,20 @@ const lt = /* @__PURE__ */ pe(et, [["__scopeId", "data-v-d60f7772"]]), Re = [
|
|
|
1244
1244
|
}, null, 12, at), [
|
|
1245
1245
|
[
|
|
1246
1246
|
ul,
|
|
1247
|
-
o(
|
|
1247
|
+
o(f),
|
|
1248
1248
|
void 0,
|
|
1249
1249
|
{ number: !0 }
|
|
1250
1250
|
]
|
|
1251
1251
|
])
|
|
1252
1252
|
])) : N("", !0),
|
|
1253
|
-
s("span", it,
|
|
1253
|
+
s("span", it, x(o(c)(e.max, Number.isInteger(e.max) ? o(oe).INTEGER : o(oe).DECIMAL)), 1)
|
|
1254
1254
|
])
|
|
1255
1255
|
])
|
|
1256
|
-
], 16)) : (i(),
|
|
1256
|
+
], 16)) : (i(), u("div", st, x(o(d)("slider.invalidProps")), 1));
|
|
1257
1257
|
};
|
|
1258
1258
|
}
|
|
1259
1259
|
});
|
|
1260
|
-
const ut = /* @__PURE__ */
|
|
1260
|
+
const ut = /* @__PURE__ */ ve(rt, [["__scopeId", "data-v-47d8e44f"]]);
|
|
1261
1261
|
function Qe(e) {
|
|
1262
1262
|
let n = !1;
|
|
1263
1263
|
switch (e) {
|
|
@@ -1306,33 +1306,33 @@ function ft(e) {
|
|
|
1306
1306
|
}
|
|
1307
1307
|
return n;
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1309
|
+
function Ae(e) {
|
|
1310
1310
|
return e === "button" || e === "submit" || e === "reset";
|
|
1311
1311
|
}
|
|
1312
1312
|
function mt(e) {
|
|
1313
1313
|
let n;
|
|
1314
1314
|
switch (e) {
|
|
1315
1315
|
case "datetime":
|
|
1316
|
-
n =
|
|
1316
|
+
n = qe[1];
|
|
1317
1317
|
break;
|
|
1318
1318
|
case "time":
|
|
1319
|
-
n =
|
|
1319
|
+
n = qe[2];
|
|
1320
1320
|
break;
|
|
1321
1321
|
case "date":
|
|
1322
1322
|
default:
|
|
1323
|
-
n =
|
|
1323
|
+
n = qe[0];
|
|
1324
1324
|
break;
|
|
1325
1325
|
}
|
|
1326
1326
|
return n;
|
|
1327
1327
|
}
|
|
1328
1328
|
function Xe(e, n) {
|
|
1329
1329
|
const t = e.target;
|
|
1330
|
-
return dt(n) ? t.valueAsNumber : ft(n) ? t.valueAsDate :
|
|
1330
|
+
return dt(n) ? t.valueAsNumber : ft(n) ? t.valueAsDate : Ae(n) ? t.checked : t.value;
|
|
1331
1331
|
}
|
|
1332
|
-
const gt = { class: "cl-flex cl-justify-between" }, bt = { class: "cl-w-full" },
|
|
1332
|
+
const gt = { class: "cl-flex cl-justify-between" }, bt = { class: "cl-w-full" }, ht = {
|
|
1333
1333
|
key: 0,
|
|
1334
1334
|
class: "cl-block cl-left-auto cl-relative cl-text-danger-default"
|
|
1335
|
-
},
|
|
1335
|
+
}, vt = {
|
|
1336
1336
|
key: 1,
|
|
1337
1337
|
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"
|
|
1338
1338
|
}, pt = ["type", "disabled", "min", "max", "minlength", "maxlength", "step", "placeholder", "accept", "name", "autocomplete"], yt = {
|
|
@@ -1344,7 +1344,7 @@ const gt = { class: "cl-flex cl-justify-between" }, bt = { class: "cl-w-full" },
|
|
|
1344
1344
|
}, kt = {
|
|
1345
1345
|
key: 1,
|
|
1346
1346
|
class: "cl-bg-danger-light cl-px-2 cl-rounded-md cl-text-center cl-text-danger-default cl-text-xs cl-w-auto cl-whitespace-pre-line"
|
|
1347
|
-
}, $t = /* @__PURE__ */
|
|
1347
|
+
}, $t = /* @__PURE__ */ V({
|
|
1348
1348
|
__name: "cl-ui-input",
|
|
1349
1349
|
props: {
|
|
1350
1350
|
inputType: { default: "text" },
|
|
@@ -1373,144 +1373,144 @@ const gt = { class: "cl-flex cl-justify-between" }, bt = { class: "cl-w-full" },
|
|
|
1373
1373
|
},
|
|
1374
1374
|
emits: ["update:model-value", "click", "focus", "input", "change", "validated"],
|
|
1375
1375
|
setup(e, { expose: n, emit: t }) {
|
|
1376
|
-
const l = e, c =
|
|
1376
|
+
const l = e, c = M(null), d = M(!1), r = M(!1), g = j(ee), a = j(() => l.placeholderText.trim() !== "" ? l.placeholderText : l.label), f = M(!1), { t: m } = de(), v = M(0), p = j({
|
|
1377
1377
|
get: () => l.modelValue,
|
|
1378
|
-
set: (S) =>
|
|
1379
|
-
}), O =
|
|
1378
|
+
set: (S) => H(S, !1)
|
|
1379
|
+
}), O = j({
|
|
1380
1380
|
get: () => l.modelValue,
|
|
1381
|
-
set: (S) =>
|
|
1382
|
-
}),
|
|
1383
|
-
var S,
|
|
1381
|
+
set: (S) => R(S)
|
|
1382
|
+
}), b = j(() => typeof l.min == "number" ? l.min.toString() : l.min), L = j(() => typeof l.max == "number" ? l.max.toString() : l.max), W = j(() => typeof l.min == "number" ? l.min : parseFloat(l.min)), h = j(() => typeof l.max == "number" ? l.max : parseFloat(l.max)), C = j(() => l.messageWhenValid.trim() !== "" ? l.messageWhenValid : ""), P = M(!0), _ = M([]), T = j(() => {
|
|
1383
|
+
var S, q, re, K;
|
|
1384
1384
|
return [
|
|
1385
|
-
...(
|
|
1386
|
-
var
|
|
1387
|
-
return ((
|
|
1388
|
-
})) != null ?
|
|
1389
|
-
...(
|
|
1390
|
-
var
|
|
1391
|
-
return ((
|
|
1392
|
-
})) != null ?
|
|
1385
|
+
...(q = (S = _.value) == null ? void 0 : S.filter((pe) => {
|
|
1386
|
+
var we;
|
|
1387
|
+
return ((we = pe == null ? void 0 : pe.length) != null ? we : 0) > 0;
|
|
1388
|
+
})) != null ? q : [],
|
|
1389
|
+
...(K = (re = l.externalErrors) == null ? void 0 : re.filter((pe) => {
|
|
1390
|
+
var we;
|
|
1391
|
+
return ((we = pe == null ? void 0 : pe.length) != null ? we : 0) > 0;
|
|
1392
|
+
})) != null ? K : []
|
|
1393
1393
|
].join(`
|
|
1394
1394
|
`);
|
|
1395
1395
|
});
|
|
1396
|
-
async function
|
|
1397
|
-
l.validateOn === "input" && await
|
|
1396
|
+
async function R(S) {
|
|
1397
|
+
l.validateOn === "input" && await $(S), t("update:model-value", S), f.value = !1;
|
|
1398
1398
|
}
|
|
1399
|
-
async function
|
|
1400
|
-
l.onInputFunction !== void 0 && (S = l.onInputFunction(S)), (
|
|
1399
|
+
async function H(S, q) {
|
|
1400
|
+
l.onInputFunction !== void 0 && (S = l.onInputFunction(S)), (q || l.validateOn === "input") && await $(S), t("update:model-value", S);
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1403
|
-
const
|
|
1402
|
+
function $(S) {
|
|
1403
|
+
const q = {
|
|
1404
1404
|
message: "",
|
|
1405
1405
|
valid: !0
|
|
1406
|
-
},
|
|
1407
|
-
l.customValidationFunction === null || l.customValidationFunction === void 0 ? new Promise((
|
|
1408
|
-
|
|
1409
|
-
}) : new Promise((
|
|
1410
|
-
|
|
1406
|
+
}, re = [
|
|
1407
|
+
l.customValidationFunction === null || l.customValidationFunction === void 0 ? new Promise((K) => {
|
|
1408
|
+
K(q);
|
|
1409
|
+
}) : new Promise((K) => {
|
|
1410
|
+
K(l.customValidationFunction(l.label, S));
|
|
1411
1411
|
})
|
|
1412
1412
|
];
|
|
1413
|
-
return (typeof S == "string" || typeof S == "number" || S instanceof Date) && (
|
|
1414
|
-
const
|
|
1415
|
-
let
|
|
1416
|
-
|
|
1413
|
+
return (typeof S == "string" || typeof S == "number" || S instanceof Date) && (re.push(Gl(l.min, l.inputType, l.label, S)), re.push(Wl(l.max, l.inputType, l.label, S))), l.isRequired && re.push(Jl(l.label, S)), l.inputType === "email" && typeof S == "string" && re.push(Kl(l.label, S)), Promise.all(re).then((K) => {
|
|
1414
|
+
const pe = [...K.map((Ne) => Ne.message)];
|
|
1415
|
+
let we = K.some((Ne) => Ne.message.length > 0 && Ne.valid === !1) || l.externalErrors.length > 0;
|
|
1416
|
+
f.value && (pe.push(m("input.dateOutOfRange")), we = !0), we ? (_.value = pe, t("validated", !1, S)) : (_.value = [], t("validated", !0, S)), P.value = !we;
|
|
1417
1417
|
});
|
|
1418
1418
|
}
|
|
1419
|
-
function
|
|
1419
|
+
function E() {
|
|
1420
1420
|
let S = "";
|
|
1421
|
-
return l.inputType === "color" &&
|
|
1421
|
+
return l.inputType === "color" && p.value && (l.disabled ? S = "background: #999999" : S = `background: ${p.value};`), S;
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1424
|
-
|
|
1423
|
+
function G(S) {
|
|
1424
|
+
Ae(l.inputType) ? (S.preventDefault(), t("click", S)) : l.inputType === "checkbox" && t("click", S);
|
|
1425
1425
|
}
|
|
1426
|
-
function
|
|
1426
|
+
function A() {
|
|
1427
1427
|
if (c.value) {
|
|
1428
|
-
c.value.stepUp(), c.value.focus(),
|
|
1428
|
+
c.value.stepUp(), c.value.focus(), H(c.value.valueAsNumber, !1);
|
|
1429
1429
|
const S = {
|
|
1430
1430
|
target: c.value
|
|
1431
1431
|
};
|
|
1432
1432
|
t("input", S, c.value.valueAsNumber);
|
|
1433
1433
|
}
|
|
1434
1434
|
}
|
|
1435
|
-
function
|
|
1435
|
+
function I() {
|
|
1436
1436
|
if (c.value) {
|
|
1437
|
-
c.value.stepDown(), c.value.focus(),
|
|
1437
|
+
c.value.stepDown(), c.value.focus(), H(c.value.valueAsNumber, !1);
|
|
1438
1438
|
const S = {
|
|
1439
1439
|
target: c.value
|
|
1440
1440
|
};
|
|
1441
1441
|
t("input", S, c.value.valueAsNumber);
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
|
-
function
|
|
1445
|
-
|
|
1444
|
+
function w(S) {
|
|
1445
|
+
d.value = S;
|
|
1446
1446
|
}
|
|
1447
|
-
function
|
|
1448
|
-
r.value = !0,
|
|
1447
|
+
function Z() {
|
|
1448
|
+
r.value = !0, w(!1);
|
|
1449
1449
|
}
|
|
1450
|
-
function
|
|
1451
|
-
|
|
1450
|
+
function y() {
|
|
1451
|
+
v.value++;
|
|
1452
1452
|
}
|
|
1453
|
-
function
|
|
1453
|
+
function J(S) {
|
|
1454
1454
|
S.target.blur();
|
|
1455
1455
|
}
|
|
1456
|
-
function
|
|
1457
|
-
var
|
|
1456
|
+
function ee() {
|
|
1457
|
+
var re;
|
|
1458
1458
|
let S = !0;
|
|
1459
|
-
const
|
|
1460
|
-
return
|
|
1459
|
+
const q = g.value;
|
|
1460
|
+
return d.value ? S = q : r.value && ((re = p.value) == null ? void 0 : re.toString().trim()) === "" && (S = !1), S;
|
|
1461
1461
|
}
|
|
1462
|
-
function
|
|
1463
|
-
|
|
1462
|
+
function se() {
|
|
1463
|
+
f.value = !0;
|
|
1464
1464
|
}
|
|
1465
|
-
async function
|
|
1466
|
-
const
|
|
1467
|
-
l.validateOn === "change" && await
|
|
1465
|
+
async function Se(S) {
|
|
1466
|
+
const q = Xe(S, l.inputType);
|
|
1467
|
+
l.validateOn === "change" && await $(q), t("change", S, q);
|
|
1468
1468
|
}
|
|
1469
|
-
return
|
|
1470
|
-
l.validateImmediately &&
|
|
1471
|
-
}),
|
|
1472
|
-
await
|
|
1469
|
+
return Me(() => {
|
|
1470
|
+
l.validateImmediately && H(l.modelValue, !0);
|
|
1471
|
+
}), ne(() => l.isRequired, () => H(l.modelValue, !0)), ne(() => l.externalErrors, async () => {
|
|
1472
|
+
await $(p.value), t("update:model-value", p.value);
|
|
1473
1473
|
}), n({
|
|
1474
1474
|
focus() {
|
|
1475
1475
|
var S;
|
|
1476
1476
|
(S = c.value) == null || S.focus();
|
|
1477
1477
|
}
|
|
1478
|
-
}), (S,
|
|
1479
|
-
const
|
|
1480
|
-
return i(),
|
|
1481
|
-
key:
|
|
1478
|
+
}), (S, q) => {
|
|
1479
|
+
const re = te("icon");
|
|
1480
|
+
return i(), u("div", {
|
|
1481
|
+
key: v.value,
|
|
1482
1482
|
class: "cl-align-top cl-border-none cl-inline-block cl-text-left"
|
|
1483
1483
|
}, [
|
|
1484
1484
|
s("div", {
|
|
1485
|
-
onMouseenter:
|
|
1486
|
-
onMouseleave:
|
|
1485
|
+
onMouseenter: q[11] || (q[11] = (K) => w(!0)),
|
|
1486
|
+
onMouseleave: q[12] || (q[12] = (K) => w(!1))
|
|
1487
1487
|
}, [
|
|
1488
1488
|
s("div", gt, [
|
|
1489
1489
|
s("div", bt, [
|
|
1490
|
-
|
|
1490
|
+
B(s("label", { class: "cl-block cl-mb-1 cl-text-gray-400 cl-text-xs cl-tracking-widest" }, x(e.label), 513), [
|
|
1491
1491
|
[F, e.showLabel && e.label !== ""]
|
|
1492
1492
|
])
|
|
1493
1493
|
]),
|
|
1494
|
-
e.isRequired && o(
|
|
1495
|
-
e.isRequired && !o(
|
|
1494
|
+
e.isRequired && o(g) ? (i(), u("label", ht, " * ")) : N("", !0),
|
|
1495
|
+
e.isRequired && !o(g) ? (i(), u("label", vt, x(e.requiredText), 1)) : N("", !0)
|
|
1496
1496
|
]),
|
|
1497
|
-
e.inputType !== "range" && !o(Ye)(e.inputType) ?
|
|
1497
|
+
e.inputType !== "range" && !o(Ye)(e.inputType) ? B((i(), u("input", be({
|
|
1498
1498
|
key: 0,
|
|
1499
1499
|
ref_key: "inputElement",
|
|
1500
1500
|
ref: c,
|
|
1501
|
-
"onUpdate:modelValue":
|
|
1501
|
+
"onUpdate:modelValue": q[0] || (q[0] = (K) => ke(p) ? p.value = K : null)
|
|
1502
1502
|
}, S.$attrs, {
|
|
1503
1503
|
class: ["cl-block cl-border cl-duration-300 cl-h-full cl-mb-1 cl-transition cl-w-full focus:cl-outline-none", {
|
|
1504
|
-
"hover:!cl-border-grey-3": e.disabled === !1 && !o(
|
|
1504
|
+
"hover:!cl-border-grey-3": e.disabled === !1 && !o(Ae)(e.inputType),
|
|
1505
1505
|
"!cl-cursor-default": e.disabled,
|
|
1506
|
-
"!cl-border-danger-default": !
|
|
1507
|
-
"!cl-border-primary-default":
|
|
1508
|
-
"cl-border-grey-0 focus:cl-border-blue-light":
|
|
1506
|
+
"!cl-border-danger-default": !P.value,
|
|
1507
|
+
"!cl-border-primary-default": P.value && e.highlightWhenValid,
|
|
1508
|
+
"cl-border-grey-0 focus:cl-border-blue-light": P.value && !o(Ae)(e.inputType),
|
|
1509
1509
|
"!cl-p-2": e.inputType === "checkbox" || e.inputType === "radio",
|
|
1510
|
-
"cl-p-3 cl-rounded-lg": !o(
|
|
1510
|
+
"cl-p-3 cl-rounded-lg": !o(Ae)(e.inputType),
|
|
1511
1511
|
[`${e.inputSpecificClasses}`]: e.inputSpecificClasses !== ""
|
|
1512
1512
|
}],
|
|
1513
|
-
style:
|
|
1513
|
+
style: E(),
|
|
1514
1514
|
type: e.inputType,
|
|
1515
1515
|
disabled: e.disabled,
|
|
1516
1516
|
min: e.min,
|
|
@@ -1522,94 +1522,94 @@ const gt = { class: "cl-flex cl-justify-between" }, bt = { class: "cl-w-full" },
|
|
|
1522
1522
|
accept: e.fileExtensions,
|
|
1523
1523
|
name: e.group,
|
|
1524
1524
|
autocomplete: e.autocomplete,
|
|
1525
|
-
onClick:
|
|
1526
|
-
onFocus:
|
|
1527
|
-
onBlur:
|
|
1528
|
-
|
|
1525
|
+
onClick: q[1] || (q[1] = (K) => G(K)),
|
|
1526
|
+
onFocus: q[2] || (q[2] = (K) => t("focus")),
|
|
1527
|
+
onBlur: q[3] || (q[3] = ie((K) => {
|
|
1528
|
+
Z(), y();
|
|
1529
1529
|
}, ["self"])),
|
|
1530
|
-
onMousewheelPassive:
|
|
1531
|
-
onInput:
|
|
1532
|
-
t("input",
|
|
1530
|
+
onMousewheelPassive: J,
|
|
1531
|
+
onInput: q[4] || (q[4] = (K) => {
|
|
1532
|
+
t("input", K, o(Xe)(K, e.inputType));
|
|
1533
1533
|
}),
|
|
1534
|
-
onChange:
|
|
1534
|
+
onChange: Se
|
|
1535
1535
|
}), null, 16, pt)), [
|
|
1536
|
-
[dl, o(
|
|
1537
|
-
]) : o(Ye)(e.inputType) ? (i(),
|
|
1536
|
+
[dl, o(p)]
|
|
1537
|
+
]) : o(Ye)(e.inputType) ? (i(), Q(o(lt), be({ key: 1 }, S.$attrs, {
|
|
1538
1538
|
ref_key: "inputElement",
|
|
1539
1539
|
ref: c,
|
|
1540
1540
|
date: o(O),
|
|
1541
|
-
"onUpdate:date":
|
|
1541
|
+
"onUpdate:date": q[5] || (q[5] = (K) => ke(O) ? O.value = K : null),
|
|
1542
1542
|
class: ["cl-block cl-duration-300 cl-h-fit cl-mb-1 cl-rounded-lg cl-text-sm cl-transition cl-w-full focus:cl-outline-none", {
|
|
1543
1543
|
"hover:cl-border-grey-3": !e.disabled,
|
|
1544
|
-
"!cl-border-danger-default": !
|
|
1545
|
-
"!cl-border-primary-default":
|
|
1544
|
+
"!cl-border-danger-default": !P.value,
|
|
1545
|
+
"!cl-border-primary-default": P.value && e.highlightWhenValid
|
|
1546
1546
|
}],
|
|
1547
1547
|
disabled: e.disabled,
|
|
1548
1548
|
type: o(mt)(e.inputType),
|
|
1549
|
-
min: o(
|
|
1550
|
-
max: o(
|
|
1549
|
+
min: o(b),
|
|
1550
|
+
max: o(L),
|
|
1551
1551
|
"date-placeholder": o(a),
|
|
1552
1552
|
"date-time-placeholder": o(a),
|
|
1553
1553
|
"time-placeholder": o(a),
|
|
1554
|
-
onBlur:
|
|
1555
|
-
onValueOutOfRange:
|
|
1556
|
-
onFocus:
|
|
1557
|
-
}), null, 16, ["date", "class", "disabled", "type", "min", "max", "date-placeholder", "date-time-placeholder", "time-placeholder", "onBlur"])) : e.inputType === "range" && typeof o(
|
|
1558
|
-
|
|
1554
|
+
onBlur: ie(Z, ["self"]),
|
|
1555
|
+
onValueOutOfRange: se,
|
|
1556
|
+
onFocus: q[6] || (q[6] = (K) => t("focus"))
|
|
1557
|
+
}), null, 16, ["date", "class", "disabled", "type", "min", "max", "date-placeholder", "date-time-placeholder", "time-placeholder", "onBlur"])) : e.inputType === "range" && typeof o(p) == "number" ? (i(), u("div", yt, [
|
|
1558
|
+
k(o(ut), {
|
|
1559
1559
|
ref_key: "inputElement",
|
|
1560
1560
|
ref: c,
|
|
1561
|
-
value: o(
|
|
1562
|
-
"onUpdate:value":
|
|
1563
|
-
min: o(
|
|
1564
|
-
max: o(
|
|
1561
|
+
value: o(p),
|
|
1562
|
+
"onUpdate:value": q[7] || (q[7] = (K) => ke(p) ? p.value = K : null),
|
|
1563
|
+
min: o(W),
|
|
1564
|
+
max: o(h),
|
|
1565
1565
|
step: e.step,
|
|
1566
1566
|
disabled: e.disabled,
|
|
1567
1567
|
"show-numeric-input": !1,
|
|
1568
|
-
onBlur:
|
|
1569
|
-
onFocus:
|
|
1568
|
+
onBlur: ie(Z, ["self"]),
|
|
1569
|
+
onFocus: q[8] || (q[8] = (K) => t("focus"))
|
|
1570
1570
|
}, null, 8, ["value", "min", "max", "step", "disabled", "onBlur"])
|
|
1571
1571
|
])) : N("", !0),
|
|
1572
1572
|
s("div", wt, [
|
|
1573
|
-
e.inputType === "number" && !e.disabled && e.showArrows ? (i(),
|
|
1573
|
+
e.inputType === "number" && !e.disabled && e.showArrows ? (i(), u("div", {
|
|
1574
1574
|
key: 0,
|
|
1575
1575
|
class: U(["cl-absolute cl-duration-300 cl-right-1 cl-transition", {
|
|
1576
|
-
"cl-opacity-0": !
|
|
1576
|
+
"cl-opacity-0": !d.value
|
|
1577
1577
|
}]),
|
|
1578
1578
|
style: { bottom: "1.625rem" }
|
|
1579
1579
|
}, [
|
|
1580
|
-
|
|
1580
|
+
k(re, {
|
|
1581
1581
|
icon: "ph:caret-up-bold",
|
|
1582
1582
|
class: "cl-bg-link-default cl-rounded-md cl-text-sm cl-text-white hover:cl-bg-link-light hover:cl-cursor-pointer",
|
|
1583
|
-
onClick:
|
|
1584
|
-
onMousedown:
|
|
1583
|
+
onClick: A,
|
|
1584
|
+
onMousedown: q[9] || (q[9] = ie(() => {
|
|
1585
1585
|
}, ["prevent"]))
|
|
1586
1586
|
})
|
|
1587
1587
|
], 2)) : N("", !0),
|
|
1588
|
-
e.inputType === "number" && !e.disabled && e.showArrows ? (i(),
|
|
1588
|
+
e.inputType === "number" && !e.disabled && e.showArrows ? (i(), u("div", {
|
|
1589
1589
|
key: 1,
|
|
1590
1590
|
class: U(["cl-absolute cl-bottom-2 cl-duration-300 cl-right-1 cl-transition", {
|
|
1591
|
-
"cl-opacity-0": !
|
|
1591
|
+
"cl-opacity-0": !d.value
|
|
1592
1592
|
}])
|
|
1593
1593
|
}, [
|
|
1594
|
-
|
|
1594
|
+
k(re, {
|
|
1595
1595
|
icon: "ph:caret-down-bold",
|
|
1596
1596
|
class: "cl-bg-link-default cl-rounded-md cl-text-sm cl-text-white hover:cl-bg-link-light hover:cl-cursor-pointer",
|
|
1597
|
-
onClick:
|
|
1598
|
-
onMousedown:
|
|
1597
|
+
onClick: I,
|
|
1598
|
+
onMousedown: q[10] || (q[10] = ie(() => {
|
|
1599
1599
|
}, ["prevent"]))
|
|
1600
1600
|
})
|
|
1601
1601
|
], 2)) : N("", !0)
|
|
1602
1602
|
])
|
|
1603
1603
|
], 32),
|
|
1604
|
-
|
|
1605
|
-
!
|
|
1604
|
+
P.value && o(C) ? (i(), u("div", xt, x(o(C)), 1)) : N("", !0),
|
|
1605
|
+
!P.value && o(T).length > 0 ? (i(), u("div", kt, x(o(T)), 1)) : N("", !0)
|
|
1606
1606
|
]);
|
|
1607
1607
|
};
|
|
1608
1608
|
}
|
|
1609
1609
|
});
|
|
1610
|
-
const
|
|
1610
|
+
const he = /* @__PURE__ */ ve($t, [["__scopeId", "data-v-5ed70f91"]]), Tt = { class: "cl-align-items-center cl-bg-black cl-bg-opacity-40 cl-bottom-0 cl-fixed cl-flex cl-h-screen cl-justify-center cl-left-0 cl-right-0 cl-top-0 cl-w-full cl-z-40" }, Ct = ["onKeypress"], St = { class: "cl-overflow-y-auto cl-p-2 cl-w-full" }, Ot = {
|
|
1611
1611
|
inheritAttrs: !1
|
|
1612
|
-
}, il = /* @__PURE__ */
|
|
1612
|
+
}, il = /* @__PURE__ */ V({
|
|
1613
1613
|
...Ot,
|
|
1614
1614
|
__name: "cl-ui-modal",
|
|
1615
1615
|
props: {
|
|
@@ -1618,25 +1618,25 @@ const ge = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-5ed70f91"]]), Tt = { cl
|
|
|
1618
1618
|
size: { default: "medium" }
|
|
1619
1619
|
},
|
|
1620
1620
|
setup(e) {
|
|
1621
|
-
const n = e, t =
|
|
1621
|
+
const n = e, t = M(!1);
|
|
1622
1622
|
function l() {
|
|
1623
|
-
t.value = !0, document.addEventListener("keydown",
|
|
1623
|
+
t.value = !0, document.addEventListener("keydown", d);
|
|
1624
1624
|
}
|
|
1625
1625
|
function c() {
|
|
1626
|
-
n.preventClose || (t.value = !1, document.removeEventListener("keydown",
|
|
1626
|
+
n.preventClose || (t.value = !1, document.removeEventListener("keydown", d));
|
|
1627
1627
|
}
|
|
1628
|
-
function
|
|
1628
|
+
function d(r) {
|
|
1629
1629
|
r.key === "Escape" && c();
|
|
1630
1630
|
}
|
|
1631
|
-
return (r,
|
|
1632
|
-
const a =
|
|
1633
|
-
return i(),
|
|
1634
|
-
D(r.$slots, "trigger",
|
|
1635
|
-
(i(),
|
|
1636
|
-
|
|
1637
|
-
default:
|
|
1638
|
-
|
|
1639
|
-
s("div",
|
|
1631
|
+
return (r, g) => {
|
|
1632
|
+
const a = te("icon");
|
|
1633
|
+
return i(), u(z, null, [
|
|
1634
|
+
D(r.$slots, "trigger", ue(ye({ open: l }))),
|
|
1635
|
+
(i(), Q(He, { to: "body" }, [
|
|
1636
|
+
k(Te, { name: "fade" }, {
|
|
1637
|
+
default: X(() => [
|
|
1638
|
+
B(s("div", Tt, [
|
|
1639
|
+
s("div", be(r.$attrs, {
|
|
1640
1640
|
class: ["cl-bg-white cl-flex cl-flex-wrap cl-mx-0 cl-my-auto cl-overflow-y-auto cl-relative cl-rounded-lg cl-shadow-lg", {
|
|
1641
1641
|
"lg:cl-w-2/12 cl-w-10/12": e.size === "x-small",
|
|
1642
1642
|
"cl-w-6/12": e.size === "small",
|
|
@@ -1644,16 +1644,16 @@ const ge = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-5ed70f91"]]), Tt = { cl
|
|
|
1644
1644
|
"cl-w-10/12": e.size === "large"
|
|
1645
1645
|
}]
|
|
1646
1646
|
}), [
|
|
1647
|
-
|
|
1647
|
+
B(s("div", {
|
|
1648
1648
|
class: U(["cl-absolute cl-cursor-pointer cl-right-4 cl-top-4 cl-transition-colors cl-w-3", {
|
|
1649
1649
|
"cl-text-white hover:cl-text-off-white": e.headerColour === "secondary" || e.headerColour === "primary",
|
|
1650
1650
|
"cl-text-black hover:cl-text-grey-7": e.headerColour === "white"
|
|
1651
1651
|
}]),
|
|
1652
1652
|
tabindex: 0,
|
|
1653
|
-
onKeypress:
|
|
1653
|
+
onKeypress: je(c, ["enter"]),
|
|
1654
1654
|
onClick: c
|
|
1655
1655
|
}, [
|
|
1656
|
-
|
|
1656
|
+
k(a, { icon: "ph:x" })
|
|
1657
1657
|
], 42, Ct), [
|
|
1658
1658
|
[F, !e.preventClose]
|
|
1659
1659
|
]),
|
|
@@ -1667,9 +1667,9 @@ const ge = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-5ed70f91"]]), Tt = { cl
|
|
|
1667
1667
|
D(r.$slots, "title")
|
|
1668
1668
|
], 2),
|
|
1669
1669
|
s("div", St, [
|
|
1670
|
-
D(r.$slots, "default",
|
|
1670
|
+
D(r.$slots, "default", ue(ye({ close: c })))
|
|
1671
1671
|
]),
|
|
1672
|
-
D(r.$slots, "footer",
|
|
1672
|
+
D(r.$slots, "footer", ue(ye({ close: c })))
|
|
1673
1673
|
], 16)
|
|
1674
1674
|
], 512), [
|
|
1675
1675
|
[F, t.value]
|
|
@@ -1684,7 +1684,7 @@ const ge = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-5ed70f91"]]), Tt = { cl
|
|
|
1684
1684
|
}), Et = { class: "cl-bg-grey-0 cl-flex cl-p-1" }, At = {
|
|
1685
1685
|
key: 0,
|
|
1686
1686
|
class: "cl-w-1/2"
|
|
1687
|
-
},
|
|
1687
|
+
}, Ie = /* @__PURE__ */ V({
|
|
1688
1688
|
__name: "cl-ui-combo-box-header",
|
|
1689
1689
|
props: {
|
|
1690
1690
|
showClearButton: { type: Boolean, default: !1 },
|
|
@@ -1696,20 +1696,20 @@ const ge = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-5ed70f91"]]), Tt = { cl
|
|
|
1696
1696
|
},
|
|
1697
1697
|
setup(e) {
|
|
1698
1698
|
return (n, t) => {
|
|
1699
|
-
const l =
|
|
1700
|
-
return i(),
|
|
1701
|
-
e.additionalText !== "" ? (i(),
|
|
1699
|
+
const l = te("icon");
|
|
1700
|
+
return i(), u("div", Et, [
|
|
1701
|
+
e.additionalText !== "" ? (i(), u("div", At, x(e.additionalText), 1)) : N("", !0),
|
|
1702
1702
|
s("div", {
|
|
1703
1703
|
class: U({
|
|
1704
1704
|
"cl-w-1/2": e.additionalText !== "",
|
|
1705
1705
|
"cl-w-full": e.additionalText === ""
|
|
1706
1706
|
})
|
|
1707
|
-
},
|
|
1708
|
-
|
|
1707
|
+
}, x(e.text), 3),
|
|
1708
|
+
B(s("div", {
|
|
1709
1709
|
class: "cl-cursor-pointer cl-float-right",
|
|
1710
1710
|
onMousedown: t[0] || (t[0] = (c) => n.$emit("clear-object"))
|
|
1711
1711
|
}, [
|
|
1712
|
-
|
|
1712
|
+
k(l, {
|
|
1713
1713
|
class: "cl-mt-1 cl-transition-colors hover:cl-text-link-default",
|
|
1714
1714
|
icon: "ph:x"
|
|
1715
1715
|
})
|
|
@@ -1722,7 +1722,7 @@ const ge = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-5ed70f91"]]), Tt = { cl
|
|
|
1722
1722
|
}), jt = {
|
|
1723
1723
|
key: 0,
|
|
1724
1724
|
class: "cl-w-1/2"
|
|
1725
|
-
}, Mt = { class: "cl-float-right cl-py-1" }, _e = /* @__PURE__ */
|
|
1725
|
+
}, Mt = { class: "cl-float-right cl-py-1" }, _e = /* @__PURE__ */ V({
|
|
1726
1726
|
__name: "cl-ui-combo-box-selectable",
|
|
1727
1727
|
props: {
|
|
1728
1728
|
isCreateNewOption: { type: Boolean, default: !1 },
|
|
@@ -1737,48 +1737,48 @@ const ge = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-5ed70f91"]]), Tt = { cl
|
|
|
1737
1737
|
"option-highlighted": null
|
|
1738
1738
|
},
|
|
1739
1739
|
setup(e, { emit: n }) {
|
|
1740
|
-
const t = e, l =
|
|
1741
|
-
var
|
|
1742
|
-
return (
|
|
1743
|
-
}), c =
|
|
1744
|
-
var
|
|
1745
|
-
return (
|
|
1746
|
-
}),
|
|
1740
|
+
const t = e, l = j(() => {
|
|
1741
|
+
var f, m;
|
|
1742
|
+
return (m = (f = t.option) == null ? void 0 : f.name) != null ? m : t.text;
|
|
1743
|
+
}), c = j(() => {
|
|
1744
|
+
var f, m;
|
|
1745
|
+
return (m = (f = t.option) == null ? void 0 : f.parentName) != null ? m : "";
|
|
1746
|
+
}), d = M(!1);
|
|
1747
1747
|
function r() {
|
|
1748
|
-
var
|
|
1749
|
-
t.isCreateNewOption === !0 ? n("create-object") : n("select-object", (
|
|
1748
|
+
var f;
|
|
1749
|
+
t.isCreateNewOption === !0 ? n("create-object") : n("select-object", (f = t.option) == null ? void 0 : f.id);
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1752
|
-
|
|
1751
|
+
function g(f) {
|
|
1752
|
+
f === !0 ? (d.value = !0, n("option-highlighted", t.index)) : t.index !== t.selectedIndex && (d.value = !1);
|
|
1753
1753
|
}
|
|
1754
1754
|
function a() {
|
|
1755
|
-
t.selectedIndex === t.index ?
|
|
1755
|
+
t.selectedIndex === t.index ? d.value = !0 : d.value = !1;
|
|
1756
1756
|
}
|
|
1757
|
-
return
|
|
1758
|
-
var
|
|
1759
|
-
const
|
|
1760
|
-
return i(),
|
|
1757
|
+
return ne(() => t.selectedIndex, () => a()), (f, m) => {
|
|
1758
|
+
var p, O;
|
|
1759
|
+
const v = te("icon");
|
|
1760
|
+
return i(), u("div", {
|
|
1761
1761
|
class: U(["cl-cursor-pointer cl-duration-75 cl-flex cl-p-1 cl-transition-colors", {
|
|
1762
|
-
"cl-bg-white":
|
|
1763
|
-
"cl-bg-link-light cl-text-white cl-opacity-90":
|
|
1764
|
-
"cl-bg-primary-default cl-text-white cl-opacity-90":
|
|
1762
|
+
"cl-bg-white": d.value === !1,
|
|
1763
|
+
"cl-bg-link-light cl-text-white cl-opacity-90": d.value && e.isCreateNewOption === !1,
|
|
1764
|
+
"cl-bg-primary-default cl-text-white cl-opacity-90": d.value && e.isCreateNewOption
|
|
1765
1765
|
}]),
|
|
1766
1766
|
onMousedown: r,
|
|
1767
|
-
onMousemove:
|
|
1768
|
-
onMouseleave:
|
|
1767
|
+
onMousemove: m[0] || (m[0] = (b) => g(!0)),
|
|
1768
|
+
onMouseleave: m[1] || (m[1] = (b) => g(!1))
|
|
1769
1769
|
}, [
|
|
1770
|
-
e.option !== null && ((
|
|
1770
|
+
e.option !== null && ((p = e.option) == null ? void 0 : p.parentId) !== 0 && ((O = e.option) == null ? void 0 : O.parentId) !== void 0 ? (i(), u("div", jt, x(o(c)), 1)) : N("", !0),
|
|
1771
1771
|
s("div", {
|
|
1772
1772
|
class: U({
|
|
1773
1773
|
"cl-w-1/2": o(c) !== "",
|
|
1774
1774
|
"cl-w-full": o(c) === ""
|
|
1775
1775
|
})
|
|
1776
|
-
},
|
|
1777
|
-
|
|
1778
|
-
|
|
1776
|
+
}, x(o(l)), 3),
|
|
1777
|
+
B(s("div", Mt, [
|
|
1778
|
+
k(v, {
|
|
1779
1779
|
class: U(["cl-transition-colors", {
|
|
1780
|
-
"cl-text-white":
|
|
1781
|
-
"cl-text-black ": !
|
|
1780
|
+
"cl-text-white": d.value,
|
|
1781
|
+
"cl-text-black ": !d.value
|
|
1782
1782
|
}]),
|
|
1783
1783
|
icon: "ph:plus"
|
|
1784
1784
|
}, null, 8, ["class"])
|
|
@@ -1788,7 +1788,7 @@ const ge = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-5ed70f91"]]), Tt = { cl
|
|
|
1788
1788
|
], 34);
|
|
1789
1789
|
};
|
|
1790
1790
|
}
|
|
1791
|
-
}),
|
|
1791
|
+
}), Nt = ["onKeyup"], It = { class: "cl-flex" }, Dt = { key: 5 }, Rt = /* @__PURE__ */ V({
|
|
1792
1792
|
__name: "cl-ui-combo-box-search",
|
|
1793
1793
|
props: {
|
|
1794
1794
|
loading: { type: Boolean, default: !1 },
|
|
@@ -1809,131 +1809,131 @@ const ge = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-5ed70f91"]]), Tt = { cl
|
|
|
1809
1809
|
"hide-dropdown": null
|
|
1810
1810
|
},
|
|
1811
1811
|
setup(e, { emit: n }) {
|
|
1812
|
-
const t = e, { t: l } =
|
|
1813
|
-
function
|
|
1814
|
-
(
|
|
1812
|
+
const t = e, { t: l } = de(), c = M(""), d = M(!1), r = M(-1), g = j(() => d.value ? -1 : 0), a = M();
|
|
1813
|
+
function f(T) {
|
|
1814
|
+
(T === void 0 || (T == null ? void 0 : T.code.startsWith("Arrow")) === !1 && (T == null ? void 0 : T.code.startsWith("Control")) === !1 && (T == null ? void 0 : T.code.startsWith("Shift")) === !1 && (T == null ? void 0 : T.code.startsWith("Tab")) === !1 && (T == null ? void 0 : T.code) !== "Enter") && (n("search", c.value), r.value = -2);
|
|
1815
1815
|
}
|
|
1816
|
-
function
|
|
1817
|
-
n("select-object",
|
|
1816
|
+
function m(T) {
|
|
1817
|
+
n("select-object", T);
|
|
1818
1818
|
}
|
|
1819
|
-
function
|
|
1820
|
-
n("create-object", c.value),
|
|
1819
|
+
function v() {
|
|
1820
|
+
n("create-object", c.value), p();
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1822
|
+
function p() {
|
|
1823
1823
|
n("hide-dropdown");
|
|
1824
1824
|
}
|
|
1825
|
-
function O(
|
|
1826
|
-
r.value < t.results.length - 1 ? (r.value === -2 && c.value === "" && r.value++, r.value++) : r.value =
|
|
1825
|
+
function O(T) {
|
|
1826
|
+
r.value < t.results.length - 1 ? (r.value === -2 && c.value === "" && r.value++, r.value++) : r.value = T, h();
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1829
|
-
r.value >
|
|
1828
|
+
function b(T) {
|
|
1829
|
+
r.value > T ? r.value-- : r.value = t.results.length - 1, h();
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1832
|
-
r.value >= 0 && t.results !== void 0 ?
|
|
1831
|
+
function L() {
|
|
1832
|
+
r.value >= 0 && t.results !== void 0 ? m(t.results[r.value].id) : r.value === -1 && v();
|
|
1833
1833
|
}
|
|
1834
|
-
function
|
|
1835
|
-
if (
|
|
1836
|
-
const
|
|
1837
|
-
let
|
|
1838
|
-
for (let
|
|
1839
|
-
|
|
1840
|
-
|
|
1834
|
+
function W(T) {
|
|
1835
|
+
if (T.key === "Tab" && T.shiftKey === !0) {
|
|
1836
|
+
const R = document.getElementsByTagName("input");
|
|
1837
|
+
let H = -1;
|
|
1838
|
+
for (let $ = 0; $ < R.length; $++)
|
|
1839
|
+
R[$] === T.target && (H = $ - 1);
|
|
1840
|
+
H >= 0 && (R[H].focus(), p());
|
|
1841
1841
|
}
|
|
1842
1842
|
}
|
|
1843
|
-
function
|
|
1844
|
-
var
|
|
1845
|
-
t.results && t.results.length > 1 && ((
|
|
1843
|
+
function h() {
|
|
1844
|
+
var T;
|
|
1845
|
+
t.results && t.results.length > 1 && ((T = a.value) == null || T.scrollTo(0, (r.value + 1) * 34 - 34 * 2));
|
|
1846
1846
|
}
|
|
1847
|
-
function
|
|
1848
|
-
let
|
|
1849
|
-
t.results !== null && t.results.length === 1 && (
|
|
1847
|
+
function C() {
|
|
1848
|
+
let T = !1;
|
|
1849
|
+
t.results !== null && t.results.length === 1 && (T = c.value.toUpperCase().trim() === t.results[0].name.toUpperCase().trim()), d.value = t.canCreateNewObject === !0 && t.errorMessage === "" && c.value.trim() !== "" && T === !1;
|
|
1850
1850
|
}
|
|
1851
|
-
function
|
|
1852
|
-
r.value =
|
|
1851
|
+
function P(T) {
|
|
1852
|
+
r.value = T;
|
|
1853
1853
|
}
|
|
1854
|
-
function
|
|
1855
|
-
t.isVisible === !0 && (c.value = "",
|
|
1856
|
-
var
|
|
1857
|
-
return (
|
|
1854
|
+
function _() {
|
|
1855
|
+
t.isVisible === !0 && (c.value = "", f(), Ce(() => {
|
|
1856
|
+
var T, R;
|
|
1857
|
+
return (R = (T = a.value) == null ? void 0 : T.querySelector("input")) == null ? void 0 : R.focus();
|
|
1858
1858
|
}));
|
|
1859
1859
|
}
|
|
1860
|
-
return
|
|
1861
|
-
var
|
|
1862
|
-
return (
|
|
1863
|
-
}),
|
|
1864
|
-
var
|
|
1865
|
-
return (
|
|
1866
|
-
}), (
|
|
1867
|
-
var
|
|
1868
|
-
const
|
|
1869
|
-
return i(),
|
|
1860
|
+
return ne(() => t.results, () => C()), ne(() => t.errorMessage, () => C()), ne(() => t.isVisible, () => _()), Me(() => {
|
|
1861
|
+
var T;
|
|
1862
|
+
return (T = a.value) == null ? void 0 : T.addEventListener("keydown", W);
|
|
1863
|
+
}), Re(() => {
|
|
1864
|
+
var T;
|
|
1865
|
+
return (T = a.value) == null ? void 0 : T.removeEventListener("keydown", W);
|
|
1866
|
+
}), (T, R) => {
|
|
1867
|
+
var $;
|
|
1868
|
+
const H = te("cl-ui-loading-spinner");
|
|
1869
|
+
return i(), u("div", {
|
|
1870
1870
|
ref_key: "container",
|
|
1871
1871
|
ref: a,
|
|
1872
1872
|
class: "cl-bg-white cl-border cl-border-collapse cl-border-grey-0 cl-h-52 cl-overflow-y-auto cl-p-2 cl-rounded cl-text-sm",
|
|
1873
1873
|
onKeydown: [
|
|
1874
|
-
|
|
1875
|
-
|
|
1874
|
+
R[2] || (R[2] = je(ie((E) => b(o(g)), ["prevent", "stop"]), ["up"])),
|
|
1875
|
+
R[3] || (R[3] = je(ie((E) => O(o(g)), ["prevent", "stop"]), ["down"]))
|
|
1876
1876
|
],
|
|
1877
|
-
onKeyup:
|
|
1877
|
+
onKeyup: je(ie(L, ["prevent", "stop"]), ["enter"])
|
|
1878
1878
|
}, [
|
|
1879
|
-
s("div",
|
|
1880
|
-
|
|
1879
|
+
s("div", It, [
|
|
1880
|
+
k(he, {
|
|
1881
1881
|
modelValue: c.value,
|
|
1882
|
-
"onUpdate:modelValue":
|
|
1882
|
+
"onUpdate:modelValue": R[0] || (R[0] = (E) => c.value = E),
|
|
1883
1883
|
class: "!cl-mr-0 cl-mb-1 cl-w-full",
|
|
1884
1884
|
"input-type": "text",
|
|
1885
1885
|
"placeholder-text": o(l)("comboBox.searchHint", { object: e.objectType }),
|
|
1886
|
-
onKeyup:
|
|
1887
|
-
onBlur:
|
|
1886
|
+
onKeyup: f,
|
|
1887
|
+
onBlur: p
|
|
1888
1888
|
}, null, 8, ["modelValue", "placeholder-text"]),
|
|
1889
|
-
|
|
1889
|
+
B(k(H, { class: "cl-absolute cl-ml-2 cl-mt-11" }, null, 512), [
|
|
1890
1890
|
[F, e.loading]
|
|
1891
1891
|
])
|
|
1892
1892
|
]),
|
|
1893
|
-
e.currentObjectName !== "" ? (i(),
|
|
1893
|
+
e.currentObjectName !== "" ? (i(), Q(Ie, {
|
|
1894
1894
|
key: 0,
|
|
1895
1895
|
"show-clear-button": e.canClearSelectedObject,
|
|
1896
1896
|
text: e.currentObjectName,
|
|
1897
|
-
onClearObject:
|
|
1897
|
+
onClearObject: R[1] || (R[1] = (E) => T.$emit("clear-object"))
|
|
1898
1898
|
}, null, 8, ["show-clear-button", "text"])) : N("", !0),
|
|
1899
|
-
e.objectParentType !== "" && e.results !== void 0 && e.results.length > 0 && e.errorMessage === "" ? (i(),
|
|
1899
|
+
e.objectParentType !== "" && e.results !== void 0 && e.results.length > 0 && e.errorMessage === "" ? (i(), Q(Ie, {
|
|
1900
1900
|
key: 1,
|
|
1901
1901
|
text: e.objectType,
|
|
1902
1902
|
"additional-text": e.objectParentType,
|
|
1903
1903
|
class: "cl-bg-grey-2 cl-mt-1"
|
|
1904
1904
|
}, null, 8, ["text", "additional-text"])) : N("", !0),
|
|
1905
|
-
e.results !== null && ((
|
|
1905
|
+
e.results !== null && (($ = e.results) == null ? void 0 : $.length) === 0 && c.value.trim() !== "" && e.canCreateNewObject === !1 && e.errorMessage === "" ? (i(), Q(Ie, {
|
|
1906
1906
|
key: 2,
|
|
1907
1907
|
text: o(l)("comboBox.noResults", { value: c.value })
|
|
1908
1908
|
}, null, 8, ["text"])) : N("", !0),
|
|
1909
|
-
e.errorMessage !== "" ? (i(),
|
|
1909
|
+
e.errorMessage !== "" ? (i(), Q(Ie, {
|
|
1910
1910
|
key: 3,
|
|
1911
1911
|
class: "!cl-bg-danger-light cl-border-danger-light cl-rounded cl-text-danger-dark",
|
|
1912
1912
|
text: o(l)("comboBox.errorMessage", { error: e.errorMessage })
|
|
1913
1913
|
}, null, 8, ["text"])) : N("", !0),
|
|
1914
|
-
|
|
1914
|
+
d.value ? (i(), Q(_e, {
|
|
1915
1915
|
key: 4,
|
|
1916
1916
|
"is-create-new-option": !0,
|
|
1917
1917
|
text: o(l)("comboBox.addPrompt", { value: c.value, object: e.objectType }),
|
|
1918
1918
|
index: -1,
|
|
1919
1919
|
"selected-index": r.value,
|
|
1920
|
-
onCreateObject:
|
|
1921
|
-
onOptionHighlighted:
|
|
1920
|
+
onCreateObject: v,
|
|
1921
|
+
onOptionHighlighted: P
|
|
1922
1922
|
}, null, 8, ["text", "selected-index"])) : N("", !0),
|
|
1923
|
-
e.errorMessage === "" && e.results !== null ? (i(),
|
|
1924
|
-
(i(!0),
|
|
1925
|
-
key:
|
|
1926
|
-
option:
|
|
1927
|
-
index:
|
|
1923
|
+
e.errorMessage === "" && e.results !== null ? (i(), u("div", Dt, [
|
|
1924
|
+
(i(!0), u(z, null, ae(e.results, (E, G) => (i(), Q(_e, {
|
|
1925
|
+
key: G,
|
|
1926
|
+
option: E,
|
|
1927
|
+
index: G,
|
|
1928
1928
|
"selected-index": r.value,
|
|
1929
|
-
onSelectObject:
|
|
1930
|
-
onOptionHighlighted:
|
|
1929
|
+
onSelectObject: m,
|
|
1930
|
+
onOptionHighlighted: P
|
|
1931
1931
|
}, null, 8, ["option", "index", "selected-index"]))), 128))
|
|
1932
1932
|
])) : N("", !0)
|
|
1933
|
-
], 40,
|
|
1933
|
+
], 40, Nt);
|
|
1934
1934
|
};
|
|
1935
1935
|
}
|
|
1936
|
-
}),
|
|
1936
|
+
}), qt = { class: "cl-flex" }, Ut = { class: "cl-relative cl-right-20 cl-top-0.5" }, zt = { class: "cl-absolute cl-flex cl-float-right cl-font-semibold cl-mt-2 cl-text-danger-default cl-text-sm" }, Bt = { class: "cl-ml-4 cl-w-11/12" }, Lt = { class: "cl-p-2 cl-text-right cl-w-full" }, Pt = /* @__PURE__ */ V({
|
|
1937
1937
|
__name: "cl-ui-combo-box",
|
|
1938
1938
|
props: {
|
|
1939
1939
|
loading: { type: Boolean, default: !1 },
|
|
@@ -1959,115 +1959,115 @@ const ge = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-5ed70f91"]]), Tt = { cl
|
|
|
1959
1959
|
"update:current-object": null
|
|
1960
1960
|
},
|
|
1961
1961
|
setup(e, { expose: n, emit: t }) {
|
|
1962
|
-
const l = e, { t: c } =
|
|
1962
|
+
const l = e, { t: c } = de(), d = M(!1), r = j({
|
|
1963
1963
|
get: () => l.currentObject,
|
|
1964
|
-
set: (
|
|
1965
|
-
}),
|
|
1966
|
-
function
|
|
1967
|
-
l.disabled || (typeof
|
|
1964
|
+
set: (A) => t("update:current-object", A)
|
|
1965
|
+
}), g = M(null), a = M(null), f = j(() => E()), m = M(""), v = M(""), p = M(), O = M(!0);
|
|
1966
|
+
function b(A) {
|
|
1967
|
+
l.disabled || (typeof A < "u" ? d.value = A : d.value = !d.value);
|
|
1968
1968
|
}
|
|
1969
|
-
function
|
|
1970
|
-
|
|
1969
|
+
function L(A) {
|
|
1970
|
+
m.value = A, t("search", A);
|
|
1971
1971
|
}
|
|
1972
|
-
function
|
|
1973
|
-
|
|
1972
|
+
function W(A) {
|
|
1973
|
+
v.value = A, t("search-parent", A);
|
|
1974
1974
|
}
|
|
1975
|
-
function
|
|
1976
|
-
r.value = null,
|
|
1975
|
+
function h() {
|
|
1976
|
+
r.value = null, b(!1);
|
|
1977
1977
|
}
|
|
1978
|
-
function
|
|
1979
|
-
const
|
|
1980
|
-
r.value =
|
|
1978
|
+
function C(A) {
|
|
1979
|
+
const I = P(A);
|
|
1980
|
+
r.value = I, b(!1);
|
|
1981
1981
|
}
|
|
1982
|
-
function
|
|
1983
|
-
let
|
|
1982
|
+
function P(A) {
|
|
1983
|
+
let I = null;
|
|
1984
1984
|
if (l.results !== null) {
|
|
1985
|
-
for (let
|
|
1986
|
-
if (l.results[
|
|
1987
|
-
|
|
1985
|
+
for (let w = 0; w < l.results.length; w++)
|
|
1986
|
+
if (l.results[w].id === A) {
|
|
1987
|
+
I = l.results[w];
|
|
1988
1988
|
break;
|
|
1989
1989
|
}
|
|
1990
1990
|
}
|
|
1991
|
-
return
|
|
1991
|
+
return I;
|
|
1992
1992
|
}
|
|
1993
|
-
function
|
|
1994
|
-
var
|
|
1995
|
-
|
|
1996
|
-
name:
|
|
1997
|
-
parentId: (
|
|
1998
|
-
}, t("create-object",
|
|
1993
|
+
function _() {
|
|
1994
|
+
var A, I;
|
|
1995
|
+
p.value = {
|
|
1996
|
+
name: m.value,
|
|
1997
|
+
parentId: (I = (A = a.value) == null ? void 0 : A.id) != null ? I : 0
|
|
1998
|
+
}, t("create-object", p.value);
|
|
1999
1999
|
}
|
|
2000
|
-
function
|
|
2001
|
-
|
|
2002
|
-
name:
|
|
2000
|
+
function T() {
|
|
2001
|
+
p.value = {
|
|
2002
|
+
name: v.value,
|
|
2003
2003
|
parentId: 0
|
|
2004
|
-
}, t("create-parent-object",
|
|
2004
|
+
}, t("create-parent-object", p.value);
|
|
2005
2005
|
}
|
|
2006
|
-
function
|
|
2007
|
-
var
|
|
2008
|
-
(
|
|
2009
|
-
message: c("comboBox.createFailed", { name:
|
|
2006
|
+
function R() {
|
|
2007
|
+
var A, I;
|
|
2008
|
+
(A = l.objectCreatedResponse) != null && A.error ? Je({
|
|
2009
|
+
message: c("comboBox.createFailed", { name: m.value, error: l.objectCreatedResponse.error }),
|
|
2010
2010
|
colour: "danger",
|
|
2011
2011
|
duration: 1e4
|
|
2012
|
-
}) : (
|
|
2012
|
+
}) : (I = l.objectCreatedResponse) != null && I.id && $();
|
|
2013
2013
|
}
|
|
2014
|
-
function
|
|
2015
|
-
var
|
|
2016
|
-
(
|
|
2014
|
+
function H() {
|
|
2015
|
+
var A, I;
|
|
2016
|
+
(A = l.parentObjectCreatedResponse) != null && A.id && (a.value = {
|
|
2017
2017
|
id: l.parentObjectCreatedResponse.id,
|
|
2018
|
-
name: (
|
|
2018
|
+
name: (I = l.parentObjectCreatedResponse.name) != null ? I : ""
|
|
2019
2019
|
});
|
|
2020
2020
|
}
|
|
2021
|
-
function
|
|
2022
|
-
var
|
|
2021
|
+
function $() {
|
|
2022
|
+
var I, w, Z, y, J, ee, se, Se, S;
|
|
2023
2023
|
Je({
|
|
2024
|
-
message: c("comboBox.createSuccessful", { object: l.objectType, name: (
|
|
2024
|
+
message: c("comboBox.createSuccessful", { object: l.objectType, name: (w = (I = l.objectCreatedResponse) == null ? void 0 : I.name) != null ? w : "" }),
|
|
2025
2025
|
colour: "primary",
|
|
2026
2026
|
duration: 1e4
|
|
2027
2027
|
});
|
|
2028
|
-
let
|
|
2029
|
-
a.value && a.value.id === ((
|
|
2030
|
-
id: (
|
|
2031
|
-
name: (
|
|
2032
|
-
parentId: (S = (
|
|
2033
|
-
parentName:
|
|
2028
|
+
let A = "";
|
|
2029
|
+
a.value && a.value.id === ((Z = l.objectCreatedResponse) == null ? void 0 : Z.parentId) && (A = a.value.name), r.value = {
|
|
2030
|
+
id: (J = (y = l.objectCreatedResponse) == null ? void 0 : y.id) != null ? J : 0,
|
|
2031
|
+
name: (se = (ee = l.objectCreatedResponse) == null ? void 0 : ee.name) != null ? se : "",
|
|
2032
|
+
parentId: (S = (Se = l.objectCreatedResponse) == null ? void 0 : Se.parentId) != null ? S : 0,
|
|
2033
|
+
parentName: A
|
|
2034
2034
|
};
|
|
2035
2035
|
}
|
|
2036
|
-
function
|
|
2037
|
-
let
|
|
2038
|
-
return r.value && (r.value.parentName ?
|
|
2036
|
+
function E() {
|
|
2037
|
+
let A = "";
|
|
2038
|
+
return r.value && (r.value.parentName ? A = r.value.parentName + "; " + r.value.name : A = r.value.name), A;
|
|
2039
2039
|
}
|
|
2040
|
-
function
|
|
2041
|
-
let
|
|
2042
|
-
|
|
2040
|
+
function G() {
|
|
2041
|
+
let A = !0;
|
|
2042
|
+
m.value === "" && (A = !1), l.objectParentType !== "" && a.value === null && (A = !1), O.value = A;
|
|
2043
2043
|
}
|
|
2044
|
-
return
|
|
2044
|
+
return ne(() => l.objectCreatedResponse, () => R()), ne(() => l.parentObjectCreatedResponse, () => H()), ne(() => m.value, () => G()), ne(() => a.value, () => G()), n({
|
|
2045
2045
|
focus() {
|
|
2046
|
-
var
|
|
2047
|
-
(
|
|
2046
|
+
var A;
|
|
2047
|
+
(A = g.value) == null || A.focus();
|
|
2048
2048
|
}
|
|
2049
|
-
}), (
|
|
2050
|
-
const
|
|
2051
|
-
return i(),
|
|
2052
|
-
s("div",
|
|
2053
|
-
|
|
2049
|
+
}), (A, I) => {
|
|
2050
|
+
const w = te("icon"), Z = te("cl-ui-combo-box", !0);
|
|
2051
|
+
return i(), u("div", null, [
|
|
2052
|
+
s("div", qt, [
|
|
2053
|
+
k(he, {
|
|
2054
2054
|
ref_key: "inputRef",
|
|
2055
|
-
ref:
|
|
2056
|
-
modelValue: o(
|
|
2057
|
-
"onUpdate:modelValue":
|
|
2055
|
+
ref: g,
|
|
2056
|
+
modelValue: o(f),
|
|
2057
|
+
"onUpdate:modelValue": I[0] || (I[0] = (y) => ke(f) ? f.value = y : null),
|
|
2058
2058
|
class: U(["!cl-bg-transparent !cl-mr-0 cl-mb-0 cl-rounded-r-none cl-w-full cl-z-10", {
|
|
2059
2059
|
"cl-cursor-pointer": e.disabled === !1
|
|
2060
2060
|
}]),
|
|
2061
2061
|
"input-type": "text",
|
|
2062
2062
|
"placeholder-text": o(c)("comboBox.emptyHintText", { object: e.objectType }),
|
|
2063
|
-
onFocus:
|
|
2064
|
-
|
|
2063
|
+
onFocus: I[1] || (I[1] = (y) => {
|
|
2064
|
+
b(!0), A.$emit("focus");
|
|
2065
2065
|
})
|
|
2066
2066
|
}, null, 8, ["modelValue", "class", "placeholder-text"]),
|
|
2067
|
-
|
|
2067
|
+
B(s("div", Ut, [
|
|
2068
2068
|
s("div", zt, [
|
|
2069
|
-
|
|
2070
|
-
|
|
2069
|
+
le(x(o(c)("comboBox.required")) + " ", 1),
|
|
2070
|
+
k(w, {
|
|
2071
2071
|
class: "cl-ml-1 cl-mt-1",
|
|
2072
2072
|
icon: "ph:warning"
|
|
2073
2073
|
})
|
|
@@ -2075,38 +2075,38 @@ const ge = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-5ed70f91"]]), Tt = { cl
|
|
|
2075
2075
|
], 512), [
|
|
2076
2076
|
[F, e.required && e.disabled === !1 && e.currentObject === null]
|
|
2077
2077
|
]),
|
|
2078
|
-
|
|
2078
|
+
d.value ? (i(), u("div", {
|
|
2079
2079
|
key: 1,
|
|
2080
2080
|
class: U(["cl-border cl-border-grey-1 cl-float-right cl-h-10 cl-rounded cl-rounded-l-none cl-text-grey-3 cl-transition-colors cl-w-[27px] hover:cl-bg-link-light hover:cl-opacity-90 hover:cl-text-white", {
|
|
2081
2081
|
"cl-cursor-default": e.disabled,
|
|
2082
2082
|
"cl-cursor-pointer": e.disabled === !1
|
|
2083
2083
|
}]),
|
|
2084
|
-
onClick:
|
|
2084
|
+
onClick: I[3] || (I[3] = (y) => b(!1))
|
|
2085
2085
|
}, [
|
|
2086
|
-
|
|
2086
|
+
k(w, {
|
|
2087
2087
|
icon: "ph:caret-up-bold",
|
|
2088
2088
|
class: "cl-ml-[5px] cl-mt-[12px]"
|
|
2089
2089
|
})
|
|
2090
|
-
], 2)) : (i(),
|
|
2090
|
+
], 2)) : (i(), u("div", {
|
|
2091
2091
|
key: 0,
|
|
2092
2092
|
class: U(["cl-border cl-border-grey-1 cl-float-right cl-h-10 cl-rounded cl-rounded-l-none cl-text-grey-3 cl-transition-colors cl-w-[27px] hover:cl-bg-link-light hover:cl-opacity-90 hover:cl-text-white", {
|
|
2093
2093
|
"cl-cursor-default": e.disabled,
|
|
2094
2094
|
"cl-cursor-pointer": e.disabled === !1
|
|
2095
2095
|
}]),
|
|
2096
|
-
onClick:
|
|
2096
|
+
onClick: I[2] || (I[2] = (y) => b(!0))
|
|
2097
2097
|
}, [
|
|
2098
|
-
|
|
2098
|
+
k(w, {
|
|
2099
2099
|
icon: "ph:caret-down-bold",
|
|
2100
2100
|
class: "cl-ml-[5px] cl-mt-[12px]"
|
|
2101
2101
|
})
|
|
2102
2102
|
], 2))
|
|
2103
2103
|
]),
|
|
2104
|
-
|
|
2105
|
-
title:
|
|
2106
|
-
|
|
2104
|
+
k(il, { size: "x-small" }, {
|
|
2105
|
+
title: X(() => [
|
|
2106
|
+
le(x(o(c)("comboBox.createTitle", { object: e.objectType })), 1)
|
|
2107
2107
|
]),
|
|
2108
|
-
trigger:
|
|
2109
|
-
|
|
2108
|
+
trigger: X(({ open: y }) => [
|
|
2109
|
+
B(k(Rt, {
|
|
2110
2110
|
"can-create-new-object": e.canCreateNewObject,
|
|
2111
2111
|
"can-clear-selected-object": e.canClearSelectedObject,
|
|
2112
2112
|
loading: e.loading,
|
|
@@ -2114,51 +2114,51 @@ const ge = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-5ed70f91"]]), Tt = { cl
|
|
|
2114
2114
|
"object-type": e.objectType,
|
|
2115
2115
|
"object-parent-type": e.objectParentType,
|
|
2116
2116
|
"error-message": e.errorMessage,
|
|
2117
|
-
"current-object-name": o(
|
|
2118
|
-
"is-visible":
|
|
2119
|
-
onCreateObject:
|
|
2120
|
-
onSelectObject:
|
|
2121
|
-
onClearObject:
|
|
2122
|
-
onSearch:
|
|
2123
|
-
onHideDropdown:
|
|
2117
|
+
"current-object-name": o(f),
|
|
2118
|
+
"is-visible": d.value,
|
|
2119
|
+
onCreateObject: y,
|
|
2120
|
+
onSelectObject: C,
|
|
2121
|
+
onClearObject: h,
|
|
2122
|
+
onSearch: L,
|
|
2123
|
+
onHideDropdown: I[4] || (I[4] = (J) => b(!1))
|
|
2124
2124
|
}, null, 8, ["can-create-new-object", "can-clear-selected-object", "loading", "results", "object-type", "object-parent-type", "error-message", "current-object-name", "is-visible", "onCreateObject"]), [
|
|
2125
|
-
[F,
|
|
2125
|
+
[F, d.value]
|
|
2126
2126
|
])
|
|
2127
2127
|
]),
|
|
2128
|
-
footer:
|
|
2128
|
+
footer: X(({ close: y }) => [
|
|
2129
2129
|
s("div", Lt, [
|
|
2130
|
-
|
|
2130
|
+
k($e, {
|
|
2131
2131
|
class: "cl-mr-3",
|
|
2132
2132
|
colour: "default",
|
|
2133
2133
|
size: "small",
|
|
2134
|
-
onClick:
|
|
2134
|
+
onClick: y
|
|
2135
2135
|
}, {
|
|
2136
|
-
default:
|
|
2137
|
-
|
|
2136
|
+
default: X(() => [
|
|
2137
|
+
le(x(o(c)("comboBox.cancel")), 1)
|
|
2138
2138
|
]),
|
|
2139
2139
|
_: 2
|
|
2140
2140
|
}, 1032, ["onClick"]),
|
|
2141
|
-
|
|
2141
|
+
k($e, {
|
|
2142
2142
|
colour: "primary",
|
|
2143
2143
|
size: "small",
|
|
2144
2144
|
disabled: !O.value,
|
|
2145
|
-
onClick: (
|
|
2146
|
-
|
|
2145
|
+
onClick: (J) => {
|
|
2146
|
+
_(), y();
|
|
2147
2147
|
}
|
|
2148
2148
|
}, {
|
|
2149
|
-
default:
|
|
2150
|
-
|
|
2149
|
+
default: X(() => [
|
|
2150
|
+
le(x(o(c)("comboBox.create")), 1)
|
|
2151
2151
|
]),
|
|
2152
2152
|
_: 2
|
|
2153
2153
|
}, 1032, ["disabled", "onClick"])
|
|
2154
2154
|
])
|
|
2155
2155
|
]),
|
|
2156
|
-
default:
|
|
2156
|
+
default: X(() => [
|
|
2157
2157
|
s("div", Bt, [
|
|
2158
|
-
e.objectParentType ? (i(),
|
|
2158
|
+
e.objectParentType ? (i(), Q(Z, {
|
|
2159
2159
|
key: 0,
|
|
2160
2160
|
"current-object": a.value,
|
|
2161
|
-
"onUpdate:current-object":
|
|
2161
|
+
"onUpdate:current-object": I[5] || (I[5] = (y) => a.value = y),
|
|
2162
2162
|
class: "cl-mt-3",
|
|
2163
2163
|
results: e.parentResults,
|
|
2164
2164
|
loading: e.loading,
|
|
@@ -2167,12 +2167,12 @@ const ge = /* @__PURE__ */ pe($t, [["__scopeId", "data-v-5ed70f91"]]), Tt = { cl
|
|
|
2167
2167
|
"can-create-new-object": e.canCreateNewObject,
|
|
2168
2168
|
"can-clear-selected-object": e.canClearSelectedObject,
|
|
2169
2169
|
"error-message": e.errorMessage,
|
|
2170
|
-
onSearch:
|
|
2171
|
-
onCreateObject:
|
|
2170
|
+
onSearch: W,
|
|
2171
|
+
onCreateObject: T
|
|
2172
2172
|
}, null, 8, ["current-object", "results", "loading", "object-type", "object-created-response", "can-create-new-object", "can-clear-selected-object", "error-message"])) : N("", !0),
|
|
2173
|
-
|
|
2174
|
-
modelValue:
|
|
2175
|
-
"onUpdate:modelValue":
|
|
2173
|
+
k(he, {
|
|
2174
|
+
modelValue: m.value,
|
|
2175
|
+
"onUpdate:modelValue": I[6] || (I[6] = (y) => m.value = y),
|
|
2176
2176
|
label: o(c)("comboBox.createProperty"),
|
|
2177
2177
|
class: "cl-mb-2 cl-pt-3 cl-w-full",
|
|
2178
2178
|
"input-type": "text"
|
|
@@ -2199,11 +2199,11 @@ const Ht = {}, Gt = { class: "cl-flex cl-flex-wrap cl-left-0 cl-mt-4 cl-w-full"
|
|
|
2199
2199
|
class: "cl-leading-10 cl-text-sm cl-w-full"
|
|
2200
2200
|
}, Kt = { class: "cl-float-left" }, Zt = { class: "cl-float-right" };
|
|
2201
2201
|
function Qt(e, n) {
|
|
2202
|
-
return i(),
|
|
2203
|
-
e.$slots.default ? (i(),
|
|
2202
|
+
return i(), u("div", Gt, [
|
|
2203
|
+
e.$slots.default ? (i(), u("div", Wt, [
|
|
2204
2204
|
D(e.$slots, "default")
|
|
2205
2205
|
])) : N("", !0),
|
|
2206
|
-
e.$slots.left || e.$slots.right ? (i(),
|
|
2206
|
+
e.$slots.left || e.$slots.right ? (i(), u("div", Jt, [
|
|
2207
2207
|
s("span", Kt, [
|
|
2208
2208
|
D(e.$slots, "left")
|
|
2209
2209
|
]),
|
|
@@ -2213,7 +2213,7 @@ function Qt(e, n) {
|
|
|
2213
2213
|
])) : N("", !0)
|
|
2214
2214
|
]);
|
|
2215
2215
|
}
|
|
2216
|
-
const Yt = /* @__PURE__ */
|
|
2216
|
+
const Yt = /* @__PURE__ */ ve(Ht, [["render", Qt]]), Xt = { class: "cl-mr-2 lg:cl-hidden" }, _t = { class: "cl-mr-2 lg:cl-hidden" }, en = {
|
|
2217
2217
|
key: 0,
|
|
2218
2218
|
class: "cl-inline-block cl-whitespace-nowrap"
|
|
2219
2219
|
}, ln = {
|
|
@@ -2221,7 +2221,7 @@ const Yt = /* @__PURE__ */ pe(Ht, [["render", Qt]]), Xt = { class: "cl-mr-2 lg:c
|
|
|
2221
2221
|
class: "cl-inline-block cl-whitespace-nowrap"
|
|
2222
2222
|
}, tn = {
|
|
2223
2223
|
inheritAttrs: !1
|
|
2224
|
-
}, nn = /* @__PURE__ */
|
|
2224
|
+
}, nn = /* @__PURE__ */ V({
|
|
2225
2225
|
...tn,
|
|
2226
2226
|
__name: "cl-ui-grid-cell",
|
|
2227
2227
|
props: {
|
|
@@ -2235,65 +2235,65 @@ const Yt = /* @__PURE__ */ pe(Ht, [["render", Qt]]), Xt = { class: "cl-mr-2 lg:c
|
|
|
2235
2235
|
"undo-edit": null
|
|
2236
2236
|
},
|
|
2237
2237
|
setup(e, { emit: n }) {
|
|
2238
|
-
const t = e, { d: l, n: c } =
|
|
2239
|
-
var
|
|
2240
|
-
return
|
|
2238
|
+
const t = e, { d: l, n: c } = de(), d = M(ge(t.record)), r = j(() => {
|
|
2239
|
+
var v, p;
|
|
2240
|
+
return d.value[(v = t.column.field) != null ? v : ""] !== t.record[(p = t.column.field) != null ? p : ""];
|
|
2241
2241
|
});
|
|
2242
|
-
function
|
|
2243
|
-
return p
|
|
2242
|
+
function g(v, p) {
|
|
2243
|
+
return v[p];
|
|
2244
2244
|
}
|
|
2245
|
-
function a(
|
|
2246
|
-
return p
|
|
2245
|
+
function a(v, p) {
|
|
2246
|
+
return v[p];
|
|
2247
2247
|
}
|
|
2248
|
-
function
|
|
2249
|
-
return p
|
|
2248
|
+
function f(v, p) {
|
|
2249
|
+
return v[p];
|
|
2250
2250
|
}
|
|
2251
|
-
function
|
|
2251
|
+
function m() {
|
|
2252
2252
|
n("focus");
|
|
2253
2253
|
}
|
|
2254
|
-
return fl(() =>
|
|
2254
|
+
return fl(() => d.value = ge(t.record)), ne(d, (v) => {
|
|
2255
2255
|
var O;
|
|
2256
|
-
const
|
|
2257
|
-
|
|
2256
|
+
const p = (O = t.column.field) != null ? O : "";
|
|
2257
|
+
p !== "" && (v[p] !== t.record[p] ? n("edit", v[p]) : n("undo-edit"));
|
|
2258
2258
|
}, {
|
|
2259
2259
|
deep: !0
|
|
2260
|
-
}), (
|
|
2260
|
+
}), (v, p) => e.editMode && e.column.field && e.column.editable ? (i(), u("td", be({ key: 0 }, v.$attrs, {
|
|
2261
2261
|
class: ["cl-transition-colours", {
|
|
2262
2262
|
"cl-bg-link-lighter": o(r)
|
|
2263
2263
|
}]
|
|
2264
2264
|
}), [
|
|
2265
|
-
s("strong", Xt,
|
|
2266
|
-
D(
|
|
2267
|
-
cellFocused:
|
|
2265
|
+
s("strong", Xt, x(e.column.caption), 1),
|
|
2266
|
+
D(v.$slots, `${e.column.name}Edit`, ue(ye({
|
|
2267
|
+
cellFocused: m,
|
|
2268
2268
|
column: e.column,
|
|
2269
2269
|
edited: o(r),
|
|
2270
|
-
record:
|
|
2270
|
+
record: d.value
|
|
2271
2271
|
})))
|
|
2272
|
-
], 16)) : (i(),
|
|
2273
|
-
s("strong", _t,
|
|
2274
|
-
e.column.type === "slot" ? D(
|
|
2272
|
+
], 16)) : (i(), u("td", ue(be({ key: 1 }, v.$attrs)), [
|
|
2273
|
+
s("strong", _t, x(e.column.caption), 1),
|
|
2274
|
+
e.column.type === "slot" ? D(v.$slots, e.column.name, ue(be({ key: 0 }, { column: e.column, record: e.record }))) : e.column.type === "boolean" && e.column.field !== void 0 ? (i(), Q(he, {
|
|
2275
2275
|
key: 1,
|
|
2276
2276
|
"input-type": "checkbox",
|
|
2277
|
-
"model-value":
|
|
2277
|
+
"model-value": f(e.record, e.column.field),
|
|
2278
2278
|
disabled: !0
|
|
2279
|
-
}, null, 8, ["model-value"])) : (e.column.type === "date" || e.column.type === "datetime") && e.column.field !== void 0 ? (i(),
|
|
2280
|
-
e.column.format !== void 0 ? (i(),
|
|
2281
|
-
|
|
2282
|
-
], 64)) : e.column.type === "date" ? (i(),
|
|
2283
|
-
|
|
2284
|
-
], 64)) : (i(),
|
|
2285
|
-
|
|
2279
|
+
}, null, 8, ["model-value"])) : (e.column.type === "date" || e.column.type === "datetime") && e.column.field !== void 0 ? (i(), u(z, { key: 2 }, [
|
|
2280
|
+
e.column.format !== void 0 ? (i(), u(z, { key: 0 }, [
|
|
2281
|
+
le(x(o(l)(new Date(g(e.record, e.column.field)), e.column.format)), 1)
|
|
2282
|
+
], 64)) : e.column.type === "date" ? (i(), u(z, { key: 1 }, [
|
|
2283
|
+
le(x(o(l)(new Date(g(e.record, e.column.field)), o(Y).DATE)), 1)
|
|
2284
|
+
], 64)) : (i(), u(z, { key: 2 }, [
|
|
2285
|
+
le(x(o(l)(new Date(g(e.record, e.column.field)), o(Y).DATETIME)), 1)
|
|
2286
2286
|
], 64))
|
|
2287
|
-
], 64)) : e.column.type === "number" && e.column.field ? (i(),
|
|
2288
|
-
e.column.format === o(
|
|
2289
|
-
|
|
2290
|
-
], 64)) : e.column.format !== void 0 ? (i(),
|
|
2291
|
-
|
|
2292
|
-
], 64)) : (i(),
|
|
2293
|
-
|
|
2287
|
+
], 64)) : e.column.type === "number" && e.column.field ? (i(), u(z, { key: 3 }, [
|
|
2288
|
+
e.column.format === o(oe).MULTIPLIER ? (i(), u(z, { key: 0 }, [
|
|
2289
|
+
le(" \xD7" + x(a(e.record, e.column.field)), 1)
|
|
2290
|
+
], 64)) : e.column.format !== void 0 ? (i(), u(z, { key: 1 }, [
|
|
2291
|
+
le(x(o(c)(a(e.record, e.column.field), e.column.format)), 1)
|
|
2292
|
+
], 64)) : (i(), u(z, { key: 2 }, [
|
|
2293
|
+
le(x(a(e.record, e.column.field)), 1)
|
|
2294
2294
|
], 64))
|
|
2295
|
-
], 64)) : e.column.field !== void 0 ? (i(),
|
|
2296
|
-
e.column.maxLength !== void 0 ? (i(),
|
|
2295
|
+
], 64)) : e.column.field !== void 0 ? (i(), u(z, { key: 4 }, [
|
|
2296
|
+
e.column.maxLength !== void 0 ? (i(), u("span", en, x(g(e.record, e.column.field).trimToLength(e.column.maxLength, e.column.format !== void 0 ? e.column.format === "ellipsis" : !1)), 1)) : (i(), u("span", ln, x(g(e.record, e.column.field)), 1))
|
|
2297
2297
|
], 64)) : N("", !0)
|
|
2298
2298
|
], 16));
|
|
2299
2299
|
}
|
|
@@ -2320,7 +2320,7 @@ function cn(e) {
|
|
|
2320
2320
|
return n;
|
|
2321
2321
|
}
|
|
2322
2322
|
const an = ["ellipsis"];
|
|
2323
|
-
var
|
|
2323
|
+
var xe = /* @__PURE__ */ ((e) => (e[e.CONTAINS = 0] = "CONTAINS", e[e.NOT_CONTAINS = 1] = "NOT_CONTAINS", e[e.EQUAL = 2] = "EQUAL", e[e.NOT_EQUAL = 3] = "NOT_EQUAL", e[e.STARTS_WITH = 4] = "STARTS_WITH", e[e.ENDS_WITH = 5] = "ENDS_WITH", e[e.GREATER_THAN = 6] = "GREATER_THAN", e[e.LESS_THAN = 7] = "LESS_THAN", e[e.EQUAL_OR_GREATER_THAN = 8] = "EQUAL_OR_GREATER_THAN", e[e.EQUAL_OR_LESS_THAN = 9] = "EQUAL_OR_LESS_THAN", e))(xe || {});
|
|
2324
2324
|
const sn = [
|
|
2325
2325
|
"equal",
|
|
2326
2326
|
"notequal",
|
|
@@ -2448,97 +2448,101 @@ const mn = {
|
|
|
2448
2448
|
"datetime"
|
|
2449
2449
|
]
|
|
2450
2450
|
}
|
|
2451
|
-
],
|
|
2451
|
+
], hn = {
|
|
2452
2452
|
key: 0,
|
|
2453
2453
|
class: "cl-border-grey-2 cl-border-r cl-capitalize cl-group cl-inline cl-relative cl-w-auto"
|
|
2454
|
-
},
|
|
2454
|
+
}, vn = { class: "cl-bg-off-white cl-flex cl-h-full cl-items-center cl-justify-center cl-w-10" }, pn = { class: "cl-p-3" }, yn = { class: "cl-px-4 cl-py-1 cl-w-full" }, wn = ["innerHTML"], xn = { class: "cl-p-3" }, kn = ["onClick"], $n = ["innerHTML"], Tn = /* @__PURE__ */ s("option", { value: void 0 }, null, -1), Cn = ["selected"], Sn = ["selected"], On = {
|
|
2455
2455
|
key: 1,
|
|
2456
2456
|
class: "cl-flex cl-w-full"
|
|
2457
|
-
}, ll = /* @__PURE__ */
|
|
2457
|
+
}, ll = /* @__PURE__ */ V({
|
|
2458
2458
|
__name: "cl-ui-grid-filter",
|
|
2459
2459
|
props: {
|
|
2460
|
-
|
|
2460
|
+
filter: null,
|
|
2461
2461
|
column: null,
|
|
2462
2462
|
firstHalf: { type: Boolean, default: !0 }
|
|
2463
2463
|
},
|
|
2464
|
-
emits:
|
|
2465
|
-
"update:request": null
|
|
2466
|
-
},
|
|
2464
|
+
emits: ["update:filter"],
|
|
2467
2465
|
setup(e, { emit: n }) {
|
|
2468
|
-
const t = e, { locale: l, t: c } =
|
|
2469
|
-
const
|
|
2470
|
-
return
|
|
2471
|
-
|
|
2472
|
-
}),
|
|
2473
|
-
}),
|
|
2474
|
-
var
|
|
2475
|
-
let
|
|
2476
|
-
return typeof
|
|
2477
|
-
var
|
|
2478
|
-
return
|
|
2466
|
+
const t = e, { locale: l, t: c } = de(), d = j(() => {
|
|
2467
|
+
const h = p();
|
|
2468
|
+
return h.forEach((C) => {
|
|
2469
|
+
C.description = c(`grid.${C.method}`);
|
|
2470
|
+
}), h;
|
|
2471
|
+
}), r = j(() => {
|
|
2472
|
+
var C;
|
|
2473
|
+
let h = (C = t.filter) == null ? void 0 : C.filterMethod;
|
|
2474
|
+
return typeof h > "u" && (h = xe[v()]), d.value.find((P) => {
|
|
2475
|
+
var _;
|
|
2476
|
+
return P.method.toLowerCase() === ((_ = h == null ? void 0 : h.removeNonAlphanumeric()) == null ? void 0 : _.toLowerCase());
|
|
2479
2477
|
});
|
|
2480
|
-
}),
|
|
2481
|
-
var
|
|
2482
|
-
return (
|
|
2483
|
-
}),
|
|
2484
|
-
let
|
|
2485
|
-
return t.column.slotType === "date" || t.column.type === "date" ?
|
|
2478
|
+
}), g = j(() => {
|
|
2479
|
+
var h, C;
|
|
2480
|
+
return (C = (h = t.filter) == null ? void 0 : h.filterValue) != null ? C : "";
|
|
2481
|
+
}), a = j(() => g.value !== "" ? new Date(g.value) : null), f = j(() => Intl.NumberFormat(l.value).format(1.1).replace(/[0-9]+/g, "")), m = j(() => {
|
|
2482
|
+
let h = "text";
|
|
2483
|
+
return t.column.slotType === "date" || t.column.type === "date" ? h = "date" : (t.column.slotType === "datetime" || t.column.type === "datetime") && (h = "datetime"), h;
|
|
2486
2484
|
});
|
|
2487
|
-
function O() {
|
|
2488
|
-
return t.column.type === "string" || t.column.slotType === "string" ? ke.CONTAINS : t.column.type === "datetime" || t.column.slotType === "datetime" ? ke.LESS_THAN : ke.EQUAL;
|
|
2489
|
-
}
|
|
2490
2485
|
function v() {
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
function V(C, E) {
|
|
2504
|
-
var X;
|
|
2505
|
-
const y = ((X = C == null ? void 0 : C.value) != null ? X : E).trim(), h = he(t.request), x = h.filters.findIndex((le) => le.filterOnColumn === t.column.field);
|
|
2506
|
-
let I = !1;
|
|
2507
|
-
if (h.pageNumber = 1, x >= 0)
|
|
2508
|
-
I = h.filters[x].filterValue === y, h.filters[x].filterValue = y;
|
|
2509
|
-
else if (y !== "" && typeof t.column.field < "u") {
|
|
2510
|
-
const le = O();
|
|
2511
|
-
h.filters.push({
|
|
2486
|
+
return t.column.type === "string" || t.column.slotType === "string" ? xe.CONTAINS : t.column.type === "datetime" || t.column.slotType === "datetime" ? xe.LESS_THAN : xe.EQUAL;
|
|
2487
|
+
}
|
|
2488
|
+
function p() {
|
|
2489
|
+
let h = [];
|
|
2490
|
+
return t.column.type !== "slot" ? h = el.filter((C) => C.allowedTypes.includes(t.column.type)) : typeof t.column.slotType < "u" && typeof t.column.field < "u" && (h = el.filter((C) => C.allowedTypes.includes(t.column.slotType))), h;
|
|
2491
|
+
}
|
|
2492
|
+
function O(h) {
|
|
2493
|
+
let C;
|
|
2494
|
+
if (t.filter)
|
|
2495
|
+
C = ge(t.filter), C.filterOperation = xe[h.toUpperCase()], C.filterMethod = h.toUpperCase();
|
|
2496
|
+
else if (typeof t.column.field < "u")
|
|
2497
|
+
C = {
|
|
2512
2498
|
filterOnColumn: t.column.field,
|
|
2513
|
-
filterMethod:
|
|
2514
|
-
filterOperation:
|
|
2515
|
-
filterValue:
|
|
2516
|
-
}
|
|
2517
|
-
|
|
2518
|
-
|
|
2499
|
+
filterMethod: h.toUpperCase(),
|
|
2500
|
+
filterOperation: xe[h.toUpperCase()],
|
|
2501
|
+
filterValue: ""
|
|
2502
|
+
};
|
|
2503
|
+
else
|
|
2504
|
+
return;
|
|
2505
|
+
n("update:filter", C, !1);
|
|
2506
|
+
}
|
|
2507
|
+
function b(h, C) {
|
|
2508
|
+
var R, H;
|
|
2509
|
+
let P, _ = !1;
|
|
2510
|
+
const T = ((R = h == null ? void 0 : h.value) != null ? R : C).trim();
|
|
2511
|
+
if (t.filter)
|
|
2512
|
+
_ = ((H = t.filter) == null ? void 0 : H.filterValue) === T, P = ge(t.filter), P.filterValue = T;
|
|
2513
|
+
else if (T !== "" && typeof t.column.field < "u") {
|
|
2514
|
+
const $ = v();
|
|
2515
|
+
P = {
|
|
2516
|
+
filterOnColumn: t.column.field,
|
|
2517
|
+
filterMethod: xe[$],
|
|
2518
|
+
filterOperation: $,
|
|
2519
|
+
filterValue: T
|
|
2520
|
+
};
|
|
2521
|
+
} else
|
|
2522
|
+
return;
|
|
2523
|
+
_ === !1 && n("update:filter", P, !0);
|
|
2519
2524
|
}
|
|
2520
|
-
function
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
t.column.format === ne.INTEGER ? y = parseInt(E) : (E = E.replace(p.value, "."), y = parseFloat(E)), typeof y == "number" && isNaN(y) && (y = ""), V(null, y.toString());
|
|
2525
|
+
function L(h) {
|
|
2526
|
+
let C = "";
|
|
2527
|
+
t.column.format === oe.INTEGER ? (typeof h == "string" && (h = parseInt(h)), C = Math.round(h).toString()) : (typeof h == "string" && (h = parseFloat(h.replace(f.value, "."))), C = h.toString()), typeof C == "number" && isNaN(C) && (C = ""), b(null, C.toString());
|
|
2524
2528
|
}
|
|
2525
|
-
function
|
|
2526
|
-
var
|
|
2527
|
-
|
|
2529
|
+
function W(h) {
|
|
2530
|
+
var C;
|
|
2531
|
+
b(null, (C = h == null ? void 0 : h.toISOString()) != null ? C : "");
|
|
2528
2532
|
}
|
|
2529
|
-
return (
|
|
2530
|
-
var
|
|
2531
|
-
const
|
|
2532
|
-
return e.column.filterable === void 0 || e.column.filterable === !0 ? (i(),
|
|
2533
|
+
return (h, C) => {
|
|
2534
|
+
var _, T;
|
|
2535
|
+
const P = te("icon");
|
|
2536
|
+
return e.column.filterable === void 0 || e.column.filterable === !0 ? (i(), u("div", {
|
|
2533
2537
|
key: 0,
|
|
2534
2538
|
class: U(["cl-border-grey-2 cl-flex cl-h-[2.6rem] cl-rounded cl-w-full", {
|
|
2535
2539
|
"cl-border-b cl-p-5": e.column.type === "slot" && (e.column.slotType === void 0 || e.column.field === void 0),
|
|
2536
2540
|
"cl-border": e.column.type !== "slot" || e.column.slotType !== void 0 && e.column.field !== void 0
|
|
2537
2541
|
}])
|
|
2538
2542
|
}, [
|
|
2539
|
-
e.column.type !== "slot" || e.column.slotType !== void 0 && e.column.field !== void 0 ? (i(),
|
|
2540
|
-
s("div",
|
|
2541
|
-
|
|
2543
|
+
e.column.type !== "slot" || e.column.slotType !== void 0 && e.column.field !== void 0 ? (i(), u("div", hn, [
|
|
2544
|
+
s("div", vn, [
|
|
2545
|
+
k(P, {
|
|
2542
2546
|
icon: "ph:sliders-horizontal",
|
|
2543
2547
|
size: 20
|
|
2544
2548
|
})
|
|
@@ -2549,75 +2553,73 @@ const mn = {
|
|
|
2549
2553
|
"cl--left-44": !e.firstHalf
|
|
2550
2554
|
}])
|
|
2551
2555
|
}, [
|
|
2552
|
-
s("strong", pn,
|
|
2556
|
+
s("strong", pn, x(o(c)("grid.currentMethod")), 1),
|
|
2553
2557
|
s("span", yn, [
|
|
2554
|
-
|
|
2558
|
+
le(x((_ = o(r)) == null ? void 0 : _.description) + " ", 1),
|
|
2555
2559
|
s("span", {
|
|
2556
2560
|
class: "cl-float-right",
|
|
2557
|
-
innerHTML: (
|
|
2561
|
+
innerHTML: (T = o(r)) == null ? void 0 : T.icon
|
|
2558
2562
|
}, null, 8, wn)
|
|
2559
2563
|
]),
|
|
2560
|
-
s("strong", xn,
|
|
2561
|
-
(i(!0),
|
|
2562
|
-
key:
|
|
2564
|
+
s("strong", xn, x(o(c)("grid.availableMethods")), 1),
|
|
2565
|
+
(i(!0), u(z, null, ae(o(d), (R, H) => (i(), u("span", {
|
|
2566
|
+
key: H,
|
|
2563
2567
|
class: "cl-cursor-pointer cl-px-4 cl-py-1 cl-transition-colors cl-w-full hover:cl-bg-off-white",
|
|
2564
|
-
onClick:
|
|
2568
|
+
onClick: ie(($) => O(R.method), ["prevent"])
|
|
2565
2569
|
}, [
|
|
2566
|
-
|
|
2570
|
+
le(x(R.description) + " ", 1),
|
|
2567
2571
|
s("span", {
|
|
2568
2572
|
class: "cl-float-right",
|
|
2569
|
-
innerHTML:
|
|
2573
|
+
innerHTML: R.icon
|
|
2570
2574
|
}, null, 8, $n)
|
|
2571
2575
|
], 8, kn))), 128))
|
|
2572
2576
|
], 2)
|
|
2573
2577
|
])) : N("", !0),
|
|
2574
|
-
e.column.type === "boolean" || e.column.slotType === "boolean" && typeof e.column.field < "u" ? (i(),
|
|
2578
|
+
e.column.type === "boolean" || e.column.slotType === "boolean" && typeof e.column.field < "u" ? (i(), u("select", {
|
|
2575
2579
|
key: 1,
|
|
2576
2580
|
class: "cl-border-none cl-w-full",
|
|
2577
|
-
onChange:
|
|
2581
|
+
onChange: C[0] || (C[0] = (R) => b(R.target))
|
|
2578
2582
|
}, [
|
|
2579
2583
|
Tn,
|
|
2580
2584
|
s("option", {
|
|
2581
2585
|
value: "true",
|
|
2582
|
-
selected: o(
|
|
2583
|
-
},
|
|
2586
|
+
selected: o(g) === "true"
|
|
2587
|
+
}, x(o(c)("grid.true")), 9, Cn),
|
|
2584
2588
|
s("option", {
|
|
2585
2589
|
value: "false",
|
|
2586
|
-
selected: o(
|
|
2587
|
-
},
|
|
2588
|
-
], 32)) : e.column.type === "date" || e.column.type === "datetime" || (e.column.slotType === "date" || e.column.slotType === "datetime") && typeof e.column.field < "u" ? (i(),
|
|
2590
|
+
selected: o(g) === "false"
|
|
2591
|
+
}, x(o(c)("grid.false")), 9, Sn)
|
|
2592
|
+
], 32)) : e.column.type === "date" || e.column.type === "datetime" || (e.column.slotType === "date" || e.column.slotType === "datetime") && typeof e.column.field < "u" ? (i(), Q(he, {
|
|
2589
2593
|
key: 2,
|
|
2590
|
-
"model-value": o(
|
|
2594
|
+
"model-value": o(a),
|
|
2591
2595
|
class: "!cl-border-none !cl-mb-0 !cl-mr-0 cl-w-full",
|
|
2592
2596
|
min: "1900-01-01",
|
|
2593
2597
|
max: "2999-12-31T23:59",
|
|
2594
2598
|
label: e.column.name,
|
|
2595
2599
|
"show-label": !1,
|
|
2596
|
-
"input-type": o(
|
|
2597
|
-
"onUpdate:modelValue":
|
|
2598
|
-
}, null, 8, ["model-value", "label", "input-type"])) : e.column.type === "number" || e.column.slotType === "number" && typeof e.column.field < "u" ? (i(),
|
|
2600
|
+
"input-type": o(m),
|
|
2601
|
+
"onUpdate:modelValue": C[1] || (C[1] = (R) => W(R))
|
|
2602
|
+
}, null, 8, ["model-value", "label", "input-type"])) : e.column.type === "number" || e.column.slotType === "number" && typeof e.column.field < "u" ? (i(), Q(he, {
|
|
2599
2603
|
key: 3,
|
|
2600
|
-
|
|
2601
|
-
"onUpdate:modelValue": E[2] || (E[2] = (I) => g.value = I),
|
|
2604
|
+
"model-value": o(g),
|
|
2602
2605
|
class: "cl-border-none cl-mb-0 cl-w-full",
|
|
2603
2606
|
"input-type": "number",
|
|
2604
2607
|
"show-arrows": !1,
|
|
2605
|
-
onInput:
|
|
2606
|
-
}, null, 8, ["
|
|
2608
|
+
onInput: C[2] || (C[2] = (R, H) => L(H))
|
|
2609
|
+
}, null, 8, ["model-value"])) : e.column.type !== "slot" || e.column.slotType === "string" && typeof e.column.field < "u" ? (i(), Q(he, {
|
|
2607
2610
|
key: 4,
|
|
2608
|
-
|
|
2609
|
-
"onUpdate:modelValue": E[4] || (E[4] = (I) => g.value = I),
|
|
2611
|
+
"model-value": o(g),
|
|
2610
2612
|
class: "cl-border-none cl-mb-0 cl-w-full",
|
|
2611
2613
|
"input-type": "text",
|
|
2612
|
-
onInput:
|
|
2613
|
-
}, null, 8, ["
|
|
2614
|
-
], 2)) : (i(),
|
|
2614
|
+
onInput: C[3] || (C[3] = (R, H) => b(null, H))
|
|
2615
|
+
}, null, 8, ["model-value"])) : N("", !0)
|
|
2616
|
+
], 2)) : (i(), u("div", On, " \xA0 "));
|
|
2615
2617
|
};
|
|
2616
2618
|
}
|
|
2617
2619
|
}), En = {
|
|
2618
2620
|
key: 0,
|
|
2619
2621
|
class: "cl-flex cl-flex-wrap cl-justify-end cl-mt-4 cl-w-full"
|
|
2620
|
-
}, An = { class: "cl-bg-off-white cl-border cl-border-grey-0 cl-flex cl-items-center cl-mb-2 cl-px-3 cl-rounded cl-shadow-md cl-text-sm cl-w-full lg:cl-w-auto" }, jn = { class: "cl-text-grey-3 cl-w-max" }, Mn = { class: "cl-bg-off-white cl-border cl-border-grey-0 cl-flex cl-flex-wrap cl-items-center cl-mb-2 cl-px-3 cl-py-2 cl-rounded cl-shadow-md cl-text-sm cl-w-full lg:cl-ml-2 lg:cl-w-auto mb:cl-flex-nowrap" },
|
|
2622
|
+
}, An = { class: "cl-bg-off-white cl-border cl-border-grey-0 cl-flex cl-items-center cl-mb-2 cl-px-3 cl-rounded cl-shadow-md cl-text-sm cl-w-full lg:cl-w-auto" }, jn = { class: "cl-text-grey-3 cl-w-max" }, Mn = { class: "cl-bg-off-white cl-border cl-border-grey-0 cl-flex cl-flex-wrap cl-items-center cl-mb-2 cl-px-3 cl-py-2 cl-rounded cl-shadow-md cl-text-sm cl-w-full lg:cl-ml-2 lg:cl-w-auto mb:cl-flex-nowrap" }, Nn = { 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" }, In = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, Dn = { class: "cl-text-grey-3 cl-w-full lg:cl-mr-2 lg:cl-w-auto" }, Rn = { class: "cl-flex cl-flex-wrap cl-text-sm mb:cl-flex-nowrap" }, qn = { class: "cl-pr-2" }, Un = ["onClick"], zn = { 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" }, Bn = { class: "cl-mb-2 cl-text-grey-3 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, Ln = ["onClick"], Pn = { class: "cl-mb-2 cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, Fn = { 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" }, Vn = { class: "cl-block lg:cl-inline-block" }, Hn = /* @__PURE__ */ V({
|
|
2621
2623
|
__name: "cl-ui-grid-footer",
|
|
2622
2624
|
props: {
|
|
2623
2625
|
request: null,
|
|
@@ -2633,101 +2635,101 @@ const mn = {
|
|
|
2633
2635
|
50,
|
|
2634
2636
|
100,
|
|
2635
2637
|
200
|
|
2636
|
-
], { n: c, t:
|
|
2637
|
-
var O,
|
|
2638
|
-
return t.data !== null ? Math.ceil(((
|
|
2639
|
-
}),
|
|
2638
|
+
], { n: c, t: d } = de(), { debounce: r } = Ge(), g = M(t.request.pageNumber), a = j(() => {
|
|
2639
|
+
var O, b;
|
|
2640
|
+
return t.data !== null ? Math.ceil(((b = (O = t.data) == null ? void 0 : O.totalRecords) != null ? b : 0) / t.request.pageSize) : 1;
|
|
2641
|
+
}), f = j(() => {
|
|
2640
2642
|
const O = Array.from(Array(a.value + 1).keys());
|
|
2641
|
-
let
|
|
2643
|
+
let b = [];
|
|
2642
2644
|
if (O.shift(), O.length) {
|
|
2643
|
-
const
|
|
2644
|
-
|
|
2645
|
+
const L = t.request.pageNumber === a.value || t.request.pageNumber === a.value - 1 ? a.value - 3 : t.request.pageNumber - 1, W = L + 3;
|
|
2646
|
+
b = O.slice(L, W);
|
|
2645
2647
|
}
|
|
2646
|
-
return
|
|
2648
|
+
return b;
|
|
2647
2649
|
});
|
|
2648
|
-
function
|
|
2649
|
-
const
|
|
2650
|
-
|
|
2650
|
+
function m(O) {
|
|
2651
|
+
const b = ge(t.request);
|
|
2652
|
+
b.pageNumber !== O && (b.pageNumber = Math.max(Math.min(Math.trunc(O), a.value), 1), n("update:request", b));
|
|
2651
2653
|
}
|
|
2652
|
-
function
|
|
2653
|
-
const
|
|
2654
|
-
|
|
2654
|
+
function v(O) {
|
|
2655
|
+
const b = parseInt(O == null ? void 0 : O.value) || 1;
|
|
2656
|
+
m(b);
|
|
2655
2657
|
}
|
|
2656
|
-
function
|
|
2657
|
-
const
|
|
2658
|
-
|
|
2658
|
+
function p(O) {
|
|
2659
|
+
const b = ge(t.request);
|
|
2660
|
+
b.pageSize = O, b.pageNumber = 1, n("update:request", b);
|
|
2659
2661
|
}
|
|
2660
|
-
return
|
|
2661
|
-
var
|
|
2662
|
-
const
|
|
2663
|
-
return e.data && ((
|
|
2662
|
+
return ne(() => t.request.pageNumber, () => g.value = t.request.pageNumber), (O, b) => {
|
|
2663
|
+
var W;
|
|
2664
|
+
const L = te("icon");
|
|
2665
|
+
return e.data && ((W = e.data.results) == null ? void 0 : W.length) && e.request ? (i(), u("div", En, [
|
|
2664
2666
|
s("div", An, [
|
|
2665
|
-
s("span", jn,
|
|
2666
|
-
|
|
2667
|
-
modelValue:
|
|
2668
|
-
"onUpdate:modelValue":
|
|
2667
|
+
s("span", jn, x(o(d)("grid.jumpToPage")), 1),
|
|
2668
|
+
k(he, {
|
|
2669
|
+
modelValue: g.value,
|
|
2670
|
+
"onUpdate:modelValue": b[0] || (b[0] = (h) => g.value = h),
|
|
2669
2671
|
class: "cl-ml-1 cl-mt-0.5 cl-text-sm",
|
|
2670
2672
|
"input-type": "number",
|
|
2671
2673
|
label: "Page",
|
|
2672
2674
|
"show-label": !1,
|
|
2673
2675
|
min: "1",
|
|
2674
2676
|
max: o(a),
|
|
2675
|
-
onInput:
|
|
2677
|
+
onInput: b[1] || (b[1] = (h) => o(r)(v, h.target))
|
|
2676
2678
|
}, null, 8, ["modelValue", "max"])
|
|
2677
2679
|
]),
|
|
2678
2680
|
s("div", Mn, [
|
|
2679
|
-
s("div",
|
|
2680
|
-
s("li",
|
|
2681
|
-
s("span",
|
|
2681
|
+
s("div", Nn, [
|
|
2682
|
+
s("li", In, [
|
|
2683
|
+
s("span", Dn, x(o(d)("grid.page")), 1)
|
|
2682
2684
|
]),
|
|
2683
|
-
s("ul",
|
|
2684
|
-
s("li",
|
|
2685
|
-
|
|
2685
|
+
s("ul", Rn, [
|
|
2686
|
+
s("li", qn, x(o(c)(e.request.pageNumber, o(oe).INTEGER)) + " / " + x(o(c)(o(a), o(oe).INTEGER)), 1),
|
|
2687
|
+
B(s("li", {
|
|
2686
2688
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2687
|
-
onClick:
|
|
2689
|
+
onClick: b[2] || (b[2] = (h) => m(1))
|
|
2688
2690
|
}, [
|
|
2689
|
-
|
|
2691
|
+
k(L, {
|
|
2690
2692
|
icon: "ph:caret-double-left",
|
|
2691
2693
|
size: 14
|
|
2692
2694
|
})
|
|
2693
2695
|
], 512), [
|
|
2694
2696
|
[F, e.request.pageNumber > 1]
|
|
2695
2697
|
]),
|
|
2696
|
-
|
|
2698
|
+
B(s("li", {
|
|
2697
2699
|
class: "cl-cursor-pointer cl-mt-1 lg:cl-mr-2 mr-1",
|
|
2698
|
-
onClick:
|
|
2700
|
+
onClick: b[3] || (b[3] = (h) => m(e.request.pageNumber - 1))
|
|
2699
2701
|
}, [
|
|
2700
|
-
|
|
2702
|
+
k(L, {
|
|
2701
2703
|
icon: "ph:caret-left",
|
|
2702
2704
|
size: 14
|
|
2703
2705
|
})
|
|
2704
2706
|
], 512), [
|
|
2705
2707
|
[F, e.request.pageNumber > 1]
|
|
2706
2708
|
]),
|
|
2707
|
-
(i(!0),
|
|
2708
|
-
key:
|
|
2709
|
+
(i(!0), u(z, null, ae(o(f), (h, C) => (i(), u("li", {
|
|
2710
|
+
key: C,
|
|
2709
2711
|
class: U(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2710
|
-
"cl-text-black cl-font-bold": e.request.pageNumber ===
|
|
2711
|
-
"cl-text-grey-6": e.request.pageNumber !==
|
|
2712
|
+
"cl-text-black cl-font-bold": e.request.pageNumber === h,
|
|
2713
|
+
"cl-text-grey-6": e.request.pageNumber !== h
|
|
2712
2714
|
}]),
|
|
2713
|
-
onClick: (
|
|
2714
|
-
},
|
|
2715
|
-
|
|
2715
|
+
onClick: (P) => m(h)
|
|
2716
|
+
}, x(o(c)(h, o(oe).INTEGER)), 11, Un))), 128)),
|
|
2717
|
+
B(s("li", {
|
|
2716
2718
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2717
|
-
onClick:
|
|
2719
|
+
onClick: b[4] || (b[4] = (h) => m(e.request.pageNumber + 1))
|
|
2718
2720
|
}, [
|
|
2719
|
-
|
|
2721
|
+
k(L, {
|
|
2720
2722
|
icon: "ph:caret-right",
|
|
2721
2723
|
size: 14
|
|
2722
2724
|
})
|
|
2723
2725
|
], 512), [
|
|
2724
2726
|
[F, e.request.pageNumber < o(a)]
|
|
2725
2727
|
]),
|
|
2726
|
-
|
|
2728
|
+
B(s("li", {
|
|
2727
2729
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2728
|
-
onClick:
|
|
2730
|
+
onClick: b[5] || (b[5] = (h) => m(o(a)))
|
|
2729
2731
|
}, [
|
|
2730
|
-
|
|
2732
|
+
k(L, {
|
|
2731
2733
|
icon: "ph:caret-double-right",
|
|
2732
2734
|
size: 14
|
|
2733
2735
|
})
|
|
@@ -2737,19 +2739,19 @@ const mn = {
|
|
|
2737
2739
|
])
|
|
2738
2740
|
]),
|
|
2739
2741
|
s("ul", zn, [
|
|
2740
|
-
s("li", Bn,
|
|
2741
|
-
(i(),
|
|
2742
|
-
key:
|
|
2742
|
+
s("li", Bn, x(o(d)("grid.pageSize")), 1),
|
|
2743
|
+
(i(), u(z, null, ae(l, (h, C) => s("li", {
|
|
2744
|
+
key: C,
|
|
2743
2745
|
class: U(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2744
|
-
"cl-text-black cl-font-bold": e.request.pageSize ===
|
|
2745
|
-
"cl-text-grey-6": e.request.pageSize !==
|
|
2746
|
+
"cl-text-black cl-font-bold": e.request.pageSize === h,
|
|
2747
|
+
"cl-text-grey-6": e.request.pageSize !== h
|
|
2746
2748
|
}]),
|
|
2747
|
-
onClick: (
|
|
2748
|
-
},
|
|
2749
|
+
onClick: (P) => p(h)
|
|
2750
|
+
}, x(o(c)(h, o(oe).INTEGER)), 11, Ln)), 64))
|
|
2749
2751
|
]),
|
|
2750
2752
|
s("ul", Pn, [
|
|
2751
|
-
s("li", Fn,
|
|
2752
|
-
s("li", Vn,
|
|
2753
|
+
s("li", Fn, x(o(d)("grid.totalRecords")), 1),
|
|
2754
|
+
s("li", Vn, x(o(c)(e.data.totalRecords, o(oe).INTEGER)), 1)
|
|
2753
2755
|
])
|
|
2754
2756
|
])
|
|
2755
2757
|
])) : N("", !0);
|
|
@@ -2757,7 +2759,7 @@ const mn = {
|
|
|
2757
2759
|
}
|
|
2758
2760
|
}), Gn = { class: "cl-fixed cl-flex cl-h-full cl-justify-end cl-right-0 cl-shadow-lg cl-top-0 cl-z-50" }, Wn = { class: "cl-bg-secondary-default cl-h-full cl-overflow-y-auto cl-px-10 cl-py-20 cl-relative cl-text-grey-2 cl-w-80" }, Jn = { class: "cl-mb-4 cl-text-2xl cl-text-off-white" }, Kn = { class: "cl-border-grey-3 cl-border-t cl-flex cl-flex-wrap cl-text-sm cl-w-full" }, Zn = { class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full" }, Qn = { class: "cl-flex-1 cl-py-2" }, Yn = { class: "cl-py-2 cl-w-1/4" }, Xn = { class: "cl-py-2 cl-w-1/5" }, _n = { class: "cl-flex-1 cl-py-2" }, eo = { class: "cl-py-2 cl-w-1/4" }, lo = { class: "cl-py-2 cl-text-off-white cl-w-1/5" }, to = { key: 1 }, no = {
|
|
2759
2761
|
inheritAttrs: !1
|
|
2760
|
-
}, oo = /* @__PURE__ */
|
|
2762
|
+
}, oo = /* @__PURE__ */ V({
|
|
2761
2763
|
...no,
|
|
2762
2764
|
__name: "cl-ui-grid-view-manager",
|
|
2763
2765
|
props: {
|
|
@@ -2767,77 +2769,77 @@ const mn = {
|
|
|
2767
2769
|
"update:columns": null
|
|
2768
2770
|
},
|
|
2769
2771
|
setup(e, { emit: n }) {
|
|
2770
|
-
const t = e, { t: l } =
|
|
2771
|
-
function
|
|
2772
|
-
|
|
2772
|
+
const t = e, { t: l } = de(), c = M(!1);
|
|
2773
|
+
function d(a, f, m) {
|
|
2774
|
+
m < a.length && m >= 0 && a.splice(m, 0, a.splice(f, 1)[0]);
|
|
2773
2775
|
}
|
|
2774
|
-
function r(a,
|
|
2776
|
+
function r(a, f) {
|
|
2775
2777
|
var O;
|
|
2776
|
-
const
|
|
2777
|
-
|
|
2778
|
+
const m = ge(t.columns), v = (O = a == null ? void 0 : a.checked) != null ? O : !1, p = m.findIndex((b) => b.name === f.name);
|
|
2779
|
+
p >= 0 && (m[p].visible = v), n("update:columns", m);
|
|
2778
2780
|
}
|
|
2779
|
-
function
|
|
2780
|
-
const
|
|
2781
|
-
|
|
2781
|
+
function g(a, f) {
|
|
2782
|
+
const m = ge(t.columns), v = f === "up" ? a + 1 : a - 1;
|
|
2783
|
+
d(m, a, v), n("update:columns", m);
|
|
2782
2784
|
}
|
|
2783
|
-
return (a,
|
|
2784
|
-
const
|
|
2785
|
-
return i(),
|
|
2786
|
-
|
|
2785
|
+
return (a, f) => {
|
|
2786
|
+
const m = te("icon");
|
|
2787
|
+
return i(), u(z, null, [
|
|
2788
|
+
k($e, be(a.$attrs, {
|
|
2787
2789
|
class: "cl-w-full",
|
|
2788
2790
|
size: "small",
|
|
2789
|
-
onClick:
|
|
2791
|
+
onClick: f[0] || (f[0] = ie((v) => c.value = !0, ["prevent"]))
|
|
2790
2792
|
}), {
|
|
2791
|
-
default:
|
|
2792
|
-
|
|
2793
|
+
default: X(() => [
|
|
2794
|
+
le(x(o(l)("grid.manageView")), 1)
|
|
2793
2795
|
]),
|
|
2794
2796
|
_: 1
|
|
2795
2797
|
}, 16),
|
|
2796
|
-
(i(),
|
|
2797
|
-
|
|
2798
|
-
default:
|
|
2799
|
-
|
|
2798
|
+
(i(), Q(He, { to: "body" }, [
|
|
2799
|
+
k(Te, { name: "slide-left" }, {
|
|
2800
|
+
default: X(() => [
|
|
2801
|
+
B(s("div", Gn, [
|
|
2800
2802
|
s("div", Wn, [
|
|
2801
|
-
|
|
2803
|
+
k(m, {
|
|
2802
2804
|
class: "cl-absolute cl-cursor-pointer cl-right-3 cl-text-off-white cl-top-3",
|
|
2803
2805
|
icon: "ph:x",
|
|
2804
2806
|
size: 16,
|
|
2805
|
-
onClick:
|
|
2807
|
+
onClick: f[1] || (f[1] = (v) => c.value = !1)
|
|
2806
2808
|
}),
|
|
2807
|
-
s("h3", Jn,
|
|
2809
|
+
s("h3", Jn, x(o(l)("grid.manageView")), 1),
|
|
2808
2810
|
s("ul", Kn, [
|
|
2809
2811
|
s("li", Zn, [
|
|
2810
|
-
s("strong", Qn,
|
|
2811
|
-
s("strong", Yn,
|
|
2812
|
-
s("strong", Xn,
|
|
2812
|
+
s("strong", Qn, x(o(l)("grid.column")), 1),
|
|
2813
|
+
s("strong", Yn, x(o(l)("grid.visible")), 1),
|
|
2814
|
+
s("strong", Xn, x(o(l)("grid.order")), 1)
|
|
2813
2815
|
]),
|
|
2814
|
-
(i(!0),
|
|
2815
|
-
key:
|
|
2816
|
+
(i(!0), u(z, null, ae(e.columns, (v, p) => (i(), u("li", {
|
|
2817
|
+
key: p,
|
|
2816
2818
|
class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full"
|
|
2817
2819
|
}, [
|
|
2818
|
-
s("div", _n,
|
|
2820
|
+
s("div", _n, x(v.caption), 1),
|
|
2819
2821
|
s("div", eo, [
|
|
2820
|
-
|
|
2821
|
-
"model-value":
|
|
2822
|
+
k(he, {
|
|
2823
|
+
"model-value": v.visible === void 0 || v.visible === !0,
|
|
2822
2824
|
"input-type": "checkbox",
|
|
2823
|
-
onClick: (O) => r(O.target,
|
|
2825
|
+
onClick: (O) => r(O.target, v)
|
|
2824
2826
|
}, null, 8, ["model-value", "onClick"])
|
|
2825
2827
|
]),
|
|
2826
2828
|
s("div", lo, [
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
+
v.visible === void 0 || v.visible === !0 ? (i(), u(z, { key: 0 }, [
|
|
2830
|
+
p !== 0 ? (i(), Q(m, {
|
|
2829
2831
|
key: 0,
|
|
2830
2832
|
class: "cl-cursor-pointer cl-inline-block cl-mr-2",
|
|
2831
2833
|
icon: "ph:arrow-left",
|
|
2832
|
-
onClick: (O) =>
|
|
2834
|
+
onClick: (O) => g(p, "down")
|
|
2833
2835
|
}, null, 8, ["onClick"])) : N("", !0),
|
|
2834
|
-
|
|
2836
|
+
p !== e.columns.length - 1 ? (i(), Q(m, {
|
|
2835
2837
|
key: 1,
|
|
2836
2838
|
class: "cl-cursor-pointer cl-inline-block",
|
|
2837
2839
|
icon: "ph:arrow-right",
|
|
2838
|
-
onClick: (O) =>
|
|
2840
|
+
onClick: (O) => g(p, "up")
|
|
2839
2841
|
}, null, 8, ["onClick"])) : N("", !0)
|
|
2840
|
-
], 64)) : (i(),
|
|
2842
|
+
], 64)) : (i(), u("em", to, x(o(l)("grid.hidden")), 1))
|
|
2841
2843
|
])
|
|
2842
2844
|
]))), 128))
|
|
2843
2845
|
])
|
|
@@ -2861,7 +2863,7 @@ const mn = {
|
|
|
2861
2863
|
}, so = {
|
|
2862
2864
|
key: 2,
|
|
2863
2865
|
class: "cl-pr-2 cl-w-full lg:cl-hidden md:cl-w-1/2"
|
|
2864
|
-
}, tl = /* @__PURE__ */
|
|
2866
|
+
}, tl = /* @__PURE__ */ V({
|
|
2865
2867
|
__name: "cl-ui-grid-header",
|
|
2866
2868
|
props: {
|
|
2867
2869
|
columns: null,
|
|
@@ -2876,73 +2878,73 @@ const mn = {
|
|
|
2876
2878
|
"update:filter-panel-open": null
|
|
2877
2879
|
},
|
|
2878
2880
|
setup(e, { emit: n }) {
|
|
2879
|
-
const t = e, { t: l } =
|
|
2881
|
+
const t = e, { t: l } = de(), c = j(() => {
|
|
2880
2882
|
let r = !1;
|
|
2881
|
-
return t.columns.forEach((
|
|
2882
|
-
(
|
|
2883
|
+
return t.columns.forEach((g) => {
|
|
2884
|
+
(g.filterable === !0 || g.filterable === void 0 || g.sortable === !0 || g.sortable === void 0) && (r = !0);
|
|
2883
2885
|
}), r;
|
|
2884
|
-
}),
|
|
2886
|
+
}), d = j({
|
|
2885
2887
|
get: () => t.columns,
|
|
2886
2888
|
set: (r) => n("update:columns", r)
|
|
2887
2889
|
});
|
|
2888
|
-
return (r,
|
|
2889
|
-
e.editEnabled ? (i(),
|
|
2890
|
-
|
|
2890
|
+
return (r, g) => (i(), u(z, null, [
|
|
2891
|
+
e.editEnabled ? (i(), u("span", co, [
|
|
2892
|
+
k($e, {
|
|
2891
2893
|
class: "cl-w-full lg:cl-w-auto",
|
|
2892
2894
|
size: "small",
|
|
2893
2895
|
colour: "default",
|
|
2894
|
-
onClick:
|
|
2896
|
+
onClick: g[0] || (g[0] = (a) => r.$emit("update:edit-mode", !e.editMode))
|
|
2895
2897
|
}, {
|
|
2896
|
-
default:
|
|
2897
|
-
e.editMode ? (i(),
|
|
2898
|
-
|
|
2899
|
-
], 64)) : (i(),
|
|
2900
|
-
|
|
2898
|
+
default: X(() => [
|
|
2899
|
+
e.editMode ? (i(), u(z, { key: 0 }, [
|
|
2900
|
+
le(x(o(l)("grid.finishEditing")), 1)
|
|
2901
|
+
], 64)) : (i(), u(z, { key: 1 }, [
|
|
2902
|
+
le(x(o(l)("grid.editData")), 1)
|
|
2901
2903
|
], 64))
|
|
2902
2904
|
]),
|
|
2903
2905
|
_: 1
|
|
2904
2906
|
})
|
|
2905
2907
|
])) : N("", !0),
|
|
2906
2908
|
s("span", ao, [
|
|
2907
|
-
|
|
2908
|
-
columns: o(
|
|
2909
|
-
"onUpdate:columns":
|
|
2909
|
+
k(oo, {
|
|
2910
|
+
columns: o(d),
|
|
2911
|
+
"onUpdate:columns": g[1] || (g[1] = (a) => ke(d) ? d.value = a : null)
|
|
2910
2912
|
}, null, 8, ["columns"])
|
|
2911
2913
|
]),
|
|
2912
|
-
o(c) ? (i(),
|
|
2913
|
-
|
|
2914
|
+
o(c) ? (i(), u("span", io, [
|
|
2915
|
+
k($e, {
|
|
2914
2916
|
class: "cl-w-full lg:cl-w-auto",
|
|
2915
2917
|
size: "small",
|
|
2916
|
-
onClick:
|
|
2918
|
+
onClick: g[2] || (g[2] = ie((a) => r.$emit("reset-filters"), ["prevent"]))
|
|
2917
2919
|
}, {
|
|
2918
|
-
default:
|
|
2919
|
-
|
|
2920
|
+
default: X(() => [
|
|
2921
|
+
le(x(o(l)("grid.clearFilters")), 1)
|
|
2920
2922
|
]),
|
|
2921
2923
|
_: 1
|
|
2922
2924
|
})
|
|
2923
2925
|
])) : N("", !0),
|
|
2924
|
-
o(c) ? (i(),
|
|
2925
|
-
|
|
2926
|
+
o(c) ? (i(), u("span", so, [
|
|
2927
|
+
k($e, {
|
|
2926
2928
|
class: "cl-w-full",
|
|
2927
2929
|
colour: "blue",
|
|
2928
2930
|
size: "small",
|
|
2929
|
-
onClick:
|
|
2931
|
+
onClick: g[3] || (g[3] = ie((a) => r.$emit("update:filter-panel-open", !0), ["prevent"]))
|
|
2930
2932
|
}, {
|
|
2931
|
-
default:
|
|
2932
|
-
|
|
2933
|
+
default: X(() => [
|
|
2934
|
+
le(x(o(l)("grid.modifyFilters")), 1)
|
|
2933
2935
|
]),
|
|
2934
2936
|
_: 1
|
|
2935
2937
|
})
|
|
2936
2938
|
])) : N("", !0)
|
|
2937
2939
|
], 64));
|
|
2938
2940
|
}
|
|
2939
|
-
}), ro = { class: "cl-hidden cl-mb-4 cl-w-full lg:cl-block lg:cl-text-right" }, uo = ["data-loading"], fo = { class: "cl-absolute cl-bg-white cl-h-full cl-opacity-40 cl-w-full cl-z-20" }, mo = { class: "cl-bg-white cl-flex cl-flex-wrap cl-sticky cl-top-0 cl-w-full lg:cl-hidden" }, go = { class: "cl-border-b cl-border-grey-2 cl-flex cl-flex-wrap cl-px-2 cl-py-4 cl-w-full" }, bo = { class: "cl-mb-4 cl-text-sm cl-w-full" },
|
|
2941
|
+
}), ro = { class: "cl-hidden cl-mb-4 cl-w-full lg:cl-block lg:cl-text-right" }, uo = ["data-loading"], fo = { class: "cl-absolute cl-bg-white cl-h-full cl-opacity-40 cl-w-full cl-z-20" }, mo = { class: "cl-bg-white cl-flex cl-flex-wrap cl-sticky cl-top-0 cl-w-full lg:cl-hidden" }, go = { class: "cl-border-b cl-border-grey-2 cl-flex cl-flex-wrap cl-px-2 cl-py-4 cl-w-full" }, bo = { class: "cl-mb-4 cl-text-sm cl-w-full" }, ho = { class: "cl-flex cl-flex-wrap cl-w-full" }, vo = { class: "!cl-bg-white cl-absolute cl-h-screen cl-overflow-x-auto cl-p-4 cl-text-sm cl-w-full cl-z-10" }, po = { class: "cl-border-b cl-border-grey-2 cl-mb-2 cl-pb-2 cl-text-right cl-w-full" }, yo = { key: 0 }, wo = { key: 1 }, xo = { class: "cl-self-center" }, ko = { key: 1 }, $o = {
|
|
2940
2942
|
key: 3,
|
|
2941
2943
|
class: "cl-ml-2"
|
|
2942
|
-
}, To = { class: "cl-overflow-auto cl-w-full" }, Co = { class: "cl-min-w-full cl-table-fixed" }, So = { class: "cl-hidden lg:cl-table-column-group" }, Oo = { class: "cl-hidden lg:cl-table-header-group" }, Eo = ["onClick"], Ao = { key: 1 }, jo = { key: 0 }, Mo = { key: 1 },
|
|
2944
|
+
}, To = { class: "cl-overflow-auto cl-w-full" }, Co = { class: "cl-min-w-full cl-table-fixed" }, So = { class: "cl-hidden lg:cl-table-column-group" }, Oo = { class: "cl-hidden lg:cl-table-header-group" }, Eo = ["onClick"], Ao = { key: 1 }, jo = { key: 0 }, Mo = { key: 1 }, No = ["colspan"], Io = { class: "cl-my-10 cl-py-1 cl-text-center cl-text-sm cl-w-full" }, Do = {
|
|
2943
2945
|
key: 0,
|
|
2944
2946
|
class: "cl-w-full"
|
|
2945
|
-
},
|
|
2947
|
+
}, Ro = /* @__PURE__ */ V({
|
|
2946
2948
|
__name: "cl-ui-grid",
|
|
2947
2949
|
props: {
|
|
2948
2950
|
columns: null,
|
|
@@ -2959,95 +2961,99 @@ const mn = {
|
|
|
2959
2961
|
"edit-end": null
|
|
2960
2962
|
},
|
|
2961
2963
|
setup(e, { emit: n }) {
|
|
2962
|
-
const t = e, { t: l } =
|
|
2964
|
+
const t = e, { t: l } = de(), c = Ge(750), d = M({}), r = M(!1), g = M({
|
|
2963
2965
|
index: -1,
|
|
2964
2966
|
record: {}
|
|
2965
|
-
}),
|
|
2967
|
+
}), a = M(!1), f = j({
|
|
2966
2968
|
get: () => t.columns,
|
|
2967
|
-
set: (
|
|
2968
|
-
}),
|
|
2969
|
+
set: ($) => n("update:columns", $)
|
|
2970
|
+
}), m = j({
|
|
2969
2971
|
get: () => t.request,
|
|
2970
|
-
set: (
|
|
2971
|
-
}),
|
|
2972
|
-
let
|
|
2973
|
-
return
|
|
2974
|
-
(
|
|
2975
|
-
}),
|
|
2976
|
-
}),
|
|
2977
|
-
let
|
|
2978
|
-
return
|
|
2979
|
-
(
|
|
2980
|
-
}),
|
|
2981
|
-
}),
|
|
2982
|
-
function
|
|
2983
|
-
const
|
|
2984
|
-
window.innerWidth >= 1024 &&
|
|
2985
|
-
const
|
|
2986
|
-
|
|
2987
|
-
}),
|
|
2988
|
-
}
|
|
2989
|
-
function
|
|
2990
|
-
var
|
|
2991
|
-
return (
|
|
2992
|
-
}
|
|
2993
|
-
function
|
|
2994
|
-
if (typeof
|
|
2995
|
-
const
|
|
2996
|
-
|
|
2997
|
-
sortOnColumn:
|
|
2972
|
+
set: ($) => n("update:request", $)
|
|
2973
|
+
}), v = j(() => f.value.filter(($) => typeof $.visible > "u" || $.visible !== !1)), p = j(() => {
|
|
2974
|
+
let $ = !1;
|
|
2975
|
+
return v.value.forEach((E) => {
|
|
2976
|
+
(E.sortable || E.sortable === void 0) && ($ = !0);
|
|
2977
|
+
}), $;
|
|
2978
|
+
}), O = j(() => {
|
|
2979
|
+
let $ = !1;
|
|
2980
|
+
return v.value.forEach((E) => {
|
|
2981
|
+
(E.filterable || E.filterable === void 0) && ($ = !0);
|
|
2982
|
+
}), $;
|
|
2983
|
+
}), b = j(() => t.columns.find(($) => $.editable === !0) !== void 0);
|
|
2984
|
+
function L() {
|
|
2985
|
+
const $ = {};
|
|
2986
|
+
window.innerWidth >= 1024 && f.value.forEach((E) => {
|
|
2987
|
+
const G = E.width ? `${E.width}px` : "";
|
|
2988
|
+
$[`${E.name}`] = `width: ${G}; min-width: ${G};`;
|
|
2989
|
+
}), d.value = $;
|
|
2990
|
+
}
|
|
2991
|
+
function W($) {
|
|
2992
|
+
var E;
|
|
2993
|
+
return (E = d.value[$]) != null ? E : "";
|
|
2994
|
+
}
|
|
2995
|
+
function h($) {
|
|
2996
|
+
if (typeof $ < "u") {
|
|
2997
|
+
const E = ge(t.request);
|
|
2998
|
+
E.sort === null || E.sort.sortOnColumn !== $ ? E.sort = {
|
|
2999
|
+
sortOnColumn: $,
|
|
2998
3000
|
sortByAscending: !0
|
|
2999
|
-
} :
|
|
3001
|
+
} : E.sort.sortOnColumn === $ && E.sort.sortByAscending === !0 ? E.sort.sortByAscending = !1 : E.sort = null, m.value = E;
|
|
3000
3002
|
}
|
|
3001
3003
|
}
|
|
3002
|
-
function
|
|
3003
|
-
const
|
|
3004
|
-
|
|
3004
|
+
function C() {
|
|
3005
|
+
const $ = ge(m.value);
|
|
3006
|
+
$.pageNumber = 1, $.filters = [], m.value = $;
|
|
3005
3007
|
}
|
|
3006
|
-
function
|
|
3007
|
-
|
|
3008
|
+
function P($) {
|
|
3009
|
+
g.value.index !== -1 && g.value.index !== $ && R(), g.value.index = $;
|
|
3008
3010
|
}
|
|
3009
|
-
function
|
|
3010
|
-
|
|
3011
|
+
function _($, E) {
|
|
3012
|
+
E !== void 0 && (g.value.record[E] = $);
|
|
3011
3013
|
}
|
|
3012
|
-
function
|
|
3013
|
-
if (
|
|
3014
|
-
const { [
|
|
3015
|
-
|
|
3016
|
-
...
|
|
3014
|
+
function T($) {
|
|
3015
|
+
if ($ !== void 0) {
|
|
3016
|
+
const { [$]: E, ...G } = g.value.record;
|
|
3017
|
+
g.value.record = {
|
|
3018
|
+
...G
|
|
3017
3019
|
};
|
|
3018
3020
|
}
|
|
3019
3021
|
}
|
|
3020
|
-
function
|
|
3021
|
-
Object.keys(
|
|
3022
|
+
function R() {
|
|
3023
|
+
Object.keys(g.value.record).length !== 0 && (n("row-edit", ge(g.value)), g.value.record = {});
|
|
3022
3024
|
}
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3025
|
+
function H($, E) {
|
|
3026
|
+
const G = ge(m.value), A = G.filters.findIndex((I) => I.filterOnColumn === $.filterOnColumn);
|
|
3027
|
+
A > -1 ? G.filters[A] = $ : G.filters.push($), E && (G.pageNumber = 1), m.value = G;
|
|
3028
|
+
}
|
|
3029
|
+
return Me(() => {
|
|
3030
|
+
window.addEventListener("resize", L), L();
|
|
3031
|
+
}), Re(() => window.removeEventListener("resize", L)), ne(() => t.request, () => c.debounce(() => n("data-request")), {
|
|
3026
3032
|
deep: !0,
|
|
3027
3033
|
immediate: !0
|
|
3028
|
-
}),
|
|
3029
|
-
|
|
3030
|
-
}), (
|
|
3031
|
-
var
|
|
3032
|
-
const
|
|
3033
|
-
return i(),
|
|
3034
|
+
}), ne(() => r.value, () => {
|
|
3035
|
+
r.value ? n("edit-start") : (R(), n("edit-end"), g.value.index = -1);
|
|
3036
|
+
}), ($, E) => {
|
|
3037
|
+
var A, I;
|
|
3038
|
+
const G = te("icon");
|
|
3039
|
+
return i(), u(z, null, [
|
|
3034
3040
|
s("div", ro, [
|
|
3035
|
-
|
|
3036
|
-
columns: o(
|
|
3037
|
-
"onUpdate:columns":
|
|
3038
|
-
"edit-mode":
|
|
3039
|
-
"onUpdate:edit-mode":
|
|
3040
|
-
"edit-enabled": o(
|
|
3041
|
-
onResetFilters:
|
|
3041
|
+
k(tl, {
|
|
3042
|
+
columns: o(f),
|
|
3043
|
+
"onUpdate:columns": E[0] || (E[0] = (w) => ke(f) ? f.value = w : null),
|
|
3044
|
+
"edit-mode": r.value,
|
|
3045
|
+
"onUpdate:edit-mode": E[1] || (E[1] = (w) => r.value = w),
|
|
3046
|
+
"edit-enabled": o(b),
|
|
3047
|
+
onResetFilters: C
|
|
3042
3048
|
}, null, 8, ["columns", "edit-mode", "edit-enabled"])
|
|
3043
3049
|
]),
|
|
3044
3050
|
s("div", {
|
|
3045
3051
|
class: "cl-relative cl-w-full grid-wrapper",
|
|
3046
3052
|
"data-loading": e.loading
|
|
3047
3053
|
}, [
|
|
3048
|
-
|
|
3049
|
-
default:
|
|
3050
|
-
|
|
3054
|
+
k(Te, { name: "fade" }, {
|
|
3055
|
+
default: X(() => [
|
|
3056
|
+
B(s("div", fo, null, 512), [
|
|
3051
3057
|
[F, e.loading]
|
|
3052
3058
|
])
|
|
3053
3059
|
]),
|
|
@@ -3055,78 +3061,78 @@ const mn = {
|
|
|
3055
3061
|
}),
|
|
3056
3062
|
s("div", mo, [
|
|
3057
3063
|
s("div", go, [
|
|
3058
|
-
s("strong", bo,
|
|
3059
|
-
s("div",
|
|
3060
|
-
|
|
3061
|
-
columns: o(
|
|
3062
|
-
"onUpdate:columns":
|
|
3063
|
-
"edit-mode":
|
|
3064
|
-
"onUpdate:edit-mode":
|
|
3065
|
-
"filter-panel-open":
|
|
3066
|
-
"onUpdate:filter-panel-open":
|
|
3067
|
-
"edit-enabled": o(
|
|
3068
|
-
onResetFilters:
|
|
3064
|
+
s("strong", bo, x(o(l)("grid.gridTools")), 1),
|
|
3065
|
+
s("div", ho, [
|
|
3066
|
+
k(tl, {
|
|
3067
|
+
columns: o(f),
|
|
3068
|
+
"onUpdate:columns": E[2] || (E[2] = (w) => ke(f) ? f.value = w : null),
|
|
3069
|
+
"edit-mode": r.value,
|
|
3070
|
+
"onUpdate:edit-mode": E[3] || (E[3] = (w) => r.value = w),
|
|
3071
|
+
"filter-panel-open": a.value,
|
|
3072
|
+
"onUpdate:filter-panel-open": E[4] || (E[4] = (w) => a.value = w),
|
|
3073
|
+
"edit-enabled": o(b),
|
|
3074
|
+
onResetFilters: C
|
|
3069
3075
|
}, null, 8, ["columns", "edit-mode", "filter-panel-open", "edit-enabled"])
|
|
3070
3076
|
])
|
|
3071
3077
|
]),
|
|
3072
|
-
|
|
3073
|
-
default:
|
|
3074
|
-
|
|
3078
|
+
k(Te, { name: "grow-down" }, {
|
|
3079
|
+
default: X(() => [
|
|
3080
|
+
B(s("div", vo, [
|
|
3075
3081
|
s("div", po, [
|
|
3076
|
-
|
|
3082
|
+
k(G, {
|
|
3077
3083
|
class: "cl--mt-1 cl-inline-block cl-text-grey-5",
|
|
3078
3084
|
icon: "ph:x",
|
|
3079
3085
|
size: 16,
|
|
3080
|
-
onClick:
|
|
3081
|
-
|
|
3086
|
+
onClick: E[5] || (E[5] = (w) => {
|
|
3087
|
+
a.value = !1;
|
|
3082
3088
|
})
|
|
3083
3089
|
})
|
|
3084
3090
|
]),
|
|
3085
3091
|
s("div", {
|
|
3086
3092
|
class: U(["cl-font-semibold cl-grid cl-grid-cols-3 cl-mb-2", {
|
|
3087
|
-
"cl-grid-cols-2": !o(
|
|
3088
|
-
"cl-grid-cols-3": o(
|
|
3093
|
+
"cl-grid-cols-2": !o(O) || !o(p),
|
|
3094
|
+
"cl-grid-cols-3": o(O) && o(p)
|
|
3089
3095
|
}])
|
|
3090
3096
|
}, [
|
|
3091
|
-
s("div", null,
|
|
3092
|
-
o(
|
|
3093
|
-
o(p) ? (i(),
|
|
3097
|
+
s("div", null, x(o(l)("grid.field")), 1),
|
|
3098
|
+
o(O) ? (i(), u("div", yo, x(o(l)("grid.filter")), 1)) : N("", !0),
|
|
3099
|
+
o(p) ? (i(), u("div", wo, x(o(l)("grid.sortBy")), 1)) : N("", !0)
|
|
3094
3100
|
], 2),
|
|
3095
|
-
(i(!0),
|
|
3096
|
-
key:
|
|
3101
|
+
(i(!0), u(z, null, ae(o(v).filter((w) => w.filterable || w.filterable === void 0 || w.sortable || w.sortable === void 0), (w, Z) => (i(), u("div", {
|
|
3102
|
+
key: Z,
|
|
3097
3103
|
class: "cl-grid cl-grid-cols-3 cl-mb-4 cl-w-full"
|
|
3098
3104
|
}, [
|
|
3099
|
-
s("div", xo,
|
|
3100
|
-
|
|
3105
|
+
s("div", xo, x(w.caption), 1),
|
|
3106
|
+
w.filterable || w.filterable === void 0 ? (i(), Q(ll, {
|
|
3101
3107
|
key: 0,
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
column: m,
|
|
3108
|
+
filter: o(m).filters.find((y) => y.filterOnColumn === w.field),
|
|
3109
|
+
column: w,
|
|
3105
3110
|
class: U({
|
|
3106
3111
|
"cl-col-span-2": !o(p)
|
|
3107
|
-
})
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3112
|
+
}),
|
|
3113
|
+
"onUpdate:filter": H
|
|
3114
|
+
}, null, 8, ["filter", "column", "class"])) : o(O) ? (i(), u("div", ko)) : N("", !0),
|
|
3115
|
+
(w.type !== "slot" || w.slotType !== void 0 && w.field !== void 0) && (w.sortable === void 0 || w.sortable === !0) ? (i(), u(z, { key: 2 }, [
|
|
3116
|
+
o(m).sort === null || o(m).sort.sortOnColumn !== w.field ? (i(), Q(G, {
|
|
3111
3117
|
key: 0,
|
|
3112
3118
|
class: "cl-cursor-pointer cl-ml-2 cl-self-center",
|
|
3113
3119
|
icon: "ph:minus",
|
|
3114
|
-
onClick: (
|
|
3115
|
-
}, null, 8, ["onClick"])) : o(
|
|
3120
|
+
onClick: (y) => h(w.field)
|
|
3121
|
+
}, null, 8, ["onClick"])) : o(m).sort.sortByAscending === !1 ? (i(), Q(G, {
|
|
3116
3122
|
key: 1,
|
|
3117
3123
|
class: "cl-cursor-pointer cl-ml-2 cl-self-center",
|
|
3118
3124
|
icon: "ph:caret-down",
|
|
3119
|
-
onClick: (
|
|
3120
|
-
}, null, 8, ["onClick"])) : (i(),
|
|
3125
|
+
onClick: (y) => h(w.field)
|
|
3126
|
+
}, null, 8, ["onClick"])) : (i(), Q(G, {
|
|
3121
3127
|
key: 2,
|
|
3122
3128
|
class: "cl-cursor-pointer cl-ml-2 cl-self-center",
|
|
3123
3129
|
icon: "ph:caret-up",
|
|
3124
|
-
onClick: (
|
|
3130
|
+
onClick: (y) => h(w.field)
|
|
3125
3131
|
}, null, 8, ["onClick"]))
|
|
3126
|
-
], 64)) : (i(),
|
|
3132
|
+
], 64)) : (i(), u("div", $o, " \xA0 "))
|
|
3127
3133
|
]))), 128))
|
|
3128
3134
|
], 512), [
|
|
3129
|
-
[F,
|
|
3135
|
+
[F, a.value]
|
|
3130
3136
|
])
|
|
3131
3137
|
]),
|
|
3132
3138
|
_: 1
|
|
@@ -3135,113 +3141,113 @@ const mn = {
|
|
|
3135
3141
|
s("div", To, [
|
|
3136
3142
|
s("table", Co, [
|
|
3137
3143
|
s("colgroup", So, [
|
|
3138
|
-
(i(!0),
|
|
3139
|
-
key:
|
|
3140
|
-
style:
|
|
3144
|
+
(i(!0), u(z, null, ae(o(v), (w, Z) => (i(), u("col", {
|
|
3145
|
+
key: Z,
|
|
3146
|
+
style: Ee(W(w.name)),
|
|
3141
3147
|
span: 1
|
|
3142
3148
|
}, null, 4))), 128))
|
|
3143
3149
|
]),
|
|
3144
3150
|
s("thead", Oo, [
|
|
3145
3151
|
s("tr", null, [
|
|
3146
|
-
(i(!0),
|
|
3147
|
-
var
|
|
3148
|
-
return i(),
|
|
3149
|
-
key:
|
|
3152
|
+
(i(!0), u(z, null, ae(o(v), (w, Z) => {
|
|
3153
|
+
var y;
|
|
3154
|
+
return i(), u("th", {
|
|
3155
|
+
key: Z,
|
|
3150
3156
|
class: "cl-border-b cl-border-grey-2 cl-font-semibold cl-p-1 cl-text-grey-3 cl-text-left cl-text-sm",
|
|
3151
|
-
style:
|
|
3157
|
+
style: Ee(W(w.name))
|
|
3152
3158
|
}, [
|
|
3153
|
-
e.data && ((
|
|
3159
|
+
e.data && ((y = e.data.results) == null ? void 0 : y.length) && (w.type !== "slot" || w.slotType !== void 0 && w.field !== void 0) && (w.sortable === void 0 || w.sortable === !0) ? (i(), u("span", {
|
|
3154
3160
|
key: 0,
|
|
3155
3161
|
class: "cl-cursor-pointer",
|
|
3156
|
-
onClick: (
|
|
3162
|
+
onClick: (J) => h(w.field)
|
|
3157
3163
|
}, [
|
|
3158
|
-
|
|
3159
|
-
|
|
3164
|
+
le(x(w.caption) + " ", 1),
|
|
3165
|
+
B(k(G, {
|
|
3160
3166
|
class: "cl--mt-1 cl-inline-block",
|
|
3161
3167
|
icon: "ph:caret-up"
|
|
3162
3168
|
}, null, 512), [
|
|
3163
|
-
[F, o(
|
|
3169
|
+
[F, o(m).sort !== null && o(m).sort.sortOnColumn === w.field && o(m).sort.sortByAscending === !0]
|
|
3164
3170
|
]),
|
|
3165
|
-
|
|
3171
|
+
B(k(G, {
|
|
3166
3172
|
class: "cl--mt-1 cl-inline-block",
|
|
3167
3173
|
icon: "ph:caret-down"
|
|
3168
3174
|
}, null, 512), [
|
|
3169
|
-
[F, o(
|
|
3175
|
+
[F, o(m).sort !== null && o(m).sort.sortOnColumn === w.field && o(m).sort.sortByAscending === !1]
|
|
3170
3176
|
])
|
|
3171
|
-
], 8, Eo)) : (i(),
|
|
3177
|
+
], 8, Eo)) : (i(), u("span", Ao, x(w.caption), 1))
|
|
3172
3178
|
], 4);
|
|
3173
3179
|
}), 128))
|
|
3174
3180
|
]),
|
|
3175
|
-
e.data && ((
|
|
3176
|
-
(i(!0),
|
|
3177
|
-
key:
|
|
3181
|
+
e.data && ((A = e.data.results) == null ? void 0 : A.length) || o(m).filters.length > 0 ? (i(), u("tr", jo, [
|
|
3182
|
+
(i(!0), u(z, null, ae(o(v), (w, Z) => (i(), u("th", {
|
|
3183
|
+
key: Z,
|
|
3178
3184
|
class: "cl-p-1",
|
|
3179
|
-
style:
|
|
3185
|
+
style: Ee(W(w.name))
|
|
3180
3186
|
}, [
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
"
|
|
3186
|
-
}, null, 8, ["
|
|
3187
|
+
k(ll, {
|
|
3188
|
+
filter: o(m).filters.find((y) => y.filterOnColumn === w.field),
|
|
3189
|
+
column: w,
|
|
3190
|
+
"first-half": Z <= o(v).length / 2,
|
|
3191
|
+
"onUpdate:filter": H
|
|
3192
|
+
}, null, 8, ["filter", "column", "first-half"])
|
|
3187
3193
|
], 4))), 128))
|
|
3188
3194
|
])) : N("", !0)
|
|
3189
3195
|
]),
|
|
3190
3196
|
s("tbody", null, [
|
|
3191
|
-
e.data && ((
|
|
3192
|
-
key:
|
|
3197
|
+
e.data && ((I = e.data.results) == null ? void 0 : I.length) ? (i(!0), u(z, { key: 0 }, ae(e.data.results, (w, Z) => (i(), u("tr", {
|
|
3198
|
+
key: Z,
|
|
3193
3199
|
class: U({
|
|
3194
|
-
"cl-bg-white":
|
|
3195
|
-
"cl-bg-off-white":
|
|
3200
|
+
"cl-bg-white": Z % 2 !== 1,
|
|
3201
|
+
"cl-bg-off-white": Z % 2 === 1
|
|
3196
3202
|
})
|
|
3197
3203
|
}, [
|
|
3198
|
-
(i(!0),
|
|
3199
|
-
key:
|
|
3204
|
+
(i(!0), u(z, null, ae(o(v), (y, J) => (i(), Q(nn, {
|
|
3205
|
+
key: J,
|
|
3200
3206
|
class: "cl-p-2 cl-rounded cl-whitespace-nowrap",
|
|
3201
|
-
style:
|
|
3202
|
-
column:
|
|
3203
|
-
record:
|
|
3204
|
-
"edit-mode":
|
|
3205
|
-
onFocus: (
|
|
3206
|
-
onEdit: (
|
|
3207
|
-
|
|
3207
|
+
style: Ee(W(y.name)),
|
|
3208
|
+
column: y,
|
|
3209
|
+
record: w,
|
|
3210
|
+
"edit-mode": r.value,
|
|
3211
|
+
onFocus: (ee) => P(Z),
|
|
3212
|
+
onEdit: (ee) => {
|
|
3213
|
+
P(Z), _(ee, y.field);
|
|
3208
3214
|
},
|
|
3209
|
-
onUndoEdit: (
|
|
3215
|
+
onUndoEdit: (ee) => T(y.field)
|
|
3210
3216
|
}, ml({ _: 2 }, [
|
|
3211
|
-
|
|
3212
|
-
name:
|
|
3213
|
-
fn:
|
|
3214
|
-
D(
|
|
3217
|
+
ae($.$slots, (ee, se) => ({
|
|
3218
|
+
name: se,
|
|
3219
|
+
fn: X((Se) => [
|
|
3220
|
+
D($.$slots, se, ue(ye(Se)), void 0, !0)
|
|
3215
3221
|
])
|
|
3216
3222
|
}))
|
|
3217
3223
|
]), 1032, ["style", "column", "record", "edit-mode", "onFocus", "onEdit", "onUndoEdit"]))), 128))
|
|
3218
|
-
], 2))), 128)) : (i(),
|
|
3224
|
+
], 2))), 128)) : (i(), u("tr", Mo, [
|
|
3219
3225
|
s("td", {
|
|
3220
|
-
colspan: o(
|
|
3226
|
+
colspan: o(v).length
|
|
3221
3227
|
}, [
|
|
3222
|
-
s("div",
|
|
3223
|
-
s("strong", null,
|
|
3224
|
-
o(
|
|
3225
|
-
|
|
3226
|
-
|
|
3228
|
+
s("div", Io, [
|
|
3229
|
+
s("strong", null, x(o(l)("grid.noData")), 1),
|
|
3230
|
+
o(m).filters.length > 0 ? (i(), u("div", Do, [
|
|
3231
|
+
le(x(o(l)("grid.noDataFiltersPresent")) + " ", 1),
|
|
3232
|
+
k($e, {
|
|
3227
3233
|
size: "small",
|
|
3228
|
-
onClick:
|
|
3234
|
+
onClick: ie(C, ["prevent"])
|
|
3229
3235
|
}, {
|
|
3230
|
-
default:
|
|
3231
|
-
|
|
3236
|
+
default: X(() => [
|
|
3237
|
+
le(x(o(l)("grid.clearFilters")), 1)
|
|
3232
3238
|
]),
|
|
3233
3239
|
_: 1
|
|
3234
3240
|
}, 8, ["onClick"])
|
|
3235
3241
|
])) : N("", !0)
|
|
3236
3242
|
])
|
|
3237
|
-
], 8,
|
|
3243
|
+
], 8, No)
|
|
3238
3244
|
]))
|
|
3239
3245
|
])
|
|
3240
3246
|
])
|
|
3241
3247
|
]),
|
|
3242
|
-
|
|
3243
|
-
request: o(
|
|
3244
|
-
"onUpdate:request":
|
|
3248
|
+
k(Hn, {
|
|
3249
|
+
request: o(m),
|
|
3250
|
+
"onUpdate:request": E[6] || (E[6] = (w) => ke(m) ? m.value = w : null),
|
|
3245
3251
|
data: e.data
|
|
3246
3252
|
}, null, 8, ["request", "data"])
|
|
3247
3253
|
], 8, uo)
|
|
@@ -3249,11 +3255,11 @@ const mn = {
|
|
|
3249
3255
|
};
|
|
3250
3256
|
}
|
|
3251
3257
|
});
|
|
3252
|
-
const
|
|
3258
|
+
const qo = /* @__PURE__ */ ve(Ro, [["__scopeId", "data-v-06d43d8f"]]), Uo = { class: "cl-absolute cl-bg-secondary-default cl-flex cl-h-20 cl-items-center cl-justify-between cl-left-0 cl-top-0 cl-w-full cl-z-40" }, zo = /* @__PURE__ */ V({
|
|
3253
3259
|
__name: "cl-ui-header",
|
|
3254
3260
|
emits: ["open-click"],
|
|
3255
3261
|
setup(e) {
|
|
3256
|
-
return (n, t) => (i(),
|
|
3262
|
+
return (n, t) => (i(), u("header", Uo, [
|
|
3257
3263
|
D(n.$slots, "logo"),
|
|
3258
3264
|
s("div", {
|
|
3259
3265
|
class: "cl-cursor-pointer cl-flex cl-flex-nowrap",
|
|
@@ -3270,7 +3276,7 @@ const Ro = /* @__PURE__ */ pe(Do, [["__scopeId", "data-v-fd5a46a8"]]), Uo = { cl
|
|
|
3270
3276
|
}, Vo = {
|
|
3271
3277
|
key: 1,
|
|
3272
3278
|
class: "cl-text-ellipsis cl-text-xs cl-whitespace-nowrap"
|
|
3273
|
-
}, Ho = { class: "cl-content-center cl-flex cl-h-20 cl-items-center cl-justify-center cl-justify-items-center cl-transition-all cl-w-10 md:cl-ml-4 md:cl-w-20" }, Go = { class: "cl-absolute cl-bg-white cl-right-0 cl-shadow-2xl cl-top-20 cl-w-full cl-z-20" }, Wo = /* @__PURE__ */
|
|
3279
|
+
}, Ho = { class: "cl-content-center cl-flex cl-h-20 cl-items-center cl-justify-center cl-justify-items-center cl-transition-all cl-w-10 md:cl-ml-4 md:cl-w-20" }, Go = { class: "cl-absolute cl-bg-white cl-right-0 cl-shadow-2xl cl-top-20 cl-w-full cl-z-20" }, Wo = /* @__PURE__ */ V({
|
|
3274
3280
|
__name: "cl-ui-header-menu",
|
|
3275
3281
|
props: {
|
|
3276
3282
|
username: { default: "" },
|
|
@@ -3280,24 +3286,24 @@ const Ro = /* @__PURE__ */ pe(Do, [["__scopeId", "data-v-fd5a46a8"]]), Uo = { cl
|
|
|
3280
3286
|
},
|
|
3281
3287
|
emits: ["update:is-open"],
|
|
3282
3288
|
setup(e, { emit: n }) {
|
|
3283
|
-
const t = e, l =
|
|
3289
|
+
const t = e, l = M();
|
|
3284
3290
|
nl(l, c);
|
|
3285
3291
|
function c() {
|
|
3286
3292
|
t.isOpen === !0 && n("update:is-open", !1);
|
|
3287
3293
|
}
|
|
3288
|
-
return (
|
|
3289
|
-
const
|
|
3290
|
-
return i(),
|
|
3294
|
+
return (d, r) => {
|
|
3295
|
+
const g = te("icon");
|
|
3296
|
+
return i(), u("div", {
|
|
3291
3297
|
ref_key: "headerMenuElement",
|
|
3292
3298
|
ref: l,
|
|
3293
3299
|
class: "cl-bg-blue-light md:cl-relative"
|
|
3294
3300
|
}, [
|
|
3295
3301
|
s("div", Bo, [
|
|
3296
|
-
e.image ? (i(),
|
|
3302
|
+
e.image ? (i(), u("img", {
|
|
3297
3303
|
key: 0,
|
|
3298
3304
|
src: e.image,
|
|
3299
3305
|
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"
|
|
3300
|
-
}, null, 8, Lo)) : (i(),
|
|
3306
|
+
}, null, 8, Lo)) : (i(), Q(g, {
|
|
3301
3307
|
key: 1,
|
|
3302
3308
|
class: "cl-hidden cl-m-4 cl-text-white md:cl-block",
|
|
3303
3309
|
icon: "ph:user-circle",
|
|
@@ -3305,11 +3311,11 @@ const Ro = /* @__PURE__ */ pe(Do, [["__scopeId", "data-v-fd5a46a8"]]), Uo = { cl
|
|
|
3305
3311
|
height: "48"
|
|
3306
3312
|
})),
|
|
3307
3313
|
s("div", Po, [
|
|
3308
|
-
e.username ? (i(),
|
|
3309
|
-
e.group ? (i(),
|
|
3314
|
+
e.username ? (i(), u("div", Fo, x(e.username), 1)) : N("", !0),
|
|
3315
|
+
e.group ? (i(), u("div", Vo, x(e.group), 1)) : N("", !0)
|
|
3310
3316
|
]),
|
|
3311
3317
|
s("div", Ho, [
|
|
3312
|
-
|
|
3318
|
+
k(g, {
|
|
3313
3319
|
class: U(["cl-text-white cl-transform-gpu cl-transition-transform", {
|
|
3314
3320
|
"cl-rotate-180": e.isOpen
|
|
3315
3321
|
}]),
|
|
@@ -3317,10 +3323,10 @@ const Ro = /* @__PURE__ */ pe(Do, [["__scopeId", "data-v-fd5a46a8"]]), Uo = { cl
|
|
|
3317
3323
|
}, null, 8, ["class"])
|
|
3318
3324
|
])
|
|
3319
3325
|
]),
|
|
3320
|
-
|
|
3321
|
-
default:
|
|
3322
|
-
|
|
3323
|
-
D(
|
|
3326
|
+
k(Te, { name: "fade" }, {
|
|
3327
|
+
default: X(() => [
|
|
3328
|
+
B(s("div", Go, [
|
|
3329
|
+
D(d.$slots, "default")
|
|
3324
3330
|
], 512), [
|
|
3325
3331
|
[F, e.isOpen]
|
|
3326
3332
|
])
|
|
@@ -3370,7 +3376,7 @@ function Zo(e) {
|
|
|
3370
3376
|
const Qo = {
|
|
3371
3377
|
key: 0,
|
|
3372
3378
|
class: "cl-flex cl-relative cl-select-none cl-w-auto cl-z-30"
|
|
3373
|
-
}, Yo = { class: "cl-absolute cl-bg-white cl-border cl-border-grey-0 cl-overflow-hidden cl-right-0 cl-rounded cl-shadow-xl cl-text-black cl-top-6 cl-z-3" }, Xo = ["data-localename", "data-localecode", "onClick"], _o = { class: "cl-text-xs" }, ec = /* @__PURE__ */
|
|
3379
|
+
}, Yo = { class: "cl-absolute cl-bg-white cl-border cl-border-grey-0 cl-overflow-hidden cl-right-0 cl-rounded cl-shadow-xl cl-text-black cl-top-6 cl-z-3" }, Xo = ["data-localename", "data-localecode", "onClick"], _o = { class: "cl-text-xs" }, ec = /* @__PURE__ */ V({
|
|
3374
3380
|
__name: "cl-ui-language-switcher",
|
|
3375
3381
|
props: {
|
|
3376
3382
|
supportedLanguages: null,
|
|
@@ -3378,41 +3384,41 @@ const Qo = {
|
|
|
3378
3384
|
},
|
|
3379
3385
|
emits: ["language-select"],
|
|
3380
3386
|
setup(e, { emit: n }) {
|
|
3381
|
-
const t = e, { locale: l } =
|
|
3387
|
+
const t = e, { locale: l } = de(), c = M(!1), d = j(() => {
|
|
3382
3388
|
var a;
|
|
3383
|
-
return (a = t.supportedLanguages.find((
|
|
3384
|
-
}), r =
|
|
3385
|
-
function
|
|
3389
|
+
return (a = t.supportedLanguages.find((f) => f.localeCode === l.value)) != null ? a : null;
|
|
3390
|
+
}), r = j(() => t.supportedLanguages.filter((a) => Ve(a)).sort((a, f) => a.nativeName > f.nativeName ? 1 : f.nativeName > a.nativeName ? -1 : 0));
|
|
3391
|
+
function g() {
|
|
3386
3392
|
t.disabled || (c.value = !c.value);
|
|
3387
3393
|
}
|
|
3388
|
-
return
|
|
3394
|
+
return ne(() => t.disabled, (a) => {
|
|
3389
3395
|
a && (c.value = !1);
|
|
3390
|
-
}), (a,
|
|
3396
|
+
}), (a, f) => o(d) !== null && o(Ve)(o(d)) ? (i(), u("div", Qo, [
|
|
3391
3397
|
s("div", {
|
|
3392
3398
|
class: U(["cl-flex cl-items-center", {
|
|
3393
3399
|
"cl-cursor-pointer": !e.disabled
|
|
3394
3400
|
}]),
|
|
3395
|
-
onClick:
|
|
3401
|
+
onClick: g
|
|
3396
3402
|
}, [
|
|
3397
3403
|
s("span", {
|
|
3398
3404
|
class: U(["cl-font-semibold cl-text-xs", {
|
|
3399
3405
|
"cl-opacity-50": e.disabled
|
|
3400
3406
|
}])
|
|
3401
|
-
},
|
|
3407
|
+
}, x(o(d).nativeName), 3)
|
|
3402
3408
|
], 2),
|
|
3403
|
-
|
|
3404
|
-
default:
|
|
3405
|
-
|
|
3406
|
-
(i(!0),
|
|
3407
|
-
key:
|
|
3409
|
+
k(Te, { name: "fade" }, {
|
|
3410
|
+
default: X(() => [
|
|
3411
|
+
B(s("div", Yo, [
|
|
3412
|
+
(i(!0), u(z, null, ae(o(r), (m, v) => (i(), u("div", {
|
|
3413
|
+
key: v,
|
|
3408
3414
|
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",
|
|
3409
|
-
"data-localename":
|
|
3410
|
-
"data-localecode":
|
|
3411
|
-
onClick: (
|
|
3412
|
-
l.value =
|
|
3415
|
+
"data-localename": m.name,
|
|
3416
|
+
"data-localecode": m.localeCode,
|
|
3417
|
+
onClick: (p) => {
|
|
3418
|
+
l.value = m.localeCode, g(), n("language-select", m.localeCode);
|
|
3413
3419
|
}
|
|
3414
3420
|
}, [
|
|
3415
|
-
s("span", _o,
|
|
3421
|
+
s("span", _o, x(m.nativeName), 1)
|
|
3416
3422
|
], 8, Xo))), 128))
|
|
3417
3423
|
], 512), [
|
|
3418
3424
|
[F, c.value]
|
|
@@ -3425,7 +3431,7 @@ const Qo = {
|
|
|
3425
3431
|
}), lc = { class: "cl-relative" }, tc = { class: "cl-h-screen cl-z-0" }, nc = { class: "cl-absolute cl-bg-secondary-default cl-gap-y-1 cl-grid cl-grid-cols-1 cl-left-0 cl-opacity-95 cl-p-6 cl-top-0 cl-w-full cl-z-10 lg:cl-gap-x-1 lg:cl-grid-cols-10 lg:cl-p-10" }, oc = { class: "cl-col-span-10 lg:cl-col-span-3" }, cc = {
|
|
3426
3432
|
key: 0,
|
|
3427
3433
|
class: "cl-col-span-10 cl-flex cl-items-start cl-justify-end cl-text-white lg:cl-col-span-1 lg:cl-p-2"
|
|
3428
|
-
}, ac = { class: "cl-col-span-3" }, ic = { class: "cl-inline cl-relative cl-text-grey-4" }, sc = { class: "cl-col-span-3" }, rc = { class: "cl-inline cl-relative cl-text-grey-4" }, uc = { class: "cl-col-span-10 cl-emphasis-danger cl-mt-10 cl-p-3 cl-rounded-md cl-text-sm md:cl-mt-3" }, dc = /* @__PURE__ */
|
|
3434
|
+
}, ac = { class: "cl-col-span-3" }, ic = { class: "cl-inline cl-relative cl-text-grey-4" }, sc = { class: "cl-col-span-3" }, rc = { class: "cl-inline cl-relative cl-text-grey-4" }, uc = { class: "cl-col-span-10 cl-emphasis-danger cl-mt-10 cl-p-3 cl-rounded-md cl-text-sm md:cl-mt-3" }, dc = /* @__PURE__ */ V({
|
|
3429
3435
|
__name: "cl-ui-login",
|
|
3430
3436
|
props: {
|
|
3431
3437
|
errors: { default: () => [] },
|
|
@@ -3436,56 +3442,56 @@ const Qo = {
|
|
|
3436
3442
|
"update:errors": null
|
|
3437
3443
|
},
|
|
3438
3444
|
setup(e, { emit: n }) {
|
|
3439
|
-
const { t } =
|
|
3440
|
-
function
|
|
3441
|
-
const
|
|
3445
|
+
const { t } = de(), l = M(""), c = M(""), d = M("password"), r = M();
|
|
3446
|
+
function g() {
|
|
3447
|
+
const v = {
|
|
3442
3448
|
username: l.value,
|
|
3443
3449
|
password: c.value
|
|
3444
3450
|
};
|
|
3445
|
-
n("login",
|
|
3451
|
+
n("login", v);
|
|
3446
3452
|
}
|
|
3447
3453
|
function a() {
|
|
3448
3454
|
n("update:errors", []);
|
|
3449
3455
|
}
|
|
3450
|
-
function
|
|
3456
|
+
function f(v, p) {
|
|
3451
3457
|
const O = {
|
|
3452
3458
|
valid: !0,
|
|
3453
3459
|
message: ""
|
|
3454
3460
|
};
|
|
3455
|
-
return typeof
|
|
3461
|
+
return typeof p == "string" && p.trim() === "" && (O.valid = !1), O;
|
|
3456
3462
|
}
|
|
3457
|
-
function
|
|
3458
|
-
r.value =
|
|
3463
|
+
function m(v, p) {
|
|
3464
|
+
r.value = v;
|
|
3459
3465
|
}
|
|
3460
|
-
return (
|
|
3461
|
-
const O =
|
|
3462
|
-
return i(),
|
|
3466
|
+
return (v, p) => {
|
|
3467
|
+
const O = te("icon");
|
|
3468
|
+
return i(), u("div", lc, [
|
|
3463
3469
|
s("div", tc, [
|
|
3464
|
-
D(
|
|
3470
|
+
D(v.$slots, "background")
|
|
3465
3471
|
]),
|
|
3466
3472
|
s("form", nc, [
|
|
3467
3473
|
s("div", oc, [
|
|
3468
|
-
D(
|
|
3474
|
+
D(v.$slots, "logo")
|
|
3469
3475
|
]),
|
|
3470
|
-
|
|
3471
|
-
D(
|
|
3476
|
+
v.$slots["language-switcher"] ? (i(), u("div", cc, [
|
|
3477
|
+
D(v.$slots, "language-switcher")
|
|
3472
3478
|
])) : N("", !0),
|
|
3473
3479
|
s("div", {
|
|
3474
3480
|
class: U(["cl-gap-y-4 cl-grid cl-grid-cols-1 lg:cl-gap-x-2 lg:cl-grid-cols-8", {
|
|
3475
|
-
"cl-col-span-7": !
|
|
3476
|
-
"cl-col-span-6":
|
|
3481
|
+
"cl-col-span-7": !v.$slots["language-switcher"],
|
|
3482
|
+
"cl-col-span-6": v.$slots["language-switcher"]
|
|
3477
3483
|
}])
|
|
3478
3484
|
}, [
|
|
3479
3485
|
s("div", ac, [
|
|
3480
3486
|
s("div", ic, [
|
|
3481
|
-
|
|
3487
|
+
k(O, {
|
|
3482
3488
|
class: "cl-absolute cl-left-3 cl-top-2.5",
|
|
3483
3489
|
icon: "ph:user",
|
|
3484
3490
|
size: 18
|
|
3485
3491
|
}),
|
|
3486
|
-
|
|
3492
|
+
k(he, {
|
|
3487
3493
|
modelValue: l.value,
|
|
3488
|
-
"onUpdate:modelValue":
|
|
3494
|
+
"onUpdate:modelValue": p[0] || (p[0] = (b) => l.value = b),
|
|
3489
3495
|
modelModifiers: { trim: !0 },
|
|
3490
3496
|
class: "!cl-border-2 !cl-mb-1 cl-w-full",
|
|
3491
3497
|
"input-type": "email",
|
|
@@ -3495,42 +3501,42 @@ const Qo = {
|
|
|
3495
3501
|
"placeholder-text": o(t)("login.email"),
|
|
3496
3502
|
autocomplete: "username",
|
|
3497
3503
|
"validate-immediately": !0,
|
|
3498
|
-
"custom-validation-function":
|
|
3504
|
+
"custom-validation-function": f,
|
|
3499
3505
|
"input-specific-classes": "!cl-pl-9",
|
|
3500
3506
|
"message-when-valid": l.value ? o(t)("login.validEmail") : "",
|
|
3501
3507
|
onInput: a,
|
|
3502
|
-
onValidated:
|
|
3508
|
+
onValidated: m
|
|
3503
3509
|
}, null, 8, ["modelValue", "highlight-when-valid", "label", "placeholder-text", "message-when-valid"])
|
|
3504
3510
|
])
|
|
3505
3511
|
]),
|
|
3506
3512
|
s("div", sc, [
|
|
3507
3513
|
s("div", rc, [
|
|
3508
|
-
|
|
3514
|
+
k(O, {
|
|
3509
3515
|
class: "cl-absolute cl-left-3 cl-top-2.5",
|
|
3510
3516
|
icon: "ph:lock",
|
|
3511
3517
|
size: 18
|
|
3512
3518
|
}),
|
|
3513
|
-
|
|
3519
|
+
B(k(O, {
|
|
3514
3520
|
class: "cl-absolute cl-cursor-pointer cl-right-6 cl-top-2.5",
|
|
3515
3521
|
icon: "ph:eye",
|
|
3516
3522
|
size: 18,
|
|
3517
|
-
onClick:
|
|
3523
|
+
onClick: p[1] || (p[1] = (b) => d.value = "text")
|
|
3518
3524
|
}, null, 512), [
|
|
3519
|
-
[F,
|
|
3525
|
+
[F, d.value === "password"]
|
|
3520
3526
|
]),
|
|
3521
|
-
|
|
3527
|
+
B(k(O, {
|
|
3522
3528
|
class: "cl-absolute cl-cursor-pointer cl-right-6 cl-top-2.5",
|
|
3523
3529
|
icon: "ph:eye-slash",
|
|
3524
3530
|
size: 18,
|
|
3525
|
-
onClick:
|
|
3531
|
+
onClick: p[2] || (p[2] = (b) => d.value = "password")
|
|
3526
3532
|
}, null, 512), [
|
|
3527
|
-
[F,
|
|
3533
|
+
[F, d.value === "text"]
|
|
3528
3534
|
]),
|
|
3529
|
-
|
|
3535
|
+
k(he, {
|
|
3530
3536
|
modelValue: c.value,
|
|
3531
|
-
"onUpdate:modelValue":
|
|
3537
|
+
"onUpdate:modelValue": p[3] || (p[3] = (b) => c.value = b),
|
|
3532
3538
|
class: "!cl-border-2 cl-w-full",
|
|
3533
|
-
"input-type":
|
|
3539
|
+
"input-type": d.value,
|
|
3534
3540
|
"highlight-when-valid": c.value !== void 0 && c.value !== "",
|
|
3535
3541
|
label: o(t)("login.password"),
|
|
3536
3542
|
"show-label": !1,
|
|
@@ -3538,7 +3544,7 @@ const Qo = {
|
|
|
3538
3544
|
autocomplete: "current-password",
|
|
3539
3545
|
"validate-immediately": !0,
|
|
3540
3546
|
"input-specific-classes": "!cl-pl-9 !cl-pr-9",
|
|
3541
|
-
"custom-validation-function":
|
|
3547
|
+
"custom-validation-function": f,
|
|
3542
3548
|
onInput: a
|
|
3543
3549
|
}, null, 8, ["modelValue", "input-type", "highlight-when-valid", "label", "placeholder-text"])
|
|
3544
3550
|
])
|
|
@@ -3548,31 +3554,31 @@ const Qo = {
|
|
|
3548
3554
|
"cl-mt-1.5 cl-mb-1 md:cl-mt-0.5 md:cl-mb-7 lg:cl-mb-0": e.loading
|
|
3549
3555
|
}])
|
|
3550
3556
|
}, [
|
|
3551
|
-
|
|
3557
|
+
k($e, {
|
|
3552
3558
|
class: "!cl-leading-9 cl-w-full",
|
|
3553
3559
|
colour: "blue",
|
|
3554
3560
|
loading: e.loading,
|
|
3555
3561
|
disabled: !r.value || c.value === "",
|
|
3556
|
-
onClick:
|
|
3562
|
+
onClick: ie(g, ["prevent"])
|
|
3557
3563
|
}, {
|
|
3558
|
-
default:
|
|
3559
|
-
|
|
3564
|
+
default: X(() => [
|
|
3565
|
+
le(x(o(t)("login.login")), 1)
|
|
3560
3566
|
]),
|
|
3561
3567
|
_: 1
|
|
3562
3568
|
}, 8, ["loading", "disabled", "onClick"])
|
|
3563
3569
|
], 2)
|
|
3564
3570
|
], 2),
|
|
3565
|
-
|
|
3566
|
-
default:
|
|
3567
|
-
var
|
|
3571
|
+
k(Te, { name: "cl-grow-down" }, {
|
|
3572
|
+
default: X(() => {
|
|
3573
|
+
var b;
|
|
3568
3574
|
return [
|
|
3569
|
-
|
|
3570
|
-
(i(!0),
|
|
3571
|
-
key:
|
|
3575
|
+
B(s("span", uc, [
|
|
3576
|
+
(i(!0), u(z, null, ae(e.errors, (L, W) => (i(), u("div", {
|
|
3577
|
+
key: W,
|
|
3572
3578
|
class: "cl-font-semibold"
|
|
3573
|
-
},
|
|
3579
|
+
}, x(L), 1))), 128))
|
|
3574
3580
|
], 512), [
|
|
3575
|
-
[F, (
|
|
3581
|
+
[F, (b = e.errors) == null ? void 0 : b.length]
|
|
3576
3582
|
])
|
|
3577
3583
|
];
|
|
3578
3584
|
}),
|
|
@@ -3594,43 +3600,43 @@ const Qo = {
|
|
|
3594
3600
|
], gc = {
|
|
3595
3601
|
id: "group-container",
|
|
3596
3602
|
class: "cl-bg-blue-default cl-h-full cl-left-0 cl-max-h-full cl-min-h-full cl-min-w-20 cl-overflow-y-auto cl-self-start cl-sticky cl-w-20 cl-z-30"
|
|
3597
|
-
}, bc = { class: "cl-relative cl-w-full" },
|
|
3603
|
+
}, bc = { class: "cl-relative cl-w-full" }, hc = /* @__PURE__ */ V({
|
|
3598
3604
|
__name: "cl-ui-navigation",
|
|
3599
3605
|
setup(e) {
|
|
3600
|
-
const n =
|
|
3606
|
+
const n = j(() => t.value.filter((a) => a.open === !0).length > 0), t = M([]), l = M(!1);
|
|
3601
3607
|
function c(a) {
|
|
3602
|
-
let
|
|
3603
|
-
return
|
|
3608
|
+
let f = t.value.find((m) => m.id === a);
|
|
3609
|
+
return f || (f = {
|
|
3604
3610
|
id: a,
|
|
3605
3611
|
open: !1
|
|
3606
|
-
}, t.value.push(
|
|
3612
|
+
}, t.value.push(f)), f.open;
|
|
3607
3613
|
}
|
|
3608
|
-
function
|
|
3609
|
-
const
|
|
3610
|
-
|
|
3611
|
-
|
|
3614
|
+
function d(a) {
|
|
3615
|
+
const f = t.value.find((m) => m.id === a);
|
|
3616
|
+
f && (f.open = !f.open, t.value.forEach((m) => {
|
|
3617
|
+
m.id !== a && (m.open = !1);
|
|
3612
3618
|
}));
|
|
3613
3619
|
}
|
|
3614
|
-
const r =
|
|
3615
|
-
nl(r,
|
|
3616
|
-
function
|
|
3620
|
+
const r = M();
|
|
3621
|
+
nl(r, g);
|
|
3622
|
+
function g() {
|
|
3617
3623
|
l.value === !1 && n.value === !0 && t.value.forEach((a) => {
|
|
3618
3624
|
a.open = !1;
|
|
3619
3625
|
});
|
|
3620
3626
|
}
|
|
3621
|
-
return (a,
|
|
3622
|
-
const
|
|
3623
|
-
return i(),
|
|
3627
|
+
return (a, f) => {
|
|
3628
|
+
const m = te("icon");
|
|
3629
|
+
return i(), u("div", {
|
|
3624
3630
|
ref_key: "navElement",
|
|
3625
3631
|
ref: r,
|
|
3626
3632
|
class: "cl-flex cl-flex-nowrap cl-h-full cl-max-h-full cl-min-h-full cl-min-w-20 cl-relative cl-self-start cl-w-auto"
|
|
3627
3633
|
}, [
|
|
3628
3634
|
s("div", gc, [
|
|
3629
|
-
D(a.$slots, "icon",
|
|
3635
|
+
D(a.$slots, "icon", ue(ye({ groupIsOpen: c, toggleOpen: d })), void 0, !0)
|
|
3630
3636
|
]),
|
|
3631
|
-
|
|
3632
|
-
default:
|
|
3633
|
-
|
|
3637
|
+
k(Te, { name: "slide-right" }, {
|
|
3638
|
+
default: X(() => [
|
|
3639
|
+
B(s("div", {
|
|
3634
3640
|
class: U(["cl-bg-grey-0 cl-border-grey-2 cl-border-r cl-max-h-full cl-min-h-full cl-min-w-[260px] cl-overflow-y-auto cl-p-8 cl-self-start cl-top-0 cl-w-[260px] cl-z-20", {
|
|
3635
3641
|
"cl-relative": l.value,
|
|
3636
3642
|
"cl-absolute cl-left-20 cl-shadow-lg": !l.value
|
|
@@ -3639,19 +3645,19 @@ const Qo = {
|
|
|
3639
3645
|
s("div", bc, [
|
|
3640
3646
|
s("span", {
|
|
3641
3647
|
class: "cl-absolute cl-cursor-pointer cl-h-8 cl-hidden cl-leading-8 cl-right-0 cl-text-center cl-top-0 cl-w-8 md:cl-inline-block",
|
|
3642
|
-
onClick:
|
|
3648
|
+
onClick: f[0] || (f[0] = (v) => l.value = !l.value)
|
|
3643
3649
|
}, [
|
|
3644
|
-
l.value ? (i(),
|
|
3650
|
+
l.value ? (i(), Q(m, {
|
|
3645
3651
|
key: 1,
|
|
3646
3652
|
class: "cl-inline-block",
|
|
3647
3653
|
icon: "ph:push-pin-slash"
|
|
3648
|
-
})) : (i(),
|
|
3654
|
+
})) : (i(), Q(m, {
|
|
3649
3655
|
key: 0,
|
|
3650
3656
|
class: "cl-inline-block",
|
|
3651
3657
|
icon: "ph:push-pin"
|
|
3652
3658
|
}))
|
|
3653
3659
|
]),
|
|
3654
|
-
D(a.$slots, "default",
|
|
3660
|
+
D(a.$slots, "default", ue(ye({ groupIsOpen: c })), void 0, !0)
|
|
3655
3661
|
])
|
|
3656
3662
|
], 2), [
|
|
3657
3663
|
[F, o(n)]
|
|
@@ -3663,7 +3669,7 @@ const Qo = {
|
|
|
3663
3669
|
};
|
|
3664
3670
|
}
|
|
3665
3671
|
});
|
|
3666
|
-
const
|
|
3672
|
+
const vc = /* @__PURE__ */ ve(hc, [["__scopeId", "data-v-7ce52ad5"]]), pc = /* @__PURE__ */ V({
|
|
3667
3673
|
__name: "cl-ui-navigation-icon",
|
|
3668
3674
|
props: {
|
|
3669
3675
|
icon: null,
|
|
@@ -3671,13 +3677,13 @@ const hc = /* @__PURE__ */ pe(vc, [["__scopeId", "data-v-7ce52ad5"]]), pc = /* @
|
|
|
3671
3677
|
},
|
|
3672
3678
|
setup(e) {
|
|
3673
3679
|
return (n, t) => {
|
|
3674
|
-
const l =
|
|
3675
|
-
return i(),
|
|
3680
|
+
const l = te("icon");
|
|
3681
|
+
return i(), u("div", {
|
|
3676
3682
|
class: U(["cl-cursor-pointer cl-flex cl-h-20 cl-items-center cl-justify-center cl-text-off-white cl-transition-colors cl-w-20 hover:cl-bg-blue-light", {
|
|
3677
3683
|
"cl-bg-blue-light": e.open
|
|
3678
3684
|
}])
|
|
3679
3685
|
}, [
|
|
3680
|
-
|
|
3686
|
+
k(l, {
|
|
3681
3687
|
class: "cl-block",
|
|
3682
3688
|
icon: e.icon,
|
|
3683
3689
|
width: "24"
|
|
@@ -3688,14 +3694,14 @@ const hc = /* @__PURE__ */ pe(vc, [["__scopeId", "data-v-7ce52ad5"]]), pc = /* @
|
|
|
3688
3694
|
}), yc = {
|
|
3689
3695
|
key: 0,
|
|
3690
3696
|
class: "cl-font-bold cl-leading-8 cl-mb-8 cl-pr-8 cl-select-none cl-text-blue-light cl-text-lg"
|
|
3691
|
-
}, wc = { class: "cl-flex cl-flex-wrap cl-space-y-8 cl-text-sm cl-w-full" }, xc = /* @__PURE__ */
|
|
3697
|
+
}, wc = { class: "cl-flex cl-flex-wrap cl-space-y-8 cl-text-sm cl-w-full" }, xc = /* @__PURE__ */ V({
|
|
3692
3698
|
__name: "cl-ui-navigation-group",
|
|
3693
3699
|
props: {
|
|
3694
3700
|
open: { type: Boolean }
|
|
3695
3701
|
},
|
|
3696
3702
|
setup(e) {
|
|
3697
|
-
return (n, t) => e.open ? (i(),
|
|
3698
|
-
n.$slots.title ? (i(),
|
|
3703
|
+
return (n, t) => e.open ? (i(), u(z, { key: 0 }, [
|
|
3704
|
+
n.$slots.title ? (i(), u("div", yc, [
|
|
3699
3705
|
D(n.$slots, "title")
|
|
3700
3706
|
])) : N("", !0),
|
|
3701
3707
|
s("div", wc, [
|
|
@@ -3708,8 +3714,8 @@ const hc = /* @__PURE__ */ pe(vc, [["__scopeId", "data-v-7ce52ad5"]]), pc = /* @
|
|
|
3708
3714
|
class: "cl-font-bold cl-mb-4 cl-select-none"
|
|
3709
3715
|
}, Cc = { class: "cl-flex cl-flex-wrap cl-space-y-2" };
|
|
3710
3716
|
function Sc(e, n) {
|
|
3711
|
-
return i(),
|
|
3712
|
-
e.$slots.title ? (i(),
|
|
3717
|
+
return i(), u("div", $c, [
|
|
3718
|
+
e.$slots.title ? (i(), u("div", Tc, [
|
|
3713
3719
|
D(e.$slots, "title")
|
|
3714
3720
|
])) : N("", !0),
|
|
3715
3721
|
s("span", Cc, [
|
|
@@ -3717,13 +3723,13 @@ function Sc(e, n) {
|
|
|
3717
3723
|
])
|
|
3718
3724
|
]);
|
|
3719
3725
|
}
|
|
3720
|
-
const Oc = /* @__PURE__ */
|
|
3726
|
+
const Oc = /* @__PURE__ */ ve(kc, [["render", Sc]]), Ec = {}, Ac = { class: "cl-cursor-pointer cl-transition-colors cl-w-full hover:cl-text-blue-light" };
|
|
3721
3727
|
function jc(e, n) {
|
|
3722
|
-
return i(),
|
|
3728
|
+
return i(), u("div", Ac, [
|
|
3723
3729
|
D(e.$slots, "default")
|
|
3724
3730
|
]);
|
|
3725
3731
|
}
|
|
3726
|
-
const Mc = /* @__PURE__ */
|
|
3732
|
+
const Mc = /* @__PURE__ */ ve(Ec, [["render", jc]]), Nc = { class: "cl-w-full" }, Ic = /* @__PURE__ */ V({
|
|
3727
3733
|
__name: "cl-ui-tab",
|
|
3728
3734
|
props: {
|
|
3729
3735
|
currentTab: { default: 0 },
|
|
@@ -3731,37 +3737,37 @@ const Mc = /* @__PURE__ */ pe(Ec, [["render", jc]]), Ic = { class: "cl-w-full" }
|
|
|
3731
3737
|
colour: { default: "default" }
|
|
3732
3738
|
},
|
|
3733
3739
|
setup(e) {
|
|
3734
|
-
const n = e, t =
|
|
3735
|
-
function f
|
|
3736
|
-
return
|
|
3740
|
+
const n = e, t = M(), l = M(!1), c = M(!1);
|
|
3741
|
+
function d(f) {
|
|
3742
|
+
return f === n.currentTab;
|
|
3737
3743
|
}
|
|
3738
3744
|
function r() {
|
|
3739
3745
|
if (t.value) {
|
|
3740
|
-
const
|
|
3741
|
-
l.value = t.value.scrollLeft > 0, c.value = t.value.scrollLeft <
|
|
3746
|
+
const f = t.value.scrollWidth - t.value.clientWidth;
|
|
3747
|
+
l.value = t.value.scrollLeft > 0, c.value = t.value.scrollLeft < f;
|
|
3742
3748
|
} else
|
|
3743
3749
|
l.value = !1, c.value = !1;
|
|
3744
3750
|
}
|
|
3745
|
-
function
|
|
3751
|
+
function g() {
|
|
3746
3752
|
r(), window.addEventListener("resize", r);
|
|
3747
3753
|
}
|
|
3748
|
-
function a(
|
|
3754
|
+
function a(f) {
|
|
3749
3755
|
if (t.value) {
|
|
3750
|
-
const
|
|
3751
|
-
let
|
|
3752
|
-
|
|
3756
|
+
const m = t.value.scrollWidth / 5;
|
|
3757
|
+
let v = m;
|
|
3758
|
+
f === "left" && (v = -m), t.value.scroll(t.value.scrollLeft + v, 0);
|
|
3753
3759
|
}
|
|
3754
3760
|
}
|
|
3755
|
-
return
|
|
3756
|
-
const
|
|
3757
|
-
return i(),
|
|
3761
|
+
return Me(() => g()), Re(() => window.removeEventListener("resize", r)), (f, m) => {
|
|
3762
|
+
const v = te("icon");
|
|
3763
|
+
return i(), u("div", Nc, [
|
|
3758
3764
|
s("div", null, [
|
|
3759
|
-
l.value ? (i(),
|
|
3765
|
+
l.value ? (i(), u("div", {
|
|
3760
3766
|
key: 0,
|
|
3761
3767
|
class: "cl-bg-white cl-cursor-pointer cl-float-left cl-h-11 cl-w-4",
|
|
3762
|
-
onClick:
|
|
3768
|
+
onClick: m[0] || (m[0] = (p) => a("left"))
|
|
3763
3769
|
}, [
|
|
3764
|
-
|
|
3770
|
+
k(v, {
|
|
3765
3771
|
icon: "ph:caret-left",
|
|
3766
3772
|
class: "cl-mt-4 cl-text-secondary-default"
|
|
3767
3773
|
})
|
|
@@ -3780,24 +3786,24 @@ const Mc = /* @__PURE__ */ pe(Ec, [["render", jc]]), Ic = { class: "cl-w-full" }
|
|
|
3780
3786
|
}]),
|
|
3781
3787
|
onScrollPassive: r
|
|
3782
3788
|
}, [
|
|
3783
|
-
D(
|
|
3789
|
+
D(f.$slots, "headings", ue(ye({ isTabOpen: d, disabled: e.disabled, colour: e.colour })))
|
|
3784
3790
|
], 34),
|
|
3785
|
-
c.value ? (i(),
|
|
3791
|
+
c.value ? (i(), u("div", {
|
|
3786
3792
|
key: 1,
|
|
3787
3793
|
class: "cl-bg-white cl-bottom-12 cl-cursor-pointer cl-float-right cl-h-11 cl-relative cl-w-4",
|
|
3788
|
-
onClick:
|
|
3794
|
+
onClick: m[1] || (m[1] = (p) => a("right"))
|
|
3789
3795
|
}, [
|
|
3790
|
-
|
|
3796
|
+
k(v, {
|
|
3791
3797
|
icon: "ph:caret-right",
|
|
3792
3798
|
class: "cl-mt-4 cl-text-secondary-default"
|
|
3793
3799
|
})
|
|
3794
3800
|
])) : N("", !0)
|
|
3795
3801
|
]),
|
|
3796
|
-
D(
|
|
3802
|
+
D(f.$slots, "content", ue(ye({ isTabOpen: d, disabled: e.disabled, colour: e.colour })))
|
|
3797
3803
|
]);
|
|
3798
3804
|
};
|
|
3799
3805
|
}
|
|
3800
|
-
}),
|
|
3806
|
+
}), Dc = ["onKeyup"], Rc = /* @__PURE__ */ V({
|
|
3801
3807
|
__name: "cl-ui-tab-header",
|
|
3802
3808
|
props: {
|
|
3803
3809
|
id: null,
|
|
@@ -3809,24 +3815,24 @@ const Mc = /* @__PURE__ */ pe(Ec, [["render", jc]]), Ic = { class: "cl-w-full" }
|
|
|
3809
3815
|
"update:currentTab": null
|
|
3810
3816
|
},
|
|
3811
3817
|
setup(e, { emit: n }) {
|
|
3812
|
-
const t = e, l =
|
|
3818
|
+
const t = e, l = M(), c = M(), d = j(() => t.id === t.currentTab);
|
|
3813
3819
|
function r() {
|
|
3814
3820
|
t.disabled || (l.value = !1, c.value = !1, n("update:currentTab", t.id));
|
|
3815
3821
|
}
|
|
3816
|
-
return (
|
|
3822
|
+
return (g, a) => (i(), u("div", {
|
|
3817
3823
|
class: U(["cl-border-b cl-cursor-pointer cl-flex cl-items-center cl-px-4 cl-py-2 cl-rounded-b-none cl-rounded-sm cl-select-none cl-text-xl cl-transition cl-whitespace-nowrap focus:cl-outline-none", {
|
|
3818
3824
|
"!cl-cursor-default cl-text-grey-4 !cl-border-grey-2": e.disabled,
|
|
3819
|
-
"cl-border cl-border-b-0 cl-rounded-t-md cl-shadow-[inset_0_-1px_0_#ffffff] cl-cursor-default": o(
|
|
3825
|
+
"cl-border cl-border-b-0 cl-rounded-t-md cl-shadow-[inset_0_-1px_0_#ffffff] cl-cursor-default": o(d),
|
|
3820
3826
|
"cl-border-grey-0": e.colour === "default",
|
|
3821
3827
|
"cl-border-primary-default": e.colour === "primary",
|
|
3822
3828
|
"cl-border-secondary-default": e.colour === "secondary",
|
|
3823
3829
|
"cl-border-danger-default": e.colour === "danger",
|
|
3824
3830
|
"cl-border-link-default": e.colour === "blue",
|
|
3825
|
-
"hover:cl-bg-grey-0": !o(
|
|
3826
|
-
"hover:cl-bg-primary-lighter": !o(
|
|
3827
|
-
"hover:cl-bg-secondary-light focus:cl-text-white hover:cl-text-white": !o(
|
|
3828
|
-
"hover:cl-bg-danger-light": !o(
|
|
3829
|
-
"hover:cl-bg-link-lighter": !o(
|
|
3831
|
+
"hover:cl-bg-grey-0": !o(d) && !e.disabled && e.colour === "default",
|
|
3832
|
+
"hover:cl-bg-primary-lighter": !o(d) && !e.disabled && e.colour === "primary",
|
|
3833
|
+
"hover:cl-bg-secondary-light focus:cl-text-white hover:cl-text-white": !o(d) && !e.disabled && e.colour === "secondary",
|
|
3834
|
+
"hover:cl-bg-danger-light": !o(d) && !e.disabled && e.colour === "danger",
|
|
3835
|
+
"hover:cl-bg-link-lighter": !o(d) && !e.disabled && e.colour === "blue",
|
|
3830
3836
|
"cl-bg-grey-0": l.value && !e.disabled && e.colour === "default",
|
|
3831
3837
|
"cl-bg-primary-lighter": l.value && !e.disabled && e.colour === "primary",
|
|
3832
3838
|
"cl-bg-secondary-light cl-text-white": l.value && !e.disabled && e.colour === "secondary",
|
|
@@ -3835,20 +3841,20 @@ const Mc = /* @__PURE__ */ pe(Ec, [["render", jc]]), Ic = { class: "cl-w-full" }
|
|
|
3835
3841
|
}]),
|
|
3836
3842
|
tabindex: "0",
|
|
3837
3843
|
onClick: r,
|
|
3838
|
-
onMouseover: a[0] || (a[0] = (
|
|
3839
|
-
onMouseout: a[1] || (a[1] = (
|
|
3840
|
-
onFocusin: a[2] || (a[2] = (
|
|
3841
|
-
onFocusout: a[3] || (a[3] = (
|
|
3842
|
-
onKeyup:
|
|
3844
|
+
onMouseover: a[0] || (a[0] = (f) => c.value = !0),
|
|
3845
|
+
onMouseout: a[1] || (a[1] = (f) => c.value = !1),
|
|
3846
|
+
onFocusin: a[2] || (a[2] = (f) => l.value = !0),
|
|
3847
|
+
onFocusout: a[3] || (a[3] = (f) => l.value = !1),
|
|
3848
|
+
onKeyup: je(ie(r, ["self"]), ["enter"])
|
|
3843
3849
|
}, [
|
|
3844
|
-
D(
|
|
3845
|
-
], 42,
|
|
3850
|
+
D(g.$slots, "default")
|
|
3851
|
+
], 42, Dc));
|
|
3846
3852
|
}
|
|
3847
|
-
}),
|
|
3853
|
+
}), qc = {};
|
|
3848
3854
|
function Uc(e, n) {
|
|
3849
3855
|
return D(e.$slots, "default");
|
|
3850
3856
|
}
|
|
3851
|
-
const zc = /* @__PURE__ */
|
|
3857
|
+
const zc = /* @__PURE__ */ ve(qc, [["render", Uc]]), Bc = [
|
|
3852
3858
|
"default",
|
|
3853
3859
|
"primary",
|
|
3854
3860
|
"secondary",
|
|
@@ -3859,7 +3865,7 @@ const zc = /* @__PURE__ */ pe(Rc, [["render", Uc]]), Bc = [
|
|
|
3859
3865
|
"right"
|
|
3860
3866
|
], Pc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3861
3867
|
__proto__: null,
|
|
3862
|
-
clUiAccordion:
|
|
3868
|
+
clUiAccordion: vl,
|
|
3863
3869
|
clUiAccordionItem: kl,
|
|
3864
3870
|
clUiAccordionHeader: Sl,
|
|
3865
3871
|
clUiApp: Ml,
|
|
@@ -3872,18 +3878,18 @@ const zc = /* @__PURE__ */ pe(Rc, [["render", Uc]]), Bc = [
|
|
|
3872
3878
|
isComboBoxItem: Ft,
|
|
3873
3879
|
isComboBoxCreateRequest: Vt,
|
|
3874
3880
|
clUiFooter: Yt,
|
|
3875
|
-
clUiGrid:
|
|
3881
|
+
clUiGrid: qo,
|
|
3876
3882
|
gridColumnTypes: on,
|
|
3877
3883
|
isGridColumn: sl,
|
|
3878
3884
|
isGridColumnArray: cn,
|
|
3879
3885
|
stringFormats: an,
|
|
3880
|
-
FilterOperation:
|
|
3886
|
+
FilterOperation: xe,
|
|
3881
3887
|
filterMethodTypes: sn,
|
|
3882
3888
|
isFilterRequest: dn,
|
|
3883
3889
|
isFilterResponse: fn,
|
|
3884
3890
|
clUiHeader: zo,
|
|
3885
3891
|
clUiHeaderMenu: Wo,
|
|
3886
|
-
clUiInput:
|
|
3892
|
+
clUiInput: he,
|
|
3887
3893
|
inputTypes: Jo,
|
|
3888
3894
|
clUiLanguageSwitcher: ec,
|
|
3889
3895
|
isLanguageLocaleFormat: Ve,
|
|
@@ -3893,20 +3899,20 @@ const zc = /* @__PURE__ */ pe(Rc, [["render", Uc]]), Bc = [
|
|
|
3893
3899
|
clUiModal: il,
|
|
3894
3900
|
modalSizes: fc,
|
|
3895
3901
|
modalColours: mc,
|
|
3896
|
-
clUiNavigation:
|
|
3902
|
+
clUiNavigation: vc,
|
|
3897
3903
|
clUiNavigationIcon: pc,
|
|
3898
3904
|
clUiNavigationGroup: xc,
|
|
3899
3905
|
clUiNavigationSection: Oc,
|
|
3900
3906
|
clUiNavigationItem: Mc,
|
|
3901
3907
|
clUiNotification: cl,
|
|
3902
|
-
clUiTab:
|
|
3903
|
-
clUiTabHeader:
|
|
3908
|
+
clUiTab: Ic,
|
|
3909
|
+
clUiTabHeader: Rc,
|
|
3904
3910
|
clUiTabContent: zc,
|
|
3905
3911
|
tabColours: Bc,
|
|
3906
3912
|
tabScroll: Lc
|
|
3907
3913
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3908
3914
|
const _c = (e) => {
|
|
3909
|
-
e.use(
|
|
3915
|
+
e.use(ce), e.component("Icon", rl), Object.entries(Pc).forEach(([
|
|
3910
3916
|
n,
|
|
3911
3917
|
t
|
|
3912
3918
|
]) => {
|
|
@@ -3914,13 +3920,13 @@ const _c = (e) => {
|
|
|
3914
3920
|
});
|
|
3915
3921
|
};
|
|
3916
3922
|
export {
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3923
|
+
Y as DateFormat,
|
|
3924
|
+
xe as FilterOperation,
|
|
3925
|
+
oe as NumberFormat,
|
|
3920
3926
|
Ul as buttonColours,
|
|
3921
3927
|
zl as buttonSizes,
|
|
3922
3928
|
Pl as cardSizes,
|
|
3923
|
-
|
|
3929
|
+
vl as clUiAccordion,
|
|
3924
3930
|
Sl as clUiAccordionHeader,
|
|
3925
3931
|
kl as clUiAccordionItem,
|
|
3926
3932
|
Ml as clUiApp,
|
|
@@ -3928,28 +3934,28 @@ export {
|
|
|
3928
3934
|
Ll as clUiCard,
|
|
3929
3935
|
Pt as clUiComboBox,
|
|
3930
3936
|
Yt as clUiFooter,
|
|
3931
|
-
|
|
3937
|
+
qo as clUiGrid,
|
|
3932
3938
|
zo as clUiHeader,
|
|
3933
3939
|
Wo as clUiHeaderMenu,
|
|
3934
|
-
|
|
3940
|
+
he as clUiInput,
|
|
3935
3941
|
ec as clUiLanguageSwitcher,
|
|
3936
3942
|
al as clUiLoadingSpinner,
|
|
3937
3943
|
dc as clUiLogin,
|
|
3938
3944
|
il as clUiModal,
|
|
3939
|
-
|
|
3945
|
+
vc as clUiNavigation,
|
|
3940
3946
|
xc as clUiNavigationGroup,
|
|
3941
3947
|
pc as clUiNavigationIcon,
|
|
3942
3948
|
Mc as clUiNavigationItem,
|
|
3943
3949
|
Oc as clUiNavigationSection,
|
|
3944
3950
|
cl as clUiNotification,
|
|
3945
|
-
|
|
3951
|
+
Ic as clUiTab,
|
|
3946
3952
|
zc as clUiTabContent,
|
|
3947
|
-
|
|
3953
|
+
Rc as clUiTabHeader,
|
|
3948
3954
|
Hl as datetimeFormats,
|
|
3949
3955
|
_c as default,
|
|
3950
3956
|
sn as filterMethodTypes,
|
|
3951
3957
|
on as gridColumnTypes,
|
|
3952
|
-
|
|
3958
|
+
ce as i18n,
|
|
3953
3959
|
Jo as inputTypes,
|
|
3954
3960
|
Vt as isComboBoxCreateRequest,
|
|
3955
3961
|
Ft as isComboBoxItem,
|