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