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