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