@citruslime/ui 2.0.2-beta.1 → 2.0.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { Icon as nl } from "@iconify/vue";
|
|
2
|
-
import { defineComponent as
|
|
2
|
+
import { defineComponent as G, ref as q, openBlock as a, createElementBlock as d, renderSlot as R, normalizeProps as ie, guardReactiveProps as ve, resolveComponent as ee, Fragment as B, createElementVNode as s, normalizeClass as z, createVNode as k, Transition as xe, withCtx as Y, withDirectives as V, vShow as H, createBlock as K, Teleport as Le, renderList as ce, unref as n, mergeProps as de, toDisplayString as y, createCommentVNode as N, nextTick as $e, computed as A, watch as le, onMounted as Se, onUnmounted as Me, isRef as ge, normalizeStyle as Te, vModelText as ol, withModifiers as ae, vModelDynamic as cl, withKeys as Ce, createTextVNode as _, watchEffect as al, createSlots as il } from "vue";
|
|
3
3
|
import { generateStringId as sl } from "@citruslime/utils";
|
|
4
4
|
import { createI18n as rl, useI18n as se } from "vue-i18n";
|
|
5
|
-
import
|
|
5
|
+
import Ve from "flatpickr";
|
|
6
6
|
import { useDebouncer as Pe, copy as be } from "@citruslime/vue-utils";
|
|
7
|
-
const ul = { class: "cl-overflow-hidden" }, dl = /* @__PURE__ */
|
|
7
|
+
const ul = { class: "cl-overflow-hidden" }, dl = /* @__PURE__ */ G({
|
|
8
8
|
__name: "cl-ui-accordion",
|
|
9
9
|
props: {
|
|
10
10
|
exclusive: { type: Boolean, default: !1 }
|
|
11
11
|
},
|
|
12
12
|
setup(e) {
|
|
13
|
-
const t = e, l =
|
|
14
|
-
function
|
|
15
|
-
let
|
|
16
|
-
return
|
|
17
|
-
id:
|
|
13
|
+
const t = e, l = q([]);
|
|
14
|
+
function o(f) {
|
|
15
|
+
let i = l.value.find((u) => u.id === f);
|
|
16
|
+
return i || (i = {
|
|
17
|
+
id: f,
|
|
18
18
|
open: !1
|
|
19
|
-
}, l.value.push(
|
|
19
|
+
}, l.value.push(i)), i.open;
|
|
20
20
|
}
|
|
21
|
-
function c(
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}),
|
|
21
|
+
function c(f) {
|
|
22
|
+
const i = l.value.find((u) => u.id === f);
|
|
23
|
+
i && (t.exclusive && l.value.forEach((u) => {
|
|
24
|
+
u.id !== f && (u.open = !1);
|
|
25
|
+
}), i.open = !i.open);
|
|
26
26
|
}
|
|
27
|
-
return (
|
|
28
|
-
|
|
27
|
+
return (f, i) => (a(), d("div", ul, [
|
|
28
|
+
R(f.$slots, "default", ie(ve({ isItemOpen: o, toggleItem: c })))
|
|
29
29
|
]));
|
|
30
30
|
}
|
|
31
|
-
}), fl = { class: "cl-absolute cl-left-5 cl-top-5" }, ml = { class: "cl-font-semibold cl-ml-10 cl-p-4 cl-select-none cl-text-grey-5" }, gl = { class: "cl-overflow-hidden" }, bl = { class: "cl-ml-10 cl-p-4" }, hl = /* @__PURE__ */
|
|
31
|
+
}), fl = { class: "cl-absolute cl-left-5 cl-top-5" }, ml = { class: "cl-font-semibold cl-ml-10 cl-p-4 cl-select-none cl-text-grey-5" }, gl = { class: "cl-overflow-hidden" }, bl = { class: "cl-ml-10 cl-p-4" }, hl = /* @__PURE__ */ G({
|
|
32
32
|
__name: "cl-ui-accordion-item",
|
|
33
33
|
props: {
|
|
34
34
|
open: { type: Boolean },
|
|
@@ -39,39 +39,39 @@ const ul = { class: "cl-overflow-hidden" }, dl = /* @__PURE__ */ V({
|
|
|
39
39
|
},
|
|
40
40
|
setup(e, { emit: t }) {
|
|
41
41
|
const l = e;
|
|
42
|
-
function
|
|
42
|
+
function o() {
|
|
43
43
|
l.disabled || t("toggle");
|
|
44
44
|
}
|
|
45
|
-
return (c,
|
|
46
|
-
const
|
|
47
|
-
return
|
|
48
|
-
|
|
49
|
-
class:
|
|
45
|
+
return (c, f) => {
|
|
46
|
+
const i = ee("icon");
|
|
47
|
+
return a(), d(B, null, [
|
|
48
|
+
s("div", {
|
|
49
|
+
class: z(["cl-border-b cl-border-grey-1 cl-relative", {
|
|
50
50
|
"cl-bg-grey-0": e.disabled,
|
|
51
51
|
"cl-cursor-pointer": !e.disabled
|
|
52
52
|
}]),
|
|
53
|
-
onClick:
|
|
53
|
+
onClick: o
|
|
54
54
|
}, [
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
class:
|
|
55
|
+
s("div", fl, [
|
|
56
|
+
k(i, {
|
|
57
|
+
class: z(["cl-duration-300 cl-ease-in-out cl-text-grey-3 cl-transform-gpu cl-transition-transform", {
|
|
58
58
|
"cl-rotate-180": e.open
|
|
59
59
|
}]),
|
|
60
60
|
icon: "ph:caret-down-bold",
|
|
61
61
|
width: "20"
|
|
62
62
|
}, null, 8, ["class"])
|
|
63
63
|
]),
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
s("div", ml, [
|
|
65
|
+
R(c.$slots, "title")
|
|
66
66
|
])
|
|
67
67
|
], 2),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
default:
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
s("div", gl, [
|
|
69
|
+
k(xe, { name: "grow-down" }, {
|
|
70
|
+
default: Y(() => [
|
|
71
|
+
V(s("div", bl, [
|
|
72
|
+
R(c.$slots, "default")
|
|
73
73
|
], 512), [
|
|
74
|
-
[
|
|
74
|
+
[H, e.open]
|
|
75
75
|
])
|
|
76
76
|
]),
|
|
77
77
|
_: 3
|
|
@@ -82,17 +82,17 @@ const ul = { class: "cl-overflow-hidden" }, dl = /* @__PURE__ */ V({
|
|
|
82
82
|
}
|
|
83
83
|
}), me = (e, t) => {
|
|
84
84
|
const l = e.__vccOpts || e;
|
|
85
|
-
for (const [
|
|
86
|
-
l[
|
|
85
|
+
for (const [o, c] of t)
|
|
86
|
+
l[o] = c;
|
|
87
87
|
return l;
|
|
88
88
|
}, vl = {}, pl = { class: "cl-border-b cl-border-grey-1 cl-font-semibold cl-pl-14 cl-pr-4 cl-py-2 cl-text-grey-3 cl-text-sm" };
|
|
89
89
|
function yl(e, t) {
|
|
90
|
-
return
|
|
91
|
-
|
|
90
|
+
return a(), d("div", pl, [
|
|
91
|
+
R(e.$slots, "default")
|
|
92
92
|
]);
|
|
93
93
|
}
|
|
94
|
-
const wl = /* @__PURE__ */ me(vl, [["render", yl]]), Oe =
|
|
95
|
-
function
|
|
94
|
+
const wl = /* @__PURE__ */ me(vl, [["render", yl]]), Oe = q([]);
|
|
95
|
+
function Fe(e) {
|
|
96
96
|
const t = {
|
|
97
97
|
id: sl(),
|
|
98
98
|
...e
|
|
@@ -104,7 +104,7 @@ function Xe(e) {
|
|
|
104
104
|
}
|
|
105
105
|
const xl = ["onClick"], $l = { class: "cl-flex-1 cl-select-none cl-text-ellipsis cl-w-64" }, kl = {
|
|
106
106
|
inheritAttrs: !1
|
|
107
|
-
}, _e = /* @__PURE__ */
|
|
107
|
+
}, _e = /* @__PURE__ */ G({
|
|
108
108
|
...kl,
|
|
109
109
|
__name: "cl-ui-notification",
|
|
110
110
|
props: {
|
|
@@ -113,10 +113,10 @@ const xl = ["onClick"], $l = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
113
113
|
},
|
|
114
114
|
setup(e) {
|
|
115
115
|
return (t, l) => {
|
|
116
|
-
const
|
|
117
|
-
return
|
|
118
|
-
|
|
119
|
-
class:
|
|
116
|
+
const o = ee("icon");
|
|
117
|
+
return a(), K(Le, { to: e.container }, [
|
|
118
|
+
s("div", {
|
|
119
|
+
class: z(["cl-fixed cl-w-80 cl-z-40", {
|
|
120
120
|
"cl-top-5 cl-left-5": e.position === "top-left",
|
|
121
121
|
"cl-top-5 cl-left-1/2": e.position === "top-centre",
|
|
122
122
|
"cl-top-5 cl-right-5": e.position === "top-right",
|
|
@@ -125,8 +125,8 @@ const xl = ["onClick"], $l = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
125
125
|
"cl-bottom-5 cl-right-5": e.position === "bottom-right"
|
|
126
126
|
}])
|
|
127
127
|
}, [
|
|
128
|
-
(
|
|
129
|
-
key:
|
|
128
|
+
(a(!0), d(B, null, ce(n(Oe), (c, f) => (a(), d("div", de(t.$attrs, {
|
|
129
|
+
key: f,
|
|
130
130
|
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", {
|
|
131
131
|
"cl-bg-white": c.colour === "default",
|
|
132
132
|
"cl-bg-primary-default": c.colour === "primary",
|
|
@@ -134,10 +134,10 @@ const xl = ["onClick"], $l = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
134
134
|
"cl-bg-danger-default": c.colour === "danger",
|
|
135
135
|
"cl-bg-warning-default": c.colour === "warning"
|
|
136
136
|
}],
|
|
137
|
-
onClick: (
|
|
137
|
+
onClick: (i) => n(Xe)(c)
|
|
138
138
|
}), [
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
s("span", $l, y(c.message), 1),
|
|
140
|
+
k(o, {
|
|
141
141
|
class: "cl-inline-block cl-opacity-0 cl-transition-opacity group-hover:cl-opacity-100",
|
|
142
142
|
icon: "ph:x",
|
|
143
143
|
size: 16,
|
|
@@ -148,41 +148,41 @@ const xl = ["onClick"], $l = { class: "cl-flex-1 cl-select-none cl-text-ellipsis
|
|
|
148
148
|
], 8, ["to"]);
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
|
-
}), Tl = { class: "cl-absolute cl-flex cl-flex-wrap cl-h-screen cl-max-h-screen cl-max-w-full cl-min-h-screen cl-min-w-full cl-w-full" }, Cl = /* @__PURE__ */
|
|
151
|
+
}), Tl = { class: "cl-absolute cl-flex cl-flex-wrap cl-h-screen cl-max-h-screen cl-max-w-full cl-min-h-screen cl-min-w-full cl-w-full" }, Cl = /* @__PURE__ */ G({
|
|
152
152
|
__name: "cl-ui-app",
|
|
153
153
|
props: {
|
|
154
154
|
removePadding: { type: Boolean, default: !1 }
|
|
155
155
|
},
|
|
156
156
|
setup(e) {
|
|
157
|
-
return (t, l) => (
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
class:
|
|
157
|
+
return (t, l) => (a(), d(B, null, [
|
|
158
|
+
k(_e),
|
|
159
|
+
s("div", Tl, [
|
|
160
|
+
R(t.$slots, "header"),
|
|
161
|
+
s("div", {
|
|
162
|
+
class: z(["cl-content-start cl-flex cl-flex-nowrap cl-items-stretch cl-max-h-screen cl-relative cl-w-full", {
|
|
163
163
|
"cl-pt-20": t.$slots.header
|
|
164
164
|
}])
|
|
165
165
|
}, [
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
class:
|
|
166
|
+
R(t.$slots, "navigation"),
|
|
167
|
+
s("div", {
|
|
168
|
+
class: z(["cl-grow cl-max-h-full cl-overflow-x-hidden cl-overflow-y-auto cl-w-auto", {
|
|
169
169
|
"md:cl-p-8 cl-p-2": !e.removePadding
|
|
170
170
|
}])
|
|
171
171
|
}, [
|
|
172
|
-
|
|
172
|
+
R(t.$slots, "default")
|
|
173
173
|
], 2)
|
|
174
174
|
], 2)
|
|
175
175
|
])
|
|
176
176
|
], 64));
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
|
-
const Sl = {},
|
|
180
|
-
function
|
|
181
|
-
return
|
|
179
|
+
const Sl = {}, El = { class: "loading-spinner" };
|
|
180
|
+
function jl(e, t) {
|
|
181
|
+
return a(), d("div", El);
|
|
182
182
|
}
|
|
183
|
-
const el = /* @__PURE__ */ me(Sl, [["render",
|
|
183
|
+
const el = /* @__PURE__ */ me(Sl, [["render", jl], ["__scopeId", "data-v-a21dc5d2"]]), Al = ["disabled"], Ol = {
|
|
184
184
|
inheritAttrs: !1
|
|
185
|
-
}, we = /* @__PURE__ */
|
|
185
|
+
}, we = /* @__PURE__ */ G({
|
|
186
186
|
...Ol,
|
|
187
187
|
__name: "cl-ui-button",
|
|
188
188
|
props: {
|
|
@@ -192,11 +192,11 @@ const el = /* @__PURE__ */ me(Sl, [["render", Al], ["__scopeId", "data-v-a21dc5d
|
|
|
192
192
|
disabled: { type: Boolean, default: !1 }
|
|
193
193
|
},
|
|
194
194
|
setup(e) {
|
|
195
|
-
return (t, l) => (
|
|
196
|
-
|
|
197
|
-
[
|
|
195
|
+
return (t, l) => (a(), d(B, null, [
|
|
196
|
+
V(k(el, { class: "cl-absolute" }, null, 512), [
|
|
197
|
+
[H, e.loading]
|
|
198
198
|
]),
|
|
199
|
-
|
|
199
|
+
V(s("button", de(t.$attrs, {
|
|
200
200
|
class: ["cl-align-middle cl-border cl-font-semibold cl-inline-block cl-overflow-visible cl-rounded cl-select-none cl-shadow cl-text-center cl-transition-colors", {
|
|
201
201
|
"cl-leading-8 cl-px-4 cl-text-sm": e.size === "small",
|
|
202
202
|
"cl-leading-10 cl-px-8 cl-text-sm": e.size === "medium",
|
|
@@ -210,9 +210,9 @@ const el = /* @__PURE__ */ me(Sl, [["render", Al], ["__scopeId", "data-v-a21dc5d
|
|
|
210
210
|
}],
|
|
211
211
|
disabled: e.disabled
|
|
212
212
|
}), [
|
|
213
|
-
|
|
214
|
-
], 16,
|
|
215
|
-
[
|
|
213
|
+
R(t.$slots, "default")
|
|
214
|
+
], 16, Al), [
|
|
215
|
+
[H, !e.loading]
|
|
216
216
|
])
|
|
217
217
|
], 64));
|
|
218
218
|
}
|
|
@@ -226,52 +226,52 @@ const el = /* @__PURE__ */ me(Sl, [["render", Al], ["__scopeId", "data-v-a21dc5d
|
|
|
226
226
|
"small",
|
|
227
227
|
"medium",
|
|
228
228
|
"large"
|
|
229
|
-
], Nl = { key: 0 }, ql = /* @__PURE__ */
|
|
229
|
+
], Nl = { key: 0 }, ql = /* @__PURE__ */ G({
|
|
230
230
|
__name: "cl-ui-card",
|
|
231
231
|
props: {
|
|
232
232
|
size: { default: "medium" },
|
|
233
233
|
hover: { type: Boolean, default: !1 }
|
|
234
234
|
},
|
|
235
235
|
setup(e) {
|
|
236
|
-
return (t, l) => (
|
|
237
|
-
class:
|
|
236
|
+
return (t, l) => (a(), d("div", {
|
|
237
|
+
class: z(["cl-border cl-border-transparent cl-overflow-hidden cl-relative cl-rounded-md cl-shadow-lg cl-transition-all", {
|
|
238
238
|
"cl-cursor-pointer hover:cl-shadow-xl hover:cl-border-grey-0": e.hover
|
|
239
239
|
}])
|
|
240
240
|
}, [
|
|
241
|
-
t.$slots.image ? (
|
|
242
|
-
|
|
243
|
-
])) :
|
|
244
|
-
t.$slots.title ? (
|
|
241
|
+
t.$slots.image ? (a(), d("div", Nl, [
|
|
242
|
+
R(t.$slots, "image")
|
|
243
|
+
])) : N("", !0),
|
|
244
|
+
t.$slots.title ? (a(), d("div", {
|
|
245
245
|
key: 1,
|
|
246
|
-
class:
|
|
246
|
+
class: z(["cl-border-grey-2 cl-font-normal", {
|
|
247
247
|
"cl-p-2 cl-text-2xl cl-leading-8": e.size === "small",
|
|
248
248
|
"cl-p-4 cl-text-3xl cl-leading-9": e.size === "medium",
|
|
249
249
|
"cl-p-6 cl-text-4xl cl-leading-10": e.size === "large",
|
|
250
250
|
"cl-border-t": t.$slots.image
|
|
251
251
|
}])
|
|
252
252
|
}, [
|
|
253
|
-
|
|
254
|
-
], 2)) :
|
|
255
|
-
|
|
256
|
-
class:
|
|
253
|
+
R(t.$slots, "title")
|
|
254
|
+
], 2)) : N("", !0),
|
|
255
|
+
s("div", {
|
|
256
|
+
class: z(["cl-border-grey-2", {
|
|
257
257
|
"cl-p-2": e.size === "small",
|
|
258
258
|
"cl-p-4": e.size === "medium",
|
|
259
259
|
"cl-p-6": e.size === "large",
|
|
260
260
|
"cl-border-t": t.$slots.image || t.$slots.title
|
|
261
261
|
}])
|
|
262
262
|
}, [
|
|
263
|
-
|
|
263
|
+
R(t.$slots, "default")
|
|
264
264
|
], 2),
|
|
265
|
-
t.$slots.footer ? (
|
|
265
|
+
t.$slots.footer ? (a(), d("div", {
|
|
266
266
|
key: 2,
|
|
267
|
-
class:
|
|
267
|
+
class: z(["cl-border-grey-2 cl-border-t", {
|
|
268
268
|
"cl-p-2": e.size === "small",
|
|
269
269
|
"cl-p-4": e.size === "medium",
|
|
270
270
|
"cl-p-6": e.size === "large"
|
|
271
271
|
}])
|
|
272
272
|
}, [
|
|
273
|
-
|
|
274
|
-
], 2)) :
|
|
273
|
+
R(t.$slots, "footer")
|
|
274
|
+
], 2)) : N("", !0)
|
|
275
275
|
], 2));
|
|
276
276
|
}
|
|
277
277
|
}), Dl = [
|
|
@@ -279,7 +279,7 @@ const el = /* @__PURE__ */ me(Sl, [["render", Al], ["__scopeId", "data-v-a21dc5d
|
|
|
279
279
|
"medium",
|
|
280
280
|
"large"
|
|
281
281
|
];
|
|
282
|
-
var
|
|
282
|
+
var ne = /* @__PURE__ */ ((e) => (e.CURRENCY = "currency", e.PERCENTAGE = "percentage", e.INTEGER = "integer", e.DECIMAL = "decimal", e.MULTIPLIER = "multiplier", e))(ne || {}), Q = /* @__PURE__ */ ((e) => (e.SHORT_DATE = "short-date", e.SHORT_DATETIME = "short-datetime", e.DATE = "date", e.DATETIME = "datetime", e.LONG_DATE = "long-date", e.LONG_DATETIME = "long-datetime", e.TIME = "time", e.MONTH_YEAR = "month-year", e))(Q || {});
|
|
283
283
|
const Rl = {
|
|
284
284
|
"en-GB": {
|
|
285
285
|
comboBox: {
|
|
@@ -363,16 +363,16 @@ const Rl = {
|
|
|
363
363
|
}
|
|
364
364
|
}, Ul = {
|
|
365
365
|
"en-GB": {
|
|
366
|
-
[
|
|
366
|
+
[ne.PERCENTAGE]: {
|
|
367
367
|
style: "percent"
|
|
368
368
|
},
|
|
369
|
-
[
|
|
369
|
+
[ne.INTEGER]: {
|
|
370
370
|
maximumFractionDigits: 0
|
|
371
371
|
},
|
|
372
|
-
[
|
|
372
|
+
[ne.DECIMAL]: {
|
|
373
373
|
minimumFractionDigits: 1
|
|
374
374
|
},
|
|
375
|
-
[
|
|
375
|
+
[ne.CURRENCY]: {
|
|
376
376
|
style: "currency",
|
|
377
377
|
currency: "GBP",
|
|
378
378
|
currencyDisplay: "symbol"
|
|
@@ -380,52 +380,52 @@ const Rl = {
|
|
|
380
380
|
}
|
|
381
381
|
}, zl = {
|
|
382
382
|
"en-GB": {
|
|
383
|
-
[
|
|
383
|
+
[Q.SHORT_DATE]: {
|
|
384
384
|
day: "numeric",
|
|
385
385
|
month: "numeric",
|
|
386
386
|
year: "2-digit"
|
|
387
387
|
},
|
|
388
|
-
[
|
|
388
|
+
[Q.SHORT_DATETIME]: {
|
|
389
389
|
day: "numeric",
|
|
390
390
|
month: "numeric",
|
|
391
391
|
year: "2-digit",
|
|
392
392
|
hour: "numeric",
|
|
393
393
|
minute: "numeric"
|
|
394
394
|
},
|
|
395
|
-
[
|
|
395
|
+
[Q.DATE]: {
|
|
396
396
|
day: "numeric",
|
|
397
397
|
month: "numeric",
|
|
398
398
|
year: "numeric"
|
|
399
399
|
},
|
|
400
|
-
[
|
|
400
|
+
[Q.DATETIME]: {
|
|
401
401
|
day: "numeric",
|
|
402
402
|
month: "numeric",
|
|
403
403
|
year: "numeric",
|
|
404
404
|
hour: "numeric",
|
|
405
405
|
minute: "numeric"
|
|
406
406
|
},
|
|
407
|
-
[
|
|
407
|
+
[Q.LONG_DATE]: {
|
|
408
408
|
day: "numeric",
|
|
409
409
|
month: "long",
|
|
410
410
|
year: "numeric"
|
|
411
411
|
},
|
|
412
|
-
[
|
|
412
|
+
[Q.LONG_DATETIME]: {
|
|
413
413
|
day: "numeric",
|
|
414
414
|
month: "long",
|
|
415
415
|
year: "numeric",
|
|
416
416
|
hour: "numeric",
|
|
417
417
|
minute: "numeric"
|
|
418
418
|
},
|
|
419
|
-
[
|
|
419
|
+
[Q.TIME]: {
|
|
420
420
|
hour: "numeric",
|
|
421
421
|
minute: "numeric"
|
|
422
422
|
},
|
|
423
|
-
[
|
|
423
|
+
[Q.MONTH_YEAR]: {
|
|
424
424
|
month: "long",
|
|
425
425
|
year: "numeric"
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
|
-
},
|
|
428
|
+
}, oe = rl({
|
|
429
429
|
locale: "en-GB",
|
|
430
430
|
fallbackLocale: "en-GB",
|
|
431
431
|
messages: Rl,
|
|
@@ -436,29 +436,29 @@ const Rl = {
|
|
|
436
436
|
fallbackWarn: !1,
|
|
437
437
|
warnHtmlMessage: !1
|
|
438
438
|
});
|
|
439
|
-
function
|
|
440
|
-
return
|
|
439
|
+
function Gc(e, t) {
|
|
440
|
+
return oe.global.mergeLocaleMessage(e, t), $e();
|
|
441
441
|
}
|
|
442
|
-
function
|
|
443
|
-
return
|
|
442
|
+
function Wc(e, t) {
|
|
443
|
+
return oe.global.mergeNumberFormat(e, t), $e();
|
|
444
444
|
}
|
|
445
|
-
function
|
|
446
|
-
return
|
|
445
|
+
function Jc(e, t) {
|
|
446
|
+
return oe.global.mergeDateTimeFormat(e, t), $e();
|
|
447
447
|
}
|
|
448
|
-
function
|
|
449
|
-
return
|
|
448
|
+
function Kc(e) {
|
|
449
|
+
return oe.global.locale.value = e, $e();
|
|
450
450
|
}
|
|
451
|
-
const { t: re } =
|
|
452
|
-
function Bl(e, t, l,
|
|
453
|
-
const c =
|
|
454
|
-
return
|
|
455
|
-
var
|
|
456
|
-
let
|
|
451
|
+
const { t: re } = oe.global;
|
|
452
|
+
function Bl(e, t, l, o) {
|
|
453
|
+
const c = oe.global.locale.value;
|
|
454
|
+
return o instanceof Date && (o = o.getTime()), new Promise((f) => {
|
|
455
|
+
var u;
|
|
456
|
+
let i = {
|
|
457
457
|
valid: !1,
|
|
458
458
|
message: ""
|
|
459
459
|
};
|
|
460
460
|
if (e != null) {
|
|
461
|
-
let r,
|
|
461
|
+
let r, m;
|
|
462
462
|
switch (t) {
|
|
463
463
|
case "email":
|
|
464
464
|
case "password":
|
|
@@ -466,39 +466,39 @@ function Bl(e, t, l, n) {
|
|
|
466
466
|
case "tel":
|
|
467
467
|
case "text":
|
|
468
468
|
case "url":
|
|
469
|
-
r = ((
|
|
469
|
+
r = ((u = o == null ? void 0 : o.length) != null ? u : 0) >= e, i = ue(r, re("input.greaterOrEqualToCharacters", { label: l, min: e.toString() }));
|
|
470
470
|
break;
|
|
471
471
|
case "number":
|
|
472
472
|
case "range":
|
|
473
|
-
r =
|
|
473
|
+
r = o >= e, i = ue(r, re("input.greaterOrEqualToValue", { label: l, min: e.toString() }));
|
|
474
474
|
break;
|
|
475
475
|
case "date":
|
|
476
|
-
r =
|
|
476
|
+
r = o >= new Date(e).getTime(), i = ue(r, re("input.afterOrEqualToValue", { label: l, min: new Date(e).toLocaleDateString(c) }));
|
|
477
477
|
break;
|
|
478
478
|
case "datetime":
|
|
479
|
-
r =
|
|
479
|
+
r = o >= new Date(e).getTime(), i = ue(r, re("input.afterOrEqualToValue", { label: l, min: oe.global.d(new Date(e), Q.DATETIME, c != null ? c : oe.global.locale.value) }));
|
|
480
480
|
break;
|
|
481
481
|
case "time":
|
|
482
|
-
|
|
482
|
+
m = e.toDateFromTime(), r = o >= m, i = ue(r, re("input.afterOrEqualToValue", { label: l, min: oe.global.d(new Date(m), Q.TIME, c != null ? c : oe.global.locale.value) }));
|
|
483
483
|
break;
|
|
484
484
|
default:
|
|
485
|
-
|
|
485
|
+
i.valid = !0;
|
|
486
486
|
break;
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
|
-
|
|
489
|
+
f(i);
|
|
490
490
|
});
|
|
491
491
|
}
|
|
492
|
-
function Ll(e, t, l,
|
|
493
|
-
const c =
|
|
494
|
-
return
|
|
495
|
-
var
|
|
496
|
-
let
|
|
492
|
+
function Ll(e, t, l, o) {
|
|
493
|
+
const c = oe.global.locale.value;
|
|
494
|
+
return o instanceof Date && (o = o.getTime()), new Promise((f) => {
|
|
495
|
+
var u;
|
|
496
|
+
let i = {
|
|
497
497
|
valid: !1,
|
|
498
498
|
message: ""
|
|
499
499
|
};
|
|
500
500
|
if (e != null) {
|
|
501
|
-
let r,
|
|
501
|
+
let r, m;
|
|
502
502
|
switch (t) {
|
|
503
503
|
case "email":
|
|
504
504
|
case "password":
|
|
@@ -506,39 +506,39 @@ function Ll(e, t, l, n) {
|
|
|
506
506
|
case "tel":
|
|
507
507
|
case "text":
|
|
508
508
|
case "url":
|
|
509
|
-
r = ((
|
|
509
|
+
r = ((u = o == null ? void 0 : o.length) != null ? u : 0) <= e, i = ue(r, re("input.lessOrEqualToCharacters", { label: l, max: e.toString() }));
|
|
510
510
|
break;
|
|
511
511
|
case "number":
|
|
512
512
|
case "range":
|
|
513
|
-
r =
|
|
513
|
+
r = o <= e, i = ue(r, re("input.lessOrEqualToValue", { label: l, max: e.toString() }));
|
|
514
514
|
break;
|
|
515
515
|
case "date":
|
|
516
|
-
r =
|
|
516
|
+
r = o <= new Date(e).getTime(), i = ue(r, re("input.beforeOrEqualToValue", { label: l, max: new Date(e).toLocaleDateString(c) }));
|
|
517
517
|
break;
|
|
518
518
|
case "datetime":
|
|
519
|
-
r =
|
|
519
|
+
r = o <= new Date(e).getTime(), i = ue(r, re("input.afterOrEqualToValue", { label: l, min: oe.global.d(new Date(e), Q.DATETIME, c != null ? c : oe.global.locale.value) }));
|
|
520
520
|
break;
|
|
521
521
|
case "time":
|
|
522
|
-
|
|
522
|
+
m = e.toDateFromTime(), r = o <= m, i = ue(r, re("input.afterOrEqualToValue", { label: l, min: oe.global.d(new Date(m), Q.TIME, c != null ? c : oe.global.locale.value) }));
|
|
523
523
|
break;
|
|
524
524
|
default:
|
|
525
|
-
|
|
525
|
+
i.valid = !0;
|
|
526
526
|
break;
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
|
|
529
|
+
f(i);
|
|
530
530
|
});
|
|
531
531
|
}
|
|
532
532
|
function Pl(e, t) {
|
|
533
533
|
return new Promise((l) => {
|
|
534
|
-
const
|
|
534
|
+
const o = t != null && t !== "" && t.toString().trim() !== "", c = ue(o, re("input.valueIsRequired", { label: e }));
|
|
535
535
|
l(c);
|
|
536
536
|
});
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function Vl(e, t) {
|
|
539
539
|
return new Promise((l) => {
|
|
540
|
-
const c = t === "" || /[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(t) !== null,
|
|
541
|
-
l(
|
|
540
|
+
const c = t === "" || /[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(t) !== null, f = ue(c, re("input.valueNotValidEmail", { label: e }));
|
|
541
|
+
l(f);
|
|
542
542
|
});
|
|
543
543
|
}
|
|
544
544
|
function ue(e, t) {
|
|
@@ -549,10 +549,10 @@ function ue(e, t) {
|
|
|
549
549
|
}
|
|
550
550
|
var ke = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ne = { exports: {} };
|
|
551
551
|
(function(e, t) {
|
|
552
|
-
(function(l,
|
|
553
|
-
|
|
552
|
+
(function(l, o) {
|
|
553
|
+
o(t);
|
|
554
554
|
})(ke, function(l) {
|
|
555
|
-
var
|
|
555
|
+
var o = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
|
|
556
556
|
l10ns: {}
|
|
557
557
|
}, c = {
|
|
558
558
|
weekdays: {
|
|
@@ -604,17 +604,17 @@ var ke = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
604
604
|
toggleTitle: "Zum Umschalten klicken",
|
|
605
605
|
time_24hr: !0
|
|
606
606
|
};
|
|
607
|
-
|
|
608
|
-
var
|
|
609
|
-
l.German = c, l.default =
|
|
607
|
+
o.l10ns.de = c;
|
|
608
|
+
var f = o.l10ns;
|
|
609
|
+
l.German = c, l.default = f, Object.defineProperty(l, "__esModule", { value: !0 });
|
|
610
610
|
});
|
|
611
611
|
})(Ne, Ne.exports);
|
|
612
612
|
var qe = { exports: {} };
|
|
613
613
|
(function(e, t) {
|
|
614
|
-
(function(l,
|
|
615
|
-
|
|
614
|
+
(function(l, o) {
|
|
615
|
+
o(t);
|
|
616
616
|
})(ke, function(l) {
|
|
617
|
-
var
|
|
617
|
+
var o = {
|
|
618
618
|
weekdays: {
|
|
619
619
|
shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
620
620
|
longhand: [
|
|
@@ -660,10 +660,10 @@ var qe = { exports: {} };
|
|
|
660
660
|
daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
|
|
661
661
|
firstDayOfWeek: 0,
|
|
662
662
|
ordinal: function(c) {
|
|
663
|
-
var
|
|
664
|
-
if (
|
|
663
|
+
var f = c % 100;
|
|
664
|
+
if (f > 3 && f < 21)
|
|
665
665
|
return "th";
|
|
666
|
-
switch (
|
|
666
|
+
switch (f % 10) {
|
|
667
667
|
case 1:
|
|
668
668
|
return "st";
|
|
669
669
|
case 2:
|
|
@@ -685,15 +685,15 @@ var qe = { exports: {} };
|
|
|
685
685
|
minuteAriaLabel: "Minute",
|
|
686
686
|
time_24hr: !1
|
|
687
687
|
};
|
|
688
|
-
l.default =
|
|
688
|
+
l.default = o, l.english = o, Object.defineProperty(l, "__esModule", { value: !0 });
|
|
689
689
|
});
|
|
690
690
|
})(qe, qe.exports);
|
|
691
691
|
var De = { exports: {} };
|
|
692
692
|
(function(e, t) {
|
|
693
|
-
(function(l,
|
|
694
|
-
|
|
693
|
+
(function(l, o) {
|
|
694
|
+
o(t);
|
|
695
695
|
})(ke, function(l) {
|
|
696
|
-
var
|
|
696
|
+
var o = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
|
|
697
697
|
l10ns: {}
|
|
698
698
|
}, c = {
|
|
699
699
|
weekdays: {
|
|
@@ -745,17 +745,17 @@ var De = { exports: {} };
|
|
|
745
745
|
rangeSeparator: " a ",
|
|
746
746
|
time_24hr: !0
|
|
747
747
|
};
|
|
748
|
-
|
|
749
|
-
var
|
|
750
|
-
l.Spanish = c, l.default =
|
|
748
|
+
o.l10ns.es = c;
|
|
749
|
+
var f = o.l10ns;
|
|
750
|
+
l.Spanish = c, l.default = f, Object.defineProperty(l, "__esModule", { value: !0 });
|
|
751
751
|
});
|
|
752
752
|
})(De, De.exports);
|
|
753
753
|
var Re = { exports: {} };
|
|
754
754
|
(function(e, t) {
|
|
755
|
-
(function(l,
|
|
756
|
-
|
|
755
|
+
(function(l, o) {
|
|
756
|
+
o(t);
|
|
757
757
|
})(ke, function(l) {
|
|
758
|
-
var
|
|
758
|
+
var o = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
|
|
759
759
|
l10ns: {}
|
|
760
760
|
}, c = {
|
|
761
761
|
firstDayOfWeek: 1,
|
|
@@ -801,8 +801,8 @@ var Re = { exports: {} };
|
|
|
801
801
|
"d\xE9cembre"
|
|
802
802
|
]
|
|
803
803
|
},
|
|
804
|
-
ordinal: function(
|
|
805
|
-
return
|
|
804
|
+
ordinal: function(i) {
|
|
805
|
+
return i > 1 ? "" : "er";
|
|
806
806
|
},
|
|
807
807
|
rangeSeparator: " au ",
|
|
808
808
|
weekAbbreviation: "Sem",
|
|
@@ -810,17 +810,17 @@ var Re = { exports: {} };
|
|
|
810
810
|
toggleTitle: "Cliquer pour basculer",
|
|
811
811
|
time_24hr: !0
|
|
812
812
|
};
|
|
813
|
-
|
|
814
|
-
var
|
|
815
|
-
l.French = c, l.default =
|
|
813
|
+
o.l10ns.fr = c;
|
|
814
|
+
var f = o.l10ns;
|
|
815
|
+
l.French = c, l.default = f, Object.defineProperty(l, "__esModule", { value: !0 });
|
|
816
816
|
});
|
|
817
817
|
})(Re, Re.exports);
|
|
818
818
|
var Ue = { exports: {} };
|
|
819
819
|
(function(e, t) {
|
|
820
|
-
(function(l,
|
|
821
|
-
|
|
820
|
+
(function(l, o) {
|
|
821
|
+
o(t);
|
|
822
822
|
})(ke, function(l) {
|
|
823
|
-
var
|
|
823
|
+
var o = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
|
|
824
824
|
l10ns: {}
|
|
825
825
|
}, c = {
|
|
826
826
|
weekdays: {
|
|
@@ -875,17 +875,17 @@ var Ue = { exports: {} };
|
|
|
875
875
|
toggleTitle: "Clicca per cambiare",
|
|
876
876
|
time_24hr: !0
|
|
877
877
|
};
|
|
878
|
-
|
|
879
|
-
var
|
|
880
|
-
l.Italian = c, l.default =
|
|
878
|
+
o.l10ns.it = c;
|
|
879
|
+
var f = o.l10ns;
|
|
880
|
+
l.Italian = c, l.default = f, Object.defineProperty(l, "__esModule", { value: !0 });
|
|
881
881
|
});
|
|
882
882
|
})(Ue, Ue.exports);
|
|
883
883
|
var ze = { exports: {} };
|
|
884
884
|
(function(e, t) {
|
|
885
|
-
(function(l,
|
|
886
|
-
|
|
885
|
+
(function(l, o) {
|
|
886
|
+
o(t);
|
|
887
887
|
})(ke, function(l) {
|
|
888
|
-
var
|
|
888
|
+
var o = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
|
|
889
889
|
l10ns: {}
|
|
890
890
|
}, c = {
|
|
891
891
|
weekdays: {
|
|
@@ -936,16 +936,16 @@ var ze = { exports: {} };
|
|
|
936
936
|
scrollTitle: "Scroll voor volgende / vorige",
|
|
937
937
|
toggleTitle: "Klik om te wisselen",
|
|
938
938
|
time_24hr: !0,
|
|
939
|
-
ordinal: function(
|
|
940
|
-
return
|
|
939
|
+
ordinal: function(i) {
|
|
940
|
+
return i === 1 || i === 8 || i >= 20 ? "ste" : "de";
|
|
941
941
|
}
|
|
942
942
|
};
|
|
943
|
-
|
|
944
|
-
var
|
|
945
|
-
l.Dutch = c, l.default =
|
|
943
|
+
o.l10ns.nl = c;
|
|
944
|
+
var f = o.l10ns;
|
|
945
|
+
l.Dutch = c, l.default = f, Object.defineProperty(l, "__esModule", { value: !0 });
|
|
946
946
|
});
|
|
947
947
|
})(ze, ze.exports);
|
|
948
|
-
function
|
|
948
|
+
function Fl() {
|
|
949
949
|
return new Date("1990-01-02T12:05");
|
|
950
950
|
}
|
|
951
951
|
function Hl(e, t, l) {
|
|
@@ -978,20 +978,20 @@ function Gl(e) {
|
|
|
978
978
|
function He(e, t) {
|
|
979
979
|
let l;
|
|
980
980
|
if (e.indexOf("/") > -1 || e.indexOf("-") > -1) {
|
|
981
|
-
const
|
|
982
|
-
c > -1 ? l =
|
|
981
|
+
const o = new Date(e).toLocaleString(t), c = o.indexOf(",");
|
|
982
|
+
c > -1 ? l = o.substr(0, c) : l = o;
|
|
983
983
|
}
|
|
984
984
|
return l;
|
|
985
985
|
}
|
|
986
986
|
function Ge(e) {
|
|
987
987
|
let t;
|
|
988
988
|
if (/([0-9]{2}:[0-9]{2})/.exec(e) !== null) {
|
|
989
|
-
const
|
|
990
|
-
|
|
989
|
+
const o = e.indexOf("T");
|
|
990
|
+
o > -1 ? t = e.substr(o + 1) : t = e, t = t.substr(0, 5);
|
|
991
991
|
}
|
|
992
992
|
return t;
|
|
993
993
|
}
|
|
994
|
-
const Wl = ["placeholder", "disabled"], Jl = { class: "cl-absolute cl-bg-white cl-flex cl-right-2 cl-text-grey-4 cl-top-3.5" }, Kl = /* @__PURE__ */
|
|
994
|
+
const Wl = ["placeholder", "disabled"], Jl = { class: "cl-absolute cl-bg-white cl-flex cl-right-2 cl-text-grey-4 cl-top-3.5" }, Kl = /* @__PURE__ */ G({
|
|
995
995
|
__name: "cl-ui-calendar",
|
|
996
996
|
props: {
|
|
997
997
|
date: { default: null },
|
|
@@ -1008,143 +1008,143 @@ const Wl = ["placeholder", "disabled"], Jl = { class: "cl-absolute cl-bg-white c
|
|
|
1008
1008
|
valueOutOfRange: null
|
|
1009
1009
|
},
|
|
1010
1010
|
setup(e, { emit: t }) {
|
|
1011
|
-
const l = e, { d:
|
|
1012
|
-
var
|
|
1013
|
-
let
|
|
1014
|
-
return ((
|
|
1011
|
+
const l = e, { d: o, getDateTimeFormat: c, locale: f, t: i } = se(), u = q(null), r = q(null), m = A(() => o(Fl(), l.type)), g = A(() => c(f.value)[l.type]), p = A(() => w()), b = A(() => J()), T = A(() => L()), C = A(() => He(l.min, f.value)), P = A(() => He(l.max, f.value)), F = q(!1), U = A(() => {
|
|
1012
|
+
var x, D;
|
|
1013
|
+
let I = "H", W = "Y";
|
|
1014
|
+
return ((x = g.value) == null ? void 0 : x.hour12) === !0 && (I = "h"), ((D = g.value) == null ? void 0 : D.year) === "2-digit" && (W = "y"), Hl(m.value, I, W);
|
|
1015
1015
|
}), X = A(() => {
|
|
1016
|
-
var
|
|
1017
|
-
const
|
|
1018
|
-
...
|
|
1016
|
+
var W, x;
|
|
1017
|
+
const I = {
|
|
1018
|
+
...Ve.defaultConfig,
|
|
1019
1019
|
allowInput: !0,
|
|
1020
|
-
dateFormat:
|
|
1020
|
+
dateFormat: U.value,
|
|
1021
1021
|
disableMobile: !0,
|
|
1022
|
-
enableTime: l.type ===
|
|
1023
|
-
locale: Gl(
|
|
1024
|
-
maxDate:
|
|
1025
|
-
maxTime:
|
|
1026
|
-
minDate:
|
|
1027
|
-
minTime:
|
|
1022
|
+
enableTime: l.type === Q.DATETIME || l.type === Q.TIME,
|
|
1023
|
+
locale: Gl(f.value),
|
|
1024
|
+
maxDate: P.value,
|
|
1025
|
+
maxTime: T.value,
|
|
1026
|
+
minDate: C.value,
|
|
1027
|
+
minTime: b.value,
|
|
1028
1028
|
minuteIncrement: 1,
|
|
1029
1029
|
monthSelectorType: "static",
|
|
1030
|
-
noCalendar: l.type ===
|
|
1031
|
-
time_24hr: typeof ((
|
|
1030
|
+
noCalendar: l.type === Q.TIME,
|
|
1031
|
+
time_24hr: typeof ((W = g.value) == null ? void 0 : W.hour12) > "u" || ((x = g.value) == null ? void 0 : x.hour12) === !1
|
|
1032
1032
|
};
|
|
1033
|
-
return l.date !== null && (
|
|
1033
|
+
return l.date !== null && (I.defaultDate = l.date), I;
|
|
1034
1034
|
});
|
|
1035
|
-
function
|
|
1036
|
-
const
|
|
1037
|
-
|
|
1035
|
+
function E(I, W, x) {
|
|
1036
|
+
const D = I.length > 0 ? I[0] : null;
|
|
1037
|
+
D !== l.date && !F.value && (t("update:date", D), D === null && t("valueOutOfRange")), F.value = !1;
|
|
1038
1038
|
}
|
|
1039
|
-
function
|
|
1039
|
+
function j() {
|
|
1040
1040
|
F.value = !0, t("update:date", null);
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1043
|
-
if (
|
|
1044
|
-
let
|
|
1045
|
-
|
|
1046
|
-
let
|
|
1047
|
-
l.type === "time" ?
|
|
1042
|
+
function v() {
|
|
1043
|
+
if (u.value !== null) {
|
|
1044
|
+
let I = new Date();
|
|
1045
|
+
I.setHours(12, 0, 0, 0);
|
|
1046
|
+
let W;
|
|
1047
|
+
l.type === "time" ? W = l.min.toDateFromTime() : W = new Date(l.min), W > I && (I = W), F.value = !0, t("update:date", I);
|
|
1048
1048
|
}
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1051
|
-
|
|
1050
|
+
function h() {
|
|
1051
|
+
u.value === null && r.value !== null && (u.value = Ve(r.value, X.value), u.value.config.onChange.push(E));
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1054
|
-
|
|
1053
|
+
function $() {
|
|
1054
|
+
u.value !== null && (u.value.set(X.value), u.value.config.onChange.push(E));
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1057
|
-
|
|
1056
|
+
function M(I) {
|
|
1057
|
+
u.value !== null && u.value.setDate(I, !0);
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1060
|
-
|
|
1059
|
+
function S() {
|
|
1060
|
+
u.value !== null && u.value.clear();
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1063
|
-
|
|
1062
|
+
function O() {
|
|
1063
|
+
u.value !== null && (u.value.destroy(), u.value = null);
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1066
|
-
let
|
|
1065
|
+
function w() {
|
|
1066
|
+
let I = l.dateTimePlaceholder;
|
|
1067
1067
|
switch (l.type) {
|
|
1068
1068
|
case "date":
|
|
1069
|
-
|
|
1069
|
+
I = l.datePlaceholder === null ? i("calendar.datePlaceholder") : l.datePlaceholder;
|
|
1070
1070
|
break;
|
|
1071
1071
|
case "datetime":
|
|
1072
|
-
|
|
1072
|
+
I = l.dateTimePlaceholder === null ? i("calendar.dateTimePlaceholder") : l.dateTimePlaceholder;
|
|
1073
1073
|
break;
|
|
1074
1074
|
case "time":
|
|
1075
|
-
|
|
1075
|
+
I = l.timePlaceholder === null ? i("calendar.timePlaceholder") : l.timePlaceholder;
|
|
1076
1076
|
break;
|
|
1077
1077
|
default:
|
|
1078
|
-
|
|
1078
|
+
I = l.dateTimePlaceholder === null ? i("calendar.dateTimePlaceholder") : l.dateTimePlaceholder;
|
|
1079
1079
|
break;
|
|
1080
1080
|
}
|
|
1081
|
-
return
|
|
1081
|
+
return I;
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1084
|
-
let
|
|
1085
|
-
return (l.type ===
|
|
1083
|
+
function J() {
|
|
1084
|
+
let I;
|
|
1085
|
+
return (l.type === Q.TIME || l.type === Q.DATETIME) && (I = Ge(l.min)), I;
|
|
1086
1086
|
}
|
|
1087
|
-
function
|
|
1088
|
-
let
|
|
1089
|
-
return (l.type ===
|
|
1087
|
+
function L() {
|
|
1088
|
+
let I;
|
|
1089
|
+
return (l.type === Q.TIME || l.type === Q.DATETIME) && (I = Ge(l.max)), I;
|
|
1090
1090
|
}
|
|
1091
|
-
return
|
|
1092
|
-
|
|
1091
|
+
return le(() => l.date, (I, W) => {
|
|
1092
|
+
I !== null && W !== null ? I.getTime() !== W.getTime() && M(I) : I === null && W !== null && S();
|
|
1093
1093
|
}, {
|
|
1094
1094
|
deep: !0
|
|
1095
|
-
}),
|
|
1095
|
+
}), le(() => X.value, $, {
|
|
1096
1096
|
deep: !0
|
|
1097
|
-
}),
|
|
1098
|
-
|
|
1097
|
+
}), le(() => l.type, () => {
|
|
1098
|
+
O(), $e(() => h());
|
|
1099
1099
|
}, {
|
|
1100
1100
|
immediate: !1
|
|
1101
|
-
}), Se(() =>
|
|
1102
|
-
const
|
|
1103
|
-
return
|
|
1104
|
-
|
|
1101
|
+
}), Se(() => h()), Me(() => O()), (I, W) => {
|
|
1102
|
+
const x = ee("icon");
|
|
1103
|
+
return a(), d("div", de(I.$attrs, { class: "cl-relative" }), [
|
|
1104
|
+
s("input", de({
|
|
1105
1105
|
ref_key: "element",
|
|
1106
1106
|
ref: r
|
|
1107
|
-
},
|
|
1107
|
+
}, I.$attrs, {
|
|
1108
1108
|
class: ["!cl-text-sm cl-border-grey-1 cl-rounded-lg focus:cl-border-blue-light focus:cl-ring-0", { "cl-bg-off-white": e.disabled }],
|
|
1109
1109
|
type: "text",
|
|
1110
|
-
placeholder:
|
|
1110
|
+
placeholder: n(p),
|
|
1111
1111
|
disabled: e.disabled
|
|
1112
1112
|
}), null, 16, Wl),
|
|
1113
|
-
|
|
1114
|
-
class:
|
|
1113
|
+
V(k(x, {
|
|
1114
|
+
class: z(["cl-absolute cl-bg-white cl-right-2 cl-text-grey-4 cl-top-3.5", {
|
|
1115
1115
|
"!cl-bg-off-white": e.disabled
|
|
1116
1116
|
}]),
|
|
1117
1117
|
icon: "ph:calendar",
|
|
1118
1118
|
weight: "light",
|
|
1119
1119
|
size: 18
|
|
1120
1120
|
}, null, 8, ["class"]), [
|
|
1121
|
-
[
|
|
1121
|
+
[H, (e.date === null || e.disabled) && e.type !== "time"]
|
|
1122
1122
|
]),
|
|
1123
|
-
|
|
1124
|
-
class:
|
|
1123
|
+
V(k(x, {
|
|
1124
|
+
class: z(["cl-absolute cl-bg-white cl-right-2 cl-text-grey-4 cl-top-3.5", {
|
|
1125
1125
|
"!cl-bg-off-white": e.disabled
|
|
1126
1126
|
}]),
|
|
1127
1127
|
icon: "ph-clock",
|
|
1128
1128
|
weight: "light",
|
|
1129
1129
|
size: 18
|
|
1130
1130
|
}, null, 8, ["class"]), [
|
|
1131
|
-
[
|
|
1131
|
+
[H, (e.date === null || e.disabled) && e.type === "time"]
|
|
1132
1132
|
]),
|
|
1133
|
-
|
|
1134
|
-
x
|
|
1133
|
+
V(s("div", Jl, [
|
|
1134
|
+
k(x, {
|
|
1135
1135
|
class: "cl-cursor-pointer cl-mr-0.5 md:cl-mr-1",
|
|
1136
1136
|
icon: "ph:arrow-counter-clockwise",
|
|
1137
1137
|
size: 16,
|
|
1138
|
-
onClick:
|
|
1138
|
+
onClick: v
|
|
1139
1139
|
}),
|
|
1140
|
-
x
|
|
1140
|
+
k(x, {
|
|
1141
1141
|
class: "cl-cursor-pointer",
|
|
1142
1142
|
icon: "ph:x",
|
|
1143
1143
|
size: 16,
|
|
1144
|
-
onClick:
|
|
1144
|
+
onClick: j
|
|
1145
1145
|
})
|
|
1146
1146
|
], 512), [
|
|
1147
|
-
[
|
|
1147
|
+
[H, e.date !== null && !e.disabled]
|
|
1148
1148
|
])
|
|
1149
1149
|
], 16);
|
|
1150
1150
|
};
|
|
@@ -1160,7 +1160,7 @@ const Zl = /* @__PURE__ */ me(Kl, [["__scopeId", "data-v-97cfbfe4"]]), Ie = [
|
|
|
1160
1160
|
}, 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 = {
|
|
1161
1161
|
key: 1,
|
|
1162
1162
|
class: "emphasis-danger text-sm w-full"
|
|
1163
|
-
}, nt = /* @__PURE__ */
|
|
1163
|
+
}, nt = /* @__PURE__ */ G({
|
|
1164
1164
|
__name: "cl-ui-slider",
|
|
1165
1165
|
props: {
|
|
1166
1166
|
value: null,
|
|
@@ -1175,46 +1175,46 @@ const Zl = /* @__PURE__ */ me(Kl, [["__scopeId", "data-v-97cfbfe4"]]), Ie = [
|
|
|
1175
1175
|
"update:value": null
|
|
1176
1176
|
},
|
|
1177
1177
|
setup(e, { emit: t }) {
|
|
1178
|
-
const l = e, { n, t: c } = se(), { debounce:
|
|
1178
|
+
const l = e, { n: o, t: c } = se(), { debounce: f } = Pe(), i = q(l.value), u = A({
|
|
1179
1179
|
get: () => l.value,
|
|
1180
|
-
set: (
|
|
1181
|
-
}), r = A(() => l.disabled ? "rgba(153, 153, 153, 0.8)" : "#9acd32"),
|
|
1182
|
-
let
|
|
1183
|
-
return
|
|
1184
|
-
}),
|
|
1185
|
-
function
|
|
1180
|
+
set: (b) => t("update:value", b)
|
|
1181
|
+
}), r = A(() => l.disabled ? "rgba(153, 153, 153, 0.8)" : "#9acd32"), m = A(() => {
|
|
1182
|
+
let b = (u.value - l.min) / (l.max - l.min) * 100;
|
|
1183
|
+
return b < 35 && b > 0 ? b < 20 ? b += 0.5 : b += 0.25 : b > 65 && b < 100 && (b > 80 ? b -= 0.5 : b -= 0.25), b;
|
|
1184
|
+
}), g = A(() => l.min <= l.max && l.step > 0);
|
|
1185
|
+
function p(b, T) {
|
|
1186
1186
|
var F;
|
|
1187
|
-
const
|
|
1188
|
-
|
|
1189
|
-
}
|
|
1190
|
-
return
|
|
1191
|
-
const
|
|
1192
|
-
return
|
|
1193
|
-
|
|
1194
|
-
[
|
|
1187
|
+
const C = (F = b == null ? void 0 : b.value) != null ? F : "", P = Math.max(Math.min(parseFloat(C) || l.min, l.max), l.min);
|
|
1188
|
+
u.value = l.enforceStep ? Math.ceil(P / l.step) * l.step : P, $e(() => T());
|
|
1189
|
+
}
|
|
1190
|
+
return le(() => l.value, () => i.value = l.value), (b, T) => {
|
|
1191
|
+
const C = ee("cl-ui-input");
|
|
1192
|
+
return n(g) ? (a(), d("div", ie(de({ key: 0 }, b.$attrs)), [
|
|
1193
|
+
V(s("div", { class: "cl-bg-transparent cl-relative cl-text-center cl-text-sm" }, y(n(u)), 513), [
|
|
1194
|
+
[H, !e.showNumericInput]
|
|
1195
1195
|
]),
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
modelValue:
|
|
1199
|
-
"onUpdate:modelValue":
|
|
1196
|
+
s("div", Ql, [
|
|
1197
|
+
V(k(C, {
|
|
1198
|
+
modelValue: i.value,
|
|
1199
|
+
"onUpdate:modelValue": T[0] || (T[0] = (P) => i.value = P),
|
|
1200
1200
|
class: "!cl-text-sm md:!cl-w-auto",
|
|
1201
1201
|
"input-type": "number",
|
|
1202
1202
|
min: e.min,
|
|
1203
1203
|
max: e.max,
|
|
1204
1204
|
step: e.step,
|
|
1205
1205
|
disabled: e.disabled,
|
|
1206
|
-
onInput:
|
|
1206
|
+
onInput: T[1] || (T[1] = (P) => n(f)(p, P.target, b.$forceUpdate))
|
|
1207
1207
|
}, null, 8, ["modelValue", "min", "max", "step", "disabled"]), [
|
|
1208
|
-
[
|
|
1208
|
+
[H, e.showNumericInput]
|
|
1209
1209
|
]),
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
typeof
|
|
1213
|
-
|
|
1214
|
-
"onUpdate:modelValue":
|
|
1210
|
+
s("div", Yl, [
|
|
1211
|
+
s("span", Xl, y(n(o)(e.min, Number.isInteger(e.min) ? n(ne).INTEGER : n(ne).DECIMAL)), 1),
|
|
1212
|
+
typeof n(u) == "number" ? (a(), d("div", _l, [
|
|
1213
|
+
V(s("input", {
|
|
1214
|
+
"onUpdate:modelValue": T[2] || (T[2] = (P) => ge(u) ? u.value = P : null),
|
|
1215
1215
|
class: "cl-align-middle cl-appearance-none cl-bg-gradient-to-r cl-border cl-border-grey-2 cl-delay-500 cl-ease-in cl-flex-1 cl-h-5 cl-mb-2 cl-outline-none cl-rounded-full cl-transition-colors cl-w-full",
|
|
1216
1216
|
style: Te({
|
|
1217
|
-
background: `linear-gradient(to right, ${
|
|
1217
|
+
background: `linear-gradient(to right, ${n(r)} 0%, ${n(r)} ${n(m)}%, white ${n(m)}%, white 100%)`
|
|
1218
1218
|
}),
|
|
1219
1219
|
type: "range",
|
|
1220
1220
|
min: e.min,
|
|
@@ -1224,16 +1224,16 @@ const Zl = /* @__PURE__ */ me(Kl, [["__scopeId", "data-v-97cfbfe4"]]), Ie = [
|
|
|
1224
1224
|
}, null, 12, et), [
|
|
1225
1225
|
[
|
|
1226
1226
|
ol,
|
|
1227
|
-
|
|
1227
|
+
n(u),
|
|
1228
1228
|
void 0,
|
|
1229
1229
|
{ number: !0 }
|
|
1230
1230
|
]
|
|
1231
1231
|
])
|
|
1232
|
-
])) :
|
|
1233
|
-
|
|
1232
|
+
])) : N("", !0),
|
|
1233
|
+
s("span", lt, y(n(o)(e.max, Number.isInteger(e.max) ? n(ne).INTEGER : n(ne).DECIMAL)), 1)
|
|
1234
1234
|
])
|
|
1235
1235
|
])
|
|
1236
|
-
], 16)) : (
|
|
1236
|
+
], 16)) : (a(), d("div", tt, y(n(c)("slider.invalidProps")), 1));
|
|
1237
1237
|
};
|
|
1238
1238
|
}
|
|
1239
1239
|
});
|
|
@@ -1269,7 +1269,7 @@ function Je(e) {
|
|
|
1269
1269
|
}
|
|
1270
1270
|
return t;
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1272
|
+
function je(e) {
|
|
1273
1273
|
return e === "button" || e === "submit" || e === "reset";
|
|
1274
1274
|
}
|
|
1275
1275
|
function ct(e) {
|
|
@@ -1293,7 +1293,7 @@ const at = { class: "cl-align-top cl-border-none cl-inline-block cl-text-left" }
|
|
|
1293
1293
|
class: "cl-block cl-left-auto cl-relative cl-text-danger-default"
|
|
1294
1294
|
}, ut = {
|
|
1295
1295
|
key: 1,
|
|
1296
|
-
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
|
|
1296
|
+
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"
|
|
1297
1297
|
}, dt = ["type", "disabled", "min", "max", "minlength", "maxlength", "step", "placeholder", "accept", "name", "autocomplete", "onBlur"], ft = {
|
|
1298
1298
|
key: 2,
|
|
1299
1299
|
class: "cl-h-[5.78rem] cl-pb-2 md:cl-h-20"
|
|
@@ -1303,7 +1303,7 @@ const at = { class: "cl-align-top cl-border-none cl-inline-block cl-text-left" }
|
|
|
1303
1303
|
}, bt = {
|
|
1304
1304
|
key: 1,
|
|
1305
1305
|
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"
|
|
1306
|
-
}, ht = /* @__PURE__ */
|
|
1306
|
+
}, ht = /* @__PURE__ */ G({
|
|
1307
1307
|
__name: "cl-ui-input",
|
|
1308
1308
|
props: {
|
|
1309
1309
|
inputType: { default: "text" },
|
|
@@ -1337,223 +1337,223 @@ const at = { class: "cl-align-top cl-border-none cl-inline-block cl-text-left" }
|
|
|
1337
1337
|
validated: null
|
|
1338
1338
|
},
|
|
1339
1339
|
setup(e, { emit: t }) {
|
|
1340
|
-
const l = e,
|
|
1340
|
+
const l = e, o = q(null), c = q(!1), f = q(!1), i = A(I), u = A(() => l.placeholderText.trim() !== "" ? l.placeholderText : l.label), r = q(!1), { t: m } = se(), g = A({
|
|
1341
1341
|
get: () => l.modelValue,
|
|
1342
|
-
set: (
|
|
1343
|
-
}),
|
|
1342
|
+
set: (x) => v(x)
|
|
1343
|
+
}), p = A({
|
|
1344
1344
|
get: () => l.modelValue,
|
|
1345
|
-
set: (
|
|
1346
|
-
}),
|
|
1347
|
-
var
|
|
1345
|
+
set: (x) => j(x)
|
|
1346
|
+
}), b = A(() => typeof l.min == "number" ? l.min.toString() : l.min), T = A(() => typeof l.max == "number" ? l.max.toString() : l.max), C = A(() => typeof l.min == "number" ? l.min : parseFloat(l.min)), P = A(() => typeof l.max == "number" ? l.max : parseFloat(l.max)), F = A(() => l.messageWhenValid.trim() !== "" ? l.messageWhenValid : ""), U = q(!0), X = q([]), E = A(() => {
|
|
1347
|
+
var x, D, te, Z;
|
|
1348
1348
|
return [
|
|
1349
|
-
...(
|
|
1349
|
+
...(D = (x = X.value) == null ? void 0 : x.filter((he) => {
|
|
1350
1350
|
var pe;
|
|
1351
1351
|
return ((pe = he == null ? void 0 : he.length) != null ? pe : 0) > 0;
|
|
1352
|
-
})) != null ?
|
|
1353
|
-
...(
|
|
1352
|
+
})) != null ? D : [],
|
|
1353
|
+
...(Z = (te = l.externalErrors) == null ? void 0 : te.filter((he) => {
|
|
1354
1354
|
var pe;
|
|
1355
1355
|
return ((pe = he == null ? void 0 : he.length) != null ? pe : 0) > 0;
|
|
1356
|
-
})) != null ?
|
|
1356
|
+
})) != null ? Z : []
|
|
1357
1357
|
].join(`
|
|
1358
1358
|
`);
|
|
1359
1359
|
});
|
|
1360
|
-
function
|
|
1361
|
-
|
|
1360
|
+
function j(x) {
|
|
1361
|
+
h(x), r.value = !1;
|
|
1362
1362
|
}
|
|
1363
|
-
function
|
|
1364
|
-
l.onInputFunction !== void 0 && (
|
|
1363
|
+
function v(x) {
|
|
1364
|
+
l.onInputFunction !== void 0 && (x = l.onInputFunction(x)), h(x);
|
|
1365
1365
|
}
|
|
1366
|
-
function
|
|
1367
|
-
const
|
|
1366
|
+
function h(x) {
|
|
1367
|
+
const D = {
|
|
1368
1368
|
message: "",
|
|
1369
1369
|
valid: !0
|
|
1370
|
-
},
|
|
1371
|
-
l.customValidationFunction === null || l.customValidationFunction === void 0 ? new Promise((
|
|
1372
|
-
|
|
1373
|
-
}) : new Promise((
|
|
1374
|
-
|
|
1370
|
+
}, te = [
|
|
1371
|
+
l.customValidationFunction === null || l.customValidationFunction === void 0 ? new Promise((Z) => {
|
|
1372
|
+
Z(D);
|
|
1373
|
+
}) : new Promise((Z) => {
|
|
1374
|
+
Z(l.customValidationFunction(l.label, x));
|
|
1375
1375
|
})
|
|
1376
1376
|
];
|
|
1377
|
-
(typeof
|
|
1378
|
-
const he = [...
|
|
1379
|
-
let pe =
|
|
1380
|
-
r.value && (he.push(
|
|
1377
|
+
(typeof x == "string" || typeof x == "number" || x instanceof Date) && (te.push(Bl(l.min, l.inputType, l.label, x)), te.push(Ll(l.max, l.inputType, l.label, x))), l.isRequired && te.push(Pl(l.label, x)), l.inputType === "email" && typeof x == "string" && te.push(Vl(l.label, x)), Promise.all(te).then((Z) => {
|
|
1378
|
+
const he = [...Z.map((Ee) => Ee.message)];
|
|
1379
|
+
let pe = Z.some((Ee) => Ee.message.length > 0 && Ee.valid === !1) || l.externalErrors.length > 0;
|
|
1380
|
+
r.value && (he.push(m("input.dateOutOfRange")), pe = !0), pe ? (X.value = he, t("validated", !1, x)) : (X.value = [], t("validated", !0, x)), U.value = !pe, t("update:modelValue", x);
|
|
1381
1381
|
});
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1384
|
-
let
|
|
1385
|
-
return l.inputType === "color" &&
|
|
1383
|
+
function $() {
|
|
1384
|
+
let x = "";
|
|
1385
|
+
return l.inputType === "color" && g.value && (l.disabled ? x = "background: #999999" : x = `background: ${g.value};`), x;
|
|
1386
1386
|
}
|
|
1387
|
-
function
|
|
1388
|
-
|
|
1387
|
+
function M(x) {
|
|
1388
|
+
je(l.inputType) ? (x.preventDefault(), t("click", x)) : l.inputType === "checkbox" && t("click", x);
|
|
1389
1389
|
}
|
|
1390
|
-
function
|
|
1391
|
-
if (
|
|
1392
|
-
|
|
1393
|
-
const
|
|
1394
|
-
target:
|
|
1390
|
+
function S() {
|
|
1391
|
+
if (o.value) {
|
|
1392
|
+
o.value.stepUp(), o.value.focus(), v(o.value.valueAsNumber);
|
|
1393
|
+
const x = {
|
|
1394
|
+
target: o.value
|
|
1395
1395
|
};
|
|
1396
|
-
t("input",
|
|
1396
|
+
t("input", x);
|
|
1397
1397
|
}
|
|
1398
1398
|
}
|
|
1399
|
-
function
|
|
1400
|
-
if (
|
|
1401
|
-
|
|
1402
|
-
const
|
|
1403
|
-
target:
|
|
1399
|
+
function O() {
|
|
1400
|
+
if (o.value) {
|
|
1401
|
+
o.value.stepDown(), o.value.focus(), v(o.value.valueAsNumber);
|
|
1402
|
+
const x = {
|
|
1403
|
+
target: o.value
|
|
1404
1404
|
};
|
|
1405
|
-
t("input",
|
|
1405
|
+
t("input", x);
|
|
1406
1406
|
}
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1409
|
-
c.value =
|
|
1408
|
+
function w(x) {
|
|
1409
|
+
c.value = x;
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1412
|
-
|
|
1411
|
+
function J() {
|
|
1412
|
+
f.value = !0, w(!1);
|
|
1413
1413
|
}
|
|
1414
|
-
function
|
|
1415
|
-
|
|
1414
|
+
function L(x) {
|
|
1415
|
+
x.target.blur();
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1418
|
-
var
|
|
1419
|
-
let
|
|
1420
|
-
const
|
|
1421
|
-
return c.value ?
|
|
1417
|
+
function I() {
|
|
1418
|
+
var te;
|
|
1419
|
+
let x = !0;
|
|
1420
|
+
const D = i.value;
|
|
1421
|
+
return c.value ? x = D : f.value && ((te = g.value) == null ? void 0 : te.toString().trim()) === "" && (x = !1), x;
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1423
|
+
function W() {
|
|
1424
1424
|
r.value = !0;
|
|
1425
1425
|
}
|
|
1426
1426
|
return Se(() => {
|
|
1427
|
-
l.validateImmediately &&
|
|
1428
|
-
}),
|
|
1429
|
-
const
|
|
1430
|
-
return
|
|
1431
|
-
|
|
1432
|
-
onMouseenter:
|
|
1433
|
-
onMouseleave:
|
|
1427
|
+
l.validateImmediately && v(l.modelValue);
|
|
1428
|
+
}), le(() => l.isRequired, () => v(l.modelValue)), le(() => l.externalErrors, () => h(g.value)), (x, D) => {
|
|
1429
|
+
const te = ee("icon");
|
|
1430
|
+
return a(), d("div", at, [
|
|
1431
|
+
s("div", {
|
|
1432
|
+
onMouseenter: D[10] || (D[10] = (Z) => w(!0)),
|
|
1433
|
+
onMouseleave: D[11] || (D[11] = (Z) => w(!1))
|
|
1434
1434
|
}, [
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
[
|
|
1435
|
+
s("div", it, [
|
|
1436
|
+
s("div", st, [
|
|
1437
|
+
V(s("label", { class: "cl-block cl-mb-1 cl-text-gray-400 cl-text-xs cl-tracking-widest" }, y(e.label), 513), [
|
|
1438
|
+
[H, e.showLabel && e.label !== ""]
|
|
1439
1439
|
])
|
|
1440
1440
|
]),
|
|
1441
|
-
e.isRequired &&
|
|
1442
|
-
e.isRequired && !
|
|
1441
|
+
e.isRequired && n(i) ? (a(), d("label", rt, " * ")) : N("", !0),
|
|
1442
|
+
e.isRequired && !n(i) ? (a(), d("label", ut, y(e.requiredText), 1)) : N("", !0)
|
|
1443
1443
|
]),
|
|
1444
|
-
e.inputType !== "range" && !
|
|
1444
|
+
e.inputType !== "range" && !n(Je)(e.inputType) ? V((a(), d("input", de({
|
|
1445
1445
|
key: 0,
|
|
1446
1446
|
ref_key: "inputElement",
|
|
1447
|
-
ref:
|
|
1448
|
-
"onUpdate:modelValue":
|
|
1449
|
-
},
|
|
1447
|
+
ref: o,
|
|
1448
|
+
"onUpdate:modelValue": D[0] || (D[0] = (Z) => ge(g) ? g.value = Z : null)
|
|
1449
|
+
}, x.$attrs, {
|
|
1450
1450
|
class: ["cl-block cl-border cl-duration-300 cl-h-full cl-mb-1 cl-transition cl-w-full focus:cl-outline-none", {
|
|
1451
|
-
"hover:!cl-border-grey-3": e.disabled === !1 && !
|
|
1451
|
+
"hover:!cl-border-grey-3": e.disabled === !1 && !n(je)(e.inputType),
|
|
1452
1452
|
"!cl-cursor-default": e.disabled,
|
|
1453
|
-
"!cl-border-danger-default": !
|
|
1454
|
-
"!cl-border-primary-default":
|
|
1455
|
-
"cl-border-grey-0 focus:cl-border-blue-light":
|
|
1453
|
+
"!cl-border-danger-default": !U.value,
|
|
1454
|
+
"!cl-border-primary-default": U.value && e.highlightWhenValid,
|
|
1455
|
+
"cl-border-grey-0 focus:cl-border-blue-light": U.value && !n(je)(e.inputType),
|
|
1456
1456
|
"!cl-p-2": e.inputType === "checkbox" || e.inputType === "radio",
|
|
1457
|
-
"cl-p-3 cl-rounded-lg": !
|
|
1457
|
+
"cl-p-3 cl-rounded-lg": !n(je)(e.inputType),
|
|
1458
1458
|
[`${e.inputSpecificClasses}`]: e.inputSpecificClasses !== ""
|
|
1459
1459
|
}],
|
|
1460
|
-
style:
|
|
1460
|
+
style: $(),
|
|
1461
1461
|
type: e.inputType,
|
|
1462
1462
|
disabled: e.disabled,
|
|
1463
1463
|
min: e.min,
|
|
1464
1464
|
max: e.max,
|
|
1465
|
-
minlength:
|
|
1466
|
-
maxlength:
|
|
1465
|
+
minlength: n(We)(e.inputType) ? e.min : 0,
|
|
1466
|
+
maxlength: n(We)(e.inputType) ? e.max : 0,
|
|
1467
1467
|
step: e.step,
|
|
1468
|
-
placeholder:
|
|
1468
|
+
placeholder: n(u),
|
|
1469
1469
|
accept: e.fileExtensions,
|
|
1470
1470
|
name: e.group,
|
|
1471
1471
|
autocomplete: e.autocomplete,
|
|
1472
|
-
onClick:
|
|
1473
|
-
onFocus:
|
|
1474
|
-
onBlur:
|
|
1475
|
-
onMousewheelPassive:
|
|
1476
|
-
onInput:
|
|
1477
|
-
t("input",
|
|
1472
|
+
onClick: D[1] || (D[1] = (Z) => M(Z)),
|
|
1473
|
+
onFocus: D[2] || (D[2] = (Z) => t("focus")),
|
|
1474
|
+
onBlur: ae(J, ["self"]),
|
|
1475
|
+
onMousewheelPassive: L,
|
|
1476
|
+
onInput: D[3] || (D[3] = (Z) => {
|
|
1477
|
+
t("input", Z), x.$forceUpdate();
|
|
1478
1478
|
})
|
|
1479
1479
|
}), null, 16, dt)), [
|
|
1480
|
-
[cl,
|
|
1481
|
-
]) :
|
|
1480
|
+
[cl, n(g)]
|
|
1481
|
+
]) : n(Je)(e.inputType) ? (a(), K(n(Zl), de({ key: 1 }, x.$attrs, {
|
|
1482
1482
|
ref_key: "inputElement",
|
|
1483
|
-
ref:
|
|
1484
|
-
date:
|
|
1485
|
-
"onUpdate:date":
|
|
1483
|
+
ref: o,
|
|
1484
|
+
date: n(p),
|
|
1485
|
+
"onUpdate:date": D[4] || (D[4] = (Z) => ge(p) ? p.value = Z : null),
|
|
1486
1486
|
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", {
|
|
1487
1487
|
"hover:cl-border-grey-3": !e.disabled,
|
|
1488
|
-
"!cl-border-danger-default": !
|
|
1489
|
-
"!cl-border-primary-default":
|
|
1488
|
+
"!cl-border-danger-default": !U.value,
|
|
1489
|
+
"!cl-border-primary-default": U.value && e.highlightWhenValid
|
|
1490
1490
|
}],
|
|
1491
1491
|
disabled: e.disabled,
|
|
1492
|
-
type:
|
|
1493
|
-
min:
|
|
1494
|
-
max:
|
|
1495
|
-
"date-placeholder":
|
|
1496
|
-
"date-time-placeholder":
|
|
1497
|
-
"time-placeholder":
|
|
1498
|
-
onBlur:
|
|
1499
|
-
onValueOutOfRange:
|
|
1500
|
-
onFocus:
|
|
1501
|
-
}), null, 16, ["date", "class", "disabled", "type", "min", "max", "date-placeholder", "date-time-placeholder", "time-placeholder", "onBlur"])) : e.inputType === "range" && typeof
|
|
1502
|
-
|
|
1492
|
+
type: n(ct)(e.inputType),
|
|
1493
|
+
min: n(b),
|
|
1494
|
+
max: n(T),
|
|
1495
|
+
"date-placeholder": n(u),
|
|
1496
|
+
"date-time-placeholder": n(u),
|
|
1497
|
+
"time-placeholder": n(u),
|
|
1498
|
+
onBlur: ae(J, ["self"]),
|
|
1499
|
+
onValueOutOfRange: W,
|
|
1500
|
+
onFocus: D[5] || (D[5] = (Z) => t("focus"))
|
|
1501
|
+
}), null, 16, ["date", "class", "disabled", "type", "min", "max", "date-placeholder", "date-time-placeholder", "time-placeholder", "onBlur"])) : e.inputType === "range" && typeof n(g) == "number" ? (a(), d("div", ft, [
|
|
1502
|
+
k(n(ot), {
|
|
1503
1503
|
ref_key: "inputElement",
|
|
1504
|
-
ref:
|
|
1505
|
-
value:
|
|
1506
|
-
"onUpdate:value":
|
|
1507
|
-
min:
|
|
1508
|
-
max:
|
|
1504
|
+
ref: o,
|
|
1505
|
+
value: n(g),
|
|
1506
|
+
"onUpdate:value": D[6] || (D[6] = (Z) => ge(g) ? g.value = Z : null),
|
|
1507
|
+
min: n(C),
|
|
1508
|
+
max: n(P),
|
|
1509
1509
|
step: e.step,
|
|
1510
1510
|
disabled: e.disabled,
|
|
1511
1511
|
"show-numeric-input": !1,
|
|
1512
|
-
onBlur:
|
|
1513
|
-
onFocus:
|
|
1512
|
+
onBlur: ae(J, ["self"]),
|
|
1513
|
+
onFocus: D[7] || (D[7] = (Z) => t("focus"))
|
|
1514
1514
|
}, null, 8, ["value", "min", "max", "step", "disabled", "onBlur"])
|
|
1515
|
-
])) :
|
|
1516
|
-
|
|
1517
|
-
e.inputType === "number" && !e.disabled && e.showArrows ? (
|
|
1515
|
+
])) : N("", !0),
|
|
1516
|
+
s("div", mt, [
|
|
1517
|
+
e.inputType === "number" && !e.disabled && e.showArrows ? (a(), d("div", {
|
|
1518
1518
|
key: 0,
|
|
1519
|
-
class:
|
|
1519
|
+
class: z(["cl-absolute cl-duration-300 cl-right-1 cl-transition", {
|
|
1520
1520
|
"cl-opacity-0": !c.value
|
|
1521
1521
|
}]),
|
|
1522
1522
|
style: { bottom: "1.625rem" }
|
|
1523
1523
|
}, [
|
|
1524
|
-
|
|
1524
|
+
k(te, {
|
|
1525
1525
|
icon: "ph:caret-up-bold",
|
|
1526
1526
|
class: "cl-bg-link-default cl-rounded-md cl-text-sm cl-text-white hover:cl-bg-link-light hover:cl-cursor-pointer",
|
|
1527
|
-
onClick:
|
|
1528
|
-
onMousedown:
|
|
1527
|
+
onClick: S,
|
|
1528
|
+
onMousedown: D[8] || (D[8] = ae(() => {
|
|
1529
1529
|
}, ["prevent"]))
|
|
1530
1530
|
})
|
|
1531
|
-
], 2)) :
|
|
1532
|
-
e.inputType === "number" && !e.disabled && e.showArrows ? (
|
|
1531
|
+
], 2)) : N("", !0),
|
|
1532
|
+
e.inputType === "number" && !e.disabled && e.showArrows ? (a(), d("div", {
|
|
1533
1533
|
key: 1,
|
|
1534
|
-
class:
|
|
1534
|
+
class: z(["cl-absolute cl-bottom-2 cl-duration-300 cl-right-1 cl-transition", {
|
|
1535
1535
|
"cl-opacity-0": !c.value
|
|
1536
1536
|
}])
|
|
1537
1537
|
}, [
|
|
1538
|
-
|
|
1538
|
+
k(te, {
|
|
1539
1539
|
icon: "ph:caret-down-bold",
|
|
1540
1540
|
class: "cl-bg-link-default cl-rounded-md cl-text-sm cl-text-white hover:cl-bg-link-light hover:cl-cursor-pointer",
|
|
1541
|
-
onClick:
|
|
1542
|
-
onMousedown:
|
|
1541
|
+
onClick: O,
|
|
1542
|
+
onMousedown: D[9] || (D[9] = ae(() => {
|
|
1543
1543
|
}, ["prevent"]))
|
|
1544
1544
|
})
|
|
1545
|
-
], 2)) :
|
|
1545
|
+
], 2)) : N("", !0)
|
|
1546
1546
|
])
|
|
1547
1547
|
], 32),
|
|
1548
|
-
|
|
1549
|
-
!
|
|
1548
|
+
U.value && n(F) ? (a(), d("div", gt, y(n(F)), 1)) : N("", !0),
|
|
1549
|
+
!U.value && n(E).length > 0 ? (a(), d("div", bt, y(n(E)), 1)) : N("", !0)
|
|
1550
1550
|
]);
|
|
1551
1551
|
};
|
|
1552
1552
|
}
|
|
1553
1553
|
});
|
|
1554
|
-
const fe = /* @__PURE__ */ me(ht, [["__scopeId", "data-v-
|
|
1554
|
+
const fe = /* @__PURE__ */ me(ht, [["__scopeId", "data-v-80cbc6a7"]]), vt = { class: "cl-align-items-center cl-bg-black cl-bg-opacity-40 cl-bottom-0 cl-fixed cl-flex cl-h-screen cl-justify-center cl-left-0 cl-right-0 cl-top-0 cl-w-full cl-z-40" }, pt = ["onKeypress"], yt = { class: "cl-overflow-y-auto cl-p-2 cl-w-full" }, wt = {
|
|
1555
1555
|
inheritAttrs: !1
|
|
1556
|
-
}, ll = /* @__PURE__ */
|
|
1556
|
+
}, ll = /* @__PURE__ */ G({
|
|
1557
1557
|
...wt,
|
|
1558
1558
|
__name: "cl-ui-modal",
|
|
1559
1559
|
props: {
|
|
@@ -1562,25 +1562,25 @@ const fe = /* @__PURE__ */ me(ht, [["__scopeId", "data-v-3d1e2503"]]), vt = { cl
|
|
|
1562
1562
|
size: { default: "medium" }
|
|
1563
1563
|
},
|
|
1564
1564
|
setup(e) {
|
|
1565
|
-
const t = e, l =
|
|
1566
|
-
function
|
|
1567
|
-
l.value = !0, document.addEventListener("keydown",
|
|
1565
|
+
const t = e, l = q(!1);
|
|
1566
|
+
function o() {
|
|
1567
|
+
l.value = !0, document.addEventListener("keydown", f);
|
|
1568
1568
|
}
|
|
1569
1569
|
function c() {
|
|
1570
|
-
t.preventClose || (l.value = !1, document.removeEventListener("keydown",
|
|
1571
|
-
}
|
|
1572
|
-
function
|
|
1573
|
-
|
|
1574
|
-
}
|
|
1575
|
-
return (
|
|
1576
|
-
const r =
|
|
1577
|
-
return
|
|
1578
|
-
|
|
1579
|
-
(
|
|
1580
|
-
|
|
1581
|
-
default:
|
|
1582
|
-
|
|
1583
|
-
|
|
1570
|
+
t.preventClose || (l.value = !1, document.removeEventListener("keydown", f));
|
|
1571
|
+
}
|
|
1572
|
+
function f(i) {
|
|
1573
|
+
i.key === "Escape" && c();
|
|
1574
|
+
}
|
|
1575
|
+
return (i, u) => {
|
|
1576
|
+
const r = ee("icon");
|
|
1577
|
+
return a(), d(B, null, [
|
|
1578
|
+
R(i.$slots, "trigger", ie(ve({ open: o }))),
|
|
1579
|
+
(a(), K(Le, { to: "body" }, [
|
|
1580
|
+
k(xe, { name: "fade" }, {
|
|
1581
|
+
default: Y(() => [
|
|
1582
|
+
V(s("div", vt, [
|
|
1583
|
+
s("div", de(i.$attrs, {
|
|
1584
1584
|
class: ["cl-bg-white cl-flex cl-flex-wrap cl-mx-0 cl-my-auto cl-overflow-y-auto cl-relative cl-rounded-lg cl-shadow-lg", {
|
|
1585
1585
|
"lg:cl-w-2/12 cl-w-10/12": e.size === "x-small",
|
|
1586
1586
|
"cl-w-6/12": e.size === "small",
|
|
@@ -1588,8 +1588,8 @@ const fe = /* @__PURE__ */ me(ht, [["__scopeId", "data-v-3d1e2503"]]), vt = { cl
|
|
|
1588
1588
|
"cl-w-10/12": e.size === "large"
|
|
1589
1589
|
}]
|
|
1590
1590
|
}), [
|
|
1591
|
-
|
|
1592
|
-
class:
|
|
1591
|
+
V(s("div", {
|
|
1592
|
+
class: z(["cl-absolute cl-cursor-pointer cl-right-4 cl-top-4 cl-transition-colors cl-w-3", {
|
|
1593
1593
|
"cl-text-white hover:cl-text-off-white": e.headerColour === "secondary" || e.headerColour === "primary",
|
|
1594
1594
|
"cl-text-black hover:cl-text-grey-7": e.headerColour === "white"
|
|
1595
1595
|
}]),
|
|
@@ -1597,26 +1597,26 @@ const fe = /* @__PURE__ */ me(ht, [["__scopeId", "data-v-3d1e2503"]]), vt = { cl
|
|
|
1597
1597
|
onKeypress: Ce(c, ["enter"]),
|
|
1598
1598
|
onClick: c
|
|
1599
1599
|
}, [
|
|
1600
|
-
|
|
1600
|
+
k(r, { icon: "ph:x" })
|
|
1601
1601
|
], 42, pt), [
|
|
1602
|
-
[
|
|
1602
|
+
[H, !e.preventClose]
|
|
1603
1603
|
]),
|
|
1604
|
-
|
|
1605
|
-
class:
|
|
1604
|
+
s("div", {
|
|
1605
|
+
class: z(["cl-leading-[2.75rem] cl-min-h-12 cl-overflow-hidden cl-pl-3 cl-pr-8 cl-text-2xl cl-w-full", {
|
|
1606
1606
|
"cl-border-b cl-border-grey-2": e.headerColour === "white",
|
|
1607
1607
|
"cl-bg-secondary-default cl-text-white": e.headerColour === "secondary",
|
|
1608
1608
|
"cl-bg-primary-default cl-text-white": e.headerColour === "primary"
|
|
1609
1609
|
}])
|
|
1610
1610
|
}, [
|
|
1611
|
-
|
|
1611
|
+
R(i.$slots, "title")
|
|
1612
1612
|
], 2),
|
|
1613
|
-
|
|
1614
|
-
|
|
1613
|
+
s("div", yt, [
|
|
1614
|
+
R(i.$slots, "default", ie(ve({ close: c })))
|
|
1615
1615
|
]),
|
|
1616
|
-
|
|
1616
|
+
R(i.$slots, "footer", ie(ve({ close: c })))
|
|
1617
1617
|
], 16)
|
|
1618
1618
|
], 512), [
|
|
1619
|
-
[
|
|
1619
|
+
[H, l.value]
|
|
1620
1620
|
])
|
|
1621
1621
|
]),
|
|
1622
1622
|
_: 3
|
|
@@ -1628,7 +1628,7 @@ const fe = /* @__PURE__ */ me(ht, [["__scopeId", "data-v-3d1e2503"]]), vt = { cl
|
|
|
1628
1628
|
}), xt = { class: "cl-bg-grey-2 cl-border-b cl-border-grey-2 cl-border-t cl-flex cl-p-1" }, $t = {
|
|
1629
1629
|
key: 0,
|
|
1630
1630
|
class: "cl-w-1/2"
|
|
1631
|
-
},
|
|
1631
|
+
}, Ae = /* @__PURE__ */ G({
|
|
1632
1632
|
__name: "cl-ui-combo-box-header",
|
|
1633
1633
|
props: {
|
|
1634
1634
|
showClearButton: { type: Boolean, default: !1 },
|
|
@@ -1640,25 +1640,25 @@ const fe = /* @__PURE__ */ me(ht, [["__scopeId", "data-v-3d1e2503"]]), vt = { cl
|
|
|
1640
1640
|
},
|
|
1641
1641
|
setup(e) {
|
|
1642
1642
|
return (t, l) => {
|
|
1643
|
-
const
|
|
1644
|
-
return
|
|
1645
|
-
e.additionalText !== "" ? (
|
|
1646
|
-
|
|
1647
|
-
class:
|
|
1643
|
+
const o = ee("icon");
|
|
1644
|
+
return a(), d("div", xt, [
|
|
1645
|
+
e.additionalText !== "" ? (a(), d("div", $t, y(e.additionalText), 1)) : N("", !0),
|
|
1646
|
+
s("div", {
|
|
1647
|
+
class: z({
|
|
1648
1648
|
"cl-w-1/2": e.additionalText !== "",
|
|
1649
1649
|
"cl-w-full": e.additionalText === ""
|
|
1650
1650
|
})
|
|
1651
|
-
},
|
|
1652
|
-
|
|
1651
|
+
}, y(e.text), 3),
|
|
1652
|
+
V(s("div", {
|
|
1653
1653
|
class: "cl-cursor-pointer cl-float-right",
|
|
1654
1654
|
onMousedown: l[0] || (l[0] = (c) => t.$emit("clear-object"))
|
|
1655
1655
|
}, [
|
|
1656
|
-
|
|
1656
|
+
k(o, {
|
|
1657
1657
|
class: "cl-mt-0.5 cl-rounded-full cl-transition-colors hover:cl-text-link-default",
|
|
1658
1658
|
icon: "ph:x-circle"
|
|
1659
1659
|
})
|
|
1660
1660
|
], 544), [
|
|
1661
|
-
[
|
|
1661
|
+
[H, e.showClearButton]
|
|
1662
1662
|
])
|
|
1663
1663
|
]);
|
|
1664
1664
|
};
|
|
@@ -1666,7 +1666,7 @@ const fe = /* @__PURE__ */ me(ht, [["__scopeId", "data-v-3d1e2503"]]), vt = { cl
|
|
|
1666
1666
|
}), kt = {
|
|
1667
1667
|
key: 0,
|
|
1668
1668
|
class: "cl-w-1/2"
|
|
1669
|
-
}, Tt = { class: "cl-float-right cl-py-1.5" }, Ke = /* @__PURE__ */
|
|
1669
|
+
}, Tt = { class: "cl-float-right cl-py-1.5" }, Ke = /* @__PURE__ */ G({
|
|
1670
1670
|
__name: "cl-ui-combo-box-selectable",
|
|
1671
1671
|
props: {
|
|
1672
1672
|
isCreateNewOption: { type: Boolean, default: !1 },
|
|
@@ -1681,54 +1681,54 @@ const fe = /* @__PURE__ */ me(ht, [["__scopeId", "data-v-3d1e2503"]]), vt = { cl
|
|
|
1681
1681
|
"option-highlighted": null
|
|
1682
1682
|
},
|
|
1683
1683
|
setup(e, { emit: t }) {
|
|
1684
|
-
const l = e,
|
|
1685
|
-
var
|
|
1686
|
-
return (
|
|
1684
|
+
const l = e, o = A(() => {
|
|
1685
|
+
var m, g;
|
|
1686
|
+
return (g = (m = l.option) == null ? void 0 : m.name) != null ? g : l.text;
|
|
1687
1687
|
}), c = A(() => {
|
|
1688
|
-
var
|
|
1689
|
-
return (
|
|
1690
|
-
}),
|
|
1691
|
-
function
|
|
1692
|
-
var
|
|
1693
|
-
l.isCreateNewOption === !0 ? t("create-object") : t("select-object", (
|
|
1688
|
+
var m, g;
|
|
1689
|
+
return (g = (m = l.option) == null ? void 0 : m.parentName) != null ? g : "";
|
|
1690
|
+
}), f = q(!1);
|
|
1691
|
+
function i() {
|
|
1692
|
+
var m;
|
|
1693
|
+
l.isCreateNewOption === !0 ? t("create-object") : t("select-object", (m = l.option) == null ? void 0 : m.id);
|
|
1694
1694
|
}
|
|
1695
|
-
function m
|
|
1696
|
-
|
|
1695
|
+
function u(m) {
|
|
1696
|
+
m === !0 ? (f.value = !0, t("option-highlighted", l.index)) : l.index !== l.selectedIndex && (f.value = !1);
|
|
1697
1697
|
}
|
|
1698
1698
|
function r() {
|
|
1699
|
-
l.selectedIndex === l.index ?
|
|
1700
|
-
}
|
|
1701
|
-
return
|
|
1702
|
-
var
|
|
1703
|
-
const
|
|
1704
|
-
return
|
|
1705
|
-
class:
|
|
1706
|
-
"cl-bg-grey-0":
|
|
1707
|
-
"cl-bg-primary-default cl-text-white":
|
|
1699
|
+
l.selectedIndex === l.index ? f.value = !0 : f.value = !1;
|
|
1700
|
+
}
|
|
1701
|
+
return le(() => l.selectedIndex, () => r()), (m, g) => {
|
|
1702
|
+
var b, T;
|
|
1703
|
+
const p = ee("icon");
|
|
1704
|
+
return a(), d("div", {
|
|
1705
|
+
class: z(["cl-border-b cl-border-grey-0 cl-border-t cl-cursor-pointer cl-duration-75 cl-flex cl-p-1 cl-transition-colors", {
|
|
1706
|
+
"cl-bg-grey-0": f.value === !1,
|
|
1707
|
+
"cl-bg-primary-default cl-text-white": f.value
|
|
1708
1708
|
}]),
|
|
1709
|
-
onMousedown:
|
|
1710
|
-
onMousemove:
|
|
1711
|
-
onMouseleave:
|
|
1709
|
+
onMousedown: i,
|
|
1710
|
+
onMousemove: g[0] || (g[0] = (C) => u(!0)),
|
|
1711
|
+
onMouseleave: g[1] || (g[1] = (C) => u(!1))
|
|
1712
1712
|
}, [
|
|
1713
|
-
e.option !== null && ((
|
|
1714
|
-
|
|
1715
|
-
class:
|
|
1716
|
-
"cl-w-1/2":
|
|
1717
|
-
"cl-w-full":
|
|
1713
|
+
e.option !== null && ((b = e.option) == null ? void 0 : b.parentId) !== 0 && ((T = e.option) == null ? void 0 : T.parentId) !== void 0 ? (a(), d("div", kt, y(n(c)), 1)) : N("", !0),
|
|
1714
|
+
s("div", {
|
|
1715
|
+
class: z({
|
|
1716
|
+
"cl-w-1/2": n(c) !== "",
|
|
1717
|
+
"cl-w-full": n(c) === ""
|
|
1718
1718
|
})
|
|
1719
|
-
},
|
|
1720
|
-
|
|
1721
|
-
|
|
1719
|
+
}, y(n(o)), 3),
|
|
1720
|
+
V(s("div", Tt, [
|
|
1721
|
+
k(p, {
|
|
1722
1722
|
class: "cl-bg-primary-default cl-rounded-full cl-text-white",
|
|
1723
1723
|
icon: "ph:plus-circle"
|
|
1724
1724
|
})
|
|
1725
1725
|
], 512), [
|
|
1726
|
-
[
|
|
1726
|
+
[H, e.isCreateNewOption]
|
|
1727
1727
|
])
|
|
1728
1728
|
], 34);
|
|
1729
1729
|
};
|
|
1730
1730
|
}
|
|
1731
|
-
}), Ct = ["onKeyup"], St = { class: "cl-flex" },
|
|
1731
|
+
}), Ct = ["onKeyup"], St = { class: "cl-flex" }, Et = { key: 5 }, jt = /* @__PURE__ */ G({
|
|
1732
1732
|
__name: "cl-ui-combo-box-search",
|
|
1733
1733
|
props: {
|
|
1734
1734
|
loading: { type: Boolean, default: !1 },
|
|
@@ -1749,130 +1749,130 @@ const fe = /* @__PURE__ */ me(ht, [["__scopeId", "data-v-3d1e2503"]]), vt = { cl
|
|
|
1749
1749
|
"hide-dropdown": null
|
|
1750
1750
|
},
|
|
1751
1751
|
setup(e, { emit: t }) {
|
|
1752
|
-
const l = e, { t:
|
|
1753
|
-
function
|
|
1754
|
-
(
|
|
1752
|
+
const l = e, { t: o } = se(), c = q(""), f = q(!1), i = q(-1), u = A(() => f.value ? -1 : 0), r = q();
|
|
1753
|
+
function m(v) {
|
|
1754
|
+
(v === void 0 || (v == null ? void 0 : v.code.startsWith("Arrow")) === !1 && (v == null ? void 0 : v.code.startsWith("Control")) === !1 && (v == null ? void 0 : v.code.startsWith("Shift")) === !1 && (v == null ? void 0 : v.code.startsWith("Tab")) === !1 && (v == null ? void 0 : v.code) !== "Enter") && (t("search", c.value), i.value = -2);
|
|
1755
1755
|
}
|
|
1756
|
-
function
|
|
1757
|
-
t("select-object",
|
|
1756
|
+
function g(v) {
|
|
1757
|
+
t("select-object", v);
|
|
1758
1758
|
}
|
|
1759
|
-
function
|
|
1760
|
-
t("create-object", c.value),
|
|
1759
|
+
function p() {
|
|
1760
|
+
t("create-object", c.value), b();
|
|
1761
1761
|
}
|
|
1762
|
-
function
|
|
1762
|
+
function b() {
|
|
1763
1763
|
t("hide-dropdown");
|
|
1764
1764
|
}
|
|
1765
|
-
function
|
|
1766
|
-
|
|
1765
|
+
function T(v) {
|
|
1766
|
+
i.value < l.results.length - 1 ? (i.value === -2 && c.value === "" && i.value++, i.value++) : i.value = v, U();
|
|
1767
1767
|
}
|
|
1768
|
-
function
|
|
1769
|
-
|
|
1768
|
+
function C(v) {
|
|
1769
|
+
i.value > v ? i.value-- : i.value = l.results.length - 1, U();
|
|
1770
1770
|
}
|
|
1771
|
-
function
|
|
1772
|
-
|
|
1771
|
+
function P() {
|
|
1772
|
+
i.value >= 0 && l.results !== void 0 ? g(l.results[i.value].id) : i.value === -1 && p();
|
|
1773
1773
|
}
|
|
1774
|
-
function F(
|
|
1775
|
-
if (
|
|
1776
|
-
const
|
|
1777
|
-
let
|
|
1778
|
-
for (let
|
|
1779
|
-
|
|
1780
|
-
|
|
1774
|
+
function F(v) {
|
|
1775
|
+
if (v.key === "Tab" && v.shiftKey === !0) {
|
|
1776
|
+
const h = document.getElementsByTagName("input");
|
|
1777
|
+
let $ = -1;
|
|
1778
|
+
for (let M = 0; M < h.length; M++)
|
|
1779
|
+
h[M] === v.target && ($ = M - 1);
|
|
1780
|
+
$ >= 0 && (h[$].focus(), b());
|
|
1781
1781
|
}
|
|
1782
1782
|
}
|
|
1783
|
-
function
|
|
1784
|
-
var
|
|
1785
|
-
l.results && l.results.length > 1 && ((
|
|
1783
|
+
function U() {
|
|
1784
|
+
var v;
|
|
1785
|
+
l.results && l.results.length > 1 && ((v = r.value) == null || v.scrollTo(0, (i.value + 1) * 34 - 34 * 2));
|
|
1786
1786
|
}
|
|
1787
1787
|
function X() {
|
|
1788
|
-
let
|
|
1789
|
-
l.results !== null && l.results.length === 1 && (
|
|
1788
|
+
let v = !1;
|
|
1789
|
+
l.results !== null && l.results.length === 1 && (v = c.value.toUpperCase().trim() === l.results[0].name.toUpperCase().trim()), f.value = l.canCreateNewObject === !0 && l.errorMessage === "" && c.value.trim() !== "" && v === !1;
|
|
1790
1790
|
}
|
|
1791
|
-
function
|
|
1792
|
-
|
|
1791
|
+
function E(v) {
|
|
1792
|
+
i.value = v;
|
|
1793
1793
|
}
|
|
1794
|
-
function
|
|
1795
|
-
l.isVisible === !0 && (c.value = "",
|
|
1796
|
-
var
|
|
1797
|
-
return (
|
|
1794
|
+
function j() {
|
|
1795
|
+
l.isVisible === !0 && (c.value = "", m(), $e(() => {
|
|
1796
|
+
var v, h;
|
|
1797
|
+
return (h = (v = r.value) == null ? void 0 : v.querySelector("input")) == null ? void 0 : h.focus();
|
|
1798
1798
|
}));
|
|
1799
1799
|
}
|
|
1800
|
-
return
|
|
1801
|
-
var
|
|
1802
|
-
return (
|
|
1800
|
+
return le(() => l.results, () => X()), le(() => l.errorMessage, () => X()), le(() => l.isVisible, () => j()), Se(() => {
|
|
1801
|
+
var v;
|
|
1802
|
+
return (v = r.value) == null ? void 0 : v.addEventListener("keydown", F);
|
|
1803
1803
|
}), Me(() => {
|
|
1804
|
-
var
|
|
1805
|
-
return (
|
|
1806
|
-
}), (
|
|
1807
|
-
var
|
|
1808
|
-
const
|
|
1809
|
-
return
|
|
1804
|
+
var v;
|
|
1805
|
+
return (v = r.value) == null ? void 0 : v.removeEventListener("keydown", F);
|
|
1806
|
+
}), (v, h) => {
|
|
1807
|
+
var M;
|
|
1808
|
+
const $ = ee("cl-ui-loading-spinner");
|
|
1809
|
+
return a(), d("div", {
|
|
1810
1810
|
ref_key: "container",
|
|
1811
1811
|
ref: r,
|
|
1812
1812
|
class: "cl-bg-white cl-border cl-border-collapse cl-border-grey-0 cl-h-52 cl-overflow-y-auto cl-p-2 cl-rounded cl-text-sm",
|
|
1813
1813
|
onKeydown: [
|
|
1814
|
-
|
|
1815
|
-
|
|
1814
|
+
h[2] || (h[2] = Ce(ae((S) => C(n(u)), ["prevent", "stop"]), ["up"])),
|
|
1815
|
+
h[3] || (h[3] = Ce(ae((S) => T(n(u)), ["prevent", "stop"]), ["down"]))
|
|
1816
1816
|
],
|
|
1817
|
-
onKeyup: Ce(
|
|
1817
|
+
onKeyup: Ce(ae(P, ["prevent", "stop"]), ["enter"])
|
|
1818
1818
|
}, [
|
|
1819
|
-
|
|
1820
|
-
|
|
1819
|
+
s("div", St, [
|
|
1820
|
+
k(fe, {
|
|
1821
1821
|
modelValue: c.value,
|
|
1822
|
-
"onUpdate:modelValue":
|
|
1822
|
+
"onUpdate:modelValue": h[0] || (h[0] = (S) => c.value = S),
|
|
1823
1823
|
class: "!cl-mr-0 cl-mb-1 cl-w-full",
|
|
1824
1824
|
"input-type": "text",
|
|
1825
|
-
"placeholder-text": o
|
|
1826
|
-
onKeyup:
|
|
1827
|
-
onBlur:
|
|
1825
|
+
"placeholder-text": n(o)("comboBox.searchHint", { object: e.objectType }),
|
|
1826
|
+
onKeyup: m,
|
|
1827
|
+
onBlur: b
|
|
1828
1828
|
}, null, 8, ["modelValue", "placeholder-text"]),
|
|
1829
|
-
|
|
1830
|
-
[
|
|
1829
|
+
V(k($, { class: "cl-absolute cl-ml-2 cl-mt-11" }, null, 512), [
|
|
1830
|
+
[H, e.loading]
|
|
1831
1831
|
])
|
|
1832
1832
|
]),
|
|
1833
|
-
e.currentObjectName !== "" ? (
|
|
1833
|
+
e.currentObjectName !== "" ? (a(), K(Ae, {
|
|
1834
1834
|
key: 0,
|
|
1835
1835
|
"show-clear-button": e.canClearSelectedObject,
|
|
1836
1836
|
text: e.currentObjectName,
|
|
1837
|
-
onClearObject:
|
|
1838
|
-
}, null, 8, ["show-clear-button", "text"])) :
|
|
1839
|
-
e.objectParentType !== "" && e.results !== void 0 && e.results.length > 0 && e.errorMessage === "" ? (
|
|
1837
|
+
onClearObject: h[1] || (h[1] = (S) => v.$emit("clear-object"))
|
|
1838
|
+
}, null, 8, ["show-clear-button", "text"])) : N("", !0),
|
|
1839
|
+
e.objectParentType !== "" && e.results !== void 0 && e.results.length > 0 && e.errorMessage === "" ? (a(), K(Ae, {
|
|
1840
1840
|
key: 1,
|
|
1841
1841
|
text: e.objectType,
|
|
1842
1842
|
"additional-text": e.objectParentType
|
|
1843
|
-
}, null, 8, ["text", "additional-text"])) :
|
|
1844
|
-
e.results !== null && ((
|
|
1843
|
+
}, null, 8, ["text", "additional-text"])) : N("", !0),
|
|
1844
|
+
e.results !== null && ((M = e.results) == null ? void 0 : M.length) === 0 && c.value.trim() !== "" && e.canCreateNewObject === !1 && e.errorMessage === "" ? (a(), K(Ae, {
|
|
1845
1845
|
key: 2,
|
|
1846
|
-
text: o
|
|
1847
|
-
}, null, 8, ["text"])) :
|
|
1848
|
-
e.errorMessage !== "" ? (
|
|
1846
|
+
text: n(o)("comboBox.noResults", { value: c.value })
|
|
1847
|
+
}, null, 8, ["text"])) : N("", !0),
|
|
1848
|
+
e.errorMessage !== "" ? (a(), K(Ae, {
|
|
1849
1849
|
key: 3,
|
|
1850
1850
|
class: "!cl-bg-danger-light cl-border-danger-light cl-rounded cl-text-danger-dark",
|
|
1851
|
-
text: o
|
|
1852
|
-
}, null, 8, ["text"])) :
|
|
1853
|
-
|
|
1851
|
+
text: n(o)("comboBox.errorMessage", { error: e.errorMessage })
|
|
1852
|
+
}, null, 8, ["text"])) : N("", !0),
|
|
1853
|
+
f.value ? (a(), K(Ke, {
|
|
1854
1854
|
key: 4,
|
|
1855
1855
|
"is-create-new-option": !0,
|
|
1856
|
-
text: o
|
|
1856
|
+
text: n(o)("comboBox.addPrompt", { value: c.value, object: e.objectType }),
|
|
1857
1857
|
index: -1,
|
|
1858
|
-
"selected-index":
|
|
1859
|
-
onCreateObject:
|
|
1860
|
-
onOptionHighlighted:
|
|
1861
|
-
}, null, 8, ["text", "selected-index"])) :
|
|
1862
|
-
e.errorMessage === "" && e.results !== null ? (
|
|
1863
|
-
(
|
|
1864
|
-
key:
|
|
1865
|
-
option:
|
|
1866
|
-
index:
|
|
1867
|
-
"selected-index":
|
|
1868
|
-
onSelectObject:
|
|
1869
|
-
onOptionHighlighted:
|
|
1858
|
+
"selected-index": i.value,
|
|
1859
|
+
onCreateObject: p,
|
|
1860
|
+
onOptionHighlighted: E
|
|
1861
|
+
}, null, 8, ["text", "selected-index"])) : N("", !0),
|
|
1862
|
+
e.errorMessage === "" && e.results !== null ? (a(), d("div", Et, [
|
|
1863
|
+
(a(!0), d(B, null, ce(e.results, (S, O) => (a(), K(Ke, {
|
|
1864
|
+
key: O,
|
|
1865
|
+
option: S,
|
|
1866
|
+
index: O,
|
|
1867
|
+
"selected-index": i.value,
|
|
1868
|
+
onSelectObject: g,
|
|
1869
|
+
onOptionHighlighted: E
|
|
1870
1870
|
}, null, 8, ["option", "index", "selected-index"]))), 128))
|
|
1871
|
-
])) :
|
|
1871
|
+
])) : N("", !0)
|
|
1872
1872
|
], 40, Ct);
|
|
1873
1873
|
};
|
|
1874
1874
|
}
|
|
1875
|
-
}),
|
|
1875
|
+
}), At = { class: "cl-flex" }, Ot = { class: "cl-relative cl-right-20 cl-top-0.5" }, Mt = { class: "cl-absolute cl-flex cl-float-right cl-font-semibold cl-mt-2 cl-text-danger-default cl-text-sm" }, It = { class: "cl-ml-4 cl-w-11/12" }, Nt = { class: "cl-p-2 cl-text-right cl-w-full" }, qt = /* @__PURE__ */ G({
|
|
1876
1876
|
__name: "cl-ui-combo-box",
|
|
1877
1877
|
props: {
|
|
1878
1878
|
loading: { type: Boolean, default: !1 },
|
|
@@ -1898,134 +1898,134 @@ const fe = /* @__PURE__ */ me(ht, [["__scopeId", "data-v-3d1e2503"]]), vt = { cl
|
|
|
1898
1898
|
"update:current-object": null
|
|
1899
1899
|
},
|
|
1900
1900
|
setup(e, { emit: t }) {
|
|
1901
|
-
const l = e, { t:
|
|
1901
|
+
const l = e, { t: o } = se(), c = q(!1), f = A({
|
|
1902
1902
|
get: () => l.currentObject,
|
|
1903
|
-
set: (
|
|
1904
|
-
}),
|
|
1905
|
-
function
|
|
1906
|
-
l.disabled || (typeof
|
|
1903
|
+
set: (S) => t("update:current-object", S)
|
|
1904
|
+
}), i = q(null), u = A(() => $()), r = q(""), m = q(""), g = q(), p = q(!0);
|
|
1905
|
+
function b(S) {
|
|
1906
|
+
l.disabled || (typeof S < "u" ? c.value = S : c.value = !c.value);
|
|
1907
1907
|
}
|
|
1908
|
-
function
|
|
1909
|
-
r.value =
|
|
1908
|
+
function T(S) {
|
|
1909
|
+
r.value = S, t("search", S);
|
|
1910
1910
|
}
|
|
1911
|
-
function
|
|
1912
|
-
|
|
1911
|
+
function C(S) {
|
|
1912
|
+
m.value = S, t("search-parent", S);
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1915
|
-
|
|
1914
|
+
function P() {
|
|
1915
|
+
f.value = null, b(!1);
|
|
1916
1916
|
}
|
|
1917
|
-
function F(
|
|
1918
|
-
const
|
|
1919
|
-
|
|
1917
|
+
function F(S) {
|
|
1918
|
+
const O = U(S);
|
|
1919
|
+
f.value = O, b(!1);
|
|
1920
1920
|
}
|
|
1921
|
-
function
|
|
1922
|
-
let
|
|
1921
|
+
function U(S) {
|
|
1922
|
+
let O = null;
|
|
1923
1923
|
if (l.results !== null) {
|
|
1924
|
-
for (let
|
|
1925
|
-
if (l.results[
|
|
1926
|
-
|
|
1924
|
+
for (let w = 0; w < l.results.length; w++)
|
|
1925
|
+
if (l.results[w].id === S) {
|
|
1926
|
+
O = l.results[w];
|
|
1927
1927
|
break;
|
|
1928
1928
|
}
|
|
1929
1929
|
}
|
|
1930
|
-
return
|
|
1930
|
+
return O;
|
|
1931
1931
|
}
|
|
1932
1932
|
function X() {
|
|
1933
|
-
var
|
|
1934
|
-
|
|
1933
|
+
var S, O;
|
|
1934
|
+
g.value = {
|
|
1935
1935
|
name: r.value,
|
|
1936
|
-
parentId: (
|
|
1937
|
-
}, t("create-object",
|
|
1936
|
+
parentId: (O = (S = i.value) == null ? void 0 : S.id) != null ? O : 0
|
|
1937
|
+
}, t("create-object", g.value);
|
|
1938
1938
|
}
|
|
1939
|
-
function
|
|
1940
|
-
|
|
1941
|
-
name:
|
|
1939
|
+
function E() {
|
|
1940
|
+
g.value = {
|
|
1941
|
+
name: m.value,
|
|
1942
1942
|
parentId: 0
|
|
1943
|
-
}, t("create-parent-object",
|
|
1943
|
+
}, t("create-parent-object", g.value);
|
|
1944
1944
|
}
|
|
1945
|
-
function
|
|
1946
|
-
var
|
|
1947
|
-
(
|
|
1948
|
-
message:
|
|
1945
|
+
function j() {
|
|
1946
|
+
var S, O;
|
|
1947
|
+
(S = l.objectCreatedResponse) != null && S.error ? Fe({
|
|
1948
|
+
message: o("comboBox.createFailed", { name: r.value, error: l.objectCreatedResponse.error }),
|
|
1949
1949
|
colour: "danger",
|
|
1950
1950
|
duration: 1e4
|
|
1951
|
-
}) : (
|
|
1951
|
+
}) : (O = l.objectCreatedResponse) != null && O.id && h();
|
|
1952
1952
|
}
|
|
1953
|
-
function
|
|
1954
|
-
var
|
|
1955
|
-
(
|
|
1953
|
+
function v() {
|
|
1954
|
+
var S, O;
|
|
1955
|
+
(S = l.parentObjectCreatedResponse) != null && S.id && (i.value = {
|
|
1956
1956
|
id: l.parentObjectCreatedResponse.id,
|
|
1957
|
-
name: (
|
|
1957
|
+
name: (O = l.parentObjectCreatedResponse.name) != null ? O : ""
|
|
1958
1958
|
});
|
|
1959
1959
|
}
|
|
1960
|
-
function
|
|
1961
|
-
var
|
|
1962
|
-
|
|
1963
|
-
message:
|
|
1960
|
+
function h() {
|
|
1961
|
+
var O, w, J, L, I, W, x, D, te;
|
|
1962
|
+
Fe({
|
|
1963
|
+
message: o("comboBox.createSuccessful", { object: l.objectType, name: (w = (O = l.objectCreatedResponse) == null ? void 0 : O.name) != null ? w : "" }),
|
|
1964
1964
|
colour: "primary",
|
|
1965
1965
|
duration: 1e4
|
|
1966
1966
|
});
|
|
1967
|
-
let
|
|
1968
|
-
|
|
1969
|
-
id: (
|
|
1970
|
-
name: (
|
|
1971
|
-
parentId: (
|
|
1972
|
-
parentName:
|
|
1967
|
+
let S = "";
|
|
1968
|
+
i.value && i.value.id === ((J = l.objectCreatedResponse) == null ? void 0 : J.parentId) && (S = i.value.name), f.value = {
|
|
1969
|
+
id: (I = (L = l.objectCreatedResponse) == null ? void 0 : L.id) != null ? I : 0,
|
|
1970
|
+
name: (x = (W = l.objectCreatedResponse) == null ? void 0 : W.name) != null ? x : "",
|
|
1971
|
+
parentId: (te = (D = l.objectCreatedResponse) == null ? void 0 : D.parentId) != null ? te : 0,
|
|
1972
|
+
parentName: S
|
|
1973
1973
|
};
|
|
1974
1974
|
}
|
|
1975
|
-
function
|
|
1976
|
-
let
|
|
1977
|
-
return
|
|
1978
|
-
}
|
|
1979
|
-
function
|
|
1980
|
-
let
|
|
1981
|
-
r.value === "" && (
|
|
1982
|
-
}
|
|
1983
|
-
return
|
|
1984
|
-
const
|
|
1985
|
-
return
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
modelValue:
|
|
1989
|
-
"onUpdate:modelValue":
|
|
1990
|
-
class:
|
|
1975
|
+
function $() {
|
|
1976
|
+
let S = "";
|
|
1977
|
+
return f.value && (f.value.parentName ? S = f.value.parentName + "; " + f.value.name : S = f.value.name), S;
|
|
1978
|
+
}
|
|
1979
|
+
function M() {
|
|
1980
|
+
let S = !0;
|
|
1981
|
+
r.value === "" && (S = !1), l.objectParentType !== "" && i.value === null && (S = !1), p.value = S;
|
|
1982
|
+
}
|
|
1983
|
+
return le(() => l.objectCreatedResponse, () => j()), le(() => l.parentObjectCreatedResponse, () => v()), le(() => r.value, () => M()), le(() => i.value, () => M()), (S, O) => {
|
|
1984
|
+
const w = ee("icon"), J = ee("cl-ui-combo-box", !0);
|
|
1985
|
+
return a(), d("div", null, [
|
|
1986
|
+
s("div", At, [
|
|
1987
|
+
k(fe, {
|
|
1988
|
+
modelValue: n(u),
|
|
1989
|
+
"onUpdate:modelValue": O[0] || (O[0] = (L) => ge(u) ? u.value = L : null),
|
|
1990
|
+
class: z(["!cl-bg-transparent !cl-mr-0 cl-mb-0 cl-rounded-r-none cl-w-full cl-z-10", {
|
|
1991
1991
|
"cl-cursor-pointer": e.disabled === !1
|
|
1992
1992
|
}]),
|
|
1993
1993
|
"input-type": "text",
|
|
1994
|
-
"placeholder-text": o
|
|
1995
|
-
onFocus:
|
|
1996
|
-
|
|
1994
|
+
"placeholder-text": n(o)("comboBox.emptyHintText", { object: e.objectType }),
|
|
1995
|
+
onFocus: O[1] || (O[1] = (L) => {
|
|
1996
|
+
b(!0), S.$emit("focus");
|
|
1997
1997
|
})
|
|
1998
1998
|
}, null, 8, ["modelValue", "class", "placeholder-text"]),
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
1999
|
+
V(s("div", Ot, [
|
|
2000
|
+
s("div", Mt, [
|
|
2001
|
+
_(y(n(o)("comboBox.required")) + " ", 1),
|
|
2002
|
+
k(w, {
|
|
2003
2003
|
class: "cl-ml-1 cl-mt-1",
|
|
2004
2004
|
icon: "ph:warning"
|
|
2005
2005
|
})
|
|
2006
2006
|
])
|
|
2007
2007
|
], 512), [
|
|
2008
|
-
[
|
|
2008
|
+
[H, e.required && e.disabled === !1 && e.currentObject === null]
|
|
2009
2009
|
]),
|
|
2010
|
-
|
|
2011
|
-
class:
|
|
2010
|
+
s("div", {
|
|
2011
|
+
class: z(["cl-border cl-border-grey-1 cl-float-right cl-h-10 cl-px-1 cl-py-2.5 cl-rounded cl-rounded-l-none cl-text-grey-3 cl-transition-colors cl-w-min hover:cl-bg-primary-default hover:cl-text-white", {
|
|
2012
2012
|
"cl-bg-off-white cl-cursor-default hover:cl-bg-off-white hover:cl-text-grey-3": e.disabled,
|
|
2013
2013
|
"cl-cursor-pointer": e.disabled === !1
|
|
2014
2014
|
}]),
|
|
2015
|
-
onClick:
|
|
2015
|
+
onClick: O[2] || (O[2] = (L) => b(!0))
|
|
2016
2016
|
}, [
|
|
2017
|
-
|
|
2017
|
+
k(w, {
|
|
2018
2018
|
icon: "ph:caret-down",
|
|
2019
2019
|
weight: "fill"
|
|
2020
2020
|
})
|
|
2021
2021
|
], 2)
|
|
2022
2022
|
]),
|
|
2023
|
-
|
|
2024
|
-
title:
|
|
2025
|
-
|
|
2023
|
+
k(ll, { size: "x-small" }, {
|
|
2024
|
+
title: Y(() => [
|
|
2025
|
+
_(y(n(o)("comboBox.createTitle", { object: e.objectType })), 1)
|
|
2026
2026
|
]),
|
|
2027
|
-
trigger:
|
|
2028
|
-
|
|
2027
|
+
trigger: Y(({ open: L }) => [
|
|
2028
|
+
V(k(jt, {
|
|
2029
2029
|
"can-create-new-object": e.canCreateNewObject,
|
|
2030
2030
|
"can-clear-selected-object": e.canClearSelectedObject,
|
|
2031
2031
|
loading: e.loading,
|
|
@@ -2033,51 +2033,51 @@ const fe = /* @__PURE__ */ me(ht, [["__scopeId", "data-v-3d1e2503"]]), vt = { cl
|
|
|
2033
2033
|
"object-type": e.objectType,
|
|
2034
2034
|
"object-parent-type": e.objectParentType,
|
|
2035
2035
|
"error-message": e.errorMessage,
|
|
2036
|
-
"current-object-name":
|
|
2036
|
+
"current-object-name": n(u),
|
|
2037
2037
|
"is-visible": c.value,
|
|
2038
|
-
onCreateObject:
|
|
2038
|
+
onCreateObject: L,
|
|
2039
2039
|
onSelectObject: F,
|
|
2040
|
-
onClearObject:
|
|
2041
|
-
onSearch:
|
|
2042
|
-
onHideDropdown:
|
|
2040
|
+
onClearObject: P,
|
|
2041
|
+
onSearch: T,
|
|
2042
|
+
onHideDropdown: O[3] || (O[3] = (I) => b(!1))
|
|
2043
2043
|
}, null, 8, ["can-create-new-object", "can-clear-selected-object", "loading", "results", "object-type", "object-parent-type", "error-message", "current-object-name", "is-visible", "onCreateObject"]), [
|
|
2044
|
-
[
|
|
2044
|
+
[H, c.value]
|
|
2045
2045
|
])
|
|
2046
2046
|
]),
|
|
2047
|
-
footer:
|
|
2048
|
-
|
|
2049
|
-
|
|
2047
|
+
footer: Y(({ close: L }) => [
|
|
2048
|
+
s("div", Nt, [
|
|
2049
|
+
k(we, {
|
|
2050
2050
|
class: "cl-mr-4",
|
|
2051
2051
|
colour: "primary",
|
|
2052
2052
|
size: "small",
|
|
2053
|
-
disabled: !
|
|
2054
|
-
onClick: (
|
|
2055
|
-
X(),
|
|
2053
|
+
disabled: !p.value,
|
|
2054
|
+
onClick: (I) => {
|
|
2055
|
+
X(), L();
|
|
2056
2056
|
}
|
|
2057
2057
|
}, {
|
|
2058
|
-
default:
|
|
2059
|
-
|
|
2058
|
+
default: Y(() => [
|
|
2059
|
+
_(y(n(o)("comboBox.create")), 1)
|
|
2060
2060
|
]),
|
|
2061
2061
|
_: 2
|
|
2062
2062
|
}, 1032, ["disabled", "onClick"]),
|
|
2063
|
-
|
|
2063
|
+
k(we, {
|
|
2064
2064
|
colour: "danger",
|
|
2065
2065
|
size: "small",
|
|
2066
|
-
onClick:
|
|
2066
|
+
onClick: L
|
|
2067
2067
|
}, {
|
|
2068
|
-
default:
|
|
2069
|
-
|
|
2068
|
+
default: Y(() => [
|
|
2069
|
+
_(y(n(o)("comboBox.cancel")), 1)
|
|
2070
2070
|
]),
|
|
2071
2071
|
_: 2
|
|
2072
2072
|
}, 1032, ["onClick"])
|
|
2073
2073
|
])
|
|
2074
2074
|
]),
|
|
2075
|
-
default:
|
|
2076
|
-
|
|
2077
|
-
e.objectParentType ? (
|
|
2075
|
+
default: Y(() => [
|
|
2076
|
+
s("div", It, [
|
|
2077
|
+
e.objectParentType ? (a(), K(J, {
|
|
2078
2078
|
key: 0,
|
|
2079
|
-
"current-object":
|
|
2080
|
-
"onUpdate:current-object":
|
|
2079
|
+
"current-object": i.value,
|
|
2080
|
+
"onUpdate:current-object": O[4] || (O[4] = (L) => i.value = L),
|
|
2081
2081
|
class: "cl-mt-3",
|
|
2082
2082
|
results: e.parentResults,
|
|
2083
2083
|
loading: e.loading,
|
|
@@ -2086,13 +2086,13 @@ const fe = /* @__PURE__ */ me(ht, [["__scopeId", "data-v-3d1e2503"]]), vt = { cl
|
|
|
2086
2086
|
"can-create-new-object": e.canCreateNewObject,
|
|
2087
2087
|
"can-clear-selected-object": e.canClearSelectedObject,
|
|
2088
2088
|
"error-message": e.errorMessage,
|
|
2089
|
-
onSearch:
|
|
2090
|
-
onCreateObject:
|
|
2091
|
-
}, null, 8, ["current-object", "results", "loading", "object-type", "object-created-response", "can-create-new-object", "can-clear-selected-object", "error-message"])) :
|
|
2092
|
-
|
|
2089
|
+
onSearch: C,
|
|
2090
|
+
onCreateObject: E
|
|
2091
|
+
}, null, 8, ["current-object", "results", "loading", "object-type", "object-created-response", "can-create-new-object", "can-clear-selected-object", "error-message"])) : N("", !0),
|
|
2092
|
+
k(fe, {
|
|
2093
2093
|
modelValue: r.value,
|
|
2094
|
-
"onUpdate:modelValue":
|
|
2095
|
-
label: o
|
|
2094
|
+
"onUpdate:modelValue": O[5] || (O[5] = (L) => r.value = L),
|
|
2095
|
+
label: n(o)("comboBox.createProperty"),
|
|
2096
2096
|
class: "cl-mb-2 cl-pt-2 cl-w-full",
|
|
2097
2097
|
"input-type": "text"
|
|
2098
2098
|
}, null, 8, ["modelValue", "label"])
|
|
@@ -2116,23 +2116,23 @@ const Ut = {}, zt = { class: "cl-flex cl-flex-wrap cl-left-0 cl-mt-4 cl-w-full"
|
|
|
2116
2116
|
}, Lt = {
|
|
2117
2117
|
key: 1,
|
|
2118
2118
|
class: "cl-leading-10 cl-text-sm cl-w-full"
|
|
2119
|
-
}, Pt = { class: "cl-float-left" },
|
|
2120
|
-
function
|
|
2121
|
-
return
|
|
2122
|
-
e.$slots.default ? (
|
|
2123
|
-
|
|
2124
|
-
])) :
|
|
2125
|
-
e.$slots.left || e.$slots.right ? (
|
|
2126
|
-
|
|
2127
|
-
|
|
2119
|
+
}, Pt = { class: "cl-float-left" }, Vt = { class: "cl-float-right" };
|
|
2120
|
+
function Ft(e, t) {
|
|
2121
|
+
return a(), d("div", zt, [
|
|
2122
|
+
e.$slots.default ? (a(), d("div", Bt, [
|
|
2123
|
+
R(e.$slots, "default")
|
|
2124
|
+
])) : N("", !0),
|
|
2125
|
+
e.$slots.left || e.$slots.right ? (a(), d("div", Lt, [
|
|
2126
|
+
s("span", Pt, [
|
|
2127
|
+
R(e.$slots, "left")
|
|
2128
2128
|
]),
|
|
2129
|
-
|
|
2130
|
-
|
|
2129
|
+
s("span", Vt, [
|
|
2130
|
+
R(e.$slots, "right")
|
|
2131
2131
|
])
|
|
2132
|
-
])) :
|
|
2132
|
+
])) : N("", !0)
|
|
2133
2133
|
]);
|
|
2134
2134
|
}
|
|
2135
|
-
const Ht = /* @__PURE__ */ me(Ut, [["render",
|
|
2135
|
+
const Ht = /* @__PURE__ */ me(Ut, [["render", Ft]]), Gt = { class: "cl-mr-2 lg:cl-hidden" }, Wt = { class: "cl-mr-2 lg:cl-hidden" }, Jt = {
|
|
2136
2136
|
key: 0,
|
|
2137
2137
|
class: "cl-inline-block cl-whitespace-nowrap"
|
|
2138
2138
|
}, Kt = {
|
|
@@ -2140,7 +2140,7 @@ const Ht = /* @__PURE__ */ me(Ut, [["render", Vt]]), Gt = { class: "cl-mr-2 lg:c
|
|
|
2140
2140
|
class: "cl-inline-block cl-whitespace-nowrap"
|
|
2141
2141
|
}, Zt = {
|
|
2142
2142
|
inheritAttrs: !1
|
|
2143
|
-
}, Qt = /* @__PURE__ */
|
|
2143
|
+
}, Qt = /* @__PURE__ */ G({
|
|
2144
2144
|
...Zt,
|
|
2145
2145
|
__name: "cl-ui-grid-cell",
|
|
2146
2146
|
props: {
|
|
@@ -2154,66 +2154,66 @@ const Ht = /* @__PURE__ */ me(Ut, [["render", Vt]]), Gt = { class: "cl-mr-2 lg:c
|
|
|
2154
2154
|
"undo-edit": null
|
|
2155
2155
|
},
|
|
2156
2156
|
setup(e, { emit: t }) {
|
|
2157
|
-
const l = e, { d:
|
|
2158
|
-
var
|
|
2159
|
-
return
|
|
2157
|
+
const l = e, { d: o, n: c } = se(), f = q(be(l.record)), i = A(() => {
|
|
2158
|
+
var p, b;
|
|
2159
|
+
return f.value[(p = l.column.field) != null ? p : ""] !== l.record[(b = l.column.field) != null ? b : ""];
|
|
2160
2160
|
});
|
|
2161
|
-
function
|
|
2162
|
-
return
|
|
2161
|
+
function u(p, b) {
|
|
2162
|
+
return p[b];
|
|
2163
2163
|
}
|
|
2164
|
-
function r(
|
|
2165
|
-
return
|
|
2164
|
+
function r(p, b) {
|
|
2165
|
+
return p[b];
|
|
2166
2166
|
}
|
|
2167
|
-
function
|
|
2168
|
-
return
|
|
2167
|
+
function m(p, b) {
|
|
2168
|
+
return p[b];
|
|
2169
2169
|
}
|
|
2170
|
-
function
|
|
2170
|
+
function g() {
|
|
2171
2171
|
t("focus");
|
|
2172
2172
|
}
|
|
2173
|
-
return al(() =>
|
|
2174
|
-
var
|
|
2175
|
-
const
|
|
2176
|
-
|
|
2173
|
+
return al(() => f.value = be(l.record)), le(f, (p) => {
|
|
2174
|
+
var T;
|
|
2175
|
+
const b = (T = l.column.field) != null ? T : "";
|
|
2176
|
+
b !== "" && (p[b] !== l.record[b] ? t("edit", p[b]) : t("undo-edit"));
|
|
2177
2177
|
}, {
|
|
2178
2178
|
deep: !0
|
|
2179
|
-
}), (
|
|
2179
|
+
}), (p, b) => e.editMode && e.column.field && e.column.editable ? (a(), d("td", de({ key: 0 }, p.$attrs, {
|
|
2180
2180
|
class: ["cl-transition-colours", {
|
|
2181
|
-
"cl-bg-link-lighter":
|
|
2181
|
+
"cl-bg-link-lighter": n(i)
|
|
2182
2182
|
}]
|
|
2183
2183
|
}), [
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
cellFocused:
|
|
2184
|
+
s("strong", Gt, y(e.column.caption), 1),
|
|
2185
|
+
R(p.$slots, `${e.column.name}Edit`, ie(ve({
|
|
2186
|
+
cellFocused: g,
|
|
2187
2187
|
column: e.column,
|
|
2188
|
-
edited:
|
|
2189
|
-
record:
|
|
2188
|
+
edited: n(i),
|
|
2189
|
+
record: f.value
|
|
2190
2190
|
})))
|
|
2191
|
-
], 16)) : (
|
|
2192
|
-
|
|
2193
|
-
e.column.type === "slot" ?
|
|
2191
|
+
], 16)) : (a(), d("td", ie(de({ key: 1 }, p.$attrs)), [
|
|
2192
|
+
s("strong", Wt, y(e.column.caption), 1),
|
|
2193
|
+
e.column.type === "slot" ? R(p.$slots, e.column.name, ie(de({ key: 0 }, { column: e.column, record: e.record }))) : e.column.type === "boolean" && e.column.field !== void 0 ? (a(), K(fe, {
|
|
2194
2194
|
key: 1,
|
|
2195
2195
|
"input-type": "checkbox",
|
|
2196
|
-
"model-value":
|
|
2196
|
+
"model-value": m(e.record, e.column.field),
|
|
2197
2197
|
disabled: !0
|
|
2198
|
-
}, null, 8, ["model-value"])) : (e.column.type === "date" || e.column.type === "datetime") && e.column.field !== void 0 ? (
|
|
2199
|
-
e.column.format !== void 0 ? (
|
|
2200
|
-
|
|
2201
|
-
], 64)) : e.column.type === "date" ? (
|
|
2202
|
-
|
|
2203
|
-
], 64)) : (
|
|
2204
|
-
|
|
2198
|
+
}, null, 8, ["model-value"])) : (e.column.type === "date" || e.column.type === "datetime") && e.column.field !== void 0 ? (a(), d(B, { key: 2 }, [
|
|
2199
|
+
e.column.format !== void 0 ? (a(), d(B, { key: 0 }, [
|
|
2200
|
+
_(y(n(o)(new Date(u(e.record, e.column.field)), e.column.format)), 1)
|
|
2201
|
+
], 64)) : e.column.type === "date" ? (a(), d(B, { key: 1 }, [
|
|
2202
|
+
_(y(n(o)(new Date(u(e.record, e.column.field)), n(Q).DATE)), 1)
|
|
2203
|
+
], 64)) : (a(), d(B, { key: 2 }, [
|
|
2204
|
+
_(y(n(o)(new Date(u(e.record, e.column.field)), n(Q).DATETIME)), 1)
|
|
2205
2205
|
], 64))
|
|
2206
|
-
], 64)) : e.column.type === "number" && e.column.field ? (
|
|
2207
|
-
e.column.format ===
|
|
2208
|
-
|
|
2209
|
-
], 64)) : e.column.format !== void 0 ? (
|
|
2210
|
-
|
|
2211
|
-
], 64)) : (
|
|
2212
|
-
|
|
2206
|
+
], 64)) : e.column.type === "number" && e.column.field ? (a(), d(B, { key: 3 }, [
|
|
2207
|
+
e.column.format === n(ne).MULTIPLIER ? (a(), d(B, { key: 0 }, [
|
|
2208
|
+
_(" \xD7" + y(r(e.record, e.column.field)), 1)
|
|
2209
|
+
], 64)) : e.column.format !== void 0 ? (a(), d(B, { key: 1 }, [
|
|
2210
|
+
_(y(n(c)(r(e.record, e.column.field), e.column.format)), 1)
|
|
2211
|
+
], 64)) : (a(), d(B, { key: 2 }, [
|
|
2212
|
+
_(y(r(e.record, e.column.field)), 1)
|
|
2213
2213
|
], 64))
|
|
2214
|
-
], 64)) : e.column.field !== void 0 ? (
|
|
2215
|
-
e.column.maxLength !== void 0 ? (
|
|
2216
|
-
], 64)) :
|
|
2214
|
+
], 64)) : e.column.field !== void 0 ? (a(), d(B, { key: 4 }, [
|
|
2215
|
+
e.column.maxLength !== void 0 ? (a(), d("span", Jt, y(u(e.record, e.column.field).trimToLength(e.column.maxLength, e.column.format !== void 0 ? e.column.format === "ellipsis" : !1)), 1)) : (a(), d("span", Kt, y(u(e.record, e.column.field)), 1))
|
|
2216
|
+
], 64)) : N("", !0)
|
|
2217
2217
|
], 16));
|
|
2218
2218
|
}
|
|
2219
2219
|
}), Yt = [
|
|
@@ -2272,8 +2272,8 @@ function nn(e) {
|
|
|
2272
2272
|
function on(e, t) {
|
|
2273
2273
|
let l = typeof e.results == "object" && Array.isArray(e.results) && typeof e.totalRecords == "number";
|
|
2274
2274
|
if (l) {
|
|
2275
|
-
for (const
|
|
2276
|
-
if (!t(
|
|
2275
|
+
for (const o of e.results)
|
|
2276
|
+
if (!t(o)) {
|
|
2277
2277
|
l = !1;
|
|
2278
2278
|
break;
|
|
2279
2279
|
}
|
|
@@ -2370,10 +2370,10 @@ const cn = {
|
|
|
2370
2370
|
], rn = {
|
|
2371
2371
|
key: 0,
|
|
2372
2372
|
class: "cl-border-grey-2 cl-border-r cl-capitalize cl-group cl-inline cl-relative cl-w-auto"
|
|
2373
|
-
}, un = { class: "cl-bg-off-white cl-flex cl-h-full cl-items-center cl-justify-center cl-w-10" }, dn = { class: "cl-p-3" }, fn = { class: "cl-px-4 cl-py-1 cl-w-full" }, mn = ["innerHTML"], gn = { class: "cl-p-3" }, bn = ["onClick"], hn = ["innerHTML"], vn = /* @__PURE__ */
|
|
2373
|
+
}, un = { class: "cl-bg-off-white cl-flex cl-h-full cl-items-center cl-justify-center cl-w-10" }, dn = { class: "cl-p-3" }, fn = { class: "cl-px-4 cl-py-1 cl-w-full" }, mn = ["innerHTML"], gn = { class: "cl-p-3" }, bn = ["onClick"], hn = ["innerHTML"], vn = /* @__PURE__ */ s("option", { value: void 0 }, null, -1), pn = ["selected"], yn = ["selected"], wn = {
|
|
2374
2374
|
key: 1,
|
|
2375
2375
|
class: "cl-flex cl-w-full"
|
|
2376
|
-
}, Qe = /* @__PURE__ */
|
|
2376
|
+
}, Qe = /* @__PURE__ */ G({
|
|
2377
2377
|
__name: "cl-ui-grid-filter",
|
|
2378
2378
|
props: {
|
|
2379
2379
|
request: null,
|
|
@@ -2384,159 +2384,159 @@ const cn = {
|
|
|
2384
2384
|
"update:request": null
|
|
2385
2385
|
},
|
|
2386
2386
|
setup(e, { emit: t }) {
|
|
2387
|
-
const l = e, { locale:
|
|
2388
|
-
const
|
|
2389
|
-
return
|
|
2390
|
-
|
|
2391
|
-
}),
|
|
2392
|
-
}),
|
|
2393
|
-
var
|
|
2394
|
-
let
|
|
2395
|
-
return typeof
|
|
2396
|
-
var
|
|
2397
|
-
return
|
|
2387
|
+
const l = e, { locale: o, t: c } = se(), { debounce: f } = Pe(750), i = A(() => {
|
|
2388
|
+
const E = C();
|
|
2389
|
+
return E.forEach((j) => {
|
|
2390
|
+
j.description = c(`grid.${j.method}`);
|
|
2391
|
+
}), E;
|
|
2392
|
+
}), u = A(() => {
|
|
2393
|
+
var j;
|
|
2394
|
+
let E = (j = l.request.filters.find((v) => v.filterOnColumn === l.column.field)) == null ? void 0 : j.filterMethod;
|
|
2395
|
+
return typeof E > "u" && (E = ye[T()]), i.value.find((v) => {
|
|
2396
|
+
var h;
|
|
2397
|
+
return v.method.toLowerCase() === ((h = E == null ? void 0 : E.removeNonAlphanumeric()) == null ? void 0 : h.toLowerCase());
|
|
2398
2398
|
});
|
|
2399
2399
|
}), r = A(() => {
|
|
2400
|
-
var
|
|
2401
|
-
return (
|
|
2402
|
-
}),
|
|
2403
|
-
let
|
|
2404
|
-
return l.column.slotType === "date" || l.column.type === "date" ?
|
|
2400
|
+
var E, j;
|
|
2401
|
+
return (j = (E = l.request.filters.find((v) => v.filterOnColumn === l.column.field)) == null ? void 0 : E.filterValue) != null ? j : "";
|
|
2402
|
+
}), m = A(() => r.value !== "" ? new Date(r.value) : null), g = q(r.value), p = A(() => Intl.NumberFormat(o.value).format(1.1).replace(/[0-9]+/g, "")), b = A(() => {
|
|
2403
|
+
let E = "text";
|
|
2404
|
+
return l.column.slotType === "date" || l.column.type === "date" ? E = "date" : (l.column.slotType === "datetime" || l.column.type === "datetime") && (E = "datetime"), E;
|
|
2405
2405
|
});
|
|
2406
|
-
function
|
|
2406
|
+
function T() {
|
|
2407
2407
|
return l.column.type === "string" || l.column.slotType === "string" ? ye.CONTAINS : l.column.type === "datetime" || l.column.slotType === "datetime" ? ye.LESS_THAN : ye.EQUAL;
|
|
2408
2408
|
}
|
|
2409
|
-
function
|
|
2410
|
-
let
|
|
2411
|
-
return l.column.type !== "slot" ?
|
|
2409
|
+
function C() {
|
|
2410
|
+
let E = [];
|
|
2411
|
+
return l.column.type !== "slot" ? E = Ze.filter((j) => j.allowedTypes.includes(l.column.type)) : typeof l.column.slotType < "u" && typeof l.column.field < "u" && (E = Ze.filter((j) => j.allowedTypes.includes(l.column.slotType))), E;
|
|
2412
2412
|
}
|
|
2413
|
-
function
|
|
2414
|
-
const
|
|
2415
|
-
|
|
2413
|
+
function P(E) {
|
|
2414
|
+
const j = be(l.request), v = j.filters.findIndex((h) => h.filterOnColumn === l.column.field);
|
|
2415
|
+
v >= 0 ? (j.filters[v].filterOperation = ye[E.toUpperCase()], j.filters[v].filterMethod = E.toUpperCase()) : typeof l.column.field < "u" && j.filters.push({
|
|
2416
2416
|
filterOnColumn: l.column.field,
|
|
2417
|
-
filterMethod:
|
|
2418
|
-
filterOperation: ye[
|
|
2417
|
+
filterMethod: E.toUpperCase(),
|
|
2418
|
+
filterOperation: ye[E.toUpperCase()],
|
|
2419
2419
|
filterValue: ""
|
|
2420
|
-
}), t("update:request",
|
|
2421
|
-
}
|
|
2422
|
-
function F(
|
|
2423
|
-
var
|
|
2424
|
-
const
|
|
2425
|
-
let
|
|
2426
|
-
if (
|
|
2427
|
-
|
|
2428
|
-
else if (
|
|
2429
|
-
const
|
|
2430
|
-
|
|
2420
|
+
}), t("update:request", j);
|
|
2421
|
+
}
|
|
2422
|
+
function F(E, j) {
|
|
2423
|
+
var S;
|
|
2424
|
+
const v = ((S = E == null ? void 0 : E.value) != null ? S : j).trim(), h = be(l.request), $ = h.filters.findIndex((O) => O.filterOnColumn === l.column.field);
|
|
2425
|
+
let M = !1;
|
|
2426
|
+
if (h.pageNumber = 1, $ >= 0)
|
|
2427
|
+
M = h.filters[$].filterValue === v, h.filters[$].filterValue = v;
|
|
2428
|
+
else if (v !== "" && typeof l.column.field < "u") {
|
|
2429
|
+
const O = T();
|
|
2430
|
+
h.filters.push({
|
|
2431
2431
|
filterOnColumn: l.column.field,
|
|
2432
|
-
filterMethod: ye[
|
|
2433
|
-
filterOperation:
|
|
2434
|
-
filterValue:
|
|
2432
|
+
filterMethod: ye[O],
|
|
2433
|
+
filterOperation: O,
|
|
2434
|
+
filterValue: v
|
|
2435
2435
|
});
|
|
2436
2436
|
}
|
|
2437
|
-
|
|
2437
|
+
M === !1 && t("update:request", h);
|
|
2438
2438
|
}
|
|
2439
|
-
function
|
|
2440
|
-
var
|
|
2441
|
-
let
|
|
2442
|
-
l.column.format ===
|
|
2439
|
+
function U(E) {
|
|
2440
|
+
var h, $;
|
|
2441
|
+
let j = ($ = (h = E == null ? void 0 : E.value) == null ? void 0 : h.replace(new RegExp(`[^0-9\\${p.value}]`, "g"), "")) != null ? $ : "", v = "";
|
|
2442
|
+
l.column.format === ne.INTEGER ? v = parseInt(j) : (j = j.replace(p.value, "."), v = parseFloat(j)), typeof v == "number" && isNaN(v) && (v = ""), F(null, v.toString());
|
|
2443
2443
|
}
|
|
2444
|
-
function X(
|
|
2445
|
-
var
|
|
2446
|
-
F(null, (
|
|
2444
|
+
function X(E) {
|
|
2445
|
+
var j;
|
|
2446
|
+
F(null, (j = E == null ? void 0 : E.toISOString()) != null ? j : "");
|
|
2447
2447
|
}
|
|
2448
|
-
return (
|
|
2449
|
-
var
|
|
2450
|
-
const
|
|
2451
|
-
return e.column.filterable === void 0 || e.column.filterable === !0 ? (
|
|
2448
|
+
return (E, j) => {
|
|
2449
|
+
var h, $;
|
|
2450
|
+
const v = ee("icon");
|
|
2451
|
+
return e.column.filterable === void 0 || e.column.filterable === !0 ? (a(), d("div", {
|
|
2452
2452
|
key: 0,
|
|
2453
|
-
class:
|
|
2453
|
+
class: z(["cl-border-grey-2 cl-flex cl-h-[2.6rem] cl-rounded cl-w-full", {
|
|
2454
2454
|
"cl-border-b cl-p-5": e.column.type === "slot" && (e.column.slotType === void 0 || e.column.field === void 0),
|
|
2455
2455
|
"cl-border": e.column.type !== "slot" || e.column.slotType !== void 0 && e.column.field !== void 0
|
|
2456
2456
|
}])
|
|
2457
2457
|
}, [
|
|
2458
|
-
e.column.type !== "slot" || e.column.slotType !== void 0 && e.column.field !== void 0 ? (
|
|
2459
|
-
|
|
2460
|
-
|
|
2458
|
+
e.column.type !== "slot" || e.column.slotType !== void 0 && e.column.field !== void 0 ? (a(), d("div", rn, [
|
|
2459
|
+
s("div", un, [
|
|
2460
|
+
k(v, {
|
|
2461
2461
|
icon: "ph:sliders-horizontal",
|
|
2462
2462
|
size: 20
|
|
2463
2463
|
})
|
|
2464
2464
|
]),
|
|
2465
|
-
|
|
2466
|
-
class:
|
|
2465
|
+
s("div", {
|
|
2466
|
+
class: z(["cl-absolute cl-bg-white cl-flex-wrap cl-font-normal cl-h-0 cl-hidden cl-pb-2 cl-shadow-lg cl-text-left cl-text-sm cl-top-10 cl-z-10 group-hover:cl-flex group-hover:cl-h-auto group-hover:cl-w-52", {
|
|
2467
2467
|
"cl-left-0": e.firstHalf,
|
|
2468
2468
|
"cl--left-44": !e.firstHalf
|
|
2469
2469
|
}])
|
|
2470
2470
|
}, [
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2471
|
+
s("strong", dn, y(n(c)("grid.currentMethod")), 1),
|
|
2472
|
+
s("span", fn, [
|
|
2473
|
+
_(y((h = n(u)) == null ? void 0 : h.description) + " ", 1),
|
|
2474
|
+
s("span", {
|
|
2475
2475
|
class: "cl-float-right",
|
|
2476
|
-
innerHTML: (
|
|
2476
|
+
innerHTML: ($ = n(u)) == null ? void 0 : $.icon
|
|
2477
2477
|
}, null, 8, mn)
|
|
2478
2478
|
]),
|
|
2479
|
-
|
|
2480
|
-
(
|
|
2481
|
-
key:
|
|
2479
|
+
s("strong", gn, y(n(c)("grid.availableMethods")), 1),
|
|
2480
|
+
(a(!0), d(B, null, ce(n(i), (M, S) => (a(), d("span", {
|
|
2481
|
+
key: S,
|
|
2482
2482
|
class: "cl-cursor-pointer cl-px-4 cl-py-1 cl-transition-colors cl-w-full hover:cl-bg-off-white",
|
|
2483
|
-
onClick:
|
|
2483
|
+
onClick: ae((O) => P(M.method), ["prevent"])
|
|
2484
2484
|
}, [
|
|
2485
|
-
|
|
2486
|
-
|
|
2485
|
+
_(y(M.description) + " ", 1),
|
|
2486
|
+
s("span", {
|
|
2487
2487
|
class: "cl-float-right",
|
|
2488
|
-
innerHTML:
|
|
2488
|
+
innerHTML: M.icon
|
|
2489
2489
|
}, null, 8, hn)
|
|
2490
2490
|
], 8, bn))), 128))
|
|
2491
2491
|
], 2)
|
|
2492
|
-
])) :
|
|
2493
|
-
e.column.type === "boolean" || e.column.slotType === "boolean" && typeof e.column.field < "u" ? (
|
|
2492
|
+
])) : N("", !0),
|
|
2493
|
+
e.column.type === "boolean" || e.column.slotType === "boolean" && typeof e.column.field < "u" ? (a(), d("select", {
|
|
2494
2494
|
key: 1,
|
|
2495
2495
|
class: "cl-border-none cl-w-full",
|
|
2496
|
-
onChange:
|
|
2496
|
+
onChange: j[0] || (j[0] = (M) => F(M.target))
|
|
2497
2497
|
}, [
|
|
2498
2498
|
vn,
|
|
2499
|
-
|
|
2499
|
+
s("option", {
|
|
2500
2500
|
value: "true",
|
|
2501
|
-
selected:
|
|
2502
|
-
},
|
|
2503
|
-
|
|
2501
|
+
selected: n(r) === "true"
|
|
2502
|
+
}, y(n(c)("grid.true")), 9, pn),
|
|
2503
|
+
s("option", {
|
|
2504
2504
|
value: "false",
|
|
2505
|
-
selected:
|
|
2506
|
-
},
|
|
2507
|
-
], 32)) : e.column.type === "date" || e.column.type === "datetime" || (e.column.slotType === "date" || e.column.slotType === "datetime") && typeof e.column.field < "u" ? (
|
|
2505
|
+
selected: n(r) === "false"
|
|
2506
|
+
}, y(n(c)("grid.false")), 9, yn)
|
|
2507
|
+
], 32)) : e.column.type === "date" || e.column.type === "datetime" || (e.column.slotType === "date" || e.column.slotType === "datetime") && typeof e.column.field < "u" ? (a(), K(fe, {
|
|
2508
2508
|
key: 2,
|
|
2509
|
-
"model-value":
|
|
2509
|
+
"model-value": n(m),
|
|
2510
2510
|
class: "!cl-border-none !cl-mb-0 !cl-mr-0 cl-w-full",
|
|
2511
2511
|
min: "1900-01-01",
|
|
2512
2512
|
max: "2999-12-31T23:59",
|
|
2513
2513
|
label: e.column.name,
|
|
2514
2514
|
"show-label": !1,
|
|
2515
|
-
"input-type":
|
|
2516
|
-
"onUpdate:modelValue":
|
|
2517
|
-
}, null, 8, ["model-value", "label", "input-type"])) : e.column.type === "number" || e.column.slotType === "number" && typeof e.column.field < "u" ? (
|
|
2515
|
+
"input-type": n(b),
|
|
2516
|
+
"onUpdate:modelValue": j[1] || (j[1] = (M) => X(M))
|
|
2517
|
+
}, null, 8, ["model-value", "label", "input-type"])) : e.column.type === "number" || e.column.slotType === "number" && typeof e.column.field < "u" ? (a(), K(fe, {
|
|
2518
2518
|
key: 3,
|
|
2519
|
-
modelValue:
|
|
2520
|
-
"onUpdate:modelValue":
|
|
2519
|
+
modelValue: g.value,
|
|
2520
|
+
"onUpdate:modelValue": j[2] || (j[2] = (M) => g.value = M),
|
|
2521
2521
|
class: "cl-border-none cl-mb-0 cl-w-full",
|
|
2522
2522
|
"input-type": "number",
|
|
2523
2523
|
"show-arrows": !1,
|
|
2524
|
-
onInput:
|
|
2525
|
-
}, null, 8, ["modelValue"])) : e.column.type !== "slot" || e.column.slotType === "string" && typeof e.column.field < "u" ? (
|
|
2524
|
+
onInput: j[3] || (j[3] = (M) => n(f)(U, M.target))
|
|
2525
|
+
}, null, 8, ["modelValue"])) : e.column.type !== "slot" || e.column.slotType === "string" && typeof e.column.field < "u" ? (a(), K(fe, {
|
|
2526
2526
|
key: 4,
|
|
2527
|
-
modelValue:
|
|
2528
|
-
"onUpdate:modelValue":
|
|
2527
|
+
modelValue: g.value,
|
|
2528
|
+
"onUpdate:modelValue": j[4] || (j[4] = (M) => g.value = M),
|
|
2529
2529
|
class: "cl-border-none cl-mb-0 cl-w-full",
|
|
2530
2530
|
"input-type": "text",
|
|
2531
|
-
onInput:
|
|
2532
|
-
}, null, 8, ["modelValue"])) :
|
|
2533
|
-
], 2)) : (
|
|
2531
|
+
onInput: j[5] || (j[5] = (M) => n(f)(F, M.target))
|
|
2532
|
+
}, null, 8, ["modelValue"])) : N("", !0)
|
|
2533
|
+
], 2)) : (a(), d("div", wn, " \xA0 "));
|
|
2534
2534
|
};
|
|
2535
2535
|
}
|
|
2536
2536
|
}), xn = {
|
|
2537
2537
|
key: 0,
|
|
2538
2538
|
class: "cl-flex cl-flex-wrap cl-justify-end cl-mt-4 cl-w-full"
|
|
2539
|
-
}, $n = { class: "cl-bg-off-white cl-border cl-border-grey-0 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" }, kn = { class: "cl-text-grey-3 cl-w-max" }, Tn = { class: "cl-bg-off-white cl-border cl-border-grey-0 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" }, Cn = { 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" }, Sn = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" },
|
|
2539
|
+
}, $n = { class: "cl-bg-off-white cl-border cl-border-grey-0 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" }, kn = { class: "cl-text-grey-3 cl-w-max" }, Tn = { class: "cl-bg-off-white cl-border cl-border-grey-0 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" }, Cn = { 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" }, Sn = { class: "cl-flex cl-flex-wrap cl-mb-2 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, En = { class: "cl-text-grey-3 cl-w-full lg:cl-mr-2 lg:cl-w-auto" }, jn = { class: "cl-flex cl-flex-wrap cl-text-sm mb:cl-flex-nowrap" }, An = { class: "cl-pr-2" }, On = ["onClick"], Mn = { 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" }, In = { class: "cl-mb-2 cl-text-grey-3 cl-w-full lg:cl-mb-0 lg:cl-mr-2 lg:cl-w-auto" }, Nn = ["onClick"], qn = { class: "cl-mb-2 cl-w-full lg:cl-p-2 md:cl-mb-0 md:cl-w-auto" }, Dn = { 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" }, Rn = { class: "cl-block lg:cl-inline-block" }, Un = /* @__PURE__ */ G({
|
|
2540
2540
|
__name: "cl-ui-grid-footer",
|
|
2541
2541
|
props: {
|
|
2542
2542
|
request: null,
|
|
@@ -2546,137 +2546,137 @@ const cn = {
|
|
|
2546
2546
|
"update:request": null
|
|
2547
2547
|
},
|
|
2548
2548
|
setup(e, { emit: t }) {
|
|
2549
|
-
const l = e,
|
|
2549
|
+
const l = e, o = [
|
|
2550
2550
|
10,
|
|
2551
2551
|
20,
|
|
2552
2552
|
50,
|
|
2553
2553
|
100,
|
|
2554
2554
|
200
|
|
2555
|
-
], { n: c, t:
|
|
2556
|
-
var
|
|
2557
|
-
return l.data !== null ? Math.ceil(((
|
|
2558
|
-
}),
|
|
2559
|
-
const
|
|
2560
|
-
let
|
|
2561
|
-
if (
|
|
2562
|
-
const
|
|
2563
|
-
|
|
2555
|
+
], { n: c, t: f } = se(), { debounce: i } = Pe(), u = q(l.request.pageNumber), r = A(() => {
|
|
2556
|
+
var T, C;
|
|
2557
|
+
return l.data !== null ? Math.ceil(((C = (T = l.data) == null ? void 0 : T.totalRecords) != null ? C : 0) / l.request.pageSize) : 1;
|
|
2558
|
+
}), m = A(() => {
|
|
2559
|
+
const T = Array.from(Array(r.value + 1).keys());
|
|
2560
|
+
let C = [];
|
|
2561
|
+
if (T.shift(), T.length) {
|
|
2562
|
+
const P = l.request.pageNumber === r.value || l.request.pageNumber === r.value - 1 ? r.value - 3 : l.request.pageNumber - 1, F = P + 3;
|
|
2563
|
+
C = T.slice(P, F);
|
|
2564
2564
|
}
|
|
2565
|
-
return
|
|
2565
|
+
return C;
|
|
2566
2566
|
});
|
|
2567
|
-
function
|
|
2568
|
-
const
|
|
2569
|
-
|
|
2567
|
+
function g(T) {
|
|
2568
|
+
const C = be(l.request);
|
|
2569
|
+
C.pageNumber !== T && (C.pageNumber = Math.max(Math.min(Math.trunc(T), r.value), 1), t("update:request", C));
|
|
2570
2570
|
}
|
|
2571
|
-
function
|
|
2572
|
-
const
|
|
2573
|
-
|
|
2571
|
+
function p(T) {
|
|
2572
|
+
const C = parseInt(T == null ? void 0 : T.value) || 1;
|
|
2573
|
+
g(C);
|
|
2574
2574
|
}
|
|
2575
|
-
function
|
|
2576
|
-
const
|
|
2577
|
-
|
|
2575
|
+
function b(T) {
|
|
2576
|
+
const C = be(l.request);
|
|
2577
|
+
C.pageSize = T, C.pageNumber = 1, t("update:request", C);
|
|
2578
2578
|
}
|
|
2579
|
-
return
|
|
2579
|
+
return le(() => l.request.pageNumber, () => u.value = l.request.pageNumber), (T, C) => {
|
|
2580
2580
|
var F;
|
|
2581
|
-
const
|
|
2582
|
-
return e.data && ((F = e.data.results) == null ? void 0 : F.length) && e.request ? (
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
modelValue:
|
|
2587
|
-
"onUpdate:modelValue":
|
|
2581
|
+
const P = ee("icon");
|
|
2582
|
+
return e.data && ((F = e.data.results) == null ? void 0 : F.length) && e.request ? (a(), d("div", xn, [
|
|
2583
|
+
s("div", $n, [
|
|
2584
|
+
s("span", kn, y(n(f)("grid.jumpToPage")), 1),
|
|
2585
|
+
k(fe, {
|
|
2586
|
+
modelValue: u.value,
|
|
2587
|
+
"onUpdate:modelValue": C[0] || (C[0] = (U) => u.value = U),
|
|
2588
2588
|
class: "cl-ml-1 cl-mt-0.5 cl-text-sm",
|
|
2589
2589
|
"input-type": "number",
|
|
2590
2590
|
label: "Page",
|
|
2591
2591
|
"show-label": !1,
|
|
2592
2592
|
min: "1",
|
|
2593
|
-
max:
|
|
2594
|
-
onInput:
|
|
2593
|
+
max: n(r),
|
|
2594
|
+
onInput: C[1] || (C[1] = (U) => n(i)(p, U.target))
|
|
2595
2595
|
}, null, 8, ["modelValue", "max"])
|
|
2596
2596
|
]),
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2597
|
+
s("div", Tn, [
|
|
2598
|
+
s("div", Cn, [
|
|
2599
|
+
s("li", Sn, [
|
|
2600
|
+
s("span", En, y(n(f)("grid.page")), 1)
|
|
2601
2601
|
]),
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2602
|
+
s("ul", jn, [
|
|
2603
|
+
s("li", An, y(n(c)(e.request.pageNumber, n(ne).INTEGER)) + " / " + y(n(c)(n(r), n(ne).INTEGER)), 1),
|
|
2604
|
+
V(s("li", {
|
|
2605
2605
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2606
|
-
onClick:
|
|
2606
|
+
onClick: C[2] || (C[2] = (U) => g(1))
|
|
2607
2607
|
}, [
|
|
2608
|
-
|
|
2608
|
+
k(P, {
|
|
2609
2609
|
icon: "ph:caret-double-left",
|
|
2610
2610
|
size: 14
|
|
2611
2611
|
})
|
|
2612
2612
|
], 512), [
|
|
2613
|
-
[
|
|
2613
|
+
[H, e.request.pageNumber > 1]
|
|
2614
2614
|
]),
|
|
2615
|
-
|
|
2615
|
+
V(s("li", {
|
|
2616
2616
|
class: "cl-cursor-pointer cl-mt-1 lg:cl-mr-2 mr-1",
|
|
2617
|
-
onClick:
|
|
2617
|
+
onClick: C[3] || (C[3] = (U) => g(e.request.pageNumber - 1))
|
|
2618
2618
|
}, [
|
|
2619
|
-
|
|
2619
|
+
k(P, {
|
|
2620
2620
|
icon: "ph:caret-left",
|
|
2621
2621
|
size: 14
|
|
2622
2622
|
})
|
|
2623
2623
|
], 512), [
|
|
2624
|
-
[
|
|
2624
|
+
[H, e.request.pageNumber > 1]
|
|
2625
2625
|
]),
|
|
2626
|
-
(
|
|
2626
|
+
(a(!0), d(B, null, ce(n(m), (U, X) => (a(), d("li", {
|
|
2627
2627
|
key: X,
|
|
2628
|
-
class:
|
|
2629
|
-
"cl-text-black cl-font-bold": e.request.pageNumber ===
|
|
2630
|
-
"cl-text-grey-6": e.request.pageNumber !==
|
|
2628
|
+
class: z(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2629
|
+
"cl-text-black cl-font-bold": e.request.pageNumber === U,
|
|
2630
|
+
"cl-text-grey-6": e.request.pageNumber !== U
|
|
2631
2631
|
}]),
|
|
2632
|
-
onClick: (
|
|
2633
|
-
},
|
|
2634
|
-
|
|
2632
|
+
onClick: (E) => g(U)
|
|
2633
|
+
}, y(n(c)(U, n(ne).INTEGER)), 11, On))), 128)),
|
|
2634
|
+
V(s("li", {
|
|
2635
2635
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2636
|
-
onClick:
|
|
2636
|
+
onClick: C[4] || (C[4] = (U) => g(e.request.pageNumber + 1))
|
|
2637
2637
|
}, [
|
|
2638
|
-
|
|
2638
|
+
k(P, {
|
|
2639
2639
|
icon: "ph:caret-right",
|
|
2640
2640
|
size: 14
|
|
2641
2641
|
})
|
|
2642
2642
|
], 512), [
|
|
2643
|
-
[
|
|
2643
|
+
[H, e.request.pageNumber < n(r)]
|
|
2644
2644
|
]),
|
|
2645
|
-
|
|
2645
|
+
V(s("li", {
|
|
2646
2646
|
class: "cl-cursor-pointer cl-mr-1 cl-mt-1 lg:cl-mr-2",
|
|
2647
|
-
onClick:
|
|
2647
|
+
onClick: C[5] || (C[5] = (U) => g(n(r)))
|
|
2648
2648
|
}, [
|
|
2649
|
-
|
|
2649
|
+
k(P, {
|
|
2650
2650
|
icon: "ph:caret-double-right",
|
|
2651
2651
|
size: 14
|
|
2652
2652
|
})
|
|
2653
2653
|
], 512), [
|
|
2654
|
-
[
|
|
2654
|
+
[H, e.request.pageNumber < n(r)]
|
|
2655
2655
|
])
|
|
2656
2656
|
])
|
|
2657
2657
|
]),
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
(
|
|
2658
|
+
s("ul", Mn, [
|
|
2659
|
+
s("li", In, y(n(f)("grid.pageSize")), 1),
|
|
2660
|
+
(a(), d(B, null, ce(o, (U, X) => s("li", {
|
|
2661
2661
|
key: X,
|
|
2662
|
-
class:
|
|
2663
|
-
"cl-text-black cl-font-bold": e.request.pageSize ===
|
|
2664
|
-
"cl-text-grey-6": e.request.pageSize !==
|
|
2662
|
+
class: z(["cl-cursor-pointer cl-mr-1 lg:cl-mr-2", {
|
|
2663
|
+
"cl-text-black cl-font-bold": e.request.pageSize === U,
|
|
2664
|
+
"cl-text-grey-6": e.request.pageSize !== U
|
|
2665
2665
|
}]),
|
|
2666
|
-
onClick: (
|
|
2667
|
-
},
|
|
2666
|
+
onClick: (E) => b(U)
|
|
2667
|
+
}, y(n(c)(U, n(ne).INTEGER)), 11, Nn)), 64))
|
|
2668
2668
|
]),
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2669
|
+
s("ul", qn, [
|
|
2670
|
+
s("li", Dn, y(n(f)("grid.totalRecords")), 1),
|
|
2671
|
+
s("li", Rn, y(n(c)(e.data.totalRecords, n(ne).INTEGER)), 1)
|
|
2672
2672
|
])
|
|
2673
2673
|
])
|
|
2674
|
-
])) :
|
|
2674
|
+
])) : N("", !0);
|
|
2675
2675
|
};
|
|
2676
2676
|
}
|
|
2677
|
-
}), zn = { class: "cl-fixed cl-flex cl-h-full cl-justify-end cl-right-0 cl-shadow-lg cl-top-0 cl-z-50" }, Bn = { class: "cl-bg-secondary-default cl-h-full cl-overflow-y-auto cl-px-10 cl-py-20 cl-relative cl-text-grey-2 cl-w-80" }, Ln = { class: "cl-mb-4 cl-text-2xl cl-text-off-white" }, Pn = { class: "cl-border-grey-3 cl-border-t cl-flex cl-flex-wrap cl-text-sm cl-w-full" },
|
|
2677
|
+
}), zn = { class: "cl-fixed cl-flex cl-h-full cl-justify-end cl-right-0 cl-shadow-lg cl-top-0 cl-z-50" }, Bn = { class: "cl-bg-secondary-default cl-h-full cl-overflow-y-auto cl-px-10 cl-py-20 cl-relative cl-text-grey-2 cl-w-80" }, Ln = { class: "cl-mb-4 cl-text-2xl cl-text-off-white" }, Pn = { class: "cl-border-grey-3 cl-border-t cl-flex cl-flex-wrap cl-text-sm cl-w-full" }, Vn = { class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full" }, Fn = { class: "cl-flex-1 cl-py-2" }, Hn = { class: "cl-py-2 cl-w-1/4" }, Gn = { class: "cl-py-2 cl-w-1/5" }, Wn = { class: "cl-flex-1 cl-py-2" }, Jn = { class: "cl-py-2 cl-w-1/4" }, Kn = { class: "cl-py-2 cl-text-off-white cl-w-1/5" }, Zn = { key: 1 }, Qn = {
|
|
2678
2678
|
inheritAttrs: !1
|
|
2679
|
-
}, Yn = /* @__PURE__ */
|
|
2679
|
+
}, Yn = /* @__PURE__ */ G({
|
|
2680
2680
|
...Qn,
|
|
2681
2681
|
__name: "cl-ui-grid-view-manager",
|
|
2682
2682
|
props: {
|
|
@@ -2686,83 +2686,83 @@ const cn = {
|
|
|
2686
2686
|
"update:columns": null
|
|
2687
2687
|
},
|
|
2688
2688
|
setup(e, { emit: t }) {
|
|
2689
|
-
const l = e, { t:
|
|
2690
|
-
function
|
|
2691
|
-
|
|
2692
|
-
}
|
|
2693
|
-
function
|
|
2694
|
-
var
|
|
2695
|
-
const
|
|
2696
|
-
|
|
2697
|
-
}
|
|
2698
|
-
function
|
|
2699
|
-
const
|
|
2700
|
-
|
|
2701
|
-
}
|
|
2702
|
-
return (r,
|
|
2703
|
-
const
|
|
2704
|
-
return
|
|
2705
|
-
|
|
2689
|
+
const l = e, { t: o } = se(), c = q(!1);
|
|
2690
|
+
function f(r, m, g) {
|
|
2691
|
+
g < r.length && g >= 0 && r.splice(g, 0, r.splice(m, 1)[0]);
|
|
2692
|
+
}
|
|
2693
|
+
function i(r, m) {
|
|
2694
|
+
var T;
|
|
2695
|
+
const g = be(l.columns), p = (T = r == null ? void 0 : r.checked) != null ? T : !1, b = g.findIndex((C) => C.name === m.name);
|
|
2696
|
+
b >= 0 && (g[b].visible = p), t("update:columns", g);
|
|
2697
|
+
}
|
|
2698
|
+
function u(r, m) {
|
|
2699
|
+
const g = be(l.columns), p = m === "up" ? r + 1 : r - 1;
|
|
2700
|
+
f(g, r, p), t("update:columns", g);
|
|
2701
|
+
}
|
|
2702
|
+
return (r, m) => {
|
|
2703
|
+
const g = ee("icon");
|
|
2704
|
+
return a(), d(B, null, [
|
|
2705
|
+
k(we, de(r.$attrs, {
|
|
2706
2706
|
class: "cl-w-full",
|
|
2707
2707
|
size: "small",
|
|
2708
|
-
onClick:
|
|
2708
|
+
onClick: m[0] || (m[0] = ae((p) => c.value = !0, ["prevent"]))
|
|
2709
2709
|
}), {
|
|
2710
|
-
default:
|
|
2711
|
-
|
|
2710
|
+
default: Y(() => [
|
|
2711
|
+
_(y(n(o)("grid.manageView")), 1)
|
|
2712
2712
|
]),
|
|
2713
2713
|
_: 1
|
|
2714
2714
|
}, 16),
|
|
2715
|
-
(
|
|
2716
|
-
|
|
2717
|
-
default:
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2715
|
+
(a(), K(Le, { to: "body" }, [
|
|
2716
|
+
k(xe, { name: "slide-left" }, {
|
|
2717
|
+
default: Y(() => [
|
|
2718
|
+
V(s("div", zn, [
|
|
2719
|
+
s("div", Bn, [
|
|
2720
|
+
k(g, {
|
|
2721
2721
|
class: "cl-absolute cl-cursor-pointer cl-right-3 cl-text-off-white cl-top-3",
|
|
2722
2722
|
icon: "ph:x",
|
|
2723
2723
|
size: 16,
|
|
2724
|
-
onClick:
|
|
2724
|
+
onClick: m[1] || (m[1] = (p) => c.value = !1)
|
|
2725
2725
|
}),
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2726
|
+
s("h3", Ln, y(n(o)("grid.manageView")), 1),
|
|
2727
|
+
s("ul", Pn, [
|
|
2728
|
+
s("li", Vn, [
|
|
2729
|
+
s("strong", Fn, y(n(o)("grid.column")), 1),
|
|
2730
|
+
s("strong", Hn, y(n(o)("grid.visible")), 1),
|
|
2731
|
+
s("strong", Gn, y(n(o)("grid.order")), 1)
|
|
2732
2732
|
]),
|
|
2733
|
-
(
|
|
2734
|
-
key:
|
|
2733
|
+
(a(!0), d(B, null, ce(e.columns, (p, b) => (a(), d("li", {
|
|
2734
|
+
key: b,
|
|
2735
2735
|
class: "cl-border-b cl-border-grey-2 cl-flex cl-py-2 cl-text-sm cl-w-full"
|
|
2736
2736
|
}, [
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
"model-value":
|
|
2737
|
+
s("div", Wn, y(p.caption), 1),
|
|
2738
|
+
s("div", Jn, [
|
|
2739
|
+
k(fe, {
|
|
2740
|
+
"model-value": p.visible === void 0 || p.visible === !0,
|
|
2741
2741
|
"input-type": "checkbox",
|
|
2742
|
-
onClick: (
|
|
2742
|
+
onClick: (T) => i(T.target, p)
|
|
2743
2743
|
}, null, 8, ["model-value", "onClick"])
|
|
2744
2744
|
]),
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2745
|
+
s("div", Kn, [
|
|
2746
|
+
p.visible === void 0 || p.visible === !0 ? (a(), d(B, { key: 0 }, [
|
|
2747
|
+
b !== 0 ? (a(), K(g, {
|
|
2748
2748
|
key: 0,
|
|
2749
2749
|
class: "cl-cursor-pointer cl-inline-block cl-mr-2",
|
|
2750
2750
|
icon: "ph:arrow-left",
|
|
2751
|
-
onClick: (
|
|
2752
|
-
}, null, 8, ["onClick"])) :
|
|
2753
|
-
|
|
2751
|
+
onClick: (T) => u(b, "down")
|
|
2752
|
+
}, null, 8, ["onClick"])) : N("", !0),
|
|
2753
|
+
b !== e.columns.length - 1 ? (a(), K(g, {
|
|
2754
2754
|
key: 1,
|
|
2755
2755
|
class: "cl-cursor-pointer cl-inline-block",
|
|
2756
2756
|
icon: "ph:arrow-right",
|
|
2757
|
-
onClick: (
|
|
2758
|
-
}, null, 8, ["onClick"])) :
|
|
2759
|
-
], 64)) : (
|
|
2757
|
+
onClick: (T) => u(b, "up")
|
|
2758
|
+
}, null, 8, ["onClick"])) : N("", !0)
|
|
2759
|
+
], 64)) : (a(), d("em", Zn, y(n(o)("grid.hidden")), 1))
|
|
2760
2760
|
])
|
|
2761
2761
|
]))), 128))
|
|
2762
2762
|
])
|
|
2763
2763
|
])
|
|
2764
2764
|
], 512), [
|
|
2765
|
-
[
|
|
2765
|
+
[H, c.value]
|
|
2766
2766
|
])
|
|
2767
2767
|
]),
|
|
2768
2768
|
_: 1
|
|
@@ -2774,7 +2774,13 @@ const cn = {
|
|
|
2774
2774
|
}), Xn = {
|
|
2775
2775
|
key: 0,
|
|
2776
2776
|
class: "cl-pb-2 cl-pr-2 cl-w-1/2 lg:cl-pb-0 lg:cl-w-auto"
|
|
2777
|
-
}, _n = { class: "cl-hidden cl-pr-2 lg:cl-inline-block" }, eo = {
|
|
2777
|
+
}, _n = { class: "cl-hidden cl-pr-2 lg:cl-inline-block" }, eo = {
|
|
2778
|
+
key: 1,
|
|
2779
|
+
class: "cl-pb-2 cl-pr-2 cl-w-1/2 lg:cl-pb-0 lg:cl-pr-0 lg:cl-w-auto"
|
|
2780
|
+
}, lo = {
|
|
2781
|
+
key: 2,
|
|
2782
|
+
class: "cl-pr-2 cl-w-full lg:cl-hidden md:cl-w-1/2"
|
|
2783
|
+
}, Ye = /* @__PURE__ */ G({
|
|
2778
2784
|
__name: "cl-ui-grid-header",
|
|
2779
2785
|
props: {
|
|
2780
2786
|
columns: null,
|
|
@@ -2789,68 +2795,73 @@ const cn = {
|
|
|
2789
2795
|
"update:filter-panel-open": null
|
|
2790
2796
|
},
|
|
2791
2797
|
setup(e, { emit: t }) {
|
|
2792
|
-
const l = e, { t:
|
|
2798
|
+
const l = e, { t: o } = se(), c = A(() => {
|
|
2799
|
+
let i = !1;
|
|
2800
|
+
return l.columns.forEach((u) => {
|
|
2801
|
+
(u.filterable === !0 || u.filterable === void 0 || u.sortable === !0 || u.sortable === void 0) && (i = !0);
|
|
2802
|
+
}), i;
|
|
2803
|
+
}), f = A({
|
|
2793
2804
|
get: () => l.columns,
|
|
2794
|
-
set: (
|
|
2805
|
+
set: (i) => t("update:columns", i)
|
|
2795
2806
|
});
|
|
2796
|
-
return (
|
|
2797
|
-
e.editEnabled ? (
|
|
2798
|
-
|
|
2807
|
+
return (i, u) => (a(), d(B, null, [
|
|
2808
|
+
e.editEnabled ? (a(), d("span", Xn, [
|
|
2809
|
+
k(we, {
|
|
2799
2810
|
class: "cl-w-full lg:cl-w-auto",
|
|
2800
2811
|
size: "small",
|
|
2801
2812
|
colour: "default",
|
|
2802
|
-
onClick:
|
|
2813
|
+
onClick: u[0] || (u[0] = (r) => i.$emit("update:edit-mode", !e.editMode))
|
|
2803
2814
|
}, {
|
|
2804
|
-
default:
|
|
2805
|
-
e.editMode ? (
|
|
2806
|
-
|
|
2807
|
-
], 64)) : (
|
|
2808
|
-
|
|
2815
|
+
default: Y(() => [
|
|
2816
|
+
e.editMode ? (a(), d(B, { key: 0 }, [
|
|
2817
|
+
_(y(n(o)("grid.finishEditing")), 1)
|
|
2818
|
+
], 64)) : (a(), d(B, { key: 1 }, [
|
|
2819
|
+
_(y(n(o)("grid.editData")), 1)
|
|
2809
2820
|
], 64))
|
|
2810
2821
|
]),
|
|
2811
2822
|
_: 1
|
|
2812
2823
|
})
|
|
2813
|
-
])) :
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
columns:
|
|
2817
|
-
"onUpdate:columns":
|
|
2824
|
+
])) : N("", !0),
|
|
2825
|
+
s("span", _n, [
|
|
2826
|
+
k(Yn, {
|
|
2827
|
+
columns: n(f),
|
|
2828
|
+
"onUpdate:columns": u[1] || (u[1] = (r) => ge(f) ? f.value = r : null)
|
|
2818
2829
|
}, null, 8, ["columns"])
|
|
2819
2830
|
]),
|
|
2820
|
-
|
|
2821
|
-
|
|
2831
|
+
n(c) ? (a(), d("span", eo, [
|
|
2832
|
+
k(we, {
|
|
2822
2833
|
class: "cl-w-full lg:cl-w-auto",
|
|
2823
2834
|
size: "small",
|
|
2824
|
-
onClick:
|
|
2835
|
+
onClick: u[2] || (u[2] = ae((r) => i.$emit("reset-filters"), ["prevent"]))
|
|
2825
2836
|
}, {
|
|
2826
|
-
default:
|
|
2827
|
-
|
|
2837
|
+
default: Y(() => [
|
|
2838
|
+
_(y(n(o)("grid.clearFilters")), 1)
|
|
2828
2839
|
]),
|
|
2829
2840
|
_: 1
|
|
2830
2841
|
})
|
|
2831
|
-
]),
|
|
2832
|
-
|
|
2833
|
-
|
|
2842
|
+
])) : N("", !0),
|
|
2843
|
+
n(c) ? (a(), d("span", lo, [
|
|
2844
|
+
k(we, {
|
|
2834
2845
|
class: "cl-w-full",
|
|
2835
2846
|
colour: "blue",
|
|
2836
2847
|
size: "small",
|
|
2837
|
-
onClick:
|
|
2848
|
+
onClick: u[3] || (u[3] = ae((r) => i.$emit("update:filter-panel-open", !0), ["prevent"]))
|
|
2838
2849
|
}, {
|
|
2839
|
-
default:
|
|
2840
|
-
|
|
2850
|
+
default: Y(() => [
|
|
2851
|
+
_(y(n(o)("grid.modifyFilters")), 1)
|
|
2841
2852
|
]),
|
|
2842
2853
|
_: 1
|
|
2843
2854
|
})
|
|
2844
|
-
])
|
|
2855
|
+
])) : N("", !0)
|
|
2845
2856
|
], 64));
|
|
2846
2857
|
}
|
|
2847
|
-
}), to = { class: "cl-hidden cl-mb-4 cl-w-full lg:cl-block lg:cl-text-right" }, no = ["data-loading"], oo = { class: "cl-absolute cl-bg-white cl-h-full cl-opacity-40 cl-w-full cl-z-20" }, co = { class: "cl-bg-white cl-flex cl-flex-wrap cl-sticky cl-top-0 cl-w-full lg:cl-hidden" }, ao = { class: "cl-border-b cl-border-grey-2 cl-flex cl-flex-wrap cl-px-2 cl-py-4 cl-w-full" }, io = { class: "cl-mb-4 cl-text-sm cl-w-full" }, so = { class: "cl-flex cl-flex-wrap cl-w-full" }, ro = { class: "!cl-bg-white cl-absolute cl-h-screen cl-overflow-x-auto cl-p-4 cl-text-sm cl-w-full cl-z-10" }, uo = { class: "cl-border-b cl-border-grey-2 cl-mb-2 cl-pb-2 cl-text-right cl-w-full" }, fo = { class: "cl-
|
|
2848
|
-
key:
|
|
2858
|
+
}), to = { class: "cl-hidden cl-mb-4 cl-w-full lg:cl-block lg:cl-text-right" }, no = ["data-loading"], oo = { class: "cl-absolute cl-bg-white cl-h-full cl-opacity-40 cl-w-full cl-z-20" }, co = { class: "cl-bg-white cl-flex cl-flex-wrap cl-sticky cl-top-0 cl-w-full lg:cl-hidden" }, ao = { class: "cl-border-b cl-border-grey-2 cl-flex cl-flex-wrap cl-px-2 cl-py-4 cl-w-full" }, io = { class: "cl-mb-4 cl-text-sm cl-w-full" }, so = { class: "cl-flex cl-flex-wrap cl-w-full" }, ro = { class: "!cl-bg-white cl-absolute cl-h-screen cl-overflow-x-auto cl-p-4 cl-text-sm cl-w-full cl-z-10" }, uo = { class: "cl-border-b cl-border-grey-2 cl-mb-2 cl-pb-2 cl-text-right cl-w-full" }, fo = { key: 0 }, mo = { key: 1 }, go = { class: "cl-self-center" }, bo = { key: 1 }, ho = {
|
|
2859
|
+
key: 3,
|
|
2849
2860
|
class: "cl-ml-2"
|
|
2850
|
-
},
|
|
2861
|
+
}, vo = { class: "cl-overflow-auto cl-w-full" }, po = { class: "cl-min-w-full cl-table-fixed" }, yo = { class: "cl-hidden lg:cl-table-column-group" }, wo = { class: "cl-hidden lg:cl-table-header-group" }, xo = ["onClick"], $o = { key: 1 }, ko = { key: 0 }, To = { key: 1 }, Co = ["colspan"], So = { class: "cl-my-10 cl-py-1 cl-text-center cl-text-sm cl-w-full" }, Eo = {
|
|
2851
2862
|
key: 0,
|
|
2852
2863
|
class: "cl-w-full"
|
|
2853
|
-
},
|
|
2864
|
+
}, jo = /* @__PURE__ */ G({
|
|
2854
2865
|
__name: "cl-ui-grid",
|
|
2855
2866
|
props: {
|
|
2856
2867
|
columns: null,
|
|
@@ -2867,270 +2878,289 @@ const cn = {
|
|
|
2867
2878
|
"edit-end": null
|
|
2868
2879
|
},
|
|
2869
2880
|
setup(e, { emit: t }) {
|
|
2870
|
-
const l = e, { t:
|
|
2881
|
+
const l = e, { t: o } = se(), c = q({}), f = q(!1), i = q({
|
|
2871
2882
|
index: -1,
|
|
2872
2883
|
record: {}
|
|
2873
|
-
}),
|
|
2884
|
+
}), u = q(!1), r = A({
|
|
2874
2885
|
get: () => l.columns,
|
|
2875
|
-
set: (
|
|
2876
|
-
}),
|
|
2886
|
+
set: (h) => t("update:columns", h)
|
|
2887
|
+
}), m = A({
|
|
2877
2888
|
get: () => l.request,
|
|
2878
|
-
set: (
|
|
2879
|
-
}),
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
const
|
|
2894
|
-
|
|
2895
|
-
|
|
2889
|
+
set: (h) => t("update:request", h)
|
|
2890
|
+
}), g = A(() => r.value.filter((h) => typeof h.visible > "u" || h.visible !== !1)), p = A(() => {
|
|
2891
|
+
let h = !1;
|
|
2892
|
+
return g.value.forEach(($) => {
|
|
2893
|
+
($.sortable || $.sortable === void 0) && (h = !0);
|
|
2894
|
+
}), h;
|
|
2895
|
+
}), b = A(() => {
|
|
2896
|
+
let h = !1;
|
|
2897
|
+
return g.value.forEach(($) => {
|
|
2898
|
+
($.filterable || $.filterable === void 0) && (h = !0);
|
|
2899
|
+
}), h;
|
|
2900
|
+
}), T = A(() => l.columns.find((h) => h.editable === !0) !== void 0);
|
|
2901
|
+
function C() {
|
|
2902
|
+
const h = {};
|
|
2903
|
+
window.innerWidth >= 1024 && r.value.forEach(($) => {
|
|
2904
|
+
const M = $.width ? `${$.width}px` : "";
|
|
2905
|
+
h[`${$.name}`] = `width: ${M}; min-width: ${M};`;
|
|
2906
|
+
}), c.value = h;
|
|
2907
|
+
}
|
|
2908
|
+
function P(h) {
|
|
2909
|
+
var $;
|
|
2910
|
+
return ($ = c.value[h]) != null ? $ : "";
|
|
2911
|
+
}
|
|
2912
|
+
function F(h) {
|
|
2913
|
+
if (typeof h < "u") {
|
|
2914
|
+
const $ = be(l.request);
|
|
2915
|
+
$.sort === null || $.sort.sortOnColumn !== h ? $.sort = {
|
|
2916
|
+
sortOnColumn: h,
|
|
2896
2917
|
sortByAscending: !0
|
|
2897
|
-
} :
|
|
2918
|
+
} : $.sort.sortOnColumn === h && $.sort.sortByAscending === !0 ? $.sort.sortByAscending = !1 : $.sort = null, m.value = $;
|
|
2898
2919
|
}
|
|
2899
2920
|
}
|
|
2900
|
-
function
|
|
2901
|
-
const
|
|
2902
|
-
|
|
2921
|
+
function U() {
|
|
2922
|
+
const h = be(m.value);
|
|
2923
|
+
h.pageNumber = 1, h.filters = [], m.value = h;
|
|
2903
2924
|
}
|
|
2904
|
-
function
|
|
2905
|
-
|
|
2925
|
+
function X(h) {
|
|
2926
|
+
i.value.index !== -1 && i.value.index !== h && v(), i.value.index = h;
|
|
2906
2927
|
}
|
|
2907
|
-
function
|
|
2908
|
-
|
|
2928
|
+
function E(h, $) {
|
|
2929
|
+
$ !== void 0 && (i.value.record[$] = h);
|
|
2909
2930
|
}
|
|
2910
|
-
function
|
|
2911
|
-
if (
|
|
2912
|
-
const { [
|
|
2913
|
-
|
|
2914
|
-
...
|
|
2931
|
+
function j(h) {
|
|
2932
|
+
if (h !== void 0) {
|
|
2933
|
+
const { [h]: $, ...M } = i.value.record;
|
|
2934
|
+
i.value.record = {
|
|
2935
|
+
...M
|
|
2915
2936
|
};
|
|
2916
2937
|
}
|
|
2917
2938
|
}
|
|
2918
|
-
function
|
|
2919
|
-
Object.keys(
|
|
2939
|
+
function v() {
|
|
2940
|
+
Object.keys(i.value.record).length !== 0 && (t("row-edit", be(i.value)), i.value.record = {});
|
|
2920
2941
|
}
|
|
2921
2942
|
return Se(() => {
|
|
2922
|
-
window.addEventListener("resize",
|
|
2923
|
-
}), Me(() => window.removeEventListener("resize",
|
|
2943
|
+
window.addEventListener("resize", C), C();
|
|
2944
|
+
}), Me(() => window.removeEventListener("resize", C)), le(() => l.request, () => t("data-request"), {
|
|
2924
2945
|
deep: !0,
|
|
2925
2946
|
immediate: !0
|
|
2926
|
-
}),
|
|
2927
|
-
|
|
2928
|
-
}), (
|
|
2929
|
-
var
|
|
2930
|
-
const
|
|
2931
|
-
return
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
columns:
|
|
2935
|
-
"onUpdate:columns":
|
|
2936
|
-
"edit-mode":
|
|
2937
|
-
"onUpdate:edit-mode":
|
|
2938
|
-
"edit-enabled":
|
|
2939
|
-
onResetFilters:
|
|
2947
|
+
}), le(() => f.value, () => {
|
|
2948
|
+
f.value ? t("edit-start") : (v(), t("edit-end"), i.value.index = -1);
|
|
2949
|
+
}), (h, $) => {
|
|
2950
|
+
var S, O;
|
|
2951
|
+
const M = ee("icon");
|
|
2952
|
+
return a(), d(B, null, [
|
|
2953
|
+
s("div", to, [
|
|
2954
|
+
k(Ye, {
|
|
2955
|
+
columns: n(r),
|
|
2956
|
+
"onUpdate:columns": $[0] || ($[0] = (w) => ge(r) ? r.value = w : null),
|
|
2957
|
+
"edit-mode": f.value,
|
|
2958
|
+
"onUpdate:edit-mode": $[1] || ($[1] = (w) => f.value = w),
|
|
2959
|
+
"edit-enabled": n(T),
|
|
2960
|
+
onResetFilters: U
|
|
2940
2961
|
}, null, 8, ["columns", "edit-mode", "edit-enabled"])
|
|
2941
2962
|
]),
|
|
2942
|
-
|
|
2963
|
+
s("div", {
|
|
2943
2964
|
class: "cl-relative cl-w-full grid-wrapper",
|
|
2944
2965
|
"data-loading": e.loading
|
|
2945
2966
|
}, [
|
|
2946
|
-
|
|
2947
|
-
default:
|
|
2948
|
-
|
|
2949
|
-
[
|
|
2967
|
+
k(xe, { name: "fade" }, {
|
|
2968
|
+
default: Y(() => [
|
|
2969
|
+
V(s("div", oo, null, 512), [
|
|
2970
|
+
[H, e.loading]
|
|
2950
2971
|
])
|
|
2951
2972
|
]),
|
|
2952
2973
|
_: 1
|
|
2953
2974
|
}),
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
columns:
|
|
2960
|
-
"onUpdate:columns":
|
|
2961
|
-
"edit-mode":
|
|
2962
|
-
"onUpdate:edit-mode":
|
|
2963
|
-
"filter-panel-open":
|
|
2964
|
-
"onUpdate:filter-panel-open":
|
|
2965
|
-
"edit-enabled":
|
|
2966
|
-
onResetFilters:
|
|
2975
|
+
s("div", co, [
|
|
2976
|
+
s("div", ao, [
|
|
2977
|
+
s("strong", io, y(n(o)("grid.gridTools")), 1),
|
|
2978
|
+
s("div", so, [
|
|
2979
|
+
k(Ye, {
|
|
2980
|
+
columns: n(r),
|
|
2981
|
+
"onUpdate:columns": $[2] || ($[2] = (w) => ge(r) ? r.value = w : null),
|
|
2982
|
+
"edit-mode": f.value,
|
|
2983
|
+
"onUpdate:edit-mode": $[3] || ($[3] = (w) => f.value = w),
|
|
2984
|
+
"filter-panel-open": u.value,
|
|
2985
|
+
"onUpdate:filter-panel-open": $[4] || ($[4] = (w) => u.value = w),
|
|
2986
|
+
"edit-enabled": n(T),
|
|
2987
|
+
onResetFilters: U
|
|
2967
2988
|
}, null, 8, ["columns", "edit-mode", "filter-panel-open", "edit-enabled"])
|
|
2968
2989
|
])
|
|
2969
2990
|
]),
|
|
2970
|
-
|
|
2971
|
-
default:
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2991
|
+
k(xe, { name: "grow-down" }, {
|
|
2992
|
+
default: Y(() => [
|
|
2993
|
+
V(s("div", ro, [
|
|
2994
|
+
s("div", uo, [
|
|
2995
|
+
k(M, {
|
|
2975
2996
|
class: "cl--mt-1 cl-inline-block cl-text-grey-5",
|
|
2976
2997
|
icon: "ph:x",
|
|
2977
2998
|
size: 16,
|
|
2978
|
-
onClick:
|
|
2979
|
-
|
|
2999
|
+
onClick: $[5] || ($[5] = (w) => {
|
|
3000
|
+
u.value = !1;
|
|
2980
3001
|
})
|
|
2981
3002
|
})
|
|
2982
3003
|
]),
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
3004
|
+
s("div", {
|
|
3005
|
+
class: z(["cl-font-semibold cl-grid cl-grid-cols-3 cl-mb-2", {
|
|
3006
|
+
"cl-grid-cols-2": !n(b) || !n(p),
|
|
3007
|
+
"cl-grid-cols-3": n(b) && n(p)
|
|
3008
|
+
}])
|
|
3009
|
+
}, [
|
|
3010
|
+
s("div", null, y(n(o)("grid.field")), 1),
|
|
3011
|
+
n(b) ? (a(), d("div", fo, y(n(o)("grid.filter")), 1)) : N("", !0),
|
|
3012
|
+
n(p) ? (a(), d("div", mo, y(n(o)("grid.sortBy")), 1)) : N("", !0)
|
|
3013
|
+
], 2),
|
|
3014
|
+
(a(!0), d(B, null, ce(n(g).filter((w) => w.filterable || w.filterable === void 0 || w.sortable || w.sortable === void 0), (w, J) => (a(), d("div", {
|
|
3015
|
+
key: J,
|
|
2990
3016
|
class: "cl-grid cl-grid-cols-3 cl-mb-4 cl-w-full"
|
|
2991
3017
|
}, [
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3018
|
+
s("div", go, y(w.caption), 1),
|
|
3019
|
+
w.filterable || w.filterable === void 0 ? (a(), K(Qe, {
|
|
3020
|
+
key: 0,
|
|
3021
|
+
request: n(m),
|
|
3022
|
+
"onUpdate:request": $[6] || ($[6] = (L) => ge(m) ? m.value = L : null),
|
|
3023
|
+
column: w,
|
|
3024
|
+
class: z({
|
|
3025
|
+
"cl-col-span-2": !n(p)
|
|
3026
|
+
})
|
|
3027
|
+
}, null, 8, ["request", "column", "class"])) : n(b) ? (a(), d("div", bo)) : N("", !0),
|
|
3028
|
+
(w.type !== "slot" || w.slotType !== void 0 && w.field !== void 0) && (w.sortable === void 0 || w.sortable === !0) ? (a(), d(B, { key: 2 }, [
|
|
3029
|
+
n(m).sort === null || n(m).sort.sortOnColumn !== w.field ? (a(), K(M, {
|
|
3000
3030
|
key: 0,
|
|
3001
|
-
class: "cl-cursor-pointer cl-ml-2",
|
|
3031
|
+
class: "cl-cursor-pointer cl-ml-2 cl-self-center",
|
|
3002
3032
|
icon: "ph:minus",
|
|
3003
|
-
onClick: (L) =>
|
|
3004
|
-
}, null, 8, ["onClick"])) :
|
|
3033
|
+
onClick: (L) => F(w.field)
|
|
3034
|
+
}, null, 8, ["onClick"])) : n(m).sort.sortByAscending === !1 ? (a(), K(M, {
|
|
3005
3035
|
key: 1,
|
|
3006
|
-
class: "cl-cursor-pointer cl-ml-2",
|
|
3036
|
+
class: "cl-cursor-pointer cl-ml-2 cl-self-center",
|
|
3007
3037
|
icon: "ph:caret-down",
|
|
3008
|
-
onClick: (L) =>
|
|
3009
|
-
}, null, 8, ["onClick"])) : (
|
|
3038
|
+
onClick: (L) => F(w.field)
|
|
3039
|
+
}, null, 8, ["onClick"])) : (a(), K(M, {
|
|
3010
3040
|
key: 2,
|
|
3011
|
-
class: "cl-cursor-pointer cl-ml-2",
|
|
3041
|
+
class: "cl-cursor-pointer cl-ml-2 cl-self-center",
|
|
3012
3042
|
icon: "ph:caret-up",
|
|
3013
|
-
onClick: (L) =>
|
|
3043
|
+
onClick: (L) => F(w.field)
|
|
3014
3044
|
}, null, 8, ["onClick"]))
|
|
3015
|
-
], 64)) : (
|
|
3045
|
+
], 64)) : (a(), d("div", ho, " \xA0 "))
|
|
3016
3046
|
]))), 128))
|
|
3017
3047
|
], 512), [
|
|
3018
|
-
[
|
|
3048
|
+
[H, u.value]
|
|
3019
3049
|
])
|
|
3020
3050
|
]),
|
|
3021
3051
|
_: 1
|
|
3022
3052
|
})
|
|
3023
3053
|
]),
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
(
|
|
3028
|
-
key:
|
|
3029
|
-
style: Te(
|
|
3054
|
+
s("div", vo, [
|
|
3055
|
+
s("table", po, [
|
|
3056
|
+
s("colgroup", yo, [
|
|
3057
|
+
(a(!0), d(B, null, ce(n(g), (w, J) => (a(), d("col", {
|
|
3058
|
+
key: J,
|
|
3059
|
+
style: Te(P(w.name)),
|
|
3030
3060
|
span: 1
|
|
3031
3061
|
}, null, 4))), 128))
|
|
3032
3062
|
]),
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
(
|
|
3063
|
+
s("thead", wo, [
|
|
3064
|
+
s("tr", null, [
|
|
3065
|
+
(a(!0), d(B, null, ce(n(g), (w, J) => {
|
|
3036
3066
|
var L;
|
|
3037
|
-
return
|
|
3038
|
-
key:
|
|
3039
|
-
class: "cl-border-b cl-border-grey-2 cl-font-semibold cl-p-1 cl-text-grey-3 cl-text-left cl-text-sm
|
|
3040
|
-
style: Te(
|
|
3067
|
+
return a(), d("th", {
|
|
3068
|
+
key: J,
|
|
3069
|
+
class: "cl-border-b cl-border-grey-2 cl-font-semibold cl-p-1 cl-text-grey-3 cl-text-left cl-text-sm",
|
|
3070
|
+
style: Te(P(w.name))
|
|
3041
3071
|
}, [
|
|
3042
|
-
e.data && ((L = e.data.results) == null ? void 0 : L.length) && (
|
|
3072
|
+
e.data && ((L = e.data.results) == null ? void 0 : L.length) && (w.type !== "slot" || w.slotType !== void 0 && w.field !== void 0) && (w.sortable === void 0 || w.sortable === !0) ? (a(), d("span", {
|
|
3043
3073
|
key: 0,
|
|
3044
3074
|
class: "cl-cursor-pointer",
|
|
3045
|
-
onClick: (
|
|
3075
|
+
onClick: (I) => F(w.field)
|
|
3046
3076
|
}, [
|
|
3047
|
-
|
|
3048
|
-
|
|
3077
|
+
_(y(w.caption) + " ", 1),
|
|
3078
|
+
V(k(M, {
|
|
3049
3079
|
class: "cl--mt-1 cl-inline-block",
|
|
3050
3080
|
icon: "ph:caret-up"
|
|
3051
3081
|
}, null, 512), [
|
|
3052
|
-
[
|
|
3082
|
+
[H, n(m).sort !== null && n(m).sort.sortOnColumn === w.field && n(m).sort.sortByAscending === !0]
|
|
3053
3083
|
]),
|
|
3054
|
-
|
|
3084
|
+
V(k(M, {
|
|
3055
3085
|
class: "cl--mt-1 cl-inline-block",
|
|
3056
3086
|
icon: "ph:caret-down"
|
|
3057
3087
|
}, null, 512), [
|
|
3058
|
-
[
|
|
3088
|
+
[H, n(m).sort !== null && n(m).sort.sortOnColumn === w.field && n(m).sort.sortByAscending === !1]
|
|
3059
3089
|
])
|
|
3060
|
-
], 8,
|
|
3090
|
+
], 8, xo)) : (a(), d("span", $o, y(w.caption), 1))
|
|
3061
3091
|
], 4);
|
|
3062
3092
|
}), 128))
|
|
3063
3093
|
]),
|
|
3064
|
-
e.data && ((
|
|
3065
|
-
(
|
|
3066
|
-
key:
|
|
3094
|
+
e.data && ((S = e.data.results) == null ? void 0 : S.length) || n(m).filters.length > 0 ? (a(), d("tr", ko, [
|
|
3095
|
+
(a(!0), d(B, null, ce(n(g), (w, J) => (a(), d("th", {
|
|
3096
|
+
key: J,
|
|
3067
3097
|
class: "cl-p-1",
|
|
3068
|
-
style: Te(
|
|
3098
|
+
style: Te(P(w.name))
|
|
3069
3099
|
}, [
|
|
3070
|
-
|
|
3071
|
-
request:
|
|
3072
|
-
"onUpdate:request":
|
|
3073
|
-
column:
|
|
3074
|
-
"first-half":
|
|
3100
|
+
k(Qe, {
|
|
3101
|
+
request: n(m),
|
|
3102
|
+
"onUpdate:request": $[7] || ($[7] = (L) => ge(m) ? m.value = L : null),
|
|
3103
|
+
column: w,
|
|
3104
|
+
"first-half": J <= n(g).length / 2
|
|
3075
3105
|
}, null, 8, ["request", "column", "first-half"])
|
|
3076
3106
|
], 4))), 128))
|
|
3077
|
-
])) :
|
|
3107
|
+
])) : N("", !0)
|
|
3078
3108
|
]),
|
|
3079
|
-
|
|
3080
|
-
e.data && ((
|
|
3081
|
-
key:
|
|
3082
|
-
class:
|
|
3083
|
-
"cl-bg-white":
|
|
3084
|
-
"cl-bg-off-white":
|
|
3109
|
+
s("tbody", null, [
|
|
3110
|
+
e.data && ((O = e.data.results) == null ? void 0 : O.length) ? (a(!0), d(B, { key: 0 }, ce(e.data.results, (w, J) => (a(), d("tr", {
|
|
3111
|
+
key: J,
|
|
3112
|
+
class: z({
|
|
3113
|
+
"cl-bg-white": J % 2 !== 1,
|
|
3114
|
+
"cl-bg-off-white": J % 2 === 1
|
|
3085
3115
|
})
|
|
3086
3116
|
}, [
|
|
3087
|
-
(
|
|
3088
|
-
key:
|
|
3117
|
+
(a(!0), d(B, null, ce(n(g), (L, I) => (a(), K(Qt, {
|
|
3118
|
+
key: I,
|
|
3089
3119
|
class: "cl-p-2 cl-rounded cl-whitespace-nowrap",
|
|
3090
|
-
style: Te(
|
|
3120
|
+
style: Te(P(L.name)),
|
|
3091
3121
|
column: L,
|
|
3092
|
-
record:
|
|
3093
|
-
"edit-mode":
|
|
3094
|
-
onFocus: (
|
|
3095
|
-
onEdit: (
|
|
3096
|
-
|
|
3122
|
+
record: w,
|
|
3123
|
+
"edit-mode": f.value,
|
|
3124
|
+
onFocus: (W) => X(J),
|
|
3125
|
+
onEdit: (W) => {
|
|
3126
|
+
X(J), E(W, L.field);
|
|
3097
3127
|
},
|
|
3098
|
-
onUndoEdit: (
|
|
3128
|
+
onUndoEdit: (W) => j(L.field)
|
|
3099
3129
|
}, il({ _: 2 }, [
|
|
3100
|
-
|
|
3101
|
-
name:
|
|
3102
|
-
fn:
|
|
3103
|
-
|
|
3130
|
+
ce(h.$slots, (W, x) => ({
|
|
3131
|
+
name: x,
|
|
3132
|
+
fn: Y((D) => [
|
|
3133
|
+
R(h.$slots, x, ie(ve(D)), void 0, !0)
|
|
3104
3134
|
])
|
|
3105
3135
|
}))
|
|
3106
3136
|
]), 1032, ["style", "column", "record", "edit-mode", "onFocus", "onEdit", "onUndoEdit"]))), 128))
|
|
3107
|
-
], 2))), 128)) : (
|
|
3108
|
-
|
|
3109
|
-
colspan:
|
|
3137
|
+
], 2))), 128)) : (a(), d("tr", To, [
|
|
3138
|
+
s("td", {
|
|
3139
|
+
colspan: n(g).length
|
|
3110
3140
|
}, [
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3141
|
+
s("div", So, [
|
|
3142
|
+
s("strong", null, y(n(o)("grid.noData")), 1),
|
|
3143
|
+
n(m).filters.length > 0 ? (a(), d("div", Eo, [
|
|
3144
|
+
_(y(n(o)("grid.noDataFiltersPresent")) + " ", 1),
|
|
3145
|
+
k(we, {
|
|
3116
3146
|
size: "small",
|
|
3117
|
-
onClick:
|
|
3147
|
+
onClick: ae(U, ["prevent"])
|
|
3118
3148
|
}, {
|
|
3119
|
-
default:
|
|
3120
|
-
|
|
3149
|
+
default: Y(() => [
|
|
3150
|
+
_(y(n(o)("grid.clearFilters")), 1)
|
|
3121
3151
|
]),
|
|
3122
3152
|
_: 1
|
|
3123
3153
|
}, 8, ["onClick"])
|
|
3124
|
-
])) :
|
|
3154
|
+
])) : N("", !0)
|
|
3125
3155
|
])
|
|
3126
|
-
], 8,
|
|
3156
|
+
], 8, Co)
|
|
3127
3157
|
]))
|
|
3128
3158
|
])
|
|
3129
3159
|
])
|
|
3130
3160
|
]),
|
|
3131
|
-
|
|
3132
|
-
request:
|
|
3133
|
-
"onUpdate:request":
|
|
3161
|
+
k(Un, {
|
|
3162
|
+
request: n(m),
|
|
3163
|
+
"onUpdate:request": $[8] || ($[8] = (w) => ge(m) ? m.value = w : null),
|
|
3134
3164
|
data: e.data
|
|
3135
3165
|
}, null, 8, ["request", "data"])
|
|
3136
3166
|
], 8, no)
|
|
@@ -3138,23 +3168,23 @@ const cn = {
|
|
|
3138
3168
|
};
|
|
3139
3169
|
}
|
|
3140
3170
|
});
|
|
3141
|
-
const
|
|
3142
|
-
function
|
|
3143
|
-
return
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3171
|
+
const Ao = /* @__PURE__ */ me(jo, [["__scopeId", "data-v-fd5a46a8"]]), Oo = {}, Mo = { 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" }, Io = { class: "cl-flex cl-flex-nowrap" };
|
|
3172
|
+
function No(e, t) {
|
|
3173
|
+
return a(), d("header", Mo, [
|
|
3174
|
+
R(e.$slots, "logo"),
|
|
3175
|
+
s("div", Io, [
|
|
3176
|
+
R(e.$slots, "menu"),
|
|
3177
|
+
R(e.$slots, "icon")
|
|
3148
3178
|
])
|
|
3149
3179
|
]);
|
|
3150
3180
|
}
|
|
3151
|
-
const
|
|
3181
|
+
const qo = /* @__PURE__ */ me(Oo, [["render", No]]), Do = { class: "md:cl-relative" }, Ro = { class: "cl-bg-blue-light cl-flex cl-items-center cl-select-none md:cl-min-w-[320px]" }, Uo = ["src"], zo = { class: "cl-cursor-default cl-grow cl-hidden cl-my-4 cl-text-white md:cl-block" }, Bo = {
|
|
3152
3182
|
key: 0,
|
|
3153
3183
|
class: "cl-cursor-default cl-text-ellipsis cl-whitespace-nowrap"
|
|
3154
|
-
},
|
|
3184
|
+
}, Lo = {
|
|
3155
3185
|
key: 1,
|
|
3156
3186
|
class: "cl-cursor-default cl-text-ellipsis cl-text-xs cl-whitespace-nowrap"
|
|
3157
|
-
},
|
|
3187
|
+
}, Po = { class: "cl-absolute cl-bg-white cl-right-0 cl-shadow-2xl cl-top-20 cl-w-full cl-z-20" }, Vo = /* @__PURE__ */ G({
|
|
3158
3188
|
__name: "cl-ui-header-menu",
|
|
3159
3189
|
props: {
|
|
3160
3190
|
username: { default: "" },
|
|
@@ -3162,44 +3192,44 @@ const Mo = /* @__PURE__ */ me(jo, [["render", Oo]]), Io = { class: "md:cl-relati
|
|
|
3162
3192
|
image: { default: "" }
|
|
3163
3193
|
},
|
|
3164
3194
|
setup(e) {
|
|
3165
|
-
const t =
|
|
3166
|
-
return (l,
|
|
3167
|
-
const c =
|
|
3168
|
-
return
|
|
3169
|
-
|
|
3170
|
-
e.image ? (
|
|
3195
|
+
const t = q(!1);
|
|
3196
|
+
return (l, o) => {
|
|
3197
|
+
const c = ee("icon");
|
|
3198
|
+
return a(), d("div", Do, [
|
|
3199
|
+
s("div", Ro, [
|
|
3200
|
+
e.image ? (a(), d("img", {
|
|
3171
3201
|
key: 0,
|
|
3172
3202
|
src: e.image,
|
|
3173
3203
|
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"
|
|
3174
|
-
}, null, 8,
|
|
3204
|
+
}, null, 8, Uo)) : (a(), K(c, {
|
|
3175
3205
|
key: 1,
|
|
3176
3206
|
class: "cl-hidden cl-m-4 cl-text-white md:cl-block",
|
|
3177
3207
|
icon: "ph:user-circle",
|
|
3178
3208
|
width: "48",
|
|
3179
3209
|
height: "48"
|
|
3180
3210
|
})),
|
|
3181
|
-
|
|
3182
|
-
e.username ? (
|
|
3183
|
-
e.group ? (
|
|
3211
|
+
s("div", zo, [
|
|
3212
|
+
e.username ? (a(), d("div", Bo, y(e.username), 1)) : N("", !0),
|
|
3213
|
+
e.group ? (a(), d("div", Lo, y(e.group), 1)) : N("", !0)
|
|
3184
3214
|
]),
|
|
3185
|
-
|
|
3215
|
+
s("div", {
|
|
3186
3216
|
class: "cl-bg-transparent cl-content-center cl-cursor-pointer cl-flex cl-h-20 cl-items-center cl-justify-center cl-justify-items-center cl-transition-all cl-w-10 hover:cl-bg-opacity-10 hover:cl-bg-white md:cl-ml-4 md:cl-w-20",
|
|
3187
|
-
onClick:
|
|
3217
|
+
onClick: o[0] || (o[0] = (f) => t.value = !t.value)
|
|
3188
3218
|
}, [
|
|
3189
|
-
|
|
3190
|
-
class:
|
|
3219
|
+
k(c, {
|
|
3220
|
+
class: z(["cl-text-white cl-transform-gpu cl-transition-transform", {
|
|
3191
3221
|
"cl-rotate-180": t.value
|
|
3192
3222
|
}]),
|
|
3193
3223
|
icon: "ph:caret-down"
|
|
3194
3224
|
}, null, 8, ["class"])
|
|
3195
3225
|
])
|
|
3196
3226
|
]),
|
|
3197
|
-
|
|
3198
|
-
default:
|
|
3199
|
-
|
|
3200
|
-
|
|
3227
|
+
k(xe, { name: "fade" }, {
|
|
3228
|
+
default: Y(() => [
|
|
3229
|
+
V(s("div", Po, [
|
|
3230
|
+
R(l.$slots, "default")
|
|
3201
3231
|
], 512), [
|
|
3202
|
-
[
|
|
3232
|
+
[H, t.value]
|
|
3203
3233
|
])
|
|
3204
3234
|
]),
|
|
3205
3235
|
_: 3
|
|
@@ -3207,7 +3237,7 @@ const Mo = /* @__PURE__ */ me(jo, [["render", Oo]]), Io = { class: "md:cl-relati
|
|
|
3207
3237
|
]);
|
|
3208
3238
|
};
|
|
3209
3239
|
}
|
|
3210
|
-
}),
|
|
3240
|
+
}), Fo = [
|
|
3211
3241
|
"button",
|
|
3212
3242
|
"checkbox",
|
|
3213
3243
|
"color",
|
|
@@ -3230,78 +3260,78 @@ const Mo = /* @__PURE__ */ me(jo, [["render", Oo]]), Io = { class: "md:cl-relati
|
|
|
3230
3260
|
function Be(e) {
|
|
3231
3261
|
return /[a-z]{2}-[A-Z]{2}/gm.test(e.localeCode);
|
|
3232
3262
|
}
|
|
3233
|
-
function
|
|
3263
|
+
function Ho(e) {
|
|
3234
3264
|
let t = Array.isArray(e);
|
|
3235
3265
|
if (t) {
|
|
3236
3266
|
for (const l of e)
|
|
3237
|
-
if (!
|
|
3267
|
+
if (!Go(l)) {
|
|
3238
3268
|
t = !1;
|
|
3239
3269
|
break;
|
|
3240
3270
|
}
|
|
3241
3271
|
}
|
|
3242
3272
|
return t;
|
|
3243
3273
|
}
|
|
3244
|
-
function
|
|
3274
|
+
function Go(e) {
|
|
3245
3275
|
return typeof e.name == "string" && typeof e.nativeName == "string" && typeof e.localeCode == "string";
|
|
3246
3276
|
}
|
|
3247
|
-
const
|
|
3277
|
+
const Wo = {
|
|
3248
3278
|
key: 0,
|
|
3249
3279
|
class: "cl-flex cl-relative cl-select-none cl-w-auto cl-z-30"
|
|
3250
|
-
},
|
|
3280
|
+
}, Jo = { class: "cl-absolute cl-bg-white cl-border cl-border-grey-0 cl-overflow-hidden cl-right-0 cl-rounded cl-shadow-xl cl-text-black cl-top-6 cl-z-3" }, Ko = ["data-localename", "data-localecode", "onClick"], Zo = { class: "cl-text-xs" }, Qo = /* @__PURE__ */ G({
|
|
3251
3281
|
__name: "cl-ui-language-switcher",
|
|
3252
3282
|
props: {
|
|
3253
3283
|
supportedLanguages: null,
|
|
3254
3284
|
disabled: { type: Boolean, default: !1 }
|
|
3255
3285
|
},
|
|
3256
3286
|
setup(e) {
|
|
3257
|
-
const t = e, { locale: l } = se(),
|
|
3258
|
-
var
|
|
3259
|
-
return (
|
|
3260
|
-
}),
|
|
3261
|
-
function
|
|
3262
|
-
t.disabled || (
|
|
3263
|
-
}
|
|
3264
|
-
return
|
|
3265
|
-
|
|
3266
|
-
}), (
|
|
3267
|
-
|
|
3268
|
-
class:
|
|
3287
|
+
const t = e, { locale: l } = se(), o = q(!1), c = A(() => {
|
|
3288
|
+
var u;
|
|
3289
|
+
return (u = t.supportedLanguages.find((r) => r.localeCode === l.value)) != null ? u : null;
|
|
3290
|
+
}), f = A(() => t.supportedLanguages.filter((u) => Be(u)).sort((u, r) => u.nativeName > r.nativeName ? 1 : r.nativeName > u.nativeName ? -1 : 0));
|
|
3291
|
+
function i() {
|
|
3292
|
+
t.disabled || (o.value = !o.value);
|
|
3293
|
+
}
|
|
3294
|
+
return le(() => t.disabled, (u) => {
|
|
3295
|
+
u && (o.value = !1);
|
|
3296
|
+
}), (u, r) => n(c) !== null && n(Be)(n(c)) ? (a(), d("div", Wo, [
|
|
3297
|
+
s("div", {
|
|
3298
|
+
class: z(["cl-flex cl-items-center", {
|
|
3269
3299
|
"cl-cursor-pointer": !e.disabled
|
|
3270
3300
|
}]),
|
|
3271
|
-
onClick:
|
|
3301
|
+
onClick: i
|
|
3272
3302
|
}, [
|
|
3273
|
-
|
|
3274
|
-
class:
|
|
3303
|
+
s("span", {
|
|
3304
|
+
class: z(["cl-font-semibold cl-text-xs", {
|
|
3275
3305
|
"cl-opacity-50": e.disabled
|
|
3276
3306
|
}])
|
|
3277
|
-
},
|
|
3307
|
+
}, y(n(c).nativeName), 3)
|
|
3278
3308
|
], 2),
|
|
3279
|
-
|
|
3280
|
-
default:
|
|
3281
|
-
|
|
3282
|
-
(
|
|
3283
|
-
key:
|
|
3309
|
+
k(xe, { name: "fade" }, {
|
|
3310
|
+
default: Y(() => [
|
|
3311
|
+
V(s("div", Jo, [
|
|
3312
|
+
(a(!0), d(B, null, ce(n(f), (m, g) => (a(), d("div", {
|
|
3313
|
+
key: g,
|
|
3284
3314
|
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",
|
|
3285
|
-
"data-localename":
|
|
3286
|
-
"data-localecode":
|
|
3287
|
-
onClick: (
|
|
3288
|
-
l.value =
|
|
3315
|
+
"data-localename": m.name,
|
|
3316
|
+
"data-localecode": m.localeCode,
|
|
3317
|
+
onClick: (p) => {
|
|
3318
|
+
l.value = m.localeCode, i();
|
|
3289
3319
|
}
|
|
3290
3320
|
}, [
|
|
3291
|
-
|
|
3292
|
-
], 8,
|
|
3321
|
+
s("span", Zo, y(m.nativeName), 1)
|
|
3322
|
+
], 8, Ko))), 128))
|
|
3293
3323
|
], 512), [
|
|
3294
|
-
[
|
|
3324
|
+
[H, o.value]
|
|
3295
3325
|
])
|
|
3296
3326
|
]),
|
|
3297
3327
|
_: 1
|
|
3298
3328
|
})
|
|
3299
|
-
])) :
|
|
3329
|
+
])) : N("", !0);
|
|
3300
3330
|
}
|
|
3301
|
-
}),
|
|
3331
|
+
}), Yo = { class: "cl-relative" }, Xo = { class: "cl-h-screen cl-z-0" }, _o = { 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" }, ec = { class: "cl-col-span-10 lg:cl-col-span-3" }, lc = {
|
|
3302
3332
|
key: 0,
|
|
3303
3333
|
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"
|
|
3304
|
-
},
|
|
3334
|
+
}, tc = { class: "cl-col-span-3" }, nc = { class: "cl-inline cl-relative cl-text-grey-4" }, oc = { class: "cl-col-span-3" }, cc = { class: "cl-inline cl-relative cl-text-grey-4" }, ac = { class: "cl-col-span-10 cl-emphasis-danger cl-mt-10 cl-p-3 cl-rounded-md cl-text-sm md:cl-mt-3" }, ic = /* @__PURE__ */ G({
|
|
3305
3335
|
__name: "cl-ui-login",
|
|
3306
3336
|
props: {
|
|
3307
3337
|
errors: { default: () => [] },
|
|
@@ -3312,143 +3342,143 @@ const Vo = {
|
|
|
3312
3342
|
"update:errors": null
|
|
3313
3343
|
},
|
|
3314
3344
|
setup(e, { emit: t }) {
|
|
3315
|
-
const { t: l } = se(),
|
|
3316
|
-
function
|
|
3317
|
-
const
|
|
3318
|
-
username:
|
|
3345
|
+
const { t: l } = se(), o = q(""), c = q(""), f = q("password"), i = q();
|
|
3346
|
+
function u() {
|
|
3347
|
+
const p = {
|
|
3348
|
+
username: o.value,
|
|
3319
3349
|
password: c.value
|
|
3320
3350
|
};
|
|
3321
|
-
t("login",
|
|
3351
|
+
t("login", p);
|
|
3322
3352
|
}
|
|
3323
3353
|
function r() {
|
|
3324
3354
|
t("update:errors", []);
|
|
3325
3355
|
}
|
|
3326
|
-
function
|
|
3327
|
-
const
|
|
3356
|
+
function m(p, b) {
|
|
3357
|
+
const T = {
|
|
3328
3358
|
valid: !0,
|
|
3329
3359
|
message: ""
|
|
3330
3360
|
};
|
|
3331
|
-
return typeof
|
|
3361
|
+
return typeof b == "string" && b.trim() === "" && (T.valid = !1), T;
|
|
3332
3362
|
}
|
|
3333
|
-
function
|
|
3334
|
-
|
|
3363
|
+
function g(p, b) {
|
|
3364
|
+
i.value = p;
|
|
3335
3365
|
}
|
|
3336
|
-
return (
|
|
3337
|
-
const
|
|
3338
|
-
return
|
|
3339
|
-
|
|
3340
|
-
|
|
3366
|
+
return (p, b) => {
|
|
3367
|
+
const T = ee("icon");
|
|
3368
|
+
return a(), d("div", Yo, [
|
|
3369
|
+
s("div", Xo, [
|
|
3370
|
+
R(p.$slots, "background")
|
|
3341
3371
|
]),
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3372
|
+
s("form", _o, [
|
|
3373
|
+
s("div", ec, [
|
|
3374
|
+
R(p.$slots, "logo")
|
|
3345
3375
|
]),
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
])) :
|
|
3349
|
-
|
|
3350
|
-
class:
|
|
3351
|
-
"cl-col-span-7": !
|
|
3352
|
-
"cl-col-span-6":
|
|
3376
|
+
p.$slots["language-switcher"] ? (a(), d("div", lc, [
|
|
3377
|
+
R(p.$slots, "language-switcher")
|
|
3378
|
+
])) : N("", !0),
|
|
3379
|
+
s("div", {
|
|
3380
|
+
class: z(["cl-gap-y-4 cl-grid cl-grid-cols-1 lg:cl-gap-x-2 lg:cl-grid-cols-8", {
|
|
3381
|
+
"cl-col-span-7": !p.$slots["language-switcher"],
|
|
3382
|
+
"cl-col-span-6": p.$slots["language-switcher"]
|
|
3353
3383
|
}])
|
|
3354
3384
|
}, [
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3385
|
+
s("div", tc, [
|
|
3386
|
+
s("div", nc, [
|
|
3387
|
+
k(T, {
|
|
3358
3388
|
class: "cl-absolute cl-left-3 cl-top-2.5",
|
|
3359
3389
|
icon: "ph:user",
|
|
3360
3390
|
size: 18
|
|
3361
3391
|
}),
|
|
3362
|
-
|
|
3363
|
-
modelValue:
|
|
3364
|
-
"onUpdate:modelValue":
|
|
3392
|
+
k(fe, {
|
|
3393
|
+
modelValue: o.value,
|
|
3394
|
+
"onUpdate:modelValue": b[0] || (b[0] = (C) => o.value = C),
|
|
3365
3395
|
modelModifiers: { trim: !0 },
|
|
3366
3396
|
class: "!cl-border-2 !cl-mb-1 cl-w-full",
|
|
3367
3397
|
"input-type": "email",
|
|
3368
|
-
"highlight-when-valid":
|
|
3369
|
-
label:
|
|
3398
|
+
"highlight-when-valid": o.value !== void 0 && o.value !== "",
|
|
3399
|
+
label: n(l)("login.username"),
|
|
3370
3400
|
"show-label": !1,
|
|
3371
|
-
"placeholder-text":
|
|
3401
|
+
"placeholder-text": n(l)("login.email"),
|
|
3372
3402
|
autocomplete: "username",
|
|
3373
3403
|
"validate-immediately": !0,
|
|
3374
|
-
"custom-validation-function":
|
|
3404
|
+
"custom-validation-function": m,
|
|
3375
3405
|
"input-specific-classes": "!cl-pl-9",
|
|
3376
|
-
"message-when-valid":
|
|
3406
|
+
"message-when-valid": o.value ? n(l)("login.validEmail") : "",
|
|
3377
3407
|
onInput: r,
|
|
3378
|
-
onValidated:
|
|
3408
|
+
onValidated: g
|
|
3379
3409
|
}, null, 8, ["modelValue", "highlight-when-valid", "label", "placeholder-text", "message-when-valid"])
|
|
3380
3410
|
])
|
|
3381
3411
|
]),
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3412
|
+
s("div", oc, [
|
|
3413
|
+
s("div", cc, [
|
|
3414
|
+
k(T, {
|
|
3385
3415
|
class: "cl-absolute cl-left-3 cl-top-2.5",
|
|
3386
3416
|
icon: "ph:lock",
|
|
3387
3417
|
size: 18
|
|
3388
3418
|
}),
|
|
3389
|
-
|
|
3419
|
+
V(k(T, {
|
|
3390
3420
|
class: "cl-absolute cl-cursor-pointer cl-right-6 cl-top-2.5",
|
|
3391
3421
|
icon: "ph:eye",
|
|
3392
3422
|
size: 18,
|
|
3393
|
-
onClick:
|
|
3423
|
+
onClick: b[1] || (b[1] = (C) => f.value = "text")
|
|
3394
3424
|
}, null, 512), [
|
|
3395
|
-
[
|
|
3425
|
+
[H, f.value === "password"]
|
|
3396
3426
|
]),
|
|
3397
|
-
|
|
3427
|
+
V(k(T, {
|
|
3398
3428
|
class: "cl-absolute cl-cursor-pointer cl-right-6 cl-top-2.5",
|
|
3399
3429
|
icon: "ph:eye-slash",
|
|
3400
3430
|
size: 18,
|
|
3401
|
-
onClick:
|
|
3431
|
+
onClick: b[2] || (b[2] = (C) => f.value = "password")
|
|
3402
3432
|
}, null, 512), [
|
|
3403
|
-
[
|
|
3433
|
+
[H, f.value === "text"]
|
|
3404
3434
|
]),
|
|
3405
|
-
|
|
3435
|
+
k(fe, {
|
|
3406
3436
|
modelValue: c.value,
|
|
3407
|
-
"onUpdate:modelValue":
|
|
3437
|
+
"onUpdate:modelValue": b[3] || (b[3] = (C) => c.value = C),
|
|
3408
3438
|
class: "!cl-border-2 cl-w-full",
|
|
3409
|
-
"input-type":
|
|
3439
|
+
"input-type": f.value,
|
|
3410
3440
|
"highlight-when-valid": c.value !== void 0 && c.value !== "",
|
|
3411
|
-
label:
|
|
3441
|
+
label: n(l)("login.password"),
|
|
3412
3442
|
"show-label": !1,
|
|
3413
|
-
"placeholder-text":
|
|
3443
|
+
"placeholder-text": n(l)("login.password"),
|
|
3414
3444
|
autocomplete: "current-password",
|
|
3415
3445
|
"validate-immediately": !0,
|
|
3416
3446
|
"input-specific-classes": "!cl-pl-9 !cl-pr-9",
|
|
3417
|
-
"custom-validation-function":
|
|
3447
|
+
"custom-validation-function": m,
|
|
3418
3448
|
onInput: r
|
|
3419
3449
|
}, null, 8, ["modelValue", "input-type", "highlight-when-valid", "label", "placeholder-text"])
|
|
3420
3450
|
])
|
|
3421
3451
|
]),
|
|
3422
|
-
|
|
3423
|
-
class:
|
|
3452
|
+
s("div", {
|
|
3453
|
+
class: z(["cl-col-span-2", {
|
|
3424
3454
|
"cl-mt-1.5 cl-mb-1 md:cl-mt-0.5 md:cl-mb-7 lg:cl-mb-0": e.loading
|
|
3425
3455
|
}])
|
|
3426
3456
|
}, [
|
|
3427
|
-
|
|
3457
|
+
k(we, {
|
|
3428
3458
|
class: "!cl-leading-9 cl-w-full",
|
|
3429
3459
|
colour: "blue",
|
|
3430
3460
|
loading: e.loading,
|
|
3431
|
-
disabled: !
|
|
3432
|
-
onClick:
|
|
3461
|
+
disabled: !i.value || c.value === "",
|
|
3462
|
+
onClick: ae(u, ["prevent"])
|
|
3433
3463
|
}, {
|
|
3434
|
-
default:
|
|
3435
|
-
|
|
3464
|
+
default: Y(() => [
|
|
3465
|
+
_(y(n(l)("login.login")), 1)
|
|
3436
3466
|
]),
|
|
3437
3467
|
_: 1
|
|
3438
3468
|
}, 8, ["loading", "disabled", "onClick"])
|
|
3439
3469
|
], 2)
|
|
3440
3470
|
], 2),
|
|
3441
|
-
|
|
3442
|
-
default:
|
|
3443
|
-
var
|
|
3471
|
+
k(xe, { name: "cl-grow-down" }, {
|
|
3472
|
+
default: Y(() => {
|
|
3473
|
+
var C;
|
|
3444
3474
|
return [
|
|
3445
|
-
|
|
3446
|
-
(
|
|
3475
|
+
V(s("span", ac, [
|
|
3476
|
+
(a(!0), d(B, null, ce(e.errors, (P, F) => (a(), d("div", {
|
|
3447
3477
|
key: F,
|
|
3448
3478
|
class: "cl-font-semibold"
|
|
3449
|
-
},
|
|
3479
|
+
}, y(P), 1))), 128))
|
|
3450
3480
|
], 512), [
|
|
3451
|
-
[
|
|
3481
|
+
[H, (C = e.errors) == null ? void 0 : C.length]
|
|
3452
3482
|
])
|
|
3453
3483
|
];
|
|
3454
3484
|
}),
|
|
@@ -3458,68 +3488,68 @@ const Vo = {
|
|
|
3458
3488
|
]);
|
|
3459
3489
|
};
|
|
3460
3490
|
}
|
|
3461
|
-
}),
|
|
3491
|
+
}), sc = [
|
|
3462
3492
|
"x-small",
|
|
3463
3493
|
"small",
|
|
3464
3494
|
"medium",
|
|
3465
3495
|
"large"
|
|
3466
|
-
],
|
|
3496
|
+
], rc = [
|
|
3467
3497
|
"primary",
|
|
3468
3498
|
"secondary",
|
|
3469
3499
|
"white"
|
|
3470
|
-
],
|
|
3500
|
+
], uc = { class: "cl-flex cl-flex-nowrap cl-h-full cl-max-h-full cl-min-h-full cl-min-w-20 cl-relative cl-self-start cl-w-auto" }, dc = {
|
|
3471
3501
|
id: "group-container",
|
|
3472
3502
|
class: "cl-bg-blue-default cl-h-full cl-left-0 cl-max-h-full cl-min-h-full cl-min-w-20 cl-overflow-y-auto cl-self-start cl-sticky cl-w-20 cl-z-30"
|
|
3473
|
-
},
|
|
3503
|
+
}, fc = { class: "cl-relative cl-w-full" }, mc = /* @__PURE__ */ G({
|
|
3474
3504
|
__name: "cl-ui-navigation",
|
|
3475
3505
|
setup(e) {
|
|
3476
|
-
const t = A(() => l.value.filter((
|
|
3477
|
-
function c(
|
|
3478
|
-
let
|
|
3479
|
-
return
|
|
3480
|
-
id:
|
|
3506
|
+
const t = A(() => l.value.filter((i) => i.open === !0).length > 0), l = q([]), o = q(!1);
|
|
3507
|
+
function c(i) {
|
|
3508
|
+
let u = l.value.find((r) => r.id === i);
|
|
3509
|
+
return u || (u = {
|
|
3510
|
+
id: i,
|
|
3481
3511
|
open: !1
|
|
3482
|
-
}, l.value.push(
|
|
3512
|
+
}, l.value.push(u)), u.open;
|
|
3483
3513
|
}
|
|
3484
|
-
function
|
|
3485
|
-
const
|
|
3486
|
-
|
|
3487
|
-
r.id !==
|
|
3514
|
+
function f(i) {
|
|
3515
|
+
const u = l.value.find((r) => r.id === i);
|
|
3516
|
+
u && (u.open = !u.open, l.value.forEach((r) => {
|
|
3517
|
+
r.id !== i && (r.open = !1);
|
|
3488
3518
|
}));
|
|
3489
3519
|
}
|
|
3490
|
-
return (
|
|
3491
|
-
const r =
|
|
3492
|
-
return
|
|
3493
|
-
|
|
3494
|
-
|
|
3520
|
+
return (i, u) => {
|
|
3521
|
+
const r = ee("icon");
|
|
3522
|
+
return a(), d("div", uc, [
|
|
3523
|
+
s("div", dc, [
|
|
3524
|
+
R(i.$slots, "icon", ie(ve({ groupIsOpen: c, toggleOpen: f })), void 0, !0)
|
|
3495
3525
|
]),
|
|
3496
|
-
|
|
3497
|
-
default:
|
|
3498
|
-
|
|
3499
|
-
class:
|
|
3500
|
-
"cl-relative":
|
|
3501
|
-
"cl-absolute cl-left-20 cl-shadow-lg": !
|
|
3526
|
+
k(xe, { name: "slide-right" }, {
|
|
3527
|
+
default: Y(() => [
|
|
3528
|
+
V(s("div", {
|
|
3529
|
+
class: z(["cl-bg-grey-0 cl-border-grey-2 cl-border-r cl-max-h-full cl-min-h-full cl-min-w-[260px] cl-overflow-y-auto cl-p-8 cl-self-start cl-top-0 cl-w-[260px] cl-z-20", {
|
|
3530
|
+
"cl-relative": o.value,
|
|
3531
|
+
"cl-absolute cl-left-20 cl-shadow-lg": !o.value
|
|
3502
3532
|
}])
|
|
3503
3533
|
}, [
|
|
3504
|
-
|
|
3505
|
-
|
|
3534
|
+
s("div", fc, [
|
|
3535
|
+
s("span", {
|
|
3506
3536
|
class: "cl-absolute cl-cursor-pointer cl-h-8 cl-hidden cl-leading-8 cl-right-0 cl-text-center cl-top-0 cl-w-8 md:cl-inline-block",
|
|
3507
|
-
onClick:
|
|
3537
|
+
onClick: u[0] || (u[0] = (m) => o.value = !o.value)
|
|
3508
3538
|
}, [
|
|
3509
|
-
|
|
3539
|
+
o.value ? (a(), K(r, {
|
|
3510
3540
|
key: 1,
|
|
3511
3541
|
class: "cl-inline-block",
|
|
3512
3542
|
icon: "ph:push-pin-slash"
|
|
3513
|
-
})) : (
|
|
3543
|
+
})) : (a(), K(r, {
|
|
3514
3544
|
key: 0,
|
|
3515
3545
|
class: "cl-inline-block",
|
|
3516
3546
|
icon: "ph:push-pin"
|
|
3517
3547
|
}))
|
|
3518
3548
|
]),
|
|
3519
|
-
|
|
3549
|
+
R(i.$slots, "default", ie(ve({ groupIsOpen: c })), void 0, !0)
|
|
3520
3550
|
])
|
|
3521
3551
|
], 2), [
|
|
3522
|
-
[
|
|
3552
|
+
[H, n(t)]
|
|
3523
3553
|
])
|
|
3524
3554
|
]),
|
|
3525
3555
|
_: 3
|
|
@@ -3528,7 +3558,7 @@ const Vo = {
|
|
|
3528
3558
|
};
|
|
3529
3559
|
}
|
|
3530
3560
|
});
|
|
3531
|
-
const
|
|
3561
|
+
const gc = /* @__PURE__ */ me(mc, [["__scopeId", "data-v-2b734d16"]]), bc = /* @__PURE__ */ G({
|
|
3532
3562
|
__name: "cl-ui-navigation-icon",
|
|
3533
3563
|
props: {
|
|
3534
3564
|
icon: null,
|
|
@@ -3536,13 +3566,13 @@ const dc = /* @__PURE__ */ me(uc, [["__scopeId", "data-v-2b734d16"]]), fc = /* @
|
|
|
3536
3566
|
},
|
|
3537
3567
|
setup(e) {
|
|
3538
3568
|
return (t, l) => {
|
|
3539
|
-
const
|
|
3540
|
-
return
|
|
3541
|
-
class:
|
|
3569
|
+
const o = ee("icon");
|
|
3570
|
+
return a(), d("div", {
|
|
3571
|
+
class: z(["cl-cursor-pointer cl-flex cl-h-20 cl-items-center cl-justify-center cl-text-off-white cl-transition-colors cl-w-20 hover:cl-bg-blue-light", {
|
|
3542
3572
|
"cl-bg-blue-light": e.open
|
|
3543
3573
|
}])
|
|
3544
3574
|
}, [
|
|
3545
|
-
|
|
3575
|
+
k(o, {
|
|
3546
3576
|
class: "cl-block",
|
|
3547
3577
|
icon: e.icon,
|
|
3548
3578
|
width: "24"
|
|
@@ -3550,45 +3580,45 @@ const dc = /* @__PURE__ */ me(uc, [["__scopeId", "data-v-2b734d16"]]), fc = /* @
|
|
|
3550
3580
|
], 2);
|
|
3551
3581
|
};
|
|
3552
3582
|
}
|
|
3553
|
-
}),
|
|
3583
|
+
}), hc = {
|
|
3554
3584
|
key: 0,
|
|
3555
3585
|
class: "cl-font-bold cl-leading-8 cl-mb-8 cl-pr-8 cl-select-none cl-text-blue-light cl-text-lg"
|
|
3556
|
-
},
|
|
3586
|
+
}, vc = { class: "cl-flex cl-flex-wrap cl-space-y-8 cl-text-sm cl-w-full" }, pc = /* @__PURE__ */ G({
|
|
3557
3587
|
__name: "cl-ui-navigation-group",
|
|
3558
3588
|
props: {
|
|
3559
3589
|
open: { type: Boolean }
|
|
3560
3590
|
},
|
|
3561
3591
|
setup(e) {
|
|
3562
|
-
return (t, l) => e.open ? (
|
|
3563
|
-
t.$slots.title ? (
|
|
3564
|
-
|
|
3565
|
-
])) :
|
|
3566
|
-
|
|
3567
|
-
|
|
3592
|
+
return (t, l) => e.open ? (a(), d(B, { key: 0 }, [
|
|
3593
|
+
t.$slots.title ? (a(), d("div", hc, [
|
|
3594
|
+
R(t.$slots, "title")
|
|
3595
|
+
])) : N("", !0),
|
|
3596
|
+
s("div", vc, [
|
|
3597
|
+
R(t.$slots, "default")
|
|
3568
3598
|
])
|
|
3569
|
-
], 64)) :
|
|
3599
|
+
], 64)) : N("", !0);
|
|
3570
3600
|
}
|
|
3571
|
-
}),
|
|
3601
|
+
}), yc = {}, wc = { class: "cl-w-full" }, xc = {
|
|
3572
3602
|
key: 0,
|
|
3573
3603
|
class: "cl-font-bold cl-mb-4 cl-select-none"
|
|
3574
|
-
},
|
|
3575
|
-
function
|
|
3576
|
-
return
|
|
3577
|
-
e.$slots.title ? (
|
|
3578
|
-
|
|
3579
|
-
])) :
|
|
3580
|
-
|
|
3581
|
-
|
|
3604
|
+
}, $c = { class: "cl-flex cl-flex-wrap cl-space-y-2" };
|
|
3605
|
+
function kc(e, t) {
|
|
3606
|
+
return a(), d("div", wc, [
|
|
3607
|
+
e.$slots.title ? (a(), d("div", xc, [
|
|
3608
|
+
R(e.$slots, "title")
|
|
3609
|
+
])) : N("", !0),
|
|
3610
|
+
s("span", $c, [
|
|
3611
|
+
R(e.$slots, "default")
|
|
3582
3612
|
])
|
|
3583
3613
|
]);
|
|
3584
3614
|
}
|
|
3585
|
-
const
|
|
3586
|
-
function
|
|
3587
|
-
return
|
|
3588
|
-
|
|
3615
|
+
const Tc = /* @__PURE__ */ me(yc, [["render", kc]]), Cc = {}, Sc = { class: "cl-cursor-pointer cl-transition-colors cl-w-full hover:cl-text-blue-light" };
|
|
3616
|
+
function Ec(e, t) {
|
|
3617
|
+
return a(), d("div", Sc, [
|
|
3618
|
+
R(e.$slots, "default")
|
|
3589
3619
|
]);
|
|
3590
3620
|
}
|
|
3591
|
-
const
|
|
3621
|
+
const jc = /* @__PURE__ */ me(Cc, [["render", Ec]]), Ac = { class: "cl-w-full" }, Oc = /* @__PURE__ */ G({
|
|
3592
3622
|
__name: "cl-ui-tab",
|
|
3593
3623
|
props: {
|
|
3594
3624
|
currentTab: { default: 0 },
|
|
@@ -3596,45 +3626,45 @@ const Cc = /* @__PURE__ */ me($c, [["render", Tc]]), Sc = { class: "cl-w-full" }
|
|
|
3596
3626
|
colour: { default: "default" }
|
|
3597
3627
|
},
|
|
3598
3628
|
setup(e) {
|
|
3599
|
-
const t = e, l =
|
|
3600
|
-
function
|
|
3601
|
-
return
|
|
3629
|
+
const t = e, l = q(), o = q(!1), c = q(!1);
|
|
3630
|
+
function f(m) {
|
|
3631
|
+
return m === t.currentTab;
|
|
3602
3632
|
}
|
|
3603
|
-
function
|
|
3633
|
+
function i() {
|
|
3604
3634
|
if (l.value) {
|
|
3605
|
-
const
|
|
3606
|
-
|
|
3635
|
+
const m = l.value.scrollWidth - l.value.clientWidth;
|
|
3636
|
+
o.value = l.value.scrollLeft > 0, c.value = l.value.scrollLeft < m;
|
|
3607
3637
|
} else
|
|
3608
|
-
|
|
3638
|
+
o.value = !1, c.value = !1;
|
|
3609
3639
|
}
|
|
3610
|
-
function
|
|
3611
|
-
|
|
3640
|
+
function u() {
|
|
3641
|
+
i(), window.addEventListener("resize", i);
|
|
3612
3642
|
}
|
|
3613
|
-
function r(
|
|
3643
|
+
function r(m) {
|
|
3614
3644
|
if (l.value) {
|
|
3615
|
-
const
|
|
3616
|
-
let
|
|
3617
|
-
|
|
3645
|
+
const g = l.value.scrollWidth / 5;
|
|
3646
|
+
let p = g;
|
|
3647
|
+
m === "left" && (p = -g), l.value.scroll(l.value.scrollLeft + p, 0);
|
|
3618
3648
|
}
|
|
3619
3649
|
}
|
|
3620
|
-
return Se(() =>
|
|
3621
|
-
const
|
|
3622
|
-
return
|
|
3623
|
-
|
|
3624
|
-
|
|
3650
|
+
return Se(() => u()), Me(() => window.removeEventListener("resize", i)), (m, g) => {
|
|
3651
|
+
const p = ee("icon");
|
|
3652
|
+
return a(), d("div", Ac, [
|
|
3653
|
+
s("div", null, [
|
|
3654
|
+
o.value ? (a(), d("div", {
|
|
3625
3655
|
key: 0,
|
|
3626
3656
|
class: "cl-bg-white cl-cursor-pointer cl-float-left cl-h-11 cl-w-4",
|
|
3627
|
-
onClick:
|
|
3657
|
+
onClick: g[0] || (g[0] = (b) => r("left"))
|
|
3628
3658
|
}, [
|
|
3629
|
-
|
|
3659
|
+
k(p, {
|
|
3630
3660
|
icon: "ph:caret-left",
|
|
3631
3661
|
class: "cl-mt-4 cl-text-secondary-default"
|
|
3632
3662
|
})
|
|
3633
|
-
])) :
|
|
3634
|
-
|
|
3663
|
+
])) : N("", !0),
|
|
3664
|
+
s("div", {
|
|
3635
3665
|
ref_key: "headerContainer",
|
|
3636
3666
|
ref: l,
|
|
3637
|
-
class:
|
|
3667
|
+
class: z(["cl-flex cl-overflow-x-auto", {
|
|
3638
3668
|
"cl-shadow-[inset_0_-1px_0_#eeeeee]": !e.disabled && e.colour === "default",
|
|
3639
3669
|
"cl-shadow-[inset_0_-1px_0_#9acd32]": !e.disabled && e.colour === "primary",
|
|
3640
3670
|
"cl-shadow-[inset_0_-1px_0_#30363e]": !e.disabled && e.colour === "secondary",
|
|
@@ -3643,26 +3673,26 @@ const Cc = /* @__PURE__ */ me($c, [["render", Tc]]), Sc = { class: "cl-w-full" }
|
|
|
3643
3673
|
"cl-shadow-[inset_0_-1px_0_#d7d7d7]": e.disabled,
|
|
3644
3674
|
"cl-mr-4": c.value
|
|
3645
3675
|
}]),
|
|
3646
|
-
onScrollPassive:
|
|
3676
|
+
onScrollPassive: i
|
|
3647
3677
|
}, [
|
|
3648
|
-
|
|
3678
|
+
R(m.$slots, "headings", ie(ve({ isTabOpen: f, disabled: e.disabled, colour: e.colour })))
|
|
3649
3679
|
], 34),
|
|
3650
|
-
c.value ? (
|
|
3680
|
+
c.value ? (a(), d("div", {
|
|
3651
3681
|
key: 1,
|
|
3652
3682
|
class: "cl-bg-white cl-bottom-12 cl-cursor-pointer cl-float-right cl-h-11 cl-relative cl-w-4",
|
|
3653
|
-
onClick:
|
|
3683
|
+
onClick: g[1] || (g[1] = (b) => r("right"))
|
|
3654
3684
|
}, [
|
|
3655
|
-
|
|
3685
|
+
k(p, {
|
|
3656
3686
|
icon: "ph:caret-right",
|
|
3657
3687
|
class: "cl-mt-4 cl-text-secondary-default"
|
|
3658
3688
|
})
|
|
3659
|
-
])) :
|
|
3689
|
+
])) : N("", !0)
|
|
3660
3690
|
]),
|
|
3661
|
-
|
|
3691
|
+
R(m.$slots, "content", ie(ve({ isTabOpen: f, disabled: e.disabled, colour: e.colour })))
|
|
3662
3692
|
]);
|
|
3663
3693
|
};
|
|
3664
3694
|
}
|
|
3665
|
-
}),
|
|
3695
|
+
}), Mc = ["onKeyup"], Ic = /* @__PURE__ */ G({
|
|
3666
3696
|
__name: "cl-ui-tab-header",
|
|
3667
3697
|
props: {
|
|
3668
3698
|
id: null,
|
|
@@ -3674,55 +3704,55 @@ const Cc = /* @__PURE__ */ me($c, [["render", Tc]]), Sc = { class: "cl-w-full" }
|
|
|
3674
3704
|
"update:currentTab": null
|
|
3675
3705
|
},
|
|
3676
3706
|
setup(e, { emit: t }) {
|
|
3677
|
-
const l = e,
|
|
3678
|
-
function
|
|
3679
|
-
l.disabled || (
|
|
3707
|
+
const l = e, o = q(), c = q(), f = A(() => l.id === l.currentTab);
|
|
3708
|
+
function i() {
|
|
3709
|
+
l.disabled || (o.value = !1, c.value = !1, t("update:currentTab", l.id));
|
|
3680
3710
|
}
|
|
3681
|
-
return (
|
|
3682
|
-
class:
|
|
3711
|
+
return (u, r) => (a(), d("div", {
|
|
3712
|
+
class: z(["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", {
|
|
3683
3713
|
"!cl-cursor-default cl-text-grey-4 !cl-border-grey-2": e.disabled,
|
|
3684
|
-
"cl-border cl-border-b-0 cl-rounded-t-md cl-shadow-[inset_0_-1px_0_#ffffff] cl-cursor-default":
|
|
3714
|
+
"cl-border cl-border-b-0 cl-rounded-t-md cl-shadow-[inset_0_-1px_0_#ffffff] cl-cursor-default": n(f),
|
|
3685
3715
|
"cl-border-grey-0": e.colour === "default",
|
|
3686
3716
|
"cl-border-primary-default": e.colour === "primary",
|
|
3687
3717
|
"cl-border-secondary-default": e.colour === "secondary",
|
|
3688
3718
|
"cl-border-danger-default": e.colour === "danger",
|
|
3689
3719
|
"cl-border-link-default": e.colour === "blue",
|
|
3690
|
-
"hover:cl-bg-grey-0": !
|
|
3691
|
-
"hover:cl-bg-primary-lighter": !
|
|
3692
|
-
"hover:cl-bg-secondary-light focus:cl-text-white hover:cl-text-white": !
|
|
3693
|
-
"hover:cl-bg-danger-light": !
|
|
3694
|
-
"hover:cl-bg-link-lighter": !
|
|
3695
|
-
"cl-bg-grey-0":
|
|
3696
|
-
"cl-bg-primary-lighter":
|
|
3697
|
-
"cl-bg-secondary-light cl-text-white":
|
|
3698
|
-
"cl-bg-danger-light":
|
|
3699
|
-
"cl-bg-link-lighter":
|
|
3720
|
+
"hover:cl-bg-grey-0": !n(f) && !e.disabled && e.colour === "default",
|
|
3721
|
+
"hover:cl-bg-primary-lighter": !n(f) && !e.disabled && e.colour === "primary",
|
|
3722
|
+
"hover:cl-bg-secondary-light focus:cl-text-white hover:cl-text-white": !n(f) && !e.disabled && e.colour === "secondary",
|
|
3723
|
+
"hover:cl-bg-danger-light": !n(f) && !e.disabled && e.colour === "danger",
|
|
3724
|
+
"hover:cl-bg-link-lighter": !n(f) && !e.disabled && e.colour === "blue",
|
|
3725
|
+
"cl-bg-grey-0": o.value && !e.disabled && e.colour === "default",
|
|
3726
|
+
"cl-bg-primary-lighter": o.value && !e.disabled && e.colour === "primary",
|
|
3727
|
+
"cl-bg-secondary-light cl-text-white": o.value && !e.disabled && e.colour === "secondary",
|
|
3728
|
+
"cl-bg-danger-light": o.value && !e.disabled && e.colour === "danger",
|
|
3729
|
+
"cl-bg-link-lighter": o.value && !e.disabled && e.colour === "blue"
|
|
3700
3730
|
}]),
|
|
3701
3731
|
tabindex: "0",
|
|
3702
|
-
onClick:
|
|
3703
|
-
onMouseover: r[0] || (r[0] = (
|
|
3704
|
-
onMouseout: r[1] || (r[1] = (
|
|
3705
|
-
onFocusin: r[2] || (r[2] = (
|
|
3706
|
-
onFocusout: r[3] || (r[3] = (
|
|
3707
|
-
onKeyup: Ce(
|
|
3732
|
+
onClick: i,
|
|
3733
|
+
onMouseover: r[0] || (r[0] = (m) => c.value = !0),
|
|
3734
|
+
onMouseout: r[1] || (r[1] = (m) => c.value = !1),
|
|
3735
|
+
onFocusin: r[2] || (r[2] = (m) => o.value = !0),
|
|
3736
|
+
onFocusout: r[3] || (r[3] = (m) => o.value = !1),
|
|
3737
|
+
onKeyup: Ce(ae(i, ["self"]), ["enter"])
|
|
3708
3738
|
}, [
|
|
3709
|
-
|
|
3710
|
-
], 42,
|
|
3739
|
+
R(u.$slots, "default")
|
|
3740
|
+
], 42, Mc));
|
|
3711
3741
|
}
|
|
3712
|
-
}),
|
|
3713
|
-
function
|
|
3714
|
-
return
|
|
3742
|
+
}), Nc = {};
|
|
3743
|
+
function qc(e, t) {
|
|
3744
|
+
return R(e.$slots, "default");
|
|
3715
3745
|
}
|
|
3716
|
-
const
|
|
3746
|
+
const Dc = /* @__PURE__ */ me(Nc, [["render", qc]]), Rc = [
|
|
3717
3747
|
"default",
|
|
3718
3748
|
"primary",
|
|
3719
3749
|
"secondary",
|
|
3720
3750
|
"danger",
|
|
3721
3751
|
"blue"
|
|
3722
|
-
],
|
|
3752
|
+
], Uc = [
|
|
3723
3753
|
"left",
|
|
3724
3754
|
"right"
|
|
3725
|
-
],
|
|
3755
|
+
], zc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3726
3756
|
__proto__: null,
|
|
3727
3757
|
clUiAccordion: dl,
|
|
3728
3758
|
clUiAccordionItem: hl,
|
|
@@ -3737,7 +3767,7 @@ const Ic = /* @__PURE__ */ me(Oc, [["render", Mc]]), Nc = [
|
|
|
3737
3767
|
isComboBoxItem: Dt,
|
|
3738
3768
|
isComboBoxCreateRequest: Rt,
|
|
3739
3769
|
clUiFooter: Ht,
|
|
3740
|
-
clUiGrid:
|
|
3770
|
+
clUiGrid: Ao,
|
|
3741
3771
|
gridColumnTypes: Yt,
|
|
3742
3772
|
isGridColumn: tl,
|
|
3743
3773
|
isGridColumnArray: Xt,
|
|
@@ -3746,32 +3776,32 @@ const Ic = /* @__PURE__ */ me(Oc, [["render", Mc]]), Nc = [
|
|
|
3746
3776
|
filterMethodTypes: en,
|
|
3747
3777
|
isFilterRequest: nn,
|
|
3748
3778
|
isFilterResponse: on,
|
|
3749
|
-
clUiHeader:
|
|
3750
|
-
clUiHeaderMenu:
|
|
3779
|
+
clUiHeader: qo,
|
|
3780
|
+
clUiHeaderMenu: Vo,
|
|
3751
3781
|
clUiInput: fe,
|
|
3752
|
-
inputTypes:
|
|
3753
|
-
clUiLanguageSwitcher:
|
|
3782
|
+
inputTypes: Fo,
|
|
3783
|
+
clUiLanguageSwitcher: Qo,
|
|
3754
3784
|
isLanguageLocaleFormat: Be,
|
|
3755
|
-
isLanguageArray:
|
|
3785
|
+
isLanguageArray: Ho,
|
|
3756
3786
|
clUiLoadingSpinner: el,
|
|
3757
|
-
clUiLogin:
|
|
3787
|
+
clUiLogin: ic,
|
|
3758
3788
|
clUiModal: ll,
|
|
3759
|
-
modalSizes:
|
|
3760
|
-
modalColours:
|
|
3761
|
-
clUiNavigation:
|
|
3762
|
-
clUiNavigationIcon:
|
|
3763
|
-
clUiNavigationGroup:
|
|
3764
|
-
clUiNavigationSection:
|
|
3765
|
-
clUiNavigationItem:
|
|
3789
|
+
modalSizes: sc,
|
|
3790
|
+
modalColours: rc,
|
|
3791
|
+
clUiNavigation: gc,
|
|
3792
|
+
clUiNavigationIcon: bc,
|
|
3793
|
+
clUiNavigationGroup: pc,
|
|
3794
|
+
clUiNavigationSection: Tc,
|
|
3795
|
+
clUiNavigationItem: jc,
|
|
3766
3796
|
clUiNotification: _e,
|
|
3767
|
-
clUiTab:
|
|
3768
|
-
clUiTabHeader:
|
|
3769
|
-
clUiTabContent:
|
|
3770
|
-
tabColours:
|
|
3771
|
-
tabScroll:
|
|
3797
|
+
clUiTab: Oc,
|
|
3798
|
+
clUiTabHeader: Ic,
|
|
3799
|
+
clUiTabContent: Dc,
|
|
3800
|
+
tabColours: Rc,
|
|
3801
|
+
tabScroll: Uc
|
|
3772
3802
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3773
|
-
const
|
|
3774
|
-
e.use(
|
|
3803
|
+
const Zc = (e) => {
|
|
3804
|
+
e.use(oe), e.component("Icon", nl), Object.entries(zc).forEach(([
|
|
3775
3805
|
t,
|
|
3776
3806
|
l
|
|
3777
3807
|
]) => {
|
|
@@ -3779,9 +3809,9 @@ const Wc = (e) => {
|
|
|
3779
3809
|
});
|
|
3780
3810
|
};
|
|
3781
3811
|
export {
|
|
3782
|
-
|
|
3812
|
+
Q as DateFormat,
|
|
3783
3813
|
ye as FilterOperation,
|
|
3784
|
-
|
|
3814
|
+
ne as NumberFormat,
|
|
3785
3815
|
Ml as buttonColours,
|
|
3786
3816
|
Il as buttonSizes,
|
|
3787
3817
|
Dl as cardSizes,
|
|
@@ -3793,50 +3823,50 @@ export {
|
|
|
3793
3823
|
ql as clUiCard,
|
|
3794
3824
|
qt as clUiComboBox,
|
|
3795
3825
|
Ht as clUiFooter,
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3826
|
+
Ao as clUiGrid,
|
|
3827
|
+
qo as clUiHeader,
|
|
3828
|
+
Vo as clUiHeaderMenu,
|
|
3799
3829
|
fe as clUiInput,
|
|
3800
|
-
|
|
3830
|
+
Qo as clUiLanguageSwitcher,
|
|
3801
3831
|
el as clUiLoadingSpinner,
|
|
3802
|
-
|
|
3832
|
+
ic as clUiLogin,
|
|
3803
3833
|
ll as clUiModal,
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3834
|
+
gc as clUiNavigation,
|
|
3835
|
+
pc as clUiNavigationGroup,
|
|
3836
|
+
bc as clUiNavigationIcon,
|
|
3837
|
+
jc as clUiNavigationItem,
|
|
3838
|
+
Tc as clUiNavigationSection,
|
|
3809
3839
|
_e as clUiNotification,
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3840
|
+
Oc as clUiTab,
|
|
3841
|
+
Dc as clUiTabContent,
|
|
3842
|
+
Ic as clUiTabHeader,
|
|
3813
3843
|
zl as datetimeFormats,
|
|
3814
|
-
|
|
3844
|
+
Zc as default,
|
|
3815
3845
|
en as filterMethodTypes,
|
|
3816
3846
|
Yt as gridColumnTypes,
|
|
3817
|
-
|
|
3818
|
-
|
|
3847
|
+
oe as i18n,
|
|
3848
|
+
Fo as inputTypes,
|
|
3819
3849
|
Rt as isComboBoxCreateRequest,
|
|
3820
3850
|
Dt as isComboBoxItem,
|
|
3821
3851
|
nn as isFilterRequest,
|
|
3822
3852
|
on as isFilterResponse,
|
|
3823
3853
|
tl as isGridColumn,
|
|
3824
3854
|
Xt as isGridColumnArray,
|
|
3825
|
-
|
|
3855
|
+
Ho as isLanguageArray,
|
|
3826
3856
|
Be as isLanguageLocaleFormat,
|
|
3827
3857
|
Rl as messages,
|
|
3828
|
-
|
|
3829
|
-
|
|
3858
|
+
rc as modalColours,
|
|
3859
|
+
sc as modalSizes,
|
|
3830
3860
|
Ul as numberFormats,
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3861
|
+
Kc as setCurrentLocale,
|
|
3862
|
+
Jc as setLocaleDateTimeFormats,
|
|
3863
|
+
Gc as setLocaleMessages,
|
|
3864
|
+
Wc as setLocaleNumberFormats,
|
|
3865
|
+
Fe as showNotification,
|
|
3836
3866
|
_t as stringFormats,
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3867
|
+
Rc as tabColours,
|
|
3868
|
+
Uc as tabScroll,
|
|
3869
|
+
Vl as validateEmail,
|
|
3840
3870
|
Ll as validateMaxValue,
|
|
3841
3871
|
Bl as validateMinValue
|
|
3842
3872
|
};
|