@citruslime/ui 2.4.2-beta.0 → 2.4.3-beta.0
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 +1311 -1310
- package/dist/citrus-lime-ui.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { Icon as _ } from "@iconify/vue";
|
|
2
|
-
import { defineComponent as M, ref as A, openBlock as i, createElementBlock as
|
|
3
|
-
import { generateStringId as
|
|
4
|
-
import { onClickOutside as Ue, useTimeoutFn as
|
|
5
|
-
import { createI18n as
|
|
2
|
+
import { defineComponent as M, ref as A, openBlock as i, createElementBlock as b, renderSlot as j, normalizeProps as te, guardReactiveProps as se, Fragment as P, createElementVNode as m, normalizeClass as I, createVNode as $, unref as d, Transition as me, withCtx as L, withDirectives as F, mergeProps as ae, vShow as H, createBlock as V, Teleport as _e, renderList as Q, toDisplayString as T, createCommentVNode as S, nextTick as ve, toHandlers as tl, withModifiers as W, computed as N, useCssVars as ol, watch as K, vModelText as nl, onMounted as Se, vModelDynamic as sl, withKeys as $e, onUnmounted as Re, resolveComponent as al, createTextVNode as le, watchEffect as rl, createSlots as ze, normalizeStyle as il } from "vue";
|
|
3
|
+
import { generateStringId as cl } from "@citruslime/utils";
|
|
4
|
+
import { onClickOutside as Ue, useTimeoutFn as Ke, useDebounceFn as Qe, useWindowSize as ul } from "@vueuse/core";
|
|
5
|
+
import { createI18n as dl, useI18n as ne } from "vue-i18n";
|
|
6
6
|
import { DateTime as ke } from "luxon";
|
|
7
7
|
import { DatePicker as Ve } from "v-calendar";
|
|
8
|
-
import { useDebouncer as
|
|
9
|
-
const
|
|
8
|
+
import { useDebouncer as pl, copy as ie } from "@citruslime/vue-utils";
|
|
9
|
+
const fl = { class: "cl-overflow-hidden" }, ml = /* @__PURE__ */ M({
|
|
10
10
|
__name: "cl-ui-accordion",
|
|
11
11
|
props: {
|
|
12
12
|
exclusive: { type: Boolean, default: !1 }
|
|
13
13
|
},
|
|
14
14
|
setup(t) {
|
|
15
|
-
const o = t,
|
|
16
|
-
function
|
|
17
|
-
let n =
|
|
15
|
+
const o = t, e = A([]);
|
|
16
|
+
function l(g) {
|
|
17
|
+
let n = e.value.find((a) => a.id === g);
|
|
18
18
|
return n || (n = {
|
|
19
|
-
id:
|
|
19
|
+
id: g,
|
|
20
20
|
open: !1
|
|
21
|
-
},
|
|
21
|
+
}, e.value.push(n)), n.open;
|
|
22
22
|
}
|
|
23
|
-
function s(
|
|
24
|
-
const n =
|
|
25
|
-
n && (o.exclusive &&
|
|
26
|
-
a.id !==
|
|
23
|
+
function s(g) {
|
|
24
|
+
const n = e.value.find((a) => a.id === g);
|
|
25
|
+
n && (o.exclusive && e.value.forEach((a) => {
|
|
26
|
+
a.id !== g && (a.open = !1);
|
|
27
27
|
}), n.open = !n.open);
|
|
28
28
|
}
|
|
29
|
-
return (
|
|
30
|
-
j(
|
|
29
|
+
return (g, n) => (i(), b("div", fl, [
|
|
30
|
+
j(g.$slots, "default", te(se({ isItemOpen: l, toggleItem: s })))
|
|
31
31
|
]));
|
|
32
32
|
}
|
|
33
|
-
}),
|
|
33
|
+
}), gl = { class: "cl-absolute cl-left-5 cl-top-5" }, vl = { class: "cl-font-semibold cl-ml-10 cl-p-4 cl-select-none cl-text-grey-5" }, bl = { class: "cl-overflow-hidden" }, hl = /* @__PURE__ */ M({
|
|
34
34
|
inheritAttrs: !1,
|
|
35
35
|
__name: "cl-ui-accordion-item",
|
|
36
36
|
props: {
|
|
@@ -41,20 +41,20 @@ const pl = { class: "cl-overflow-hidden" }, fl = /* @__PURE__ */ M({
|
|
|
41
41
|
toggle: null
|
|
42
42
|
},
|
|
43
43
|
setup(t, { emit: o }) {
|
|
44
|
-
const
|
|
45
|
-
function
|
|
46
|
-
|
|
44
|
+
const e = t;
|
|
45
|
+
function l() {
|
|
46
|
+
e.disabled || o("toggle");
|
|
47
47
|
}
|
|
48
|
-
return (s,
|
|
49
|
-
|
|
48
|
+
return (s, g) => (i(), b(P, null, [
|
|
49
|
+
m("div", {
|
|
50
50
|
class: I(["cl-border-b cl-border-grey-1 cl-relative", {
|
|
51
51
|
"cl-bg-grey-0": s.disabled,
|
|
52
52
|
"cl-cursor-pointer": !s.disabled
|
|
53
53
|
}]),
|
|
54
|
-
onClick:
|
|
54
|
+
onClick: l
|
|
55
55
|
}, [
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
m("div", gl, [
|
|
57
|
+
$(d(_), {
|
|
58
58
|
class: I(["cl-duration-300 cl-ease-in-out cl-text-grey-3 cl-transform-gpu cl-transition-transform", {
|
|
59
59
|
"cl-rotate-180": s.open
|
|
60
60
|
}]),
|
|
@@ -62,14 +62,14 @@ const pl = { class: "cl-overflow-hidden" }, fl = /* @__PURE__ */ M({
|
|
|
62
62
|
width: "20"
|
|
63
63
|
}, null, 8, ["class"])
|
|
64
64
|
]),
|
|
65
|
-
|
|
65
|
+
m("div", vl, [
|
|
66
66
|
j(s.$slots, "title")
|
|
67
67
|
])
|
|
68
68
|
], 2),
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
m("div", bl, [
|
|
70
|
+
$(me, { name: "grow-down" }, {
|
|
71
71
|
default: L(() => [
|
|
72
|
-
F(
|
|
72
|
+
F(m("div", ae(s.$attrs, { class: "cl-ml-10 cl-p-4" }), [
|
|
73
73
|
j(s.$slots, "default")
|
|
74
74
|
], 16), [
|
|
75
75
|
[H, s.open]
|
|
@@ -81,28 +81,28 @@ const pl = { class: "cl-overflow-hidden" }, fl = /* @__PURE__ */ M({
|
|
|
81
81
|
], 64));
|
|
82
82
|
}
|
|
83
83
|
}), pe = (t, o) => {
|
|
84
|
-
const
|
|
85
|
-
for (const [
|
|
86
|
-
l
|
|
87
|
-
return
|
|
88
|
-
},
|
|
89
|
-
function
|
|
90
|
-
return i(),
|
|
84
|
+
const e = t.__vccOpts || t;
|
|
85
|
+
for (const [l, s] of o)
|
|
86
|
+
e[l] = s;
|
|
87
|
+
return e;
|
|
88
|
+
}, yl = {}, wl = { 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
|
+
function $l(t, o) {
|
|
90
|
+
return i(), b("div", wl, [
|
|
91
91
|
j(t.$slots, "default")
|
|
92
92
|
]);
|
|
93
93
|
}
|
|
94
|
-
const
|
|
94
|
+
const kl = /* @__PURE__ */ pe(yl, [["render", $l]]), qe = A([]);
|
|
95
95
|
function De(t) {
|
|
96
96
|
const o = {
|
|
97
|
-
id:
|
|
97
|
+
id: cl(),
|
|
98
98
|
...t
|
|
99
99
|
};
|
|
100
|
-
qe.value.push(o), setTimeout(() =>
|
|
100
|
+
qe.value.push(o), setTimeout(() => Je(o), t.duration);
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Je(t) {
|
|
103
103
|
qe.value = qe.value.filter((o) => o.id !== t.id);
|
|
104
104
|
}
|
|
105
|
-
const
|
|
105
|
+
const Cl = ["onClick"], Tl = { class: "cl-flex-1 cl-select-none cl-text-ellipsis cl-w-64" }, Ye = /* @__PURE__ */ M({
|
|
106
106
|
inheritAttrs: !1,
|
|
107
107
|
__name: "cl-ui-notification",
|
|
108
108
|
props: {
|
|
@@ -110,9 +110,9 @@ const kl = ["onClick"], Cl = { 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,
|
|
114
|
-
|
|
115
|
-
class: I(["cl-fixed cl-w-80 cl-z-
|
|
113
|
+
return (o, e) => (i(), V(_e, { to: o.container }, [
|
|
114
|
+
m("div", {
|
|
115
|
+
class: I(["cl-fixed cl-w-80 cl-z-50", {
|
|
116
116
|
"cl-top-5 cl-left-5": o.position === "top-left",
|
|
117
117
|
"cl-top-5 cl-left-1/2": o.position === "top-centre",
|
|
118
118
|
"cl-top-5 cl-right-5": o.position === "top-right",
|
|
@@ -121,45 +121,45 @@ const kl = ["onClick"], Cl = { 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
|
-
(i(!0),
|
|
124
|
+
(i(!0), b(P, null, Q(d(qe), (l, s) => (i(), b("div", ae(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
|
-
"cl-bg-white":
|
|
128
|
-
"cl-bg-primary-default":
|
|
129
|
-
"cl-bg-secondary-default":
|
|
130
|
-
"cl-bg-danger-default":
|
|
131
|
-
"cl-bg-warning-default":
|
|
127
|
+
"cl-bg-white": l.colour === "default",
|
|
128
|
+
"cl-bg-primary-default": l.colour === "primary",
|
|
129
|
+
"cl-bg-secondary-default": l.colour === "secondary",
|
|
130
|
+
"cl-bg-danger-default": l.colour === "danger",
|
|
131
|
+
"cl-bg-warning-default": l.colour === "warning"
|
|
132
132
|
}],
|
|
133
|
-
onClick: (
|
|
133
|
+
onClick: (g) => d(Je)(l)
|
|
134
134
|
}), [
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
m("span", Tl, T(l.message), 1),
|
|
136
|
+
$(d(_), {
|
|
137
137
|
class: "cl-inline-block cl-opacity-0 cl-transition-opacity group-hover:cl-opacity-100",
|
|
138
138
|
icon: "ph:x",
|
|
139
139
|
size: 16,
|
|
140
140
|
weight: "bold"
|
|
141
141
|
})
|
|
142
|
-
], 16,
|
|
142
|
+
], 16, Cl))), 128))
|
|
143
143
|
], 2)
|
|
144
144
|
], 8, ["to"]));
|
|
145
145
|
}
|
|
146
|
-
}),
|
|
146
|
+
}), El = { 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" }, Ol = /* @__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,
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
return (o, e) => (i(), b(P, null, [
|
|
153
|
+
$(Ye),
|
|
154
|
+
m("div", El, [
|
|
155
155
|
j(o.$slots, "header"),
|
|
156
|
-
|
|
156
|
+
m("div", {
|
|
157
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
|
}, [
|
|
161
161
|
j(o.$slots, "navigation"),
|
|
162
|
-
|
|
162
|
+
m("div", {
|
|
163
163
|
class: I(["cl-grow cl-max-h-full cl-overflow-x-hidden cl-overflow-y-auto cl-overscroll-y-none cl-w-auto", {
|
|
164
164
|
"cl-pb-20 lg:cl-pb-0": o.removePadding,
|
|
165
165
|
"lg:cl-pb-8 md:cl-px-8 cl-px-2 md:cl-pt-8 cl-pt-2 cl-pb-20": !o.removePadding
|
|
@@ -172,11 +172,11 @@ const kl = ["onClick"], Cl = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
172
172
|
], 64));
|
|
173
173
|
}
|
|
174
174
|
});
|
|
175
|
-
const
|
|
176
|
-
function
|
|
177
|
-
return i(),
|
|
175
|
+
const Al = {}, ql = { class: "loading-spinner" };
|
|
176
|
+
function Sl(t, o) {
|
|
177
|
+
return i(), b("div", ql);
|
|
178
178
|
}
|
|
179
|
-
const Ne = /* @__PURE__ */ pe(
|
|
179
|
+
const Ne = /* @__PURE__ */ pe(Al, [["render", Sl], ["__scopeId", "data-v-a21dc5d2"]]), Nl = ["disabled"], fe = /* @__PURE__ */ M({
|
|
180
180
|
inheritAttrs: !1,
|
|
181
181
|
__name: "cl-ui-button",
|
|
182
182
|
props: {
|
|
@@ -186,65 +186,65 @@ const Ne = /* @__PURE__ */ pe(Ol, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
186
186
|
disabled: { type: Boolean, default: !1 }
|
|
187
187
|
},
|
|
188
188
|
setup(t, { expose: o }) {
|
|
189
|
-
const
|
|
189
|
+
const e = A(null);
|
|
190
190
|
return o({
|
|
191
191
|
focus() {
|
|
192
|
-
|
|
192
|
+
e.value && e.value.focus();
|
|
193
193
|
}
|
|
194
|
-
}), (
|
|
195
|
-
F(
|
|
196
|
-
[H,
|
|
194
|
+
}), (l, s) => (i(), b(P, null, [
|
|
195
|
+
F($(Ne, { class: "relative" }, null, 512), [
|
|
196
|
+
[H, l.loading]
|
|
197
197
|
]),
|
|
198
|
-
F(
|
|
198
|
+
F(m("button", ae(l.$attrs, {
|
|
199
199
|
ref_key: "buttonRef",
|
|
200
|
-
ref:
|
|
200
|
+
ref: e,
|
|
201
201
|
class: ["cl-align-middle cl-border cl-font-semibold cl-inline-block cl-rounded cl-select-none cl-shadow cl-text-center cl-transition-colors", {
|
|
202
|
-
"cl-py-[5px] cl-px-4 cl-text-sm":
|
|
203
|
-
"cl-py-[9px] cl-px-8 cl-text-sm":
|
|
204
|
-
"cl-px-10 cl-py-4":
|
|
205
|
-
"cl-bg-white cl-border-grey-0 hover:cl-border-grey-2 cl-text-secondary":
|
|
206
|
-
"cl-border-primary-default cl-bg-primary-default cl-text-white hover:cl-bg-primary-dark hover:cl-border-primary-dark":
|
|
207
|
-
"cl-border-secondary-default cl-bg-secondary-default cl-text-white hover:cl-bg-secondary-light hover:cl-border-secondary-light":
|
|
208
|
-
"cl-border-danger-default cl-bg-danger-default cl-text-white hover:cl-bg-danger-dark hover:cl-border-danger-dark":
|
|
209
|
-
"cl-border-link-default cl-bg-link-default cl-text-white hover:cl-bg-link-light hover:cl-border-link-light":
|
|
210
|
-
"cl-border-orange-default cl-bg-orange-default cl-opacity-100 cl-text-white hover:cl-bg-orange-dark hover:cl-border-orange-dark":
|
|
211
|
-
"!cl-border-grey-3 !cl-bg-grey-3 cl-text-grey-0 hover:!cl-bg-grey-3 hover:!cl-border-grey-3 cl-cursor-default":
|
|
202
|
+
"cl-py-[5px] cl-px-4 cl-text-sm": l.size === "small",
|
|
203
|
+
"cl-py-[9px] cl-px-8 cl-text-sm": l.size === "medium",
|
|
204
|
+
"cl-px-10 cl-py-4": l.size === "large",
|
|
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-dark hover:cl-border-primary-dark": l.colour === "primary",
|
|
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
|
+
"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
|
+
"cl-border-link-default cl-bg-link-default cl-text-white hover:cl-bg-link-light hover:cl-border-link-light": l.colour === "blue",
|
|
210
|
+
"cl-border-orange-default cl-bg-orange-default cl-opacity-100 cl-text-white hover:cl-bg-orange-dark hover:cl-border-orange-dark": l.colour === "orange",
|
|
211
|
+
"!cl-border-grey-3 !cl-bg-grey-3 cl-text-grey-0 hover:!cl-bg-grey-3 hover:!cl-border-grey-3 cl-cursor-default": l.disabled
|
|
212
212
|
}],
|
|
213
|
-
disabled:
|
|
213
|
+
disabled: l.disabled
|
|
214
214
|
}), [
|
|
215
|
-
j(
|
|
216
|
-
], 16,
|
|
217
|
-
[H, !
|
|
215
|
+
j(l.$slots, "default")
|
|
216
|
+
], 16, Nl), [
|
|
217
|
+
[H, !l.loading]
|
|
218
218
|
])
|
|
219
219
|
], 64));
|
|
220
220
|
}
|
|
221
|
-
}),
|
|
221
|
+
}), jl = [
|
|
222
222
|
"default",
|
|
223
223
|
"primary",
|
|
224
224
|
"secondary",
|
|
225
225
|
"danger",
|
|
226
226
|
"blue",
|
|
227
227
|
"orange"
|
|
228
|
-
],
|
|
228
|
+
], Il = [
|
|
229
229
|
"small",
|
|
230
230
|
"medium",
|
|
231
231
|
"large"
|
|
232
|
-
],
|
|
232
|
+
], _l = { key: 0 }, Rl = /* @__PURE__ */ M({
|
|
233
233
|
__name: "cl-ui-card",
|
|
234
234
|
props: {
|
|
235
235
|
size: { default: "medium" },
|
|
236
236
|
hover: { type: Boolean, default: !1 }
|
|
237
237
|
},
|
|
238
238
|
setup(t) {
|
|
239
|
-
return (o,
|
|
239
|
+
return (o, e) => (i(), b("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 ? (i(),
|
|
244
|
+
o.$slots.image ? (i(), b("div", _l, [
|
|
245
245
|
j(o.$slots, "image")
|
|
246
|
-
])) :
|
|
247
|
-
o.$slots.title ? (i(),
|
|
246
|
+
])) : S("", !0),
|
|
247
|
+
o.$slots.title ? (i(), b("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",
|
|
@@ -254,8 +254,8 @@ const Ne = /* @__PURE__ */ pe(Ol, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
254
254
|
}])
|
|
255
255
|
}, [
|
|
256
256
|
j(o.$slots, "title")
|
|
257
|
-
], 2)) :
|
|
258
|
-
|
|
257
|
+
], 2)) : S("", !0),
|
|
258
|
+
m("div", {
|
|
259
259
|
class: I(["cl-border-grey-2", {
|
|
260
260
|
"cl-p-2": o.size === "small",
|
|
261
261
|
"cl-p-4": o.size === "medium",
|
|
@@ -265,7 +265,7 @@ const Ne = /* @__PURE__ */ pe(Ol, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
265
265
|
}, [
|
|
266
266
|
j(o.$slots, "default")
|
|
267
267
|
], 2),
|
|
268
|
-
o.$slots.footer ? (i(),
|
|
268
|
+
o.$slots.footer ? (i(), b("div", {
|
|
269
269
|
key: 2,
|
|
270
270
|
class: I(["cl-border-grey-2 cl-border-t", {
|
|
271
271
|
"cl-p-2": o.size === "small",
|
|
@@ -274,16 +274,16 @@ const Ne = /* @__PURE__ */ pe(Ol, [["render", ql], ["__scopeId", "data-v-a21dc5d
|
|
|
274
274
|
}])
|
|
275
275
|
}, [
|
|
276
276
|
j(o.$slots, "footer")
|
|
277
|
-
], 2)) :
|
|
277
|
+
], 2)) : S("", !0)
|
|
278
278
|
], 2));
|
|
279
279
|
}
|
|
280
|
-
}),
|
|
280
|
+
}), zl = [
|
|
281
281
|
"small",
|
|
282
282
|
"medium",
|
|
283
283
|
"large"
|
|
284
284
|
];
|
|
285
285
|
var X = /* @__PURE__ */ ((t) => (t.CURRENCY = "currency", t.PERCENTAGE = "percentage", t.INTEGER = "integer", t.DECIMAL = "decimal", t.MULTIPLIER = "multiplier", t))(X || {}), G = /* @__PURE__ */ ((t) => (t.SHORT_DATE = "short-date", t.SHORT_DATETIME = "short-datetime", t.DATE = "date", t.DATETIME = "datetime", t.LONG_DATE = "long-date", t.LONG_DATETIME = "long-datetime", t.TIME = "time", t.MONTH_YEAR = "month-year", t))(G || {});
|
|
286
|
-
const
|
|
286
|
+
const Ul = {
|
|
287
287
|
"en-GB": {
|
|
288
288
|
comboBox: {
|
|
289
289
|
emptyHintText: "Choose a {object}",
|
|
@@ -364,7 +364,7 @@ const zl = {
|
|
|
364
364
|
timePlaceholder: "Select time"
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
|
-
},
|
|
367
|
+
}, Bl = {
|
|
368
368
|
"en-GB": {
|
|
369
369
|
[X.PERCENTAGE]: {
|
|
370
370
|
style: "percent"
|
|
@@ -381,7 +381,7 @@ const zl = {
|
|
|
381
381
|
currencyDisplay: "symbol"
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
|
-
},
|
|
384
|
+
}, Ml = {
|
|
385
385
|
"en-GB": {
|
|
386
386
|
[G.SHORT_DATE]: {
|
|
387
387
|
day: "numeric",
|
|
@@ -428,33 +428,33 @@ const zl = {
|
|
|
428
428
|
year: "numeric"
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
}, ee =
|
|
431
|
+
}, ee = dl({
|
|
432
432
|
locale: "en-GB",
|
|
433
433
|
fallbackLocale: "en-GB",
|
|
434
|
-
messages:
|
|
435
|
-
numberFormats:
|
|
436
|
-
datetimeFormats:
|
|
434
|
+
messages: Ul,
|
|
435
|
+
numberFormats: Bl,
|
|
436
|
+
datetimeFormats: Ml,
|
|
437
437
|
useScope: "global",
|
|
438
438
|
missingWarn: !1,
|
|
439
439
|
fallbackWarn: !1,
|
|
440
440
|
warnHtmlMessage: !1
|
|
441
441
|
});
|
|
442
|
-
function
|
|
442
|
+
function Vs(t, o) {
|
|
443
443
|
return ee.global.mergeLocaleMessage(t, o), ve();
|
|
444
444
|
}
|
|
445
|
-
function
|
|
445
|
+
function Ds(t, o) {
|
|
446
446
|
return ee.global.mergeNumberFormat(t, o), ve();
|
|
447
447
|
}
|
|
448
|
-
function
|
|
448
|
+
function Ls(t, o) {
|
|
449
449
|
return ee.global.mergeDateTimeFormat(t, o), ve();
|
|
450
450
|
}
|
|
451
|
-
function
|
|
451
|
+
function Ps(t) {
|
|
452
452
|
return ee.global.locale.value = t, ve();
|
|
453
453
|
}
|
|
454
454
|
const { t: ue } = ee.global;
|
|
455
|
-
function
|
|
455
|
+
function Vl(t, o, e, l) {
|
|
456
456
|
const s = ee.global.locale.value;
|
|
457
|
-
return new Promise((
|
|
457
|
+
return new Promise((g) => {
|
|
458
458
|
let n = {
|
|
459
459
|
valid: !1,
|
|
460
460
|
message: ""
|
|
@@ -468,29 +468,29 @@ function Ml(t, o, l, e) {
|
|
|
468
468
|
case "tel":
|
|
469
469
|
case "text":
|
|
470
470
|
case "url":
|
|
471
|
-
a = ((
|
|
471
|
+
a = ((l == null ? void 0 : l.length) ?? 0) >= (Number(t) || 0), n = de(a, ue("input.greaterOrEqualToCharacters", { label: e, min: t.toString() }));
|
|
472
472
|
break;
|
|
473
473
|
case "number":
|
|
474
474
|
case "range":
|
|
475
|
-
a =
|
|
475
|
+
a = l >= (Number(t) || 0), n = de(a, ue("input.greaterOrEqualToValue", { label: e, min: t.toString() }));
|
|
476
476
|
break;
|
|
477
477
|
case "date":
|
|
478
|
-
a = new Date(
|
|
478
|
+
a = new Date(l).getTime() >= new Date(t).getTime(), n = de(a, ue("input.afterOrEqualToValue", { label: e, min: ee.global.d(new Date(t), G.DATE, s ?? ee.global.locale.value) }));
|
|
479
479
|
break;
|
|
480
480
|
case "datetime":
|
|
481
|
-
a = new Date(
|
|
481
|
+
a = new Date(l).getTime() >= new Date(t).getTime(), n = de(a, ue("input.afterOrEqualToValue", { label: e, min: ee.global.d(new Date(t), G.DATETIME, s ?? ee.global.locale.value) }));
|
|
482
482
|
break;
|
|
483
483
|
default:
|
|
484
484
|
n.valid = !0;
|
|
485
485
|
break;
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
|
-
|
|
488
|
+
g(n);
|
|
489
489
|
});
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function Dl(t, o, e, l) {
|
|
492
492
|
const s = ee.global.locale.value;
|
|
493
|
-
return new Promise((
|
|
493
|
+
return new Promise((g) => {
|
|
494
494
|
let n = {
|
|
495
495
|
valid: !1,
|
|
496
496
|
message: ""
|
|
@@ -504,36 +504,36 @@ function Vl(t, o, l, e) {
|
|
|
504
504
|
case "tel":
|
|
505
505
|
case "text":
|
|
506
506
|
case "url":
|
|
507
|
-
a = ((
|
|
507
|
+
a = ((l == null ? void 0 : l.length) ?? 0) <= (Number(t) || 0), n = de(a, ue("input.lessOrEqualToCharacters", { label: e, max: t.toString() }));
|
|
508
508
|
break;
|
|
509
509
|
case "number":
|
|
510
510
|
case "range":
|
|
511
|
-
a =
|
|
511
|
+
a = l <= (Number(t) || 0), n = de(a, ue("input.lessOrEqualToValue", { label: e, max: t.toString() }));
|
|
512
512
|
break;
|
|
513
513
|
case "date":
|
|
514
|
-
a = new Date(
|
|
514
|
+
a = new Date(l).getTime() <= new Date(t).getTime(), n = de(a, ue("input.beforeOrEqualToValue", { label: e, max: ee.global.d(new Date(t), G.DATE, s ?? ee.global.locale.value) }));
|
|
515
515
|
break;
|
|
516
516
|
case "datetime":
|
|
517
|
-
a = new Date(
|
|
517
|
+
a = new Date(l).getTime() <= new Date(t).getTime(), n = de(a, ue("input.beforeOrEqualToValue", { label: e, min: ee.global.d(new Date(t), G.DATETIME, s ?? ee.global.locale.value) }));
|
|
518
518
|
break;
|
|
519
519
|
default:
|
|
520
520
|
n.valid = !0;
|
|
521
521
|
break;
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
|
|
524
|
+
g(n);
|
|
525
525
|
});
|
|
526
526
|
}
|
|
527
|
-
function
|
|
528
|
-
return new Promise((
|
|
529
|
-
const
|
|
530
|
-
|
|
527
|
+
function Ll(t, o) {
|
|
528
|
+
return new Promise((e) => {
|
|
529
|
+
const l = o != null && o !== "" && o.toString().trim() !== "", s = de(l, ue("input.valueIsRequired", { label: t }));
|
|
530
|
+
e(s);
|
|
531
531
|
});
|
|
532
532
|
}
|
|
533
|
-
function
|
|
534
|
-
return new Promise((
|
|
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,
|
|
536
|
-
|
|
533
|
+
function Pl(t, o) {
|
|
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, g = de(s, ue("input.valueNotValidEmail", { label: t }));
|
|
536
|
+
e(g);
|
|
537
537
|
});
|
|
538
538
|
}
|
|
539
539
|
function de(t, o) {
|
|
@@ -542,10 +542,10 @@ function de(t, o) {
|
|
|
542
542
|
message: t ? "" : o
|
|
543
543
|
};
|
|
544
544
|
}
|
|
545
|
-
const
|
|
545
|
+
const Fl = { class: "cl-relative" }, Hl = ["value", "disabled", "placeholder"], xl = {
|
|
546
546
|
key: 0,
|
|
547
547
|
class: "action-icon cl-absolute cl-bg-transparent cl-flex cl-right-2 cl-text-grey-4 cl-top-3.5"
|
|
548
|
-
},
|
|
548
|
+
}, Gl = /* @__PURE__ */ M({
|
|
549
549
|
__name: "cl-ui-calendar-input",
|
|
550
550
|
props: {
|
|
551
551
|
date: {},
|
|
@@ -557,48 +557,48 @@ const Pl = { class: "cl-relative" }, Fl = ["value", "disabled", "placeholder"],
|
|
|
557
557
|
},
|
|
558
558
|
emits: ["clear", "reset"],
|
|
559
559
|
setup(t, { expose: o }) {
|
|
560
|
-
const
|
|
560
|
+
const e = A(null);
|
|
561
561
|
return o({
|
|
562
562
|
focus() {
|
|
563
|
-
var
|
|
564
|
-
(
|
|
563
|
+
var l;
|
|
564
|
+
(l = e.value) == null || l.focus();
|
|
565
565
|
}
|
|
566
|
-
}), (
|
|
567
|
-
|
|
566
|
+
}), (l, s) => (i(), b("div", Fl, [
|
|
567
|
+
m("input", ae({
|
|
568
568
|
ref_key: "element",
|
|
569
|
-
ref:
|
|
570
|
-
},
|
|
571
|
-
value:
|
|
569
|
+
ref: e
|
|
570
|
+
}, l.$attrs, {
|
|
571
|
+
value: l.date,
|
|
572
572
|
type: "text",
|
|
573
|
-
disabled:
|
|
574
|
-
placeholder:
|
|
575
|
-
},
|
|
576
|
-
F(
|
|
573
|
+
disabled: l.disabled,
|
|
574
|
+
placeholder: l.placeholder
|
|
575
|
+
}, tl(l.events, !0)), null, 16, Hl),
|
|
576
|
+
F($(d(_), {
|
|
577
577
|
class: I(["cl-absolute cl-bg-transparent cl-left-2 cl-text-grey-4 cl-top-3.5 icon", {
|
|
578
|
-
"!cl-bg-off-white":
|
|
578
|
+
"!cl-bg-off-white": l.disabled
|
|
579
579
|
}]),
|
|
580
|
-
icon:
|
|
580
|
+
icon: l.type === "time" ? "ph-clock" : "ph:calendar"
|
|
581
581
|
}, null, 8, ["class", "icon"]), [
|
|
582
|
-
[H, !
|
|
582
|
+
[H, !l.disabled]
|
|
583
583
|
]),
|
|
584
|
-
|
|
585
|
-
|
|
584
|
+
l.disabled ? S("", !0) : (i(), b("div", xl, [
|
|
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
|
-
onClick: s[0] || (s[0] = W((
|
|
590
|
-
})) :
|
|
591
|
-
!
|
|
589
|
+
onClick: s[0] || (s[0] = W((g) => l.$emit("reset"), ["prevent"]))
|
|
590
|
+
})) : S("", !0),
|
|
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",
|
|
595
|
-
onClick: s[1] || (s[1] = W((
|
|
596
|
-
})) :
|
|
595
|
+
onClick: s[1] || (s[1] = W((g) => l.$emit("clear"), ["prevent"]))
|
|
596
|
+
})) : S("", !0)
|
|
597
597
|
]))
|
|
598
598
|
]));
|
|
599
599
|
}
|
|
600
600
|
});
|
|
601
|
-
const Le = /* @__PURE__ */ pe(
|
|
601
|
+
const Le = /* @__PURE__ */ pe(Gl, [["__scopeId", "data-v-4c802181"]]), Zl = /* @__PURE__ */ M({
|
|
602
602
|
inheritAttrs: !1,
|
|
603
603
|
__name: "cl-ui-calendar",
|
|
604
604
|
props: {
|
|
@@ -612,74 +612,74 @@ const Le = /* @__PURE__ */ pe(xl, [["__scopeId", "data-v-4c802181"]]), Gl = /* @
|
|
|
612
612
|
placeholder: { default: null }
|
|
613
613
|
},
|
|
614
614
|
emits: ["update:date"],
|
|
615
|
-
setup(t, { expose: o, emit:
|
|
616
|
-
const
|
|
615
|
+
setup(t, { expose: o, emit: e }) {
|
|
616
|
+
const l = t, s = N({
|
|
617
617
|
get() {
|
|
618
|
-
let
|
|
619
|
-
return
|
|
620
|
-
zone:
|
|
621
|
-
}).toJSDate()),
|
|
618
|
+
let h = null;
|
|
619
|
+
return l.type === "time" ? h = l.date === null ? "00:00" : l.date : l.date !== null && (h = ke.fromISO(l.date, {
|
|
620
|
+
zone: l.timeZone
|
|
621
|
+
}).toJSDate()), h;
|
|
622
622
|
},
|
|
623
|
-
set(
|
|
623
|
+
set(h) {
|
|
624
624
|
let r = null;
|
|
625
|
-
|
|
626
|
-
zone:
|
|
627
|
-
}).setZone(
|
|
625
|
+
l.type === "time" ? r = h : h !== null && (r = ke.fromJSDate(h, {
|
|
626
|
+
zone: l.timeZone
|
|
627
|
+
}).setZone(l.timeZone).toISO()), e("update:date", r);
|
|
628
628
|
}
|
|
629
|
-
}), { locale:
|
|
630
|
-
let
|
|
631
|
-
switch (
|
|
629
|
+
}), { locale: g, t: n } = ne(), a = N(() => {
|
|
630
|
+
let h;
|
|
631
|
+
switch (l.type) {
|
|
632
632
|
case "date":
|
|
633
|
-
|
|
633
|
+
h = n("calendar.datePlaceholder");
|
|
634
634
|
break;
|
|
635
635
|
case "datetime":
|
|
636
|
-
|
|
636
|
+
h = n("calendar.dateTimePlaceholder");
|
|
637
637
|
break;
|
|
638
638
|
case "time":
|
|
639
|
-
|
|
639
|
+
h = n("calendar.timePlaceholder");
|
|
640
640
|
break;
|
|
641
641
|
}
|
|
642
|
-
return
|
|
643
|
-
}), c =
|
|
642
|
+
return l.placeholder ?? h;
|
|
643
|
+
}), c = N(() => l.disabled ? !1 : {
|
|
644
644
|
visibility: "focus",
|
|
645
645
|
showDelay: 150,
|
|
646
646
|
hideDelay: 100
|
|
647
647
|
});
|
|
648
648
|
function u() {
|
|
649
|
-
let
|
|
650
|
-
|
|
649
|
+
let h = ke.now().set({ second: 0, millisecond: 0 }).setZone(l.timeZone);
|
|
650
|
+
l.type === "date" && (h = h.set({ hour: 0, minute: 0 }).setZone(l.timeZone)), s.value = h.toJSDate();
|
|
651
651
|
}
|
|
652
|
-
const
|
|
652
|
+
const v = A(null);
|
|
653
653
|
return o({
|
|
654
654
|
focus() {
|
|
655
|
-
var
|
|
656
|
-
(
|
|
655
|
+
var h;
|
|
656
|
+
(h = v.value) == null || h.focus();
|
|
657
657
|
}
|
|
658
|
-
}), (
|
|
658
|
+
}), (h, r) => h.type === "time" ? (i(), V(d(Ve), {
|
|
659
659
|
key: 0,
|
|
660
660
|
modelValue: s.value,
|
|
661
|
-
"onUpdate:modelValue": r[1] || (r[1] = (
|
|
661
|
+
"onUpdate:modelValue": r[1] || (r[1] = (f) => s.value = f),
|
|
662
662
|
modelModifiers: { string: !0 },
|
|
663
|
-
locale: d(
|
|
664
|
-
is24hr: d(
|
|
665
|
-
mode:
|
|
666
|
-
"is-required":
|
|
667
|
-
masks: d(
|
|
663
|
+
locale: d(g),
|
|
664
|
+
is24hr: d(g) !== "en-US",
|
|
665
|
+
mode: h.type,
|
|
666
|
+
"is-required": h.required,
|
|
667
|
+
masks: d(g) === "en-US" ? { modelValue: "HH:mm", input: "h:mm A" } : { modelValue: "HH:mm", input: "HH:mm" },
|
|
668
668
|
color: "primary",
|
|
669
669
|
"title-position": "left",
|
|
670
670
|
"hide-time-header": "",
|
|
671
671
|
popover: c.value
|
|
672
672
|
}, {
|
|
673
|
-
default: L(({ inputValue:
|
|
674
|
-
|
|
673
|
+
default: L(({ inputValue: f, inputEvents: w }) => [
|
|
674
|
+
$(Le, ae(h.$attrs, {
|
|
675
675
|
ref_key: "input",
|
|
676
|
-
ref:
|
|
677
|
-
date:
|
|
678
|
-
events:
|
|
679
|
-
type:
|
|
676
|
+
ref: v,
|
|
677
|
+
date: f,
|
|
678
|
+
events: w,
|
|
679
|
+
type: h.type,
|
|
680
680
|
placeholder: a.value,
|
|
681
|
-
required:
|
|
682
|
-
disabled:
|
|
681
|
+
required: h.required,
|
|
682
|
+
disabled: h.disabled,
|
|
683
683
|
onClear: r[0] || (r[0] = (O) => s.value = null),
|
|
684
684
|
onReset: u
|
|
685
685
|
}), null, 16, ["date", "events", "type", "placeholder", "required", "disabled"])
|
|
@@ -688,29 +688,29 @@ const Le = /* @__PURE__ */ pe(xl, [["__scopeId", "data-v-4c802181"]]), Gl = /* @
|
|
|
688
688
|
}, 8, ["modelValue", "locale", "is24hr", "mode", "is-required", "masks", "popover"])) : (i(), V(d(Ve), {
|
|
689
689
|
key: 1,
|
|
690
690
|
modelValue: s.value,
|
|
691
|
-
"onUpdate:modelValue": r[3] || (r[3] = (
|
|
692
|
-
locale: d(
|
|
693
|
-
is24hr: d(
|
|
694
|
-
timezone:
|
|
695
|
-
mode:
|
|
696
|
-
"min-date":
|
|
697
|
-
"max-date":
|
|
698
|
-
"is-required":
|
|
691
|
+
"onUpdate:modelValue": r[3] || (r[3] = (f) => s.value = f),
|
|
692
|
+
locale: d(g),
|
|
693
|
+
is24hr: d(g) !== "en-US",
|
|
694
|
+
timezone: h.timeZone,
|
|
695
|
+
mode: h.type,
|
|
696
|
+
"min-date": h.min,
|
|
697
|
+
"max-date": h.max,
|
|
698
|
+
"is-required": h.required,
|
|
699
699
|
color: "primary",
|
|
700
700
|
"title-position": "left",
|
|
701
701
|
"hide-time-header": "",
|
|
702
702
|
popover: c.value
|
|
703
703
|
}, {
|
|
704
|
-
default: L(({ inputValue:
|
|
705
|
-
|
|
704
|
+
default: L(({ inputValue: f, inputEvents: w }) => [
|
|
705
|
+
$(Le, ae(h.$attrs, {
|
|
706
706
|
ref_key: "input",
|
|
707
|
-
ref:
|
|
708
|
-
date:
|
|
709
|
-
events:
|
|
710
|
-
type:
|
|
707
|
+
ref: v,
|
|
708
|
+
date: f,
|
|
709
|
+
events: w,
|
|
710
|
+
type: h.type,
|
|
711
711
|
placeholder: a.value,
|
|
712
|
-
required:
|
|
713
|
-
disabled:
|
|
712
|
+
required: h.required,
|
|
713
|
+
disabled: h.disabled,
|
|
714
714
|
onClear: r[2] || (r[2] = (O) => s.value = null),
|
|
715
715
|
onReset: u
|
|
716
716
|
}), null, 16, ["date", "events", "type", "placeholder", "required", "disabled"])
|
|
@@ -724,7 +724,7 @@ const Oe = [
|
|
|
724
724
|
"datetime",
|
|
725
725
|
"time"
|
|
726
726
|
];
|
|
727
|
-
function
|
|
727
|
+
function Wl(t) {
|
|
728
728
|
if (t.startsWith("ClUi"))
|
|
729
729
|
return {
|
|
730
730
|
name: `clUi${t.slice(4)}`,
|
|
@@ -736,10 +736,10 @@ function Zl(t) {
|
|
|
736
736
|
from: "@iconify/vue"
|
|
737
737
|
};
|
|
738
738
|
}
|
|
739
|
-
function
|
|
740
|
-
return
|
|
739
|
+
function Fs() {
|
|
740
|
+
return Wl;
|
|
741
741
|
}
|
|
742
|
-
const
|
|
742
|
+
const Kl = [
|
|
743
743
|
"button",
|
|
744
744
|
"checkbox",
|
|
745
745
|
"color",
|
|
@@ -756,13 +756,13 @@ const Wl = [
|
|
|
756
756
|
"text",
|
|
757
757
|
"url",
|
|
758
758
|
...Oe
|
|
759
|
-
],
|
|
759
|
+
], Ql = { class: "cl-flex cl-flex-wrap cl-gap-2 cl-items-center cl-w-full" }, Jl = { class: "cl-flex cl-flex-1 cl-flex-wrap cl-items-center cl-mb-2 cl-mt-3 cl-relative md:cl-mt-0" }, Yl = { class: "cl-absolute cl-bg-grey-0 cl-leading-6 cl-ml-0 cl-px-3 cl-rounded-full cl-text-center cl-text-xs cl-top-full" }, Xl = {
|
|
760
760
|
key: 0,
|
|
761
761
|
class: "cl-w-full"
|
|
762
|
-
},
|
|
762
|
+
}, et = ["min", "max", "step", "disabled"], lt = { class: "cl-absolute cl-bg-grey-0 cl-leading-6 cl-ml-2 cl-px-3 cl-right-0 cl-rounded-full cl-text-center cl-text-xs cl-top-full" }, tt = {
|
|
763
763
|
key: 1,
|
|
764
764
|
class: "emphasis-danger text-sm w-full"
|
|
765
|
-
},
|
|
765
|
+
}, ot = /* @__PURE__ */ M({
|
|
766
766
|
__name: "cl-ui-slider",
|
|
767
767
|
props: {
|
|
768
768
|
value: {},
|
|
@@ -776,59 +776,60 @@ const Wl = [
|
|
|
776
776
|
emits: {
|
|
777
777
|
"update:value": null
|
|
778
778
|
},
|
|
779
|
-
setup(t, { expose: o, emit:
|
|
780
|
-
const
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
})
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
}
|
|
791
|
-
|
|
779
|
+
setup(t, { expose: o, emit: e }) {
|
|
780
|
+
const l = t;
|
|
781
|
+
ol((f) => ({
|
|
782
|
+
"519eafef": v.value
|
|
783
|
+
}));
|
|
784
|
+
const { n: s, t: g } = ne(), { debounce: n } = pl(), a = A(l.value), c = A(), u = N({
|
|
785
|
+
get: () => l.value,
|
|
786
|
+
set: (f) => e("update:value", f)
|
|
787
|
+
}), v = N(() => {
|
|
788
|
+
let f = (u.value - l.min) / (l.max - l.min) * 100;
|
|
789
|
+
return f < 35 && f > 0 ? f < 20 ? f += 0.5 : f += 0.25 : f > 65 && f < 100 && (f > 80 ? f -= 0.5 : f -= 0.25), `${f}%`;
|
|
790
|
+
}), h = N(() => l.min <= l.max && l.step > 0);
|
|
791
|
+
function r(f, w) {
|
|
792
|
+
const O = (f == null ? void 0 : f.value) ?? "", C = Math.max(Math.min(parseFloat(O) || l.min, l.max), l.min);
|
|
793
|
+
u.value = l.enforceStep ? Math.ceil(C / l.step) * l.step : C, ve(() => w());
|
|
794
|
+
}
|
|
795
|
+
return K(() => l.value, () => a.value = l.value), o({
|
|
792
796
|
focus() {
|
|
793
|
-
var
|
|
794
|
-
(
|
|
797
|
+
var f;
|
|
798
|
+
(f = c.value) == null || f.focus();
|
|
795
799
|
}
|
|
796
|
-
}), (
|
|
797
|
-
F(
|
|
798
|
-
[H, !
|
|
800
|
+
}), (f, w) => h.value ? (i(), b("div", te(ae({ key: 0 }, f.$attrs)), [
|
|
801
|
+
F(m("div", { class: "cl-bg-transparent cl-relative cl-text-center cl-text-sm" }, T(u.value), 513), [
|
|
802
|
+
[H, !f.showNumericInput]
|
|
799
803
|
]),
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
typeof u.value == "number" ? (i(),
|
|
804
|
-
|
|
804
|
+
m("div", Ql, [
|
|
805
|
+
m("div", Jl, [
|
|
806
|
+
m("span", Yl, T(d(s)(f.min, Number.isInteger(f.min) ? d(X).INTEGER : d(X).DECIMAL)), 1),
|
|
807
|
+
typeof u.value == "number" ? (i(), b("div", Xl, [
|
|
808
|
+
f.showNumericInput ? (i(), V(d(re), {
|
|
805
809
|
key: 0,
|
|
806
810
|
ref_key: "sliderRef",
|
|
807
811
|
ref: c,
|
|
808
812
|
modelValue: a.value,
|
|
809
|
-
"onUpdate:modelValue":
|
|
813
|
+
"onUpdate:modelValue": w[0] || (w[0] = (O) => a.value = O),
|
|
810
814
|
class: "cl-min-w-[8.5rem] cl-w-full",
|
|
811
815
|
"input-type": "number",
|
|
812
|
-
min:
|
|
813
|
-
max:
|
|
814
|
-
step:
|
|
815
|
-
disabled:
|
|
816
|
-
onInput:
|
|
817
|
-
}, null, 8, ["modelValue", "min", "max", "step", "disabled"])) : F((i(),
|
|
816
|
+
min: f.min,
|
|
817
|
+
max: f.max,
|
|
818
|
+
step: f.step,
|
|
819
|
+
disabled: f.disabled,
|
|
820
|
+
onInput: w[1] || (w[1] = (O) => d(n)(r, O.target, f.$forceUpdate))
|
|
821
|
+
}, null, 8, ["modelValue", "min", "max", "step", "disabled"])) : F((i(), b("input", {
|
|
818
822
|
key: 1,
|
|
819
823
|
ref_key: "sliderRef",
|
|
820
824
|
ref: c,
|
|
821
|
-
"onUpdate:modelValue":
|
|
822
|
-
class: "cl-align-middle cl-appearance-none cl-
|
|
823
|
-
style: Ke({
|
|
824
|
-
background: `linear-gradient(to right, ${g.value} 0%, ${g.value} ${b.value}%, white ${b.value}%, white 100%)`
|
|
825
|
-
}),
|
|
825
|
+
"onUpdate:modelValue": w[2] || (w[2] = (O) => u.value = O),
|
|
826
|
+
class: "cl-align-middle cl-appearance-none cl-border cl-border-grey-2 cl-delay-500 cl-ease-in cl-flex-1 cl-h-5 cl-mb-2 cl-min-w-[8.5rem] cl-outline-none cl-rounded-full cl-transition-colors cl-w-full",
|
|
826
827
|
type: "range",
|
|
827
|
-
min:
|
|
828
|
-
max:
|
|
829
|
-
step:
|
|
830
|
-
disabled:
|
|
831
|
-
}, null,
|
|
828
|
+
min: f.min,
|
|
829
|
+
max: f.max,
|
|
830
|
+
step: f.step,
|
|
831
|
+
disabled: f.disabled
|
|
832
|
+
}, null, 8, et)), [
|
|
832
833
|
[
|
|
833
834
|
nl,
|
|
834
835
|
u.value,
|
|
@@ -836,14 +837,14 @@ const Wl = [
|
|
|
836
837
|
{ number: !0 }
|
|
837
838
|
]
|
|
838
839
|
])
|
|
839
|
-
])) :
|
|
840
|
-
|
|
840
|
+
])) : S("", !0),
|
|
841
|
+
m("span", lt, T(d(s)(f.max, Number.isInteger(f.max) ? d(X).INTEGER : d(X).DECIMAL)), 1)
|
|
841
842
|
])
|
|
842
843
|
])
|
|
843
|
-
], 16)) : (i(),
|
|
844
|
+
], 16)) : (i(), b("div", tt, T(d(g)("slider.invalidProps")), 1));
|
|
844
845
|
}
|
|
845
846
|
});
|
|
846
|
-
const
|
|
847
|
+
const nt = /* @__PURE__ */ pe(ot, [["__scopeId", "data-v-71c5aea0"]]);
|
|
847
848
|
function Pe(t) {
|
|
848
849
|
let o = !1;
|
|
849
850
|
switch (t) {
|
|
@@ -861,7 +862,7 @@ function Pe(t) {
|
|
|
861
862
|
}
|
|
862
863
|
return o;
|
|
863
864
|
}
|
|
864
|
-
function
|
|
865
|
+
function st(t) {
|
|
865
866
|
return t === "number" || t === "range";
|
|
866
867
|
}
|
|
867
868
|
function Fe(t) {
|
|
@@ -881,7 +882,7 @@ function Fe(t) {
|
|
|
881
882
|
function we(t) {
|
|
882
883
|
return t === "button" || t === "submit" || t === "reset";
|
|
883
884
|
}
|
|
884
|
-
function
|
|
885
|
+
function at(t) {
|
|
885
886
|
let o;
|
|
886
887
|
switch (t) {
|
|
887
888
|
case "datetime":
|
|
@@ -898,28 +899,28 @@ function st(t) {
|
|
|
898
899
|
return o;
|
|
899
900
|
}
|
|
900
901
|
function He(t, o) {
|
|
901
|
-
const
|
|
902
|
-
return
|
|
902
|
+
const e = t.target;
|
|
903
|
+
return st(o) ? e.valueAsNumber : we(o) ? e.checked : e.value;
|
|
903
904
|
}
|
|
904
|
-
const
|
|
905
|
+
const rt = { class: "cl-flex cl-justify-between" }, it = { class: "cl-w-full" }, ct = {
|
|
905
906
|
key: 0,
|
|
906
907
|
class: "cl-block cl-left-auto cl-relative cl-text-danger-default"
|
|
907
|
-
},
|
|
908
|
+
}, ut = {
|
|
908
909
|
key: 1,
|
|
909
910
|
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"
|
|
910
|
-
},
|
|
911
|
+
}, dt = {
|
|
911
912
|
key: 0,
|
|
912
913
|
class: "cl-relative"
|
|
913
|
-
},
|
|
914
|
+
}, pt = ["type", "disabled", "min", "max", "minlength", "maxlength", "step", "placeholder", "accept", "name", "autocomplete"], ft = { key: 0 }, mt = {
|
|
914
915
|
key: 2,
|
|
915
916
|
class: "cl-h-[5.78rem] cl-pb-2 md:cl-h-20"
|
|
916
|
-
},
|
|
917
|
+
}, gt = { class: "cl-absolute cl-cursor-pointer cl-right-0.5 cl-text-grey-4 cl-text-sm cl-top-1" }, vt = {
|
|
917
918
|
key: 0,
|
|
918
919
|
class: "cl-bg-primary-lighter cl-px-2 cl-rounded-md cl-text-center cl-text-secondary-light cl-text-xs cl-w-auto cl-whitespace-pre-line"
|
|
919
|
-
},
|
|
920
|
+
}, bt = {
|
|
920
921
|
key: 1,
|
|
921
922
|
class: "cl-bg-danger-light cl-px-2 cl-rounded-md cl-text-center cl-text-danger-default cl-text-xs cl-w-auto cl-whitespace-pre-line"
|
|
922
|
-
},
|
|
923
|
+
}, ht = /* @__PURE__ */ M({
|
|
923
924
|
inheritAttrs: !1,
|
|
924
925
|
__name: "cl-ui-input",
|
|
925
926
|
props: {
|
|
@@ -951,49 +952,49 @@ const at = { class: "cl-flex cl-justify-between" }, rt = { class: "cl-w-full" },
|
|
|
951
952
|
hideRequiredAsterisk: { type: Boolean, default: !1 }
|
|
952
953
|
},
|
|
953
954
|
emits: ["update:model-value", "click", "focus", "input", "change", "validated"],
|
|
954
|
-
setup(t, { expose: o, emit:
|
|
955
|
-
const
|
|
956
|
-
get: () =>
|
|
955
|
+
setup(t, { expose: o, emit: e }) {
|
|
956
|
+
const l = t, s = A(null), g = A(!1), n = A(!1), a = N(k), c = N(() => l.placeholderText.trim() !== "" ? l.placeholderText : l.label), u = A(0), v = N({
|
|
957
|
+
get: () => l.modelValue,
|
|
957
958
|
set: (p) => y(p, !1)
|
|
958
|
-
}),
|
|
959
|
-
get: () =>
|
|
960
|
-
set: (p) =>
|
|
961
|
-
}), r =
|
|
959
|
+
}), h = N({
|
|
960
|
+
get: () => l.modelValue,
|
|
961
|
+
set: (p) => z(p)
|
|
962
|
+
}), r = N(() => typeof l.min == "number" ? l.min.toString() : l.min), f = N(() => typeof l.max == "number" ? l.max.toString() : l.max), w = N(() => typeof l.min == "number" || l.min === null ? l.min : parseFloat(l.min)), O = N(() => typeof l.max == "number" || l.max === null ? l.max : parseFloat(l.max)), C = N(() => l.messageWhenValid.trim() !== "" ? l.messageWhenValid : ""), B = A(!0), E = A([]), R = N(() => {
|
|
962
963
|
var p, q;
|
|
963
964
|
return [
|
|
964
|
-
...((p = E.value) == null ? void 0 : p.filter((
|
|
965
|
-
...((q =
|
|
965
|
+
...((p = E.value) == null ? void 0 : p.filter((U) => ((U == null ? void 0 : U.length) ?? 0) > 0)) ?? [],
|
|
966
|
+
...((q = l.externalErrors) == null ? void 0 : q.filter((U) => ((U == null ? void 0 : U.length) ?? 0) > 0)) ?? []
|
|
966
967
|
].join(`
|
|
967
968
|
`);
|
|
968
969
|
});
|
|
969
|
-
async function
|
|
970
|
-
|
|
970
|
+
async function z(p) {
|
|
971
|
+
l.validateOn === "input" && await D(p), e("update:model-value", p);
|
|
971
972
|
}
|
|
972
973
|
async function y(p, q) {
|
|
973
|
-
|
|
974
|
+
l.onInputFunction !== void 0 && (p = l.onInputFunction(p)), (q || l.validateOn === "input") && await D(p), e("update:model-value", p);
|
|
974
975
|
}
|
|
975
976
|
function D(p) {
|
|
976
977
|
const q = {
|
|
977
978
|
message: "",
|
|
978
979
|
valid: !0
|
|
979
|
-
},
|
|
980
|
-
|
|
980
|
+
}, U = [
|
|
981
|
+
l.customValidationFunction === null || l.customValidationFunction === void 0 ? new Promise((ge) => {
|
|
981
982
|
ge(q);
|
|
982
983
|
}) : new Promise((ge) => {
|
|
983
|
-
ge(
|
|
984
|
+
ge(l.customValidationFunction(l.label, p));
|
|
984
985
|
})
|
|
985
986
|
];
|
|
986
|
-
return (typeof p == "string" || typeof p == "number") && (
|
|
987
|
-
const
|
|
988
|
-
Me ? (E.value =
|
|
987
|
+
return (typeof p == "string" || typeof p == "number") && (U.push(Vl(l.min, l.inputType, l.label, p)), U.push(Dl(l.max, l.inputType, l.label, p))), l.isRequired && U.push(Ll(l.label, p)), l.inputType === "email" && typeof p == "string" && U.push(Pl(l.label, p)), Promise.all(U).then((ge) => {
|
|
988
|
+
const ll = [...ge.map((Te) => Te.message)], Me = ge.some((Te) => Te.message.length > 0 && Te.valid === !1) || l.externalErrors.length > 0;
|
|
989
|
+
Me ? (E.value = ll, e("validated", !1, p)) : (E.value = [], e("validated", !0, p)), B.value = !Me;
|
|
989
990
|
});
|
|
990
991
|
}
|
|
991
992
|
function J() {
|
|
992
993
|
let p = "";
|
|
993
|
-
return
|
|
994
|
+
return l.inputType === "color" && v.value && (l.disabled ? p = "background: #999999" : p = `background: ${v.value};`), p;
|
|
994
995
|
}
|
|
995
996
|
function Z(p) {
|
|
996
|
-
we(
|
|
997
|
+
we(l.inputType) ? (p.preventDefault(), e("click", p)) : l.inputType === "checkbox" && e("click", p);
|
|
997
998
|
}
|
|
998
999
|
function ce(p) {
|
|
999
1000
|
if (s.value) {
|
|
@@ -1001,7 +1002,7 @@ const at = { class: "cl-flex cl-justify-between" }, rt = { class: "cl-w-full" },
|
|
|
1001
1002
|
const q = {
|
|
1002
1003
|
target: s.value
|
|
1003
1004
|
};
|
|
1004
|
-
|
|
1005
|
+
e("input", q, s.value.valueAsNumber), e("change", p, s.value.valueAsNumber);
|
|
1005
1006
|
}
|
|
1006
1007
|
}
|
|
1007
1008
|
function je(p) {
|
|
@@ -1010,11 +1011,11 @@ const at = { class: "cl-flex cl-justify-between" }, rt = { class: "cl-w-full" },
|
|
|
1010
1011
|
const q = {
|
|
1011
1012
|
target: s.value
|
|
1012
1013
|
};
|
|
1013
|
-
|
|
1014
|
+
e("input", q, s.value.valueAsNumber), e("change", p, s.value.valueAsNumber);
|
|
1014
1015
|
}
|
|
1015
1016
|
}
|
|
1016
1017
|
function be(p) {
|
|
1017
|
-
|
|
1018
|
+
g.value = p;
|
|
1018
1019
|
}
|
|
1019
1020
|
function he() {
|
|
1020
1021
|
n.value = !0, be(!1);
|
|
@@ -1025,21 +1026,21 @@ const at = { class: "cl-flex cl-justify-between" }, rt = { class: "cl-w-full" },
|
|
|
1025
1026
|
function ye(p) {
|
|
1026
1027
|
p.target.blur();
|
|
1027
1028
|
}
|
|
1028
|
-
function
|
|
1029
|
-
var
|
|
1029
|
+
function k() {
|
|
1030
|
+
var U;
|
|
1030
1031
|
let p = !0;
|
|
1031
1032
|
const q = a.value;
|
|
1032
|
-
return
|
|
1033
|
+
return g.value ? p = q : n.value && ((U = v.value) == null ? void 0 : U.toString().trim()) === "" && (p = !1), !l.hideRequiredAsterisk && p;
|
|
1033
1034
|
}
|
|
1034
1035
|
async function x(p) {
|
|
1035
|
-
const q = He(p,
|
|
1036
|
-
|
|
1036
|
+
const q = He(p, l.inputType);
|
|
1037
|
+
l.validateOn === "change" && await D(q), e("change", p, q);
|
|
1037
1038
|
}
|
|
1038
1039
|
Se(() => {
|
|
1039
|
-
|
|
1040
|
-
}), K(() =>
|
|
1041
|
-
await D(
|
|
1042
|
-
}), K(() =>
|
|
1040
|
+
l.validateImmediately && y(l.modelValue, !0);
|
|
1041
|
+
}), K(() => l.isRequired, () => y(l.modelValue, !0)), K(() => l.externalErrors, async () => {
|
|
1042
|
+
await D(v.value), e("update:model-value", v.value);
|
|
1043
|
+
}), K(() => l.modelValue, () => y(l.modelValue, !0)), o({
|
|
1043
1044
|
focus() {
|
|
1044
1045
|
var p;
|
|
1045
1046
|
(p = s.value) == null || p.focus();
|
|
@@ -1050,35 +1051,35 @@ const at = { class: "cl-flex cl-justify-between" }, rt = { class: "cl-w-full" },
|
|
|
1050
1051
|
}
|
|
1051
1052
|
});
|
|
1052
1053
|
const Y = A(!1);
|
|
1053
|
-
return (p, q) => (i(),
|
|
1054
|
+
return (p, q) => (i(), b("div", ae({ ...p.$attrs, id: void 0 }, {
|
|
1054
1055
|
key: u.value,
|
|
1055
1056
|
class: "cl-align-top cl-border-none cl-inline-block cl-relative cl-text-left"
|
|
1056
1057
|
}), [
|
|
1057
|
-
|
|
1058
|
-
onMouseenter: q[12] || (q[12] = (
|
|
1059
|
-
onMouseleave: q[13] || (q[13] = (
|
|
1058
|
+
m("div", {
|
|
1059
|
+
onMouseenter: q[12] || (q[12] = (U) => be(!0)),
|
|
1060
|
+
onMouseleave: q[13] || (q[13] = (U) => be(!1))
|
|
1060
1061
|
}, [
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
F(
|
|
1062
|
+
m("div", rt, [
|
|
1063
|
+
m("div", it, [
|
|
1064
|
+
F(m("label", { class: "cl-block cl-mb-1 cl-text-grey-4 cl-text-xs cl-tracking-widest" }, T(p.label), 513), [
|
|
1064
1065
|
[H, p.showLabel && p.label !== ""]
|
|
1065
1066
|
])
|
|
1066
1067
|
]),
|
|
1067
|
-
p.isRequired && a.value ? (i(),
|
|
1068
|
-
p.isRequired && !a.value && p.requiredText.length ? (i(),
|
|
1068
|
+
p.isRequired && a.value ? (i(), b("label", ct, " * ")) : S("", !0),
|
|
1069
|
+
p.isRequired && !a.value && p.requiredText.length ? (i(), b("label", ut, T(p.requiredText), 1)) : S("", !0)
|
|
1069
1070
|
]),
|
|
1070
|
-
p.inputType !== "range" && !d(Fe)(p.inputType) ? (i(),
|
|
1071
|
-
F(
|
|
1071
|
+
p.inputType !== "range" && !d(Fe)(p.inputType) ? (i(), b("div", dt, [
|
|
1072
|
+
F(m("input", ae({
|
|
1072
1073
|
ref_key: "inputElement",
|
|
1073
1074
|
ref: s,
|
|
1074
|
-
"onUpdate:modelValue": q[0] || (q[0] = (
|
|
1075
|
+
"onUpdate:modelValue": q[0] || (q[0] = (U) => v.value = U)
|
|
1075
1076
|
}, p.$attrs, {
|
|
1076
1077
|
class: ["!cl-mb-1 cl-block cl-border cl-duration-300 cl-h-full cl-transition cl-w-full focus:cl-outline-none", {
|
|
1077
1078
|
"hover:!cl-border-grey-3": p.disabled === !1 && !d(we)(p.inputType),
|
|
1078
1079
|
"!cl-cursor-default": p.disabled,
|
|
1079
|
-
"!cl-border-danger-default": !
|
|
1080
|
-
"!cl-border-primary-default":
|
|
1081
|
-
"cl-border-grey-0 focus:cl-border-blue-light":
|
|
1080
|
+
"!cl-border-danger-default": !B.value,
|
|
1081
|
+
"!cl-border-primary-default": B.value && p.highlightWhenValid,
|
|
1082
|
+
"cl-border-grey-0 focus:cl-border-blue-light": B.value && !d(we)(p.inputType),
|
|
1082
1083
|
"!cl-p-2": p.inputType === "checkbox" || p.inputType === "radio",
|
|
1083
1084
|
"cl-p-3 cl-rounded-lg": !d(we)(p.inputType),
|
|
1084
1085
|
[`${p.inputSpecificClasses}`]: p.inputSpecificClasses !== ""
|
|
@@ -1095,33 +1096,33 @@ const at = { class: "cl-flex cl-justify-between" }, rt = { class: "cl-w-full" },
|
|
|
1095
1096
|
accept: p.fileExtensions,
|
|
1096
1097
|
name: p.group,
|
|
1097
1098
|
autocomplete: p.autocomplete,
|
|
1098
|
-
onClick: q[1] || (q[1] = (
|
|
1099
|
-
onFocus: q[2] || (q[2] = (
|
|
1100
|
-
onBlur: q[3] || (q[3] = W((
|
|
1099
|
+
onClick: q[1] || (q[1] = (U) => Z(U)),
|
|
1100
|
+
onFocus: q[2] || (q[2] = (U) => e("focus")),
|
|
1101
|
+
onBlur: q[3] || (q[3] = W((U) => {
|
|
1101
1102
|
he(), Ce();
|
|
1102
1103
|
}, ["self"])),
|
|
1103
1104
|
onMousewheelPassive: ye,
|
|
1104
|
-
onInput: q[4] || (q[4] = (
|
|
1105
|
-
|
|
1105
|
+
onInput: q[4] || (q[4] = (U) => {
|
|
1106
|
+
e("input", U, d(He)(U, p.inputType));
|
|
1106
1107
|
}),
|
|
1107
1108
|
onChange: x
|
|
1108
|
-
}), null, 16,
|
|
1109
|
-
[sl,
|
|
1109
|
+
}), null, 16, pt), [
|
|
1110
|
+
[sl, v.value]
|
|
1110
1111
|
]),
|
|
1111
|
-
|
|
1112
|
+
$(me, {
|
|
1112
1113
|
name: "fade",
|
|
1113
1114
|
duration: 300
|
|
1114
1115
|
}, {
|
|
1115
1116
|
default: L(() => [
|
|
1116
|
-
p.inputType === "number" && !p.disabled && p.showArrows ? F((i(),
|
|
1117
|
-
|
|
1117
|
+
p.inputType === "number" && !p.disabled && p.showArrows ? F((i(), b("div", ft, [
|
|
1118
|
+
$(d(_), {
|
|
1118
1119
|
icon: "ph:caret-up-bold",
|
|
1119
1120
|
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",
|
|
1120
1121
|
onClick: ce,
|
|
1121
1122
|
onMousedown: q[5] || (q[5] = W(() => {
|
|
1122
1123
|
}, ["prevent"]))
|
|
1123
1124
|
}),
|
|
1124
|
-
|
|
1125
|
+
$(d(_), {
|
|
1125
1126
|
icon: "ph:caret-down-bold",
|
|
1126
1127
|
class: "cl-absolute cl-bg-link-default cl-bottom-2 cl-right-1 cl-rounded-full cl-text-sm cl-text-white hover:cl-bg-link-light hover:cl-cursor-pointer",
|
|
1127
1128
|
onClick: je,
|
|
@@ -1129,58 +1130,58 @@ const at = { class: "cl-flex cl-justify-between" }, rt = { class: "cl-w-full" },
|
|
|
1129
1130
|
}, ["prevent"]))
|
|
1130
1131
|
})
|
|
1131
1132
|
], 512)), [
|
|
1132
|
-
[H,
|
|
1133
|
-
]) :
|
|
1133
|
+
[H, g.value]
|
|
1134
|
+
]) : S("", !0)
|
|
1134
1135
|
]),
|
|
1135
1136
|
_: 1
|
|
1136
1137
|
})
|
|
1137
|
-
])) : d(Fe)(p.inputType) ? (i(), V(d(
|
|
1138
|
+
])) : d(Fe)(p.inputType) ? (i(), V(d(Zl), ae({ key: 1 }, p.$attrs, {
|
|
1138
1139
|
ref_key: "inputElement",
|
|
1139
1140
|
ref: s,
|
|
1140
|
-
date:
|
|
1141
|
-
"onUpdate:date": q[7] || (q[7] = (
|
|
1141
|
+
date: h.value,
|
|
1142
|
+
"onUpdate:date": q[7] || (q[7] = (U) => h.value = U),
|
|
1142
1143
|
class: ["cl-block cl-duration-300 cl-h-fit cl-mb-1 cl-rounded-lg cl-text-sm cl-transition cl-w-full focus:cl-outline-none", {
|
|
1143
1144
|
"hover:cl-border-grey-3": !p.disabled,
|
|
1144
|
-
"!cl-border-danger-default": !
|
|
1145
|
-
"!cl-border-primary-default":
|
|
1145
|
+
"!cl-border-danger-default": !B.value,
|
|
1146
|
+
"!cl-border-primary-default": B.value && p.highlightWhenValid
|
|
1146
1147
|
}],
|
|
1147
1148
|
disabled: p.disabled,
|
|
1148
1149
|
required: p.isRequired,
|
|
1149
|
-
type: d(
|
|
1150
|
+
type: d(at)(p.inputType),
|
|
1150
1151
|
"time-zone": p.timeZone,
|
|
1151
1152
|
min: r.value,
|
|
1152
|
-
max:
|
|
1153
|
+
max: f.value,
|
|
1153
1154
|
placeholder: c.value,
|
|
1154
1155
|
onBlur: W(he, ["self"]),
|
|
1155
|
-
onFocus: q[8] || (q[8] = (
|
|
1156
|
-
}), null, 16, ["date", "class", "disabled", "required", "type", "time-zone", "min", "max", "placeholder", "onBlur"])) : p.inputType === "range" && typeof
|
|
1157
|
-
|
|
1158
|
-
|
|
1156
|
+
onFocus: q[8] || (q[8] = (U) => e("focus"))
|
|
1157
|
+
}), null, 16, ["date", "class", "disabled", "required", "type", "time-zone", "min", "max", "placeholder", "onBlur"])) : p.inputType === "range" && typeof v.value == "number" ? (i(), b("div", mt, [
|
|
1158
|
+
m("div", gt, [
|
|
1159
|
+
$(d(_), {
|
|
1159
1160
|
icon: "ph:arrows-left-right",
|
|
1160
|
-
onClick: q[9] || (q[9] = (
|
|
1161
|
+
onClick: q[9] || (q[9] = (U) => Y.value = !Y.value)
|
|
1161
1162
|
})
|
|
1162
1163
|
]),
|
|
1163
|
-
|
|
1164
|
+
$(d(nt), {
|
|
1164
1165
|
ref_key: "inputElement",
|
|
1165
1166
|
ref: s,
|
|
1166
|
-
value:
|
|
1167
|
-
"onUpdate:value": q[10] || (q[10] = (
|
|
1168
|
-
min:
|
|
1167
|
+
value: v.value,
|
|
1168
|
+
"onUpdate:value": q[10] || (q[10] = (U) => v.value = U),
|
|
1169
|
+
min: w.value ?? 0,
|
|
1169
1170
|
max: O.value ?? 1e3,
|
|
1170
1171
|
step: p.step,
|
|
1171
1172
|
disabled: p.disabled,
|
|
1172
1173
|
"show-numeric-input": Y.value,
|
|
1173
1174
|
onBlur: W(he, ["self"]),
|
|
1174
|
-
onFocus: q[11] || (q[11] = (
|
|
1175
|
+
onFocus: q[11] || (q[11] = (U) => e("focus"))
|
|
1175
1176
|
}, null, 8, ["value", "min", "max", "step", "disabled", "show-numeric-input", "onBlur"])
|
|
1176
|
-
])) :
|
|
1177
|
+
])) : S("", !0)
|
|
1177
1178
|
], 32),
|
|
1178
|
-
|
|
1179
|
-
!
|
|
1179
|
+
B.value && C.value ? (i(), b("div", vt, T(C.value), 1)) : S("", !0),
|
|
1180
|
+
!B.value && R.value.length > 0 && p.showValidationMessages ? (i(), b("div", bt, T(R.value), 1)) : S("", !0)
|
|
1180
1181
|
], 16));
|
|
1181
1182
|
}
|
|
1182
1183
|
});
|
|
1183
|
-
const re = /* @__PURE__ */ pe(
|
|
1184
|
+
const re = /* @__PURE__ */ pe(ht, [["__scopeId", "data-v-3837efd9"]]), yt = { 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" }, wt = ["onKeypress"], $t = { class: "cl-overflow-y-auto cl-overscroll-y-none cl-p-2 cl-w-full" }, Xe = /* @__PURE__ */ M({
|
|
1184
1185
|
inheritAttrs: !1,
|
|
1185
1186
|
__name: "cl-ui-modal",
|
|
1186
1187
|
props: {
|
|
@@ -1189,23 +1190,23 @@ const re = /* @__PURE__ */ pe(bt, [["__scopeId", "data-v-3837efd9"]]), ht = { cl
|
|
|
1189
1190
|
size: { default: "medium" }
|
|
1190
1191
|
},
|
|
1191
1192
|
setup(t) {
|
|
1192
|
-
const o = t,
|
|
1193
|
-
function
|
|
1194
|
-
|
|
1193
|
+
const o = t, e = A(!1);
|
|
1194
|
+
function l() {
|
|
1195
|
+
e.value = !0, document.addEventListener("keydown", g);
|
|
1195
1196
|
}
|
|
1196
1197
|
function s() {
|
|
1197
|
-
o.preventClose || (
|
|
1198
|
+
o.preventClose || (e.value = !1, document.removeEventListener("keydown", g));
|
|
1198
1199
|
}
|
|
1199
|
-
function
|
|
1200
|
+
function g(n) {
|
|
1200
1201
|
n.key === "Escape" && s();
|
|
1201
1202
|
}
|
|
1202
|
-
return (n, a) => (i(),
|
|
1203
|
-
j(n.$slots, "trigger", te(se({ open:
|
|
1203
|
+
return (n, a) => (i(), b(P, null, [
|
|
1204
|
+
j(n.$slots, "trigger", te(se({ open: l }))),
|
|
1204
1205
|
(i(), V(_e, { to: "body" }, [
|
|
1205
|
-
|
|
1206
|
+
$(me, { name: "fade" }, {
|
|
1206
1207
|
default: L(() => [
|
|
1207
|
-
F(
|
|
1208
|
-
|
|
1208
|
+
F(m("div", yt, [
|
|
1209
|
+
m("div", ae(n.$attrs, {
|
|
1209
1210
|
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)]", {
|
|
1210
1211
|
"lg:cl-w-2/12 cl-w-10/12": n.size === "x-small",
|
|
1211
1212
|
"cl-w-6/12": n.size === "small",
|
|
@@ -1213,7 +1214,7 @@ const re = /* @__PURE__ */ pe(bt, [["__scopeId", "data-v-3837efd9"]]), ht = { cl
|
|
|
1213
1214
|
"cl-w-10/12": n.size === "large"
|
|
1214
1215
|
}]
|
|
1215
1216
|
}), [
|
|
1216
|
-
F(
|
|
1217
|
+
F(m("div", {
|
|
1217
1218
|
class: I(["cl-absolute cl-cursor-pointer cl-right-4 cl-top-4 cl-transition-colors cl-w-3", {
|
|
1218
1219
|
"cl-text-white hover:cl-text-off-white": n.headerColour === "secondary" || n.headerColour === "primary",
|
|
1219
1220
|
"cl-text-black hover:cl-text-grey-7": n.headerColour === "white"
|
|
@@ -1222,11 +1223,11 @@ const re = /* @__PURE__ */ pe(bt, [["__scopeId", "data-v-3837efd9"]]), ht = { cl
|
|
|
1222
1223
|
onKeypress: $e(s, ["enter"]),
|
|
1223
1224
|
onClick: s
|
|
1224
1225
|
}, [
|
|
1225
|
-
|
|
1226
|
-
], 42,
|
|
1226
|
+
$(d(_), { icon: "ph:x" })
|
|
1227
|
+
], 42, wt), [
|
|
1227
1228
|
[H, !n.preventClose]
|
|
1228
1229
|
]),
|
|
1229
|
-
|
|
1230
|
+
m("div", {
|
|
1230
1231
|
class: I(["cl-leading-[2.75rem] cl-min-h-12 cl-overflow-hidden cl-pl-3 cl-pr-8 cl-text-2xl cl-w-full", {
|
|
1231
1232
|
"cl-border-b cl-border-grey-2": n.headerColour === "white",
|
|
1232
1233
|
"cl-bg-secondary-default cl-text-white": n.headerColour === "secondary",
|
|
@@ -1235,13 +1236,13 @@ const re = /* @__PURE__ */ pe(bt, [["__scopeId", "data-v-3837efd9"]]), ht = { cl
|
|
|
1235
1236
|
}, [
|
|
1236
1237
|
j(n.$slots, "title")
|
|
1237
1238
|
], 2),
|
|
1238
|
-
|
|
1239
|
+
m("div", $t, [
|
|
1239
1240
|
j(n.$slots, "default", te(se({ close: s })))
|
|
1240
1241
|
]),
|
|
1241
1242
|
j(n.$slots, "footer", te(se({ close: s })))
|
|
1242
1243
|
], 16)
|
|
1243
1244
|
], 512), [
|
|
1244
|
-
[H,
|
|
1245
|
+
[H, e.value]
|
|
1245
1246
|
])
|
|
1246
1247
|
]),
|
|
1247
1248
|
_: 3
|
|
@@ -1249,7 +1250,7 @@ const re = /* @__PURE__ */ pe(bt, [["__scopeId", "data-v-3837efd9"]]), ht = { cl
|
|
|
1249
1250
|
]))
|
|
1250
1251
|
], 64));
|
|
1251
1252
|
}
|
|
1252
|
-
}),
|
|
1253
|
+
}), kt = { class: "cl-bg-grey-0 cl-flex cl-p-1 cl-text-left" }, Ct = {
|
|
1253
1254
|
key: 0,
|
|
1254
1255
|
class: "cl-w-1/2"
|
|
1255
1256
|
}, Ee = /* @__PURE__ */ M({
|
|
@@ -1263,19 +1264,19 @@ const re = /* @__PURE__ */ pe(bt, [["__scopeId", "data-v-3837efd9"]]), ht = { cl
|
|
|
1263
1264
|
"clear-object": null
|
|
1264
1265
|
},
|
|
1265
1266
|
setup(t) {
|
|
1266
|
-
return (o,
|
|
1267
|
-
o.additionalText !== "" ? (i(),
|
|
1268
|
-
|
|
1267
|
+
return (o, e) => (i(), b("div", kt, [
|
|
1268
|
+
o.additionalText !== "" ? (i(), b("div", Ct, T(o.additionalText), 1)) : S("", !0),
|
|
1269
|
+
m("div", {
|
|
1269
1270
|
class: I({
|
|
1270
1271
|
"cl-w-1/2": o.additionalText !== "",
|
|
1271
1272
|
"cl-w-full": o.additionalText === ""
|
|
1272
1273
|
})
|
|
1273
1274
|
}, T(o.text), 3),
|
|
1274
|
-
F(
|
|
1275
|
+
F(m("div", {
|
|
1275
1276
|
class: "cl-cursor-pointer cl-float-right",
|
|
1276
|
-
onMousedown:
|
|
1277
|
+
onMousedown: e[0] || (e[0] = (l) => o.$emit("clear-object"))
|
|
1277
1278
|
}, [
|
|
1278
|
-
|
|
1279
|
+
$(d(_), {
|
|
1279
1280
|
class: "cl-mt-1 cl-transition-colors hover:cl-text-link-default",
|
|
1280
1281
|
icon: "ph:x"
|
|
1281
1282
|
})
|
|
@@ -1284,10 +1285,10 @@ const re = /* @__PURE__ */ pe(bt, [["__scopeId", "data-v-3837efd9"]]), ht = { cl
|
|
|
1284
1285
|
])
|
|
1285
1286
|
]));
|
|
1286
1287
|
}
|
|
1287
|
-
}),
|
|
1288
|
+
}), Tt = {
|
|
1288
1289
|
key: 0,
|
|
1289
1290
|
class: "cl-w-1/2"
|
|
1290
|
-
},
|
|
1291
|
+
}, Et = { class: "cl-float-right cl-py-1" }, xe = /* @__PURE__ */ M({
|
|
1291
1292
|
__name: "cl-ui-combo-box-selectable",
|
|
1292
1293
|
props: {
|
|
1293
1294
|
isCreateNewOption: { type: Boolean, default: !1 },
|
|
@@ -1302,47 +1303,47 @@ const re = /* @__PURE__ */ pe(bt, [["__scopeId", "data-v-3837efd9"]]), ht = { cl
|
|
|
1302
1303
|
"option-highlighted": null
|
|
1303
1304
|
},
|
|
1304
1305
|
setup(t, { emit: o }) {
|
|
1305
|
-
const
|
|
1306
|
+
const e = t, l = N(() => {
|
|
1306
1307
|
var u;
|
|
1307
|
-
return ((u =
|
|
1308
|
-
}), s =
|
|
1308
|
+
return ((u = e.option) == null ? void 0 : u.name) ?? e.text;
|
|
1309
|
+
}), s = N(() => {
|
|
1309
1310
|
var u;
|
|
1310
|
-
return ((u =
|
|
1311
|
-
}),
|
|
1311
|
+
return ((u = e.option) == null ? void 0 : u.parentName) ?? "";
|
|
1312
|
+
}), g = A(!1);
|
|
1312
1313
|
function n() {
|
|
1313
1314
|
var u;
|
|
1314
|
-
|
|
1315
|
+
e.isCreateNewOption === !0 ? o("create-object") : o("select-object", (u = e.option) == null ? void 0 : u.id);
|
|
1315
1316
|
}
|
|
1316
1317
|
function a(u) {
|
|
1317
|
-
u === !0 ? (
|
|
1318
|
+
u === !0 ? (g.value = !0, o("option-highlighted", e.index)) : e.index !== e.selectedIndex && (g.value = !1);
|
|
1318
1319
|
}
|
|
1319
1320
|
function c() {
|
|
1320
|
-
|
|
1321
|
+
e.selectedIndex === e.index ? g.value = !0 : g.value = !1;
|
|
1321
1322
|
}
|
|
1322
|
-
return K(() =>
|
|
1323
|
-
var
|
|
1324
|
-
return i(),
|
|
1323
|
+
return K(() => e.selectedIndex, () => c()), (u, v) => {
|
|
1324
|
+
var h, r;
|
|
1325
|
+
return i(), b("div", {
|
|
1325
1326
|
class: I(["cl-cursor-pointer cl-duration-75 cl-flex cl-p-1 cl-text-left cl-transition-colors", {
|
|
1326
|
-
"cl-bg-white":
|
|
1327
|
-
"cl-bg-link-light cl-text-white cl-opacity-90":
|
|
1328
|
-
"cl-bg-primary-default cl-text-white cl-opacity-90":
|
|
1327
|
+
"cl-bg-white": g.value === !1,
|
|
1328
|
+
"cl-bg-link-light cl-text-white cl-opacity-90": g.value && u.isCreateNewOption === !1,
|
|
1329
|
+
"cl-bg-primary-default cl-text-white cl-opacity-90": g.value && u.isCreateNewOption
|
|
1329
1330
|
}]),
|
|
1330
1331
|
onMousedown: n,
|
|
1331
|
-
onMousemove:
|
|
1332
|
-
onMouseleave:
|
|
1332
|
+
onMousemove: v[0] || (v[0] = (f) => a(!0)),
|
|
1333
|
+
onMouseleave: v[1] || (v[1] = (f) => a(!1))
|
|
1333
1334
|
}, [
|
|
1334
|
-
u.option !== null && ((
|
|
1335
|
-
|
|
1335
|
+
u.option !== null && ((h = u.option) == null ? void 0 : h.parentId) !== 0 && ((r = u.option) == null ? void 0 : r.parentId) !== void 0 ? (i(), b("div", Tt, T(s.value), 1)) : S("", !0),
|
|
1336
|
+
m("div", {
|
|
1336
1337
|
class: I({
|
|
1337
1338
|
"cl-w-1/2": s.value !== "",
|
|
1338
1339
|
"cl-w-full": s.value === ""
|
|
1339
1340
|
})
|
|
1340
|
-
}, T(
|
|
1341
|
-
F(
|
|
1342
|
-
|
|
1341
|
+
}, T(l.value), 3),
|
|
1342
|
+
F(m("div", Et, [
|
|
1343
|
+
$(d(_), {
|
|
1343
1344
|
class: I(["cl-transition-colors", {
|
|
1344
|
-
"cl-text-white":
|
|
1345
|
-
"cl-text-black ": !
|
|
1345
|
+
"cl-text-white": g.value,
|
|
1346
|
+
"cl-text-black ": !g.value
|
|
1346
1347
|
}]),
|
|
1347
1348
|
icon: "ph:plus"
|
|
1348
1349
|
}, null, 8, ["class"])
|
|
@@ -1352,7 +1353,7 @@ const re = /* @__PURE__ */ pe(bt, [["__scopeId", "data-v-3837efd9"]]), ht = { cl
|
|
|
1352
1353
|
], 34);
|
|
1353
1354
|
};
|
|
1354
1355
|
}
|
|
1355
|
-
}),
|
|
1356
|
+
}), Ot = ["onKeyup"], At = { class: "cl-bg-white cl-flex cl-p-2 cl-pb-1 cl-sticky cl-top-0 cl-w-full cl-z-10" }, qt = { key: 5 }, St = /* @__PURE__ */ M({
|
|
1356
1357
|
__name: "cl-ui-combo-box-search",
|
|
1357
1358
|
props: {
|
|
1358
1359
|
loading: { type: Boolean, default: !1 },
|
|
@@ -1374,29 +1375,29 @@ const re = /* @__PURE__ */ pe(bt, [["__scopeId", "data-v-3837efd9"]]), ht = { cl
|
|
|
1374
1375
|
"hide-dropdown": null
|
|
1375
1376
|
},
|
|
1376
1377
|
setup(t, { emit: o }) {
|
|
1377
|
-
const
|
|
1378
|
+
const e = t, { t: l } = ne(), s = A(""), g = A(!1), n = A(-1), a = N(() => g.value ? -1 : 0), c = A();
|
|
1378
1379
|
function u(y) {
|
|
1379
1380
|
(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);
|
|
1380
1381
|
}
|
|
1381
|
-
function
|
|
1382
|
+
function v(y) {
|
|
1382
1383
|
o("select-object", y);
|
|
1383
1384
|
}
|
|
1384
|
-
function
|
|
1385
|
+
function h() {
|
|
1385
1386
|
o("create-object", s.value), r();
|
|
1386
1387
|
}
|
|
1387
1388
|
function r() {
|
|
1388
1389
|
o("hide-dropdown");
|
|
1389
1390
|
}
|
|
1390
|
-
function
|
|
1391
|
-
n.value <
|
|
1391
|
+
function f(y) {
|
|
1392
|
+
n.value < e.results.length - 1 ? (n.value === -2 && s.value === "" && n.value++, n.value++) : n.value = y, B();
|
|
1392
1393
|
}
|
|
1393
|
-
function
|
|
1394
|
-
n.value > y ? n.value-- : n.value =
|
|
1394
|
+
function w(y) {
|
|
1395
|
+
n.value > y ? n.value-- : n.value = e.results.length - 1, B();
|
|
1395
1396
|
}
|
|
1396
1397
|
function O() {
|
|
1397
|
-
n.value >= 0 &&
|
|
1398
|
+
n.value >= 0 && e.results !== void 0 ? v(e.results[n.value].id) : n.value === -1 && h();
|
|
1398
1399
|
}
|
|
1399
|
-
function
|
|
1400
|
+
function C(y) {
|
|
1400
1401
|
if (y.key === "Tab" && y.shiftKey === !0) {
|
|
1401
1402
|
const D = document.getElementsByTagName("input");
|
|
1402
1403
|
let J = -1;
|
|
@@ -1405,43 +1406,43 @@ const re = /* @__PURE__ */ pe(bt, [["__scopeId", "data-v-3837efd9"]]), ht = { cl
|
|
|
1405
1406
|
J >= 0 && (D[J].focus(), r());
|
|
1406
1407
|
}
|
|
1407
1408
|
}
|
|
1408
|
-
function
|
|
1409
|
+
function B() {
|
|
1409
1410
|
var y;
|
|
1410
|
-
|
|
1411
|
+
e.results && e.results.length > 1 && ((y = c.value) == null || y.scrollTo(0, (n.value + 1) * 34 - 34 * 2));
|
|
1411
1412
|
}
|
|
1412
1413
|
function E() {
|
|
1413
1414
|
let y = !1;
|
|
1414
|
-
|
|
1415
|
+
e.results !== null && e.results.length === 1 && (y = s.value.toUpperCase().trim() === e.results[0].name.toUpperCase().trim()), g.value = e.canCreateNewObject === !0 && e.errorMessage === "" && s.value.trim() !== "" && y === !1;
|
|
1415
1416
|
}
|
|
1416
|
-
function
|
|
1417
|
+
function R(y) {
|
|
1417
1418
|
n.value = y;
|
|
1418
1419
|
}
|
|
1419
|
-
function
|
|
1420
|
-
|
|
1420
|
+
function z() {
|
|
1421
|
+
e.isVisible === !0 && (s.value = "", u(), ve(() => {
|
|
1421
1422
|
var y, D;
|
|
1422
1423
|
return (D = (y = c.value) == null ? void 0 : y.querySelector("input")) == null ? void 0 : D.focus();
|
|
1423
1424
|
}));
|
|
1424
1425
|
}
|
|
1425
|
-
return K(() =>
|
|
1426
|
+
return K(() => e.results, () => E()), K(() => e.errorMessage, () => E()), K(() => e.isVisible, () => z()), Se(() => {
|
|
1426
1427
|
var y;
|
|
1427
|
-
return (y = c.value) == null ? void 0 : y.addEventListener("keydown",
|
|
1428
|
+
return (y = c.value) == null ? void 0 : y.addEventListener("keydown", C);
|
|
1428
1429
|
}), Re(() => {
|
|
1429
1430
|
var y;
|
|
1430
|
-
return (y = c.value) == null ? void 0 : y.removeEventListener("keydown",
|
|
1431
|
+
return (y = c.value) == null ? void 0 : y.removeEventListener("keydown", C);
|
|
1431
1432
|
}), (y, D) => {
|
|
1432
1433
|
var J;
|
|
1433
|
-
return i(),
|
|
1434
|
+
return i(), b("div", {
|
|
1434
1435
|
ref_key: "container",
|
|
1435
1436
|
ref: c,
|
|
1436
1437
|
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",
|
|
1437
1438
|
onKeydown: [
|
|
1438
|
-
D[2] || (D[2] = $e(W((Z) =>
|
|
1439
|
-
D[3] || (D[3] = $e(W((Z) =>
|
|
1439
|
+
D[2] || (D[2] = $e(W((Z) => w(a.value), ["prevent", "stop"]), ["up"])),
|
|
1440
|
+
D[3] || (D[3] = $e(W((Z) => f(a.value), ["prevent", "stop"]), ["down"]))
|
|
1440
1441
|
],
|
|
1441
1442
|
onKeyup: $e(W(O, ["prevent", "stop"]), ["enter"])
|
|
1442
1443
|
}, [
|
|
1443
|
-
|
|
1444
|
-
|
|
1444
|
+
m("div", At, [
|
|
1445
|
+
$(re, {
|
|
1445
1446
|
modelValue: s.value,
|
|
1446
1447
|
"onUpdate:modelValue": D[0] || (D[0] = (Z) => s.value = Z),
|
|
1447
1448
|
class: "!cl-mr-0 cl-w-full",
|
|
@@ -1450,7 +1451,7 @@ const re = /* @__PURE__ */ pe(bt, [["__scopeId", "data-v-3837efd9"]]), ht = { cl
|
|
|
1450
1451
|
onKeyup: u,
|
|
1451
1452
|
onBlur: r
|
|
1452
1453
|
}, null, 8, ["modelValue", "placeholder-text"]),
|
|
1453
|
-
F(
|
|
1454
|
+
F($(Ne, { class: "cl-absolute cl-ml-2 cl-mt-11" }, null, 512), [
|
|
1454
1455
|
[H, y.loading]
|
|
1455
1456
|
])
|
|
1456
1457
|
]),
|
|
@@ -1459,47 +1460,47 @@ const re = /* @__PURE__ */ pe(bt, [["__scopeId", "data-v-3837efd9"]]), ht = { cl
|
|
|
1459
1460
|
"show-clear-button": y.canClearSelectedObject,
|
|
1460
1461
|
text: y.currentObjectName,
|
|
1461
1462
|
onClearObject: D[1] || (D[1] = (Z) => y.$emit("clear-object"))
|
|
1462
|
-
}, null, 8, ["show-clear-button", "text"])) :
|
|
1463
|
+
}, null, 8, ["show-clear-button", "text"])) : S("", !0),
|
|
1463
1464
|
y.objectParentType !== "" && y.results !== void 0 && y.results.length > 0 && y.errorMessage === "" ? (i(), V(Ee, {
|
|
1464
1465
|
key: 1,
|
|
1465
1466
|
text: y.objectType,
|
|
1466
1467
|
"additional-text": y.objectParentType,
|
|
1467
1468
|
class: "cl-bg-grey-2 cl-mt-1"
|
|
1468
|
-
}, null, 8, ["text", "additional-text"])) :
|
|
1469
|
+
}, null, 8, ["text", "additional-text"])) : S("", !0),
|
|
1469
1470
|
y.results !== null && ((J = y.results) == null ? void 0 : J.length) === 0 && s.value.trim() !== "" && y.canCreateNewObject === !1 && y.errorMessage === "" ? (i(), V(Ee, {
|
|
1470
1471
|
key: 2,
|
|
1471
|
-
text: d(
|
|
1472
|
-
}, null, 8, ["text"])) :
|
|
1472
|
+
text: d(l)("comboBox.noResults", { value: s.value })
|
|
1473
|
+
}, null, 8, ["text"])) : S("", !0),
|
|
1473
1474
|
y.errorMessage !== "" ? (i(), V(Ee, {
|
|
1474
1475
|
key: 3,
|
|
1475
1476
|
class: "!cl-bg-danger-light cl-border-danger-light cl-rounded cl-text-danger-dark",
|
|
1476
|
-
text: d(
|
|
1477
|
-
}, null, 8, ["text"])) :
|
|
1478
|
-
|
|
1477
|
+
text: d(l)("comboBox.errorMessage", { error: y.errorMessage })
|
|
1478
|
+
}, null, 8, ["text"])) : S("", !0),
|
|
1479
|
+
g.value ? (i(), V(xe, {
|
|
1479
1480
|
key: 4,
|
|
1480
1481
|
"is-create-new-option": !0,
|
|
1481
|
-
text: d(
|
|
1482
|
+
text: d(l)("comboBox.addPrompt", { value: s.value, object: y.objectType }),
|
|
1482
1483
|
index: -1,
|
|
1483
1484
|
"selected-index": n.value,
|
|
1484
1485
|
class: "cl-px-2",
|
|
1485
|
-
onCreateObject:
|
|
1486
|
-
onOptionHighlighted:
|
|
1487
|
-
}, null, 8, ["text", "selected-index"])) :
|
|
1488
|
-
y.errorMessage === "" && y.results !== null ? (i(),
|
|
1489
|
-
(i(!0),
|
|
1486
|
+
onCreateObject: h,
|
|
1487
|
+
onOptionHighlighted: R
|
|
1488
|
+
}, null, 8, ["text", "selected-index"])) : S("", !0),
|
|
1489
|
+
y.errorMessage === "" && y.results !== null ? (i(), b("div", qt, [
|
|
1490
|
+
(i(!0), b(P, null, Q(y.results, (Z, ce) => (i(), V(xe, {
|
|
1490
1491
|
key: ce,
|
|
1491
1492
|
option: Z,
|
|
1492
1493
|
index: ce,
|
|
1493
1494
|
class: "cl-px-2",
|
|
1494
1495
|
"selected-index": n.value,
|
|
1495
|
-
onSelectObject:
|
|
1496
|
-
onOptionHighlighted:
|
|
1496
|
+
onSelectObject: v,
|
|
1497
|
+
onOptionHighlighted: R
|
|
1497
1498
|
}, null, 8, ["option", "index", "selected-index"]))), 128))
|
|
1498
|
-
])) :
|
|
1499
|
-
], 40,
|
|
1499
|
+
])) : S("", !0)
|
|
1500
|
+
], 40, Ot);
|
|
1500
1501
|
};
|
|
1501
1502
|
}
|
|
1502
|
-
}),
|
|
1503
|
+
}), Nt = { class: "cl-flex" }, jt = { class: "cl-relative cl-right-20 cl-top-0.5" }, It = { class: "cl-absolute cl-flex cl-float-right cl-font-semibold cl-mt-2 cl-text-danger-default cl-text-sm cl-z-10" }, _t = { class: "cl-min-h-[16rem] cl-mx-4" }, Rt = { class: "cl-p-2 cl-text-right cl-w-full" }, zt = /* @__PURE__ */ M({
|
|
1503
1504
|
__name: "cl-ui-combo-box",
|
|
1504
1505
|
props: {
|
|
1505
1506
|
loading: { type: Boolean, default: !1 },
|
|
@@ -1526,187 +1527,187 @@ const re = /* @__PURE__ */ pe(bt, [["__scopeId", "data-v-3837efd9"]]), ht = { cl
|
|
|
1526
1527
|
"create-parent-object": null,
|
|
1527
1528
|
"update:current-object": null
|
|
1528
1529
|
},
|
|
1529
|
-
setup(t, { expose: o, emit:
|
|
1530
|
-
const
|
|
1531
|
-
get: () =>
|
|
1532
|
-
set: (
|
|
1533
|
-
}), u = A(null),
|
|
1534
|
-
function
|
|
1530
|
+
setup(t, { expose: o, emit: e }) {
|
|
1531
|
+
const l = t, s = N(() => l.placeholderText ? l.placeholderText : n("comboBox.emptyHintText", { object: l.objectType })), g = N(() => l.searchHint ? l.searchHint : n("comboBox.searchHint", { object: l.objectType })), { t: n } = ne(), a = A(!1), c = N({
|
|
1532
|
+
get: () => l.currentObject,
|
|
1533
|
+
set: (k) => e("update:current-object", k)
|
|
1534
|
+
}), u = A(null), v = A(null), h = N(() => he()), r = A(""), f = A(""), w = A(), O = A(!0), C = A(!1);
|
|
1535
|
+
function B(k) {
|
|
1535
1536
|
var Y, p;
|
|
1536
1537
|
const x = ((Y = ye.value) == null ? void 0 : Y.getBoundingClientRect().top) || 0;
|
|
1537
|
-
|
|
1538
|
+
C.value = window.innerHeight - x < 280, l.disabled || (typeof k < "u" ? a.value = k : a.value = !a.value), (p = u.value) == null || p.blur();
|
|
1538
1539
|
}
|
|
1539
|
-
function E(
|
|
1540
|
-
r.value =
|
|
1540
|
+
function E(k) {
|
|
1541
|
+
r.value = k, e("search", k);
|
|
1541
1542
|
}
|
|
1542
|
-
function
|
|
1543
|
-
|
|
1543
|
+
function R(k) {
|
|
1544
|
+
f.value = k, e("search-parent", k);
|
|
1544
1545
|
}
|
|
1545
|
-
function
|
|
1546
|
-
c.value = null,
|
|
1546
|
+
function z() {
|
|
1547
|
+
c.value = null, B(!1);
|
|
1547
1548
|
}
|
|
1548
|
-
function y(
|
|
1549
|
-
const x = D(
|
|
1550
|
-
c.value = x,
|
|
1549
|
+
function y(k) {
|
|
1550
|
+
const x = D(k);
|
|
1551
|
+
c.value = x, B(!1);
|
|
1551
1552
|
}
|
|
1552
|
-
function D(
|
|
1553
|
+
function D(k) {
|
|
1553
1554
|
let x = null;
|
|
1554
|
-
if (
|
|
1555
|
-
for (let Y = 0; Y <
|
|
1556
|
-
if (
|
|
1557
|
-
x =
|
|
1555
|
+
if (l.results !== null) {
|
|
1556
|
+
for (let Y = 0; Y < l.results.length; Y++)
|
|
1557
|
+
if (l.results[Y].id === k) {
|
|
1558
|
+
x = l.results[Y];
|
|
1558
1559
|
break;
|
|
1559
1560
|
}
|
|
1560
1561
|
}
|
|
1561
1562
|
return x;
|
|
1562
1563
|
}
|
|
1563
1564
|
function J() {
|
|
1564
|
-
var
|
|
1565
|
-
|
|
1565
|
+
var k;
|
|
1566
|
+
w.value = {
|
|
1566
1567
|
name: r.value,
|
|
1567
|
-
parentId: ((
|
|
1568
|
-
},
|
|
1568
|
+
parentId: ((k = v.value) == null ? void 0 : k.id) ?? 0
|
|
1569
|
+
}, e("create-object", w.value);
|
|
1569
1570
|
}
|
|
1570
1571
|
function Z() {
|
|
1571
|
-
|
|
1572
|
-
name:
|
|
1572
|
+
w.value = {
|
|
1573
|
+
name: f.value,
|
|
1573
1574
|
parentId: 0
|
|
1574
|
-
},
|
|
1575
|
+
}, e("create-parent-object", w.value);
|
|
1575
1576
|
}
|
|
1576
1577
|
function ce() {
|
|
1577
|
-
var
|
|
1578
|
-
(
|
|
1579
|
-
message: n("comboBox.createFailed", { name: r.value, error:
|
|
1578
|
+
var k, x;
|
|
1579
|
+
(k = l.objectCreatedResponse) != null && k.error ? De({
|
|
1580
|
+
message: n("comboBox.createFailed", { name: r.value, error: l.objectCreatedResponse.error }),
|
|
1580
1581
|
colour: "danger",
|
|
1581
1582
|
duration: 1e4
|
|
1582
|
-
}) : (x =
|
|
1583
|
+
}) : (x = l.objectCreatedResponse) != null && x.id && be();
|
|
1583
1584
|
}
|
|
1584
1585
|
function je() {
|
|
1585
|
-
var
|
|
1586
|
-
(
|
|
1587
|
-
id:
|
|
1588
|
-
name:
|
|
1586
|
+
var k;
|
|
1587
|
+
(k = l.parentObjectCreatedResponse) != null && k.id && (v.value = {
|
|
1588
|
+
id: l.parentObjectCreatedResponse.id,
|
|
1589
|
+
name: l.parentObjectCreatedResponse.name ?? ""
|
|
1589
1590
|
});
|
|
1590
1591
|
}
|
|
1591
1592
|
function be() {
|
|
1592
|
-
var x, Y, p, q,
|
|
1593
|
+
var x, Y, p, q, U;
|
|
1593
1594
|
De({
|
|
1594
|
-
message: n("comboBox.createSuccessful", { object:
|
|
1595
|
+
message: n("comboBox.createSuccessful", { object: l.objectType, name: ((x = l.objectCreatedResponse) == null ? void 0 : x.name) ?? "" }),
|
|
1595
1596
|
colour: "primary",
|
|
1596
1597
|
duration: 1e4
|
|
1597
1598
|
});
|
|
1598
|
-
let
|
|
1599
|
-
|
|
1600
|
-
id: ((p =
|
|
1601
|
-
name: ((q =
|
|
1602
|
-
parentId: ((
|
|
1603
|
-
parentName:
|
|
1599
|
+
let k = "";
|
|
1600
|
+
v.value && v.value.id === ((Y = l.objectCreatedResponse) == null ? void 0 : Y.parentId) && (k = v.value.name), c.value = {
|
|
1601
|
+
id: ((p = l.objectCreatedResponse) == null ? void 0 : p.id) ?? 0,
|
|
1602
|
+
name: ((q = l.objectCreatedResponse) == null ? void 0 : q.name) ?? "",
|
|
1603
|
+
parentId: ((U = l.objectCreatedResponse) == null ? void 0 : U.parentId) ?? 0,
|
|
1604
|
+
parentName: k
|
|
1604
1605
|
};
|
|
1605
1606
|
}
|
|
1606
1607
|
function he() {
|
|
1607
|
-
let
|
|
1608
|
-
return c.value && (c.value.parentName ?
|
|
1608
|
+
let k = "";
|
|
1609
|
+
return c.value && (c.value.parentName ? k = c.value.parentName + "; " + c.value.name : k = c.value.name), k;
|
|
1609
1610
|
}
|
|
1610
1611
|
function Ce() {
|
|
1611
|
-
let
|
|
1612
|
-
r.value === "" && (
|
|
1612
|
+
let k = !0;
|
|
1613
|
+
r.value === "" && (k = !1), l.objectParentType !== "" && v.value === null && (k = !1), O.value = k;
|
|
1613
1614
|
}
|
|
1614
|
-
K(() =>
|
|
1615
|
+
K(() => l.objectCreatedResponse, () => ce()), K(() => l.parentObjectCreatedResponse, () => je()), K(() => r.value, () => Ce()), K(() => v.value, () => Ce()), o({
|
|
1615
1616
|
focus() {
|
|
1616
|
-
var
|
|
1617
|
-
(
|
|
1617
|
+
var k;
|
|
1618
|
+
(k = u.value) == null || k.focus();
|
|
1618
1619
|
}
|
|
1619
1620
|
});
|
|
1620
1621
|
const ye = A();
|
|
1621
|
-
return Ue(ye, () => a.value ?
|
|
1622
|
+
return Ue(ye, () => a.value ? B(!1) : ""), (k, x) => {
|
|
1622
1623
|
const Y = al("cl-ui-combo-box", !0);
|
|
1623
|
-
return i(),
|
|
1624
|
+
return i(), b("div", {
|
|
1624
1625
|
ref_key: "outsideRef",
|
|
1625
1626
|
ref: ye,
|
|
1626
1627
|
class: "cl-relative"
|
|
1627
1628
|
}, [
|
|
1628
|
-
|
|
1629
|
-
|
|
1629
|
+
m("div", Nt, [
|
|
1630
|
+
$(re, {
|
|
1630
1631
|
ref_key: "inputRef",
|
|
1631
1632
|
ref: u,
|
|
1632
|
-
modelValue:
|
|
1633
|
-
"onUpdate:modelValue": x[0] || (x[0] = (p) =>
|
|
1633
|
+
modelValue: h.value,
|
|
1634
|
+
"onUpdate:modelValue": x[0] || (x[0] = (p) => h.value = p),
|
|
1634
1635
|
class: I(["!cl-mr-0 cl-mb-0 cl-rounded-r-none cl-w-full cl-z-10", {
|
|
1635
|
-
"cl-cursor-pointer":
|
|
1636
|
+
"cl-cursor-pointer": k.disabled === !1
|
|
1636
1637
|
}]),
|
|
1637
1638
|
"input-type": "text",
|
|
1638
1639
|
"placeholder-text": s.value,
|
|
1639
1640
|
onFocus: x[1] || (x[1] = (p) => {
|
|
1640
|
-
|
|
1641
|
+
B(), k.$emit("focus");
|
|
1641
1642
|
})
|
|
1642
1643
|
}, null, 8, ["modelValue", "class", "placeholder-text"]),
|
|
1643
|
-
F(
|
|
1644
|
-
|
|
1644
|
+
F(m("div", jt, [
|
|
1645
|
+
m("div", It, [
|
|
1645
1646
|
le(T(d(n)("comboBox.required")) + " ", 1),
|
|
1646
|
-
|
|
1647
|
+
$(d(_), {
|
|
1647
1648
|
class: "cl-ml-1 cl-mt-1",
|
|
1648
1649
|
icon: "ph:warning"
|
|
1649
1650
|
})
|
|
1650
1651
|
])
|
|
1651
1652
|
], 512), [
|
|
1652
|
-
[H,
|
|
1653
|
+
[H, k.required && k.disabled === !1 && k.currentObject === null]
|
|
1653
1654
|
]),
|
|
1654
|
-
a.value ? (i(),
|
|
1655
|
+
a.value ? (i(), b("div", {
|
|
1655
1656
|
key: 1,
|
|
1656
1657
|
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", {
|
|
1657
|
-
"cl-cursor-default":
|
|
1658
|
-
"cl-cursor-pointer":
|
|
1658
|
+
"cl-cursor-default": k.disabled,
|
|
1659
|
+
"cl-cursor-pointer": k.disabled === !1
|
|
1659
1660
|
}]),
|
|
1660
|
-
onClick: x[3] || (x[3] = (p) =>
|
|
1661
|
+
onClick: x[3] || (x[3] = (p) => B(!1))
|
|
1661
1662
|
}, [
|
|
1662
|
-
|
|
1663
|
+
$(d(_), {
|
|
1663
1664
|
icon: "ph:caret-up-bold",
|
|
1664
1665
|
class: "cl-ml-[5px] cl-mt-[12px]"
|
|
1665
1666
|
})
|
|
1666
|
-
], 2)) : (i(),
|
|
1667
|
+
], 2)) : (i(), b("div", {
|
|
1667
1668
|
key: 0,
|
|
1668
1669
|
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", {
|
|
1669
|
-
"cl-cursor-default":
|
|
1670
|
-
"cl-cursor-pointer":
|
|
1670
|
+
"cl-cursor-default": k.disabled,
|
|
1671
|
+
"cl-cursor-pointer": k.disabled === !1
|
|
1671
1672
|
}]),
|
|
1672
|
-
onClick: x[2] || (x[2] = (p) =>
|
|
1673
|
+
onClick: x[2] || (x[2] = (p) => B(!0))
|
|
1673
1674
|
}, [
|
|
1674
|
-
|
|
1675
|
+
$(d(_), {
|
|
1675
1676
|
icon: "ph:caret-down-bold",
|
|
1676
1677
|
class: "cl-ml-[5px] cl-mt-[12px]"
|
|
1677
1678
|
})
|
|
1678
1679
|
], 2))
|
|
1679
1680
|
]),
|
|
1680
|
-
|
|
1681
|
+
$(Xe, { size: "small" }, {
|
|
1681
1682
|
title: L(() => [
|
|
1682
|
-
le(T(d(n)("comboBox.createTitle", { object:
|
|
1683
|
+
le(T(d(n)("comboBox.createTitle", { object: k.objectType })), 1)
|
|
1683
1684
|
]),
|
|
1684
1685
|
trigger: L(({ open: p }) => [
|
|
1685
|
-
F(
|
|
1686
|
-
"can-create-new-object":
|
|
1687
|
-
"can-clear-selected-object":
|
|
1688
|
-
loading:
|
|
1689
|
-
results:
|
|
1690
|
-
"object-type":
|
|
1691
|
-
"object-parent-type":
|
|
1692
|
-
"error-message":
|
|
1693
|
-
"current-object-name":
|
|
1686
|
+
F($(St, {
|
|
1687
|
+
"can-create-new-object": k.canCreateNewObject,
|
|
1688
|
+
"can-clear-selected-object": k.canClearSelectedObject,
|
|
1689
|
+
loading: k.loading,
|
|
1690
|
+
results: k.results,
|
|
1691
|
+
"object-type": k.objectType,
|
|
1692
|
+
"object-parent-type": k.objectParentType,
|
|
1693
|
+
"error-message": k.errorMessage,
|
|
1694
|
+
"current-object-name": h.value,
|
|
1694
1695
|
"is-visible": a.value,
|
|
1695
1696
|
class: I({
|
|
1696
|
-
"cl-bottom-full":
|
|
1697
|
+
"cl-bottom-full": C.value
|
|
1697
1698
|
}),
|
|
1698
|
-
"search-hint":
|
|
1699
|
+
"search-hint": g.value,
|
|
1699
1700
|
onCreateObject: p,
|
|
1700
1701
|
onSelectObject: y,
|
|
1701
|
-
onClearObject:
|
|
1702
|
+
onClearObject: z,
|
|
1702
1703
|
onSearch: E
|
|
1703
1704
|
}, 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"]), [
|
|
1704
1705
|
[H, a.value]
|
|
1705
1706
|
])
|
|
1706
1707
|
]),
|
|
1707
1708
|
footer: L(({ close: p }) => [
|
|
1708
|
-
|
|
1709
|
-
|
|
1709
|
+
m("div", Rt, [
|
|
1710
|
+
$(fe, {
|
|
1710
1711
|
class: "cl-mr-3",
|
|
1711
1712
|
colour: "default",
|
|
1712
1713
|
size: "small",
|
|
@@ -1717,7 +1718,7 @@ const re = /* @__PURE__ */ pe(bt, [["__scopeId", "data-v-3837efd9"]]), ht = { cl
|
|
|
1717
1718
|
]),
|
|
1718
1719
|
_: 2
|
|
1719
1720
|
}, 1032, ["onClick"]),
|
|
1720
|
-
|
|
1721
|
+
$(fe, {
|
|
1721
1722
|
colour: "primary",
|
|
1722
1723
|
size: "small",
|
|
1723
1724
|
disabled: !O.value,
|
|
@@ -1733,23 +1734,23 @@ const re = /* @__PURE__ */ pe(bt, [["__scopeId", "data-v-3837efd9"]]), ht = { cl
|
|
|
1733
1734
|
])
|
|
1734
1735
|
]),
|
|
1735
1736
|
default: L(() => [
|
|
1736
|
-
|
|
1737
|
-
|
|
1737
|
+
m("div", _t, [
|
|
1738
|
+
k.objectParentType ? (i(), V(Y, {
|
|
1738
1739
|
key: 0,
|
|
1739
|
-
"current-object":
|
|
1740
|
-
"onUpdate:currentObject": x[4] || (x[4] = (p) =>
|
|
1740
|
+
"current-object": v.value,
|
|
1741
|
+
"onUpdate:currentObject": x[4] || (x[4] = (p) => v.value = p),
|
|
1741
1742
|
class: "cl-mt-3",
|
|
1742
|
-
results:
|
|
1743
|
-
loading:
|
|
1744
|
-
"object-type":
|
|
1745
|
-
"object-created-response":
|
|
1746
|
-
"can-create-new-object":
|
|
1747
|
-
"can-clear-selected-object":
|
|
1748
|
-
"error-message":
|
|
1749
|
-
onSearch:
|
|
1743
|
+
results: k.parentResults,
|
|
1744
|
+
loading: k.loading,
|
|
1745
|
+
"object-type": k.objectParentType,
|
|
1746
|
+
"object-created-response": k.parentObjectCreatedResponse,
|
|
1747
|
+
"can-create-new-object": k.canCreateNewObject,
|
|
1748
|
+
"can-clear-selected-object": k.canClearSelectedObject,
|
|
1749
|
+
"error-message": k.errorMessage,
|
|
1750
|
+
onSearch: R,
|
|
1750
1751
|
onCreateObject: Z
|
|
1751
|
-
}, null, 8, ["current-object", "results", "loading", "object-type", "object-created-response", "can-create-new-object", "can-clear-selected-object", "error-message"])) :
|
|
1752
|
-
|
|
1752
|
+
}, null, 8, ["current-object", "results", "loading", "object-type", "object-created-response", "can-create-new-object", "can-clear-selected-object", "error-message"])) : S("", !0),
|
|
1753
|
+
$(re, {
|
|
1753
1754
|
modelValue: r.value,
|
|
1754
1755
|
"onUpdate:modelValue": x[5] || (x[5] = (p) => r.value = p),
|
|
1755
1756
|
label: d(n)("comboBox.createProperty"),
|
|
@@ -1764,53 +1765,53 @@ const re = /* @__PURE__ */ pe(bt, [["__scopeId", "data-v-3837efd9"]]), ht = { cl
|
|
|
1764
1765
|
};
|
|
1765
1766
|
}
|
|
1766
1767
|
});
|
|
1767
|
-
function
|
|
1768
|
+
function Ut(t) {
|
|
1768
1769
|
return typeof t.id == "number" && typeof t.name == "string";
|
|
1769
1770
|
}
|
|
1770
|
-
function
|
|
1771
|
+
function Bt(t) {
|
|
1771
1772
|
return typeof t.name == "string";
|
|
1772
1773
|
}
|
|
1773
|
-
const
|
|
1774
|
+
const Mt = {}, Vt = { class: "cl-flex cl-flex-wrap cl-left-0 cl-mt-4 cl-w-full" }, Dt = {
|
|
1774
1775
|
key: 0,
|
|
1775
1776
|
class: "cl-w-full"
|
|
1776
|
-
},
|
|
1777
|
+
}, Lt = {
|
|
1777
1778
|
key: 1,
|
|
1778
1779
|
class: "cl-leading-10 cl-text-sm cl-w-full"
|
|
1779
|
-
},
|
|
1780
|
-
function
|
|
1781
|
-
return i(),
|
|
1782
|
-
t.$slots.default ? (i(),
|
|
1780
|
+
}, Pt = { class: "cl-float-left" }, Ft = { class: "cl-float-right" };
|
|
1781
|
+
function Ht(t, o) {
|
|
1782
|
+
return i(), b("div", Vt, [
|
|
1783
|
+
t.$slots.default ? (i(), b("div", Dt, [
|
|
1783
1784
|
j(t.$slots, "default")
|
|
1784
|
-
])) :
|
|
1785
|
-
t.$slots.left || t.$slots.right ? (i(),
|
|
1786
|
-
|
|
1785
|
+
])) : S("", !0),
|
|
1786
|
+
t.$slots.left || t.$slots.right ? (i(), b("div", Lt, [
|
|
1787
|
+
m("span", Pt, [
|
|
1787
1788
|
j(t.$slots, "left")
|
|
1788
1789
|
]),
|
|
1789
|
-
|
|
1790
|
+
m("span", Ft, [
|
|
1790
1791
|
j(t.$slots, "right")
|
|
1791
1792
|
])
|
|
1792
|
-
])) :
|
|
1793
|
+
])) : S("", !0)
|
|
1793
1794
|
]);
|
|
1794
1795
|
}
|
|
1795
|
-
const
|
|
1796
|
+
const xt = /* @__PURE__ */ pe(Mt, [["render", Ht]]);
|
|
1796
1797
|
function Ae(t) {
|
|
1797
|
-
const o = t.type !== "slot" || t.slotType !== void 0 && t.field !== void 0,
|
|
1798
|
-
return o &&
|
|
1798
|
+
const o = t.type !== "slot" || t.slotType !== void 0 && t.field !== void 0, e = t.sortable ?? !0;
|
|
1799
|
+
return o && e;
|
|
1799
1800
|
}
|
|
1800
1801
|
function Be(t) {
|
|
1801
|
-
const o = t.type !== "slot" || t.slotType !== void 0 && t.field !== void 0,
|
|
1802
|
-
return o &&
|
|
1802
|
+
const o = t.type !== "slot" || t.slotType !== void 0 && t.field !== void 0, e = t.filterable ?? !0;
|
|
1803
|
+
return o && e;
|
|
1803
1804
|
}
|
|
1804
|
-
function
|
|
1805
|
+
function Gt(t) {
|
|
1805
1806
|
return t.some((o) => Ae(o));
|
|
1806
1807
|
}
|
|
1807
1808
|
function Ge(t) {
|
|
1808
1809
|
return t.some((o) => Be(o));
|
|
1809
1810
|
}
|
|
1810
|
-
const
|
|
1811
|
+
const Zt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Wt = { class: "cl-gap-1 cl-grid cl-grid-cols-2 cl-justify-end cl-mb-2 lg:cl-flex lg:cl-gap-2" }, Kt = { class: "cl-basis-0 cl-col-span-2 cl-flex-grow" }, Qt = /* @__PURE__ */ m("hr", { class: "cl-block cl-border-grey-3 cl-col-span-2 cl-my-4 lg:cl-hidden" }, null, -1), Jt = {
|
|
1811
1812
|
key: 1,
|
|
1812
1813
|
class: "cl-hidden lg:cl-block"
|
|
1813
|
-
},
|
|
1814
|
+
}, Yt = { class: "cl-block lg:cl-hidden" }, Xt = /* @__PURE__ */ M({
|
|
1814
1815
|
__name: "cl-ui-grid-action-row",
|
|
1815
1816
|
props: {
|
|
1816
1817
|
editMode: { type: Boolean },
|
|
@@ -1823,42 +1824,42 @@ const Gt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Zt = { class: "cl-gap-1
|
|
|
1823
1824
|
emits: ["update:edit-mode", "update:filterPanelOpen", "clear-filters"],
|
|
1824
1825
|
setup(t) {
|
|
1825
1826
|
const { t: o } = ne();
|
|
1826
|
-
return (
|
|
1827
|
-
|
|
1828
|
-
|
|
1827
|
+
return (e, l) => (i(), b(P, null, [
|
|
1828
|
+
m("div", Zt, [
|
|
1829
|
+
m("strong", null, T(d(o)("grid.gridTools")), 1)
|
|
1829
1830
|
]),
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
j(
|
|
1833
|
-
loading:
|
|
1834
|
-
editMode:
|
|
1831
|
+
m("div", Wt, [
|
|
1832
|
+
m("div", Kt, [
|
|
1833
|
+
j(e.$slots, "additional-grid-actions", te(se({
|
|
1834
|
+
loading: e.loading,
|
|
1835
|
+
editMode: e.editMode
|
|
1835
1836
|
})))
|
|
1836
1837
|
]),
|
|
1837
|
-
|
|
1838
|
-
|
|
1838
|
+
Qt,
|
|
1839
|
+
e.columns.some((s) => s.editable) ? (i(), V(fe, {
|
|
1839
1840
|
key: 0,
|
|
1840
1841
|
size: "small",
|
|
1841
1842
|
colour: "default",
|
|
1842
|
-
onClick:
|
|
1843
|
+
onClick: l[0] || (l[0] = W((s) => e.$emit("update:edit-mode", !e.editMode), ["prevent"]))
|
|
1843
1844
|
}, {
|
|
1844
1845
|
default: L(() => [
|
|
1845
|
-
|
|
1846
|
+
e.editMode ? (i(), b(P, { key: 0 }, [
|
|
1846
1847
|
le(T(d(o)("grid.finishEditing")), 1)
|
|
1847
|
-
], 64)) : (i(),
|
|
1848
|
+
], 64)) : (i(), b(P, { key: 1 }, [
|
|
1848
1849
|
le(T(d(o)("grid.editData")), 1)
|
|
1849
1850
|
], 64))
|
|
1850
1851
|
]),
|
|
1851
1852
|
_: 1
|
|
1852
|
-
})) :
|
|
1853
|
-
|
|
1854
|
-
j(
|
|
1853
|
+
})) : S("", !0),
|
|
1854
|
+
e.options.hideViewManager ? S("", !0) : (i(), b("div", Jt, [
|
|
1855
|
+
j(e.$slots, "view-manager")
|
|
1855
1856
|
])),
|
|
1856
|
-
d(Ge)(
|
|
1857
|
-
|
|
1858
|
-
|
|
1857
|
+
d(Ge)(e.columns) || d(Gt)(e.columns) ? (i(), b(P, { key: 2 }, [
|
|
1858
|
+
m("div", Yt, [
|
|
1859
|
+
$(fe, {
|
|
1859
1860
|
class: "cl-w-full",
|
|
1860
1861
|
size: "small",
|
|
1861
|
-
onClick:
|
|
1862
|
+
onClick: l[1] || (l[1] = W((s) => e.$emit("update:filterPanelOpen", !e.filterPanelOpen), ["prevent"]))
|
|
1862
1863
|
}, {
|
|
1863
1864
|
default: L(() => [
|
|
1864
1865
|
le(T(d(o)("grid.modifyFilters")), 1)
|
|
@@ -1866,34 +1867,34 @@ const Gt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Zt = { class: "cl-gap-1
|
|
|
1866
1867
|
_: 1
|
|
1867
1868
|
})
|
|
1868
1869
|
]),
|
|
1869
|
-
d(Ge)(
|
|
1870
|
+
d(Ge)(e.columns) ? (i(), V(fe, {
|
|
1870
1871
|
key: 0,
|
|
1871
1872
|
size: "small",
|
|
1872
|
-
colour:
|
|
1873
|
+
colour: e.request.filters.some((s) => s.filterValue !== "") ? "danger" : "default",
|
|
1873
1874
|
class: I({
|
|
1874
|
-
"cl-col-span-2":
|
|
1875
|
+
"cl-col-span-2": e.columns.some((s) => s.editable)
|
|
1875
1876
|
}),
|
|
1876
|
-
onClick:
|
|
1877
|
+
onClick: l[2] || (l[2] = W((s) => e.$emit("clear-filters"), ["prevent"]))
|
|
1877
1878
|
}, {
|
|
1878
1879
|
default: L(() => [
|
|
1879
1880
|
le(T(d(o)("grid.clearFilters")), 1)
|
|
1880
1881
|
]),
|
|
1881
1882
|
_: 1
|
|
1882
|
-
}, 8, ["colour", "class"])) :
|
|
1883
|
-
], 64)) :
|
|
1883
|
+
}, 8, ["colour", "class"])) : S("", !0)
|
|
1884
|
+
], 64)) : S("", !0)
|
|
1884
1885
|
])
|
|
1885
1886
|
], 64));
|
|
1886
1887
|
}
|
|
1887
|
-
}),
|
|
1888
|
+
}), eo = {
|
|
1888
1889
|
key: 3,
|
|
1889
1890
|
class: "cl-inline-block cl-whitespace-nowrap"
|
|
1890
|
-
},
|
|
1891
|
+
}, lo = {
|
|
1891
1892
|
key: 4,
|
|
1892
1893
|
class: "cl-inline-block cl-whitespace-nowrap"
|
|
1893
|
-
},
|
|
1894
|
+
}, to = {
|
|
1894
1895
|
key: 0,
|
|
1895
1896
|
class: "cl-inline-block cl-whitespace-nowrap"
|
|
1896
|
-
},
|
|
1897
|
+
}, oo = {
|
|
1897
1898
|
key: 1,
|
|
1898
1899
|
class: "cl-inline-block cl-whitespace-nowrap"
|
|
1899
1900
|
}, Ze = /* @__PURE__ */ M({
|
|
@@ -1904,10 +1905,10 @@ const Gt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Zt = { class: "cl-gap-1
|
|
|
1904
1905
|
timeZone: {}
|
|
1905
1906
|
},
|
|
1906
1907
|
setup(t) {
|
|
1907
|
-
const o = t, { t:
|
|
1908
|
-
function
|
|
1908
|
+
const o = t, { t: e, locale: l, n: s } = ne();
|
|
1909
|
+
function g(n, a) {
|
|
1909
1910
|
const c = ke.fromISO(n, {
|
|
1910
|
-
locale:
|
|
1911
|
+
locale: l.value
|
|
1911
1912
|
}).setZone(o.timeZone);
|
|
1912
1913
|
let u = "";
|
|
1913
1914
|
switch (a) {
|
|
@@ -1938,20 +1939,20 @@ const Gt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Zt = { class: "cl-gap-1
|
|
|
1938
1939
|
"input-type": "checkbox",
|
|
1939
1940
|
"model-value": n.data[n.column.field],
|
|
1940
1941
|
disabled: !0
|
|
1941
|
-
}, null, 8, ["model-value"])) : (n.column.type === "date" || n.column.type === "datetime") && n.column.field !== void 0 ? (i(),
|
|
1942
|
-
n.column.format !== void 0 ? (i(),
|
|
1943
|
-
le(T(
|
|
1944
|
-
], 64)) : n.column.type === "date" ? (i(),
|
|
1945
|
-
le(T(
|
|
1946
|
-
], 64)) : (i(),
|
|
1947
|
-
le(T(
|
|
1942
|
+
}, null, 8, ["model-value"])) : (n.column.type === "date" || n.column.type === "datetime") && n.column.field !== void 0 ? (i(), b(P, { key: 2 }, [
|
|
1943
|
+
n.column.format !== void 0 ? (i(), b(P, { key: 0 }, [
|
|
1944
|
+
le(T(g(n.data[n.column.field], n.column.format)), 1)
|
|
1945
|
+
], 64)) : n.column.type === "date" ? (i(), b(P, { key: 1 }, [
|
|
1946
|
+
le(T(g(n.data[n.column.field], d(G).DATE)), 1)
|
|
1947
|
+
], 64)) : (i(), b(P, { key: 2 }, [
|
|
1948
|
+
le(T(g(n.data[n.column.field], d(G).DATETIME)), 1)
|
|
1948
1949
|
], 64))
|
|
1949
|
-
], 64)) : n.column.type === "list" && n.column.field !== void 0 && n.column.listEntries !== void 0 ? (i(),
|
|
1950
|
-
n.column.maxLength !== void 0 ? (i(),
|
|
1951
|
-
], 64)) :
|
|
1950
|
+
], 64)) : n.column.type === "list" && n.column.field !== void 0 && n.column.listEntries !== void 0 ? (i(), b("span", eo, 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(), b("span", lo, T(d(s)(n.data[n.column.field], n.column.format ?? d(X).DECIMAL)), 1)) : n.column.field !== void 0 ? (i(), b(P, { key: 5 }, [
|
|
1951
|
+
n.column.maxLength !== void 0 ? (i(), b("span", to, T(n.data[n.column.field].trimToLength(n.column.maxLength, n.column.format !== void 0 ? n.column.format === "ellipsis" : !1)), 1)) : (i(), b("span", oo, T(n.data[n.column.field]), 1))
|
|
1952
|
+
], 64)) : S("", !0);
|
|
1952
1953
|
};
|
|
1953
1954
|
}
|
|
1954
|
-
}),
|
|
1955
|
+
}), no = { class: "cl-font-semibold lg:cl-hidden" }, so = /* @__PURE__ */ M({
|
|
1955
1956
|
__name: "cl-ui-grid-cell",
|
|
1956
1957
|
props: {
|
|
1957
1958
|
data: {},
|
|
@@ -1961,32 +1962,32 @@ const Gt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Zt = { class: "cl-gap-1
|
|
|
1961
1962
|
},
|
|
1962
1963
|
emits: ["edit", "focus", "undo"],
|
|
1963
1964
|
setup(t, { emit: o }) {
|
|
1964
|
-
const
|
|
1965
|
+
const e = t, { t: l } = ne(), s = A(ie(e.data)), g = N(() => e.column.field !== void 0 && s.value[e.column.field] !== e.data[e.column.field]), n = N(() => {
|
|
1965
1966
|
var a;
|
|
1966
|
-
return ((a =
|
|
1967
|
+
return ((a = e.column.listEntries) == null ? void 0 : a.map((c, u) => ({
|
|
1967
1968
|
id: u,
|
|
1968
|
-
name:
|
|
1969
|
+
name: l(c.translationKey)
|
|
1969
1970
|
}))) ?? [];
|
|
1970
1971
|
});
|
|
1971
|
-
return rl(() => s.value = ie(
|
|
1972
|
-
const c =
|
|
1973
|
-
c !== "" && (a[c] !==
|
|
1972
|
+
return rl(() => s.value = ie(e.data)), K(s, (a) => {
|
|
1973
|
+
const c = e.column.field ?? "";
|
|
1974
|
+
c !== "" && (a[c] !== e.data[c] ? o("edit", a[c]) : o("undo"));
|
|
1974
1975
|
}, {
|
|
1975
1976
|
deep: !0
|
|
1976
|
-
}), (a, c) => (i(),
|
|
1977
|
+
}), (a, c) => (i(), b("td", {
|
|
1977
1978
|
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", {
|
|
1978
|
-
"cl-bg-link-lighter":
|
|
1979
|
+
"cl-bg-link-lighter": g.value
|
|
1979
1980
|
}])
|
|
1980
1981
|
}, [
|
|
1981
|
-
|
|
1982
|
+
m("span", no, T(a.column.caption), 1),
|
|
1982
1983
|
a.editMode && a.column.editable === !0 ? j(a.$slots, `${a.column.name}Edit`, te(ae({ key: 0 }, {
|
|
1983
1984
|
cellFocused: () => o("focus"),
|
|
1984
1985
|
column: a.column,
|
|
1985
|
-
edited:
|
|
1986
|
+
edited: g.value,
|
|
1986
1987
|
record: s.value,
|
|
1987
1988
|
listEntries: n.value
|
|
1988
1989
|
})), () => [
|
|
1989
|
-
|
|
1990
|
+
$(Ze, {
|
|
1990
1991
|
column: a.column,
|
|
1991
1992
|
data: a.data,
|
|
1992
1993
|
"time-zone": a.timeZone
|
|
@@ -2009,7 +2010,7 @@ const Gt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Zt = { class: "cl-gap-1
|
|
|
2009
2010
|
}, 1032, ["column", "data", "time-zone"]))
|
|
2010
2011
|
], 2));
|
|
2011
2012
|
}
|
|
2012
|
-
}),
|
|
2013
|
+
}), ao = /* @__PURE__ */ M({
|
|
2013
2014
|
__name: "cl-ui-grid-row",
|
|
2014
2015
|
props: {
|
|
2015
2016
|
data: {},
|
|
@@ -2019,18 +2020,18 @@ const Gt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Zt = { class: "cl-gap-1
|
|
|
2019
2020
|
},
|
|
2020
2021
|
emits: ["cell-focus", "cell-edit", "cell-undo", "row-select"],
|
|
2021
2022
|
setup(t) {
|
|
2022
|
-
return (o,
|
|
2023
|
-
(i(!0),
|
|
2023
|
+
return (o, e) => (i(), b("tr", null, [
|
|
2024
|
+
(i(!0), b(P, null, Q(o.columns, (l, s) => (i(), V(so, {
|
|
2024
2025
|
key: s,
|
|
2025
2026
|
data: o.data,
|
|
2026
|
-
column:
|
|
2027
|
+
column: l,
|
|
2027
2028
|
"time-zone": o.timeZone,
|
|
2028
2029
|
"edit-mode": o.editMode,
|
|
2029
|
-
onFocus:
|
|
2030
|
-
onEdit: (
|
|
2031
|
-
onUndo: (
|
|
2030
|
+
onFocus: e[0] || (e[0] = (g) => o.$emit("cell-focus")),
|
|
2031
|
+
onEdit: (g) => o.$emit("cell-edit", { field: l.field, value: g }),
|
|
2032
|
+
onUndo: (g) => o.$emit("cell-undo", l.field)
|
|
2032
2033
|
}, ze({ _: 2 }, [
|
|
2033
|
-
Q(o.$slots, (
|
|
2034
|
+
Q(o.$slots, (g, n) => ({
|
|
2034
2035
|
name: n,
|
|
2035
2036
|
fn: L((a) => [
|
|
2036
2037
|
j(o.$slots, n, te(se(a)))
|
|
@@ -2039,10 +2040,10 @@ const Gt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Zt = { class: "cl-gap-1
|
|
|
2039
2040
|
]), 1032, ["data", "column", "time-zone", "edit-mode", "onEdit", "onUndo"]))), 128))
|
|
2040
2041
|
]));
|
|
2041
2042
|
}
|
|
2042
|
-
}),
|
|
2043
|
+
}), ro = { key: 1 }, io = ["colspan"], co = { class: "cl-flex cl-flex-wrap cl-justify-center cl-text-center cl-text-sm cl-w-full" }, uo = { class: "cl-mt-6 cl-w-full" }, po = {
|
|
2043
2044
|
key: 0,
|
|
2044
2045
|
class: "cl-mt-4"
|
|
2045
|
-
},
|
|
2046
|
+
}, fo = { class: "cl-mb-2 cl-w-full" }, mo = /* @__PURE__ */ M({
|
|
2046
2047
|
__name: "cl-ui-grid-body",
|
|
2047
2048
|
props: {
|
|
2048
2049
|
columns: {},
|
|
@@ -2055,37 +2056,37 @@ const Gt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Zt = { class: "cl-gap-1
|
|
|
2055
2056
|
},
|
|
2056
2057
|
emits: ["row-select", "row-edit", "clear-filters"],
|
|
2057
2058
|
setup(t, { emit: o }) {
|
|
2058
|
-
const
|
|
2059
|
+
const e = t, { t: l } = ne(), s = A({
|
|
2059
2060
|
index: -1,
|
|
2060
2061
|
record: {}
|
|
2061
2062
|
});
|
|
2062
|
-
function
|
|
2063
|
+
function g() {
|
|
2063
2064
|
Object.keys(s.value.record).length !== 0 && (o("row-edit", ie(s.value)), s.value.record = {});
|
|
2064
2065
|
}
|
|
2065
2066
|
function n(r) {
|
|
2066
|
-
s.value.index !== -1 && s.value.index !== r &&
|
|
2067
|
+
s.value.index !== -1 && s.value.index !== r && g(), s.value.index = r;
|
|
2067
2068
|
}
|
|
2068
|
-
function a(r,
|
|
2069
|
-
n(r),
|
|
2069
|
+
function a(r, f) {
|
|
2070
|
+
n(r), f.field !== void 0 && (s.value.record[f.field] = f.value);
|
|
2070
2071
|
}
|
|
2071
2072
|
function c(r) {
|
|
2072
2073
|
if (r !== void 0) {
|
|
2073
|
-
const { [r]:
|
|
2074
|
+
const { [r]: f, ...w } = s.value.record;
|
|
2074
2075
|
s.value.record = {
|
|
2075
|
-
...
|
|
2076
|
+
...w
|
|
2076
2077
|
};
|
|
2077
2078
|
}
|
|
2078
2079
|
}
|
|
2079
2080
|
const u = A({});
|
|
2080
|
-
K(() =>
|
|
2081
|
-
var r,
|
|
2082
|
-
return u.value = Object.fromEntries(((
|
|
2081
|
+
K(() => e.data, () => {
|
|
2082
|
+
var r, f;
|
|
2083
|
+
return u.value = Object.fromEntries(((f = (r = e.data) == null ? void 0 : r.results) == null ? void 0 : f.map((w, O) => [
|
|
2083
2084
|
[O],
|
|
2084
2085
|
{
|
|
2085
2086
|
count: 0,
|
|
2086
2087
|
target: null,
|
|
2087
|
-
reset:
|
|
2088
|
-
u.value[O] && (u.value[O].count = 0,
|
|
2088
|
+
reset: Ke(() => {
|
|
2089
|
+
u.value[O] && (u.value[O].count = 0, h(u.value[O].target), u.value[O].target = null);
|
|
2089
2090
|
}, 2500, { immediate: !1 })
|
|
2090
2091
|
}
|
|
2091
2092
|
])) ?? []);
|
|
@@ -2093,75 +2094,75 @@ const Gt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Zt = { class: "cl-gap-1
|
|
|
2093
2094
|
deep: !0,
|
|
2094
2095
|
immediate: !0
|
|
2095
2096
|
});
|
|
2096
|
-
function
|
|
2097
|
-
const { currentTarget: O } =
|
|
2098
|
-
|
|
2097
|
+
function v(r, f, w) {
|
|
2098
|
+
const { currentTarget: O } = w;
|
|
2099
|
+
e.selectionEnabled ? o("row-select", f) : (u.value[r].count++, u.value[r].target = O, u.value[r].count > 1 ? (u.value[r].reset.stop(), u.value[r].count = 0, h(O), u.value[r].target = null, o("row-select", f)) : (u.value[r].reset.start(), h(O)));
|
|
2099
2100
|
}
|
|
2100
|
-
function
|
|
2101
|
+
function h(r) {
|
|
2101
2102
|
r == null || r.classList.toggle("!cl-bg-link-lighter");
|
|
2102
2103
|
}
|
|
2103
|
-
return K(() =>
|
|
2104
|
-
|
|
2105
|
-
}), (r,
|
|
2106
|
-
var
|
|
2107
|
-
return i(),
|
|
2108
|
-
r.data && ((
|
|
2109
|
-
key:
|
|
2104
|
+
return K(() => e.editMode, () => {
|
|
2105
|
+
e.editMode || (g(), s.value.index = -1);
|
|
2106
|
+
}), (r, f) => {
|
|
2107
|
+
var w;
|
|
2108
|
+
return i(), b("tbody", null, [
|
|
2109
|
+
r.data && ((w = r.data.results) != null && w.length) ? (i(!0), b(P, { key: 0 }, Q(r.data.results, (O, C) => (i(), V(ao, {
|
|
2110
|
+
key: C,
|
|
2110
2111
|
data: O,
|
|
2111
2112
|
columns: r.columns,
|
|
2112
2113
|
"time-zone": r.timeZone,
|
|
2113
2114
|
"edit-mode": r.editMode,
|
|
2114
2115
|
class: I(["cl-bg-opacity-100 cl-cursor-pointer cl-transition-colors", {
|
|
2115
|
-
"cl-bg-white":
|
|
2116
|
-
"cl-bg-off-white":
|
|
2116
|
+
"cl-bg-white": C % 2 === 0 && r.data.totalRecords > 1,
|
|
2117
|
+
"cl-bg-off-white": C % 2 === 1 || r.data.totalRecords === 1,
|
|
2117
2118
|
"cl-cursor-pointer hover:cl-bg-link-lighter": r.selectionEnabled && !r.editMode
|
|
2118
2119
|
}]),
|
|
2119
|
-
onClick: (
|
|
2120
|
-
r.editMode ||
|
|
2120
|
+
onClick: (B) => {
|
|
2121
|
+
r.editMode || v(C, O, B);
|
|
2121
2122
|
},
|
|
2122
|
-
onCellFocus: (
|
|
2123
|
-
n(
|
|
2123
|
+
onCellFocus: (B) => {
|
|
2124
|
+
n(C);
|
|
2124
2125
|
},
|
|
2125
|
-
onCellEdit: (
|
|
2126
|
-
a(
|
|
2126
|
+
onCellEdit: (B) => {
|
|
2127
|
+
a(C, B);
|
|
2127
2128
|
},
|
|
2128
2129
|
onCellUndo: c
|
|
2129
2130
|
}, ze({ _: 2 }, [
|
|
2130
|
-
Q(r.$slots, (
|
|
2131
|
+
Q(r.$slots, (B, E) => ({
|
|
2131
2132
|
name: E,
|
|
2132
|
-
fn: L((
|
|
2133
|
-
j(r.$slots, E, te(se(
|
|
2133
|
+
fn: L((R) => [
|
|
2134
|
+
j(r.$slots, E, te(se(R)))
|
|
2134
2135
|
])
|
|
2135
2136
|
}))
|
|
2136
|
-
]), 1032, ["data", "columns", "time-zone", "edit-mode", "class", "onClick", "onCellFocus", "onCellEdit"]))), 128)) : r.loading ?
|
|
2137
|
-
|
|
2137
|
+
]), 1032, ["data", "columns", "time-zone", "edit-mode", "class", "onClick", "onCellFocus", "onCellEdit"]))), 128)) : r.loading ? S("", !0) : (i(), b("tr", ro, [
|
|
2138
|
+
m("td", {
|
|
2138
2139
|
colspan: r.columns.length
|
|
2139
2140
|
}, [
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
r.request.filters.length > 0 ? (i(),
|
|
2143
|
-
|
|
2144
|
-
|
|
2141
|
+
m("div", co, [
|
|
2142
|
+
m("strong", uo, T(d(l)("grid.noData")), 1),
|
|
2143
|
+
r.request.filters.length > 0 ? (i(), b("div", po, [
|
|
2144
|
+
m("div", fo, T(d(l)("grid.noDataFiltersPresent")), 1),
|
|
2145
|
+
$(fe, {
|
|
2145
2146
|
size: "small",
|
|
2146
2147
|
colour: "danger",
|
|
2147
|
-
onClick:
|
|
2148
|
+
onClick: f[0] || (f[0] = W((O) => r.$emit("clear-filters"), ["prevent"]))
|
|
2148
2149
|
}, {
|
|
2149
2150
|
default: L(() => [
|
|
2150
|
-
le(T(d(
|
|
2151
|
+
le(T(d(l)("grid.clearFilters")), 1)
|
|
2151
2152
|
]),
|
|
2152
2153
|
_: 1
|
|
2153
2154
|
})
|
|
2154
|
-
])) :
|
|
2155
|
+
])) : S("", !0)
|
|
2155
2156
|
])
|
|
2156
|
-
], 8,
|
|
2157
|
+
], 8, io)
|
|
2157
2158
|
]))
|
|
2158
2159
|
]);
|
|
2159
2160
|
};
|
|
2160
2161
|
}
|
|
2161
|
-
}),
|
|
2162
|
+
}), go = {
|
|
2162
2163
|
key: 0,
|
|
2163
2164
|
class: "cl-flex cl-flex-wrap cl-justify-end cl-mt-2 cl-w-full"
|
|
2164
|
-
},
|
|
2165
|
+
}, vo = { class: "cl-bg-off-white cl-border cl-border-grey-1 cl-flex cl-items-center cl-mb-2 cl-px-3 cl-rounded cl-shadow-md cl-text-sm cl-w-full lg:cl-w-auto" }, bo = { class: "cl-text-grey-3 cl-w-max" }, ho = { class: "cl-bg-off-white cl-border cl-border-grey-1 cl-flex cl-flex-wrap cl-items-center cl-mb-2 cl-px-3 cl-py-2 cl-rounded cl-shadow-md cl-text-sm cl-w-full lg:cl-ml-2 lg:cl-w-auto mb:cl-flex-nowrap" }, yo = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-text-sm cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, wo = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, $o = { class: "cl-text-grey-3 cl-w-full lg:cl-mr-2 lg:cl-w-auto" }, ko = { class: "cl-flex cl-flex-wrap cl-text-sm mb:cl-flex-nowrap" }, Co = { class: "cl-pr-2" }, To = ["onClick"], Eo = { 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" }, Oo = { class: "cl-mb-2 cl-text-grey-3 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, Ao = ["onClick"], qo = { class: "cl-mb-2 cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, So = { 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" }, No = { class: "cl-block lg:cl-inline-block" }, jo = /* @__PURE__ */ M({
|
|
2165
2166
|
__name: "cl-ui-grid-footer",
|
|
2166
2167
|
props: {
|
|
2167
2168
|
request: {},
|
|
@@ -2171,25 +2172,25 @@ const Gt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Zt = { class: "cl-gap-1
|
|
|
2171
2172
|
"update:request": null
|
|
2172
2173
|
},
|
|
2173
2174
|
setup(t, { emit: o }) {
|
|
2174
|
-
const
|
|
2175
|
+
const e = t, { n: l, t: s } = ne(), g = N(() => {
|
|
2175
2176
|
var r;
|
|
2176
|
-
return
|
|
2177
|
-
}), n =
|
|
2178
|
-
const r = Array.from(Array(
|
|
2179
|
-
let
|
|
2177
|
+
return e.data !== null ? Math.ceil((((r = e.data) == null ? void 0 : r.totalRecords) ?? 0) / e.request.pageSize) : 1;
|
|
2178
|
+
}), n = N(() => {
|
|
2179
|
+
const r = Array.from(Array(g.value + 1).keys());
|
|
2180
|
+
let f = [];
|
|
2180
2181
|
if (r.shift(), r.length) {
|
|
2181
|
-
const
|
|
2182
|
-
|
|
2182
|
+
const w = e.request.pageNumber === g.value || e.request.pageNumber === g.value - 1 ? g.value - 3 : e.request.pageNumber - 1;
|
|
2183
|
+
f = r.slice(w, w + 3);
|
|
2183
2184
|
}
|
|
2184
|
-
return
|
|
2185
|
+
return f;
|
|
2185
2186
|
});
|
|
2186
2187
|
function a(r) {
|
|
2187
|
-
const
|
|
2188
|
-
|
|
2188
|
+
const f = ie(e.request);
|
|
2189
|
+
f.pageNumber !== r && (f.pageNumber = Math.max(Math.min(Math.trunc(r), g.value), 1), o("update:request", f));
|
|
2189
2190
|
}
|
|
2190
2191
|
function c(r) {
|
|
2191
|
-
const
|
|
2192
|
-
a(
|
|
2192
|
+
const f = parseInt(r == null ? void 0 : r.value) || 1;
|
|
2193
|
+
a(f);
|
|
2193
2194
|
}
|
|
2194
2195
|
const u = [
|
|
2195
2196
|
5,
|
|
@@ -2199,108 +2200,108 @@ const Gt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Zt = { class: "cl-gap-1
|
|
|
2199
2200
|
100,
|
|
2200
2201
|
200
|
|
2201
2202
|
];
|
|
2202
|
-
function
|
|
2203
|
-
const
|
|
2204
|
-
|
|
2205
|
-
}
|
|
2206
|
-
const
|
|
2207
|
-
return (r,
|
|
2208
|
-
var
|
|
2209
|
-
return (O = (
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2203
|
+
function v(r) {
|
|
2204
|
+
const f = ie(e.request);
|
|
2205
|
+
f.pageSize = r, f.pageNumber = 1, o("update:request", f);
|
|
2206
|
+
}
|
|
2207
|
+
const h = Qe(c, 750);
|
|
2208
|
+
return (r, f) => {
|
|
2209
|
+
var w, O;
|
|
2210
|
+
return (O = (w = r.data) == null ? void 0 : w.results) != null && O.length && r.request ? (i(), b("div", go, [
|
|
2211
|
+
m("div", vo, [
|
|
2212
|
+
m("span", bo, T(d(s)("grid.jumpToPage")), 1),
|
|
2213
|
+
$(re, {
|
|
2213
2214
|
"model-value": r.request.pageNumber,
|
|
2214
2215
|
class: "cl-ml-1 cl-mt-0.5 cl-text-sm",
|
|
2215
2216
|
"input-type": "number",
|
|
2216
2217
|
label: "Page",
|
|
2217
2218
|
"show-label": !1,
|
|
2218
2219
|
min: "1",
|
|
2219
|
-
max:
|
|
2220
|
-
onInput:
|
|
2220
|
+
max: g.value,
|
|
2221
|
+
onInput: f[0] || (f[0] = (C) => d(h)(C.target))
|
|
2221
2222
|
}, null, 8, ["model-value", "max"])
|
|
2222
2223
|
]),
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2224
|
+
m("div", ho, [
|
|
2225
|
+
m("div", yo, [
|
|
2226
|
+
m("li", wo, [
|
|
2227
|
+
m("span", $o, T(d(s)("grid.page")), 1)
|
|
2227
2228
|
]),
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
F(
|
|
2229
|
+
m("ul", ko, [
|
|
2230
|
+
m("li", Co, T(d(l)(r.request.pageNumber, d(X).INTEGER)) + " / " + T(d(l)(g.value, d(X).INTEGER)), 1),
|
|
2231
|
+
F(m("li", {
|
|
2231
2232
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2232
|
-
onClick:
|
|
2233
|
+
onClick: f[1] || (f[1] = (C) => a(1))
|
|
2233
2234
|
}, [
|
|
2234
|
-
|
|
2235
|
+
$(d(_), {
|
|
2235
2236
|
icon: "ph:caret-double-left",
|
|
2236
2237
|
size: 14
|
|
2237
2238
|
})
|
|
2238
2239
|
], 512), [
|
|
2239
2240
|
[H, r.request.pageNumber > 1]
|
|
2240
2241
|
]),
|
|
2241
|
-
F(
|
|
2242
|
+
F(m("li", {
|
|
2242
2243
|
class: "cl-cursor-pointer cl-mt-1 lg:cl-mr-2 mr-1",
|
|
2243
|
-
onClick:
|
|
2244
|
+
onClick: f[2] || (f[2] = (C) => a(r.request.pageNumber - 1))
|
|
2244
2245
|
}, [
|
|
2245
|
-
|
|
2246
|
+
$(d(_), {
|
|
2246
2247
|
icon: "ph:caret-left",
|
|
2247
2248
|
size: 14
|
|
2248
2249
|
})
|
|
2249
2250
|
], 512), [
|
|
2250
2251
|
[H, r.request.pageNumber > 1]
|
|
2251
2252
|
]),
|
|
2252
|
-
(i(!0),
|
|
2253
|
-
key:
|
|
2253
|
+
(i(!0), b(P, null, Q(n.value, (C, B) => (i(), b("li", {
|
|
2254
|
+
key: B,
|
|
2254
2255
|
class: I(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2255
|
-
"cl-text-black cl-font-bold": r.request.pageNumber ===
|
|
2256
|
-
"cl-text-grey-6": r.request.pageNumber !==
|
|
2256
|
+
"cl-text-black cl-font-bold": r.request.pageNumber === C,
|
|
2257
|
+
"cl-text-grey-6": r.request.pageNumber !== C
|
|
2257
2258
|
}]),
|
|
2258
|
-
onClick: (E) => a(
|
|
2259
|
-
}, T(d(
|
|
2260
|
-
F(
|
|
2259
|
+
onClick: (E) => a(C)
|
|
2260
|
+
}, T(d(l)(C, d(X).INTEGER)), 11, To))), 128)),
|
|
2261
|
+
F(m("li", {
|
|
2261
2262
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2262
|
-
onClick:
|
|
2263
|
+
onClick: f[3] || (f[3] = (C) => a(r.request.pageNumber + 1))
|
|
2263
2264
|
}, [
|
|
2264
|
-
|
|
2265
|
+
$(d(_), {
|
|
2265
2266
|
icon: "ph:caret-right",
|
|
2266
2267
|
size: 14
|
|
2267
2268
|
})
|
|
2268
2269
|
], 512), [
|
|
2269
|
-
[H, r.request.pageNumber <
|
|
2270
|
+
[H, r.request.pageNumber < g.value]
|
|
2270
2271
|
]),
|
|
2271
|
-
F(
|
|
2272
|
+
F(m("li", {
|
|
2272
2273
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2273
|
-
onClick:
|
|
2274
|
+
onClick: f[4] || (f[4] = (C) => a(g.value))
|
|
2274
2275
|
}, [
|
|
2275
|
-
|
|
2276
|
+
$(d(_), {
|
|
2276
2277
|
icon: "ph:caret-double-right",
|
|
2277
2278
|
size: 14
|
|
2278
2279
|
})
|
|
2279
2280
|
], 512), [
|
|
2280
|
-
[H, r.request.pageNumber <
|
|
2281
|
+
[H, r.request.pageNumber < g.value]
|
|
2281
2282
|
])
|
|
2282
2283
|
])
|
|
2283
2284
|
]),
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
(i(),
|
|
2287
|
-
key:
|
|
2285
|
+
m("ul", Eo, [
|
|
2286
|
+
m("li", Oo, T(d(s)("grid.pageSize")), 1),
|
|
2287
|
+
(i(), b(P, null, Q(u, (C, B) => m("li", {
|
|
2288
|
+
key: B,
|
|
2288
2289
|
class: I(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2289
|
-
"cl-text-black cl-font-bold": r.request.pageSize ===
|
|
2290
|
-
"cl-text-grey-6": r.request.pageSize !==
|
|
2290
|
+
"cl-text-black cl-font-bold": r.request.pageSize === C,
|
|
2291
|
+
"cl-text-grey-6": r.request.pageSize !== C
|
|
2291
2292
|
}]),
|
|
2292
|
-
onClick: (E) =>
|
|
2293
|
-
}, T(d(
|
|
2293
|
+
onClick: (E) => v(C)
|
|
2294
|
+
}, T(d(l)(C, d(X).INTEGER)), 11, Ao)), 64))
|
|
2294
2295
|
]),
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2296
|
+
m("ul", qo, [
|
|
2297
|
+
m("li", So, T(d(s)("grid.totalRecords")), 1),
|
|
2298
|
+
m("li", No, T(d(l)(r.data.totalRecords, d(X).INTEGER)), 1)
|
|
2298
2299
|
])
|
|
2299
2300
|
])
|
|
2300
|
-
])) :
|
|
2301
|
+
])) : S("", !0);
|
|
2301
2302
|
};
|
|
2302
2303
|
}
|
|
2303
|
-
}),
|
|
2304
|
+
}), Io = [
|
|
2304
2305
|
"string",
|
|
2305
2306
|
"boolean",
|
|
2306
2307
|
"number",
|
|
@@ -2309,23 +2310,23 @@ const Gt = { class: "cl-mb-2 cl-text-sm lg:cl-hidden" }, Zt = { class: "cl-gap-1
|
|
|
2309
2310
|
"list",
|
|
2310
2311
|
"slot"
|
|
2311
2312
|
];
|
|
2312
|
-
function
|
|
2313
|
+
function el(t) {
|
|
2313
2314
|
return typeof t.caption == "string" && typeof t.name == "string" && typeof t.type == "string";
|
|
2314
2315
|
}
|
|
2315
|
-
function
|
|
2316
|
+
function _o(t) {
|
|
2316
2317
|
let o = Array.isArray(t);
|
|
2317
2318
|
if (o) {
|
|
2318
|
-
for (const
|
|
2319
|
-
if (!
|
|
2319
|
+
for (const e of t)
|
|
2320
|
+
if (!el(e)) {
|
|
2320
2321
|
o = !1;
|
|
2321
2322
|
break;
|
|
2322
2323
|
}
|
|
2323
2324
|
}
|
|
2324
2325
|
return o;
|
|
2325
2326
|
}
|
|
2326
|
-
const
|
|
2327
|
+
const Ro = ["ellipsis"];
|
|
2327
2328
|
var oe = /* @__PURE__ */ ((t) => (t[t.CONTAINS = 0] = "CONTAINS", t[t.NOT_CONTAINS = 1] = "NOT_CONTAINS", t[t.EQUAL = 2] = "EQUAL", t[t.NOT_EQUAL = 3] = "NOT_EQUAL", t[t.STARTS_WITH = 4] = "STARTS_WITH", t[t.ENDS_WITH = 5] = "ENDS_WITH", t[t.GREATER_THAN = 6] = "GREATER_THAN", t[t.LESS_THAN = 7] = "LESS_THAN", t[t.EQUAL_OR_GREATER_THAN = 8] = "EQUAL_OR_GREATER_THAN", t[t.EQUAL_OR_LESS_THAN = 9] = "EQUAL_OR_LESS_THAN", t))(oe || {});
|
|
2328
|
-
const
|
|
2329
|
+
const zo = [
|
|
2329
2330
|
"equal",
|
|
2330
2331
|
"notequal",
|
|
2331
2332
|
"contains",
|
|
@@ -2337,35 +2338,35 @@ const Ro = [
|
|
|
2337
2338
|
"equalorlessthan",
|
|
2338
2339
|
"equalorgreaterthan"
|
|
2339
2340
|
];
|
|
2340
|
-
function
|
|
2341
|
+
function Uo(t) {
|
|
2341
2342
|
return typeof t.filterOnColumn == "string" && typeof t.filterOperation == "number" && typeof t.filterValue == "string";
|
|
2342
2343
|
}
|
|
2343
|
-
function
|
|
2344
|
+
function Bo(t) {
|
|
2344
2345
|
return t === null || typeof t.sortByAscending == "boolean" && typeof t.sortOnColumn == "string";
|
|
2345
2346
|
}
|
|
2346
|
-
function
|
|
2347
|
-
let o = typeof t.filters == "object" && Array.isArray(t.filters) && typeof t.pageNumber == "number" && typeof t.pageSize == "number" && typeof t.sort == "object" &&
|
|
2347
|
+
function Mo(t) {
|
|
2348
|
+
let o = typeof t.filters == "object" && Array.isArray(t.filters) && typeof t.pageNumber == "number" && typeof t.pageSize == "number" && typeof t.sort == "object" && Bo(t.sort);
|
|
2348
2349
|
if (o) {
|
|
2349
|
-
for (const
|
|
2350
|
-
if (!
|
|
2350
|
+
for (const e of t.filters)
|
|
2351
|
+
if (!Uo(e)) {
|
|
2351
2352
|
o = !1;
|
|
2352
2353
|
break;
|
|
2353
2354
|
}
|
|
2354
2355
|
}
|
|
2355
2356
|
return o;
|
|
2356
2357
|
}
|
|
2357
|
-
function
|
|
2358
|
-
let
|
|
2359
|
-
if (
|
|
2360
|
-
for (const
|
|
2361
|
-
if (!o(
|
|
2362
|
-
|
|
2358
|
+
function Vo(t, o) {
|
|
2359
|
+
let e = typeof t.results == "object" && Array.isArray(t.results) && typeof t.totalRecords == "number";
|
|
2360
|
+
if (e) {
|
|
2361
|
+
for (const l of t.results)
|
|
2362
|
+
if (!o(l)) {
|
|
2363
|
+
e = !1;
|
|
2363
2364
|
break;
|
|
2364
2365
|
}
|
|
2365
2366
|
}
|
|
2366
|
-
return
|
|
2367
|
+
return e;
|
|
2367
2368
|
}
|
|
2368
|
-
const
|
|
2369
|
+
const Do = {
|
|
2369
2370
|
method: "equal",
|
|
2370
2371
|
icon: "mdi:equal",
|
|
2371
2372
|
description: "Equals",
|
|
@@ -2378,12 +2379,12 @@ const Vo = {
|
|
|
2378
2379
|
"list"
|
|
2379
2380
|
],
|
|
2380
2381
|
key: "equal"
|
|
2381
|
-
},
|
|
2382
|
+
}, Lo = {
|
|
2382
2383
|
method: "contains",
|
|
2383
2384
|
icon: "mdi:format-letter-matches",
|
|
2384
2385
|
description: "Contains",
|
|
2385
2386
|
allowedTypes: ["string"]
|
|
2386
|
-
},
|
|
2387
|
+
}, Po = {
|
|
2387
2388
|
method: "lessthan",
|
|
2388
2389
|
icon: "mdi:less-than",
|
|
2389
2390
|
description: "Before",
|
|
@@ -2393,7 +2394,7 @@ const Vo = {
|
|
|
2393
2394
|
],
|
|
2394
2395
|
key: "before"
|
|
2395
2396
|
}, We = [
|
|
2396
|
-
|
|
2397
|
+
Lo,
|
|
2397
2398
|
{
|
|
2398
2399
|
method: "notcontains",
|
|
2399
2400
|
icon: "mdi:format-letter-spacing-variant",
|
|
@@ -2412,7 +2413,7 @@ const Vo = {
|
|
|
2412
2413
|
description: "Ends with",
|
|
2413
2414
|
allowedTypes: ["string"]
|
|
2414
2415
|
},
|
|
2415
|
-
|
|
2416
|
+
Do,
|
|
2416
2417
|
{
|
|
2417
2418
|
method: "notequal",
|
|
2418
2419
|
icon: "mdi:not-equal",
|
|
@@ -2425,7 +2426,7 @@ const Vo = {
|
|
|
2425
2426
|
],
|
|
2426
2427
|
key: "notequal"
|
|
2427
2428
|
},
|
|
2428
|
-
|
|
2429
|
+
Po,
|
|
2429
2430
|
{
|
|
2430
2431
|
method: "greaterthan",
|
|
2431
2432
|
icon: "mdi:greater-than",
|
|
@@ -2480,7 +2481,7 @@ const Vo = {
|
|
|
2480
2481
|
description: "Less than",
|
|
2481
2482
|
allowedTypes: ["number"]
|
|
2482
2483
|
}
|
|
2483
|
-
],
|
|
2484
|
+
], Fo = { class: "cl-group cl-inline cl-relative cl-w-auto" }, Ho = { class: "cl-bg-off-white cl-border-grey-1 cl-border-r cl-flex cl-h-full cl-items-center cl-justify-center cl-rounded-md cl-w-10" }, xo = { class: "cl-p-2 cl-select-none" }, Go = ["onClick"], Zo = /* @__PURE__ */ M({
|
|
2484
2485
|
__name: "cl-ui-grid-method-selector",
|
|
2485
2486
|
props: {
|
|
2486
2487
|
filter: {},
|
|
@@ -2490,28 +2491,28 @@ const Vo = {
|
|
|
2490
2491
|
},
|
|
2491
2492
|
emits: ["update:filter"],
|
|
2492
2493
|
setup(t, { emit: o }) {
|
|
2493
|
-
const
|
|
2494
|
+
const e = t, { t: l } = ne(), s = N(() => {
|
|
2494
2495
|
let a = [];
|
|
2495
|
-
return
|
|
2496
|
-
c.description =
|
|
2496
|
+
return e.column.type !== "slot" ? a = We.filter((c) => c.allowedTypes.includes(e.column.type)) : typeof e.column.slotType < "u" && typeof e.column.field < "u" && (a = We.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) => {
|
|
2497
|
+
c.description = l(`grid.${c.key}`);
|
|
2497
2498
|
}) : a.forEach((c) => {
|
|
2498
|
-
c.description =
|
|
2499
|
+
c.description = l(`grid.${c.method}`);
|
|
2499
2500
|
}), a;
|
|
2500
|
-
}),
|
|
2501
|
+
}), g = N(() => {
|
|
2501
2502
|
var c;
|
|
2502
|
-
let a = (c =
|
|
2503
|
-
return typeof a > "u" && (a = oe[
|
|
2504
|
-
var
|
|
2505
|
-
return u.method.toLowerCase() === ((
|
|
2503
|
+
let a = (c = e.filter) == null ? void 0 : c.filterMethod;
|
|
2504
|
+
return typeof a > "u" && (a = oe[e.defaultOperation].toLowerCase()), s.value.find((u) => {
|
|
2505
|
+
var v;
|
|
2506
|
+
return u.method.toLowerCase() === ((v = a == null ? void 0 : a.removeNonAlphanumeric()) == null ? void 0 : v.toLowerCase());
|
|
2506
2507
|
});
|
|
2507
2508
|
});
|
|
2508
2509
|
function n(a) {
|
|
2509
2510
|
let c;
|
|
2510
|
-
if (
|
|
2511
|
-
c = ie(
|
|
2512
|
-
else if (typeof
|
|
2511
|
+
if (e.filter)
|
|
2512
|
+
c = ie(e.filter), c.filterOperation = oe[a.toUpperCase()], c.filterMethod = a.toLowerCase();
|
|
2513
|
+
else if (typeof e.column.field < "u")
|
|
2513
2514
|
c = {
|
|
2514
|
-
filterOnColumn:
|
|
2515
|
+
filterOnColumn: e.column.field,
|
|
2515
2516
|
filterMethod: a.toLowerCase(),
|
|
2516
2517
|
filterOperation: oe[a.toUpperCase()],
|
|
2517
2518
|
filterValue: ""
|
|
@@ -2520,47 +2521,47 @@ const Vo = {
|
|
|
2520
2521
|
return;
|
|
2521
2522
|
o("update:filter", c);
|
|
2522
2523
|
}
|
|
2523
|
-
return (a, c) => (i(),
|
|
2524
|
-
|
|
2525
|
-
|
|
2524
|
+
return (a, c) => (i(), b("div", Fo, [
|
|
2525
|
+
m("div", Ho, [
|
|
2526
|
+
g.value ? (i(), V(d(_), {
|
|
2526
2527
|
key: 0,
|
|
2527
|
-
icon:
|
|
2528
|
+
icon: g.value.icon,
|
|
2528
2529
|
class: I(["cl-text-lg", {
|
|
2529
|
-
"cl-text-grey-4":
|
|
2530
|
-
"cl-text-primary-default":
|
|
2530
|
+
"cl-text-grey-4": e.filter === void 0 || e.filter.filterValue === "",
|
|
2531
|
+
"cl-text-primary-default": e.filter && e.filter.filterValue !== ""
|
|
2531
2532
|
}])
|
|
2532
|
-
}, null, 8, ["icon", "class"])) :
|
|
2533
|
+
}, null, 8, ["icon", "class"])) : S("", !0)
|
|
2533
2534
|
]),
|
|
2534
|
-
|
|
2535
|
+
m("div", {
|
|
2535
2536
|
class: I(["cl-absolute cl-bg-white cl-border cl-border-grey-0 cl-flex-wrap cl-font-normal cl-h-0 cl-hidden cl-rounded cl-shadow-lg cl-text-left cl-text-xs cl-top-8 cl-z-10 group-hover:cl-flex group-hover:cl-h-auto group-hover:cl-w-52", {
|
|
2536
2537
|
"cl-left-0": a.firstHalf,
|
|
2537
2538
|
"cl--left-44": !a.firstHalf
|
|
2538
2539
|
}])
|
|
2539
2540
|
}, [
|
|
2540
|
-
|
|
2541
|
-
(i(!0),
|
|
2542
|
-
var
|
|
2543
|
-
return i(),
|
|
2544
|
-
key:
|
|
2541
|
+
m("strong", xo, T(d(l)("grid.availableMethods")), 1),
|
|
2542
|
+
(i(!0), b(P, null, Q(s.value, (u, v) => {
|
|
2543
|
+
var h;
|
|
2544
|
+
return i(), b("span", {
|
|
2545
|
+
key: v,
|
|
2545
2546
|
class: I(["cl-cursor-pointer cl-px-4 cl-py-1 cl-transition-colors cl-w-full hover:cl-bg-grey-0", {
|
|
2546
|
-
"cl-bg-primary-default cl-opacity-80": u.method === ((
|
|
2547
|
+
"cl-bg-primary-default cl-opacity-80": u.method === ((h = g.value) == null ? void 0 : h.method)
|
|
2547
2548
|
}]),
|
|
2548
2549
|
onClick: W((r) => n(u.method), ["prevent"])
|
|
2549
2550
|
}, [
|
|
2550
2551
|
le(T(u.description) + " ", 1),
|
|
2551
|
-
|
|
2552
|
+
$(d(_), {
|
|
2552
2553
|
icon: u.icon,
|
|
2553
2554
|
class: "cl-float-right cl-text-grey-4 cl-text-sm"
|
|
2554
2555
|
}, null, 8, ["icon"])
|
|
2555
|
-
], 10,
|
|
2556
|
+
], 10, Go);
|
|
2556
2557
|
}), 128))
|
|
2557
2558
|
], 2)
|
|
2558
2559
|
]));
|
|
2559
2560
|
}
|
|
2560
|
-
}),
|
|
2561
|
+
}), Wo = {
|
|
2561
2562
|
key: 0,
|
|
2562
2563
|
class: "cl-border cl-border-grey-2 cl-flex cl-overflow-hidden cl-rounded-md lg:cl-overflow-visible"
|
|
2563
|
-
},
|
|
2564
|
+
}, Ko = /* @__PURE__ */ m("option", { value: void 0 }, null, -1), Qo = ["selected"], Jo = ["selected"], Yo = /* @__PURE__ */ m("option", { value: void 0 }, null, -1), Xo = ["value", "selected"], en = /* @__PURE__ */ M({
|
|
2564
2565
|
__name: "cl-ui-grid-filter",
|
|
2565
2566
|
props: {
|
|
2566
2567
|
filter: {},
|
|
@@ -2570,21 +2571,21 @@ const Vo = {
|
|
|
2570
2571
|
},
|
|
2571
2572
|
emits: ["update:filter"],
|
|
2572
2573
|
setup(t, { emit: o }) {
|
|
2573
|
-
const
|
|
2574
|
-
function
|
|
2575
|
-
return
|
|
2574
|
+
const e = t, { locale: l, t: s } = ne();
|
|
2575
|
+
function g() {
|
|
2576
|
+
return e.column.type === "string" || e.column.slotType === "string" ? oe.CONTAINS : e.column.type === "datetime" || e.column.slotType === "datetime" || e.column.type === "date" || e.column.slotType === "date" ? oe.LESS_THAN : oe.EQUAL;
|
|
2576
2577
|
}
|
|
2577
|
-
const n =
|
|
2578
|
-
get: () =>
|
|
2578
|
+
const n = N({
|
|
2579
|
+
get: () => e.filter,
|
|
2579
2580
|
set: (E) => o("update:filter", E)
|
|
2580
|
-
}), a =
|
|
2581
|
+
}), a = N(() => e.column.type === "date" || e.column.type === "datetime" || e.column.type === "slot" && (e.column.slotType === "date" || e.column.slotType === "datetime")), c = N(() => e.column.type === "list" || e.column.type === "slot" && e.column.slotType === "list"), u = N(() => c.value && e.column.listType === "number"), v = N({
|
|
2581
2582
|
get() {
|
|
2582
|
-
var
|
|
2583
|
-
let E = (
|
|
2584
|
-
if (E && a.value && (((
|
|
2583
|
+
var R, z, y, D;
|
|
2584
|
+
let E = (R = n.value) == null ? void 0 : R[0];
|
|
2585
|
+
if (E && a.value && (((z = e.filter) == null ? void 0 : z.length) ?? 0 > 1)) {
|
|
2585
2586
|
const J = (y = n.value) == null ? void 0 : y.find((ce) => ce.filterOperation === oe.EQUAL_OR_GREATER_THAN), Z = (D = n.value) == null ? void 0 : D.find((ce) => ce.filterOperation === oe.LESS_THAN);
|
|
2586
2587
|
J && Z && (E = {
|
|
2587
|
-
filterOnColumn:
|
|
2588
|
+
filterOnColumn: e.column.field,
|
|
2588
2589
|
filterOperation: oe.EQUAL,
|
|
2589
2590
|
filterMethod: "equal",
|
|
2590
2591
|
filterValue: J.filterValue
|
|
@@ -2593,22 +2594,22 @@ const Vo = {
|
|
|
2593
2594
|
return E;
|
|
2594
2595
|
},
|
|
2595
2596
|
set(E) {
|
|
2596
|
-
if (E &&
|
|
2597
|
-
let
|
|
2598
|
-
zone:
|
|
2597
|
+
if (E && h(E.filterOperation, E.filterValue)) {
|
|
2598
|
+
let R = ke.fromISO(E.filterValue, {
|
|
2599
|
+
zone: e.timeZone
|
|
2599
2600
|
}).set({ second: 0, millisecond: 0 });
|
|
2600
|
-
const
|
|
2601
|
-
|
|
2602
|
-
const y =
|
|
2601
|
+
const z = R.toISO();
|
|
2602
|
+
e.column.type === "date" || e.column.type === "slot" && e.column.slotType === "date" ? R = R.plus({ days: 1 }) : R = R.plus({ minutes: 1 });
|
|
2603
|
+
const y = R.toISO();
|
|
2603
2604
|
n.value = [
|
|
2604
2605
|
{
|
|
2605
|
-
filterOnColumn:
|
|
2606
|
+
filterOnColumn: e.column.field,
|
|
2606
2607
|
filterOperation: oe.EQUAL_OR_GREATER_THAN,
|
|
2607
2608
|
filterMethod: "equalorgreaterthan",
|
|
2608
|
-
filterValue:
|
|
2609
|
+
filterValue: z
|
|
2609
2610
|
},
|
|
2610
2611
|
{
|
|
2611
|
-
filterOnColumn:
|
|
2612
|
+
filterOnColumn: e.column.field,
|
|
2612
2613
|
filterOperation: oe.LESS_THAN,
|
|
2613
2614
|
filterMethod: "lessthan",
|
|
2614
2615
|
filterValue: y
|
|
@@ -2618,95 +2619,95 @@ const Vo = {
|
|
|
2618
2619
|
n.value = E && [E];
|
|
2619
2620
|
}
|
|
2620
2621
|
});
|
|
2621
|
-
function
|
|
2622
|
-
const
|
|
2623
|
-
return
|
|
2622
|
+
function h(E, R) {
|
|
2623
|
+
const z = R !== void 0 && R !== "", y = E === oe.EQUAL;
|
|
2624
|
+
return z && y && a.value;
|
|
2624
2625
|
}
|
|
2625
|
-
const r =
|
|
2626
|
+
const r = N(() => {
|
|
2626
2627
|
var E;
|
|
2627
|
-
return ((E =
|
|
2628
|
-
}),
|
|
2629
|
-
function
|
|
2628
|
+
return ((E = v.value) == null ? void 0 : E.filterValue) ?? "";
|
|
2629
|
+
}), f = N(() => r.value === "" ? null : r.value), w = N(() => Intl.NumberFormat(l.value).format(1.1).replace(/[0-9]+/g, "")), O = N(() => Be(e.column));
|
|
2630
|
+
function C(E, R) {
|
|
2630
2631
|
var J;
|
|
2631
|
-
let
|
|
2632
|
-
const D = ((E == null ? void 0 : E.value) ??
|
|
2633
|
-
if (
|
|
2634
|
-
y = ((J =
|
|
2635
|
-
else if (D !== "" && typeof
|
|
2636
|
-
const Z =
|
|
2637
|
-
|
|
2638
|
-
filterOnColumn:
|
|
2632
|
+
let z, y = !1;
|
|
2633
|
+
const D = ((E == null ? void 0 : E.value) ?? R).trim();
|
|
2634
|
+
if (v.value)
|
|
2635
|
+
y = ((J = v.value) == null ? void 0 : J.filterValue) === D, z = ie(v.value), z.filterValue = D;
|
|
2636
|
+
else if (D !== "" && typeof e.column.field < "u") {
|
|
2637
|
+
const Z = g();
|
|
2638
|
+
z = {
|
|
2639
|
+
filterOnColumn: e.column.field,
|
|
2639
2640
|
filterMethod: oe[Z].toLowerCase(),
|
|
2640
2641
|
filterOperation: Z,
|
|
2641
2642
|
filterValue: D
|
|
2642
2643
|
};
|
|
2643
2644
|
} else
|
|
2644
2645
|
return;
|
|
2645
|
-
y === !1 && (
|
|
2646
|
+
y === !1 && (v.value = z);
|
|
2646
2647
|
}
|
|
2647
|
-
function
|
|
2648
|
-
let
|
|
2649
|
-
|
|
2648
|
+
function B(E, R) {
|
|
2649
|
+
let z, y = (E == null ? void 0 : E.value) ?? R ?? 0;
|
|
2650
|
+
e.column.format === X.INTEGER ? (typeof y == "string" && (y = parseInt(y)), z = Math.round(y)) : (typeof y == "string" && (y = parseFloat(y.replace(w.value, "."))), z = y), C(null, isNaN(z) ? "" : z.toString());
|
|
2650
2651
|
}
|
|
2651
|
-
return (E,
|
|
2652
|
-
E.column.type === "boolean" || E.column.slotType === "boolean" ? (i(),
|
|
2652
|
+
return (E, R) => O.value ? (i(), b("div", Wo, [
|
|
2653
|
+
E.column.type === "boolean" || E.column.slotType === "boolean" ? (i(), b("select", {
|
|
2653
2654
|
key: 0,
|
|
2654
2655
|
class: "!cl-h-[2rem] cl-border-none cl-mb-0 cl-rounded-md cl-w-full",
|
|
2655
|
-
onChange:
|
|
2656
|
+
onChange: R[0] || (R[0] = (z) => C(z.target))
|
|
2656
2657
|
}, [
|
|
2657
|
-
|
|
2658
|
-
|
|
2658
|
+
Ko,
|
|
2659
|
+
m("option", {
|
|
2659
2660
|
value: "true",
|
|
2660
2661
|
selected: r.value === "true"
|
|
2661
|
-
}, T(d(s)("grid.true")), 9,
|
|
2662
|
-
|
|
2662
|
+
}, T(d(s)("grid.true")), 9, Qo),
|
|
2663
|
+
m("option", {
|
|
2663
2664
|
value: "false",
|
|
2664
2665
|
selected: r.value === "false"
|
|
2665
|
-
}, T(d(s)("grid.false")), 9,
|
|
2666
|
+
}, T(d(s)("grid.false")), 9, Jo)
|
|
2666
2667
|
], 32)) : E.column.type === "date" || E.column.type === "datetime" || E.column.slotType === "date" || E.column.slotType === "datetime" ? (i(), V(re, {
|
|
2667
2668
|
key: 1,
|
|
2668
|
-
"model-value":
|
|
2669
|
+
"model-value": f.value,
|
|
2669
2670
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
2670
2671
|
label: E.column.caption,
|
|
2671
2672
|
"show-label": !1,
|
|
2672
2673
|
"input-type": E.column.type === "slot" ? E.column.slotType : E.column.type,
|
|
2673
2674
|
"time-zone": E.timeZone,
|
|
2674
|
-
"onUpdate:modelValue":
|
|
2675
|
+
"onUpdate:modelValue": R[1] || (R[1] = (z) => C(null, z ?? ""))
|
|
2675
2676
|
}, null, 8, ["model-value", "label", "input-type", "time-zone"])) : E.column.type === "number" || E.column.slotType === "number" ? (i(), V(re, {
|
|
2676
2677
|
key: 2,
|
|
2677
2678
|
"model-value": r.value,
|
|
2678
2679
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
2679
2680
|
"input-type": "number",
|
|
2680
2681
|
"show-arrows": !1,
|
|
2681
|
-
onInput:
|
|
2682
|
+
onInput: R[2] || (R[2] = (z, y) => B(null, y))
|
|
2682
2683
|
}, null, 8, ["model-value"])) : E.column.type === "string" || E.column.slotType === "string" ? (i(), V(re, {
|
|
2683
2684
|
key: 3,
|
|
2684
2685
|
"model-value": r.value,
|
|
2685
2686
|
class: "!cl-h-[2rem] !cl-text-xs cl-border-none cl-mb-0 cl-w-full lg:!cl-text-base",
|
|
2686
2687
|
"input-type": "text",
|
|
2687
|
-
onInput:
|
|
2688
|
-
}, null, 8, ["model-value"])) : c.value ? (i(),
|
|
2688
|
+
onInput: R[3] || (R[3] = (z, y) => C(null, y))
|
|
2689
|
+
}, null, 8, ["model-value"])) : c.value ? (i(), b("select", {
|
|
2689
2690
|
key: 4,
|
|
2690
2691
|
class: "!cl-h-[2rem] cl-border-none cl-mb-0 cl-rounded-md cl-w-full",
|
|
2691
|
-
onChange:
|
|
2692
|
+
onChange: R[4] || (R[4] = (z) => u.value ? B(z.target) : C(z.target))
|
|
2692
2693
|
}, [
|
|
2693
|
-
|
|
2694
|
-
(i(!0),
|
|
2695
|
-
key:
|
|
2696
|
-
value:
|
|
2697
|
-
selected: r.value ===
|
|
2698
|
-
}, T(d(s)(
|
|
2699
|
-
], 32)) :
|
|
2700
|
-
|
|
2701
|
-
filter:
|
|
2702
|
-
"onUpdate:filter":
|
|
2694
|
+
Yo,
|
|
2695
|
+
(i(!0), b(P, null, Q(E.column.listEntries ?? [], (z) => (i(), b("option", {
|
|
2696
|
+
key: z.value,
|
|
2697
|
+
value: z.value,
|
|
2698
|
+
selected: r.value === z.value.toString()
|
|
2699
|
+
}, T(d(s)(z.translationKey)), 9, Xo))), 128))
|
|
2700
|
+
], 32)) : S("", !0),
|
|
2701
|
+
$(Zo, {
|
|
2702
|
+
filter: v.value,
|
|
2703
|
+
"onUpdate:filter": R[5] || (R[5] = (z) => v.value = z),
|
|
2703
2704
|
column: E.column,
|
|
2704
|
-
"default-operation":
|
|
2705
|
+
"default-operation": g(),
|
|
2705
2706
|
"first-half": E.firstHalf
|
|
2706
2707
|
}, null, 8, ["filter", "column", "default-operation", "first-half"])
|
|
2707
|
-
])) :
|
|
2708
|
+
])) : S("", !0);
|
|
2708
2709
|
}
|
|
2709
|
-
}),
|
|
2710
|
+
}), ln = { class: "-cl-top-1 cl-bg-white cl-shadow-sm cl-sticky cl-z-20 lg:cl-bg-transparent lg:cl-relative lg:cl-shadow-none" }, tn = { class: "cl-hidden lg:cl-table-row" }, on = ["onClick"], nn = { class: "cl-flex cl-justify-end cl-w-full lg:cl-hidden" }, sn = { class: "cl-col-span-2 lg:cl-hidden" }, an = ["onClick"], rn = { class: "cl-font-normal cl-mr-1" }, cn = /* @__PURE__ */ M({
|
|
2710
2711
|
__name: "cl-ui-grid-header",
|
|
2711
2712
|
props: {
|
|
2712
2713
|
request: {},
|
|
@@ -2717,17 +2718,17 @@ const Vo = {
|
|
|
2717
2718
|
},
|
|
2718
2719
|
emits: ["update:request", "update:filterPanelOpen"],
|
|
2719
2720
|
setup(t, { emit: o }) {
|
|
2720
|
-
const
|
|
2721
|
-
get: () =>
|
|
2721
|
+
const e = t, { t: l } = ne(), s = N({
|
|
2722
|
+
get: () => e.request,
|
|
2722
2723
|
set: (c) => o("update:request", c)
|
|
2723
2724
|
});
|
|
2724
|
-
function
|
|
2725
|
-
var
|
|
2726
|
-
return ((
|
|
2725
|
+
function g(c, u) {
|
|
2726
|
+
var v, h;
|
|
2727
|
+
return ((v = s.value.sort) == null ? void 0 : v.sortOnColumn) === c.field && ((h = s.value.sort) == null ? void 0 : h.sortByAscending) === u;
|
|
2727
2728
|
}
|
|
2728
2729
|
function n(c) {
|
|
2729
2730
|
if (typeof c < "u") {
|
|
2730
|
-
const u = ie(
|
|
2731
|
+
const u = ie(e.request);
|
|
2731
2732
|
u.sort === null || u.sort.sortOnColumn !== c ? u.sort = {
|
|
2732
2733
|
sortOnColumn: c,
|
|
2733
2734
|
sortByAscending: !0
|
|
@@ -2738,67 +2739,67 @@ const Vo = {
|
|
|
2738
2739
|
if (c) {
|
|
2739
2740
|
const u = ie(s.value);
|
|
2740
2741
|
u.filters = [
|
|
2741
|
-
...u.filters.filter((
|
|
2742
|
+
...u.filters.filter((v) => v.filterOnColumn !== c[0].filterOnColumn),
|
|
2742
2743
|
...c
|
|
2743
2744
|
], u.pageNumber = 1, s.value = u;
|
|
2744
2745
|
}
|
|
2745
2746
|
}
|
|
2746
|
-
return (c, u) => (i(),
|
|
2747
|
-
|
|
2748
|
-
(i(!0),
|
|
2749
|
-
key:
|
|
2747
|
+
return (c, u) => (i(), b("thead", ln, [
|
|
2748
|
+
m("tr", tn, [
|
|
2749
|
+
(i(!0), b(P, null, Q(c.columns, (v, h) => (i(), b("th", {
|
|
2750
|
+
key: h,
|
|
2750
2751
|
class: I(["cl-text-grey-3 cl-text-sm", {
|
|
2751
|
-
"cl-cursor-pointer": d(Ae)(
|
|
2752
|
+
"cl-cursor-pointer": d(Ae)(v)
|
|
2752
2753
|
}]),
|
|
2753
|
-
onClick: (r) => d(Ae)(
|
|
2754
|
+
onClick: (r) => d(Ae)(v) ? n(v.field) : () => {
|
|
2754
2755
|
}
|
|
2755
2756
|
}, [
|
|
2756
|
-
le(T(
|
|
2757
|
-
F(
|
|
2757
|
+
le(T(v.caption) + " ", 1),
|
|
2758
|
+
F($(d(_), {
|
|
2758
2759
|
class: "cl-inline-block",
|
|
2759
2760
|
icon: "ph:caret-up"
|
|
2760
2761
|
}, null, 512), [
|
|
2761
|
-
[H,
|
|
2762
|
+
[H, g(v, !0)]
|
|
2762
2763
|
]),
|
|
2763
|
-
F(
|
|
2764
|
+
F($(d(_), {
|
|
2764
2765
|
class: "cl-inline-block",
|
|
2765
2766
|
icon: "ph:caret-down"
|
|
2766
2767
|
}, null, 512), [
|
|
2767
|
-
[H,
|
|
2768
|
+
[H, g(v, !1)]
|
|
2768
2769
|
])
|
|
2769
|
-
], 10,
|
|
2770
|
+
], 10, on))), 128))
|
|
2770
2771
|
]),
|
|
2771
|
-
|
|
2772
|
+
m("tr", {
|
|
2772
2773
|
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", {
|
|
2773
2774
|
"cl-hidden lg:cl-table-row": !c.filterPanelOpen
|
|
2774
2775
|
}])
|
|
2775
2776
|
}, [
|
|
2776
|
-
|
|
2777
|
-
|
|
2777
|
+
m("div", nn, [
|
|
2778
|
+
$(d(_), {
|
|
2778
2779
|
class: "cl-text-grey-4 hover:cl-cursor-pointer hover:cl-text-link-default",
|
|
2779
2780
|
icon: "ph:x",
|
|
2780
2781
|
size: 16,
|
|
2781
|
-
onClick: u[0] || (u[0] = W((
|
|
2782
|
+
onClick: u[0] || (u[0] = W((v) => c.$emit("update:filterPanelOpen", !1), ["prevent"]))
|
|
2782
2783
|
})
|
|
2783
2784
|
]),
|
|
2784
|
-
(i(!0),
|
|
2785
|
-
key:
|
|
2785
|
+
(i(!0), b(P, null, Q(c.columns, (v, h) => (i(), b("th", {
|
|
2786
|
+
key: h,
|
|
2786
2787
|
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", {
|
|
2787
|
-
"cl-hidden lg:cl-table-cell": !d(Be)(
|
|
2788
|
+
"cl-hidden lg:cl-table-cell": !d(Be)(v)
|
|
2788
2789
|
}])
|
|
2789
2790
|
}, [
|
|
2790
|
-
|
|
2791
|
-
d(Ae)(
|
|
2791
|
+
m("div", sn, T(v.caption), 1),
|
|
2792
|
+
d(Ae)(v) ? (i(), b("div", {
|
|
2792
2793
|
key: 0,
|
|
2793
2794
|
class: "cl-col-span-2 cl-gap-1 cl-span lg:cl-hidden",
|
|
2794
|
-
onClick: (r) => n(
|
|
2795
|
+
onClick: (r) => n(v.field)
|
|
2795
2796
|
}, [
|
|
2796
|
-
|
|
2797
|
-
|
|
2797
|
+
m("span", rn, T(d(l)("grid.sortBy")), 1),
|
|
2798
|
+
g(v, !0) ? (i(), V(d(_), {
|
|
2798
2799
|
key: 0,
|
|
2799
2800
|
class: "cl-cursor-pointer cl-inline-block",
|
|
2800
2801
|
icon: "ph:caret-up"
|
|
2801
|
-
})) :
|
|
2802
|
+
})) : g(v, !1) ? (i(), V(d(_), {
|
|
2802
2803
|
key: 1,
|
|
2803
2804
|
class: "cl-cursor-pointer cl-inline-block",
|
|
2804
2805
|
icon: "ph:caret-down"
|
|
@@ -2807,20 +2808,20 @@ const Vo = {
|
|
|
2807
2808
|
class: "cl-cursor-pointer cl-inline-block",
|
|
2808
2809
|
icon: "ph:minus"
|
|
2809
2810
|
}))
|
|
2810
|
-
], 8,
|
|
2811
|
-
|
|
2811
|
+
], 8, an)) : S("", !0),
|
|
2812
|
+
$(en, {
|
|
2812
2813
|
class: "cl-col-span-4",
|
|
2813
|
-
filter: s.value.filters.filter((r) => r.filterOnColumn ===
|
|
2814
|
-
column:
|
|
2814
|
+
filter: s.value.filters.filter((r) => r.filterOnColumn === v.field),
|
|
2815
|
+
column: v,
|
|
2815
2816
|
"time-zone": c.timeZone,
|
|
2816
|
-
"first-half":
|
|
2817
|
+
"first-half": h <= c.columns.length / 2,
|
|
2817
2818
|
"onUpdate:filter": a
|
|
2818
2819
|
}, null, 8, ["filter", "column", "time-zone", "first-half"])
|
|
2819
2820
|
], 2))), 128))
|
|
2820
2821
|
], 2)
|
|
2821
2822
|
]));
|
|
2822
2823
|
}
|
|
2823
|
-
}),
|
|
2824
|
+
}), un = { class: "cl-fixed cl-flex cl-h-full cl-justify-end cl-right-0 cl-shadow-lg cl-top-0 cl-z-40" }, dn = { 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" }, pn = { class: "cl-mb-4 cl-text-2xl cl-text-off-white" }, fn = { class: "cl-border-grey-3 cl-border-t cl-flex cl-flex-wrap cl-text-sm cl-w-full" }, mn = { class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full" }, gn = { class: "cl-flex-1 cl-py-2" }, vn = { class: "cl-py-2 cl-w-1/4" }, bn = { class: "cl-py-2 cl-w-1/5" }, hn = { class: "cl-flex-1 cl-py-2" }, yn = { class: "cl-py-2 cl-w-1/4" }, wn = { class: "cl-py-2 cl-text-off-white cl-w-1/5" }, $n = { key: 1 }, kn = /* @__PURE__ */ M({
|
|
2824
2825
|
inheritAttrs: !1,
|
|
2825
2826
|
__name: "cl-ui-grid-view-manager",
|
|
2826
2827
|
props: {
|
|
@@ -2828,74 +2829,74 @@ const Vo = {
|
|
|
2828
2829
|
},
|
|
2829
2830
|
emits: ["update:columns"],
|
|
2830
2831
|
setup(t, { emit: o }) {
|
|
2831
|
-
const
|
|
2832
|
-
function
|
|
2833
|
-
|
|
2832
|
+
const e = t, { t: l } = ne(), s = A(!1);
|
|
2833
|
+
function g(c, u, v) {
|
|
2834
|
+
v < c.length && v >= 0 && c.splice(v, 0, c.splice(u, 1)[0]);
|
|
2834
2835
|
}
|
|
2835
2836
|
function n(c, u) {
|
|
2836
|
-
const
|
|
2837
|
-
r >= 0 && (
|
|
2837
|
+
const v = ie(e.columns), h = (c == null ? void 0 : c.checked) ?? !1, r = v.findIndex((f) => f.name === u.name);
|
|
2838
|
+
r >= 0 && (v[r].visible = h), o("update:columns", v);
|
|
2838
2839
|
}
|
|
2839
2840
|
function a(c, u) {
|
|
2840
|
-
const
|
|
2841
|
-
|
|
2841
|
+
const v = ie(e.columns), h = u === "up" ? c + 1 : c - 1;
|
|
2842
|
+
g(v, c, h), o("update:columns", v);
|
|
2842
2843
|
}
|
|
2843
|
-
return (c, u) => (i(),
|
|
2844
|
-
|
|
2844
|
+
return (c, u) => (i(), b(P, null, [
|
|
2845
|
+
$(fe, ae(c.$attrs, {
|
|
2845
2846
|
class: "cl-w-full",
|
|
2846
2847
|
size: "small",
|
|
2847
|
-
onClick: u[0] || (u[0] = W((
|
|
2848
|
+
onClick: u[0] || (u[0] = W((v) => s.value = !0, ["prevent"]))
|
|
2848
2849
|
}), {
|
|
2849
2850
|
default: L(() => [
|
|
2850
|
-
le(T(d(
|
|
2851
|
+
le(T(d(l)("grid.manageView")), 1)
|
|
2851
2852
|
]),
|
|
2852
2853
|
_: 1
|
|
2853
2854
|
}, 16),
|
|
2854
2855
|
(i(), V(_e, { to: "body" }, [
|
|
2855
|
-
|
|
2856
|
+
$(me, { name: "slide-left" }, {
|
|
2856
2857
|
default: L(() => [
|
|
2857
|
-
F(
|
|
2858
|
-
|
|
2859
|
-
|
|
2858
|
+
F(m("div", un, [
|
|
2859
|
+
m("div", dn, [
|
|
2860
|
+
$(d(_), {
|
|
2860
2861
|
class: "cl-absolute cl-cursor-pointer cl-right-3 cl-text-off-white cl-top-3",
|
|
2861
2862
|
icon: "ph:x",
|
|
2862
2863
|
size: 16,
|
|
2863
|
-
onClick: u[1] || (u[1] = (
|
|
2864
|
+
onClick: u[1] || (u[1] = (v) => s.value = !1)
|
|
2864
2865
|
}),
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2866
|
+
m("h3", pn, T(d(l)("grid.manageView")), 1),
|
|
2867
|
+
m("ul", fn, [
|
|
2868
|
+
m("li", mn, [
|
|
2869
|
+
m("strong", gn, T(d(l)("grid.column")), 1),
|
|
2870
|
+
m("strong", vn, T(d(l)("grid.visible")), 1),
|
|
2871
|
+
m("strong", bn, T(d(l)("grid.order")), 1)
|
|
2871
2872
|
]),
|
|
2872
|
-
(i(!0),
|
|
2873
|
-
key:
|
|
2873
|
+
(i(!0), b(P, null, Q(c.columns, (v, h) => (i(), b("li", {
|
|
2874
|
+
key: h,
|
|
2874
2875
|
class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full"
|
|
2875
2876
|
}, [
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
"model-value":
|
|
2877
|
+
m("div", hn, T(v.caption), 1),
|
|
2878
|
+
m("div", yn, [
|
|
2879
|
+
$(re, {
|
|
2880
|
+
"model-value": v.visible === void 0 || v.visible === !0,
|
|
2880
2881
|
"input-type": "checkbox",
|
|
2881
|
-
onClick: (r) => n(r.target,
|
|
2882
|
+
onClick: (r) => n(r.target, v)
|
|
2882
2883
|
}, null, 8, ["model-value", "onClick"])
|
|
2883
2884
|
]),
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2885
|
+
m("div", wn, [
|
|
2886
|
+
v.visible === void 0 || v.visible === !0 ? (i(), b(P, { key: 0 }, [
|
|
2887
|
+
h !== 0 ? (i(), V(d(_), {
|
|
2887
2888
|
key: 0,
|
|
2888
2889
|
class: "cl-cursor-pointer cl-inline-block cl-mr-2",
|
|
2889
2890
|
icon: "ph:arrow-left",
|
|
2890
|
-
onClick: (r) => a(
|
|
2891
|
-
}, null, 8, ["onClick"])) :
|
|
2892
|
-
|
|
2891
|
+
onClick: (r) => a(h, "down")
|
|
2892
|
+
}, null, 8, ["onClick"])) : S("", !0),
|
|
2893
|
+
h !== c.columns.length - 1 ? (i(), V(d(_), {
|
|
2893
2894
|
key: 1,
|
|
2894
2895
|
class: "cl-cursor-pointer cl-inline-block",
|
|
2895
2896
|
icon: "ph:arrow-right",
|
|
2896
|
-
onClick: (r) => a(
|
|
2897
|
-
}, null, 8, ["onClick"])) :
|
|
2898
|
-
], 64)) : (i(),
|
|
2897
|
+
onClick: (r) => a(h, "up")
|
|
2898
|
+
}, null, 8, ["onClick"])) : S("", !0)
|
|
2899
|
+
], 64)) : (i(), b("em", $n, T(d(l)("grid.hidden")), 1))
|
|
2899
2900
|
])
|
|
2900
2901
|
]))), 128))
|
|
2901
2902
|
])
|
|
@@ -2909,7 +2910,7 @@ const Vo = {
|
|
|
2909
2910
|
]))
|
|
2910
2911
|
], 64));
|
|
2911
2912
|
}
|
|
2912
|
-
}),
|
|
2913
|
+
}), Cn = { class: "cl-relative cl-w-full grid-wrapper lg:cl-min-h-fit" }, Tn = { class: "cl-absolute cl-flex cl-items-center cl-justify-center cl-min-h-full cl-p-32 cl-w-full" }, En = { class: "cl-overflow-x-auto cl-overscroll-x-none cl-pt-1" }, On = { class: "cl-hidden lg:cl-table-column-group" }, An = /* @__PURE__ */ M({
|
|
2913
2914
|
__name: "cl-ui-grid",
|
|
2914
2915
|
props: {
|
|
2915
2916
|
columns: {},
|
|
@@ -2921,150 +2922,150 @@ const Vo = {
|
|
|
2921
2922
|
},
|
|
2922
2923
|
emits: ["update:columns", "update:request", "data-request", "row-edit", "edit-start", "edit-end", "row-select"],
|
|
2923
2924
|
setup(t, { emit: o }) {
|
|
2924
|
-
const
|
|
2925
|
-
get: () =>
|
|
2926
|
-
set: (
|
|
2927
|
-
}), s =
|
|
2925
|
+
const e = t, l = N({
|
|
2926
|
+
get: () => e.columns,
|
|
2927
|
+
set: (w) => o("update:columns", w)
|
|
2928
|
+
}), s = N(() => l.value.filter((w) => w.visible ?? !0)), g = A({});
|
|
2928
2929
|
function n() {
|
|
2929
|
-
const
|
|
2930
|
-
window.innerWidth >= 1024 &&
|
|
2931
|
-
const
|
|
2932
|
-
|
|
2933
|
-
}),
|
|
2930
|
+
const w = {};
|
|
2931
|
+
window.innerWidth >= 1024 && l.value.forEach((O) => {
|
|
2932
|
+
const C = O.width ? `${O.width}px` : "";
|
|
2933
|
+
w[`${O.name}`] = `width: ${C}; min-width: ${C};`;
|
|
2934
|
+
}), g.value = w;
|
|
2934
2935
|
}
|
|
2935
|
-
function a(
|
|
2936
|
-
return
|
|
2936
|
+
function a(w) {
|
|
2937
|
+
return g.value[w] ?? "";
|
|
2937
2938
|
}
|
|
2938
2939
|
Se(() => {
|
|
2939
2940
|
window.addEventListener("resize", n), n();
|
|
2940
2941
|
}), Re(() => window.removeEventListener("resize", n));
|
|
2941
|
-
const c =
|
|
2942
|
-
get: () =>
|
|
2943
|
-
set: (
|
|
2942
|
+
const c = N({
|
|
2943
|
+
get: () => e.request,
|
|
2944
|
+
set: (w) => o("update:request", w)
|
|
2944
2945
|
});
|
|
2945
2946
|
function u() {
|
|
2946
|
-
const
|
|
2947
|
-
|
|
2947
|
+
const w = ie(c.value);
|
|
2948
|
+
w.pageNumber = 1, w.filters = [], c.value = w;
|
|
2948
2949
|
}
|
|
2949
|
-
const
|
|
2950
|
-
K(c,
|
|
2950
|
+
const v = Qe(() => o("data-request"), 750);
|
|
2951
|
+
K(c, v, {
|
|
2951
2952
|
deep: !0,
|
|
2952
2953
|
immediate: !0
|
|
2953
2954
|
});
|
|
2954
|
-
const
|
|
2955
|
-
return K(r, () => r.value ? o("edit-start") : o("edit-end")), (
|
|
2956
|
-
|
|
2955
|
+
const h = N(() => e.data), r = A(!1), f = A(!1);
|
|
2956
|
+
return K(r, () => r.value ? o("edit-start") : o("edit-end")), (w, O) => (i(), b("div", Cn, [
|
|
2957
|
+
$(me, { name: "fade" }, {
|
|
2957
2958
|
default: L(() => [
|
|
2958
|
-
F(
|
|
2959
|
-
|
|
2959
|
+
F(m("div", Tn, [
|
|
2960
|
+
$(Ne)
|
|
2960
2961
|
], 512), [
|
|
2961
|
-
[H,
|
|
2962
|
+
[H, w.loading]
|
|
2962
2963
|
])
|
|
2963
2964
|
]),
|
|
2964
2965
|
_: 1
|
|
2965
2966
|
}),
|
|
2966
|
-
|
|
2967
|
+
$(Xt, {
|
|
2967
2968
|
"edit-mode": r.value,
|
|
2968
|
-
"onUpdate:editMode": O[1] || (O[1] = (
|
|
2969
|
-
"filter-panel-open":
|
|
2970
|
-
"onUpdate:filterPanelOpen": O[2] || (O[2] = (
|
|
2971
|
-
columns:
|
|
2972
|
-
options:
|
|
2973
|
-
request:
|
|
2974
|
-
loading:
|
|
2969
|
+
"onUpdate:editMode": O[1] || (O[1] = (C) => r.value = C),
|
|
2970
|
+
"filter-panel-open": f.value,
|
|
2971
|
+
"onUpdate:filterPanelOpen": O[2] || (O[2] = (C) => f.value = C),
|
|
2972
|
+
columns: w.columns,
|
|
2973
|
+
options: w.options,
|
|
2974
|
+
request: w.request,
|
|
2975
|
+
loading: w.loading,
|
|
2975
2976
|
onClearFilters: u
|
|
2976
2977
|
}, {
|
|
2977
|
-
"additional-grid-actions": L((
|
|
2978
|
-
j(
|
|
2978
|
+
"additional-grid-actions": L((C) => [
|
|
2979
|
+
j(w.$slots, "additional-grid-actions", te(se(C)))
|
|
2979
2980
|
]),
|
|
2980
2981
|
"view-manager": L(() => [
|
|
2981
|
-
|
|
2982
|
-
columns:
|
|
2983
|
-
"onUpdate:columns": O[0] || (O[0] = (
|
|
2982
|
+
$(kn, {
|
|
2983
|
+
columns: l.value,
|
|
2984
|
+
"onUpdate:columns": O[0] || (O[0] = (C) => l.value = C)
|
|
2984
2985
|
}, null, 8, ["columns"])
|
|
2985
2986
|
]),
|
|
2986
2987
|
_: 3
|
|
2987
2988
|
}, 8, ["edit-mode", "filter-panel-open", "columns", "options", "request", "loading"]),
|
|
2988
|
-
|
|
2989
|
-
|
|
2989
|
+
m("div", En, [
|
|
2990
|
+
m("table", {
|
|
2990
2991
|
class: I(["cl-delay-75 cl-min-h-[276px] cl-overflow-x-auto cl-overscroll-x-none cl-text-left cl-transition-opacity cl-w-full", {
|
|
2991
|
-
"cl-opacity-40":
|
|
2992
|
+
"cl-opacity-40": w.loading
|
|
2992
2993
|
}])
|
|
2993
2994
|
}, [
|
|
2994
|
-
|
|
2995
|
-
(i(!0),
|
|
2996
|
-
key:
|
|
2997
|
-
style:
|
|
2995
|
+
m("colgroup", On, [
|
|
2996
|
+
(i(!0), b(P, null, Q(s.value, (C, B) => (i(), b("col", {
|
|
2997
|
+
key: B,
|
|
2998
|
+
style: il(a(C.name)),
|
|
2998
2999
|
span: 1
|
|
2999
3000
|
}, null, 4))), 128))
|
|
3000
3001
|
]),
|
|
3001
|
-
|
|
3002
|
+
$(cn, {
|
|
3002
3003
|
request: c.value,
|
|
3003
|
-
"onUpdate:request": O[3] || (O[3] = (
|
|
3004
|
-
"filter-panel-open":
|
|
3005
|
-
"onUpdate:filterPanelOpen": O[4] || (O[4] = (
|
|
3004
|
+
"onUpdate:request": O[3] || (O[3] = (C) => c.value = C),
|
|
3005
|
+
"filter-panel-open": f.value,
|
|
3006
|
+
"onUpdate:filterPanelOpen": O[4] || (O[4] = (C) => f.value = C),
|
|
3006
3007
|
columns: s.value,
|
|
3007
|
-
options:
|
|
3008
|
-
"time-zone":
|
|
3008
|
+
options: w.options,
|
|
3009
|
+
"time-zone": w.timeZone
|
|
3009
3010
|
}, null, 8, ["request", "filter-panel-open", "columns", "options", "time-zone"]),
|
|
3010
|
-
|
|
3011
|
+
$(mo, {
|
|
3011
3012
|
columns: s.value,
|
|
3012
3013
|
request: c.value,
|
|
3013
|
-
data:
|
|
3014
|
-
"time-zone":
|
|
3015
|
-
loading:
|
|
3014
|
+
data: h.value,
|
|
3015
|
+
"time-zone": w.timeZone,
|
|
3016
|
+
loading: w.loading,
|
|
3016
3017
|
"edit-mode": r.value,
|
|
3017
|
-
"selection-enabled":
|
|
3018
|
+
"selection-enabled": w.options.rowSelectionEnabled,
|
|
3018
3019
|
onClearFilters: u,
|
|
3019
|
-
onRowEdit: O[5] || (O[5] = (
|
|
3020
|
-
onRowSelect: O[6] || (O[6] = (
|
|
3020
|
+
onRowEdit: O[5] || (O[5] = (C) => w.$emit("row-edit", C)),
|
|
3021
|
+
onRowSelect: O[6] || (O[6] = (C) => w.$emit("row-select", C))
|
|
3021
3022
|
}, ze({ _: 2 }, [
|
|
3022
|
-
Q(
|
|
3023
|
-
name:
|
|
3023
|
+
Q(w.$slots, (C, B) => ({
|
|
3024
|
+
name: B,
|
|
3024
3025
|
fn: L((E) => [
|
|
3025
|
-
j(
|
|
3026
|
+
j(w.$slots, B, te(se(E)))
|
|
3026
3027
|
])
|
|
3027
3028
|
}))
|
|
3028
3029
|
]), 1032, ["columns", "request", "data", "time-zone", "loading", "edit-mode", "selection-enabled"])
|
|
3029
3030
|
], 2)
|
|
3030
3031
|
]),
|
|
3031
|
-
|
|
3032
|
+
$(jo, {
|
|
3032
3033
|
request: c.value,
|
|
3033
|
-
"onUpdate:request": O[7] || (O[7] = (
|
|
3034
|
-
data:
|
|
3034
|
+
"onUpdate:request": O[7] || (O[7] = (C) => c.value = C),
|
|
3035
|
+
data: w.data
|
|
3035
3036
|
}, null, 8, ["request", "data"])
|
|
3036
3037
|
]));
|
|
3037
3038
|
}
|
|
3038
|
-
}),
|
|
3039
|
+
}), qn = { class: "cl-absolute cl-bg-secondary-default cl-flex cl-h-20 cl-items-center cl-justify-between cl-left-0 cl-top-0 cl-w-full cl-z-40" }, Sn = /* @__PURE__ */ M({
|
|
3039
3040
|
__name: "cl-ui-header",
|
|
3040
3041
|
props: {
|
|
3041
3042
|
isOpen: { type: Boolean }
|
|
3042
3043
|
},
|
|
3043
3044
|
emits: ["open-click"],
|
|
3044
3045
|
setup(t, { emit: o }) {
|
|
3045
|
-
const
|
|
3046
|
-
return Ue(
|
|
3047
|
-
(
|
|
3048
|
-
}), (s,
|
|
3046
|
+
const e = t, l = A();
|
|
3047
|
+
return Ue(l, () => {
|
|
3048
|
+
(e.isOpen ?? !1) && o("open-click");
|
|
3049
|
+
}), (s, g) => (i(), b("header", qn, [
|
|
3049
3050
|
j(s.$slots, "logo"),
|
|
3050
|
-
|
|
3051
|
+
m("div", {
|
|
3051
3052
|
ref_key: "headerMenuElement",
|
|
3052
|
-
ref:
|
|
3053
|
+
ref: l,
|
|
3053
3054
|
class: "cl-cursor-pointer cl-flex cl-flex-nowrap",
|
|
3054
|
-
onClick:
|
|
3055
|
+
onClick: g[0] || (g[0] = (n) => s.$emit("open-click"))
|
|
3055
3056
|
}, [
|
|
3056
3057
|
j(s.$slots, "menu"),
|
|
3057
3058
|
j(s.$slots, "icon")
|
|
3058
3059
|
], 512)
|
|
3059
3060
|
]));
|
|
3060
3061
|
}
|
|
3061
|
-
}),
|
|
3062
|
+
}), Nn = { class: "cl-bg-transparent cl-flex cl-items-center cl-select-none hover:cl-bg-opacity-10 hover:cl-bg-white md:cl-min-w-[320px]" }, jn = ["src"], In = {
|
|
3062
3063
|
key: 0,
|
|
3063
3064
|
class: "cl-text-ellipsis cl-whitespace-nowrap"
|
|
3064
|
-
},
|
|
3065
|
+
}, _n = {
|
|
3065
3066
|
key: 1,
|
|
3066
3067
|
class: "cl-text-ellipsis cl-text-xs cl-whitespace-nowrap"
|
|
3067
|
-
},
|
|
3068
|
+
}, Rn = { class: "cl-content-center cl-flex cl-h-20 cl-items-center cl-justify-center cl-justify-items-center cl-transition-all cl-w-10 md:cl-ml-4 md:cl-w-20" }, zn = { class: "cl-absolute cl-bg-white cl-right-0 cl-shadow-2xl cl-top-20 cl-w-full cl-z-20" }, Un = /* @__PURE__ */ M({
|
|
3068
3069
|
__name: "cl-ui-header-menu",
|
|
3069
3070
|
props: {
|
|
3070
3071
|
username: { default: "" },
|
|
@@ -3075,37 +3076,37 @@ const Vo = {
|
|
|
3075
3076
|
},
|
|
3076
3077
|
setup(t) {
|
|
3077
3078
|
const o = t;
|
|
3078
|
-
return (
|
|
3079
|
+
return (e, l) => (i(), b("div", {
|
|
3079
3080
|
class: I(["md:cl-relative", {
|
|
3080
3081
|
"cl-bg-primary-default": (o == null ? void 0 : o.colour) === "default",
|
|
3081
3082
|
"cl-bg-blue-light": o.colour === "secondary"
|
|
3082
3083
|
}])
|
|
3083
3084
|
}, [
|
|
3084
|
-
|
|
3085
|
-
|
|
3085
|
+
m("div", Nn, [
|
|
3086
|
+
e.image ? (i(), b("img", {
|
|
3086
3087
|
key: 0,
|
|
3087
|
-
src:
|
|
3088
|
+
src: e.image,
|
|
3088
3089
|
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"
|
|
3089
|
-
}, null, 8,
|
|
3090
|
+
}, null, 8, jn)) : (i(), V(d(_), {
|
|
3090
3091
|
key: 1,
|
|
3091
3092
|
class: "cl-hidden cl-m-4 cl-text-white md:cl-block",
|
|
3092
3093
|
icon: "ph:user-circle",
|
|
3093
3094
|
width: "48",
|
|
3094
3095
|
height: "48"
|
|
3095
3096
|
})),
|
|
3096
|
-
|
|
3097
|
+
m("div", {
|
|
3097
3098
|
class: I(["cl-grow cl-hidden cl-my-4 md:cl-block", {
|
|
3098
3099
|
"cl-text-secondary-default": o.colour === "default",
|
|
3099
3100
|
"cl-text-white": o.colour === "secondary"
|
|
3100
3101
|
}])
|
|
3101
3102
|
}, [
|
|
3102
|
-
|
|
3103
|
-
|
|
3103
|
+
e.username ? (i(), b("div", In, T(e.username), 1)) : S("", !0),
|
|
3104
|
+
e.group ? (i(), b("div", _n, T(e.group), 1)) : S("", !0)
|
|
3104
3105
|
], 2),
|
|
3105
|
-
|
|
3106
|
-
|
|
3106
|
+
m("div", Rn, [
|
|
3107
|
+
$(d(_), {
|
|
3107
3108
|
class: I(["cl-transform-gpu cl-transition-transform", {
|
|
3108
|
-
"cl-rotate-180":
|
|
3109
|
+
"cl-rotate-180": e.isOpen,
|
|
3109
3110
|
"cl-text-secondary-default": o.colour === "default",
|
|
3110
3111
|
"cl-text-white": o.colour === "secondary"
|
|
3111
3112
|
}]),
|
|
@@ -3113,12 +3114,12 @@ const Vo = {
|
|
|
3113
3114
|
}, null, 8, ["class"])
|
|
3114
3115
|
])
|
|
3115
3116
|
]),
|
|
3116
|
-
|
|
3117
|
+
$(me, { name: "fade" }, {
|
|
3117
3118
|
default: L(() => [
|
|
3118
|
-
F(
|
|
3119
|
-
j(
|
|
3119
|
+
F(m("div", zn, [
|
|
3120
|
+
j(e.$slots, "default")
|
|
3120
3121
|
], 512), [
|
|
3121
|
-
[H,
|
|
3122
|
+
[H, e.isOpen]
|
|
3122
3123
|
])
|
|
3123
3124
|
]),
|
|
3124
3125
|
_: 3
|
|
@@ -3129,24 +3130,24 @@ const Vo = {
|
|
|
3129
3130
|
function Ie(t) {
|
|
3130
3131
|
return /[a-z]{2}-[A-Z]{2}/gm.test(t.localeCode);
|
|
3131
3132
|
}
|
|
3132
|
-
function
|
|
3133
|
+
function Bn(t) {
|
|
3133
3134
|
let o = Array.isArray(t);
|
|
3134
3135
|
if (o) {
|
|
3135
|
-
for (const
|
|
3136
|
-
if (!
|
|
3136
|
+
for (const e of t)
|
|
3137
|
+
if (!Mn(e)) {
|
|
3137
3138
|
o = !1;
|
|
3138
3139
|
break;
|
|
3139
3140
|
}
|
|
3140
3141
|
}
|
|
3141
3142
|
return o;
|
|
3142
3143
|
}
|
|
3143
|
-
function
|
|
3144
|
+
function Mn(t) {
|
|
3144
3145
|
return typeof t.name == "string" && typeof t.nativeName == "string" && typeof t.localeCode == "string";
|
|
3145
3146
|
}
|
|
3146
|
-
const
|
|
3147
|
+
const Vn = {
|
|
3147
3148
|
key: 0,
|
|
3148
3149
|
class: "cl-flex cl-relative cl-select-none cl-w-auto cl-z-30"
|
|
3149
|
-
},
|
|
3150
|
+
}, Dn = { class: "cl-absolute cl-bg-white cl-border cl-border-grey-0 cl-overflow-hidden cl-right-0 cl-rounded cl-shadow-xl cl-text-black cl-top-6 cl-z-30" }, Ln = ["data-localename", "data-localecode", "onClick"], Pn = { class: "cl-text-xs" }, Fn = /* @__PURE__ */ M({
|
|
3150
3151
|
__name: "cl-ui-language-switcher",
|
|
3151
3152
|
props: {
|
|
3152
3153
|
supportedLanguages: {},
|
|
@@ -3155,51 +3156,51 @@ const Mn = {
|
|
|
3155
3156
|
},
|
|
3156
3157
|
emits: ["language-select"],
|
|
3157
3158
|
setup(t, { emit: o }) {
|
|
3158
|
-
const
|
|
3159
|
+
const e = t, { locale: l } = ne(), s = A(!1), g = N(() => e.supportedLanguages.find((c) => c.localeCode === l.value) ?? e.defaultLangauge), n = N(() => e.supportedLanguages.filter((c) => Ie(c)).sort((c, u) => c.nativeName > u.nativeName ? 1 : u.nativeName > c.nativeName ? -1 : 0));
|
|
3159
3160
|
function a() {
|
|
3160
|
-
|
|
3161
|
+
e.disabled || (s.value = !s.value);
|
|
3161
3162
|
}
|
|
3162
|
-
return K(() =>
|
|
3163
|
+
return K(() => e.disabled, (c) => {
|
|
3163
3164
|
c && (s.value = !1);
|
|
3164
|
-
}), (c, u) =>
|
|
3165
|
-
|
|
3165
|
+
}), (c, u) => g.value !== null && d(Ie)(g.value) ? (i(), b("div", Vn, [
|
|
3166
|
+
m("div", {
|
|
3166
3167
|
class: I(["cl-flex cl-items-center", {
|
|
3167
3168
|
"cl-cursor-pointer": !c.disabled
|
|
3168
3169
|
}]),
|
|
3169
3170
|
onClick: a
|
|
3170
3171
|
}, [
|
|
3171
|
-
|
|
3172
|
+
m("span", {
|
|
3172
3173
|
class: I(["cl-font-semibold cl-text-xs", {
|
|
3173
3174
|
"cl-opacity-50": c.disabled
|
|
3174
3175
|
}])
|
|
3175
|
-
}, T(
|
|
3176
|
+
}, T(g.value.nativeName), 3)
|
|
3176
3177
|
], 2),
|
|
3177
|
-
|
|
3178
|
+
$(me, { name: "fade" }, {
|
|
3178
3179
|
default: L(() => [
|
|
3179
|
-
F(
|
|
3180
|
-
(i(!0),
|
|
3181
|
-
key:
|
|
3180
|
+
F(m("div", Dn, [
|
|
3181
|
+
(i(!0), b(P, null, Q(n.value, (v, h) => (i(), b("div", {
|
|
3182
|
+
key: h,
|
|
3182
3183
|
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",
|
|
3183
|
-
"data-localename":
|
|
3184
|
-
"data-localecode":
|
|
3184
|
+
"data-localename": v.name,
|
|
3185
|
+
"data-localecode": v.localeCode,
|
|
3185
3186
|
onClick: (r) => {
|
|
3186
|
-
|
|
3187
|
+
l.value = v.localeCode, a(), o("language-select", v.localeCode);
|
|
3187
3188
|
}
|
|
3188
3189
|
}, [
|
|
3189
|
-
|
|
3190
|
-
], 8,
|
|
3190
|
+
m("span", Pn, T(v.nativeName), 1)
|
|
3191
|
+
], 8, Ln))), 128))
|
|
3191
3192
|
], 512), [
|
|
3192
3193
|
[H, s.value]
|
|
3193
3194
|
])
|
|
3194
3195
|
]),
|
|
3195
3196
|
_: 1
|
|
3196
3197
|
})
|
|
3197
|
-
])) :
|
|
3198
|
+
])) : S("", !0);
|
|
3198
3199
|
}
|
|
3199
|
-
}),
|
|
3200
|
+
}), Hn = { class: "cl-relative" }, xn = { class: "cl-h-full cl-z-0 xl:cl-h-screen" }, Gn = { 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" }, Zn = { class: "cl-col-span-10 lg:cl-col-span-3" }, Wn = {
|
|
3200
3201
|
key: 0,
|
|
3201
3202
|
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"
|
|
3202
|
-
},
|
|
3203
|
+
}, Kn = { class: "cl-col-span-3" }, Qn = { class: "cl-inline cl-relative cl-text-grey-4" }, Jn = { class: "cl-col-span-3" }, Yn = { class: "cl-inline cl-relative cl-text-grey-4" }, Xn = { class: "cl-col-span-10 cl-emphasis-danger cl-mt-10 cl-p-3 cl-rounded-md cl-text-sm md:cl-mt-3" }, es = /* @__PURE__ */ M({
|
|
3203
3204
|
__name: "cl-ui-login",
|
|
3204
3205
|
props: {
|
|
3205
3206
|
errors: { default: () => [] },
|
|
@@ -3210,105 +3211,105 @@ const Mn = {
|
|
|
3210
3211
|
"update:errors": null
|
|
3211
3212
|
},
|
|
3212
3213
|
setup(t, { emit: o }) {
|
|
3213
|
-
const { t:
|
|
3214
|
+
const { t: e } = ne(), l = A(""), s = A(""), g = A("password"), n = A();
|
|
3214
3215
|
function a() {
|
|
3215
|
-
const
|
|
3216
|
-
username:
|
|
3216
|
+
const h = {
|
|
3217
|
+
username: l.value,
|
|
3217
3218
|
password: s.value
|
|
3218
3219
|
};
|
|
3219
|
-
o("login",
|
|
3220
|
+
o("login", h);
|
|
3220
3221
|
}
|
|
3221
3222
|
function c() {
|
|
3222
3223
|
o("update:errors", []);
|
|
3223
3224
|
}
|
|
3224
|
-
function u(
|
|
3225
|
-
const
|
|
3225
|
+
function u(h, r) {
|
|
3226
|
+
const f = {
|
|
3226
3227
|
valid: !0,
|
|
3227
3228
|
message: ""
|
|
3228
3229
|
};
|
|
3229
|
-
return typeof r == "string" && r.trim() === "" && (
|
|
3230
|
+
return typeof r == "string" && r.trim() === "" && (f.valid = !1), f;
|
|
3230
3231
|
}
|
|
3231
|
-
function
|
|
3232
|
-
n.value =
|
|
3232
|
+
function v(h, r) {
|
|
3233
|
+
n.value = h;
|
|
3233
3234
|
}
|
|
3234
|
-
return (
|
|
3235
|
-
|
|
3236
|
-
j(
|
|
3235
|
+
return (h, r) => (i(), b("div", Hn, [
|
|
3236
|
+
m("div", xn, [
|
|
3237
|
+
j(h.$slots, "background")
|
|
3237
3238
|
]),
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
j(
|
|
3239
|
+
m("form", Gn, [
|
|
3240
|
+
m("div", Zn, [
|
|
3241
|
+
j(h.$slots, "logo")
|
|
3241
3242
|
]),
|
|
3242
|
-
|
|
3243
|
-
j(
|
|
3244
|
-
])) :
|
|
3245
|
-
|
|
3243
|
+
h.$slots["language-switcher"] ? (i(), b("div", Wn, [
|
|
3244
|
+
j(h.$slots, "language-switcher")
|
|
3245
|
+
])) : S("", !0),
|
|
3246
|
+
m("div", {
|
|
3246
3247
|
class: I(["cl-gap-y-4 cl-grid cl-grid-cols-1 lg:cl-gap-x-2 lg:cl-grid-cols-8", {
|
|
3247
|
-
"cl-col-span-7": !
|
|
3248
|
-
"cl-col-span-6":
|
|
3248
|
+
"cl-col-span-7": !h.$slots["language-switcher"],
|
|
3249
|
+
"cl-col-span-6": h.$slots["language-switcher"]
|
|
3249
3250
|
}])
|
|
3250
3251
|
}, [
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3252
|
+
m("div", Kn, [
|
|
3253
|
+
m("div", Qn, [
|
|
3254
|
+
$(d(_), {
|
|
3254
3255
|
class: "cl-absolute cl-left-3 cl-top-2.5 cl-z-10",
|
|
3255
3256
|
icon: "ph:user",
|
|
3256
3257
|
size: 18
|
|
3257
3258
|
}),
|
|
3258
|
-
|
|
3259
|
+
$(re, {
|
|
3259
3260
|
id: "cl-ui-login-usernameinput",
|
|
3260
|
-
modelValue:
|
|
3261
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
3261
|
+
modelValue: l.value,
|
|
3262
|
+
"onUpdate:modelValue": r[0] || (r[0] = (f) => l.value = f),
|
|
3262
3263
|
modelModifiers: { trim: !0 },
|
|
3263
3264
|
class: "!cl-border-2 !cl-mb-1 cl-w-full",
|
|
3264
3265
|
"input-type": "email",
|
|
3265
|
-
"highlight-when-valid":
|
|
3266
|
-
label: d(
|
|
3266
|
+
"highlight-when-valid": l.value !== void 0 && l.value !== "",
|
|
3267
|
+
label: d(e)("login.username"),
|
|
3267
3268
|
"show-label": !1,
|
|
3268
|
-
"placeholder-text": d(
|
|
3269
|
+
"placeholder-text": d(e)("login.email"),
|
|
3269
3270
|
autocomplete: "username",
|
|
3270
3271
|
"validate-immediately": !0,
|
|
3271
3272
|
"custom-validation-function": u,
|
|
3272
3273
|
"input-specific-classes": "!cl-pl-9",
|
|
3273
|
-
"message-when-valid":
|
|
3274
|
+
"message-when-valid": l.value ? d(e)("login.validEmail") : "",
|
|
3274
3275
|
onInput: c,
|
|
3275
|
-
onValidated:
|
|
3276
|
+
onValidated: v
|
|
3276
3277
|
}, null, 8, ["modelValue", "highlight-when-valid", "label", "placeholder-text", "message-when-valid"])
|
|
3277
3278
|
])
|
|
3278
3279
|
]),
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3280
|
+
m("div", Jn, [
|
|
3281
|
+
m("div", Yn, [
|
|
3282
|
+
$(d(_), {
|
|
3282
3283
|
class: "cl-absolute cl-left-3 cl-top-2.5 cl-z-10",
|
|
3283
3284
|
icon: "ph:lock",
|
|
3284
3285
|
size: 18
|
|
3285
3286
|
}),
|
|
3286
|
-
F(
|
|
3287
|
+
F($(d(_), {
|
|
3287
3288
|
class: "cl-absolute cl-cursor-pointer cl-right-4 cl-top-2.5 cl-z-10",
|
|
3288
3289
|
icon: "ph:eye",
|
|
3289
3290
|
size: 18,
|
|
3290
|
-
onClick: r[1] || (r[1] = (
|
|
3291
|
+
onClick: r[1] || (r[1] = (f) => g.value = "text")
|
|
3291
3292
|
}, null, 512), [
|
|
3292
|
-
[H,
|
|
3293
|
+
[H, g.value === "password"]
|
|
3293
3294
|
]),
|
|
3294
|
-
F(
|
|
3295
|
+
F($(d(_), {
|
|
3295
3296
|
class: "cl-absolute cl-cursor-pointer cl-right-4 cl-top-2.5 cl-z-10",
|
|
3296
3297
|
icon: "ph:eye-slash",
|
|
3297
3298
|
size: 18,
|
|
3298
|
-
onClick: r[2] || (r[2] = (
|
|
3299
|
+
onClick: r[2] || (r[2] = (f) => g.value = "password")
|
|
3299
3300
|
}, null, 512), [
|
|
3300
|
-
[H,
|
|
3301
|
+
[H, g.value === "text"]
|
|
3301
3302
|
]),
|
|
3302
|
-
|
|
3303
|
+
$(re, {
|
|
3303
3304
|
id: "cl-ui-login-passwordinput",
|
|
3304
3305
|
modelValue: s.value,
|
|
3305
|
-
"onUpdate:modelValue": r[3] || (r[3] = (
|
|
3306
|
+
"onUpdate:modelValue": r[3] || (r[3] = (f) => s.value = f),
|
|
3306
3307
|
class: "!cl-border-2 cl-w-full",
|
|
3307
|
-
"input-type":
|
|
3308
|
+
"input-type": g.value,
|
|
3308
3309
|
"highlight-when-valid": s.value !== void 0 && s.value !== "",
|
|
3309
|
-
label: d(
|
|
3310
|
+
label: d(e)("login.password"),
|
|
3310
3311
|
"show-label": !1,
|
|
3311
|
-
"placeholder-text": d(
|
|
3312
|
+
"placeholder-text": d(e)("login.password"),
|
|
3312
3313
|
autocomplete: "current-password",
|
|
3313
3314
|
"validate-immediately": !0,
|
|
3314
3315
|
"input-specific-classes": "!cl-pl-9 !cl-pr-9",
|
|
@@ -3317,38 +3318,38 @@ const Mn = {
|
|
|
3317
3318
|
}, null, 8, ["modelValue", "input-type", "highlight-when-valid", "label", "placeholder-text"])
|
|
3318
3319
|
])
|
|
3319
3320
|
]),
|
|
3320
|
-
|
|
3321
|
+
m("div", {
|
|
3321
3322
|
class: I(["cl-col-span-2", {
|
|
3322
|
-
"cl-mt-1.5 cl-mb-1 md:cl-mt-0.5 md:cl-mb-7 lg:cl-mb-0":
|
|
3323
|
+
"cl-mt-1.5 cl-mb-1 md:cl-mt-0.5 md:cl-mb-7 lg:cl-mb-0": h.loading
|
|
3323
3324
|
}])
|
|
3324
3325
|
}, [
|
|
3325
|
-
|
|
3326
|
+
$(fe, {
|
|
3326
3327
|
id: "cl-ui-login-loginbutton",
|
|
3327
3328
|
class: "cl-w-full",
|
|
3328
3329
|
colour: "blue",
|
|
3329
|
-
loading:
|
|
3330
|
+
loading: h.loading,
|
|
3330
3331
|
disabled: !n.value || s.value === "",
|
|
3331
3332
|
onClick: W(a, ["prevent"])
|
|
3332
3333
|
}, {
|
|
3333
3334
|
default: L(() => [
|
|
3334
|
-
le(T(d(
|
|
3335
|
+
le(T(d(e)("login.login")), 1)
|
|
3335
3336
|
]),
|
|
3336
3337
|
_: 1
|
|
3337
3338
|
}, 8, ["loading", "disabled", "onClick"])
|
|
3338
3339
|
], 2)
|
|
3339
3340
|
], 2),
|
|
3340
|
-
|
|
3341
|
+
$(me, { name: "cl-grow-down" }, {
|
|
3341
3342
|
default: L(() => {
|
|
3342
|
-
var
|
|
3343
|
+
var f;
|
|
3343
3344
|
return [
|
|
3344
|
-
F(
|
|
3345
|
-
(i(!0),
|
|
3345
|
+
F(m("span", Xn, [
|
|
3346
|
+
(i(!0), b(P, null, Q(h.errors, (w, O) => (i(), b("div", {
|
|
3346
3347
|
id: "cl-ui-login-errors",
|
|
3347
3348
|
key: O,
|
|
3348
3349
|
class: "cl-font-semibold"
|
|
3349
|
-
}, T(
|
|
3350
|
+
}, T(w), 1))), 128))
|
|
3350
3351
|
], 512), [
|
|
3351
|
-
[H, (
|
|
3352
|
+
[H, (f = h.errors) == null ? void 0 : f.length]
|
|
3352
3353
|
])
|
|
3353
3354
|
];
|
|
3354
3355
|
}),
|
|
@@ -3357,41 +3358,41 @@ const Mn = {
|
|
|
3357
3358
|
])
|
|
3358
3359
|
]));
|
|
3359
3360
|
}
|
|
3360
|
-
}),
|
|
3361
|
+
}), ls = [
|
|
3361
3362
|
"x-small",
|
|
3362
3363
|
"small",
|
|
3363
3364
|
"medium",
|
|
3364
3365
|
"large"
|
|
3365
|
-
],
|
|
3366
|
+
], ts = [
|
|
3366
3367
|
"primary",
|
|
3367
3368
|
"secondary",
|
|
3368
3369
|
"white"
|
|
3369
|
-
],
|
|
3370
|
+
], os = {
|
|
3370
3371
|
key: 0,
|
|
3371
3372
|
class: "cl-h-0 cl-w-0"
|
|
3372
|
-
},
|
|
3373
|
+
}, ns = { class: "cl-relative cl-w-full" }, ss = /* @__PURE__ */ M({
|
|
3373
3374
|
__name: "cl-ui-navigation",
|
|
3374
3375
|
props: {
|
|
3375
3376
|
colour: { default: "default" }
|
|
3376
3377
|
},
|
|
3377
3378
|
setup(t) {
|
|
3378
|
-
const o = A([]),
|
|
3379
|
-
function
|
|
3380
|
-
let
|
|
3381
|
-
return
|
|
3379
|
+
const o = A([]), e = N(() => o.value.filter((r) => r.open === !0).length > 0);
|
|
3380
|
+
function l(r) {
|
|
3381
|
+
let f = o.value.find((w) => w.id === r);
|
|
3382
|
+
return f || (f = {
|
|
3382
3383
|
id: r,
|
|
3383
3384
|
open: !1
|
|
3384
|
-
}, o.value.push(
|
|
3385
|
+
}, o.value.push(f)), f.open;
|
|
3385
3386
|
}
|
|
3386
3387
|
function s(r) {
|
|
3387
|
-
const
|
|
3388
|
-
|
|
3389
|
-
|
|
3388
|
+
const f = o.value.find((w) => w.id === r);
|
|
3389
|
+
f && (f.open = !f.open, o.value.forEach((w) => {
|
|
3390
|
+
w.id !== r && (w.open = !1);
|
|
3390
3391
|
}));
|
|
3391
3392
|
}
|
|
3392
|
-
const
|
|
3393
|
+
const g = ul();
|
|
3393
3394
|
K(
|
|
3394
|
-
() =>
|
|
3395
|
+
() => g,
|
|
3395
3396
|
() => {
|
|
3396
3397
|
n.value = !1;
|
|
3397
3398
|
},
|
|
@@ -3399,41 +3400,41 @@ const Mn = {
|
|
|
3399
3400
|
deep: !0
|
|
3400
3401
|
}
|
|
3401
3402
|
);
|
|
3402
|
-
const n = A(!1), a = A(!1), { start: c } =
|
|
3403
|
+
const n = A(!1), a = A(!1), { start: c } = Ke(() => a.value = !1, 100);
|
|
3403
3404
|
function u() {
|
|
3404
3405
|
n.value = !n.value, a.value = !0, c();
|
|
3405
3406
|
}
|
|
3406
|
-
const
|
|
3407
|
-
function
|
|
3408
|
-
n.value === !1 &&
|
|
3407
|
+
const v = A();
|
|
3408
|
+
function h() {
|
|
3409
|
+
n.value === !1 && e.value === !0 && o.value.forEach((r) => {
|
|
3409
3410
|
r.open = !1;
|
|
3410
3411
|
});
|
|
3411
3412
|
}
|
|
3412
|
-
return Ue(
|
|
3413
|
+
return Ue(v, h), (r, f) => (i(), b("div", {
|
|
3413
3414
|
ref_key: "navElement",
|
|
3414
|
-
ref:
|
|
3415
|
+
ref: v,
|
|
3415
3416
|
class: "cl-flex cl-flex-nowrap cl-relative"
|
|
3416
3417
|
}, [
|
|
3417
|
-
|
|
3418
|
+
m("div", {
|
|
3418
3419
|
id: "group-container",
|
|
3419
|
-
class: I(["cl-h-full cl-overflow-y-auto cl-overscroll-y-none cl-pb-20 cl-w-20 cl-z-
|
|
3420
|
+
class: I(["cl-h-full cl-overflow-y-auto cl-overscroll-y-none cl-pb-20 cl-w-20 cl-z-40 xl:cl-pb-0", {
|
|
3420
3421
|
"cl-bg-primary-default": r.colour === "default",
|
|
3421
3422
|
"cl-bg-blue-dark": r.colour === "secondary"
|
|
3422
3423
|
}])
|
|
3423
3424
|
}, [
|
|
3424
|
-
j(r.$slots, "icon", ae({ navcolour: r.colour }, { groupIsOpen:
|
|
3425
|
+
j(r.$slots, "icon", ae({ navcolour: r.colour }, { groupIsOpen: l, toggleOpen: s }), void 0, !0)
|
|
3425
3426
|
], 2),
|
|
3426
|
-
a.value ? (i(),
|
|
3427
|
-
|
|
3427
|
+
a.value ? (i(), b("div", os)) : S("", !0),
|
|
3428
|
+
$(me, { name: "slide-right" }, {
|
|
3428
3429
|
default: L(() => [
|
|
3429
|
-
F(
|
|
3430
|
-
class: I(["cl-bg-grey-0 cl-border-grey-2 cl-border-r cl-duration-75 cl-h-full cl-min-w-[260px] cl-overflow-y-auto cl-overscroll-y-none cl-p-8 cl-pb-24 cl-top-0 cl-transition-shadow cl-w-[260px] cl-z-
|
|
3430
|
+
F(m("div", {
|
|
3431
|
+
class: I(["cl-bg-grey-0 cl-border-grey-2 cl-border-r cl-duration-75 cl-h-full cl-min-w-[260px] cl-overflow-y-auto cl-overscroll-y-none cl-p-8 cl-pb-24 cl-top-0 cl-transition-shadow cl-w-[260px] cl-z-30 xl:cl-pb-0", {
|
|
3431
3432
|
"cl-relative": n.value,
|
|
3432
3433
|
"cl-absolute cl-left-20 cl-shadow-lg": !n.value
|
|
3433
3434
|
}])
|
|
3434
3435
|
}, [
|
|
3435
|
-
|
|
3436
|
-
|
|
3436
|
+
m("div", ns, [
|
|
3437
|
+
m("span", {
|
|
3437
3438
|
class: "cl-absolute cl-cursor-pointer cl-hidden cl-right-0 cl-top-1.5 lg:cl-block",
|
|
3438
3439
|
onClick: u
|
|
3439
3440
|
}, [
|
|
@@ -3445,10 +3446,10 @@ const Mn = {
|
|
|
3445
3446
|
icon: "ph:push-pin"
|
|
3446
3447
|
}))
|
|
3447
3448
|
]),
|
|
3448
|
-
j(r.$slots, "default", te(se({ groupIsOpen:
|
|
3449
|
+
j(r.$slots, "default", te(se({ groupIsOpen: l })), void 0, !0)
|
|
3449
3450
|
])
|
|
3450
3451
|
], 2), [
|
|
3451
|
-
[H,
|
|
3452
|
+
[H, e.value]
|
|
3452
3453
|
])
|
|
3453
3454
|
]),
|
|
3454
3455
|
_: 3
|
|
@@ -3456,7 +3457,7 @@ const Mn = {
|
|
|
3456
3457
|
], 512));
|
|
3457
3458
|
}
|
|
3458
3459
|
});
|
|
3459
|
-
const
|
|
3460
|
+
const as = /* @__PURE__ */ pe(ss, [["__scopeId", "data-v-971f01d8"]]), rs = /* @__PURE__ */ M({
|
|
3460
3461
|
__name: "cl-ui-navigation-icon",
|
|
3461
3462
|
props: {
|
|
3462
3463
|
iconValue: {},
|
|
@@ -3464,7 +3465,7 @@ const ss = /* @__PURE__ */ pe(ns, [["__scopeId", "data-v-7db412a7"]]), as = /* @
|
|
|
3464
3465
|
colour: { default: "default" }
|
|
3465
3466
|
},
|
|
3466
3467
|
setup(t) {
|
|
3467
|
-
return (o,
|
|
3468
|
+
return (o, e) => (i(), b("div", {
|
|
3468
3469
|
class: I(["cl-cursor-pointer cl-flex cl-h-20 cl-items-center cl-justify-center cl-transition-colors cl-w-20", {
|
|
3469
3470
|
"cl-text-secondary-default hover:cl-bg-primary-dark hover:cl-text-white": o.colour === "default",
|
|
3470
3471
|
"cl-bg-primary-darker cl-text-white": o.open && o.colour === "default",
|
|
@@ -3472,52 +3473,52 @@ const ss = /* @__PURE__ */ pe(ns, [["__scopeId", "data-v-7db412a7"]]), as = /* @
|
|
|
3472
3473
|
"cl-bg-blue-light": o.open && o.colour === "secondary"
|
|
3473
3474
|
}])
|
|
3474
3475
|
}, [
|
|
3475
|
-
|
|
3476
|
+
$(d(_), {
|
|
3476
3477
|
class: "cl-block",
|
|
3477
3478
|
icon: o.iconValue,
|
|
3478
3479
|
width: "24"
|
|
3479
3480
|
}, null, 8, ["icon"])
|
|
3480
3481
|
], 2));
|
|
3481
3482
|
}
|
|
3482
|
-
}),
|
|
3483
|
+
}), is = {
|
|
3483
3484
|
key: 0,
|
|
3484
3485
|
class: "cl-font-bold cl-leading-8 cl-mb-8 cl-pr-8 cl-select-none cl-text-lg cl-text-secondary-default"
|
|
3485
|
-
},
|
|
3486
|
+
}, cs = { class: "cl-flex cl-flex-wrap cl-space-y-8 cl-text-sm cl-w-full" }, us = /* @__PURE__ */ M({
|
|
3486
3487
|
__name: "cl-ui-navigation-group",
|
|
3487
3488
|
props: {
|
|
3488
3489
|
open: { type: Boolean }
|
|
3489
3490
|
},
|
|
3490
3491
|
setup(t) {
|
|
3491
|
-
return (o,
|
|
3492
|
-
o.$slots.title ? (i(),
|
|
3492
|
+
return (o, e) => o.open ? (i(), b(P, { key: 0 }, [
|
|
3493
|
+
o.$slots.title ? (i(), b("div", is, [
|
|
3493
3494
|
j(o.$slots, "title")
|
|
3494
|
-
])) :
|
|
3495
|
-
|
|
3495
|
+
])) : S("", !0),
|
|
3496
|
+
m("div", cs, [
|
|
3496
3497
|
j(o.$slots, "default")
|
|
3497
3498
|
])
|
|
3498
|
-
], 64)) :
|
|
3499
|
+
], 64)) : S("", !0);
|
|
3499
3500
|
}
|
|
3500
|
-
}),
|
|
3501
|
+
}), ds = {}, ps = { class: "cl-w-full" }, fs = {
|
|
3501
3502
|
key: 0,
|
|
3502
3503
|
class: "cl-font-bold cl-mb-4 cl-select-none"
|
|
3503
|
-
},
|
|
3504
|
-
function
|
|
3505
|
-
return i(),
|
|
3506
|
-
t.$slots.title ? (i(),
|
|
3504
|
+
}, ms = { class: "cl-flex cl-flex-wrap cl-space-y-2" };
|
|
3505
|
+
function gs(t, o) {
|
|
3506
|
+
return i(), b("div", ps, [
|
|
3507
|
+
t.$slots.title ? (i(), b("div", fs, [
|
|
3507
3508
|
j(t.$slots, "title")
|
|
3508
|
-
])) :
|
|
3509
|
-
|
|
3509
|
+
])) : S("", !0),
|
|
3510
|
+
m("span", ms, [
|
|
3510
3511
|
j(t.$slots, "default")
|
|
3511
3512
|
])
|
|
3512
3513
|
]);
|
|
3513
3514
|
}
|
|
3514
|
-
const
|
|
3515
|
-
function
|
|
3516
|
-
return i(),
|
|
3515
|
+
const vs = /* @__PURE__ */ pe(ds, [["render", gs]]), bs = {}, hs = { class: "cl-cursor-pointer cl-transition-colors cl-w-full hover:cl-text-blue-light" };
|
|
3516
|
+
function ys(t, o) {
|
|
3517
|
+
return i(), b("div", hs, [
|
|
3517
3518
|
j(t.$slots, "default")
|
|
3518
3519
|
]);
|
|
3519
3520
|
}
|
|
3520
|
-
const
|
|
3521
|
+
const ws = /* @__PURE__ */ pe(bs, [["render", ys]]), $s = { class: "cl-w-full" }, ks = /* @__PURE__ */ M({
|
|
3521
3522
|
__name: "cl-ui-tab",
|
|
3522
3523
|
props: {
|
|
3523
3524
|
currentTab: { default: 0 },
|
|
@@ -3525,42 +3526,42 @@ const ys = /* @__PURE__ */ pe(vs, [["render", hs]]), ws = { class: "cl-w-full" }
|
|
|
3525
3526
|
colour: { default: "default" }
|
|
3526
3527
|
},
|
|
3527
3528
|
setup(t) {
|
|
3528
|
-
const o = t,
|
|
3529
|
-
function
|
|
3529
|
+
const o = t, e = A(), l = A(!1), s = A(!1);
|
|
3530
|
+
function g(u) {
|
|
3530
3531
|
return u === o.currentTab;
|
|
3531
3532
|
}
|
|
3532
3533
|
function n() {
|
|
3533
|
-
if (
|
|
3534
|
-
const u =
|
|
3535
|
-
|
|
3534
|
+
if (e.value) {
|
|
3535
|
+
const u = e.value.scrollWidth - e.value.clientWidth;
|
|
3536
|
+
l.value = e.value.scrollLeft > 0, s.value = e.value.scrollLeft < u;
|
|
3536
3537
|
} else
|
|
3537
|
-
|
|
3538
|
+
l.value = !1, s.value = !1;
|
|
3538
3539
|
}
|
|
3539
3540
|
function a() {
|
|
3540
3541
|
n(), window.addEventListener("resize", n);
|
|
3541
3542
|
}
|
|
3542
3543
|
function c(u) {
|
|
3543
|
-
if (
|
|
3544
|
-
const
|
|
3545
|
-
let
|
|
3546
|
-
u === "left" && (
|
|
3544
|
+
if (e.value) {
|
|
3545
|
+
const v = e.value.scrollWidth / 5;
|
|
3546
|
+
let h = v;
|
|
3547
|
+
u === "left" && (h = -v), e.value.scroll(e.value.scrollLeft + h, 0);
|
|
3547
3548
|
}
|
|
3548
3549
|
}
|
|
3549
|
-
return Se(() => a()), Re(() => window.removeEventListener("resize", n)), (u,
|
|
3550
|
-
|
|
3551
|
-
|
|
3550
|
+
return Se(() => a()), Re(() => window.removeEventListener("resize", n)), (u, v) => (i(), b("div", $s, [
|
|
3551
|
+
m("div", null, [
|
|
3552
|
+
l.value ? (i(), b("div", {
|
|
3552
3553
|
key: 0,
|
|
3553
3554
|
class: "cl-bg-white cl-cursor-pointer cl-float-left cl-h-11 cl-w-4",
|
|
3554
|
-
onClick:
|
|
3555
|
+
onClick: v[0] || (v[0] = (h) => c("left"))
|
|
3555
3556
|
}, [
|
|
3556
|
-
|
|
3557
|
+
$(d(_), {
|
|
3557
3558
|
icon: "ph:caret-left",
|
|
3558
3559
|
class: "cl-mt-4 cl-text-secondary-default"
|
|
3559
3560
|
})
|
|
3560
|
-
])) :
|
|
3561
|
-
|
|
3561
|
+
])) : S("", !0),
|
|
3562
|
+
m("div", {
|
|
3562
3563
|
ref_key: "headerContainer",
|
|
3563
|
-
ref:
|
|
3564
|
+
ref: e,
|
|
3564
3565
|
class: I(["cl-flex cl-overflow-x-auto cl-overscroll-x-none", {
|
|
3565
3566
|
"cl-shadow-[inset_0_-1px_0_#eeeeee]": !u.disabled && u.colour === "default",
|
|
3566
3567
|
"cl-shadow-[inset_0_-1px_0_#9acd32]": !u.disabled && u.colour === "primary",
|
|
@@ -3572,23 +3573,23 @@ const ys = /* @__PURE__ */ pe(vs, [["render", hs]]), ws = { class: "cl-w-full" }
|
|
|
3572
3573
|
}]),
|
|
3573
3574
|
onScrollPassive: n
|
|
3574
3575
|
}, [
|
|
3575
|
-
j(u.$slots, "headings", te(se({ isTabOpen:
|
|
3576
|
+
j(u.$slots, "headings", te(se({ isTabOpen: g, disabled: u.disabled, colour: u.colour })))
|
|
3576
3577
|
], 34),
|
|
3577
|
-
s.value ? (i(),
|
|
3578
|
+
s.value ? (i(), b("div", {
|
|
3578
3579
|
key: 1,
|
|
3579
3580
|
class: "cl-bg-white cl-bottom-12 cl-cursor-pointer cl-float-right cl-h-11 cl-relative cl-w-4",
|
|
3580
|
-
onClick:
|
|
3581
|
+
onClick: v[1] || (v[1] = (h) => c("right"))
|
|
3581
3582
|
}, [
|
|
3582
|
-
|
|
3583
|
+
$(d(_), {
|
|
3583
3584
|
icon: "ph:caret-right",
|
|
3584
3585
|
class: "cl-mt-4 cl-text-secondary-default"
|
|
3585
3586
|
})
|
|
3586
|
-
])) :
|
|
3587
|
+
])) : S("", !0)
|
|
3587
3588
|
]),
|
|
3588
|
-
j(u.$slots, "content", te(se({ isTabOpen:
|
|
3589
|
+
j(u.$slots, "content", te(se({ isTabOpen: g, disabled: u.disabled, colour: u.colour })))
|
|
3589
3590
|
]));
|
|
3590
3591
|
}
|
|
3591
|
-
}),
|
|
3592
|
+
}), Cs = ["onKeyup"], Ts = /* @__PURE__ */ M({
|
|
3592
3593
|
__name: "cl-ui-tab-header",
|
|
3593
3594
|
props: {
|
|
3594
3595
|
id: {},
|
|
@@ -3600,170 +3601,170 @@ const ys = /* @__PURE__ */ pe(vs, [["render", hs]]), ws = { class: "cl-w-full" }
|
|
|
3600
3601
|
"update:currentTab": null
|
|
3601
3602
|
},
|
|
3602
3603
|
setup(t, { emit: o }) {
|
|
3603
|
-
const
|
|
3604
|
+
const e = t, l = A(), s = A(), g = N(() => e.id === e.currentTab);
|
|
3604
3605
|
function n() {
|
|
3605
|
-
|
|
3606
|
+
e.disabled || (l.value = !1, s.value = !1, o("update:currentTab", e.id));
|
|
3606
3607
|
}
|
|
3607
|
-
return (a, c) => (i(),
|
|
3608
|
+
return (a, c) => (i(), b("div", {
|
|
3608
3609
|
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", {
|
|
3609
3610
|
"!cl-cursor-default cl-text-grey-4 !cl-border-grey-2": a.disabled,
|
|
3610
|
-
"cl-border cl-border-b-0 cl-rounded-t-md cl-shadow-[inset_0_-1px_0_#ffffff] cl-cursor-default":
|
|
3611
|
+
"cl-border cl-border-b-0 cl-rounded-t-md cl-shadow-[inset_0_-1px_0_#ffffff] cl-cursor-default": g.value,
|
|
3611
3612
|
"cl-border-grey-0": a.colour === "default",
|
|
3612
3613
|
"cl-border-primary-default": a.colour === "primary",
|
|
3613
3614
|
"cl-border-secondary-default": a.colour === "secondary",
|
|
3614
3615
|
"cl-border-danger-default": a.colour === "danger",
|
|
3615
3616
|
"cl-border-link-default": a.colour === "blue",
|
|
3616
|
-
"hover:cl-bg-grey-0": !
|
|
3617
|
-
"hover:cl-bg-primary-lighter": !
|
|
3618
|
-
"hover:cl-bg-secondary-light focus:cl-text-white hover:cl-text-white": !
|
|
3619
|
-
"hover:cl-bg-danger-light": !
|
|
3620
|
-
"hover:cl-bg-link-lighter": !
|
|
3621
|
-
"cl-bg-grey-0":
|
|
3622
|
-
"cl-bg-primary-light":
|
|
3623
|
-
"cl-bg-secondary-light cl-text-white":
|
|
3624
|
-
"cl-bg-danger-light":
|
|
3625
|
-
"cl-bg-link-lighter":
|
|
3617
|
+
"hover:cl-bg-grey-0": !g.value && !a.disabled && a.colour === "default",
|
|
3618
|
+
"hover:cl-bg-primary-lighter": !g.value && !a.disabled && a.colour === "primary",
|
|
3619
|
+
"hover:cl-bg-secondary-light focus:cl-text-white hover:cl-text-white": !g.value && !a.disabled && a.colour === "secondary",
|
|
3620
|
+
"hover:cl-bg-danger-light": !g.value && !a.disabled && a.colour === "danger",
|
|
3621
|
+
"hover:cl-bg-link-lighter": !g.value && !a.disabled && a.colour === "blue",
|
|
3622
|
+
"cl-bg-grey-0": l.value && !a.disabled && a.colour === "default",
|
|
3623
|
+
"cl-bg-primary-light": l.value && !a.disabled && a.colour === "primary",
|
|
3624
|
+
"cl-bg-secondary-light cl-text-white": l.value && !a.disabled && a.colour === "secondary",
|
|
3625
|
+
"cl-bg-danger-light": l.value && !a.disabled && a.colour === "danger",
|
|
3626
|
+
"cl-bg-link-lighter": l.value && !a.disabled && a.colour === "blue"
|
|
3626
3627
|
}]),
|
|
3627
3628
|
tabindex: "0",
|
|
3628
3629
|
onClick: n,
|
|
3629
3630
|
onMouseover: c[0] || (c[0] = (u) => s.value = !0),
|
|
3630
3631
|
onMouseout: c[1] || (c[1] = (u) => s.value = !1),
|
|
3631
|
-
onFocusin: c[2] || (c[2] = (u) =>
|
|
3632
|
-
onFocusout: c[3] || (c[3] = (u) =>
|
|
3632
|
+
onFocusin: c[2] || (c[2] = (u) => l.value = !0),
|
|
3633
|
+
onFocusout: c[3] || (c[3] = (u) => l.value = !1),
|
|
3633
3634
|
onKeyup: $e(W(n, ["self"]), ["enter"])
|
|
3634
3635
|
}, [
|
|
3635
3636
|
j(a.$slots, "default")
|
|
3636
|
-
], 42,
|
|
3637
|
+
], 42, Cs));
|
|
3637
3638
|
}
|
|
3638
|
-
}),
|
|
3639
|
-
function
|
|
3639
|
+
}), Es = {};
|
|
3640
|
+
function Os(t, o) {
|
|
3640
3641
|
return j(t.$slots, "default");
|
|
3641
3642
|
}
|
|
3642
|
-
const
|
|
3643
|
+
const As = /* @__PURE__ */ pe(Es, [["render", Os]]), qs = [
|
|
3643
3644
|
"default",
|
|
3644
3645
|
"primary",
|
|
3645
3646
|
"secondary",
|
|
3646
3647
|
"danger",
|
|
3647
3648
|
"blue"
|
|
3648
|
-
],
|
|
3649
|
+
], Ss = [
|
|
3649
3650
|
"left",
|
|
3650
3651
|
"right"
|
|
3651
|
-
],
|
|
3652
|
+
], Ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3652
3653
|
__proto__: null,
|
|
3653
3654
|
FilterOperation: oe,
|
|
3654
|
-
buttonColours:
|
|
3655
|
-
buttonSizes:
|
|
3656
|
-
cardSizes:
|
|
3657
|
-
clUiAccordion:
|
|
3658
|
-
clUiAccordionHeader:
|
|
3659
|
-
clUiAccordionItem:
|
|
3660
|
-
clUiApp:
|
|
3655
|
+
buttonColours: jl,
|
|
3656
|
+
buttonSizes: Il,
|
|
3657
|
+
cardSizes: zl,
|
|
3658
|
+
clUiAccordion: ml,
|
|
3659
|
+
clUiAccordionHeader: kl,
|
|
3660
|
+
clUiAccordionItem: hl,
|
|
3661
|
+
clUiApp: Ol,
|
|
3661
3662
|
clUiButton: fe,
|
|
3662
|
-
clUiCard:
|
|
3663
|
-
clUiComboBox:
|
|
3664
|
-
clUiFooter:
|
|
3665
|
-
clUiGrid:
|
|
3666
|
-
clUiHeader:
|
|
3667
|
-
clUiHeaderMenu:
|
|
3663
|
+
clUiCard: Rl,
|
|
3664
|
+
clUiComboBox: zt,
|
|
3665
|
+
clUiFooter: xt,
|
|
3666
|
+
clUiGrid: An,
|
|
3667
|
+
clUiHeader: Sn,
|
|
3668
|
+
clUiHeaderMenu: Un,
|
|
3668
3669
|
clUiInput: re,
|
|
3669
|
-
clUiLanguageSwitcher:
|
|
3670
|
+
clUiLanguageSwitcher: Fn,
|
|
3670
3671
|
clUiLoadingSpinner: Ne,
|
|
3671
|
-
clUiLogin:
|
|
3672
|
-
clUiModal:
|
|
3673
|
-
clUiNavigation:
|
|
3674
|
-
clUiNavigationGroup:
|
|
3675
|
-
clUiNavigationIcon:
|
|
3676
|
-
clUiNavigationItem:
|
|
3677
|
-
clUiNavigationSection:
|
|
3678
|
-
clUiNotification:
|
|
3679
|
-
clUiTab:
|
|
3680
|
-
clUiTabContent:
|
|
3681
|
-
clUiTabHeader:
|
|
3682
|
-
filterMethodTypes:
|
|
3683
|
-
gridColumnTypes:
|
|
3684
|
-
inputTypes:
|
|
3685
|
-
isComboBoxCreateRequest:
|
|
3686
|
-
isComboBoxItem:
|
|
3687
|
-
isFilterRequest:
|
|
3688
|
-
isFilterResponse:
|
|
3689
|
-
isGridColumn:
|
|
3690
|
-
isGridColumnArray:
|
|
3691
|
-
isLanguageArray:
|
|
3672
|
+
clUiLogin: es,
|
|
3673
|
+
clUiModal: Xe,
|
|
3674
|
+
clUiNavigation: as,
|
|
3675
|
+
clUiNavigationGroup: us,
|
|
3676
|
+
clUiNavigationIcon: rs,
|
|
3677
|
+
clUiNavigationItem: ws,
|
|
3678
|
+
clUiNavigationSection: vs,
|
|
3679
|
+
clUiNotification: Ye,
|
|
3680
|
+
clUiTab: ks,
|
|
3681
|
+
clUiTabContent: As,
|
|
3682
|
+
clUiTabHeader: Ts,
|
|
3683
|
+
filterMethodTypes: zo,
|
|
3684
|
+
gridColumnTypes: Io,
|
|
3685
|
+
inputTypes: Kl,
|
|
3686
|
+
isComboBoxCreateRequest: Bt,
|
|
3687
|
+
isComboBoxItem: Ut,
|
|
3688
|
+
isFilterRequest: Mo,
|
|
3689
|
+
isFilterResponse: Vo,
|
|
3690
|
+
isGridColumn: el,
|
|
3691
|
+
isGridColumnArray: _o,
|
|
3692
|
+
isLanguageArray: Bn,
|
|
3692
3693
|
isLanguageLocaleFormat: Ie,
|
|
3693
|
-
modalColours:
|
|
3694
|
-
modalSizes:
|
|
3695
|
-
stringFormats:
|
|
3696
|
-
tabColours:
|
|
3697
|
-
tabScroll:
|
|
3694
|
+
modalColours: ts,
|
|
3695
|
+
modalSizes: ls,
|
|
3696
|
+
stringFormats: Ro,
|
|
3697
|
+
tabColours: qs,
|
|
3698
|
+
tabScroll: Ss
|
|
3698
3699
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3699
|
-
const
|
|
3700
|
-
t.use(ee), t.component("Icon", _), Object.entries(
|
|
3700
|
+
const Hs = (t) => {
|
|
3701
|
+
t.use(ee), t.component("Icon", _), Object.entries(Ns).forEach(([
|
|
3701
3702
|
o,
|
|
3702
|
-
|
|
3703
|
+
e
|
|
3703
3704
|
]) => {
|
|
3704
|
-
t.component(o,
|
|
3705
|
+
t.component(o, e);
|
|
3705
3706
|
});
|
|
3706
3707
|
};
|
|
3707
3708
|
export {
|
|
3708
|
-
|
|
3709
|
+
Fs as CitrusLimeUI,
|
|
3709
3710
|
G as DateFormat,
|
|
3710
3711
|
oe as FilterOperation,
|
|
3711
3712
|
X as NumberFormat,
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3713
|
+
jl as buttonColours,
|
|
3714
|
+
Il as buttonSizes,
|
|
3715
|
+
zl as cardSizes,
|
|
3716
|
+
ml as clUiAccordion,
|
|
3717
|
+
kl as clUiAccordionHeader,
|
|
3718
|
+
hl as clUiAccordionItem,
|
|
3719
|
+
Ol as clUiApp,
|
|
3719
3720
|
fe as clUiButton,
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3721
|
+
Rl as clUiCard,
|
|
3722
|
+
zt as clUiComboBox,
|
|
3723
|
+
xt as clUiFooter,
|
|
3724
|
+
An as clUiGrid,
|
|
3725
|
+
Sn as clUiHeader,
|
|
3726
|
+
Un as clUiHeaderMenu,
|
|
3726
3727
|
re as clUiInput,
|
|
3727
|
-
|
|
3728
|
+
Fn as clUiLanguageSwitcher,
|
|
3728
3729
|
Ne as clUiLoadingSpinner,
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3730
|
+
es as clUiLogin,
|
|
3731
|
+
Xe as clUiModal,
|
|
3732
|
+
as as clUiNavigation,
|
|
3733
|
+
us as clUiNavigationGroup,
|
|
3734
|
+
rs as clUiNavigationIcon,
|
|
3735
|
+
ws as clUiNavigationItem,
|
|
3736
|
+
vs as clUiNavigationSection,
|
|
3737
|
+
Ye as clUiNotification,
|
|
3738
|
+
ks as clUiTab,
|
|
3739
|
+
As as clUiTabContent,
|
|
3740
|
+
Ts as clUiTabHeader,
|
|
3741
|
+
Ml as datetimeFormats,
|
|
3742
|
+
Hs as default,
|
|
3743
|
+
zo as filterMethodTypes,
|
|
3744
|
+
Io as gridColumnTypes,
|
|
3744
3745
|
ee as i18n,
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3746
|
+
Kl as inputTypes,
|
|
3747
|
+
Bt as isComboBoxCreateRequest,
|
|
3748
|
+
Ut as isComboBoxItem,
|
|
3749
|
+
Mo as isFilterRequest,
|
|
3750
|
+
Vo as isFilterResponse,
|
|
3751
|
+
el as isGridColumn,
|
|
3752
|
+
_o as isGridColumnArray,
|
|
3753
|
+
Bn as isLanguageArray,
|
|
3753
3754
|
Ie as isLanguageLocaleFormat,
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3755
|
+
Ul as messages,
|
|
3756
|
+
ts as modalColours,
|
|
3757
|
+
ls as modalSizes,
|
|
3758
|
+
Bl as numberFormats,
|
|
3759
|
+
Ps as setCurrentLocale,
|
|
3760
|
+
Ls as setLocaleDateTimeFormats,
|
|
3761
|
+
Vs as setLocaleMessages,
|
|
3762
|
+
Ds as setLocaleNumberFormats,
|
|
3762
3763
|
De as showNotification,
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3764
|
+
Ro as stringFormats,
|
|
3765
|
+
qs as tabColours,
|
|
3766
|
+
Ss as tabScroll,
|
|
3767
|
+
Pl as validateEmail,
|
|
3768
|
+
Dl as validateMaxValue,
|
|
3769
|
+
Vl as validateMinValue
|
|
3769
3770
|
};
|