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