@citruslime/ui 2.6.4 → 2.6.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/citrus-lime-ui.es.js +1017 -1002
- package/dist/citrus-lime-ui.umd.js +4 -4
- package/dist/components/grid/body/cl-ui-grid-body.vue.d.ts +1 -0
- package/dist/components/grid/cl-ui-grid.vue.d.ts +1 -9
- package/dist/components/grid/header/cl-ui-grid-filter.vue.d.ts +8 -0
- package/dist/components/grid/header/cl-ui-grid-header.vue.d.ts +8 -8
- package/dist/components/grid/header/cl-ui-grid-method-selector.vue.d.ts +8 -0
- package/dist/components/grid/types.d.ts +2 -0
- package/dist/components/grid/view-manager/cl-ui-grid-view-manager.vue.d.ts +8 -0
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Icon as x } from "@iconify/vue";
|
|
2
|
-
import { defineComponent as Q, ref as I, openBlock as
|
|
2
|
+
import { defineComponent as Q, ref as I, openBlock as p, createElementBlock as y, renderSlot as V, normalizeProps as ce, guardReactiveProps as ve, Fragment as X, createElementVNode as b, normalizeClass as M, createVNode as S, unref as v, Transition as Te, withCtx as Y, withDirectives as le, mergeProps as fe, vShow as te, createBlock as G, Teleport as ll, renderList as se, toDisplayString as q, createCommentVNode as j, nextTick as Fe, computed as R, toHandlers as Vl, withModifiers as ne, useCssVars as Ll, vModelText as Pl, onMounted as Ze, watch as oe, vModelDynamic as Ul, toRefs as Bl, withKeys as Ee, onUnmounted as tl, resolveComponent as Tl, createTextVNode as de, watchEffect as zl, createSlots as al, normalizeStyle as _l } from "vue";
|
|
3
3
|
import { generateStringId as xl, highlightText as Hl } from "@citruslime/utils";
|
|
4
|
-
import { useMediaQuery as Gl, useDebounceFn as
|
|
5
|
-
import { createI18n as Wl, useI18n as
|
|
4
|
+
import { useMediaQuery as Gl, useDebounceFn as ol, unrefElement as Zl, tryOnScopeDispose as Kl, onClickOutside as nl, useTimeoutFn as $l, useWindowSize as Ql } from "@vueuse/core";
|
|
5
|
+
import { createI18n as Wl, useI18n as ie } from "vue-i18n";
|
|
6
6
|
import { DateTime as H } from "luxon";
|
|
7
7
|
import { DatePicker as We } from "v-calendar";
|
|
8
8
|
import { copy as ge } from "@citruslime/vue-utils";
|
|
@@ -26,8 +26,8 @@ const Yl = { class: "cl-overflow-hidden" }, Jl = /* @__PURE__ */ Q({
|
|
|
26
26
|
o.id !== c && (o.open = !1);
|
|
27
27
|
}), r.open = !r.open);
|
|
28
28
|
}
|
|
29
|
-
return (c, r) => (
|
|
30
|
-
|
|
29
|
+
return (c, r) => (p(), y("div", Yl, [
|
|
30
|
+
V(c.$slots, "default", ce(ve({ isItemOpen: t, toggleItem: n })))
|
|
31
31
|
]));
|
|
32
32
|
}
|
|
33
33
|
}), Xl = { class: "cl-absolute cl-left-5 cl-top-5" }, et = { class: "cl-font-semibold cl-ml-10 cl-p-4 cl-select-none cl-text-grey-5" }, lt = { class: "cl-overflow-hidden" }, tt = /* @__PURE__ */ Q({
|
|
@@ -45,9 +45,9 @@ const Yl = { class: "cl-overflow-hidden" }, Jl = /* @__PURE__ */ Q({
|
|
|
45
45
|
function t() {
|
|
46
46
|
l.disabled || e("toggle");
|
|
47
47
|
}
|
|
48
|
-
return (n, c) => (
|
|
48
|
+
return (n, c) => (p(), y(X, null, [
|
|
49
49
|
b("div", {
|
|
50
|
-
class:
|
|
50
|
+
class: M(["cl-border-b cl-border-grey-1 cl-relative", {
|
|
51
51
|
"cl-bg-grey-0": n.disabled,
|
|
52
52
|
"cl-cursor-pointer": !n.disabled
|
|
53
53
|
}]),
|
|
@@ -55,7 +55,7 @@ const Yl = { class: "cl-overflow-hidden" }, Jl = /* @__PURE__ */ Q({
|
|
|
55
55
|
}, [
|
|
56
56
|
b("div", Xl, [
|
|
57
57
|
S(v(x), {
|
|
58
|
-
class:
|
|
58
|
+
class: M(["cl-duration-300 cl-ease-in-out cl-text-grey-3 cl-transform-gpu cl-transition-transform", {
|
|
59
59
|
"cl-rotate-180": n.open
|
|
60
60
|
}]),
|
|
61
61
|
icon: "ph:caret-down-bold",
|
|
@@ -63,14 +63,14 @@ const Yl = { class: "cl-overflow-hidden" }, Jl = /* @__PURE__ */ Q({
|
|
|
63
63
|
}, null, 8, ["class"])
|
|
64
64
|
]),
|
|
65
65
|
b("div", et, [
|
|
66
|
-
|
|
66
|
+
V(n.$slots, "title")
|
|
67
67
|
])
|
|
68
68
|
], 2),
|
|
69
69
|
b("div", lt, [
|
|
70
70
|
S(Te, { name: "grow-down" }, {
|
|
71
71
|
default: Y(() => [
|
|
72
|
-
le(b("div",
|
|
73
|
-
|
|
72
|
+
le(b("div", fe(n.$attrs, { class: "cl-ml-10 cl-p-4" }), [
|
|
73
|
+
V(n.$slots, "default")
|
|
74
74
|
], 16), [
|
|
75
75
|
[te, n.open]
|
|
76
76
|
])
|
|
@@ -80,19 +80,19 @@ const Yl = { class: "cl-overflow-hidden" }, Jl = /* @__PURE__ */ Q({
|
|
|
80
80
|
])
|
|
81
81
|
], 64));
|
|
82
82
|
}
|
|
83
|
-
}),
|
|
83
|
+
}), ke = (a, e) => {
|
|
84
84
|
const l = a.__vccOpts || a;
|
|
85
85
|
for (const [t, n] of e)
|
|
86
86
|
l[t] = n;
|
|
87
87
|
return l;
|
|
88
88
|
}, at = {}, ot = { class: "cl-border-b cl-border-grey-1 cl-font-semibold cl-pl-14 cl-pr-4 cl-py-2 cl-text-grey-3 cl-text-sm" };
|
|
89
89
|
function nt(a, e) {
|
|
90
|
-
return
|
|
91
|
-
|
|
90
|
+
return p(), y("div", ot, [
|
|
91
|
+
V(a.$slots, "default")
|
|
92
92
|
]);
|
|
93
93
|
}
|
|
94
|
-
const rt = /* @__PURE__ */
|
|
95
|
-
function
|
|
94
|
+
const rt = /* @__PURE__ */ ke(at, [["render", nt]]), Pe = I([]);
|
|
95
|
+
function sl(a) {
|
|
96
96
|
const e = {
|
|
97
97
|
id: xl(),
|
|
98
98
|
...a
|
|
@@ -110,9 +110,9 @@ const st = ["onClick"], it = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
110
110
|
position: { default: "top-right" }
|
|
111
111
|
},
|
|
112
112
|
setup(a) {
|
|
113
|
-
return (e, l) => (
|
|
113
|
+
return (e, l) => (p(), G(ll, { to: e.container }, [
|
|
114
114
|
b("div", {
|
|
115
|
-
class:
|
|
115
|
+
class: M(["cl-fixed cl-w-80 cl-z-50", {
|
|
116
116
|
"cl-top-5 cl-left-5": e.position === "top-left",
|
|
117
117
|
"cl-top-5 cl-left-1/2": e.position === "top-centre",
|
|
118
118
|
"cl-top-5 cl-right-5": e.position === "top-right",
|
|
@@ -121,7 +121,7 @@ const st = ["onClick"], it = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
121
121
|
"cl-bottom-5 cl-right-5": e.position === "bottom-right"
|
|
122
122
|
}])
|
|
123
123
|
}, [
|
|
124
|
-
(
|
|
124
|
+
(p(!0), y(X, null, se(v(Pe), (t, n) => (p(), y("div", fe(e.$attrs, {
|
|
125
125
|
key: n,
|
|
126
126
|
class: ["cl-break-words cl-cursor-pointer cl-flex cl-font-semibold cl-group cl-mb-2 cl-overflow-hidden cl-p-4 cl-rounded cl-shadow-lg cl-text-sm", {
|
|
127
127
|
"cl-bg-white": t.colour === "default",
|
|
@@ -132,7 +132,7 @@ const st = ["onClick"], it = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
132
132
|
}],
|
|
133
133
|
onClick: (c) => v(Cl)(t)
|
|
134
134
|
}), [
|
|
135
|
-
b("span", it,
|
|
135
|
+
b("span", it, q(t.message), 1),
|
|
136
136
|
S(v(x), {
|
|
137
137
|
class: "cl-inline-block cl-opacity-0 cl-transition-opacity group-hover:cl-opacity-100",
|
|
138
138
|
icon: "ph:x",
|
|
@@ -149,27 +149,27 @@ const st = ["onClick"], it = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
149
149
|
removePadding: { type: Boolean, default: !1 }
|
|
150
150
|
},
|
|
151
151
|
setup(a) {
|
|
152
|
-
return (e, l) => (
|
|
152
|
+
return (e, l) => (p(), y(X, null, [
|
|
153
153
|
S(Ol, {
|
|
154
|
-
class:
|
|
154
|
+
class: M({
|
|
155
155
|
"first:cl-mt-[4.25rem]": e.$slots.header
|
|
156
156
|
})
|
|
157
157
|
}, null, 8, ["class"]),
|
|
158
158
|
b("div", ct, [
|
|
159
|
-
|
|
159
|
+
V(e.$slots, "header"),
|
|
160
160
|
b("div", {
|
|
161
|
-
class:
|
|
161
|
+
class: M(["cl-content-start cl-flex cl-flex-nowrap cl-items-stretch cl-max-h-full cl-relative cl-w-full xl:cl-max-h-screen", {
|
|
162
162
|
"cl-pt-20": e.$slots.header
|
|
163
163
|
}])
|
|
164
164
|
}, [
|
|
165
|
-
|
|
165
|
+
V(e.$slots, "navigation"),
|
|
166
166
|
b("div", {
|
|
167
|
-
class:
|
|
167
|
+
class: M(["cl-grow cl-max-h-full cl-overflow-x-hidden cl-overflow-y-auto cl-overscroll-y-none cl-w-auto", {
|
|
168
168
|
"lg:cl-pb-0": e.removePadding,
|
|
169
169
|
"lg:cl-pb-8 md:cl-px-8 cl-px-2 md:cl-pt-8 cl-pt-2": !e.removePadding
|
|
170
170
|
}])
|
|
171
171
|
}, [
|
|
172
|
-
|
|
172
|
+
V(e.$slots, "default")
|
|
173
173
|
], 2)
|
|
174
174
|
], 2)
|
|
175
175
|
])
|
|
@@ -178,9 +178,9 @@ const st = ["onClick"], it = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
178
178
|
});
|
|
179
179
|
const dt = {}, ft = { class: "loading-spinner" };
|
|
180
180
|
function pt(a, e) {
|
|
181
|
-
return
|
|
181
|
+
return p(), y("div", ft);
|
|
182
182
|
}
|
|
183
|
-
const Ke = /* @__PURE__ */
|
|
183
|
+
const Ke = /* @__PURE__ */ ke(dt, [["render", pt], ["__scopeId", "data-v-a21dc5d2"]]), mt = ["disabled"], be = /* @__PURE__ */ Q({
|
|
184
184
|
inheritAttrs: !1,
|
|
185
185
|
__name: "cl-ui-button",
|
|
186
186
|
props: {
|
|
@@ -195,11 +195,11 @@ const Ke = /* @__PURE__ */ we(dt, [["render", pt], ["__scopeId", "data-v-a21dc5d
|
|
|
195
195
|
focus() {
|
|
196
196
|
l.value && l.value.focus();
|
|
197
197
|
}
|
|
198
|
-
}), (t, n) => (
|
|
198
|
+
}), (t, n) => (p(), y(X, null, [
|
|
199
199
|
le(S(Ke, { class: "relative" }, null, 512), [
|
|
200
200
|
[te, t.loading]
|
|
201
201
|
]),
|
|
202
|
-
le(b("button",
|
|
202
|
+
le(b("button", fe(t.$attrs, {
|
|
203
203
|
ref_key: "buttonRef",
|
|
204
204
|
ref: l,
|
|
205
205
|
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", {
|
|
@@ -216,7 +216,7 @@ const Ke = /* @__PURE__ */ we(dt, [["render", pt], ["__scopeId", "data-v-a21dc5d
|
|
|
216
216
|
}],
|
|
217
217
|
disabled: t.disabled
|
|
218
218
|
}), [
|
|
219
|
-
|
|
219
|
+
V(t.$slots, "default")
|
|
220
220
|
], 16, mt), [
|
|
221
221
|
[te, !t.loading]
|
|
222
222
|
])
|
|
@@ -240,44 +240,44 @@ const Ke = /* @__PURE__ */ we(dt, [["render", pt], ["__scopeId", "data-v-a21dc5d
|
|
|
240
240
|
hover: { type: Boolean, default: !1 }
|
|
241
241
|
},
|
|
242
242
|
setup(a) {
|
|
243
|
-
return (e, l) => (
|
|
244
|
-
class:
|
|
243
|
+
return (e, l) => (p(), y("div", {
|
|
244
|
+
class: M(["cl-border cl-border-transparent cl-overflow-hidden cl-relative cl-rounded-md cl-shadow-lg cl-transition-all", {
|
|
245
245
|
"cl-cursor-pointer hover:cl-shadow-xl hover:cl-border-grey-0": e.hover
|
|
246
246
|
}])
|
|
247
247
|
}, [
|
|
248
|
-
e.$slots.image ? (
|
|
249
|
-
|
|
248
|
+
e.$slots.image ? (p(), y("div", bt, [
|
|
249
|
+
V(e.$slots, "image")
|
|
250
250
|
])) : j("", !0),
|
|
251
|
-
e.$slots.title ? (
|
|
251
|
+
e.$slots.title ? (p(), y("div", {
|
|
252
252
|
key: 1,
|
|
253
|
-
class:
|
|
253
|
+
class: M(["cl-border-grey-2 cl-font-normal", {
|
|
254
254
|
"cl-p-2 cl-text-2xl cl-leading-8": e.size === "small",
|
|
255
255
|
"cl-p-4 cl-text-3xl cl-leading-9": e.size === "medium",
|
|
256
256
|
"cl-p-6 cl-text-4xl cl-leading-10": e.size === "large",
|
|
257
257
|
"cl-border-t": e.$slots.image
|
|
258
258
|
}])
|
|
259
259
|
}, [
|
|
260
|
-
|
|
260
|
+
V(e.$slots, "title")
|
|
261
261
|
], 2)) : j("", !0),
|
|
262
262
|
b("div", {
|
|
263
|
-
class:
|
|
263
|
+
class: M(["cl-border-grey-2", {
|
|
264
264
|
"cl-p-2": e.size === "small",
|
|
265
265
|
"cl-p-4": e.size === "medium",
|
|
266
266
|
"cl-p-6": e.size === "large",
|
|
267
267
|
"cl-border-t": e.$slots.image || e.$slots.title
|
|
268
268
|
}])
|
|
269
269
|
}, [
|
|
270
|
-
|
|
270
|
+
V(e.$slots, "default")
|
|
271
271
|
], 2),
|
|
272
|
-
e.$slots.footer ? (
|
|
272
|
+
e.$slots.footer ? (p(), y("div", {
|
|
273
273
|
key: 2,
|
|
274
|
-
class:
|
|
274
|
+
class: M(["cl-border-grey-2 cl-border-t", {
|
|
275
275
|
"cl-p-2": e.size === "small",
|
|
276
276
|
"cl-p-4": e.size === "medium",
|
|
277
277
|
"cl-p-6": e.size === "large"
|
|
278
278
|
}])
|
|
279
279
|
}, [
|
|
280
|
-
|
|
280
|
+
V(e.$slots, "footer")
|
|
281
281
|
], 2)) : j("", !0)
|
|
282
282
|
], 2));
|
|
283
283
|
}
|
|
@@ -286,7 +286,7 @@ const Ke = /* @__PURE__ */ we(dt, [["render", pt], ["__scopeId", "data-v-a21dc5d
|
|
|
286
286
|
"medium",
|
|
287
287
|
"large"
|
|
288
288
|
];
|
|
289
|
-
var ue = /* @__PURE__ */ ((a) => (a.CURRENCY = "currency", a.PERCENTAGE = "percentage", a.INTEGER = "integer", a.DECIMAL = "decimal", a.MULTIPLIER = "multiplier", a))(ue || {}),
|
|
289
|
+
var ue = /* @__PURE__ */ ((a) => (a.CURRENCY = "currency", a.PERCENTAGE = "percentage", a.INTEGER = "integer", a.DECIMAL = "decimal", a.MULTIPLIER = "multiplier", a))(ue || {}), re = /* @__PURE__ */ ((a) => (a.SHORT_DATE = "short-date", a.SHORT_DATETIME = "short-datetime", a.DATE = "date", a.DATETIME = "datetime", a.LONG_DATE = "long-date", a.LONG_DATETIME = "long-datetime", a.TIME = "time", a.MONTH_YEAR = "month-year", a))(re || {});
|
|
290
290
|
const wt = {
|
|
291
291
|
"en-GB": {
|
|
292
292
|
comboBox: {
|
|
@@ -404,52 +404,52 @@ const wt = {
|
|
|
404
404
|
}
|
|
405
405
|
}, Tt = {
|
|
406
406
|
"en-GB": {
|
|
407
|
-
[
|
|
407
|
+
[re.SHORT_DATE]: {
|
|
408
408
|
day: "numeric",
|
|
409
409
|
month: "numeric",
|
|
410
410
|
year: "2-digit"
|
|
411
411
|
},
|
|
412
|
-
[
|
|
412
|
+
[re.SHORT_DATETIME]: {
|
|
413
413
|
day: "numeric",
|
|
414
414
|
month: "numeric",
|
|
415
415
|
year: "2-digit",
|
|
416
416
|
hour: "numeric",
|
|
417
417
|
minute: "numeric"
|
|
418
418
|
},
|
|
419
|
-
[
|
|
419
|
+
[re.DATE]: {
|
|
420
420
|
day: "numeric",
|
|
421
421
|
month: "numeric",
|
|
422
422
|
year: "numeric"
|
|
423
423
|
},
|
|
424
|
-
[
|
|
424
|
+
[re.DATETIME]: {
|
|
425
425
|
day: "numeric",
|
|
426
426
|
month: "numeric",
|
|
427
427
|
year: "numeric",
|
|
428
428
|
hour: "numeric",
|
|
429
429
|
minute: "numeric"
|
|
430
430
|
},
|
|
431
|
-
[
|
|
431
|
+
[re.LONG_DATE]: {
|
|
432
432
|
day: "numeric",
|
|
433
433
|
month: "long",
|
|
434
434
|
year: "numeric"
|
|
435
435
|
},
|
|
436
|
-
[
|
|
436
|
+
[re.LONG_DATETIME]: {
|
|
437
437
|
day: "numeric",
|
|
438
438
|
month: "long",
|
|
439
439
|
year: "numeric",
|
|
440
440
|
hour: "numeric",
|
|
441
441
|
minute: "numeric"
|
|
442
442
|
},
|
|
443
|
-
[
|
|
443
|
+
[re.TIME]: {
|
|
444
444
|
hour: "numeric",
|
|
445
445
|
minute: "numeric"
|
|
446
446
|
},
|
|
447
|
-
[
|
|
447
|
+
[re.MONTH_YEAR]: {
|
|
448
448
|
month: "long",
|
|
449
449
|
year: "numeric"
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
|
-
},
|
|
452
|
+
}, we = Wl({
|
|
453
453
|
locale: "en-GB",
|
|
454
454
|
fallbackLocale: "en-GB",
|
|
455
455
|
messages: wt,
|
|
@@ -460,19 +460,19 @@ const wt = {
|
|
|
460
460
|
fallbackWarn: !1,
|
|
461
461
|
warnHtmlMessage: !1
|
|
462
462
|
});
|
|
463
|
-
function
|
|
464
|
-
return
|
|
463
|
+
function ps(a, e) {
|
|
464
|
+
return we.global.mergeLocaleMessage(a, e), Fe();
|
|
465
465
|
}
|
|
466
|
-
function
|
|
467
|
-
return
|
|
466
|
+
function ms(a, e) {
|
|
467
|
+
return we.global.mergeNumberFormat(a, e), Fe();
|
|
468
468
|
}
|
|
469
|
-
function
|
|
470
|
-
return
|
|
469
|
+
function vs(a, e) {
|
|
470
|
+
return we.global.mergeDateTimeFormat(a, e), Fe();
|
|
471
471
|
}
|
|
472
|
-
function
|
|
473
|
-
return
|
|
472
|
+
function gs(a) {
|
|
473
|
+
return we.global.locale.value = a, Fe();
|
|
474
474
|
}
|
|
475
|
-
const { t:
|
|
475
|
+
const { t: he } = we.global;
|
|
476
476
|
function $t(a, e, l, t, n) {
|
|
477
477
|
return new Promise((c) => {
|
|
478
478
|
let r = {
|
|
@@ -488,20 +488,20 @@ function $t(a, e, l, t, n) {
|
|
|
488
488
|
case "tel":
|
|
489
489
|
case "text":
|
|
490
490
|
case "url":
|
|
491
|
-
o = ((t == null ? void 0 : t.length) ?? 0) >= (Number(a) || 0), r =
|
|
491
|
+
o = ((t == null ? void 0 : t.length) ?? 0) >= (Number(a) || 0), r = ye(o, he("input.greaterOrEqualToCharacters", { label: l, min: a.toString() }));
|
|
492
492
|
break;
|
|
493
493
|
case "number":
|
|
494
494
|
case "range":
|
|
495
|
-
o = t >= (Number(a) || 0), r =
|
|
495
|
+
o = t >= (Number(a) || 0), r = ye(o, he("input.greaterOrEqualToValue", { label: l, min: a.toString() }));
|
|
496
496
|
break;
|
|
497
497
|
case "date":
|
|
498
498
|
n ? (s = H.fromISO(t).setZone(n), i = H.fromISO(a).setZone(n)) : (s = H.fromISO(t, {
|
|
499
499
|
zone: "UTC"
|
|
500
500
|
}), i = H.fromISO(a, {
|
|
501
501
|
zone: "UTC"
|
|
502
|
-
})), o = s >= i, r =
|
|
502
|
+
})), o = s >= i, r = ye(o, he("input.afterOrEqualToValue", {
|
|
503
503
|
label: l,
|
|
504
|
-
min: i.setLocale(
|
|
504
|
+
min: i.setLocale(we.global.locale.value).toFormat("D")
|
|
505
505
|
}));
|
|
506
506
|
break;
|
|
507
507
|
case "datetime":
|
|
@@ -509,9 +509,9 @@ function $t(a, e, l, t, n) {
|
|
|
509
509
|
zone: "UTC"
|
|
510
510
|
}), i = H.fromISO(a, {
|
|
511
511
|
zone: "UTC"
|
|
512
|
-
})), o = s >= i, n && (i = i.setZone(n)), r =
|
|
512
|
+
})), o = s >= i, n && (i = i.setZone(n)), r = ye(o, he("input.afterOrEqualToValue", {
|
|
513
513
|
label: l,
|
|
514
|
-
min: i.setLocale(
|
|
514
|
+
min: i.setLocale(we.global.locale.value).toFormat("f")
|
|
515
515
|
}));
|
|
516
516
|
break;
|
|
517
517
|
default:
|
|
@@ -537,20 +537,20 @@ function Ct(a, e, l, t, n) {
|
|
|
537
537
|
case "tel":
|
|
538
538
|
case "text":
|
|
539
539
|
case "url":
|
|
540
|
-
o = ((t == null ? void 0 : t.length) ?? 0) <= (Number(a) || 0), r =
|
|
540
|
+
o = ((t == null ? void 0 : t.length) ?? 0) <= (Number(a) || 0), r = ye(o, he("input.lessOrEqualToCharacters", { label: l, max: a.toString() }));
|
|
541
541
|
break;
|
|
542
542
|
case "number":
|
|
543
543
|
case "range":
|
|
544
|
-
o = t <= (Number(a) || 0), r =
|
|
544
|
+
o = t <= (Number(a) || 0), r = ye(o, he("input.lessOrEqualToValue", { label: l, max: a.toString() }));
|
|
545
545
|
break;
|
|
546
546
|
case "date":
|
|
547
547
|
n ? (s = H.fromISO(t).setZone(n), i = H.fromISO(a).setZone(n)) : (s = H.fromISO(t, {
|
|
548
548
|
zone: "UTC"
|
|
549
549
|
}), i = H.fromISO(a, {
|
|
550
550
|
zone: "UTC"
|
|
551
|
-
})), o = s <= i, r =
|
|
551
|
+
})), o = s <= i, r = ye(o, he("input.beforeOrEqualToValue", {
|
|
552
552
|
label: l,
|
|
553
|
-
max: i.setLocale(
|
|
553
|
+
max: i.setLocale(we.global.locale.value).toFormat("D")
|
|
554
554
|
}));
|
|
555
555
|
break;
|
|
556
556
|
case "datetime":
|
|
@@ -558,9 +558,9 @@ function Ct(a, e, l, t, n) {
|
|
|
558
558
|
zone: "UTC"
|
|
559
559
|
}), i = H.fromISO(a, {
|
|
560
560
|
zone: "UTC"
|
|
561
|
-
})), o = s <= i, r =
|
|
561
|
+
})), o = s <= i, r = ye(o, he("input.beforeOrEqualToValue", {
|
|
562
562
|
label: l,
|
|
563
|
-
max: i.setLocale(
|
|
563
|
+
max: i.setLocale(we.global.locale.value).toFormat("f")
|
|
564
564
|
}));
|
|
565
565
|
break;
|
|
566
566
|
default:
|
|
@@ -573,17 +573,17 @@ function Ct(a, e, l, t, n) {
|
|
|
573
573
|
}
|
|
574
574
|
function Ot(a, e) {
|
|
575
575
|
return new Promise((l) => {
|
|
576
|
-
const t = e != null && e !== "" && e.toString().trim() !== "", n =
|
|
576
|
+
const t = e != null && e !== "" && e.toString().trim() !== "", n = ye(t, he("input.valueIsRequired", { label: a }));
|
|
577
577
|
l(n);
|
|
578
578
|
});
|
|
579
579
|
}
|
|
580
580
|
function St(a, e) {
|
|
581
581
|
return new Promise((l) => {
|
|
582
|
-
const n = e === "" || /[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(e) !== null, c =
|
|
582
|
+
const n = e === "" || /[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(e) !== null, c = ye(n, he("input.valueNotValidEmail", { label: a }));
|
|
583
583
|
l(c);
|
|
584
584
|
});
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function ye(a, e) {
|
|
587
587
|
return {
|
|
588
588
|
valid: a,
|
|
589
589
|
message: a ? "" : e
|
|
@@ -591,14 +591,14 @@ function he(a, e) {
|
|
|
591
591
|
}
|
|
592
592
|
const Nt = {
|
|
593
593
|
key: 0,
|
|
594
|
-
class: "!cl-h-10 cl-border cl-border-grey-1 cl-
|
|
594
|
+
class: "!cl-h-10 cl-border cl-border-grey-1 cl-flex cl-flex-nowrap cl-flex-row cl-overflow-hidden cl-rounded-sm"
|
|
595
595
|
}, Et = {
|
|
596
596
|
key: 1,
|
|
597
597
|
class: "cl-relative"
|
|
598
|
-
},
|
|
598
|
+
}, At = ["value", "disabled", "placeholder"], qt = {
|
|
599
599
|
key: 0,
|
|
600
600
|
class: "action-icon cl-absolute cl-bg-transparent cl-flex cl-right-2 cl-text-grey-4 cl-top-3.5"
|
|
601
|
-
},
|
|
601
|
+
}, Rt = /* @__PURE__ */ Q({
|
|
602
602
|
__name: "cl-ui-calendar-input",
|
|
603
603
|
props: {
|
|
604
604
|
date: {},
|
|
@@ -616,7 +616,7 @@ const Nt = {
|
|
|
616
616
|
var o;
|
|
617
617
|
(o = t.value) == null || o.focus();
|
|
618
618
|
}
|
|
619
|
-
const { t: c } =
|
|
619
|
+
const { t: c } = ie(), r = R(() => {
|
|
620
620
|
let o = "";
|
|
621
621
|
switch (l.type) {
|
|
622
622
|
case "date":
|
|
@@ -633,81 +633,78 @@ const Nt = {
|
|
|
633
633
|
});
|
|
634
634
|
return e({
|
|
635
635
|
focus: n
|
|
636
|
-
}), (o, s) =>
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
}])
|
|
651
|
-
}, null, 8, ["class"])
|
|
652
|
-
]),
|
|
653
|
-
_: 1
|
|
654
|
-
}, 8, ["disabled"]),
|
|
655
|
-
o.required ? j("", !0) : (f(), G(i, {
|
|
656
|
-
key: 0,
|
|
657
|
-
size: "small",
|
|
658
|
-
class: "cl-border-transparent cl-flex cl-items-center cl-justify-center",
|
|
659
|
-
disabled: o.disabled,
|
|
660
|
-
onClick: s[1] || (s[1] = (m) => o.$emit("clear"))
|
|
661
|
-
}, {
|
|
662
|
-
default: Y(() => [
|
|
663
|
-
S(v(x), {
|
|
664
|
-
icon: "ph:x",
|
|
665
|
-
class: F(["clear-icon", {
|
|
666
|
-
"cl-text-grey-4": !o.rangeSelected,
|
|
667
|
-
"cl-text-danger-default": o.rangeSelected
|
|
668
|
-
}])
|
|
669
|
-
}, null, 8, ["class"])
|
|
670
|
-
]),
|
|
671
|
-
_: 1
|
|
672
|
-
}, 8, ["disabled"]))
|
|
673
|
-
])) : (f(), y("div", Et, [
|
|
674
|
-
b("input", ve({
|
|
675
|
-
ref_key: "element",
|
|
676
|
-
ref: t
|
|
677
|
-
}, o.$attrs, {
|
|
678
|
-
value: o.date,
|
|
679
|
-
type: "text",
|
|
680
|
-
disabled: o.disabled,
|
|
681
|
-
placeholder: r.value
|
|
682
|
-
}, Ml(o.events, !0)), null, 16, qt),
|
|
683
|
-
le(S(v(x), {
|
|
684
|
-
class: F(["cl-absolute cl-bg-transparent cl-cursor-text cl-left-2 cl-text-grey-4 cl-top-3.5 icon", {
|
|
685
|
-
"!cl-bg-off-white": o.disabled
|
|
686
|
-
}]),
|
|
687
|
-
icon: o.type === "time" ? "ph-clock" : "ph:calendar",
|
|
688
|
-
onClick: n
|
|
689
|
-
}, null, 8, ["class", "icon"]), [
|
|
690
|
-
[te, !o.disabled]
|
|
636
|
+
}), (o, s) => o.type === "dateRange" ? (p(), y("div", Nt, [
|
|
637
|
+
S(be, {
|
|
638
|
+
class: M(["cl-basis-full cl-border-transparent cl-col-span-4 cl-flex cl-items-center cl-justify-center hover:cl-border-transparent", {
|
|
639
|
+
"cl-text-grey-4 hover:cl-text-grey-3": !o.rangeSelected,
|
|
640
|
+
"cl-text-primary-darker hover:cl-text-primary-dark": o.rangeSelected
|
|
641
|
+
}]),
|
|
642
|
+
disabled: o.disabled,
|
|
643
|
+
onClick: s[0] || (s[0] = (i) => o.$emit("togglePopover"))
|
|
644
|
+
}, {
|
|
645
|
+
default: Y(() => [
|
|
646
|
+
S(v(x), {
|
|
647
|
+
icon: "bi:calendar3",
|
|
648
|
+
class: "cl-text-xl icon"
|
|
649
|
+
})
|
|
691
650
|
]),
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
651
|
+
_: 1
|
|
652
|
+
}, 8, ["disabled", "class"]),
|
|
653
|
+
o.required ? j("", !0) : (p(), G(be, {
|
|
654
|
+
key: 0,
|
|
655
|
+
size: "small",
|
|
656
|
+
class: M(["cl-basis-0 cl-border-transparent cl-flex cl-items-center cl-justify-center hover:cl-border-transparent", {
|
|
657
|
+
"cl-text-grey-4 hover:cl-text-grey-3": !o.rangeSelected,
|
|
658
|
+
"cl-text-danger-dark hover:cl-text-danger-default": o.rangeSelected
|
|
659
|
+
}]),
|
|
660
|
+
disabled: o.disabled,
|
|
661
|
+
onClick: s[1] || (s[1] = (i) => o.$emit("clear"))
|
|
662
|
+
}, {
|
|
663
|
+
default: Y(() => [
|
|
664
|
+
S(v(x), {
|
|
702
665
|
icon: "ph:x",
|
|
703
|
-
|
|
704
|
-
})
|
|
705
|
-
])
|
|
706
|
-
|
|
707
|
-
|
|
666
|
+
class: "clear-icon"
|
|
667
|
+
})
|
|
668
|
+
]),
|
|
669
|
+
_: 1
|
|
670
|
+
}, 8, ["disabled", "class"]))
|
|
671
|
+
])) : (p(), y("div", Et, [
|
|
672
|
+
b("input", fe({
|
|
673
|
+
ref_key: "element",
|
|
674
|
+
ref: t
|
|
675
|
+
}, o.$attrs, {
|
|
676
|
+
value: o.date,
|
|
677
|
+
type: "text",
|
|
678
|
+
disabled: o.disabled,
|
|
679
|
+
placeholder: r.value
|
|
680
|
+
}, Vl(o.events, !0)), null, 16, At),
|
|
681
|
+
le(S(v(x), {
|
|
682
|
+
class: M(["cl-absolute cl-bg-transparent cl-cursor-text cl-left-2 cl-text-grey-4 cl-top-3.5 icon", {
|
|
683
|
+
"!cl-bg-off-white": o.disabled
|
|
684
|
+
}]),
|
|
685
|
+
icon: o.type === "time" ? "ph-clock" : "ph:calendar",
|
|
686
|
+
onClick: n
|
|
687
|
+
}, null, 8, ["class", "icon"]), [
|
|
688
|
+
[te, !o.disabled]
|
|
689
|
+
]),
|
|
690
|
+
o.disabled ? j("", !0) : (p(), y("div", qt, [
|
|
691
|
+
o.type !== "time" ? (p(), G(v(x), {
|
|
692
|
+
key: 0,
|
|
693
|
+
class: "cl-cursor-pointer hover:cl-text-link-light",
|
|
694
|
+
icon: "ph:arrow-counter-clockwise",
|
|
695
|
+
onClick: s[2] || (s[2] = ne((i) => o.$emit("reset"), ["prevent"]))
|
|
696
|
+
})) : j("", !0),
|
|
697
|
+
!o.required && o.date && (o.type !== "time" || o.date !== "00:00") ? (p(), G(v(x), {
|
|
698
|
+
key: 1,
|
|
699
|
+
class: "cl-cursor-pointer clear-icon hover:cl-text-link-light md:cl-ml-0.5",
|
|
700
|
+
icon: "ph:x",
|
|
701
|
+
onClick: s[3] || (s[3] = ne((i) => o.$emit("clear"), ["prevent"]))
|
|
702
|
+
})) : j("", !0)
|
|
703
|
+
]))
|
|
704
|
+
]));
|
|
708
705
|
}
|
|
709
706
|
});
|
|
710
|
-
const Ye = /* @__PURE__ */
|
|
707
|
+
const Ye = /* @__PURE__ */ ke(Rt, [["__scopeId", "data-v-905eee52"]]), Dt = { class: "cl-gap-1 cl-grid cl-grid-cols-2" }, It = ["onClick"], jt = /* @__PURE__ */ Q({
|
|
711
708
|
__name: "cl-ui-quick-dates-group",
|
|
712
709
|
props: {
|
|
713
710
|
dates: {},
|
|
@@ -715,24 +712,24 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
715
712
|
},
|
|
716
713
|
emits: ["quick-date-selected"],
|
|
717
714
|
setup(a, { emit: e }) {
|
|
718
|
-
const { t: l } =
|
|
719
|
-
return (t, n) => (
|
|
720
|
-
(
|
|
715
|
+
const { t: l } = ie();
|
|
716
|
+
return (t, n) => (p(), y("div", Dt, [
|
|
717
|
+
(p(!0), y(X, null, se(t.dates, (c, r) => {
|
|
721
718
|
var o, s;
|
|
722
|
-
return
|
|
719
|
+
return p(), y("button", {
|
|
723
720
|
key: r,
|
|
724
|
-
class:
|
|
721
|
+
class: M(["cl-border cl-cursor-pointer cl-py-1 cl-rounded-md cl-text-center", {
|
|
725
722
|
"cl-bg-primary-lighter cl-bg-opacity-30 cl-border-primary-default cl-font-bold hover:cl-border-primary-darker": ((o = t.selectedQuickDate) == null ? void 0 : o.name) === c.name,
|
|
726
723
|
"cl-border-grey-2 hover:cl-border-grey-3 hover:cl-opacity-95 cl-opacity-60": ((s = t.selectedQuickDate) == null ? void 0 : s.name) !== c.name
|
|
727
724
|
}]),
|
|
728
725
|
onClick: (i) => e("quick-date-selected", c)
|
|
729
726
|
}, [
|
|
730
|
-
b("span", null,
|
|
727
|
+
b("span", null, q(v(l)(c.translationKey)), 1)
|
|
731
728
|
], 10, It);
|
|
732
729
|
}), 128))
|
|
733
730
|
]));
|
|
734
731
|
}
|
|
735
|
-
}),
|
|
732
|
+
}), Ft = [
|
|
736
733
|
"today",
|
|
737
734
|
"this week",
|
|
738
735
|
"this month",
|
|
@@ -770,7 +767,7 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
770
767
|
translationKey: "quickDates.thisYear",
|
|
771
768
|
range: "year"
|
|
772
769
|
}
|
|
773
|
-
],
|
|
770
|
+
], Ue = [
|
|
774
771
|
{
|
|
775
772
|
name: "yesterday",
|
|
776
773
|
scope: "past",
|
|
@@ -821,13 +818,13 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
821
818
|
range: "year"
|
|
822
819
|
}
|
|
823
820
|
], Sl = [
|
|
824
|
-
...
|
|
821
|
+
...Ue,
|
|
825
822
|
...Be,
|
|
826
823
|
...Ie
|
|
827
|
-
],
|
|
824
|
+
], Mt = { class: "cl-p-2 cl-pt-0" }, Vt = {
|
|
828
825
|
key: 0,
|
|
829
826
|
class: "cl-mt-2 cl-opacity-20"
|
|
830
|
-
},
|
|
827
|
+
}, Lt = /* @__PURE__ */ Q({
|
|
831
828
|
__name: "cl-ui-quick-dates",
|
|
832
829
|
props: {
|
|
833
830
|
scope: {},
|
|
@@ -836,17 +833,17 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
836
833
|
},
|
|
837
834
|
emits: ["quick-date-selected", "apply-button-clicked"],
|
|
838
835
|
setup(a, { emit: e }) {
|
|
839
|
-
const l = a, { t } =
|
|
836
|
+
const l = a, { t } = ie(), n = R(() => {
|
|
840
837
|
const c = [];
|
|
841
838
|
switch (l.scope) {
|
|
842
839
|
case "past":
|
|
843
|
-
c.push(Ie), c.push(
|
|
840
|
+
c.push(Ie), c.push(Ue);
|
|
844
841
|
break;
|
|
845
842
|
case "future":
|
|
846
843
|
c.push(Ie), c.push(Be);
|
|
847
844
|
break;
|
|
848
845
|
case null:
|
|
849
|
-
c.push(Ie), c.push(
|
|
846
|
+
c.push(Ie), c.push(Ue), c.push(Be);
|
|
850
847
|
break;
|
|
851
848
|
default: {
|
|
852
849
|
const o = [];
|
|
@@ -860,9 +857,9 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
860
857
|
}
|
|
861
858
|
return c;
|
|
862
859
|
});
|
|
863
|
-
return (c, r) => (
|
|
864
|
-
b("div", null,
|
|
865
|
-
(
|
|
860
|
+
return (c, r) => (p(), y("div", Mt, [
|
|
861
|
+
b("div", null, q(v(t)("quickDates.quickDatesHeader")), 1),
|
|
862
|
+
(p(!0), y(X, null, se(n.value, (o, s) => (p(), y("div", {
|
|
866
863
|
key: s,
|
|
867
864
|
class: "cl-pt-2"
|
|
868
865
|
}, [
|
|
@@ -871,7 +868,7 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
871
868
|
"selected-quick-date": c.selectedQuickDate,
|
|
872
869
|
onQuickDateSelected: r[0] || (r[0] = (i) => e("quick-date-selected", i))
|
|
873
870
|
}, null, 8, ["dates", "selected-quick-date"]),
|
|
874
|
-
s < n.value.length - 1 ? (
|
|
871
|
+
s < n.value.length - 1 ? (p(), y("div", Vt)) : j("", !0)
|
|
875
872
|
]))), 128))
|
|
876
873
|
]));
|
|
877
874
|
}
|
|
@@ -892,7 +889,7 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
892
889
|
},
|
|
893
890
|
emits: ["update:date"],
|
|
894
891
|
setup(a, { expose: e, emit: l }) {
|
|
895
|
-
const t = a, n =
|
|
892
|
+
const t = a, n = R(() => t.timeZone ?? "UTC"), c = R({
|
|
896
893
|
get() {
|
|
897
894
|
let u = null;
|
|
898
895
|
return t.type === "time" ? u = t.date === null ? "00:00" : t.date : t.date !== null && typeof t.date == "string" ? u = H.fromISO(t.date, {
|
|
@@ -907,49 +904,50 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
907
904
|
}), u;
|
|
908
905
|
},
|
|
909
906
|
set(u) {
|
|
910
|
-
let
|
|
907
|
+
let f = null;
|
|
911
908
|
if (t.type === "time")
|
|
912
|
-
|
|
909
|
+
f = u;
|
|
913
910
|
else if (u !== null && t.type !== "dateRange")
|
|
914
|
-
|
|
911
|
+
f = r(u, !1);
|
|
915
912
|
else if (u !== null) {
|
|
916
913
|
const O = u;
|
|
917
|
-
|
|
914
|
+
f = {
|
|
918
915
|
start: r(O.start, !0) ?? "",
|
|
919
916
|
end: r(O.end, !1) ?? ""
|
|
920
917
|
};
|
|
921
918
|
}
|
|
922
|
-
l("update:date",
|
|
919
|
+
l("update:date", f);
|
|
923
920
|
}
|
|
924
921
|
});
|
|
925
|
-
function r(u,
|
|
922
|
+
function r(u, f) {
|
|
926
923
|
let O = H.fromJSDate(u, { zone: n.value }).setZone(n.value);
|
|
927
|
-
|
|
924
|
+
f && (O = O.startOf("day"));
|
|
928
925
|
let $ = O.toISO();
|
|
929
926
|
return t.timeZone === null && ($ = ($ == null ? void 0 : $.replace("Z", "")) ?? null), $;
|
|
930
927
|
}
|
|
931
|
-
const { locale: o } =
|
|
928
|
+
const { locale: o } = ie(), s = R(() => t.disabled ? !1 : {
|
|
932
929
|
visibility: "focus",
|
|
933
930
|
showDelay: 0,
|
|
934
|
-
hideDelay:
|
|
931
|
+
hideDelay: 250,
|
|
932
|
+
positionFixed: !0
|
|
935
933
|
});
|
|
936
934
|
function i() {
|
|
937
935
|
let u = m(H.now());
|
|
938
936
|
if (t.max) {
|
|
939
|
-
const
|
|
940
|
-
u >
|
|
937
|
+
const f = H.fromISO(t.max).setZone(n.value);
|
|
938
|
+
u > f && (u = m(f), u.equals(f) || (t.type === "date" ? u = u.minus({ days: 1 }) : u = u.minus({ minutes: 1 })));
|
|
941
939
|
}
|
|
942
940
|
if (t.min) {
|
|
943
|
-
const
|
|
944
|
-
u <
|
|
941
|
+
const f = H.fromISO(t.min).setZone(n.value);
|
|
942
|
+
u < f && (u = m(f), u.equals(f) || (t.type === "date" ? u = u.plus({ days: 1 }) : u = u.plus({ minutes: 1 })));
|
|
945
943
|
}
|
|
946
944
|
c.value = u.toJSDate();
|
|
947
945
|
}
|
|
948
946
|
function m(u) {
|
|
949
|
-
let
|
|
950
|
-
return t.type === "date" && (
|
|
947
|
+
let f = u.set({ second: 0, millisecond: 0 }).setZone(n.value);
|
|
948
|
+
return t.type === "date" && (f = f.set({ hour: 0, minute: 0 }).setZone(n.value)), f;
|
|
951
949
|
}
|
|
952
|
-
const k =
|
|
950
|
+
const k = R(() => {
|
|
953
951
|
const u = H.fromObject({
|
|
954
952
|
day: 3,
|
|
955
953
|
month: 4,
|
|
@@ -957,17 +955,17 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
957
955
|
hour: 5,
|
|
958
956
|
minute: 6
|
|
959
957
|
}).setLocale(o.value);
|
|
960
|
-
let
|
|
961
|
-
return t.type === "date" ?
|
|
962
|
-
}), d = I(null), h =
|
|
958
|
+
let f;
|
|
959
|
+
return t.type === "date" ? f = u.toFormat("D") : t.type === "datetime" ? f = u.toFormat("f") : f = u.toFormat("t"), f.replace("2000", "YYYY").replace("20", "YY").replace("04", "MM").replace("4", "M").replace("03", "DD").replace("3", "D").replace("05", "HH").replace("5", "H").replace("06", "mm").replace("6", "m").replace("AM", "A").trim();
|
|
960
|
+
}), d = I(null), h = R(() => {
|
|
963
961
|
let u;
|
|
964
962
|
if (t.date && t.type !== "dateRange")
|
|
965
963
|
u = H.fromISO(t.date, {
|
|
966
964
|
zone: n.value
|
|
967
965
|
});
|
|
968
966
|
else if (t.date && t.type === "dateRange") {
|
|
969
|
-
const
|
|
970
|
-
u = H.fromISO(
|
|
967
|
+
const f = t.date;
|
|
968
|
+
u = H.fromISO(f.start, {
|
|
971
969
|
zone: n.value
|
|
972
970
|
});
|
|
973
971
|
} else
|
|
@@ -982,31 +980,31 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
982
980
|
(u = d.value) == null || u.focus();
|
|
983
981
|
}
|
|
984
982
|
});
|
|
985
|
-
const
|
|
986
|
-
function
|
|
987
|
-
const
|
|
988
|
-
c.value =
|
|
983
|
+
const A = I(null), P = I();
|
|
984
|
+
function U(u) {
|
|
985
|
+
const f = Z(u);
|
|
986
|
+
c.value = f, A.value = u, P.value.move(f.start), P.value.hidePopover();
|
|
989
987
|
}
|
|
990
988
|
function Z(u) {
|
|
991
|
-
const
|
|
989
|
+
const f = u.range, O = u.scope === "past" ? -1 : u.scope === "current" ? 0 : 1, $ = H.now().setZone(n.value).startOf(f).plus({ days: f === "day" ? O : 0, weeks: f === "week" ? O : 0, months: f === "month" ? O : 0, years: f === "year" ? O : 0 }), _ = $.endOf(f);
|
|
992
990
|
return {
|
|
993
991
|
start: $.toJSDate(),
|
|
994
992
|
end: _.toJSDate()
|
|
995
993
|
};
|
|
996
994
|
}
|
|
997
|
-
const ae =
|
|
995
|
+
const ae = R(() => {
|
|
998
996
|
let u = "";
|
|
999
|
-
const
|
|
1000
|
-
if (
|
|
1001
|
-
const O = H.fromJSDate(
|
|
997
|
+
const f = c.value;
|
|
998
|
+
if (f !== null && Object.hasOwn(f, "start") && Object.hasOwn(f, "end")) {
|
|
999
|
+
const O = H.fromJSDate(f.start).setZone(n.value).setLocale(o.value).toLocaleString(H.DATETIME_SHORT), $ = H.fromJSDate(f.end).setZone(n.value).setLocale(o.value).toLocaleString(H.DATETIME_SHORT);
|
|
1002
1000
|
u = `${O} - ${$}`;
|
|
1003
1001
|
}
|
|
1004
1002
|
return u;
|
|
1005
|
-
}), N = Gl("(min-width: 768px)"), B =
|
|
1006
|
-
return (u,
|
|
1003
|
+
}), N = Gl("(min-width: 768px)"), B = R(() => N.value ? 2 : 1);
|
|
1004
|
+
return (u, f) => u.type === "time" ? (p(), G(v(We), {
|
|
1007
1005
|
key: 0,
|
|
1008
1006
|
modelValue: c.value,
|
|
1009
|
-
"onUpdate:modelValue":
|
|
1007
|
+
"onUpdate:modelValue": f[1] || (f[1] = (O) => c.value = O),
|
|
1010
1008
|
modelModifiers: { string: !0 },
|
|
1011
1009
|
locale: v(o),
|
|
1012
1010
|
is24hr: v(o) !== "en-US",
|
|
@@ -1020,7 +1018,7 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
1020
1018
|
popover: s.value
|
|
1021
1019
|
}, {
|
|
1022
1020
|
default: Y(({ inputValue: O, inputEvents: $ }) => [
|
|
1023
|
-
S(Ye,
|
|
1021
|
+
S(Ye, fe(u.$attrs, {
|
|
1024
1022
|
ref_key: "input",
|
|
1025
1023
|
ref: d,
|
|
1026
1024
|
date: O,
|
|
@@ -1029,16 +1027,16 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
1029
1027
|
placeholder: u.placeholder,
|
|
1030
1028
|
required: u.required,
|
|
1031
1029
|
disabled: u.disabled,
|
|
1032
|
-
onClear:
|
|
1030
|
+
onClear: f[0] || (f[0] = (_) => c.value = null)
|
|
1033
1031
|
}), null, 16, ["date", "events", "type", "placeholder", "required", "disabled"])
|
|
1034
1032
|
]),
|
|
1035
1033
|
_: 1
|
|
1036
|
-
}, 8, ["modelValue", "locale", "is24hr", "mode", "is-required", "masks", "popover"])) : u.type === "dateRange" ? (
|
|
1034
|
+
}, 8, ["modelValue", "locale", "is24hr", "mode", "is-required", "masks", "popover"])) : u.type === "dateRange" ? (p(), G(v(We), {
|
|
1037
1035
|
key: 1,
|
|
1038
1036
|
ref_key: "calendar",
|
|
1039
1037
|
ref: P,
|
|
1040
1038
|
modelValue: c.value,
|
|
1041
|
-
"onUpdate:modelValue":
|
|
1039
|
+
"onUpdate:modelValue": f[3] || (f[3] = (O) => c.value = O),
|
|
1042
1040
|
modelModifiers: { range: !0 },
|
|
1043
1041
|
mode: "date",
|
|
1044
1042
|
color: "primary",
|
|
@@ -1050,10 +1048,10 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
1050
1048
|
"min-date": u.min,
|
|
1051
1049
|
"max-date": u.max,
|
|
1052
1050
|
"initial-page": h.value,
|
|
1053
|
-
onDayclick:
|
|
1051
|
+
onDayclick: f[4] || (f[4] = (O) => A.value = null)
|
|
1054
1052
|
}, {
|
|
1055
1053
|
default: Y(({ togglePopover: O }) => [
|
|
1056
|
-
S(Ye,
|
|
1054
|
+
S(Ye, fe(u.$attrs, {
|
|
1057
1055
|
ref_key: "input",
|
|
1058
1056
|
ref: d,
|
|
1059
1057
|
type: u.type,
|
|
@@ -1063,25 +1061,25 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
1063
1061
|
title: ae.value,
|
|
1064
1062
|
placeholder: null,
|
|
1065
1063
|
onTogglePopover: O,
|
|
1066
|
-
onClear:
|
|
1067
|
-
c.value = null,
|
|
1064
|
+
onClear: f[2] || (f[2] = ($) => {
|
|
1065
|
+
c.value = null, A.value = null, P.value.hidePopover();
|
|
1068
1066
|
})
|
|
1069
1067
|
}), null, 16, ["type", "required", "disabled", "range-selected", "title", "onTogglePopover"])
|
|
1070
1068
|
]),
|
|
1071
1069
|
footer: Y(() => [
|
|
1072
|
-
u.quickDateScope !== "none" ? (
|
|
1070
|
+
u.quickDateScope !== "none" ? (p(), G(Lt, {
|
|
1073
1071
|
key: 0,
|
|
1074
1072
|
scope: u.quickDateScope,
|
|
1075
|
-
"selected-quick-date":
|
|
1073
|
+
"selected-quick-date": A.value,
|
|
1076
1074
|
"current-date-range": t.date,
|
|
1077
|
-
onQuickDateSelected:
|
|
1075
|
+
onQuickDateSelected: U
|
|
1078
1076
|
}, null, 8, ["scope", "selected-quick-date", "current-date-range"])) : j("", !0)
|
|
1079
1077
|
]),
|
|
1080
1078
|
_: 1
|
|
1081
|
-
}, 8, ["modelValue", "locale", "timezone", "columns", "popover", "min-date", "max-date", "initial-page"])) : (
|
|
1079
|
+
}, 8, ["modelValue", "locale", "timezone", "columns", "popover", "min-date", "max-date", "initial-page"])) : (p(), G(v(We), {
|
|
1082
1080
|
key: 2,
|
|
1083
1081
|
modelValue: c.value,
|
|
1084
|
-
"onUpdate:modelValue":
|
|
1082
|
+
"onUpdate:modelValue": f[6] || (f[6] = (O) => c.value = O),
|
|
1085
1083
|
locale: v(o),
|
|
1086
1084
|
is24hr: v(o) !== "en-US",
|
|
1087
1085
|
timezone: n.value,
|
|
@@ -1098,7 +1096,7 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
1098
1096
|
popover: s.value
|
|
1099
1097
|
}, {
|
|
1100
1098
|
default: Y(({ inputValue: O, inputEvents: $ }) => [
|
|
1101
|
-
S(Ye,
|
|
1099
|
+
S(Ye, fe(u.$attrs, {
|
|
1102
1100
|
ref_key: "input",
|
|
1103
1101
|
ref: d,
|
|
1104
1102
|
date: O,
|
|
@@ -1107,7 +1105,7 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
1107
1105
|
placeholder: u.placeholder,
|
|
1108
1106
|
required: u.required,
|
|
1109
1107
|
disabled: u.disabled,
|
|
1110
|
-
onClear:
|
|
1108
|
+
onClear: f[5] || (f[5] = (_) => c.value = null),
|
|
1111
1109
|
onReset: i
|
|
1112
1110
|
}), null, 16, ["date", "events", "type", "placeholder", "required", "disabled"])
|
|
1113
1111
|
]),
|
|
@@ -1115,13 +1113,13 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
1115
1113
|
}, 8, ["modelValue", "locale", "is24hr", "timezone", "mode", "min-date", "max-date", "initial-page", "is-required", "masks", "popover"]));
|
|
1116
1114
|
}
|
|
1117
1115
|
});
|
|
1118
|
-
const
|
|
1116
|
+
const Re = [
|
|
1119
1117
|
"date",
|
|
1120
1118
|
"datetime",
|
|
1121
1119
|
"time",
|
|
1122
1120
|
"dateRange"
|
|
1123
1121
|
];
|
|
1124
|
-
function
|
|
1122
|
+
function Ut(a) {
|
|
1125
1123
|
if (a.startsWith("ClUi"))
|
|
1126
1124
|
return {
|
|
1127
1125
|
name: `clUi${a.slice(4)}`,
|
|
@@ -1133,8 +1131,8 @@ function Lt(a) {
|
|
|
1133
1131
|
from: "@iconify/vue"
|
|
1134
1132
|
};
|
|
1135
1133
|
}
|
|
1136
|
-
function
|
|
1137
|
-
return
|
|
1134
|
+
function bs() {
|
|
1135
|
+
return Ut;
|
|
1138
1136
|
}
|
|
1139
1137
|
const Bt = [
|
|
1140
1138
|
"button",
|
|
@@ -1152,7 +1150,7 @@ const Bt = [
|
|
|
1152
1150
|
"tel",
|
|
1153
1151
|
"text",
|
|
1154
1152
|
"url",
|
|
1155
|
-
...
|
|
1153
|
+
...Re
|
|
1156
1154
|
], zt = { class: "cl-flex cl-items-start" }, _t = { class: "cl-w-full" }, xt = ["min", "max", "step", "disabled"], Ht = { class: "cl-bg-transparent cl-text-center cl-text-sm cl-w-full" }, Gt = { class: "cl-bg-transparent cl-text-sm" }, Zt = {
|
|
1157
1155
|
key: 1,
|
|
1158
1156
|
class: "cl-emphasis-danger cl-text-sm cl-w-full"
|
|
@@ -1172,16 +1170,16 @@ const Bt = [
|
|
|
1172
1170
|
},
|
|
1173
1171
|
setup(a, { expose: e, emit: l }) {
|
|
1174
1172
|
const t = a;
|
|
1175
|
-
|
|
1173
|
+
Ll((d) => ({
|
|
1176
1174
|
44703202: i.value
|
|
1177
1175
|
}));
|
|
1178
|
-
const { n, t: c } =
|
|
1176
|
+
const { n, t: c } = ie(), r = I(), o = R({
|
|
1179
1177
|
get: () => t.value,
|
|
1180
1178
|
set: (d) => l("update:value", d ?? "")
|
|
1181
|
-
}), s =
|
|
1179
|
+
}), s = ol((d) => o.value = d || d === 0 ? d : t.min, 1e3), i = R(() => {
|
|
1182
1180
|
let h = ((typeof o.value == "number" ? o.value : t.min) - t.min) / (t.max - t.min) * 100;
|
|
1183
1181
|
return h < 35 && h > 0 ? h < 20 ? h += 0.5 : h += 0.25 : h > 65 && h < 100 && (h > 80 ? h -= 0.5 : h -= 0.25), `${h}%`;
|
|
1184
|
-
}), m =
|
|
1182
|
+
}), m = R(() => t.min <= t.max && t.step > 0);
|
|
1185
1183
|
e({
|
|
1186
1184
|
focus() {
|
|
1187
1185
|
var d;
|
|
@@ -1189,23 +1187,23 @@ const Bt = [
|
|
|
1189
1187
|
}
|
|
1190
1188
|
});
|
|
1191
1189
|
const k = I(!1);
|
|
1192
|
-
return (d, h) => m.value ? (
|
|
1190
|
+
return (d, h) => m.value ? (p(), y("div", ce(fe({ key: 0 }, d.$attrs)), [
|
|
1193
1191
|
b("div", zt, [
|
|
1194
1192
|
b("span", {
|
|
1195
|
-
class:
|
|
1193
|
+
class: M(["cl-border cl-border-transparent cl-leading-6 cl-mr-1 cl-px-2 cl-rounded-full cl-select-none cl-shadow cl-text-center cl-text-xs", {
|
|
1196
1194
|
"cl-bg-white cl-cursor-pointer hover:cl-border-grey-1": !d.disabled,
|
|
1197
1195
|
"cl-bg-grey-0": d.disabled
|
|
1198
1196
|
}]),
|
|
1199
|
-
onClick: h[0] || (h[0] = (
|
|
1200
|
-
},
|
|
1197
|
+
onClick: h[0] || (h[0] = (A) => o.value = d.disabled ? o.value : d.min)
|
|
1198
|
+
}, q(v(n)(d.min, Number.isInteger(d.min) ? v(ue).INTEGER : v(ue).DECIMAL)), 3),
|
|
1201
1199
|
b("div", _t, [
|
|
1202
|
-
k.value ? (
|
|
1200
|
+
k.value ? (p(), G(v(me), {
|
|
1203
1201
|
key: 0,
|
|
1204
1202
|
ref_key: "sliderRef",
|
|
1205
1203
|
ref: r,
|
|
1206
1204
|
modelValue: o.value,
|
|
1207
1205
|
"onUpdate:modelValue": [
|
|
1208
|
-
h[1] || (h[1] = (
|
|
1206
|
+
h[1] || (h[1] = (A) => o.value = A),
|
|
1209
1207
|
v(s)
|
|
1210
1208
|
],
|
|
1211
1209
|
class: "cl-min-w-[8.5rem] cl-w-full",
|
|
@@ -1216,11 +1214,11 @@ const Bt = [
|
|
|
1216
1214
|
disabled: d.disabled,
|
|
1217
1215
|
"placeholder-text": d.placeholder,
|
|
1218
1216
|
"show-validation-messages": !1
|
|
1219
|
-
}, null, 8, ["modelValue", "min", "max", "step", "disabled", "placeholder-text", "onUpdate:modelValue"])) : (
|
|
1217
|
+
}, null, 8, ["modelValue", "min", "max", "step", "disabled", "placeholder-text", "onUpdate:modelValue"])) : (p(), y(X, { key: 1 }, [
|
|
1220
1218
|
le(b("input", {
|
|
1221
1219
|
ref_key: "sliderRef",
|
|
1222
1220
|
ref: r,
|
|
1223
|
-
"onUpdate:modelValue": h[2] || (h[2] = (
|
|
1221
|
+
"onUpdate:modelValue": h[2] || (h[2] = (A) => o.value = A),
|
|
1224
1222
|
class: "cl-align-middle cl-appearance-none cl-border cl-border-grey-2 cl-delay-500 cl-ease-in cl-flex-1 cl-h-5 cl-min-w-[8.5rem] cl-outline-none cl-rounded-full cl-transition-colors cl-w-full",
|
|
1225
1223
|
type: "range",
|
|
1226
1224
|
min: d.min,
|
|
@@ -1235,30 +1233,30 @@ const Bt = [
|
|
|
1235
1233
|
{ number: !0 }
|
|
1236
1234
|
]
|
|
1237
1235
|
]),
|
|
1238
|
-
b("div", Ht,
|
|
1236
|
+
b("div", Ht, q(o.value), 1)
|
|
1239
1237
|
], 64))
|
|
1240
1238
|
]),
|
|
1241
1239
|
b("span", {
|
|
1242
|
-
class:
|
|
1240
|
+
class: M(["cl-border cl-border-transparent cl-leading-6 cl-ml-1 cl-px-2 cl-rounded-full cl-select-none cl-shadow cl-text-center cl-text-xs", {
|
|
1243
1241
|
"cl-bg-white cl-cursor-pointer hover:cl-border-grey-1": !d.disabled,
|
|
1244
1242
|
"cl-bg-grey-0": d.disabled
|
|
1245
1243
|
}]),
|
|
1246
|
-
onClick: h[3] || (h[3] = (
|
|
1247
|
-
},
|
|
1244
|
+
onClick: h[3] || (h[3] = (A) => o.value = d.disabled ? o.value : d.max)
|
|
1245
|
+
}, q(v(n)(d.max, Number.isInteger(d.max) ? v(ue).INTEGER : v(ue).DECIMAL)), 3),
|
|
1248
1246
|
b("div", Gt, [
|
|
1249
1247
|
b("div", {
|
|
1250
1248
|
class: "cl-bg-white cl-border cl-border-transparent cl-cursor-pointer cl-float-right cl-p-1.5 cl-px-2 cl-rounded-full cl-shadow cl-text-xs hover:cl-border-grey-1",
|
|
1251
|
-
onClick: h[4] || (h[4] = (
|
|
1249
|
+
onClick: h[4] || (h[4] = (A) => k.value = !k.value)
|
|
1252
1250
|
}, [
|
|
1253
1251
|
S(v(x), { icon: "ph:arrows-left-right-thin" })
|
|
1254
1252
|
])
|
|
1255
1253
|
])
|
|
1256
1254
|
])
|
|
1257
|
-
], 16)) : (
|
|
1255
|
+
], 16)) : (p(), y("div", Zt, q(v(c)("slider.invalidProps")), 1));
|
|
1258
1256
|
}
|
|
1259
1257
|
});
|
|
1260
|
-
const Qt = /* @__PURE__ */
|
|
1261
|
-
function
|
|
1258
|
+
const Qt = /* @__PURE__ */ ke(Kt, [["__scopeId", "data-v-470989ac"]]);
|
|
1259
|
+
function il(a) {
|
|
1262
1260
|
let e = !1;
|
|
1263
1261
|
switch (a) {
|
|
1264
1262
|
case "email":
|
|
@@ -1278,7 +1276,7 @@ function cl(a) {
|
|
|
1278
1276
|
function Wt(a) {
|
|
1279
1277
|
return a === "number" || a === "range";
|
|
1280
1278
|
}
|
|
1281
|
-
function
|
|
1279
|
+
function cl(a) {
|
|
1282
1280
|
let e = !1;
|
|
1283
1281
|
switch (a) {
|
|
1284
1282
|
case "date":
|
|
@@ -1293,31 +1291,31 @@ function ul(a) {
|
|
|
1293
1291
|
}
|
|
1294
1292
|
return e;
|
|
1295
1293
|
}
|
|
1296
|
-
function
|
|
1294
|
+
function De(a) {
|
|
1297
1295
|
return a === "button" || a === "submit" || a === "reset";
|
|
1298
1296
|
}
|
|
1299
1297
|
function Yt(a) {
|
|
1300
1298
|
let e;
|
|
1301
1299
|
switch (a) {
|
|
1302
1300
|
case "datetime":
|
|
1303
|
-
e =
|
|
1301
|
+
e = Re[1];
|
|
1304
1302
|
break;
|
|
1305
1303
|
case "time":
|
|
1306
|
-
e =
|
|
1304
|
+
e = Re[2];
|
|
1307
1305
|
break;
|
|
1308
1306
|
case "dateRange":
|
|
1309
|
-
e =
|
|
1307
|
+
e = Re[3];
|
|
1310
1308
|
break;
|
|
1311
1309
|
case "date":
|
|
1312
1310
|
default:
|
|
1313
|
-
e =
|
|
1311
|
+
e = Re[0];
|
|
1314
1312
|
break;
|
|
1315
1313
|
}
|
|
1316
1314
|
return e;
|
|
1317
1315
|
}
|
|
1318
|
-
function
|
|
1316
|
+
function ul(a, e) {
|
|
1319
1317
|
const l = a.target;
|
|
1320
|
-
return Wt(e) ? l.valueAsNumber :
|
|
1318
|
+
return Wt(e) ? l.valueAsNumber : De(e) ? l.checked : l.value;
|
|
1321
1319
|
}
|
|
1322
1320
|
const Jt = { class: "cl-flex cl-justify-between" }, Xt = { class: "cl-w-full" }, ea = {
|
|
1323
1321
|
key: 0,
|
|
@@ -1372,40 +1370,40 @@ const Jt = { class: "cl-flex cl-justify-between" }, Xt = { class: "cl-w-full" },
|
|
|
1372
1370
|
},
|
|
1373
1371
|
emits: ["update:model-value", "click", "focus", "input", "change", "validated"],
|
|
1374
1372
|
setup(a, { expose: e, emit: l }) {
|
|
1375
|
-
const t = a, n = I(null), c = I(!1), r = I(!1), o = D
|
|
1373
|
+
const t = a, n = I(null), c = I(!1), r = I(!1), o = R(D), s = R(() => t.placeholderText.trim() !== "" ? t.placeholderText : t.label), i = I(0), m = R({
|
|
1376
1374
|
get: () => t.modelValue,
|
|
1377
|
-
set: (g) =>
|
|
1378
|
-
}), k =
|
|
1375
|
+
set: (g) => f(g, !1)
|
|
1376
|
+
}), k = R({
|
|
1379
1377
|
get: () => t.modelValue,
|
|
1380
1378
|
set: (g) => u(g)
|
|
1381
|
-
}), d =
|
|
1382
|
-
var g,
|
|
1379
|
+
}), d = R(() => typeof t.min == "number" ? t.min.toString() : t.min), h = R(() => typeof t.max == "number" ? t.max.toString() : t.max), A = R(() => typeof t.min == "number" || t.min === null ? t.min : parseFloat(t.min)), P = R(() => typeof t.max == "number" || t.max === null ? t.max : parseFloat(t.max)), U = R(() => t.messageWhenValid.trim() !== "" ? t.messageWhenValid : ""), Z = I(!0), ae = I(!0), N = I([]), B = R(() => {
|
|
1380
|
+
var g, F;
|
|
1383
1381
|
return [
|
|
1384
1382
|
...((g = N.value) == null ? void 0 : g.filter((K) => ((K == null ? void 0 : K.length) ?? 0) > 0)) ?? [],
|
|
1385
|
-
...((
|
|
1383
|
+
...((F = t.externalErrors) == null ? void 0 : F.filter((K) => ((K == null ? void 0 : K.length) ?? 0) > 0)) ?? []
|
|
1386
1384
|
].join(`
|
|
1387
1385
|
`);
|
|
1388
1386
|
});
|
|
1389
1387
|
async function u(g) {
|
|
1390
1388
|
t.validateOn === "input" && await O(g), l("update:model-value", g);
|
|
1391
1389
|
}
|
|
1392
|
-
async function
|
|
1393
|
-
t.onInputFunction !== void 0 && (g = t.onInputFunction(g)), t.validateOn === "change" && (ae.value = !1), (
|
|
1390
|
+
async function f(g, F) {
|
|
1391
|
+
t.onInputFunction !== void 0 && (g = t.onInputFunction(g)), t.validateOn === "change" && (ae.value = !1), (F || t.validateOn === "input") && await O(g), l("update:model-value", g);
|
|
1394
1392
|
}
|
|
1395
1393
|
function O(g) {
|
|
1396
|
-
const
|
|
1394
|
+
const F = {
|
|
1397
1395
|
message: "",
|
|
1398
1396
|
valid: !0
|
|
1399
1397
|
}, K = [
|
|
1400
1398
|
t.customValidationFunction === null || t.customValidationFunction === void 0 ? new Promise((pe) => {
|
|
1401
|
-
pe(
|
|
1399
|
+
pe(F);
|
|
1402
1400
|
}) : new Promise((pe) => {
|
|
1403
1401
|
pe(t.customValidationFunction(t.label, g));
|
|
1404
1402
|
})
|
|
1405
1403
|
];
|
|
1406
1404
|
return (typeof g == "string" || typeof g == "number") && (K.push($t(t.min, t.inputType, t.label, g, t.timeZone)), K.push(Ct(t.max, t.inputType, t.label, g, t.timeZone))), t.isRequired && K.push(Ot(t.label, g)), t.inputType === "email" && typeof g == "string" && K.push(St(t.label, g)), Promise.all(K).then((pe) => {
|
|
1407
|
-
const Ce = [...pe.map(($e) => $e.message)],
|
|
1408
|
-
ae.value = !0,
|
|
1405
|
+
const Ce = [...pe.map(($e) => $e.message)], Ae = pe.some(($e) => $e.message.length > 0 && $e.valid === !1) || t.externalErrors.length > 0;
|
|
1406
|
+
ae.value = !0, Ae ? (N.value = Ce, l("validated", !1, g)) : (N.value = [], l("validated", !0, g)), Z.value = !Ae;
|
|
1409
1407
|
});
|
|
1410
1408
|
}
|
|
1411
1409
|
function $() {
|
|
@@ -1413,24 +1411,24 @@ const Jt = { class: "cl-flex cl-justify-between" }, Xt = { class: "cl-w-full" },
|
|
|
1413
1411
|
return t.inputType === "color" && m.value && (t.disabled ? g = "background: #999999" : g = `background: ${m.value};`), g;
|
|
1414
1412
|
}
|
|
1415
1413
|
function _(g) {
|
|
1416
|
-
|
|
1414
|
+
De(t.inputType) ? (g.preventDefault(), l("click", g)) : t.inputType === "checkbox" && l("click", g);
|
|
1417
1415
|
}
|
|
1418
1416
|
function z(g) {
|
|
1419
1417
|
if (n.value) {
|
|
1420
|
-
n.value.stepUp(), n.value.focus(),
|
|
1421
|
-
const
|
|
1418
|
+
n.value.stepUp(), n.value.focus(), f(n.value.valueAsNumber, !1);
|
|
1419
|
+
const F = {
|
|
1422
1420
|
target: n.value
|
|
1423
1421
|
};
|
|
1424
|
-
l("input",
|
|
1422
|
+
l("input", F, n.value.valueAsNumber), l("change", g, n.value.valueAsNumber);
|
|
1425
1423
|
}
|
|
1426
1424
|
}
|
|
1427
1425
|
function T(g) {
|
|
1428
1426
|
if (n.value) {
|
|
1429
|
-
n.value.stepDown(), n.value.focus(),
|
|
1430
|
-
const
|
|
1427
|
+
n.value.stepDown(), n.value.focus(), f(n.value.valueAsNumber, !1);
|
|
1428
|
+
const F = {
|
|
1431
1429
|
target: n.value
|
|
1432
1430
|
};
|
|
1433
|
-
l("input",
|
|
1431
|
+
l("input", F, n.value.valueAsNumber), l("change", g, n.value.valueAsNumber);
|
|
1434
1432
|
}
|
|
1435
1433
|
}
|
|
1436
1434
|
function w(g) {
|
|
@@ -1439,33 +1437,33 @@ const Jt = { class: "cl-flex cl-justify-between" }, Xt = { class: "cl-w-full" },
|
|
|
1439
1437
|
async function E() {
|
|
1440
1438
|
r.value = !0, w(!1), t.validateOn === "change" && await O(m.value);
|
|
1441
1439
|
}
|
|
1442
|
-
function
|
|
1440
|
+
function L() {
|
|
1443
1441
|
i.value++;
|
|
1444
1442
|
}
|
|
1445
1443
|
function C(g) {
|
|
1446
1444
|
g.target.blur();
|
|
1447
1445
|
}
|
|
1448
|
-
function
|
|
1446
|
+
function D() {
|
|
1449
1447
|
var K;
|
|
1450
1448
|
let g = !0;
|
|
1451
|
-
const
|
|
1452
|
-
return c.value ? g =
|
|
1449
|
+
const F = o.value;
|
|
1450
|
+
return c.value ? g = F : r.value && ((K = m.value) == null ? void 0 : K.toString().trim()) === "" && t.requiredText.trim() !== "" && (g = !1), !t.hideRequiredAsterisk && g;
|
|
1453
1451
|
}
|
|
1454
1452
|
async function J(g) {
|
|
1455
|
-
const
|
|
1456
|
-
t.validateOn === "change" && await O(
|
|
1453
|
+
const F = ul(g, t.inputType);
|
|
1454
|
+
t.validateOn === "change" && await O(F), l("change", g, F);
|
|
1457
1455
|
}
|
|
1458
1456
|
async function W() {
|
|
1459
|
-
await E(),
|
|
1457
|
+
await E(), L();
|
|
1460
1458
|
}
|
|
1461
1459
|
return Ze(() => {
|
|
1462
|
-
t.validateImmediately &&
|
|
1463
|
-
}), oe(() => t.isRequired, () =>
|
|
1460
|
+
t.validateImmediately && f(t.modelValue, !0);
|
|
1461
|
+
}), oe(() => t.isRequired, () => f(t.modelValue, !0)), oe(() => t.externalErrors, async () => {
|
|
1464
1462
|
await O(m.value), l("update:model-value", m.value);
|
|
1465
1463
|
}), oe(
|
|
1466
1464
|
() => t.modelValue,
|
|
1467
1465
|
() => {
|
|
1468
|
-
t.validateImmediately ?
|
|
1466
|
+
t.validateImmediately ? f(t.modelValue, !0) : f(t.modelValue, !1);
|
|
1469
1467
|
}
|
|
1470
1468
|
), e({
|
|
1471
1469
|
focus() {
|
|
@@ -1476,37 +1474,37 @@ const Jt = { class: "cl-flex cl-justify-between" }, Xt = { class: "cl-w-full" },
|
|
|
1476
1474
|
var g;
|
|
1477
1475
|
(g = n.value) == null || g.blur();
|
|
1478
1476
|
}
|
|
1479
|
-
}), (g,
|
|
1477
|
+
}), (g, F) => (p(), y("div", fe({ ...g.$attrs, id: void 0 }, {
|
|
1480
1478
|
key: i.value,
|
|
1481
1479
|
class: "cl-align-top cl-border-none cl-inline-block cl-text-left"
|
|
1482
1480
|
}), [
|
|
1483
1481
|
b("div", {
|
|
1484
|
-
onMouseenter:
|
|
1485
|
-
onMouseleave:
|
|
1482
|
+
onMouseenter: F[10] || (F[10] = (K) => w(!0)),
|
|
1483
|
+
onMouseleave: F[11] || (F[11] = (K) => w(!1))
|
|
1486
1484
|
}, [
|
|
1487
1485
|
b("div", Jt, [
|
|
1488
1486
|
b("div", Xt, [
|
|
1489
|
-
le(b("label", { class: "cl-block cl-mb-1 cl-text-grey-4 cl-text-xs cl-tracking-widest" },
|
|
1487
|
+
le(b("label", { class: "cl-block cl-mb-1 cl-text-grey-4 cl-text-xs cl-tracking-widest" }, q(g.label), 513), [
|
|
1490
1488
|
[te, g.showLabel && g.label !== ""]
|
|
1491
1489
|
])
|
|
1492
1490
|
]),
|
|
1493
|
-
g.isRequired && o.value ? (
|
|
1494
|
-
g.isRequired && !o.value && g.requiredText.length ? (
|
|
1491
|
+
g.isRequired && o.value ? (p(), y("label", ea, " * ")) : j("", !0),
|
|
1492
|
+
g.isRequired && !o.value && g.requiredText.length ? (p(), y("label", la, q(g.requiredText), 1)) : j("", !0)
|
|
1495
1493
|
]),
|
|
1496
|
-
g.inputType !== "range" && !v(
|
|
1497
|
-
le(b("input",
|
|
1494
|
+
g.inputType !== "range" && !v(cl)(g.inputType) ? (p(), y("div", ta, [
|
|
1495
|
+
le(b("input", fe({
|
|
1498
1496
|
ref_key: "inputElement",
|
|
1499
1497
|
ref: n,
|
|
1500
|
-
"onUpdate:modelValue":
|
|
1498
|
+
"onUpdate:modelValue": F[0] || (F[0] = (K) => m.value = K)
|
|
1501
1499
|
}, g.$attrs, {
|
|
1502
1500
|
class: ["!cl-mb-1 cl-block cl-border cl-duration-300 cl-h-full cl-transition cl-w-full focus:cl-outline-none", {
|
|
1503
|
-
"hover:!cl-border-grey-3": g.disabled === !1 && !v(
|
|
1501
|
+
"hover:!cl-border-grey-3": g.disabled === !1 && !v(De)(g.inputType),
|
|
1504
1502
|
"!cl-cursor-default": g.disabled,
|
|
1505
1503
|
"!cl-border-danger-default": !Z.value,
|
|
1506
1504
|
"!cl-border-primary-default": Z.value && g.highlightWhenValid,
|
|
1507
|
-
"cl-border-grey-0 focus:cl-border-blue-light": Z.value && !v(
|
|
1505
|
+
"cl-border-grey-0 focus:cl-border-blue-light": Z.value && !v(De)(g.inputType),
|
|
1508
1506
|
"!cl-p-2": g.inputType === "checkbox" || g.inputType === "radio",
|
|
1509
|
-
"cl-p-3 cl-rounded-lg": !v(
|
|
1507
|
+
"cl-p-3 cl-rounded-lg": !v(De)(g.inputType),
|
|
1510
1508
|
[`${g.inputSpecificClasses}`]: g.inputSpecificClasses !== ""
|
|
1511
1509
|
}],
|
|
1512
1510
|
style: $(),
|
|
@@ -1514,42 +1512,42 @@ const Jt = { class: "cl-flex cl-justify-between" }, Xt = { class: "cl-w-full" },
|
|
|
1514
1512
|
disabled: g.disabled,
|
|
1515
1513
|
min: g.min ?? void 0,
|
|
1516
1514
|
max: g.max ?? void 0,
|
|
1517
|
-
minlength: g.min !== null && v(
|
|
1518
|
-
maxlength: g.max !== null && v(
|
|
1515
|
+
minlength: g.min !== null && v(il)(g.inputType) ? g.min : void 0,
|
|
1516
|
+
maxlength: g.max !== null && v(il)(g.inputType) ? g.max : void 0,
|
|
1519
1517
|
step: g.step,
|
|
1520
1518
|
placeholder: s.value,
|
|
1521
1519
|
accept: g.fileExtensions,
|
|
1522
1520
|
name: g.group,
|
|
1523
1521
|
autocomplete: g.autocomplete,
|
|
1524
|
-
onClick:
|
|
1525
|
-
onFocus:
|
|
1522
|
+
onClick: F[1] || (F[1] = (K) => _(K)),
|
|
1523
|
+
onFocus: F[2] || (F[2] = (K) => l("focus")),
|
|
1526
1524
|
onBlur: ne(W, ["self"]),
|
|
1527
1525
|
onMousewheelPassive: C,
|
|
1528
|
-
onInput:
|
|
1529
|
-
l("input", K, v(
|
|
1526
|
+
onInput: F[3] || (F[3] = (K) => {
|
|
1527
|
+
l("input", K, v(ul)(K, g.inputType));
|
|
1530
1528
|
}),
|
|
1531
1529
|
onChange: J
|
|
1532
1530
|
}), null, 16, aa), [
|
|
1533
|
-
[
|
|
1531
|
+
[Ul, m.value]
|
|
1534
1532
|
]),
|
|
1535
1533
|
S(Te, {
|
|
1536
1534
|
name: "fade",
|
|
1537
1535
|
duration: 300
|
|
1538
1536
|
}, {
|
|
1539
1537
|
default: Y(() => [
|
|
1540
|
-
g.inputType === "number" && !g.disabled && g.showArrows ? le((
|
|
1538
|
+
g.inputType === "number" && !g.disabled && g.showArrows ? le((p(), y("div", oa, [
|
|
1541
1539
|
S(v(x), {
|
|
1542
1540
|
icon: "ph:caret-up-bold",
|
|
1543
1541
|
class: "cl-absolute cl-bg-link-default cl-right-1 cl-rounded-full cl-text-sm cl-text-white cl-top-1 hover:cl-bg-link-light hover:cl-cursor-pointer",
|
|
1544
1542
|
onClick: z,
|
|
1545
|
-
onMousedown:
|
|
1543
|
+
onMousedown: F[4] || (F[4] = ne(() => {
|
|
1546
1544
|
}, ["prevent"]))
|
|
1547
1545
|
}),
|
|
1548
1546
|
S(v(x), {
|
|
1549
1547
|
icon: "ph:caret-down-bold",
|
|
1550
1548
|
class: "cl-absolute cl-bg-link-default cl-bottom-2 cl-right-1 cl-rounded-full cl-text-sm cl-text-white hover:cl-bg-link-light hover:cl-cursor-pointer",
|
|
1551
1549
|
onClick: T,
|
|
1552
|
-
onMousedown:
|
|
1550
|
+
onMousedown: F[5] || (F[5] = ne(() => {
|
|
1553
1551
|
}, ["prevent"]))
|
|
1554
1552
|
})
|
|
1555
1553
|
], 512)), [
|
|
@@ -1558,11 +1556,11 @@ const Jt = { class: "cl-flex cl-justify-between" }, Xt = { class: "cl-w-full" },
|
|
|
1558
1556
|
]),
|
|
1559
1557
|
_: 1
|
|
1560
1558
|
})
|
|
1561
|
-
])) : v(
|
|
1559
|
+
])) : v(cl)(g.inputType) ? (p(), G(v(Pt), fe({ key: 1 }, g.$attrs, {
|
|
1562
1560
|
ref_key: "inputElement",
|
|
1563
1561
|
ref: n,
|
|
1564
1562
|
date: k.value,
|
|
1565
|
-
"onUpdate:date":
|
|
1563
|
+
"onUpdate:date": F[6] || (F[6] = (K) => k.value = K),
|
|
1566
1564
|
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", {
|
|
1567
1565
|
"hover:cl-border-grey-3": !g.disabled && g.inputType !== "dateRange",
|
|
1568
1566
|
"!cl-border-danger-default": !Z.value,
|
|
@@ -1578,30 +1576,30 @@ const Jt = { class: "cl-flex cl-justify-between" }, Xt = { class: "cl-w-full" },
|
|
|
1578
1576
|
"initial-date": g.initialDate,
|
|
1579
1577
|
"quick-date-scope": g.quickDateScope,
|
|
1580
1578
|
onBlur: ne(E, ["self"]),
|
|
1581
|
-
onFocus:
|
|
1582
|
-
}), null, 16, ["date", "class", "disabled", "required", "type", "time-zone", "min", "max", "placeholder", "initial-date", "quick-date-scope", "onBlur"])) : g.inputType === "range" && (typeof m.value == "number" || typeof m.value == "string") ? (
|
|
1579
|
+
onFocus: F[7] || (F[7] = (K) => l("focus"))
|
|
1580
|
+
}), null, 16, ["date", "class", "disabled", "required", "type", "time-zone", "min", "max", "placeholder", "initial-date", "quick-date-scope", "onBlur"])) : g.inputType === "range" && (typeof m.value == "number" || typeof m.value == "string") ? (p(), y("div", na, [
|
|
1583
1581
|
S(v(Qt), {
|
|
1584
1582
|
ref_key: "inputElement",
|
|
1585
1583
|
ref: n,
|
|
1586
1584
|
value: m.value,
|
|
1587
|
-
"onUpdate:value":
|
|
1588
|
-
min:
|
|
1585
|
+
"onUpdate:value": F[8] || (F[8] = (K) => m.value = K),
|
|
1586
|
+
min: A.value ?? 0,
|
|
1589
1587
|
max: P.value ?? 1e3,
|
|
1590
1588
|
step: g.step,
|
|
1591
1589
|
placeholder: s.value,
|
|
1592
1590
|
"enforce-step": !0,
|
|
1593
1591
|
disabled: g.disabled,
|
|
1594
1592
|
onBlur: ne(E, ["self"]),
|
|
1595
|
-
onFocus:
|
|
1593
|
+
onFocus: F[9] || (F[9] = (K) => l("focus"))
|
|
1596
1594
|
}, null, 8, ["value", "min", "max", "step", "placeholder", "disabled", "onBlur"])
|
|
1597
1595
|
])) : j("", !0)
|
|
1598
1596
|
], 32),
|
|
1599
|
-
Z.value &&
|
|
1600
|
-
!Z.value && B.value.length > 0 && g.showValidationMessages && ae.value ? (
|
|
1597
|
+
Z.value && U.value && ae.value ? (p(), y("div", ra, q(U.value), 1)) : j("", !0),
|
|
1598
|
+
!Z.value && B.value.length > 0 && g.showValidationMessages && ae.value ? (p(), y("div", sa, q(B.value), 1)) : j("", !0)
|
|
1601
1599
|
], 16));
|
|
1602
1600
|
}
|
|
1603
1601
|
});
|
|
1604
|
-
const me = /* @__PURE__ */
|
|
1602
|
+
const me = /* @__PURE__ */ ke(ia, [["__scopeId", "data-v-3ec80de1"]]);
|
|
1605
1603
|
/*!
|
|
1606
1604
|
* tabbable 6.2.0
|
|
1607
1605
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
@@ -1620,12 +1618,12 @@ var Nl = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1620
1618
|
}, ca = function(e) {
|
|
1621
1619
|
var l, t = e == null || (l = e.getAttribute) === null || l === void 0 ? void 0 : l.call(e, "contenteditable");
|
|
1622
1620
|
return t === "" || t === "true";
|
|
1623
|
-
},
|
|
1621
|
+
}, Al = function(e, l, t) {
|
|
1624
1622
|
if (xe(e))
|
|
1625
1623
|
return [];
|
|
1626
1624
|
var n = Array.prototype.slice.apply(e.querySelectorAll(ze));
|
|
1627
1625
|
return l && Se.call(e, ze) && n.unshift(e), n = n.filter(t), n;
|
|
1628
|
-
},
|
|
1626
|
+
}, ql = function a(e, l, t) {
|
|
1629
1627
|
for (var n = [], c = Array.from(e); c.length; ) {
|
|
1630
1628
|
var r = c.shift();
|
|
1631
1629
|
if (!xe(r, !1))
|
|
@@ -1651,21 +1649,21 @@ var Nl = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1651
1649
|
}
|
|
1652
1650
|
}
|
|
1653
1651
|
return n;
|
|
1654
|
-
},
|
|
1652
|
+
}, Rl = function(e) {
|
|
1655
1653
|
return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
|
|
1656
1654
|
}, Oe = function(e) {
|
|
1657
1655
|
if (!e)
|
|
1658
1656
|
throw new Error("No node provided");
|
|
1659
|
-
return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || ca(e)) && !
|
|
1657
|
+
return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || ca(e)) && !Rl(e) ? 0 : e.tabIndex;
|
|
1660
1658
|
}, ua = function(e, l) {
|
|
1661
1659
|
var t = Oe(e);
|
|
1662
|
-
return t < 0 && l && !
|
|
1660
|
+
return t < 0 && l && !Rl(e) ? 0 : t;
|
|
1663
1661
|
}, da = function(e, l) {
|
|
1664
1662
|
return e.tabIndex === l.tabIndex ? e.documentOrder - l.documentOrder : e.tabIndex - l.tabIndex;
|
|
1665
|
-
},
|
|
1663
|
+
}, Dl = function(e) {
|
|
1666
1664
|
return e.tagName === "INPUT";
|
|
1667
1665
|
}, fa = function(e) {
|
|
1668
|
-
return
|
|
1666
|
+
return Dl(e) && e.type === "hidden";
|
|
1669
1667
|
}, pa = function(e) {
|
|
1670
1668
|
var l = e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(t) {
|
|
1671
1669
|
return t.tagName === "SUMMARY";
|
|
@@ -1692,7 +1690,7 @@ var Nl = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1692
1690
|
var c = ma(n, e.form);
|
|
1693
1691
|
return !c || c === e;
|
|
1694
1692
|
}, ga = function(e) {
|
|
1695
|
-
return
|
|
1693
|
+
return Dl(e) && e.type === "radio";
|
|
1696
1694
|
}, ba = function(e) {
|
|
1697
1695
|
return ga(e) && !va(e);
|
|
1698
1696
|
}, ha = function(e) {
|
|
@@ -1705,7 +1703,7 @@ var Nl = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1705
1703
|
}
|
|
1706
1704
|
}
|
|
1707
1705
|
return c;
|
|
1708
|
-
},
|
|
1706
|
+
}, dl = function(e) {
|
|
1709
1707
|
var l = e.getBoundingClientRect(), t = l.width, n = l.height;
|
|
1710
1708
|
return t === 0 && n === 0;
|
|
1711
1709
|
}, ya = function(e, l) {
|
|
@@ -1720,7 +1718,7 @@ var Nl = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1720
1718
|
for (var o = e; e; ) {
|
|
1721
1719
|
var s = e.parentElement, i = _e(e);
|
|
1722
1720
|
if (s && !s.shadowRoot && n(s) === !0)
|
|
1723
|
-
return
|
|
1721
|
+
return dl(e);
|
|
1724
1722
|
e.assignedSlot ? e = e.assignedSlot : !s && i !== e.ownerDocument ? e = i.host : e = s;
|
|
1725
1723
|
}
|
|
1726
1724
|
e = o;
|
|
@@ -1730,7 +1728,7 @@ var Nl = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1730
1728
|
if (t !== "legacy-full")
|
|
1731
1729
|
return !0;
|
|
1732
1730
|
} else if (t === "non-zero-area")
|
|
1733
|
-
return
|
|
1731
|
+
return dl(e);
|
|
1734
1732
|
return !1;
|
|
1735
1733
|
}, wa = function(e) {
|
|
1736
1734
|
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))
|
|
@@ -1774,20 +1772,20 @@ var Nl = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1774
1772
|
}, $a = function(e, l) {
|
|
1775
1773
|
l = l || {};
|
|
1776
1774
|
var t;
|
|
1777
|
-
return l.getShadowRoot ? t =
|
|
1775
|
+
return l.getShadowRoot ? t = ql([e], l.includeContainer, {
|
|
1778
1776
|
filter: Xe.bind(null, l),
|
|
1779
1777
|
flatten: !1,
|
|
1780
1778
|
getShadowRoot: l.getShadowRoot,
|
|
1781
1779
|
shadowRootFilter: ka
|
|
1782
|
-
}) : t =
|
|
1780
|
+
}) : t = Al(e, l.includeContainer, Xe.bind(null, l)), Ta(t);
|
|
1783
1781
|
}, Ca = function(e, l) {
|
|
1784
1782
|
l = l || {};
|
|
1785
1783
|
var t;
|
|
1786
|
-
return l.getShadowRoot ? t =
|
|
1784
|
+
return l.getShadowRoot ? t = ql([e], l.includeContainer, {
|
|
1787
1785
|
filter: He.bind(null, l),
|
|
1788
1786
|
flatten: !0,
|
|
1789
1787
|
getShadowRoot: l.getShadowRoot
|
|
1790
|
-
}) : t =
|
|
1788
|
+
}) : t = Al(e, l.includeContainer, He.bind(null, l)), t;
|
|
1791
1789
|
}, Ne = function(e, l) {
|
|
1792
1790
|
if (l = l || {}, !e)
|
|
1793
1791
|
throw new Error("No node provided");
|
|
@@ -1801,7 +1799,7 @@ var Nl = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1801
1799
|
* focus-trap 7.5.2
|
|
1802
1800
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
1803
1801
|
*/
|
|
1804
|
-
function
|
|
1802
|
+
function fl(a, e) {
|
|
1805
1803
|
var l = Object.keys(a);
|
|
1806
1804
|
if (Object.getOwnPropertySymbols) {
|
|
1807
1805
|
var t = Object.getOwnPropertySymbols(a);
|
|
@@ -1811,12 +1809,12 @@ function pl(a, e) {
|
|
|
1811
1809
|
}
|
|
1812
1810
|
return l;
|
|
1813
1811
|
}
|
|
1814
|
-
function
|
|
1812
|
+
function pl(a) {
|
|
1815
1813
|
for (var e = 1; e < arguments.length; e++) {
|
|
1816
1814
|
var l = arguments[e] != null ? arguments[e] : {};
|
|
1817
|
-
e % 2 ?
|
|
1815
|
+
e % 2 ? fl(Object(l), !0).forEach(function(t) {
|
|
1818
1816
|
Sa(a, t, l[t]);
|
|
1819
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(l)) :
|
|
1817
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(l)) : fl(Object(l)).forEach(function(t) {
|
|
1820
1818
|
Object.defineProperty(a, t, Object.getOwnPropertyDescriptor(l, t));
|
|
1821
1819
|
});
|
|
1822
1820
|
}
|
|
@@ -1846,7 +1844,7 @@ function Ea(a) {
|
|
|
1846
1844
|
var e = Na(a, "string");
|
|
1847
1845
|
return typeof e == "symbol" ? e : String(e);
|
|
1848
1846
|
}
|
|
1849
|
-
var
|
|
1847
|
+
var ml = {
|
|
1850
1848
|
activateTrap: function(e, l) {
|
|
1851
1849
|
if (e.length > 0) {
|
|
1852
1850
|
var t = e[e.length - 1];
|
|
@@ -1859,36 +1857,36 @@ var vl = {
|
|
|
1859
1857
|
var t = e.indexOf(l);
|
|
1860
1858
|
t !== -1 && e.splice(t, 1), e.length > 0 && e[e.length - 1].unpause();
|
|
1861
1859
|
}
|
|
1862
|
-
}, qa = function(e) {
|
|
1863
|
-
return e.tagName && e.tagName.toLowerCase() === "input" && typeof e.select == "function";
|
|
1864
1860
|
}, Aa = function(e) {
|
|
1861
|
+
return e.tagName && e.tagName.toLowerCase() === "input" && typeof e.select == "function";
|
|
1862
|
+
}, qa = function(e) {
|
|
1865
1863
|
return (e == null ? void 0 : e.key) === "Escape" || (e == null ? void 0 : e.key) === "Esc" || (e == null ? void 0 : e.keyCode) === 27;
|
|
1866
1864
|
}, je = function(e) {
|
|
1867
1865
|
return (e == null ? void 0 : e.key) === "Tab" || (e == null ? void 0 : e.keyCode) === 9;
|
|
1868
|
-
}, Da = function(e) {
|
|
1869
|
-
return je(e) && !e.shiftKey;
|
|
1870
1866
|
}, Ra = function(e) {
|
|
1867
|
+
return je(e) && !e.shiftKey;
|
|
1868
|
+
}, Da = function(e) {
|
|
1871
1869
|
return je(e) && e.shiftKey;
|
|
1872
|
-
},
|
|
1870
|
+
}, vl = function(e) {
|
|
1873
1871
|
return setTimeout(e, 0);
|
|
1874
|
-
},
|
|
1872
|
+
}, gl = function(e, l) {
|
|
1875
1873
|
var t = -1;
|
|
1876
1874
|
return e.every(function(n, c) {
|
|
1877
1875
|
return l(n) ? (t = c, !1) : !0;
|
|
1878
1876
|
}), t;
|
|
1879
|
-
},
|
|
1877
|
+
}, qe = function(e) {
|
|
1880
1878
|
for (var l = arguments.length, t = new Array(l > 1 ? l - 1 : 0), n = 1; n < l; n++)
|
|
1881
1879
|
t[n - 1] = arguments[n];
|
|
1882
1880
|
return typeof e == "function" ? e.apply(void 0, t) : e;
|
|
1883
|
-
},
|
|
1881
|
+
}, Me = function(e) {
|
|
1884
1882
|
return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
|
|
1885
1883
|
}, Ia = [], ja = function(e, l) {
|
|
1886
|
-
var t = (l == null ? void 0 : l.document) || document, n = (l == null ? void 0 : l.trapStack) || Ia, c =
|
|
1884
|
+
var t = (l == null ? void 0 : l.document) || document, n = (l == null ? void 0 : l.trapStack) || Ia, c = pl({
|
|
1887
1885
|
returnFocusOnDeactivate: !0,
|
|
1888
1886
|
escapeDeactivates: !0,
|
|
1889
1887
|
delayInitialFocus: !0,
|
|
1890
|
-
isKeyForward:
|
|
1891
|
-
isKeyBackward:
|
|
1888
|
+
isKeyForward: Ra,
|
|
1889
|
+
isKeyBackward: Da
|
|
1892
1890
|
}, l), r = {
|
|
1893
1891
|
// containers given to createFocusTrap()
|
|
1894
1892
|
// @type {Array<HTMLElement>}
|
|
@@ -1929,32 +1927,32 @@ var vl = {
|
|
|
1929
1927
|
return T && T[w] !== void 0 ? T[w] : c[E || w];
|
|
1930
1928
|
}, i = function(T, w) {
|
|
1931
1929
|
var E = typeof (w == null ? void 0 : w.composedPath) == "function" ? w.composedPath() : void 0;
|
|
1932
|
-
return r.containerGroups.findIndex(function(
|
|
1933
|
-
var C =
|
|
1930
|
+
return r.containerGroups.findIndex(function(L) {
|
|
1931
|
+
var C = L.container, D = L.tabbableNodes;
|
|
1934
1932
|
return C.contains(T) || // fall back to explicit tabbable search which will take into consideration any
|
|
1935
1933
|
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
|
1936
1934
|
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
|
1937
1935
|
// look inside web components even if open)
|
|
1938
|
-
(E == null ? void 0 : E.includes(C)) ||
|
|
1936
|
+
(E == null ? void 0 : E.includes(C)) || D.find(function(J) {
|
|
1939
1937
|
return J === T;
|
|
1940
1938
|
});
|
|
1941
1939
|
});
|
|
1942
1940
|
}, m = function(T) {
|
|
1943
1941
|
var w = c[T];
|
|
1944
1942
|
if (typeof w == "function") {
|
|
1945
|
-
for (var E = arguments.length,
|
|
1946
|
-
|
|
1947
|
-
w = w.apply(void 0,
|
|
1943
|
+
for (var E = arguments.length, L = new Array(E > 1 ? E - 1 : 0), C = 1; C < E; C++)
|
|
1944
|
+
L[C - 1] = arguments[C];
|
|
1945
|
+
w = w.apply(void 0, L);
|
|
1948
1946
|
}
|
|
1949
1947
|
if (w === !0 && (w = void 0), !w) {
|
|
1950
1948
|
if (w === void 0 || w === !1)
|
|
1951
1949
|
return w;
|
|
1952
1950
|
throw new Error("`".concat(T, "` was specified but was not a node, or did not return a node"));
|
|
1953
1951
|
}
|
|
1954
|
-
var
|
|
1955
|
-
if (typeof w == "string" && (
|
|
1952
|
+
var D = w;
|
|
1953
|
+
if (typeof w == "string" && (D = t.querySelector(w), !D))
|
|
1956
1954
|
throw new Error("`".concat(T, "` as selector refers to no known node"));
|
|
1957
|
-
return
|
|
1955
|
+
return D;
|
|
1958
1956
|
}, k = function() {
|
|
1959
1957
|
var T = m("initialFocus");
|
|
1960
1958
|
if (T === !1)
|
|
@@ -1971,7 +1969,7 @@ var vl = {
|
|
|
1971
1969
|
return T;
|
|
1972
1970
|
}, d = function() {
|
|
1973
1971
|
if (r.containerGroups = r.containers.map(function(T) {
|
|
1974
|
-
var w = $a(T, c.tabbableOptions), E = Ca(T, c.tabbableOptions),
|
|
1972
|
+
var w = $a(T, c.tabbableOptions), E = Ca(T, c.tabbableOptions), L = w.length > 0 ? w[0] : void 0, C = w.length > 0 ? w[w.length - 1] : void 0, D = E.find(function(g) {
|
|
1975
1973
|
return Ne(g);
|
|
1976
1974
|
}), J = E.slice().reverse().find(function(g) {
|
|
1977
1975
|
return Ne(g);
|
|
@@ -1985,7 +1983,7 @@ var vl = {
|
|
|
1985
1983
|
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
1986
1984
|
posTabIndexesFound: W,
|
|
1987
1985
|
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
1988
|
-
firstTabbableNode:
|
|
1986
|
+
firstTabbableNode: L,
|
|
1989
1987
|
/** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
1990
1988
|
lastTabbableNode: C,
|
|
1991
1989
|
// NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
|
|
@@ -1996,7 +1994,7 @@ var vl = {
|
|
|
1996
1994
|
// "close enough most of the time" alternative for positive tabindexes which should generally
|
|
1997
1995
|
// be avoided anyway...
|
|
1998
1996
|
/** First tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
1999
|
-
firstDomTabbableNode:
|
|
1997
|
+
firstDomTabbableNode: D,
|
|
2000
1998
|
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
2001
1999
|
lastDomTabbableNode: J,
|
|
2002
2000
|
/**
|
|
@@ -2007,11 +2005,11 @@ var vl = {
|
|
|
2007
2005
|
* in reverse.
|
|
2008
2006
|
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
|
2009
2007
|
*/
|
|
2010
|
-
nextTabbableNode: function(
|
|
2011
|
-
var K = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, pe = w.indexOf(
|
|
2012
|
-
return pe < 0 ? K ? E.slice(E.indexOf(
|
|
2008
|
+
nextTabbableNode: function(F) {
|
|
2009
|
+
var K = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, pe = w.indexOf(F);
|
|
2010
|
+
return pe < 0 ? K ? E.slice(E.indexOf(F) + 1).find(function(Ce) {
|
|
2013
2011
|
return Ne(Ce);
|
|
2014
|
-
}) : E.slice(0, E.indexOf(
|
|
2012
|
+
}) : E.slice(0, E.indexOf(F)).reverse().find(function(Ce) {
|
|
2015
2013
|
return Ne(Ce);
|
|
2016
2014
|
}) : w[pe + (K ? 1 : -1)];
|
|
2017
2015
|
}
|
|
@@ -2032,47 +2030,47 @@ var vl = {
|
|
|
2032
2030
|
}
|
|
2033
2031
|
T.focus({
|
|
2034
2032
|
preventScroll: !!c.preventScroll
|
|
2035
|
-
}), r.mostRecentlyFocusedNode = T,
|
|
2033
|
+
}), r.mostRecentlyFocusedNode = T, Aa(T) && T.select();
|
|
2036
2034
|
}
|
|
2037
|
-
},
|
|
2035
|
+
}, A = function(T) {
|
|
2038
2036
|
var w = m("setReturnFocus", T);
|
|
2039
2037
|
return w || (w === !1 ? !1 : T);
|
|
2040
2038
|
}, P = function(T) {
|
|
2041
|
-
var w = T.target, E = T.event,
|
|
2042
|
-
w = w ||
|
|
2043
|
-
var
|
|
2039
|
+
var w = T.target, E = T.event, L = T.isBackward, C = L === void 0 ? !1 : L;
|
|
2040
|
+
w = w || Me(E), d();
|
|
2041
|
+
var D = null;
|
|
2044
2042
|
if (r.tabbableGroups.length > 0) {
|
|
2045
2043
|
var J = i(w, E), W = J >= 0 ? r.containerGroups[J] : void 0;
|
|
2046
2044
|
if (J < 0)
|
|
2047
|
-
C ?
|
|
2045
|
+
C ? D = r.tabbableGroups[r.tabbableGroups.length - 1].lastTabbableNode : D = r.tabbableGroups[0].firstTabbableNode;
|
|
2048
2046
|
else if (C) {
|
|
2049
|
-
var g =
|
|
2047
|
+
var g = gl(r.tabbableGroups, function($e) {
|
|
2050
2048
|
var Qe = $e.firstTabbableNode;
|
|
2051
2049
|
return w === Qe;
|
|
2052
2050
|
});
|
|
2053
2051
|
if (g < 0 && (W.container === w || Je(w, c.tabbableOptions) && !Ne(w, c.tabbableOptions) && !W.nextTabbableNode(w, !1)) && (g = J), g >= 0) {
|
|
2054
|
-
var
|
|
2055
|
-
|
|
2052
|
+
var F = g === 0 ? r.tabbableGroups.length - 1 : g - 1, K = r.tabbableGroups[F];
|
|
2053
|
+
D = Oe(w) >= 0 ? K.lastTabbableNode : K.lastDomTabbableNode;
|
|
2056
2054
|
} else
|
|
2057
|
-
je(E) || (
|
|
2055
|
+
je(E) || (D = W.nextTabbableNode(w, !1));
|
|
2058
2056
|
} else {
|
|
2059
|
-
var pe =
|
|
2057
|
+
var pe = gl(r.tabbableGroups, function($e) {
|
|
2060
2058
|
var Qe = $e.lastTabbableNode;
|
|
2061
2059
|
return w === Qe;
|
|
2062
2060
|
});
|
|
2063
2061
|
if (pe < 0 && (W.container === w || Je(w, c.tabbableOptions) && !Ne(w, c.tabbableOptions) && !W.nextTabbableNode(w)) && (pe = J), pe >= 0) {
|
|
2064
|
-
var Ce = pe === r.tabbableGroups.length - 1 ? 0 : pe + 1,
|
|
2065
|
-
|
|
2062
|
+
var Ce = pe === r.tabbableGroups.length - 1 ? 0 : pe + 1, Ae = r.tabbableGroups[Ce];
|
|
2063
|
+
D = Oe(w) >= 0 ? Ae.firstTabbableNode : Ae.firstDomTabbableNode;
|
|
2066
2064
|
} else
|
|
2067
|
-
je(E) || (
|
|
2065
|
+
je(E) || (D = W.nextTabbableNode(w));
|
|
2068
2066
|
}
|
|
2069
2067
|
} else
|
|
2070
|
-
|
|
2071
|
-
return
|
|
2072
|
-
},
|
|
2073
|
-
var w =
|
|
2068
|
+
D = m("fallbackFocus");
|
|
2069
|
+
return D;
|
|
2070
|
+
}, U = function(T) {
|
|
2071
|
+
var w = Me(T);
|
|
2074
2072
|
if (!(i(w, T) >= 0)) {
|
|
2075
|
-
if (
|
|
2073
|
+
if (qe(c.clickOutsideDeactivates, T)) {
|
|
2076
2074
|
o.deactivate({
|
|
2077
2075
|
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
2078
2076
|
// which will result in the outside click setting focus to the node
|
|
@@ -2084,38 +2082,38 @@ var vl = {
|
|
|
2084
2082
|
});
|
|
2085
2083
|
return;
|
|
2086
2084
|
}
|
|
2087
|
-
|
|
2085
|
+
qe(c.allowOutsideClick, T) || T.preventDefault();
|
|
2088
2086
|
}
|
|
2089
2087
|
}, Z = function(T) {
|
|
2090
|
-
var w =
|
|
2088
|
+
var w = Me(T), E = i(w, T) >= 0;
|
|
2091
2089
|
if (E || w instanceof Document)
|
|
2092
2090
|
E && (r.mostRecentlyFocusedNode = w);
|
|
2093
2091
|
else {
|
|
2094
2092
|
T.stopImmediatePropagation();
|
|
2095
|
-
var
|
|
2093
|
+
var L, C = !0;
|
|
2096
2094
|
if (r.mostRecentlyFocusedNode)
|
|
2097
2095
|
if (Oe(r.mostRecentlyFocusedNode) > 0) {
|
|
2098
|
-
var
|
|
2096
|
+
var D = i(r.mostRecentlyFocusedNode), J = r.containerGroups[D].tabbableNodes;
|
|
2099
2097
|
if (J.length > 0) {
|
|
2100
2098
|
var W = J.findIndex(function(g) {
|
|
2101
2099
|
return g === r.mostRecentlyFocusedNode;
|
|
2102
2100
|
});
|
|
2103
|
-
W >= 0 && (c.isKeyForward(r.recentNavEvent) ? W + 1 < J.length && (
|
|
2101
|
+
W >= 0 && (c.isKeyForward(r.recentNavEvent) ? W + 1 < J.length && (L = J[W + 1], C = !1) : W - 1 >= 0 && (L = J[W - 1], C = !1));
|
|
2104
2102
|
}
|
|
2105
2103
|
} else
|
|
2106
2104
|
r.containerGroups.some(function(g) {
|
|
2107
|
-
return g.tabbableNodes.some(function(
|
|
2108
|
-
return Oe(
|
|
2105
|
+
return g.tabbableNodes.some(function(F) {
|
|
2106
|
+
return Oe(F) > 0;
|
|
2109
2107
|
});
|
|
2110
2108
|
}) || (C = !1);
|
|
2111
2109
|
else
|
|
2112
2110
|
C = !1;
|
|
2113
|
-
C && (
|
|
2111
|
+
C && (L = P({
|
|
2114
2112
|
// move FROM the MRU node, not event-related node (which will be the node that is
|
|
2115
2113
|
// outside the trap causing the focus escape we're trying to fix)
|
|
2116
2114
|
target: r.mostRecentlyFocusedNode,
|
|
2117
2115
|
isBackward: c.isKeyBackward(r.recentNavEvent)
|
|
2118
|
-
})), h(
|
|
2116
|
+
})), h(L || r.mostRecentlyFocusedNode || k());
|
|
2119
2117
|
}
|
|
2120
2118
|
r.recentNavEvent = void 0;
|
|
2121
2119
|
}, ae = function(T) {
|
|
@@ -2127,22 +2125,22 @@ var vl = {
|
|
|
2127
2125
|
});
|
|
2128
2126
|
E && (je(T) && T.preventDefault(), h(E));
|
|
2129
2127
|
}, N = function(T) {
|
|
2130
|
-
if (
|
|
2128
|
+
if (qa(T) && qe(c.escapeDeactivates, T) !== !1) {
|
|
2131
2129
|
T.preventDefault(), o.deactivate();
|
|
2132
2130
|
return;
|
|
2133
2131
|
}
|
|
2134
2132
|
(c.isKeyForward(T) || c.isKeyBackward(T)) && ae(T, c.isKeyBackward(T));
|
|
2135
2133
|
}, B = function(T) {
|
|
2136
|
-
var w =
|
|
2137
|
-
i(w, T) >= 0 ||
|
|
2134
|
+
var w = Me(T);
|
|
2135
|
+
i(w, T) >= 0 || qe(c.clickOutsideDeactivates, T) || qe(c.allowOutsideClick, T) || (T.preventDefault(), T.stopImmediatePropagation());
|
|
2138
2136
|
}, u = function() {
|
|
2139
2137
|
if (r.active)
|
|
2140
|
-
return
|
|
2138
|
+
return ml.activateTrap(n, o), r.delayInitialFocusTimer = c.delayInitialFocus ? vl(function() {
|
|
2141
2139
|
h(k());
|
|
2142
|
-
}) : h(k()), t.addEventListener("focusin", Z, !0), t.addEventListener("mousedown",
|
|
2140
|
+
}) : h(k()), t.addEventListener("focusin", Z, !0), t.addEventListener("mousedown", U, {
|
|
2143
2141
|
capture: !0,
|
|
2144
2142
|
passive: !1
|
|
2145
|
-
}), t.addEventListener("touchstart",
|
|
2143
|
+
}), t.addEventListener("touchstart", U, {
|
|
2146
2144
|
capture: !0,
|
|
2147
2145
|
passive: !1
|
|
2148
2146
|
}), t.addEventListener("click", B, {
|
|
@@ -2152,13 +2150,13 @@ var vl = {
|
|
|
2152
2150
|
capture: !0,
|
|
2153
2151
|
passive: !1
|
|
2154
2152
|
}), o;
|
|
2155
|
-
},
|
|
2153
|
+
}, f = function() {
|
|
2156
2154
|
if (r.active)
|
|
2157
|
-
return t.removeEventListener("focusin", Z, !0), t.removeEventListener("mousedown",
|
|
2155
|
+
return t.removeEventListener("focusin", Z, !0), t.removeEventListener("mousedown", U, !0), t.removeEventListener("touchstart", U, !0), t.removeEventListener("click", B, !0), t.removeEventListener("keydown", N, !0), o;
|
|
2158
2156
|
}, O = function(T) {
|
|
2159
2157
|
var w = T.some(function(E) {
|
|
2160
|
-
var
|
|
2161
|
-
return
|
|
2158
|
+
var L = Array.from(E.removedNodes);
|
|
2159
|
+
return L.some(function(C) {
|
|
2162
2160
|
return C === r.mostRecentlyFocusedNode;
|
|
2163
2161
|
});
|
|
2164
2162
|
});
|
|
@@ -2181,36 +2179,36 @@ var vl = {
|
|
|
2181
2179
|
activate: function(T) {
|
|
2182
2180
|
if (r.active)
|
|
2183
2181
|
return this;
|
|
2184
|
-
var w = s(T, "onActivate"), E = s(T, "onPostActivate"),
|
|
2185
|
-
|
|
2182
|
+
var w = s(T, "onActivate"), E = s(T, "onPostActivate"), L = s(T, "checkCanFocusTrap");
|
|
2183
|
+
L || d(), r.active = !0, r.paused = !1, r.nodeFocusedBeforeActivation = t.activeElement, w == null || w();
|
|
2186
2184
|
var C = function() {
|
|
2187
|
-
|
|
2185
|
+
L && d(), u(), _(), E == null || E();
|
|
2188
2186
|
};
|
|
2189
|
-
return
|
|
2187
|
+
return L ? (L(r.containers.concat()).then(C, C), this) : (C(), this);
|
|
2190
2188
|
},
|
|
2191
2189
|
deactivate: function(T) {
|
|
2192
2190
|
if (!r.active)
|
|
2193
2191
|
return this;
|
|
2194
|
-
var w =
|
|
2192
|
+
var w = pl({
|
|
2195
2193
|
onDeactivate: c.onDeactivate,
|
|
2196
2194
|
onPostDeactivate: c.onPostDeactivate,
|
|
2197
2195
|
checkCanReturnFocus: c.checkCanReturnFocus
|
|
2198
2196
|
}, T);
|
|
2199
|
-
clearTimeout(r.delayInitialFocusTimer), r.delayInitialFocusTimer = void 0,
|
|
2200
|
-
var E = s(w, "onDeactivate"),
|
|
2197
|
+
clearTimeout(r.delayInitialFocusTimer), r.delayInitialFocusTimer = void 0, f(), r.active = !1, r.paused = !1, _(), ml.deactivateTrap(n, o);
|
|
2198
|
+
var E = s(w, "onDeactivate"), L = s(w, "onPostDeactivate"), C = s(w, "checkCanReturnFocus"), D = s(w, "returnFocus", "returnFocusOnDeactivate");
|
|
2201
2199
|
E == null || E();
|
|
2202
2200
|
var J = function() {
|
|
2203
|
-
|
|
2204
|
-
|
|
2201
|
+
vl(function() {
|
|
2202
|
+
D && h(A(r.nodeFocusedBeforeActivation)), L == null || L();
|
|
2205
2203
|
});
|
|
2206
2204
|
};
|
|
2207
|
-
return
|
|
2205
|
+
return D && C ? (C(A(r.nodeFocusedBeforeActivation)).then(J, J), this) : (J(), this);
|
|
2208
2206
|
},
|
|
2209
2207
|
pause: function(T) {
|
|
2210
2208
|
if (r.paused || !r.active)
|
|
2211
2209
|
return this;
|
|
2212
2210
|
var w = s(T, "onPause"), E = s(T, "onPostPause");
|
|
2213
|
-
return r.paused = !0, w == null || w(),
|
|
2211
|
+
return r.paused = !0, w == null || w(), f(), _(), E == null || E(), this;
|
|
2214
2212
|
},
|
|
2215
2213
|
unpause: function(T) {
|
|
2216
2214
|
if (!r.paused || !r.active)
|
|
@@ -2225,14 +2223,14 @@ var vl = {
|
|
|
2225
2223
|
}), r.active && d(), _(), this;
|
|
2226
2224
|
}
|
|
2227
2225
|
}, o.updateContainerElements(e), o;
|
|
2228
|
-
},
|
|
2226
|
+
}, Fa = Object.defineProperty, Ma = Object.defineProperties, Va = Object.getOwnPropertyDescriptors, Ge = Object.getOwnPropertySymbols, Il = Object.prototype.hasOwnProperty, jl = Object.prototype.propertyIsEnumerable, bl = (a, e, l) => e in a ? Fa(a, e, { enumerable: !0, configurable: !0, writable: !0, value: l }) : a[e] = l, La = (a, e) => {
|
|
2229
2227
|
for (var l in e || (e = {}))
|
|
2230
|
-
Il.call(e, l) &&
|
|
2228
|
+
Il.call(e, l) && bl(a, l, e[l]);
|
|
2231
2229
|
if (Ge)
|
|
2232
2230
|
for (var l of Ge(e))
|
|
2233
|
-
jl.call(e, l) &&
|
|
2231
|
+
jl.call(e, l) && bl(a, l, e[l]);
|
|
2234
2232
|
return a;
|
|
2235
|
-
}, Pa = (a, e) =>
|
|
2233
|
+
}, Pa = (a, e) => Ma(a, Va(e)), Ua = (a, e) => {
|
|
2236
2234
|
var l = {};
|
|
2237
2235
|
for (var t in a)
|
|
2238
2236
|
Il.call(a, t) && e.indexOf(t) < 0 && (l[t] = a[t]);
|
|
@@ -2243,7 +2241,7 @@ var vl = {
|
|
|
2243
2241
|
};
|
|
2244
2242
|
function Ba(a, e = {}) {
|
|
2245
2243
|
let l;
|
|
2246
|
-
const t = e, { immediate: n } = t, c =
|
|
2244
|
+
const t = e, { immediate: n } = t, c = Ua(t, ["immediate"]), r = I(!1), o = I(!1), s = (d) => l && l.activate(d), i = (d) => l && l.deactivate(d), m = () => {
|
|
2247
2245
|
l && (l.pause(), o.value = !0);
|
|
2248
2246
|
}, k = () => {
|
|
2249
2247
|
l && (l.unpause(), o.value = !1);
|
|
@@ -2251,7 +2249,7 @@ function Ba(a, e = {}) {
|
|
|
2251
2249
|
return oe(
|
|
2252
2250
|
() => Zl(a),
|
|
2253
2251
|
(d) => {
|
|
2254
|
-
d && (l = ja(d, Pa(
|
|
2252
|
+
d && (l = ja(d, Pa(La({}, c), {
|
|
2255
2253
|
onActivate() {
|
|
2256
2254
|
r.value = !0, e.onActivate && e.onActivate();
|
|
2257
2255
|
},
|
|
@@ -2273,7 +2271,7 @@ function Ba(a, e = {}) {
|
|
|
2273
2271
|
const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypress"], xa = {
|
|
2274
2272
|
key: 0,
|
|
2275
2273
|
class: "cl-mt-1 cl-opacity-60 cl-text-primary-default"
|
|
2276
|
-
}, Ha = { class: "cl-overflow-y-auto cl-overscroll-y-none cl-p-2 cl-w-full" },
|
|
2274
|
+
}, Ha = { class: "cl-overflow-y-auto cl-overscroll-y-none cl-p-2 cl-w-full" }, Fl = /* @__PURE__ */ Q({
|
|
2277
2275
|
inheritAttrs: !1,
|
|
2278
2276
|
__name: "cl-ui-modal",
|
|
2279
2277
|
props: {
|
|
@@ -2304,9 +2302,9 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2304
2302
|
function s(i) {
|
|
2305
2303
|
i.key === "Escape" && o();
|
|
2306
2304
|
}
|
|
2307
|
-
return (i, m) => (
|
|
2308
|
-
|
|
2309
|
-
(
|
|
2305
|
+
return (i, m) => (p(), y(X, null, [
|
|
2306
|
+
V(i.$slots, "trigger", ce(ve({ open: r }))),
|
|
2307
|
+
(p(), G(ll, { to: "body" }, [
|
|
2310
2308
|
S(Te, { name: "fade" }, {
|
|
2311
2309
|
default: Y(() => [
|
|
2312
2310
|
le(b("div", {
|
|
@@ -2315,7 +2313,7 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2315
2313
|
class: "cl-align-items-center cl-bg-black cl-bg-opacity-40 cl-bottom-0 cl-fixed cl-flex cl-h-full cl-justify-center cl-left-0 cl-right-0 cl-top-0 cl-w-full cl-z-40 xl:cl-h-screen"
|
|
2316
2314
|
}, [
|
|
2317
2315
|
za,
|
|
2318
|
-
b("div",
|
|
2316
|
+
b("div", fe(i.$attrs, {
|
|
2319
2317
|
class: ["cl-bg-white cl-flex cl-flex-wrap cl-max-h-[calc(100%-8rem)] cl-mx-0 cl-my-auto cl-overflow-y-auto cl-overscroll-y-none cl-relative cl-rounded-lg cl-shadow-lg xl:cl-max-h-[calc(100vh-8rem)]", {
|
|
2320
2318
|
"lg:cl-w-2/12 cl-w-10/12": i.size === "x-small",
|
|
2321
2319
|
"cl-w-6/12": i.size === "small",
|
|
@@ -2324,7 +2322,7 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2324
2322
|
}]
|
|
2325
2323
|
}), [
|
|
2326
2324
|
le(b("div", {
|
|
2327
|
-
class:
|
|
2325
|
+
class: M(["cl-absolute cl-cursor-pointer cl-right-4 cl-top-4 cl-transition-colors cl-w-3", {
|
|
2328
2326
|
"cl-text-white hover:cl-text-off-white": i.headerColour === "secondary",
|
|
2329
2327
|
"cl-text-secondary hover:cl-text-off-white": i.headerColour === "primary",
|
|
2330
2328
|
"cl-text-black hover:cl-text-grey-7": i.headerColour === "white"
|
|
@@ -2338,18 +2336,18 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2338
2336
|
[te, !i.preventClose]
|
|
2339
2337
|
]),
|
|
2340
2338
|
b("div", {
|
|
2341
|
-
class:
|
|
2339
|
+
class: M(["cl-leading-[2.75rem] cl-min-h-12 cl-overflow-hidden cl-pb-2 cl-pl-4 cl-pr-8 cl-pt-2 cl-text-2xl cl-w-full", {
|
|
2342
2340
|
"cl-bg-secondary-default cl-text-white": i.headerColour === "secondary",
|
|
2343
2341
|
"cl-bg-primary-default cl-text-secondary": i.headerColour === "primary"
|
|
2344
2342
|
}])
|
|
2345
2343
|
}, [
|
|
2346
|
-
|
|
2347
|
-
i.headerColour === "white" ? (
|
|
2344
|
+
V(i.$slots, "title"),
|
|
2345
|
+
i.headerColour === "white" ? (p(), y("hr", xa)) : j("", !0)
|
|
2348
2346
|
], 2),
|
|
2349
2347
|
b("div", Ha, [
|
|
2350
|
-
|
|
2348
|
+
V(i.$slots, "default", ce(ve({ close: o })))
|
|
2351
2349
|
]),
|
|
2352
|
-
|
|
2350
|
+
V(i.$slots, "footer", ce(ve({ close: o })))
|
|
2353
2351
|
], 16)
|
|
2354
2352
|
], 512), [
|
|
2355
2353
|
[te, t.value]
|
|
@@ -2363,7 +2361,7 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2363
2361
|
}), Ga = { class: "cl-bg-grey-0 cl-flex cl-p-1 cl-text-left" }, Za = {
|
|
2364
2362
|
key: 0,
|
|
2365
2363
|
class: "cl-w-1/2"
|
|
2366
|
-
},
|
|
2364
|
+
}, Ve = /* @__PURE__ */ Q({
|
|
2367
2365
|
__name: "cl-ui-combo-box-header",
|
|
2368
2366
|
props: {
|
|
2369
2367
|
showClearButton: { type: Boolean, default: !1 },
|
|
@@ -2374,14 +2372,14 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2374
2372
|
"clear-object": null
|
|
2375
2373
|
},
|
|
2376
2374
|
setup(a) {
|
|
2377
|
-
return (e, l) => (
|
|
2378
|
-
e.additionalText !== "" ? (
|
|
2375
|
+
return (e, l) => (p(), y("div", Ga, [
|
|
2376
|
+
e.additionalText !== "" ? (p(), y("div", Za, q(e.additionalText), 1)) : j("", !0),
|
|
2379
2377
|
b("div", {
|
|
2380
|
-
class:
|
|
2378
|
+
class: M({
|
|
2381
2379
|
"cl-w-1/2": e.additionalText !== "",
|
|
2382
2380
|
"cl-w-full": e.additionalText === ""
|
|
2383
2381
|
})
|
|
2384
|
-
},
|
|
2382
|
+
}, q(e.text), 3),
|
|
2385
2383
|
le(b("div", {
|
|
2386
2384
|
class: "cl-cursor-pointer cl-float-right",
|
|
2387
2385
|
onMousedown: l[0] || (l[0] = (t) => e.$emit("clear-object"))
|
|
@@ -2398,7 +2396,7 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2398
2396
|
}), Ka = {
|
|
2399
2397
|
key: 0,
|
|
2400
2398
|
class: "cl-w-1/2"
|
|
2401
|
-
}, Qa = { class: "cl-float-right cl-py-1 cl-text-black" },
|
|
2399
|
+
}, Qa = { class: "cl-float-right cl-py-1 cl-text-black" }, hl = /* @__PURE__ */ Q({
|
|
2402
2400
|
__name: "cl-ui-combo-box-selectable",
|
|
2403
2401
|
props: {
|
|
2404
2402
|
isCreateNewOption: { type: Boolean, default: !1 },
|
|
@@ -2413,10 +2411,10 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2413
2411
|
"option-highlighted": null
|
|
2414
2412
|
},
|
|
2415
2413
|
setup(a, { emit: e }) {
|
|
2416
|
-
const l = a, t =
|
|
2414
|
+
const l = a, t = R(() => {
|
|
2417
2415
|
var i;
|
|
2418
2416
|
return ((i = l.option) == null ? void 0 : i.name) ?? l.text;
|
|
2419
|
-
}), n =
|
|
2417
|
+
}), n = R(() => {
|
|
2420
2418
|
var i;
|
|
2421
2419
|
return ((i = l.option) == null ? void 0 : i.parentName) ?? "";
|
|
2422
2420
|
}), c = I(!1);
|
|
@@ -2432,8 +2430,8 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2432
2430
|
}
|
|
2433
2431
|
return oe(() => l.selectedIndex, () => s()), (i, m) => {
|
|
2434
2432
|
var k, d;
|
|
2435
|
-
return
|
|
2436
|
-
class:
|
|
2433
|
+
return p(), y("div", {
|
|
2434
|
+
class: M(["cl-cursor-pointer cl-duration-75 cl-flex cl-p-1 cl-text-left cl-transition-colors", {
|
|
2437
2435
|
"cl-bg-white": c.value === !1,
|
|
2438
2436
|
"cl-bg-link-light cl-text-white cl-opacity-90": c.value && i.isCreateNewOption === !1,
|
|
2439
2437
|
"cl-bg-primary-default cl-text-black cl-opacity-90": c.value && i.isCreateNewOption
|
|
@@ -2442,13 +2440,13 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2442
2440
|
onMousemove: m[0] || (m[0] = (h) => o(!0)),
|
|
2443
2441
|
onMouseleave: m[1] || (m[1] = (h) => o(!1))
|
|
2444
2442
|
}, [
|
|
2445
|
-
i.option !== null && ((k = i.option) == null ? void 0 : k.parentId) !== 0 && ((d = i.option) == null ? void 0 : d.parentId) !== void 0 ? (
|
|
2443
|
+
i.option !== null && ((k = i.option) == null ? void 0 : k.parentId) !== 0 && ((d = i.option) == null ? void 0 : d.parentId) !== void 0 ? (p(), y("div", Ka, q(n.value), 1)) : j("", !0),
|
|
2446
2444
|
b("div", {
|
|
2447
|
-
class:
|
|
2445
|
+
class: M({
|
|
2448
2446
|
"cl-w-1/2": n.value !== "",
|
|
2449
2447
|
"cl-w-full": n.value === ""
|
|
2450
2448
|
})
|
|
2451
|
-
},
|
|
2449
|
+
}, q(t.value), 3),
|
|
2452
2450
|
le(b("div", Qa, [
|
|
2453
2451
|
S(v(x), {
|
|
2454
2452
|
class: "cl-transition-colors",
|
|
@@ -2482,7 +2480,7 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2482
2480
|
"hide-dropdown": null
|
|
2483
2481
|
},
|
|
2484
2482
|
setup(a, { emit: e }) {
|
|
2485
|
-
const l = a, { t } =
|
|
2483
|
+
const l = a, { t } = ie(), n = I(""), c = I(!1), r = I(-1), o = R(() => c.value ? -1 : 0), s = I();
|
|
2486
2484
|
function i(u) {
|
|
2487
2485
|
(u === void 0 || (u == null ? void 0 : u.code.startsWith("Arrow")) === !1 && (u == null ? void 0 : u.code.startsWith("Control")) === !1 && (u == null ? void 0 : u.code.startsWith("Shift")) === !1 && (u == null ? void 0 : u.code.startsWith("Tab")) === !1 && (u == null ? void 0 : u.code) !== "Enter") && (e("search", n.value), r.value = -2);
|
|
2488
2486
|
}
|
|
@@ -2498,19 +2496,19 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2498
2496
|
function h(u) {
|
|
2499
2497
|
r.value < l.results.length - 1 ? (r.value === -2 && n.value === "" && r.value++, r.value++) : r.value = u, Z();
|
|
2500
2498
|
}
|
|
2501
|
-
function
|
|
2499
|
+
function A(u) {
|
|
2502
2500
|
r.value > u ? r.value-- : r.value = l.results.length - 1, Z();
|
|
2503
2501
|
}
|
|
2504
2502
|
function P() {
|
|
2505
2503
|
r.value >= 0 && l.results !== void 0 ? m(l.results[r.value].id) : r.value === -1 && k();
|
|
2506
2504
|
}
|
|
2507
|
-
function
|
|
2505
|
+
function U(u) {
|
|
2508
2506
|
if (u.key === "Tab" && u.shiftKey === !0) {
|
|
2509
|
-
const
|
|
2507
|
+
const f = document.getElementsByTagName("input");
|
|
2510
2508
|
let O = -1;
|
|
2511
|
-
for (let $ = 0; $ <
|
|
2512
|
-
|
|
2513
|
-
O >= 0 && (
|
|
2509
|
+
for (let $ = 0; $ < f.length; $++)
|
|
2510
|
+
f[$] === u.target && (O = $ - 1);
|
|
2511
|
+
O >= 0 && (f[O].focus(), d());
|
|
2514
2512
|
}
|
|
2515
2513
|
}
|
|
2516
2514
|
function Z() {
|
|
@@ -2525,33 +2523,33 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2525
2523
|
r.value = u;
|
|
2526
2524
|
}
|
|
2527
2525
|
function B() {
|
|
2528
|
-
l.isVisible === !0 && (n.value = "", i(),
|
|
2529
|
-
var u,
|
|
2530
|
-
return (
|
|
2526
|
+
l.isVisible === !0 && (n.value = "", i(), Fe(() => {
|
|
2527
|
+
var u, f;
|
|
2528
|
+
return (f = (u = s.value) == null ? void 0 : u.querySelector("input")) == null ? void 0 : f.focus();
|
|
2531
2529
|
}));
|
|
2532
2530
|
}
|
|
2533
2531
|
return oe(() => l.results, () => ae()), oe(() => l.errorMessage, () => ae()), oe(() => l.isVisible, () => B()), Ze(() => {
|
|
2534
2532
|
var u;
|
|
2535
|
-
return (u = s.value) == null ? void 0 : u.addEventListener("keydown",
|
|
2536
|
-
}),
|
|
2533
|
+
return (u = s.value) == null ? void 0 : u.addEventListener("keydown", U);
|
|
2534
|
+
}), tl(() => {
|
|
2537
2535
|
var u;
|
|
2538
|
-
return (u = s.value) == null ? void 0 : u.removeEventListener("keydown",
|
|
2539
|
-
}), (u,
|
|
2536
|
+
return (u = s.value) == null ? void 0 : u.removeEventListener("keydown", U);
|
|
2537
|
+
}), (u, f) => {
|
|
2540
2538
|
var O;
|
|
2541
|
-
return
|
|
2539
|
+
return p(), y("div", {
|
|
2542
2540
|
ref_key: "container",
|
|
2543
2541
|
ref: s,
|
|
2544
2542
|
class: "cl-absolute cl-bg-white cl-border cl-border-collapse cl-border-grey-0 cl-h-52 cl-overflow-y-auto cl-overscroll-y-none cl-rounded cl-text-sm cl-w-full cl-z-20",
|
|
2545
2543
|
onKeydown: [
|
|
2546
|
-
|
|
2547
|
-
|
|
2544
|
+
f[2] || (f[2] = Ee(ne(($) => A(o.value), ["prevent", "stop"]), ["up"])),
|
|
2545
|
+
f[3] || (f[3] = Ee(ne(($) => h(o.value), ["prevent", "stop"]), ["down"]))
|
|
2548
2546
|
],
|
|
2549
2547
|
onKeyup: Ee(ne(P, ["prevent", "stop"]), ["enter"])
|
|
2550
2548
|
}, [
|
|
2551
2549
|
b("div", Ya, [
|
|
2552
2550
|
S(me, {
|
|
2553
2551
|
modelValue: n.value,
|
|
2554
|
-
"onUpdate:modelValue":
|
|
2552
|
+
"onUpdate:modelValue": f[0] || (f[0] = ($) => n.value = $),
|
|
2555
2553
|
class: "!cl-mr-0 cl-w-full",
|
|
2556
2554
|
"input-type": "text",
|
|
2557
2555
|
"placeholder-text": u.searchHint,
|
|
@@ -2562,28 +2560,28 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2562
2560
|
[te, u.loading]
|
|
2563
2561
|
])
|
|
2564
2562
|
]),
|
|
2565
|
-
u.currentObjectName !== "" ? (
|
|
2563
|
+
u.currentObjectName !== "" ? (p(), G(Ve, {
|
|
2566
2564
|
key: 0,
|
|
2567
2565
|
"show-clear-button": u.canClearSelectedObject,
|
|
2568
2566
|
text: u.currentObjectName,
|
|
2569
|
-
onClearObject:
|
|
2567
|
+
onClearObject: f[1] || (f[1] = ($) => u.$emit("clear-object"))
|
|
2570
2568
|
}, null, 8, ["show-clear-button", "text"])) : j("", !0),
|
|
2571
|
-
u.objectParentType !== "" && u.results !== void 0 && u.results.length > 0 && u.errorMessage === "" ? (
|
|
2569
|
+
u.objectParentType !== "" && u.results !== void 0 && u.results.length > 0 && u.errorMessage === "" ? (p(), G(Ve, {
|
|
2572
2570
|
key: 1,
|
|
2573
2571
|
text: u.objectType,
|
|
2574
2572
|
"additional-text": u.objectParentType,
|
|
2575
2573
|
class: "cl-bg-grey-2 cl-mt-1"
|
|
2576
2574
|
}, null, 8, ["text", "additional-text"])) : j("", !0),
|
|
2577
|
-
u.results !== null && ((O = u.results) == null ? void 0 : O.length) === 0 && n.value.trim() !== "" && u.canCreateNewObject === !1 && u.errorMessage === "" ? (
|
|
2575
|
+
u.results !== null && ((O = u.results) == null ? void 0 : O.length) === 0 && n.value.trim() !== "" && u.canCreateNewObject === !1 && u.errorMessage === "" ? (p(), G(Ve, {
|
|
2578
2576
|
key: 2,
|
|
2579
2577
|
text: v(t)("comboBox.noResults", { value: n.value })
|
|
2580
2578
|
}, null, 8, ["text"])) : j("", !0),
|
|
2581
|
-
u.errorMessage !== "" ? (
|
|
2579
|
+
u.errorMessage !== "" ? (p(), G(Ve, {
|
|
2582
2580
|
key: 3,
|
|
2583
2581
|
class: "!cl-bg-danger-light cl-border-danger-light cl-rounded cl-text-danger-dark",
|
|
2584
2582
|
text: v(t)("comboBox.errorMessage", { error: u.errorMessage })
|
|
2585
2583
|
}, null, 8, ["text"])) : j("", !0),
|
|
2586
|
-
c.value ? (
|
|
2584
|
+
c.value ? (p(), G(hl, {
|
|
2587
2585
|
key: 4,
|
|
2588
2586
|
"is-create-new-option": !0,
|
|
2589
2587
|
text: v(t)("comboBox.addPrompt", { value: n.value, object: u.objectType }),
|
|
@@ -2593,8 +2591,8 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2593
2591
|
onCreateObject: k,
|
|
2594
2592
|
onOptionHighlighted: N
|
|
2595
2593
|
}, null, 8, ["text", "selected-index"])) : j("", !0),
|
|
2596
|
-
u.errorMessage === "" && u.results !== null ? (
|
|
2597
|
-
(
|
|
2594
|
+
u.errorMessage === "" && u.results !== null ? (p(), y("div", Ja, [
|
|
2595
|
+
(p(!0), y(X, null, se(u.results, ($, _) => (p(), G(hl, {
|
|
2598
2596
|
key: _,
|
|
2599
2597
|
option: $,
|
|
2600
2598
|
index: _,
|
|
@@ -2636,14 +2634,14 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2636
2634
|
"update:current-object": null
|
|
2637
2635
|
},
|
|
2638
2636
|
setup(a, { expose: e, emit: l }) {
|
|
2639
|
-
const t = a, n =
|
|
2637
|
+
const t = a, n = R(() => t.placeholderText ? t.placeholderText : r("comboBox.emptyHintText", { object: t.objectType })), c = R(() => t.searchHint ? t.searchHint : r("comboBox.searchHint", { object: t.objectType })), { t: r } = ie(), o = I(!1), s = R({
|
|
2640
2638
|
get: () => t.currentObject,
|
|
2641
2639
|
set: (C) => l("update:current-object", C)
|
|
2642
|
-
}), i = I(null), m = I(null), k =
|
|
2640
|
+
}), i = I(null), m = I(null), k = R(() => w()), d = I(""), h = I(""), A = I(), P = I(!0), U = I(!1);
|
|
2643
2641
|
function Z(C) {
|
|
2644
2642
|
var J, W;
|
|
2645
|
-
const
|
|
2646
|
-
|
|
2643
|
+
const D = ((J = L.value) == null ? void 0 : J.getBoundingClientRect().top) || 0;
|
|
2644
|
+
U.value = window.innerHeight - D < 280, t.disabled || (typeof C < "u" ? o.value = C : o.value = !o.value), (W = i.value) == null || W.blur();
|
|
2647
2645
|
}
|
|
2648
2646
|
function ae(C) {
|
|
2649
2647
|
d.value = C, l("search", C);
|
|
@@ -2655,40 +2653,40 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2655
2653
|
s.value = null, Z(!1);
|
|
2656
2654
|
}
|
|
2657
2655
|
function u(C) {
|
|
2658
|
-
const
|
|
2659
|
-
s.value =
|
|
2656
|
+
const D = f(C);
|
|
2657
|
+
s.value = D, Z(!1);
|
|
2660
2658
|
}
|
|
2661
|
-
function
|
|
2662
|
-
let
|
|
2659
|
+
function f(C) {
|
|
2660
|
+
let D = null;
|
|
2663
2661
|
if (t.results !== null) {
|
|
2664
2662
|
for (let J = 0; J < t.results.length; J++)
|
|
2665
2663
|
if (t.results[J].id === C) {
|
|
2666
|
-
|
|
2664
|
+
D = t.results[J];
|
|
2667
2665
|
break;
|
|
2668
2666
|
}
|
|
2669
2667
|
}
|
|
2670
|
-
return
|
|
2668
|
+
return D;
|
|
2671
2669
|
}
|
|
2672
2670
|
function O() {
|
|
2673
2671
|
var C;
|
|
2674
|
-
|
|
2672
|
+
A.value = {
|
|
2675
2673
|
name: d.value,
|
|
2676
2674
|
parentId: ((C = m.value) == null ? void 0 : C.id) ?? 0
|
|
2677
|
-
}, l("create-object",
|
|
2675
|
+
}, l("create-object", A.value);
|
|
2678
2676
|
}
|
|
2679
2677
|
function $() {
|
|
2680
|
-
|
|
2678
|
+
A.value = {
|
|
2681
2679
|
name: h.value,
|
|
2682
2680
|
parentId: 0
|
|
2683
|
-
}, l("create-parent-object",
|
|
2681
|
+
}, l("create-parent-object", A.value);
|
|
2684
2682
|
}
|
|
2685
2683
|
function _() {
|
|
2686
|
-
var C,
|
|
2687
|
-
(C = t.objectCreatedResponse) != null && C.error ?
|
|
2684
|
+
var C, D;
|
|
2685
|
+
(C = t.objectCreatedResponse) != null && C.error ? sl({
|
|
2688
2686
|
message: r("comboBox.createFailed", { name: d.value, error: t.objectCreatedResponse.error }),
|
|
2689
2687
|
colour: "danger",
|
|
2690
2688
|
duration: 1e4
|
|
2691
|
-
}) : (
|
|
2689
|
+
}) : (D = t.objectCreatedResponse) != null && D.id && T();
|
|
2692
2690
|
}
|
|
2693
2691
|
function z() {
|
|
2694
2692
|
var C;
|
|
@@ -2698,9 +2696,9 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2698
2696
|
});
|
|
2699
2697
|
}
|
|
2700
2698
|
function T() {
|
|
2701
|
-
var
|
|
2702
|
-
|
|
2703
|
-
message: r("comboBox.createSuccessful", { object: t.objectType, name: ((
|
|
2699
|
+
var D, J, W, g, F;
|
|
2700
|
+
sl({
|
|
2701
|
+
message: r("comboBox.createSuccessful", { object: t.objectType, name: ((D = t.objectCreatedResponse) == null ? void 0 : D.name) ?? "" }),
|
|
2704
2702
|
colour: "primary",
|
|
2705
2703
|
duration: 1e4
|
|
2706
2704
|
});
|
|
@@ -2708,7 +2706,7 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2708
2706
|
m.value && m.value.id === ((J = t.objectCreatedResponse) == null ? void 0 : J.parentId) && (C = m.value.name), s.value = {
|
|
2709
2707
|
id: ((W = t.objectCreatedResponse) == null ? void 0 : W.id) ?? 0,
|
|
2710
2708
|
name: ((g = t.objectCreatedResponse) == null ? void 0 : g.name) ?? "",
|
|
2711
|
-
parentId: ((
|
|
2709
|
+
parentId: ((F = t.objectCreatedResponse) == null ? void 0 : F.parentId) ?? 0,
|
|
2712
2710
|
parentName: C
|
|
2713
2711
|
};
|
|
2714
2712
|
}
|
|
@@ -2726,12 +2724,12 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2726
2724
|
(C = i.value) == null || C.focus();
|
|
2727
2725
|
}
|
|
2728
2726
|
});
|
|
2729
|
-
const
|
|
2730
|
-
return
|
|
2731
|
-
const J =
|
|
2732
|
-
return
|
|
2727
|
+
const L = I();
|
|
2728
|
+
return nl(L, () => o.value ? Z(!1) : ""), (C, D) => {
|
|
2729
|
+
const J = Tl("cl-ui-combo-box", !0);
|
|
2730
|
+
return p(), y("div", {
|
|
2733
2731
|
ref_key: "outsideRef",
|
|
2734
|
-
ref:
|
|
2732
|
+
ref: L,
|
|
2735
2733
|
class: "cl-relative"
|
|
2736
2734
|
}, [
|
|
2737
2735
|
b("div", eo, [
|
|
@@ -2739,19 +2737,19 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2739
2737
|
ref_key: "inputRef",
|
|
2740
2738
|
ref: i,
|
|
2741
2739
|
modelValue: k.value,
|
|
2742
|
-
"onUpdate:modelValue":
|
|
2743
|
-
class:
|
|
2740
|
+
"onUpdate:modelValue": D[0] || (D[0] = (W) => k.value = W),
|
|
2741
|
+
class: M(["!cl-mr-0 cl-mb-0 cl-rounded-r-none cl-w-full cl-z-10", {
|
|
2744
2742
|
"cl-cursor-pointer": C.disabled === !1
|
|
2745
2743
|
}]),
|
|
2746
2744
|
"input-type": "text",
|
|
2747
2745
|
"placeholder-text": n.value,
|
|
2748
|
-
onFocus:
|
|
2746
|
+
onFocus: D[1] || (D[1] = (W) => {
|
|
2749
2747
|
Z(), C.$emit("focus");
|
|
2750
2748
|
})
|
|
2751
2749
|
}, null, 8, ["modelValue", "class", "placeholder-text"]),
|
|
2752
2750
|
le(b("div", lo, [
|
|
2753
2751
|
b("div", to, [
|
|
2754
|
-
de(
|
|
2752
|
+
de(q(v(r)("comboBox.required")) + " ", 1),
|
|
2755
2753
|
S(v(x), {
|
|
2756
2754
|
class: "cl-ml-1 cl-mt-1",
|
|
2757
2755
|
icon: "ph:warning"
|
|
@@ -2760,25 +2758,25 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2760
2758
|
], 512), [
|
|
2761
2759
|
[te, C.required && C.disabled === !1 && C.currentObject === null]
|
|
2762
2760
|
]),
|
|
2763
|
-
o.value ? (
|
|
2761
|
+
o.value ? (p(), y("div", {
|
|
2764
2762
|
key: 1,
|
|
2765
|
-
class:
|
|
2763
|
+
class: M(["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", {
|
|
2766
2764
|
"cl-cursor-default": C.disabled,
|
|
2767
2765
|
"cl-cursor-pointer": C.disabled === !1
|
|
2768
2766
|
}]),
|
|
2769
|
-
onClick:
|
|
2767
|
+
onClick: D[3] || (D[3] = (W) => Z(!1))
|
|
2770
2768
|
}, [
|
|
2771
2769
|
S(v(x), {
|
|
2772
2770
|
icon: "ph:caret-up-bold",
|
|
2773
2771
|
class: "cl-ml-[4px] cl-mt-[12px]"
|
|
2774
2772
|
})
|
|
2775
|
-
], 2)) : (
|
|
2773
|
+
], 2)) : (p(), y("div", {
|
|
2776
2774
|
key: 0,
|
|
2777
|
-
class:
|
|
2775
|
+
class: M(["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", {
|
|
2778
2776
|
"cl-cursor-default": C.disabled,
|
|
2779
2777
|
"cl-cursor-pointer": C.disabled === !1
|
|
2780
2778
|
}]),
|
|
2781
|
-
onClick:
|
|
2779
|
+
onClick: D[2] || (D[2] = (W) => Z(!0))
|
|
2782
2780
|
}, [
|
|
2783
2781
|
S(v(x), {
|
|
2784
2782
|
icon: "ph:caret-down-bold",
|
|
@@ -2786,9 +2784,9 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2786
2784
|
})
|
|
2787
2785
|
], 2))
|
|
2788
2786
|
]),
|
|
2789
|
-
S(
|
|
2787
|
+
S(Fl, { size: "small" }, {
|
|
2790
2788
|
title: Y(() => [
|
|
2791
|
-
de(
|
|
2789
|
+
de(q(v(r)("comboBox.createTitle", { object: C.objectType })), 1)
|
|
2792
2790
|
]),
|
|
2793
2791
|
trigger: Y(({ open: W }) => [
|
|
2794
2792
|
le(S(Xa, {
|
|
@@ -2801,33 +2799,33 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2801
2799
|
"error-message": C.errorMessage,
|
|
2802
2800
|
"current-object-name": k.value,
|
|
2803
2801
|
"is-visible": o.value,
|
|
2804
|
-
class:
|
|
2805
|
-
"cl-bottom-full":
|
|
2802
|
+
class: M({
|
|
2803
|
+
"cl-bottom-full": U.value
|
|
2806
2804
|
}),
|
|
2807
2805
|
"search-hint": c.value,
|
|
2808
2806
|
onCreateObject: () => C.objectParentType === "" && C.skipObjectCreationModal === !0 ? O() : W(),
|
|
2809
2807
|
onSelectObject: u,
|
|
2810
2808
|
onClearObject: B,
|
|
2811
2809
|
onSearch: ae,
|
|
2812
|
-
onHideDropdown:
|
|
2810
|
+
onHideDropdown: D[4] || (D[4] = (g) => Z(!1))
|
|
2813
2811
|
}, null, 8, ["can-create-new-object", "can-clear-selected-object", "loading", "results", "object-type", "object-parent-type", "error-message", "current-object-name", "is-visible", "class", "search-hint", "onCreateObject"]), [
|
|
2814
2812
|
[te, o.value]
|
|
2815
2813
|
])
|
|
2816
2814
|
]),
|
|
2817
2815
|
footer: Y(({ close: W }) => [
|
|
2818
2816
|
b("div", oo, [
|
|
2819
|
-
S(
|
|
2817
|
+
S(be, {
|
|
2820
2818
|
class: "cl-mr-3",
|
|
2821
2819
|
colour: "default",
|
|
2822
2820
|
size: "small",
|
|
2823
2821
|
onClick: W
|
|
2824
2822
|
}, {
|
|
2825
2823
|
default: Y(() => [
|
|
2826
|
-
de(
|
|
2824
|
+
de(q(v(r)("comboBox.cancel")), 1)
|
|
2827
2825
|
]),
|
|
2828
2826
|
_: 2
|
|
2829
2827
|
}, 1032, ["onClick"]),
|
|
2830
|
-
S(
|
|
2828
|
+
S(be, {
|
|
2831
2829
|
colour: "primary",
|
|
2832
2830
|
size: "small",
|
|
2833
2831
|
disabled: !P.value,
|
|
@@ -2836,7 +2834,7 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2836
2834
|
}
|
|
2837
2835
|
}, {
|
|
2838
2836
|
default: Y(() => [
|
|
2839
|
-
de(
|
|
2837
|
+
de(q(v(r)("comboBox.create")), 1)
|
|
2840
2838
|
]),
|
|
2841
2839
|
_: 2
|
|
2842
2840
|
}, 1032, ["disabled", "onClick"])
|
|
@@ -2844,10 +2842,10 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2844
2842
|
]),
|
|
2845
2843
|
default: Y(() => [
|
|
2846
2844
|
b("div", ao, [
|
|
2847
|
-
C.objectParentType ? (
|
|
2845
|
+
C.objectParentType ? (p(), G(J, {
|
|
2848
2846
|
key: 0,
|
|
2849
2847
|
"current-object": m.value,
|
|
2850
|
-
"onUpdate:currentObject":
|
|
2848
|
+
"onUpdate:currentObject": D[5] || (D[5] = (W) => m.value = W),
|
|
2851
2849
|
class: "cl-mt-3",
|
|
2852
2850
|
results: C.parentResults,
|
|
2853
2851
|
loading: C.loading,
|
|
@@ -2861,7 +2859,7 @@ const za = /* @__PURE__ */ b("div", { tabindex: "0" }, null, -1), _a = ["onKeypr
|
|
|
2861
2859
|
}, null, 8, ["current-object", "results", "loading", "object-type", "object-created-response", "can-create-new-object", "can-clear-selected-object", "error-message"])) : j("", !0),
|
|
2862
2860
|
S(me, {
|
|
2863
2861
|
modelValue: d.value,
|
|
2864
|
-
"onUpdate:modelValue":
|
|
2862
|
+
"onUpdate:modelValue": D[6] || (D[6] = (W) => d.value = W),
|
|
2865
2863
|
label: v(r)("comboBox.createProperty"),
|
|
2866
2864
|
class: "cl-mb-2 cl-pt-3 cl-w-full",
|
|
2867
2865
|
"input-type": "text"
|
|
@@ -2888,34 +2886,34 @@ const io = {}, co = { class: "cl-flex cl-flex-wrap cl-left-0 cl-mt-4 cl-w-full"
|
|
|
2888
2886
|
class: "cl-leading-10 cl-text-sm cl-w-full"
|
|
2889
2887
|
}, po = { class: "cl-float-left" }, mo = { class: "cl-float-right" };
|
|
2890
2888
|
function vo(a, e) {
|
|
2891
|
-
return
|
|
2892
|
-
a.$slots.default ? (
|
|
2893
|
-
|
|
2889
|
+
return p(), y("div", co, [
|
|
2890
|
+
a.$slots.default ? (p(), y("div", uo, [
|
|
2891
|
+
V(a.$slots, "default")
|
|
2894
2892
|
])) : j("", !0),
|
|
2895
|
-
a.$slots.left || a.$slots.right ? (
|
|
2893
|
+
a.$slots.left || a.$slots.right ? (p(), y("div", fo, [
|
|
2896
2894
|
b("span", po, [
|
|
2897
|
-
|
|
2895
|
+
V(a.$slots, "left")
|
|
2898
2896
|
]),
|
|
2899
2897
|
b("span", mo, [
|
|
2900
|
-
|
|
2898
|
+
V(a.$slots, "right")
|
|
2901
2899
|
])
|
|
2902
2900
|
])) : j("", !0)
|
|
2903
2901
|
]);
|
|
2904
2902
|
}
|
|
2905
|
-
const go = /* @__PURE__ */
|
|
2906
|
-
function
|
|
2903
|
+
const go = /* @__PURE__ */ ke(io, [["render", vo]]);
|
|
2904
|
+
function Le(a) {
|
|
2907
2905
|
const e = a.type !== "slot" || a.slotType !== void 0 && a.field !== void 0, l = a.sortable ?? !0;
|
|
2908
2906
|
return e && l;
|
|
2909
2907
|
}
|
|
2910
|
-
function
|
|
2908
|
+
function rl(a) {
|
|
2911
2909
|
const e = a.type !== "slot" || a.slotType !== void 0 && a.field !== void 0, l = a.filterable ?? !0;
|
|
2912
2910
|
return e && l;
|
|
2913
2911
|
}
|
|
2914
2912
|
function bo(a) {
|
|
2915
|
-
return a.some((e) =>
|
|
2913
|
+
return a.some((e) => Le(e));
|
|
2916
2914
|
}
|
|
2917
|
-
function
|
|
2918
|
-
return a.some((e) =>
|
|
2915
|
+
function yl(a) {
|
|
2916
|
+
return a.some((e) => rl(e));
|
|
2919
2917
|
}
|
|
2920
2918
|
const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1 cl-grid cl-grid-cols-2 cl-justify-end cl-mb-2 lg:cl-flex lg:cl-gap-2" }, wo = { class: "cl-basis-0 cl-col-span-2 cl-flex-grow" }, ko = /* @__PURE__ */ b("hr", { class: "cl-block cl-border-grey-3 cl-col-span-2 cl-my-4 lg:cl-hidden" }, null, -1), To = {
|
|
2921
2919
|
key: 1,
|
|
@@ -2932,62 +2930,64 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
2932
2930
|
},
|
|
2933
2931
|
emits: ["update:edit-mode", "update:filterPanelOpen", "clear-filters"],
|
|
2934
2932
|
setup(a) {
|
|
2935
|
-
const e = a, { t: l } =
|
|
2936
|
-
return (n, c) => (
|
|
2933
|
+
const e = a, { t: l } = ie(), t = R(() => e.request.filters.some((n) => n.filterValue !== ""));
|
|
2934
|
+
return (n, c) => (p(), y(X, null, [
|
|
2937
2935
|
b("div", ho, [
|
|
2938
|
-
b("strong", null,
|
|
2936
|
+
b("strong", null, q(v(l)("grid.gridTools")), 1)
|
|
2939
2937
|
]),
|
|
2940
2938
|
b("div", yo, [
|
|
2941
2939
|
b("div", wo, [
|
|
2942
|
-
|
|
2940
|
+
V(n.$slots, "additional-grid-actions", ce(ve({
|
|
2943
2941
|
loading: n.loading,
|
|
2944
2942
|
editMode: n.editMode
|
|
2945
2943
|
})))
|
|
2946
2944
|
]),
|
|
2947
2945
|
ko,
|
|
2948
|
-
n.columns.some((r) => r.editable) ? (
|
|
2946
|
+
n.columns.some((r) => r.editable) ? (p(), G(be, {
|
|
2949
2947
|
key: 0,
|
|
2950
2948
|
size: "small",
|
|
2951
2949
|
colour: "default",
|
|
2950
|
+
disabled: n.loading,
|
|
2952
2951
|
onClick: c[0] || (c[0] = ne((r) => n.$emit("update:edit-mode", !n.editMode), ["prevent"]))
|
|
2953
2952
|
}, {
|
|
2954
2953
|
default: Y(() => [
|
|
2955
|
-
n.editMode ? (
|
|
2956
|
-
de(
|
|
2957
|
-
], 64)) : (
|
|
2958
|
-
de(
|
|
2954
|
+
n.editMode ? (p(), y(X, { key: 0 }, [
|
|
2955
|
+
de(q(v(l)("grid.finishEditing")), 1)
|
|
2956
|
+
], 64)) : (p(), y(X, { key: 1 }, [
|
|
2957
|
+
de(q(v(l)("grid.editData")), 1)
|
|
2959
2958
|
], 64))
|
|
2960
2959
|
]),
|
|
2961
2960
|
_: 1
|
|
2962
|
-
})) : j("", !0),
|
|
2963
|
-
n.options.hideViewManager ? j("", !0) : (
|
|
2964
|
-
|
|
2961
|
+
}, 8, ["disabled"])) : j("", !0),
|
|
2962
|
+
n.options.hideViewManager ? j("", !0) : (p(), y("div", To, [
|
|
2963
|
+
V(n.$slots, "view-manager")
|
|
2965
2964
|
])),
|
|
2966
|
-
v(
|
|
2965
|
+
v(yl)(n.columns) || v(bo)(n.columns) ? (p(), y(X, { key: 2 }, [
|
|
2967
2966
|
b("div", $o, [
|
|
2968
|
-
S(
|
|
2967
|
+
S(be, {
|
|
2969
2968
|
class: "cl-w-full",
|
|
2970
2969
|
size: "small",
|
|
2970
|
+
disabled: n.loading,
|
|
2971
2971
|
onClick: c[1] || (c[1] = ne((r) => n.$emit("update:filterPanelOpen", !n.filterPanelOpen), ["prevent"]))
|
|
2972
2972
|
}, {
|
|
2973
2973
|
default: Y(() => [
|
|
2974
|
-
de(
|
|
2974
|
+
de(q(v(l)("grid.modifyFilters")), 1)
|
|
2975
2975
|
]),
|
|
2976
2976
|
_: 1
|
|
2977
|
-
})
|
|
2977
|
+
}, 8, ["disabled"])
|
|
2978
2978
|
]),
|
|
2979
|
-
v(
|
|
2979
|
+
v(yl)(n.columns) ? (p(), G(be, {
|
|
2980
2980
|
key: 0,
|
|
2981
2981
|
size: "small",
|
|
2982
2982
|
colour: "danger",
|
|
2983
2983
|
disabled: !t.value || n.loading,
|
|
2984
|
-
class:
|
|
2984
|
+
class: M({
|
|
2985
2985
|
"cl-col-span-2": n.columns.some((r) => r.editable)
|
|
2986
2986
|
}),
|
|
2987
2987
|
onClick: c[2] || (c[2] = ne((r) => n.$emit("clear-filters"), ["prevent"]))
|
|
2988
2988
|
}, {
|
|
2989
2989
|
default: Y(() => [
|
|
2990
|
-
de(
|
|
2990
|
+
de(q(v(l)("grid.clearFilters")), 1)
|
|
2991
2991
|
]),
|
|
2992
2992
|
_: 1
|
|
2993
2993
|
}, 8, ["disabled", "class"])) : j("", !0)
|
|
@@ -3004,7 +3004,7 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3004
3004
|
}, No = {
|
|
3005
3005
|
key: 5,
|
|
3006
3006
|
class: "cl-inline-block cl-whitespace-nowrap"
|
|
3007
|
-
}, Eo = ["innerHTML"],
|
|
3007
|
+
}, Eo = ["innerHTML"], wl = /* @__PURE__ */ Q({
|
|
3008
3008
|
__name: "cl-ui-grid-cell-value",
|
|
3009
3009
|
props: {
|
|
3010
3010
|
data: {},
|
|
@@ -3013,7 +3013,7 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3013
3013
|
searchValue: {}
|
|
3014
3014
|
},
|
|
3015
3015
|
setup(a) {
|
|
3016
|
-
const e = a, { t: l, locale: t, n } =
|
|
3016
|
+
const e = a, { t: l, locale: t, n } = ie();
|
|
3017
3017
|
function c(o, s) {
|
|
3018
3018
|
let i;
|
|
3019
3019
|
e.timeZone ? i = H.fromISO(o, {
|
|
@@ -3024,23 +3024,25 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3024
3024
|
});
|
|
3025
3025
|
let m = "";
|
|
3026
3026
|
switch (s) {
|
|
3027
|
-
case
|
|
3028
|
-
case
|
|
3027
|
+
case re.SHORT_DATE:
|
|
3028
|
+
case re.DATE:
|
|
3029
3029
|
m = i.toFormat("D");
|
|
3030
3030
|
break;
|
|
3031
|
-
case
|
|
3031
|
+
case re.LONG_DATE:
|
|
3032
3032
|
m = i.toFormat("DDD");
|
|
3033
3033
|
break;
|
|
3034
|
-
case
|
|
3035
|
-
case
|
|
3034
|
+
case re.SHORT_DATETIME:
|
|
3035
|
+
case re.DATETIME:
|
|
3036
3036
|
m = i.toFormat("f");
|
|
3037
3037
|
break;
|
|
3038
|
-
case
|
|
3038
|
+
case re.LONG_DATETIME:
|
|
3039
3039
|
m = i.toFormat("fff");
|
|
3040
3040
|
break;
|
|
3041
|
-
case
|
|
3041
|
+
case re.TIME:
|
|
3042
3042
|
m = i.toFormat("t");
|
|
3043
3043
|
break;
|
|
3044
|
+
case re.MONTH_YEAR:
|
|
3045
|
+
m = i.toFormat("LLLL yyyy");
|
|
3044
3046
|
}
|
|
3045
3047
|
return m;
|
|
3046
3048
|
}
|
|
@@ -3050,27 +3052,27 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3050
3052
|
}
|
|
3051
3053
|
return (o, s) => {
|
|
3052
3054
|
var i;
|
|
3053
|
-
return o.column.type === "slot" ?
|
|
3055
|
+
return o.column.type === "slot" ? V(o.$slots, o.column.name, { key: 0 }) : o.column.type === "boolean" && o.column.field !== void 0 ? (p(), G(me, {
|
|
3054
3056
|
key: 1,
|
|
3055
3057
|
"input-type": "checkbox",
|
|
3056
3058
|
"model-value": o.data[o.column.field],
|
|
3057
3059
|
disabled: !0
|
|
3058
|
-
}, null, 8, ["model-value"])) : (o.column.type === "date" || o.column.type === "datetime" || o.column.type === "dateRange") && o.column.field !== void 0 ? (
|
|
3059
|
-
o.column.format !== void 0 ? (
|
|
3060
|
-
de(
|
|
3061
|
-
], 64)) : o.column.type === "date" || o.column.type === "dateRange" ? (
|
|
3062
|
-
de(
|
|
3063
|
-
], 64)) : (
|
|
3064
|
-
de(
|
|
3060
|
+
}, null, 8, ["model-value"])) : (o.column.type === "date" || o.column.type === "datetime" || o.column.type === "dateRange") && o.column.field !== void 0 ? (p(), y(X, { key: 2 }, [
|
|
3061
|
+
o.column.format !== void 0 ? (p(), y(X, { key: 0 }, [
|
|
3062
|
+
de(q(c(o.data[o.column.field], o.column.format)), 1)
|
|
3063
|
+
], 64)) : o.column.type === "date" || o.column.type === "dateRange" ? (p(), y(X, { key: 1 }, [
|
|
3064
|
+
de(q(c(o.data[o.column.field], v(re).DATE)), 1)
|
|
3065
|
+
], 64)) : (p(), y(X, { key: 2 }, [
|
|
3066
|
+
de(q(c(o.data[o.column.field], v(re).DATETIME)), 1)
|
|
3065
3067
|
], 64))
|
|
3066
|
-
], 64)) : o.column.type === "list" && o.column.field !== void 0 && o.column.listEntries !== void 0 ? (
|
|
3068
|
+
], 64)) : o.column.type === "list" && o.column.field !== void 0 && o.column.listEntries !== void 0 ? (p(), y("span", Oo, q(v(l)(((i = o.column.listEntries.find((m) => m.value === o.data[o.column.field])) == null ? void 0 : i.translationKey) ?? "")), 1)) : o.column.type === "number" && o.column.field !== void 0 ? (p(), y("span", So, q(v(n)(o.data[o.column.field], o.column.format ?? v(ue).DECIMAL)), 1)) : o.column.field !== void 0 ? (p(), y("span", No, [
|
|
3067
3069
|
b("span", {
|
|
3068
3070
|
innerHTML: r()
|
|
3069
3071
|
}, null, 8, Eo)
|
|
3070
3072
|
])) : j("", !0);
|
|
3071
3073
|
};
|
|
3072
3074
|
}
|
|
3073
|
-
}),
|
|
3075
|
+
}), Ao = { class: "cl-font-semibold lg:cl-hidden" }, qo = /* @__PURE__ */ Q({
|
|
3074
3076
|
__name: "cl-ui-grid-cell",
|
|
3075
3077
|
props: {
|
|
3076
3078
|
data: {},
|
|
@@ -3081,7 +3083,7 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3081
3083
|
},
|
|
3082
3084
|
emits: ["edit", "focus", "undo"],
|
|
3083
3085
|
setup(a, { emit: e }) {
|
|
3084
|
-
const l = a, { t } =
|
|
3086
|
+
const l = a, { t } = ie(), n = I(ge(l.data)), c = R(() => l.column.field !== void 0 && n.value[l.column.field] !== l.data[l.column.field]), r = R(() => {
|
|
3085
3087
|
var o;
|
|
3086
3088
|
return ((o = l.column.listEntries) == null ? void 0 : o.map((s, i) => ({
|
|
3087
3089
|
id: i,
|
|
@@ -3093,13 +3095,13 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3093
3095
|
s !== "" && (o[s] !== l.data[s] ? e("edit", o[s]) : e("undo"));
|
|
3094
3096
|
}, {
|
|
3095
3097
|
deep: !0
|
|
3096
|
-
}), (o, s) => (
|
|
3097
|
-
class:
|
|
3098
|
+
}), (o, s) => (p(), y("td", {
|
|
3099
|
+
class: M(["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", {
|
|
3098
3100
|
"cl-bg-link-lighter": c.value
|
|
3099
3101
|
}])
|
|
3100
3102
|
}, [
|
|
3101
|
-
b("span",
|
|
3102
|
-
o.editMode && o.column.editable === !0 ?
|
|
3103
|
+
b("span", Ao, q(o.column.caption), 1),
|
|
3104
|
+
o.editMode && o.column.editable === !0 ? V(o.$slots, `${o.column.name}Edit`, ce(fe({ key: 0 }, {
|
|
3103
3105
|
cellFocused: () => e("focus"),
|
|
3104
3106
|
column: o.column,
|
|
3105
3107
|
edited: c.value,
|
|
@@ -3107,14 +3109,14 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3107
3109
|
listEntries: r.value,
|
|
3108
3110
|
searchValue: o.searchValue
|
|
3109
3111
|
})), () => [
|
|
3110
|
-
S(
|
|
3112
|
+
S(wl, {
|
|
3111
3113
|
column: o.column,
|
|
3112
3114
|
data: o.data,
|
|
3113
3115
|
"time-zone": o.timeZone,
|
|
3114
3116
|
"search-value": o.searchValue
|
|
3115
3117
|
}, {
|
|
3116
3118
|
[o.column.name]: Y(() => [
|
|
3117
|
-
|
|
3119
|
+
V(o.$slots, o.column.name, ce(ve({
|
|
3118
3120
|
column: o.column,
|
|
3119
3121
|
record: o.data,
|
|
3120
3122
|
searchValue: o.searchValue
|
|
@@ -3122,7 +3124,7 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3122
3124
|
]),
|
|
3123
3125
|
_: 2
|
|
3124
3126
|
}, 1032, ["column", "data", "time-zone", "search-value"])
|
|
3125
|
-
]) : (
|
|
3127
|
+
]) : (p(), G(wl, {
|
|
3126
3128
|
key: 1,
|
|
3127
3129
|
column: o.column,
|
|
3128
3130
|
data: o.data,
|
|
@@ -3130,13 +3132,13 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3130
3132
|
"search-value": o.searchValue
|
|
3131
3133
|
}, {
|
|
3132
3134
|
[o.column.name]: Y(() => [
|
|
3133
|
-
|
|
3135
|
+
V(o.$slots, o.column.name, ce(ve({ column: o.column, record: o.data, searchValue: o.searchValue })))
|
|
3134
3136
|
]),
|
|
3135
3137
|
_: 2
|
|
3136
3138
|
}, 1032, ["column", "data", "time-zone", "search-value"]))
|
|
3137
3139
|
], 2));
|
|
3138
3140
|
}
|
|
3139
|
-
}),
|
|
3141
|
+
}), Ro = /* @__PURE__ */ Q({
|
|
3140
3142
|
__name: "cl-ui-grid-row",
|
|
3141
3143
|
props: {
|
|
3142
3144
|
data: {},
|
|
@@ -3147,8 +3149,8 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3147
3149
|
},
|
|
3148
3150
|
emits: ["cell-focus", "cell-edit", "cell-undo", "row-select"],
|
|
3149
3151
|
setup(a) {
|
|
3150
|
-
return (e, l) => (
|
|
3151
|
-
(
|
|
3152
|
+
return (e, l) => (p(), y("tr", null, [
|
|
3153
|
+
(p(!0), y(X, null, se(e.columns, (t, n) => (p(), G(qo, {
|
|
3152
3154
|
key: n,
|
|
3153
3155
|
data: e.data,
|
|
3154
3156
|
column: t,
|
|
@@ -3158,20 +3160,20 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3158
3160
|
onFocus: l[0] || (l[0] = (c) => e.$emit("cell-focus")),
|
|
3159
3161
|
onEdit: (c) => e.$emit("cell-edit", { field: t.field, value: c }),
|
|
3160
3162
|
onUndo: (c) => e.$emit("cell-undo", t.field)
|
|
3161
|
-
},
|
|
3162
|
-
|
|
3163
|
+
}, al({ _: 2 }, [
|
|
3164
|
+
se(e.$slots, (c, r) => ({
|
|
3163
3165
|
name: r,
|
|
3164
3166
|
fn: Y((o) => [
|
|
3165
|
-
|
|
3167
|
+
V(e.$slots, r, ce(ve(o)))
|
|
3166
3168
|
])
|
|
3167
3169
|
}))
|
|
3168
3170
|
]), 1032, ["data", "column", "time-zone", "search-value", "edit-mode", "onEdit", "onUndo"]))), 128))
|
|
3169
3171
|
]));
|
|
3170
3172
|
}
|
|
3171
|
-
}),
|
|
3173
|
+
}), Do = { key: 1 }, Io = ["colspan"], jo = { class: "cl-flex cl-flex-wrap cl-justify-center cl-text-center cl-text-sm cl-w-full" }, Fo = { class: "cl-mt-6 cl-w-full" }, Mo = {
|
|
3172
3174
|
key: 0,
|
|
3173
3175
|
class: "cl-mt-4"
|
|
3174
|
-
},
|
|
3176
|
+
}, Vo = { class: "cl-mb-2 cl-w-full" }, Lo = /* @__PURE__ */ Q({
|
|
3175
3177
|
__name: "cl-ui-grid-body",
|
|
3176
3178
|
props: {
|
|
3177
3179
|
columns: {},
|
|
@@ -3185,7 +3187,7 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3185
3187
|
},
|
|
3186
3188
|
emits: ["row-select", "row-edit", "clear-filters"],
|
|
3187
3189
|
setup(a, { emit: e }) {
|
|
3188
|
-
const l = a, { t } =
|
|
3190
|
+
const l = a, { t } = ie(), n = I({
|
|
3189
3191
|
index: -1,
|
|
3190
3192
|
record: {}
|
|
3191
3193
|
});
|
|
@@ -3200,16 +3202,16 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3200
3202
|
}
|
|
3201
3203
|
function s(d) {
|
|
3202
3204
|
if (d !== void 0) {
|
|
3203
|
-
const { [d]: h, ...
|
|
3205
|
+
const { [d]: h, ...A } = n.value.record;
|
|
3204
3206
|
n.value.record = {
|
|
3205
|
-
...
|
|
3207
|
+
...A
|
|
3206
3208
|
};
|
|
3207
3209
|
}
|
|
3208
3210
|
}
|
|
3209
3211
|
const i = I({});
|
|
3210
3212
|
oe(() => l.data, () => {
|
|
3211
3213
|
var d, h;
|
|
3212
|
-
return i.value = Object.fromEntries(((h = (d = l.data) == null ? void 0 : d.results) == null ? void 0 : h.map((
|
|
3214
|
+
return i.value = Object.fromEntries(((h = (d = l.data) == null ? void 0 : d.results) == null ? void 0 : h.map((A, P) => [
|
|
3213
3215
|
[P],
|
|
3214
3216
|
{
|
|
3215
3217
|
count: 0,
|
|
@@ -3223,8 +3225,8 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3223
3225
|
deep: !0,
|
|
3224
3226
|
immediate: !0
|
|
3225
3227
|
});
|
|
3226
|
-
function m(d, h,
|
|
3227
|
-
const { currentTarget: P } =
|
|
3228
|
+
function m(d, h, A) {
|
|
3229
|
+
const { currentTarget: P } = A;
|
|
3228
3230
|
l.options.rowSelectionEnabled ? (k(P), e("row-select", h)) : (i.value[d].count++, i.value[d].target = P, i.value[d].count > 1 ? (i.value[d].reset.stop(), i.value[d].count = 0, k(P), i.value[d].target = null, e("row-select", h)) : i.value[d].reset.start());
|
|
3229
3231
|
}
|
|
3230
3232
|
function k(d) {
|
|
@@ -3233,52 +3235,52 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3233
3235
|
return oe(() => l.editMode, () => {
|
|
3234
3236
|
l.editMode || (c(), n.value.index = -1);
|
|
3235
3237
|
}), (d, h) => {
|
|
3236
|
-
var
|
|
3237
|
-
return
|
|
3238
|
-
d.data && ((
|
|
3239
|
-
key:
|
|
3238
|
+
var A;
|
|
3239
|
+
return p(), y("tbody", null, [
|
|
3240
|
+
d.data && ((A = d.data.results) != null && A.length) ? (p(!0), y(X, { key: 0 }, se(d.data.results, (P, U) => (p(), G(Ro, {
|
|
3241
|
+
key: U,
|
|
3240
3242
|
data: P,
|
|
3241
3243
|
columns: d.columns,
|
|
3242
3244
|
"time-zone": d.timeZone,
|
|
3243
3245
|
"search-value": d.searchValue,
|
|
3244
3246
|
"edit-mode": d.editMode,
|
|
3245
|
-
class:
|
|
3246
|
-
"cl-bg-white":
|
|
3247
|
-
"cl-bg-off-white":
|
|
3247
|
+
class: M(["cl-bg-opacity-100 cl-cursor-pointer cl-transition-colors", {
|
|
3248
|
+
"cl-bg-white": U % 2 === 0 && d.data.totalRecords > 1,
|
|
3249
|
+
"cl-bg-off-white": U % 2 === 1 || d.data.totalRecords === 1,
|
|
3248
3250
|
"cl-cursor-pointer hover:cl-bg-link-lighter": d.options.rowSelectionEnabled && d.options.highlightRowSelection && !d.editMode
|
|
3249
3251
|
}]),
|
|
3250
3252
|
onClick: (Z) => {
|
|
3251
|
-
d.editMode || m(
|
|
3253
|
+
d.editMode || m(U, P, Z);
|
|
3252
3254
|
},
|
|
3253
3255
|
onCellFocus: (Z) => {
|
|
3254
|
-
r(
|
|
3256
|
+
r(U);
|
|
3255
3257
|
},
|
|
3256
3258
|
onCellEdit: (Z) => {
|
|
3257
|
-
o(
|
|
3259
|
+
o(U, Z);
|
|
3258
3260
|
},
|
|
3259
3261
|
onCellUndo: s
|
|
3260
|
-
},
|
|
3261
|
-
|
|
3262
|
+
}, al({ _: 2 }, [
|
|
3263
|
+
se(d.$slots, (Z, ae) => ({
|
|
3262
3264
|
name: ae,
|
|
3263
3265
|
fn: Y((N) => [
|
|
3264
|
-
|
|
3266
|
+
V(d.$slots, ae, fe(N, { disabled: d.loading }))
|
|
3265
3267
|
])
|
|
3266
3268
|
}))
|
|
3267
|
-
]), 1032, ["data", "columns", "time-zone", "search-value", "edit-mode", "class", "onClick", "onCellFocus", "onCellEdit"]))), 128)) : d.loading ? j("", !0) : (
|
|
3269
|
+
]), 1032, ["data", "columns", "time-zone", "search-value", "edit-mode", "class", "onClick", "onCellFocus", "onCellEdit"]))), 128)) : d.loading ? j("", !0) : (p(), y("tr", Do, [
|
|
3268
3270
|
b("td", {
|
|
3269
3271
|
colspan: d.columns.length
|
|
3270
3272
|
}, [
|
|
3271
3273
|
b("div", jo, [
|
|
3272
|
-
b("strong",
|
|
3273
|
-
d.request.filters.some((P) => P.filterValue !== "") ? (
|
|
3274
|
-
b("div",
|
|
3275
|
-
S(
|
|
3274
|
+
b("strong", Fo, q(v(t)("grid.noData")), 1),
|
|
3275
|
+
d.request.filters.some((P) => P.filterValue !== "") ? (p(), y("div", Mo, [
|
|
3276
|
+
b("div", Vo, q(v(t)("grid.noDataFiltersPresent")), 1),
|
|
3277
|
+
S(be, {
|
|
3276
3278
|
size: "small",
|
|
3277
3279
|
colour: "danger",
|
|
3278
3280
|
onClick: h[0] || (h[0] = ne((P) => d.$emit("clear-filters"), ["prevent"]))
|
|
3279
3281
|
}, {
|
|
3280
3282
|
default: Y(() => [
|
|
3281
|
-
de(
|
|
3283
|
+
de(q(v(t)("grid.clearFilters")), 1)
|
|
3282
3284
|
]),
|
|
3283
3285
|
_: 1
|
|
3284
3286
|
})
|
|
@@ -3292,7 +3294,7 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3292
3294
|
}), Po = {
|
|
3293
3295
|
key: 0,
|
|
3294
3296
|
class: "cl-flex cl-flex-wrap cl-justify-end cl-mt-2 cl-w-full"
|
|
3295
|
-
},
|
|
3297
|
+
}, Uo = { class: "cl-bg-off-white cl-border cl-border-grey-1 cl-flex cl-items-center cl-mb-2 cl-px-3 cl-rounded-lg cl-shadow-md cl-text-sm cl-w-full lg:cl-w-auto" }, Bo = { class: "cl-text-grey-3 cl-w-max" }, zo = { 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-lg cl-shadow-md cl-text-sm cl-w-full lg:cl-ml-2 lg:cl-w-auto mb:cl-flex-nowrap" }, _o = { 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" }, xo = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, Ho = { class: "cl-text-grey-3 cl-w-full lg:cl-mr-2 lg:cl-w-auto" }, Go = { class: "cl-flex cl-flex-wrap cl-text-sm mb:cl-flex-nowrap" }, Zo = { class: "cl-pr-2" }, Ko = ["onClick"], Qo = { 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" }, Wo = { class: "cl-mb-2 cl-text-grey-3 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, Yo = ["onClick"], Jo = { class: "cl-mb-2 cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, Xo = { 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" }, en = { class: "cl-block lg:cl-inline-block" }, ln = /* @__PURE__ */ Q({
|
|
3296
3298
|
__name: "cl-ui-grid-footer",
|
|
3297
3299
|
props: {
|
|
3298
3300
|
request: {},
|
|
@@ -3303,15 +3305,15 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3303
3305
|
"update:request": null
|
|
3304
3306
|
},
|
|
3305
3307
|
setup(a, { emit: e }) {
|
|
3306
|
-
const l = a, { n: t, t: n } =
|
|
3308
|
+
const l = a, { n: t, t: n } = ie(), c = R(() => {
|
|
3307
3309
|
var d;
|
|
3308
3310
|
return l.data !== null ? Math.ceil((((d = l.data) == null ? void 0 : d.totalRecords) ?? 0) / l.request.pageSize) : 1;
|
|
3309
|
-
}), r =
|
|
3311
|
+
}), r = R(() => {
|
|
3310
3312
|
const d = Array.from(Array(c.value + 1).keys());
|
|
3311
3313
|
let h = [];
|
|
3312
3314
|
if (d.shift(), d.length) {
|
|
3313
|
-
const
|
|
3314
|
-
h = d.slice(
|
|
3315
|
+
const A = l.request.pageNumber === c.value || l.request.pageNumber === c.value - 1 ? c.value - 3 : l.request.pageNumber - 1;
|
|
3316
|
+
h = d.slice(A, A + 3);
|
|
3315
3317
|
}
|
|
3316
3318
|
return h;
|
|
3317
3319
|
});
|
|
@@ -3335,12 +3337,12 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3335
3337
|
const h = ge(l.request);
|
|
3336
3338
|
h.pageSize = d, h.pageNumber = 1, e("update:request", h);
|
|
3337
3339
|
}
|
|
3338
|
-
const k =
|
|
3340
|
+
const k = ol(s, 750);
|
|
3339
3341
|
return (d, h) => {
|
|
3340
|
-
var
|
|
3341
|
-
return (P = (
|
|
3342
|
-
b("div",
|
|
3343
|
-
b("span", Bo,
|
|
3342
|
+
var A, P;
|
|
3343
|
+
return (P = (A = d.data) == null ? void 0 : A.results) != null && P.length && d.request ? (p(), y("div", Po, [
|
|
3344
|
+
b("div", Uo, [
|
|
3345
|
+
b("span", Bo, q(v(n)("grid.jumpToPage")), 1),
|
|
3344
3346
|
S(me, {
|
|
3345
3347
|
"model-value": d.request.pageNumber,
|
|
3346
3348
|
class: "cl-ml-1 cl-mt-0.5 cl-text-sm",
|
|
@@ -3349,19 +3351,19 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3349
3351
|
"show-label": !1,
|
|
3350
3352
|
min: 1,
|
|
3351
3353
|
max: c.value,
|
|
3352
|
-
onInput: h[0] || (h[0] = (
|
|
3354
|
+
onInput: h[0] || (h[0] = (U) => v(k)(U.target))
|
|
3353
3355
|
}, null, 8, ["model-value", "disabled", "max"])
|
|
3354
3356
|
]),
|
|
3355
3357
|
b("div", zo, [
|
|
3356
3358
|
b("div", _o, [
|
|
3357
3359
|
b("li", xo, [
|
|
3358
|
-
b("span", Ho,
|
|
3360
|
+
b("span", Ho, q(v(n)("grid.page")), 1)
|
|
3359
3361
|
]),
|
|
3360
3362
|
b("ul", Go, [
|
|
3361
|
-
b("li", Zo,
|
|
3363
|
+
b("li", Zo, q(v(t)(d.request.pageNumber, v(ue).INTEGER)) + " / " + q(v(t)(c.value, v(ue).INTEGER)), 1),
|
|
3362
3364
|
le(b("li", {
|
|
3363
3365
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
3364
|
-
onClick: h[1] || (h[1] = (
|
|
3366
|
+
onClick: h[1] || (h[1] = (U) => o(1))
|
|
3365
3367
|
}, [
|
|
3366
3368
|
S(v(x), {
|
|
3367
3369
|
icon: "ph:caret-double-left",
|
|
@@ -3372,7 +3374,7 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3372
3374
|
]),
|
|
3373
3375
|
le(b("li", {
|
|
3374
3376
|
class: "cl-cursor-pointer cl-mt-1 lg:cl-mr-2 mr-1",
|
|
3375
|
-
onClick: h[2] || (h[2] = (
|
|
3377
|
+
onClick: h[2] || (h[2] = (U) => o(d.request.pageNumber - 1))
|
|
3376
3378
|
}, [
|
|
3377
3379
|
S(v(x), {
|
|
3378
3380
|
icon: "ph:caret-left",
|
|
@@ -3381,17 +3383,17 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3381
3383
|
], 512), [
|
|
3382
3384
|
[te, d.request.pageNumber > 1]
|
|
3383
3385
|
]),
|
|
3384
|
-
(
|
|
3386
|
+
(p(!0), y(X, null, se(r.value, (U, Z) => (p(), y("li", {
|
|
3385
3387
|
key: Z,
|
|
3386
|
-
class:
|
|
3387
|
-
"cl-text-black cl-font-bold": d.request.pageNumber ===
|
|
3388
|
-
"cl-text-grey-6": d.request.pageNumber !==
|
|
3388
|
+
class: M(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
3389
|
+
"cl-text-black cl-font-bold": d.request.pageNumber === U,
|
|
3390
|
+
"cl-text-grey-6": d.request.pageNumber !== U
|
|
3389
3391
|
}]),
|
|
3390
|
-
onClick: (ae) => o(
|
|
3391
|
-
},
|
|
3392
|
+
onClick: (ae) => o(U)
|
|
3393
|
+
}, q(v(t)(U, v(ue).INTEGER)), 11, Ko))), 128)),
|
|
3392
3394
|
le(b("li", {
|
|
3393
3395
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
3394
|
-
onClick: h[3] || (h[3] = (
|
|
3396
|
+
onClick: h[3] || (h[3] = (U) => o(d.request.pageNumber + 1))
|
|
3395
3397
|
}, [
|
|
3396
3398
|
S(v(x), {
|
|
3397
3399
|
icon: "ph:caret-right",
|
|
@@ -3402,7 +3404,7 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3402
3404
|
]),
|
|
3403
3405
|
le(b("li", {
|
|
3404
3406
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
3405
|
-
onClick: h[4] || (h[4] = (
|
|
3407
|
+
onClick: h[4] || (h[4] = (U) => o(c.value))
|
|
3406
3408
|
}, [
|
|
3407
3409
|
S(v(x), {
|
|
3408
3410
|
icon: "ph:caret-double-right",
|
|
@@ -3414,19 +3416,19 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3414
3416
|
])
|
|
3415
3417
|
]),
|
|
3416
3418
|
b("ul", Qo, [
|
|
3417
|
-
b("li", Wo,
|
|
3418
|
-
(
|
|
3419
|
+
b("li", Wo, q(v(n)("grid.pageSize")), 1),
|
|
3420
|
+
(p(), y(X, null, se(i, (U, Z) => b("li", {
|
|
3419
3421
|
key: Z,
|
|
3420
|
-
class:
|
|
3421
|
-
"cl-text-black cl-font-bold": d.request.pageSize ===
|
|
3422
|
-
"cl-text-grey-6": d.request.pageSize !==
|
|
3422
|
+
class: M(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
3423
|
+
"cl-text-black cl-font-bold": d.request.pageSize === U,
|
|
3424
|
+
"cl-text-grey-6": d.request.pageSize !== U
|
|
3423
3425
|
}]),
|
|
3424
|
-
onClick: (ae) => m(
|
|
3425
|
-
},
|
|
3426
|
+
onClick: (ae) => m(U)
|
|
3427
|
+
}, q(v(t)(U, v(ue).INTEGER)), 11, Yo)), 64))
|
|
3426
3428
|
]),
|
|
3427
3429
|
b("ul", Jo, [
|
|
3428
|
-
b("li", Xo,
|
|
3429
|
-
b("li", en,
|
|
3430
|
+
b("li", Xo, q(v(n)("grid.totalRecords")), 1),
|
|
3431
|
+
b("li", en, q(v(t)(d.data.totalRecords, v(ue).INTEGER)), 1)
|
|
3430
3432
|
])
|
|
3431
3433
|
])
|
|
3432
3434
|
])) : j("", !0);
|
|
@@ -3442,14 +3444,14 @@ const ho = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, yo = { class: "cl-gap-1
|
|
|
3442
3444
|
"list",
|
|
3443
3445
|
"slot"
|
|
3444
3446
|
];
|
|
3445
|
-
function
|
|
3447
|
+
function Ml(a) {
|
|
3446
3448
|
return typeof a.caption == "string" && typeof a.name == "string" && typeof a.type == "string";
|
|
3447
3449
|
}
|
|
3448
3450
|
function an(a) {
|
|
3449
3451
|
let e = Array.isArray(a);
|
|
3450
3452
|
if (e) {
|
|
3451
3453
|
for (const l of a)
|
|
3452
|
-
if (!
|
|
3454
|
+
if (!Ml(l)) {
|
|
3453
3455
|
e = !1;
|
|
3454
3456
|
break;
|
|
3455
3457
|
}
|
|
@@ -3529,7 +3531,7 @@ const dn = {
|
|
|
3529
3531
|
"datetime"
|
|
3530
3532
|
],
|
|
3531
3533
|
key: "before"
|
|
3532
|
-
},
|
|
3534
|
+
}, kl = [
|
|
3533
3535
|
fn,
|
|
3534
3536
|
{
|
|
3535
3537
|
method: "notcontains",
|
|
@@ -3623,18 +3625,19 @@ const dn = {
|
|
|
3623
3625
|
filter: {},
|
|
3624
3626
|
column: {},
|
|
3625
3627
|
defaultOperation: {},
|
|
3628
|
+
loading: { type: Boolean },
|
|
3626
3629
|
firstHalf: { type: Boolean, default: !0 }
|
|
3627
3630
|
},
|
|
3628
3631
|
emits: ["update:filter"],
|
|
3629
3632
|
setup(a, { emit: e }) {
|
|
3630
|
-
const l = a, { t } =
|
|
3633
|
+
const l = a, { t } = ie(), n = R(() => {
|
|
3631
3634
|
let o = [];
|
|
3632
|
-
return l.column.type !== "slot" ? o =
|
|
3635
|
+
return l.column.type !== "slot" ? o = kl.filter((s) => s.allowedTypes.includes(l.column.type)) : typeof l.column.slotType < "u" && typeof l.column.field < "u" && (o = kl.filter((s) => s.allowedTypes.includes(l.column.slotType))), l.column.type === "date" || l.column.type === "datetime" || l.column.slotType === "date" || l.column.slotType === "datetime" ? o.forEach((s) => {
|
|
3633
3636
|
s.description = t(`grid.${s.key}`);
|
|
3634
3637
|
}) : o.forEach((s) => {
|
|
3635
3638
|
s.description = t(`grid.${s.method}`);
|
|
3636
3639
|
}), o;
|
|
3637
|
-
}), c =
|
|
3640
|
+
}), c = R(() => {
|
|
3638
3641
|
var s;
|
|
3639
3642
|
let o = (s = l.filter) == null ? void 0 : s.filterMethod;
|
|
3640
3643
|
return typeof o > "u" && (o = ee[l.defaultOperation].replace("_", "").toLowerCase()), n.value.find((i) => {
|
|
@@ -3657,34 +3660,35 @@ const dn = {
|
|
|
3657
3660
|
return;
|
|
3658
3661
|
e("update:filter", s);
|
|
3659
3662
|
}
|
|
3660
|
-
return (o, s) => (
|
|
3663
|
+
return (o, s) => (p(), y("div", mn, [
|
|
3661
3664
|
b("div", vn, [
|
|
3662
|
-
c.value ? (
|
|
3665
|
+
c.value ? (p(), G(v(x), {
|
|
3663
3666
|
key: 0,
|
|
3664
3667
|
icon: c.value.icon,
|
|
3665
|
-
class:
|
|
3668
|
+
class: M(["cl-text-lg", {
|
|
3666
3669
|
"cl-text-grey-4": l.filter === void 0 || l.filter.filterValue === "",
|
|
3667
3670
|
"cl-text-primary-default": l.filter && l.filter.filterValue !== ""
|
|
3668
3671
|
}])
|
|
3669
3672
|
}, null, 8, ["icon", "class"])) : j("", !0)
|
|
3670
3673
|
]),
|
|
3671
3674
|
b("div", {
|
|
3672
|
-
class:
|
|
3675
|
+
class: M(["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", {
|
|
3676
|
+
"group-hover:cl-flex group-hover:cl-h-auto group-hover:cl-w-52": o.loading === !1,
|
|
3673
3677
|
"cl-left-0": o.firstHalf,
|
|
3674
3678
|
"cl--left-44": !o.firstHalf
|
|
3675
3679
|
}])
|
|
3676
3680
|
}, [
|
|
3677
|
-
b("strong", gn,
|
|
3678
|
-
(
|
|
3681
|
+
b("strong", gn, q(v(t)("grid.availableMethods")), 1),
|
|
3682
|
+
(p(!0), y(X, null, se(n.value, (i, m) => {
|
|
3679
3683
|
var k;
|
|
3680
|
-
return
|
|
3684
|
+
return p(), y("span", {
|
|
3681
3685
|
key: m,
|
|
3682
|
-
class:
|
|
3686
|
+
class: M(["cl-cursor-pointer cl-px-4 cl-py-1 cl-transition-colors cl-w-full hover:cl-bg-grey-0", {
|
|
3683
3687
|
"cl-bg-primary-default cl-opacity-80": i.method === ((k = c.value) == null ? void 0 : k.method)
|
|
3684
3688
|
}]),
|
|
3685
3689
|
onClick: ne((d) => r(i.method), ["prevent"])
|
|
3686
3690
|
}, [
|
|
3687
|
-
de(
|
|
3691
|
+
de(q(i.description) + " ", 1),
|
|
3688
3692
|
S(v(x), {
|
|
3689
3693
|
icon: i.icon,
|
|
3690
3694
|
class: "cl-float-right cl-text-grey-4 cl-text-sm"
|
|
@@ -3697,9 +3701,10 @@ const dn = {
|
|
|
3697
3701
|
}), yn = {
|
|
3698
3702
|
key: 0,
|
|
3699
3703
|
class: "cl-border cl-border-grey-2 cl-flex cl-overflow-hidden cl-rounded-md lg:cl-overflow-visible"
|
|
3700
|
-
}, wn = /* @__PURE__ */ b("option", { value: void 0 }, null, -1),
|
|
3704
|
+
}, wn = ["disabled"], kn = /* @__PURE__ */ b("option", { value: void 0 }, null, -1), Tn = ["selected"], $n = ["selected"], Cn = ["disabled"], On = /* @__PURE__ */ b("option", { value: void 0 }, null, -1), Sn = ["value", "selected"], Nn = /* @__PURE__ */ Q({
|
|
3701
3705
|
__name: "cl-ui-grid-filter",
|
|
3702
3706
|
props: {
|
|
3707
|
+
loading: { type: Boolean },
|
|
3703
3708
|
filter: {},
|
|
3704
3709
|
column: {},
|
|
3705
3710
|
timeZone: {},
|
|
@@ -3708,64 +3713,64 @@ const dn = {
|
|
|
3708
3713
|
},
|
|
3709
3714
|
emits: ["update:filter"],
|
|
3710
3715
|
setup(a, { emit: e }) {
|
|
3711
|
-
const l = a, { locale: t, t: n } =
|
|
3716
|
+
const l = a, { locale: t, t: n } = ie();
|
|
3712
3717
|
function c() {
|
|
3713
3718
|
return l.column.type === "string" || l.column.slotType === "string" ? ee.CONTAINS : l.column.type === "datetime" || l.column.slotType === "datetime" || l.column.type === "date" || l.column.slotType === "date" ? ee.LESS_THAN : ee.EQUAL;
|
|
3714
3719
|
}
|
|
3715
|
-
const r =
|
|
3720
|
+
const r = R({
|
|
3716
3721
|
get: () => l.filter,
|
|
3717
|
-
set: (
|
|
3718
|
-
}), o =
|
|
3722
|
+
set: (f) => e("update:filter", f)
|
|
3723
|
+
}), o = R(() => l.column.type === "date" || l.column.type === "datetime" || l.column.type === "slot" && (l.column.slotType === "date" || l.column.slotType === "datetime")), s = R(() => l.column.type === "dateRange" || l.column.type === "slot" && l.column.slotType === "dateRange"), i = R(() => l.column.type === "list" || l.column.type === "slot" && l.column.slotType === "list"), m = R(() => i.value && l.column.listType === "number"), k = R({
|
|
3719
3724
|
get() {
|
|
3720
3725
|
var O, $, _, z, T, w, E;
|
|
3721
|
-
let
|
|
3722
|
-
if (
|
|
3726
|
+
let f = (O = r.value) == null ? void 0 : O[0];
|
|
3727
|
+
if (f) {
|
|
3723
3728
|
if (o.value) {
|
|
3724
3729
|
if (((($ = l.filter) == null ? void 0 : $.length) ?? 0) > 1) {
|
|
3725
|
-
const
|
|
3726
|
-
|
|
3730
|
+
const L = (_ = r.value) == null ? void 0 : _.find((D) => D.filterOperation === ee.EQUAL_OR_GREATER_THAN), C = (z = r.value) == null ? void 0 : z.find((D) => D.filterOperation === ee.LESS_THAN);
|
|
3731
|
+
L && C && (f = {
|
|
3727
3732
|
filterOnColumn: l.column.field,
|
|
3728
3733
|
filterOperation: ee.EQUAL,
|
|
3729
3734
|
filterMethod: "equal",
|
|
3730
|
-
filterValue:
|
|
3735
|
+
filterValue: L.filterValue
|
|
3731
3736
|
});
|
|
3732
|
-
} else if (
|
|
3733
|
-
let
|
|
3737
|
+
} else if (f.filterOperation === ee.EQUAL_OR_LESS_THAN || f.filterOperation === ee.GREATER_THAN) {
|
|
3738
|
+
let L = H.fromISO(f.filterValue, {
|
|
3734
3739
|
zone: l.timeZone ?? "UTC"
|
|
3735
3740
|
});
|
|
3736
|
-
l.column.type === "date" || l.column.type === "slot" && l.column.slotType === "date" ?
|
|
3741
|
+
l.column.type === "date" || l.column.type === "slot" && l.column.slotType === "date" ? L = L.minus({ days: 1 }) : L = L.minus({ minutes: 1 }), f = {
|
|
3737
3742
|
filterOnColumn: l.column.field,
|
|
3738
|
-
filterOperation:
|
|
3739
|
-
filterMethod:
|
|
3740
|
-
filterValue:
|
|
3743
|
+
filterOperation: f.filterOperation,
|
|
3744
|
+
filterMethod: f.filterOperation === ee.EQUAL_OR_LESS_THAN ? "equalorlessthan" : "greaterthan",
|
|
3745
|
+
filterValue: L.plus({ milliseconds: 1 }).toISO() ?? ""
|
|
3741
3746
|
};
|
|
3742
3747
|
}
|
|
3743
3748
|
} else if (s.value && (((T = l.filter) == null ? void 0 : T.length) ?? 0) > 1) {
|
|
3744
|
-
const
|
|
3745
|
-
|
|
3749
|
+
const L = (w = r.value) == null ? void 0 : w.find((D) => D.filterOperation === ee.EQUAL_OR_GREATER_THAN), C = (E = r.value) == null ? void 0 : E.find((D) => D.filterOperation === ee.EQUAL_OR_LESS_THAN);
|
|
3750
|
+
L && C && (f = {
|
|
3746
3751
|
filterOnColumn: l.column.field,
|
|
3747
3752
|
filterOperation: ee.EQUAL,
|
|
3748
3753
|
filterMethod: "equal",
|
|
3749
3754
|
filterValue: {
|
|
3750
|
-
start:
|
|
3755
|
+
start: L.filterValue,
|
|
3751
3756
|
end: C.filterValue
|
|
3752
3757
|
}
|
|
3753
3758
|
});
|
|
3754
3759
|
}
|
|
3755
3760
|
}
|
|
3756
|
-
return
|
|
3761
|
+
return f;
|
|
3757
3762
|
},
|
|
3758
|
-
set(
|
|
3763
|
+
set(f) {
|
|
3759
3764
|
let O = null;
|
|
3760
3765
|
if (o.value) {
|
|
3761
|
-
const $ =
|
|
3766
|
+
const $ = f, _ = ($ == null ? void 0 : $.filterMethod) && h($.filterMethod, $.filterValue, "equal"), z = ($ == null ? void 0 : $.filterMethod) && h($.filterMethod, $.filterValue, "equalorlessthan"), T = ($ == null ? void 0 : $.filterMethod) && h($.filterMethod, $.filterValue, "greaterthan");
|
|
3762
3767
|
if (_) {
|
|
3763
3768
|
let w = H.fromISO($.filterValue, {
|
|
3764
3769
|
zone: l.timeZone ?? "UTC"
|
|
3765
3770
|
}).set({ second: 0, millisecond: 0 });
|
|
3766
3771
|
const E = w.toISO();
|
|
3767
3772
|
l.column.type === "date" || l.column.type === "slot" && l.column.slotType === "date" ? w = w.plus({ days: 1 }) : w = w.plus({ minutes: 1 });
|
|
3768
|
-
const
|
|
3773
|
+
const L = w.toISO();
|
|
3769
3774
|
O = [
|
|
3770
3775
|
{
|
|
3771
3776
|
filterOnColumn: l.column.field,
|
|
@@ -3777,7 +3782,7 @@ const dn = {
|
|
|
3777
3782
|
filterOnColumn: l.column.field,
|
|
3778
3783
|
filterOperation: ee.LESS_THAN,
|
|
3779
3784
|
filterMethod: "lessthan",
|
|
3780
|
-
filterValue:
|
|
3785
|
+
filterValue: L
|
|
3781
3786
|
}
|
|
3782
3787
|
];
|
|
3783
3788
|
} else if (z || T) {
|
|
@@ -3793,8 +3798,8 @@ const dn = {
|
|
|
3793
3798
|
}
|
|
3794
3799
|
];
|
|
3795
3800
|
}
|
|
3796
|
-
} else if (s.value && (
|
|
3797
|
-
const $ =
|
|
3801
|
+
} else if (s.value && (f != null && f.filterValue)) {
|
|
3802
|
+
const $ = f.filterValue, _ = H.fromISO($.start, {
|
|
3798
3803
|
zone: l.timeZone ?? "UTC"
|
|
3799
3804
|
}).toISO(), z = H.fromISO($.end, {
|
|
3800
3805
|
zone: l.timeZone ?? "UTC"
|
|
@@ -3815,7 +3820,7 @@ const dn = {
|
|
|
3815
3820
|
];
|
|
3816
3821
|
}
|
|
3817
3822
|
if (O === null) {
|
|
3818
|
-
const $ =
|
|
3823
|
+
const $ = f;
|
|
3819
3824
|
O = $ && [$];
|
|
3820
3825
|
}
|
|
3821
3826
|
if (O && (o.value || s.value))
|
|
@@ -3823,23 +3828,23 @@ const dn = {
|
|
|
3823
3828
|
l.timeZone ? $.filterValue = H.fromISO($.filterValue).setZone("UTC").toISO() ?? "" : $.filterValue = $.filterValue.replace("Z", "");
|
|
3824
3829
|
r.value = O;
|
|
3825
3830
|
}
|
|
3826
|
-
}), d =
|
|
3831
|
+
}), d = R({
|
|
3827
3832
|
get: () => k.value,
|
|
3828
|
-
set(
|
|
3829
|
-
k.value =
|
|
3833
|
+
set(f) {
|
|
3834
|
+
k.value = f;
|
|
3830
3835
|
}
|
|
3831
3836
|
});
|
|
3832
|
-
function h(
|
|
3833
|
-
return O !== void 0 && O !== "" &&
|
|
3837
|
+
function h(f, O, $) {
|
|
3838
|
+
return O !== void 0 && O !== "" && f === $ && o.value;
|
|
3834
3839
|
}
|
|
3835
|
-
const
|
|
3836
|
-
var
|
|
3837
|
-
return ((
|
|
3838
|
-
}), P =
|
|
3839
|
-
function N(
|
|
3840
|
+
const A = R(() => {
|
|
3841
|
+
var f;
|
|
3842
|
+
return ((f = k.value) == null ? void 0 : f.filterValue) ?? "";
|
|
3843
|
+
}), P = R(() => A.value === "" ? null : A.value), U = R(() => A.value === "" ? null : A.value), Z = R(() => Intl.NumberFormat(t.value).format(1.1).replace(/[0-9]+/g, "")), ae = R(() => rl(l.column));
|
|
3844
|
+
function N(f, O) {
|
|
3840
3845
|
var T;
|
|
3841
3846
|
let $, _ = !1;
|
|
3842
|
-
const z = ((
|
|
3847
|
+
const z = ((f == null ? void 0 : f.value) ?? O).trim();
|
|
3843
3848
|
if (k.value)
|
|
3844
3849
|
_ = ((T = k.value) == null ? void 0 : T.filterValue) === z, $ = ge(d.value), $.filterValue = z;
|
|
3845
3850
|
else if (z !== "" && typeof l.column.field < "u") {
|
|
@@ -3854,107 +3859,114 @@ const dn = {
|
|
|
3854
3859
|
return;
|
|
3855
3860
|
_ === !1 && (k.value = $);
|
|
3856
3861
|
}
|
|
3857
|
-
function B(
|
|
3858
|
-
let $, _ = (
|
|
3862
|
+
function B(f, O) {
|
|
3863
|
+
let $, _ = (f == null ? void 0 : f.value) ?? O ?? 0;
|
|
3859
3864
|
l.column.format === ue.INTEGER ? (typeof _ == "string" && (_ = parseInt(_)), $ = Math.round(_)) : (typeof _ == "string" && (_ = parseFloat(_.replace(Z.value, "."))), $ = _), N(null, isNaN($) ? "" : $.toString());
|
|
3860
3865
|
}
|
|
3861
|
-
function u(
|
|
3866
|
+
function u(f) {
|
|
3862
3867
|
var _;
|
|
3863
3868
|
let O, $ = !1;
|
|
3864
3869
|
if (k.value)
|
|
3865
|
-
$ = ((_ = k.value) == null ? void 0 : _.filterValue) ===
|
|
3866
|
-
else if (
|
|
3870
|
+
$ = ((_ = k.value) == null ? void 0 : _.filterValue) === f, O = ge(k.value), O.filterValue = f ?? "";
|
|
3871
|
+
else if (f !== null && typeof l.column.field < "u") {
|
|
3867
3872
|
const z = c();
|
|
3868
3873
|
O = {
|
|
3869
3874
|
filterOnColumn: l.column.field,
|
|
3870
3875
|
filterMethod: ee[z].replace("_", "").toLowerCase(),
|
|
3871
3876
|
filterOperation: z,
|
|
3872
|
-
filterValue:
|
|
3877
|
+
filterValue: f
|
|
3873
3878
|
};
|
|
3874
3879
|
} else
|
|
3875
3880
|
return;
|
|
3876
3881
|
$ === !1 && (k.value = O);
|
|
3877
3882
|
}
|
|
3878
|
-
return (
|
|
3879
|
-
|
|
3883
|
+
return (f, O) => ae.value ? (p(), y("div", yn, [
|
|
3884
|
+
f.column.type === "boolean" || f.column.type === "slot" && f.column.slotType === "boolean" ? (p(), y("select", {
|
|
3880
3885
|
key: 0,
|
|
3886
|
+
disabled: f.loading,
|
|
3881
3887
|
class: "!cl-h-[2rem] cl-bg-white cl-border-none cl-mb-0 cl-rounded-md cl-w-full",
|
|
3882
3888
|
onChange: O[0] || (O[0] = ($) => N($.target))
|
|
3883
3889
|
}, [
|
|
3884
|
-
|
|
3890
|
+
kn,
|
|
3885
3891
|
b("option", {
|
|
3886
3892
|
value: "true",
|
|
3887
|
-
selected:
|
|
3888
|
-
},
|
|
3893
|
+
selected: A.value === "true"
|
|
3894
|
+
}, q(v(n)("grid.true")), 9, Tn),
|
|
3889
3895
|
b("option", {
|
|
3890
3896
|
value: "false",
|
|
3891
|
-
selected:
|
|
3892
|
-
},
|
|
3893
|
-
],
|
|
3897
|
+
selected: A.value === "false"
|
|
3898
|
+
}, q(v(n)("grid.false")), 9, $n)
|
|
3899
|
+
], 40, wn)) : o.value ? (p(), G(me, {
|
|
3894
3900
|
key: 1,
|
|
3895
3901
|
"model-value": P.value,
|
|
3896
3902
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
3897
|
-
|
|
3903
|
+
disabled: f.loading,
|
|
3904
|
+
label: f.column.caption,
|
|
3898
3905
|
"show-label": !1,
|
|
3899
|
-
"input-type":
|
|
3900
|
-
"time-zone":
|
|
3906
|
+
"input-type": f.column.type === "slot" ? f.column.slotType : f.column.type,
|
|
3907
|
+
"time-zone": f.timeZone,
|
|
3901
3908
|
"onUpdate:modelValue": O[1] || (O[1] = ($) => N(null, $ ?? ""))
|
|
3902
|
-
}, null, 8, ["model-value", "label", "input-type", "time-zone"])) : s.value ? (
|
|
3909
|
+
}, null, 8, ["model-value", "disabled", "label", "input-type", "time-zone"])) : s.value ? (p(), G(me, {
|
|
3903
3910
|
key: 2,
|
|
3904
|
-
"model-value":
|
|
3911
|
+
"model-value": U.value,
|
|
3905
3912
|
class: "!cl-h-[2rem] [&_.clear-icon]:-cl-m-1 [&_.icon]:cl-text-sm cl-border-none cl-mb-0 cl-w-full",
|
|
3913
|
+
disabled: f.loading,
|
|
3906
3914
|
"input-type": "dateRange",
|
|
3907
|
-
"time-zone":
|
|
3908
|
-
"quick-date-scope":
|
|
3915
|
+
"time-zone": f.timeZone,
|
|
3916
|
+
"quick-date-scope": f.quickDateScope,
|
|
3909
3917
|
"onUpdate:modelValue": O[2] || (O[2] = ($) => u($))
|
|
3910
|
-
}, null, 8, ["model-value", "time-zone", "quick-date-scope"])) :
|
|
3918
|
+
}, null, 8, ["model-value", "disabled", "time-zone", "quick-date-scope"])) : f.column.type === "number" || f.column.type === "slot" && f.column.slotType === "number" ? (p(), G(me, {
|
|
3911
3919
|
key: 3,
|
|
3912
|
-
"model-value":
|
|
3920
|
+
"model-value": A.value,
|
|
3913
3921
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
3922
|
+
disabled: f.loading,
|
|
3914
3923
|
"input-type": "number",
|
|
3915
3924
|
"show-arrows": !1,
|
|
3916
3925
|
onInput: O[3] || (O[3] = ($, _) => B(null, _))
|
|
3917
|
-
}, null, 8, ["model-value"])) :
|
|
3926
|
+
}, null, 8, ["model-value", "disabled"])) : f.column.type === "string" || f.column.type === "slot" && f.column.slotType === "string" ? (p(), G(me, {
|
|
3918
3927
|
key: 4,
|
|
3919
|
-
"model-value":
|
|
3928
|
+
"model-value": A.value,
|
|
3920
3929
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
3930
|
+
disabled: f.loading,
|
|
3921
3931
|
"input-type": "text",
|
|
3922
3932
|
onInput: O[4] || (O[4] = ($, _) => N(null, _))
|
|
3923
|
-
}, null, 8, ["model-value"])) : i.value ? (
|
|
3933
|
+
}, null, 8, ["model-value", "disabled"])) : i.value ? (p(), y("select", {
|
|
3924
3934
|
key: 5,
|
|
3925
3935
|
class: "!cl-h-[2rem] cl-bg-white cl-border-none cl-mb-0 cl-rounded-md cl-w-full",
|
|
3936
|
+
disabled: f.loading,
|
|
3926
3937
|
onChange: O[5] || (O[5] = ($) => m.value ? B($.target) : N($.target))
|
|
3927
3938
|
}, [
|
|
3928
|
-
|
|
3929
|
-
(
|
|
3939
|
+
On,
|
|
3940
|
+
(p(!0), y(X, null, se(f.column.listEntries ?? [], ($) => (p(), y("option", {
|
|
3930
3941
|
key: $.value,
|
|
3931
3942
|
value: $.value,
|
|
3932
|
-
selected:
|
|
3933
|
-
},
|
|
3934
|
-
],
|
|
3935
|
-
s.value ? j("", !0) : (
|
|
3943
|
+
selected: A.value === $.value.toString()
|
|
3944
|
+
}, q(v(n)($.translationKey)), 9, Sn))), 128))
|
|
3945
|
+
], 40, Cn)) : j("", !0),
|
|
3946
|
+
s.value ? j("", !0) : (p(), G(hn, {
|
|
3936
3947
|
key: 6,
|
|
3937
3948
|
filter: d.value,
|
|
3938
3949
|
"onUpdate:filter": O[6] || (O[6] = ($) => d.value = $),
|
|
3939
|
-
|
|
3950
|
+
loading: f.loading,
|
|
3951
|
+
column: f.column,
|
|
3940
3952
|
"default-operation": c(),
|
|
3941
|
-
"first-half":
|
|
3942
|
-
}, null, 8, ["filter", "column", "default-operation", "first-half"]))
|
|
3953
|
+
"first-half": f.firstHalf
|
|
3954
|
+
}, null, 8, ["filter", "loading", "column", "default-operation", "first-half"]))
|
|
3943
3955
|
])) : j("", !0);
|
|
3944
3956
|
}
|
|
3945
|
-
}),
|
|
3957
|
+
}), En = { class: "-cl-top-1 cl-bg-white cl-shadow-sm cl-sticky cl-z-20 lg:cl-bg-transparent lg:cl-relative lg:cl-shadow-none" }, An = { class: "cl-hidden lg:cl-table-row" }, qn = ["onClick"], Rn = { class: "cl-flex cl-justify-end cl-w-full lg:cl-hidden" }, Dn = { class: "cl-col-span-2 lg:cl-hidden" }, In = ["onClick"], jn = { class: "cl-font-normal cl-mr-1" }, Fn = /* @__PURE__ */ Q({
|
|
3946
3958
|
__name: "cl-ui-grid-header",
|
|
3947
3959
|
props: {
|
|
3948
3960
|
request: {},
|
|
3949
3961
|
columns: {},
|
|
3950
3962
|
options: {},
|
|
3963
|
+
loading: { type: Boolean },
|
|
3951
3964
|
filterPanelOpen: { type: Boolean },
|
|
3952
|
-
timeZone: {}
|
|
3953
|
-
quickDateScope: {}
|
|
3965
|
+
timeZone: {}
|
|
3954
3966
|
},
|
|
3955
3967
|
emits: ["update:request", "update:filterPanelOpen"],
|
|
3956
3968
|
setup(a, { emit: e }) {
|
|
3957
|
-
const l = a, { t } =
|
|
3969
|
+
const l = a, { t } = ie(), n = R({
|
|
3958
3970
|
get: () => l.request,
|
|
3959
3971
|
set: (s) => e("update:request", s)
|
|
3960
3972
|
});
|
|
@@ -3980,17 +3992,17 @@ const dn = {
|
|
|
3980
3992
|
], i.pageNumber = 1, n.value = i;
|
|
3981
3993
|
}
|
|
3982
3994
|
}
|
|
3983
|
-
return (s, i) => (
|
|
3984
|
-
b("tr",
|
|
3985
|
-
(
|
|
3995
|
+
return (s, i) => (p(), y("thead", En, [
|
|
3996
|
+
b("tr", An, [
|
|
3997
|
+
(p(!0), y(X, null, se(s.columns, (m, k) => (p(), y("th", {
|
|
3986
3998
|
key: k,
|
|
3987
|
-
class:
|
|
3988
|
-
"cl-cursor-pointer": v(
|
|
3999
|
+
class: M(["cl-text-grey-3 cl-text-sm", {
|
|
4000
|
+
"cl-cursor-pointer": v(Le)(m) && s.loading === !1
|
|
3989
4001
|
}]),
|
|
3990
|
-
onClick: (d) => v(
|
|
4002
|
+
onClick: (d) => v(Le)(m) && s.loading === !1 ? r(m.field) : () => {
|
|
3991
4003
|
}
|
|
3992
4004
|
}, [
|
|
3993
|
-
de(
|
|
4005
|
+
de(q(m.caption) + " ", 1),
|
|
3994
4006
|
le(S(v(x), {
|
|
3995
4007
|
class: "cl-inline-block",
|
|
3996
4008
|
icon: "ph:caret-up"
|
|
@@ -4003,62 +4015,63 @@ const dn = {
|
|
|
4003
4015
|
}, null, 512), [
|
|
4004
4016
|
[te, c(m, !1)]
|
|
4005
4017
|
])
|
|
4006
|
-
], 10,
|
|
4018
|
+
], 10, qn))), 128))
|
|
4007
4019
|
]),
|
|
4008
4020
|
b("tr", {
|
|
4009
|
-
class:
|
|
4021
|
+
class: M(["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", {
|
|
4010
4022
|
"cl-hidden lg:cl-table-row": !s.filterPanelOpen
|
|
4011
4023
|
}])
|
|
4012
4024
|
}, [
|
|
4013
|
-
b("div",
|
|
4025
|
+
b("div", Rn, [
|
|
4014
4026
|
S(v(x), {
|
|
4015
4027
|
class: "cl-text-grey-4 hover:cl-cursor-pointer hover:cl-text-link-default",
|
|
4016
4028
|
icon: "ph:x",
|
|
4017
4029
|
size: 16,
|
|
4018
|
-
onClick: i[0] || (i[0] = ne((m) => s.$emit("update:filterPanelOpen", !1), ["prevent"]))
|
|
4030
|
+
onClick: i[0] || (i[0] = ne((m) => s.loading === !1 ? s.$emit("update:filterPanelOpen", !1) : void 0, ["prevent"]))
|
|
4019
4031
|
})
|
|
4020
4032
|
]),
|
|
4021
|
-
(
|
|
4033
|
+
(p(!0), y(X, null, se(s.columns, (m, k) => (p(), y("th", {
|
|
4022
4034
|
key: k,
|
|
4023
|
-
class:
|
|
4024
|
-
"cl-hidden lg:cl-table-cell": !v(
|
|
4035
|
+
class: M(["cl-grid cl-grid-cols-4 cl-py-1 cl-text-xs cl-w-full lg:cl-table-cell lg:cl-w-auto", {
|
|
4036
|
+
"cl-hidden lg:cl-table-cell": !v(rl)(m)
|
|
4025
4037
|
}])
|
|
4026
4038
|
}, [
|
|
4027
|
-
b("div",
|
|
4028
|
-
v(
|
|
4039
|
+
b("div", Dn, q(m.caption), 1),
|
|
4040
|
+
v(Le)(m) ? (p(), y("div", {
|
|
4029
4041
|
key: 0,
|
|
4030
4042
|
class: "cl-col-span-2 cl-gap-1 cl-span lg:cl-hidden",
|
|
4031
|
-
onClick: (d) => r(m.field)
|
|
4043
|
+
onClick: (d) => s.loading === !1 ? r(m.field) : void 0
|
|
4032
4044
|
}, [
|
|
4033
|
-
b("span",
|
|
4034
|
-
c(m, !0) ? (
|
|
4045
|
+
b("span", jn, q(v(t)("grid.sortBy")), 1),
|
|
4046
|
+
c(m, !0) ? (p(), G(v(x), {
|
|
4035
4047
|
key: 0,
|
|
4036
4048
|
class: "cl-cursor-pointer cl-inline-block",
|
|
4037
4049
|
icon: "ph:caret-up"
|
|
4038
|
-
})) : c(m, !1) ? (
|
|
4050
|
+
})) : c(m, !1) ? (p(), G(v(x), {
|
|
4039
4051
|
key: 1,
|
|
4040
4052
|
class: "cl-cursor-pointer cl-inline-block",
|
|
4041
4053
|
icon: "ph:caret-down"
|
|
4042
|
-
})) : (
|
|
4054
|
+
})) : (p(), G(v(x), {
|
|
4043
4055
|
key: 2,
|
|
4044
4056
|
class: "cl-cursor-pointer cl-inline-block",
|
|
4045
4057
|
icon: "ph:minus"
|
|
4046
4058
|
}))
|
|
4047
|
-
], 8,
|
|
4048
|
-
S(
|
|
4059
|
+
], 8, In)) : j("", !0),
|
|
4060
|
+
S(Nn, {
|
|
4049
4061
|
class: "cl-col-span-4",
|
|
4062
|
+
loading: s.loading,
|
|
4050
4063
|
filter: n.value.filters.filter((d) => d.filterOnColumn === m.field),
|
|
4051
4064
|
column: m,
|
|
4052
4065
|
"time-zone": s.timeZone,
|
|
4053
|
-
"quick-date-scope":
|
|
4066
|
+
"quick-date-scope": m.quickDateScope ?? null,
|
|
4054
4067
|
"first-half": k <= s.columns.length / 2,
|
|
4055
4068
|
"onUpdate:filter": o
|
|
4056
|
-
}, null, 8, ["filter", "column", "time-zone", "quick-date-scope", "first-half"])
|
|
4069
|
+
}, null, 8, ["loading", "filter", "column", "time-zone", "quick-date-scope", "first-half"])
|
|
4057
4070
|
], 2))), 128))
|
|
4058
4071
|
], 2)
|
|
4059
4072
|
]));
|
|
4060
4073
|
}
|
|
4061
|
-
}),
|
|
4074
|
+
}), Mn = { class: "cl-flex cl-mb-2" }, Vn = /* @__PURE__ */ Q({
|
|
4062
4075
|
__name: "cl-ui-grid-search",
|
|
4063
4076
|
props: {
|
|
4064
4077
|
searchValue: {},
|
|
@@ -4068,7 +4081,7 @@ const dn = {
|
|
|
4068
4081
|
},
|
|
4069
4082
|
emits: ["update:searchValue", "update:request"],
|
|
4070
4083
|
setup(a, { emit: e }) {
|
|
4071
|
-
const l = a, t =
|
|
4084
|
+
const l = a, t = R({
|
|
4072
4085
|
get: () => l.request,
|
|
4073
4086
|
set: (r) => e("update:request", r)
|
|
4074
4087
|
});
|
|
@@ -4087,11 +4100,11 @@ const dn = {
|
|
|
4087
4100
|
}, e("update:searchValue", r);
|
|
4088
4101
|
}
|
|
4089
4102
|
oe(() => l.columns, () => n(l.searchValue));
|
|
4090
|
-
const { t: c } =
|
|
4103
|
+
const { t: c } = ie();
|
|
4091
4104
|
return (r, o) => {
|
|
4092
|
-
const s =
|
|
4093
|
-
return
|
|
4094
|
-
b("div",
|
|
4105
|
+
const s = Tl("icon");
|
|
4106
|
+
return V(r.$slots, "search", ce(ve({ searchValue: r.searchValue, performSearch: n })), () => [
|
|
4107
|
+
b("div", Mn, [
|
|
4095
4108
|
S(me, {
|
|
4096
4109
|
"model-value": r.searchValue,
|
|
4097
4110
|
class: "cl-grow",
|
|
@@ -4110,15 +4123,16 @@ const dn = {
|
|
|
4110
4123
|
]);
|
|
4111
4124
|
};
|
|
4112
4125
|
}
|
|
4113
|
-
}),
|
|
4126
|
+
}), Ln = { class: "cl-fixed cl-flex cl-h-full cl-justify-end cl-right-0 cl-shadow-lg cl-top-0 cl-z-40" }, Pn = { 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" }, Un = { class: "cl-mb-4 cl-text-2xl cl-text-off-white" }, Bn = { class: "cl-border-grey-3 cl-border-t cl-flex cl-flex-wrap cl-text-sm cl-w-full" }, zn = { class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full" }, _n = { class: "cl-flex-1 cl-py-2" }, xn = { class: "cl-py-2 cl-w-1/4" }, Hn = { class: "cl-py-2 cl-w-1/5" }, Gn = { class: "cl-flex-1 cl-py-2" }, Zn = { class: "cl-py-2 cl-w-1/4" }, Kn = { class: "cl-py-2 cl-text-off-white cl-w-1/5" }, Qn = { key: 1 }, Wn = /* @__PURE__ */ Q({
|
|
4114
4127
|
inheritAttrs: !1,
|
|
4115
4128
|
__name: "cl-ui-grid-view-manager",
|
|
4116
4129
|
props: {
|
|
4117
|
-
columns: {}
|
|
4130
|
+
columns: {},
|
|
4131
|
+
loading: { type: Boolean }
|
|
4118
4132
|
},
|
|
4119
4133
|
emits: ["update:columns"],
|
|
4120
4134
|
setup(a, { emit: e }) {
|
|
4121
|
-
const l = a, { t } =
|
|
4135
|
+
const l = a, { t } = ie(), n = I(!1);
|
|
4122
4136
|
function c(s, i, m) {
|
|
4123
4137
|
m < s.length && m >= 0 && s.splice(m, 0, s.splice(i, 1)[0]);
|
|
4124
4138
|
}
|
|
@@ -4130,62 +4144,63 @@ const dn = {
|
|
|
4130
4144
|
const m = ge(l.columns), k = i === "up" ? s + 1 : s - 1;
|
|
4131
4145
|
c(m, s, k), e("update:columns", m);
|
|
4132
4146
|
}
|
|
4133
|
-
return (s, i) => (
|
|
4134
|
-
S(
|
|
4147
|
+
return (s, i) => (p(), y(X, null, [
|
|
4148
|
+
S(be, fe(s.$attrs, {
|
|
4135
4149
|
class: "cl-w-full",
|
|
4136
4150
|
size: "small",
|
|
4151
|
+
disabled: s.loading,
|
|
4137
4152
|
onClick: i[0] || (i[0] = ne((m) => n.value = !0, ["prevent"]))
|
|
4138
4153
|
}), {
|
|
4139
4154
|
default: Y(() => [
|
|
4140
|
-
de(
|
|
4155
|
+
de(q(v(t)("grid.manageView")), 1)
|
|
4141
4156
|
]),
|
|
4142
4157
|
_: 1
|
|
4143
|
-
}, 16),
|
|
4144
|
-
(
|
|
4158
|
+
}, 16, ["disabled"]),
|
|
4159
|
+
(p(), G(ll, { to: "body" }, [
|
|
4145
4160
|
S(Te, { name: "slide-left" }, {
|
|
4146
4161
|
default: Y(() => [
|
|
4147
|
-
le(b("div",
|
|
4148
|
-
b("div",
|
|
4162
|
+
le(b("div", Ln, [
|
|
4163
|
+
b("div", Pn, [
|
|
4149
4164
|
S(v(x), {
|
|
4150
4165
|
class: "cl-absolute cl-cursor-pointer cl-right-3 cl-text-off-white cl-top-3",
|
|
4151
4166
|
icon: "ph:x",
|
|
4152
4167
|
size: 16,
|
|
4153
4168
|
onClick: i[1] || (i[1] = (m) => n.value = !1)
|
|
4154
4169
|
}),
|
|
4155
|
-
b("h3", Un,
|
|
4156
|
-
b("ul",
|
|
4157
|
-
b("li",
|
|
4158
|
-
b("strong",
|
|
4159
|
-
b("strong",
|
|
4160
|
-
b("strong",
|
|
4170
|
+
b("h3", Un, q(v(t)("grid.manageView")), 1),
|
|
4171
|
+
b("ul", Bn, [
|
|
4172
|
+
b("li", zn, [
|
|
4173
|
+
b("strong", _n, q(v(t)("grid.column")), 1),
|
|
4174
|
+
b("strong", xn, q(v(t)("grid.visible")), 1),
|
|
4175
|
+
b("strong", Hn, q(v(t)("grid.order")), 1)
|
|
4161
4176
|
]),
|
|
4162
|
-
(
|
|
4177
|
+
(p(!0), y(X, null, se(s.columns, (m, k) => (p(), y("li", {
|
|
4163
4178
|
key: k,
|
|
4164
4179
|
class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full"
|
|
4165
4180
|
}, [
|
|
4166
|
-
b("div",
|
|
4167
|
-
b("div",
|
|
4181
|
+
b("div", Gn, q(m.caption), 1),
|
|
4182
|
+
b("div", Zn, [
|
|
4168
4183
|
S(me, {
|
|
4169
4184
|
"model-value": m.visible === void 0 || m.visible === !0,
|
|
4170
4185
|
"input-type": "checkbox",
|
|
4171
4186
|
onClick: (d) => r(d.target, m)
|
|
4172
4187
|
}, null, 8, ["model-value", "onClick"])
|
|
4173
4188
|
]),
|
|
4174
|
-
b("div",
|
|
4175
|
-
m.visible === void 0 || m.visible === !0 ? (
|
|
4176
|
-
k !== 0 ? (
|
|
4189
|
+
b("div", Kn, [
|
|
4190
|
+
m.visible === void 0 || m.visible === !0 ? (p(), y(X, { key: 0 }, [
|
|
4191
|
+
k !== 0 ? (p(), G(v(x), {
|
|
4177
4192
|
key: 0,
|
|
4178
4193
|
class: "cl-cursor-pointer cl-inline-block cl-mr-2",
|
|
4179
4194
|
icon: "ph:arrow-left",
|
|
4180
4195
|
onClick: (d) => o(k, "down")
|
|
4181
4196
|
}, null, 8, ["onClick"])) : j("", !0),
|
|
4182
|
-
k !== s.columns.length - 1 ? (
|
|
4197
|
+
k !== s.columns.length - 1 ? (p(), G(v(x), {
|
|
4183
4198
|
key: 1,
|
|
4184
4199
|
class: "cl-cursor-pointer cl-inline-block",
|
|
4185
4200
|
icon: "ph:arrow-right",
|
|
4186
4201
|
onClick: (d) => o(k, "up")
|
|
4187
4202
|
}, null, 8, ["onClick"])) : j("", !0)
|
|
4188
|
-
], 64)) : (
|
|
4203
|
+
], 64)) : (p(), y("em", Qn, q(v(t)("grid.hidden")), 1))
|
|
4189
4204
|
])
|
|
4190
4205
|
]))), 128))
|
|
4191
4206
|
])
|
|
@@ -4199,7 +4214,7 @@ const dn = {
|
|
|
4199
4214
|
]))
|
|
4200
4215
|
], 64));
|
|
4201
4216
|
}
|
|
4202
|
-
}),
|
|
4217
|
+
}), Yn = { class: "cl-relative cl-w-full grid-wrapper lg:cl-min-h-fit" }, Jn = { class: "cl-absolute cl-flex cl-items-center cl-justify-center cl-min-h-full cl-p-28 cl-pt-0 cl-w-full" }, Xn = { class: "cl-overflow-x-auto cl-overscroll-x-none cl-pt-1" }, er = { class: "cl-hidden lg:cl-table-column-group" }, lr = /* @__PURE__ */ Q({
|
|
4203
4218
|
__name: "cl-ui-grid",
|
|
4204
4219
|
props: {
|
|
4205
4220
|
columns: {},
|
|
@@ -4207,16 +4222,15 @@ const dn = {
|
|
|
4207
4222
|
loading: { type: Boolean },
|
|
4208
4223
|
data: { default: null },
|
|
4209
4224
|
options: { default: () => ({}) },
|
|
4210
|
-
timeZone: { default: null }
|
|
4211
|
-
quickDateScope: { default: null }
|
|
4225
|
+
timeZone: { default: null }
|
|
4212
4226
|
},
|
|
4213
4227
|
emits: ["update:columns", "update:request", "data-request", "row-edit", "edit-start", "edit-end", "row-select"],
|
|
4214
4228
|
setup(a, { emit: e }) {
|
|
4215
4229
|
var ae;
|
|
4216
|
-
const l = a, t =
|
|
4230
|
+
const l = a, t = R({
|
|
4217
4231
|
get: () => l.columns,
|
|
4218
4232
|
set: (N) => e("update:columns", N)
|
|
4219
|
-
}), n =
|
|
4233
|
+
}), n = R(() => t.value.filter((N) => N.visible ?? !0)), c = I({});
|
|
4220
4234
|
function r() {
|
|
4221
4235
|
const N = {};
|
|
4222
4236
|
window.innerWidth >= 1024 && t.value.forEach((B) => {
|
|
@@ -4229,26 +4243,26 @@ const dn = {
|
|
|
4229
4243
|
}
|
|
4230
4244
|
Ze(() => {
|
|
4231
4245
|
window.addEventListener("resize", r), r();
|
|
4232
|
-
}),
|
|
4233
|
-
const s =
|
|
4246
|
+
}), tl(() => window.removeEventListener("resize", r));
|
|
4247
|
+
const s = R({
|
|
4234
4248
|
get: () => l.request,
|
|
4235
4249
|
set: (N) => e("update:request", N)
|
|
4236
4250
|
});
|
|
4237
4251
|
function i() {
|
|
4238
4252
|
const N = ge(s.value);
|
|
4239
|
-
N.pageNumber = 1, N.filters = [],
|
|
4253
|
+
N.pageNumber = 1, N.filters = [], U.value = "", s.value = N;
|
|
4240
4254
|
}
|
|
4241
|
-
const m =
|
|
4255
|
+
const m = ol(() => e("data-request"), 750);
|
|
4242
4256
|
oe(s, m, {
|
|
4243
4257
|
deep: !0,
|
|
4244
4258
|
immediate: !0
|
|
4245
4259
|
});
|
|
4246
|
-
const k =
|
|
4260
|
+
const k = R(() => l.data), d = I(!1), h = I(!1);
|
|
4247
4261
|
oe(d, () => d.value ? e("edit-start") : e("edit-end"));
|
|
4248
|
-
const
|
|
4262
|
+
const A = R(() => ({
|
|
4249
4263
|
highlightRowSelection: !0,
|
|
4250
4264
|
...l.options
|
|
4251
|
-
})), P =
|
|
4265
|
+
})), P = R({
|
|
4252
4266
|
get() {
|
|
4253
4267
|
const N = ge(s.value);
|
|
4254
4268
|
return N.filters = N.filters.filter((B) => B.filterMethod !== "andcontains" && B.filterOperation !== ee.AND_CONTAINS), N;
|
|
@@ -4263,25 +4277,25 @@ const dn = {
|
|
|
4263
4277
|
filters: B
|
|
4264
4278
|
};
|
|
4265
4279
|
}
|
|
4266
|
-
}),
|
|
4267
|
-
return (N, B) => (
|
|
4268
|
-
Z.value.length > 0 ? (
|
|
4280
|
+
}), U = I(((ae = l.request.filters.find((N) => N.filterMethod === "andcontains" || N.filterOperation === ee.AND_CONTAINS)) == null ? void 0 : ae.filterValue) ?? ""), Z = R(() => l.columns.filter((N) => (N.type === "string" || N.type === "slot" && N.slotType === "string") && N.searchable));
|
|
4281
|
+
return (N, B) => (p(), y("div", Yn, [
|
|
4282
|
+
Z.value.length > 0 ? (p(), G(Vn, {
|
|
4269
4283
|
key: 0,
|
|
4270
|
-
"search-value":
|
|
4271
|
-
"onUpdate:searchValue": B[0] || (B[0] = (u) =>
|
|
4284
|
+
"search-value": U.value,
|
|
4285
|
+
"onUpdate:searchValue": B[0] || (B[0] = (u) => U.value = u),
|
|
4272
4286
|
request: s.value,
|
|
4273
4287
|
"onUpdate:request": B[1] || (B[1] = (u) => s.value = u),
|
|
4274
4288
|
columns: Z.value,
|
|
4275
4289
|
loading: N.loading
|
|
4276
4290
|
}, {
|
|
4277
4291
|
search: Y((u) => [
|
|
4278
|
-
|
|
4292
|
+
V(N.$slots, "search", ce(ve(u)))
|
|
4279
4293
|
]),
|
|
4280
4294
|
_: 3
|
|
4281
4295
|
}, 8, ["search-value", "request", "columns", "loading"])) : j("", !0),
|
|
4282
4296
|
S(Te, { name: "fade" }, {
|
|
4283
4297
|
default: Y(() => [
|
|
4284
|
-
le(b("div",
|
|
4298
|
+
le(b("div", Jn, [
|
|
4285
4299
|
S(Ke, { class: "after:!cl-h-20 after:!cl-w-20 cl-h-20 cl-w-20" })
|
|
4286
4300
|
], 512), [
|
|
4287
4301
|
[te, N.loading]
|
|
@@ -4295,62 +4309,63 @@ const dn = {
|
|
|
4295
4309
|
"filter-panel-open": h.value,
|
|
4296
4310
|
"onUpdate:filterPanelOpen": B[4] || (B[4] = (u) => h.value = u),
|
|
4297
4311
|
columns: N.columns,
|
|
4298
|
-
options:
|
|
4312
|
+
options: A.value,
|
|
4299
4313
|
request: s.value,
|
|
4300
4314
|
loading: N.loading,
|
|
4301
4315
|
onClearFilters: i
|
|
4302
4316
|
}, {
|
|
4303
4317
|
"additional-grid-actions": Y((u) => [
|
|
4304
|
-
|
|
4318
|
+
V(N.$slots, "additional-grid-actions", ce(ve(u)))
|
|
4305
4319
|
]),
|
|
4306
4320
|
"view-manager": Y(() => [
|
|
4307
|
-
S(
|
|
4321
|
+
S(Wn, {
|
|
4308
4322
|
columns: t.value,
|
|
4309
|
-
"onUpdate:columns": B[2] || (B[2] = (u) => t.value = u)
|
|
4310
|
-
|
|
4323
|
+
"onUpdate:columns": B[2] || (B[2] = (u) => t.value = u),
|
|
4324
|
+
loading: N.loading
|
|
4325
|
+
}, null, 8, ["columns", "loading"])
|
|
4311
4326
|
]),
|
|
4312
4327
|
_: 3
|
|
4313
4328
|
}, 8, ["edit-mode", "filter-panel-open", "columns", "options", "request", "loading"]),
|
|
4314
|
-
b("div",
|
|
4329
|
+
b("div", Xn, [
|
|
4315
4330
|
b("table", {
|
|
4316
|
-
class:
|
|
4317
|
-
"cl-opacity-40": N.loading
|
|
4331
|
+
class: M(["cl-delay-75 cl-min-h-[276px] cl-overflow-x-auto cl-overscroll-x-none cl-text-left cl-transition-opacity cl-w-full", {
|
|
4332
|
+
"cl-opacity-40 cl-pointer-events-none": N.loading
|
|
4318
4333
|
}])
|
|
4319
4334
|
}, [
|
|
4320
|
-
b("colgroup",
|
|
4321
|
-
(
|
|
4322
|
-
key:
|
|
4335
|
+
b("colgroup", er, [
|
|
4336
|
+
(p(!0), y(X, null, se(n.value, (u, f) => (p(), y("col", {
|
|
4337
|
+
key: f,
|
|
4323
4338
|
style: _l(o(u.name)),
|
|
4324
4339
|
span: 1
|
|
4325
4340
|
}, null, 4))), 128))
|
|
4326
4341
|
]),
|
|
4327
|
-
S(
|
|
4342
|
+
S(Fn, {
|
|
4328
4343
|
request: P.value,
|
|
4329
4344
|
"onUpdate:request": B[5] || (B[5] = (u) => P.value = u),
|
|
4330
4345
|
"filter-panel-open": h.value,
|
|
4331
4346
|
"onUpdate:filterPanelOpen": B[6] || (B[6] = (u) => h.value = u),
|
|
4332
4347
|
columns: n.value,
|
|
4333
|
-
options:
|
|
4334
|
-
|
|
4335
|
-
"
|
|
4336
|
-
}, null, 8, ["request", "filter-panel-open", "columns", "options", "
|
|
4337
|
-
S(
|
|
4348
|
+
options: A.value,
|
|
4349
|
+
loading: N.loading,
|
|
4350
|
+
"time-zone": N.timeZone
|
|
4351
|
+
}, null, 8, ["request", "filter-panel-open", "columns", "options", "loading", "time-zone"]),
|
|
4352
|
+
S(Lo, {
|
|
4338
4353
|
columns: n.value,
|
|
4339
4354
|
request: s.value,
|
|
4340
4355
|
data: k.value,
|
|
4341
4356
|
"time-zone": N.timeZone,
|
|
4342
4357
|
loading: N.loading,
|
|
4343
|
-
"search-value":
|
|
4344
|
-
options:
|
|
4358
|
+
"search-value": U.value,
|
|
4359
|
+
options: A.value,
|
|
4345
4360
|
"edit-mode": d.value,
|
|
4346
4361
|
onClearFilters: i,
|
|
4347
4362
|
onRowEdit: B[7] || (B[7] = (u) => N.$emit("row-edit", u)),
|
|
4348
4363
|
onRowSelect: B[8] || (B[8] = (u) => N.$emit("row-select", u))
|
|
4349
|
-
},
|
|
4350
|
-
|
|
4351
|
-
name:
|
|
4364
|
+
}, al({ _: 2 }, [
|
|
4365
|
+
se(N.$slots, (u, f) => ({
|
|
4366
|
+
name: f,
|
|
4352
4367
|
fn: Y((O) => [
|
|
4353
|
-
|
|
4368
|
+
V(N.$slots, f, ce(ve(O)))
|
|
4354
4369
|
])
|
|
4355
4370
|
}))
|
|
4356
4371
|
]), 1032, ["columns", "request", "data", "time-zone", "loading", "search-value", "options", "edit-mode"])
|
|
@@ -4364,7 +4379,7 @@ const dn = {
|
|
|
4364
4379
|
}, null, 8, ["request", "loading", "data"])
|
|
4365
4380
|
]));
|
|
4366
4381
|
}
|
|
4367
|
-
}),
|
|
4382
|
+
}), tr = { 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" }, ar = /* @__PURE__ */ Q({
|
|
4368
4383
|
__name: "cl-ui-header",
|
|
4369
4384
|
props: {
|
|
4370
4385
|
isOpen: { type: Boolean }
|
|
@@ -4372,28 +4387,28 @@ const dn = {
|
|
|
4372
4387
|
emits: ["open-click"],
|
|
4373
4388
|
setup(a, { emit: e }) {
|
|
4374
4389
|
const l = a, t = I();
|
|
4375
|
-
return
|
|
4390
|
+
return nl(t, () => {
|
|
4376
4391
|
(l.isOpen ?? !1) && e("open-click");
|
|
4377
|
-
}), (n, c) => (
|
|
4378
|
-
|
|
4392
|
+
}), (n, c) => (p(), y("header", tr, [
|
|
4393
|
+
V(n.$slots, "logo"),
|
|
4379
4394
|
b("div", {
|
|
4380
4395
|
ref_key: "headerMenuElement",
|
|
4381
4396
|
ref: t,
|
|
4382
4397
|
class: "cl-cursor-pointer cl-flex cl-flex-nowrap",
|
|
4383
4398
|
onClick: c[0] || (c[0] = (r) => n.$emit("open-click"))
|
|
4384
4399
|
}, [
|
|
4385
|
-
|
|
4386
|
-
|
|
4400
|
+
V(n.$slots, "menu"),
|
|
4401
|
+
V(n.$slots, "icon")
|
|
4387
4402
|
], 512)
|
|
4388
4403
|
]));
|
|
4389
4404
|
}
|
|
4390
|
-
}),
|
|
4405
|
+
}), or = { 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]" }, nr = ["src"], rr = {
|
|
4391
4406
|
key: 0,
|
|
4392
4407
|
class: "cl-text-ellipsis cl-whitespace-nowrap"
|
|
4393
|
-
},
|
|
4408
|
+
}, sr = {
|
|
4394
4409
|
key: 1,
|
|
4395
4410
|
class: "cl-text-ellipsis cl-text-xs cl-whitespace-nowrap"
|
|
4396
|
-
},
|
|
4411
|
+
}, ir = { class: "cl-content-center cl-flex cl-h-20 cl-items-center cl-justify-center cl-justify-items-center cl-transition-all cl-w-10 md:cl-ml-4 md:cl-w-20" }, cr = { class: "cl-absolute cl-bg-white cl-right-0 cl-shadow-2xl cl-top-20 cl-w-full cl-z-20" }, ur = /* @__PURE__ */ Q({
|
|
4397
4412
|
__name: "cl-ui-header-menu",
|
|
4398
4413
|
props: {
|
|
4399
4414
|
username: { default: "" },
|
|
@@ -4404,18 +4419,18 @@ const dn = {
|
|
|
4404
4419
|
},
|
|
4405
4420
|
setup(a) {
|
|
4406
4421
|
const e = a;
|
|
4407
|
-
return (l, t) => (
|
|
4408
|
-
class:
|
|
4422
|
+
return (l, t) => (p(), y("div", {
|
|
4423
|
+
class: M(["md:cl-relative", {
|
|
4409
4424
|
"cl-bg-primary-default": (e == null ? void 0 : e.colour) === "default",
|
|
4410
4425
|
"cl-bg-blue-light": e.colour === "secondary"
|
|
4411
4426
|
}])
|
|
4412
4427
|
}, [
|
|
4413
|
-
b("div",
|
|
4414
|
-
l.image ? (
|
|
4428
|
+
b("div", or, [
|
|
4429
|
+
l.image ? (p(), y("img", {
|
|
4415
4430
|
key: 0,
|
|
4416
4431
|
src: l.image,
|
|
4417
4432
|
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"
|
|
4418
|
-
}, null, 8,
|
|
4433
|
+
}, null, 8, nr)) : (p(), G(v(x), {
|
|
4419
4434
|
key: 1,
|
|
4420
4435
|
class: "cl-hidden cl-m-4 cl-text-white md:cl-block",
|
|
4421
4436
|
icon: "ph:user-circle",
|
|
@@ -4423,17 +4438,17 @@ const dn = {
|
|
|
4423
4438
|
height: "48"
|
|
4424
4439
|
})),
|
|
4425
4440
|
b("div", {
|
|
4426
|
-
class:
|
|
4441
|
+
class: M(["cl-grow cl-hidden cl-my-4 md:cl-block", {
|
|
4427
4442
|
"cl-text-secondary-default": e.colour === "default",
|
|
4428
4443
|
"cl-text-white": e.colour === "secondary"
|
|
4429
4444
|
}])
|
|
4430
4445
|
}, [
|
|
4431
|
-
l.username ? (
|
|
4432
|
-
l.group ? (
|
|
4446
|
+
l.username ? (p(), y("div", rr, q(l.username), 1)) : j("", !0),
|
|
4447
|
+
l.group ? (p(), y("div", sr, q(l.group), 1)) : j("", !0)
|
|
4433
4448
|
], 2),
|
|
4434
|
-
b("div",
|
|
4449
|
+
b("div", ir, [
|
|
4435
4450
|
S(v(x), {
|
|
4436
|
-
class:
|
|
4451
|
+
class: M(["cl-transform-gpu cl-transition-transform", {
|
|
4437
4452
|
"cl-rotate-180": l.isOpen,
|
|
4438
4453
|
"cl-text-secondary-default": e.colour === "default",
|
|
4439
4454
|
"cl-text-white": e.colour === "secondary"
|
|
@@ -4444,8 +4459,8 @@ const dn = {
|
|
|
4444
4459
|
]),
|
|
4445
4460
|
S(Te, { name: "fade" }, {
|
|
4446
4461
|
default: Y(() => [
|
|
4447
|
-
le(b("div",
|
|
4448
|
-
|
|
4462
|
+
le(b("div", cr, [
|
|
4463
|
+
V(l.$slots, "default")
|
|
4449
4464
|
], 512), [
|
|
4450
4465
|
[te, l.isOpen]
|
|
4451
4466
|
])
|
|
@@ -4458,24 +4473,24 @@ const dn = {
|
|
|
4458
4473
|
function el(a) {
|
|
4459
4474
|
return /[a-z]{2}-[A-Z]{2}/gm.test(a.localeCode);
|
|
4460
4475
|
}
|
|
4461
|
-
function
|
|
4476
|
+
function dr(a) {
|
|
4462
4477
|
let e = Array.isArray(a);
|
|
4463
4478
|
if (e) {
|
|
4464
4479
|
for (const l of a)
|
|
4465
|
-
if (!
|
|
4480
|
+
if (!fr(l)) {
|
|
4466
4481
|
e = !1;
|
|
4467
4482
|
break;
|
|
4468
4483
|
}
|
|
4469
4484
|
}
|
|
4470
4485
|
return e;
|
|
4471
4486
|
}
|
|
4472
|
-
function
|
|
4487
|
+
function fr(a) {
|
|
4473
4488
|
return typeof a.name == "string" && typeof a.nativeName == "string" && typeof a.localeCode == "string";
|
|
4474
4489
|
}
|
|
4475
|
-
const
|
|
4490
|
+
const pr = {
|
|
4476
4491
|
key: 0,
|
|
4477
4492
|
class: "cl-flex cl-relative cl-select-none cl-w-auto cl-z-30"
|
|
4478
|
-
},
|
|
4493
|
+
}, mr = { class: "cl-absolute cl-bg-white cl-border cl-border-grey-0 cl-overflow-hidden cl-right-0 cl-rounded cl-shadow-xl cl-text-black cl-top-6 cl-z-30" }, vr = ["data-localename", "data-localecode", "onClick"], gr = { class: "cl-text-xs" }, br = /* @__PURE__ */ Q({
|
|
4479
4494
|
__name: "cl-ui-language-switcher",
|
|
4480
4495
|
props: {
|
|
4481
4496
|
supportedLanguages: {},
|
|
@@ -4484,29 +4499,29 @@ const dr = {
|
|
|
4484
4499
|
},
|
|
4485
4500
|
emits: ["language-select"],
|
|
4486
4501
|
setup(a, { emit: e }) {
|
|
4487
|
-
const l = a, { locale: t } =
|
|
4502
|
+
const l = a, { locale: t } = ie(), n = I(!1), c = R(() => l.supportedLanguages.find((s) => s.localeCode === t.value) ?? l.defaultLangauge), r = R(() => l.supportedLanguages.filter((s) => el(s)).sort((s, i) => s.nativeName > i.nativeName ? 1 : i.nativeName > s.nativeName ? -1 : 0));
|
|
4488
4503
|
function o() {
|
|
4489
4504
|
l.disabled || (n.value = !n.value);
|
|
4490
4505
|
}
|
|
4491
4506
|
return oe(() => l.disabled, (s) => {
|
|
4492
4507
|
s && (n.value = !1);
|
|
4493
|
-
}), (s, i) => c.value !== null && v(el)(c.value) ? (
|
|
4508
|
+
}), (s, i) => c.value !== null && v(el)(c.value) ? (p(), y("div", pr, [
|
|
4494
4509
|
b("div", {
|
|
4495
|
-
class:
|
|
4510
|
+
class: M(["cl-flex cl-items-center", {
|
|
4496
4511
|
"cl-cursor-pointer": !s.disabled
|
|
4497
4512
|
}]),
|
|
4498
4513
|
onClick: o
|
|
4499
4514
|
}, [
|
|
4500
4515
|
b("span", {
|
|
4501
|
-
class:
|
|
4516
|
+
class: M(["cl-font-semibold cl-text-xs", {
|
|
4502
4517
|
"cl-opacity-50": s.disabled
|
|
4503
4518
|
}])
|
|
4504
|
-
},
|
|
4519
|
+
}, q(c.value.nativeName), 3)
|
|
4505
4520
|
], 2),
|
|
4506
4521
|
S(Te, { name: "fade" }, {
|
|
4507
4522
|
default: Y(() => [
|
|
4508
|
-
le(b("div",
|
|
4509
|
-
(
|
|
4523
|
+
le(b("div", mr, [
|
|
4524
|
+
(p(!0), y(X, null, se(r.value, (m, k) => (p(), y("div", {
|
|
4510
4525
|
key: k,
|
|
4511
4526
|
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",
|
|
4512
4527
|
"data-localename": m.name,
|
|
@@ -4515,8 +4530,8 @@ const dr = {
|
|
|
4515
4530
|
t.value = m.localeCode, o(), e("language-select", m.localeCode);
|
|
4516
4531
|
}
|
|
4517
4532
|
}, [
|
|
4518
|
-
b("span",
|
|
4519
|
-
], 8,
|
|
4533
|
+
b("span", gr, q(m.nativeName), 1)
|
|
4534
|
+
], 8, vr))), 128))
|
|
4520
4535
|
], 512), [
|
|
4521
4536
|
[te, n.value]
|
|
4522
4537
|
])
|
|
@@ -4525,10 +4540,10 @@ const dr = {
|
|
|
4525
4540
|
})
|
|
4526
4541
|
])) : j("", !0);
|
|
4527
4542
|
}
|
|
4528
|
-
}),
|
|
4543
|
+
}), hr = { class: "cl-relative" }, yr = { class: "cl-h-full cl-z-0 xl:cl-h-screen" }, wr = { 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" }, kr = { class: "cl-col-span-10 lg:cl-col-span-3" }, Tr = {
|
|
4529
4544
|
key: 0,
|
|
4530
4545
|
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"
|
|
4531
|
-
},
|
|
4546
|
+
}, $r = { class: "cl-col-span-3" }, Cr = { class: "cl-inline cl-relative cl-text-grey-4" }, Or = { class: "cl-col-span-3" }, Sr = { class: "cl-inline cl-relative cl-text-grey-4" }, Nr = { class: "cl-col-span-10 cl-emphasis-danger cl-mt-10 cl-p-3 cl-rounded-md cl-text-sm md:cl-mt-3" }, Er = /* @__PURE__ */ Q({
|
|
4532
4547
|
__name: "cl-ui-login",
|
|
4533
4548
|
props: {
|
|
4534
4549
|
errors: { default: () => [] },
|
|
@@ -4539,7 +4554,7 @@ const dr = {
|
|
|
4539
4554
|
"update:errors": null
|
|
4540
4555
|
},
|
|
4541
4556
|
setup(a, { emit: e }) {
|
|
4542
|
-
const { t: l } =
|
|
4557
|
+
const { t: l } = ie(), t = I(""), n = I(""), c = I("password"), r = I();
|
|
4543
4558
|
function o() {
|
|
4544
4559
|
const k = {
|
|
4545
4560
|
username: t.value,
|
|
@@ -4560,25 +4575,25 @@ const dr = {
|
|
|
4560
4575
|
function m(k, d) {
|
|
4561
4576
|
r.value = k;
|
|
4562
4577
|
}
|
|
4563
|
-
return (k, d) => (
|
|
4564
|
-
b("div",
|
|
4565
|
-
|
|
4578
|
+
return (k, d) => (p(), y("div", hr, [
|
|
4579
|
+
b("div", yr, [
|
|
4580
|
+
V(k.$slots, "background")
|
|
4566
4581
|
]),
|
|
4567
|
-
b("form",
|
|
4568
|
-
b("div",
|
|
4569
|
-
|
|
4582
|
+
b("form", wr, [
|
|
4583
|
+
b("div", kr, [
|
|
4584
|
+
V(k.$slots, "logo")
|
|
4570
4585
|
]),
|
|
4571
|
-
k.$slots["language-switcher"] ? (
|
|
4572
|
-
|
|
4586
|
+
k.$slots["language-switcher"] ? (p(), y("div", Tr, [
|
|
4587
|
+
V(k.$slots, "language-switcher")
|
|
4573
4588
|
])) : j("", !0),
|
|
4574
4589
|
b("div", {
|
|
4575
|
-
class:
|
|
4590
|
+
class: M(["cl-gap-y-4 cl-grid cl-grid-cols-1 lg:cl-gap-x-2 lg:cl-grid-cols-8", {
|
|
4576
4591
|
"cl-col-span-7": !k.$slots["language-switcher"],
|
|
4577
4592
|
"cl-col-span-6": k.$slots["language-switcher"]
|
|
4578
4593
|
}])
|
|
4579
4594
|
}, [
|
|
4580
|
-
b("div",
|
|
4581
|
-
b("div",
|
|
4595
|
+
b("div", $r, [
|
|
4596
|
+
b("div", Cr, [
|
|
4582
4597
|
S(v(x), {
|
|
4583
4598
|
class: "cl-absolute cl-left-3 cl-top-2.5 cl-z-10",
|
|
4584
4599
|
icon: "ph:user",
|
|
@@ -4606,8 +4621,8 @@ const dr = {
|
|
|
4606
4621
|
}, null, 8, ["modelValue", "highlight-when-valid", "label", "placeholder-text", "message-when-valid"])
|
|
4607
4622
|
])
|
|
4608
4623
|
]),
|
|
4609
|
-
b("div",
|
|
4610
|
-
b("div",
|
|
4624
|
+
b("div", Or, [
|
|
4625
|
+
b("div", Sr, [
|
|
4611
4626
|
S(v(x), {
|
|
4612
4627
|
class: "cl-absolute cl-left-3 cl-top-2.5 cl-z-10",
|
|
4613
4628
|
icon: "ph:lock",
|
|
@@ -4648,11 +4663,11 @@ const dr = {
|
|
|
4648
4663
|
])
|
|
4649
4664
|
]),
|
|
4650
4665
|
b("div", {
|
|
4651
|
-
class:
|
|
4666
|
+
class: M(["cl-col-span-2", {
|
|
4652
4667
|
"cl-mt-1.5 cl-mb-1 md:cl-mt-0.5 md:cl-mb-7 lg:cl-mb-0": k.loading
|
|
4653
4668
|
}])
|
|
4654
4669
|
}, [
|
|
4655
|
-
S(
|
|
4670
|
+
S(be, {
|
|
4656
4671
|
id: "cl-ui-login-loginbutton",
|
|
4657
4672
|
class: "cl-w-full",
|
|
4658
4673
|
colour: "blue",
|
|
@@ -4661,7 +4676,7 @@ const dr = {
|
|
|
4661
4676
|
onClick: ne(o, ["prevent"])
|
|
4662
4677
|
}, {
|
|
4663
4678
|
default: Y(() => [
|
|
4664
|
-
de(
|
|
4679
|
+
de(q(v(l)("login.login")), 1)
|
|
4665
4680
|
]),
|
|
4666
4681
|
_: 1
|
|
4667
4682
|
}, 8, ["loading", "disabled", "onClick"])
|
|
@@ -4671,12 +4686,12 @@ const dr = {
|
|
|
4671
4686
|
default: Y(() => {
|
|
4672
4687
|
var h;
|
|
4673
4688
|
return [
|
|
4674
|
-
le(b("span",
|
|
4675
|
-
(
|
|
4689
|
+
le(b("span", Nr, [
|
|
4690
|
+
(p(!0), y(X, null, se(k.errors, (A, P) => (p(), y("div", {
|
|
4676
4691
|
id: "cl-ui-login-errors",
|
|
4677
4692
|
key: P,
|
|
4678
4693
|
class: "cl-font-semibold"
|
|
4679
|
-
}, A
|
|
4694
|
+
}, q(A), 1))), 128))
|
|
4680
4695
|
], 512), [
|
|
4681
4696
|
[te, (h = k.errors) == null ? void 0 : h.length]
|
|
4682
4697
|
])
|
|
@@ -4687,35 +4702,35 @@ const dr = {
|
|
|
4687
4702
|
])
|
|
4688
4703
|
]));
|
|
4689
4704
|
}
|
|
4690
|
-
}),
|
|
4705
|
+
}), Ar = [
|
|
4691
4706
|
"x-small",
|
|
4692
4707
|
"small",
|
|
4693
4708
|
"medium",
|
|
4694
4709
|
"large"
|
|
4695
|
-
],
|
|
4710
|
+
], qr = [
|
|
4696
4711
|
"primary",
|
|
4697
4712
|
"secondary",
|
|
4698
4713
|
"white"
|
|
4699
|
-
],
|
|
4714
|
+
], Rr = {
|
|
4700
4715
|
key: 0,
|
|
4701
4716
|
class: "cl-h-0 cl-w-0"
|
|
4702
|
-
},
|
|
4717
|
+
}, Dr = { class: "cl-relative cl-w-full" }, Ir = /* @__PURE__ */ Q({
|
|
4703
4718
|
__name: "cl-ui-navigation",
|
|
4704
4719
|
props: {
|
|
4705
4720
|
colour: { default: "default" }
|
|
4706
4721
|
},
|
|
4707
4722
|
setup(a, { expose: e }) {
|
|
4708
|
-
const l = I([]), t =
|
|
4723
|
+
const l = I([]), t = R(() => l.value.filter((h) => h.open === !0).length > 0);
|
|
4709
4724
|
function n(h) {
|
|
4710
|
-
let
|
|
4711
|
-
return
|
|
4725
|
+
let A = l.value.find((P) => P.id === h);
|
|
4726
|
+
return A || (A = {
|
|
4712
4727
|
id: h,
|
|
4713
4728
|
open: !1
|
|
4714
|
-
}, l.value.push(
|
|
4729
|
+
}, l.value.push(A)), A.open;
|
|
4715
4730
|
}
|
|
4716
4731
|
function c(h) {
|
|
4717
|
-
const
|
|
4718
|
-
|
|
4732
|
+
const A = l.value.find((P) => P.id === h);
|
|
4733
|
+
A && (A.open = !A.open, l.value.forEach((P) => {
|
|
4719
4734
|
P.id !== h && (P.open = !1);
|
|
4720
4735
|
}));
|
|
4721
4736
|
}
|
|
@@ -4739,45 +4754,45 @@ const dr = {
|
|
|
4739
4754
|
h.open = !1;
|
|
4740
4755
|
});
|
|
4741
4756
|
}
|
|
4742
|
-
return
|
|
4757
|
+
return nl(k, d), e({
|
|
4743
4758
|
closeNavigation: d
|
|
4744
|
-
}), (h,
|
|
4759
|
+
}), (h, A) => (p(), y("div", {
|
|
4745
4760
|
ref_key: "navElement",
|
|
4746
4761
|
ref: k,
|
|
4747
4762
|
class: "cl-flex cl-flex-nowrap cl-relative"
|
|
4748
4763
|
}, [
|
|
4749
4764
|
b("div", {
|
|
4750
4765
|
id: "group-container",
|
|
4751
|
-
class:
|
|
4766
|
+
class: M(["cl-h-full cl-overflow-y-auto cl-overscroll-y-none cl-pb-20 cl-w-20 cl-z-40 xl:cl-pb-0", {
|
|
4752
4767
|
"cl-bg-primary-default": h.colour === "default",
|
|
4753
4768
|
"cl-bg-blue-dark": h.colour === "secondary"
|
|
4754
4769
|
}])
|
|
4755
4770
|
}, [
|
|
4756
|
-
|
|
4771
|
+
V(h.$slots, "icon", fe({ navcolour: h.colour }, { groupIsOpen: n, toggleOpen: c }), void 0, !0)
|
|
4757
4772
|
], 2),
|
|
4758
|
-
s.value ? (
|
|
4773
|
+
s.value ? (p(), y("div", Rr)) : j("", !0),
|
|
4759
4774
|
S(Te, { name: "slide-right" }, {
|
|
4760
4775
|
default: Y(() => [
|
|
4761
4776
|
le(b("div", {
|
|
4762
|
-
class:
|
|
4777
|
+
class: M(["cl-bg-grey-0 cl-border-grey-2 cl-border-r cl-duration-75 cl-h-full cl-min-w-[260px] cl-overflow-y-auto cl-overscroll-y-none cl-p-8 cl-pb-24 cl-top-0 cl-transition-shadow cl-w-[260px] cl-z-30 xl:cl-pb-0", {
|
|
4763
4778
|
"cl-relative": o.value,
|
|
4764
4779
|
"cl-absolute cl-left-20 cl-shadow-lg": !o.value
|
|
4765
4780
|
}])
|
|
4766
4781
|
}, [
|
|
4767
|
-
b("div",
|
|
4782
|
+
b("div", Dr, [
|
|
4768
4783
|
b("span", {
|
|
4769
4784
|
class: "cl-absolute cl-cursor-pointer cl-hidden cl-right-0 cl-top-1.5 lg:cl-block",
|
|
4770
4785
|
onClick: m
|
|
4771
4786
|
}, [
|
|
4772
|
-
o.value ? (
|
|
4787
|
+
o.value ? (p(), G(v(x), {
|
|
4773
4788
|
key: 1,
|
|
4774
4789
|
icon: "ph:push-pin-slash"
|
|
4775
|
-
})) : (
|
|
4790
|
+
})) : (p(), G(v(x), {
|
|
4776
4791
|
key: 0,
|
|
4777
4792
|
icon: "ph:push-pin"
|
|
4778
4793
|
}))
|
|
4779
4794
|
]),
|
|
4780
|
-
|
|
4795
|
+
V(h.$slots, "default", ce(ve({ groupIsOpen: n })), void 0, !0)
|
|
4781
4796
|
])
|
|
4782
4797
|
], 2), [
|
|
4783
4798
|
[te, t.value]
|
|
@@ -4788,7 +4803,7 @@ const dr = {
|
|
|
4788
4803
|
], 512));
|
|
4789
4804
|
}
|
|
4790
4805
|
});
|
|
4791
|
-
const
|
|
4806
|
+
const jr = /* @__PURE__ */ ke(Ir, [["__scopeId", "data-v-0958dcf5"]]), Fr = /* @__PURE__ */ Q({
|
|
4792
4807
|
__name: "cl-ui-navigation-icon",
|
|
4793
4808
|
props: {
|
|
4794
4809
|
iconValue: {},
|
|
@@ -4796,8 +4811,8 @@ const Rr = /* @__PURE__ */ we(Dr, [["__scopeId", "data-v-0958dcf5"]]), Ir = /* @
|
|
|
4796
4811
|
colour: { default: "default" }
|
|
4797
4812
|
},
|
|
4798
4813
|
setup(a) {
|
|
4799
|
-
return (e, l) => (
|
|
4800
|
-
class:
|
|
4814
|
+
return (e, l) => (p(), y("div", {
|
|
4815
|
+
class: M(["cl-cursor-pointer cl-flex cl-h-20 cl-items-center cl-justify-center cl-transition-colors cl-w-20", {
|
|
4801
4816
|
"cl-text-secondary-default hover:cl-bg-primary-dark hover:cl-text-white": e.colour === "default",
|
|
4802
4817
|
"cl-bg-primary-darker cl-text-white": e.open && e.colour === "default",
|
|
4803
4818
|
"cl-text-white hover:cl-bg-blue-light": e.colour === "secondary",
|
|
@@ -4811,49 +4826,49 @@ const Rr = /* @__PURE__ */ we(Dr, [["__scopeId", "data-v-0958dcf5"]]), Ir = /* @
|
|
|
4811
4826
|
}, null, 8, ["icon"])
|
|
4812
4827
|
], 2));
|
|
4813
4828
|
}
|
|
4814
|
-
}),
|
|
4829
|
+
}), Mr = {
|
|
4815
4830
|
key: 0,
|
|
4816
4831
|
class: "cl-font-bold cl-leading-8 cl-mb-8 cl-pr-8 cl-select-none cl-text-lg cl-text-secondary-default"
|
|
4817
|
-
}, Vr = { class: "cl-flex cl-flex-wrap cl-space-y-8 cl-text-sm cl-w-full" },
|
|
4832
|
+
}, Vr = { class: "cl-flex cl-flex-wrap cl-space-y-8 cl-text-sm cl-w-full" }, Lr = /* @__PURE__ */ Q({
|
|
4818
4833
|
__name: "cl-ui-navigation-group",
|
|
4819
4834
|
props: {
|
|
4820
4835
|
open: { type: Boolean }
|
|
4821
4836
|
},
|
|
4822
4837
|
setup(a) {
|
|
4823
|
-
return (e, l) => (
|
|
4824
|
-
class:
|
|
4838
|
+
return (e, l) => (p(), y("div", {
|
|
4839
|
+
class: M({
|
|
4825
4840
|
"cl-hidden": !e.open
|
|
4826
4841
|
})
|
|
4827
4842
|
}, [
|
|
4828
|
-
e.$slots.title ? (
|
|
4829
|
-
|
|
4843
|
+
e.$slots.title ? (p(), y("div", Mr, [
|
|
4844
|
+
V(e.$slots, "title")
|
|
4830
4845
|
])) : j("", !0),
|
|
4831
4846
|
b("div", Vr, [
|
|
4832
|
-
|
|
4847
|
+
V(e.$slots, "default")
|
|
4833
4848
|
])
|
|
4834
4849
|
], 2));
|
|
4835
4850
|
}
|
|
4836
|
-
}),
|
|
4851
|
+
}), Pr = {}, Ur = { class: "cl-w-full" }, Br = {
|
|
4837
4852
|
key: 0,
|
|
4838
4853
|
class: "cl-font-bold cl-mb-4 cl-select-none"
|
|
4839
|
-
},
|
|
4840
|
-
function
|
|
4841
|
-
return
|
|
4842
|
-
a.$slots.title ? (
|
|
4843
|
-
|
|
4854
|
+
}, zr = { class: "cl-flex cl-flex-wrap cl-space-y-2" };
|
|
4855
|
+
function _r(a, e) {
|
|
4856
|
+
return p(), y("div", Ur, [
|
|
4857
|
+
a.$slots.title ? (p(), y("div", Br, [
|
|
4858
|
+
V(a.$slots, "title")
|
|
4844
4859
|
])) : j("", !0),
|
|
4845
|
-
b("span",
|
|
4846
|
-
|
|
4860
|
+
b("span", zr, [
|
|
4861
|
+
V(a.$slots, "default")
|
|
4847
4862
|
])
|
|
4848
4863
|
]);
|
|
4849
4864
|
}
|
|
4850
|
-
const
|
|
4851
|
-
function
|
|
4852
|
-
return
|
|
4853
|
-
|
|
4865
|
+
const xr = /* @__PURE__ */ ke(Pr, [["render", _r]]), Hr = {}, Gr = { class: "cl-cursor-pointer cl-transition-colors cl-w-full hover:cl-text-primary-darker" };
|
|
4866
|
+
function Zr(a, e) {
|
|
4867
|
+
return p(), y("div", Gr, [
|
|
4868
|
+
V(a.$slots, "default")
|
|
4854
4869
|
]);
|
|
4855
4870
|
}
|
|
4856
|
-
const
|
|
4871
|
+
const Kr = /* @__PURE__ */ ke(Hr, [["render", Zr]]), Qr = { class: "cl-w-full" }, Wr = /* @__PURE__ */ Q({
|
|
4857
4872
|
__name: "cl-ui-tab",
|
|
4858
4873
|
props: {
|
|
4859
4874
|
currentTab: { default: 0 },
|
|
@@ -4882,9 +4897,9 @@ const Gr = /* @__PURE__ */ we(_r, [["render", Hr]]), Zr = { class: "cl-w-full" }
|
|
|
4882
4897
|
i === "left" && (k = -m), l.value.scroll(l.value.scrollLeft + k, 0);
|
|
4883
4898
|
}
|
|
4884
4899
|
}
|
|
4885
|
-
return Ze(() => o()),
|
|
4900
|
+
return Ze(() => o()), tl(() => window.removeEventListener("resize", r)), (i, m) => (p(), y("div", Qr, [
|
|
4886
4901
|
b("div", null, [
|
|
4887
|
-
t.value ? (
|
|
4902
|
+
t.value ? (p(), y("div", {
|
|
4888
4903
|
key: 0,
|
|
4889
4904
|
class: "cl-bg-white cl-cursor-pointer cl-float-left cl-h-11 cl-w-4",
|
|
4890
4905
|
onClick: m[0] || (m[0] = (k) => s("left"))
|
|
@@ -4897,7 +4912,7 @@ const Gr = /* @__PURE__ */ we(_r, [["render", Hr]]), Zr = { class: "cl-w-full" }
|
|
|
4897
4912
|
b("div", {
|
|
4898
4913
|
ref_key: "headerContainer",
|
|
4899
4914
|
ref: l,
|
|
4900
|
-
class:
|
|
4915
|
+
class: M(["cl-flex cl-overflow-x-auto cl-overscroll-x-none", {
|
|
4901
4916
|
"cl-shadow-[inset_0_-1px_0_#eeeeee]": !i.disabled && i.colour === "default",
|
|
4902
4917
|
"cl-shadow-[inset_0_-1px_0_#dae32c]": !i.disabled && i.colour === "primary",
|
|
4903
4918
|
"cl-shadow-[inset_0_-1px_0_#30363e]": !i.disabled && i.colour === "secondary",
|
|
@@ -4908,9 +4923,9 @@ const Gr = /* @__PURE__ */ we(_r, [["render", Hr]]), Zr = { class: "cl-w-full" }
|
|
|
4908
4923
|
}]),
|
|
4909
4924
|
onScrollPassive: r
|
|
4910
4925
|
}, [
|
|
4911
|
-
|
|
4926
|
+
V(i.$slots, "headings", ce(ve({ isTabOpen: c, disabled: i.disabled, colour: i.colour })))
|
|
4912
4927
|
], 34),
|
|
4913
|
-
n.value ? (
|
|
4928
|
+
n.value ? (p(), y("div", {
|
|
4914
4929
|
key: 1,
|
|
4915
4930
|
class: "cl-bg-white cl-bottom-12 cl-cursor-pointer cl-float-right cl-h-11 cl-relative cl-w-4",
|
|
4916
4931
|
onClick: m[1] || (m[1] = (k) => s("right"))
|
|
@@ -4921,10 +4936,10 @@ const Gr = /* @__PURE__ */ we(_r, [["render", Hr]]), Zr = { class: "cl-w-full" }
|
|
|
4921
4936
|
})
|
|
4922
4937
|
])) : j("", !0)
|
|
4923
4938
|
]),
|
|
4924
|
-
|
|
4939
|
+
V(i.$slots, "content", ce(ve({ isTabOpen: c, disabled: i.disabled, colour: i.colour })))
|
|
4925
4940
|
]));
|
|
4926
4941
|
}
|
|
4927
|
-
}),
|
|
4942
|
+
}), Yr = ["onKeyup"], Jr = /* @__PURE__ */ Q({
|
|
4928
4943
|
__name: "cl-ui-tab-header",
|
|
4929
4944
|
props: {
|
|
4930
4945
|
id: {},
|
|
@@ -4936,12 +4951,12 @@ const Gr = /* @__PURE__ */ we(_r, [["render", Hr]]), Zr = { class: "cl-w-full" }
|
|
|
4936
4951
|
"update:currentTab": null
|
|
4937
4952
|
},
|
|
4938
4953
|
setup(a, { emit: e }) {
|
|
4939
|
-
const l = a, t = I(), n = I(), c =
|
|
4954
|
+
const l = a, t = I(), n = I(), c = R(() => l.id === l.currentTab);
|
|
4940
4955
|
function r() {
|
|
4941
4956
|
l.disabled || (t.value = !1, n.value = !1, e("update:currentTab", l.id));
|
|
4942
4957
|
}
|
|
4943
|
-
return (o, s) => (
|
|
4944
|
-
class:
|
|
4958
|
+
return (o, s) => (p(), y("div", {
|
|
4959
|
+
class: M(["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", {
|
|
4945
4960
|
"!cl-cursor-default cl-text-grey-4 !cl-border-grey-2": o.disabled,
|
|
4946
4961
|
"cl-border cl-border-b-0 cl-rounded-t-md cl-shadow-[inset_0_-1px_0_#ffffff] cl-cursor-default": c.value,
|
|
4947
4962
|
"cl-border-grey-0": o.colour === "default",
|
|
@@ -4968,23 +4983,23 @@ const Gr = /* @__PURE__ */ we(_r, [["render", Hr]]), Zr = { class: "cl-w-full" }
|
|
|
4968
4983
|
onFocusout: s[3] || (s[3] = (i) => t.value = !1),
|
|
4969
4984
|
onKeyup: Ee(ne(r, ["self"]), ["enter"])
|
|
4970
4985
|
}, [
|
|
4971
|
-
|
|
4972
|
-
], 42,
|
|
4986
|
+
V(o.$slots, "default")
|
|
4987
|
+
], 42, Yr));
|
|
4973
4988
|
}
|
|
4974
|
-
}),
|
|
4975
|
-
function
|
|
4976
|
-
return
|
|
4989
|
+
}), Xr = {};
|
|
4990
|
+
function es(a, e) {
|
|
4991
|
+
return V(a.$slots, "default");
|
|
4977
4992
|
}
|
|
4978
|
-
const
|
|
4993
|
+
const ls = /* @__PURE__ */ ke(Xr, [["render", es]]), ts = [
|
|
4979
4994
|
"default",
|
|
4980
4995
|
"primary",
|
|
4981
4996
|
"secondary",
|
|
4982
4997
|
"danger",
|
|
4983
4998
|
"blue"
|
|
4984
|
-
],
|
|
4999
|
+
], as = [
|
|
4985
5000
|
"left",
|
|
4986
5001
|
"right"
|
|
4987
|
-
],
|
|
5002
|
+
], os = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4988
5003
|
__proto__: null,
|
|
4989
5004
|
FilterOperation: ee,
|
|
4990
5005
|
allQuickDates: Sl,
|
|
@@ -4995,27 +5010,27 @@ const Xr = /* @__PURE__ */ we(Yr, [["render", Jr]]), es = [
|
|
|
4995
5010
|
clUiAccordionHeader: rt,
|
|
4996
5011
|
clUiAccordionItem: tt,
|
|
4997
5012
|
clUiApp: ut,
|
|
4998
|
-
clUiButton:
|
|
5013
|
+
clUiButton: be,
|
|
4999
5014
|
clUiCard: ht,
|
|
5000
5015
|
clUiComboBox: no,
|
|
5001
5016
|
clUiFooter: go,
|
|
5002
|
-
clUiGrid:
|
|
5003
|
-
clUiHeader:
|
|
5004
|
-
clUiHeaderMenu:
|
|
5017
|
+
clUiGrid: lr,
|
|
5018
|
+
clUiHeader: ar,
|
|
5019
|
+
clUiHeaderMenu: ur,
|
|
5005
5020
|
clUiInput: me,
|
|
5006
|
-
clUiLanguageSwitcher:
|
|
5021
|
+
clUiLanguageSwitcher: br,
|
|
5007
5022
|
clUiLoadingSpinner: Ke,
|
|
5008
|
-
clUiLogin:
|
|
5009
|
-
clUiModal:
|
|
5010
|
-
clUiNavigation:
|
|
5011
|
-
clUiNavigationGroup:
|
|
5012
|
-
clUiNavigationIcon:
|
|
5013
|
-
clUiNavigationItem:
|
|
5014
|
-
clUiNavigationSection:
|
|
5023
|
+
clUiLogin: Er,
|
|
5024
|
+
clUiModal: Fl,
|
|
5025
|
+
clUiNavigation: jr,
|
|
5026
|
+
clUiNavigationGroup: Lr,
|
|
5027
|
+
clUiNavigationIcon: Fr,
|
|
5028
|
+
clUiNavigationItem: Kr,
|
|
5029
|
+
clUiNavigationSection: xr,
|
|
5015
5030
|
clUiNotification: Ol,
|
|
5016
|
-
clUiTab:
|
|
5017
|
-
clUiTabContent:
|
|
5018
|
-
clUiTabHeader:
|
|
5031
|
+
clUiTab: Wr,
|
|
5032
|
+
clUiTabContent: ls,
|
|
5033
|
+
clUiTabHeader: Jr,
|
|
5019
5034
|
currentQuickDates: Ie,
|
|
5020
5035
|
filterMethodTypes: nn,
|
|
5021
5036
|
futureQuickDates: Be,
|
|
@@ -5025,20 +5040,20 @@ const Xr = /* @__PURE__ */ we(Yr, [["render", Jr]]), es = [
|
|
|
5025
5040
|
isComboBoxItem: ro,
|
|
5026
5041
|
isFilterRequest: cn,
|
|
5027
5042
|
isFilterResponse: un,
|
|
5028
|
-
isGridColumn:
|
|
5043
|
+
isGridColumn: Ml,
|
|
5029
5044
|
isGridColumnArray: an,
|
|
5030
|
-
isLanguageArray:
|
|
5045
|
+
isLanguageArray: dr,
|
|
5031
5046
|
isLanguageLocaleFormat: el,
|
|
5032
|
-
modalColours:
|
|
5033
|
-
modalSizes:
|
|
5034
|
-
pastQuickDates:
|
|
5035
|
-
quickDateNames:
|
|
5047
|
+
modalColours: qr,
|
|
5048
|
+
modalSizes: Ar,
|
|
5049
|
+
pastQuickDates: Ue,
|
|
5050
|
+
quickDateNames: Ft,
|
|
5036
5051
|
stringFormats: on,
|
|
5037
|
-
tabColours:
|
|
5038
|
-
tabScroll:
|
|
5052
|
+
tabColours: ts,
|
|
5053
|
+
tabScroll: as
|
|
5039
5054
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5040
|
-
const
|
|
5041
|
-
a.use(
|
|
5055
|
+
const hs = (a) => {
|
|
5056
|
+
a.use(we), a.component("Icon", x), Object.entries(os).forEach(([
|
|
5042
5057
|
e,
|
|
5043
5058
|
l
|
|
5044
5059
|
]) => {
|
|
@@ -5046,8 +5061,8 @@ const gs = (a) => {
|
|
|
5046
5061
|
});
|
|
5047
5062
|
};
|
|
5048
5063
|
export {
|
|
5049
|
-
|
|
5050
|
-
|
|
5064
|
+
bs as CitrusLimeUI,
|
|
5065
|
+
re as DateFormat,
|
|
5051
5066
|
ee as FilterOperation,
|
|
5052
5067
|
ue as NumberFormat,
|
|
5053
5068
|
Sl as allQuickDates,
|
|
@@ -5058,57 +5073,57 @@ export {
|
|
|
5058
5073
|
rt as clUiAccordionHeader,
|
|
5059
5074
|
tt as clUiAccordionItem,
|
|
5060
5075
|
ut as clUiApp,
|
|
5061
|
-
|
|
5076
|
+
be as clUiButton,
|
|
5062
5077
|
ht as clUiCard,
|
|
5063
5078
|
no as clUiComboBox,
|
|
5064
5079
|
go as clUiFooter,
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5080
|
+
lr as clUiGrid,
|
|
5081
|
+
ar as clUiHeader,
|
|
5082
|
+
ur as clUiHeaderMenu,
|
|
5068
5083
|
me as clUiInput,
|
|
5069
|
-
|
|
5084
|
+
br as clUiLanguageSwitcher,
|
|
5070
5085
|
Ke as clUiLoadingSpinner,
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5086
|
+
Er as clUiLogin,
|
|
5087
|
+
Fl as clUiModal,
|
|
5088
|
+
jr as clUiNavigation,
|
|
5089
|
+
Lr as clUiNavigationGroup,
|
|
5090
|
+
Fr as clUiNavigationIcon,
|
|
5091
|
+
Kr as clUiNavigationItem,
|
|
5092
|
+
xr as clUiNavigationSection,
|
|
5078
5093
|
Ol as clUiNotification,
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5094
|
+
Wr as clUiTab,
|
|
5095
|
+
ls as clUiTabContent,
|
|
5096
|
+
Jr as clUiTabHeader,
|
|
5082
5097
|
Ie as currentQuickDates,
|
|
5083
5098
|
Tt as datetimeFormats,
|
|
5084
|
-
|
|
5099
|
+
hs as default,
|
|
5085
5100
|
nn as filterMethodTypes,
|
|
5086
5101
|
Be as futureQuickDates,
|
|
5087
5102
|
tn as gridColumnTypes,
|
|
5088
|
-
|
|
5103
|
+
we as i18n,
|
|
5089
5104
|
Bt as inputTypes,
|
|
5090
5105
|
so as isComboBoxCreateRequest,
|
|
5091
5106
|
ro as isComboBoxItem,
|
|
5092
5107
|
cn as isFilterRequest,
|
|
5093
5108
|
un as isFilterResponse,
|
|
5094
|
-
|
|
5109
|
+
Ml as isGridColumn,
|
|
5095
5110
|
an as isGridColumnArray,
|
|
5096
|
-
|
|
5111
|
+
dr as isLanguageArray,
|
|
5097
5112
|
el as isLanguageLocaleFormat,
|
|
5098
5113
|
wt as messages,
|
|
5099
|
-
|
|
5100
|
-
|
|
5114
|
+
qr as modalColours,
|
|
5115
|
+
Ar as modalSizes,
|
|
5101
5116
|
kt as numberFormats,
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5117
|
+
Ue as pastQuickDates,
|
|
5118
|
+
Ft as quickDateNames,
|
|
5119
|
+
gs as setCurrentLocale,
|
|
5120
|
+
vs as setLocaleDateTimeFormats,
|
|
5121
|
+
ps as setLocaleMessages,
|
|
5122
|
+
ms as setLocaleNumberFormats,
|
|
5123
|
+
sl as showNotification,
|
|
5109
5124
|
on as stringFormats,
|
|
5110
|
-
|
|
5111
|
-
|
|
5125
|
+
ts as tabColours,
|
|
5126
|
+
as as tabScroll,
|
|
5112
5127
|
St as validateEmail,
|
|
5113
5128
|
Ct as validateMaxValue,
|
|
5114
5129
|
$t as validateMinValue
|