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