@citruslime/ui 2.6.2-beta.0 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Icon as x } from "@iconify/vue";
|
|
2
|
-
import { defineComponent as Q, ref as R, openBlock as f, createElementBlock as y, renderSlot as V, normalizeProps as ce, guardReactiveProps as fe, Fragment as X, createElementVNode as h, normalizeClass as M, createVNode as S, unref as g, Transition as Te, withCtx as Y, withDirectives as le, mergeProps as ve, vShow as te, createBlock as G, Teleport as ll, renderList as re, toDisplayString as q, createCommentVNode as j, nextTick as Fe, computed as A, resolveComponent as tl, toHandlers as Vl, withModifiers as ne, useCssVars as
|
|
2
|
+
import { defineComponent as Q, ref as R, openBlock as f, createElementBlock as y, renderSlot as V, normalizeProps as ce, guardReactiveProps as fe, Fragment as X, createElementVNode as h, normalizeClass as M, createVNode as S, unref as g, Transition as Te, withCtx as Y, withDirectives as le, mergeProps as ve, vShow as te, createBlock as G, Teleport as ll, renderList as re, toDisplayString as q, createCommentVNode as j, nextTick as Fe, computed as A, resolveComponent as tl, toHandlers as Vl, withModifiers as ne, useCssVars as Pl, vModelText as Ul, onMounted as Ze, watch as oe, vModelDynamic as Ll, toRefs as Bl, withKeys as Ee, onUnmounted as al, createTextVNode as de, watchEffect as _l, createSlots as ol, normalizeStyle as zl } from "vue";
|
|
3
3
|
import { generateStringId as xl, highlightText as Hl } from "@citruslime/utils";
|
|
4
4
|
import { useMediaQuery as Gl, unrefElement as Zl, tryOnScopeDispose as Kl, onClickOutside as nl, useTimeoutFn as Tl, useDebounceFn as $l, useWindowSize as Ql } from "@vueuse/core";
|
|
5
5
|
import { createI18n as Wl, useI18n as se } from "vue-i18n";
|
|
@@ -91,16 +91,16 @@ function nt(a, e) {
|
|
|
91
91
|
V(a.$slots, "default")
|
|
92
92
|
]);
|
|
93
93
|
}
|
|
94
|
-
const rt = /* @__PURE__ */ we(at, [["render", nt]]),
|
|
94
|
+
const rt = /* @__PURE__ */ we(at, [["render", nt]]), Ue = R([]);
|
|
95
95
|
function sl(a) {
|
|
96
96
|
const e = {
|
|
97
97
|
id: xl(),
|
|
98
98
|
...a
|
|
99
99
|
};
|
|
100
|
-
|
|
100
|
+
Ue.value.push(e), setTimeout(() => Cl(e), a.duration);
|
|
101
101
|
}
|
|
102
102
|
function Cl(a) {
|
|
103
|
-
|
|
103
|
+
Ue.value = Ue.value.filter((e) => e.id !== a.id);
|
|
104
104
|
}
|
|
105
105
|
const st = ["onClick"], it = { class: "cl-flex-1 cl-select-none cl-text-ellipsis cl-w-64" }, Ol = /* @__PURE__ */ Q({
|
|
106
106
|
inheritAttrs: !1,
|
|
@@ -121,7 +121,7 @@ const st = ["onClick"], it = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
121
121
|
"cl-bottom-5 cl-right-5": e.position === "bottom-right"
|
|
122
122
|
}])
|
|
123
123
|
}, [
|
|
124
|
-
(f(!0), y(X, null, re(g(
|
|
124
|
+
(f(!0), y(X, null, re(g(Ue), (t, n) => (f(), y("div", ve(e.$attrs, {
|
|
125
125
|
key: n,
|
|
126
126
|
class: ["cl-break-words cl-cursor-pointer cl-flex cl-font-semibold cl-group cl-mb-2 cl-overflow-hidden cl-p-4 cl-rounded cl-shadow-lg cl-text-sm", {
|
|
127
127
|
"cl-bg-white": t.colour === "default",
|
|
@@ -795,7 +795,7 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
795
795
|
translationKey: "quickDates.lastYear",
|
|
796
796
|
range: "year"
|
|
797
797
|
}
|
|
798
|
-
],
|
|
798
|
+
], Be = [
|
|
799
799
|
{
|
|
800
800
|
name: "tomorrow",
|
|
801
801
|
scope: "future",
|
|
@@ -822,12 +822,12 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
822
822
|
}
|
|
823
823
|
], Sl = [
|
|
824
824
|
...Le,
|
|
825
|
-
...
|
|
825
|
+
...Be,
|
|
826
826
|
...Ie
|
|
827
827
|
], Mt = { class: "cl-p-2 cl-pt-0" }, Vt = {
|
|
828
828
|
key: 0,
|
|
829
829
|
class: "cl-mt-2 cl-opacity-20"
|
|
830
|
-
},
|
|
830
|
+
}, Pt = /* @__PURE__ */ Q({
|
|
831
831
|
__name: "cl-ui-quick-dates",
|
|
832
832
|
props: {
|
|
833
833
|
scope: {},
|
|
@@ -843,10 +843,10 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
843
843
|
c.push(Ie), c.push(Le);
|
|
844
844
|
break;
|
|
845
845
|
case "future":
|
|
846
|
-
c.push(Ie), c.push(
|
|
846
|
+
c.push(Ie), c.push(Be);
|
|
847
847
|
break;
|
|
848
848
|
case null:
|
|
849
|
-
c.push(Ie), c.push(Le), c.push(
|
|
849
|
+
c.push(Ie), c.push(Le), c.push(Be);
|
|
850
850
|
break;
|
|
851
851
|
default: {
|
|
852
852
|
const o = [];
|
|
@@ -875,7 +875,7 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
875
875
|
]))), 128))
|
|
876
876
|
]));
|
|
877
877
|
}
|
|
878
|
-
}),
|
|
878
|
+
}), Ut = /* @__PURE__ */ Q({
|
|
879
879
|
inheritAttrs: !1,
|
|
880
880
|
__name: "cl-ui-calendar",
|
|
881
881
|
props: {
|
|
@@ -982,10 +982,10 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
982
982
|
(u = d.value) == null || u.focus();
|
|
983
983
|
}
|
|
984
984
|
});
|
|
985
|
-
const I = R(null),
|
|
985
|
+
const I = R(null), U = R();
|
|
986
986
|
function L(u) {
|
|
987
987
|
const p = Z(u);
|
|
988
|
-
c.value = p, I.value = u,
|
|
988
|
+
c.value = p, I.value = u, U.value.move(p.start);
|
|
989
989
|
}
|
|
990
990
|
function Z(u) {
|
|
991
991
|
const p = u.range, O = u.scope === "past" ? -1 : u.scope === "current" ? 0 : 1, $ = H.now().setZone(n.value).startOf(p).plus({ days: p === "day" ? O : 0, weeks: p === "week" ? O : 0, months: p === "month" ? O : 0, years: p === "year" ? O : 0 }), z = $.endOf(p);
|
|
@@ -1002,7 +1002,7 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
1002
1002
|
u = `${O} - ${$}`;
|
|
1003
1003
|
}
|
|
1004
1004
|
return u;
|
|
1005
|
-
}), N = Gl("(min-width: 768px)"),
|
|
1005
|
+
}), N = Gl("(min-width: 768px)"), B = A(() => N.value ? 2 : 1);
|
|
1006
1006
|
return (u, p) => u.type === "time" ? (f(), G(g(We), {
|
|
1007
1007
|
key: 0,
|
|
1008
1008
|
modelValue: c.value,
|
|
@@ -1036,7 +1036,7 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
1036
1036
|
}, 8, ["modelValue", "locale", "is24hr", "mode", "is-required", "masks", "popover"])) : u.type === "dateRange" ? (f(), G(g(We), {
|
|
1037
1037
|
key: 1,
|
|
1038
1038
|
ref_key: "calendar",
|
|
1039
|
-
ref:
|
|
1039
|
+
ref: U,
|
|
1040
1040
|
modelValue: c.value,
|
|
1041
1041
|
"onUpdate:modelValue": p[3] || (p[3] = (O) => c.value = O),
|
|
1042
1042
|
modelModifiers: { range: !0 },
|
|
@@ -1045,7 +1045,7 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
1045
1045
|
"title-position": "left",
|
|
1046
1046
|
locale: g(o),
|
|
1047
1047
|
timezone: n.value,
|
|
1048
|
-
columns:
|
|
1048
|
+
columns: B.value,
|
|
1049
1049
|
popover: s.value,
|
|
1050
1050
|
"min-date": u.min,
|
|
1051
1051
|
"max-date": u.max,
|
|
@@ -1064,12 +1064,12 @@ const Ye = /* @__PURE__ */ we(Dt, [["__scopeId", "data-v-62c35053"]]), Rt = { cl
|
|
|
1064
1064
|
placeholder: null,
|
|
1065
1065
|
onTogglePopover: O,
|
|
1066
1066
|
onClear: p[2] || (p[2] = ($) => {
|
|
1067
|
-
c.value = null, I.value = null,
|
|
1067
|
+
c.value = null, I.value = null, U.value.hidePopover();
|
|
1068
1068
|
})
|
|
1069
1069
|
}), null, 16, ["type", "required", "disabled", "range-selected", "title", "onTogglePopover"])
|
|
1070
1070
|
]),
|
|
1071
1071
|
footer: Y(() => [
|
|
1072
|
-
u.quickDateScope !== "none" ? (f(), G(
|
|
1072
|
+
u.quickDateScope !== "none" ? (f(), G(Pt, {
|
|
1073
1073
|
key: 0,
|
|
1074
1074
|
scope: u.quickDateScope,
|
|
1075
1075
|
"selected-quick-date": I.value,
|
|
@@ -1136,7 +1136,7 @@ function Lt(a) {
|
|
|
1136
1136
|
function gs() {
|
|
1137
1137
|
return Lt;
|
|
1138
1138
|
}
|
|
1139
|
-
const
|
|
1139
|
+
const Bt = [
|
|
1140
1140
|
"button",
|
|
1141
1141
|
"checkbox",
|
|
1142
1142
|
"color",
|
|
@@ -1153,7 +1153,7 @@ const _t = [
|
|
|
1153
1153
|
"text",
|
|
1154
1154
|
"url",
|
|
1155
1155
|
...De
|
|
1156
|
-
],
|
|
1156
|
+
], _t = { class: "cl-flex cl-items-start" }, zt = {
|
|
1157
1157
|
key: 0,
|
|
1158
1158
|
class: "cl-w-full"
|
|
1159
1159
|
}, xt = ["min", "max", "step", "disabled"], Ht = { class: "cl-bg-transparent cl-text-center cl-text-sm cl-w-full" }, Gt = { class: "cl-bg-transparent cl-text-sm" }, Zt = { class: "cl-bg-white cl-border cl-border-transparent cl-cursor-pointer cl-float-right cl-p-1.5 cl-px-2 cl-rounded-full cl-shadow cl-text-xs hover:cl-border-grey-1" }, Kt = {
|
|
@@ -1174,7 +1174,7 @@ const _t = [
|
|
|
1174
1174
|
},
|
|
1175
1175
|
setup(a, { expose: e, emit: l }) {
|
|
1176
1176
|
const t = a;
|
|
1177
|
-
|
|
1177
|
+
Pl((m) => ({
|
|
1178
1178
|
"1e2ffb88": s.value
|
|
1179
1179
|
}));
|
|
1180
1180
|
const { n, t: c } = se(), r = R(), o = A({
|
|
@@ -1192,7 +1192,7 @@ const _t = [
|
|
|
1192
1192
|
});
|
|
1193
1193
|
const v = R(!1);
|
|
1194
1194
|
return (m, d) => i.value ? (f(), y("div", ce(ve({ key: 0 }, m.$attrs)), [
|
|
1195
|
-
h("div",
|
|
1195
|
+
h("div", _t, [
|
|
1196
1196
|
h("span", {
|
|
1197
1197
|
class: M(["cl-border cl-border-transparent cl-leading-6 cl-mr-1 cl-px-2 cl-rounded-full cl-select-none cl-shadow cl-text-center cl-text-xs", {
|
|
1198
1198
|
"cl-bg-white cl-cursor-pointer hover:cl-border-grey-1": !m.disabled,
|
|
@@ -1226,7 +1226,7 @@ const _t = [
|
|
|
1226
1226
|
disabled: m.disabled
|
|
1227
1227
|
}, null, 8, xt), [
|
|
1228
1228
|
[
|
|
1229
|
-
|
|
1229
|
+
Ul,
|
|
1230
1230
|
o.value,
|
|
1231
1231
|
void 0,
|
|
1232
1232
|
{ number: !0 }
|
|
@@ -1375,7 +1375,7 @@ const Xt = { class: "cl-flex cl-justify-between" }, ea = { class: "cl-w-full" },
|
|
|
1375
1375
|
}), m = A({
|
|
1376
1376
|
get: () => t.modelValue,
|
|
1377
1377
|
set: (b) => u(b)
|
|
1378
|
-
}), d = A(() => typeof t.min == "number" ? t.min.toString() : t.min), k = A(() => typeof t.max == "number" ? t.max.toString() : t.max), I = A(() => typeof t.min == "number" || t.min === null ? t.min : parseFloat(t.min)),
|
|
1378
|
+
}), d = A(() => typeof t.min == "number" ? t.min.toString() : t.min), k = A(() => typeof t.max == "number" ? t.max.toString() : t.max), I = A(() => typeof t.min == "number" || t.min === null ? t.min : parseFloat(t.min)), U = A(() => typeof t.max == "number" || t.max === null ? t.max : parseFloat(t.max)), L = A(() => t.messageWhenValid.trim() !== "" ? t.messageWhenValid : ""), Z = R(!0), ae = R(!0), N = R([]), B = A(() => {
|
|
1379
1379
|
var b, F;
|
|
1380
1380
|
return [
|
|
1381
1381
|
...((b = N.value) == null ? void 0 : b.filter((K) => ((K == null ? void 0 : K.length) ?? 0) > 0)) ?? [],
|
|
@@ -1412,7 +1412,7 @@ const Xt = { class: "cl-flex cl-justify-between" }, ea = { class: "cl-w-full" },
|
|
|
1412
1412
|
function z(b) {
|
|
1413
1413
|
Re(t.inputType) ? (b.preventDefault(), l("click", b)) : t.inputType === "checkbox" && l("click", b);
|
|
1414
1414
|
}
|
|
1415
|
-
function
|
|
1415
|
+
function _(b) {
|
|
1416
1416
|
if (n.value) {
|
|
1417
1417
|
n.value.stepUp(), n.value.focus(), p(n.value.valueAsNumber, !1);
|
|
1418
1418
|
const F = {
|
|
@@ -1436,7 +1436,7 @@ const Xt = { class: "cl-flex cl-justify-between" }, ea = { class: "cl-w-full" },
|
|
|
1436
1436
|
async function E() {
|
|
1437
1437
|
r.value = !0, w(!1), t.validateOn === "change" && await O(v.value);
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1439
|
+
function P() {
|
|
1440
1440
|
i.value++;
|
|
1441
1441
|
}
|
|
1442
1442
|
function C(b) {
|
|
@@ -1453,7 +1453,7 @@ const Xt = { class: "cl-flex cl-justify-between" }, ea = { class: "cl-w-full" },
|
|
|
1453
1453
|
t.validateOn === "change" && await O(F), l("change", b, F);
|
|
1454
1454
|
}
|
|
1455
1455
|
async function W() {
|
|
1456
|
-
await E(),
|
|
1456
|
+
await E(), P();
|
|
1457
1457
|
}
|
|
1458
1458
|
return Ze(() => {
|
|
1459
1459
|
t.validateImmediately && p(t.modelValue, !0);
|
|
@@ -1538,7 +1538,7 @@ const Xt = { class: "cl-flex cl-justify-between" }, ea = { class: "cl-w-full" },
|
|
|
1538
1538
|
S(g(x), {
|
|
1539
1539
|
icon: "ph:caret-up-bold",
|
|
1540
1540
|
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",
|
|
1541
|
-
onClick:
|
|
1541
|
+
onClick: _,
|
|
1542
1542
|
onMousedown: F[4] || (F[4] = ne(() => {
|
|
1543
1543
|
}, ["prevent"]))
|
|
1544
1544
|
}),
|
|
@@ -1555,7 +1555,7 @@ const Xt = { class: "cl-flex cl-justify-between" }, ea = { class: "cl-w-full" },
|
|
|
1555
1555
|
]),
|
|
1556
1556
|
_: 1
|
|
1557
1557
|
})
|
|
1558
|
-
])) : g(cl)(b.inputType) ? (f(), G(g(
|
|
1558
|
+
])) : g(cl)(b.inputType) ? (f(), G(g(Ut), ve({ key: 1 }, b.$attrs, {
|
|
1559
1559
|
ref_key: "inputElement",
|
|
1560
1560
|
ref: n,
|
|
1561
1561
|
date: m.value,
|
|
@@ -1583,7 +1583,7 @@ const Xt = { class: "cl-flex cl-justify-between" }, ea = { class: "cl-w-full" },
|
|
|
1583
1583
|
value: v.value,
|
|
1584
1584
|
"onUpdate:value": F[8] || (F[8] = (K) => v.value = K),
|
|
1585
1585
|
min: I.value ?? 0,
|
|
1586
|
-
max:
|
|
1586
|
+
max: U.value ?? 1e3,
|
|
1587
1587
|
step: b.step,
|
|
1588
1588
|
"enforce-step": !0,
|
|
1589
1589
|
disabled: b.disabled,
|
|
@@ -1593,7 +1593,7 @@ const Xt = { class: "cl-flex cl-justify-between" }, ea = { class: "cl-w-full" },
|
|
|
1593
1593
|
])) : j("", !0)
|
|
1594
1594
|
], 32),
|
|
1595
1595
|
Z.value && L.value && ae.value ? (f(), y("div", sa, q(L.value), 1)) : j("", !0),
|
|
1596
|
-
!Z.value &&
|
|
1596
|
+
!Z.value && B.value.length > 0 && b.showValidationMessages && ae.value ? (f(), y("div", ia, q(B.value), 1)) : j("", !0)
|
|
1597
1597
|
], 16));
|
|
1598
1598
|
}
|
|
1599
1599
|
});
|
|
@@ -1602,7 +1602,7 @@ const me = /* @__PURE__ */ we(ca, [["__scopeId", "data-v-82868f28"]]);
|
|
|
1602
1602
|
* tabbable 6.2.0
|
|
1603
1603
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
1604
1604
|
*/
|
|
1605
|
-
var Nl = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"],
|
|
1605
|
+
var Nl = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], _e = /* @__PURE__ */ Nl.join(","), El = typeof Element > "u", Se = El ? function() {
|
|
1606
1606
|
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, ze = !El && Element.prototype.getRootNode ? function(a) {
|
|
1607
1607
|
var e;
|
|
1608
1608
|
return a == null || (e = a.getRootNode) === null || e === void 0 ? void 0 : e.call(a);
|
|
@@ -1619,8 +1619,8 @@ var Nl = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1619
1619
|
}, ql = function(e, l, t) {
|
|
1620
1620
|
if (xe(e))
|
|
1621
1621
|
return [];
|
|
1622
|
-
var n = Array.prototype.slice.apply(e.querySelectorAll(
|
|
1623
|
-
return l && Se.call(e,
|
|
1622
|
+
var n = Array.prototype.slice.apply(e.querySelectorAll(_e));
|
|
1623
|
+
return l && Se.call(e, _e) && n.unshift(e), n = n.filter(t), n;
|
|
1624
1624
|
}, Al = function a(e, l, t) {
|
|
1625
1625
|
for (var n = [], c = Array.from(e); c.length; ) {
|
|
1626
1626
|
var r = c.shift();
|
|
@@ -1632,7 +1632,7 @@ var Nl = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1632
1632
|
candidates: i
|
|
1633
1633
|
});
|
|
1634
1634
|
} else {
|
|
1635
|
-
var v = Se.call(r,
|
|
1635
|
+
var v = Se.call(r, _e);
|
|
1636
1636
|
v && t.filter(r) && (l || !e.includes(r)) && n.push(r);
|
|
1637
1637
|
var m = r.shadowRoot || // check for an undisclosed shadow
|
|
1638
1638
|
typeof t.getShadowRoot == "function" && t.getShadowRoot(r), d = !xe(m, !1) && (!t.shadowRootFilter || t.shadowRootFilter(r));
|
|
@@ -1787,7 +1787,7 @@ var Nl = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1787
1787
|
}, Ne = function(e, l) {
|
|
1788
1788
|
if (l = l || {}, !e)
|
|
1789
1789
|
throw new Error("No node provided");
|
|
1790
|
-
return Se.call(e,
|
|
1790
|
+
return Se.call(e, _e) === !1 ? !1 : Xe(l, e);
|
|
1791
1791
|
}, Sa = /* @__PURE__ */ Nl.concat("iframe").join(","), Je = function(e, l) {
|
|
1792
1792
|
if (l = l || {}, !e)
|
|
1793
1793
|
throw new Error("No node provided");
|
|
@@ -1925,8 +1925,8 @@ var ml = {
|
|
|
1925
1925
|
return T && T[w] !== void 0 ? T[w] : c[E || w];
|
|
1926
1926
|
}, i = function(T, w) {
|
|
1927
1927
|
var E = typeof (w == null ? void 0 : w.composedPath) == "function" ? w.composedPath() : void 0;
|
|
1928
|
-
return r.containerGroups.findIndex(function(
|
|
1929
|
-
var C =
|
|
1928
|
+
return r.containerGroups.findIndex(function(P) {
|
|
1929
|
+
var C = P.container, D = P.tabbableNodes;
|
|
1930
1930
|
return C.contains(T) || // fall back to explicit tabbable search which will take into consideration any
|
|
1931
1931
|
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
|
1932
1932
|
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
|
@@ -1938,9 +1938,9 @@ var ml = {
|
|
|
1938
1938
|
}, v = function(T) {
|
|
1939
1939
|
var w = c[T];
|
|
1940
1940
|
if (typeof w == "function") {
|
|
1941
|
-
for (var E = arguments.length,
|
|
1942
|
-
|
|
1943
|
-
w = w.apply(void 0,
|
|
1941
|
+
for (var E = arguments.length, P = new Array(E > 1 ? E - 1 : 0), C = 1; C < E; C++)
|
|
1942
|
+
P[C - 1] = arguments[C];
|
|
1943
|
+
w = w.apply(void 0, P);
|
|
1944
1944
|
}
|
|
1945
1945
|
if (w === !0 && (w = void 0), !w) {
|
|
1946
1946
|
if (w === void 0 || w === !1)
|
|
@@ -1967,7 +1967,7 @@ var ml = {
|
|
|
1967
1967
|
return T;
|
|
1968
1968
|
}, d = function() {
|
|
1969
1969
|
if (r.containerGroups = r.containers.map(function(T) {
|
|
1970
|
-
var w = Ca(T, c.tabbableOptions), E = Oa(T, c.tabbableOptions),
|
|
1970
|
+
var w = Ca(T, c.tabbableOptions), E = Oa(T, c.tabbableOptions), P = w.length > 0 ? w[0] : void 0, C = w.length > 0 ? w[w.length - 1] : void 0, D = E.find(function(b) {
|
|
1971
1971
|
return Ne(b);
|
|
1972
1972
|
}), J = E.slice().reverse().find(function(b) {
|
|
1973
1973
|
return Ne(b);
|
|
@@ -1981,7 +1981,7 @@ var ml = {
|
|
|
1981
1981
|
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
1982
1982
|
posTabIndexesFound: W,
|
|
1983
1983
|
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
1984
|
-
firstTabbableNode:
|
|
1984
|
+
firstTabbableNode: P,
|
|
1985
1985
|
/** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
1986
1986
|
lastTabbableNode: C,
|
|
1987
1987
|
// NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
|
|
@@ -2020,10 +2020,10 @@ var ml = {
|
|
|
2020
2020
|
return T.posTabIndexesFound;
|
|
2021
2021
|
}) && r.containerGroups.length > 1)
|
|
2022
2022
|
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
|
|
2023
|
-
}, k = function
|
|
2023
|
+
}, k = function _(T) {
|
|
2024
2024
|
if (T !== !1 && T !== t.activeElement) {
|
|
2025
2025
|
if (!T || !T.focus) {
|
|
2026
|
-
|
|
2026
|
+
_(m());
|
|
2027
2027
|
return;
|
|
2028
2028
|
}
|
|
2029
2029
|
T.focus({
|
|
@@ -2033,8 +2033,8 @@ var ml = {
|
|
|
2033
2033
|
}, I = function(T) {
|
|
2034
2034
|
var w = v("setReturnFocus", T);
|
|
2035
2035
|
return w || (w === !1 ? !1 : T);
|
|
2036
|
-
},
|
|
2037
|
-
var w = T.target, E = T.event,
|
|
2036
|
+
}, U = function(T) {
|
|
2037
|
+
var w = T.target, E = T.event, P = T.isBackward, C = P === void 0 ? !1 : P;
|
|
2038
2038
|
w = w || Me(E), d();
|
|
2039
2039
|
var D = null;
|
|
2040
2040
|
if (r.tabbableGroups.length > 0) {
|
|
@@ -2088,7 +2088,7 @@ var ml = {
|
|
|
2088
2088
|
E && (r.mostRecentlyFocusedNode = w);
|
|
2089
2089
|
else {
|
|
2090
2090
|
T.stopImmediatePropagation();
|
|
2091
|
-
var
|
|
2091
|
+
var P, C = !0;
|
|
2092
2092
|
if (r.mostRecentlyFocusedNode)
|
|
2093
2093
|
if (Oe(r.mostRecentlyFocusedNode) > 0) {
|
|
2094
2094
|
var D = i(r.mostRecentlyFocusedNode), J = r.containerGroups[D].tabbableNodes;
|
|
@@ -2096,7 +2096,7 @@ var ml = {
|
|
|
2096
2096
|
var W = J.findIndex(function(b) {
|
|
2097
2097
|
return b === r.mostRecentlyFocusedNode;
|
|
2098
2098
|
});
|
|
2099
|
-
W >= 0 && (c.isKeyForward(r.recentNavEvent) ? W + 1 < J.length && (
|
|
2099
|
+
W >= 0 && (c.isKeyForward(r.recentNavEvent) ? W + 1 < J.length && (P = J[W + 1], C = !1) : W - 1 >= 0 && (P = J[W - 1], C = !1));
|
|
2100
2100
|
}
|
|
2101
2101
|
} else
|
|
2102
2102
|
r.containerGroups.some(function(b) {
|
|
@@ -2106,18 +2106,18 @@ var ml = {
|
|
|
2106
2106
|
}) || (C = !1);
|
|
2107
2107
|
else
|
|
2108
2108
|
C = !1;
|
|
2109
|
-
C && (
|
|
2109
|
+
C && (P = U({
|
|
2110
2110
|
// move FROM the MRU node, not event-related node (which will be the node that is
|
|
2111
2111
|
// outside the trap causing the focus escape we're trying to fix)
|
|
2112
2112
|
target: r.mostRecentlyFocusedNode,
|
|
2113
2113
|
isBackward: c.isKeyBackward(r.recentNavEvent)
|
|
2114
|
-
})), k(
|
|
2114
|
+
})), k(P || r.mostRecentlyFocusedNode || m());
|
|
2115
2115
|
}
|
|
2116
2116
|
r.recentNavEvent = void 0;
|
|
2117
2117
|
}, ae = function(T) {
|
|
2118
2118
|
var w = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
2119
2119
|
r.recentNavEvent = T;
|
|
2120
|
-
var E =
|
|
2120
|
+
var E = U({
|
|
2121
2121
|
event: T,
|
|
2122
2122
|
isBackward: w
|
|
2123
2123
|
});
|
|
@@ -2128,7 +2128,7 @@ var ml = {
|
|
|
2128
2128
|
return;
|
|
2129
2129
|
}
|
|
2130
2130
|
(c.isKeyForward(T) || c.isKeyBackward(T)) && ae(T, c.isKeyBackward(T));
|
|
2131
|
-
},
|
|
2131
|
+
}, B = function(T) {
|
|
2132
2132
|
var w = Me(T);
|
|
2133
2133
|
i(w, T) >= 0 || Ae(c.clickOutsideDeactivates, T) || Ae(c.allowOutsideClick, T) || (T.preventDefault(), T.stopImmediatePropagation());
|
|
2134
2134
|
}, u = function() {
|
|
@@ -2141,7 +2141,7 @@ var ml = {
|
|
|
2141
2141
|
}), t.addEventListener("touchstart", L, {
|
|
2142
2142
|
capture: !0,
|
|
2143
2143
|
passive: !1
|
|
2144
|
-
}), t.addEventListener("click",
|
|
2144
|
+
}), t.addEventListener("click", B, {
|
|
2145
2145
|
capture: !0,
|
|
2146
2146
|
passive: !1
|
|
2147
2147
|
}), t.addEventListener("keydown", N, {
|
|
@@ -2150,11 +2150,11 @@ var ml = {
|
|
|
2150
2150
|
}), o;
|
|
2151
2151
|
}, p = function() {
|
|
2152
2152
|
if (r.active)
|
|
2153
|
-
return t.removeEventListener("focusin", Z, !0), t.removeEventListener("mousedown", L, !0), t.removeEventListener("touchstart", L, !0), t.removeEventListener("click",
|
|
2153
|
+
return t.removeEventListener("focusin", Z, !0), t.removeEventListener("mousedown", L, !0), t.removeEventListener("touchstart", L, !0), t.removeEventListener("click", B, !0), t.removeEventListener("keydown", N, !0), o;
|
|
2154
2154
|
}, O = function(T) {
|
|
2155
2155
|
var w = T.some(function(E) {
|
|
2156
|
-
var
|
|
2157
|
-
return
|
|
2156
|
+
var P = Array.from(E.removedNodes);
|
|
2157
|
+
return P.some(function(C) {
|
|
2158
2158
|
return C === r.mostRecentlyFocusedNode;
|
|
2159
2159
|
});
|
|
2160
2160
|
});
|
|
@@ -2177,12 +2177,12 @@ var ml = {
|
|
|
2177
2177
|
activate: function(T) {
|
|
2178
2178
|
if (r.active)
|
|
2179
2179
|
return this;
|
|
2180
|
-
var w = s(T, "onActivate"), E = s(T, "onPostActivate"),
|
|
2181
|
-
|
|
2180
|
+
var w = s(T, "onActivate"), E = s(T, "onPostActivate"), P = s(T, "checkCanFocusTrap");
|
|
2181
|
+
P || d(), r.active = !0, r.paused = !1, r.nodeFocusedBeforeActivation = t.activeElement, w == null || w();
|
|
2182
2182
|
var C = function() {
|
|
2183
|
-
|
|
2183
|
+
P && d(), u(), z(), E == null || E();
|
|
2184
2184
|
};
|
|
2185
|
-
return
|
|
2185
|
+
return P ? (P(r.containers.concat()).then(C, C), this) : (C(), this);
|
|
2186
2186
|
},
|
|
2187
2187
|
deactivate: function(T) {
|
|
2188
2188
|
if (!r.active)
|
|
@@ -2193,11 +2193,11 @@ var ml = {
|
|
|
2193
2193
|
checkCanReturnFocus: c.checkCanReturnFocus
|
|
2194
2194
|
}, T);
|
|
2195
2195
|
clearTimeout(r.delayInitialFocusTimer), r.delayInitialFocusTimer = void 0, p(), r.active = !1, r.paused = !1, z(), ml.deactivateTrap(n, o);
|
|
2196
|
-
var E = s(w, "onDeactivate"),
|
|
2196
|
+
var E = s(w, "onDeactivate"), P = s(w, "onPostDeactivate"), C = s(w, "checkCanReturnFocus"), D = s(w, "returnFocus", "returnFocusOnDeactivate");
|
|
2197
2197
|
E == null || E();
|
|
2198
2198
|
var J = function() {
|
|
2199
2199
|
vl(function() {
|
|
2200
|
-
D && k(I(r.nodeFocusedBeforeActivation)),
|
|
2200
|
+
D && k(I(r.nodeFocusedBeforeActivation)), P == null || P();
|
|
2201
2201
|
});
|
|
2202
2202
|
};
|
|
2203
2203
|
return D && C ? (C(I(r.nodeFocusedBeforeActivation)).then(J, J), this) : (J(), this);
|
|
@@ -2221,14 +2221,14 @@ var ml = {
|
|
|
2221
2221
|
}), r.active && d(), z(), this;
|
|
2222
2222
|
}
|
|
2223
2223
|
}, o.updateContainerElements(e), o;
|
|
2224
|
-
}, Ma = Object.defineProperty, Va = Object.defineProperties,
|
|
2224
|
+
}, Ma = Object.defineProperty, Va = Object.defineProperties, Pa = Object.getOwnPropertyDescriptors, Ge = Object.getOwnPropertySymbols, Il = Object.prototype.hasOwnProperty, jl = Object.prototype.propertyIsEnumerable, bl = (a, e, l) => e in a ? Ma(a, e, { enumerable: !0, configurable: !0, writable: !0, value: l }) : a[e] = l, Ua = (a, e) => {
|
|
2225
2225
|
for (var l in e || (e = {}))
|
|
2226
2226
|
Il.call(e, l) && bl(a, l, e[l]);
|
|
2227
2227
|
if (Ge)
|
|
2228
2228
|
for (var l of Ge(e))
|
|
2229
2229
|
jl.call(e, l) && bl(a, l, e[l]);
|
|
2230
2230
|
return a;
|
|
2231
|
-
}, La = (a, e) => Va(a,
|
|
2231
|
+
}, La = (a, e) => Va(a, Pa(e)), Ba = (a, e) => {
|
|
2232
2232
|
var l = {};
|
|
2233
2233
|
for (var t in a)
|
|
2234
2234
|
Il.call(a, t) && e.indexOf(t) < 0 && (l[t] = a[t]);
|
|
@@ -2237,9 +2237,9 @@ var ml = {
|
|
|
2237
2237
|
e.indexOf(t) < 0 && jl.call(a, t) && (l[t] = a[t]);
|
|
2238
2238
|
return l;
|
|
2239
2239
|
};
|
|
2240
|
-
function
|
|
2240
|
+
function _a(a, e = {}) {
|
|
2241
2241
|
let l;
|
|
2242
|
-
const t = e, { immediate: n } = t, c =
|
|
2242
|
+
const t = e, { immediate: n } = t, c = Ba(t, ["immediate"]), r = R(!1), o = R(!1), s = (d) => l && l.activate(d), i = (d) => l && l.deactivate(d), v = () => {
|
|
2243
2243
|
l && (l.pause(), o.value = !0);
|
|
2244
2244
|
}, m = () => {
|
|
2245
2245
|
l && (l.unpause(), o.value = !1);
|
|
@@ -2247,7 +2247,7 @@ function Ba(a, e = {}) {
|
|
|
2247
2247
|
return oe(
|
|
2248
2248
|
() => Zl(a),
|
|
2249
2249
|
(d) => {
|
|
2250
|
-
d && (l = Fa(d, La(
|
|
2250
|
+
d && (l = Fa(d, La(Ua({}, c), {
|
|
2251
2251
|
onActivate() {
|
|
2252
2252
|
r.value = !0, e.onActivate && e.onActivate();
|
|
2253
2253
|
},
|
|
@@ -2276,10 +2276,10 @@ const za = /* @__PURE__ */ h("div", { tabindex: "0" }, null, -1), xa = ["onKeypr
|
|
|
2276
2276
|
headerColour: { default: "white" },
|
|
2277
2277
|
preventClose: { type: Boolean, default: !1 },
|
|
2278
2278
|
size: { default: "medium" },
|
|
2279
|
-
trapFocus: { type: Boolean, default: !
|
|
2279
|
+
trapFocus: { type: Boolean, default: !1 }
|
|
2280
2280
|
},
|
|
2281
2281
|
setup(a) {
|
|
2282
|
-
const e = a, { trapFocus: l } =
|
|
2282
|
+
const e = a, { trapFocus: l } = Bl(e), t = R(!1), n = R(), c = _a(n);
|
|
2283
2283
|
oe([
|
|
2284
2284
|
l,
|
|
2285
2285
|
t
|
|
@@ -2394,7 +2394,7 @@ const za = /* @__PURE__ */ h("div", { tabindex: "0" }, null, -1), xa = ["onKeypr
|
|
|
2394
2394
|
}), Qa = {
|
|
2395
2395
|
key: 0,
|
|
2396
2396
|
class: "cl-w-1/2"
|
|
2397
|
-
}, Wa = { class: "cl-float-right cl-py-1" }, hl = /* @__PURE__ */ Q({
|
|
2397
|
+
}, Wa = { class: "cl-float-right cl-py-1 cl-text-black" }, hl = /* @__PURE__ */ Q({
|
|
2398
2398
|
__name: "cl-ui-combo-box-selectable",
|
|
2399
2399
|
props: {
|
|
2400
2400
|
isCreateNewOption: { type: Boolean, default: !1 },
|
|
@@ -2432,7 +2432,7 @@ const za = /* @__PURE__ */ h("div", { tabindex: "0" }, null, -1), xa = ["onKeypr
|
|
|
2432
2432
|
class: M(["cl-cursor-pointer cl-duration-75 cl-flex cl-p-1 cl-text-left cl-transition-colors", {
|
|
2433
2433
|
"cl-bg-white": c.value === !1,
|
|
2434
2434
|
"cl-bg-link-light cl-text-white cl-opacity-90": c.value && i.isCreateNewOption === !1,
|
|
2435
|
-
"cl-bg-primary-default cl-text-
|
|
2435
|
+
"cl-bg-primary-default cl-text-black cl-opacity-90": c.value && i.isCreateNewOption
|
|
2436
2436
|
}]),
|
|
2437
2437
|
onMousedown: r,
|
|
2438
2438
|
onMousemove: v[0] || (v[0] = (k) => o(!0)),
|
|
@@ -2447,12 +2447,9 @@ const za = /* @__PURE__ */ h("div", { tabindex: "0" }, null, -1), xa = ["onKeypr
|
|
|
2447
2447
|
}, q(t.value), 3),
|
|
2448
2448
|
le(h("div", Wa, [
|
|
2449
2449
|
S(g(x), {
|
|
2450
|
-
class:
|
|
2451
|
-
"cl-text-white": c.value,
|
|
2452
|
-
"cl-text-black ": !c.value
|
|
2453
|
-
}]),
|
|
2450
|
+
class: "cl-transition-colors",
|
|
2454
2451
|
icon: "ph:plus"
|
|
2455
|
-
}
|
|
2452
|
+
})
|
|
2456
2453
|
], 512), [
|
|
2457
2454
|
[te, i.isCreateNewOption]
|
|
2458
2455
|
])
|
|
@@ -2500,7 +2497,7 @@ const za = /* @__PURE__ */ h("div", { tabindex: "0" }, null, -1), xa = ["onKeypr
|
|
|
2500
2497
|
function I(u) {
|
|
2501
2498
|
r.value > u ? r.value-- : r.value = l.results.length - 1, Z();
|
|
2502
2499
|
}
|
|
2503
|
-
function
|
|
2500
|
+
function U() {
|
|
2504
2501
|
r.value >= 0 && l.results !== void 0 ? v(l.results[r.value].id) : r.value === -1 && m();
|
|
2505
2502
|
}
|
|
2506
2503
|
function L(u) {
|
|
@@ -2523,13 +2520,13 @@ const za = /* @__PURE__ */ h("div", { tabindex: "0" }, null, -1), xa = ["onKeypr
|
|
|
2523
2520
|
function N(u) {
|
|
2524
2521
|
r.value = u;
|
|
2525
2522
|
}
|
|
2526
|
-
function
|
|
2523
|
+
function B() {
|
|
2527
2524
|
l.isVisible === !0 && (n.value = "", i(), Fe(() => {
|
|
2528
2525
|
var u, p;
|
|
2529
2526
|
return (p = (u = s.value) == null ? void 0 : u.querySelector("input")) == null ? void 0 : p.focus();
|
|
2530
2527
|
}));
|
|
2531
2528
|
}
|
|
2532
|
-
return oe(() => l.results, () => ae()), oe(() => l.errorMessage, () => ae()), oe(() => l.isVisible, () =>
|
|
2529
|
+
return oe(() => l.results, () => ae()), oe(() => l.errorMessage, () => ae()), oe(() => l.isVisible, () => B()), Ze(() => {
|
|
2533
2530
|
var u;
|
|
2534
2531
|
return (u = s.value) == null ? void 0 : u.addEventListener("keydown", L);
|
|
2535
2532
|
}), al(() => {
|
|
@@ -2545,7 +2542,7 @@ const za = /* @__PURE__ */ h("div", { tabindex: "0" }, null, -1), xa = ["onKeypr
|
|
|
2545
2542
|
p[2] || (p[2] = Ee(ne(($) => I(o.value), ["prevent", "stop"]), ["up"])),
|
|
2546
2543
|
p[3] || (p[3] = Ee(ne(($) => k(o.value), ["prevent", "stop"]), ["down"]))
|
|
2547
2544
|
],
|
|
2548
|
-
onKeyup: Ee(ne(
|
|
2545
|
+
onKeyup: Ee(ne(U, ["prevent", "stop"]), ["enter"])
|
|
2549
2546
|
}, [
|
|
2550
2547
|
h("div", Ja, [
|
|
2551
2548
|
S(me, {
|
|
@@ -2623,7 +2620,8 @@ const za = /* @__PURE__ */ h("div", { tabindex: "0" }, null, -1), xa = ["onKeypr
|
|
|
2623
2620
|
parentResults: { default: () => [] },
|
|
2624
2621
|
currentObject: {},
|
|
2625
2622
|
placeholderText: { default: null },
|
|
2626
|
-
searchHint: { default: null }
|
|
2623
|
+
searchHint: { default: null },
|
|
2624
|
+
skipObjectCreationModal: { type: Boolean, default: !1 }
|
|
2627
2625
|
},
|
|
2628
2626
|
emits: {
|
|
2629
2627
|
focus: null,
|
|
@@ -2637,10 +2635,10 @@ const za = /* @__PURE__ */ h("div", { tabindex: "0" }, null, -1), xa = ["onKeypr
|
|
|
2637
2635
|
const t = a, n = A(() => t.placeholderText ? t.placeholderText : r("comboBox.emptyHintText", { object: t.objectType })), c = A(() => t.searchHint ? t.searchHint : r("comboBox.searchHint", { object: t.objectType })), { t: r } = se(), o = R(!1), s = A({
|
|
2638
2636
|
get: () => t.currentObject,
|
|
2639
2637
|
set: (C) => l("update:current-object", C)
|
|
2640
|
-
}), i = R(null), v = R(null), m = A(() => w()), d = R(""), k = R(""), I = R(),
|
|
2638
|
+
}), i = R(null), v = R(null), m = A(() => w()), d = R(""), k = R(""), I = R(), U = R(!0), L = R(!1);
|
|
2641
2639
|
function Z(C) {
|
|
2642
2640
|
var J, W;
|
|
2643
|
-
const D = ((J =
|
|
2641
|
+
const D = ((J = P.value) == null ? void 0 : J.getBoundingClientRect().top) || 0;
|
|
2644
2642
|
L.value = window.innerHeight - D < 280, t.disabled || (typeof C < "u" ? o.value = C : o.value = !o.value), (W = i.value) == null || W.blur();
|
|
2645
2643
|
}
|
|
2646
2644
|
function ae(C) {
|
|
@@ -2649,7 +2647,7 @@ const za = /* @__PURE__ */ h("div", { tabindex: "0" }, null, -1), xa = ["onKeypr
|
|
|
2649
2647
|
function N(C) {
|
|
2650
2648
|
k.value = C, l("search-parent", C);
|
|
2651
2649
|
}
|
|
2652
|
-
function
|
|
2650
|
+
function B() {
|
|
2653
2651
|
s.value = null, Z(!1);
|
|
2654
2652
|
}
|
|
2655
2653
|
function u(C) {
|
|
@@ -2688,7 +2686,7 @@ const za = /* @__PURE__ */ h("div", { tabindex: "0" }, null, -1), xa = ["onKeypr
|
|
|
2688
2686
|
duration: 1e4
|
|
2689
2687
|
}) : (D = t.objectCreatedResponse) != null && D.id && T();
|
|
2690
2688
|
}
|
|
2691
|
-
function
|
|
2689
|
+
function _() {
|
|
2692
2690
|
var C;
|
|
2693
2691
|
(C = t.parentObjectCreatedResponse) != null && C.id && (v.value = {
|
|
2694
2692
|
id: t.parentObjectCreatedResponse.id,
|
|
@@ -2716,20 +2714,20 @@ const za = /* @__PURE__ */ h("div", { tabindex: "0" }, null, -1), xa = ["onKeypr
|
|
|
2716
2714
|
}
|
|
2717
2715
|
function E() {
|
|
2718
2716
|
let C = !0;
|
|
2719
|
-
d.value === "" && (C = !1), t.objectParentType !== "" && v.value === null && (C = !1),
|
|
2717
|
+
d.value === "" && (C = !1), t.objectParentType !== "" && v.value === null && (C = !1), U.value = C;
|
|
2720
2718
|
}
|
|
2721
|
-
oe(() => t.objectCreatedResponse, () => z()), oe(() => t.parentObjectCreatedResponse, () =>
|
|
2719
|
+
oe(() => t.objectCreatedResponse, () => z()), oe(() => t.parentObjectCreatedResponse, () => _()), oe(() => d.value, () => E()), oe(() => v.value, () => E()), e({
|
|
2722
2720
|
focus() {
|
|
2723
2721
|
var C;
|
|
2724
2722
|
(C = i.value) == null || C.focus();
|
|
2725
2723
|
}
|
|
2726
2724
|
});
|
|
2727
|
-
const
|
|
2728
|
-
return nl(
|
|
2725
|
+
const P = R();
|
|
2726
|
+
return nl(P, () => o.value ? Z(!1) : ""), (C, D) => {
|
|
2729
2727
|
const J = tl("cl-ui-combo-box", !0);
|
|
2730
2728
|
return f(), y("div", {
|
|
2731
2729
|
ref_key: "outsideRef",
|
|
2732
|
-
ref:
|
|
2730
|
+
ref: P,
|
|
2733
2731
|
class: "cl-relative"
|
|
2734
2732
|
}, [
|
|
2735
2733
|
h("div", lo, [
|
|
@@ -2768,7 +2766,7 @@ const za = /* @__PURE__ */ h("div", { tabindex: "0" }, null, -1), xa = ["onKeypr
|
|
|
2768
2766
|
}, [
|
|
2769
2767
|
S(g(x), {
|
|
2770
2768
|
icon: "ph:caret-up-bold",
|
|
2771
|
-
class: "cl-ml-[
|
|
2769
|
+
class: "cl-ml-[4px] cl-mt-[12px]"
|
|
2772
2770
|
})
|
|
2773
2771
|
], 2)) : (f(), y("div", {
|
|
2774
2772
|
key: 0,
|
|
@@ -2780,7 +2778,7 @@ const za = /* @__PURE__ */ h("div", { tabindex: "0" }, null, -1), xa = ["onKeypr
|
|
|
2780
2778
|
}, [
|
|
2781
2779
|
S(g(x), {
|
|
2782
2780
|
icon: "ph:caret-down-bold",
|
|
2783
|
-
class: "cl-ml-[
|
|
2781
|
+
class: "cl-ml-[4px] cl-mt-[12px]"
|
|
2784
2782
|
})
|
|
2785
2783
|
], 2))
|
|
2786
2784
|
]),
|
|
@@ -2803,9 +2801,9 @@ const za = /* @__PURE__ */ h("div", { tabindex: "0" }, null, -1), xa = ["onKeypr
|
|
|
2803
2801
|
"cl-bottom-full": L.value
|
|
2804
2802
|
}),
|
|
2805
2803
|
"search-hint": c.value,
|
|
2806
|
-
onCreateObject: W,
|
|
2804
|
+
onCreateObject: () => C.objectParentType === "" && C.skipObjectCreationModal === !0 ? O() : W(),
|
|
2807
2805
|
onSelectObject: u,
|
|
2808
|
-
onClearObject:
|
|
2806
|
+
onClearObject: B,
|
|
2809
2807
|
onSearch: ae,
|
|
2810
2808
|
onHideDropdown: D[4] || (D[4] = (b) => Z(!1))
|
|
2811
2809
|
}, null, 8, ["can-create-new-object", "can-clear-selected-object", "loading", "results", "object-type", "object-parent-type", "error-message", "current-object-name", "is-visible", "class", "search-hint", "onCreateObject"]), [
|
|
@@ -2828,7 +2826,7 @@ const za = /* @__PURE__ */ h("div", { tabindex: "0" }, null, -1), xa = ["onKeypr
|
|
|
2828
2826
|
S(ke, {
|
|
2829
2827
|
colour: "primary",
|
|
2830
2828
|
size: "small",
|
|
2831
|
-
disabled: !
|
|
2829
|
+
disabled: !U.value,
|
|
2832
2830
|
onClick: (b) => {
|
|
2833
2831
|
O(), W();
|
|
2834
2832
|
}
|
|
@@ -2901,7 +2899,7 @@ function go(a, e) {
|
|
|
2901
2899
|
]);
|
|
2902
2900
|
}
|
|
2903
2901
|
const bo = /* @__PURE__ */ we(co, [["render", go]]);
|
|
2904
|
-
function
|
|
2902
|
+
function Pe(a) {
|
|
2905
2903
|
const e = a.type !== "slot" || a.slotType !== void 0 && a.field !== void 0, l = a.sortable ?? !0;
|
|
2906
2904
|
return e && l;
|
|
2907
2905
|
}
|
|
@@ -2910,7 +2908,7 @@ function rl(a) {
|
|
|
2910
2908
|
return e && l;
|
|
2911
2909
|
}
|
|
2912
2910
|
function ho(a) {
|
|
2913
|
-
return a.some((e) =>
|
|
2911
|
+
return a.some((e) => Pe(e));
|
|
2914
2912
|
}
|
|
2915
2913
|
function yl(a) {
|
|
2916
2914
|
return a.some((e) => rl(e));
|
|
@@ -3086,7 +3084,7 @@ const yo = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, wo = { class: "cl-gap-1
|
|
|
3086
3084
|
name: t(s.translationKey)
|
|
3087
3085
|
}))) ?? [];
|
|
3088
3086
|
});
|
|
3089
|
-
return
|
|
3087
|
+
return _l(() => n.value = ge(l.data)), oe(n, (o) => {
|
|
3090
3088
|
const s = l.column.field ?? "";
|
|
3091
3089
|
s !== "" && (o[s] !== l.data[s] ? e("edit", o[s]) : e("undo"));
|
|
3092
3090
|
}, {
|
|
@@ -3169,7 +3167,7 @@ const yo = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, wo = { class: "cl-gap-1
|
|
|
3169
3167
|
}), Io = { key: 1 }, jo = ["colspan"], Fo = { class: "cl-flex cl-flex-wrap cl-justify-center cl-text-center cl-text-sm cl-w-full" }, Mo = { class: "cl-mt-6 cl-w-full" }, Vo = {
|
|
3170
3168
|
key: 0,
|
|
3171
3169
|
class: "cl-mt-4"
|
|
3172
|
-
},
|
|
3170
|
+
}, Po = { class: "cl-mb-2 cl-w-full" }, Uo = /* @__PURE__ */ Q({
|
|
3173
3171
|
__name: "cl-ui-grid-body",
|
|
3174
3172
|
props: {
|
|
3175
3173
|
columns: {},
|
|
@@ -3207,13 +3205,13 @@ const yo = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, wo = { class: "cl-gap-1
|
|
|
3207
3205
|
const i = R({});
|
|
3208
3206
|
oe(() => l.data, () => {
|
|
3209
3207
|
var d, k;
|
|
3210
|
-
return i.value = Object.fromEntries(((k = (d = l.data) == null ? void 0 : d.results) == null ? void 0 : k.map((I,
|
|
3211
|
-
[
|
|
3208
|
+
return i.value = Object.fromEntries(((k = (d = l.data) == null ? void 0 : d.results) == null ? void 0 : k.map((I, U) => [
|
|
3209
|
+
[U],
|
|
3212
3210
|
{
|
|
3213
3211
|
count: 0,
|
|
3214
3212
|
target: null,
|
|
3215
3213
|
reset: Tl(() => {
|
|
3216
|
-
i.value[
|
|
3214
|
+
i.value[U] && (i.value[U].count = 0, i.value[U].target = null);
|
|
3217
3215
|
}, 2500, { immediate: !1 })
|
|
3218
3216
|
}
|
|
3219
3217
|
])) ?? []);
|
|
@@ -3222,8 +3220,8 @@ const yo = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, wo = { class: "cl-gap-1
|
|
|
3222
3220
|
immediate: !0
|
|
3223
3221
|
});
|
|
3224
3222
|
function v(d, k, I) {
|
|
3225
|
-
const { currentTarget:
|
|
3226
|
-
l.options.rowSelectionEnabled ? (m(
|
|
3223
|
+
const { currentTarget: U } = I;
|
|
3224
|
+
l.options.rowSelectionEnabled ? (m(U), e("row-select", k)) : (i.value[d].count++, i.value[d].target = U, i.value[d].count > 1 ? (i.value[d].reset.stop(), i.value[d].count = 0, m(U), i.value[d].target = null, e("row-select", k)) : i.value[d].reset.start());
|
|
3227
3225
|
}
|
|
3228
3226
|
function m(d) {
|
|
3229
3227
|
l.options.highlightRowSelection && (d == null || d.classList.toggle("!cl-bg-link-lighter"));
|
|
@@ -3233,9 +3231,9 @@ const yo = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, wo = { class: "cl-gap-1
|
|
|
3233
3231
|
}), (d, k) => {
|
|
3234
3232
|
var I;
|
|
3235
3233
|
return f(), y("tbody", null, [
|
|
3236
|
-
d.data && ((I = d.data.results) != null && I.length) ? (f(!0), y(X, { key: 0 }, re(d.data.results, (
|
|
3234
|
+
d.data && ((I = d.data.results) != null && I.length) ? (f(!0), y(X, { key: 0 }, re(d.data.results, (U, L) => (f(), G(Ro, {
|
|
3237
3235
|
key: L,
|
|
3238
|
-
data:
|
|
3236
|
+
data: U,
|
|
3239
3237
|
columns: d.columns,
|
|
3240
3238
|
"time-zone": d.timeZone,
|
|
3241
3239
|
"search-value": d.searchValue,
|
|
@@ -3246,7 +3244,7 @@ const yo = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, wo = { class: "cl-gap-1
|
|
|
3246
3244
|
"cl-cursor-pointer hover:cl-bg-link-lighter": d.options.rowSelectionEnabled && d.options.highlightRowSelection && !d.editMode
|
|
3247
3245
|
}]),
|
|
3248
3246
|
onClick: (Z) => {
|
|
3249
|
-
d.editMode || v(L,
|
|
3247
|
+
d.editMode || v(L, U, Z);
|
|
3250
3248
|
},
|
|
3251
3249
|
onCellFocus: (Z) => {
|
|
3252
3250
|
r(L);
|
|
@@ -3268,12 +3266,12 @@ const yo = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, wo = { class: "cl-gap-1
|
|
|
3268
3266
|
}, [
|
|
3269
3267
|
h("div", Fo, [
|
|
3270
3268
|
h("strong", Mo, q(g(t)("grid.noData")), 1),
|
|
3271
|
-
d.request.filters.some((
|
|
3272
|
-
h("div",
|
|
3269
|
+
d.request.filters.some((U) => U.filterValue !== "") ? (f(), y("div", Vo, [
|
|
3270
|
+
h("div", Po, q(g(t)("grid.noDataFiltersPresent")), 1),
|
|
3273
3271
|
S(ke, {
|
|
3274
3272
|
size: "small",
|
|
3275
3273
|
colour: "danger",
|
|
3276
|
-
onClick: k[0] || (k[0] = ne((
|
|
3274
|
+
onClick: k[0] || (k[0] = ne((U) => d.$emit("clear-filters"), ["prevent"]))
|
|
3277
3275
|
}, {
|
|
3278
3276
|
default: Y(() => [
|
|
3279
3277
|
de(q(g(t)("grid.clearFilters")), 1)
|
|
@@ -3290,7 +3288,7 @@ const yo = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, wo = { class: "cl-gap-1
|
|
|
3290
3288
|
}), Lo = {
|
|
3291
3289
|
key: 0,
|
|
3292
3290
|
class: "cl-flex cl-flex-wrap cl-justify-end cl-mt-2 cl-w-full"
|
|
3293
|
-
},
|
|
3291
|
+
}, Bo = { class: "cl-bg-off-white cl-border cl-border-grey-1 cl-flex cl-items-center cl-mb-2 cl-px-3 cl-rounded-lg cl-shadow-md cl-text-sm cl-w-full lg:cl-w-auto" }, _o = { class: "cl-text-grey-3 cl-w-max" }, zo = { class: "cl-bg-off-white cl-border cl-border-grey-1 cl-flex cl-flex-wrap cl-items-center cl-mb-2 cl-px-3 cl-py-2 cl-rounded-lg cl-shadow-md cl-text-sm cl-w-full lg:cl-ml-2 lg:cl-w-auto mb:cl-flex-nowrap" }, xo = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-text-sm cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, Ho = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, Go = { class: "cl-text-grey-3 cl-w-full lg:cl-mr-2 lg:cl-w-auto" }, Zo = { class: "cl-flex cl-flex-wrap cl-text-sm mb:cl-flex-nowrap" }, Ko = { class: "cl-pr-2" }, Qo = ["onClick"], Wo = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-text-sm cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, Yo = { class: "cl-mb-2 cl-text-grey-3 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, Jo = ["onClick"], Xo = { class: "cl-mb-2 cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, en = { class: "cl-block cl-mb-2 cl-text-grey-3 cl-w-full lg:cl-inline-block lg:cl-mb-0 lg:cl-mr-1 lg:cl-w-auto" }, ln = { class: "cl-block lg:cl-inline-block" }, tn = /* @__PURE__ */ Q({
|
|
3294
3292
|
__name: "cl-ui-grid-footer",
|
|
3295
3293
|
props: {
|
|
3296
3294
|
request: {},
|
|
@@ -3335,10 +3333,10 @@ const yo = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, wo = { class: "cl-gap-1
|
|
|
3335
3333
|
}
|
|
3336
3334
|
const m = $l(s, 750);
|
|
3337
3335
|
return (d, k) => {
|
|
3338
|
-
var I,
|
|
3339
|
-
return (
|
|
3340
|
-
h("div",
|
|
3341
|
-
h("span",
|
|
3336
|
+
var I, U;
|
|
3337
|
+
return (U = (I = d.data) == null ? void 0 : I.results) != null && U.length && d.request ? (f(), y("div", Lo, [
|
|
3338
|
+
h("div", Bo, [
|
|
3339
|
+
h("span", _o, q(g(n)("grid.jumpToPage")), 1),
|
|
3342
3340
|
S(me, {
|
|
3343
3341
|
"model-value": d.request.pageNumber,
|
|
3344
3342
|
class: "cl-ml-1 cl-mt-0.5 cl-text-sm",
|
|
@@ -3715,37 +3713,37 @@ const fn = {
|
|
|
3715
3713
|
set: (p) => e("update:filter", p)
|
|
3716
3714
|
}), o = A(() => l.column.type === "date" || l.column.type === "datetime" || l.column.type === "slot" && (l.column.slotType === "date" || l.column.slotType === "datetime")), s = A(() => l.column.type === "dateRange" || l.column.type === "slot" && l.column.slotType === "dateRange"), i = A(() => l.column.type === "list" || l.column.type === "slot" && l.column.slotType === "list"), v = A(() => i.value && l.column.listType === "number"), m = A({
|
|
3717
3715
|
get() {
|
|
3718
|
-
var O, $, z,
|
|
3716
|
+
var O, $, z, _, T, w, E;
|
|
3719
3717
|
let p = (O = r.value) == null ? void 0 : O[0];
|
|
3720
3718
|
if (p) {
|
|
3721
3719
|
if (o.value) {
|
|
3722
3720
|
if (((($ = l.filter) == null ? void 0 : $.length) ?? 0) > 1) {
|
|
3723
|
-
const
|
|
3724
|
-
|
|
3721
|
+
const P = (z = r.value) == null ? void 0 : z.find((D) => D.filterOperation === ee.EQUAL_OR_GREATER_THAN), C = (_ = r.value) == null ? void 0 : _.find((D) => D.filterOperation === ee.LESS_THAN);
|
|
3722
|
+
P && C && (p = {
|
|
3725
3723
|
filterOnColumn: l.column.field,
|
|
3726
3724
|
filterOperation: ee.EQUAL,
|
|
3727
3725
|
filterMethod: "equal",
|
|
3728
|
-
filterValue:
|
|
3726
|
+
filterValue: P.filterValue
|
|
3729
3727
|
});
|
|
3730
3728
|
} else if (p.filterOperation === ee.EQUAL_OR_LESS_THAN || p.filterOperation === ee.GREATER_THAN) {
|
|
3731
|
-
let
|
|
3729
|
+
let P = H.fromISO(p.filterValue, {
|
|
3732
3730
|
zone: l.timeZone ?? "UTC"
|
|
3733
3731
|
});
|
|
3734
|
-
l.column.type === "date" || l.column.type === "slot" && l.column.slotType === "date" ?
|
|
3732
|
+
l.column.type === "date" || l.column.type === "slot" && l.column.slotType === "date" ? P = P.minus({ days: 1 }) : P = P.minus({ minutes: 1 }), p = {
|
|
3735
3733
|
filterOnColumn: l.column.field,
|
|
3736
3734
|
filterOperation: p.filterOperation,
|
|
3737
3735
|
filterMethod: p.filterOperation === ee.EQUAL_OR_LESS_THAN ? "equalorlessthan" : "greaterthan",
|
|
3738
|
-
filterValue:
|
|
3736
|
+
filterValue: P.plus({ milliseconds: 1 }).toISO() ?? ""
|
|
3739
3737
|
};
|
|
3740
3738
|
}
|
|
3741
3739
|
} else if (s.value && (((T = l.filter) == null ? void 0 : T.length) ?? 0) > 1) {
|
|
3742
|
-
const
|
|
3743
|
-
|
|
3740
|
+
const P = (w = r.value) == null ? void 0 : w.find((D) => D.filterOperation === ee.EQUAL_OR_GREATER_THAN), C = (E = r.value) == null ? void 0 : E.find((D) => D.filterOperation === ee.EQUAL_OR_LESS_THAN);
|
|
3741
|
+
P && C && (p = {
|
|
3744
3742
|
filterOnColumn: l.column.field,
|
|
3745
3743
|
filterOperation: ee.EQUAL,
|
|
3746
3744
|
filterMethod: "equal",
|
|
3747
3745
|
filterValue: {
|
|
3748
|
-
start:
|
|
3746
|
+
start: P.filterValue,
|
|
3749
3747
|
end: C.filterValue
|
|
3750
3748
|
}
|
|
3751
3749
|
});
|
|
@@ -3756,14 +3754,14 @@ const fn = {
|
|
|
3756
3754
|
set(p) {
|
|
3757
3755
|
let O = null;
|
|
3758
3756
|
if (o.value) {
|
|
3759
|
-
const $ = p, z = ($ == null ? void 0 : $.filterMethod) && k($.filterMethod, $.filterValue, "equal"),
|
|
3757
|
+
const $ = p, z = ($ == null ? void 0 : $.filterMethod) && k($.filterMethod, $.filterValue, "equal"), _ = ($ == null ? void 0 : $.filterMethod) && k($.filterMethod, $.filterValue, "equalorlessthan"), T = ($ == null ? void 0 : $.filterMethod) && k($.filterMethod, $.filterValue, "greaterthan");
|
|
3760
3758
|
if (z) {
|
|
3761
3759
|
let w = H.fromISO($.filterValue, {
|
|
3762
3760
|
zone: l.timeZone ?? "UTC"
|
|
3763
3761
|
}).set({ second: 0, millisecond: 0 });
|
|
3764
3762
|
const E = w.toISO();
|
|
3765
3763
|
l.column.type === "date" || l.column.type === "slot" && l.column.slotType === "date" ? w = w.plus({ days: 1 }) : w = w.plus({ minutes: 1 });
|
|
3766
|
-
const
|
|
3764
|
+
const P = w.toISO();
|
|
3767
3765
|
O = [
|
|
3768
3766
|
{
|
|
3769
3767
|
filterOnColumn: l.column.field,
|
|
@@ -3775,18 +3773,18 @@ const fn = {
|
|
|
3775
3773
|
filterOnColumn: l.column.field,
|
|
3776
3774
|
filterOperation: ee.LESS_THAN,
|
|
3777
3775
|
filterMethod: "lessthan",
|
|
3778
|
-
filterValue:
|
|
3776
|
+
filterValue: P
|
|
3779
3777
|
}
|
|
3780
3778
|
];
|
|
3781
|
-
} else if (
|
|
3779
|
+
} else if (_ || T) {
|
|
3782
3780
|
let w = H.fromISO($.filterValue, {
|
|
3783
3781
|
zone: l.timeZone ?? "UTC"
|
|
3784
3782
|
}).set({ second: 0, millisecond: 0 });
|
|
3785
3783
|
l.column.type === "date" || l.column.type === "slot" && l.column.slotType === "date" ? w = w.plus({ days: 1 }) : w = w.plus({ minutes: 1 }), O = [
|
|
3786
3784
|
{
|
|
3787
3785
|
filterOnColumn: l.column.field,
|
|
3788
|
-
filterOperation:
|
|
3789
|
-
filterMethod:
|
|
3786
|
+
filterOperation: _ ? ee.EQUAL_OR_LESS_THAN : ee.GREATER_THAN,
|
|
3787
|
+
filterMethod: _ ? "equalorlessthan" : "greaterthan",
|
|
3790
3788
|
filterValue: w.minus({ milliseconds: 1 }).toISO()
|
|
3791
3789
|
}
|
|
3792
3790
|
];
|
|
@@ -3794,7 +3792,7 @@ const fn = {
|
|
|
3794
3792
|
} else if (s.value && (p != null && p.filterValue)) {
|
|
3795
3793
|
const $ = p.filterValue, z = H.fromISO($.start, {
|
|
3796
3794
|
zone: l.timeZone ?? "UTC"
|
|
3797
|
-
}).toISO(),
|
|
3795
|
+
}).toISO(), _ = H.fromISO($.end, {
|
|
3798
3796
|
zone: l.timeZone ?? "UTC"
|
|
3799
3797
|
}).toISO();
|
|
3800
3798
|
O = [
|
|
@@ -3808,7 +3806,7 @@ const fn = {
|
|
|
3808
3806
|
filterOnColumn: l.column.field,
|
|
3809
3807
|
filterOperation: ee.EQUAL_OR_LESS_THAN,
|
|
3810
3808
|
filterMethod: "equalorlessthan",
|
|
3811
|
-
filterValue:
|
|
3809
|
+
filterValue: _
|
|
3812
3810
|
}
|
|
3813
3811
|
];
|
|
3814
3812
|
}
|
|
@@ -3833,26 +3831,26 @@ const fn = {
|
|
|
3833
3831
|
const I = A(() => {
|
|
3834
3832
|
var p;
|
|
3835
3833
|
return ((p = m.value) == null ? void 0 : p.filterValue) ?? "";
|
|
3836
|
-
}),
|
|
3834
|
+
}), U = A(() => I.value === "" ? null : I.value), L = A(() => I.value === "" ? null : I.value), Z = A(() => Intl.NumberFormat(t.value).format(1.1).replace(/[0-9]+/g, "")), ae = A(() => rl(l.column));
|
|
3837
3835
|
function N(p, O) {
|
|
3838
3836
|
var T;
|
|
3839
3837
|
let $, z = !1;
|
|
3840
|
-
const
|
|
3838
|
+
const _ = ((p == null ? void 0 : p.value) ?? O).trim();
|
|
3841
3839
|
if (m.value)
|
|
3842
|
-
z = ((T = m.value) == null ? void 0 : T.filterValue) ===
|
|
3843
|
-
else if (
|
|
3840
|
+
z = ((T = m.value) == null ? void 0 : T.filterValue) === _, $ = ge(d.value), $.filterValue = _;
|
|
3841
|
+
else if (_ !== "" && typeof l.column.field < "u") {
|
|
3844
3842
|
const w = c();
|
|
3845
3843
|
$ = {
|
|
3846
3844
|
filterOnColumn: l.column.field,
|
|
3847
3845
|
filterMethod: ee[w].replace("_", "").toLowerCase(),
|
|
3848
3846
|
filterOperation: w,
|
|
3849
|
-
filterValue:
|
|
3847
|
+
filterValue: _
|
|
3850
3848
|
};
|
|
3851
3849
|
} else
|
|
3852
3850
|
return;
|
|
3853
3851
|
z === !1 && (m.value = $);
|
|
3854
3852
|
}
|
|
3855
|
-
function
|
|
3853
|
+
function B(p, O) {
|
|
3856
3854
|
let $, z = (p == null ? void 0 : p.value) ?? O ?? 0;
|
|
3857
3855
|
l.column.format === ue.INTEGER ? (typeof z == "string" && (z = parseInt(z)), $ = Math.round(z)) : (typeof z == "string" && (z = parseFloat(z.replace(Z.value, "."))), $ = z), N(null, isNaN($) ? "" : $.toString());
|
|
3858
3856
|
}
|
|
@@ -3862,11 +3860,11 @@ const fn = {
|
|
|
3862
3860
|
if (m.value)
|
|
3863
3861
|
$ = ((z = m.value) == null ? void 0 : z.filterValue) === p, O = ge(m.value), O.filterValue = p ?? "";
|
|
3864
3862
|
else if (p !== null && typeof l.column.field < "u") {
|
|
3865
|
-
const
|
|
3863
|
+
const _ = c();
|
|
3866
3864
|
O = {
|
|
3867
3865
|
filterOnColumn: l.column.field,
|
|
3868
|
-
filterMethod: ee[
|
|
3869
|
-
filterOperation:
|
|
3866
|
+
filterMethod: ee[_].replace("_", "").toLowerCase(),
|
|
3867
|
+
filterOperation: _,
|
|
3870
3868
|
filterValue: p
|
|
3871
3869
|
};
|
|
3872
3870
|
} else
|
|
@@ -3890,7 +3888,7 @@ const fn = {
|
|
|
3890
3888
|
}, q(g(n)("grid.false")), 9, $n)
|
|
3891
3889
|
], 32)) : o.value ? (f(), G(me, {
|
|
3892
3890
|
key: 1,
|
|
3893
|
-
"model-value":
|
|
3891
|
+
"model-value": U.value,
|
|
3894
3892
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
3895
3893
|
label: p.column.caption,
|
|
3896
3894
|
"show-label": !1,
|
|
@@ -3911,7 +3909,7 @@ const fn = {
|
|
|
3911
3909
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
3912
3910
|
"input-type": "number",
|
|
3913
3911
|
"show-arrows": !1,
|
|
3914
|
-
onInput: O[3] || (O[3] = ($, z) =>
|
|
3912
|
+
onInput: O[3] || (O[3] = ($, z) => B(null, z))
|
|
3915
3913
|
}, null, 8, ["model-value"])) : p.column.type === "string" || p.column.type === "slot" && p.column.slotType === "string" ? (f(), G(me, {
|
|
3916
3914
|
key: 4,
|
|
3917
3915
|
"model-value": I.value,
|
|
@@ -3921,7 +3919,7 @@ const fn = {
|
|
|
3921
3919
|
}, null, 8, ["model-value"])) : i.value ? (f(), y("select", {
|
|
3922
3920
|
key: 5,
|
|
3923
3921
|
class: "!cl-h-[2rem] cl-bg-white cl-border-none cl-mb-0 cl-rounded-md cl-w-full",
|
|
3924
|
-
onChange: O[5] || (O[5] = ($) => v.value ?
|
|
3922
|
+
onChange: O[5] || (O[5] = ($) => v.value ? B($.target) : N($.target))
|
|
3925
3923
|
}, [
|
|
3926
3924
|
Cn,
|
|
3927
3925
|
(f(!0), y(X, null, re(p.column.listEntries ?? [], ($) => (f(), y("option", {
|
|
@@ -3983,9 +3981,9 @@ const fn = {
|
|
|
3983
3981
|
(f(!0), y(X, null, re(s.columns, (v, m) => (f(), y("th", {
|
|
3984
3982
|
key: m,
|
|
3985
3983
|
class: M(["cl-text-grey-3 cl-text-sm", {
|
|
3986
|
-
"cl-cursor-pointer": g(
|
|
3984
|
+
"cl-cursor-pointer": g(Pe)(v)
|
|
3987
3985
|
}]),
|
|
3988
|
-
onClick: (d) => g(
|
|
3986
|
+
onClick: (d) => g(Pe)(v) ? r(v.field) : () => {
|
|
3989
3987
|
}
|
|
3990
3988
|
}, [
|
|
3991
3989
|
de(q(v.caption) + " ", 1),
|
|
@@ -4023,7 +4021,7 @@ const fn = {
|
|
|
4023
4021
|
}])
|
|
4024
4022
|
}, [
|
|
4025
4023
|
h("div", Dn, q(v.caption), 1),
|
|
4026
|
-
g(
|
|
4024
|
+
g(Pe)(v) ? (f(), y("div", {
|
|
4027
4025
|
key: 0,
|
|
4028
4026
|
class: "cl-col-span-2 cl-gap-1 cl-span lg:cl-hidden",
|
|
4029
4027
|
onClick: (d) => r(v.field)
|
|
@@ -4108,7 +4106,7 @@ const fn = {
|
|
|
4108
4106
|
]);
|
|
4109
4107
|
};
|
|
4110
4108
|
}
|
|
4111
|
-
}), Vn = { class: "cl-fixed cl-flex cl-h-full cl-justify-end cl-right-0 cl-shadow-lg cl-top-0 cl-z-40" },
|
|
4109
|
+
}), Vn = { class: "cl-fixed cl-flex cl-h-full cl-justify-end cl-right-0 cl-shadow-lg cl-top-0 cl-z-40" }, Pn = { class: "cl-bg-secondary-default cl-h-full cl-overflow-y-auto cl-overscroll-y-none cl-px-10 cl-py-20 cl-relative cl-text-grey-2 cl-w-80" }, Un = { class: "cl-mb-4 cl-text-2xl cl-text-off-white" }, Ln = { class: "cl-border-grey-3 cl-border-t cl-flex cl-flex-wrap cl-text-sm cl-w-full" }, Bn = { class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full" }, _n = { class: "cl-flex-1 cl-py-2" }, zn = { class: "cl-py-2 cl-w-1/4" }, xn = { class: "cl-py-2 cl-w-1/5" }, Hn = { class: "cl-flex-1 cl-py-2" }, Gn = { class: "cl-py-2 cl-w-1/4" }, Zn = { class: "cl-py-2 cl-text-off-white cl-w-1/5" }, Kn = { key: 1 }, Qn = /* @__PURE__ */ Q({
|
|
4112
4110
|
inheritAttrs: !1,
|
|
4113
4111
|
__name: "cl-ui-grid-view-manager",
|
|
4114
4112
|
props: {
|
|
@@ -4143,17 +4141,17 @@ const fn = {
|
|
|
4143
4141
|
S(Te, { name: "slide-left" }, {
|
|
4144
4142
|
default: Y(() => [
|
|
4145
4143
|
le(h("div", Vn, [
|
|
4146
|
-
h("div",
|
|
4144
|
+
h("div", Pn, [
|
|
4147
4145
|
S(g(x), {
|
|
4148
4146
|
class: "cl-absolute cl-cursor-pointer cl-right-3 cl-text-off-white cl-top-3",
|
|
4149
4147
|
icon: "ph:x",
|
|
4150
4148
|
size: 16,
|
|
4151
4149
|
onClick: i[1] || (i[1] = (v) => n.value = !1)
|
|
4152
4150
|
}),
|
|
4153
|
-
h("h3",
|
|
4151
|
+
h("h3", Un, q(g(t)("grid.manageView")), 1),
|
|
4154
4152
|
h("ul", Ln, [
|
|
4155
|
-
h("li",
|
|
4156
|
-
h("strong",
|
|
4153
|
+
h("li", Bn, [
|
|
4154
|
+
h("strong", _n, q(g(t)("grid.column")), 1),
|
|
4157
4155
|
h("strong", zn, q(g(t)("grid.visible")), 1),
|
|
4158
4156
|
h("strong", xn, q(g(t)("grid.order")), 1)
|
|
4159
4157
|
]),
|
|
@@ -4217,9 +4215,9 @@ const fn = {
|
|
|
4217
4215
|
}), n = A(() => t.value.filter((N) => N.visible ?? !0)), c = R({});
|
|
4218
4216
|
function r() {
|
|
4219
4217
|
const N = {};
|
|
4220
|
-
window.innerWidth >= 1024 && t.value.forEach((
|
|
4221
|
-
const u =
|
|
4222
|
-
N[`${
|
|
4218
|
+
window.innerWidth >= 1024 && t.value.forEach((B) => {
|
|
4219
|
+
const u = B.width ? `${B.width}px` : "";
|
|
4220
|
+
N[`${B.name}`] = `width: ${u}; min-width: ${u};`;
|
|
4223
4221
|
}), c.value = N;
|
|
4224
4222
|
}
|
|
4225
4223
|
function o(N) {
|
|
@@ -4246,29 +4244,29 @@ const fn = {
|
|
|
4246
4244
|
const I = A(() => ({
|
|
4247
4245
|
highlightRowSelection: !0,
|
|
4248
4246
|
...l.options
|
|
4249
|
-
})),
|
|
4247
|
+
})), U = A({
|
|
4250
4248
|
get() {
|
|
4251
4249
|
const N = ge(s.value);
|
|
4252
|
-
return N.filters = N.filters.filter((
|
|
4250
|
+
return N.filters = N.filters.filter((B) => B.filterMethod !== "andcontains" && B.filterOperation !== ee.AND_CONTAINS), N;
|
|
4253
4251
|
},
|
|
4254
4252
|
set(N) {
|
|
4255
|
-
const
|
|
4253
|
+
const B = [
|
|
4256
4254
|
...N.filters,
|
|
4257
4255
|
...s.value.filters.filter((u) => u.filterMethod === "andcontains" || u.filterOperation === ee.AND_CONTAINS)
|
|
4258
4256
|
];
|
|
4259
4257
|
s.value = {
|
|
4260
4258
|
...N,
|
|
4261
|
-
filters:
|
|
4259
|
+
filters: B
|
|
4262
4260
|
};
|
|
4263
4261
|
}
|
|
4264
4262
|
}), L = R(((ae = l.request.filters.find((N) => N.filterMethod === "andcontains" || N.filterOperation === ee.AND_CONTAINS)) == null ? void 0 : ae.filterValue) ?? ""), Z = A(() => l.columns.filter((N) => (N.type === "string" || N.type === "slot" && N.slotType === "string") && N.searchable));
|
|
4265
|
-
return (N,
|
|
4263
|
+
return (N, B) => (f(), y("div", Wn, [
|
|
4266
4264
|
Z.value.length > 0 ? (f(), G(Mn, {
|
|
4267
4265
|
key: 0,
|
|
4268
4266
|
"search-value": L.value,
|
|
4269
|
-
"onUpdate:searchValue":
|
|
4267
|
+
"onUpdate:searchValue": B[0] || (B[0] = (u) => L.value = u),
|
|
4270
4268
|
request: s.value,
|
|
4271
|
-
"onUpdate:request":
|
|
4269
|
+
"onUpdate:request": B[1] || (B[1] = (u) => s.value = u),
|
|
4272
4270
|
columns: Z.value,
|
|
4273
4271
|
loading: N.loading
|
|
4274
4272
|
}, {
|
|
@@ -4289,9 +4287,9 @@ const fn = {
|
|
|
4289
4287
|
}),
|
|
4290
4288
|
S(Oo, {
|
|
4291
4289
|
"edit-mode": d.value,
|
|
4292
|
-
"onUpdate:editMode":
|
|
4290
|
+
"onUpdate:editMode": B[3] || (B[3] = (u) => d.value = u),
|
|
4293
4291
|
"filter-panel-open": k.value,
|
|
4294
|
-
"onUpdate:filterPanelOpen":
|
|
4292
|
+
"onUpdate:filterPanelOpen": B[4] || (B[4] = (u) => k.value = u),
|
|
4295
4293
|
columns: N.columns,
|
|
4296
4294
|
options: I.value,
|
|
4297
4295
|
request: s.value,
|
|
@@ -4304,7 +4302,7 @@ const fn = {
|
|
|
4304
4302
|
"view-manager": Y(() => [
|
|
4305
4303
|
S(Qn, {
|
|
4306
4304
|
columns: t.value,
|
|
4307
|
-
"onUpdate:columns":
|
|
4305
|
+
"onUpdate:columns": B[2] || (B[2] = (u) => t.value = u)
|
|
4308
4306
|
}, null, 8, ["columns"])
|
|
4309
4307
|
]),
|
|
4310
4308
|
_: 3
|
|
@@ -4323,16 +4321,16 @@ const fn = {
|
|
|
4323
4321
|
}, null, 4))), 128))
|
|
4324
4322
|
]),
|
|
4325
4323
|
S(jn, {
|
|
4326
|
-
request:
|
|
4327
|
-
"onUpdate:request":
|
|
4324
|
+
request: U.value,
|
|
4325
|
+
"onUpdate:request": B[5] || (B[5] = (u) => U.value = u),
|
|
4328
4326
|
"filter-panel-open": k.value,
|
|
4329
|
-
"onUpdate:filterPanelOpen":
|
|
4327
|
+
"onUpdate:filterPanelOpen": B[6] || (B[6] = (u) => k.value = u),
|
|
4330
4328
|
columns: n.value,
|
|
4331
4329
|
options: I.value,
|
|
4332
4330
|
"time-zone": N.timeZone,
|
|
4333
4331
|
"quick-date-scope": N.quickDateScope
|
|
4334
4332
|
}, null, 8, ["request", "filter-panel-open", "columns", "options", "time-zone", "quick-date-scope"]),
|
|
4335
|
-
S(
|
|
4333
|
+
S(Uo, {
|
|
4336
4334
|
columns: n.value,
|
|
4337
4335
|
request: s.value,
|
|
4338
4336
|
data: m.value,
|
|
@@ -4342,8 +4340,8 @@ const fn = {
|
|
|
4342
4340
|
options: I.value,
|
|
4343
4341
|
"edit-mode": d.value,
|
|
4344
4342
|
onClearFilters: i,
|
|
4345
|
-
onRowEdit:
|
|
4346
|
-
onRowSelect:
|
|
4343
|
+
onRowEdit: B[7] || (B[7] = (u) => N.$emit("row-edit", u)),
|
|
4344
|
+
onRowSelect: B[8] || (B[8] = (u) => N.$emit("row-select", u))
|
|
4347
4345
|
}, ol({ _: 2 }, [
|
|
4348
4346
|
re(N.$slots, (u, p) => ({
|
|
4349
4347
|
name: p,
|
|
@@ -4356,7 +4354,7 @@ const fn = {
|
|
|
4356
4354
|
]),
|
|
4357
4355
|
S(tn, {
|
|
4358
4356
|
request: s.value,
|
|
4359
|
-
"onUpdate:request":
|
|
4357
|
+
"onUpdate:request": B[9] || (B[9] = (u) => s.value = u),
|
|
4360
4358
|
loading: N.loading,
|
|
4361
4359
|
data: N.data
|
|
4362
4360
|
}, null, 8, ["request", "loading", "data"])
|
|
@@ -4670,9 +4668,9 @@ const fr = {
|
|
|
4670
4668
|
var k;
|
|
4671
4669
|
return [
|
|
4672
4670
|
le(h("span", Sr, [
|
|
4673
|
-
(f(!0), y(X, null, re(m.errors, (I,
|
|
4671
|
+
(f(!0), y(X, null, re(m.errors, (I, U) => (f(), y("div", {
|
|
4674
4672
|
id: "cl-ui-login-errors",
|
|
4675
|
-
key:
|
|
4673
|
+
key: U,
|
|
4676
4674
|
class: "cl-font-semibold"
|
|
4677
4675
|
}, q(I), 1))), 128))
|
|
4678
4676
|
], 512), [
|
|
@@ -4705,16 +4703,16 @@ const fr = {
|
|
|
4705
4703
|
setup(a, { expose: e }) {
|
|
4706
4704
|
const l = R([]), t = A(() => l.value.filter((k) => k.open === !0).length > 0);
|
|
4707
4705
|
function n(k) {
|
|
4708
|
-
let I = l.value.find((
|
|
4706
|
+
let I = l.value.find((U) => U.id === k);
|
|
4709
4707
|
return I || (I = {
|
|
4710
4708
|
id: k,
|
|
4711
4709
|
open: !1
|
|
4712
4710
|
}, l.value.push(I)), I.open;
|
|
4713
4711
|
}
|
|
4714
4712
|
function c(k) {
|
|
4715
|
-
const I = l.value.find((
|
|
4716
|
-
I && (I.open = !I.open, l.value.forEach((
|
|
4717
|
-
|
|
4713
|
+
const I = l.value.find((U) => U.id === k);
|
|
4714
|
+
I && (I.open = !I.open, l.value.forEach((U) => {
|
|
4715
|
+
U.id !== k && (U.open = !1);
|
|
4718
4716
|
}));
|
|
4719
4717
|
}
|
|
4720
4718
|
const r = Ql();
|
|
@@ -4831,21 +4829,21 @@ const Ir = /* @__PURE__ */ we(Rr, [["__scopeId", "data-v-0958dcf5"]]), jr = /* @
|
|
|
4831
4829
|
])
|
|
4832
4830
|
], 2));
|
|
4833
4831
|
}
|
|
4834
|
-
}),
|
|
4832
|
+
}), Pr = {}, Ur = { class: "cl-w-full" }, Lr = {
|
|
4835
4833
|
key: 0,
|
|
4836
4834
|
class: "cl-font-bold cl-mb-4 cl-select-none"
|
|
4837
|
-
},
|
|
4838
|
-
function
|
|
4839
|
-
return f(), y("div",
|
|
4835
|
+
}, Br = { class: "cl-flex cl-flex-wrap cl-space-y-2" };
|
|
4836
|
+
function _r(a, e) {
|
|
4837
|
+
return f(), y("div", Ur, [
|
|
4840
4838
|
a.$slots.title ? (f(), y("div", Lr, [
|
|
4841
4839
|
V(a.$slots, "title")
|
|
4842
4840
|
])) : j("", !0),
|
|
4843
|
-
h("span",
|
|
4841
|
+
h("span", Br, [
|
|
4844
4842
|
V(a.$slots, "default")
|
|
4845
4843
|
])
|
|
4846
4844
|
]);
|
|
4847
4845
|
}
|
|
4848
|
-
const zr = /* @__PURE__ */ we(
|
|
4846
|
+
const zr = /* @__PURE__ */ we(Pr, [["render", _r]]), xr = {}, Hr = { class: "cl-cursor-pointer cl-transition-colors cl-w-full hover:cl-text-primary-darker" };
|
|
4849
4847
|
function Gr(a, e) {
|
|
4850
4848
|
return f(), y("div", Hr, [
|
|
4851
4849
|
V(a.$slots, "default")
|
|
@@ -5016,9 +5014,9 @@ const es = /* @__PURE__ */ we(Jr, [["render", Xr]]), ls = [
|
|
|
5016
5014
|
clUiTabHeader: Yr,
|
|
5017
5015
|
currentQuickDates: Ie,
|
|
5018
5016
|
filterMethodTypes: rn,
|
|
5019
|
-
futureQuickDates:
|
|
5017
|
+
futureQuickDates: Be,
|
|
5020
5018
|
gridColumnTypes: an,
|
|
5021
|
-
inputTypes:
|
|
5019
|
+
inputTypes: Bt,
|
|
5022
5020
|
isComboBoxCreateRequest: io,
|
|
5023
5021
|
isComboBoxItem: so,
|
|
5024
5022
|
isFilterRequest: un,
|
|
@@ -5081,10 +5079,10 @@ export {
|
|
|
5081
5079
|
Tt as datetimeFormats,
|
|
5082
5080
|
bs as default,
|
|
5083
5081
|
rn as filterMethodTypes,
|
|
5084
|
-
|
|
5082
|
+
Be as futureQuickDates,
|
|
5085
5083
|
an as gridColumnTypes,
|
|
5086
5084
|
ye as i18n,
|
|
5087
|
-
|
|
5085
|
+
Bt as inputTypes,
|
|
5088
5086
|
io as isComboBoxCreateRequest,
|
|
5089
5087
|
so as isComboBoxItem,
|
|
5090
5088
|
un as isFilterRequest,
|