@citruslime/ui 2.4.1-beta.5 → 2.4.1-beta.6
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 +337 -337
- package/dist/citrus-lime-ui.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Icon as _ } from "@iconify/vue";
|
|
2
|
-
import { defineComponent as M, ref as A, openBlock as
|
|
2
|
+
import { defineComponent as M, ref as A, openBlock as i, createElementBlock as v, renderSlot as j, normalizeProps as le, guardReactiveProps as ne, Fragment as F, createElementVNode as p, normalizeClass as I, createVNode as k, unref as d, Transition as me, withCtx as P, withDirectives as L, mergeProps as se, vShow as H, createBlock as V, Teleport as Ie, renderList as Q, toDisplayString as T, createCommentVNode as N, nextTick as ge, toHandlers as tl, withModifiers as W, computed as S, watch as K, normalizeStyle as We, vModelText as ol, onMounted as Ae, vModelDynamic as nl, withKeys as we, onUnmounted as _e, resolveComponent as sl, createTextVNode as ee, watchEffect as al, createSlots as Re } from "vue";
|
|
3
3
|
import { generateStringId as rl } from "@citruslime/utils";
|
|
4
|
-
import { onClickOutside as ze, useTimeoutFn as Ke, useDebounceFn as Qe, useWindowSize as
|
|
5
|
-
import { createI18n as
|
|
4
|
+
import { onClickOutside as ze, useTimeoutFn as Ke, useDebounceFn as Qe, useWindowSize as cl } from "@vueuse/core";
|
|
5
|
+
import { createI18n as il, useI18n as oe } from "vue-i18n";
|
|
6
6
|
import { DateTime as $e } from "luxon";
|
|
7
7
|
import { DatePicker as Me } from "v-calendar";
|
|
8
8
|
import { useDebouncer as ul, copy as re } from "@citruslime/vue-utils";
|
|
@@ -26,7 +26,7 @@ const dl = { class: "cl-overflow-hidden" }, pl = /* @__PURE__ */ M({
|
|
|
26
26
|
a.id !== m && (a.open = !1);
|
|
27
27
|
}), n.open = !n.open);
|
|
28
28
|
}
|
|
29
|
-
return (m, n) => (
|
|
29
|
+
return (m, n) => (i(), v("div", dl, [
|
|
30
30
|
j(m.$slots, "default", le(ne({ isItemOpen: l, toggleItem: s })))
|
|
31
31
|
]));
|
|
32
32
|
}
|
|
@@ -45,7 +45,7 @@ const dl = { class: "cl-overflow-hidden" }, pl = /* @__PURE__ */ M({
|
|
|
45
45
|
function l() {
|
|
46
46
|
e.disabled || o("toggle");
|
|
47
47
|
}
|
|
48
|
-
return (s, m) => (
|
|
48
|
+
return (s, m) => (i(), v(F, null, [
|
|
49
49
|
p("div", {
|
|
50
50
|
class: I(["cl-border-b cl-border-grey-1 cl-relative", {
|
|
51
51
|
"cl-bg-grey-0": s.disabled,
|
|
@@ -87,7 +87,7 @@ const dl = { class: "cl-overflow-hidden" }, pl = /* @__PURE__ */ M({
|
|
|
87
87
|
return e;
|
|
88
88
|
}, bl = {}, hl = { class: "cl-border-b cl-border-grey-1 cl-font-semibold cl-pl-14 cl-pr-4 cl-py-2 cl-text-grey-3 cl-text-sm" };
|
|
89
89
|
function yl(t, o) {
|
|
90
|
-
return
|
|
90
|
+
return i(), v("div", hl, [
|
|
91
91
|
j(t.$slots, "default")
|
|
92
92
|
]);
|
|
93
93
|
}
|
|
@@ -110,7 +110,7 @@ const $l = ["onClick"], kl = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
110
110
|
position: { default: "top-right" }
|
|
111
111
|
},
|
|
112
112
|
setup(t) {
|
|
113
|
-
return (o, e) => (
|
|
113
|
+
return (o, e) => (i(), V(Ie, { to: o.container }, [
|
|
114
114
|
p("div", {
|
|
115
115
|
class: I(["cl-fixed cl-w-80 cl-z-40", {
|
|
116
116
|
"cl-top-5 cl-left-5": o.position === "top-left",
|
|
@@ -121,7 +121,7 @@ const $l = ["onClick"], kl = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
121
121
|
"cl-bottom-5 cl-right-5": o.position === "bottom-right"
|
|
122
122
|
}])
|
|
123
123
|
}, [
|
|
124
|
-
(
|
|
124
|
+
(i(!0), v(F, null, Q(d(qe), (l, s) => (i(), v("div", se(o.$attrs, {
|
|
125
125
|
key: s,
|
|
126
126
|
class: ["cl-break-words cl-cursor-pointer cl-flex cl-font-semibold cl-group cl-mb-2 cl-overflow-hidden cl-p-4 cl-rounded cl-shadow-lg cl-text-sm", {
|
|
127
127
|
"cl-bg-white": l.colour === "default",
|
|
@@ -143,18 +143,18 @@ const $l = ["onClick"], kl = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
143
143
|
], 2)
|
|
144
144
|
], 8, ["to"]));
|
|
145
145
|
}
|
|
146
|
-
}), Cl = { class: "cl-absolute cl-flex cl-flex-wrap cl-h-
|
|
146
|
+
}), Cl = { class: "cl-absolute cl-flex cl-flex-wrap cl-h-full cl-max-h-full cl-max-w-full cl-min-h-full cl-min-w-full cl-w-full xl:cl-h-screen xl:cl-max-h-screen xl:cl-min-h-screen" }, Tl = /* @__PURE__ */ M({
|
|
147
147
|
__name: "cl-ui-app",
|
|
148
148
|
props: {
|
|
149
149
|
removePadding: { type: Boolean, default: !1 }
|
|
150
150
|
},
|
|
151
151
|
setup(t) {
|
|
152
|
-
return (o, e) => (
|
|
152
|
+
return (o, e) => (i(), v(F, null, [
|
|
153
153
|
k(Ye),
|
|
154
154
|
p("div", Cl, [
|
|
155
155
|
j(o.$slots, "header"),
|
|
156
156
|
p("div", {
|
|
157
|
-
class: I(["cl-content-start cl-flex cl-flex-nowrap cl-items-stretch cl-max-h-
|
|
157
|
+
class: I(["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", {
|
|
158
158
|
"cl-pt-20": o.$slots.header
|
|
159
159
|
}])
|
|
160
160
|
}, [
|
|
@@ -174,7 +174,7 @@ const $l = ["onClick"], kl = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
174
174
|
});
|
|
175
175
|
const El = {}, Ol = { class: "loading-spinner" };
|
|
176
176
|
function ql(t, o) {
|
|
177
|
-
return
|
|
177
|
+
return i(), v("div", Ol);
|
|
178
178
|
}
|
|
179
179
|
const Se = /* @__PURE__ */ de(El, [["render", ql], ["__scopeId", "data-v-a21dc5d2"]]), Al = ["disabled"], fe = /* @__PURE__ */ M({
|
|
180
180
|
inheritAttrs: !1,
|
|
@@ -191,7 +191,7 @@ const Se = /* @__PURE__ */ de(El, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
191
191
|
focus() {
|
|
192
192
|
e.value && e.value.focus();
|
|
193
193
|
}
|
|
194
|
-
}), (l, s) => (
|
|
194
|
+
}), (l, s) => (i(), v(F, null, [
|
|
195
195
|
L(k(Se, { class: "relative" }, null, 512), [
|
|
196
196
|
[H, l.loading]
|
|
197
197
|
]),
|
|
@@ -203,7 +203,7 @@ const Se = /* @__PURE__ */ de(El, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
203
203
|
"cl-py-[9px] cl-px-8 cl-text-sm": l.size === "medium",
|
|
204
204
|
"cl-px-10 cl-py-4": l.size === "large",
|
|
205
205
|
"cl-bg-white cl-border-grey-0 hover:cl-border-grey-2 cl-text-secondary": l.colour === "default",
|
|
206
|
-
"cl-border-primary-default cl-bg-primary-default cl-text-white hover:cl-bg-primary-
|
|
206
|
+
"cl-border-primary-default cl-bg-primary-default cl-text-white hover:cl-bg-primary-dark hover:cl-border-primary-dark": l.colour === "primary",
|
|
207
207
|
"cl-border-secondary-default cl-bg-secondary-default cl-text-white hover:cl-bg-secondary-light hover:cl-border-secondary-light": l.colour === "secondary",
|
|
208
208
|
"cl-border-danger-default cl-bg-danger-default cl-text-white hover:cl-bg-danger-dark hover:cl-border-danger-dark": l.colour === "danger",
|
|
209
209
|
"cl-border-link-default cl-bg-link-default cl-text-white hover:cl-bg-link-light hover:cl-border-link-light": l.colour === "blue",
|
|
@@ -236,15 +236,15 @@ const Se = /* @__PURE__ */ de(El, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
236
236
|
hover: { type: Boolean, default: !1 }
|
|
237
237
|
},
|
|
238
238
|
setup(t) {
|
|
239
|
-
return (o, e) => (
|
|
239
|
+
return (o, e) => (i(), v("div", {
|
|
240
240
|
class: I(["cl-border cl-border-transparent cl-overflow-hidden cl-relative cl-rounded-md cl-shadow-lg cl-transition-all", {
|
|
241
241
|
"cl-cursor-pointer hover:cl-shadow-xl hover:cl-border-grey-0": o.hover
|
|
242
242
|
}])
|
|
243
243
|
}, [
|
|
244
|
-
o.$slots.image ? (
|
|
244
|
+
o.$slots.image ? (i(), v("div", jl, [
|
|
245
245
|
j(o.$slots, "image")
|
|
246
246
|
])) : N("", !0),
|
|
247
|
-
o.$slots.title ? (
|
|
247
|
+
o.$slots.title ? (i(), v("div", {
|
|
248
248
|
key: 1,
|
|
249
249
|
class: I(["cl-border-grey-2 cl-font-normal", {
|
|
250
250
|
"cl-p-2 cl-text-2xl cl-leading-8": o.size === "small",
|
|
@@ -265,7 +265,7 @@ const Se = /* @__PURE__ */ de(El, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
265
265
|
}, [
|
|
266
266
|
j(o.$slots, "default")
|
|
267
267
|
], 2),
|
|
268
|
-
o.$slots.footer ? (
|
|
268
|
+
o.$slots.footer ? (i(), v("div", {
|
|
269
269
|
key: 2,
|
|
270
270
|
class: I(["cl-border-grey-2 cl-border-t", {
|
|
271
271
|
"cl-p-2": o.size === "small",
|
|
@@ -282,7 +282,7 @@ const Se = /* @__PURE__ */ de(El, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
282
282
|
"medium",
|
|
283
283
|
"large"
|
|
284
284
|
];
|
|
285
|
-
var Y = /* @__PURE__ */ ((t) => (t.CURRENCY = "currency", t.PERCENTAGE = "percentage", t.INTEGER = "integer", t.DECIMAL = "decimal", t.MULTIPLIER = "multiplier", t))(Y || {}),
|
|
285
|
+
var Y = /* @__PURE__ */ ((t) => (t.CURRENCY = "currency", t.PERCENTAGE = "percentage", t.INTEGER = "integer", t.DECIMAL = "decimal", t.MULTIPLIER = "multiplier", t))(Y || {}), G = /* @__PURE__ */ ((t) => (t.SHORT_DATE = "short-date", t.SHORT_DATETIME = "short-datetime", t.DATE = "date", t.DATETIME = "datetime", t.LONG_DATE = "long-date", t.LONG_DATETIME = "long-datetime", t.TIME = "time", t.MONTH_YEAR = "month-year", t))(G || {});
|
|
286
286
|
const Rl = {
|
|
287
287
|
"en-GB": {
|
|
288
288
|
comboBox: {
|
|
@@ -383,52 +383,52 @@ const Rl = {
|
|
|
383
383
|
}
|
|
384
384
|
}, Ul = {
|
|
385
385
|
"en-GB": {
|
|
386
|
-
[
|
|
386
|
+
[G.SHORT_DATE]: {
|
|
387
387
|
day: "numeric",
|
|
388
388
|
month: "numeric",
|
|
389
389
|
year: "2-digit"
|
|
390
390
|
},
|
|
391
|
-
[
|
|
391
|
+
[G.SHORT_DATETIME]: {
|
|
392
392
|
day: "numeric",
|
|
393
393
|
month: "numeric",
|
|
394
394
|
year: "2-digit",
|
|
395
395
|
hour: "numeric",
|
|
396
396
|
minute: "numeric"
|
|
397
397
|
},
|
|
398
|
-
[
|
|
398
|
+
[G.DATE]: {
|
|
399
399
|
day: "numeric",
|
|
400
400
|
month: "numeric",
|
|
401
401
|
year: "numeric"
|
|
402
402
|
},
|
|
403
|
-
[
|
|
403
|
+
[G.DATETIME]: {
|
|
404
404
|
day: "numeric",
|
|
405
405
|
month: "numeric",
|
|
406
406
|
year: "numeric",
|
|
407
407
|
hour: "numeric",
|
|
408
408
|
minute: "numeric"
|
|
409
409
|
},
|
|
410
|
-
[
|
|
410
|
+
[G.LONG_DATE]: {
|
|
411
411
|
day: "numeric",
|
|
412
412
|
month: "long",
|
|
413
413
|
year: "numeric"
|
|
414
414
|
},
|
|
415
|
-
[
|
|
415
|
+
[G.LONG_DATETIME]: {
|
|
416
416
|
day: "numeric",
|
|
417
417
|
month: "long",
|
|
418
418
|
year: "numeric",
|
|
419
419
|
hour: "numeric",
|
|
420
420
|
minute: "numeric"
|
|
421
421
|
},
|
|
422
|
-
[
|
|
422
|
+
[G.TIME]: {
|
|
423
423
|
hour: "numeric",
|
|
424
424
|
minute: "numeric"
|
|
425
425
|
},
|
|
426
|
-
[
|
|
426
|
+
[G.MONTH_YEAR]: {
|
|
427
427
|
month: "long",
|
|
428
428
|
year: "numeric"
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
}, X =
|
|
431
|
+
}, X = il({
|
|
432
432
|
locale: "en-GB",
|
|
433
433
|
fallbackLocale: "en-GB",
|
|
434
434
|
messages: Rl,
|
|
@@ -451,7 +451,7 @@ function Ms(t, o) {
|
|
|
451
451
|
function Vs(t) {
|
|
452
452
|
return X.global.locale.value = t, ge();
|
|
453
453
|
}
|
|
454
|
-
const { t:
|
|
454
|
+
const { t: ie } = X.global;
|
|
455
455
|
function Bl(t, o, e, l) {
|
|
456
456
|
const s = X.global.locale.value;
|
|
457
457
|
return new Promise((m) => {
|
|
@@ -468,17 +468,17 @@ function Bl(t, o, e, l) {
|
|
|
468
468
|
case "tel":
|
|
469
469
|
case "text":
|
|
470
470
|
case "url":
|
|
471
|
-
a = ((l == null ? void 0 : l.length) ?? 0) >= (Number(t) || 0), n = ue(a,
|
|
471
|
+
a = ((l == null ? void 0 : l.length) ?? 0) >= (Number(t) || 0), n = ue(a, ie("input.greaterOrEqualToCharacters", { label: e, min: t.toString() }));
|
|
472
472
|
break;
|
|
473
473
|
case "number":
|
|
474
474
|
case "range":
|
|
475
|
-
a = l >= (Number(t) || 0), n = ue(a,
|
|
475
|
+
a = l >= (Number(t) || 0), n = ue(a, ie("input.greaterOrEqualToValue", { label: e, min: t.toString() }));
|
|
476
476
|
break;
|
|
477
477
|
case "date":
|
|
478
|
-
a = new Date(l).getTime() >= new Date(t).getTime(), n = ue(a,
|
|
478
|
+
a = new Date(l).getTime() >= new Date(t).getTime(), n = ue(a, ie("input.afterOrEqualToValue", { label: e, min: X.global.d(new Date(t), G.DATE, s ?? X.global.locale.value) }));
|
|
479
479
|
break;
|
|
480
480
|
case "datetime":
|
|
481
|
-
a = new Date(l).getTime() >= new Date(t).getTime(), n = ue(a,
|
|
481
|
+
a = new Date(l).getTime() >= new Date(t).getTime(), n = ue(a, ie("input.afterOrEqualToValue", { label: e, min: X.global.d(new Date(t), G.DATETIME, s ?? X.global.locale.value) }));
|
|
482
482
|
break;
|
|
483
483
|
default:
|
|
484
484
|
n.valid = !0;
|
|
@@ -504,17 +504,17 @@ function Ml(t, o, e, l) {
|
|
|
504
504
|
case "tel":
|
|
505
505
|
case "text":
|
|
506
506
|
case "url":
|
|
507
|
-
a = ((l == null ? void 0 : l.length) ?? 0) <= (Number(t) || 0), n = ue(a,
|
|
507
|
+
a = ((l == null ? void 0 : l.length) ?? 0) <= (Number(t) || 0), n = ue(a, ie("input.lessOrEqualToCharacters", { label: e, max: t.toString() }));
|
|
508
508
|
break;
|
|
509
509
|
case "number":
|
|
510
510
|
case "range":
|
|
511
|
-
a = l <= (Number(t) || 0), n = ue(a,
|
|
511
|
+
a = l <= (Number(t) || 0), n = ue(a, ie("input.lessOrEqualToValue", { label: e, max: t.toString() }));
|
|
512
512
|
break;
|
|
513
513
|
case "date":
|
|
514
|
-
a = new Date(l).getTime() <= new Date(t).getTime(), n = ue(a,
|
|
514
|
+
a = new Date(l).getTime() <= new Date(t).getTime(), n = ue(a, ie("input.beforeOrEqualToValue", { label: e, max: X.global.d(new Date(t), G.DATE, s ?? X.global.locale.value) }));
|
|
515
515
|
break;
|
|
516
516
|
case "datetime":
|
|
517
|
-
a = new Date(l).getTime() <= new Date(t).getTime(), n = ue(a,
|
|
517
|
+
a = new Date(l).getTime() <= new Date(t).getTime(), n = ue(a, ie("input.beforeOrEqualToValue", { label: e, min: X.global.d(new Date(t), G.DATETIME, s ?? X.global.locale.value) }));
|
|
518
518
|
break;
|
|
519
519
|
default:
|
|
520
520
|
n.valid = !0;
|
|
@@ -526,13 +526,13 @@ function Ml(t, o, e, l) {
|
|
|
526
526
|
}
|
|
527
527
|
function Vl(t, o) {
|
|
528
528
|
return new Promise((e) => {
|
|
529
|
-
const l = o != null && o !== "" && o.toString().trim() !== "", s = ue(l,
|
|
529
|
+
const l = o != null && o !== "" && o.toString().trim() !== "", s = ue(l, ie("input.valueIsRequired", { label: t }));
|
|
530
530
|
e(s);
|
|
531
531
|
});
|
|
532
532
|
}
|
|
533
533
|
function Dl(t, o) {
|
|
534
534
|
return new Promise((e) => {
|
|
535
|
-
const s = o === "" || /[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/.exec(o) !== null, m = ue(s,
|
|
535
|
+
const s = o === "" || /[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/.exec(o) !== null, m = ue(s, ie("input.valueNotValidEmail", { label: t }));
|
|
536
536
|
e(m);
|
|
537
537
|
});
|
|
538
538
|
}
|
|
@@ -563,7 +563,7 @@ const Ll = { class: "cl-relative" }, Pl = ["value", "disabled", "placeholder"],
|
|
|
563
563
|
var l;
|
|
564
564
|
(l = e.value) == null || l.focus();
|
|
565
565
|
}
|
|
566
|
-
}), (l, s) => (
|
|
566
|
+
}), (l, s) => (i(), v("div", Ll, [
|
|
567
567
|
p("input", se({
|
|
568
568
|
ref_key: "element",
|
|
569
569
|
ref: e
|
|
@@ -581,14 +581,14 @@ const Ll = { class: "cl-relative" }, Pl = ["value", "disabled", "placeholder"],
|
|
|
581
581
|
}, null, 8, ["class", "icon"]), [
|
|
582
582
|
[H, !l.disabled]
|
|
583
583
|
]),
|
|
584
|
-
l.disabled ? N("", !0) : (
|
|
585
|
-
l.type !== "time" ? (
|
|
584
|
+
l.disabled ? N("", !0) : (i(), v("div", Fl, [
|
|
585
|
+
l.type !== "time" ? (i(), V(d(_), {
|
|
586
586
|
key: 0,
|
|
587
587
|
class: "cl-cursor-pointer hover:cl-text-link-light",
|
|
588
588
|
icon: "ph:arrow-counter-clockwise",
|
|
589
589
|
onClick: s[0] || (s[0] = W((m) => l.$emit("reset"), ["prevent"]))
|
|
590
590
|
})) : N("", !0),
|
|
591
|
-
!l.required && l.date && (l.type !== "time" || l.date !== "00:00") ? (
|
|
591
|
+
!l.required && l.date && (l.type !== "time" || l.date !== "00:00") ? (i(), V(d(_), {
|
|
592
592
|
key: 1,
|
|
593
593
|
class: "cl-cursor-pointer hover:cl-text-link-light md:cl-ml-0.5",
|
|
594
594
|
icon: "ph:x",
|
|
@@ -598,7 +598,7 @@ const Ll = { class: "cl-relative" }, Pl = ["value", "disabled", "placeholder"],
|
|
|
598
598
|
]));
|
|
599
599
|
}
|
|
600
600
|
});
|
|
601
|
-
const De = /* @__PURE__ */ de(Hl, [["__scopeId", "data-v-4c802181"]]),
|
|
601
|
+
const De = /* @__PURE__ */ de(Hl, [["__scopeId", "data-v-4c802181"]]), xl = /* @__PURE__ */ M({
|
|
602
602
|
inheritAttrs: !1,
|
|
603
603
|
__name: "cl-ui-calendar",
|
|
604
604
|
props: {
|
|
@@ -640,7 +640,7 @@ const De = /* @__PURE__ */ de(Hl, [["__scopeId", "data-v-4c802181"]]), Gl = /* @
|
|
|
640
640
|
break;
|
|
641
641
|
}
|
|
642
642
|
return l.placeholder ?? b;
|
|
643
|
-
}),
|
|
643
|
+
}), c = S(() => l.disabled ? !1 : {
|
|
644
644
|
visibility: "focus",
|
|
645
645
|
showDelay: 150,
|
|
646
646
|
hideDelay: 100
|
|
@@ -655,7 +655,7 @@ const De = /* @__PURE__ */ de(Hl, [["__scopeId", "data-v-4c802181"]]), Gl = /* @
|
|
|
655
655
|
var b;
|
|
656
656
|
(b = g.value) == null || b.focus();
|
|
657
657
|
}
|
|
658
|
-
}), (b, r) => b.type === "time" ? (
|
|
658
|
+
}), (b, r) => b.type === "time" ? (i(), V(d(Me), {
|
|
659
659
|
key: 0,
|
|
660
660
|
modelValue: s.value,
|
|
661
661
|
"onUpdate:modelValue": r[1] || (r[1] = (w) => s.value = w),
|
|
@@ -668,7 +668,7 @@ const De = /* @__PURE__ */ de(Hl, [["__scopeId", "data-v-4c802181"]]), Gl = /* @
|
|
|
668
668
|
color: "primary",
|
|
669
669
|
"title-position": "left",
|
|
670
670
|
"hide-time-header": "",
|
|
671
|
-
popover:
|
|
671
|
+
popover: c.value
|
|
672
672
|
}, {
|
|
673
673
|
default: P(({ inputValue: w, inputEvents: h }) => [
|
|
674
674
|
k(De, se(b.$attrs, {
|
|
@@ -685,7 +685,7 @@ const De = /* @__PURE__ */ de(Hl, [["__scopeId", "data-v-4c802181"]]), Gl = /* @
|
|
|
685
685
|
}), null, 16, ["date", "events", "type", "placeholder", "required", "disabled"])
|
|
686
686
|
]),
|
|
687
687
|
_: 1
|
|
688
|
-
}, 8, ["modelValue", "locale", "is24hr", "mode", "is-required", "masks", "popover"])) : (
|
|
688
|
+
}, 8, ["modelValue", "locale", "is24hr", "mode", "is-required", "masks", "popover"])) : (i(), V(d(Me), {
|
|
689
689
|
key: 1,
|
|
690
690
|
modelValue: s.value,
|
|
691
691
|
"onUpdate:modelValue": r[3] || (r[3] = (w) => s.value = w),
|
|
@@ -699,7 +699,7 @@ const De = /* @__PURE__ */ de(Hl, [["__scopeId", "data-v-4c802181"]]), Gl = /* @
|
|
|
699
699
|
color: "primary",
|
|
700
700
|
"title-position": "left",
|
|
701
701
|
"hide-time-header": "",
|
|
702
|
-
popover:
|
|
702
|
+
popover: c.value
|
|
703
703
|
}, {
|
|
704
704
|
default: P(({ inputValue: w, inputEvents: h }) => [
|
|
705
705
|
k(De, se(b.$attrs, {
|
|
@@ -724,7 +724,7 @@ const Ee = [
|
|
|
724
724
|
"datetime",
|
|
725
725
|
"time"
|
|
726
726
|
];
|
|
727
|
-
function
|
|
727
|
+
function Gl(t) {
|
|
728
728
|
if (t.startsWith("ClUi"))
|
|
729
729
|
return {
|
|
730
730
|
name: `clUi${t.slice(4)}`,
|
|
@@ -737,9 +737,9 @@ function Zl(t) {
|
|
|
737
737
|
};
|
|
738
738
|
}
|
|
739
739
|
function Ds() {
|
|
740
|
-
return
|
|
740
|
+
return Gl;
|
|
741
741
|
}
|
|
742
|
-
const
|
|
742
|
+
const Zl = [
|
|
743
743
|
"button",
|
|
744
744
|
"checkbox",
|
|
745
745
|
"color",
|
|
@@ -777,7 +777,7 @@ const xl = [
|
|
|
777
777
|
"update:value": null
|
|
778
778
|
},
|
|
779
779
|
setup(t, { expose: o, emit: e }) {
|
|
780
|
-
const l = t, { n: s, t: m } = oe(), { debounce: n } = ul(), a = A(l.value),
|
|
780
|
+
const l = t, { n: s, t: m } = oe(), { debounce: n } = ul(), a = A(l.value), c = A(), u = S({
|
|
781
781
|
get: () => l.value,
|
|
782
782
|
set: (h) => e("update:value", h)
|
|
783
783
|
}), g = S(() => l.disabled ? "rgba(153, 153, 153, 0.8)" : "#9acd32"), b = S(() => {
|
|
@@ -791,9 +791,9 @@ const xl = [
|
|
|
791
791
|
return K(() => l.value, () => a.value = l.value), o({
|
|
792
792
|
focus() {
|
|
793
793
|
var h;
|
|
794
|
-
(h =
|
|
794
|
+
(h = c.value) == null || h.focus();
|
|
795
795
|
}
|
|
796
|
-
}), (h, q) => r.value ? (
|
|
796
|
+
}), (h, q) => r.value ? (i(), v("div", le(se({ key: 0 }, h.$attrs)), [
|
|
797
797
|
L(p("div", { class: "cl-bg-transparent cl-relative cl-text-center cl-text-sm" }, T(u.value), 513), [
|
|
798
798
|
[H, !h.showNumericInput]
|
|
799
799
|
]),
|
|
@@ -813,10 +813,10 @@ const xl = [
|
|
|
813
813
|
]),
|
|
814
814
|
p("div", Kl, [
|
|
815
815
|
p("span", Ql, T(d(s)(h.min, Number.isInteger(h.min) ? d(Y).INTEGER : d(Y).DECIMAL)), 1),
|
|
816
|
-
typeof u.value == "number" ? (
|
|
816
|
+
typeof u.value == "number" ? (i(), v("div", Jl, [
|
|
817
817
|
L(p("input", {
|
|
818
818
|
ref_key: "sliderRef",
|
|
819
|
-
ref:
|
|
819
|
+
ref: c,
|
|
820
820
|
"onUpdate:modelValue": q[2] || (q[2] = ($) => u.value = $),
|
|
821
821
|
class: "cl-align-middle cl-appearance-none cl-bg-gradient-to-r cl-border cl-border-grey-2 cl-delay-500 cl-ease-in cl-flex-1 cl-h-5 cl-mb-2 cl-outline-none cl-rounded-full cl-transition-colors cl-w-full",
|
|
822
822
|
style: We({
|
|
@@ -839,7 +839,7 @@ const xl = [
|
|
|
839
839
|
p("span", Xl, T(d(s)(h.max, Number.isInteger(h.max) ? d(Y).INTEGER : d(Y).DECIMAL)), 1)
|
|
840
840
|
])
|
|
841
841
|
])
|
|
842
|
-
], 16)) : (
|
|
842
|
+
], 16)) : (i(), v("div", et, T(d(m)("slider.invalidProps")), 1));
|
|
843
843
|
}
|
|
844
844
|
});
|
|
845
845
|
const tt = /* @__PURE__ */ de(lt, [["__scopeId", "data-v-849763cf"]]);
|
|
@@ -903,10 +903,10 @@ function Fe(t, o) {
|
|
|
903
903
|
const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" }, rt = {
|
|
904
904
|
key: 0,
|
|
905
905
|
class: "cl-block cl-left-auto cl-relative cl-text-danger-default"
|
|
906
|
-
},
|
|
906
|
+
}, ct = {
|
|
907
907
|
key: 1,
|
|
908
908
|
class: "cl-bg-danger-light cl-block cl-max-h-6 cl-mb-1 cl-ml-2 cl-px-2 cl-rounded-md cl-text-center cl-text-danger-default cl-text-xs"
|
|
909
|
-
},
|
|
909
|
+
}, it = {
|
|
910
910
|
key: 0,
|
|
911
911
|
class: "cl-relative"
|
|
912
912
|
}, ut = ["type", "disabled", "min", "max", "minlength", "maxlength", "step", "placeholder", "accept", "name", "autocomplete"], dt = { key: 0 }, pt = {
|
|
@@ -950,7 +950,7 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
950
950
|
},
|
|
951
951
|
emits: ["update:model-value", "click", "focus", "input", "change", "validated"],
|
|
952
952
|
setup(t, { expose: o, emit: e }) {
|
|
953
|
-
const l = t, s = A(null), m = A(!1), n = A(!1), a = S(C),
|
|
953
|
+
const l = t, s = A(null), m = A(!1), n = A(!1), a = S(C), c = S(() => l.placeholderText.trim() !== "" ? l.placeholderText : l.label), u = A(0), g = S({
|
|
954
954
|
get: () => l.modelValue,
|
|
955
955
|
set: (f) => y(f, !1)
|
|
956
956
|
}), b = S({
|
|
@@ -990,10 +990,10 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
990
990
|
let f = "";
|
|
991
991
|
return l.inputType === "color" && g.value && (l.disabled ? f = "background: #999999" : f = `background: ${g.value};`), f;
|
|
992
992
|
}
|
|
993
|
-
function
|
|
993
|
+
function Z(f) {
|
|
994
994
|
ye(l.inputType) ? (f.preventDefault(), e("click", f)) : l.inputType === "checkbox" && e("click", f);
|
|
995
995
|
}
|
|
996
|
-
function
|
|
996
|
+
function ce(f) {
|
|
997
997
|
if (s.value) {
|
|
998
998
|
s.value.stepUp(), s.value.focus(), y(s.value.valueAsNumber, !1);
|
|
999
999
|
const E = {
|
|
@@ -1029,7 +1029,7 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
1029
1029
|
const E = a.value;
|
|
1030
1030
|
return m.value ? f = E : n.value && ((B = g.value) == null ? void 0 : B.toString().trim()) === "" && (f = !1), f;
|
|
1031
1031
|
}
|
|
1032
|
-
async function
|
|
1032
|
+
async function x(f) {
|
|
1033
1033
|
const E = Fe(f, l.inputType);
|
|
1034
1034
|
l.validateOn === "change" && await D(E), e("change", f, E);
|
|
1035
1035
|
}
|
|
@@ -1046,7 +1046,7 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
1046
1046
|
var f;
|
|
1047
1047
|
(f = s.value) == null || f.blur();
|
|
1048
1048
|
}
|
|
1049
|
-
}), (f, E) => (
|
|
1049
|
+
}), (f, E) => (i(), v("div", se({ ...f.$attrs, id: void 0 }, {
|
|
1050
1050
|
key: u.value,
|
|
1051
1051
|
class: "cl-align-top cl-border-none cl-inline-block cl-text-left"
|
|
1052
1052
|
}), [
|
|
@@ -1060,10 +1060,10 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
1060
1060
|
[H, f.showLabel && f.label !== ""]
|
|
1061
1061
|
])
|
|
1062
1062
|
]),
|
|
1063
|
-
f.isRequired && a.value ? (
|
|
1064
|
-
f.isRequired && !a.value && f.requiredText.length ? (
|
|
1063
|
+
f.isRequired && a.value ? (i(), v("label", rt, " * ")) : N("", !0),
|
|
1064
|
+
f.isRequired && !a.value && f.requiredText.length ? (i(), v("label", ct, T(f.requiredText), 1)) : N("", !0)
|
|
1065
1065
|
]),
|
|
1066
|
-
f.inputType !== "range" && !d(Pe)(f.inputType) ? (
|
|
1066
|
+
f.inputType !== "range" && !d(Pe)(f.inputType) ? (i(), v("div", it, [
|
|
1067
1067
|
L(p("input", se({
|
|
1068
1068
|
ref_key: "inputElement",
|
|
1069
1069
|
ref: s,
|
|
@@ -1087,11 +1087,11 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
1087
1087
|
minlength: f.min !== null && d(Le)(f.inputType) ? f.min : void 0,
|
|
1088
1088
|
maxlength: f.max !== null && d(Le)(f.inputType) ? f.max : void 0,
|
|
1089
1089
|
step: f.step,
|
|
1090
|
-
placeholder:
|
|
1090
|
+
placeholder: c.value,
|
|
1091
1091
|
accept: f.fileExtensions,
|
|
1092
1092
|
name: f.group,
|
|
1093
1093
|
autocomplete: f.autocomplete,
|
|
1094
|
-
onClick: E[1] || (E[1] = (B) =>
|
|
1094
|
+
onClick: E[1] || (E[1] = (B) => Z(B)),
|
|
1095
1095
|
onFocus: E[2] || (E[2] = (B) => e("focus")),
|
|
1096
1096
|
onBlur: E[3] || (E[3] = W((B) => {
|
|
1097
1097
|
be(), ke();
|
|
@@ -1100,7 +1100,7 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
1100
1100
|
onInput: E[4] || (E[4] = (B) => {
|
|
1101
1101
|
e("input", B, d(Fe)(B, f.inputType));
|
|
1102
1102
|
}),
|
|
1103
|
-
onChange:
|
|
1103
|
+
onChange: x
|
|
1104
1104
|
}), null, 16, ut), [
|
|
1105
1105
|
[nl, g.value]
|
|
1106
1106
|
]),
|
|
@@ -1109,11 +1109,11 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
1109
1109
|
duration: 300
|
|
1110
1110
|
}, {
|
|
1111
1111
|
default: P(() => [
|
|
1112
|
-
f.inputType === "number" && !f.disabled && f.showArrows ? L((
|
|
1112
|
+
f.inputType === "number" && !f.disabled && f.showArrows ? L((i(), v("div", dt, [
|
|
1113
1113
|
k(d(_), {
|
|
1114
1114
|
icon: "ph:caret-up-bold",
|
|
1115
1115
|
class: "cl-absolute cl-bg-link-default cl-right-1 cl-rounded-full cl-text-sm cl-text-white cl-top-1 hover:cl-bg-link-light hover:cl-cursor-pointer",
|
|
1116
|
-
onClick:
|
|
1116
|
+
onClick: ce,
|
|
1117
1117
|
onMousedown: E[5] || (E[5] = W(() => {
|
|
1118
1118
|
}, ["prevent"]))
|
|
1119
1119
|
}),
|
|
@@ -1130,7 +1130,7 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
1130
1130
|
]),
|
|
1131
1131
|
_: 1
|
|
1132
1132
|
})
|
|
1133
|
-
])) : d(Pe)(f.inputType) ? (
|
|
1133
|
+
])) : d(Pe)(f.inputType) ? (i(), V(d(xl), se({ key: 1 }, f.$attrs, {
|
|
1134
1134
|
ref_key: "inputElement",
|
|
1135
1135
|
ref: s,
|
|
1136
1136
|
date: b.value,
|
|
@@ -1146,10 +1146,10 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
1146
1146
|
"time-zone": f.timeZone,
|
|
1147
1147
|
min: r.value,
|
|
1148
1148
|
max: w.value,
|
|
1149
|
-
placeholder:
|
|
1149
|
+
placeholder: c.value,
|
|
1150
1150
|
onBlur: W(be, ["self"]),
|
|
1151
1151
|
onFocus: E[8] || (E[8] = (B) => e("focus"))
|
|
1152
|
-
}), null, 16, ["date", "class", "disabled", "required", "type", "time-zone", "min", "max", "placeholder", "onBlur"])) : f.inputType === "range" && typeof g.value == "number" ? (
|
|
1152
|
+
}), null, 16, ["date", "class", "disabled", "required", "type", "time-zone", "min", "max", "placeholder", "onBlur"])) : f.inputType === "range" && typeof g.value == "number" ? (i(), v("div", pt, [
|
|
1153
1153
|
k(d(tt), {
|
|
1154
1154
|
ref_key: "inputElement",
|
|
1155
1155
|
ref: s,
|
|
@@ -1165,12 +1165,12 @@ const st = { class: "cl-flex cl-justify-between" }, at = { class: "cl-w-full" },
|
|
|
1165
1165
|
}, null, 8, ["value", "min", "max", "step", "disabled", "onBlur"])
|
|
1166
1166
|
])) : N("", !0)
|
|
1167
1167
|
], 32),
|
|
1168
|
-
R.value && $.value ? (
|
|
1169
|
-
!R.value && z.value.length > 0 && f.showValidationMessages ? (
|
|
1168
|
+
R.value && $.value ? (i(), v("div", ft, T($.value), 1)) : N("", !0),
|
|
1169
|
+
!R.value && z.value.length > 0 && f.showValidationMessages ? (i(), v("div", mt, T(z.value), 1)) : N("", !0)
|
|
1170
1170
|
], 16));
|
|
1171
1171
|
}
|
|
1172
1172
|
});
|
|
1173
|
-
const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-
|
|
1173
|
+
const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-39c68789"]]), vt = { class: "cl-align-items-center cl-bg-black cl-bg-opacity-40 cl-bottom-0 cl-fixed cl-flex cl-h-full cl-justify-center cl-left-0 cl-right-0 cl-top-0 cl-w-full cl-z-40 xl:cl-h-screen" }, bt = ["onKeypress"], ht = { class: "cl-overflow-y-auto cl-overscroll-y-none cl-p-2 cl-w-full" }, Xe = /* @__PURE__ */ M({
|
|
1174
1174
|
inheritAttrs: !1,
|
|
1175
1175
|
__name: "cl-ui-modal",
|
|
1176
1176
|
props: {
|
|
@@ -1189,14 +1189,14 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-d01c4a47"]]), vt = { cl
|
|
|
1189
1189
|
function m(n) {
|
|
1190
1190
|
n.key === "Escape" && s();
|
|
1191
1191
|
}
|
|
1192
|
-
return (n, a) => (
|
|
1192
|
+
return (n, a) => (i(), v(F, null, [
|
|
1193
1193
|
j(n.$slots, "trigger", le(ne({ open: l }))),
|
|
1194
|
-
(
|
|
1194
|
+
(i(), V(Ie, { to: "body" }, [
|
|
1195
1195
|
k(me, { name: "fade" }, {
|
|
1196
1196
|
default: P(() => [
|
|
1197
1197
|
L(p("div", vt, [
|
|
1198
1198
|
p("div", se(n.$attrs, {
|
|
1199
|
-
class: ["cl-bg-white cl-flex cl-flex-wrap cl-max-h-[calc(
|
|
1199
|
+
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)]", {
|
|
1200
1200
|
"lg:cl-w-2/12 cl-w-10/12": n.size === "x-small",
|
|
1201
1201
|
"cl-w-6/12": n.size === "small",
|
|
1202
1202
|
"cl-w-8/12": n.size === "medium",
|
|
@@ -1253,8 +1253,8 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-d01c4a47"]]), vt = { cl
|
|
|
1253
1253
|
"clear-object": null
|
|
1254
1254
|
},
|
|
1255
1255
|
setup(t) {
|
|
1256
|
-
return (o, e) => (
|
|
1257
|
-
o.additionalText !== "" ? (
|
|
1256
|
+
return (o, e) => (i(), v("div", yt, [
|
|
1257
|
+
o.additionalText !== "" ? (i(), v("div", wt, T(o.additionalText), 1)) : N("", !0),
|
|
1258
1258
|
p("div", {
|
|
1259
1259
|
class: I({
|
|
1260
1260
|
"cl-w-1/2": o.additionalText !== "",
|
|
@@ -1306,12 +1306,12 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-d01c4a47"]]), vt = { cl
|
|
|
1306
1306
|
function a(u) {
|
|
1307
1307
|
u === !0 ? (m.value = !0, o("option-highlighted", e.index)) : e.index !== e.selectedIndex && (m.value = !1);
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1309
|
+
function c() {
|
|
1310
1310
|
e.selectedIndex === e.index ? m.value = !0 : m.value = !1;
|
|
1311
1311
|
}
|
|
1312
|
-
return K(() => e.selectedIndex, () =>
|
|
1312
|
+
return K(() => e.selectedIndex, () => c()), (u, g) => {
|
|
1313
1313
|
var b, r;
|
|
1314
|
-
return
|
|
1314
|
+
return i(), v("div", {
|
|
1315
1315
|
class: I(["cl-cursor-pointer cl-duration-75 cl-flex cl-p-1 cl-text-left cl-transition-colors", {
|
|
1316
1316
|
"cl-bg-white": m.value === !1,
|
|
1317
1317
|
"cl-bg-link-light cl-text-white cl-opacity-90": m.value && u.isCreateNewOption === !1,
|
|
@@ -1321,7 +1321,7 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-d01c4a47"]]), vt = { cl
|
|
|
1321
1321
|
onMousemove: g[0] || (g[0] = (w) => a(!0)),
|
|
1322
1322
|
onMouseleave: g[1] || (g[1] = (w) => a(!1))
|
|
1323
1323
|
}, [
|
|
1324
|
-
u.option !== null && ((b = u.option) == null ? void 0 : b.parentId) !== 0 && ((r = u.option) == null ? void 0 : r.parentId) !== void 0 ? (
|
|
1324
|
+
u.option !== null && ((b = u.option) == null ? void 0 : b.parentId) !== 0 && ((r = u.option) == null ? void 0 : r.parentId) !== void 0 ? (i(), v("div", $t, T(s.value), 1)) : N("", !0),
|
|
1325
1325
|
p("div", {
|
|
1326
1326
|
class: I({
|
|
1327
1327
|
"cl-w-1/2": s.value !== "",
|
|
@@ -1364,7 +1364,7 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-d01c4a47"]]), vt = { cl
|
|
|
1364
1364
|
"hide-dropdown": null
|
|
1365
1365
|
},
|
|
1366
1366
|
setup(t, { emit: o }) {
|
|
1367
|
-
const e = t, { t: l } = oe(), s = A(""), m = A(!1), n = A(-1), a = S(() => m.value ? -1 : 0),
|
|
1367
|
+
const e = t, { t: l } = oe(), s = A(""), m = A(!1), n = A(-1), a = S(() => m.value ? -1 : 0), c = A();
|
|
1368
1368
|
function u(y) {
|
|
1369
1369
|
(y === void 0 || (y == null ? void 0 : y.code.startsWith("Arrow")) === !1 && (y == null ? void 0 : y.code.startsWith("Control")) === !1 && (y == null ? void 0 : y.code.startsWith("Shift")) === !1 && (y == null ? void 0 : y.code.startsWith("Tab")) === !1 && (y == null ? void 0 : y.code) !== "Enter") && (o("search", s.value), n.value = -2);
|
|
1370
1370
|
}
|
|
@@ -1390,14 +1390,14 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-d01c4a47"]]), vt = { cl
|
|
|
1390
1390
|
if (y.key === "Tab" && y.shiftKey === !0) {
|
|
1391
1391
|
const D = document.getElementsByTagName("input");
|
|
1392
1392
|
let J = -1;
|
|
1393
|
-
for (let
|
|
1394
|
-
D[
|
|
1393
|
+
for (let Z = 0; Z < D.length; Z++)
|
|
1394
|
+
D[Z] === y.target && (J = Z - 1);
|
|
1395
1395
|
J >= 0 && (D[J].focus(), r());
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
1398
|
function R() {
|
|
1399
1399
|
var y;
|
|
1400
|
-
e.results && e.results.length > 1 && ((y =
|
|
1400
|
+
e.results && e.results.length > 1 && ((y = c.value) == null || y.scrollTo(0, (n.value + 1) * 34 - 34 * 2));
|
|
1401
1401
|
}
|
|
1402
1402
|
function O() {
|
|
1403
1403
|
let y = !1;
|
|
@@ -1409,31 +1409,31 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-d01c4a47"]]), vt = { cl
|
|
|
1409
1409
|
function U() {
|
|
1410
1410
|
e.isVisible === !0 && (s.value = "", u(), ge(() => {
|
|
1411
1411
|
var y, D;
|
|
1412
|
-
return (D = (y =
|
|
1412
|
+
return (D = (y = c.value) == null ? void 0 : y.querySelector("input")) == null ? void 0 : D.focus();
|
|
1413
1413
|
}));
|
|
1414
1414
|
}
|
|
1415
1415
|
return K(() => e.results, () => O()), K(() => e.errorMessage, () => O()), K(() => e.isVisible, () => U()), Ae(() => {
|
|
1416
1416
|
var y;
|
|
1417
|
-
return (y =
|
|
1417
|
+
return (y = c.value) == null ? void 0 : y.addEventListener("keydown", $);
|
|
1418
1418
|
}), _e(() => {
|
|
1419
1419
|
var y;
|
|
1420
|
-
return (y =
|
|
1420
|
+
return (y = c.value) == null ? void 0 : y.removeEventListener("keydown", $);
|
|
1421
1421
|
}), (y, D) => {
|
|
1422
1422
|
var J;
|
|
1423
|
-
return
|
|
1423
|
+
return i(), v("div", {
|
|
1424
1424
|
ref_key: "container",
|
|
1425
|
-
ref:
|
|
1425
|
+
ref: c,
|
|
1426
1426
|
class: "cl-absolute cl-bg-white cl-border cl-border-collapse cl-border-grey-0 cl-h-52 cl-overflow-y-auto cl-overscroll-y-none cl-rounded cl-text-sm cl-w-full cl-z-20",
|
|
1427
1427
|
onKeydown: [
|
|
1428
|
-
D[2] || (D[2] = we(W((
|
|
1429
|
-
D[3] || (D[3] = we(W((
|
|
1428
|
+
D[2] || (D[2] = we(W((Z) => h(a.value), ["prevent", "stop"]), ["up"])),
|
|
1429
|
+
D[3] || (D[3] = we(W((Z) => w(a.value), ["prevent", "stop"]), ["down"]))
|
|
1430
1430
|
],
|
|
1431
1431
|
onKeyup: we(W(q, ["prevent", "stop"]), ["enter"])
|
|
1432
1432
|
}, [
|
|
1433
1433
|
p("div", Tt, [
|
|
1434
1434
|
k(ae, {
|
|
1435
1435
|
modelValue: s.value,
|
|
1436
|
-
"onUpdate:modelValue": D[0] || (D[0] = (
|
|
1436
|
+
"onUpdate:modelValue": D[0] || (D[0] = (Z) => s.value = Z),
|
|
1437
1437
|
class: "!cl-mr-0 cl-w-full",
|
|
1438
1438
|
"input-type": "text",
|
|
1439
1439
|
"placeholder-text": y.searchHint,
|
|
@@ -1444,28 +1444,28 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-d01c4a47"]]), vt = { cl
|
|
|
1444
1444
|
[H, y.loading]
|
|
1445
1445
|
])
|
|
1446
1446
|
]),
|
|
1447
|
-
y.currentObjectName !== "" ? (
|
|
1447
|
+
y.currentObjectName !== "" ? (i(), V(Te, {
|
|
1448
1448
|
key: 0,
|
|
1449
1449
|
"show-clear-button": y.canClearSelectedObject,
|
|
1450
1450
|
text: y.currentObjectName,
|
|
1451
|
-
onClearObject: D[1] || (D[1] = (
|
|
1451
|
+
onClearObject: D[1] || (D[1] = (Z) => y.$emit("clear-object"))
|
|
1452
1452
|
}, null, 8, ["show-clear-button", "text"])) : N("", !0),
|
|
1453
|
-
y.objectParentType !== "" && y.results !== void 0 && y.results.length > 0 && y.errorMessage === "" ? (
|
|
1453
|
+
y.objectParentType !== "" && y.results !== void 0 && y.results.length > 0 && y.errorMessage === "" ? (i(), V(Te, {
|
|
1454
1454
|
key: 1,
|
|
1455
1455
|
text: y.objectType,
|
|
1456
1456
|
"additional-text": y.objectParentType,
|
|
1457
1457
|
class: "cl-bg-grey-2 cl-mt-1"
|
|
1458
1458
|
}, null, 8, ["text", "additional-text"])) : N("", !0),
|
|
1459
|
-
y.results !== null && ((J = y.results) == null ? void 0 : J.length) === 0 && s.value.trim() !== "" && y.canCreateNewObject === !1 && y.errorMessage === "" ? (
|
|
1459
|
+
y.results !== null && ((J = y.results) == null ? void 0 : J.length) === 0 && s.value.trim() !== "" && y.canCreateNewObject === !1 && y.errorMessage === "" ? (i(), V(Te, {
|
|
1460
1460
|
key: 2,
|
|
1461
1461
|
text: d(l)("comboBox.noResults", { value: s.value })
|
|
1462
1462
|
}, null, 8, ["text"])) : N("", !0),
|
|
1463
|
-
y.errorMessage !== "" ? (
|
|
1463
|
+
y.errorMessage !== "" ? (i(), V(Te, {
|
|
1464
1464
|
key: 3,
|
|
1465
1465
|
class: "!cl-bg-danger-light cl-border-danger-light cl-rounded cl-text-danger-dark",
|
|
1466
1466
|
text: d(l)("comboBox.errorMessage", { error: y.errorMessage })
|
|
1467
1467
|
}, null, 8, ["text"])) : N("", !0),
|
|
1468
|
-
m.value ? (
|
|
1468
|
+
m.value ? (i(), V(He, {
|
|
1469
1469
|
key: 4,
|
|
1470
1470
|
"is-create-new-option": !0,
|
|
1471
1471
|
text: d(l)("comboBox.addPrompt", { value: s.value, object: y.objectType }),
|
|
@@ -1475,11 +1475,11 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-d01c4a47"]]), vt = { cl
|
|
|
1475
1475
|
onCreateObject: b,
|
|
1476
1476
|
onOptionHighlighted: z
|
|
1477
1477
|
}, null, 8, ["text", "selected-index"])) : N("", !0),
|
|
1478
|
-
y.errorMessage === "" && y.results !== null ? (
|
|
1479
|
-
(
|
|
1480
|
-
key:
|
|
1481
|
-
option:
|
|
1482
|
-
index:
|
|
1478
|
+
y.errorMessage === "" && y.results !== null ? (i(), v("div", Et, [
|
|
1479
|
+
(i(!0), v(F, null, Q(y.results, (Z, ce) => (i(), V(He, {
|
|
1480
|
+
key: ce,
|
|
1481
|
+
option: Z,
|
|
1482
|
+
index: ce,
|
|
1483
1483
|
class: "cl-px-2",
|
|
1484
1484
|
"selected-index": n.value,
|
|
1485
1485
|
onSelectObject: g,
|
|
@@ -1517,14 +1517,14 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-d01c4a47"]]), vt = { cl
|
|
|
1517
1517
|
"update:current-object": null
|
|
1518
1518
|
},
|
|
1519
1519
|
setup(t, { expose: o, emit: e }) {
|
|
1520
|
-
const l = t, s = S(() => l.placeholderText ? l.placeholderText : n("comboBox.emptyHintText", { object: l.objectType })), m = S(() => l.searchHint ? l.searchHint : n("comboBox.searchHint", { object: l.objectType })), { t: n } = oe(), a = A(!1),
|
|
1520
|
+
const l = t, s = S(() => l.placeholderText ? l.placeholderText : n("comboBox.emptyHintText", { object: l.objectType })), m = S(() => l.searchHint ? l.searchHint : n("comboBox.searchHint", { object: l.objectType })), { t: n } = oe(), a = A(!1), c = S({
|
|
1521
1521
|
get: () => l.currentObject,
|
|
1522
1522
|
set: (C) => e("update:current-object", C)
|
|
1523
1523
|
}), u = A(null), g = A(null), b = S(() => be()), r = A(""), w = A(""), h = A(), q = A(!0), $ = A(!1);
|
|
1524
1524
|
function R(C) {
|
|
1525
1525
|
var f, E;
|
|
1526
|
-
const
|
|
1527
|
-
$.value = window.innerHeight -
|
|
1526
|
+
const x = ((f = he.value) == null ? void 0 : f.getBoundingClientRect().top) || 0;
|
|
1527
|
+
$.value = window.innerHeight - x < 280, l.disabled || (typeof C < "u" ? a.value = C : a.value = !a.value), (E = u.value) == null || E.blur();
|
|
1528
1528
|
}
|
|
1529
1529
|
function O(C) {
|
|
1530
1530
|
r.value = C, e("search", C);
|
|
@@ -1533,22 +1533,22 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-d01c4a47"]]), vt = { cl
|
|
|
1533
1533
|
w.value = C, e("search-parent", C);
|
|
1534
1534
|
}
|
|
1535
1535
|
function U() {
|
|
1536
|
-
|
|
1536
|
+
c.value = null, R(!1);
|
|
1537
1537
|
}
|
|
1538
1538
|
function y(C) {
|
|
1539
|
-
const
|
|
1540
|
-
|
|
1539
|
+
const x = D(C);
|
|
1540
|
+
c.value = x, R(!1);
|
|
1541
1541
|
}
|
|
1542
1542
|
function D(C) {
|
|
1543
|
-
let
|
|
1543
|
+
let x = null;
|
|
1544
1544
|
if (l.results !== null) {
|
|
1545
1545
|
for (let f = 0; f < l.results.length; f++)
|
|
1546
1546
|
if (l.results[f].id === C) {
|
|
1547
|
-
|
|
1547
|
+
x = l.results[f];
|
|
1548
1548
|
break;
|
|
1549
1549
|
}
|
|
1550
1550
|
}
|
|
1551
|
-
return
|
|
1551
|
+
return x;
|
|
1552
1552
|
}
|
|
1553
1553
|
function J() {
|
|
1554
1554
|
var C;
|
|
@@ -1557,19 +1557,19 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-d01c4a47"]]), vt = { cl
|
|
|
1557
1557
|
parentId: ((C = g.value) == null ? void 0 : C.id) ?? 0
|
|
1558
1558
|
}, e("create-object", h.value);
|
|
1559
1559
|
}
|
|
1560
|
-
function
|
|
1560
|
+
function Z() {
|
|
1561
1561
|
h.value = {
|
|
1562
1562
|
name: w.value,
|
|
1563
1563
|
parentId: 0
|
|
1564
1564
|
}, e("create-parent-object", h.value);
|
|
1565
1565
|
}
|
|
1566
|
-
function
|
|
1567
|
-
var C,
|
|
1566
|
+
function ce() {
|
|
1567
|
+
var C, x;
|
|
1568
1568
|
(C = l.objectCreatedResponse) != null && C.error ? Ve({
|
|
1569
1569
|
message: n("comboBox.createFailed", { name: r.value, error: l.objectCreatedResponse.error }),
|
|
1570
1570
|
colour: "danger",
|
|
1571
1571
|
duration: 1e4
|
|
1572
|
-
}) : (
|
|
1572
|
+
}) : (x = l.objectCreatedResponse) != null && x.id && ve();
|
|
1573
1573
|
}
|
|
1574
1574
|
function Ne() {
|
|
1575
1575
|
var C;
|
|
@@ -1579,14 +1579,14 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-d01c4a47"]]), vt = { cl
|
|
|
1579
1579
|
});
|
|
1580
1580
|
}
|
|
1581
1581
|
function ve() {
|
|
1582
|
-
var
|
|
1582
|
+
var x, f, E, B, pe;
|
|
1583
1583
|
Ve({
|
|
1584
|
-
message: n("comboBox.createSuccessful", { object: l.objectType, name: ((
|
|
1584
|
+
message: n("comboBox.createSuccessful", { object: l.objectType, name: ((x = l.objectCreatedResponse) == null ? void 0 : x.name) ?? "" }),
|
|
1585
1585
|
colour: "primary",
|
|
1586
1586
|
duration: 1e4
|
|
1587
1587
|
});
|
|
1588
1588
|
let C = "";
|
|
1589
|
-
g.value && g.value.id === ((f = l.objectCreatedResponse) == null ? void 0 : f.parentId) && (C = g.value.name),
|
|
1589
|
+
g.value && g.value.id === ((f = l.objectCreatedResponse) == null ? void 0 : f.parentId) && (C = g.value.name), c.value = {
|
|
1590
1590
|
id: ((E = l.objectCreatedResponse) == null ? void 0 : E.id) ?? 0,
|
|
1591
1591
|
name: ((B = l.objectCreatedResponse) == null ? void 0 : B.name) ?? "",
|
|
1592
1592
|
parentId: ((pe = l.objectCreatedResponse) == null ? void 0 : pe.parentId) ?? 0,
|
|
@@ -1595,22 +1595,22 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-d01c4a47"]]), vt = { cl
|
|
|
1595
1595
|
}
|
|
1596
1596
|
function be() {
|
|
1597
1597
|
let C = "";
|
|
1598
|
-
return
|
|
1598
|
+
return c.value && (c.value.parentName ? C = c.value.parentName + "; " + c.value.name : C = c.value.name), C;
|
|
1599
1599
|
}
|
|
1600
1600
|
function ke() {
|
|
1601
1601
|
let C = !0;
|
|
1602
1602
|
r.value === "" && (C = !1), l.objectParentType !== "" && g.value === null && (C = !1), q.value = C;
|
|
1603
1603
|
}
|
|
1604
|
-
K(() => l.objectCreatedResponse, () =>
|
|
1604
|
+
K(() => l.objectCreatedResponse, () => ce()), K(() => l.parentObjectCreatedResponse, () => Ne()), K(() => r.value, () => ke()), K(() => g.value, () => ke()), o({
|
|
1605
1605
|
focus() {
|
|
1606
1606
|
var C;
|
|
1607
1607
|
(C = u.value) == null || C.focus();
|
|
1608
1608
|
}
|
|
1609
1609
|
});
|
|
1610
1610
|
const he = A();
|
|
1611
|
-
return ze(he, () => a.value ? R(!1) : ""), (C,
|
|
1611
|
+
return ze(he, () => a.value ? R(!1) : ""), (C, x) => {
|
|
1612
1612
|
const f = sl("cl-ui-combo-box", !0);
|
|
1613
|
-
return
|
|
1613
|
+
return i(), v("div", {
|
|
1614
1614
|
ref_key: "outsideRef",
|
|
1615
1615
|
ref: he,
|
|
1616
1616
|
class: "cl-relative"
|
|
@@ -1620,13 +1620,13 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-d01c4a47"]]), vt = { cl
|
|
|
1620
1620
|
ref_key: "inputRef",
|
|
1621
1621
|
ref: u,
|
|
1622
1622
|
modelValue: b.value,
|
|
1623
|
-
"onUpdate:modelValue":
|
|
1623
|
+
"onUpdate:modelValue": x[0] || (x[0] = (E) => b.value = E),
|
|
1624
1624
|
class: I(["!cl-mr-0 cl-mb-0 cl-rounded-r-none cl-w-full cl-z-10", {
|
|
1625
1625
|
"cl-cursor-pointer": C.disabled === !1
|
|
1626
1626
|
}]),
|
|
1627
1627
|
"input-type": "text",
|
|
1628
1628
|
"placeholder-text": s.value,
|
|
1629
|
-
onFocus:
|
|
1629
|
+
onFocus: x[1] || (x[1] = (E) => {
|
|
1630
1630
|
R(), C.$emit("focus");
|
|
1631
1631
|
})
|
|
1632
1632
|
}, null, 8, ["modelValue", "class", "placeholder-text"]),
|
|
@@ -1641,25 +1641,25 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-d01c4a47"]]), vt = { cl
|
|
|
1641
1641
|
], 512), [
|
|
1642
1642
|
[H, C.required && C.disabled === !1 && C.currentObject === null]
|
|
1643
1643
|
]),
|
|
1644
|
-
a.value ? (
|
|
1644
|
+
a.value ? (i(), v("div", {
|
|
1645
1645
|
key: 1,
|
|
1646
1646
|
class: I(["cl-bg-white cl-border cl-border-grey-1 cl-float-right cl-h-10 cl-rounded cl-rounded-l-none cl-text-grey-3 cl-transition-colors cl-w-[27px] hover:cl-bg-link-light hover:cl-opacity-90 hover:cl-text-white", {
|
|
1647
1647
|
"cl-cursor-default": C.disabled,
|
|
1648
1648
|
"cl-cursor-pointer": C.disabled === !1
|
|
1649
1649
|
}]),
|
|
1650
|
-
onClick:
|
|
1650
|
+
onClick: x[3] || (x[3] = (E) => R(!1))
|
|
1651
1651
|
}, [
|
|
1652
1652
|
k(d(_), {
|
|
1653
1653
|
icon: "ph:caret-up-bold",
|
|
1654
1654
|
class: "cl-ml-[5px] cl-mt-[12px]"
|
|
1655
1655
|
})
|
|
1656
|
-
], 2)) : (
|
|
1656
|
+
], 2)) : (i(), v("div", {
|
|
1657
1657
|
key: 0,
|
|
1658
1658
|
class: I(["cl-bg-white cl-border cl-border-grey-1 cl-float-right cl-h-10 cl-rounded cl-rounded-l-none cl-text-grey-3 cl-transition-colors cl-w-[27px] hover:cl-bg-link-light hover:cl-opacity-90 hover:cl-text-white", {
|
|
1659
1659
|
"cl-cursor-default": C.disabled,
|
|
1660
1660
|
"cl-cursor-pointer": C.disabled === !1
|
|
1661
1661
|
}]),
|
|
1662
|
-
onClick:
|
|
1662
|
+
onClick: x[2] || (x[2] = (E) => R(!0))
|
|
1663
1663
|
}, [
|
|
1664
1664
|
k(d(_), {
|
|
1665
1665
|
icon: "ph:caret-down-bold",
|
|
@@ -1724,10 +1724,10 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-d01c4a47"]]), vt = { cl
|
|
|
1724
1724
|
]),
|
|
1725
1725
|
default: P(() => [
|
|
1726
1726
|
p("div", Nt, [
|
|
1727
|
-
C.objectParentType ? (
|
|
1727
|
+
C.objectParentType ? (i(), V(f, {
|
|
1728
1728
|
key: 0,
|
|
1729
1729
|
"current-object": g.value,
|
|
1730
|
-
"onUpdate:currentObject":
|
|
1730
|
+
"onUpdate:currentObject": x[4] || (x[4] = (E) => g.value = E),
|
|
1731
1731
|
class: "cl-mt-3",
|
|
1732
1732
|
results: C.parentResults,
|
|
1733
1733
|
loading: C.loading,
|
|
@@ -1737,11 +1737,11 @@ const ae = /* @__PURE__ */ de(gt, [["__scopeId", "data-v-d01c4a47"]]), vt = { cl
|
|
|
1737
1737
|
"can-clear-selected-object": C.canClearSelectedObject,
|
|
1738
1738
|
"error-message": C.errorMessage,
|
|
1739
1739
|
onSearch: z,
|
|
1740
|
-
onCreateObject:
|
|
1740
|
+
onCreateObject: Z
|
|
1741
1741
|
}, null, 8, ["current-object", "results", "loading", "object-type", "object-created-response", "can-create-new-object", "can-clear-selected-object", "error-message"])) : N("", !0),
|
|
1742
1742
|
k(ae, {
|
|
1743
1743
|
modelValue: r.value,
|
|
1744
|
-
"onUpdate:modelValue":
|
|
1744
|
+
"onUpdate:modelValue": x[5] || (x[5] = (E) => r.value = E),
|
|
1745
1745
|
label: d(n)("comboBox.createProperty"),
|
|
1746
1746
|
class: "cl-mb-2 cl-pt-3 cl-w-full",
|
|
1747
1747
|
"input-type": "text"
|
|
@@ -1768,11 +1768,11 @@ const zt = {}, Ut = { class: "cl-flex cl-flex-wrap cl-left-0 cl-mt-4 cl-w-full"
|
|
|
1768
1768
|
class: "cl-leading-10 cl-text-sm cl-w-full"
|
|
1769
1769
|
}, Vt = { class: "cl-float-left" }, Dt = { class: "cl-float-right" };
|
|
1770
1770
|
function Lt(t, o) {
|
|
1771
|
-
return
|
|
1772
|
-
t.$slots.default ? (
|
|
1771
|
+
return i(), v("div", Ut, [
|
|
1772
|
+
t.$slots.default ? (i(), v("div", Bt, [
|
|
1773
1773
|
j(t.$slots, "default")
|
|
1774
1774
|
])) : N("", !0),
|
|
1775
|
-
t.$slots.left || t.$slots.right ? (
|
|
1775
|
+
t.$slots.left || t.$slots.right ? (i(), v("div", Mt, [
|
|
1776
1776
|
p("span", Vt, [
|
|
1777
1777
|
j(t.$slots, "left")
|
|
1778
1778
|
]),
|
|
@@ -1794,10 +1794,10 @@ function Ue(t) {
|
|
|
1794
1794
|
function Ft(t) {
|
|
1795
1795
|
return t.some((o) => Oe(o));
|
|
1796
1796
|
}
|
|
1797
|
-
function
|
|
1797
|
+
function xe(t) {
|
|
1798
1798
|
return t.some((o) => Ue(o));
|
|
1799
1799
|
}
|
|
1800
|
-
const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" },
|
|
1800
|
+
const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, xt = { class: "cl-gap-1 cl-grid cl-grid-cols-2 cl-justify-end cl-mb-2 lg:cl-flex lg:cl-gap-2" }, Gt = { class: "cl-basis-0 cl-col-span-2 cl-flex-grow" }, Zt = /* @__PURE__ */ p("hr", { class: "cl-block cl-border-grey-3 cl-col-span-2 cl-my-4 lg:cl-hidden" }, null, -1), Wt = {
|
|
1801
1801
|
key: 1,
|
|
1802
1802
|
class: "cl-hidden lg:cl-block"
|
|
1803
1803
|
}, Kt = { class: "cl-block lg:cl-hidden" }, Qt = /* @__PURE__ */ M({
|
|
@@ -1813,37 +1813,37 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Gt = { class: "cl-gap-1
|
|
|
1813
1813
|
emits: ["update:edit-mode", "update:filterPanelOpen", "clear-filters"],
|
|
1814
1814
|
setup(t) {
|
|
1815
1815
|
const { t: o } = oe();
|
|
1816
|
-
return (e, l) => (
|
|
1816
|
+
return (e, l) => (i(), v(F, null, [
|
|
1817
1817
|
p("div", Ht, [
|
|
1818
1818
|
p("strong", null, T(d(o)("grid.gridTools")), 1)
|
|
1819
1819
|
]),
|
|
1820
|
-
p("div",
|
|
1821
|
-
p("div",
|
|
1820
|
+
p("div", xt, [
|
|
1821
|
+
p("div", Gt, [
|
|
1822
1822
|
j(e.$slots, "additional-grid-actions", le(ne({
|
|
1823
1823
|
loading: e.loading,
|
|
1824
1824
|
editMode: e.editMode
|
|
1825
1825
|
})))
|
|
1826
1826
|
]),
|
|
1827
|
-
|
|
1828
|
-
e.columns.some((s) => s.editable) ? (
|
|
1827
|
+
Zt,
|
|
1828
|
+
e.columns.some((s) => s.editable) ? (i(), V(fe, {
|
|
1829
1829
|
key: 0,
|
|
1830
1830
|
size: "small",
|
|
1831
1831
|
colour: "default",
|
|
1832
1832
|
onClick: l[0] || (l[0] = W((s) => e.$emit("update:edit-mode", !e.editMode), ["prevent"]))
|
|
1833
1833
|
}, {
|
|
1834
1834
|
default: P(() => [
|
|
1835
|
-
e.editMode ? (
|
|
1835
|
+
e.editMode ? (i(), v(F, { key: 0 }, [
|
|
1836
1836
|
ee(T(d(o)("grid.finishEditing")), 1)
|
|
1837
|
-
], 64)) : (
|
|
1837
|
+
], 64)) : (i(), v(F, { key: 1 }, [
|
|
1838
1838
|
ee(T(d(o)("grid.editData")), 1)
|
|
1839
1839
|
], 64))
|
|
1840
1840
|
]),
|
|
1841
1841
|
_: 1
|
|
1842
1842
|
})) : N("", !0),
|
|
1843
|
-
e.options.hideViewManager ? N("", !0) : (
|
|
1843
|
+
e.options.hideViewManager ? N("", !0) : (i(), v("div", Wt, [
|
|
1844
1844
|
j(e.$slots, "view-manager")
|
|
1845
1845
|
])),
|
|
1846
|
-
d(
|
|
1846
|
+
d(xe)(e.columns) || d(Ft)(e.columns) ? (i(), v(F, { key: 2 }, [
|
|
1847
1847
|
p("div", Kt, [
|
|
1848
1848
|
k(fe, {
|
|
1849
1849
|
class: "cl-w-full",
|
|
@@ -1856,7 +1856,7 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Gt = { class: "cl-gap-1
|
|
|
1856
1856
|
_: 1
|
|
1857
1857
|
})
|
|
1858
1858
|
]),
|
|
1859
|
-
d(
|
|
1859
|
+
d(xe)(e.columns) ? (i(), V(fe, {
|
|
1860
1860
|
key: 0,
|
|
1861
1861
|
size: "small",
|
|
1862
1862
|
colour: e.request.filters.some((s) => s.filterValue !== "") ? "danger" : "default",
|
|
@@ -1886,7 +1886,7 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Gt = { class: "cl-gap-1
|
|
|
1886
1886
|
}, eo = {
|
|
1887
1887
|
key: 1,
|
|
1888
1888
|
class: "cl-inline-block cl-whitespace-nowrap"
|
|
1889
|
-
},
|
|
1889
|
+
}, Ge = /* @__PURE__ */ M({
|
|
1890
1890
|
__name: "cl-ui-grid-cell-value",
|
|
1891
1891
|
props: {
|
|
1892
1892
|
data: {},
|
|
@@ -1896,48 +1896,48 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Gt = { class: "cl-gap-1
|
|
|
1896
1896
|
setup(t) {
|
|
1897
1897
|
const o = t, { t: e, locale: l, n: s } = oe();
|
|
1898
1898
|
function m(n, a) {
|
|
1899
|
-
const
|
|
1899
|
+
const c = $e.fromISO(n, {
|
|
1900
1900
|
locale: l.value
|
|
1901
1901
|
}).setZone(o.timeZone);
|
|
1902
1902
|
let u = "";
|
|
1903
1903
|
switch (a) {
|
|
1904
|
-
case
|
|
1905
|
-
case
|
|
1906
|
-
u =
|
|
1904
|
+
case G.SHORT_DATE:
|
|
1905
|
+
case G.DATE:
|
|
1906
|
+
u = c.toFormat("D");
|
|
1907
1907
|
break;
|
|
1908
|
-
case
|
|
1909
|
-
u =
|
|
1908
|
+
case G.LONG_DATE:
|
|
1909
|
+
u = c.toFormat("DDD");
|
|
1910
1910
|
break;
|
|
1911
|
-
case
|
|
1912
|
-
case
|
|
1913
|
-
u =
|
|
1911
|
+
case G.SHORT_DATETIME:
|
|
1912
|
+
case G.DATETIME:
|
|
1913
|
+
u = c.toFormat("f");
|
|
1914
1914
|
break;
|
|
1915
|
-
case
|
|
1916
|
-
u =
|
|
1915
|
+
case G.LONG_DATETIME:
|
|
1916
|
+
u = c.toFormat("fff");
|
|
1917
1917
|
break;
|
|
1918
|
-
case
|
|
1919
|
-
u =
|
|
1918
|
+
case G.TIME:
|
|
1919
|
+
u = c.toFormat("t");
|
|
1920
1920
|
break;
|
|
1921
1921
|
}
|
|
1922
1922
|
return u;
|
|
1923
1923
|
}
|
|
1924
1924
|
return (n, a) => {
|
|
1925
|
-
var
|
|
1926
|
-
return n.column.type === "slot" ? j(n.$slots, n.column.name, { key: 0 }) : n.column.type === "boolean" && n.column.field !== void 0 ? (
|
|
1925
|
+
var c;
|
|
1926
|
+
return n.column.type === "slot" ? j(n.$slots, n.column.name, { key: 0 }) : n.column.type === "boolean" && n.column.field !== void 0 ? (i(), V(ae, {
|
|
1927
1927
|
key: 1,
|
|
1928
1928
|
"input-type": "checkbox",
|
|
1929
1929
|
"model-value": n.data[n.column.field],
|
|
1930
1930
|
disabled: !0
|
|
1931
|
-
}, null, 8, ["model-value"])) : (n.column.type === "date" || n.column.type === "datetime") && n.column.field !== void 0 ? (
|
|
1932
|
-
n.column.format !== void 0 ? (
|
|
1931
|
+
}, null, 8, ["model-value"])) : (n.column.type === "date" || n.column.type === "datetime") && n.column.field !== void 0 ? (i(), v(F, { key: 2 }, [
|
|
1932
|
+
n.column.format !== void 0 ? (i(), v(F, { key: 0 }, [
|
|
1933
1933
|
ee(T(m(n.data[n.column.field], n.column.format)), 1)
|
|
1934
|
-
], 64)) : n.column.type === "date" ? (
|
|
1935
|
-
ee(T(m(n.data[n.column.field], d(
|
|
1936
|
-
], 64)) : (
|
|
1937
|
-
ee(T(m(n.data[n.column.field], d(
|
|
1934
|
+
], 64)) : n.column.type === "date" ? (i(), v(F, { key: 1 }, [
|
|
1935
|
+
ee(T(m(n.data[n.column.field], d(G).DATE)), 1)
|
|
1936
|
+
], 64)) : (i(), v(F, { key: 2 }, [
|
|
1937
|
+
ee(T(m(n.data[n.column.field], d(G).DATETIME)), 1)
|
|
1938
1938
|
], 64))
|
|
1939
|
-
], 64)) : n.column.type === "list" && n.column.field !== void 0 && n.column.listEntries !== void 0 ? (
|
|
1940
|
-
n.column.maxLength !== void 0 ? (
|
|
1939
|
+
], 64)) : n.column.type === "list" && n.column.field !== void 0 && n.column.listEntries !== void 0 ? (i(), v("span", Jt, T(d(e)(((c = n.column.listEntries.find((u) => u.value === n.data[n.column.field])) == null ? void 0 : c.translationKey) ?? "")), 1)) : n.column.type === "number" && n.column.field !== void 0 ? (i(), v("span", Yt, T(d(s)(n.data[n.column.field], n.column.format ?? d(Y).DECIMAL)), 1)) : n.column.field !== void 0 ? (i(), v(F, { key: 5 }, [
|
|
1940
|
+
n.column.maxLength !== void 0 ? (i(), v("span", Xt, T(n.data[n.column.field].trimToLength(n.column.maxLength, n.column.format !== void 0 ? n.column.format === "ellipsis" : !1)), 1)) : (i(), v("span", eo, T(n.data[n.column.field]), 1))
|
|
1941
1941
|
], 64)) : N("", !0);
|
|
1942
1942
|
};
|
|
1943
1943
|
}
|
|
@@ -1953,17 +1953,17 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Gt = { class: "cl-gap-1
|
|
|
1953
1953
|
setup(t, { emit: o }) {
|
|
1954
1954
|
const e = t, { t: l } = oe(), s = A(re(e.data)), m = S(() => e.column.field !== void 0 && s.value[e.column.field] !== e.data[e.column.field]), n = S(() => {
|
|
1955
1955
|
var a;
|
|
1956
|
-
return ((a = e.column.listEntries) == null ? void 0 : a.map((
|
|
1956
|
+
return ((a = e.column.listEntries) == null ? void 0 : a.map((c, u) => ({
|
|
1957
1957
|
id: u,
|
|
1958
|
-
name: l(
|
|
1958
|
+
name: l(c.translationKey)
|
|
1959
1959
|
}))) ?? [];
|
|
1960
1960
|
});
|
|
1961
1961
|
return al(() => s.value = re(e.data)), K(s, (a) => {
|
|
1962
|
-
const
|
|
1963
|
-
|
|
1962
|
+
const c = e.column.field ?? "";
|
|
1963
|
+
c !== "" && (a[c] !== e.data[c] ? o("edit", a[c]) : o("undo"));
|
|
1964
1964
|
}, {
|
|
1965
1965
|
deep: !0
|
|
1966
|
-
}), (a,
|
|
1966
|
+
}), (a, c) => (i(), v("td", {
|
|
1967
1967
|
class: I(["cl-border-b cl-border-grey-1 cl-gap-1 cl-grid cl-grid-cols-2 cl-m-1 cl-mb-0 cl-py-2 cl-text-xs lg:cl-border-b-0 lg:cl-m-0 lg:cl-px-1 lg:cl-table-cell lg:cl-text-base", {
|
|
1968
1968
|
"cl-bg-link-lighter": m.value
|
|
1969
1969
|
}])
|
|
@@ -1976,7 +1976,7 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Gt = { class: "cl-gap-1
|
|
|
1976
1976
|
record: s.value,
|
|
1977
1977
|
listEntries: n.value
|
|
1978
1978
|
})), () => [
|
|
1979
|
-
k(
|
|
1979
|
+
k(Ge, {
|
|
1980
1980
|
column: a.column,
|
|
1981
1981
|
data: a.data,
|
|
1982
1982
|
"time-zone": a.timeZone
|
|
@@ -1986,7 +1986,7 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Gt = { class: "cl-gap-1
|
|
|
1986
1986
|
]),
|
|
1987
1987
|
_: 2
|
|
1988
1988
|
}, 1032, ["column", "data", "time-zone"])
|
|
1989
|
-
]) : (
|
|
1989
|
+
]) : (i(), V(Ge, {
|
|
1990
1990
|
key: 1,
|
|
1991
1991
|
column: a.column,
|
|
1992
1992
|
data: a.data,
|
|
@@ -2009,8 +2009,8 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Gt = { class: "cl-gap-1
|
|
|
2009
2009
|
},
|
|
2010
2010
|
emits: ["cell-focus", "cell-edit", "cell-undo", "row-select"],
|
|
2011
2011
|
setup(t) {
|
|
2012
|
-
return (o, e) => (
|
|
2013
|
-
(
|
|
2012
|
+
return (o, e) => (i(), v("tr", null, [
|
|
2013
|
+
(i(!0), v(F, null, Q(o.columns, (l, s) => (i(), V(to, {
|
|
2014
2014
|
key: s,
|
|
2015
2015
|
data: o.data,
|
|
2016
2016
|
column: l,
|
|
@@ -2029,10 +2029,10 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Gt = { class: "cl-gap-1
|
|
|
2029
2029
|
]), 1032, ["data", "column", "time-zone", "edit-mode", "onEdit", "onUndo"]))), 128))
|
|
2030
2030
|
]));
|
|
2031
2031
|
}
|
|
2032
|
-
}), no = { key: 1 }, so = ["colspan"], ao = { class: "cl-flex cl-flex-wrap cl-justify-center cl-text-center cl-text-sm cl-w-full" }, ro = { class: "cl-mt-6 cl-w-full" },
|
|
2032
|
+
}), no = { key: 1 }, so = ["colspan"], ao = { class: "cl-flex cl-flex-wrap cl-justify-center cl-text-center cl-text-sm cl-w-full" }, ro = { class: "cl-mt-6 cl-w-full" }, co = {
|
|
2033
2033
|
key: 0,
|
|
2034
2034
|
class: "cl-mt-4"
|
|
2035
|
-
},
|
|
2035
|
+
}, io = { class: "cl-mb-2 cl-w-full" }, uo = /* @__PURE__ */ M({
|
|
2036
2036
|
__name: "cl-ui-grid-body",
|
|
2037
2037
|
props: {
|
|
2038
2038
|
columns: {},
|
|
@@ -2058,7 +2058,7 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Gt = { class: "cl-gap-1
|
|
|
2058
2058
|
function a(r, w) {
|
|
2059
2059
|
n(r), w.field !== void 0 && (s.value.record[w.field] = w.value);
|
|
2060
2060
|
}
|
|
2061
|
-
function
|
|
2061
|
+
function c(r) {
|
|
2062
2062
|
if (r !== void 0) {
|
|
2063
2063
|
const { [r]: w, ...h } = s.value.record;
|
|
2064
2064
|
s.value.record = {
|
|
@@ -2094,8 +2094,8 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Gt = { class: "cl-gap-1
|
|
|
2094
2094
|
e.editMode || (m(), s.value.index = -1);
|
|
2095
2095
|
}), (r, w) => {
|
|
2096
2096
|
var h;
|
|
2097
|
-
return
|
|
2098
|
-
r.data && ((h = r.data.results) != null && h.length) ? (
|
|
2097
|
+
return i(), v("tbody", null, [
|
|
2098
|
+
r.data && ((h = r.data.results) != null && h.length) ? (i(!0), v(F, { key: 0 }, Q(r.data.results, (q, $) => (i(), V(oo, {
|
|
2099
2099
|
key: $,
|
|
2100
2100
|
data: q,
|
|
2101
2101
|
columns: r.columns,
|
|
@@ -2115,7 +2115,7 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Gt = { class: "cl-gap-1
|
|
|
2115
2115
|
onCellEdit: (R) => {
|
|
2116
2116
|
a($, R);
|
|
2117
2117
|
},
|
|
2118
|
-
onCellUndo:
|
|
2118
|
+
onCellUndo: c
|
|
2119
2119
|
}, Re({ _: 2 }, [
|
|
2120
2120
|
Q(r.$slots, (R, O) => ({
|
|
2121
2121
|
name: O,
|
|
@@ -2123,14 +2123,14 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Gt = { class: "cl-gap-1
|
|
|
2123
2123
|
j(r.$slots, O, le(ne(z)))
|
|
2124
2124
|
])
|
|
2125
2125
|
}))
|
|
2126
|
-
]), 1032, ["data", "columns", "time-zone", "edit-mode", "class", "onClick", "onCellFocus", "onCellEdit"]))), 128)) : r.loading ? N("", !0) : (
|
|
2126
|
+
]), 1032, ["data", "columns", "time-zone", "edit-mode", "class", "onClick", "onCellFocus", "onCellEdit"]))), 128)) : r.loading ? N("", !0) : (i(), v("tr", no, [
|
|
2127
2127
|
p("td", {
|
|
2128
2128
|
colspan: r.columns.length
|
|
2129
2129
|
}, [
|
|
2130
2130
|
p("div", ao, [
|
|
2131
2131
|
p("strong", ro, T(d(l)("grid.noData")), 1),
|
|
2132
|
-
r.request.filters.length > 0 ? (
|
|
2133
|
-
p("div",
|
|
2132
|
+
r.request.filters.length > 0 ? (i(), v("div", co, [
|
|
2133
|
+
p("div", io, T(d(l)("grid.noDataFiltersPresent")), 1),
|
|
2134
2134
|
k(fe, {
|
|
2135
2135
|
size: "small",
|
|
2136
2136
|
colour: "danger",
|
|
@@ -2177,7 +2177,7 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Gt = { class: "cl-gap-1
|
|
|
2177
2177
|
const w = re(e.request);
|
|
2178
2178
|
w.pageNumber !== r && (w.pageNumber = Math.max(Math.min(Math.trunc(r), m.value), 1), o("update:request", w));
|
|
2179
2179
|
}
|
|
2180
|
-
function
|
|
2180
|
+
function c(r) {
|
|
2181
2181
|
const w = parseInt(r == null ? void 0 : r.value) || 1;
|
|
2182
2182
|
a(w);
|
|
2183
2183
|
}
|
|
@@ -2193,10 +2193,10 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Gt = { class: "cl-gap-1
|
|
|
2193
2193
|
const w = re(e.request);
|
|
2194
2194
|
w.pageSize = r, w.pageNumber = 1, o("update:request", w);
|
|
2195
2195
|
}
|
|
2196
|
-
const b = Qe(
|
|
2196
|
+
const b = Qe(c, 750);
|
|
2197
2197
|
return (r, w) => {
|
|
2198
2198
|
var h, q;
|
|
2199
|
-
return (q = (h = r.data) == null ? void 0 : h.results) != null && q.length && r.request ? (
|
|
2199
|
+
return (q = (h = r.data) == null ? void 0 : h.results) != null && q.length && r.request ? (i(), v("div", po, [
|
|
2200
2200
|
p("div", fo, [
|
|
2201
2201
|
p("span", mo, T(d(s)("grid.jumpToPage")), 1),
|
|
2202
2202
|
k(ae, {
|
|
@@ -2239,7 +2239,7 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Gt = { class: "cl-gap-1
|
|
|
2239
2239
|
], 512), [
|
|
2240
2240
|
[H, r.request.pageNumber > 1]
|
|
2241
2241
|
]),
|
|
2242
|
-
(
|
|
2242
|
+
(i(!0), v(F, null, Q(n.value, ($, R) => (i(), v("li", {
|
|
2243
2243
|
key: R,
|
|
2244
2244
|
class: I(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2245
2245
|
"cl-text-black cl-font-bold": r.request.pageNumber === $,
|
|
@@ -2273,7 +2273,7 @@ const Ht = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Gt = { class: "cl-gap-1
|
|
|
2273
2273
|
]),
|
|
2274
2274
|
p("ul", ko, [
|
|
2275
2275
|
p("li", Co, T(d(s)("grid.pageSize")), 1),
|
|
2276
|
-
(
|
|
2276
|
+
(i(), v(F, null, Q(u, ($, R) => p("li", {
|
|
2277
2277
|
key: R,
|
|
2278
2278
|
class: I(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2279
2279
|
"cl-text-black cl-font-bold": r.request.pageSize === $,
|
|
@@ -2382,7 +2382,7 @@ const Bo = {
|
|
|
2382
2382
|
"datetime"
|
|
2383
2383
|
],
|
|
2384
2384
|
key: "before"
|
|
2385
|
-
},
|
|
2385
|
+
}, Ze = [
|
|
2386
2386
|
Mo,
|
|
2387
2387
|
{
|
|
2388
2388
|
method: "notcontains",
|
|
@@ -2482,25 +2482,25 @@ const Bo = {
|
|
|
2482
2482
|
setup(t, { emit: o }) {
|
|
2483
2483
|
const e = t, { t: l } = oe(), s = S(() => {
|
|
2484
2484
|
let a = [];
|
|
2485
|
-
return e.column.type !== "slot" ? a =
|
|
2486
|
-
|
|
2487
|
-
}) : a.forEach((
|
|
2488
|
-
|
|
2485
|
+
return e.column.type !== "slot" ? a = Ze.filter((c) => c.allowedTypes.includes(e.column.type)) : typeof e.column.slotType < "u" && typeof e.column.field < "u" && (a = Ze.filter((c) => c.allowedTypes.includes(e.column.slotType))), e.column.type === "date" || e.column.type === "datetime" || e.column.slotType === "date" || e.column.slotType === "datetime" ? a.forEach((c) => {
|
|
2486
|
+
c.description = l(`grid.${c.key}`);
|
|
2487
|
+
}) : a.forEach((c) => {
|
|
2488
|
+
c.description = l(`grid.${c.method}`);
|
|
2489
2489
|
}), a;
|
|
2490
2490
|
}), m = S(() => {
|
|
2491
|
-
var
|
|
2492
|
-
let a = (
|
|
2491
|
+
var c;
|
|
2492
|
+
let a = (c = e.filter) == null ? void 0 : c.filterMethod;
|
|
2493
2493
|
return typeof a > "u" && (a = te[e.defaultOperation].toLowerCase()), s.value.find((u) => {
|
|
2494
2494
|
var g;
|
|
2495
2495
|
return u.method.toLowerCase() === ((g = a == null ? void 0 : a.removeNonAlphanumeric()) == null ? void 0 : g.toLowerCase());
|
|
2496
2496
|
});
|
|
2497
2497
|
});
|
|
2498
2498
|
function n(a) {
|
|
2499
|
-
let
|
|
2499
|
+
let c;
|
|
2500
2500
|
if (e.filter)
|
|
2501
|
-
|
|
2501
|
+
c = re(e.filter), c.filterOperation = te[a.toUpperCase()], c.filterMethod = a.toLowerCase();
|
|
2502
2502
|
else if (typeof e.column.field < "u")
|
|
2503
|
-
|
|
2503
|
+
c = {
|
|
2504
2504
|
filterOnColumn: e.column.field,
|
|
2505
2505
|
filterMethod: a.toLowerCase(),
|
|
2506
2506
|
filterOperation: te[a.toUpperCase()],
|
|
@@ -2508,11 +2508,11 @@ const Bo = {
|
|
|
2508
2508
|
};
|
|
2509
2509
|
else
|
|
2510
2510
|
return;
|
|
2511
|
-
o("update:filter",
|
|
2511
|
+
o("update:filter", c);
|
|
2512
2512
|
}
|
|
2513
|
-
return (a,
|
|
2513
|
+
return (a, c) => (i(), v("div", Do, [
|
|
2514
2514
|
p("div", Lo, [
|
|
2515
|
-
m.value ? (
|
|
2515
|
+
m.value ? (i(), V(d(_), {
|
|
2516
2516
|
key: 0,
|
|
2517
2517
|
icon: m.value.icon,
|
|
2518
2518
|
class: I(["cl-text-lg", {
|
|
@@ -2528,9 +2528,9 @@ const Bo = {
|
|
|
2528
2528
|
}])
|
|
2529
2529
|
}, [
|
|
2530
2530
|
p("strong", Po, T(d(l)("grid.availableMethods")), 1),
|
|
2531
|
-
(
|
|
2531
|
+
(i(!0), v(F, null, Q(s.value, (u, g) => {
|
|
2532
2532
|
var b;
|
|
2533
|
-
return
|
|
2533
|
+
return i(), v("span", {
|
|
2534
2534
|
key: g,
|
|
2535
2535
|
class: I(["cl-cursor-pointer cl-px-4 cl-py-1 cl-transition-colors cl-w-full hover:cl-bg-grey-0", {
|
|
2536
2536
|
"cl-bg-primary-default cl-opacity-80": u.method === ((b = m.value) == null ? void 0 : b.method)
|
|
@@ -2547,10 +2547,10 @@ const Bo = {
|
|
|
2547
2547
|
], 2)
|
|
2548
2548
|
]));
|
|
2549
2549
|
}
|
|
2550
|
-
}),
|
|
2550
|
+
}), xo = {
|
|
2551
2551
|
key: 0,
|
|
2552
2552
|
class: "cl-border cl-border-grey-2 cl-flex cl-overflow-hidden cl-rounded-md lg:cl-overflow-visible"
|
|
2553
|
-
},
|
|
2553
|
+
}, Go = /* @__PURE__ */ p("option", { value: void 0 }, null, -1), Zo = ["selected"], Wo = ["selected"], Ko = /* @__PURE__ */ p("option", { value: void 0 }, null, -1), Qo = ["value", "selected"], Jo = /* @__PURE__ */ M({
|
|
2554
2554
|
__name: "cl-ui-grid-filter",
|
|
2555
2555
|
props: {
|
|
2556
2556
|
filter: {},
|
|
@@ -2567,13 +2567,13 @@ const Bo = {
|
|
|
2567
2567
|
const n = S({
|
|
2568
2568
|
get: () => e.filter,
|
|
2569
2569
|
set: (O) => o("update:filter", O)
|
|
2570
|
-
}), a = S(() => e.column.type === "date" || e.column.type === "datetime" || e.column.type === "slot" && (e.column.slotType === "date" || e.column.slotType === "datetime")),
|
|
2570
|
+
}), a = S(() => e.column.type === "date" || e.column.type === "datetime" || e.column.type === "slot" && (e.column.slotType === "date" || e.column.slotType === "datetime")), c = S(() => e.column.type === "list" || e.column.type === "slot" && e.column.slotType === "list"), u = S(() => c.value && e.column.listType === "number"), g = S({
|
|
2571
2571
|
get() {
|
|
2572
2572
|
var z, U, y, D;
|
|
2573
2573
|
let O = (z = n.value) == null ? void 0 : z[0];
|
|
2574
2574
|
if (O && a.value && (((U = e.filter) == null ? void 0 : U.length) ?? 0 > 1)) {
|
|
2575
|
-
const J = (y = n.value) == null ? void 0 : y.find((
|
|
2576
|
-
J &&
|
|
2575
|
+
const J = (y = n.value) == null ? void 0 : y.find((ce) => ce.filterOperation === te.EQUAL_OR_GREATER_THAN), Z = (D = n.value) == null ? void 0 : D.find((ce) => ce.filterOperation === te.LESS_THAN);
|
|
2576
|
+
J && Z && (O = {
|
|
2577
2577
|
filterOnColumn: e.column.field,
|
|
2578
2578
|
filterOperation: te.EQUAL,
|
|
2579
2579
|
filterMethod: "equal",
|
|
@@ -2623,11 +2623,11 @@ const Bo = {
|
|
|
2623
2623
|
if (g.value)
|
|
2624
2624
|
y = ((J = g.value) == null ? void 0 : J.filterValue) === D, U = re(g.value), U.filterValue = D;
|
|
2625
2625
|
else if (D !== "" && typeof e.column.field < "u") {
|
|
2626
|
-
const
|
|
2626
|
+
const Z = m();
|
|
2627
2627
|
U = {
|
|
2628
2628
|
filterOnColumn: e.column.field,
|
|
2629
|
-
filterMethod: te[
|
|
2630
|
-
filterOperation:
|
|
2629
|
+
filterMethod: te[Z].toLowerCase(),
|
|
2630
|
+
filterOperation: Z,
|
|
2631
2631
|
filterValue: D
|
|
2632
2632
|
};
|
|
2633
2633
|
} else
|
|
@@ -2638,22 +2638,22 @@ const Bo = {
|
|
|
2638
2638
|
let U, y = (O == null ? void 0 : O.value) ?? z ?? 0;
|
|
2639
2639
|
e.column.format === Y.INTEGER ? (typeof y == "string" && (y = parseInt(y)), U = Math.round(y)) : (typeof y == "string" && (y = parseFloat(y.replace(h.value, "."))), U = y), $(null, isNaN(U) ? "" : U.toString());
|
|
2640
2640
|
}
|
|
2641
|
-
return (O, z) => q.value ? (
|
|
2642
|
-
O.column.type === "boolean" || O.column.slotType === "boolean" ? (
|
|
2641
|
+
return (O, z) => q.value ? (i(), v("div", xo, [
|
|
2642
|
+
O.column.type === "boolean" || O.column.slotType === "boolean" ? (i(), v("select", {
|
|
2643
2643
|
key: 0,
|
|
2644
2644
|
class: "!cl-h-[2rem] cl-border-none cl-mb-0 cl-rounded-md cl-w-full",
|
|
2645
2645
|
onChange: z[0] || (z[0] = (U) => $(U.target))
|
|
2646
2646
|
}, [
|
|
2647
|
-
|
|
2647
|
+
Go,
|
|
2648
2648
|
p("option", {
|
|
2649
2649
|
value: "true",
|
|
2650
2650
|
selected: r.value === "true"
|
|
2651
|
-
}, T(d(s)("grid.true")), 9,
|
|
2651
|
+
}, T(d(s)("grid.true")), 9, Zo),
|
|
2652
2652
|
p("option", {
|
|
2653
2653
|
value: "false",
|
|
2654
2654
|
selected: r.value === "false"
|
|
2655
2655
|
}, T(d(s)("grid.false")), 9, Wo)
|
|
2656
|
-
], 32)) : O.column.type === "date" || O.column.type === "datetime" || O.column.slotType === "date" || O.column.slotType === "datetime" ? (
|
|
2656
|
+
], 32)) : O.column.type === "date" || O.column.type === "datetime" || O.column.slotType === "date" || O.column.slotType === "datetime" ? (i(), V(ae, {
|
|
2657
2657
|
key: 1,
|
|
2658
2658
|
"model-value": w.value,
|
|
2659
2659
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
@@ -2662,26 +2662,26 @@ const Bo = {
|
|
|
2662
2662
|
"input-type": O.column.type === "slot" ? O.column.slotType : O.column.type,
|
|
2663
2663
|
"time-zone": O.timeZone,
|
|
2664
2664
|
"onUpdate:modelValue": z[1] || (z[1] = (U) => $(null, U ?? ""))
|
|
2665
|
-
}, null, 8, ["model-value", "label", "input-type", "time-zone"])) : O.column.type === "number" || O.column.slotType === "number" ? (
|
|
2665
|
+
}, null, 8, ["model-value", "label", "input-type", "time-zone"])) : O.column.type === "number" || O.column.slotType === "number" ? (i(), V(ae, {
|
|
2666
2666
|
key: 2,
|
|
2667
2667
|
"model-value": r.value,
|
|
2668
2668
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
2669
2669
|
"input-type": "number",
|
|
2670
2670
|
"show-arrows": !1,
|
|
2671
2671
|
onInput: z[2] || (z[2] = (U, y) => R(null, y))
|
|
2672
|
-
}, null, 8, ["model-value"])) : O.column.type === "string" || O.column.slotType === "string" ? (
|
|
2672
|
+
}, null, 8, ["model-value"])) : O.column.type === "string" || O.column.slotType === "string" ? (i(), V(ae, {
|
|
2673
2673
|
key: 3,
|
|
2674
2674
|
"model-value": r.value,
|
|
2675
2675
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
2676
2676
|
"input-type": "text",
|
|
2677
2677
|
onInput: z[3] || (z[3] = (U, y) => $(null, y))
|
|
2678
|
-
}, null, 8, ["model-value"])) :
|
|
2678
|
+
}, null, 8, ["model-value"])) : c.value ? (i(), v("select", {
|
|
2679
2679
|
key: 4,
|
|
2680
2680
|
class: "!cl-h-[2rem] cl-border-none cl-mb-0 cl-rounded-md cl-w-full",
|
|
2681
2681
|
onChange: z[4] || (z[4] = (U) => u.value ? R(U.target) : $(U.target))
|
|
2682
2682
|
}, [
|
|
2683
2683
|
Ko,
|
|
2684
|
-
(
|
|
2684
|
+
(i(!0), v(F, null, Q(O.column.listEntries ?? [], (U) => (i(), v("option", {
|
|
2685
2685
|
key: U.value,
|
|
2686
2686
|
value: U.value,
|
|
2687
2687
|
selected: r.value === U.value.toString()
|
|
@@ -2709,33 +2709,33 @@ const Bo = {
|
|
|
2709
2709
|
setup(t, { emit: o }) {
|
|
2710
2710
|
const e = t, { t: l } = oe(), s = S({
|
|
2711
2711
|
get: () => e.request,
|
|
2712
|
-
set: (
|
|
2712
|
+
set: (c) => o("update:request", c)
|
|
2713
2713
|
});
|
|
2714
|
-
function m(
|
|
2714
|
+
function m(c, u) {
|
|
2715
2715
|
var g, b;
|
|
2716
|
-
return ((g = s.value.sort) == null ? void 0 : g.sortOnColumn) ===
|
|
2716
|
+
return ((g = s.value.sort) == null ? void 0 : g.sortOnColumn) === c.field && ((b = s.value.sort) == null ? void 0 : b.sortByAscending) === u;
|
|
2717
2717
|
}
|
|
2718
|
-
function n(
|
|
2719
|
-
if (typeof
|
|
2718
|
+
function n(c) {
|
|
2719
|
+
if (typeof c < "u") {
|
|
2720
2720
|
const u = re(e.request);
|
|
2721
|
-
u.sort === null || u.sort.sortOnColumn !==
|
|
2722
|
-
sortOnColumn:
|
|
2721
|
+
u.sort === null || u.sort.sortOnColumn !== c ? u.sort = {
|
|
2722
|
+
sortOnColumn: c,
|
|
2723
2723
|
sortByAscending: !0
|
|
2724
|
-
} : u.sort.sortOnColumn ===
|
|
2724
|
+
} : u.sort.sortOnColumn === c && u.sort.sortByAscending === !0 ? u.sort.sortByAscending = !1 : u.sort = null, s.value = u;
|
|
2725
2725
|
}
|
|
2726
2726
|
}
|
|
2727
|
-
function a(
|
|
2728
|
-
if (
|
|
2727
|
+
function a(c) {
|
|
2728
|
+
if (c) {
|
|
2729
2729
|
const u = re(s.value);
|
|
2730
2730
|
u.filters = [
|
|
2731
|
-
...u.filters.filter((g) => g.filterOnColumn !==
|
|
2732
|
-
...
|
|
2731
|
+
...u.filters.filter((g) => g.filterOnColumn !== c[0].filterOnColumn),
|
|
2732
|
+
...c
|
|
2733
2733
|
], u.pageNumber = 1, s.value = u;
|
|
2734
2734
|
}
|
|
2735
2735
|
}
|
|
2736
|
-
return (
|
|
2736
|
+
return (c, u) => (i(), v("thead", Yo, [
|
|
2737
2737
|
p("tr", Xo, [
|
|
2738
|
-
(
|
|
2738
|
+
(i(!0), v(F, null, Q(c.columns, (g, b) => (i(), v("th", {
|
|
2739
2739
|
key: b,
|
|
2740
2740
|
class: I(["cl-text-grey-3 cl-text-sm", {
|
|
2741
2741
|
"cl-cursor-pointer": d(Oe)(g)
|
|
@@ -2760,7 +2760,7 @@ const Bo = {
|
|
|
2760
2760
|
]),
|
|
2761
2761
|
p("tr", {
|
|
2762
2762
|
class: I(["cl-border cl-border-grey-2 cl-flex cl-flex-wrap cl-p-2 lg:cl-border-none lg:cl-p-0 lg:cl-table-row", {
|
|
2763
|
-
"cl-hidden lg:cl-table-row": !
|
|
2763
|
+
"cl-hidden lg:cl-table-row": !c.filterPanelOpen
|
|
2764
2764
|
}])
|
|
2765
2765
|
}, [
|
|
2766
2766
|
p("div", ln, [
|
|
@@ -2768,31 +2768,31 @@ const Bo = {
|
|
|
2768
2768
|
class: "cl-text-grey-4 hover:cl-cursor-pointer hover:cl-text-link-default",
|
|
2769
2769
|
icon: "ph:x",
|
|
2770
2770
|
size: 16,
|
|
2771
|
-
onClick: u[0] || (u[0] = W((g) =>
|
|
2771
|
+
onClick: u[0] || (u[0] = W((g) => c.$emit("update:filterPanelOpen", !1), ["prevent"]))
|
|
2772
2772
|
})
|
|
2773
2773
|
]),
|
|
2774
|
-
(
|
|
2774
|
+
(i(!0), v(F, null, Q(c.columns, (g, b) => (i(), v("th", {
|
|
2775
2775
|
key: b,
|
|
2776
2776
|
class: I(["cl-grid cl-grid-cols-4 cl-py-1 cl-text-xs cl-w-full lg:cl-table-cell lg:cl-w-auto", {
|
|
2777
2777
|
"cl-hidden lg:cl-table-cell": !d(Ue)(g)
|
|
2778
2778
|
}])
|
|
2779
2779
|
}, [
|
|
2780
2780
|
p("div", tn, T(g.caption), 1),
|
|
2781
|
-
d(Oe)(g) ? (
|
|
2781
|
+
d(Oe)(g) ? (i(), v("div", {
|
|
2782
2782
|
key: 0,
|
|
2783
2783
|
class: "cl-col-span-2 cl-gap-1 cl-span lg:cl-hidden",
|
|
2784
2784
|
onClick: (r) => n(g.field)
|
|
2785
2785
|
}, [
|
|
2786
2786
|
p("span", nn, T(d(l)("grid.sortBy")), 1),
|
|
2787
|
-
m(g, !0) ? (
|
|
2787
|
+
m(g, !0) ? (i(), V(d(_), {
|
|
2788
2788
|
key: 0,
|
|
2789
2789
|
class: "cl-cursor-pointer cl-inline-block",
|
|
2790
2790
|
icon: "ph:caret-up"
|
|
2791
|
-
})) : m(g, !1) ? (
|
|
2791
|
+
})) : m(g, !1) ? (i(), V(d(_), {
|
|
2792
2792
|
key: 1,
|
|
2793
2793
|
class: "cl-cursor-pointer cl-inline-block",
|
|
2794
2794
|
icon: "ph:caret-down"
|
|
2795
|
-
})) : (
|
|
2795
|
+
})) : (i(), V(d(_), {
|
|
2796
2796
|
key: 2,
|
|
2797
2797
|
class: "cl-cursor-pointer cl-inline-block",
|
|
2798
2798
|
icon: "ph:minus"
|
|
@@ -2802,8 +2802,8 @@ const Bo = {
|
|
|
2802
2802
|
class: "cl-col-span-4",
|
|
2803
2803
|
filter: s.value.filters.filter((r) => r.filterOnColumn === g.field),
|
|
2804
2804
|
column: g,
|
|
2805
|
-
"time-zone":
|
|
2806
|
-
"first-half": b <=
|
|
2805
|
+
"time-zone": c.timeZone,
|
|
2806
|
+
"first-half": b <= c.columns.length / 2,
|
|
2807
2807
|
"onUpdate:filter": a
|
|
2808
2808
|
}, null, 8, ["filter", "column", "time-zone", "first-half"])
|
|
2809
2809
|
], 2))), 128))
|
|
@@ -2819,19 +2819,19 @@ const Bo = {
|
|
|
2819
2819
|
emits: ["update:columns"],
|
|
2820
2820
|
setup(t, { emit: o }) {
|
|
2821
2821
|
const e = t, { t: l } = oe(), s = A(!1);
|
|
2822
|
-
function m(
|
|
2823
|
-
g <
|
|
2822
|
+
function m(c, u, g) {
|
|
2823
|
+
g < c.length && g >= 0 && c.splice(g, 0, c.splice(u, 1)[0]);
|
|
2824
2824
|
}
|
|
2825
|
-
function n(
|
|
2826
|
-
const g = re(e.columns), b = (
|
|
2825
|
+
function n(c, u) {
|
|
2826
|
+
const g = re(e.columns), b = (c == null ? void 0 : c.checked) ?? !1, r = g.findIndex((w) => w.name === u.name);
|
|
2827
2827
|
r >= 0 && (g[r].visible = b), o("update:columns", g);
|
|
2828
2828
|
}
|
|
2829
|
-
function a(
|
|
2830
|
-
const g = re(e.columns), b = u === "up" ?
|
|
2831
|
-
m(g,
|
|
2829
|
+
function a(c, u) {
|
|
2830
|
+
const g = re(e.columns), b = u === "up" ? c + 1 : c - 1;
|
|
2831
|
+
m(g, c, b), o("update:columns", g);
|
|
2832
2832
|
}
|
|
2833
|
-
return (
|
|
2834
|
-
k(fe, se(
|
|
2833
|
+
return (c, u) => (i(), v(F, null, [
|
|
2834
|
+
k(fe, se(c.$attrs, {
|
|
2835
2835
|
class: "cl-w-full",
|
|
2836
2836
|
size: "small",
|
|
2837
2837
|
onClick: u[0] || (u[0] = W((g) => s.value = !0, ["prevent"]))
|
|
@@ -2841,7 +2841,7 @@ const Bo = {
|
|
|
2841
2841
|
]),
|
|
2842
2842
|
_: 1
|
|
2843
2843
|
}, 16),
|
|
2844
|
-
(
|
|
2844
|
+
(i(), V(Ie, { to: "body" }, [
|
|
2845
2845
|
k(me, { name: "slide-left" }, {
|
|
2846
2846
|
default: P(() => [
|
|
2847
2847
|
L(p("div", an, [
|
|
@@ -2859,7 +2859,7 @@ const Bo = {
|
|
|
2859
2859
|
p("strong", fn, T(d(l)("grid.visible")), 1),
|
|
2860
2860
|
p("strong", mn, T(d(l)("grid.order")), 1)
|
|
2861
2861
|
]),
|
|
2862
|
-
(
|
|
2862
|
+
(i(!0), v(F, null, Q(c.columns, (g, b) => (i(), v("li", {
|
|
2863
2863
|
key: b,
|
|
2864
2864
|
class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full"
|
|
2865
2865
|
}, [
|
|
@@ -2872,20 +2872,20 @@ const Bo = {
|
|
|
2872
2872
|
}, null, 8, ["model-value", "onClick"])
|
|
2873
2873
|
]),
|
|
2874
2874
|
p("div", bn, [
|
|
2875
|
-
g.visible === void 0 || g.visible === !0 ? (
|
|
2876
|
-
b !== 0 ? (
|
|
2875
|
+
g.visible === void 0 || g.visible === !0 ? (i(), v(F, { key: 0 }, [
|
|
2876
|
+
b !== 0 ? (i(), V(d(_), {
|
|
2877
2877
|
key: 0,
|
|
2878
2878
|
class: "cl-cursor-pointer cl-inline-block cl-mr-2",
|
|
2879
2879
|
icon: "ph:arrow-left",
|
|
2880
2880
|
onClick: (r) => a(b, "down")
|
|
2881
2881
|
}, null, 8, ["onClick"])) : N("", !0),
|
|
2882
|
-
b !==
|
|
2882
|
+
b !== c.columns.length - 1 ? (i(), V(d(_), {
|
|
2883
2883
|
key: 1,
|
|
2884
2884
|
class: "cl-cursor-pointer cl-inline-block",
|
|
2885
2885
|
icon: "ph:arrow-right",
|
|
2886
2886
|
onClick: (r) => a(b, "up")
|
|
2887
2887
|
}, null, 8, ["onClick"])) : N("", !0)
|
|
2888
|
-
], 64)) : (
|
|
2888
|
+
], 64)) : (i(), v("em", hn, T(d(l)("grid.hidden")), 1))
|
|
2889
2889
|
])
|
|
2890
2890
|
]))), 128))
|
|
2891
2891
|
])
|
|
@@ -2928,21 +2928,21 @@ const Bo = {
|
|
|
2928
2928
|
Ae(() => {
|
|
2929
2929
|
window.addEventListener("resize", n), n();
|
|
2930
2930
|
}), _e(() => window.removeEventListener("resize", n));
|
|
2931
|
-
const
|
|
2931
|
+
const c = S({
|
|
2932
2932
|
get: () => e.request,
|
|
2933
2933
|
set: (h) => o("update:request", h)
|
|
2934
2934
|
});
|
|
2935
2935
|
function u() {
|
|
2936
|
-
const h = re(
|
|
2937
|
-
h.pageNumber = 1, h.filters = [],
|
|
2936
|
+
const h = re(c.value);
|
|
2937
|
+
h.pageNumber = 1, h.filters = [], c.value = h;
|
|
2938
2938
|
}
|
|
2939
2939
|
const g = Qe(() => o("data-request"), 750);
|
|
2940
|
-
K(
|
|
2940
|
+
K(c, g, {
|
|
2941
2941
|
deep: !0,
|
|
2942
2942
|
immediate: !0
|
|
2943
2943
|
});
|
|
2944
2944
|
const b = S(() => e.data), r = A(!1), w = A(!1);
|
|
2945
|
-
return K(r, () => r.value ? o("edit-start") : o("edit-end")), (h, q) => (
|
|
2945
|
+
return K(r, () => r.value ? o("edit-start") : o("edit-end")), (h, q) => (i(), v("div", wn, [
|
|
2946
2946
|
k(me, { name: "fade" }, {
|
|
2947
2947
|
default: P(() => [
|
|
2948
2948
|
L(p("div", $n, [
|
|
@@ -2982,15 +2982,15 @@ const Bo = {
|
|
|
2982
2982
|
}])
|
|
2983
2983
|
}, [
|
|
2984
2984
|
p("colgroup", Cn, [
|
|
2985
|
-
(
|
|
2985
|
+
(i(!0), v(F, null, Q(s.value, ($, R) => (i(), v("col", {
|
|
2986
2986
|
key: R,
|
|
2987
2987
|
style: We(a($.name)),
|
|
2988
2988
|
span: 1
|
|
2989
2989
|
}, null, 4))), 128))
|
|
2990
2990
|
]),
|
|
2991
2991
|
k(sn, {
|
|
2992
|
-
request:
|
|
2993
|
-
"onUpdate:request": q[3] || (q[3] = ($) =>
|
|
2992
|
+
request: c.value,
|
|
2993
|
+
"onUpdate:request": q[3] || (q[3] = ($) => c.value = $),
|
|
2994
2994
|
"filter-panel-open": w.value,
|
|
2995
2995
|
"onUpdate:filterPanelOpen": q[4] || (q[4] = ($) => w.value = $),
|
|
2996
2996
|
columns: s.value,
|
|
@@ -2999,7 +2999,7 @@ const Bo = {
|
|
|
2999
2999
|
}, null, 8, ["request", "filter-panel-open", "columns", "options", "time-zone"]),
|
|
3000
3000
|
k(uo, {
|
|
3001
3001
|
columns: s.value,
|
|
3002
|
-
request:
|
|
3002
|
+
request: c.value,
|
|
3003
3003
|
data: b.value,
|
|
3004
3004
|
"time-zone": h.timeZone,
|
|
3005
3005
|
loading: h.loading,
|
|
@@ -3019,8 +3019,8 @@ const Bo = {
|
|
|
3019
3019
|
], 2)
|
|
3020
3020
|
]),
|
|
3021
3021
|
k(Ao, {
|
|
3022
|
-
request:
|
|
3023
|
-
"onUpdate:request": q[7] || (q[7] = ($) =>
|
|
3022
|
+
request: c.value,
|
|
3023
|
+
"onUpdate:request": q[7] || (q[7] = ($) => c.value = $),
|
|
3024
3024
|
data: h.data
|
|
3025
3025
|
}, null, 8, ["request", "data"])
|
|
3026
3026
|
]));
|
|
@@ -3035,7 +3035,7 @@ const Bo = {
|
|
|
3035
3035
|
const e = t, l = A();
|
|
3036
3036
|
return ze(l, () => {
|
|
3037
3037
|
(e.isOpen ?? !1) && o("open-click");
|
|
3038
|
-
}), (s, m) => (
|
|
3038
|
+
}), (s, m) => (i(), v("header", En, [
|
|
3039
3039
|
j(s.$slots, "logo"),
|
|
3040
3040
|
p("div", {
|
|
3041
3041
|
ref_key: "headerMenuElement",
|
|
@@ -3065,18 +3065,18 @@ const Bo = {
|
|
|
3065
3065
|
},
|
|
3066
3066
|
setup(t) {
|
|
3067
3067
|
const o = t;
|
|
3068
|
-
return (e, l) => (
|
|
3068
|
+
return (e, l) => (i(), v("div", {
|
|
3069
3069
|
class: I(["md:cl-relative", {
|
|
3070
3070
|
"cl-bg-primary-default": (o == null ? void 0 : o.colour) === "default",
|
|
3071
3071
|
"cl-bg-blue-light": o.colour === "secondary"
|
|
3072
3072
|
}])
|
|
3073
3073
|
}, [
|
|
3074
3074
|
p("div", qn, [
|
|
3075
|
-
e.image ? (
|
|
3075
|
+
e.image ? (i(), v("img", {
|
|
3076
3076
|
key: 0,
|
|
3077
3077
|
src: e.image,
|
|
3078
3078
|
class: "cl-hidden cl-m-4 cl-max-h-12 cl-max-w-12 cl-ring-2 cl-ring-white cl-rounded-full md:cl-block"
|
|
3079
|
-
}, null, 8, An)) : (
|
|
3079
|
+
}, null, 8, An)) : (i(), V(d(_), {
|
|
3080
3080
|
key: 1,
|
|
3081
3081
|
class: "cl-hidden cl-m-4 cl-text-white md:cl-block",
|
|
3082
3082
|
icon: "ph:user-circle",
|
|
@@ -3089,8 +3089,8 @@ const Bo = {
|
|
|
3089
3089
|
"cl-text-white": o.colour === "secondary"
|
|
3090
3090
|
}])
|
|
3091
3091
|
}, [
|
|
3092
|
-
e.username ? (
|
|
3093
|
-
e.group ? (
|
|
3092
|
+
e.username ? (i(), v("div", Sn, T(e.username), 1)) : N("", !0),
|
|
3093
|
+
e.group ? (i(), v("div", Nn, T(e.group), 1)) : N("", !0)
|
|
3094
3094
|
], 2),
|
|
3095
3095
|
p("div", jn, [
|
|
3096
3096
|
k(d(_), {
|
|
@@ -3145,29 +3145,29 @@ const Un = {
|
|
|
3145
3145
|
},
|
|
3146
3146
|
emits: ["language-select"],
|
|
3147
3147
|
setup(t, { emit: o }) {
|
|
3148
|
-
const e = t, { locale: l } = oe(), s = A(!1), m = S(() => e.supportedLanguages.find((
|
|
3148
|
+
const e = t, { locale: l } = oe(), s = A(!1), m = S(() => e.supportedLanguages.find((c) => c.localeCode === l.value) ?? e.defaultLangauge), n = S(() => e.supportedLanguages.filter((c) => je(c)).sort((c, u) => c.nativeName > u.nativeName ? 1 : u.nativeName > c.nativeName ? -1 : 0));
|
|
3149
3149
|
function a() {
|
|
3150
3150
|
e.disabled || (s.value = !s.value);
|
|
3151
3151
|
}
|
|
3152
|
-
return K(() => e.disabled, (
|
|
3153
|
-
|
|
3154
|
-
}), (
|
|
3152
|
+
return K(() => e.disabled, (c) => {
|
|
3153
|
+
c && (s.value = !1);
|
|
3154
|
+
}), (c, u) => m.value !== null && d(je)(m.value) ? (i(), v("div", Un, [
|
|
3155
3155
|
p("div", {
|
|
3156
3156
|
class: I(["cl-flex cl-items-center", {
|
|
3157
|
-
"cl-cursor-pointer": !
|
|
3157
|
+
"cl-cursor-pointer": !c.disabled
|
|
3158
3158
|
}]),
|
|
3159
3159
|
onClick: a
|
|
3160
3160
|
}, [
|
|
3161
3161
|
p("span", {
|
|
3162
3162
|
class: I(["cl-font-semibold cl-text-xs", {
|
|
3163
|
-
"cl-opacity-50":
|
|
3163
|
+
"cl-opacity-50": c.disabled
|
|
3164
3164
|
}])
|
|
3165
3165
|
}, T(m.value.nativeName), 3)
|
|
3166
3166
|
], 2),
|
|
3167
3167
|
k(me, { name: "fade" }, {
|
|
3168
3168
|
default: P(() => [
|
|
3169
3169
|
L(p("div", Bn, [
|
|
3170
|
-
(
|
|
3170
|
+
(i(!0), v(F, null, Q(n.value, (g, b) => (i(), v("div", {
|
|
3171
3171
|
key: b,
|
|
3172
3172
|
class: "cl-border-b cl-border-grey-0 cl-cursor-pointer cl-flex cl-items-center cl-justify-center cl-p-1 cl-text-center cl-transition-colors cl-w-28 hover:cl-bg-grey-0 last-child:cl-border-b-0 last:cl-border-b-0 lg:cl-p-2",
|
|
3173
3173
|
"data-localename": g.name,
|
|
@@ -3186,10 +3186,10 @@ const Un = {
|
|
|
3186
3186
|
})
|
|
3187
3187
|
])) : N("", !0);
|
|
3188
3188
|
}
|
|
3189
|
-
}), Ln = { class: "cl-relative" }, Pn = { class: "cl-h-
|
|
3189
|
+
}), Ln = { class: "cl-relative" }, Pn = { class: "cl-h-full cl-z-0 xl:cl-h-screen" }, Fn = { 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" }, Hn = { class: "cl-col-span-10 lg:cl-col-span-3" }, xn = {
|
|
3190
3190
|
key: 0,
|
|
3191
3191
|
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"
|
|
3192
|
-
},
|
|
3192
|
+
}, Gn = { class: "cl-col-span-3" }, Zn = { class: "cl-inline cl-relative cl-text-grey-4" }, Wn = { class: "cl-col-span-3" }, Kn = { class: "cl-inline cl-relative cl-text-grey-4" }, Qn = { class: "cl-col-span-10 cl-emphasis-danger cl-mt-10 cl-p-3 cl-rounded-md cl-text-sm md:cl-mt-3" }, Jn = /* @__PURE__ */ M({
|
|
3193
3193
|
__name: "cl-ui-login",
|
|
3194
3194
|
props: {
|
|
3195
3195
|
errors: { default: () => [] },
|
|
@@ -3208,7 +3208,7 @@ const Un = {
|
|
|
3208
3208
|
};
|
|
3209
3209
|
o("login", b);
|
|
3210
3210
|
}
|
|
3211
|
-
function
|
|
3211
|
+
function c() {
|
|
3212
3212
|
o("update:errors", []);
|
|
3213
3213
|
}
|
|
3214
3214
|
function u(b, r) {
|
|
@@ -3221,7 +3221,7 @@ const Un = {
|
|
|
3221
3221
|
function g(b, r) {
|
|
3222
3222
|
n.value = b;
|
|
3223
3223
|
}
|
|
3224
|
-
return (b, r) => (
|
|
3224
|
+
return (b, r) => (i(), v("div", Ln, [
|
|
3225
3225
|
p("div", Pn, [
|
|
3226
3226
|
j(b.$slots, "background")
|
|
3227
3227
|
]),
|
|
@@ -3229,7 +3229,7 @@ const Un = {
|
|
|
3229
3229
|
p("div", Hn, [
|
|
3230
3230
|
j(b.$slots, "logo")
|
|
3231
3231
|
]),
|
|
3232
|
-
b.$slots["language-switcher"] ? (
|
|
3232
|
+
b.$slots["language-switcher"] ? (i(), v("div", xn, [
|
|
3233
3233
|
j(b.$slots, "language-switcher")
|
|
3234
3234
|
])) : N("", !0),
|
|
3235
3235
|
p("div", {
|
|
@@ -3238,8 +3238,8 @@ const Un = {
|
|
|
3238
3238
|
"cl-col-span-6": b.$slots["language-switcher"]
|
|
3239
3239
|
}])
|
|
3240
3240
|
}, [
|
|
3241
|
-
p("div",
|
|
3242
|
-
p("div",
|
|
3241
|
+
p("div", Gn, [
|
|
3242
|
+
p("div", Zn, [
|
|
3243
3243
|
k(d(_), {
|
|
3244
3244
|
class: "cl-absolute cl-left-3 cl-top-2.5 cl-z-10",
|
|
3245
3245
|
icon: "ph:user",
|
|
@@ -3261,7 +3261,7 @@ const Un = {
|
|
|
3261
3261
|
"custom-validation-function": u,
|
|
3262
3262
|
"input-specific-classes": "!cl-pl-9",
|
|
3263
3263
|
"message-when-valid": l.value ? d(e)("login.validEmail") : "",
|
|
3264
|
-
onInput:
|
|
3264
|
+
onInput: c,
|
|
3265
3265
|
onValidated: g
|
|
3266
3266
|
}, null, 8, ["modelValue", "highlight-when-valid", "label", "placeholder-text", "message-when-valid"])
|
|
3267
3267
|
])
|
|
@@ -3303,7 +3303,7 @@ const Un = {
|
|
|
3303
3303
|
"validate-immediately": !0,
|
|
3304
3304
|
"input-specific-classes": "!cl-pl-9 !cl-pr-9",
|
|
3305
3305
|
"custom-validation-function": u,
|
|
3306
|
-
onInput:
|
|
3306
|
+
onInput: c
|
|
3307
3307
|
}, null, 8, ["modelValue", "input-type", "highlight-when-valid", "label", "placeholder-text"])
|
|
3308
3308
|
])
|
|
3309
3309
|
]),
|
|
@@ -3332,7 +3332,7 @@ const Un = {
|
|
|
3332
3332
|
var w;
|
|
3333
3333
|
return [
|
|
3334
3334
|
L(p("span", Qn, [
|
|
3335
|
-
(
|
|
3335
|
+
(i(!0), v(F, null, Q(b.errors, (h, q) => (i(), v("div", {
|
|
3336
3336
|
id: "cl-ui-login-errors",
|
|
3337
3337
|
key: q,
|
|
3338
3338
|
class: "cl-font-semibold"
|
|
@@ -3379,7 +3379,7 @@ const Un = {
|
|
|
3379
3379
|
h.id !== r && (h.open = !1);
|
|
3380
3380
|
}));
|
|
3381
3381
|
}
|
|
3382
|
-
const m =
|
|
3382
|
+
const m = cl();
|
|
3383
3383
|
K(
|
|
3384
3384
|
() => m,
|
|
3385
3385
|
() => {
|
|
@@ -3389,9 +3389,9 @@ const Un = {
|
|
|
3389
3389
|
deep: !0
|
|
3390
3390
|
}
|
|
3391
3391
|
);
|
|
3392
|
-
const n = A(!1), a = A(!1), { start:
|
|
3392
|
+
const n = A(!1), a = A(!1), { start: c } = Ke(() => a.value = !1, 100);
|
|
3393
3393
|
function u() {
|
|
3394
|
-
n.value = !n.value, a.value = !0,
|
|
3394
|
+
n.value = !n.value, a.value = !0, c();
|
|
3395
3395
|
}
|
|
3396
3396
|
const g = A();
|
|
3397
3397
|
function b() {
|
|
@@ -3399,7 +3399,7 @@ const Un = {
|
|
|
3399
3399
|
r.open = !1;
|
|
3400
3400
|
});
|
|
3401
3401
|
}
|
|
3402
|
-
return ze(g, b), (r, w) => (
|
|
3402
|
+
return ze(g, b), (r, w) => (i(), v("div", {
|
|
3403
3403
|
ref_key: "navElement",
|
|
3404
3404
|
ref: g,
|
|
3405
3405
|
class: "cl-flex cl-flex-nowrap cl-relative"
|
|
@@ -3413,7 +3413,7 @@ const Un = {
|
|
|
3413
3413
|
}, [
|
|
3414
3414
|
j(r.$slots, "icon", se({ navcolour: r.colour }, { groupIsOpen: l, toggleOpen: s }), void 0, !0)
|
|
3415
3415
|
], 2),
|
|
3416
|
-
a.value ? (
|
|
3416
|
+
a.value ? (i(), v("div", es)) : N("", !0),
|
|
3417
3417
|
k(me, { name: "slide-right" }, {
|
|
3418
3418
|
default: P(() => [
|
|
3419
3419
|
L(p("div", {
|
|
@@ -3427,10 +3427,10 @@ const Un = {
|
|
|
3427
3427
|
class: "cl-absolute cl-cursor-pointer cl-hidden cl-right-0 cl-top-1.5 lg:cl-block",
|
|
3428
3428
|
onClick: u
|
|
3429
3429
|
}, [
|
|
3430
|
-
n.value ? (
|
|
3430
|
+
n.value ? (i(), V(d(_), {
|
|
3431
3431
|
key: 1,
|
|
3432
3432
|
icon: "ph:push-pin-slash"
|
|
3433
|
-
})) : (
|
|
3433
|
+
})) : (i(), V(d(_), {
|
|
3434
3434
|
key: 0,
|
|
3435
3435
|
icon: "ph:push-pin"
|
|
3436
3436
|
}))
|
|
@@ -3454,7 +3454,7 @@ const os = /* @__PURE__ */ de(ts, [["__scopeId", "data-v-7db412a7"]]), ns = /* @
|
|
|
3454
3454
|
colour: { default: "default" }
|
|
3455
3455
|
},
|
|
3456
3456
|
setup(t) {
|
|
3457
|
-
return (o, e) => (
|
|
3457
|
+
return (o, e) => (i(), v("div", {
|
|
3458
3458
|
class: I(["cl-cursor-pointer cl-flex cl-h-20 cl-items-center cl-justify-center cl-transition-colors cl-w-20", {
|
|
3459
3459
|
"cl-text-secondary-default hover:cl-bg-primary-dark hover:cl-text-white": o.colour === "default",
|
|
3460
3460
|
"cl-bg-primary-darker cl-text-white": o.open && o.colour === "default",
|
|
@@ -3478,8 +3478,8 @@ const os = /* @__PURE__ */ de(ts, [["__scopeId", "data-v-7db412a7"]]), ns = /* @
|
|
|
3478
3478
|
open: { type: Boolean }
|
|
3479
3479
|
},
|
|
3480
3480
|
setup(t) {
|
|
3481
|
-
return (o, e) => o.open ? (
|
|
3482
|
-
o.$slots.title ? (
|
|
3481
|
+
return (o, e) => o.open ? (i(), v(F, { key: 0 }, [
|
|
3482
|
+
o.$slots.title ? (i(), v("div", ss, [
|
|
3483
3483
|
j(o.$slots, "title")
|
|
3484
3484
|
])) : N("", !0),
|
|
3485
3485
|
p("div", as, [
|
|
@@ -3487,13 +3487,13 @@ const os = /* @__PURE__ */ de(ts, [["__scopeId", "data-v-7db412a7"]]), ns = /* @
|
|
|
3487
3487
|
])
|
|
3488
3488
|
], 64)) : N("", !0);
|
|
3489
3489
|
}
|
|
3490
|
-
}),
|
|
3490
|
+
}), cs = {}, is = { class: "cl-w-full" }, us = {
|
|
3491
3491
|
key: 0,
|
|
3492
3492
|
class: "cl-font-bold cl-mb-4 cl-select-none"
|
|
3493
3493
|
}, ds = { class: "cl-flex cl-flex-wrap cl-space-y-2" };
|
|
3494
3494
|
function ps(t, o) {
|
|
3495
|
-
return
|
|
3496
|
-
t.$slots.title ? (
|
|
3495
|
+
return i(), v("div", is, [
|
|
3496
|
+
t.$slots.title ? (i(), v("div", us, [
|
|
3497
3497
|
j(t.$slots, "title")
|
|
3498
3498
|
])) : N("", !0),
|
|
3499
3499
|
p("span", ds, [
|
|
@@ -3501,9 +3501,9 @@ function ps(t, o) {
|
|
|
3501
3501
|
])
|
|
3502
3502
|
]);
|
|
3503
3503
|
}
|
|
3504
|
-
const fs = /* @__PURE__ */ de(
|
|
3504
|
+
const fs = /* @__PURE__ */ de(cs, [["render", ps]]), ms = {}, gs = { class: "cl-cursor-pointer cl-transition-colors cl-w-full hover:cl-text-blue-light" };
|
|
3505
3505
|
function vs(t, o) {
|
|
3506
|
-
return
|
|
3506
|
+
return i(), v("div", gs, [
|
|
3507
3507
|
j(t.$slots, "default")
|
|
3508
3508
|
]);
|
|
3509
3509
|
}
|
|
@@ -3529,19 +3529,19 @@ const bs = /* @__PURE__ */ de(ms, [["render", vs]]), hs = { class: "cl-w-full" }
|
|
|
3529
3529
|
function a() {
|
|
3530
3530
|
n(), window.addEventListener("resize", n);
|
|
3531
3531
|
}
|
|
3532
|
-
function
|
|
3532
|
+
function c(u) {
|
|
3533
3533
|
if (e.value) {
|
|
3534
3534
|
const g = e.value.scrollWidth / 5;
|
|
3535
3535
|
let b = g;
|
|
3536
3536
|
u === "left" && (b = -g), e.value.scroll(e.value.scrollLeft + b, 0);
|
|
3537
3537
|
}
|
|
3538
3538
|
}
|
|
3539
|
-
return Ae(() => a()), _e(() => window.removeEventListener("resize", n)), (u, g) => (
|
|
3539
|
+
return Ae(() => a()), _e(() => window.removeEventListener("resize", n)), (u, g) => (i(), v("div", hs, [
|
|
3540
3540
|
p("div", null, [
|
|
3541
|
-
l.value ? (
|
|
3541
|
+
l.value ? (i(), v("div", {
|
|
3542
3542
|
key: 0,
|
|
3543
3543
|
class: "cl-bg-white cl-cursor-pointer cl-float-left cl-h-11 cl-w-4",
|
|
3544
|
-
onClick: g[0] || (g[0] = (b) =>
|
|
3544
|
+
onClick: g[0] || (g[0] = (b) => c("left"))
|
|
3545
3545
|
}, [
|
|
3546
3546
|
k(d(_), {
|
|
3547
3547
|
icon: "ph:caret-left",
|
|
@@ -3564,10 +3564,10 @@ const bs = /* @__PURE__ */ de(ms, [["render", vs]]), hs = { class: "cl-w-full" }
|
|
|
3564
3564
|
}, [
|
|
3565
3565
|
j(u.$slots, "headings", le(ne({ isTabOpen: m, disabled: u.disabled, colour: u.colour })))
|
|
3566
3566
|
], 34),
|
|
3567
|
-
s.value ? (
|
|
3567
|
+
s.value ? (i(), v("div", {
|
|
3568
3568
|
key: 1,
|
|
3569
3569
|
class: "cl-bg-white cl-bottom-12 cl-cursor-pointer cl-float-right cl-h-11 cl-relative cl-w-4",
|
|
3570
|
-
onClick: g[1] || (g[1] = (b) =>
|
|
3570
|
+
onClick: g[1] || (g[1] = (b) => c("right"))
|
|
3571
3571
|
}, [
|
|
3572
3572
|
k(d(_), {
|
|
3573
3573
|
icon: "ph:caret-right",
|
|
@@ -3594,7 +3594,7 @@ const bs = /* @__PURE__ */ de(ms, [["render", vs]]), hs = { class: "cl-w-full" }
|
|
|
3594
3594
|
function n() {
|
|
3595
3595
|
e.disabled || (l.value = !1, s.value = !1, o("update:currentTab", e.id));
|
|
3596
3596
|
}
|
|
3597
|
-
return (a,
|
|
3597
|
+
return (a, c) => (i(), v("div", {
|
|
3598
3598
|
class: I(["cl-border-b cl-cursor-pointer cl-flex cl-items-center cl-px-4 cl-py-2 cl-rounded-b-none cl-rounded-sm cl-select-none cl-text-xl cl-transition cl-whitespace-nowrap focus:cl-outline-none", {
|
|
3599
3599
|
"!cl-cursor-default cl-text-grey-4 !cl-border-grey-2": a.disabled,
|
|
3600
3600
|
"cl-border cl-border-b-0 cl-rounded-t-md cl-shadow-[inset_0_-1px_0_#ffffff] cl-cursor-default": m.value,
|
|
@@ -3609,17 +3609,17 @@ const bs = /* @__PURE__ */ de(ms, [["render", vs]]), hs = { class: "cl-w-full" }
|
|
|
3609
3609
|
"hover:cl-bg-danger-light": !m.value && !a.disabled && a.colour === "danger",
|
|
3610
3610
|
"hover:cl-bg-link-lighter": !m.value && !a.disabled && a.colour === "blue",
|
|
3611
3611
|
"cl-bg-grey-0": l.value && !a.disabled && a.colour === "default",
|
|
3612
|
-
"cl-bg-primary-
|
|
3612
|
+
"cl-bg-primary-light": l.value && !a.disabled && a.colour === "primary",
|
|
3613
3613
|
"cl-bg-secondary-light cl-text-white": l.value && !a.disabled && a.colour === "secondary",
|
|
3614
3614
|
"cl-bg-danger-light": l.value && !a.disabled && a.colour === "danger",
|
|
3615
3615
|
"cl-bg-link-lighter": l.value && !a.disabled && a.colour === "blue"
|
|
3616
3616
|
}]),
|
|
3617
3617
|
tabindex: "0",
|
|
3618
3618
|
onClick: n,
|
|
3619
|
-
onMouseover:
|
|
3620
|
-
onMouseout:
|
|
3621
|
-
onFocusin:
|
|
3622
|
-
onFocusout:
|
|
3619
|
+
onMouseover: c[0] || (c[0] = (u) => s.value = !0),
|
|
3620
|
+
onMouseout: c[1] || (c[1] = (u) => s.value = !1),
|
|
3621
|
+
onFocusin: c[2] || (c[2] = (u) => l.value = !0),
|
|
3622
|
+
onFocusout: c[3] || (c[3] = (u) => l.value = !1),
|
|
3623
3623
|
onKeyup: we(W(n, ["self"]), ["enter"])
|
|
3624
3624
|
}, [
|
|
3625
3625
|
j(a.$slots, "default")
|
|
@@ -3671,7 +3671,7 @@ const Ts = /* @__PURE__ */ de(ks, [["render", Cs]]), Es = [
|
|
|
3671
3671
|
clUiTabHeader: $s,
|
|
3672
3672
|
filterMethodTypes: Io,
|
|
3673
3673
|
gridColumnTypes: So,
|
|
3674
|
-
inputTypes:
|
|
3674
|
+
inputTypes: Zl,
|
|
3675
3675
|
isComboBoxCreateRequest: Rt,
|
|
3676
3676
|
isComboBoxItem: _t,
|
|
3677
3677
|
isFilterRequest: zo,
|
|
@@ -3696,7 +3696,7 @@ const Ls = (t) => {
|
|
|
3696
3696
|
};
|
|
3697
3697
|
export {
|
|
3698
3698
|
Ds as CitrusLimeUI,
|
|
3699
|
-
|
|
3699
|
+
G as DateFormat,
|
|
3700
3700
|
te as FilterOperation,
|
|
3701
3701
|
Y as NumberFormat,
|
|
3702
3702
|
Sl as buttonColours,
|
|
@@ -3732,7 +3732,7 @@ export {
|
|
|
3732
3732
|
Io as filterMethodTypes,
|
|
3733
3733
|
So as gridColumnTypes,
|
|
3734
3734
|
X as i18n,
|
|
3735
|
-
|
|
3735
|
+
Zl as inputTypes,
|
|
3736
3736
|
Rt as isComboBoxCreateRequest,
|
|
3737
3737
|
_t as isComboBoxItem,
|
|
3738
3738
|
zo as isFilterRequest,
|