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