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