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