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