@citruslime/ui 2.2.2-beta.5 → 2.2.2-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/citrus-lime-ui.es.js +1459 -1448
- package/dist/citrus-lime-ui.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +5 -4
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { Icon as q } from "@iconify/vue";
|
|
2
|
-
import { defineComponent as D, ref as
|
|
2
|
+
import { defineComponent as D, ref as S, openBlock as d, createElementBlock as h, renderSlot as A, normalizeProps as le, guardReactiveProps as re, Fragment as x, createElementVNode as m, normalizeClass as I, createVNode as C, unref as p, Transition as ge, withCtx as L, withDirectives as U, vShow as B, createBlock as z, Teleport as xe, renderList as Y, mergeProps as ie, toDisplayString as _, createCommentVNode as M, nextTick as be, computed as O, watch as H, onMounted as Ce, onUnmounted as Ae, normalizeStyle as el, vModelText as cl, withModifiers as K, vModelDynamic as il, withKeys as Te, resolveComponent as ul, createTextVNode as Q, watchEffect as dl, createSlots as ze } from "vue";
|
|
3
3
|
import { generateStringId as fl } from "@citruslime/utils";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
4
|
+
import { onClickOutside as Le, useTimeoutFn as ll, useDebounceFn as tl, useWindowSize as pl } from "@vueuse/core";
|
|
5
|
+
import { createI18n as ml, useI18n as te } from "vue-i18n";
|
|
6
|
+
import Ve from "flatpickr";
|
|
7
|
+
import { useDebouncer as gl, copy as ce } from "@citruslime/vue-utils";
|
|
8
8
|
const vl = { class: "cl-overflow-hidden" }, bl = /* @__PURE__ */ D({
|
|
9
9
|
__name: "cl-ui-accordion",
|
|
10
10
|
props: {
|
|
11
11
|
exclusive: { type: Boolean, default: !1 }
|
|
12
12
|
},
|
|
13
13
|
setup(t) {
|
|
14
|
-
const o = t, e =
|
|
15
|
-
function l(
|
|
16
|
-
let r = e.value.find((s) => s.id ===
|
|
14
|
+
const o = t, e = S([]);
|
|
15
|
+
function l(n) {
|
|
16
|
+
let r = e.value.find((s) => s.id === n);
|
|
17
17
|
return r || (r = {
|
|
18
|
-
id:
|
|
18
|
+
id: n,
|
|
19
19
|
open: !1
|
|
20
20
|
}, e.value.push(r)), r.open;
|
|
21
21
|
}
|
|
22
|
-
function n
|
|
23
|
-
const r = e.value.find((s) => s.id ===
|
|
22
|
+
function a(n) {
|
|
23
|
+
const r = e.value.find((s) => s.id === n);
|
|
24
24
|
r && (o.exclusive && e.value.forEach((s) => {
|
|
25
|
-
s.id !==
|
|
25
|
+
s.id !== n && (s.open = !1);
|
|
26
26
|
}), r.open = !r.open);
|
|
27
27
|
}
|
|
28
|
-
return (
|
|
29
|
-
|
|
28
|
+
return (n, r) => (d(), h("div", vl, [
|
|
29
|
+
A(n.$slots, "default", le(re({ isItemOpen: l, toggleItem: a })))
|
|
30
30
|
]));
|
|
31
31
|
}
|
|
32
32
|
}), hl = { 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" }, $l = { class: "cl-ml-10 cl-p-4" }, kl = /* @__PURE__ */ D({
|
|
@@ -43,34 +43,34 @@ const vl = { class: "cl-overflow-hidden" }, bl = /* @__PURE__ */ D({
|
|
|
43
43
|
function l() {
|
|
44
44
|
e.disabled || o("toggle");
|
|
45
45
|
}
|
|
46
|
-
return (
|
|
47
|
-
|
|
46
|
+
return (a, n) => (d(), h(x, null, [
|
|
47
|
+
m("div", {
|
|
48
48
|
class: I(["cl-border-b cl-border-grey-1 cl-relative", {
|
|
49
|
-
"cl-bg-grey-0":
|
|
50
|
-
"cl-cursor-pointer": !
|
|
49
|
+
"cl-bg-grey-0": a.disabled,
|
|
50
|
+
"cl-cursor-pointer": !a.disabled
|
|
51
51
|
}]),
|
|
52
52
|
onClick: l
|
|
53
53
|
}, [
|
|
54
|
-
|
|
54
|
+
m("div", hl, [
|
|
55
55
|
C(p(q), {
|
|
56
56
|
class: I(["cl-duration-300 cl-ease-in-out cl-text-grey-3 cl-transform-gpu cl-transition-transform", {
|
|
57
|
-
"cl-rotate-180":
|
|
57
|
+
"cl-rotate-180": a.open
|
|
58
58
|
}]),
|
|
59
59
|
icon: "ph:caret-down-bold",
|
|
60
60
|
width: "20"
|
|
61
61
|
}, null, 8, ["class"])
|
|
62
62
|
]),
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
m("div", yl, [
|
|
64
|
+
A(a.$slots, "title")
|
|
65
65
|
])
|
|
66
66
|
], 2),
|
|
67
|
-
|
|
68
|
-
C(
|
|
69
|
-
default:
|
|
70
|
-
U(
|
|
71
|
-
|
|
67
|
+
m("div", wl, [
|
|
68
|
+
C(ge, { name: "grow-down" }, {
|
|
69
|
+
default: L(() => [
|
|
70
|
+
U(m("div", $l, [
|
|
71
|
+
A(a.$slots, "default")
|
|
72
72
|
], 512), [
|
|
73
|
-
[B,
|
|
73
|
+
[B, a.open]
|
|
74
74
|
])
|
|
75
75
|
]),
|
|
76
76
|
_: 3
|
|
@@ -78,26 +78,26 @@ const vl = { class: "cl-overflow-hidden" }, bl = /* @__PURE__ */ D({
|
|
|
78
78
|
])
|
|
79
79
|
], 64));
|
|
80
80
|
}
|
|
81
|
-
}),
|
|
81
|
+
}), de = (t, o) => {
|
|
82
82
|
const e = t.__vccOpts || t;
|
|
83
|
-
for (const [l,
|
|
84
|
-
e[l] =
|
|
83
|
+
for (const [l, a] of o)
|
|
84
|
+
e[l] = a;
|
|
85
85
|
return e;
|
|
86
86
|
}, Tl = {}, Cl = { 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" };
|
|
87
87
|
function _l(t, o) {
|
|
88
|
-
return
|
|
89
|
-
|
|
88
|
+
return d(), h("div", Cl, [
|
|
89
|
+
A(t.$slots, "default")
|
|
90
90
|
]);
|
|
91
91
|
}
|
|
92
|
-
const Sl = /* @__PURE__ */
|
|
93
|
-
function
|
|
92
|
+
const Sl = /* @__PURE__ */ de(Tl, [["render", _l]]), Ee = S([]);
|
|
93
|
+
function Ge(t) {
|
|
94
94
|
const o = {
|
|
95
95
|
id: fl(),
|
|
96
96
|
...t
|
|
97
97
|
};
|
|
98
|
-
Ee.value.push(o), setTimeout(() =>
|
|
98
|
+
Ee.value.push(o), setTimeout(() => ol(o), t.duration);
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function ol(t) {
|
|
101
101
|
Ee.value = Ee.value.filter((o) => o.id !== t.id);
|
|
102
102
|
}
|
|
103
103
|
const Ol = ["onClick"], El = { class: "cl-flex-1 cl-select-none cl-text-ellipsis cl-w-64" }, Al = {
|
|
@@ -110,8 +110,8 @@ const Ol = ["onClick"], El = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
110
110
|
position: { default: "top-right" }
|
|
111
111
|
},
|
|
112
112
|
setup(t) {
|
|
113
|
-
return (o, e) => (
|
|
114
|
-
|
|
113
|
+
return (o, e) => (d(), z(xe, { to: o.container }, [
|
|
114
|
+
m("div", {
|
|
115
115
|
class: I(["cl-fixed cl-w-80 cl-z-40", {
|
|
116
116
|
"cl-top-5 cl-left-5": o.position === "top-left",
|
|
117
117
|
"cl-top-5 cl-left-1/2": o.position === "top-centre",
|
|
@@ -121,8 +121,8 @@ const Ol = ["onClick"], El = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
121
121
|
"cl-bottom-5 cl-right-5": o.position === "bottom-right"
|
|
122
122
|
}])
|
|
123
123
|
}, [
|
|
124
|
-
(
|
|
125
|
-
key:
|
|
124
|
+
(d(!0), h(x, null, Y(p(Ee), (l, a) => (d(), h("div", ie(o.$attrs, {
|
|
125
|
+
key: a,
|
|
126
126
|
class: ["cl-break-words cl-cursor-pointer cl-flex cl-font-semibold cl-group cl-mb-2 cl-overflow-hidden cl-p-4 cl-rounded cl-shadow-lg cl-text-sm", {
|
|
127
127
|
"cl-bg-white": l.colour === "default",
|
|
128
128
|
"cl-bg-primary-default": l.colour === "primary",
|
|
@@ -130,9 +130,9 @@ const Ol = ["onClick"], El = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
130
130
|
"cl-bg-danger-default": l.colour === "danger",
|
|
131
131
|
"cl-bg-warning-default": l.colour === "warning"
|
|
132
132
|
}],
|
|
133
|
-
onClick: (
|
|
133
|
+
onClick: (n) => p(ol)(l)
|
|
134
134
|
}), [
|
|
135
|
-
|
|
135
|
+
m("span", El, _(l.message), 1),
|
|
136
136
|
C(p(q), {
|
|
137
137
|
class: "cl-inline-block cl-opacity-0 cl-transition-opacity group-hover:cl-opacity-100",
|
|
138
138
|
icon: "ph:x",
|
|
@@ -149,23 +149,23 @@ const Ol = ["onClick"], El = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
149
149
|
removePadding: { type: Boolean, default: !1 }
|
|
150
150
|
},
|
|
151
151
|
setup(t) {
|
|
152
|
-
return (o, e) => (
|
|
152
|
+
return (o, e) => (d(), h(x, null, [
|
|
153
153
|
C(al),
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
m("div", jl, [
|
|
155
|
+
A(o.$slots, "header"),
|
|
156
|
+
m("div", {
|
|
157
157
|
class: I(["cl-content-start cl-flex cl-flex-nowrap cl-items-stretch cl-max-h-screen cl-relative cl-w-full", {
|
|
158
158
|
"cl-pt-20": o.$slots.header
|
|
159
159
|
}])
|
|
160
160
|
}, [
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
A(o.$slots, "navigation"),
|
|
162
|
+
m("div", {
|
|
163
163
|
class: I(["cl-grow cl-max-h-full cl-overflow-x-hidden cl-overflow-y-auto cl-overscroll-y-none cl-w-auto", {
|
|
164
164
|
"cl-pb-20 lg:cl-pb-0": o.removePadding,
|
|
165
165
|
"lg:cl-pb-8 md:cl-px-8 cl-px-2 md:cl-pt-8 cl-pt-2 cl-pb-20": !o.removePadding
|
|
166
166
|
}])
|
|
167
167
|
}, [
|
|
168
|
-
|
|
168
|
+
A(o.$slots, "default")
|
|
169
169
|
], 2)
|
|
170
170
|
], 2)
|
|
171
171
|
])
|
|
@@ -174,11 +174,11 @@ const Ol = ["onClick"], El = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
174
174
|
});
|
|
175
175
|
const Il = {}, Nl = { class: "loading-spinner" };
|
|
176
176
|
function ql(t, o) {
|
|
177
|
-
return
|
|
177
|
+
return d(), h("div", Nl);
|
|
178
178
|
}
|
|
179
|
-
const je = /* @__PURE__ */
|
|
179
|
+
const je = /* @__PURE__ */ de(Il, [["render", ql], ["__scopeId", "data-v-a21dc5d2"]]), Dl = ["disabled"], Rl = {
|
|
180
180
|
inheritAttrs: !1
|
|
181
|
-
},
|
|
181
|
+
}, me = /* @__PURE__ */ D({
|
|
182
182
|
...Rl,
|
|
183
183
|
__name: "cl-ui-button",
|
|
184
184
|
props: {
|
|
@@ -188,16 +188,16 @@ const je = /* @__PURE__ */ fe(Il, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
188
188
|
disabled: { type: Boolean, default: !1 }
|
|
189
189
|
},
|
|
190
190
|
setup(t, { expose: o }) {
|
|
191
|
-
const e =
|
|
191
|
+
const e = S(null);
|
|
192
192
|
return o({
|
|
193
193
|
focus() {
|
|
194
194
|
e.value && e.value.focus();
|
|
195
195
|
}
|
|
196
|
-
}), (l,
|
|
196
|
+
}), (l, a) => (d(), h(x, null, [
|
|
197
197
|
U(C(je, { class: "relative" }, null, 512), [
|
|
198
198
|
[B, l.loading]
|
|
199
199
|
]),
|
|
200
|
-
U(
|
|
200
|
+
U(m("button", ie(l.$attrs, {
|
|
201
201
|
ref_key: "buttonRef",
|
|
202
202
|
ref: e,
|
|
203
203
|
class: ["cl-align-middle cl-border cl-font-semibold cl-inline-block cl-rounded cl-select-none cl-shadow cl-text-center cl-transition-colors", {
|
|
@@ -214,7 +214,7 @@ const je = /* @__PURE__ */ fe(Il, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
214
214
|
}],
|
|
215
215
|
disabled: l.disabled
|
|
216
216
|
}), [
|
|
217
|
-
|
|
217
|
+
A(l.$slots, "default")
|
|
218
218
|
], 16, Dl), [
|
|
219
219
|
[B, !l.loading]
|
|
220
220
|
])
|
|
@@ -238,15 +238,15 @@ const je = /* @__PURE__ */ fe(Il, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
238
238
|
hover: { type: Boolean, default: !1 }
|
|
239
239
|
},
|
|
240
240
|
setup(t) {
|
|
241
|
-
return (o, e) => (
|
|
241
|
+
return (o, e) => (d(), h("div", {
|
|
242
242
|
class: I(["cl-border cl-border-transparent cl-overflow-hidden cl-relative cl-rounded-md cl-shadow-lg cl-transition-all", {
|
|
243
243
|
"cl-cursor-pointer hover:cl-shadow-xl hover:cl-border-grey-0": o.hover
|
|
244
244
|
}])
|
|
245
245
|
}, [
|
|
246
|
-
o.$slots.image ? (
|
|
247
|
-
|
|
246
|
+
o.$slots.image ? (d(), h("div", xl, [
|
|
247
|
+
A(o.$slots, "image")
|
|
248
248
|
])) : M("", !0),
|
|
249
|
-
o.$slots.title ? (
|
|
249
|
+
o.$slots.title ? (d(), h("div", {
|
|
250
250
|
key: 1,
|
|
251
251
|
class: I(["cl-border-grey-2 cl-font-normal", {
|
|
252
252
|
"cl-p-2 cl-text-2xl cl-leading-8": o.size === "small",
|
|
@@ -255,9 +255,9 @@ const je = /* @__PURE__ */ fe(Il, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
255
255
|
"cl-border-t": o.$slots.image
|
|
256
256
|
}])
|
|
257
257
|
}, [
|
|
258
|
-
|
|
258
|
+
A(o.$slots, "title")
|
|
259
259
|
], 2)) : M("", !0),
|
|
260
|
-
|
|
260
|
+
m("div", {
|
|
261
261
|
class: I(["cl-border-grey-2", {
|
|
262
262
|
"cl-p-2": o.size === "small",
|
|
263
263
|
"cl-p-4": o.size === "medium",
|
|
@@ -265,9 +265,9 @@ const je = /* @__PURE__ */ fe(Il, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
265
265
|
"cl-border-t": o.$slots.image || o.$slots.title
|
|
266
266
|
}])
|
|
267
267
|
}, [
|
|
268
|
-
|
|
268
|
+
A(o.$slots, "default")
|
|
269
269
|
], 2),
|
|
270
|
-
o.$slots.footer ? (
|
|
270
|
+
o.$slots.footer ? (d(), h("div", {
|
|
271
271
|
key: 2,
|
|
272
272
|
class: I(["cl-border-grey-2 cl-border-t", {
|
|
273
273
|
"cl-p-2": o.size === "small",
|
|
@@ -275,7 +275,7 @@ const je = /* @__PURE__ */ fe(Il, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
275
275
|
"cl-p-6": o.size === "large"
|
|
276
276
|
}])
|
|
277
277
|
}, [
|
|
278
|
-
|
|
278
|
+
A(o.$slots, "footer")
|
|
279
279
|
], 2)) : M("", !0)
|
|
280
280
|
], 2));
|
|
281
281
|
}
|
|
@@ -284,7 +284,7 @@ const je = /* @__PURE__ */ fe(Il, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
284
284
|
"medium",
|
|
285
285
|
"large"
|
|
286
286
|
];
|
|
287
|
-
var X = /* @__PURE__ */ ((t) => (t.CURRENCY = "currency", t.PERCENTAGE = "percentage", t.INTEGER = "integer", t.DECIMAL = "decimal", t.MULTIPLIER = "multiplier", t))(X || {}),
|
|
287
|
+
var X = /* @__PURE__ */ ((t) => (t.CURRENCY = "currency", t.PERCENTAGE = "percentage", t.INTEGER = "integer", t.DECIMAL = "decimal", t.MULTIPLIER = "multiplier", t))(X || {}), G = /* @__PURE__ */ ((t) => (t.SHORT_DATE = "short-date", t.SHORT_DATETIME = "short-datetime", t.DATE = "date", t.DATETIME = "datetime", t.LONG_DATE = "long-date", t.LONG_DATETIME = "long-datetime", t.TIME = "time", t.MONTH_YEAR = "month-year", t))(G || {});
|
|
288
288
|
const Pl = {
|
|
289
289
|
"en-GB": {
|
|
290
290
|
comboBox: {
|
|
@@ -385,52 +385,52 @@ const Pl = {
|
|
|
385
385
|
}
|
|
386
386
|
}, Vl = {
|
|
387
387
|
"en-GB": {
|
|
388
|
-
[
|
|
388
|
+
[G.SHORT_DATE]: {
|
|
389
389
|
day: "numeric",
|
|
390
390
|
month: "numeric",
|
|
391
391
|
year: "2-digit"
|
|
392
392
|
},
|
|
393
|
-
[
|
|
393
|
+
[G.SHORT_DATETIME]: {
|
|
394
394
|
day: "numeric",
|
|
395
395
|
month: "numeric",
|
|
396
396
|
year: "2-digit",
|
|
397
397
|
hour: "numeric",
|
|
398
398
|
minute: "numeric"
|
|
399
399
|
},
|
|
400
|
-
[
|
|
400
|
+
[G.DATE]: {
|
|
401
401
|
day: "numeric",
|
|
402
402
|
month: "numeric",
|
|
403
403
|
year: "numeric"
|
|
404
404
|
},
|
|
405
|
-
[
|
|
405
|
+
[G.DATETIME]: {
|
|
406
406
|
day: "numeric",
|
|
407
407
|
month: "numeric",
|
|
408
408
|
year: "numeric",
|
|
409
409
|
hour: "numeric",
|
|
410
410
|
minute: "numeric"
|
|
411
411
|
},
|
|
412
|
-
[
|
|
412
|
+
[G.LONG_DATE]: {
|
|
413
413
|
day: "numeric",
|
|
414
414
|
month: "long",
|
|
415
415
|
year: "numeric"
|
|
416
416
|
},
|
|
417
|
-
[
|
|
417
|
+
[G.LONG_DATETIME]: {
|
|
418
418
|
day: "numeric",
|
|
419
419
|
month: "long",
|
|
420
420
|
year: "numeric",
|
|
421
421
|
hour: "numeric",
|
|
422
422
|
minute: "numeric"
|
|
423
423
|
},
|
|
424
|
-
[
|
|
424
|
+
[G.TIME]: {
|
|
425
425
|
hour: "numeric",
|
|
426
426
|
minute: "numeric"
|
|
427
427
|
},
|
|
428
|
-
[
|
|
428
|
+
[G.MONTH_YEAR]: {
|
|
429
429
|
month: "long",
|
|
430
430
|
year: "numeric"
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
|
-
}, Z =
|
|
433
|
+
}, Z = ml({
|
|
434
434
|
locale: "en-GB",
|
|
435
435
|
fallbackLocale: "en-GB",
|
|
436
436
|
messages: Pl,
|
|
@@ -441,28 +441,28 @@ const Pl = {
|
|
|
441
441
|
fallbackWarn: !1,
|
|
442
442
|
warnHtmlMessage: !1
|
|
443
443
|
});
|
|
444
|
-
function
|
|
444
|
+
function Jn(t, o) {
|
|
445
445
|
return Z.global.mergeLocaleMessage(t, o), be();
|
|
446
446
|
}
|
|
447
|
-
function
|
|
447
|
+
function Kn(t, o) {
|
|
448
448
|
return Z.global.mergeNumberFormat(t, o), be();
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function Zn(t, o) {
|
|
451
451
|
return Z.global.mergeDateTimeFormat(t, o), be();
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function Qn(t) {
|
|
454
454
|
return Z.global.locale.value = t, be();
|
|
455
455
|
}
|
|
456
|
-
const { t:
|
|
456
|
+
const { t: ne } = Z.global;
|
|
457
457
|
function Gl(t, o, e, l) {
|
|
458
|
-
const
|
|
459
|
-
return l instanceof Date && (l = l.getTime()), new Promise((
|
|
458
|
+
const a = Z.global.locale.value;
|
|
459
|
+
return l instanceof Date && (l = l.getTime()), new Promise((n) => {
|
|
460
460
|
let r = {
|
|
461
461
|
valid: !1,
|
|
462
462
|
message: ""
|
|
463
463
|
};
|
|
464
464
|
if (t != null) {
|
|
465
|
-
let s,
|
|
465
|
+
let s, u;
|
|
466
466
|
switch (o) {
|
|
467
467
|
case "email":
|
|
468
468
|
case "password":
|
|
@@ -470,38 +470,38 @@ function Gl(t, o, e, l) {
|
|
|
470
470
|
case "tel":
|
|
471
471
|
case "text":
|
|
472
472
|
case "url":
|
|
473
|
-
s = ((l == null ? void 0 : l.length) ?? 0) >= t, r = se(s,
|
|
473
|
+
s = ((l == null ? void 0 : l.length) ?? 0) >= t, r = se(s, ne("input.greaterOrEqualToCharacters", { label: e, min: t.toString() }));
|
|
474
474
|
break;
|
|
475
475
|
case "number":
|
|
476
476
|
case "range":
|
|
477
|
-
s = l >= t, r = se(s,
|
|
477
|
+
s = l >= t, r = se(s, ne("input.greaterOrEqualToValue", { label: e, min: t.toString() }));
|
|
478
478
|
break;
|
|
479
479
|
case "date":
|
|
480
|
-
s = l >= new Date(t).getTime(), r = se(s,
|
|
480
|
+
s = l >= new Date(t).getTime(), r = se(s, ne("input.afterOrEqualToValue", { label: e, min: new Date(t).toLocaleDateString(a) }));
|
|
481
481
|
break;
|
|
482
482
|
case "datetime":
|
|
483
|
-
s = l >= new Date(t).getTime(), r = se(s,
|
|
483
|
+
s = l >= new Date(t).getTime(), r = se(s, ne("input.afterOrEqualToValue", { label: e, min: Z.global.d(new Date(t), G.DATETIME, a ?? Z.global.locale.value) }));
|
|
484
484
|
break;
|
|
485
485
|
case "time":
|
|
486
|
-
|
|
486
|
+
u = t.toDateFromTime(), s = l >= u, r = se(s, ne("input.afterOrEqualToValue", { label: e, min: Z.global.d(new Date(u), G.TIME, a ?? Z.global.locale.value) }));
|
|
487
487
|
break;
|
|
488
488
|
default:
|
|
489
489
|
r.valid = !0;
|
|
490
490
|
break;
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
|
-
|
|
493
|
+
n(r);
|
|
494
494
|
});
|
|
495
495
|
}
|
|
496
496
|
function Hl(t, o, e, l) {
|
|
497
|
-
const
|
|
498
|
-
return l instanceof Date && (l = l.getTime()), new Promise((
|
|
497
|
+
const a = Z.global.locale.value;
|
|
498
|
+
return l instanceof Date && (l = l.getTime()), new Promise((n) => {
|
|
499
499
|
let r = {
|
|
500
500
|
valid: !1,
|
|
501
501
|
message: ""
|
|
502
502
|
};
|
|
503
503
|
if (t != null) {
|
|
504
|
-
let s,
|
|
504
|
+
let s, u;
|
|
505
505
|
switch (o) {
|
|
506
506
|
case "email":
|
|
507
507
|
case "password":
|
|
@@ -509,39 +509,39 @@ function Hl(t, o, e, l) {
|
|
|
509
509
|
case "tel":
|
|
510
510
|
case "text":
|
|
511
511
|
case "url":
|
|
512
|
-
s = ((l == null ? void 0 : l.length) ?? 0) <= t, r = se(s,
|
|
512
|
+
s = ((l == null ? void 0 : l.length) ?? 0) <= t, r = se(s, ne("input.lessOrEqualToCharacters", { label: e, max: t.toString() }));
|
|
513
513
|
break;
|
|
514
514
|
case "number":
|
|
515
515
|
case "range":
|
|
516
|
-
s = l <= t, r = se(s,
|
|
516
|
+
s = l <= t, r = se(s, ne("input.lessOrEqualToValue", { label: e, max: t.toString() }));
|
|
517
517
|
break;
|
|
518
518
|
case "date":
|
|
519
|
-
s = l <= new Date(t).getTime(), r = se(s,
|
|
519
|
+
s = l <= new Date(t).getTime(), r = se(s, ne("input.beforeOrEqualToValue", { label: e, max: new Date(t).toLocaleDateString(a) }));
|
|
520
520
|
break;
|
|
521
521
|
case "datetime":
|
|
522
|
-
s = l <= new Date(t).getTime(), r = se(s,
|
|
522
|
+
s = l <= new Date(t).getTime(), r = se(s, ne("input.afterOrEqualToValue", { label: e, min: Z.global.d(new Date(t), G.DATETIME, a ?? Z.global.locale.value) }));
|
|
523
523
|
break;
|
|
524
524
|
case "time":
|
|
525
|
-
|
|
525
|
+
u = t.toDateFromTime(), s = l <= u, r = se(s, ne("input.afterOrEqualToValue", { label: e, min: Z.global.d(new Date(u), G.TIME, a ?? Z.global.locale.value) }));
|
|
526
526
|
break;
|
|
527
527
|
default:
|
|
528
528
|
r.valid = !0;
|
|
529
529
|
break;
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
|
-
|
|
532
|
+
n(r);
|
|
533
533
|
});
|
|
534
534
|
}
|
|
535
535
|
function Wl(t, o) {
|
|
536
536
|
return new Promise((e) => {
|
|
537
|
-
const l = o != null && o !== "" && o.toString().trim() !== "",
|
|
538
|
-
e(
|
|
537
|
+
const l = o != null && o !== "" && o.toString().trim() !== "", a = se(l, ne("input.valueIsRequired", { label: t }));
|
|
538
|
+
e(a);
|
|
539
539
|
});
|
|
540
540
|
}
|
|
541
541
|
function Jl(t, o) {
|
|
542
542
|
return new Promise((e) => {
|
|
543
|
-
const
|
|
544
|
-
e(
|
|
543
|
+
const a = o === "" || /[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/.exec(o) !== null, n = se(a, ne("input.valueNotValidEmail", { label: t }));
|
|
544
|
+
e(n);
|
|
545
545
|
});
|
|
546
546
|
}
|
|
547
547
|
function se(t, o) {
|
|
@@ -562,7 +562,7 @@ function Kl(t) {
|
|
|
562
562
|
from: "@iconify/vue"
|
|
563
563
|
};
|
|
564
564
|
}
|
|
565
|
-
function
|
|
565
|
+
function Yn() {
|
|
566
566
|
return Kl;
|
|
567
567
|
}
|
|
568
568
|
var we = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ie = { exports: {} };
|
|
@@ -572,7 +572,7 @@ var we = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
572
572
|
})(we, function(e) {
|
|
573
573
|
var l = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
|
|
574
574
|
l10ns: {}
|
|
575
|
-
},
|
|
575
|
+
}, a = {
|
|
576
576
|
weekdays: {
|
|
577
577
|
shorthand: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
|
|
578
578
|
longhand: [
|
|
@@ -622,9 +622,9 @@ var we = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
622
622
|
toggleTitle: "Zum Umschalten klicken",
|
|
623
623
|
time_24hr: !0
|
|
624
624
|
};
|
|
625
|
-
l.l10ns.de =
|
|
626
|
-
var
|
|
627
|
-
e.German =
|
|
625
|
+
l.l10ns.de = a;
|
|
626
|
+
var n = l.l10ns;
|
|
627
|
+
e.German = a, e.default = n, Object.defineProperty(e, "__esModule", { value: !0 });
|
|
628
628
|
});
|
|
629
629
|
})(Ie, Ie.exports);
|
|
630
630
|
var Zl = Ie.exports, Ne = { exports: {} };
|
|
@@ -677,11 +677,11 @@ var Zl = Ie.exports, Ne = { exports: {} };
|
|
|
677
677
|
},
|
|
678
678
|
daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
|
|
679
679
|
firstDayOfWeek: 0,
|
|
680
|
-
ordinal: function(
|
|
681
|
-
var
|
|
682
|
-
if (
|
|
680
|
+
ordinal: function(a) {
|
|
681
|
+
var n = a % 100;
|
|
682
|
+
if (n > 3 && n < 21)
|
|
683
683
|
return "th";
|
|
684
|
-
switch (
|
|
684
|
+
switch (n % 10) {
|
|
685
685
|
case 1:
|
|
686
686
|
return "st";
|
|
687
687
|
case 2:
|
|
@@ -713,7 +713,7 @@ var Ql = Ne.exports, qe = { exports: {} };
|
|
|
713
713
|
})(we, function(e) {
|
|
714
714
|
var l = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
|
|
715
715
|
l10ns: {}
|
|
716
|
-
},
|
|
716
|
+
}, a = {
|
|
717
717
|
weekdays: {
|
|
718
718
|
shorthand: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"],
|
|
719
719
|
longhand: [
|
|
@@ -763,9 +763,9 @@ var Ql = Ne.exports, qe = { exports: {} };
|
|
|
763
763
|
rangeSeparator: " a ",
|
|
764
764
|
time_24hr: !0
|
|
765
765
|
};
|
|
766
|
-
l.l10ns.es =
|
|
767
|
-
var
|
|
768
|
-
e.Spanish =
|
|
766
|
+
l.l10ns.es = a;
|
|
767
|
+
var n = l.l10ns;
|
|
768
|
+
e.Spanish = a, e.default = n, Object.defineProperty(e, "__esModule", { value: !0 });
|
|
769
769
|
});
|
|
770
770
|
})(qe, qe.exports);
|
|
771
771
|
var Yl = qe.exports, De = { exports: {} };
|
|
@@ -775,7 +775,7 @@ var Yl = qe.exports, De = { exports: {} };
|
|
|
775
775
|
})(we, function(e) {
|
|
776
776
|
var l = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
|
|
777
777
|
l10ns: {}
|
|
778
|
-
},
|
|
778
|
+
}, a = {
|
|
779
779
|
firstDayOfWeek: 1,
|
|
780
780
|
weekdays: {
|
|
781
781
|
shorthand: ["dim", "lun", "mar", "mer", "jeu", "ven", "sam"],
|
|
@@ -828,9 +828,9 @@ var Yl = qe.exports, De = { exports: {} };
|
|
|
828
828
|
toggleTitle: "Cliquer pour basculer",
|
|
829
829
|
time_24hr: !0
|
|
830
830
|
};
|
|
831
|
-
l.l10ns.fr =
|
|
832
|
-
var
|
|
833
|
-
e.French =
|
|
831
|
+
l.l10ns.fr = a;
|
|
832
|
+
var n = l.l10ns;
|
|
833
|
+
e.French = a, e.default = n, Object.defineProperty(e, "__esModule", { value: !0 });
|
|
834
834
|
});
|
|
835
835
|
})(De, De.exports);
|
|
836
836
|
var Xl = De.exports, Re = { exports: {} };
|
|
@@ -840,7 +840,7 @@ var Xl = De.exports, Re = { exports: {} };
|
|
|
840
840
|
})(we, function(e) {
|
|
841
841
|
var l = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
|
|
842
842
|
l10ns: {}
|
|
843
|
-
},
|
|
843
|
+
}, a = {
|
|
844
844
|
weekdays: {
|
|
845
845
|
shorthand: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"],
|
|
846
846
|
longhand: [
|
|
@@ -893,9 +893,9 @@ var Xl = De.exports, Re = { exports: {} };
|
|
|
893
893
|
toggleTitle: "Clicca per cambiare",
|
|
894
894
|
time_24hr: !0
|
|
895
895
|
};
|
|
896
|
-
l.l10ns.it =
|
|
897
|
-
var
|
|
898
|
-
e.Italian =
|
|
896
|
+
l.l10ns.it = a;
|
|
897
|
+
var n = l.l10ns;
|
|
898
|
+
e.Italian = a, e.default = n, Object.defineProperty(e, "__esModule", { value: !0 });
|
|
899
899
|
});
|
|
900
900
|
})(Re, Re.exports);
|
|
901
901
|
var et = Re.exports, Ue = { exports: {} };
|
|
@@ -905,7 +905,7 @@ var et = Re.exports, Ue = { exports: {} };
|
|
|
905
905
|
})(we, function(e) {
|
|
906
906
|
var l = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
|
|
907
907
|
l10ns: {}
|
|
908
|
-
},
|
|
908
|
+
}, a = {
|
|
909
909
|
weekdays: {
|
|
910
910
|
shorthand: ["zo", "ma", "di", "wo", "do", "vr", "za"],
|
|
911
911
|
longhand: [
|
|
@@ -958,9 +958,9 @@ var et = Re.exports, Ue = { exports: {} };
|
|
|
958
958
|
return r === 1 || r === 8 || r >= 20 ? "ste" : "de";
|
|
959
959
|
}
|
|
960
960
|
};
|
|
961
|
-
l.l10ns.nl =
|
|
962
|
-
var
|
|
963
|
-
e.Dutch =
|
|
961
|
+
l.l10ns.nl = a;
|
|
962
|
+
var n = l.l10ns;
|
|
963
|
+
e.Dutch = a, e.default = n, Object.defineProperty(e, "__esModule", { value: !0 });
|
|
964
964
|
});
|
|
965
965
|
})(Ue, Ue.exports);
|
|
966
966
|
var lt = Ue.exports;
|
|
@@ -970,7 +970,7 @@ function tt() {
|
|
|
970
970
|
function ot(t, o, e) {
|
|
971
971
|
return t.replace("1990", e).replace("12", o).replace("01", "m").replace("1", "n").replace("02", "d").replace("2", "j").replace("05", "i").replace("PM", "K");
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function at(t) {
|
|
974
974
|
let o;
|
|
975
975
|
switch (t) {
|
|
976
976
|
case "de-DE":
|
|
@@ -994,15 +994,15 @@ function nt(t) {
|
|
|
994
994
|
}
|
|
995
995
|
return o;
|
|
996
996
|
}
|
|
997
|
-
function
|
|
997
|
+
function He(t, o) {
|
|
998
998
|
let e;
|
|
999
999
|
if (t.indexOf("/") > -1 || t.indexOf("-") > -1) {
|
|
1000
|
-
const l = new Date(t).toLocaleString(o),
|
|
1001
|
-
|
|
1000
|
+
const l = new Date(t).toLocaleString(o), a = l.indexOf(",");
|
|
1001
|
+
a > -1 ? e = l.substr(0, a) : e = l;
|
|
1002
1002
|
}
|
|
1003
1003
|
return e;
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1005
|
+
function We(t) {
|
|
1006
1006
|
let o;
|
|
1007
1007
|
if (/([0-9]{2}:[0-9]{2})/.exec(t) !== null) {
|
|
1008
1008
|
const l = t.indexOf("T");
|
|
@@ -1010,7 +1010,7 @@ function He(t) {
|
|
|
1010
1010
|
}
|
|
1011
1011
|
return o;
|
|
1012
1012
|
}
|
|
1013
|
-
const
|
|
1013
|
+
const nt = ["disabled"], st = { class: "cl-absolute cl-bg-white cl-flex cl-right-2 cl-text-grey-4 cl-top-2" }, rt = /* @__PURE__ */ D({
|
|
1014
1014
|
__name: "cl-ui-calendar",
|
|
1015
1015
|
props: {
|
|
1016
1016
|
date: { default: null },
|
|
@@ -1023,143 +1023,162 @@ const at = ["disabled"], st = { class: "cl-absolute cl-bg-white cl-flex cl-right
|
|
|
1023
1023
|
"update:date": null
|
|
1024
1024
|
},
|
|
1025
1025
|
setup(t, { expose: o, emit: e }) {
|
|
1026
|
-
const l = t, { d:
|
|
1027
|
-
var
|
|
1028
|
-
let
|
|
1029
|
-
return ((
|
|
1030
|
-
}),
|
|
1031
|
-
var
|
|
1032
|
-
const
|
|
1033
|
-
...
|
|
1026
|
+
const l = t, { d: a, getDateTimeFormat: n, locale: r } = te(), s = S(null), u = S(null), f = O(() => a(tt(), l.type)), v = O(() => n(r.value)[l.type]), w = O(() => he()), i = O(() => ve()), y = O(() => He(l.min, r.value)), c = O(() => He(l.max, r.value)), k = S(!1), T = O(() => {
|
|
1027
|
+
var W, F;
|
|
1028
|
+
let g = "H", E = "Y";
|
|
1029
|
+
return ((W = v.value) == null ? void 0 : W.hour12) === !0 && (g = "h"), ((F = v.value) == null ? void 0 : F.year) === "2-digit" && (E = "y"), ot(f.value, g, E);
|
|
1030
|
+
}), j = O(() => {
|
|
1031
|
+
var E, W;
|
|
1032
|
+
const g = {
|
|
1033
|
+
...Ve.defaultConfig,
|
|
1034
1034
|
allowInput: !0,
|
|
1035
|
-
dateFormat:
|
|
1035
|
+
dateFormat: T.value,
|
|
1036
1036
|
disableMobile: !0,
|
|
1037
|
-
enableTime: l.type ===
|
|
1038
|
-
locale:
|
|
1037
|
+
enableTime: l.type === G.DATETIME || l.type === G.TIME,
|
|
1038
|
+
locale: at(r.value),
|
|
1039
1039
|
maxDate: c.value,
|
|
1040
|
-
maxTime:
|
|
1041
|
-
minDate:
|
|
1042
|
-
minTime:
|
|
1040
|
+
maxTime: i.value,
|
|
1041
|
+
minDate: y.value,
|
|
1042
|
+
minTime: w.value,
|
|
1043
1043
|
minuteIncrement: 1,
|
|
1044
1044
|
monthSelectorType: "static",
|
|
1045
|
-
noCalendar: l.type ===
|
|
1045
|
+
noCalendar: l.type === G.TIME,
|
|
1046
1046
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1047
|
-
time_24hr: typeof ((
|
|
1047
|
+
time_24hr: typeof ((E = v.value) == null ? void 0 : E.hour12) > "u" || ((W = v.value) == null ? void 0 : W.hour12) === !1
|
|
1048
1048
|
};
|
|
1049
|
-
return l.date !== null && (
|
|
1049
|
+
return l.date !== null && (g.defaultDate = l.date), g;
|
|
1050
1050
|
});
|
|
1051
|
-
function
|
|
1052
|
-
const
|
|
1053
|
-
|
|
1051
|
+
function V(g, E, W) {
|
|
1052
|
+
const F = g.length > 0 ? g[0] : null;
|
|
1053
|
+
F !== l.date && !k.value && e("update:date", F), k.value = !1;
|
|
1054
1054
|
}
|
|
1055
|
-
function
|
|
1055
|
+
function ee() {
|
|
1056
1056
|
k.value = !0, e("update:date", null);
|
|
1057
1057
|
}
|
|
1058
|
-
function
|
|
1058
|
+
function ue() {
|
|
1059
1059
|
if (s.value !== null) {
|
|
1060
|
-
let
|
|
1061
|
-
|
|
1062
|
-
let
|
|
1063
|
-
l.type === "time" ?
|
|
1060
|
+
let g = /* @__PURE__ */ new Date();
|
|
1061
|
+
g.setHours(12, 0, 0, 0);
|
|
1062
|
+
let E;
|
|
1063
|
+
l.type === "time" ? E = l.min.toDateFromTime() : E = new Date(l.min), E > g && (g = E), k.value = !0, e("update:date", g);
|
|
1064
1064
|
}
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1067
|
-
s.value === null &&
|
|
1066
|
+
function $() {
|
|
1067
|
+
s.value === null && u.value !== null && (s.value = Ve(u.value, j.value), s.value.config.onChange.push(V));
|
|
1068
1068
|
}
|
|
1069
|
-
function
|
|
1070
|
-
s.value !== null && (s.value.set(
|
|
1069
|
+
function P() {
|
|
1070
|
+
s.value !== null && (s.value.set(j.value), s.value.config.onChange.push(V));
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1073
|
-
s.value !== null && s.value.setDate(
|
|
1072
|
+
function ae(g) {
|
|
1073
|
+
s.value !== null && s.value.setDate(g, !0);
|
|
1074
1074
|
}
|
|
1075
1075
|
function J() {
|
|
1076
1076
|
s.value !== null && s.value.clear();
|
|
1077
1077
|
}
|
|
1078
|
-
function
|
|
1078
|
+
function fe() {
|
|
1079
1079
|
s.value !== null && (s.value.destroy(), s.value = null);
|
|
1080
1080
|
}
|
|
1081
1081
|
function he() {
|
|
1082
|
-
let
|
|
1083
|
-
return (l.type ===
|
|
1082
|
+
let g;
|
|
1083
|
+
return (l.type === G.TIME || l.type === G.DATETIME) && (g = We(l.min)), g;
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1086
|
-
let
|
|
1087
|
-
return (l.type ===
|
|
1085
|
+
function ve() {
|
|
1086
|
+
let g;
|
|
1087
|
+
return (l.type === G.TIME || l.type === G.DATETIME) && (g = We(l.max)), g;
|
|
1088
1088
|
}
|
|
1089
|
-
return
|
|
1090
|
-
|
|
1089
|
+
return H(() => l.date, (g, E) => {
|
|
1090
|
+
g !== null && E !== null ? g.getTime() !== E.getTime() && ae(g) : g === null && E !== null && J();
|
|
1091
1091
|
}, {
|
|
1092
1092
|
deep: !0
|
|
1093
|
-
}),
|
|
1093
|
+
}), H(() => j.value, P, {
|
|
1094
1094
|
deep: !0
|
|
1095
|
-
}),
|
|
1096
|
-
|
|
1095
|
+
}), H(() => l.type, () => {
|
|
1096
|
+
fe(), be(() => $());
|
|
1097
1097
|
}, {
|
|
1098
1098
|
immediate: !1
|
|
1099
|
-
}),
|
|
1099
|
+
}), Ce(() => $()), Ae(() => fe()), o({
|
|
1100
1100
|
focus() {
|
|
1101
|
-
var
|
|
1102
|
-
(
|
|
1101
|
+
var g;
|
|
1102
|
+
(g = u.value) == null || g.focus();
|
|
1103
1103
|
}
|
|
1104
|
-
}), (
|
|
1105
|
-
|
|
1104
|
+
}), (g, E) => (d(), h("div", ie(g.$attrs, { class: "cl-relative" }), [
|
|
1105
|
+
m("input", ie({
|
|
1106
1106
|
ref_key: "element",
|
|
1107
|
-
ref:
|
|
1108
|
-
},
|
|
1109
|
-
class: ["!cl-text-sm cl-border-grey-1 cl-rounded-lg focus:cl-border-blue-light focus:cl-ring-0", { "cl-bg-off-white":
|
|
1107
|
+
ref: u
|
|
1108
|
+
}, g.$attrs, {
|
|
1109
|
+
class: ["!cl-text-sm cl-border-grey-1 cl-rounded-lg focus:cl-border-blue-light focus:cl-ring-0", { "cl-bg-off-white": g.disabled }],
|
|
1110
1110
|
type: "text",
|
|
1111
|
-
disabled:
|
|
1112
|
-
}), null, 16,
|
|
1111
|
+
disabled: g.disabled
|
|
1112
|
+
}), null, 16, nt),
|
|
1113
1113
|
U(C(p(q), {
|
|
1114
1114
|
class: I(["cl-absolute cl-bg-white cl-right-2 cl-text-grey-4 cl-top-2", {
|
|
1115
|
-
"!cl-bg-off-white":
|
|
1115
|
+
"!cl-bg-off-white": g.disabled
|
|
1116
1116
|
}]),
|
|
1117
1117
|
icon: "ph:calendar",
|
|
1118
1118
|
weight: "light",
|
|
1119
1119
|
size: 18
|
|
1120
1120
|
}, null, 8, ["class"]), [
|
|
1121
|
-
[B, (
|
|
1121
|
+
[B, (g.date === null || g.disabled) && g.type !== "time"]
|
|
1122
1122
|
]),
|
|
1123
1123
|
U(C(p(q), {
|
|
1124
1124
|
class: I(["cl-absolute cl-bg-white cl-right-2 cl-text-grey-4 cl-top-3.5", {
|
|
1125
|
-
"!cl-bg-off-white":
|
|
1125
|
+
"!cl-bg-off-white": g.disabled
|
|
1126
1126
|
}]),
|
|
1127
1127
|
icon: "ph-clock",
|
|
1128
1128
|
weight: "light",
|
|
1129
1129
|
size: 18
|
|
1130
1130
|
}, null, 8, ["class"]), [
|
|
1131
|
-
[B, (
|
|
1131
|
+
[B, (g.date === null || g.disabled) && g.type === "time"]
|
|
1132
1132
|
]),
|
|
1133
|
-
U(
|
|
1133
|
+
U(m("div", st, [
|
|
1134
1134
|
C(p(q), {
|
|
1135
1135
|
class: "cl-cursor-pointer cl-mr-0.5 md:cl-mr-1",
|
|
1136
1136
|
icon: "ph:arrow-counter-clockwise",
|
|
1137
1137
|
size: 16,
|
|
1138
|
-
onClick:
|
|
1138
|
+
onClick: ue
|
|
1139
1139
|
}),
|
|
1140
1140
|
C(p(q), {
|
|
1141
1141
|
class: "cl-cursor-pointer",
|
|
1142
1142
|
icon: "ph:x",
|
|
1143
1143
|
size: 16,
|
|
1144
|
-
onClick:
|
|
1144
|
+
onClick: ee
|
|
1145
1145
|
})
|
|
1146
1146
|
], 512), [
|
|
1147
|
-
[B,
|
|
1147
|
+
[B, g.date !== null && !g.disabled]
|
|
1148
1148
|
])
|
|
1149
1149
|
], 16));
|
|
1150
1150
|
}
|
|
1151
1151
|
});
|
|
1152
|
-
const ct = /* @__PURE__ */
|
|
1152
|
+
const ct = /* @__PURE__ */ de(rt, [["__scopeId", "data-v-1698c950"]]), Me = [
|
|
1153
1153
|
"date",
|
|
1154
1154
|
"datetime",
|
|
1155
1155
|
"time"
|
|
1156
|
-
], it =
|
|
1156
|
+
], it = [
|
|
1157
|
+
"button",
|
|
1158
|
+
"checkbox",
|
|
1159
|
+
"color",
|
|
1160
|
+
"date",
|
|
1161
|
+
"datetime",
|
|
1162
|
+
"email",
|
|
1163
|
+
"file",
|
|
1164
|
+
"number",
|
|
1165
|
+
"password",
|
|
1166
|
+
"radio",
|
|
1167
|
+
"range",
|
|
1168
|
+
"reset",
|
|
1169
|
+
"search",
|
|
1170
|
+
"submit",
|
|
1171
|
+
"tel",
|
|
1172
|
+
"text",
|
|
1173
|
+
"time",
|
|
1174
|
+
"url"
|
|
1175
|
+
], ut = { class: "cl-flex cl-flex-wrap cl-items-center" }, dt = { class: "cl-flex cl-flex-1 cl-flex-wrap cl-items-center cl-mb-2 cl-mt-3 cl-relative md:cl-mt-0" }, ft = { class: "cl-absolute cl-bg-grey-0 cl-leading-6 cl-ml-0 cl-px-3 cl-rounded-full cl-text-center cl-text-xs cl-top-full" }, pt = {
|
|
1157
1176
|
key: 0,
|
|
1158
1177
|
class: "cl-w-full"
|
|
1159
|
-
},
|
|
1178
|
+
}, mt = ["min", "max", "step", "disabled"], gt = { 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" }, vt = {
|
|
1160
1179
|
key: 1,
|
|
1161
1180
|
class: "emphasis-danger text-sm w-full"
|
|
1162
|
-
},
|
|
1181
|
+
}, bt = /* @__PURE__ */ D({
|
|
1163
1182
|
__name: "cl-ui-slider",
|
|
1164
1183
|
props: {
|
|
1165
1184
|
value: {},
|
|
@@ -1174,76 +1193,73 @@ const ct = /* @__PURE__ */ fe(rt, [["__scopeId", "data-v-1698c950"]]), Me = [
|
|
|
1174
1193
|
"update:value": null
|
|
1175
1194
|
},
|
|
1176
1195
|
setup(t, { expose: o, emit: e }) {
|
|
1177
|
-
const l = t, { n, t:
|
|
1196
|
+
const l = t, { n: a, t: n } = te(), { debounce: r } = gl(), s = S(l.value), u = S(), f = O({
|
|
1178
1197
|
get: () => l.value,
|
|
1179
1198
|
set: (c) => e("update:value", c)
|
|
1180
|
-
}),
|
|
1181
|
-
let c = (
|
|
1199
|
+
}), v = O(() => l.disabled ? "rgba(153, 153, 153, 0.8)" : "#9acd32"), w = O(() => {
|
|
1200
|
+
let c = (f.value - l.min) / (l.max - l.min) * 100;
|
|
1182
1201
|
return c < 35 && c > 0 ? c < 20 ? c += 0.5 : c += 0.25 : c > 65 && c < 100 && (c > 80 ? c -= 0.5 : c -= 0.25), c;
|
|
1183
|
-
}),
|
|
1184
|
-
function
|
|
1185
|
-
const
|
|
1186
|
-
|
|
1202
|
+
}), i = O(() => l.min <= l.max && l.step > 0);
|
|
1203
|
+
function y(c, k) {
|
|
1204
|
+
const T = (c == null ? void 0 : c.value) ?? "", j = Math.max(Math.min(parseFloat(T) || l.min, l.max), l.min);
|
|
1205
|
+
f.value = l.enforceStep ? Math.ceil(j / l.step) * l.step : j, be(() => k());
|
|
1187
1206
|
}
|
|
1188
|
-
return
|
|
1207
|
+
return H(() => l.value, () => s.value = l.value), o({
|
|
1189
1208
|
focus() {
|
|
1190
1209
|
var c;
|
|
1191
|
-
(c =
|
|
1210
|
+
(c = u.value) == null || c.focus();
|
|
1192
1211
|
}
|
|
1193
|
-
}), (c, k) => {
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1212
|
+
}), (c, k) => i.value ? (d(), h("div", le(ie({ key: 0 }, c.$attrs)), [
|
|
1213
|
+
U(m("div", { class: "cl-bg-transparent cl-relative cl-text-center cl-text-sm" }, _(f.value), 513), [
|
|
1214
|
+
[B, !c.showNumericInput]
|
|
1215
|
+
]),
|
|
1216
|
+
m("div", ut, [
|
|
1217
|
+
U(C(p(oe), {
|
|
1218
|
+
modelValue: s.value,
|
|
1219
|
+
"onUpdate:modelValue": k[0] || (k[0] = (T) => s.value = T),
|
|
1220
|
+
class: "!cl-text-sm md:!cl-w-auto",
|
|
1221
|
+
"input-type": "number",
|
|
1222
|
+
min: c.min,
|
|
1223
|
+
max: c.max,
|
|
1224
|
+
step: c.step,
|
|
1225
|
+
disabled: c.disabled,
|
|
1226
|
+
onInput: k[1] || (k[1] = (T) => p(r)(y, T.target, c.$forceUpdate))
|
|
1227
|
+
}, null, 8, ["modelValue", "min", "max", "step", "disabled"]), [
|
|
1228
|
+
[B, c.showNumericInput]
|
|
1198
1229
|
]),
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
"
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
min: c.min,
|
|
1226
|
-
max: c.max,
|
|
1227
|
-
step: c.step,
|
|
1228
|
-
disabled: c.disabled
|
|
1229
|
-
}, null, 12, pt), [
|
|
1230
|
-
[
|
|
1231
|
-
il,
|
|
1232
|
-
d.value,
|
|
1233
|
-
void 0,
|
|
1234
|
-
{ number: !0 }
|
|
1235
|
-
]
|
|
1236
|
-
])
|
|
1237
|
-
])) : M("", !0),
|
|
1238
|
-
f("span", mt, S(p(n)(c.max, Number.isInteger(c.max) ? p(X).INTEGER : p(X).DECIMAL)), 1)
|
|
1239
|
-
])
|
|
1230
|
+
m("div", dt, [
|
|
1231
|
+
m("span", ft, _(p(a)(c.min, Number.isInteger(c.min) ? p(X).INTEGER : p(X).DECIMAL)), 1),
|
|
1232
|
+
typeof f.value == "number" ? (d(), h("div", pt, [
|
|
1233
|
+
U(m("input", {
|
|
1234
|
+
ref_key: "sliderRef",
|
|
1235
|
+
ref: u,
|
|
1236
|
+
"onUpdate:modelValue": k[2] || (k[2] = (T) => f.value = T),
|
|
1237
|
+
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",
|
|
1238
|
+
style: el({
|
|
1239
|
+
background: `linear-gradient(to right, ${v.value} 0%, ${v.value} ${w.value}%, white ${w.value}%, white 100%)`
|
|
1240
|
+
}),
|
|
1241
|
+
type: "range",
|
|
1242
|
+
min: c.min,
|
|
1243
|
+
max: c.max,
|
|
1244
|
+
step: c.step,
|
|
1245
|
+
disabled: c.disabled
|
|
1246
|
+
}, null, 12, mt), [
|
|
1247
|
+
[
|
|
1248
|
+
cl,
|
|
1249
|
+
f.value,
|
|
1250
|
+
void 0,
|
|
1251
|
+
{ number: !0 }
|
|
1252
|
+
]
|
|
1253
|
+
])
|
|
1254
|
+
])) : M("", !0),
|
|
1255
|
+
m("span", gt, _(p(a)(c.max, Number.isInteger(c.max) ? p(X).INTEGER : p(X).DECIMAL)), 1)
|
|
1240
1256
|
])
|
|
1241
|
-
]
|
|
1242
|
-
|
|
1257
|
+
])
|
|
1258
|
+
], 16)) : (d(), h("div", vt, _(p(n)("slider.invalidProps")), 1));
|
|
1243
1259
|
}
|
|
1244
1260
|
});
|
|
1245
|
-
const
|
|
1246
|
-
function
|
|
1261
|
+
const ht = /* @__PURE__ */ de(bt, [["__scopeId", "data-v-849763cf"]]);
|
|
1262
|
+
function Je(t) {
|
|
1247
1263
|
let o = !1;
|
|
1248
1264
|
switch (t) {
|
|
1249
1265
|
case "email":
|
|
@@ -1260,10 +1276,10 @@ function We(t) {
|
|
|
1260
1276
|
}
|
|
1261
1277
|
return o;
|
|
1262
1278
|
}
|
|
1263
|
-
function
|
|
1279
|
+
function yt(t) {
|
|
1264
1280
|
return t === "number" || t === "range";
|
|
1265
1281
|
}
|
|
1266
|
-
function
|
|
1282
|
+
function Ke(t) {
|
|
1267
1283
|
let o = !1;
|
|
1268
1284
|
switch (t) {
|
|
1269
1285
|
case "date":
|
|
@@ -1277,7 +1293,7 @@ function Je(t) {
|
|
|
1277
1293
|
}
|
|
1278
1294
|
return o;
|
|
1279
1295
|
}
|
|
1280
|
-
function
|
|
1296
|
+
function wt(t) {
|
|
1281
1297
|
let o = !1;
|
|
1282
1298
|
switch (t) {
|
|
1283
1299
|
case "date":
|
|
@@ -1291,10 +1307,10 @@ function yt(t) {
|
|
|
1291
1307
|
}
|
|
1292
1308
|
return o;
|
|
1293
1309
|
}
|
|
1294
|
-
function
|
|
1310
|
+
function ke(t) {
|
|
1295
1311
|
return t === "button" || t === "submit" || t === "reset";
|
|
1296
1312
|
}
|
|
1297
|
-
function
|
|
1313
|
+
function $t(t) {
|
|
1298
1314
|
let o;
|
|
1299
1315
|
switch (t) {
|
|
1300
1316
|
case "datetime":
|
|
@@ -1310,32 +1326,32 @@ function wt(t) {
|
|
|
1310
1326
|
}
|
|
1311
1327
|
return o;
|
|
1312
1328
|
}
|
|
1313
|
-
function
|
|
1329
|
+
function Ze(t, o) {
|
|
1314
1330
|
const e = t.target;
|
|
1315
|
-
return
|
|
1331
|
+
return yt(o) ? e.valueAsNumber : wt(o) ? e.valueAsDate : ke(o) ? e.checked : e.value;
|
|
1316
1332
|
}
|
|
1317
|
-
const
|
|
1333
|
+
const kt = { class: "cl-flex cl-justify-between" }, Tt = { class: "cl-w-full" }, Ct = {
|
|
1318
1334
|
key: 0,
|
|
1319
1335
|
class: "cl-block cl-left-auto cl-relative cl-text-danger-default"
|
|
1320
|
-
},
|
|
1336
|
+
}, _t = {
|
|
1321
1337
|
key: 1,
|
|
1322
1338
|
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"
|
|
1323
|
-
},
|
|
1339
|
+
}, St = ["type", "disabled", "min", "max", "minlength", "maxlength", "step", "placeholder", "accept", "name", "autocomplete"], Ot = {
|
|
1324
1340
|
key: 2,
|
|
1325
1341
|
class: "cl-h-[5.78rem] cl-pb-2 md:cl-h-20"
|
|
1326
|
-
},
|
|
1342
|
+
}, Et = {
|
|
1327
1343
|
key: 0,
|
|
1328
1344
|
class: "cl-relative"
|
|
1329
|
-
},
|
|
1345
|
+
}, At = {
|
|
1330
1346
|
class: "cl-absolute cl-right-1",
|
|
1331
1347
|
style: { bottom: "1.625rem" }
|
|
1332
|
-
},
|
|
1348
|
+
}, jt = { class: "cl-absolute cl-bottom-2 cl-right-1" }, Mt = {
|
|
1333
1349
|
key: 0,
|
|
1334
1350
|
class: "cl-bg-primary-lighter cl-px-2 cl-rounded-md cl-text-center cl-text-secondary-light cl-text-xs cl-w-auto cl-whitespace-pre-line"
|
|
1335
|
-
},
|
|
1351
|
+
}, It = {
|
|
1336
1352
|
key: 1,
|
|
1337
1353
|
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"
|
|
1338
|
-
},
|
|
1354
|
+
}, Nt = /* @__PURE__ */ D({
|
|
1339
1355
|
__name: "cl-ui-input",
|
|
1340
1356
|
props: {
|
|
1341
1357
|
inputType: { default: "text" },
|
|
@@ -1365,27 +1381,27 @@ const $t = { class: "cl-flex cl-justify-between" }, kt = { class: "cl-w-full" },
|
|
|
1365
1381
|
},
|
|
1366
1382
|
emits: ["update:model-value", "click", "focus", "input", "change", "validated"],
|
|
1367
1383
|
setup(t, { expose: o, emit: e }) {
|
|
1368
|
-
const l = t,
|
|
1384
|
+
const l = t, a = S(null), n = S(!1), r = S(!1), s = O(F), u = O(() => l.placeholderText.trim() !== "" ? l.placeholderText : l.label), f = S(0), v = O({
|
|
1369
1385
|
get: () => l.modelValue,
|
|
1370
|
-
set: (
|
|
1371
|
-
}),
|
|
1386
|
+
set: (b) => $(b, !1)
|
|
1387
|
+
}), w = O({
|
|
1372
1388
|
get: () => l.modelValue,
|
|
1373
|
-
set: (
|
|
1374
|
-
}),
|
|
1375
|
-
var
|
|
1389
|
+
set: (b) => ue(b)
|
|
1390
|
+
}), i = O(() => typeof l.min == "number" ? l.min.toString() : l.min), y = O(() => typeof l.max == "number" ? l.max.toString() : l.max), c = O(() => typeof l.min == "number" ? l.min : parseFloat(l.min)), k = O(() => typeof l.max == "number" ? l.max : parseFloat(l.max)), T = O(() => l.messageWhenValid.trim() !== "" ? l.messageWhenValid : ""), j = S(!0), V = S([]), ee = O(() => {
|
|
1391
|
+
var b, N;
|
|
1376
1392
|
return [
|
|
1377
|
-
...((
|
|
1393
|
+
...((b = V.value) == null ? void 0 : b.filter((R) => ((R == null ? void 0 : R.length) ?? 0) > 0)) ?? [],
|
|
1378
1394
|
...((N = l.externalErrors) == null ? void 0 : N.filter((R) => ((R == null ? void 0 : R.length) ?? 0) > 0)) ?? []
|
|
1379
1395
|
].join(`
|
|
1380
1396
|
`);
|
|
1381
1397
|
});
|
|
1382
|
-
async function
|
|
1383
|
-
l.validateOn === "input" && await
|
|
1398
|
+
async function ue(b) {
|
|
1399
|
+
l.validateOn === "input" && await P(b), e("update:model-value", b);
|
|
1384
1400
|
}
|
|
1385
|
-
async function
|
|
1386
|
-
l.onInputFunction !== void 0 && (
|
|
1401
|
+
async function $(b, N) {
|
|
1402
|
+
l.onInputFunction !== void 0 && (b = l.onInputFunction(b)), (N || l.validateOn === "input") && await P(b), e("update:model-value", b);
|
|
1387
1403
|
}
|
|
1388
|
-
function
|
|
1404
|
+
function P(b) {
|
|
1389
1405
|
const N = {
|
|
1390
1406
|
message: "",
|
|
1391
1407
|
valid: !0
|
|
@@ -1393,174 +1409,178 @@ const $t = { class: "cl-flex cl-justify-between" }, kt = { class: "cl-w-full" },
|
|
|
1393
1409
|
l.customValidationFunction === null || l.customValidationFunction === void 0 ? new Promise((ye) => {
|
|
1394
1410
|
ye(N);
|
|
1395
1411
|
}) : new Promise((ye) => {
|
|
1396
|
-
ye(l.customValidationFunction(l.label,
|
|
1412
|
+
ye(l.customValidationFunction(l.label, b));
|
|
1397
1413
|
})
|
|
1398
1414
|
];
|
|
1399
|
-
return (typeof
|
|
1400
|
-
const
|
|
1401
|
-
|
|
1415
|
+
return (typeof b == "string" || typeof b == "number" || b instanceof Date) && (R.push(Gl(l.min, l.inputType, l.label, b)), R.push(Hl(l.max, l.inputType, l.label, b))), l.isRequired && R.push(Wl(l.label, b)), l.inputType === "email" && typeof b == "string" && R.push(Jl(l.label, b)), Promise.all(R).then((ye) => {
|
|
1416
|
+
const rl = [...ye.map((_e) => _e.message)], Fe = ye.some((_e) => _e.message.length > 0 && _e.valid === !1) || l.externalErrors.length > 0;
|
|
1417
|
+
Fe ? (V.value = rl, e("validated", !1, b)) : (V.value = [], e("validated", !0, b)), j.value = !Fe;
|
|
1402
1418
|
});
|
|
1403
1419
|
}
|
|
1404
|
-
function
|
|
1405
|
-
let
|
|
1406
|
-
return l.inputType === "color" &&
|
|
1420
|
+
function ae() {
|
|
1421
|
+
let b = "";
|
|
1422
|
+
return l.inputType === "color" && v.value && (l.disabled ? b = "background: #999999" : b = `background: ${v.value};`), b;
|
|
1407
1423
|
}
|
|
1408
|
-
function J(
|
|
1409
|
-
|
|
1424
|
+
function J(b) {
|
|
1425
|
+
ke(l.inputType) ? (b.preventDefault(), e("click", b)) : l.inputType === "checkbox" && e("click", b);
|
|
1410
1426
|
}
|
|
1411
|
-
function
|
|
1412
|
-
if (
|
|
1413
|
-
|
|
1427
|
+
function fe(b) {
|
|
1428
|
+
if (a.value) {
|
|
1429
|
+
a.value.stepUp(), a.value.focus(), $(a.value.valueAsNumber, !1);
|
|
1414
1430
|
const N = {
|
|
1415
|
-
target:
|
|
1431
|
+
target: a.value
|
|
1416
1432
|
};
|
|
1417
|
-
e("input", N,
|
|
1433
|
+
e("input", N, a.value.valueAsNumber), e("change", b, a.value.valueAsNumber);
|
|
1418
1434
|
}
|
|
1419
1435
|
}
|
|
1420
|
-
function he(
|
|
1421
|
-
if (
|
|
1422
|
-
|
|
1436
|
+
function he(b) {
|
|
1437
|
+
if (a.value) {
|
|
1438
|
+
a.value.stepDown(), a.value.focus(), $(a.value.valueAsNumber, !1);
|
|
1423
1439
|
const N = {
|
|
1424
|
-
target:
|
|
1440
|
+
target: a.value
|
|
1425
1441
|
};
|
|
1426
|
-
e("input", N,
|
|
1442
|
+
e("input", N, a.value.valueAsNumber), e("change", b, a.value.valueAsNumber);
|
|
1427
1443
|
}
|
|
1428
1444
|
}
|
|
1429
|
-
function
|
|
1430
|
-
|
|
1445
|
+
function ve(b) {
|
|
1446
|
+
n.value = b;
|
|
1431
1447
|
}
|
|
1432
|
-
function
|
|
1433
|
-
r.value = !0,
|
|
1448
|
+
function g() {
|
|
1449
|
+
r.value = !0, ve(!1);
|
|
1434
1450
|
}
|
|
1435
|
-
function
|
|
1436
|
-
|
|
1451
|
+
function E() {
|
|
1452
|
+
f.value++;
|
|
1437
1453
|
}
|
|
1438
|
-
function
|
|
1439
|
-
|
|
1454
|
+
function W(b) {
|
|
1455
|
+
b.target.blur();
|
|
1440
1456
|
}
|
|
1441
|
-
function
|
|
1457
|
+
function F() {
|
|
1442
1458
|
var R;
|
|
1443
|
-
let
|
|
1459
|
+
let b = !0;
|
|
1444
1460
|
const N = s.value;
|
|
1445
|
-
return
|
|
1461
|
+
return n.value ? b = N : r.value && ((R = v.value) == null ? void 0 : R.toString().trim()) === "" && (b = !1), b;
|
|
1446
1462
|
}
|
|
1447
|
-
async function
|
|
1448
|
-
const N =
|
|
1449
|
-
l.validateOn === "change" && await
|
|
1463
|
+
async function $e(b) {
|
|
1464
|
+
const N = Ze(b, l.inputType);
|
|
1465
|
+
l.validateOn === "change" && await P(N), e("change", b, N);
|
|
1450
1466
|
}
|
|
1451
|
-
return
|
|
1452
|
-
l.validateImmediately &&
|
|
1453
|
-
}),
|
|
1454
|
-
await
|
|
1467
|
+
return Ce(() => {
|
|
1468
|
+
l.validateImmediately && $(l.modelValue, !0);
|
|
1469
|
+
}), H(() => l.isRequired, () => $(l.modelValue, !0)), H(() => l.externalErrors, async () => {
|
|
1470
|
+
await P(v.value), e("update:model-value", v.value);
|
|
1455
1471
|
}), o({
|
|
1456
1472
|
focus() {
|
|
1457
|
-
var
|
|
1458
|
-
(
|
|
1473
|
+
var b;
|
|
1474
|
+
(b = a.value) == null || b.focus();
|
|
1475
|
+
},
|
|
1476
|
+
blur() {
|
|
1477
|
+
var b;
|
|
1478
|
+
(b = a.value) == null || b.blur();
|
|
1459
1479
|
}
|
|
1460
|
-
}), (
|
|
1461
|
-
key:
|
|
1480
|
+
}), (b, N) => (d(), h("div", {
|
|
1481
|
+
key: f.value,
|
|
1462
1482
|
class: "cl-align-top cl-border-none cl-inline-block cl-text-left"
|
|
1463
1483
|
}, [
|
|
1464
|
-
|
|
1465
|
-
onMouseenter: N[11] || (N[11] = (R) =>
|
|
1466
|
-
onMouseleave: N[12] || (N[12] = (R) =>
|
|
1484
|
+
m("div", {
|
|
1485
|
+
onMouseenter: N[11] || (N[11] = (R) => ve(!0)),
|
|
1486
|
+
onMouseleave: N[12] || (N[12] = (R) => ve(!1))
|
|
1467
1487
|
}, [
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
U(
|
|
1471
|
-
[B,
|
|
1488
|
+
m("div", kt, [
|
|
1489
|
+
m("div", Tt, [
|
|
1490
|
+
U(m("label", { class: "cl-block cl-mb-1 cl-text-gray-400 cl-text-xs cl-tracking-widest" }, _(b.label), 513), [
|
|
1491
|
+
[B, b.showLabel && b.label !== ""]
|
|
1472
1492
|
])
|
|
1473
1493
|
]),
|
|
1474
|
-
|
|
1475
|
-
|
|
1494
|
+
b.isRequired && s.value ? (d(), h("label", Ct, " * ")) : M("", !0),
|
|
1495
|
+
b.isRequired && !s.value && b.requiredText.length ? (d(), h("label", _t, _(b.requiredText), 1)) : M("", !0)
|
|
1476
1496
|
]),
|
|
1477
|
-
|
|
1497
|
+
b.inputType !== "range" && !p(Ke)(b.inputType) ? U((d(), h("input", ie({
|
|
1478
1498
|
key: 0,
|
|
1479
1499
|
ref_key: "inputElement",
|
|
1480
|
-
ref:
|
|
1481
|
-
"onUpdate:modelValue": N[0] || (N[0] = (R) =>
|
|
1482
|
-
},
|
|
1500
|
+
ref: a,
|
|
1501
|
+
"onUpdate:modelValue": N[0] || (N[0] = (R) => v.value = R)
|
|
1502
|
+
}, b.$attrs, {
|
|
1483
1503
|
class: ["cl-block cl-border cl-duration-300 cl-h-full cl-mb-1 cl-transition cl-w-full focus:cl-outline-none", {
|
|
1484
|
-
"hover:!cl-border-grey-3":
|
|
1485
|
-
"!cl-cursor-default":
|
|
1486
|
-
"!cl-border-danger-default": !
|
|
1487
|
-
"!cl-border-primary-default":
|
|
1488
|
-
"cl-border-grey-0 focus:cl-border-blue-light":
|
|
1489
|
-
"!cl-p-2":
|
|
1490
|
-
"cl-p-3 cl-rounded-lg": !p(
|
|
1491
|
-
[`${
|
|
1504
|
+
"hover:!cl-border-grey-3": b.disabled === !1 && !p(ke)(b.inputType),
|
|
1505
|
+
"!cl-cursor-default": b.disabled,
|
|
1506
|
+
"!cl-border-danger-default": !j.value,
|
|
1507
|
+
"!cl-border-primary-default": j.value && b.highlightWhenValid,
|
|
1508
|
+
"cl-border-grey-0 focus:cl-border-blue-light": j.value && !p(ke)(b.inputType),
|
|
1509
|
+
"!cl-p-2": b.inputType === "checkbox" || b.inputType === "radio",
|
|
1510
|
+
"cl-p-3 cl-rounded-lg": !p(ke)(b.inputType),
|
|
1511
|
+
[`${b.inputSpecificClasses}`]: b.inputSpecificClasses !== ""
|
|
1492
1512
|
}],
|
|
1493
|
-
style:
|
|
1494
|
-
type:
|
|
1495
|
-
disabled:
|
|
1496
|
-
min:
|
|
1497
|
-
max:
|
|
1498
|
-
minlength: p(
|
|
1499
|
-
maxlength: p(
|
|
1500
|
-
step:
|
|
1501
|
-
placeholder:
|
|
1502
|
-
accept:
|
|
1503
|
-
name:
|
|
1504
|
-
autocomplete:
|
|
1513
|
+
style: ae(),
|
|
1514
|
+
type: b.inputType,
|
|
1515
|
+
disabled: b.disabled,
|
|
1516
|
+
min: b.min,
|
|
1517
|
+
max: b.max,
|
|
1518
|
+
minlength: p(Je)(b.inputType) ? b.min : 0,
|
|
1519
|
+
maxlength: p(Je)(b.inputType) ? b.max : 0,
|
|
1520
|
+
step: b.step,
|
|
1521
|
+
placeholder: u.value,
|
|
1522
|
+
accept: b.fileExtensions,
|
|
1523
|
+
name: b.group,
|
|
1524
|
+
autocomplete: b.autocomplete,
|
|
1505
1525
|
onClick: N[1] || (N[1] = (R) => J(R)),
|
|
1506
1526
|
onFocus: N[2] || (N[2] = (R) => e("focus")),
|
|
1507
1527
|
onBlur: N[3] || (N[3] = K((R) => {
|
|
1508
|
-
|
|
1528
|
+
g(), E();
|
|
1509
1529
|
}, ["self"])),
|
|
1510
|
-
onMousewheelPassive:
|
|
1530
|
+
onMousewheelPassive: W,
|
|
1511
1531
|
onInput: N[4] || (N[4] = (R) => {
|
|
1512
|
-
e("input", R, p(
|
|
1532
|
+
e("input", R, p(Ze)(R, b.inputType));
|
|
1513
1533
|
}),
|
|
1514
|
-
onChange:
|
|
1515
|
-
}), null, 16,
|
|
1516
|
-
[
|
|
1517
|
-
]) : p(
|
|
1534
|
+
onChange: $e
|
|
1535
|
+
}), null, 16, St)), [
|
|
1536
|
+
[il, v.value]
|
|
1537
|
+
]) : p(Ke)(b.inputType) ? (d(), z(p(ct), ie({ key: 1 }, b.$attrs, {
|
|
1518
1538
|
ref_key: "inputElement",
|
|
1519
|
-
ref:
|
|
1520
|
-
date:
|
|
1521
|
-
"onUpdate:date": N[5] || (N[5] = (R) =>
|
|
1539
|
+
ref: a,
|
|
1540
|
+
date: w.value,
|
|
1541
|
+
"onUpdate:date": N[5] || (N[5] = (R) => w.value = R),
|
|
1522
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", {
|
|
1523
|
-
"hover:cl-border-grey-3": !
|
|
1524
|
-
"!cl-border-danger-default": !
|
|
1525
|
-
"!cl-border-primary-default":
|
|
1543
|
+
"hover:cl-border-grey-3": !b.disabled,
|
|
1544
|
+
"!cl-border-danger-default": !j.value,
|
|
1545
|
+
"!cl-border-primary-default": j.value && b.highlightWhenValid
|
|
1526
1546
|
}],
|
|
1527
|
-
disabled:
|
|
1528
|
-
type: p(
|
|
1529
|
-
min:
|
|
1530
|
-
max:
|
|
1531
|
-
onBlur: K(
|
|
1547
|
+
disabled: b.disabled,
|
|
1548
|
+
type: p($t)(b.inputType),
|
|
1549
|
+
min: i.value,
|
|
1550
|
+
max: y.value,
|
|
1551
|
+
onBlur: K(g, ["self"]),
|
|
1532
1552
|
onFocus: N[6] || (N[6] = (R) => e("focus"))
|
|
1533
|
-
}), null, 16, ["date", "class", "disabled", "type", "min", "max", "onBlur"])) :
|
|
1534
|
-
C(p(
|
|
1553
|
+
}), null, 16, ["date", "class", "disabled", "type", "min", "max", "onBlur"])) : b.inputType === "range" && typeof v.value == "number" ? (d(), h("div", Ot, [
|
|
1554
|
+
C(p(ht), {
|
|
1535
1555
|
ref_key: "inputElement",
|
|
1536
|
-
ref:
|
|
1537
|
-
value:
|
|
1538
|
-
"onUpdate:value": N[7] || (N[7] = (R) =>
|
|
1556
|
+
ref: a,
|
|
1557
|
+
value: v.value,
|
|
1558
|
+
"onUpdate:value": N[7] || (N[7] = (R) => v.value = R),
|
|
1539
1559
|
min: c.value,
|
|
1540
1560
|
max: k.value,
|
|
1541
|
-
step:
|
|
1542
|
-
disabled:
|
|
1561
|
+
step: b.step,
|
|
1562
|
+
disabled: b.disabled,
|
|
1543
1563
|
"show-numeric-input": !1,
|
|
1544
|
-
onBlur: K(
|
|
1564
|
+
onBlur: K(g, ["self"]),
|
|
1545
1565
|
onFocus: N[8] || (N[8] = (R) => e("focus"))
|
|
1546
1566
|
}, null, 8, ["value", "min", "max", "step", "disabled", "onBlur"])
|
|
1547
1567
|
])) : M("", !0),
|
|
1548
|
-
C(
|
|
1568
|
+
C(ge, {
|
|
1549
1569
|
name: "fade",
|
|
1550
1570
|
duration: 300
|
|
1551
1571
|
}, {
|
|
1552
|
-
default:
|
|
1553
|
-
|
|
1554
|
-
|
|
1572
|
+
default: L(() => [
|
|
1573
|
+
b.inputType === "number" && !b.disabled && b.showArrows ? U((d(), h("div", Et, [
|
|
1574
|
+
m("div", At, [
|
|
1555
1575
|
C(p(q), {
|
|
1556
1576
|
icon: "ph:caret-up-bold",
|
|
1557
1577
|
class: "cl-bg-link-default cl-rounded-md cl-text-sm cl-text-white hover:cl-bg-link-light hover:cl-cursor-pointer",
|
|
1558
|
-
onClick:
|
|
1578
|
+
onClick: fe,
|
|
1559
1579
|
onMousedown: N[9] || (N[9] = K(() => {
|
|
1560
1580
|
}, ["prevent"]))
|
|
1561
1581
|
})
|
|
1562
1582
|
]),
|
|
1563
|
-
|
|
1583
|
+
m("div", jt, [
|
|
1564
1584
|
C(p(q), {
|
|
1565
1585
|
icon: "ph:caret-down-bold",
|
|
1566
1586
|
class: "cl-bg-link-default cl-rounded-md cl-text-sm cl-text-white hover:cl-bg-link-light hover:cl-cursor-pointer",
|
|
@@ -1570,21 +1590,21 @@ const $t = { class: "cl-flex cl-justify-between" }, kt = { class: "cl-w-full" },
|
|
|
1570
1590
|
})
|
|
1571
1591
|
])
|
|
1572
1592
|
], 512)), [
|
|
1573
|
-
[B,
|
|
1593
|
+
[B, n.value]
|
|
1574
1594
|
]) : M("", !0)
|
|
1575
1595
|
]),
|
|
1576
1596
|
_: 1
|
|
1577
1597
|
})
|
|
1578
1598
|
], 32),
|
|
1579
|
-
|
|
1580
|
-
!
|
|
1599
|
+
j.value && T.value ? (d(), h("div", Mt, _(T.value), 1)) : M("", !0),
|
|
1600
|
+
!j.value && ee.value.length > 0 && b.showValidationMessages ? (d(), h("div", It, _(ee.value), 1)) : M("", !0)
|
|
1581
1601
|
]));
|
|
1582
1602
|
}
|
|
1583
1603
|
});
|
|
1584
|
-
const
|
|
1604
|
+
const oe = /* @__PURE__ */ de(Nt, [["__scopeId", "data-v-90684093"]]), qt = { 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" }, Dt = ["onKeypress"], Rt = { class: "cl-overflow-y-auto cl-overscroll-y-none cl-p-2 cl-w-full" }, Ut = {
|
|
1585
1605
|
inheritAttrs: !1
|
|
1586
|
-
},
|
|
1587
|
-
...
|
|
1606
|
+
}, nl = /* @__PURE__ */ D({
|
|
1607
|
+
...Ut,
|
|
1588
1608
|
__name: "cl-ui-modal",
|
|
1589
1609
|
props: {
|
|
1590
1610
|
headerColour: { default: "white" },
|
|
@@ -1592,23 +1612,23 @@ const ce = /* @__PURE__ */ fe(It, [["__scopeId", "data-v-87d84f9d"]]), Nt = { cl
|
|
|
1592
1612
|
size: { default: "medium" }
|
|
1593
1613
|
},
|
|
1594
1614
|
setup(t) {
|
|
1595
|
-
const o = t, e =
|
|
1615
|
+
const o = t, e = S(!1);
|
|
1596
1616
|
function l() {
|
|
1597
|
-
e.value = !0, document.addEventListener("keydown",
|
|
1617
|
+
e.value = !0, document.addEventListener("keydown", n);
|
|
1598
1618
|
}
|
|
1599
|
-
function
|
|
1600
|
-
o.preventClose || (e.value = !1, document.removeEventListener("keydown",
|
|
1601
|
-
}
|
|
1602
|
-
function
|
|
1603
|
-
r.key === "Escape" &&
|
|
1604
|
-
}
|
|
1605
|
-
return (r, s) => (
|
|
1606
|
-
|
|
1607
|
-
(
|
|
1608
|
-
C(
|
|
1609
|
-
default:
|
|
1610
|
-
U(
|
|
1611
|
-
|
|
1619
|
+
function a() {
|
|
1620
|
+
o.preventClose || (e.value = !1, document.removeEventListener("keydown", n));
|
|
1621
|
+
}
|
|
1622
|
+
function n(r) {
|
|
1623
|
+
r.key === "Escape" && a();
|
|
1624
|
+
}
|
|
1625
|
+
return (r, s) => (d(), h(x, null, [
|
|
1626
|
+
A(r.$slots, "trigger", le(re({ open: l }))),
|
|
1627
|
+
(d(), z(xe, { to: "body" }, [
|
|
1628
|
+
C(ge, { name: "fade" }, {
|
|
1629
|
+
default: L(() => [
|
|
1630
|
+
U(m("div", qt, [
|
|
1631
|
+
m("div", ie(r.$attrs, {
|
|
1612
1632
|
class: ["cl-bg-white cl-flex cl-flex-wrap cl-max-h-[calc(100vh-8rem)] cl-mx-0 cl-my-auto cl-overflow-y-auto cl-overscroll-y-none cl-relative cl-rounded-lg cl-shadow-lg", {
|
|
1613
1633
|
"lg:cl-w-2/12 cl-w-10/12": r.size === "x-small",
|
|
1614
1634
|
"cl-w-6/12": r.size === "small",
|
|
@@ -1616,32 +1636,32 @@ const ce = /* @__PURE__ */ fe(It, [["__scopeId", "data-v-87d84f9d"]]), Nt = { cl
|
|
|
1616
1636
|
"cl-w-10/12": r.size === "large"
|
|
1617
1637
|
}]
|
|
1618
1638
|
}), [
|
|
1619
|
-
U(
|
|
1639
|
+
U(m("div", {
|
|
1620
1640
|
class: I(["cl-absolute cl-cursor-pointer cl-right-4 cl-top-4 cl-transition-colors cl-w-3", {
|
|
1621
1641
|
"cl-text-white hover:cl-text-off-white": r.headerColour === "secondary" || r.headerColour === "primary",
|
|
1622
1642
|
"cl-text-black hover:cl-text-grey-7": r.headerColour === "white"
|
|
1623
1643
|
}]),
|
|
1624
1644
|
tabindex: 0,
|
|
1625
|
-
onKeypress:
|
|
1626
|
-
onClick:
|
|
1645
|
+
onKeypress: Te(a, ["enter"]),
|
|
1646
|
+
onClick: a
|
|
1627
1647
|
}, [
|
|
1628
1648
|
C(p(q), { icon: "ph:x" })
|
|
1629
|
-
], 42,
|
|
1649
|
+
], 42, Dt), [
|
|
1630
1650
|
[B, !r.preventClose]
|
|
1631
1651
|
]),
|
|
1632
|
-
|
|
1652
|
+
m("div", {
|
|
1633
1653
|
class: I(["cl-leading-[2.75rem] cl-min-h-12 cl-overflow-hidden cl-pl-3 cl-pr-8 cl-text-2xl cl-w-full", {
|
|
1634
1654
|
"cl-border-b cl-border-grey-2": r.headerColour === "white",
|
|
1635
1655
|
"cl-bg-secondary-default cl-text-white": r.headerColour === "secondary",
|
|
1636
1656
|
"cl-bg-primary-default cl-text-white": r.headerColour === "primary"
|
|
1637
1657
|
}])
|
|
1638
1658
|
}, [
|
|
1639
|
-
|
|
1659
|
+
A(r.$slots, "title")
|
|
1640
1660
|
], 2),
|
|
1641
|
-
|
|
1642
|
-
|
|
1661
|
+
m("div", Rt, [
|
|
1662
|
+
A(r.$slots, "default", le(re({ close: a })))
|
|
1643
1663
|
]),
|
|
1644
|
-
|
|
1664
|
+
A(r.$slots, "footer", le(re({ close: a })))
|
|
1645
1665
|
], 16)
|
|
1646
1666
|
], 512), [
|
|
1647
1667
|
[B, e.value]
|
|
@@ -1652,7 +1672,7 @@ const ce = /* @__PURE__ */ fe(It, [["__scopeId", "data-v-87d84f9d"]]), Nt = { cl
|
|
|
1652
1672
|
]))
|
|
1653
1673
|
], 64));
|
|
1654
1674
|
}
|
|
1655
|
-
}),
|
|
1675
|
+
}), Bt = { class: "cl-bg-grey-0 cl-flex cl-p-1 cl-text-left" }, xt = {
|
|
1656
1676
|
key: 0,
|
|
1657
1677
|
class: "cl-w-1/2"
|
|
1658
1678
|
}, Se = /* @__PURE__ */ D({
|
|
@@ -1666,15 +1686,15 @@ const ce = /* @__PURE__ */ fe(It, [["__scopeId", "data-v-87d84f9d"]]), Nt = { cl
|
|
|
1666
1686
|
"clear-object": null
|
|
1667
1687
|
},
|
|
1668
1688
|
setup(t) {
|
|
1669
|
-
return (o, e) => (
|
|
1670
|
-
o.additionalText !== "" ? (
|
|
1671
|
-
|
|
1689
|
+
return (o, e) => (d(), h("div", Bt, [
|
|
1690
|
+
o.additionalText !== "" ? (d(), h("div", xt, _(o.additionalText), 1)) : M("", !0),
|
|
1691
|
+
m("div", {
|
|
1672
1692
|
class: I({
|
|
1673
1693
|
"cl-w-1/2": o.additionalText !== "",
|
|
1674
1694
|
"cl-w-full": o.additionalText === ""
|
|
1675
1695
|
})
|
|
1676
|
-
},
|
|
1677
|
-
U(
|
|
1696
|
+
}, _(o.text), 3),
|
|
1697
|
+
U(m("div", {
|
|
1678
1698
|
class: "cl-cursor-pointer cl-float-right",
|
|
1679
1699
|
onMousedown: e[0] || (e[0] = (l) => o.$emit("clear-object"))
|
|
1680
1700
|
}, [
|
|
@@ -1687,10 +1707,10 @@ const ce = /* @__PURE__ */ fe(It, [["__scopeId", "data-v-87d84f9d"]]), Nt = { cl
|
|
|
1687
1707
|
])
|
|
1688
1708
|
]));
|
|
1689
1709
|
}
|
|
1690
|
-
}),
|
|
1710
|
+
}), zt = {
|
|
1691
1711
|
key: 0,
|
|
1692
1712
|
class: "cl-w-1/2"
|
|
1693
|
-
},
|
|
1713
|
+
}, Lt = { class: "cl-float-right cl-py-1" }, Qe = /* @__PURE__ */ D({
|
|
1694
1714
|
__name: "cl-ui-combo-box-selectable",
|
|
1695
1715
|
props: {
|
|
1696
1716
|
isCreateNewOption: { type: Boolean, default: !1 },
|
|
@@ -1705,57 +1725,57 @@ const ce = /* @__PURE__ */ fe(It, [["__scopeId", "data-v-87d84f9d"]]), Nt = { cl
|
|
|
1705
1725
|
"option-highlighted": null
|
|
1706
1726
|
},
|
|
1707
1727
|
setup(t, { emit: o }) {
|
|
1708
|
-
const e = t, l =
|
|
1709
|
-
var
|
|
1710
|
-
return ((
|
|
1711
|
-
}),
|
|
1712
|
-
var
|
|
1713
|
-
return ((
|
|
1714
|
-
}),
|
|
1728
|
+
const e = t, l = O(() => {
|
|
1729
|
+
var f;
|
|
1730
|
+
return ((f = e.option) == null ? void 0 : f.name) ?? e.text;
|
|
1731
|
+
}), a = O(() => {
|
|
1732
|
+
var f;
|
|
1733
|
+
return ((f = e.option) == null ? void 0 : f.parentName) ?? "";
|
|
1734
|
+
}), n = S(!1);
|
|
1715
1735
|
function r() {
|
|
1716
|
-
var
|
|
1717
|
-
e.isCreateNewOption === !0 ? o("create-object") : o("select-object", (
|
|
1718
|
-
}
|
|
1719
|
-
function s(
|
|
1720
|
-
|
|
1721
|
-
}
|
|
1722
|
-
function
|
|
1723
|
-
e.selectedIndex === e.index ?
|
|
1724
|
-
}
|
|
1725
|
-
return
|
|
1726
|
-
var
|
|
1727
|
-
return
|
|
1728
|
-
class: I(["cl-cursor-pointer cl-duration-75 cl-flex cl-p-1 cl-transition-colors", {
|
|
1729
|
-
"cl-bg-white":
|
|
1730
|
-
"cl-bg-link-light cl-text-white cl-opacity-90":
|
|
1731
|
-
"cl-bg-primary-default cl-text-white cl-opacity-90":
|
|
1736
|
+
var f;
|
|
1737
|
+
e.isCreateNewOption === !0 ? o("create-object") : o("select-object", (f = e.option) == null ? void 0 : f.id);
|
|
1738
|
+
}
|
|
1739
|
+
function s(f) {
|
|
1740
|
+
f === !0 ? (n.value = !0, o("option-highlighted", e.index)) : e.index !== e.selectedIndex && (n.value = !1);
|
|
1741
|
+
}
|
|
1742
|
+
function u() {
|
|
1743
|
+
e.selectedIndex === e.index ? n.value = !0 : n.value = !1;
|
|
1744
|
+
}
|
|
1745
|
+
return H(() => e.selectedIndex, () => u()), (f, v) => {
|
|
1746
|
+
var w, i;
|
|
1747
|
+
return d(), h("div", {
|
|
1748
|
+
class: I(["cl-cursor-pointer cl-duration-75 cl-flex cl-p-1 cl-text-left cl-transition-colors", {
|
|
1749
|
+
"cl-bg-white": n.value === !1,
|
|
1750
|
+
"cl-bg-link-light cl-text-white cl-opacity-90": n.value && f.isCreateNewOption === !1,
|
|
1751
|
+
"cl-bg-primary-default cl-text-white cl-opacity-90": n.value && f.isCreateNewOption
|
|
1732
1752
|
}]),
|
|
1733
1753
|
onMousedown: r,
|
|
1734
|
-
onMousemove:
|
|
1735
|
-
onMouseleave:
|
|
1754
|
+
onMousemove: v[0] || (v[0] = (y) => s(!0)),
|
|
1755
|
+
onMouseleave: v[1] || (v[1] = (y) => s(!1))
|
|
1736
1756
|
}, [
|
|
1737
|
-
|
|
1738
|
-
|
|
1757
|
+
f.option !== null && ((w = f.option) == null ? void 0 : w.parentId) !== 0 && ((i = f.option) == null ? void 0 : i.parentId) !== void 0 ? (d(), h("div", zt, _(a.value), 1)) : M("", !0),
|
|
1758
|
+
m("div", {
|
|
1739
1759
|
class: I({
|
|
1740
|
-
"cl-w-1/2":
|
|
1741
|
-
"cl-w-full":
|
|
1760
|
+
"cl-w-1/2": a.value !== "",
|
|
1761
|
+
"cl-w-full": a.value === ""
|
|
1742
1762
|
})
|
|
1743
|
-
},
|
|
1744
|
-
U(
|
|
1763
|
+
}, _(l.value), 3),
|
|
1764
|
+
U(m("div", Lt, [
|
|
1745
1765
|
C(p(q), {
|
|
1746
1766
|
class: I(["cl-transition-colors", {
|
|
1747
|
-
"cl-text-white":
|
|
1748
|
-
"cl-text-black ": !
|
|
1767
|
+
"cl-text-white": n.value,
|
|
1768
|
+
"cl-text-black ": !n.value
|
|
1749
1769
|
}]),
|
|
1750
1770
|
icon: "ph:plus"
|
|
1751
1771
|
}, null, 8, ["class"])
|
|
1752
1772
|
], 512), [
|
|
1753
|
-
[B,
|
|
1773
|
+
[B, f.isCreateNewOption]
|
|
1754
1774
|
])
|
|
1755
1775
|
], 34);
|
|
1756
1776
|
};
|
|
1757
1777
|
}
|
|
1758
|
-
}),
|
|
1778
|
+
}), Pt = ["onKeyup"], Ft = { class: "cl-flex" }, Vt = { key: 5 }, Gt = /* @__PURE__ */ D({
|
|
1759
1779
|
__name: "cl-ui-combo-box-search",
|
|
1760
1780
|
props: {
|
|
1761
1781
|
loading: { type: Boolean, default: !1 },
|
|
@@ -1776,130 +1796,130 @@ const ce = /* @__PURE__ */ fe(It, [["__scopeId", "data-v-87d84f9d"]]), Nt = { cl
|
|
|
1776
1796
|
"hide-dropdown": null
|
|
1777
1797
|
},
|
|
1778
1798
|
setup(t, { emit: o }) {
|
|
1779
|
-
const e = t, { t: l } =
|
|
1780
|
-
function
|
|
1781
|
-
(
|
|
1799
|
+
const e = t, { t: l } = te(), a = S(""), n = S(!1), r = S(-1), s = O(() => n.value ? -1 : 0), u = S();
|
|
1800
|
+
function f($) {
|
|
1801
|
+
($ === void 0 || ($ == null ? void 0 : $.code.startsWith("Arrow")) === !1 && ($ == null ? void 0 : $.code.startsWith("Control")) === !1 && ($ == null ? void 0 : $.code.startsWith("Shift")) === !1 && ($ == null ? void 0 : $.code.startsWith("Tab")) === !1 && ($ == null ? void 0 : $.code) !== "Enter") && (o("search", a.value), r.value = -2);
|
|
1782
1802
|
}
|
|
1783
|
-
function
|
|
1784
|
-
o("select-object",
|
|
1803
|
+
function v($) {
|
|
1804
|
+
o("select-object", $);
|
|
1785
1805
|
}
|
|
1786
|
-
function
|
|
1787
|
-
o("create-object",
|
|
1806
|
+
function w() {
|
|
1807
|
+
o("create-object", a.value), i();
|
|
1788
1808
|
}
|
|
1789
|
-
function
|
|
1809
|
+
function i() {
|
|
1790
1810
|
o("hide-dropdown");
|
|
1791
1811
|
}
|
|
1792
|
-
function $
|
|
1793
|
-
r.value < e.results.length - 1 ? (r.value === -2 &&
|
|
1812
|
+
function y($) {
|
|
1813
|
+
r.value < e.results.length - 1 ? (r.value === -2 && a.value === "" && r.value++, r.value++) : r.value = $, j();
|
|
1794
1814
|
}
|
|
1795
|
-
function c(
|
|
1796
|
-
r.value >
|
|
1815
|
+
function c($) {
|
|
1816
|
+
r.value > $ ? r.value-- : r.value = e.results.length - 1, j();
|
|
1797
1817
|
}
|
|
1798
1818
|
function k() {
|
|
1799
|
-
r.value >= 0 && e.results !== void 0 ?
|
|
1800
|
-
}
|
|
1801
|
-
function
|
|
1802
|
-
if (
|
|
1803
|
-
const
|
|
1804
|
-
let
|
|
1805
|
-
for (let J = 0; J <
|
|
1806
|
-
|
|
1807
|
-
|
|
1819
|
+
r.value >= 0 && e.results !== void 0 ? v(e.results[r.value].id) : r.value === -1 && w();
|
|
1820
|
+
}
|
|
1821
|
+
function T($) {
|
|
1822
|
+
if ($.key === "Tab" && $.shiftKey === !0) {
|
|
1823
|
+
const P = document.getElementsByTagName("input");
|
|
1824
|
+
let ae = -1;
|
|
1825
|
+
for (let J = 0; J < P.length; J++)
|
|
1826
|
+
P[J] === $.target && (ae = J - 1);
|
|
1827
|
+
ae >= 0 && (P[ae].focus(), i());
|
|
1808
1828
|
}
|
|
1809
1829
|
}
|
|
1810
|
-
function
|
|
1811
|
-
var
|
|
1812
|
-
e.results && e.results.length > 1 && ((
|
|
1830
|
+
function j() {
|
|
1831
|
+
var $;
|
|
1832
|
+
e.results && e.results.length > 1 && (($ = u.value) == null || $.scrollTo(0, (r.value + 1) * 34 - 34 * 2));
|
|
1813
1833
|
}
|
|
1814
|
-
function
|
|
1815
|
-
let
|
|
1816
|
-
e.results !== null && e.results.length === 1 && (
|
|
1834
|
+
function V() {
|
|
1835
|
+
let $ = !1;
|
|
1836
|
+
e.results !== null && e.results.length === 1 && ($ = a.value.toUpperCase().trim() === e.results[0].name.toUpperCase().trim()), n.value = e.canCreateNewObject === !0 && e.errorMessage === "" && a.value.trim() !== "" && $ === !1;
|
|
1817
1837
|
}
|
|
1818
|
-
function
|
|
1819
|
-
r.value =
|
|
1838
|
+
function ee($) {
|
|
1839
|
+
r.value = $;
|
|
1820
1840
|
}
|
|
1821
|
-
function
|
|
1822
|
-
e.isVisible === !0 && (
|
|
1823
|
-
var
|
|
1824
|
-
return (
|
|
1841
|
+
function ue() {
|
|
1842
|
+
e.isVisible === !0 && (a.value = "", f(), be(() => {
|
|
1843
|
+
var $, P;
|
|
1844
|
+
return (P = ($ = u.value) == null ? void 0 : $.querySelector("input")) == null ? void 0 : P.focus();
|
|
1825
1845
|
}));
|
|
1826
1846
|
}
|
|
1827
|
-
return
|
|
1828
|
-
var
|
|
1829
|
-
return (
|
|
1847
|
+
return H(() => e.results, () => V()), H(() => e.errorMessage, () => V()), H(() => e.isVisible, () => ue()), Ce(() => {
|
|
1848
|
+
var $;
|
|
1849
|
+
return ($ = u.value) == null ? void 0 : $.addEventListener("keydown", T);
|
|
1830
1850
|
}), Ae(() => {
|
|
1831
|
-
var
|
|
1832
|
-
return (
|
|
1833
|
-
}), (
|
|
1834
|
-
var
|
|
1835
|
-
return
|
|
1851
|
+
var $;
|
|
1852
|
+
return ($ = u.value) == null ? void 0 : $.removeEventListener("keydown", T);
|
|
1853
|
+
}), ($, P) => {
|
|
1854
|
+
var ae;
|
|
1855
|
+
return d(), h("div", {
|
|
1836
1856
|
ref_key: "container",
|
|
1837
|
-
ref:
|
|
1857
|
+
ref: u,
|
|
1838
1858
|
class: "cl-bg-white cl-border cl-border-collapse cl-border-grey-0 cl-h-52 cl-overflow-y-auto cl-overscroll-y-none cl-p-2 cl-rounded cl-text-sm",
|
|
1839
1859
|
onKeydown: [
|
|
1840
|
-
|
|
1841
|
-
|
|
1860
|
+
P[2] || (P[2] = Te(K((J) => c(s.value), ["prevent", "stop"]), ["up"])),
|
|
1861
|
+
P[3] || (P[3] = Te(K((J) => y(s.value), ["prevent", "stop"]), ["down"]))
|
|
1842
1862
|
],
|
|
1843
|
-
onKeyup:
|
|
1863
|
+
onKeyup: Te(K(k, ["prevent", "stop"]), ["enter"])
|
|
1844
1864
|
}, [
|
|
1845
|
-
|
|
1846
|
-
C(
|
|
1847
|
-
modelValue:
|
|
1848
|
-
"onUpdate:modelValue":
|
|
1865
|
+
m("div", Ft, [
|
|
1866
|
+
C(oe, {
|
|
1867
|
+
modelValue: a.value,
|
|
1868
|
+
"onUpdate:modelValue": P[0] || (P[0] = (J) => a.value = J),
|
|
1849
1869
|
class: "!cl-mr-0 cl-mb-1 cl-w-full",
|
|
1850
1870
|
"input-type": "text",
|
|
1851
|
-
"placeholder-text": p(l)("comboBox.searchHint", { object:
|
|
1852
|
-
onKeyup:
|
|
1853
|
-
onBlur:
|
|
1871
|
+
"placeholder-text": p(l)("comboBox.searchHint", { object: $.objectType }),
|
|
1872
|
+
onKeyup: f,
|
|
1873
|
+
onBlur: i
|
|
1854
1874
|
}, null, 8, ["modelValue", "placeholder-text"]),
|
|
1855
1875
|
U(C(je, { class: "cl-absolute cl-ml-2 cl-mt-11" }, null, 512), [
|
|
1856
|
-
[B,
|
|
1876
|
+
[B, $.loading]
|
|
1857
1877
|
])
|
|
1858
1878
|
]),
|
|
1859
|
-
|
|
1879
|
+
$.currentObjectName !== "" ? (d(), z(Se, {
|
|
1860
1880
|
key: 0,
|
|
1861
|
-
"show-clear-button":
|
|
1862
|
-
text:
|
|
1863
|
-
onClearObject:
|
|
1881
|
+
"show-clear-button": $.canClearSelectedObject,
|
|
1882
|
+
text: $.currentObjectName,
|
|
1883
|
+
onClearObject: P[1] || (P[1] = (J) => $.$emit("clear-object"))
|
|
1864
1884
|
}, null, 8, ["show-clear-button", "text"])) : M("", !0),
|
|
1865
|
-
|
|
1885
|
+
$.objectParentType !== "" && $.results !== void 0 && $.results.length > 0 && $.errorMessage === "" ? (d(), z(Se, {
|
|
1866
1886
|
key: 1,
|
|
1867
|
-
text:
|
|
1868
|
-
"additional-text":
|
|
1887
|
+
text: $.objectType,
|
|
1888
|
+
"additional-text": $.objectParentType,
|
|
1869
1889
|
class: "cl-bg-grey-2 cl-mt-1"
|
|
1870
1890
|
}, null, 8, ["text", "additional-text"])) : M("", !0),
|
|
1871
|
-
|
|
1891
|
+
$.results !== null && ((ae = $.results) == null ? void 0 : ae.length) === 0 && a.value.trim() !== "" && $.canCreateNewObject === !1 && $.errorMessage === "" ? (d(), z(Se, {
|
|
1872
1892
|
key: 2,
|
|
1873
|
-
text: p(l)("comboBox.noResults", { value:
|
|
1893
|
+
text: p(l)("comboBox.noResults", { value: a.value })
|
|
1874
1894
|
}, null, 8, ["text"])) : M("", !0),
|
|
1875
|
-
|
|
1895
|
+
$.errorMessage !== "" ? (d(), z(Se, {
|
|
1876
1896
|
key: 3,
|
|
1877
1897
|
class: "!cl-bg-danger-light cl-border-danger-light cl-rounded cl-text-danger-dark",
|
|
1878
|
-
text: p(l)("comboBox.errorMessage", { error:
|
|
1898
|
+
text: p(l)("comboBox.errorMessage", { error: $.errorMessage })
|
|
1879
1899
|
}, null, 8, ["text"])) : M("", !0),
|
|
1880
|
-
|
|
1900
|
+
n.value ? (d(), z(Qe, {
|
|
1881
1901
|
key: 4,
|
|
1882
1902
|
"is-create-new-option": !0,
|
|
1883
|
-
text: p(l)("comboBox.addPrompt", { value:
|
|
1903
|
+
text: p(l)("comboBox.addPrompt", { value: a.value, object: $.objectType }),
|
|
1884
1904
|
index: -1,
|
|
1885
1905
|
"selected-index": r.value,
|
|
1886
|
-
onCreateObject:
|
|
1887
|
-
onOptionHighlighted:
|
|
1906
|
+
onCreateObject: w,
|
|
1907
|
+
onOptionHighlighted: ee
|
|
1888
1908
|
}, null, 8, ["text", "selected-index"])) : M("", !0),
|
|
1889
|
-
|
|
1890
|
-
(
|
|
1891
|
-
key:
|
|
1909
|
+
$.errorMessage === "" && $.results !== null ? (d(), h("div", Vt, [
|
|
1910
|
+
(d(!0), h(x, null, Y($.results, (J, fe) => (d(), z(Qe, {
|
|
1911
|
+
key: fe,
|
|
1892
1912
|
option: J,
|
|
1893
|
-
index:
|
|
1913
|
+
index: fe,
|
|
1894
1914
|
"selected-index": r.value,
|
|
1895
|
-
onSelectObject:
|
|
1896
|
-
onOptionHighlighted:
|
|
1915
|
+
onSelectObject: v,
|
|
1916
|
+
onOptionHighlighted: ee
|
|
1897
1917
|
}, null, 8, ["option", "index", "selected-index"]))), 128))
|
|
1898
1918
|
])) : M("", !0)
|
|
1899
|
-
], 40,
|
|
1919
|
+
], 40, Pt);
|
|
1900
1920
|
};
|
|
1901
1921
|
}
|
|
1902
|
-
}),
|
|
1922
|
+
}), Ht = { class: "cl-flex" }, Wt = { class: "cl-relative cl-right-20 cl-top-0.5" }, Jt = { class: "cl-absolute cl-flex cl-float-right cl-font-semibold cl-mt-2 cl-text-danger-default cl-text-sm cl-z-10" }, Kt = { class: "cl-ml-4 cl-w-11/12" }, Zt = { class: "cl-p-2 cl-text-right cl-w-full" }, Qt = /* @__PURE__ */ D({
|
|
1903
1923
|
__name: "cl-ui-combo-box",
|
|
1904
1924
|
props: {
|
|
1905
1925
|
loading: { type: Boolean, default: !1 },
|
|
@@ -1925,141 +1945,147 @@ const ce = /* @__PURE__ */ fe(It, [["__scopeId", "data-v-87d84f9d"]]), Nt = { cl
|
|
|
1925
1945
|
"update:current-object": null
|
|
1926
1946
|
},
|
|
1927
1947
|
setup(t, { expose: o, emit: e }) {
|
|
1928
|
-
const l = t, { t:
|
|
1948
|
+
const l = t, { t: a } = te(), n = S(!1), r = O({
|
|
1929
1949
|
get: () => l.currentObject,
|
|
1930
|
-
set: (
|
|
1931
|
-
}), s =
|
|
1932
|
-
function c(
|
|
1933
|
-
|
|
1950
|
+
set: (g) => e("update:current-object", g)
|
|
1951
|
+
}), s = S(null), u = S(null), f = O(() => fe()), v = S(""), w = S(""), i = S(), y = S(!0);
|
|
1952
|
+
function c(g) {
|
|
1953
|
+
var E;
|
|
1954
|
+
l.disabled || (typeof g < "u" ? n.value = g : n.value = !n.value), (E = s.value) == null || E.blur();
|
|
1934
1955
|
}
|
|
1935
|
-
function k(
|
|
1936
|
-
|
|
1956
|
+
function k(g) {
|
|
1957
|
+
v.value = g, e("search", g);
|
|
1937
1958
|
}
|
|
1938
|
-
function
|
|
1939
|
-
|
|
1959
|
+
function T(g) {
|
|
1960
|
+
w.value = g, e("search-parent", g);
|
|
1940
1961
|
}
|
|
1941
|
-
function
|
|
1962
|
+
function j() {
|
|
1942
1963
|
r.value = null, c(!1);
|
|
1943
1964
|
}
|
|
1944
|
-
function
|
|
1945
|
-
const
|
|
1946
|
-
r.value =
|
|
1965
|
+
function V(g) {
|
|
1966
|
+
const E = ee(g);
|
|
1967
|
+
r.value = E, c(!1);
|
|
1947
1968
|
}
|
|
1948
|
-
function
|
|
1949
|
-
let
|
|
1969
|
+
function ee(g) {
|
|
1970
|
+
let E = null;
|
|
1950
1971
|
if (l.results !== null) {
|
|
1951
|
-
for (let
|
|
1952
|
-
if (l.results[
|
|
1953
|
-
|
|
1972
|
+
for (let W = 0; W < l.results.length; W++)
|
|
1973
|
+
if (l.results[W].id === g) {
|
|
1974
|
+
E = l.results[W];
|
|
1954
1975
|
break;
|
|
1955
1976
|
}
|
|
1956
1977
|
}
|
|
1957
|
-
return
|
|
1978
|
+
return E;
|
|
1958
1979
|
}
|
|
1959
|
-
function
|
|
1960
|
-
var
|
|
1961
|
-
|
|
1962
|
-
name: g.value,
|
|
1963
|
-
parentId: ((T = i.value) == null ? void 0 : T.id) ?? 0
|
|
1964
|
-
}, e("create-object", m.value);
|
|
1965
|
-
}
|
|
1966
|
-
function y() {
|
|
1967
|
-
m.value = {
|
|
1980
|
+
function ue() {
|
|
1981
|
+
var g;
|
|
1982
|
+
i.value = {
|
|
1968
1983
|
name: v.value,
|
|
1984
|
+
parentId: ((g = u.value) == null ? void 0 : g.id) ?? 0
|
|
1985
|
+
}, e("create-object", i.value);
|
|
1986
|
+
}
|
|
1987
|
+
function $() {
|
|
1988
|
+
i.value = {
|
|
1989
|
+
name: w.value,
|
|
1969
1990
|
parentId: 0
|
|
1970
|
-
}, e("create-parent-object",
|
|
1991
|
+
}, e("create-parent-object", i.value);
|
|
1971
1992
|
}
|
|
1972
|
-
function
|
|
1973
|
-
var
|
|
1974
|
-
(
|
|
1975
|
-
message:
|
|
1993
|
+
function P() {
|
|
1994
|
+
var g, E;
|
|
1995
|
+
(g = l.objectCreatedResponse) != null && g.error ? Ge({
|
|
1996
|
+
message: a("comboBox.createFailed", { name: v.value, error: l.objectCreatedResponse.error }),
|
|
1976
1997
|
colour: "danger",
|
|
1977
1998
|
duration: 1e4
|
|
1978
|
-
}) : (
|
|
1999
|
+
}) : (E = l.objectCreatedResponse) != null && E.id && J();
|
|
1979
2000
|
}
|
|
1980
|
-
function
|
|
1981
|
-
var
|
|
1982
|
-
(
|
|
2001
|
+
function ae() {
|
|
2002
|
+
var g;
|
|
2003
|
+
(g = l.parentObjectCreatedResponse) != null && g.id && (u.value = {
|
|
1983
2004
|
id: l.parentObjectCreatedResponse.id,
|
|
1984
2005
|
name: l.parentObjectCreatedResponse.name ?? ""
|
|
1985
2006
|
});
|
|
1986
2007
|
}
|
|
1987
2008
|
function J() {
|
|
1988
|
-
var
|
|
1989
|
-
|
|
1990
|
-
message:
|
|
2009
|
+
var E, W, F, $e, b;
|
|
2010
|
+
Ge({
|
|
2011
|
+
message: a("comboBox.createSuccessful", { object: l.objectType, name: ((E = l.objectCreatedResponse) == null ? void 0 : E.name) ?? "" }),
|
|
1991
2012
|
colour: "primary",
|
|
1992
2013
|
duration: 1e4
|
|
1993
2014
|
});
|
|
1994
|
-
let
|
|
1995
|
-
|
|
1996
|
-
id: ((
|
|
1997
|
-
name: ((
|
|
1998
|
-
parentId: ((
|
|
1999
|
-
parentName:
|
|
2015
|
+
let g = "";
|
|
2016
|
+
u.value && u.value.id === ((W = l.objectCreatedResponse) == null ? void 0 : W.parentId) && (g = u.value.name), r.value = {
|
|
2017
|
+
id: ((F = l.objectCreatedResponse) == null ? void 0 : F.id) ?? 0,
|
|
2018
|
+
name: (($e = l.objectCreatedResponse) == null ? void 0 : $e.name) ?? "",
|
|
2019
|
+
parentId: ((b = l.objectCreatedResponse) == null ? void 0 : b.parentId) ?? 0,
|
|
2020
|
+
parentName: g
|
|
2000
2021
|
};
|
|
2001
2022
|
}
|
|
2002
|
-
function
|
|
2003
|
-
let
|
|
2004
|
-
return r.value && (r.value.parentName ?
|
|
2023
|
+
function fe() {
|
|
2024
|
+
let g = "";
|
|
2025
|
+
return r.value && (r.value.parentName ? g = r.value.parentName + "; " + r.value.name : g = r.value.name), g;
|
|
2005
2026
|
}
|
|
2006
2027
|
function he() {
|
|
2007
|
-
let
|
|
2008
|
-
|
|
2028
|
+
let g = !0;
|
|
2029
|
+
v.value === "" && (g = !1), l.objectParentType !== "" && u.value === null && (g = !1), y.value = g;
|
|
2009
2030
|
}
|
|
2010
|
-
|
|
2031
|
+
H(() => l.objectCreatedResponse, () => P()), H(() => l.parentObjectCreatedResponse, () => ae()), H(() => v.value, () => he()), H(() => u.value, () => he()), o({
|
|
2011
2032
|
focus() {
|
|
2012
|
-
var
|
|
2013
|
-
(
|
|
2033
|
+
var g;
|
|
2034
|
+
(g = s.value) == null || g.focus();
|
|
2014
2035
|
}
|
|
2015
|
-
})
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2036
|
+
});
|
|
2037
|
+
const ve = S();
|
|
2038
|
+
return Le(ve, () => c(!1)), (g, E) => {
|
|
2039
|
+
const W = ul("cl-ui-combo-box", !0);
|
|
2040
|
+
return d(), h("div", {
|
|
2041
|
+
ref_key: "outsideRef",
|
|
2042
|
+
ref: ve
|
|
2043
|
+
}, [
|
|
2044
|
+
m("div", Ht, [
|
|
2045
|
+
C(oe, {
|
|
2020
2046
|
ref_key: "inputRef",
|
|
2021
2047
|
ref: s,
|
|
2022
|
-
modelValue:
|
|
2023
|
-
"onUpdate:modelValue":
|
|
2024
|
-
class: I(["!cl-
|
|
2025
|
-
"cl-cursor-pointer":
|
|
2048
|
+
modelValue: f.value,
|
|
2049
|
+
"onUpdate:modelValue": E[0] || (E[0] = (F) => f.value = F),
|
|
2050
|
+
class: I(["!cl-mr-0 cl-mb-0 cl-rounded-r-none cl-w-full cl-z-10", {
|
|
2051
|
+
"cl-cursor-pointer": g.disabled === !1
|
|
2026
2052
|
}]),
|
|
2027
2053
|
"input-type": "text",
|
|
2028
|
-
"placeholder-text": p(
|
|
2029
|
-
onFocus:
|
|
2030
|
-
c(
|
|
2054
|
+
"placeholder-text": p(a)("comboBox.emptyHintText", { object: g.objectType }),
|
|
2055
|
+
onFocus: E[1] || (E[1] = (F) => {
|
|
2056
|
+
c(), g.$emit("focus");
|
|
2031
2057
|
})
|
|
2032
2058
|
}, null, 8, ["modelValue", "class", "placeholder-text"]),
|
|
2033
|
-
U(
|
|
2034
|
-
|
|
2035
|
-
Q(
|
|
2059
|
+
U(m("div", Wt, [
|
|
2060
|
+
m("div", Jt, [
|
|
2061
|
+
Q(_(p(a)("comboBox.required")) + " ", 1),
|
|
2036
2062
|
C(p(q), {
|
|
2037
2063
|
class: "cl-ml-1 cl-mt-1",
|
|
2038
2064
|
icon: "ph:warning"
|
|
2039
2065
|
})
|
|
2040
2066
|
])
|
|
2041
2067
|
], 512), [
|
|
2042
|
-
[B,
|
|
2068
|
+
[B, g.required && g.disabled === !1 && g.currentObject === null]
|
|
2043
2069
|
]),
|
|
2044
|
-
|
|
2070
|
+
n.value ? (d(), h("div", {
|
|
2045
2071
|
key: 1,
|
|
2046
|
-
class: I(["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", {
|
|
2047
|
-
"cl-cursor-default":
|
|
2048
|
-
"cl-cursor-pointer":
|
|
2072
|
+
class: I(["cl-bg-white cl-border cl-border-grey-1 cl-float-right cl-h-10 cl-rounded cl-rounded-l-none cl-text-grey-3 cl-transition-colors cl-w-[27px] hover:cl-bg-link-light hover:cl-opacity-90 hover:cl-text-white", {
|
|
2073
|
+
"cl-cursor-default": g.disabled,
|
|
2074
|
+
"cl-cursor-pointer": g.disabled === !1
|
|
2049
2075
|
}]),
|
|
2050
|
-
onClick:
|
|
2076
|
+
onClick: E[3] || (E[3] = (F) => c(!1))
|
|
2051
2077
|
}, [
|
|
2052
2078
|
C(p(q), {
|
|
2053
2079
|
icon: "ph:caret-up-bold",
|
|
2054
2080
|
class: "cl-ml-[5px] cl-mt-[12px]"
|
|
2055
2081
|
})
|
|
2056
|
-
], 2)) : (
|
|
2082
|
+
], 2)) : (d(), h("div", {
|
|
2057
2083
|
key: 0,
|
|
2058
|
-
class: I(["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", {
|
|
2059
|
-
"cl-cursor-default":
|
|
2060
|
-
"cl-cursor-pointer":
|
|
2084
|
+
class: I(["cl-bg-white cl-border cl-border-grey-1 cl-float-right cl-h-10 cl-rounded cl-rounded-l-none cl-text-grey-3 cl-transition-colors cl-w-[27px] hover:cl-bg-link-light hover:cl-opacity-90 hover:cl-text-white", {
|
|
2085
|
+
"cl-cursor-default": g.disabled,
|
|
2086
|
+
"cl-cursor-pointer": g.disabled === !1
|
|
2061
2087
|
}]),
|
|
2062
|
-
onClick:
|
|
2088
|
+
onClick: E[2] || (E[2] = (F) => c(!0))
|
|
2063
2089
|
}, [
|
|
2064
2090
|
C(p(q), {
|
|
2065
2091
|
icon: "ph:caret-down-bold",
|
|
@@ -2067,79 +2093,78 @@ const ce = /* @__PURE__ */ fe(It, [["__scopeId", "data-v-87d84f9d"]]), Nt = { cl
|
|
|
2067
2093
|
})
|
|
2068
2094
|
], 2))
|
|
2069
2095
|
]),
|
|
2070
|
-
C(
|
|
2071
|
-
title:
|
|
2072
|
-
Q(
|
|
2096
|
+
C(nl, { size: "x-small" }, {
|
|
2097
|
+
title: L(() => [
|
|
2098
|
+
Q(_(p(a)("comboBox.createTitle", { object: g.objectType })), 1)
|
|
2073
2099
|
]),
|
|
2074
|
-
trigger:
|
|
2075
|
-
U(C(
|
|
2076
|
-
"can-create-new-object":
|
|
2077
|
-
"can-clear-selected-object":
|
|
2078
|
-
loading:
|
|
2079
|
-
results:
|
|
2080
|
-
"object-type":
|
|
2081
|
-
"object-parent-type":
|
|
2082
|
-
"error-message":
|
|
2083
|
-
"current-object-name":
|
|
2084
|
-
"is-visible":
|
|
2085
|
-
onCreateObject:
|
|
2086
|
-
onSelectObject:
|
|
2087
|
-
onClearObject:
|
|
2088
|
-
onSearch: k
|
|
2089
|
-
onHideDropdown: w[4] || (w[4] = (ne) => c(!1))
|
|
2100
|
+
trigger: L(({ open: F }) => [
|
|
2101
|
+
U(C(Gt, {
|
|
2102
|
+
"can-create-new-object": g.canCreateNewObject,
|
|
2103
|
+
"can-clear-selected-object": g.canClearSelectedObject,
|
|
2104
|
+
loading: g.loading,
|
|
2105
|
+
results: g.results,
|
|
2106
|
+
"object-type": g.objectType,
|
|
2107
|
+
"object-parent-type": g.objectParentType,
|
|
2108
|
+
"error-message": g.errorMessage,
|
|
2109
|
+
"current-object-name": f.value,
|
|
2110
|
+
"is-visible": n.value,
|
|
2111
|
+
onCreateObject: F,
|
|
2112
|
+
onSelectObject: V,
|
|
2113
|
+
onClearObject: j,
|
|
2114
|
+
onSearch: k
|
|
2090
2115
|
}, 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"]), [
|
|
2091
|
-
[B,
|
|
2116
|
+
[B, n.value]
|
|
2092
2117
|
])
|
|
2093
2118
|
]),
|
|
2094
|
-
footer:
|
|
2095
|
-
|
|
2096
|
-
C(
|
|
2119
|
+
footer: L(({ close: F }) => [
|
|
2120
|
+
m("div", Zt, [
|
|
2121
|
+
C(me, {
|
|
2097
2122
|
class: "cl-mr-3",
|
|
2098
2123
|
colour: "default",
|
|
2099
2124
|
size: "small",
|
|
2100
|
-
onClick:
|
|
2125
|
+
onClick: F
|
|
2101
2126
|
}, {
|
|
2102
|
-
default:
|
|
2103
|
-
Q(
|
|
2127
|
+
default: L(() => [
|
|
2128
|
+
Q(_(p(a)("comboBox.cancel")), 1)
|
|
2104
2129
|
]),
|
|
2105
2130
|
_: 2
|
|
2106
2131
|
}, 1032, ["onClick"]),
|
|
2107
|
-
C(
|
|
2132
|
+
C(me, {
|
|
2108
2133
|
colour: "primary",
|
|
2109
2134
|
size: "small",
|
|
2110
|
-
disabled:
|
|
2111
|
-
onClick: (
|
|
2112
|
-
|
|
2135
|
+
disabled: !y.value,
|
|
2136
|
+
onClick: ($e) => {
|
|
2137
|
+
ue(), F();
|
|
2113
2138
|
}
|
|
2114
2139
|
}, {
|
|
2115
|
-
default:
|
|
2116
|
-
Q(
|
|
2140
|
+
default: L(() => [
|
|
2141
|
+
Q(_(p(a)("comboBox.create")), 1)
|
|
2117
2142
|
]),
|
|
2118
2143
|
_: 2
|
|
2119
2144
|
}, 1032, ["disabled", "onClick"])
|
|
2120
2145
|
])
|
|
2121
2146
|
]),
|
|
2122
|
-
default:
|
|
2123
|
-
|
|
2124
|
-
|
|
2147
|
+
default: L(() => [
|
|
2148
|
+
m("div", Kt, [
|
|
2149
|
+
g.objectParentType ? (d(), z(W, {
|
|
2125
2150
|
key: 0,
|
|
2126
|
-
"current-object":
|
|
2127
|
-
"onUpdate:currentObject":
|
|
2151
|
+
"current-object": u.value,
|
|
2152
|
+
"onUpdate:currentObject": E[4] || (E[4] = (F) => u.value = F),
|
|
2128
2153
|
class: "cl-mt-3",
|
|
2129
|
-
results:
|
|
2130
|
-
loading:
|
|
2131
|
-
"object-type":
|
|
2132
|
-
"object-created-response":
|
|
2133
|
-
"can-create-new-object":
|
|
2134
|
-
"can-clear-selected-object":
|
|
2135
|
-
"error-message":
|
|
2136
|
-
onSearch:
|
|
2137
|
-
onCreateObject:
|
|
2154
|
+
results: g.parentResults,
|
|
2155
|
+
loading: g.loading,
|
|
2156
|
+
"object-type": g.objectParentType,
|
|
2157
|
+
"object-created-response": g.parentObjectCreatedResponse,
|
|
2158
|
+
"can-create-new-object": g.canCreateNewObject,
|
|
2159
|
+
"can-clear-selected-object": g.canClearSelectedObject,
|
|
2160
|
+
"error-message": g.errorMessage,
|
|
2161
|
+
onSearch: T,
|
|
2162
|
+
onCreateObject: $
|
|
2138
2163
|
}, null, 8, ["current-object", "results", "loading", "object-type", "object-created-response", "can-create-new-object", "can-clear-selected-object", "error-message"])) : M("", !0),
|
|
2139
|
-
C(
|
|
2140
|
-
modelValue:
|
|
2141
|
-
"onUpdate:modelValue":
|
|
2142
|
-
label: p(
|
|
2164
|
+
C(oe, {
|
|
2165
|
+
modelValue: v.value,
|
|
2166
|
+
"onUpdate:modelValue": E[5] || (E[5] = (F) => v.value = F),
|
|
2167
|
+
label: p(a)("comboBox.createProperty"),
|
|
2143
2168
|
class: "cl-mb-2 cl-pt-3 cl-w-full",
|
|
2144
2169
|
"input-type": "text"
|
|
2145
2170
|
}, null, 8, ["modelValue", "label"])
|
|
@@ -2147,51 +2172,51 @@ const ce = /* @__PURE__ */ fe(It, [["__scopeId", "data-v-87d84f9d"]]), Nt = { cl
|
|
|
2147
2172
|
]),
|
|
2148
2173
|
_: 1
|
|
2149
2174
|
})
|
|
2150
|
-
]);
|
|
2175
|
+
], 512);
|
|
2151
2176
|
};
|
|
2152
2177
|
}
|
|
2153
2178
|
});
|
|
2154
|
-
function
|
|
2179
|
+
function Yt(t) {
|
|
2155
2180
|
return typeof t.id == "number" && typeof t.name == "string";
|
|
2156
2181
|
}
|
|
2157
|
-
function
|
|
2182
|
+
function Xt(t) {
|
|
2158
2183
|
return typeof t.name == "string";
|
|
2159
2184
|
}
|
|
2160
|
-
const
|
|
2185
|
+
const eo = {}, lo = { class: "cl-flex cl-flex-wrap cl-left-0 cl-mt-4 cl-w-full" }, to = {
|
|
2161
2186
|
key: 0,
|
|
2162
2187
|
class: "cl-w-full"
|
|
2163
|
-
},
|
|
2188
|
+
}, oo = {
|
|
2164
2189
|
key: 1,
|
|
2165
2190
|
class: "cl-leading-10 cl-text-sm cl-w-full"
|
|
2166
|
-
},
|
|
2167
|
-
function
|
|
2168
|
-
return
|
|
2169
|
-
t.$slots.default ? (
|
|
2170
|
-
|
|
2191
|
+
}, ao = { class: "cl-float-left" }, no = { class: "cl-float-right" };
|
|
2192
|
+
function so(t, o) {
|
|
2193
|
+
return d(), h("div", lo, [
|
|
2194
|
+
t.$slots.default ? (d(), h("div", to, [
|
|
2195
|
+
A(t.$slots, "default")
|
|
2171
2196
|
])) : M("", !0),
|
|
2172
|
-
t.$slots.left || t.$slots.right ? (
|
|
2173
|
-
|
|
2174
|
-
|
|
2197
|
+
t.$slots.left || t.$slots.right ? (d(), h("div", oo, [
|
|
2198
|
+
m("span", ao, [
|
|
2199
|
+
A(t.$slots, "left")
|
|
2175
2200
|
]),
|
|
2176
|
-
|
|
2177
|
-
|
|
2201
|
+
m("span", no, [
|
|
2202
|
+
A(t.$slots, "right")
|
|
2178
2203
|
])
|
|
2179
2204
|
])) : M("", !0)
|
|
2180
2205
|
]);
|
|
2181
2206
|
}
|
|
2182
|
-
const
|
|
2207
|
+
const ro = /* @__PURE__ */ de(eo, [["render", so]]);
|
|
2183
2208
|
function Oe(t) {
|
|
2184
2209
|
const o = t.type !== "slot" || t.slotType !== void 0 && t.field !== void 0, e = t.sortable ?? !0;
|
|
2185
2210
|
return o && e;
|
|
2186
2211
|
}
|
|
2187
|
-
function
|
|
2212
|
+
function Pe(t) {
|
|
2188
2213
|
const o = t.type !== "slot" || t.slotType !== void 0 && t.field !== void 0, e = t.filterable ?? !0;
|
|
2189
2214
|
return o && e;
|
|
2190
2215
|
}
|
|
2191
|
-
const
|
|
2216
|
+
const co = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, io = { class: "cl-gap-1 cl-grid cl-grid-cols-2 cl-justify-end cl-mb-2 lg:cl-flex lg:cl-gap-2" }, uo = {
|
|
2192
2217
|
key: 1,
|
|
2193
2218
|
class: "cl-hidden lg:cl-block"
|
|
2194
|
-
},
|
|
2219
|
+
}, fo = { class: "cl-block lg:cl-hidden" }, po = /* @__PURE__ */ D({
|
|
2195
2220
|
__name: "cl-ui-grid-action-row",
|
|
2196
2221
|
props: {
|
|
2197
2222
|
editMode: { type: Boolean },
|
|
@@ -2202,53 +2227,53 @@ const ro = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, co = { class: "cl-gap-1
|
|
|
2202
2227
|
},
|
|
2203
2228
|
emits: ["update:edit-mode", "update:filterPanelOpen", "clear-filters"],
|
|
2204
2229
|
setup(t) {
|
|
2205
|
-
const { t: o } =
|
|
2206
|
-
return (e, l) => (
|
|
2207
|
-
|
|
2208
|
-
|
|
2230
|
+
const { t: o } = te();
|
|
2231
|
+
return (e, l) => (d(), h(x, null, [
|
|
2232
|
+
m("div", co, [
|
|
2233
|
+
m("strong", null, _(p(o)("grid.gridTools")), 1)
|
|
2209
2234
|
]),
|
|
2210
|
-
|
|
2211
|
-
e.columns.some((
|
|
2235
|
+
m("div", io, [
|
|
2236
|
+
e.columns.some((a) => a.editable) ? (d(), z(me, {
|
|
2212
2237
|
key: 0,
|
|
2213
2238
|
size: "small",
|
|
2214
2239
|
colour: "default",
|
|
2215
|
-
onClick: l[0] || (l[0] = K((
|
|
2240
|
+
onClick: l[0] || (l[0] = K((a) => e.$emit("update:edit-mode", !e.editMode), ["prevent"]))
|
|
2216
2241
|
}, {
|
|
2217
|
-
default:
|
|
2218
|
-
e.editMode ? (
|
|
2219
|
-
Q(
|
|
2220
|
-
], 64)) : (
|
|
2221
|
-
Q(
|
|
2242
|
+
default: L(() => [
|
|
2243
|
+
e.editMode ? (d(), h(x, { key: 0 }, [
|
|
2244
|
+
Q(_(p(o)("grid.finishEditing")), 1)
|
|
2245
|
+
], 64)) : (d(), h(x, { key: 1 }, [
|
|
2246
|
+
Q(_(p(o)("grid.editData")), 1)
|
|
2222
2247
|
], 64))
|
|
2223
2248
|
]),
|
|
2224
2249
|
_: 1
|
|
2225
2250
|
})) : M("", !0),
|
|
2226
|
-
e.options.hideViewManager ? M("", !0) : (
|
|
2227
|
-
|
|
2251
|
+
e.options.hideViewManager ? M("", !0) : (d(), h("div", uo, [
|
|
2252
|
+
A(e.$slots, "view-manager")
|
|
2228
2253
|
])),
|
|
2229
|
-
e.columns.some((
|
|
2230
|
-
|
|
2231
|
-
C(
|
|
2254
|
+
e.columns.some((a) => p(Pe)(a) || p(Oe)(a)) ? (d(), h(x, { key: 2 }, [
|
|
2255
|
+
m("div", fo, [
|
|
2256
|
+
C(me, {
|
|
2232
2257
|
class: "cl-w-full",
|
|
2233
2258
|
size: "small",
|
|
2234
|
-
onClick: l[1] || (l[1] = K((
|
|
2259
|
+
onClick: l[1] || (l[1] = K((a) => e.$emit("update:filterPanelOpen", !e.filterPanelOpen), ["prevent"]))
|
|
2235
2260
|
}, {
|
|
2236
|
-
default:
|
|
2237
|
-
Q(
|
|
2261
|
+
default: L(() => [
|
|
2262
|
+
Q(_(p(o)("grid.modifyFilters")), 1)
|
|
2238
2263
|
]),
|
|
2239
2264
|
_: 1
|
|
2240
2265
|
})
|
|
2241
2266
|
]),
|
|
2242
|
-
C(
|
|
2267
|
+
C(me, {
|
|
2243
2268
|
size: "small",
|
|
2244
|
-
colour: e.request.filters.some((
|
|
2269
|
+
colour: e.request.filters.some((a) => a.filterValue !== "") ? "danger" : "default",
|
|
2245
2270
|
class: I({
|
|
2246
|
-
"cl-col-span-2": e.columns.some((
|
|
2271
|
+
"cl-col-span-2": e.columns.some((a) => a.editable)
|
|
2247
2272
|
}),
|
|
2248
|
-
onClick: l[2] || (l[2] = K((
|
|
2273
|
+
onClick: l[2] || (l[2] = K((a) => e.$emit("clear-filters"), ["prevent"]))
|
|
2249
2274
|
}, {
|
|
2250
|
-
default:
|
|
2251
|
-
Q(
|
|
2275
|
+
default: L(() => [
|
|
2276
|
+
Q(_(p(o)("grid.clearFilters")), 1)
|
|
2252
2277
|
]),
|
|
2253
2278
|
_: 1
|
|
2254
2279
|
}, 8, ["colour", "class"])
|
|
@@ -2256,38 +2281,38 @@ const ro = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, co = { class: "cl-gap-1
|
|
|
2256
2281
|
])
|
|
2257
2282
|
], 64));
|
|
2258
2283
|
}
|
|
2259
|
-
}),
|
|
2284
|
+
}), mo = {
|
|
2260
2285
|
key: 0,
|
|
2261
2286
|
class: "cl-inline-block cl-whitespace-nowrap"
|
|
2262
|
-
},
|
|
2287
|
+
}, go = {
|
|
2263
2288
|
key: 1,
|
|
2264
2289
|
class: "cl-inline-block cl-whitespace-nowrap"
|
|
2265
|
-
},
|
|
2290
|
+
}, Ye = /* @__PURE__ */ D({
|
|
2266
2291
|
__name: "cl-ui-grid-cell-value",
|
|
2267
2292
|
props: {
|
|
2268
2293
|
data: {},
|
|
2269
2294
|
column: {}
|
|
2270
2295
|
},
|
|
2271
2296
|
setup(t) {
|
|
2272
|
-
const { d: o } =
|
|
2273
|
-
return (e, l) => e.column.type === "slot" ?
|
|
2297
|
+
const { d: o } = te();
|
|
2298
|
+
return (e, l) => e.column.type === "slot" ? A(e.$slots, e.column.name, { key: 0 }) : e.column.type === "boolean" && e.column.field !== void 0 ? (d(), z(oe, {
|
|
2274
2299
|
key: 1,
|
|
2275
2300
|
"input-type": "checkbox",
|
|
2276
2301
|
"model-value": e.data[e.column.field],
|
|
2277
2302
|
disabled: !0
|
|
2278
|
-
}, null, 8, ["model-value"])) : (e.column.type === "date" || e.column.type === "datetime") && e.column.field !== void 0 ? (
|
|
2279
|
-
e.column.format !== void 0 ? (
|
|
2280
|
-
Q(
|
|
2281
|
-
], 64)) : e.column.type === "date" ? (
|
|
2282
|
-
Q(
|
|
2283
|
-
], 64)) : (
|
|
2284
|
-
Q(
|
|
2303
|
+
}, null, 8, ["model-value"])) : (e.column.type === "date" || e.column.type === "datetime") && e.column.field !== void 0 ? (d(), h(x, { key: 2 }, [
|
|
2304
|
+
e.column.format !== void 0 ? (d(), h(x, { key: 0 }, [
|
|
2305
|
+
Q(_(p(o)(new Date(e.data[e.column.field]), e.column.format)), 1)
|
|
2306
|
+
], 64)) : e.column.type === "date" ? (d(), h(x, { key: 1 }, [
|
|
2307
|
+
Q(_(p(o)(new Date(e.data[e.column.field]), p(G).DATE)), 1)
|
|
2308
|
+
], 64)) : (d(), h(x, { key: 2 }, [
|
|
2309
|
+
Q(_(p(o)(new Date(e.data[e.column.field]), p(G).DATETIME)), 1)
|
|
2285
2310
|
], 64))
|
|
2286
|
-
], 64)) : e.column.field !== void 0 ? (
|
|
2287
|
-
e.column.maxLength !== void 0 ? (
|
|
2311
|
+
], 64)) : e.column.field !== void 0 ? (d(), h(x, { key: 3 }, [
|
|
2312
|
+
e.column.maxLength !== void 0 ? (d(), h("span", mo, _(e.data[e.column.field].trimToLength(e.column.maxLength, e.column.format !== void 0 ? e.column.format === "ellipsis" : !1)), 1)) : (d(), h("span", go, _(e.data[e.column.field]), 1))
|
|
2288
2313
|
], 64)) : M("", !0);
|
|
2289
2314
|
}
|
|
2290
|
-
}),
|
|
2315
|
+
}), vo = { class: "cl-font-semibold lg:cl-hidden" }, bo = /* @__PURE__ */ D({
|
|
2291
2316
|
__name: "cl-ui-grid-cell",
|
|
2292
2317
|
props: {
|
|
2293
2318
|
data: {},
|
|
@@ -2296,46 +2321,46 @@ const ro = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, co = { class: "cl-gap-1
|
|
|
2296
2321
|
},
|
|
2297
2322
|
emits: ["edit", "focus", "undo"],
|
|
2298
2323
|
setup(t, { emit: o }) {
|
|
2299
|
-
const e = t, l =
|
|
2300
|
-
return dl(() => l.value =
|
|
2324
|
+
const e = t, l = S(ce(e.data)), a = O(() => e.column.field !== void 0 && l.value[e.column.field] !== e.data[e.column.field]);
|
|
2325
|
+
return dl(() => l.value = ce(e.data)), H(l, (n) => {
|
|
2301
2326
|
const r = e.column.field ?? "";
|
|
2302
|
-
r !== "" && (
|
|
2327
|
+
r !== "" && (n[r] !== e.data[r] ? o("edit", n[r]) : o("undo"));
|
|
2303
2328
|
}, {
|
|
2304
2329
|
deep: !0
|
|
2305
|
-
}), (
|
|
2330
|
+
}), (n, r) => (d(), h("td", {
|
|
2306
2331
|
class: I(["cl-border-b cl-border-grey-1 cl-gap-1 cl-grid cl-grid-cols-2 cl-m-1 cl-mb-0 cl-py-2 cl-text-xs lg:cl-border-b-0 lg:cl-m-0 lg:cl-px-1 lg:cl-table-cell lg:cl-text-base", {
|
|
2307
|
-
"cl-bg-link-lighter":
|
|
2332
|
+
"cl-bg-link-lighter": a.value
|
|
2308
2333
|
}])
|
|
2309
2334
|
}, [
|
|
2310
|
-
|
|
2311
|
-
|
|
2335
|
+
m("span", vo, _(n.column.caption), 1),
|
|
2336
|
+
n.editMode && n.column.editable === !0 ? A(n.$slots, `${n.column.name}Edit`, le(ie({ key: 0 }, {
|
|
2312
2337
|
cellFocused: () => o("focus"),
|
|
2313
|
-
column:
|
|
2314
|
-
edited:
|
|
2338
|
+
column: n.column,
|
|
2339
|
+
edited: a.value,
|
|
2315
2340
|
record: l.value
|
|
2316
2341
|
})), () => [
|
|
2317
|
-
C(
|
|
2318
|
-
column:
|
|
2319
|
-
data:
|
|
2342
|
+
C(Ye, {
|
|
2343
|
+
column: n.column,
|
|
2344
|
+
data: n.data
|
|
2320
2345
|
}, {
|
|
2321
|
-
[
|
|
2322
|
-
|
|
2346
|
+
[n.column.name]: L(() => [
|
|
2347
|
+
A(n.$slots, n.column.name, le(re({ column: n.column, data: n.data })))
|
|
2323
2348
|
]),
|
|
2324
2349
|
_: 2
|
|
2325
2350
|
}, 1032, ["column", "data"])
|
|
2326
|
-
]) : (
|
|
2351
|
+
]) : (d(), z(Ye, {
|
|
2327
2352
|
key: 1,
|
|
2328
|
-
column:
|
|
2329
|
-
data:
|
|
2353
|
+
column: n.column,
|
|
2354
|
+
data: n.data
|
|
2330
2355
|
}, {
|
|
2331
|
-
[
|
|
2332
|
-
|
|
2356
|
+
[n.column.name]: L(() => [
|
|
2357
|
+
A(n.$slots, n.column.name, le(re({ column: n.column, record: n.data })))
|
|
2333
2358
|
]),
|
|
2334
2359
|
_: 2
|
|
2335
2360
|
}, 1032, ["column", "data"]))
|
|
2336
2361
|
], 2));
|
|
2337
2362
|
}
|
|
2338
|
-
}),
|
|
2363
|
+
}), ho = /* @__PURE__ */ D({
|
|
2339
2364
|
__name: "cl-ui-grid-row",
|
|
2340
2365
|
props: {
|
|
2341
2366
|
data: {},
|
|
@@ -2344,29 +2369,29 @@ const ro = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, co = { class: "cl-gap-1
|
|
|
2344
2369
|
},
|
|
2345
2370
|
emits: ["cell-focus", "cell-edit", "cell-undo", "row-select"],
|
|
2346
2371
|
setup(t) {
|
|
2347
|
-
return (o, e) => (
|
|
2348
|
-
(
|
|
2349
|
-
key:
|
|
2372
|
+
return (o, e) => (d(), h("tr", null, [
|
|
2373
|
+
(d(!0), h(x, null, Y(o.columns, (l, a) => (d(), z(bo, {
|
|
2374
|
+
key: a,
|
|
2350
2375
|
data: o.data,
|
|
2351
2376
|
column: l,
|
|
2352
2377
|
"edit-mode": o.editMode,
|
|
2353
|
-
onFocus: e[0] || (e[0] = (
|
|
2354
|
-
onEdit: (
|
|
2355
|
-
onUndo: (
|
|
2378
|
+
onFocus: e[0] || (e[0] = (n) => o.$emit("cell-focus")),
|
|
2379
|
+
onEdit: (n) => o.$emit("cell-edit", { field: l.field, value: n }),
|
|
2380
|
+
onUndo: (n) => o.$emit("cell-undo", l.field)
|
|
2356
2381
|
}, ze({ _: 2 }, [
|
|
2357
|
-
Y(o.$slots, (
|
|
2382
|
+
Y(o.$slots, (n, r) => ({
|
|
2358
2383
|
name: r,
|
|
2359
|
-
fn:
|
|
2360
|
-
|
|
2384
|
+
fn: L((s) => [
|
|
2385
|
+
A(o.$slots, r, le(re(s)))
|
|
2361
2386
|
])
|
|
2362
2387
|
}))
|
|
2363
2388
|
]), 1032, ["data", "column", "edit-mode", "onEdit", "onUndo"]))), 128))
|
|
2364
2389
|
]));
|
|
2365
2390
|
}
|
|
2366
|
-
}),
|
|
2391
|
+
}), yo = { key: 1 }, wo = ["colspan"], $o = { class: "cl-flex cl-flex-wrap cl-justify-center cl-text-center cl-text-sm cl-w-full" }, ko = { class: "cl-mt-6 cl-w-full" }, To = {
|
|
2367
2392
|
key: 0,
|
|
2368
2393
|
class: "cl-mt-4"
|
|
2369
|
-
},
|
|
2394
|
+
}, Co = { class: "cl-mb-2 cl-w-full" }, _o = /* @__PURE__ */ D({
|
|
2370
2395
|
__name: "cl-ui-grid-body",
|
|
2371
2396
|
props: {
|
|
2372
2397
|
columns: {},
|
|
@@ -2378,107 +2403,112 @@ const ro = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, co = { class: "cl-gap-1
|
|
|
2378
2403
|
},
|
|
2379
2404
|
emits: ["row-select", "row-edit", "clear-filters"],
|
|
2380
2405
|
setup(t, { emit: o }) {
|
|
2381
|
-
const e = t, { t: l } =
|
|
2406
|
+
const e = t, { t: l } = te(), a = S({
|
|
2382
2407
|
index: -1,
|
|
2383
2408
|
record: {}
|
|
2384
2409
|
});
|
|
2385
|
-
function
|
|
2386
|
-
Object.keys(
|
|
2410
|
+
function n() {
|
|
2411
|
+
Object.keys(a.value.record).length !== 0 && (o("row-edit", ce(a.value)), a.value.record = {});
|
|
2387
2412
|
}
|
|
2388
|
-
function r(
|
|
2389
|
-
|
|
2413
|
+
function r(i) {
|
|
2414
|
+
a.value.index !== -1 && a.value.index !== i && n(), a.value.index = i;
|
|
2390
2415
|
}
|
|
2391
|
-
function s(
|
|
2392
|
-
r(
|
|
2416
|
+
function s(i, y) {
|
|
2417
|
+
r(i), y.field !== void 0 && (a.value.record[y.field] = y.value);
|
|
2393
2418
|
}
|
|
2394
|
-
function i
|
|
2395
|
-
if (
|
|
2396
|
-
const { [
|
|
2397
|
-
|
|
2398
|
-
|
|
2419
|
+
function u(i) {
|
|
2420
|
+
if (i !== void 0) {
|
|
2421
|
+
const { [i]: y, ...c } = a.value.record;
|
|
2422
|
+
a.value.record = {
|
|
2423
|
+
...c
|
|
2399
2424
|
};
|
|
2400
2425
|
}
|
|
2401
2426
|
}
|
|
2402
|
-
const
|
|
2403
|
-
|
|
2404
|
-
var
|
|
2405
|
-
return
|
|
2406
|
-
[
|
|
2427
|
+
const f = S({});
|
|
2428
|
+
H(() => e.data, () => {
|
|
2429
|
+
var i, y;
|
|
2430
|
+
return f.value = Object.fromEntries(((y = (i = e.data) == null ? void 0 : i.results) == null ? void 0 : y.map((c, k) => [
|
|
2431
|
+
[k],
|
|
2407
2432
|
{
|
|
2408
2433
|
count: 0,
|
|
2434
|
+
target: null,
|
|
2409
2435
|
reset: ll(() => {
|
|
2410
|
-
|
|
2411
|
-
},
|
|
2436
|
+
f.value[k].count = 0, w(f.value[k].target), f.value[k].target = null;
|
|
2437
|
+
}, 2500, { immediate: !1 })
|
|
2412
2438
|
}
|
|
2413
2439
|
])) ?? []);
|
|
2414
2440
|
}, {
|
|
2415
2441
|
deep: !0,
|
|
2416
2442
|
immediate: !0
|
|
2417
2443
|
});
|
|
2418
|
-
function
|
|
2419
|
-
|
|
2444
|
+
function v(i, y, c) {
|
|
2445
|
+
const { currentTarget: k } = c;
|
|
2446
|
+
e.selectionEnabled ? o("row-select", y) : (f.value[i].count++, f.value[i].target = k, f.value[i].count > 1 ? (f.value[i].reset.stop(), f.value[i].count = 0, w(k), f.value[i].target = null, o("row-select", y)) : (f.value[i].reset.start(), w(k)));
|
|
2420
2447
|
}
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
}
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2448
|
+
function w(i) {
|
|
2449
|
+
i.classList.toggle("!cl-bg-link-lighter");
|
|
2450
|
+
}
|
|
2451
|
+
return H(() => e.editMode, () => {
|
|
2452
|
+
e.editMode || (n(), a.value.index = -1);
|
|
2453
|
+
}), (i, y) => {
|
|
2454
|
+
var c;
|
|
2455
|
+
return d(), h("tbody", null, [
|
|
2456
|
+
i.data && ((c = i.data.results) != null && c.length) ? (d(!0), h(x, { key: 0 }, Y(i.data.results, (k, T) => (d(), z(ho, {
|
|
2457
|
+
key: T,
|
|
2458
|
+
data: k,
|
|
2459
|
+
columns: i.columns,
|
|
2460
|
+
"edit-mode": i.editMode,
|
|
2461
|
+
class: I(["cl-bg-opacity-100 cl-cursor-pointer cl-transition-colors", {
|
|
2462
|
+
"cl-bg-white": T % 2 === 0 && i.data.totalRecords > 1,
|
|
2463
|
+
"cl-bg-off-white": T % 2 === 1 || i.data.totalRecords === 1,
|
|
2464
|
+
"cl-cursor-pointer hover:cl-bg-link-lighter": i.selectionEnabled && !i.editMode
|
|
2465
|
+
}]),
|
|
2466
|
+
onClick: (j) => {
|
|
2467
|
+
i.editMode || v(T, k, j);
|
|
2438
2468
|
},
|
|
2439
|
-
onCellFocus: (
|
|
2440
|
-
r(
|
|
2469
|
+
onCellFocus: (j) => {
|
|
2470
|
+
r(T);
|
|
2441
2471
|
},
|
|
2442
|
-
onCellEdit: (
|
|
2443
|
-
s(
|
|
2472
|
+
onCellEdit: (j) => {
|
|
2473
|
+
s(T, j);
|
|
2444
2474
|
},
|
|
2445
|
-
onCellUndo:
|
|
2475
|
+
onCellUndo: u
|
|
2446
2476
|
}, ze({ _: 2 }, [
|
|
2447
|
-
Y(
|
|
2448
|
-
name:
|
|
2449
|
-
fn:
|
|
2450
|
-
|
|
2477
|
+
Y(i.$slots, (j, V) => ({
|
|
2478
|
+
name: V,
|
|
2479
|
+
fn: L((ee) => [
|
|
2480
|
+
A(i.$slots, V, le(re(ee)))
|
|
2451
2481
|
])
|
|
2452
2482
|
}))
|
|
2453
|
-
]), 1032, ["data", "columns", "edit-mode", "class", "onClick", "onCellFocus", "onCellEdit"]))), 128)) :
|
|
2454
|
-
|
|
2455
|
-
colspan:
|
|
2483
|
+
]), 1032, ["data", "columns", "edit-mode", "class", "onClick", "onCellFocus", "onCellEdit"]))), 128)) : i.loading ? M("", !0) : (d(), h("tr", yo, [
|
|
2484
|
+
m("td", {
|
|
2485
|
+
colspan: i.columns.length
|
|
2456
2486
|
}, [
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
C(
|
|
2487
|
+
m("div", $o, [
|
|
2488
|
+
m("strong", ko, _(p(l)("grid.noData")), 1),
|
|
2489
|
+
i.request.filters.length > 0 ? (d(), h("div", To, [
|
|
2490
|
+
m("div", Co, _(p(l)("grid.noDataFiltersPresent")), 1),
|
|
2491
|
+
C(me, {
|
|
2462
2492
|
size: "small",
|
|
2463
2493
|
colour: "danger",
|
|
2464
|
-
onClick:
|
|
2494
|
+
onClick: y[0] || (y[0] = K((k) => i.$emit("clear-filters"), ["prevent"]))
|
|
2465
2495
|
}, {
|
|
2466
|
-
default:
|
|
2467
|
-
Q(
|
|
2496
|
+
default: L(() => [
|
|
2497
|
+
Q(_(p(l)("grid.clearFilters")), 1)
|
|
2468
2498
|
]),
|
|
2469
2499
|
_: 1
|
|
2470
2500
|
})
|
|
2471
2501
|
])) : M("", !0)
|
|
2472
2502
|
])
|
|
2473
|
-
], 8,
|
|
2503
|
+
], 8, wo)
|
|
2474
2504
|
]))
|
|
2475
2505
|
]);
|
|
2476
2506
|
};
|
|
2477
2507
|
}
|
|
2478
|
-
}),
|
|
2508
|
+
}), So = {
|
|
2479
2509
|
key: 0,
|
|
2480
2510
|
class: "cl-flex cl-flex-wrap cl-justify-end cl-mt-2 cl-w-full"
|
|
2481
|
-
},
|
|
2511
|
+
}, Oo = { class: "cl-bg-off-white cl-border cl-border-grey-1 cl-flex cl-items-center cl-mb-2 cl-px-3 cl-rounded cl-shadow-md cl-text-sm cl-w-full lg:cl-w-auto" }, Eo = { class: "cl-text-grey-3 cl-w-max" }, Ao = { class: "cl-bg-off-white cl-border cl-border-grey-1 cl-flex cl-flex-wrap cl-items-center cl-mb-2 cl-px-3 cl-py-2 cl-rounded cl-shadow-md cl-text-sm cl-w-full lg:cl-ml-2 lg:cl-w-auto mb:cl-flex-nowrap" }, jo = { 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" }, Mo = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, Io = { class: "cl-text-grey-3 cl-w-full lg:cl-mr-2 lg:cl-w-auto" }, No = { class: "cl-flex cl-flex-wrap cl-text-sm mb:cl-flex-nowrap" }, qo = { class: "cl-pr-2" }, Do = ["onClick"], Ro = { 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" }, Uo = { class: "cl-mb-2 cl-text-grey-3 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, Bo = ["onClick"], xo = { class: "cl-mb-2 cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, zo = { 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" }, Lo = { class: "cl-block lg:cl-inline-block" }, Po = /* @__PURE__ */ D({
|
|
2482
2512
|
__name: "cl-ui-grid-footer",
|
|
2483
2513
|
props: {
|
|
2484
2514
|
request: {},
|
|
@@ -2488,27 +2518,27 @@ const ro = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, co = { class: "cl-gap-1
|
|
|
2488
2518
|
"update:request": null
|
|
2489
2519
|
},
|
|
2490
2520
|
setup(t, { emit: o }) {
|
|
2491
|
-
const e = t, { n: l, t:
|
|
2492
|
-
var
|
|
2493
|
-
return e.data !== null ? Math.ceil((((
|
|
2494
|
-
}), r =
|
|
2495
|
-
const
|
|
2496
|
-
let
|
|
2497
|
-
if (
|
|
2498
|
-
const c = e.request.pageNumber ===
|
|
2499
|
-
|
|
2521
|
+
const e = t, { n: l, t: a } = te(), n = O(() => {
|
|
2522
|
+
var i;
|
|
2523
|
+
return e.data !== null ? Math.ceil((((i = e.data) == null ? void 0 : i.totalRecords) ?? 0) / e.request.pageSize) : 1;
|
|
2524
|
+
}), r = O(() => {
|
|
2525
|
+
const i = Array.from(Array(n.value + 1).keys());
|
|
2526
|
+
let y = [];
|
|
2527
|
+
if (i.shift(), i.length) {
|
|
2528
|
+
const c = e.request.pageNumber === n.value || e.request.pageNumber === n.value - 1 ? n.value - 3 : e.request.pageNumber - 1;
|
|
2529
|
+
y = i.slice(c, c + 3);
|
|
2500
2530
|
}
|
|
2501
|
-
return
|
|
2531
|
+
return y;
|
|
2502
2532
|
});
|
|
2503
|
-
function s(
|
|
2504
|
-
const
|
|
2505
|
-
|
|
2533
|
+
function s(i) {
|
|
2534
|
+
const y = ce(e.request);
|
|
2535
|
+
y.pageNumber !== i && (y.pageNumber = Math.max(Math.min(Math.trunc(i), n.value), 1), o("update:request", y));
|
|
2506
2536
|
}
|
|
2507
|
-
function i
|
|
2508
|
-
const
|
|
2509
|
-
s(
|
|
2537
|
+
function u(i) {
|
|
2538
|
+
const y = parseInt(i == null ? void 0 : i.value) || 1;
|
|
2539
|
+
s(y);
|
|
2510
2540
|
}
|
|
2511
|
-
const
|
|
2541
|
+
const f = [
|
|
2512
2542
|
5,
|
|
2513
2543
|
10,
|
|
2514
2544
|
20,
|
|
@@ -2516,108 +2546,108 @@ const ro = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, co = { class: "cl-gap-1
|
|
|
2516
2546
|
100,
|
|
2517
2547
|
200
|
|
2518
2548
|
];
|
|
2519
|
-
function
|
|
2520
|
-
const
|
|
2521
|
-
|
|
2549
|
+
function v(i) {
|
|
2550
|
+
const y = ce(e.request);
|
|
2551
|
+
y.pageSize = i, y.pageNumber = 1, o("update:request", y);
|
|
2522
2552
|
}
|
|
2523
|
-
const
|
|
2524
|
-
return (
|
|
2553
|
+
const w = tl(u, 750);
|
|
2554
|
+
return (i, y) => {
|
|
2525
2555
|
var c, k;
|
|
2526
|
-
return (k = (c =
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
C(
|
|
2530
|
-
"model-value":
|
|
2556
|
+
return (k = (c = i.data) == null ? void 0 : c.results) != null && k.length && i.request ? (d(), h("div", So, [
|
|
2557
|
+
m("div", Oo, [
|
|
2558
|
+
m("span", Eo, _(p(a)("grid.jumpToPage")), 1),
|
|
2559
|
+
C(oe, {
|
|
2560
|
+
"model-value": i.request.pageNumber,
|
|
2531
2561
|
class: "cl-ml-1 cl-mt-0.5 cl-text-sm",
|
|
2532
2562
|
"input-type": "number",
|
|
2533
2563
|
label: "Page",
|
|
2534
2564
|
"show-label": !1,
|
|
2535
2565
|
min: "1",
|
|
2536
|
-
max:
|
|
2537
|
-
onInput:
|
|
2566
|
+
max: n.value,
|
|
2567
|
+
onInput: y[0] || (y[0] = (T) => p(w)(T.target))
|
|
2538
2568
|
}, null, 8, ["model-value", "max"])
|
|
2539
2569
|
]),
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2570
|
+
m("div", Ao, [
|
|
2571
|
+
m("div", jo, [
|
|
2572
|
+
m("li", Mo, [
|
|
2573
|
+
m("span", Io, _(p(a)("grid.page")), 1)
|
|
2544
2574
|
]),
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
U(
|
|
2575
|
+
m("ul", No, [
|
|
2576
|
+
m("li", qo, _(p(l)(i.request.pageNumber, p(X).INTEGER)) + " / " + _(p(l)(n.value, p(X).INTEGER)), 1),
|
|
2577
|
+
U(m("li", {
|
|
2548
2578
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2549
|
-
onClick:
|
|
2579
|
+
onClick: y[1] || (y[1] = (T) => s(1))
|
|
2550
2580
|
}, [
|
|
2551
2581
|
C(p(q), {
|
|
2552
2582
|
icon: "ph:caret-double-left",
|
|
2553
2583
|
size: 14
|
|
2554
2584
|
})
|
|
2555
2585
|
], 512), [
|
|
2556
|
-
[B,
|
|
2586
|
+
[B, i.request.pageNumber > 1]
|
|
2557
2587
|
]),
|
|
2558
|
-
U(
|
|
2588
|
+
U(m("li", {
|
|
2559
2589
|
class: "cl-cursor-pointer cl-mt-1 lg:cl-mr-2 mr-1",
|
|
2560
|
-
onClick:
|
|
2590
|
+
onClick: y[2] || (y[2] = (T) => s(i.request.pageNumber - 1))
|
|
2561
2591
|
}, [
|
|
2562
2592
|
C(p(q), {
|
|
2563
2593
|
icon: "ph:caret-left",
|
|
2564
2594
|
size: 14
|
|
2565
2595
|
})
|
|
2566
2596
|
], 512), [
|
|
2567
|
-
[B,
|
|
2597
|
+
[B, i.request.pageNumber > 1]
|
|
2568
2598
|
]),
|
|
2569
|
-
(
|
|
2570
|
-
key:
|
|
2599
|
+
(d(!0), h(x, null, Y(r.value, (T, j) => (d(), h("li", {
|
|
2600
|
+
key: j,
|
|
2571
2601
|
class: I(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2572
|
-
"cl-text-black cl-font-bold":
|
|
2573
|
-
"cl-text-grey-6":
|
|
2602
|
+
"cl-text-black cl-font-bold": i.request.pageNumber === T,
|
|
2603
|
+
"cl-text-grey-6": i.request.pageNumber !== T
|
|
2574
2604
|
}]),
|
|
2575
|
-
onClick: (
|
|
2576
|
-
},
|
|
2577
|
-
U(
|
|
2605
|
+
onClick: (V) => s(T)
|
|
2606
|
+
}, _(p(l)(T, p(X).INTEGER)), 11, Do))), 128)),
|
|
2607
|
+
U(m("li", {
|
|
2578
2608
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2579
|
-
onClick:
|
|
2609
|
+
onClick: y[3] || (y[3] = (T) => s(i.request.pageNumber + 1))
|
|
2580
2610
|
}, [
|
|
2581
2611
|
C(p(q), {
|
|
2582
2612
|
icon: "ph:caret-right",
|
|
2583
2613
|
size: 14
|
|
2584
2614
|
})
|
|
2585
2615
|
], 512), [
|
|
2586
|
-
[B,
|
|
2616
|
+
[B, i.request.pageNumber < n.value]
|
|
2587
2617
|
]),
|
|
2588
|
-
U(
|
|
2618
|
+
U(m("li", {
|
|
2589
2619
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2590
|
-
onClick:
|
|
2620
|
+
onClick: y[4] || (y[4] = (T) => s(n.value))
|
|
2591
2621
|
}, [
|
|
2592
2622
|
C(p(q), {
|
|
2593
2623
|
icon: "ph:caret-double-right",
|
|
2594
2624
|
size: 14
|
|
2595
2625
|
})
|
|
2596
2626
|
], 512), [
|
|
2597
|
-
[B,
|
|
2627
|
+
[B, i.request.pageNumber < n.value]
|
|
2598
2628
|
])
|
|
2599
2629
|
])
|
|
2600
2630
|
]),
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
(
|
|
2604
|
-
key:
|
|
2631
|
+
m("ul", Ro, [
|
|
2632
|
+
m("li", Uo, _(p(a)("grid.pageSize")), 1),
|
|
2633
|
+
(d(), h(x, null, Y(f, (T, j) => m("li", {
|
|
2634
|
+
key: j,
|
|
2605
2635
|
class: I(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2606
|
-
"cl-text-black cl-font-bold":
|
|
2607
|
-
"cl-text-grey-6":
|
|
2636
|
+
"cl-text-black cl-font-bold": i.request.pageSize === T,
|
|
2637
|
+
"cl-text-grey-6": i.request.pageSize !== T
|
|
2608
2638
|
}]),
|
|
2609
|
-
onClick: (
|
|
2610
|
-
},
|
|
2639
|
+
onClick: (V) => v(T)
|
|
2640
|
+
}, _(p(l)(T, p(X).INTEGER)), 11, Bo)), 64))
|
|
2611
2641
|
]),
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2642
|
+
m("ul", xo, [
|
|
2643
|
+
m("li", zo, _(p(a)("grid.totalRecords")), 1),
|
|
2644
|
+
m("li", Lo, _(p(l)(i.data.totalRecords, p(X).INTEGER)), 1)
|
|
2615
2645
|
])
|
|
2616
2646
|
])
|
|
2617
2647
|
])) : M("", !0);
|
|
2618
2648
|
};
|
|
2619
2649
|
}
|
|
2620
|
-
}),
|
|
2650
|
+
}), Fo = [
|
|
2621
2651
|
"string",
|
|
2622
2652
|
"boolean",
|
|
2623
2653
|
"number",
|
|
@@ -2625,23 +2655,23 @@ const ro = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, co = { class: "cl-gap-1
|
|
|
2625
2655
|
"datetime",
|
|
2626
2656
|
"slot"
|
|
2627
2657
|
];
|
|
2628
|
-
function
|
|
2658
|
+
function sl(t) {
|
|
2629
2659
|
return typeof t.caption == "string" && typeof t.name == "string" && typeof t.type == "string";
|
|
2630
2660
|
}
|
|
2631
|
-
function
|
|
2661
|
+
function Vo(t) {
|
|
2632
2662
|
let o = Array.isArray(t);
|
|
2633
2663
|
if (o) {
|
|
2634
2664
|
for (const e of t)
|
|
2635
|
-
if (!
|
|
2665
|
+
if (!sl(e)) {
|
|
2636
2666
|
o = !1;
|
|
2637
2667
|
break;
|
|
2638
2668
|
}
|
|
2639
2669
|
}
|
|
2640
2670
|
return o;
|
|
2641
2671
|
}
|
|
2642
|
-
const
|
|
2643
|
-
var
|
|
2644
|
-
const
|
|
2672
|
+
const Go = ["ellipsis"];
|
|
2673
|
+
var pe = /* @__PURE__ */ ((t) => (t[t.CONTAINS = 0] = "CONTAINS", t[t.NOT_CONTAINS = 1] = "NOT_CONTAINS", t[t.EQUAL = 2] = "EQUAL", t[t.NOT_EQUAL = 3] = "NOT_EQUAL", t[t.STARTS_WITH = 4] = "STARTS_WITH", t[t.ENDS_WITH = 5] = "ENDS_WITH", t[t.GREATER_THAN = 6] = "GREATER_THAN", t[t.LESS_THAN = 7] = "LESS_THAN", t[t.EQUAL_OR_GREATER_THAN = 8] = "EQUAL_OR_GREATER_THAN", t[t.EQUAL_OR_LESS_THAN = 9] = "EQUAL_OR_LESS_THAN", t))(pe || {});
|
|
2674
|
+
const Ho = [
|
|
2645
2675
|
"equal",
|
|
2646
2676
|
"notequal",
|
|
2647
2677
|
"contains",
|
|
@@ -2653,24 +2683,24 @@ const Go = [
|
|
|
2653
2683
|
"equalorlessthan",
|
|
2654
2684
|
"equalorgreaterthan"
|
|
2655
2685
|
];
|
|
2656
|
-
function
|
|
2686
|
+
function Wo(t) {
|
|
2657
2687
|
return typeof t.filterOnColumn == "string" && typeof t.filterOperation == "number" && typeof t.filterValue == "string";
|
|
2658
2688
|
}
|
|
2659
|
-
function
|
|
2689
|
+
function Jo(t) {
|
|
2660
2690
|
return t === null || typeof t.sortByAscending == "boolean" && typeof t.sortOnColumn == "string";
|
|
2661
2691
|
}
|
|
2662
|
-
function
|
|
2663
|
-
let o = typeof t.filters == "object" && Array.isArray(t.filters) && typeof t.pageNumber == "number" && typeof t.pageSize == "number" && typeof t.sort == "object" &&
|
|
2692
|
+
function Ko(t) {
|
|
2693
|
+
let o = typeof t.filters == "object" && Array.isArray(t.filters) && typeof t.pageNumber == "number" && typeof t.pageSize == "number" && typeof t.sort == "object" && Jo(t.sort);
|
|
2664
2694
|
if (o) {
|
|
2665
2695
|
for (const e of t.filters)
|
|
2666
|
-
if (!
|
|
2696
|
+
if (!Wo(e)) {
|
|
2667
2697
|
o = !1;
|
|
2668
2698
|
break;
|
|
2669
2699
|
}
|
|
2670
2700
|
}
|
|
2671
2701
|
return o;
|
|
2672
2702
|
}
|
|
2673
|
-
function
|
|
2703
|
+
function Zo(t, o) {
|
|
2674
2704
|
let e = typeof t.results == "object" && Array.isArray(t.results) && typeof t.totalRecords == "number";
|
|
2675
2705
|
if (e) {
|
|
2676
2706
|
for (const l of t.results)
|
|
@@ -2681,7 +2711,7 @@ function Ko(t, o) {
|
|
|
2681
2711
|
}
|
|
2682
2712
|
return e;
|
|
2683
2713
|
}
|
|
2684
|
-
const
|
|
2714
|
+
const Qo = {
|
|
2685
2715
|
method: "equal",
|
|
2686
2716
|
icon: "mdi:equal",
|
|
2687
2717
|
description: "Equals",
|
|
@@ -2692,12 +2722,12 @@ const Zo = {
|
|
|
2692
2722
|
"date"
|
|
2693
2723
|
],
|
|
2694
2724
|
key: "equal"
|
|
2695
|
-
},
|
|
2725
|
+
}, Yo = {
|
|
2696
2726
|
method: "contains",
|
|
2697
2727
|
icon: "mdi:format-letter-matches",
|
|
2698
2728
|
description: "Contains",
|
|
2699
2729
|
allowedTypes: ["string"]
|
|
2700
|
-
},
|
|
2730
|
+
}, Xo = {
|
|
2701
2731
|
method: "lessthan",
|
|
2702
2732
|
icon: "mdi:less-than",
|
|
2703
2733
|
description: "Before",
|
|
@@ -2706,8 +2736,8 @@ const Zo = {
|
|
|
2706
2736
|
"datetime"
|
|
2707
2737
|
],
|
|
2708
2738
|
key: "before"
|
|
2709
|
-
},
|
|
2710
|
-
|
|
2739
|
+
}, Xe = [
|
|
2740
|
+
Yo,
|
|
2711
2741
|
{
|
|
2712
2742
|
method: "notcontains",
|
|
2713
2743
|
icon: "mdi:format-letter-spacing-variant",
|
|
@@ -2726,7 +2756,7 @@ const Zo = {
|
|
|
2726
2756
|
description: "Ends with",
|
|
2727
2757
|
allowedTypes: ["string"]
|
|
2728
2758
|
},
|
|
2729
|
-
|
|
2759
|
+
Qo,
|
|
2730
2760
|
{
|
|
2731
2761
|
method: "notequal",
|
|
2732
2762
|
icon: "mdi:not-equal",
|
|
@@ -2739,7 +2769,7 @@ const Zo = {
|
|
|
2739
2769
|
],
|
|
2740
2770
|
key: "notequal"
|
|
2741
2771
|
},
|
|
2742
|
-
|
|
2772
|
+
Xo,
|
|
2743
2773
|
{
|
|
2744
2774
|
method: "greaterthan",
|
|
2745
2775
|
icon: "mdi:greater-than",
|
|
@@ -2794,7 +2824,7 @@ const Zo = {
|
|
|
2794
2824
|
description: "Less than",
|
|
2795
2825
|
allowedTypes: ["number"]
|
|
2796
2826
|
}
|
|
2797
|
-
],
|
|
2827
|
+
], ea = { class: "cl-group cl-inline cl-relative cl-w-auto" }, la = { class: "cl-bg-off-white cl-border-grey-1 cl-border-r cl-flex cl-h-full cl-items-center cl-justify-center cl-rounded-md cl-w-10" }, ta = { class: "cl-p-2 cl-select-none" }, oa = ["onClick"], aa = /* @__PURE__ */ D({
|
|
2798
2828
|
__name: "cl-ui-grid-method-selector",
|
|
2799
2829
|
props: {
|
|
2800
2830
|
filter: {},
|
|
@@ -2804,77 +2834,77 @@ const Zo = {
|
|
|
2804
2834
|
},
|
|
2805
2835
|
emits: ["update:filter"],
|
|
2806
2836
|
setup(t, { emit: o }) {
|
|
2807
|
-
const e = t, { t: l } =
|
|
2837
|
+
const e = t, { t: l } = te(), a = O(() => {
|
|
2808
2838
|
let s = [];
|
|
2809
|
-
return e.column.type !== "slot" ? s =
|
|
2810
|
-
|
|
2811
|
-
}) : s.forEach((
|
|
2812
|
-
|
|
2839
|
+
return e.column.type !== "slot" ? s = Xe.filter((u) => u.allowedTypes.includes(e.column.type)) : typeof e.column.slotType < "u" && typeof e.column.field < "u" && (s = Xe.filter((u) => u.allowedTypes.includes(e.column.slotType))), e.column.type === "date" || e.column.type === "datetime" || e.column.slotType === "date" || e.column.slotType === "datetime" ? s.forEach((u) => {
|
|
2840
|
+
u.description = l(`grid.${u.key}`);
|
|
2841
|
+
}) : s.forEach((u) => {
|
|
2842
|
+
u.description = l(`grid.${u.method}`);
|
|
2813
2843
|
}), s;
|
|
2814
|
-
}),
|
|
2815
|
-
var
|
|
2816
|
-
let s = (
|
|
2817
|
-
return typeof s > "u" && (s =
|
|
2818
|
-
var
|
|
2819
|
-
return
|
|
2844
|
+
}), n = O(() => {
|
|
2845
|
+
var u;
|
|
2846
|
+
let s = (u = e.filter) == null ? void 0 : u.filterMethod;
|
|
2847
|
+
return typeof s > "u" && (s = pe[e.defaultOperation]), a.value.find((f) => {
|
|
2848
|
+
var v;
|
|
2849
|
+
return f.method.toLowerCase() === ((v = s == null ? void 0 : s.removeNonAlphanumeric()) == null ? void 0 : v.toLowerCase());
|
|
2820
2850
|
});
|
|
2821
2851
|
});
|
|
2822
2852
|
function r(s) {
|
|
2823
|
-
let
|
|
2853
|
+
let u;
|
|
2824
2854
|
if (e.filter)
|
|
2825
|
-
|
|
2855
|
+
u = ce(e.filter), u.filterOperation = pe[s.toUpperCase()], u.filterMethod = s.toUpperCase();
|
|
2826
2856
|
else if (typeof e.column.field < "u")
|
|
2827
|
-
|
|
2857
|
+
u = {
|
|
2828
2858
|
filterOnColumn: e.column.field,
|
|
2829
2859
|
filterMethod: s.toUpperCase(),
|
|
2830
|
-
filterOperation:
|
|
2860
|
+
filterOperation: pe[s.toUpperCase()],
|
|
2831
2861
|
filterValue: ""
|
|
2832
2862
|
};
|
|
2833
2863
|
else
|
|
2834
2864
|
return;
|
|
2835
|
-
o("update:filter",
|
|
2865
|
+
o("update:filter", u);
|
|
2836
2866
|
}
|
|
2837
|
-
return (s,
|
|
2838
|
-
|
|
2839
|
-
|
|
2867
|
+
return (s, u) => (d(), h("div", ea, [
|
|
2868
|
+
m("div", la, [
|
|
2869
|
+
n.value ? (d(), z(p(q), {
|
|
2840
2870
|
key: 0,
|
|
2841
|
-
icon:
|
|
2871
|
+
icon: n.value.icon,
|
|
2842
2872
|
class: I(["cl-text-lg", {
|
|
2843
2873
|
"cl-text-grey-4": e.filter === void 0 || e.filter.filterValue === "",
|
|
2844
2874
|
"cl-text-primary-default": e.filter && e.filter.filterValue !== ""
|
|
2845
2875
|
}])
|
|
2846
2876
|
}, null, 8, ["icon", "class"])) : M("", !0)
|
|
2847
2877
|
]),
|
|
2848
|
-
|
|
2878
|
+
m("div", {
|
|
2849
2879
|
class: I(["cl-absolute cl-bg-white cl-border cl-border-grey-0 cl-flex-wrap cl-font-normal cl-h-0 cl-hidden cl-rounded cl-shadow-lg cl-text-left cl-text-xs cl-top-8 cl-z-10 group-hover:cl-flex group-hover:cl-h-auto group-hover:cl-w-52", {
|
|
2850
2880
|
"cl-left-0": s.firstHalf,
|
|
2851
2881
|
"cl--left-44": !s.firstHalf
|
|
2852
2882
|
}])
|
|
2853
2883
|
}, [
|
|
2854
|
-
|
|
2855
|
-
(
|
|
2856
|
-
var
|
|
2857
|
-
return
|
|
2858
|
-
key:
|
|
2884
|
+
m("strong", ta, _(p(l)("grid.availableMethods")), 1),
|
|
2885
|
+
(d(!0), h(x, null, Y(a.value, (f, v) => {
|
|
2886
|
+
var w;
|
|
2887
|
+
return d(), h("span", {
|
|
2888
|
+
key: v,
|
|
2859
2889
|
class: I(["cl-cursor-pointer cl-px-4 cl-py-1 cl-transition-colors cl-w-full hover:cl-bg-grey-0", {
|
|
2860
|
-
"cl-bg-primary-default cl-opacity-80":
|
|
2890
|
+
"cl-bg-primary-default cl-opacity-80": f.method === ((w = n.value) == null ? void 0 : w.method)
|
|
2861
2891
|
}]),
|
|
2862
|
-
onClick: K((
|
|
2892
|
+
onClick: K((i) => r(f.method), ["prevent"])
|
|
2863
2893
|
}, [
|
|
2864
|
-
Q(
|
|
2894
|
+
Q(_(f.description) + " ", 1),
|
|
2865
2895
|
C(p(q), {
|
|
2866
|
-
icon:
|
|
2896
|
+
icon: f.icon,
|
|
2867
2897
|
class: "cl-float-right cl-text-grey-4 cl-text-sm"
|
|
2868
2898
|
}, null, 8, ["icon"])
|
|
2869
|
-
], 10,
|
|
2899
|
+
], 10, oa);
|
|
2870
2900
|
}), 128))
|
|
2871
2901
|
], 2)
|
|
2872
2902
|
]));
|
|
2873
2903
|
}
|
|
2874
|
-
}),
|
|
2904
|
+
}), na = {
|
|
2875
2905
|
key: 0,
|
|
2876
2906
|
class: "cl-border cl-border-grey-2 cl-flex cl-overflow-hidden cl-rounded-md lg:cl-overflow-visible"
|
|
2877
|
-
},
|
|
2907
|
+
}, sa = /* @__PURE__ */ m("option", { value: void 0 }, null, -1), ra = ["selected"], ca = ["selected"], ia = /* @__PURE__ */ D({
|
|
2878
2908
|
__name: "cl-ui-grid-filter",
|
|
2879
2909
|
props: {
|
|
2880
2910
|
filter: {},
|
|
@@ -2883,91 +2913,91 @@ const Zo = {
|
|
|
2883
2913
|
},
|
|
2884
2914
|
emits: ["update:filter"],
|
|
2885
2915
|
setup(t, { emit: o }) {
|
|
2886
|
-
const e = t, { locale: l, t:
|
|
2887
|
-
function
|
|
2888
|
-
return e.column.type === "string" || e.column.slotType === "string" ?
|
|
2916
|
+
const e = t, { locale: l, t: a } = te();
|
|
2917
|
+
function n() {
|
|
2918
|
+
return e.column.type === "string" || e.column.slotType === "string" ? pe.CONTAINS : e.column.type === "datetime" || e.column.slotType === "datetime" || e.column.type === "date" || e.column.slotType === "date" ? pe.LESS_THAN : pe.EQUAL;
|
|
2889
2919
|
}
|
|
2890
|
-
const r =
|
|
2920
|
+
const r = O({
|
|
2891
2921
|
get: () => e.filter,
|
|
2892
2922
|
set: (c) => o("update:filter", c)
|
|
2893
|
-
}), s =
|
|
2923
|
+
}), s = O(() => {
|
|
2894
2924
|
var c;
|
|
2895
2925
|
return ((c = r.value) == null ? void 0 : c.filterValue) ?? "";
|
|
2896
|
-
}),
|
|
2897
|
-
function
|
|
2898
|
-
var
|
|
2899
|
-
let
|
|
2900
|
-
const
|
|
2926
|
+
}), u = O(() => s.value !== "" ? new Date(s.value) : null), f = O(() => Intl.NumberFormat(l.value).format(1.1).replace(/[0-9]+/g, "")), v = O(() => Pe(e.column));
|
|
2927
|
+
function w(c, k) {
|
|
2928
|
+
var ee;
|
|
2929
|
+
let T, j = !1;
|
|
2930
|
+
const V = ((c == null ? void 0 : c.value) ?? k).trim();
|
|
2901
2931
|
if (r.value)
|
|
2902
|
-
|
|
2903
|
-
else if (
|
|
2904
|
-
const
|
|
2905
|
-
|
|
2932
|
+
j = ((ee = r.value) == null ? void 0 : ee.filterValue) === V, T = ce(r.value), T.filterValue = V;
|
|
2933
|
+
else if (V !== "" && typeof e.column.field < "u") {
|
|
2934
|
+
const ue = n();
|
|
2935
|
+
T = {
|
|
2906
2936
|
filterOnColumn: e.column.field,
|
|
2907
|
-
filterMethod:
|
|
2908
|
-
filterOperation:
|
|
2909
|
-
filterValue:
|
|
2937
|
+
filterMethod: pe[ue],
|
|
2938
|
+
filterOperation: ue,
|
|
2939
|
+
filterValue: V
|
|
2910
2940
|
};
|
|
2911
2941
|
} else
|
|
2912
2942
|
return;
|
|
2913
|
-
|
|
2943
|
+
j === !1 && (r.value = T);
|
|
2914
2944
|
}
|
|
2915
|
-
function
|
|
2945
|
+
function i(c) {
|
|
2916
2946
|
let k;
|
|
2917
|
-
e.column.format === X.INTEGER ? (typeof c == "string" && (c = parseInt(c)), k = Math.round(c)) : (typeof c == "string" && (c = parseFloat(c.replace(
|
|
2947
|
+
e.column.format === X.INTEGER ? (typeof c == "string" && (c = parseInt(c)), k = Math.round(c)) : (typeof c == "string" && (c = parseFloat(c.replace(f.value, "."))), k = c), w(null, isNaN(k) ? "" : k.toString());
|
|
2918
2948
|
}
|
|
2919
|
-
function
|
|
2920
|
-
|
|
2949
|
+
function y(c) {
|
|
2950
|
+
w(null, (c == null ? void 0 : c.toISOString()) ?? "");
|
|
2921
2951
|
}
|
|
2922
|
-
return (c, k) =>
|
|
2923
|
-
c.column.type === "boolean" || c.column.slotType === "boolean" ? (
|
|
2952
|
+
return (c, k) => v.value ? (d(), h("div", na, [
|
|
2953
|
+
c.column.type === "boolean" || c.column.slotType === "boolean" ? (d(), h("select", {
|
|
2924
2954
|
key: 0,
|
|
2925
2955
|
class: "!cl-h-[2rem] cl-border-none cl-mb-0 cl-rounded-md cl-w-full",
|
|
2926
|
-
onChange: k[0] || (k[0] = (
|
|
2956
|
+
onChange: k[0] || (k[0] = (T) => w(T.target))
|
|
2927
2957
|
}, [
|
|
2928
|
-
|
|
2929
|
-
|
|
2958
|
+
sa,
|
|
2959
|
+
m("option", {
|
|
2930
2960
|
value: "true",
|
|
2931
2961
|
selected: s.value === "true"
|
|
2932
|
-
},
|
|
2933
|
-
|
|
2962
|
+
}, _(p(a)("grid.true")), 9, ra),
|
|
2963
|
+
m("option", {
|
|
2934
2964
|
value: "false",
|
|
2935
2965
|
selected: s.value === "false"
|
|
2936
|
-
},
|
|
2937
|
-
], 32)) : c.column.type === "date" || c.column.type === "datetime" || c.column.slotType === "date" || c.column.slotType === "datetime" ? (
|
|
2966
|
+
}, _(p(a)("grid.false")), 9, ca)
|
|
2967
|
+
], 32)) : c.column.type === "date" || c.column.type === "datetime" || c.column.slotType === "date" || c.column.slotType === "datetime" ? (d(), z(oe, {
|
|
2938
2968
|
key: 1,
|
|
2939
|
-
"model-value":
|
|
2969
|
+
"model-value": u.value,
|
|
2940
2970
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
2941
2971
|
min: "1900-01-01",
|
|
2942
2972
|
max: "2999-12-31T23:59",
|
|
2943
2973
|
label: c.column.caption,
|
|
2944
2974
|
"show-label": !1,
|
|
2945
2975
|
"input-type": c.column.type === "slot" ? c.column.slotType : c.column.type,
|
|
2946
|
-
"onUpdate:modelValue": k[1] || (k[1] = (
|
|
2947
|
-
}, null, 8, ["model-value", "label", "input-type"])) : c.column.type === "number" || c.column.slotType === "number" ? (
|
|
2976
|
+
"onUpdate:modelValue": k[1] || (k[1] = (T, j) => y(j))
|
|
2977
|
+
}, null, 8, ["model-value", "label", "input-type"])) : c.column.type === "number" || c.column.slotType === "number" ? (d(), z(oe, {
|
|
2948
2978
|
key: 2,
|
|
2949
2979
|
"model-value": s.value,
|
|
2950
2980
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
2951
2981
|
"input-type": "number",
|
|
2952
2982
|
"show-arrows": !1,
|
|
2953
|
-
onInput: k[2] || (k[2] = (
|
|
2954
|
-
}, null, 8, ["model-value"])) : c.column.type === "string" || c.column.slotType === "string" ? (
|
|
2983
|
+
onInput: k[2] || (k[2] = (T, j) => i(j))
|
|
2984
|
+
}, null, 8, ["model-value"])) : c.column.type === "string" || c.column.slotType === "string" ? (d(), z(oe, {
|
|
2955
2985
|
key: 3,
|
|
2956
2986
|
"model-value": s.value,
|
|
2957
2987
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
2958
2988
|
"input-type": "text",
|
|
2959
|
-
onInput: k[3] || (k[3] = (
|
|
2989
|
+
onInput: k[3] || (k[3] = (T, j) => w(null, j))
|
|
2960
2990
|
}, null, 8, ["model-value"])) : M("", !0),
|
|
2961
|
-
C(
|
|
2991
|
+
C(aa, {
|
|
2962
2992
|
filter: r.value,
|
|
2963
|
-
"onUpdate:filter": k[4] || (k[4] = (
|
|
2993
|
+
"onUpdate:filter": k[4] || (k[4] = (T) => r.value = T),
|
|
2964
2994
|
column: c.column,
|
|
2965
|
-
"default-operation":
|
|
2995
|
+
"default-operation": n(),
|
|
2966
2996
|
"first-half": c.firstHalf
|
|
2967
2997
|
}, null, 8, ["filter", "column", "default-operation", "first-half"])
|
|
2968
2998
|
])) : M("", !0);
|
|
2969
2999
|
}
|
|
2970
|
-
}),
|
|
3000
|
+
}), ua = { class: "-cl-top-1 cl-bg-white cl-shadow-sm cl-sticky cl-z-10 lg:cl-bg-transparent lg:cl-relative lg:cl-shadow-none" }, da = { class: "cl-hidden lg:cl-table-row" }, fa = ["onClick"], pa = { class: "cl-flex cl-justify-end cl-w-full lg:cl-hidden" }, ma = { class: "cl-col-span-2 lg:cl-hidden" }, ga = ["onClick"], va = { class: "cl-font-normal cl-mr-1" }, ba = /* @__PURE__ */ D({
|
|
2971
3001
|
__name: "cl-ui-grid-header",
|
|
2972
3002
|
props: {
|
|
2973
3003
|
request: {},
|
|
@@ -2977,189 +3007,189 @@ const Zo = {
|
|
|
2977
3007
|
},
|
|
2978
3008
|
emits: ["update:request", "update:filterPanelOpen"],
|
|
2979
3009
|
setup(t, { emit: o }) {
|
|
2980
|
-
const e = t, { t: l } =
|
|
3010
|
+
const e = t, { t: l } = te(), a = O({
|
|
2981
3011
|
get: () => e.request,
|
|
2982
|
-
set: (
|
|
3012
|
+
set: (u) => o("update:request", u)
|
|
2983
3013
|
});
|
|
2984
|
-
function
|
|
2985
|
-
var
|
|
2986
|
-
return ((
|
|
2987
|
-
}
|
|
2988
|
-
function r(
|
|
2989
|
-
if (typeof
|
|
2990
|
-
const
|
|
2991
|
-
|
|
2992
|
-
sortOnColumn:
|
|
3014
|
+
function n(u, f) {
|
|
3015
|
+
var v, w;
|
|
3016
|
+
return ((v = a.value.sort) == null ? void 0 : v.sortOnColumn) === u.field && ((w = a.value.sort) == null ? void 0 : w.sortByAscending) === f;
|
|
3017
|
+
}
|
|
3018
|
+
function r(u) {
|
|
3019
|
+
if (typeof u < "u") {
|
|
3020
|
+
const f = ce(e.request);
|
|
3021
|
+
f.sort === null || f.sort.sortOnColumn !== u ? f.sort = {
|
|
3022
|
+
sortOnColumn: u,
|
|
2993
3023
|
sortByAscending: !0
|
|
2994
|
-
} :
|
|
3024
|
+
} : f.sort.sortOnColumn === u && f.sort.sortByAscending === !0 ? f.sort.sortByAscending = !1 : f.sort = null, a.value = f;
|
|
2995
3025
|
}
|
|
2996
3026
|
}
|
|
2997
|
-
function s(
|
|
2998
|
-
if (
|
|
2999
|
-
const
|
|
3000
|
-
|
|
3027
|
+
function s(u) {
|
|
3028
|
+
if (u) {
|
|
3029
|
+
const f = ce(a.value), v = f.filters.findIndex((w) => w.filterOnColumn === u.filterOnColumn);
|
|
3030
|
+
v > -1 ? f.filters[v] = u : f.filters.push(u), f.pageNumber = 1, a.value = f;
|
|
3001
3031
|
}
|
|
3002
3032
|
}
|
|
3003
|
-
return (
|
|
3004
|
-
|
|
3005
|
-
(
|
|
3006
|
-
key:
|
|
3033
|
+
return (u, f) => (d(), h("thead", ua, [
|
|
3034
|
+
m("tr", da, [
|
|
3035
|
+
(d(!0), h(x, null, Y(u.columns, (v, w) => (d(), h("th", {
|
|
3036
|
+
key: w,
|
|
3007
3037
|
class: I(["cl-text-grey-3 cl-text-sm", {
|
|
3008
|
-
"cl-cursor-pointer": p(Oe)(
|
|
3038
|
+
"cl-cursor-pointer": p(Oe)(v)
|
|
3009
3039
|
}]),
|
|
3010
|
-
onClick: (
|
|
3040
|
+
onClick: (i) => p(Oe)(v) ? r(v.field) : () => {
|
|
3011
3041
|
}
|
|
3012
3042
|
}, [
|
|
3013
|
-
Q(
|
|
3043
|
+
Q(_(v.caption) + " ", 1),
|
|
3014
3044
|
U(C(p(q), {
|
|
3015
3045
|
class: "cl-inline-block",
|
|
3016
3046
|
icon: "ph:caret-up"
|
|
3017
3047
|
}, null, 512), [
|
|
3018
|
-
[B,
|
|
3048
|
+
[B, n(v, !0)]
|
|
3019
3049
|
]),
|
|
3020
3050
|
U(C(p(q), {
|
|
3021
3051
|
class: "cl-inline-block",
|
|
3022
3052
|
icon: "ph:caret-down"
|
|
3023
3053
|
}, null, 512), [
|
|
3024
|
-
[B,
|
|
3054
|
+
[B, n(v, !1)]
|
|
3025
3055
|
])
|
|
3026
|
-
], 10,
|
|
3056
|
+
], 10, fa))), 128))
|
|
3027
3057
|
]),
|
|
3028
|
-
|
|
3058
|
+
m("tr", {
|
|
3029
3059
|
class: I(["cl-border cl-border-grey-2 cl-flex cl-flex-wrap cl-p-2 lg:cl-border-none lg:cl-p-0 lg:cl-table-row", {
|
|
3030
|
-
"cl-hidden lg:cl-table-row": !
|
|
3060
|
+
"cl-hidden lg:cl-table-row": !u.filterPanelOpen
|
|
3031
3061
|
}])
|
|
3032
3062
|
}, [
|
|
3033
|
-
|
|
3063
|
+
m("div", pa, [
|
|
3034
3064
|
C(p(q), {
|
|
3035
3065
|
class: "cl-text-grey-4 hover:cl-cursor-pointer hover:cl-text-link-default",
|
|
3036
3066
|
icon: "ph:x",
|
|
3037
3067
|
size: 16,
|
|
3038
|
-
onClick:
|
|
3068
|
+
onClick: f[0] || (f[0] = K((v) => u.$emit("update:filterPanelOpen", !1), ["prevent"]))
|
|
3039
3069
|
})
|
|
3040
3070
|
]),
|
|
3041
|
-
(
|
|
3042
|
-
key:
|
|
3071
|
+
(d(!0), h(x, null, Y(u.columns, (v, w) => (d(), h("th", {
|
|
3072
|
+
key: w,
|
|
3043
3073
|
class: I(["cl-grid cl-grid-cols-4 cl-py-1 cl-text-xs cl-w-full lg:cl-table-cell lg:cl-w-auto", {
|
|
3044
|
-
"cl-hidden lg:cl-table-cell": !p(
|
|
3074
|
+
"cl-hidden lg:cl-table-cell": !p(Pe)(v)
|
|
3045
3075
|
}])
|
|
3046
3076
|
}, [
|
|
3047
|
-
|
|
3048
|
-
p(Oe)(
|
|
3077
|
+
m("div", ma, _(v.caption), 1),
|
|
3078
|
+
p(Oe)(v) ? (d(), h("div", {
|
|
3049
3079
|
key: 0,
|
|
3050
3080
|
class: "cl-col-span-2 cl-gap-1 cl-span lg:cl-hidden",
|
|
3051
|
-
onClick: (
|
|
3081
|
+
onClick: (i) => r(v.field)
|
|
3052
3082
|
}, [
|
|
3053
|
-
|
|
3054
|
-
|
|
3083
|
+
m("span", va, _(p(l)("grid.sortBy")), 1),
|
|
3084
|
+
n(v, !0) ? (d(), z(p(q), {
|
|
3055
3085
|
key: 0,
|
|
3056
3086
|
class: "cl-cursor-pointer cl-inline-block",
|
|
3057
3087
|
icon: "ph:caret-up"
|
|
3058
|
-
})) :
|
|
3088
|
+
})) : n(v, !1) ? (d(), z(p(q), {
|
|
3059
3089
|
key: 1,
|
|
3060
3090
|
class: "cl-cursor-pointer cl-inline-block",
|
|
3061
3091
|
icon: "ph:caret-down"
|
|
3062
|
-
})) : (
|
|
3092
|
+
})) : (d(), z(p(q), {
|
|
3063
3093
|
key: 2,
|
|
3064
3094
|
class: "cl-cursor-pointer cl-inline-block",
|
|
3065
3095
|
icon: "ph:minus"
|
|
3066
3096
|
}))
|
|
3067
|
-
], 8,
|
|
3068
|
-
C(
|
|
3097
|
+
], 8, ga)) : M("", !0),
|
|
3098
|
+
C(ia, {
|
|
3069
3099
|
class: "cl-col-span-4",
|
|
3070
|
-
filter:
|
|
3071
|
-
column:
|
|
3072
|
-
"first-half":
|
|
3100
|
+
filter: a.value.filters.find((i) => i.filterOnColumn === v.field),
|
|
3101
|
+
column: v,
|
|
3102
|
+
"first-half": w <= u.columns.length / 2,
|
|
3073
3103
|
"onUpdate:filter": s
|
|
3074
3104
|
}, null, 8, ["filter", "column", "first-half"])
|
|
3075
3105
|
], 2))), 128))
|
|
3076
3106
|
], 2)
|
|
3077
3107
|
]));
|
|
3078
3108
|
}
|
|
3079
|
-
}),
|
|
3109
|
+
}), ha = { class: "cl-fixed cl-flex cl-h-full cl-justify-end cl-right-0 cl-shadow-lg cl-top-0 cl-z-50" }, ya = { class: "cl-bg-secondary-default cl-h-full cl-overflow-y-auto cl-overscroll-y-none cl-px-10 cl-py-20 cl-relative cl-text-grey-2 cl-w-80" }, wa = { class: "cl-mb-4 cl-text-2xl cl-text-off-white" }, $a = { class: "cl-border-grey-3 cl-border-t cl-flex cl-flex-wrap cl-text-sm cl-w-full" }, ka = { class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full" }, Ta = { class: "cl-flex-1 cl-py-2" }, Ca = { class: "cl-py-2 cl-w-1/4" }, _a = { class: "cl-py-2 cl-w-1/5" }, Sa = { class: "cl-flex-1 cl-py-2" }, Oa = { class: "cl-py-2 cl-w-1/4" }, Ea = { class: "cl-py-2 cl-text-off-white cl-w-1/5" }, Aa = { key: 1 }, ja = {
|
|
3080
3110
|
inheritAttrs: !1
|
|
3081
|
-
},
|
|
3082
|
-
...
|
|
3111
|
+
}, Ma = /* @__PURE__ */ D({
|
|
3112
|
+
...ja,
|
|
3083
3113
|
__name: "cl-ui-grid-view-manager",
|
|
3084
3114
|
props: {
|
|
3085
3115
|
columns: {}
|
|
3086
3116
|
},
|
|
3087
3117
|
emits: ["update:columns"],
|
|
3088
3118
|
setup(t, { emit: o }) {
|
|
3089
|
-
const e = t, { t: l } =
|
|
3090
|
-
function
|
|
3091
|
-
|
|
3119
|
+
const e = t, { t: l } = te(), a = S(!1);
|
|
3120
|
+
function n(u, f, v) {
|
|
3121
|
+
v < u.length && v >= 0 && u.splice(v, 0, u.splice(f, 1)[0]);
|
|
3092
3122
|
}
|
|
3093
|
-
function r(
|
|
3094
|
-
const
|
|
3095
|
-
|
|
3123
|
+
function r(u, f) {
|
|
3124
|
+
const v = ce(e.columns), w = (u == null ? void 0 : u.checked) ?? !1, i = v.findIndex((y) => y.name === f.name);
|
|
3125
|
+
i >= 0 && (v[i].visible = w), o("update:columns", v);
|
|
3096
3126
|
}
|
|
3097
|
-
function s(
|
|
3098
|
-
const
|
|
3099
|
-
|
|
3127
|
+
function s(u, f) {
|
|
3128
|
+
const v = ce(e.columns), w = f === "up" ? u + 1 : u - 1;
|
|
3129
|
+
n(v, u, w), o("update:columns", v);
|
|
3100
3130
|
}
|
|
3101
|
-
return (
|
|
3102
|
-
C(
|
|
3131
|
+
return (u, f) => (d(), h(x, null, [
|
|
3132
|
+
C(me, ie(u.$attrs, {
|
|
3103
3133
|
class: "cl-w-full",
|
|
3104
3134
|
size: "small",
|
|
3105
|
-
onClick:
|
|
3135
|
+
onClick: f[0] || (f[0] = K((v) => a.value = !0, ["prevent"]))
|
|
3106
3136
|
}), {
|
|
3107
|
-
default:
|
|
3108
|
-
Q(
|
|
3137
|
+
default: L(() => [
|
|
3138
|
+
Q(_(p(l)("grid.manageView")), 1)
|
|
3109
3139
|
]),
|
|
3110
3140
|
_: 1
|
|
3111
3141
|
}, 16),
|
|
3112
|
-
(
|
|
3113
|
-
C(
|
|
3114
|
-
default:
|
|
3115
|
-
U(
|
|
3116
|
-
|
|
3142
|
+
(d(), z(xe, { to: "body" }, [
|
|
3143
|
+
C(ge, { name: "slide-left" }, {
|
|
3144
|
+
default: L(() => [
|
|
3145
|
+
U(m("div", ha, [
|
|
3146
|
+
m("div", ya, [
|
|
3117
3147
|
C(p(q), {
|
|
3118
3148
|
class: "cl-absolute cl-cursor-pointer cl-right-3 cl-text-off-white cl-top-3",
|
|
3119
3149
|
icon: "ph:x",
|
|
3120
3150
|
size: 16,
|
|
3121
|
-
onClick:
|
|
3151
|
+
onClick: f[1] || (f[1] = (v) => a.value = !1)
|
|
3122
3152
|
}),
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3153
|
+
m("h3", wa, _(p(l)("grid.manageView")), 1),
|
|
3154
|
+
m("ul", $a, [
|
|
3155
|
+
m("li", ka, [
|
|
3156
|
+
m("strong", Ta, _(p(l)("grid.column")), 1),
|
|
3157
|
+
m("strong", Ca, _(p(l)("grid.visible")), 1),
|
|
3158
|
+
m("strong", _a, _(p(l)("grid.order")), 1)
|
|
3129
3159
|
]),
|
|
3130
|
-
(
|
|
3131
|
-
key:
|
|
3160
|
+
(d(!0), h(x, null, Y(u.columns, (v, w) => (d(), h("li", {
|
|
3161
|
+
key: w,
|
|
3132
3162
|
class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full"
|
|
3133
3163
|
}, [
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
C(
|
|
3137
|
-
"model-value":
|
|
3164
|
+
m("div", Sa, _(v.caption), 1),
|
|
3165
|
+
m("div", Oa, [
|
|
3166
|
+
C(oe, {
|
|
3167
|
+
"model-value": v.visible === void 0 || v.visible === !0,
|
|
3138
3168
|
"input-type": "checkbox",
|
|
3139
|
-
onClick: (
|
|
3169
|
+
onClick: (i) => r(i.target, v)
|
|
3140
3170
|
}, null, 8, ["model-value", "onClick"])
|
|
3141
3171
|
]),
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3172
|
+
m("div", Ea, [
|
|
3173
|
+
v.visible === void 0 || v.visible === !0 ? (d(), h(x, { key: 0 }, [
|
|
3174
|
+
w !== 0 ? (d(), z(p(q), {
|
|
3145
3175
|
key: 0,
|
|
3146
3176
|
class: "cl-cursor-pointer cl-inline-block cl-mr-2",
|
|
3147
3177
|
icon: "ph:arrow-left",
|
|
3148
|
-
onClick: (
|
|
3178
|
+
onClick: (i) => s(w, "down")
|
|
3149
3179
|
}, null, 8, ["onClick"])) : M("", !0),
|
|
3150
|
-
|
|
3180
|
+
w !== u.columns.length - 1 ? (d(), z(p(q), {
|
|
3151
3181
|
key: 1,
|
|
3152
3182
|
class: "cl-cursor-pointer cl-inline-block",
|
|
3153
3183
|
icon: "ph:arrow-right",
|
|
3154
|
-
onClick: (
|
|
3184
|
+
onClick: (i) => s(w, "up")
|
|
3155
3185
|
}, null, 8, ["onClick"])) : M("", !0)
|
|
3156
|
-
], 64)) : (
|
|
3186
|
+
], 64)) : (d(), h("em", Aa, _(p(l)("grid.hidden")), 1))
|
|
3157
3187
|
])
|
|
3158
3188
|
]))), 128))
|
|
3159
3189
|
])
|
|
3160
3190
|
])
|
|
3161
3191
|
], 512), [
|
|
3162
|
-
[B,
|
|
3192
|
+
[B, a.value]
|
|
3163
3193
|
])
|
|
3164
3194
|
]),
|
|
3165
3195
|
_: 1
|
|
@@ -3167,7 +3197,7 @@ const Zo = {
|
|
|
3167
3197
|
]))
|
|
3168
3198
|
], 64));
|
|
3169
3199
|
}
|
|
3170
|
-
}),
|
|
3200
|
+
}), Ia = { class: "cl-relative cl-w-full lg:cl-min-h-fit" }, Na = { class: "cl-absolute cl-flex cl-items-center cl-justify-center cl-min-h-full cl-p-32 cl-w-full" }, qa = { class: "cl-overflow-x-auto cl-overscroll-x-none cl-pt-1" }, Da = { class: "cl-hidden lg:cl-table-column-group" }, Ra = /* @__PURE__ */ D({
|
|
3171
3201
|
__name: "cl-ui-grid",
|
|
3172
3202
|
props: {
|
|
3173
3203
|
columns: {},
|
|
@@ -3178,43 +3208,43 @@ const Zo = {
|
|
|
3178
3208
|
},
|
|
3179
3209
|
emits: ["update:columns", "update:request", "data-request", "row-edit", "edit-start", "edit-end", "row-select"],
|
|
3180
3210
|
setup(t, { emit: o }) {
|
|
3181
|
-
const e = t, l =
|
|
3211
|
+
const e = t, l = O({
|
|
3182
3212
|
get: () => e.columns,
|
|
3183
3213
|
set: (c) => o("update:columns", c)
|
|
3184
|
-
}),
|
|
3214
|
+
}), a = O(() => l.value.filter((c) => c.visible ?? !0)), n = S({});
|
|
3185
3215
|
function r() {
|
|
3186
3216
|
const c = {};
|
|
3187
3217
|
window.innerWidth >= 1024 && l.value.forEach((k) => {
|
|
3188
|
-
const
|
|
3189
|
-
c[`${k.name}`] = `width: ${
|
|
3190
|
-
}),
|
|
3218
|
+
const T = k.width ? `${k.width}px` : "";
|
|
3219
|
+
c[`${k.name}`] = `width: ${T}; min-width: ${T};`;
|
|
3220
|
+
}), n.value = c;
|
|
3191
3221
|
}
|
|
3192
3222
|
function s(c) {
|
|
3193
|
-
return
|
|
3223
|
+
return n.value[c] ?? "";
|
|
3194
3224
|
}
|
|
3195
|
-
|
|
3225
|
+
Ce(() => {
|
|
3196
3226
|
window.addEventListener("resize", r), r();
|
|
3197
3227
|
}), Ae(() => window.removeEventListener("resize", r));
|
|
3198
|
-
const
|
|
3228
|
+
const u = O({
|
|
3199
3229
|
get: () => e.request,
|
|
3200
3230
|
set: (c) => o("update:request", c)
|
|
3201
3231
|
});
|
|
3202
|
-
function
|
|
3203
|
-
const c =
|
|
3204
|
-
c.pageNumber = 1, c.filters = [],
|
|
3232
|
+
function f() {
|
|
3233
|
+
const c = ce(u.value);
|
|
3234
|
+
c.pageNumber = 1, c.filters = [], u.value = c;
|
|
3205
3235
|
}
|
|
3206
|
-
const
|
|
3207
|
-
|
|
3236
|
+
const v = tl(() => o("data-request"), 750);
|
|
3237
|
+
H(u, v, {
|
|
3208
3238
|
deep: !0,
|
|
3209
3239
|
immediate: !0
|
|
3210
3240
|
});
|
|
3211
|
-
const
|
|
3212
|
-
return
|
|
3213
|
-
|
|
3214
|
-
}), (c, k) => (
|
|
3215
|
-
C(
|
|
3216
|
-
default:
|
|
3217
|
-
U(
|
|
3241
|
+
const w = O(() => e.data), i = S(!1), y = S(!1);
|
|
3242
|
+
return H(i, () => {
|
|
3243
|
+
i.value ? o("edit-start") : o("edit-end");
|
|
3244
|
+
}), (c, k) => (d(), h("div", Ia, [
|
|
3245
|
+
C(ge, { name: "fade" }, {
|
|
3246
|
+
default: L(() => [
|
|
3247
|
+
U(m("div", Na, [
|
|
3218
3248
|
C(je)
|
|
3219
3249
|
], 512), [
|
|
3220
3250
|
[B, c.loading]
|
|
@@ -3222,94 +3252,94 @@ const Zo = {
|
|
|
3222
3252
|
]),
|
|
3223
3253
|
_: 1
|
|
3224
3254
|
}),
|
|
3225
|
-
C(
|
|
3226
|
-
"edit-mode":
|
|
3227
|
-
"onUpdate:editMode": k[1] || (k[1] = (
|
|
3228
|
-
"filter-panel-open":
|
|
3229
|
-
"onUpdate:filterPanelOpen": k[2] || (k[2] = (
|
|
3255
|
+
C(po, {
|
|
3256
|
+
"edit-mode": i.value,
|
|
3257
|
+
"onUpdate:editMode": k[1] || (k[1] = (T) => i.value = T),
|
|
3258
|
+
"filter-panel-open": y.value,
|
|
3259
|
+
"onUpdate:filterPanelOpen": k[2] || (k[2] = (T) => y.value = T),
|
|
3230
3260
|
columns: c.columns,
|
|
3231
3261
|
options: c.options,
|
|
3232
3262
|
request: c.request,
|
|
3233
|
-
onClearFilters:
|
|
3263
|
+
onClearFilters: f
|
|
3234
3264
|
}, {
|
|
3235
|
-
"view-manager":
|
|
3236
|
-
C(
|
|
3265
|
+
"view-manager": L(() => [
|
|
3266
|
+
C(Ma, {
|
|
3237
3267
|
columns: l.value,
|
|
3238
|
-
"onUpdate:columns": k[0] || (k[0] = (
|
|
3268
|
+
"onUpdate:columns": k[0] || (k[0] = (T) => l.value = T)
|
|
3239
3269
|
}, null, 8, ["columns"])
|
|
3240
3270
|
]),
|
|
3241
3271
|
_: 1
|
|
3242
3272
|
}, 8, ["edit-mode", "filter-panel-open", "columns", "options", "request"]),
|
|
3243
|
-
|
|
3244
|
-
|
|
3273
|
+
m("div", qa, [
|
|
3274
|
+
m("table", {
|
|
3245
3275
|
class: I(["cl-delay-75 cl-min-h-[276px] cl-overflow-x-auto cl-overscroll-x-none cl-text-left cl-transition-opacity cl-w-full", {
|
|
3246
3276
|
"cl-opacity-40": c.loading
|
|
3247
3277
|
}])
|
|
3248
3278
|
}, [
|
|
3249
|
-
|
|
3250
|
-
(
|
|
3251
|
-
key:
|
|
3252
|
-
style: el(s(
|
|
3279
|
+
m("colgroup", Da, [
|
|
3280
|
+
(d(!0), h(x, null, Y(a.value, (T, j) => (d(), h("col", {
|
|
3281
|
+
key: j,
|
|
3282
|
+
style: el(s(T.name)),
|
|
3253
3283
|
span: 1
|
|
3254
3284
|
}, null, 4))), 128))
|
|
3255
3285
|
]),
|
|
3256
|
-
C(
|
|
3257
|
-
request:
|
|
3258
|
-
"onUpdate:request": k[3] || (k[3] = (
|
|
3259
|
-
"filter-panel-open":
|
|
3260
|
-
"onUpdate:filterPanelOpen": k[4] || (k[4] = (
|
|
3261
|
-
columns:
|
|
3286
|
+
C(ba, {
|
|
3287
|
+
request: u.value,
|
|
3288
|
+
"onUpdate:request": k[3] || (k[3] = (T) => u.value = T),
|
|
3289
|
+
"filter-panel-open": y.value,
|
|
3290
|
+
"onUpdate:filterPanelOpen": k[4] || (k[4] = (T) => y.value = T),
|
|
3291
|
+
columns: a.value,
|
|
3262
3292
|
options: c.options
|
|
3263
3293
|
}, null, 8, ["request", "filter-panel-open", "columns", "options"]),
|
|
3264
|
-
C(
|
|
3265
|
-
columns:
|
|
3266
|
-
request:
|
|
3267
|
-
data:
|
|
3294
|
+
C(_o, {
|
|
3295
|
+
columns: a.value,
|
|
3296
|
+
request: u.value,
|
|
3297
|
+
data: w.value,
|
|
3268
3298
|
loading: c.loading,
|
|
3269
|
-
"edit-mode":
|
|
3299
|
+
"edit-mode": i.value,
|
|
3270
3300
|
"selection-enabled": c.options.rowSelectionEnabled,
|
|
3271
|
-
onClearFilters:
|
|
3272
|
-
onRowEdit: k[5] || (k[5] = (
|
|
3273
|
-
onRowSelect: k[6] || (k[6] = (
|
|
3301
|
+
onClearFilters: f,
|
|
3302
|
+
onRowEdit: k[5] || (k[5] = (T) => c.$emit("row-edit", T)),
|
|
3303
|
+
onRowSelect: k[6] || (k[6] = (T) => c.$emit("row-select", T))
|
|
3274
3304
|
}, ze({ _: 2 }, [
|
|
3275
|
-
Y(c.$slots, (
|
|
3276
|
-
name:
|
|
3277
|
-
fn:
|
|
3278
|
-
|
|
3305
|
+
Y(c.$slots, (T, j) => ({
|
|
3306
|
+
name: j,
|
|
3307
|
+
fn: L((V) => [
|
|
3308
|
+
A(c.$slots, j, le(re(V)))
|
|
3279
3309
|
])
|
|
3280
3310
|
}))
|
|
3281
3311
|
]), 1032, ["columns", "request", "data", "loading", "edit-mode", "selection-enabled"])
|
|
3282
3312
|
], 2)
|
|
3283
3313
|
]),
|
|
3284
|
-
C(
|
|
3285
|
-
request:
|
|
3286
|
-
"onUpdate:request": k[7] || (k[7] = (
|
|
3314
|
+
C(Po, {
|
|
3315
|
+
request: u.value,
|
|
3316
|
+
"onUpdate:request": k[7] || (k[7] = (T) => u.value = T),
|
|
3287
3317
|
data: c.data
|
|
3288
3318
|
}, null, 8, ["request", "data"])
|
|
3289
3319
|
]));
|
|
3290
3320
|
}
|
|
3291
|
-
}),
|
|
3321
|
+
}), Ua = { 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" }, Ba = /* @__PURE__ */ D({
|
|
3292
3322
|
__name: "cl-ui-header",
|
|
3293
3323
|
emits: ["open-click"],
|
|
3294
3324
|
setup(t) {
|
|
3295
|
-
return (o, e) => (
|
|
3296
|
-
|
|
3297
|
-
|
|
3325
|
+
return (o, e) => (d(), h("header", Ua, [
|
|
3326
|
+
A(o.$slots, "logo"),
|
|
3327
|
+
m("div", {
|
|
3298
3328
|
class: "cl-cursor-pointer cl-flex cl-flex-nowrap",
|
|
3299
3329
|
onClick: e[0] || (e[0] = (l) => o.$emit("open-click"))
|
|
3300
3330
|
}, [
|
|
3301
|
-
|
|
3302
|
-
|
|
3331
|
+
A(o.$slots, "menu"),
|
|
3332
|
+
A(o.$slots, "icon")
|
|
3303
3333
|
])
|
|
3304
3334
|
]));
|
|
3305
3335
|
}
|
|
3306
|
-
}),
|
|
3336
|
+
}), xa = { class: "cl-bg-transparent cl-flex cl-items-center cl-select-none hover:cl-bg-opacity-10 hover:cl-bg-white md:cl-min-w-[320px]" }, za = ["src"], La = {
|
|
3307
3337
|
key: 0,
|
|
3308
3338
|
class: "cl-text-ellipsis cl-whitespace-nowrap"
|
|
3309
|
-
},
|
|
3339
|
+
}, Pa = {
|
|
3310
3340
|
key: 1,
|
|
3311
3341
|
class: "cl-text-ellipsis cl-text-xs cl-whitespace-nowrap"
|
|
3312
|
-
},
|
|
3342
|
+
}, Fa = { 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" }, Va = { class: "cl-absolute cl-bg-white cl-right-0 cl-shadow-2xl cl-top-20 cl-w-full cl-z-20" }, Ga = /* @__PURE__ */ D({
|
|
3313
3343
|
__name: "cl-ui-header-menu",
|
|
3314
3344
|
props: {
|
|
3315
3345
|
username: { default: "" },
|
|
@@ -3320,12 +3350,12 @@ const Zo = {
|
|
|
3320
3350
|
},
|
|
3321
3351
|
emits: ["update:is-open"],
|
|
3322
3352
|
setup(t, { emit: o }) {
|
|
3323
|
-
const e = t, l =
|
|
3324
|
-
|
|
3325
|
-
function
|
|
3353
|
+
const e = t, l = S();
|
|
3354
|
+
Le(l, a);
|
|
3355
|
+
function a() {
|
|
3326
3356
|
e.isOpen === !0 && o("update:is-open", !1);
|
|
3327
3357
|
}
|
|
3328
|
-
return (
|
|
3358
|
+
return (n, r) => (d(), h("div", {
|
|
3329
3359
|
ref_key: "headerMenuElement",
|
|
3330
3360
|
ref: l,
|
|
3331
3361
|
class: I(["md:cl-relative", {
|
|
@@ -3333,31 +3363,31 @@ const Zo = {
|
|
|
3333
3363
|
"cl-bg-blue-light": e.colour === "secondary"
|
|
3334
3364
|
}])
|
|
3335
3365
|
}, [
|
|
3336
|
-
|
|
3337
|
-
|
|
3366
|
+
m("div", xa, [
|
|
3367
|
+
n.image ? (d(), h("img", {
|
|
3338
3368
|
key: 0,
|
|
3339
|
-
src:
|
|
3369
|
+
src: n.image,
|
|
3340
3370
|
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"
|
|
3341
|
-
}, null, 8,
|
|
3371
|
+
}, null, 8, za)) : (d(), z(p(q), {
|
|
3342
3372
|
key: 1,
|
|
3343
3373
|
class: "cl-hidden cl-m-4 cl-text-white md:cl-block",
|
|
3344
3374
|
icon: "ph:user-circle",
|
|
3345
3375
|
width: "48",
|
|
3346
3376
|
height: "48"
|
|
3347
3377
|
})),
|
|
3348
|
-
|
|
3378
|
+
m("div", {
|
|
3349
3379
|
class: I(["cl-grow cl-hidden cl-my-4 md:cl-block", {
|
|
3350
3380
|
"cl-text-secondary-default": e.colour === "default",
|
|
3351
3381
|
"cl-text-white": e.colour === "secondary"
|
|
3352
3382
|
}])
|
|
3353
3383
|
}, [
|
|
3354
|
-
|
|
3355
|
-
|
|
3384
|
+
n.username ? (d(), h("div", La, _(n.username), 1)) : M("", !0),
|
|
3385
|
+
n.group ? (d(), h("div", Pa, _(n.group), 1)) : M("", !0)
|
|
3356
3386
|
], 2),
|
|
3357
|
-
|
|
3387
|
+
m("div", Fa, [
|
|
3358
3388
|
C(p(q), {
|
|
3359
3389
|
class: I(["cl-transform-gpu cl-transition-transform", {
|
|
3360
|
-
"cl-rotate-180":
|
|
3390
|
+
"cl-rotate-180": n.isOpen,
|
|
3361
3391
|
"cl-text-secondary-default": e.colour === "default",
|
|
3362
3392
|
"cl-text-white": e.colour === "secondary"
|
|
3363
3393
|
}]),
|
|
@@ -3365,59 +3395,40 @@ const Zo = {
|
|
|
3365
3395
|
}, null, 8, ["class"])
|
|
3366
3396
|
])
|
|
3367
3397
|
]),
|
|
3368
|
-
C(
|
|
3369
|
-
default:
|
|
3370
|
-
U(
|
|
3371
|
-
|
|
3398
|
+
C(ge, { name: "fade" }, {
|
|
3399
|
+
default: L(() => [
|
|
3400
|
+
U(m("div", Va, [
|
|
3401
|
+
A(n.$slots, "default")
|
|
3372
3402
|
], 512), [
|
|
3373
|
-
[B,
|
|
3403
|
+
[B, n.isOpen]
|
|
3374
3404
|
])
|
|
3375
3405
|
]),
|
|
3376
3406
|
_: 3
|
|
3377
3407
|
})
|
|
3378
3408
|
], 2));
|
|
3379
3409
|
}
|
|
3380
|
-
})
|
|
3381
|
-
"button",
|
|
3382
|
-
"checkbox",
|
|
3383
|
-
"color",
|
|
3384
|
-
"date",
|
|
3385
|
-
"datetime",
|
|
3386
|
-
"email",
|
|
3387
|
-
"file",
|
|
3388
|
-
"number",
|
|
3389
|
-
"password",
|
|
3390
|
-
"radio",
|
|
3391
|
-
"range",
|
|
3392
|
-
"reset",
|
|
3393
|
-
"search",
|
|
3394
|
-
"submit",
|
|
3395
|
-
"tel",
|
|
3396
|
-
"text",
|
|
3397
|
-
"time",
|
|
3398
|
-
"url"
|
|
3399
|
-
];
|
|
3410
|
+
});
|
|
3400
3411
|
function Be(t) {
|
|
3401
3412
|
return /[a-z]{2}-[A-Z]{2}/gm.test(t.localeCode);
|
|
3402
3413
|
}
|
|
3403
|
-
function
|
|
3414
|
+
function Ha(t) {
|
|
3404
3415
|
let o = Array.isArray(t);
|
|
3405
3416
|
if (o) {
|
|
3406
3417
|
for (const e of t)
|
|
3407
|
-
if (!
|
|
3418
|
+
if (!Wa(e)) {
|
|
3408
3419
|
o = !1;
|
|
3409
3420
|
break;
|
|
3410
3421
|
}
|
|
3411
3422
|
}
|
|
3412
3423
|
return o;
|
|
3413
3424
|
}
|
|
3414
|
-
function
|
|
3425
|
+
function Wa(t) {
|
|
3415
3426
|
return typeof t.name == "string" && typeof t.nativeName == "string" && typeof t.localeCode == "string";
|
|
3416
3427
|
}
|
|
3417
|
-
const
|
|
3428
|
+
const Ja = {
|
|
3418
3429
|
key: 0,
|
|
3419
3430
|
class: "cl-flex cl-relative cl-select-none cl-w-auto cl-z-30"
|
|
3420
|
-
},
|
|
3431
|
+
}, Ka = { 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" }, Za = ["data-localename", "data-localecode", "onClick"], Qa = { class: "cl-text-xs" }, Ya = /* @__PURE__ */ D({
|
|
3421
3432
|
__name: "cl-ui-language-switcher",
|
|
3422
3433
|
props: {
|
|
3423
3434
|
supportedLanguages: {},
|
|
@@ -3426,51 +3437,51 @@ const Kn = {
|
|
|
3426
3437
|
},
|
|
3427
3438
|
emits: ["language-select"],
|
|
3428
3439
|
setup(t, { emit: o }) {
|
|
3429
|
-
const e = t, { locale: l } =
|
|
3440
|
+
const e = t, { locale: l } = te(), a = S(!1), n = O(() => e.supportedLanguages.find((u) => u.localeCode === l.value) ?? e.defaultLangauge), r = O(() => e.supportedLanguages.filter((u) => Be(u)).sort((u, f) => u.nativeName > f.nativeName ? 1 : f.nativeName > u.nativeName ? -1 : 0));
|
|
3430
3441
|
function s() {
|
|
3431
|
-
e.disabled || (
|
|
3442
|
+
e.disabled || (a.value = !a.value);
|
|
3432
3443
|
}
|
|
3433
|
-
return
|
|
3434
|
-
|
|
3435
|
-
}), (
|
|
3436
|
-
|
|
3444
|
+
return H(() => e.disabled, (u) => {
|
|
3445
|
+
u && (a.value = !1);
|
|
3446
|
+
}), (u, f) => n.value !== null && p(Be)(n.value) ? (d(), h("div", Ja, [
|
|
3447
|
+
m("div", {
|
|
3437
3448
|
class: I(["cl-flex cl-items-center", {
|
|
3438
|
-
"cl-cursor-pointer": !
|
|
3449
|
+
"cl-cursor-pointer": !u.disabled
|
|
3439
3450
|
}]),
|
|
3440
3451
|
onClick: s
|
|
3441
3452
|
}, [
|
|
3442
|
-
|
|
3453
|
+
m("span", {
|
|
3443
3454
|
class: I(["cl-font-semibold cl-text-xs", {
|
|
3444
|
-
"cl-opacity-50":
|
|
3455
|
+
"cl-opacity-50": u.disabled
|
|
3445
3456
|
}])
|
|
3446
|
-
},
|
|
3457
|
+
}, _(n.value.nativeName), 3)
|
|
3447
3458
|
], 2),
|
|
3448
|
-
C(
|
|
3449
|
-
default:
|
|
3450
|
-
U(
|
|
3451
|
-
(
|
|
3452
|
-
key:
|
|
3459
|
+
C(ge, { name: "fade" }, {
|
|
3460
|
+
default: L(() => [
|
|
3461
|
+
U(m("div", Ka, [
|
|
3462
|
+
(d(!0), h(x, null, Y(r.value, (v, w) => (d(), h("div", {
|
|
3463
|
+
key: w,
|
|
3453
3464
|
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",
|
|
3454
|
-
"data-localename":
|
|
3455
|
-
"data-localecode":
|
|
3456
|
-
onClick: (
|
|
3457
|
-
l.value =
|
|
3465
|
+
"data-localename": v.name,
|
|
3466
|
+
"data-localecode": v.localeCode,
|
|
3467
|
+
onClick: (i) => {
|
|
3468
|
+
l.value = v.localeCode, s(), o("language-select", v.localeCode);
|
|
3458
3469
|
}
|
|
3459
3470
|
}, [
|
|
3460
|
-
|
|
3461
|
-
], 8,
|
|
3471
|
+
m("span", Qa, _(v.nativeName), 1)
|
|
3472
|
+
], 8, Za))), 128))
|
|
3462
3473
|
], 512), [
|
|
3463
|
-
[B,
|
|
3474
|
+
[B, a.value]
|
|
3464
3475
|
])
|
|
3465
3476
|
]),
|
|
3466
3477
|
_: 1
|
|
3467
3478
|
})
|
|
3468
3479
|
])) : M("", !0);
|
|
3469
3480
|
}
|
|
3470
|
-
}),
|
|
3481
|
+
}), Xa = { class: "cl-relative" }, en = { class: "cl-h-screen cl-z-0" }, ln = { 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" }, tn = { class: "cl-col-span-10 lg:cl-col-span-3" }, on = {
|
|
3471
3482
|
key: 0,
|
|
3472
3483
|
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"
|
|
3473
|
-
},
|
|
3484
|
+
}, an = { class: "cl-col-span-3" }, nn = { class: "cl-inline cl-relative cl-text-grey-4" }, sn = { class: "cl-col-span-3" }, rn = { class: "cl-inline cl-relative cl-text-grey-4" }, cn = { class: "cl-col-span-10 cl-emphasis-danger cl-mt-10 cl-p-3 cl-rounded-md cl-text-sm md:cl-mt-3" }, un = /* @__PURE__ */ D({
|
|
3474
3485
|
__name: "cl-ui-login",
|
|
3475
3486
|
props: {
|
|
3476
3487
|
errors: { default: () => [] },
|
|
@@ -3481,54 +3492,54 @@ const Kn = {
|
|
|
3481
3492
|
"update:errors": null
|
|
3482
3493
|
},
|
|
3483
3494
|
setup(t, { emit: o }) {
|
|
3484
|
-
const { t: e } =
|
|
3495
|
+
const { t: e } = te(), l = S(""), a = S(""), n = S("password"), r = S();
|
|
3485
3496
|
function s() {
|
|
3486
|
-
const
|
|
3497
|
+
const w = {
|
|
3487
3498
|
username: l.value,
|
|
3488
|
-
password:
|
|
3499
|
+
password: a.value
|
|
3489
3500
|
};
|
|
3490
|
-
o("login",
|
|
3501
|
+
o("login", w);
|
|
3491
3502
|
}
|
|
3492
|
-
function
|
|
3503
|
+
function u() {
|
|
3493
3504
|
o("update:errors", []);
|
|
3494
3505
|
}
|
|
3495
|
-
function
|
|
3496
|
-
const
|
|
3506
|
+
function f(w, i) {
|
|
3507
|
+
const y = {
|
|
3497
3508
|
valid: !0,
|
|
3498
3509
|
message: ""
|
|
3499
3510
|
};
|
|
3500
|
-
return typeof
|
|
3511
|
+
return typeof i == "string" && i.trim() === "" && (y.valid = !1), y;
|
|
3501
3512
|
}
|
|
3502
|
-
function
|
|
3503
|
-
r.value =
|
|
3513
|
+
function v(w, i) {
|
|
3514
|
+
r.value = w;
|
|
3504
3515
|
}
|
|
3505
|
-
return (
|
|
3506
|
-
|
|
3507
|
-
|
|
3516
|
+
return (w, i) => (d(), h("div", Xa, [
|
|
3517
|
+
m("div", en, [
|
|
3518
|
+
A(w.$slots, "background")
|
|
3508
3519
|
]),
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3520
|
+
m("form", ln, [
|
|
3521
|
+
m("div", tn, [
|
|
3522
|
+
A(w.$slots, "logo")
|
|
3512
3523
|
]),
|
|
3513
|
-
|
|
3514
|
-
|
|
3524
|
+
w.$slots["language-switcher"] ? (d(), h("div", on, [
|
|
3525
|
+
A(w.$slots, "language-switcher")
|
|
3515
3526
|
])) : M("", !0),
|
|
3516
|
-
|
|
3527
|
+
m("div", {
|
|
3517
3528
|
class: I(["cl-gap-y-4 cl-grid cl-grid-cols-1 lg:cl-gap-x-2 lg:cl-grid-cols-8", {
|
|
3518
|
-
"cl-col-span-7": !
|
|
3519
|
-
"cl-col-span-6":
|
|
3529
|
+
"cl-col-span-7": !w.$slots["language-switcher"],
|
|
3530
|
+
"cl-col-span-6": w.$slots["language-switcher"]
|
|
3520
3531
|
}])
|
|
3521
3532
|
}, [
|
|
3522
|
-
|
|
3523
|
-
|
|
3533
|
+
m("div", an, [
|
|
3534
|
+
m("div", nn, [
|
|
3524
3535
|
C(p(q), {
|
|
3525
3536
|
class: "cl-absolute cl-left-3 cl-top-2.5",
|
|
3526
3537
|
icon: "ph:user",
|
|
3527
3538
|
size: 18
|
|
3528
3539
|
}),
|
|
3529
|
-
C(
|
|
3540
|
+
C(oe, {
|
|
3530
3541
|
modelValue: l.value,
|
|
3531
|
-
"onUpdate:modelValue":
|
|
3542
|
+
"onUpdate:modelValue": i[0] || (i[0] = (y) => l.value = y),
|
|
3532
3543
|
modelModifiers: { trim: !0 },
|
|
3533
3544
|
class: "!cl-border-2 !cl-mb-1 cl-w-full",
|
|
3534
3545
|
"input-type": "email",
|
|
@@ -3538,16 +3549,16 @@ const Kn = {
|
|
|
3538
3549
|
"placeholder-text": p(e)("login.email"),
|
|
3539
3550
|
autocomplete: "username",
|
|
3540
3551
|
"validate-immediately": !0,
|
|
3541
|
-
"custom-validation-function":
|
|
3552
|
+
"custom-validation-function": f,
|
|
3542
3553
|
"input-specific-classes": "!cl-pl-9",
|
|
3543
3554
|
"message-when-valid": l.value ? p(e)("login.validEmail") : "",
|
|
3544
|
-
onInput:
|
|
3545
|
-
onValidated:
|
|
3555
|
+
onInput: u,
|
|
3556
|
+
onValidated: v
|
|
3546
3557
|
}, null, 8, ["modelValue", "highlight-when-valid", "label", "placeholder-text", "message-when-valid"])
|
|
3547
3558
|
])
|
|
3548
3559
|
]),
|
|
3549
|
-
|
|
3550
|
-
|
|
3560
|
+
m("div", sn, [
|
|
3561
|
+
m("div", rn, [
|
|
3551
3562
|
C(p(q), {
|
|
3552
3563
|
class: "cl-absolute cl-left-3 cl-top-2.5",
|
|
3553
3564
|
icon: "ph:lock",
|
|
@@ -3557,65 +3568,65 @@ const Kn = {
|
|
|
3557
3568
|
class: "cl-absolute cl-cursor-pointer cl-right-6 cl-top-2.5",
|
|
3558
3569
|
icon: "ph:eye",
|
|
3559
3570
|
size: 18,
|
|
3560
|
-
onClick:
|
|
3571
|
+
onClick: i[1] || (i[1] = (y) => n.value = "text")
|
|
3561
3572
|
}, null, 512), [
|
|
3562
|
-
[B,
|
|
3573
|
+
[B, n.value === "password"]
|
|
3563
3574
|
]),
|
|
3564
3575
|
U(C(p(q), {
|
|
3565
3576
|
class: "cl-absolute cl-cursor-pointer cl-right-6 cl-top-2.5",
|
|
3566
3577
|
icon: "ph:eye-slash",
|
|
3567
3578
|
size: 18,
|
|
3568
|
-
onClick:
|
|
3579
|
+
onClick: i[2] || (i[2] = (y) => n.value = "password")
|
|
3569
3580
|
}, null, 512), [
|
|
3570
|
-
[B,
|
|
3581
|
+
[B, n.value === "text"]
|
|
3571
3582
|
]),
|
|
3572
|
-
C(
|
|
3573
|
-
modelValue:
|
|
3574
|
-
"onUpdate:modelValue":
|
|
3583
|
+
C(oe, {
|
|
3584
|
+
modelValue: a.value,
|
|
3585
|
+
"onUpdate:modelValue": i[3] || (i[3] = (y) => a.value = y),
|
|
3575
3586
|
class: "!cl-border-2 cl-w-full",
|
|
3576
|
-
"input-type":
|
|
3577
|
-
"highlight-when-valid":
|
|
3587
|
+
"input-type": n.value,
|
|
3588
|
+
"highlight-when-valid": a.value !== void 0 && a.value !== "",
|
|
3578
3589
|
label: p(e)("login.password"),
|
|
3579
3590
|
"show-label": !1,
|
|
3580
3591
|
"placeholder-text": p(e)("login.password"),
|
|
3581
3592
|
autocomplete: "current-password",
|
|
3582
3593
|
"validate-immediately": !0,
|
|
3583
3594
|
"input-specific-classes": "!cl-pl-9 !cl-pr-9",
|
|
3584
|
-
"custom-validation-function":
|
|
3585
|
-
onInput:
|
|
3595
|
+
"custom-validation-function": f,
|
|
3596
|
+
onInput: u
|
|
3586
3597
|
}, null, 8, ["modelValue", "input-type", "highlight-when-valid", "label", "placeholder-text"])
|
|
3587
3598
|
])
|
|
3588
3599
|
]),
|
|
3589
|
-
|
|
3600
|
+
m("div", {
|
|
3590
3601
|
class: I(["cl-col-span-2", {
|
|
3591
|
-
"cl-mt-1.5 cl-mb-1 md:cl-mt-0.5 md:cl-mb-7 lg:cl-mb-0":
|
|
3602
|
+
"cl-mt-1.5 cl-mb-1 md:cl-mt-0.5 md:cl-mb-7 lg:cl-mb-0": w.loading
|
|
3592
3603
|
}])
|
|
3593
3604
|
}, [
|
|
3594
|
-
C(
|
|
3605
|
+
C(me, {
|
|
3595
3606
|
class: "cl-w-full",
|
|
3596
3607
|
colour: "blue",
|
|
3597
|
-
loading:
|
|
3598
|
-
disabled: !r.value ||
|
|
3608
|
+
loading: w.loading,
|
|
3609
|
+
disabled: !r.value || a.value === "",
|
|
3599
3610
|
onClick: K(s, ["prevent"])
|
|
3600
3611
|
}, {
|
|
3601
|
-
default:
|
|
3602
|
-
Q(
|
|
3612
|
+
default: L(() => [
|
|
3613
|
+
Q(_(p(e)("login.login")), 1)
|
|
3603
3614
|
]),
|
|
3604
3615
|
_: 1
|
|
3605
3616
|
}, 8, ["loading", "disabled", "onClick"])
|
|
3606
3617
|
], 2)
|
|
3607
3618
|
], 2),
|
|
3608
|
-
C(
|
|
3609
|
-
default:
|
|
3610
|
-
var
|
|
3619
|
+
C(ge, { name: "cl-grow-down" }, {
|
|
3620
|
+
default: L(() => {
|
|
3621
|
+
var y;
|
|
3611
3622
|
return [
|
|
3612
|
-
U(
|
|
3613
|
-
(
|
|
3623
|
+
U(m("span", cn, [
|
|
3624
|
+
(d(!0), h(x, null, Y(w.errors, (c, k) => (d(), h("div", {
|
|
3614
3625
|
key: k,
|
|
3615
3626
|
class: "cl-font-semibold"
|
|
3616
|
-
},
|
|
3627
|
+
}, _(c), 1))), 128))
|
|
3617
3628
|
], 512), [
|
|
3618
|
-
[B, (
|
|
3629
|
+
[B, (y = w.errors) == null ? void 0 : y.length]
|
|
3619
3630
|
])
|
|
3620
3631
|
];
|
|
3621
3632
|
}),
|
|
@@ -3624,41 +3635,41 @@ const Kn = {
|
|
|
3624
3635
|
])
|
|
3625
3636
|
]));
|
|
3626
3637
|
}
|
|
3627
|
-
}),
|
|
3638
|
+
}), dn = [
|
|
3628
3639
|
"x-small",
|
|
3629
3640
|
"small",
|
|
3630
3641
|
"medium",
|
|
3631
3642
|
"large"
|
|
3632
|
-
],
|
|
3643
|
+
], fn = [
|
|
3633
3644
|
"primary",
|
|
3634
3645
|
"secondary",
|
|
3635
3646
|
"white"
|
|
3636
|
-
],
|
|
3647
|
+
], pn = {
|
|
3637
3648
|
key: 0,
|
|
3638
3649
|
class: "cl-h-0 cl-w-0"
|
|
3639
|
-
},
|
|
3650
|
+
}, mn = { class: "cl-relative cl-w-full" }, gn = /* @__PURE__ */ D({
|
|
3640
3651
|
__name: "cl-ui-navigation",
|
|
3641
3652
|
props: {
|
|
3642
3653
|
colour: { default: "default" }
|
|
3643
3654
|
},
|
|
3644
3655
|
setup(t) {
|
|
3645
|
-
const o =
|
|
3646
|
-
function l(
|
|
3647
|
-
let
|
|
3648
|
-
return
|
|
3649
|
-
id:
|
|
3656
|
+
const o = S([]), e = O(() => o.value.filter((i) => i.open === !0).length > 0);
|
|
3657
|
+
function l(i) {
|
|
3658
|
+
let y = o.value.find((c) => c.id === i);
|
|
3659
|
+
return y || (y = {
|
|
3660
|
+
id: i,
|
|
3650
3661
|
open: !1
|
|
3651
|
-
}, o.value.push(
|
|
3662
|
+
}, o.value.push(y)), y.open;
|
|
3652
3663
|
}
|
|
3653
|
-
function
|
|
3654
|
-
const
|
|
3655
|
-
|
|
3656
|
-
c.id !==
|
|
3664
|
+
function a(i) {
|
|
3665
|
+
const y = o.value.find((c) => c.id === i);
|
|
3666
|
+
y && (y.open = !y.open, o.value.forEach((c) => {
|
|
3667
|
+
c.id !== i && (c.open = !1);
|
|
3657
3668
|
}));
|
|
3658
3669
|
}
|
|
3659
|
-
const
|
|
3660
|
-
|
|
3661
|
-
() =>
|
|
3670
|
+
const n = pl();
|
|
3671
|
+
H(
|
|
3672
|
+
() => n,
|
|
3662
3673
|
() => {
|
|
3663
3674
|
r.value = !1;
|
|
3664
3675
|
},
|
|
@@ -3666,53 +3677,53 @@ const Kn = {
|
|
|
3666
3677
|
deep: !0
|
|
3667
3678
|
}
|
|
3668
3679
|
);
|
|
3669
|
-
const r =
|
|
3670
|
-
function
|
|
3671
|
-
r.value = !r.value, s.value = !0,
|
|
3672
|
-
}
|
|
3673
|
-
const
|
|
3674
|
-
function
|
|
3675
|
-
r.value === !1 && e.value === !0 && o.value.forEach((
|
|
3676
|
-
|
|
3680
|
+
const r = S(!1), s = S(!1), { start: u } = ll(() => s.value = !1, 100);
|
|
3681
|
+
function f() {
|
|
3682
|
+
r.value = !r.value, s.value = !0, u();
|
|
3683
|
+
}
|
|
3684
|
+
const v = S();
|
|
3685
|
+
function w() {
|
|
3686
|
+
r.value === !1 && e.value === !0 && o.value.forEach((i) => {
|
|
3687
|
+
i.open = !1;
|
|
3677
3688
|
});
|
|
3678
3689
|
}
|
|
3679
|
-
return
|
|
3690
|
+
return Le(v, w), (i, y) => (d(), h("div", {
|
|
3680
3691
|
ref_key: "navElement",
|
|
3681
|
-
ref:
|
|
3692
|
+
ref: v,
|
|
3682
3693
|
class: "cl-flex cl-flex-nowrap cl-relative"
|
|
3683
3694
|
}, [
|
|
3684
|
-
|
|
3695
|
+
m("div", {
|
|
3685
3696
|
id: "group-container",
|
|
3686
3697
|
class: I(["cl-h-full cl-overflow-y-auto cl-overscroll-y-none cl-pb-20 cl-w-20 cl-z-30 xl:cl-pb-0", {
|
|
3687
|
-
"cl-bg-primary-default":
|
|
3688
|
-
"cl-bg-blue-dark":
|
|
3698
|
+
"cl-bg-primary-default": i.colour === "default",
|
|
3699
|
+
"cl-bg-blue-dark": i.colour === "secondary"
|
|
3689
3700
|
}])
|
|
3690
3701
|
}, [
|
|
3691
|
-
|
|
3702
|
+
A(i.$slots, "icon", ie({ navcolour: i.colour }, { groupIsOpen: l, toggleOpen: a }), void 0, !0)
|
|
3692
3703
|
], 2),
|
|
3693
|
-
s.value ? (
|
|
3694
|
-
C(
|
|
3695
|
-
default:
|
|
3696
|
-
U(
|
|
3704
|
+
s.value ? (d(), h("div", pn)) : M("", !0),
|
|
3705
|
+
C(ge, { name: "slide-right" }, {
|
|
3706
|
+
default: L(() => [
|
|
3707
|
+
U(m("div", {
|
|
3697
3708
|
class: I(["cl-bg-grey-0 cl-border-grey-2 cl-border-r cl-duration-75 cl-h-full cl-min-w-[260px] cl-overflow-y-auto cl-overscroll-y-none cl-p-8 cl-pb-24 cl-top-0 cl-transition-shadow cl-w-[260px] cl-z-20 xl:cl-pb-0", {
|
|
3698
3709
|
"cl-relative": r.value,
|
|
3699
3710
|
"cl-absolute cl-left-20 cl-shadow-lg": !r.value
|
|
3700
3711
|
}])
|
|
3701
3712
|
}, [
|
|
3702
|
-
|
|
3703
|
-
|
|
3713
|
+
m("div", mn, [
|
|
3714
|
+
m("span", {
|
|
3704
3715
|
class: "cl-absolute cl-cursor-pointer cl-hidden cl-right-0 cl-top-1.5 lg:cl-block",
|
|
3705
|
-
onClick:
|
|
3716
|
+
onClick: f
|
|
3706
3717
|
}, [
|
|
3707
|
-
r.value ? (
|
|
3718
|
+
r.value ? (d(), z(p(q), {
|
|
3708
3719
|
key: 1,
|
|
3709
3720
|
icon: "ph:push-pin-slash"
|
|
3710
|
-
})) : (
|
|
3721
|
+
})) : (d(), z(p(q), {
|
|
3711
3722
|
key: 0,
|
|
3712
3723
|
icon: "ph:push-pin"
|
|
3713
3724
|
}))
|
|
3714
3725
|
]),
|
|
3715
|
-
|
|
3726
|
+
A(i.$slots, "default", le(re({ groupIsOpen: l })), void 0, !0)
|
|
3716
3727
|
])
|
|
3717
3728
|
], 2), [
|
|
3718
3729
|
[B, e.value]
|
|
@@ -3723,7 +3734,7 @@ const Kn = {
|
|
|
3723
3734
|
], 512));
|
|
3724
3735
|
}
|
|
3725
3736
|
});
|
|
3726
|
-
const
|
|
3737
|
+
const vn = /* @__PURE__ */ de(gn, [["__scopeId", "data-v-7db412a7"]]), bn = /* @__PURE__ */ D({
|
|
3727
3738
|
__name: "cl-ui-navigation-icon",
|
|
3728
3739
|
props: {
|
|
3729
3740
|
iconValue: {},
|
|
@@ -3731,7 +3742,7 @@ const va = /* @__PURE__ */ fe(ga, [["__scopeId", "data-v-7db412a7"]]), ba = /* @
|
|
|
3731
3742
|
colour: { default: "default" }
|
|
3732
3743
|
},
|
|
3733
3744
|
setup(t) {
|
|
3734
|
-
return (o, e) => (
|
|
3745
|
+
return (o, e) => (d(), h("div", {
|
|
3735
3746
|
class: I(["cl-cursor-pointer cl-flex cl-h-20 cl-items-center cl-justify-center cl-transition-colors cl-w-20", {
|
|
3736
3747
|
"cl-text-secondary-default hover:cl-bg-primary-dark hover:cl-text-white": o.colour === "default",
|
|
3737
3748
|
"cl-bg-primary-darker cl-text-white": o.open && o.colour === "default",
|
|
@@ -3746,45 +3757,45 @@ const va = /* @__PURE__ */ fe(ga, [["__scopeId", "data-v-7db412a7"]]), ba = /* @
|
|
|
3746
3757
|
}, null, 8, ["icon"])
|
|
3747
3758
|
], 2));
|
|
3748
3759
|
}
|
|
3749
|
-
}),
|
|
3760
|
+
}), hn = {
|
|
3750
3761
|
key: 0,
|
|
3751
3762
|
class: "cl-font-bold cl-leading-8 cl-mb-8 cl-pr-8 cl-select-none cl-text-lg cl-text-secondary-default"
|
|
3752
|
-
},
|
|
3763
|
+
}, yn = { class: "cl-flex cl-flex-wrap cl-space-y-8 cl-text-sm cl-w-full" }, wn = /* @__PURE__ */ D({
|
|
3753
3764
|
__name: "cl-ui-navigation-group",
|
|
3754
3765
|
props: {
|
|
3755
3766
|
open: { type: Boolean }
|
|
3756
3767
|
},
|
|
3757
3768
|
setup(t) {
|
|
3758
|
-
return (o, e) => o.open ? (
|
|
3759
|
-
o.$slots.title ? (
|
|
3760
|
-
|
|
3769
|
+
return (o, e) => o.open ? (d(), h(x, { key: 0 }, [
|
|
3770
|
+
o.$slots.title ? (d(), h("div", hn, [
|
|
3771
|
+
A(o.$slots, "title")
|
|
3761
3772
|
])) : M("", !0),
|
|
3762
|
-
|
|
3763
|
-
|
|
3773
|
+
m("div", yn, [
|
|
3774
|
+
A(o.$slots, "default")
|
|
3764
3775
|
])
|
|
3765
3776
|
], 64)) : M("", !0);
|
|
3766
3777
|
}
|
|
3767
|
-
}), $
|
|
3778
|
+
}), $n = {}, kn = { class: "cl-w-full" }, Tn = {
|
|
3768
3779
|
key: 0,
|
|
3769
3780
|
class: "cl-font-bold cl-mb-4 cl-select-none"
|
|
3770
|
-
},
|
|
3771
|
-
function
|
|
3772
|
-
return
|
|
3773
|
-
t.$slots.title ? (
|
|
3774
|
-
|
|
3781
|
+
}, Cn = { class: "cl-flex cl-flex-wrap cl-space-y-2" };
|
|
3782
|
+
function _n(t, o) {
|
|
3783
|
+
return d(), h("div", kn, [
|
|
3784
|
+
t.$slots.title ? (d(), h("div", Tn, [
|
|
3785
|
+
A(t.$slots, "title")
|
|
3775
3786
|
])) : M("", !0),
|
|
3776
|
-
|
|
3777
|
-
|
|
3787
|
+
m("span", Cn, [
|
|
3788
|
+
A(t.$slots, "default")
|
|
3778
3789
|
])
|
|
3779
3790
|
]);
|
|
3780
3791
|
}
|
|
3781
|
-
const
|
|
3782
|
-
function
|
|
3783
|
-
return
|
|
3784
|
-
|
|
3792
|
+
const Sn = /* @__PURE__ */ de($n, [["render", _n]]), On = {}, En = { class: "cl-cursor-pointer cl-transition-colors cl-w-full hover:cl-text-blue-light" };
|
|
3793
|
+
function An(t, o) {
|
|
3794
|
+
return d(), h("div", En, [
|
|
3795
|
+
A(t.$slots, "default")
|
|
3785
3796
|
]);
|
|
3786
3797
|
}
|
|
3787
|
-
const
|
|
3798
|
+
const jn = /* @__PURE__ */ de(On, [["render", An]]), Mn = { class: "cl-w-full" }, In = /* @__PURE__ */ D({
|
|
3788
3799
|
__name: "cl-ui-tab",
|
|
3789
3800
|
props: {
|
|
3790
3801
|
currentTab: { default: 0 },
|
|
@@ -3792,59 +3803,59 @@ const ja = /* @__PURE__ */ fe(Oa, [["render", Aa]]), Ma = { class: "cl-w-full" }
|
|
|
3792
3803
|
colour: { default: "default" }
|
|
3793
3804
|
},
|
|
3794
3805
|
setup(t) {
|
|
3795
|
-
const o = t, e =
|
|
3796
|
-
function
|
|
3797
|
-
return
|
|
3806
|
+
const o = t, e = S(), l = S(!1), a = S(!1);
|
|
3807
|
+
function n(f) {
|
|
3808
|
+
return f === o.currentTab;
|
|
3798
3809
|
}
|
|
3799
3810
|
function r() {
|
|
3800
3811
|
if (e.value) {
|
|
3801
|
-
const
|
|
3802
|
-
l.value = e.value.scrollLeft > 0,
|
|
3812
|
+
const f = e.value.scrollWidth - e.value.clientWidth;
|
|
3813
|
+
l.value = e.value.scrollLeft > 0, a.value = e.value.scrollLeft < f;
|
|
3803
3814
|
} else
|
|
3804
|
-
l.value = !1,
|
|
3815
|
+
l.value = !1, a.value = !1;
|
|
3805
3816
|
}
|
|
3806
3817
|
function s() {
|
|
3807
3818
|
r(), window.addEventListener("resize", r);
|
|
3808
3819
|
}
|
|
3809
|
-
function
|
|
3820
|
+
function u(f) {
|
|
3810
3821
|
if (e.value) {
|
|
3811
|
-
const
|
|
3812
|
-
let
|
|
3813
|
-
|
|
3822
|
+
const v = e.value.scrollWidth / 5;
|
|
3823
|
+
let w = v;
|
|
3824
|
+
f === "left" && (w = -v), e.value.scroll(e.value.scrollLeft + w, 0);
|
|
3814
3825
|
}
|
|
3815
3826
|
}
|
|
3816
|
-
return
|
|
3817
|
-
|
|
3818
|
-
l.value ? (
|
|
3827
|
+
return Ce(() => s()), Ae(() => window.removeEventListener("resize", r)), (f, v) => (d(), h("div", Mn, [
|
|
3828
|
+
m("div", null, [
|
|
3829
|
+
l.value ? (d(), h("div", {
|
|
3819
3830
|
key: 0,
|
|
3820
3831
|
class: "cl-bg-white cl-cursor-pointer cl-float-left cl-h-11 cl-w-4",
|
|
3821
|
-
onClick:
|
|
3832
|
+
onClick: v[0] || (v[0] = (w) => u("left"))
|
|
3822
3833
|
}, [
|
|
3823
3834
|
C(p(q), {
|
|
3824
3835
|
icon: "ph:caret-left",
|
|
3825
3836
|
class: "cl-mt-4 cl-text-secondary-default"
|
|
3826
3837
|
})
|
|
3827
3838
|
])) : M("", !0),
|
|
3828
|
-
|
|
3839
|
+
m("div", {
|
|
3829
3840
|
ref_key: "headerContainer",
|
|
3830
3841
|
ref: e,
|
|
3831
3842
|
class: I(["cl-flex cl-overflow-x-auto cl-overscroll-x-none", {
|
|
3832
|
-
"cl-shadow-[inset_0_-1px_0_#eeeeee]": !
|
|
3833
|
-
"cl-shadow-[inset_0_-1px_0_#9acd32]": !
|
|
3834
|
-
"cl-shadow-[inset_0_-1px_0_#30363e]": !
|
|
3835
|
-
"cl-shadow-[inset_0_-1px_0_#f0506e]": !
|
|
3836
|
-
"cl-shadow-[inset_0_-1px_0_#1e90ff]": !
|
|
3837
|
-
"cl-shadow-[inset_0_-1px_0_#d7d7d7]":
|
|
3838
|
-
"cl-mr-4":
|
|
3843
|
+
"cl-shadow-[inset_0_-1px_0_#eeeeee]": !f.disabled && f.colour === "default",
|
|
3844
|
+
"cl-shadow-[inset_0_-1px_0_#9acd32]": !f.disabled && f.colour === "primary",
|
|
3845
|
+
"cl-shadow-[inset_0_-1px_0_#30363e]": !f.disabled && f.colour === "secondary",
|
|
3846
|
+
"cl-shadow-[inset_0_-1px_0_#f0506e]": !f.disabled && f.colour === "danger",
|
|
3847
|
+
"cl-shadow-[inset_0_-1px_0_#1e90ff]": !f.disabled && f.colour === "blue",
|
|
3848
|
+
"cl-shadow-[inset_0_-1px_0_#d7d7d7]": f.disabled,
|
|
3849
|
+
"cl-mr-4": a.value
|
|
3839
3850
|
}]),
|
|
3840
3851
|
onScrollPassive: r
|
|
3841
3852
|
}, [
|
|
3842
|
-
|
|
3853
|
+
A(f.$slots, "headings", le(re({ isTabOpen: n, disabled: f.disabled, colour: f.colour })))
|
|
3843
3854
|
], 34),
|
|
3844
|
-
|
|
3855
|
+
a.value ? (d(), h("div", {
|
|
3845
3856
|
key: 1,
|
|
3846
3857
|
class: "cl-bg-white cl-bottom-12 cl-cursor-pointer cl-float-right cl-h-11 cl-relative cl-w-4",
|
|
3847
|
-
onClick:
|
|
3858
|
+
onClick: v[1] || (v[1] = (w) => u("right"))
|
|
3848
3859
|
}, [
|
|
3849
3860
|
C(p(q), {
|
|
3850
3861
|
icon: "ph:caret-right",
|
|
@@ -3852,10 +3863,10 @@ const ja = /* @__PURE__ */ fe(Oa, [["render", Aa]]), Ma = { class: "cl-w-full" }
|
|
|
3852
3863
|
})
|
|
3853
3864
|
])) : M("", !0)
|
|
3854
3865
|
]),
|
|
3855
|
-
|
|
3866
|
+
A(f.$slots, "content", le(re({ isTabOpen: n, disabled: f.disabled, colour: f.colour })))
|
|
3856
3867
|
]));
|
|
3857
3868
|
}
|
|
3858
|
-
}),
|
|
3869
|
+
}), Nn = ["onKeyup"], qn = /* @__PURE__ */ D({
|
|
3859
3870
|
__name: "cl-ui-tab-header",
|
|
3860
3871
|
props: {
|
|
3861
3872
|
id: {},
|
|
@@ -3867,24 +3878,24 @@ const ja = /* @__PURE__ */ fe(Oa, [["render", Aa]]), Ma = { class: "cl-w-full" }
|
|
|
3867
3878
|
"update:currentTab": null
|
|
3868
3879
|
},
|
|
3869
3880
|
setup(t, { emit: o }) {
|
|
3870
|
-
const e = t, l =
|
|
3881
|
+
const e = t, l = S(), a = S(), n = O(() => e.id === e.currentTab);
|
|
3871
3882
|
function r() {
|
|
3872
|
-
e.disabled || (l.value = !1,
|
|
3883
|
+
e.disabled || (l.value = !1, a.value = !1, o("update:currentTab", e.id));
|
|
3873
3884
|
}
|
|
3874
|
-
return (s,
|
|
3885
|
+
return (s, u) => (d(), h("div", {
|
|
3875
3886
|
class: I(["cl-border-b cl-cursor-pointer cl-flex cl-items-center cl-px-4 cl-py-2 cl-rounded-b-none cl-rounded-sm cl-select-none cl-text-xl cl-transition cl-whitespace-nowrap focus:cl-outline-none", {
|
|
3876
3887
|
"!cl-cursor-default cl-text-grey-4 !cl-border-grey-2": s.disabled,
|
|
3877
|
-
"cl-border cl-border-b-0 cl-rounded-t-md cl-shadow-[inset_0_-1px_0_#ffffff] cl-cursor-default":
|
|
3888
|
+
"cl-border cl-border-b-0 cl-rounded-t-md cl-shadow-[inset_0_-1px_0_#ffffff] cl-cursor-default": n.value,
|
|
3878
3889
|
"cl-border-grey-0": s.colour === "default",
|
|
3879
3890
|
"cl-border-primary-default": s.colour === "primary",
|
|
3880
3891
|
"cl-border-secondary-default": s.colour === "secondary",
|
|
3881
3892
|
"cl-border-danger-default": s.colour === "danger",
|
|
3882
3893
|
"cl-border-link-default": s.colour === "blue",
|
|
3883
|
-
"hover:cl-bg-grey-0": !
|
|
3884
|
-
"hover:cl-bg-primary-lighter": !
|
|
3885
|
-
"hover:cl-bg-secondary-light focus:cl-text-white hover:cl-text-white": !
|
|
3886
|
-
"hover:cl-bg-danger-light": !
|
|
3887
|
-
"hover:cl-bg-link-lighter": !
|
|
3894
|
+
"hover:cl-bg-grey-0": !n.value && !s.disabled && s.colour === "default",
|
|
3895
|
+
"hover:cl-bg-primary-lighter": !n.value && !s.disabled && s.colour === "primary",
|
|
3896
|
+
"hover:cl-bg-secondary-light focus:cl-text-white hover:cl-text-white": !n.value && !s.disabled && s.colour === "secondary",
|
|
3897
|
+
"hover:cl-bg-danger-light": !n.value && !s.disabled && s.colour === "danger",
|
|
3898
|
+
"hover:cl-bg-link-lighter": !n.value && !s.disabled && s.colour === "blue",
|
|
3888
3899
|
"cl-bg-grey-0": l.value && !s.disabled && s.colour === "default",
|
|
3889
3900
|
"cl-bg-primary-lighter": l.value && !s.disabled && s.colour === "primary",
|
|
3890
3901
|
"cl-bg-secondary-light cl-text-white": l.value && !s.disabled && s.colour === "secondary",
|
|
@@ -3893,31 +3904,31 @@ const ja = /* @__PURE__ */ fe(Oa, [["render", Aa]]), Ma = { class: "cl-w-full" }
|
|
|
3893
3904
|
}]),
|
|
3894
3905
|
tabindex: "0",
|
|
3895
3906
|
onClick: r,
|
|
3896
|
-
onMouseover:
|
|
3897
|
-
onMouseout:
|
|
3898
|
-
onFocusin:
|
|
3899
|
-
onFocusout:
|
|
3900
|
-
onKeyup:
|
|
3907
|
+
onMouseover: u[0] || (u[0] = (f) => a.value = !0),
|
|
3908
|
+
onMouseout: u[1] || (u[1] = (f) => a.value = !1),
|
|
3909
|
+
onFocusin: u[2] || (u[2] = (f) => l.value = !0),
|
|
3910
|
+
onFocusout: u[3] || (u[3] = (f) => l.value = !1),
|
|
3911
|
+
onKeyup: Te(K(r, ["self"]), ["enter"])
|
|
3901
3912
|
}, [
|
|
3902
|
-
|
|
3903
|
-
], 42,
|
|
3913
|
+
A(s.$slots, "default")
|
|
3914
|
+
], 42, Nn));
|
|
3904
3915
|
}
|
|
3905
|
-
}),
|
|
3906
|
-
function
|
|
3907
|
-
return
|
|
3916
|
+
}), Dn = {};
|
|
3917
|
+
function Rn(t, o) {
|
|
3918
|
+
return A(t.$slots, "default");
|
|
3908
3919
|
}
|
|
3909
|
-
const
|
|
3920
|
+
const Un = /* @__PURE__ */ de(Dn, [["render", Rn]]), Bn = [
|
|
3910
3921
|
"default",
|
|
3911
3922
|
"primary",
|
|
3912
3923
|
"secondary",
|
|
3913
3924
|
"danger",
|
|
3914
3925
|
"blue"
|
|
3915
|
-
],
|
|
3926
|
+
], xn = [
|
|
3916
3927
|
"left",
|
|
3917
3928
|
"right"
|
|
3918
|
-
],
|
|
3929
|
+
], zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3919
3930
|
__proto__: null,
|
|
3920
|
-
FilterOperation:
|
|
3931
|
+
FilterOperation: pe,
|
|
3921
3932
|
buttonColours: Ul,
|
|
3922
3933
|
buttonSizes: Bl,
|
|
3923
3934
|
cardSizes: Ll,
|
|
@@ -3925,46 +3936,46 @@ const Ua = /* @__PURE__ */ fe(Da, [["render", Ra]]), Ba = [
|
|
|
3925
3936
|
clUiAccordionHeader: Sl,
|
|
3926
3937
|
clUiAccordionItem: kl,
|
|
3927
3938
|
clUiApp: Ml,
|
|
3928
|
-
clUiButton:
|
|
3939
|
+
clUiButton: me,
|
|
3929
3940
|
clUiCard: zl,
|
|
3930
|
-
clUiComboBox:
|
|
3931
|
-
clUiFooter:
|
|
3932
|
-
clUiGrid:
|
|
3933
|
-
clUiHeader:
|
|
3934
|
-
clUiHeaderMenu:
|
|
3935
|
-
clUiInput:
|
|
3936
|
-
clUiLanguageSwitcher:
|
|
3941
|
+
clUiComboBox: Qt,
|
|
3942
|
+
clUiFooter: ro,
|
|
3943
|
+
clUiGrid: Ra,
|
|
3944
|
+
clUiHeader: Ba,
|
|
3945
|
+
clUiHeaderMenu: Ga,
|
|
3946
|
+
clUiInput: oe,
|
|
3947
|
+
clUiLanguageSwitcher: Ya,
|
|
3937
3948
|
clUiLoadingSpinner: je,
|
|
3938
|
-
clUiLogin:
|
|
3939
|
-
clUiModal:
|
|
3940
|
-
clUiNavigation:
|
|
3941
|
-
clUiNavigationGroup:
|
|
3942
|
-
clUiNavigationIcon:
|
|
3943
|
-
clUiNavigationItem:
|
|
3944
|
-
clUiNavigationSection:
|
|
3949
|
+
clUiLogin: un,
|
|
3950
|
+
clUiModal: nl,
|
|
3951
|
+
clUiNavigation: vn,
|
|
3952
|
+
clUiNavigationGroup: wn,
|
|
3953
|
+
clUiNavigationIcon: bn,
|
|
3954
|
+
clUiNavigationItem: jn,
|
|
3955
|
+
clUiNavigationSection: Sn,
|
|
3945
3956
|
clUiNotification: al,
|
|
3946
|
-
clUiTab:
|
|
3947
|
-
clUiTabContent:
|
|
3948
|
-
clUiTabHeader:
|
|
3949
|
-
filterMethodTypes:
|
|
3950
|
-
gridColumnTypes:
|
|
3951
|
-
inputTypes:
|
|
3952
|
-
isComboBoxCreateRequest:
|
|
3953
|
-
isComboBoxItem:
|
|
3954
|
-
isFilterRequest:
|
|
3955
|
-
isFilterResponse:
|
|
3956
|
-
isGridColumn:
|
|
3957
|
-
isGridColumnArray:
|
|
3958
|
-
isLanguageArray:
|
|
3957
|
+
clUiTab: In,
|
|
3958
|
+
clUiTabContent: Un,
|
|
3959
|
+
clUiTabHeader: qn,
|
|
3960
|
+
filterMethodTypes: Ho,
|
|
3961
|
+
gridColumnTypes: Fo,
|
|
3962
|
+
inputTypes: it,
|
|
3963
|
+
isComboBoxCreateRequest: Xt,
|
|
3964
|
+
isComboBoxItem: Yt,
|
|
3965
|
+
isFilterRequest: Ko,
|
|
3966
|
+
isFilterResponse: Zo,
|
|
3967
|
+
isGridColumn: sl,
|
|
3968
|
+
isGridColumnArray: Vo,
|
|
3969
|
+
isLanguageArray: Ha,
|
|
3959
3970
|
isLanguageLocaleFormat: Be,
|
|
3960
|
-
modalColours:
|
|
3961
|
-
modalSizes:
|
|
3962
|
-
stringFormats:
|
|
3963
|
-
tabColours:
|
|
3964
|
-
tabScroll:
|
|
3971
|
+
modalColours: fn,
|
|
3972
|
+
modalSizes: dn,
|
|
3973
|
+
stringFormats: Go,
|
|
3974
|
+
tabColours: Bn,
|
|
3975
|
+
tabScroll: xn
|
|
3965
3976
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3966
|
-
const
|
|
3967
|
-
t.use(Z), t.component("Icon", q), Object.entries(
|
|
3977
|
+
const Xn = (t) => {
|
|
3978
|
+
t.use(Z), t.component("Icon", q), Object.entries(zn).forEach(([
|
|
3968
3979
|
o,
|
|
3969
3980
|
e
|
|
3970
3981
|
]) => {
|
|
@@ -3972,9 +3983,9 @@ const Xa = (t) => {
|
|
|
3972
3983
|
});
|
|
3973
3984
|
};
|
|
3974
3985
|
export {
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3986
|
+
Yn as CitrusLimeUI,
|
|
3987
|
+
G as DateFormat,
|
|
3988
|
+
pe as FilterOperation,
|
|
3978
3989
|
X as NumberFormat,
|
|
3979
3990
|
Ul as buttonColours,
|
|
3980
3991
|
Bl as buttonSizes,
|
|
@@ -3983,53 +3994,53 @@ export {
|
|
|
3983
3994
|
Sl as clUiAccordionHeader,
|
|
3984
3995
|
kl as clUiAccordionItem,
|
|
3985
3996
|
Ml as clUiApp,
|
|
3986
|
-
|
|
3997
|
+
me as clUiButton,
|
|
3987
3998
|
zl as clUiCard,
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3999
|
+
Qt as clUiComboBox,
|
|
4000
|
+
ro as clUiFooter,
|
|
4001
|
+
Ra as clUiGrid,
|
|
4002
|
+
Ba as clUiHeader,
|
|
4003
|
+
Ga as clUiHeaderMenu,
|
|
4004
|
+
oe as clUiInput,
|
|
4005
|
+
Ya as clUiLanguageSwitcher,
|
|
3995
4006
|
je as clUiLoadingSpinner,
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4007
|
+
un as clUiLogin,
|
|
4008
|
+
nl as clUiModal,
|
|
4009
|
+
vn as clUiNavigation,
|
|
4010
|
+
wn as clUiNavigationGroup,
|
|
4011
|
+
bn as clUiNavigationIcon,
|
|
4012
|
+
jn as clUiNavigationItem,
|
|
4013
|
+
Sn as clUiNavigationSection,
|
|
4003
4014
|
al as clUiNotification,
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4015
|
+
In as clUiTab,
|
|
4016
|
+
Un as clUiTabContent,
|
|
4017
|
+
qn as clUiTabHeader,
|
|
4007
4018
|
Vl as datetimeFormats,
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4019
|
+
Xn as default,
|
|
4020
|
+
Ho as filterMethodTypes,
|
|
4021
|
+
Fo as gridColumnTypes,
|
|
4011
4022
|
Z as i18n,
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4023
|
+
it as inputTypes,
|
|
4024
|
+
Xt as isComboBoxCreateRequest,
|
|
4025
|
+
Yt as isComboBoxItem,
|
|
4026
|
+
Ko as isFilterRequest,
|
|
4027
|
+
Zo as isFilterResponse,
|
|
4028
|
+
sl as isGridColumn,
|
|
4029
|
+
Vo as isGridColumnArray,
|
|
4030
|
+
Ha as isLanguageArray,
|
|
4020
4031
|
Be as isLanguageLocaleFormat,
|
|
4021
4032
|
Pl as messages,
|
|
4022
|
-
|
|
4023
|
-
|
|
4033
|
+
fn as modalColours,
|
|
4034
|
+
dn as modalSizes,
|
|
4024
4035
|
Fl as numberFormats,
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4036
|
+
Qn as setCurrentLocale,
|
|
4037
|
+
Zn as setLocaleDateTimeFormats,
|
|
4038
|
+
Jn as setLocaleMessages,
|
|
4039
|
+
Kn as setLocaleNumberFormats,
|
|
4040
|
+
Ge as showNotification,
|
|
4041
|
+
Go as stringFormats,
|
|
4042
|
+
Bn as tabColours,
|
|
4043
|
+
xn as tabScroll,
|
|
4033
4044
|
Jl as validateEmail,
|
|
4034
4045
|
Hl as validateMaxValue,
|
|
4035
4046
|
Gl as validateMinValue
|