@vc-shell/framework 2.6.3-rc.0-pr382.bbfef18 → 2.6.3-rc.0-pr384.f7327e1
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/chunks/{VcScheduler.vue_vue_type_script_setup_true_lang-BIWhe0BG.js → VcScheduler.vue_vue_type_script_setup_true_lang-BgGimsn-.js} +1 -1
- package/dist/chunks/{VcScheduler.vue_vue_type_script_setup_true_lang-BIWhe0BG.js.map → VcScheduler.vue_vue_type_script_setup_true_lang-BgGimsn-.js.map} +1 -1
- package/dist/chunks/{VcScheduler.vue_vue_type_style_index_0_lang-osk-b3-5.js → VcScheduler.vue_vue_type_style_index_0_lang-QuNQXchQ.js} +1196 -1192
- package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-QuNQXchQ.js.map +1 -0
- package/dist/chunks/{dashboard-feed-row.vue_vue_type_script_setup_true_lang-aW4RDDS1.js → dashboard-feed-row.vue_vue_type_script_setup_true_lang-Byx05jmm.js} +1 -1
- package/dist/chunks/{dashboard-feed-row.vue_vue_type_script_setup_true_lang-aW4RDDS1.js.map → dashboard-feed-row.vue_vue_type_script_setup_true_lang-Byx05jmm.js.map} +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/framework.js +9 -9
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +2 -1
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
- package/dist/ui/index.js +2 -2
- package/package.json +4 -4
- package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-osk-b3-5.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { mergeProps as
|
|
2
|
-
import { c as
|
|
3
|
-
import { defineRule as
|
|
1
|
+
import { mergeProps as ne, computed as I, toValue as ye, inject as J, useId as ln, ref as S, onBeforeUnmount as rt, reactive as Ze, provide as Et, getCurrentScope as on, onScopeDispose as rn, getCurrentInstance as We, onErrorCaptured as sn, nextTick as $e, defineComponent as F, watch as G, unref as s, openBlock as f, createElementBlock as y, normalizeClass as H, createBlock as P, createCommentVNode as $, renderSlot as x, createElementVNode as C, toDisplayString as M, Fragment as Be, renderList as st, normalizeStyle as Ve, resolveDynamicComponent as ut, withCtx as w, withKeys as Q, withModifiers as Y, createVNode as T, watchEffect as tt, shallowReactive as nt, markRaw as at, createSlots as re, createTextVNode as _, Transition as Pe, withDirectives as ct, vModelText as un, useAttrs as Lt, vModelDynamic as cn, onMounted as je, onUnmounted as Bt, Teleport as dn, normalizeProps as Ae, guardReactiveProps as Ne } from "vue";
|
|
2
|
+
import { c as me, ai as fn, P as vn, x as gn, t as mn, q as pn, I as bn, s as yn, r as hn, B as Ct, b as kn, i as Sn, _ as K, T as xt, a as Tt, X as In, y as $n, u as wn } from "./VcAiAgentPanel.vue_vue_type_style_index_0_lang-BO4n-ICh.js";
|
|
3
|
+
import { defineRule as Ce, Field as On } from "vee-validate";
|
|
4
4
|
import { a as kt } from "./vendor-vee-validate-rules-4oWUZPpG.js";
|
|
5
5
|
import { a as Rt, s as En, c as Ln, b as Qe, e as De } from "./vendor-lodash-es-D2n90GJy.js";
|
|
6
6
|
import { X as Bn } from "./vendor-microsoft-applicationinsights-core-js-CR3vyuZc.js";
|
|
7
7
|
import { d as Mt, e as Cn, f as xn, g as Tn } from "./vendor-vueuse-core-BwXFv1rx.js";
|
|
8
|
-
import { c as Rn, u as
|
|
8
|
+
import { c as Rn, u as Oe } from "./vendor-vue-i18n-LO-EJStU.js";
|
|
9
9
|
import { j as Mn } from "./vendor-vueuse-shared-BPTQMqzb.js";
|
|
10
10
|
import { k as An } from "./vendor-tiptap-core-CZbeo7XQ.js";
|
|
11
11
|
import "./vendor-tiptap-extension-text-style-Bc6nvmn0.js";
|
|
@@ -15,9 +15,9 @@ import { u as Pn } from "./vendor-floating-ui-vue-sCrhit51.js";
|
|
|
15
15
|
import { f as At, s as Nt, o as lt, b as Fn } from "./vendor-floating-ui-dom-BvVXFZ4B.js";
|
|
16
16
|
import { v as zn } from "./vendor-vueuse-components-BTQXlUpM.js";
|
|
17
17
|
import { p as Dt } from "./vendor-dompurify-DpIUMBYC.js";
|
|
18
|
-
import { S as
|
|
18
|
+
import { S as Ie, h as qn, T as Un } from "./vendor-date-fns-C-55OMpS.js";
|
|
19
19
|
import { t as Kn } from "./vendor-truncate-html-ChA1T5zy.js";
|
|
20
|
-
const
|
|
20
|
+
const we = Rn({
|
|
21
21
|
legacy: !1,
|
|
22
22
|
globalInjection: !0,
|
|
23
23
|
locale: "en",
|
|
@@ -27,9 +27,9 @@ const $e = Rn({
|
|
|
27
27
|
function ot() {
|
|
28
28
|
return Math.random().toString(36).substring(2, 9);
|
|
29
29
|
}
|
|
30
|
-
class
|
|
30
|
+
class se extends Error {
|
|
31
31
|
constructor(t, n, a) {
|
|
32
|
-
super(t), this.code = n, this.context = a, this.name = "FrameworkError", Error.captureStackTrace && Error.captureStackTrace(this,
|
|
32
|
+
super(t), this.code = n, this.context = a, this.name = "FrameworkError", Error.captureStackTrace && Error.captureStackTrace(this, se);
|
|
33
33
|
}
|
|
34
34
|
toJSON() {
|
|
35
35
|
return {
|
|
@@ -41,17 +41,17 @@ class ie extends Error {
|
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
class Fi extends
|
|
44
|
+
class Fi extends se {
|
|
45
45
|
constructor(t, n) {
|
|
46
46
|
super(t, "VALIDATION_ERROR", n), this.name = "ValidationError";
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
class zi extends
|
|
49
|
+
class zi extends se {
|
|
50
50
|
constructor(t, n) {
|
|
51
51
|
super(t, "SERVICE_ERROR", n), this.name = "ServiceError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
class Wn extends
|
|
54
|
+
class Wn extends se {
|
|
55
55
|
constructor(t, n) {
|
|
56
56
|
super(`${t} not provided. Make sure to call the corresponding 'provide' function.`, "INJECTION_ERROR", {
|
|
57
57
|
serviceName: t,
|
|
@@ -59,7 +59,7 @@ class Wn extends ie {
|
|
|
59
59
|
}), this.name = "InjectionError";
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
class qi extends
|
|
62
|
+
class qi extends se {
|
|
63
63
|
constructor(t, n, a) {
|
|
64
64
|
super(`Failed to register '${t}': ${n}`, "REGISTRATION_ERROR", {
|
|
65
65
|
componentName: t,
|
|
@@ -67,7 +67,7 @@ class qi extends ie {
|
|
|
67
67
|
}), this.name = "RegistrationError";
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
class Ui extends
|
|
70
|
+
class Ui extends se {
|
|
71
71
|
constructor(t, n, a) {
|
|
72
72
|
super(t, "BLADE_ERROR", {
|
|
73
73
|
bladeId: n,
|
|
@@ -75,7 +75,7 @@ class Ui extends ie {
|
|
|
75
75
|
}), this.name = "BladeError";
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
class Ki extends
|
|
78
|
+
class Ki extends se {
|
|
79
79
|
constructor(t, n, a) {
|
|
80
80
|
super(`Failed to load module '${t}': ${n}`, "MODULE_LOAD_ERROR", {
|
|
81
81
|
moduleId: t,
|
|
@@ -84,15 +84,15 @@ class Ki extends ie {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
function jn(e) {
|
|
87
|
-
return e instanceof
|
|
87
|
+
return e instanceof se;
|
|
88
88
|
}
|
|
89
89
|
function Wi(e, t = "UNKNOWN_ERROR") {
|
|
90
|
-
return jn(e) ? e : e instanceof Error ? new
|
|
90
|
+
return jn(e) ? e : e instanceof Error ? new se(e.message, t, {
|
|
91
91
|
originalError: e.name,
|
|
92
92
|
stack: e.stack
|
|
93
|
-
}) : new
|
|
93
|
+
}) : new se(String(e), t);
|
|
94
94
|
}
|
|
95
|
-
class
|
|
95
|
+
class he extends Error {
|
|
96
96
|
details;
|
|
97
97
|
originalError;
|
|
98
98
|
constructor(t, n, a) {
|
|
@@ -103,7 +103,7 @@ function Hn(e) {
|
|
|
103
103
|
return e instanceof Error && typeof e.status == "number" && typeof e.response == "string";
|
|
104
104
|
}
|
|
105
105
|
function qe(e) {
|
|
106
|
-
if (e instanceof
|
|
106
|
+
if (e instanceof he)
|
|
107
107
|
return e;
|
|
108
108
|
if (Hn(e)) {
|
|
109
109
|
const { status: t, response: n } = e;
|
|
@@ -111,32 +111,32 @@ function qe(e) {
|
|
|
111
111
|
return qe(JSON.parse(n));
|
|
112
112
|
} catch {
|
|
113
113
|
const a = `${t}: ${e.message || "Error"}`;
|
|
114
|
-
return new
|
|
114
|
+
return new he(a, n || e.message, e);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
if (e instanceof Error && "response" in e && e.response)
|
|
118
118
|
return qe(e.response);
|
|
119
119
|
if (e instanceof Error)
|
|
120
|
-
return new
|
|
120
|
+
return new he(e.message, e.stack || String(e), e);
|
|
121
121
|
if (typeof e == "string")
|
|
122
122
|
try {
|
|
123
123
|
const t = JSON.parse(e);
|
|
124
124
|
return qe(t);
|
|
125
125
|
} catch {
|
|
126
|
-
return new
|
|
126
|
+
return new he(e, e, e);
|
|
127
127
|
}
|
|
128
128
|
if (typeof e == "object" && e !== null) {
|
|
129
129
|
const t = e;
|
|
130
130
|
if ("status" in t && "data" in t) {
|
|
131
|
-
const o = t.status, i = t.statusText || "Error", l = `${o}: ${i}`,
|
|
131
|
+
const o = t.status, i = t.statusText || "Error", l = `${o}: ${i}`, r = t.data;
|
|
132
132
|
let u = "";
|
|
133
|
-
return
|
|
134
|
-
`) : typeof
|
|
133
|
+
return r ? typeof r.exceptionMessage == "string" ? u = r.exceptionMessage : typeof r.message == "string" ? u = r.message : Array.isArray(r.errors) ? u = r.errors.join(`
|
|
134
|
+
`) : typeof r == "string" ? u = r : u = JSON.stringify(r, null, 2) : u = JSON.stringify(t, null, 2), new he(l, u, e);
|
|
135
135
|
}
|
|
136
136
|
const n = t.message || "An unexpected error occurred.", a = t.stack || JSON.stringify(t, null, 2);
|
|
137
|
-
return new
|
|
137
|
+
return new he(n, a, e);
|
|
138
138
|
}
|
|
139
|
-
return new
|
|
139
|
+
return new he("An unknown error occurred.", String(e), e);
|
|
140
140
|
}
|
|
141
141
|
const Gn = [
|
|
142
142
|
["LLLL", "PPPp"],
|
|
@@ -163,18 +163,18 @@ function Jn(e) {
|
|
|
163
163
|
t = t.replace(n, a);
|
|
164
164
|
return t;
|
|
165
165
|
}
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
const ve = /* @__PURE__ */ new Map();
|
|
167
|
+
ve.set("en-US", Ie);
|
|
168
|
+
ve.set("en", Ie);
|
|
169
169
|
async function Xn(e) {
|
|
170
|
-
if (
|
|
171
|
-
return
|
|
170
|
+
if (ve.has(e))
|
|
171
|
+
return ve.get(e);
|
|
172
172
|
try {
|
|
173
173
|
const t = await import(
|
|
174
174
|
/* @vite-ignore */
|
|
175
175
|
`date-fns/locale/${e}`
|
|
176
|
-
), n = e.replace("-", ""), a = t.default ?? t[n] ??
|
|
177
|
-
return
|
|
176
|
+
), n = e.replace("-", ""), a = t.default ?? t[n] ?? Ie;
|
|
177
|
+
return ve.set(e, a), a;
|
|
178
178
|
} catch {
|
|
179
179
|
const t = e.split("-")[0];
|
|
180
180
|
if (t !== e)
|
|
@@ -182,15 +182,15 @@ async function Xn(e) {
|
|
|
182
182
|
const n = await import(
|
|
183
183
|
/* @vite-ignore */
|
|
184
184
|
`date-fns/locale/${t}`
|
|
185
|
-
), a = n.default ?? n[t] ??
|
|
186
|
-
return
|
|
185
|
+
), a = n.default ?? n[t] ?? Ie;
|
|
186
|
+
return ve.set(e, a), a;
|
|
187
187
|
} catch {
|
|
188
188
|
}
|
|
189
|
-
return
|
|
189
|
+
return ve.set(e, Ie), Ie;
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
function Vt(e) {
|
|
193
|
-
return
|
|
193
|
+
return ve.has(e) ? ve.get(e) : (Xn(e), Ie);
|
|
194
194
|
}
|
|
195
195
|
function Pt(e) {
|
|
196
196
|
if (e == null || e === "") return null;
|
|
@@ -210,7 +210,7 @@ function Qn(e, t, n) {
|
|
|
210
210
|
const o = Jn(t), i = n ? Vt(n) : void 0;
|
|
211
211
|
return qn(a, o, { locale: i });
|
|
212
212
|
}
|
|
213
|
-
const _n =
|
|
213
|
+
const _n = me("color-utils");
|
|
214
214
|
function ea(e) {
|
|
215
215
|
if (!e || typeof e != "string")
|
|
216
216
|
return null;
|
|
@@ -237,8 +237,8 @@ function na(e, t) {
|
|
|
237
237
|
const n = e.lastIndexOf("/"), a = e.indexOf("?", n), i = (a > -1 ? e.slice(n + 1, a) : e.slice(n + 1)).lastIndexOf(".");
|
|
238
238
|
if (i <= 0)
|
|
239
239
|
return e;
|
|
240
|
-
const l = n + 1 + i,
|
|
241
|
-
return `${
|
|
240
|
+
const l = n + 1 + i, r = e.slice(0, l), u = e.slice(l);
|
|
241
|
+
return `${r}_${t}${u}`;
|
|
242
242
|
}
|
|
243
243
|
function ji(e) {
|
|
244
244
|
return e <= 64 ? "64x64" : e <= 128 ? "128x128" : e <= 168 ? "168x168" : e <= 216 ? "216x216" : e <= 348 ? "348x348" : "lg";
|
|
@@ -306,17 +306,17 @@ function la() {
|
|
|
306
306
|
hasAccess: t
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
|
-
const
|
|
309
|
+
const Se = me("notification"), be = aa();
|
|
310
310
|
function oa(e) {
|
|
311
|
-
|
|
311
|
+
be.register(e);
|
|
312
312
|
}
|
|
313
313
|
function Fe(e, t) {
|
|
314
|
-
const n =
|
|
314
|
+
const n = be.get();
|
|
315
315
|
if (!n) {
|
|
316
|
-
|
|
316
|
+
Se.debug("Backend not yet registered — notification call ignored.");
|
|
317
317
|
return;
|
|
318
318
|
}
|
|
319
|
-
return t =
|
|
319
|
+
return t = ne(
|
|
320
320
|
n.defaultOptions,
|
|
321
321
|
t
|
|
322
322
|
), (!t.notificationId || typeof t.notificationId != "string" && typeof t.notificationId != "number") && (t.notificationId = ot()), t = {
|
|
@@ -324,22 +324,22 @@ function Fe(e, t) {
|
|
|
324
324
|
content: e
|
|
325
325
|
}, n.appendInstance(t), t.notificationId;
|
|
326
326
|
}
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
327
|
+
const ce = (e, t) => Fe(e, { ...t, type: "default" });
|
|
328
|
+
ce.error = (e, t) => Fe(e, { ...t, type: "error" });
|
|
329
|
+
ce.warning = (e, t) => Fe(e, { ...t, type: "warning" });
|
|
330
|
+
ce.success = (e, t) => Fe(e, { ...t, type: "success" });
|
|
331
|
+
ce.clearAll = () => {
|
|
332
|
+
be.get()?.actions.clear();
|
|
333
333
|
};
|
|
334
|
-
|
|
335
|
-
const t =
|
|
334
|
+
ce.remove = (e) => {
|
|
335
|
+
const t = be.get();
|
|
336
336
|
t && (e ? t.actions.dismiss(e) : t.actions.clear());
|
|
337
337
|
};
|
|
338
|
-
|
|
339
|
-
const n =
|
|
338
|
+
ce.update = (e, t) => {
|
|
339
|
+
const n = be.get();
|
|
340
340
|
if (!n) return e;
|
|
341
341
|
if (!n.hasNotification(e))
|
|
342
|
-
return
|
|
342
|
+
return Se.warn(`Cannot update: notification with ID ${e} not found`), e;
|
|
343
343
|
const a = n.getNotification(String(e));
|
|
344
344
|
if (a)
|
|
345
345
|
if (t.position && t.position !== a.position) {
|
|
@@ -362,25 +362,25 @@ ue.update = (e, t) => {
|
|
|
362
362
|
}
|
|
363
363
|
return e;
|
|
364
364
|
};
|
|
365
|
-
|
|
366
|
-
const t =
|
|
365
|
+
ce.setPosition = (e) => {
|
|
366
|
+
const t = be.get();
|
|
367
367
|
t && (t.defaultOptions.position = e);
|
|
368
368
|
};
|
|
369
|
-
|
|
370
|
-
const t =
|
|
369
|
+
ce.clearPosition = (e) => {
|
|
370
|
+
const t = be.get();
|
|
371
371
|
if (!t) return;
|
|
372
372
|
t.getAllNotifications().filter((a) => (a.position || t.defaultOptions.position) === e).forEach((a) => {
|
|
373
373
|
a.notificationId && t.actions.dismiss(a.notificationId);
|
|
374
374
|
});
|
|
375
375
|
};
|
|
376
|
-
|
|
377
|
-
const e =
|
|
376
|
+
ce.debug = () => {
|
|
377
|
+
const e = be.get();
|
|
378
378
|
if (!e)
|
|
379
|
-
return
|
|
379
|
+
return Se.debug("Backend not registered"), { active: [], defaultOptions: {} };
|
|
380
380
|
Object.entries(e.defaultOptions).forEach(([n, a]) => {
|
|
381
|
-
|
|
381
|
+
Se.debug(`Default option ${n}: `, a);
|
|
382
382
|
}), Object.entries(e.actions).forEach(([n]) => {
|
|
383
|
-
|
|
383
|
+
Se.debug(`Available action: ${n}`);
|
|
384
384
|
});
|
|
385
385
|
const t = e.getAllNotifications().reduce((n, a) => {
|
|
386
386
|
const o = a.position || e.defaultOptions.position;
|
|
@@ -391,7 +391,7 @@ ue.debug = () => {
|
|
|
391
391
|
}), n;
|
|
392
392
|
}, {});
|
|
393
393
|
return Object.entries(t).forEach(([n, a]) => {
|
|
394
|
-
|
|
394
|
+
Se.debug(`Position ${n}: ${a.length} notifications`), a.forEach((o) => Se.debug(` - ${o.id} (${o.type}): ${o.content}`));
|
|
395
395
|
}), {
|
|
396
396
|
active: e.getAllNotifications(),
|
|
397
397
|
defaultOptions: e.defaultOptions
|
|
@@ -399,17 +399,17 @@ ue.debug = () => {
|
|
|
399
399
|
};
|
|
400
400
|
const ia = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
401
401
|
__proto__: null,
|
|
402
|
-
notification:
|
|
402
|
+
notification: ce,
|
|
403
403
|
setNotificationBackend: oa
|
|
404
404
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
405
405
|
function ra(e, t, n = {}) {
|
|
406
|
-
const a =
|
|
407
|
-
const u =
|
|
406
|
+
const a = I(() => ye(n.placement) ?? "bottom"), o = I(() => ye(n.strategy) ?? "absolute"), i = I(() => {
|
|
407
|
+
const u = ye(n.middleware);
|
|
408
408
|
if (u?.length)
|
|
409
409
|
return u;
|
|
410
410
|
const v = [];
|
|
411
|
-
|
|
412
|
-
const m =
|
|
411
|
+
ye(n.enableFlip) !== !1 && v.push(At({ padding: n.shiftPadding ?? 8 })), ye(n.enableShift) !== !1 && v.push(Nt({ padding: n.shiftPadding ?? 8 }));
|
|
412
|
+
const m = ye(n.offset);
|
|
413
413
|
return typeof m == "number" ? v.push(lt(m)) : v.push(
|
|
414
414
|
lt({
|
|
415
415
|
mainAxis: m?.mainAxis ?? 0,
|
|
@@ -420,23 +420,23 @@ function ra(e, t, n = {}) {
|
|
|
420
420
|
}), l = Pn(e, t, {
|
|
421
421
|
placement: a,
|
|
422
422
|
strategy: o,
|
|
423
|
-
whileElementsMounted:
|
|
423
|
+
whileElementsMounted: ye(n.autoUpdate) === !1 ? void 0 : Fn,
|
|
424
424
|
middleware: i
|
|
425
|
-
}),
|
|
425
|
+
}), r = I(() => ({
|
|
426
426
|
position: o.value,
|
|
427
427
|
top: `${l.y.value ?? 0}px`,
|
|
428
428
|
left: `${l.x.value ?? 0}px`
|
|
429
429
|
}));
|
|
430
430
|
return {
|
|
431
431
|
...l,
|
|
432
|
-
floatingStyle:
|
|
432
|
+
floatingStyle: r,
|
|
433
433
|
resolvedPlacement: a,
|
|
434
434
|
resolvedStrategy: o
|
|
435
435
|
};
|
|
436
436
|
}
|
|
437
437
|
const sa = Symbol("vc-input-group-context");
|
|
438
438
|
function He(e) {
|
|
439
|
-
const t =
|
|
439
|
+
const t = J(sa, null), n = ln(), a = I(() => `vc-field-${n}`), o = I(() => `${a.value}-label`), i = I(() => `${a.value}-error`), l = I(() => `${a.value}-hint`), r = I(() => !!e.error || !!e.errorMessage || !!t?.invalid.value), u = I(() => !!e.disabled || !!t?.disabled.value), v = I(() => t?.name.value || e.name), m = I(() => e.required ? !0 : void 0), g = I(() => {
|
|
440
440
|
const d = /* @__PURE__ */ new Set();
|
|
441
441
|
return t?.describedBy.value && t.describedBy.value.split(/\s+/).forEach((c) => d.add(c)), e.errorMessage && d.add(i.value), e.hint && d.add(l.value), d.size ? Array.from(d).join(" ") : void 0;
|
|
442
442
|
});
|
|
@@ -445,7 +445,7 @@ function He(e) {
|
|
|
445
445
|
labelId: o,
|
|
446
446
|
errorId: i,
|
|
447
447
|
hintId: l,
|
|
448
|
-
invalid:
|
|
448
|
+
invalid: r,
|
|
449
449
|
resolvedDisabled: u,
|
|
450
450
|
resolvedName: v,
|
|
451
451
|
ariaRequired: m,
|
|
@@ -468,7 +468,7 @@ function ua(e, t = {}) {
|
|
|
468
468
|
}
|
|
469
469
|
a.value = v.scrollTop > 0, o.value = !Ft(v);
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function r(v) {
|
|
472
472
|
u();
|
|
473
473
|
const m = e.value;
|
|
474
474
|
if (!m) return;
|
|
@@ -485,21 +485,21 @@ function ua(e, t = {}) {
|
|
|
485
485
|
}), {
|
|
486
486
|
canScrollUp: a,
|
|
487
487
|
canScrollDown: o,
|
|
488
|
-
startScroll:
|
|
488
|
+
startScroll: r,
|
|
489
489
|
stopScroll: u,
|
|
490
490
|
updateScrollState: l
|
|
491
491
|
};
|
|
492
492
|
}
|
|
493
|
-
function
|
|
494
|
-
return
|
|
493
|
+
function Ee() {
|
|
494
|
+
return J(vn, S(!1));
|
|
495
495
|
}
|
|
496
496
|
Object.keys(kt).forEach((e) => {
|
|
497
|
-
|
|
497
|
+
Ce(e, kt[e]);
|
|
498
498
|
});
|
|
499
499
|
const ca = (e, [t, n]) => {
|
|
500
500
|
if (!e?.files || !e.files?.length)
|
|
501
501
|
return !0;
|
|
502
|
-
const a = (l,
|
|
502
|
+
const a = (l, r, u) => {
|
|
503
503
|
const v = window.URL || window.webkitURL;
|
|
504
504
|
return new Promise((m) => {
|
|
505
505
|
const g = new Image(), d = v.createObjectURL(l);
|
|
@@ -507,49 +507,49 @@ const ca = (e, [t, n]) => {
|
|
|
507
507
|
v.revokeObjectURL(d), m(!1);
|
|
508
508
|
}, g.onload = () => {
|
|
509
509
|
v.revokeObjectURL(d);
|
|
510
|
-
const c = g.width >= Number(
|
|
511
|
-
m(c ? !0 :
|
|
510
|
+
const c = g.width >= Number(r) && g.height >= Number(u);
|
|
511
|
+
m(c ? !0 : we.global.t("messages.min_dimensions.error", { width: r, height: u }));
|
|
512
512
|
}, g.src = d;
|
|
513
513
|
});
|
|
514
514
|
}, o = [], i = e.files;
|
|
515
515
|
for (let l = 0; l < i.length; l++) {
|
|
516
516
|
if (!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(i[l].name))
|
|
517
|
-
return Promise.resolve(
|
|
517
|
+
return Promise.resolve(we.global.t("messages.min_dimensions.not_image_error"));
|
|
518
518
|
o.push(i[l]);
|
|
519
519
|
}
|
|
520
520
|
return Promise.all(o.map((l) => a(l, t, n))).then((l) => {
|
|
521
|
-
const
|
|
522
|
-
return
|
|
521
|
+
const r = l.find((u) => u !== !0);
|
|
522
|
+
return r === !1 || typeof r == "string" ? r : !0;
|
|
523
523
|
});
|
|
524
524
|
};
|
|
525
|
-
|
|
525
|
+
Ce("mindimensions", ca);
|
|
526
526
|
const da = (e, [t]) => {
|
|
527
527
|
if (!e?.files || !e.files?.length)
|
|
528
528
|
return !0;
|
|
529
|
-
const n = t * 1e3, a = (
|
|
530
|
-
for (let
|
|
531
|
-
o.push(e.files[
|
|
532
|
-
return o.map((
|
|
529
|
+
const n = t * 1e3, a = (r) => r.size > n, o = [];
|
|
530
|
+
for (let r = 0; r < e.files.length; r++)
|
|
531
|
+
o.push(e.files[r]);
|
|
532
|
+
return o.map((r) => a(r)).find((r) => r === !0) ? we.global.t("messages.file_weight", { size: t }) : !0;
|
|
533
533
|
};
|
|
534
|
-
|
|
534
|
+
Ce("fileWeight", da);
|
|
535
535
|
const zt = (e, [t], n, a) => {
|
|
536
536
|
if (!e || typeof e == "string" && !e.length)
|
|
537
537
|
return !0;
|
|
538
538
|
let o, i;
|
|
539
539
|
return e instanceof Date && (o = e), t instanceof Date && (i = t), typeof e == "string" && (o = new Date(e)), typeof t == "string" && (i = new Date(t)), o?.getTime && o?.getTime() > 0 && i?.getTime && i?.getTime() > 0 && n(i.getTime(), o.getTime()) ? a : !0;
|
|
540
|
-
}, fa = (e, [t]) => zt(e, [t], (n, a) => n < a,
|
|
541
|
-
|
|
542
|
-
const va = (e, [t]) => zt(e, [t], (n, a) => n > a,
|
|
543
|
-
|
|
544
|
-
const ga = (e) => Number.isSafeInteger(parseInt(e)) ? !0 :
|
|
545
|
-
|
|
546
|
-
function
|
|
547
|
-
const t =
|
|
540
|
+
}, fa = (e, [t]) => zt(e, [t], (n, a) => n < a, we.global.t("messages.before"));
|
|
541
|
+
Ce("before", fa);
|
|
542
|
+
const va = (e, [t]) => zt(e, [t], (n, a) => n > a, we.global.t("messages.after"));
|
|
543
|
+
Ce("after", va);
|
|
544
|
+
const ga = (e) => Number.isSafeInteger(parseInt(e)) ? !0 : we.global.t("messages.bigint");
|
|
545
|
+
Ce("bigint", ga);
|
|
546
|
+
function xe(e) {
|
|
547
|
+
const t = me(`${e.name}-bus`), n = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set();
|
|
548
548
|
function o(d) {
|
|
549
549
|
const c = e.getKey(d);
|
|
550
|
-
n.set(c, d), a.size > 0 && m((
|
|
550
|
+
n.set(c, d), a.size > 0 && m((p) => {
|
|
551
551
|
try {
|
|
552
|
-
e.registerIntoService(
|
|
552
|
+
e.registerIntoService(p, d);
|
|
553
553
|
} catch (h) {
|
|
554
554
|
t.warn(`Failed to live-register item (key=${c}):`, h);
|
|
555
555
|
}
|
|
@@ -559,24 +559,24 @@ function Ce(e) {
|
|
|
559
559
|
n.delete(d), e.unregisterFromService && a.size > 0 && a.forEach((c) => {
|
|
560
560
|
try {
|
|
561
561
|
e.unregisterFromService(c, d);
|
|
562
|
-
} catch (
|
|
563
|
-
t.warn(`Failed to live-unregister item (id=${d}):`,
|
|
562
|
+
} catch (p) {
|
|
563
|
+
t.warn(`Failed to live-unregister item (id=${d}):`, p);
|
|
564
564
|
}
|
|
565
565
|
});
|
|
566
566
|
}
|
|
567
567
|
function l(d) {
|
|
568
|
-
for (const [c,
|
|
569
|
-
d(
|
|
568
|
+
for (const [c, p] of n)
|
|
569
|
+
d(p) && n.delete(c);
|
|
570
570
|
}
|
|
571
|
-
function
|
|
571
|
+
function r() {
|
|
572
572
|
return Array.from(n.values());
|
|
573
573
|
}
|
|
574
574
|
function u(d) {
|
|
575
|
-
a.add(d), n.forEach((c,
|
|
575
|
+
a.add(d), n.forEach((c, p) => {
|
|
576
576
|
try {
|
|
577
577
|
e.registerIntoService(d, c);
|
|
578
578
|
} catch (h) {
|
|
579
|
-
t.warn(`Failed to replay item (key=${
|
|
579
|
+
t.warn(`Failed to replay item (key=${p}):`, h);
|
|
580
580
|
}
|
|
581
581
|
});
|
|
582
582
|
}
|
|
@@ -593,7 +593,7 @@ function Ce(e) {
|
|
|
593
593
|
preregister: o,
|
|
594
594
|
unregister: i,
|
|
595
595
|
removePreregistered: l,
|
|
596
|
-
getPreregistered:
|
|
596
|
+
getPreregistered: r,
|
|
597
597
|
replayInto: u,
|
|
598
598
|
dispose: v,
|
|
599
599
|
broadcast: m,
|
|
@@ -617,27 +617,27 @@ function qt(e) {
|
|
|
617
617
|
a.set(d, c - 1);
|
|
618
618
|
}
|
|
619
619
|
function l(d, c) {
|
|
620
|
-
const
|
|
621
|
-
t[
|
|
622
|
-
const h = t[
|
|
620
|
+
const p = c.toLowerCase();
|
|
621
|
+
t[p] || (t[p] = []);
|
|
622
|
+
const h = t[p].find((b) => b.id === d.id);
|
|
623
623
|
if (h) {
|
|
624
|
-
Object.assign(h, d, { bladeId:
|
|
624
|
+
Object.assign(h, d, { bladeId: p });
|
|
625
625
|
return;
|
|
626
626
|
}
|
|
627
|
-
const E = { ...d, bladeId:
|
|
628
|
-
t[
|
|
627
|
+
const E = { ...d, bladeId: p };
|
|
628
|
+
t[p].push(E), n.push(e.createRegistration(p, E)), o(d.id);
|
|
629
629
|
}
|
|
630
|
-
function
|
|
631
|
-
const
|
|
630
|
+
function r(d, c) {
|
|
631
|
+
const p = c.toLowerCase(), h = t[p];
|
|
632
632
|
if (h) {
|
|
633
|
-
const
|
|
634
|
-
if (
|
|
635
|
-
const [
|
|
636
|
-
|
|
633
|
+
const b = h.findIndex((O) => O.id === d);
|
|
634
|
+
if (b !== -1) {
|
|
635
|
+
const [O] = h.splice(b, 1);
|
|
636
|
+
O && i(O.id);
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
639
|
const E = n.findIndex(
|
|
640
|
-
(
|
|
640
|
+
(b) => e.getRegistrationBladeId(b) === p && e.getRegistrationItemId(b) === d
|
|
641
641
|
);
|
|
642
642
|
E !== -1 && n.splice(E, 1);
|
|
643
643
|
}
|
|
@@ -646,14 +646,14 @@ function qt(e) {
|
|
|
646
646
|
return [...t[c] || []];
|
|
647
647
|
}
|
|
648
648
|
function v(d) {
|
|
649
|
-
const c = d.toLowerCase(),
|
|
650
|
-
|
|
649
|
+
const c = d.toLowerCase(), p = t[c];
|
|
650
|
+
p && (p.forEach((E) => i(E.id)), delete t[c]), n.map((E, b) => e.getRegistrationBladeId(E) === c ? b : -1).filter((E) => E !== -1).reverse().forEach((E) => {
|
|
651
651
|
n.splice(E, 1);
|
|
652
652
|
});
|
|
653
653
|
}
|
|
654
|
-
function m(d, c,
|
|
655
|
-
const h = c.toLowerCase(), E = t[h]?.find((
|
|
656
|
-
E && Object.assign(E,
|
|
654
|
+
function m(d, c, p) {
|
|
655
|
+
const h = c.toLowerCase(), E = t[h]?.find((b) => b.id === d);
|
|
656
|
+
E && Object.assign(E, p, { bladeId: h });
|
|
657
657
|
}
|
|
658
658
|
function g(d) {
|
|
659
659
|
return a.has(d);
|
|
@@ -662,7 +662,7 @@ function qt(e) {
|
|
|
662
662
|
registry: t,
|
|
663
663
|
registrations: n,
|
|
664
664
|
register: l,
|
|
665
|
-
unregister:
|
|
665
|
+
unregister: r,
|
|
666
666
|
get: u,
|
|
667
667
|
clear: v,
|
|
668
668
|
update: m,
|
|
@@ -670,10 +670,10 @@ function qt(e) {
|
|
|
670
670
|
};
|
|
671
671
|
}
|
|
672
672
|
function ma(e) {
|
|
673
|
-
const t = S(/* @__PURE__ */ new Map()), n =
|
|
673
|
+
const t = S(/* @__PURE__ */ new Map()), n = I(() => Array.from(t.value.values()).sort((i, l) => (i.order ?? 0) - (l.order ?? 0)));
|
|
674
674
|
function a(i) {
|
|
675
|
-
const l = e.getId(i) || crypto.randomUUID(),
|
|
676
|
-
return t.value.set(l, { ...
|
|
675
|
+
const l = e.getId(i) || crypto.randomUUID(), r = e.createItem(i, t.value.size);
|
|
676
|
+
return t.value.set(l, { ...r, id: l }), l;
|
|
677
677
|
}
|
|
678
678
|
function o(i) {
|
|
679
679
|
t.value.delete(i);
|
|
@@ -699,33 +699,33 @@ function Ut(e) {
|
|
|
699
699
|
function Ke(e) {
|
|
700
700
|
return e.id !== void 0 ? `id:${String(e.id)}` : e.routeId ? `route:${e.routeId}` : e.url ? `url:${e.url}` : e.groupConfig?.id ? `gc:${e.groupConfig.id}:${e.title}` : e.group ? `g:${e.group}:${e.title}` : `hash:${JSON.stringify(Rt(e, "title"))}`;
|
|
701
701
|
}
|
|
702
|
-
const ze = S(/* @__PURE__ */ new Map()),
|
|
702
|
+
const ze = S(/* @__PURE__ */ new Map()), ge = xe({
|
|
703
703
|
name: "menu-service",
|
|
704
704
|
getKey: Ke,
|
|
705
705
|
registerIntoService: (e, t) => e.addMenuItem(t)
|
|
706
706
|
});
|
|
707
707
|
function Gi(e) {
|
|
708
|
-
|
|
708
|
+
ge.preregister(e);
|
|
709
709
|
}
|
|
710
710
|
function Yi(e) {
|
|
711
|
-
|
|
711
|
+
ge.removePreregistered((t) => ft(t, e)), ge.broadcast((t) => t.removeMenuItem(e));
|
|
712
712
|
}
|
|
713
713
|
function Ji(e, t) {
|
|
714
|
-
ze.value.set(e, t),
|
|
714
|
+
ze.value.set(e, t), ge.broadcast((n) => {
|
|
715
715
|
n.menuBadges.value.set(e, t);
|
|
716
716
|
});
|
|
717
717
|
}
|
|
718
718
|
function Xi(e) {
|
|
719
|
-
const t =
|
|
719
|
+
const t = ge.getFirstInstance();
|
|
720
720
|
return t ? t.menuBadges.value.get(e) : ze.value.get(e);
|
|
721
721
|
}
|
|
722
722
|
function Zi(e) {
|
|
723
|
-
ze.value.delete(e),
|
|
723
|
+
ze.value.delete(e), ge.broadcast((t) => {
|
|
724
724
|
t.menuBadges.value.delete(e);
|
|
725
725
|
});
|
|
726
726
|
}
|
|
727
727
|
function Qi() {
|
|
728
|
-
return
|
|
728
|
+
return ge.getFirstInstance()?.menuBadges ?? ze;
|
|
729
729
|
}
|
|
730
730
|
const it = 1 / 0, pa = 1 / 0;
|
|
731
731
|
function ft(e, t) {
|
|
@@ -758,7 +758,7 @@ function ka(e, t) {
|
|
|
758
758
|
...Rt(e, ["group", "groupIcon", "groupPriority", "groupConfig"])
|
|
759
759
|
}, o = t.get(n.groupId);
|
|
760
760
|
if (o) {
|
|
761
|
-
const i = [...o.children ?? []], l = i.findIndex((
|
|
761
|
+
const i = [...o.children ?? []], l = i.findIndex((r) => ft(r, a));
|
|
762
762
|
l > -1 ? i[l] = a : i.push(a), t.set(n.groupId, {
|
|
763
763
|
...o,
|
|
764
764
|
children: i,
|
|
@@ -799,8 +799,8 @@ function Ia() {
|
|
|
799
799
|
t.push(l), e.value = It(t);
|
|
800
800
|
}
|
|
801
801
|
function o(l) {
|
|
802
|
-
const
|
|
803
|
-
t = t.filter((u) => !ft(u, l)), t.length !==
|
|
802
|
+
const r = t.length;
|
|
803
|
+
t = t.filter((u) => !ft(u, l)), t.length !== r && (e.value = It(t));
|
|
804
804
|
}
|
|
805
805
|
const i = {
|
|
806
806
|
addMenuItem: a,
|
|
@@ -808,32 +808,32 @@ function Ia() {
|
|
|
808
808
|
removeMenuItem: o,
|
|
809
809
|
menuBadges: n
|
|
810
810
|
};
|
|
811
|
-
return
|
|
811
|
+
return ge.replayInto(i), i;
|
|
812
812
|
}
|
|
813
813
|
function Ge(e) {
|
|
814
814
|
const { key: t, create: n, bus: a, name: o, onMissing: i } = e;
|
|
815
815
|
function l() {
|
|
816
|
-
const u =
|
|
816
|
+
const u = J(t, null);
|
|
817
817
|
if (u)
|
|
818
818
|
return u;
|
|
819
819
|
const v = n();
|
|
820
820
|
return Et(t, v), on() && rn(() => a.dispose(v)), v;
|
|
821
821
|
}
|
|
822
|
-
function
|
|
823
|
-
const u =
|
|
822
|
+
function r() {
|
|
823
|
+
const u = J(t, null);
|
|
824
824
|
if (!u)
|
|
825
825
|
throw i?.(), new Wn(o);
|
|
826
826
|
return u;
|
|
827
827
|
}
|
|
828
828
|
return {
|
|
829
829
|
provide: l,
|
|
830
|
-
use:
|
|
830
|
+
use: r
|
|
831
831
|
};
|
|
832
832
|
}
|
|
833
|
-
const $a =
|
|
833
|
+
const $a = me("use-menu-service"), Kt = Ge({
|
|
834
834
|
key: gn,
|
|
835
835
|
create: Ia,
|
|
836
|
-
bus:
|
|
836
|
+
bus: ge,
|
|
837
837
|
name: "MenuService",
|
|
838
838
|
onMissing: () => $a.error("Menu service not found in current context. Injection chain:", We())
|
|
839
839
|
});
|
|
@@ -845,16 +845,16 @@ function er() {
|
|
|
845
845
|
}
|
|
846
846
|
function Ye() {
|
|
847
847
|
return {
|
|
848
|
-
isMobile:
|
|
849
|
-
isDesktop:
|
|
850
|
-
isPhone:
|
|
851
|
-
isTablet:
|
|
852
|
-
isTouch:
|
|
848
|
+
isMobile: J(hn, S(!1)),
|
|
849
|
+
isDesktop: J(yn, S(!0)),
|
|
850
|
+
isPhone: J(bn, S(!1)),
|
|
851
|
+
isTablet: J(pn, S(!1)),
|
|
852
|
+
isTouch: J(mn, !1)
|
|
853
853
|
};
|
|
854
854
|
}
|
|
855
855
|
const wa = Symbol("AppInsightsOptions"), Oa = Symbol("AppInsightsInstance");
|
|
856
856
|
function Ea() {
|
|
857
|
-
const e =
|
|
857
|
+
const e = J(Oa, null), { user: t } = dt(), n = J(wa, void 0);
|
|
858
858
|
function a() {
|
|
859
859
|
const o = n?.appName ? `[${n.appName}] ` : "", i = (u) => `${o}${u.name}`;
|
|
860
860
|
function l(u) {
|
|
@@ -862,7 +862,7 @@ function Ea() {
|
|
|
862
862
|
const v = i(u);
|
|
863
863
|
e.context.telemetryTrace.traceID = Bn(), e.context.telemetryTrace.name = u.name, e.startTrackPage(v);
|
|
864
864
|
}
|
|
865
|
-
function
|
|
865
|
+
function r(u) {
|
|
866
866
|
if (!e) return;
|
|
867
867
|
const v = i(u), m = location.protocol + "//" + location.host + u.fullPath;
|
|
868
868
|
e.stopTrackPage(v, m, {
|
|
@@ -872,7 +872,7 @@ function Ea() {
|
|
|
872
872
|
}
|
|
873
873
|
return {
|
|
874
874
|
beforeEach: l,
|
|
875
|
-
afterEach:
|
|
875
|
+
afterEach: r
|
|
876
876
|
};
|
|
877
877
|
}
|
|
878
878
|
return {
|
|
@@ -880,24 +880,24 @@ function Ea() {
|
|
|
880
880
|
appInsights: e
|
|
881
881
|
};
|
|
882
882
|
}
|
|
883
|
-
const La =
|
|
883
|
+
const La = me("use-error-handler");
|
|
884
884
|
function Ba(e) {
|
|
885
885
|
const t = S(null), n = We(), { appInsights: a } = Ea(), { user: o } = dt(), i = S(!1);
|
|
886
886
|
function l() {
|
|
887
887
|
t.value = null, n && n.emit("reset");
|
|
888
888
|
}
|
|
889
|
-
return sn((
|
|
889
|
+
return sn((r) => {
|
|
890
890
|
if (i.value)
|
|
891
891
|
return !e;
|
|
892
892
|
i.value = !0;
|
|
893
|
-
const u = qe(
|
|
893
|
+
const u = qe(r);
|
|
894
894
|
return t.value = u, a && a.trackException({
|
|
895
895
|
exception: u,
|
|
896
896
|
properties: {
|
|
897
897
|
userId: o.value?.id ?? "",
|
|
898
898
|
userName: o.value?.userName ?? ""
|
|
899
899
|
}
|
|
900
|
-
}), La.error("Captured Error:", u.originalError), n && n.emit("error", u),
|
|
900
|
+
}), La.error("Captured Error:", u.originalError), n && n.emit("error", u), $e(() => {
|
|
901
901
|
i.value = !1;
|
|
902
902
|
}), !e;
|
|
903
903
|
}), {
|
|
@@ -919,7 +919,7 @@ function Ca(e) {
|
|
|
919
919
|
}
|
|
920
920
|
return !1;
|
|
921
921
|
}
|
|
922
|
-
const nr =
|
|
922
|
+
const nr = F({
|
|
923
923
|
name: "ErrorInterceptor",
|
|
924
924
|
props: {
|
|
925
925
|
capture: {
|
|
@@ -936,13 +936,13 @@ const nr = z({
|
|
|
936
936
|
}
|
|
937
937
|
},
|
|
938
938
|
setup(e, { slots: t }) {
|
|
939
|
-
const n =
|
|
940
|
-
return o &&
|
|
939
|
+
const n = J(Ct, void 0), a = J(kn, void 0), o = !!(n && a), { error: i, reset: l } = Ba(o || e.capture);
|
|
940
|
+
return o && G(i, (r) => {
|
|
941
941
|
const u = n.value.id;
|
|
942
|
-
if (
|
|
943
|
-
if (Ca(
|
|
942
|
+
if (r) {
|
|
943
|
+
if (Ca(r), Sn())
|
|
944
944
|
return;
|
|
945
|
-
a.setBladeError(u,
|
|
945
|
+
a.setBladeError(u, r);
|
|
946
946
|
} else
|
|
947
947
|
a.clearBladeError(u);
|
|
948
948
|
}), () => t.default?.({
|
|
@@ -953,7 +953,7 @@ const nr = z({
|
|
|
953
953
|
}), xa = Symbol("vc-button-group"), Ta = ["type", "disabled", "aria-disabled", "aria-label", "aria-busy", "aria-pressed"], Ra = {
|
|
954
954
|
key: 2,
|
|
955
955
|
class: "vc-button__title"
|
|
956
|
-
}, Ma = /* @__PURE__ */
|
|
956
|
+
}, Ma = /* @__PURE__ */ F({
|
|
957
957
|
__name: "vc-button",
|
|
958
958
|
props: {
|
|
959
959
|
icon: {},
|
|
@@ -973,18 +973,18 @@ const nr = z({
|
|
|
973
973
|
const n = {
|
|
974
974
|
base: "default",
|
|
975
975
|
xs: "sm"
|
|
976
|
-
}, a = e, o =
|
|
976
|
+
}, a = e, o = Ee(), i = t, l = J(xa, null), r = I(() => {
|
|
977
977
|
const c = l?.size?.value ?? a.size;
|
|
978
978
|
return n[c] ?? c;
|
|
979
|
-
}), u = S(null), v =
|
|
980
|
-
|
|
979
|
+
}), u = S(null), v = I(() => a.disabled || a.loading), m = S(!1);
|
|
980
|
+
G(v, (c) => {
|
|
981
981
|
m.value = c && u.value === document.activeElement;
|
|
982
982
|
});
|
|
983
|
-
const g =
|
|
983
|
+
const g = I(() => [
|
|
984
984
|
"vc-button",
|
|
985
985
|
{
|
|
986
986
|
[`vc-button-${a.variant}`]: a.variant,
|
|
987
|
-
[`vc-button--${
|
|
987
|
+
[`vc-button--${r.value}`]: r.value,
|
|
988
988
|
"vc-button--selected": a.selected,
|
|
989
989
|
"vc-button--text": a.text,
|
|
990
990
|
"vc-button--disabled": v.value,
|
|
@@ -994,37 +994,37 @@ const nr = z({
|
|
|
994
994
|
function d(c) {
|
|
995
995
|
c.preventDefault(), !v.value && i("click", c);
|
|
996
996
|
}
|
|
997
|
-
return (c,
|
|
997
|
+
return (c, p) => s(o) ? $("", !0) : (f(), y("button", {
|
|
998
998
|
key: 0,
|
|
999
999
|
ref_key: "buttonRef",
|
|
1000
1000
|
ref: u,
|
|
1001
|
-
class:
|
|
1001
|
+
class: H(g.value),
|
|
1002
1002
|
type: e.type,
|
|
1003
1003
|
disabled: v.value && !m.value,
|
|
1004
1004
|
"aria-disabled": m.value || void 0,
|
|
1005
1005
|
"aria-label": e.ariaLabel,
|
|
1006
1006
|
"aria-busy": e.loading || void 0,
|
|
1007
1007
|
"aria-pressed": e.selected || void 0,
|
|
1008
|
-
onBlur:
|
|
1008
|
+
onBlur: p[0] || (p[0] = (h) => m.value = !1),
|
|
1009
1009
|
onClick: d
|
|
1010
1010
|
}, [
|
|
1011
|
-
e.loading ? (f(), P(
|
|
1011
|
+
e.loading ? (f(), P(s(K), {
|
|
1012
1012
|
key: 0,
|
|
1013
1013
|
icon: "lucide-loader-2",
|
|
1014
1014
|
class: "vc-button__icon tw-animate-spin",
|
|
1015
1015
|
size: e.iconSize
|
|
1016
|
-
}, null, 8, ["size"])) : e.icon ? (f(), P(
|
|
1016
|
+
}, null, 8, ["size"])) : e.icon ? (f(), P(s(K), {
|
|
1017
1017
|
key: 1,
|
|
1018
|
-
class:
|
|
1018
|
+
class: H(["vc-button--icon", e.iconClass]),
|
|
1019
1019
|
icon: e.icon,
|
|
1020
1020
|
size: e.iconSize
|
|
1021
|
-
}, null, 8, ["class", "icon", "size"])) :
|
|
1021
|
+
}, null, 8, ["class", "icon", "size"])) : $("", !0),
|
|
1022
1022
|
c.$slots.default ? (f(), y("span", Ra, [
|
|
1023
|
-
|
|
1024
|
-
])) :
|
|
1023
|
+
x(c.$slots, "default")
|
|
1024
|
+
])) : $("", !0)
|
|
1025
1025
|
], 42, Ta));
|
|
1026
1026
|
}
|
|
1027
|
-
}), vt =
|
|
1027
|
+
}), vt = xe({
|
|
1028
1028
|
name: "toolbar-service",
|
|
1029
1029
|
getKey: (e) => `${e.bladeId.toLowerCase()}::${e.toolbarItem.id}`,
|
|
1030
1030
|
registerIntoService: (e, t) => e.registerToolbarItem(t.toolbarItem, t.bladeId)
|
|
@@ -1038,33 +1038,33 @@ function ar(e, t) {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
function Wt() {
|
|
1040
1040
|
const e = qt({
|
|
1041
|
-
createRegistration: (
|
|
1042
|
-
getRegistrationBladeId: (
|
|
1043
|
-
getRegistrationItemId: (
|
|
1044
|
-
}), t = (
|
|
1045
|
-
e.register(
|
|
1046
|
-
}, n = (
|
|
1047
|
-
e.unregister(
|
|
1048
|
-
}, a = (
|
|
1049
|
-
const u =
|
|
1041
|
+
createRegistration: (r, u) => ({ bladeId: r, toolbarItem: u }),
|
|
1042
|
+
getRegistrationBladeId: (r) => r.bladeId,
|
|
1043
|
+
getRegistrationItemId: (r) => r.toolbarItem.id
|
|
1044
|
+
}), t = (r, u) => {
|
|
1045
|
+
e.register(r, u);
|
|
1046
|
+
}, n = (r, u) => {
|
|
1047
|
+
e.unregister(r, u);
|
|
1048
|
+
}, a = (r) => {
|
|
1049
|
+
const u = r ? r.toLowerCase() : "", v = e.get(u), m = e.get("*"), g = [...v], d = new Set(g.map((c) => c.id));
|
|
1050
1050
|
return m.forEach((c) => {
|
|
1051
1051
|
d.has(c.id) || g.push(c);
|
|
1052
1052
|
}), [...g];
|
|
1053
|
-
}, o = (
|
|
1054
|
-
e.clear(
|
|
1053
|
+
}, o = (r) => {
|
|
1054
|
+
e.clear(r);
|
|
1055
1055
|
}, i = ({
|
|
1056
|
-
id:
|
|
1056
|
+
id: r,
|
|
1057
1057
|
bladeId: u,
|
|
1058
1058
|
toolbarItem: v
|
|
1059
1059
|
}) => {
|
|
1060
|
-
e.update(
|
|
1060
|
+
e.update(r, u, v);
|
|
1061
1061
|
}, l = {
|
|
1062
1062
|
registerToolbarItem: t,
|
|
1063
1063
|
unregisterToolbarItem: n,
|
|
1064
1064
|
getToolbarItems: a,
|
|
1065
1065
|
clearBladeToolbarItems: o,
|
|
1066
1066
|
registeredToolbarItems: e.registrations,
|
|
1067
|
-
isToolbarItemRegistered: (
|
|
1067
|
+
isToolbarItemRegistered: (r) => e.isRegistered(r),
|
|
1068
1068
|
updateToolbarItem: i
|
|
1069
1069
|
};
|
|
1070
1070
|
return vt.replayInto(l), l;
|
|
@@ -1081,24 +1081,24 @@ function lr() {
|
|
|
1081
1081
|
return Na.provide();
|
|
1082
1082
|
}
|
|
1083
1083
|
function or(e = {}) {
|
|
1084
|
-
const { autoCleanup: t = !0 } = e, n =
|
|
1084
|
+
const { autoCleanup: t = !0 } = e, n = J(xt, null);
|
|
1085
1085
|
!n && !_e && (_e = Wt());
|
|
1086
1086
|
const a = n || _e;
|
|
1087
1087
|
if (!a)
|
|
1088
1088
|
throw new Error("Toolbar service is not available");
|
|
1089
|
-
const o =
|
|
1090
|
-
a.registerToolbarItem(c, l(
|
|
1091
|
-
}, u = (c,
|
|
1092
|
-
a.unregisterToolbarItem(c, l(
|
|
1093
|
-
}, v = (c,
|
|
1094
|
-
a.updateToolbarItem({ id: c, bladeId: l(h), toolbarItem:
|
|
1089
|
+
const o = J(Ct, void 0), i = I(() => o?.value?.id ?? Aa), l = (c) => c ?? i.value, r = (c, p) => {
|
|
1090
|
+
a.registerToolbarItem(c, l(p));
|
|
1091
|
+
}, u = (c, p) => {
|
|
1092
|
+
a.unregisterToolbarItem(c, l(p));
|
|
1093
|
+
}, v = (c, p, h) => {
|
|
1094
|
+
a.updateToolbarItem({ id: c, bladeId: l(h), toolbarItem: p });
|
|
1095
1095
|
}, m = (c) => a.getToolbarItems(l(c)), g = (c) => {
|
|
1096
1096
|
a.clearBladeToolbarItems(l(c));
|
|
1097
1097
|
};
|
|
1098
1098
|
return We() && t && rt(() => {
|
|
1099
1099
|
g();
|
|
1100
1100
|
}), {
|
|
1101
|
-
registerToolbarItem:
|
|
1101
|
+
registerToolbarItem: r,
|
|
1102
1102
|
unregisterToolbarItem: u,
|
|
1103
1103
|
updateToolbarItem: v,
|
|
1104
1104
|
getToolbarItems: m,
|
|
@@ -1107,7 +1107,7 @@ function or(e = {}) {
|
|
|
1107
1107
|
registeredToolbarItems: a.registeredToolbarItems
|
|
1108
1108
|
};
|
|
1109
1109
|
}
|
|
1110
|
-
const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa = { class: "tw-sr-only" },
|
|
1110
|
+
const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa = { class: "tw-sr-only" }, oe = /* @__PURE__ */ F({
|
|
1111
1111
|
__name: "vc-skeleton",
|
|
1112
1112
|
props: {
|
|
1113
1113
|
variant: { default: "text" },
|
|
@@ -1128,15 +1128,15 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1128
1128
|
}
|
|
1129
1129
|
return (o, i) => e.variant === "text" ? (f(), y("div", {
|
|
1130
1130
|
key: 0,
|
|
1131
|
-
class:
|
|
1131
|
+
class: H(["vc-skeleton", {
|
|
1132
1132
|
"vc-skeleton--animated": e.animated
|
|
1133
1133
|
}]),
|
|
1134
1134
|
role: "status",
|
|
1135
1135
|
"aria-busy": "true",
|
|
1136
1136
|
"aria-label": e.ariaLabel
|
|
1137
1137
|
}, [
|
|
1138
|
-
|
|
1139
|
-
(f(!0), y(
|
|
1138
|
+
C("span", Va, M(e.ariaLabel), 1),
|
|
1139
|
+
(f(!0), y(Be, null, st(e.rows, (l) => (f(), y("div", {
|
|
1140
1140
|
key: l,
|
|
1141
1141
|
class: "vc-skeleton__row",
|
|
1142
1142
|
style: Ve({
|
|
@@ -1146,7 +1146,7 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1146
1146
|
}, null, 4))), 128))
|
|
1147
1147
|
], 10, Da)) : (f(), y("div", {
|
|
1148
1148
|
key: 1,
|
|
1149
|
-
class:
|
|
1149
|
+
class: H(["vc-skeleton__shape", [`vc-skeleton__shape--${e.variant}`, { "tw-animate-pulse": e.animated }]]),
|
|
1150
1150
|
style: Ve({
|
|
1151
1151
|
width: a(e.width),
|
|
1152
1152
|
height: a(e.height)
|
|
@@ -1155,10 +1155,10 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1155
1155
|
"aria-busy": "true",
|
|
1156
1156
|
"aria-label": e.ariaLabel
|
|
1157
1157
|
}, [
|
|
1158
|
-
|
|
1158
|
+
C("span", Fa, M(e.ariaLabel), 1)
|
|
1159
1159
|
], 14, Pa));
|
|
1160
1160
|
}
|
|
1161
|
-
}), ir = /* @__PURE__ */
|
|
1161
|
+
}), ir = /* @__PURE__ */ F({
|
|
1162
1162
|
__name: "vc-container",
|
|
1163
1163
|
props: {
|
|
1164
1164
|
shadow: { type: Boolean },
|
|
@@ -1170,7 +1170,7 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1170
1170
|
const a = n, o = S(), i = S(!1), l = () => {
|
|
1171
1171
|
o.value && o.value.scroll(0, 0);
|
|
1172
1172
|
};
|
|
1173
|
-
function
|
|
1173
|
+
function r(u) {
|
|
1174
1174
|
a("scroll", u);
|
|
1175
1175
|
}
|
|
1176
1176
|
return Mt(o, () => {
|
|
@@ -1179,7 +1179,7 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1179
1179
|
scrollTop: l,
|
|
1180
1180
|
component: o
|
|
1181
1181
|
}), (u, v) => (f(), P(ut(e.ariaLabel ? "section" : "div"), {
|
|
1182
|
-
class:
|
|
1182
|
+
class: H([
|
|
1183
1183
|
"vc-container",
|
|
1184
1184
|
{
|
|
1185
1185
|
"vc-container--shadow": e.shadow && i.value,
|
|
@@ -1188,21 +1188,21 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1188
1188
|
]),
|
|
1189
1189
|
"aria-label": e.ariaLabel
|
|
1190
1190
|
}, {
|
|
1191
|
-
default:
|
|
1192
|
-
|
|
1191
|
+
default: w(() => [
|
|
1192
|
+
C("div", {
|
|
1193
1193
|
ref_key: "component",
|
|
1194
1194
|
ref: o,
|
|
1195
1195
|
class: "vc-container__inner",
|
|
1196
1196
|
tabindex: "0",
|
|
1197
|
-
onScroll:
|
|
1197
|
+
onScroll: r
|
|
1198
1198
|
}, [
|
|
1199
|
-
|
|
1199
|
+
x(u.$slots, "default")
|
|
1200
1200
|
], 544)
|
|
1201
1201
|
]),
|
|
1202
1202
|
_: 3
|
|
1203
1203
|
}, 8, ["class", "aria-label"]));
|
|
1204
1204
|
}
|
|
1205
|
-
}), za = ["id", "role"], qa = /* @__PURE__ */
|
|
1205
|
+
}), za = ["id", "role"], qa = /* @__PURE__ */ F({
|
|
1206
1206
|
__name: "vc-hint",
|
|
1207
1207
|
props: {
|
|
1208
1208
|
id: {},
|
|
@@ -1211,19 +1211,19 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1211
1211
|
setup(e) {
|
|
1212
1212
|
return (t, n) => (f(), y("div", {
|
|
1213
1213
|
id: e.id,
|
|
1214
|
-
class:
|
|
1214
|
+
class: H(["vc-hint", {
|
|
1215
1215
|
"vc-hint--error": e.error
|
|
1216
1216
|
}]),
|
|
1217
1217
|
role: e.error ? "alert" : void 0
|
|
1218
1218
|
}, [
|
|
1219
|
-
|
|
1219
|
+
x(t.$slots, "default")
|
|
1220
1220
|
], 10, za));
|
|
1221
1221
|
}
|
|
1222
|
-
}),
|
|
1222
|
+
}), pe = qa, Ua = ["role", "tabindex", "aria-label", "onKeydown"], Ka = {
|
|
1223
1223
|
key: 0,
|
|
1224
1224
|
class: "vc-image__placeholder",
|
|
1225
1225
|
"aria-hidden": "true"
|
|
1226
|
-
}, Wa = /* @__PURE__ */
|
|
1226
|
+
}, Wa = /* @__PURE__ */ F({
|
|
1227
1227
|
__name: "vc-image",
|
|
1228
1228
|
props: {
|
|
1229
1229
|
aspect: { default: "1x1" },
|
|
@@ -1239,7 +1239,7 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1239
1239
|
},
|
|
1240
1240
|
emits: ["click"],
|
|
1241
1241
|
setup(e, { emit: t }) {
|
|
1242
|
-
const n =
|
|
1242
|
+
const n = me("vc-image"), a = e, o = t;
|
|
1243
1243
|
function i(g) {
|
|
1244
1244
|
if (!g) return g;
|
|
1245
1245
|
try {
|
|
@@ -1251,24 +1251,24 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1251
1251
|
}
|
|
1252
1252
|
return g;
|
|
1253
1253
|
}
|
|
1254
|
-
const l =
|
|
1255
|
-
|
|
1254
|
+
const l = I(() => na(a.src, a.thumbnailSize) ?? a.src), r = S(!1), u = I(() => r.value ? a.src : l.value);
|
|
1255
|
+
G(
|
|
1256
1256
|
() => [a.src, a.thumbnailSize],
|
|
1257
1257
|
() => {
|
|
1258
|
-
|
|
1258
|
+
r.value = !1;
|
|
1259
1259
|
}
|
|
1260
|
-
),
|
|
1260
|
+
), G(
|
|
1261
1261
|
u,
|
|
1262
1262
|
(g) => {
|
|
1263
|
-
if (!g || !a.thumbnailSize ||
|
|
1263
|
+
if (!g || !a.thumbnailSize || r.value || g === a.src) return;
|
|
1264
1264
|
const d = new Image();
|
|
1265
1265
|
d.src = i(g), d.onerror = () => {
|
|
1266
|
-
|
|
1266
|
+
r.value = !0;
|
|
1267
1267
|
};
|
|
1268
1268
|
},
|
|
1269
1269
|
{ immediate: !0 }
|
|
1270
1270
|
);
|
|
1271
|
-
const v =
|
|
1271
|
+
const v = I(() => {
|
|
1272
1272
|
if (u.value) {
|
|
1273
1273
|
const g = i(u.value);
|
|
1274
1274
|
return `background: url(${CSS.escape(g)}) center / ${a.background} no-repeat`;
|
|
@@ -1278,10 +1278,10 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1278
1278
|
a.clickable && o("click");
|
|
1279
1279
|
}
|
|
1280
1280
|
return (g, d) => (f(), y("div", {
|
|
1281
|
-
class:
|
|
1281
|
+
class: H(["vc-image", [`vc-image_${e.size}`]])
|
|
1282
1282
|
}, [
|
|
1283
|
-
|
|
1284
|
-
class:
|
|
1283
|
+
C("div", {
|
|
1284
|
+
class: H([
|
|
1285
1285
|
"vc-image__container",
|
|
1286
1286
|
`vc-image_${e.aspect}`,
|
|
1287
1287
|
{
|
|
@@ -1296,12 +1296,12 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1296
1296
|
"aria-label": e.alt || (e.clickable ? g.$t("COMPONENTS.ATOMS.VC_IMAGE.LABEL") : void 0),
|
|
1297
1297
|
onClick: m,
|
|
1298
1298
|
onKeydown: [
|
|
1299
|
-
|
|
1300
|
-
|
|
1299
|
+
Q(Y(m, ["prevent"]), ["enter"]),
|
|
1300
|
+
Q(Y(m, ["prevent"]), ["space"])
|
|
1301
1301
|
]
|
|
1302
1302
|
}, [
|
|
1303
|
-
e.src ?
|
|
1304
|
-
|
|
1303
|
+
e.src ? $("", !0) : (f(), y("div", Ka, [
|
|
1304
|
+
T(s(K), {
|
|
1305
1305
|
icon: e.emptyIcon,
|
|
1306
1306
|
size: "xl"
|
|
1307
1307
|
}, null, 8, ["icon"])
|
|
@@ -1319,7 +1319,7 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1319
1319
|
}, Ja = {
|
|
1320
1320
|
key: 1,
|
|
1321
1321
|
class: "vc-label__language"
|
|
1322
|
-
}, Je = /* @__PURE__ */
|
|
1322
|
+
}, Je = /* @__PURE__ */ F({
|
|
1323
1323
|
__name: "vc-label",
|
|
1324
1324
|
props: {
|
|
1325
1325
|
required: { type: Boolean },
|
|
@@ -1331,25 +1331,25 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1331
1331
|
},
|
|
1332
1332
|
setup(e) {
|
|
1333
1333
|
return (t, n) => (f(), P(ut(e.htmlFor ? "label" : "div"), {
|
|
1334
|
-
class:
|
|
1334
|
+
class: H(["vc-label", {
|
|
1335
1335
|
"vc-label--error": e.error
|
|
1336
1336
|
}]),
|
|
1337
1337
|
for: e.htmlFor || void 0
|
|
1338
1338
|
}, {
|
|
1339
|
-
default:
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1339
|
+
default: w(() => [
|
|
1340
|
+
C("div", ja, [
|
|
1341
|
+
C("span", Ha, [
|
|
1342
|
+
x(t.$slots, "default")
|
|
1343
1343
|
]),
|
|
1344
|
-
e.required ? (f(), y("span", Ga, "*")) :
|
|
1344
|
+
e.required ? (f(), y("span", Ga, "*")) : $("", !0)
|
|
1345
1345
|
]),
|
|
1346
1346
|
t.$slots.tooltip ? (f(), y("span", Ya, [
|
|
1347
|
-
|
|
1348
|
-
tooltip:
|
|
1349
|
-
|
|
1347
|
+
T(s(Tt), { placement: "top-start" }, {
|
|
1348
|
+
tooltip: w(() => [
|
|
1349
|
+
x(t.$slots, "tooltip")
|
|
1350
1350
|
]),
|
|
1351
|
-
default:
|
|
1352
|
-
|
|
1351
|
+
default: w(() => [
|
|
1352
|
+
T(s(K), {
|
|
1353
1353
|
class: "vc-label__tooltip-icon",
|
|
1354
1354
|
icon: e.tooltipIcon,
|
|
1355
1355
|
size: "s"
|
|
@@ -1357,13 +1357,13 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1357
1357
|
]),
|
|
1358
1358
|
_: 3
|
|
1359
1359
|
})
|
|
1360
|
-
])) :
|
|
1361
|
-
e.multilanguage ? (f(), y("div", Ja,
|
|
1360
|
+
])) : $("", !0),
|
|
1361
|
+
e.multilanguage ? (f(), y("div", Ja, M(e.currentLanguage), 1)) : $("", !0)
|
|
1362
1362
|
]),
|
|
1363
1363
|
_: 3
|
|
1364
1364
|
}, 8, ["class", "for"]));
|
|
1365
1365
|
}
|
|
1366
|
-
}), Xa = ["disabled", "aria-disabled"], Za = { class: "vc-link__text" }, Qa = /* @__PURE__ */
|
|
1366
|
+
}), Xa = ["disabled", "aria-disabled"], Za = { class: "vc-link__text" }, Qa = /* @__PURE__ */ F({
|
|
1367
1367
|
__name: "vc-link",
|
|
1368
1368
|
props: {
|
|
1369
1369
|
active: { type: Boolean },
|
|
@@ -1378,7 +1378,7 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1378
1378
|
}
|
|
1379
1379
|
return (i, l) => (f(), y("button", {
|
|
1380
1380
|
type: "button",
|
|
1381
|
-
class:
|
|
1381
|
+
class: H(["vc-link", {
|
|
1382
1382
|
"vc-link--active": e.active,
|
|
1383
1383
|
"vc-link--disabled": e.disabled
|
|
1384
1384
|
}]),
|
|
@@ -1386,12 +1386,12 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1386
1386
|
"aria-disabled": e.disabled,
|
|
1387
1387
|
onClick: o
|
|
1388
1388
|
}, [
|
|
1389
|
-
|
|
1390
|
-
|
|
1389
|
+
C("span", Za, [
|
|
1390
|
+
x(i.$slots, "default")
|
|
1391
1391
|
])
|
|
1392
1392
|
], 10, Xa));
|
|
1393
1393
|
}
|
|
1394
|
-
}), _a = Qa, el = ["aria-label"], tl = { class: "vc-status__content" }, nl = /* @__PURE__ */
|
|
1394
|
+
}), _a = Qa, el = ["aria-label"], tl = { class: "vc-status__content" }, nl = /* @__PURE__ */ F({
|
|
1395
1395
|
__name: "vc-status",
|
|
1396
1396
|
props: {
|
|
1397
1397
|
variant: { default: "info" },
|
|
@@ -1400,7 +1400,7 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1400
1400
|
},
|
|
1401
1401
|
setup(e) {
|
|
1402
1402
|
return (t, n) => (f(), y("div", {
|
|
1403
|
-
class:
|
|
1403
|
+
class: H(["vc-status", [
|
|
1404
1404
|
`vc-status--${e.variant}`,
|
|
1405
1405
|
{
|
|
1406
1406
|
"vc-status--extended": e.extend,
|
|
@@ -1410,12 +1410,12 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1410
1410
|
role: "status",
|
|
1411
1411
|
"aria-label": e.dot ? e.variant : void 0
|
|
1412
1412
|
}, [
|
|
1413
|
-
|
|
1414
|
-
|
|
1413
|
+
C("div", tl, [
|
|
1414
|
+
x(t.$slots, "default")
|
|
1415
1415
|
])
|
|
1416
1416
|
], 10, el));
|
|
1417
1417
|
}
|
|
1418
|
-
}), al = ["aria-label"], ll = /* @__PURE__ */
|
|
1418
|
+
}), al = ["aria-label"], ll = /* @__PURE__ */ F({
|
|
1419
1419
|
__name: "vc-status-icon",
|
|
1420
1420
|
props: {
|
|
1421
1421
|
status: { type: Boolean }
|
|
@@ -1426,12 +1426,12 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1426
1426
|
role: "img",
|
|
1427
1427
|
"aria-label": e.status ? "Active" : "Inactive"
|
|
1428
1428
|
}, [
|
|
1429
|
-
e.status ? (f(), P(
|
|
1429
|
+
e.status ? (f(), P(s(K), {
|
|
1430
1430
|
key: 0,
|
|
1431
1431
|
icon: "lucide-circle-check",
|
|
1432
1432
|
class: "vc-status-icon__icon vc-status-icon__icon--success",
|
|
1433
1433
|
"aria-hidden": "true"
|
|
1434
|
-
})) : (f(), P(
|
|
1434
|
+
})) : (f(), P(s(K), {
|
|
1435
1435
|
key: 1,
|
|
1436
1436
|
icon: "lucide-circle-x",
|
|
1437
1437
|
class: "vc-status-icon__icon vc-status-icon__icon--inactive",
|
|
@@ -1439,7 +1439,7 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1439
1439
|
}))
|
|
1440
1440
|
], 8, al));
|
|
1441
1441
|
}
|
|
1442
|
-
}), ol = ["aria-label"], $t = 40, il = /* @__PURE__ */
|
|
1442
|
+
}), ol = ["aria-label"], $t = 40, il = /* @__PURE__ */ F({
|
|
1443
1443
|
__name: "vc-scrollable-container",
|
|
1444
1444
|
props: {
|
|
1445
1445
|
speed: { default: void 0 }
|
|
@@ -1447,7 +1447,7 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1447
1447
|
setup(e, { expose: t }) {
|
|
1448
1448
|
const n = e, a = S(null), o = {};
|
|
1449
1449
|
n.speed !== void 0 && (o.speed = n.speed);
|
|
1450
|
-
const { canScrollUp: i, canScrollDown: l, startScroll:
|
|
1450
|
+
const { canScrollUp: i, canScrollDown: l, startScroll: r, stopScroll: u, updateScrollState: v } = ua(
|
|
1451
1451
|
a,
|
|
1452
1452
|
o
|
|
1453
1453
|
);
|
|
@@ -1464,43 +1464,43 @@ const Da = ["aria-label"], Va = { class: "tw-sr-only" }, Pa = ["aria-label"], Fa
|
|
|
1464
1464
|
role: "region",
|
|
1465
1465
|
"aria-label": g.$t("COMPONENTS.ATOMS.VC_SCROLLABLE_CONTAINER.LABEL")
|
|
1466
1466
|
}, [
|
|
1467
|
-
|
|
1468
|
-
class:
|
|
1467
|
+
C("div", {
|
|
1468
|
+
class: H(["vc-scrollable-container__arrow", { "vc-scrollable-container__arrow--hidden": !s(i) }]),
|
|
1469
1469
|
"aria-hidden": "true",
|
|
1470
|
-
onPointerenter: d[0] || (d[0] = (c) => r
|
|
1470
|
+
onPointerenter: d[0] || (d[0] = (c) => s(r)("up")),
|
|
1471
1471
|
onPointerleave: d[1] || (d[1] = //@ts-ignore
|
|
1472
|
-
(...c) =>
|
|
1472
|
+
(...c) => s(u) && s(u)(...c))
|
|
1473
1473
|
}, [
|
|
1474
|
-
|
|
1475
|
-
|
|
1474
|
+
x(g.$slots, "arrow-up", {}, () => [
|
|
1475
|
+
T(s(K), {
|
|
1476
1476
|
icon: "lucide-chevron-up",
|
|
1477
1477
|
size: "xs"
|
|
1478
1478
|
})
|
|
1479
1479
|
])
|
|
1480
1480
|
], 34),
|
|
1481
|
-
|
|
1481
|
+
C("div", {
|
|
1482
1482
|
ref_key: "viewportRef",
|
|
1483
1483
|
ref: a,
|
|
1484
1484
|
class: "vc-scrollable-container__viewport",
|
|
1485
1485
|
tabindex: "0",
|
|
1486
1486
|
onScroll: d[2] || (d[2] = //@ts-ignore
|
|
1487
|
-
(...c) =>
|
|
1487
|
+
(...c) => s(v) && s(v)(...c)),
|
|
1488
1488
|
onKeydown: [
|
|
1489
|
-
d[3] || (d[3] =
|
|
1490
|
-
d[4] || (d[4] =
|
|
1489
|
+
d[3] || (d[3] = Q(Y((c) => m("up"), ["prevent"]), ["up"])),
|
|
1490
|
+
d[4] || (d[4] = Q(Y((c) => m("down"), ["prevent"]), ["down"]))
|
|
1491
1491
|
]
|
|
1492
1492
|
}, [
|
|
1493
|
-
|
|
1493
|
+
x(g.$slots, "default")
|
|
1494
1494
|
], 544),
|
|
1495
|
-
|
|
1496
|
-
class:
|
|
1495
|
+
C("div", {
|
|
1496
|
+
class: H(["vc-scrollable-container__arrow", { "vc-scrollable-container__arrow--hidden": !s(l) }]),
|
|
1497
1497
|
"aria-hidden": "true",
|
|
1498
|
-
onPointerenter: d[5] || (d[5] = (c) => r
|
|
1498
|
+
onPointerenter: d[5] || (d[5] = (c) => s(r)("down")),
|
|
1499
1499
|
onPointerleave: d[6] || (d[6] = //@ts-ignore
|
|
1500
|
-
(...c) =>
|
|
1500
|
+
(...c) => s(u) && s(u)(...c))
|
|
1501
1501
|
}, [
|
|
1502
|
-
|
|
1503
|
-
|
|
1502
|
+
x(g.$slots, "arrow-down", {}, () => [
|
|
1503
|
+
T(s(K), {
|
|
1504
1504
|
icon: "lucide-chevron-down",
|
|
1505
1505
|
size: "xs"
|
|
1506
1506
|
})
|
|
@@ -1531,7 +1531,7 @@ function ul() {
|
|
|
1531
1531
|
function cl(e) {
|
|
1532
1532
|
return Ln(e);
|
|
1533
1533
|
}
|
|
1534
|
-
const jt =
|
|
1534
|
+
const jt = xe({
|
|
1535
1535
|
name: "widget-service",
|
|
1536
1536
|
getKey: (e) => `${e.bladeId.toLowerCase()}::${e.widget.id}`,
|
|
1537
1537
|
registerIntoService: (e, t) => e.registerWidget(t.widget, t.bladeId)
|
|
@@ -1559,23 +1559,23 @@ function ur() {
|
|
|
1559
1559
|
};
|
|
1560
1560
|
return jt.replayInto(n), n;
|
|
1561
1561
|
}
|
|
1562
|
-
const dl =
|
|
1562
|
+
const dl = me("use-theme"), ke = S([
|
|
1563
1563
|
{ key: "light", localizationKey: "CORE.THEMES.LIGHT" },
|
|
1564
1564
|
{ key: "dark", localizationKey: "CORE.THEMES.DARK" }
|
|
1565
1565
|
]), cr = Mn(() => {
|
|
1566
|
-
const { t: e } =
|
|
1566
|
+
const { t: e } = we.global;
|
|
1567
1567
|
function t(v) {
|
|
1568
1568
|
(Array.isArray(v) ? v : [v]).forEach((m) => {
|
|
1569
|
-
|
|
1569
|
+
ke.value.some((g) => g.key === m.key) || ke.value.push(m);
|
|
1570
1570
|
});
|
|
1571
1571
|
}
|
|
1572
1572
|
function n(v) {
|
|
1573
1573
|
(Array.isArray(v) ? v : [v]).forEach((m) => {
|
|
1574
|
-
const g =
|
|
1575
|
-
g >= 0 &&
|
|
1574
|
+
const g = ke.value.findIndex((d) => d.key === m);
|
|
1575
|
+
g >= 0 && ke.value.splice(g, 1);
|
|
1576
1576
|
});
|
|
1577
1577
|
}
|
|
1578
|
-
const a =
|
|
1578
|
+
const a = I(() => ke.value.map((v) => v.key)), o = Cn({
|
|
1579
1579
|
attribute: "data-theme",
|
|
1580
1580
|
emitAuto: !0,
|
|
1581
1581
|
initialValue: "light",
|
|
@@ -1591,16 +1591,16 @@ const dl = ge("use-theme"), he = S([
|
|
|
1591
1591
|
tt(() => {
|
|
1592
1592
|
i.value && (o.value = i.value);
|
|
1593
1593
|
});
|
|
1594
|
-
function
|
|
1594
|
+
function r(v) {
|
|
1595
1595
|
a.value.includes(v) ? i.value = v : dl.warn(`Attempted to set an unregistered theme: ${v}`);
|
|
1596
1596
|
}
|
|
1597
|
-
const u =
|
|
1598
|
-
const v =
|
|
1597
|
+
const u = I(() => {
|
|
1598
|
+
const v = ke.value.find((m) => m.key === i.value);
|
|
1599
1599
|
return v ? v.localizationKey ? e(v.localizationKey) : Qe(v.key) : i.value ? Qe(i.value) : "";
|
|
1600
1600
|
});
|
|
1601
1601
|
return {
|
|
1602
|
-
themes:
|
|
1603
|
-
() =>
|
|
1602
|
+
themes: I(
|
|
1603
|
+
() => ke.value.map((v) => ({
|
|
1604
1604
|
key: v.key,
|
|
1605
1605
|
name: v.localizationKey ? e(v.localizationKey) : Qe(v.key)
|
|
1606
1606
|
}))
|
|
@@ -1610,9 +1610,9 @@ const dl = ge("use-theme"), he = S([
|
|
|
1610
1610
|
next: l,
|
|
1611
1611
|
register: t,
|
|
1612
1612
|
unregister: n,
|
|
1613
|
-
setTheme:
|
|
1613
|
+
setTheme: r
|
|
1614
1614
|
};
|
|
1615
|
-
}), mt =
|
|
1615
|
+
}), mt = xe({
|
|
1616
1616
|
name: "dashboard-service",
|
|
1617
1617
|
getKey: (e) => e.id,
|
|
1618
1618
|
registerIntoService: (e, t) => e.registerWidget(t)
|
|
@@ -1625,7 +1625,7 @@ const fl = () => ({
|
|
|
1625
1625
|
layout: nt(/* @__PURE__ */ new Map())
|
|
1626
1626
|
});
|
|
1627
1627
|
function vl(e = {}) {
|
|
1628
|
-
const t = fl(), n = e.hasAccess ?? (() => !0),
|
|
1628
|
+
const t = fl(), n = e.hasAccess ?? (() => !0), r = {
|
|
1629
1629
|
registerWidget: (u) => {
|
|
1630
1630
|
if (t.widgets.has(u.id))
|
|
1631
1631
|
throw new Error(`Widget with id ${u.id} already registered`);
|
|
@@ -1649,9 +1649,9 @@ function vl(e = {}) {
|
|
|
1649
1649
|
},
|
|
1650
1650
|
getLayout: () => new Map(t.layout)
|
|
1651
1651
|
};
|
|
1652
|
-
return mt.replayInto(
|
|
1652
|
+
return mt.replayInto(r), r;
|
|
1653
1653
|
}
|
|
1654
|
-
const wt =
|
|
1654
|
+
const wt = me("use-dashboard"), Ht = Ge({
|
|
1655
1655
|
key: In,
|
|
1656
1656
|
bus: mt,
|
|
1657
1657
|
name: "DashboardService",
|
|
@@ -1675,7 +1675,7 @@ function fr() {
|
|
|
1675
1675
|
function vr() {
|
|
1676
1676
|
return Ht.use();
|
|
1677
1677
|
}
|
|
1678
|
-
const Gt =
|
|
1678
|
+
const Gt = xe({
|
|
1679
1679
|
name: "app-bar-menu-service",
|
|
1680
1680
|
getKey: (e) => e.id || crypto.randomUUID(),
|
|
1681
1681
|
registerIntoService: (e, t) => e.register(t),
|
|
@@ -1702,7 +1702,7 @@ function mr() {
|
|
|
1702
1702
|
getId: (e) => e.id || ""
|
|
1703
1703
|
});
|
|
1704
1704
|
}
|
|
1705
|
-
const pt =
|
|
1705
|
+
const pt = xe({
|
|
1706
1706
|
name: "settings-menu-service",
|
|
1707
1707
|
getKey: (e) => e.id || crypto.randomUUID(),
|
|
1708
1708
|
registerIntoService: (e, t) => e.register(t),
|
|
@@ -1724,7 +1724,7 @@ function gl() {
|
|
|
1724
1724
|
getId: (e) => e.id || ""
|
|
1725
1725
|
});
|
|
1726
1726
|
}
|
|
1727
|
-
const ml =
|
|
1727
|
+
const ml = me("use-settings-menu"), Yt = Ge({
|
|
1728
1728
|
key: $n,
|
|
1729
1729
|
create: gl,
|
|
1730
1730
|
bus: pt,
|
|
@@ -1743,7 +1743,7 @@ const pl = {
|
|
|
1743
1743
|
}, bl = { class: "vc-date-picker__field-container" }, yl = { class: "vc-date-picker__field" }, hl = ["aria-label"], kl = {
|
|
1744
1744
|
key: 0,
|
|
1745
1745
|
class: "vc-date-picker__loading"
|
|
1746
|
-
}, Sl = { key: 0 }, Il = { key: 1 }, $l = /* @__PURE__ */
|
|
1746
|
+
}, Sl = { key: 0 }, Il = { key: 1 }, $l = /* @__PURE__ */ F({
|
|
1747
1747
|
__name: "vc-date-picker",
|
|
1748
1748
|
props: {
|
|
1749
1749
|
modelValue: {},
|
|
@@ -1768,203 +1768,203 @@ const pl = {
|
|
|
1768
1768
|
},
|
|
1769
1769
|
emits: ["update:modelValue", "blur", "focus"],
|
|
1770
1770
|
setup(e, { emit: t }) {
|
|
1771
|
-
const n = e, a = t, o =
|
|
1772
|
-
const
|
|
1773
|
-
return Number.isInteger(Number(
|
|
1774
|
-
})(),
|
|
1775
|
-
const
|
|
1771
|
+
const n = e, a = t, o = Ee(), { isMobile: i, isDesktop: l } = Ye(), { labelId: r, errorId: u, hintId: v, invalid: m, resolvedDisabled: g, ariaRequired: d, ariaDescribedBy: c } = He(n), p = S(!1), h = window.navigator.language, E = S(n.modelValue), b = S(null), O = I(() => n.type === "date" && "9999-12-31" || void 0), V = (() => {
|
|
1772
|
+
const B = new Intl.DateTimeFormat(h, { hour: "numeric" }).format();
|
|
1773
|
+
return Number.isInteger(Number(B));
|
|
1774
|
+
})(), U = I(() => {
|
|
1775
|
+
const B = n.type === "datetime-local", L = new Intl.DateTimeFormat(h, {
|
|
1776
1776
|
year: "numeric",
|
|
1777
1777
|
month: "2-digit",
|
|
1778
1778
|
day: "2-digit",
|
|
1779
|
-
...
|
|
1779
|
+
...B ? { hour: "2-digit", minute: "2-digit", hour12: !V } : {}
|
|
1780
1780
|
}).formatToParts(new Date(2e3, 0, 15, 13, 30)), D = {
|
|
1781
1781
|
year: "yyyy",
|
|
1782
1782
|
month: "MM",
|
|
1783
1783
|
day: "dd",
|
|
1784
|
-
hour:
|
|
1784
|
+
hour: V ? "HH" : "hh",
|
|
1785
1785
|
minute: "mm",
|
|
1786
1786
|
dayPeriod: "aa"
|
|
1787
1787
|
};
|
|
1788
|
-
return
|
|
1789
|
-
}),
|
|
1788
|
+
return L.map((N) => D[N.type] ?? N.value).join("");
|
|
1789
|
+
}), te = I(() => {
|
|
1790
1790
|
if (!n.datePickerOptions?.textInput) return n.datePickerOptions;
|
|
1791
|
-
const
|
|
1792
|
-
return
|
|
1793
|
-
format:
|
|
1791
|
+
const B = { ...n.datePickerOptions }, L = typeof B.textInput == "object" ? B.textInput : {};
|
|
1792
|
+
return B.textInput = {
|
|
1793
|
+
format: U.value,
|
|
1794
1794
|
rangeSeparator: " - ",
|
|
1795
|
-
...
|
|
1796
|
-
},
|
|
1797
|
-
}),
|
|
1798
|
-
const
|
|
1799
|
-
return n.label || !n.ariaLabel ?
|
|
1800
|
-
}),
|
|
1801
|
-
const
|
|
1795
|
+
...L
|
|
1796
|
+
}, B;
|
|
1797
|
+
}), X = I(() => {
|
|
1798
|
+
const B = n.datePickerOptions?.ariaLabels;
|
|
1799
|
+
return n.label || !n.ariaLabel ? B : { ...B, input: n.ariaLabel };
|
|
1800
|
+
}), ae = (B) => {
|
|
1801
|
+
const L = {
|
|
1802
1802
|
year: "numeric",
|
|
1803
1803
|
month: "numeric",
|
|
1804
1804
|
day: "numeric"
|
|
1805
1805
|
};
|
|
1806
|
-
n.type === "datetime-local" && (
|
|
1807
|
-
const D = (
|
|
1808
|
-
return Array.isArray(
|
|
1806
|
+
n.type === "datetime-local" && (L.hour = "numeric", L.minute = "numeric", L.hour12 = !V);
|
|
1807
|
+
const D = (N) => new Intl.DateTimeFormat(h, L).format(N);
|
|
1808
|
+
return Array.isArray(B) ? B.map((N) => N != null ? D(N) : "").join(" - ") : D(B);
|
|
1809
1809
|
};
|
|
1810
|
-
|
|
1810
|
+
G(
|
|
1811
1811
|
() => n.modelValue,
|
|
1812
|
-
(
|
|
1813
|
-
E.value !==
|
|
1812
|
+
(B) => {
|
|
1813
|
+
E.value !== B && (E.value = B);
|
|
1814
1814
|
}
|
|
1815
|
-
),
|
|
1816
|
-
|
|
1815
|
+
), G(E, (B, L) => {
|
|
1816
|
+
B !== L && B !== n.modelValue && (b.value = null, a("update:modelValue", B));
|
|
1817
1817
|
});
|
|
1818
|
-
function
|
|
1818
|
+
function Z() {
|
|
1819
1819
|
E.value = null, a("update:modelValue", null);
|
|
1820
1820
|
}
|
|
1821
|
-
function
|
|
1822
|
-
|
|
1821
|
+
function ue(B) {
|
|
1822
|
+
b.value = B;
|
|
1823
1823
|
}
|
|
1824
|
-
function
|
|
1825
|
-
|
|
1824
|
+
function de() {
|
|
1825
|
+
b.value = null;
|
|
1826
1826
|
}
|
|
1827
|
-
function
|
|
1828
|
-
|
|
1827
|
+
function le(B) {
|
|
1828
|
+
b.value != null && (E.value = [b.value, null], b.value = null), p.value = !1, a("blur", B);
|
|
1829
1829
|
}
|
|
1830
|
-
function
|
|
1831
|
-
|
|
1830
|
+
function z() {
|
|
1831
|
+
p.value = !0, a("focus");
|
|
1832
1832
|
}
|
|
1833
|
-
return (
|
|
1834
|
-
e.label ? (f(), P(
|
|
1833
|
+
return (B, L) => s(o) ? (f(), y("div", pl, [
|
|
1834
|
+
e.label ? (f(), P(s(oe), {
|
|
1835
1835
|
key: 0,
|
|
1836
1836
|
variant: "block",
|
|
1837
1837
|
width: 60 + (e.label?.length || 0) * 4,
|
|
1838
1838
|
height: 11
|
|
1839
|
-
}, null, 8, ["width"])) :
|
|
1840
|
-
|
|
1839
|
+
}, null, 8, ["width"])) : $("", !0),
|
|
1840
|
+
T(s(oe), {
|
|
1841
1841
|
variant: "block",
|
|
1842
1842
|
width: "100%",
|
|
1843
1843
|
height: 36
|
|
1844
1844
|
})
|
|
1845
1845
|
])) : (f(), y("div", {
|
|
1846
1846
|
key: 1,
|
|
1847
|
-
class:
|
|
1847
|
+
class: H(["vc-date-picker", [
|
|
1848
1848
|
{
|
|
1849
|
-
"vc-date-picker--error":
|
|
1850
|
-
"vc-date-picker--disabled":
|
|
1851
|
-
"vc-date-picker--focused":
|
|
1849
|
+
"vc-date-picker--error": s(m),
|
|
1850
|
+
"vc-date-picker--disabled": s(g),
|
|
1851
|
+
"vc-date-picker--focused": p.value
|
|
1852
1852
|
}
|
|
1853
1853
|
]])
|
|
1854
1854
|
}, [
|
|
1855
|
-
e.label ? (f(), P(
|
|
1855
|
+
e.label ? (f(), P(s(Je), {
|
|
1856
1856
|
key: 0,
|
|
1857
|
-
id: r
|
|
1857
|
+
id: s(r),
|
|
1858
1858
|
class: "vc-date-picker__label",
|
|
1859
1859
|
required: e.required,
|
|
1860
1860
|
multilanguage: e.multilanguage,
|
|
1861
1861
|
"current-language": e.currentLanguage,
|
|
1862
|
-
error:
|
|
1863
|
-
},
|
|
1864
|
-
default:
|
|
1865
|
-
|
|
1862
|
+
error: s(m)
|
|
1863
|
+
}, re({
|
|
1864
|
+
default: w(() => [
|
|
1865
|
+
C("span", null, M(e.label), 1)
|
|
1866
1866
|
]),
|
|
1867
1867
|
_: 2
|
|
1868
1868
|
}, [
|
|
1869
1869
|
e.tooltip ? {
|
|
1870
1870
|
name: "tooltip",
|
|
1871
|
-
fn:
|
|
1872
|
-
|
|
1871
|
+
fn: w(() => [
|
|
1872
|
+
_(M(e.tooltip), 1)
|
|
1873
1873
|
]),
|
|
1874
1874
|
key: "0"
|
|
1875
1875
|
} : void 0
|
|
1876
|
-
]), 1032, ["id", "required", "multilanguage", "current-language", "error"])) :
|
|
1877
|
-
|
|
1878
|
-
class:
|
|
1876
|
+
]), 1032, ["id", "required", "multilanguage", "current-language", "error"])) : $("", !0),
|
|
1877
|
+
C("div", {
|
|
1878
|
+
class: H(["vc-date-picker__field-wrapper", {
|
|
1879
1879
|
"vc-date-picker__field-wrapper--default": e.size === "default",
|
|
1880
1880
|
"vc-date-picker__field-wrapper--small": e.size === "small"
|
|
1881
1881
|
}])
|
|
1882
1882
|
}, [
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1883
|
+
C("div", bl, [
|
|
1884
|
+
C("div", yl, [
|
|
1885
|
+
T(s(Nn), ne({
|
|
1886
1886
|
modelValue: E.value,
|
|
1887
|
-
"onUpdate:modelValue":
|
|
1888
|
-
placeholder: e.placeholder || (e.type === "datetime-local" ?
|
|
1889
|
-
disabled:
|
|
1887
|
+
"onUpdate:modelValue": L[0] || (L[0] = (D) => E.value = D),
|
|
1888
|
+
placeholder: e.placeholder || (e.type === "datetime-local" ? B.$t("COMPONENTS.MOLECULES.VC_INPUT.DATE_TIME_PLACEHOLDER") : B.$t("COMPONENTS.MOLECULES.VC_INPUT.DATE_PLACEHOLDER")),
|
|
1889
|
+
disabled: s(g),
|
|
1890
1890
|
name: e.name,
|
|
1891
1891
|
autofocus: e.autofocus,
|
|
1892
|
-
"max-date":
|
|
1892
|
+
"max-date": O.value,
|
|
1893
1893
|
"time-picker-inline": "",
|
|
1894
1894
|
"enable-time-picker": e.type === "datetime-local",
|
|
1895
|
-
format:
|
|
1896
|
-
locale:
|
|
1895
|
+
format: ae,
|
|
1896
|
+
locale: s(h),
|
|
1897
1897
|
"start-time": { hours: 0, minutes: 0 },
|
|
1898
1898
|
clearable: !1,
|
|
1899
1899
|
config: { closeOnAutoApply: !1 },
|
|
1900
1900
|
"auto-apply": "",
|
|
1901
|
-
"teleport-center":
|
|
1902
|
-
is24:
|
|
1903
|
-
},
|
|
1904
|
-
"aria-labels":
|
|
1905
|
-
teleport:
|
|
1906
|
-
"aria-invalid":
|
|
1907
|
-
"aria-required":
|
|
1908
|
-
"aria-describedby":
|
|
1909
|
-
"aria-labelledby": e.label ? r
|
|
1901
|
+
"teleport-center": s(i),
|
|
1902
|
+
is24: s(V)
|
|
1903
|
+
}, te.value, {
|
|
1904
|
+
"aria-labels": X.value,
|
|
1905
|
+
teleport: s(l) ? "body" : void 0,
|
|
1906
|
+
"aria-invalid": s(m) || void 0,
|
|
1907
|
+
"aria-required": s(d),
|
|
1908
|
+
"aria-describedby": s(c),
|
|
1909
|
+
"aria-labelledby": e.label ? s(r) : void 0,
|
|
1910
1910
|
class: "vc-date-picker__input",
|
|
1911
1911
|
tabindex: "0",
|
|
1912
|
-
onFocus:
|
|
1913
|
-
onClosed:
|
|
1914
|
-
onRangeStart:
|
|
1915
|
-
onRangeEnd:
|
|
1916
|
-
onTooltipOpen:
|
|
1917
|
-
onTooltipClose:
|
|
1912
|
+
onFocus: z,
|
|
1913
|
+
onClosed: le,
|
|
1914
|
+
onRangeStart: ue,
|
|
1915
|
+
onRangeEnd: de,
|
|
1916
|
+
onTooltipOpen: z,
|
|
1917
|
+
onTooltipClose: le
|
|
1918
1918
|
}), null, 16, ["modelValue", "placeholder", "disabled", "name", "autofocus", "max-date", "enable-time-picker", "locale", "teleport-center", "is24", "aria-labels", "teleport", "aria-invalid", "aria-required", "aria-describedby", "aria-labelledby"]),
|
|
1919
1919
|
e.clearable && E.value && !e.disabled ? (f(), y("button", {
|
|
1920
1920
|
key: 0,
|
|
1921
1921
|
type: "button",
|
|
1922
1922
|
class: "vc-date-picker__clear",
|
|
1923
|
-
"aria-label":
|
|
1924
|
-
onClick:
|
|
1923
|
+
"aria-label": B.$t("COMPONENTS.MOLECULES.VC_DATE_PICKER.CLEAR"),
|
|
1924
|
+
onClick: Z
|
|
1925
1925
|
}, [
|
|
1926
|
-
|
|
1926
|
+
T(s(K), {
|
|
1927
1927
|
size: "xs",
|
|
1928
1928
|
icon: "lucide-x"
|
|
1929
1929
|
})
|
|
1930
|
-
], 8, hl)) :
|
|
1930
|
+
], 8, hl)) : $("", !0)
|
|
1931
1931
|
]),
|
|
1932
1932
|
e.loading ? (f(), y("div", kl, [
|
|
1933
|
-
|
|
1933
|
+
T(s(K), {
|
|
1934
1934
|
icon: "lucide-loader-2",
|
|
1935
1935
|
class: "vc-date-picker__loading-icon",
|
|
1936
1936
|
size: "m"
|
|
1937
1937
|
})
|
|
1938
|
-
])) :
|
|
1938
|
+
])) : $("", !0)
|
|
1939
1939
|
])
|
|
1940
1940
|
], 2),
|
|
1941
|
-
|
|
1941
|
+
T(Pe, {
|
|
1942
1942
|
name: "slide-up",
|
|
1943
1943
|
mode: "out-in"
|
|
1944
1944
|
}, {
|
|
1945
|
-
default:
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
id:
|
|
1945
|
+
default: w(() => [
|
|
1946
|
+
s(m) && e.errorMessage ? (f(), y("div", Sl, [
|
|
1947
|
+
T(s(pe), {
|
|
1948
|
+
id: s(u),
|
|
1949
1949
|
class: "vc-date-picker__hint-error",
|
|
1950
1950
|
error: !0
|
|
1951
1951
|
}, {
|
|
1952
|
-
default:
|
|
1953
|
-
|
|
1952
|
+
default: w(() => [
|
|
1953
|
+
_(M(e.errorMessage), 1)
|
|
1954
1954
|
]),
|
|
1955
1955
|
_: 1
|
|
1956
1956
|
}, 8, ["id"])
|
|
1957
1957
|
])) : (f(), y("div", Il, [
|
|
1958
|
-
e.hint ? (f(), P(
|
|
1958
|
+
e.hint ? (f(), P(s(pe), {
|
|
1959
1959
|
key: 0,
|
|
1960
|
-
id:
|
|
1960
|
+
id: s(v),
|
|
1961
1961
|
class: "vc-date-picker__desc"
|
|
1962
1962
|
}, {
|
|
1963
|
-
default:
|
|
1964
|
-
|
|
1963
|
+
default: w(() => [
|
|
1964
|
+
_(M(e.hint), 1)
|
|
1965
1965
|
]),
|
|
1966
1966
|
_: 1
|
|
1967
|
-
}, 8, ["id"])) :
|
|
1967
|
+
}, 8, ["id"])) : $("", !0)
|
|
1968
1968
|
]))
|
|
1969
1969
|
]),
|
|
1970
1970
|
_: 1
|
|
@@ -1977,7 +1977,7 @@ const pl = {
|
|
|
1977
1977
|
}, Ol = { class: "vc-color-input__field-container" }, El = { class: "vc-color-input__field" }, Ll = ["id", "placeholder", "disabled", "name", "autofocus", "aria-invalid", "aria-required", "aria-describedby", "aria-labelledby", "aria-label"], Bl = { class: "vc-color-input__color-container" }, Cl = ["aria-label"], xl = ["value"], Tl = ["aria-label"], Rl = {
|
|
1978
1978
|
key: 0,
|
|
1979
1979
|
class: "vc-color-input__loading"
|
|
1980
|
-
}, Ml = { key: 0 }, Al = { key: 1 }, Nl = /* @__PURE__ */
|
|
1980
|
+
}, Ml = { key: 0 }, Al = { key: 1 }, Nl = /* @__PURE__ */ F({
|
|
1981
1981
|
__name: "vc-color-input",
|
|
1982
1982
|
props: {
|
|
1983
1983
|
modelValue: {},
|
|
@@ -2000,211 +2000,211 @@ const pl = {
|
|
|
2000
2000
|
},
|
|
2001
2001
|
emits: ["update:modelValue", "blur", "focus"],
|
|
2002
2002
|
setup(e, { expose: t, emit: n }) {
|
|
2003
|
-
const a =
|
|
2003
|
+
const a = Ee(), o = e, i = n, {
|
|
2004
2004
|
fieldId: l,
|
|
2005
|
-
labelId:
|
|
2005
|
+
labelId: r,
|
|
2006
2006
|
errorId: u,
|
|
2007
2007
|
hintId: v,
|
|
2008
2008
|
invalid: m,
|
|
2009
2009
|
resolvedDisabled: g,
|
|
2010
2010
|
ariaRequired: d,
|
|
2011
2011
|
ariaDescribedBy: c
|
|
2012
|
-
} = He(o),
|
|
2013
|
-
function
|
|
2014
|
-
if (!
|
|
2015
|
-
|
|
2012
|
+
} = He(o), p = S(!1), h = S(!1), E = S(), b = S(), O = S(o.modelValue ?? ""), V = S("");
|
|
2013
|
+
function U(z) {
|
|
2014
|
+
if (!z || typeof z != "string") {
|
|
2015
|
+
V.value = "";
|
|
2016
2016
|
return;
|
|
2017
2017
|
}
|
|
2018
|
-
const
|
|
2019
|
-
if (ta(
|
|
2020
|
-
|
|
2018
|
+
const B = z.trim();
|
|
2019
|
+
if (ta(B)) {
|
|
2020
|
+
V.value = St(B);
|
|
2021
2021
|
return;
|
|
2022
2022
|
}
|
|
2023
|
-
const
|
|
2024
|
-
|
|
2023
|
+
const L = ea(B);
|
|
2024
|
+
L && (V.value = L);
|
|
2025
2025
|
}
|
|
2026
|
-
|
|
2026
|
+
G(
|
|
2027
2027
|
() => o.modelValue,
|
|
2028
|
-
(
|
|
2029
|
-
h.value || (h.value = !0,
|
|
2030
|
-
|
|
2028
|
+
(z) => {
|
|
2029
|
+
h.value || (h.value = !0, O.value = z ?? "", $e(() => {
|
|
2030
|
+
U(z ?? ""), h.value = !1;
|
|
2031
2031
|
}));
|
|
2032
2032
|
},
|
|
2033
2033
|
{ immediate: !0 }
|
|
2034
|
-
),
|
|
2035
|
-
|
|
2034
|
+
), G(V, (z) => {
|
|
2035
|
+
z && b.value && (b.value.value = z);
|
|
2036
2036
|
});
|
|
2037
|
-
function
|
|
2038
|
-
h.value || (h.value = !0, i("update:modelValue",
|
|
2039
|
-
|
|
2037
|
+
function te() {
|
|
2038
|
+
h.value || (h.value = !0, i("update:modelValue", O.value || null), $e(() => {
|
|
2039
|
+
U(O.value), h.value = !1;
|
|
2040
2040
|
}));
|
|
2041
2041
|
}
|
|
2042
|
-
function
|
|
2043
|
-
const
|
|
2044
|
-
if (
|
|
2045
|
-
const
|
|
2046
|
-
|
|
2042
|
+
function X(z) {
|
|
2043
|
+
const B = z.target;
|
|
2044
|
+
if (B?.value) {
|
|
2045
|
+
const L = St(B.value);
|
|
2046
|
+
V.value = L, O.value = L, i("update:modelValue", L);
|
|
2047
2047
|
}
|
|
2048
2048
|
}
|
|
2049
|
-
function re() {
|
|
2050
|
-
p.value?.click();
|
|
2051
|
-
}
|
|
2052
2049
|
function ae() {
|
|
2053
|
-
|
|
2050
|
+
b.value?.click();
|
|
2054
2051
|
}
|
|
2055
|
-
function
|
|
2056
|
-
|
|
2052
|
+
function Z() {
|
|
2053
|
+
O.value = "", V.value = "", i("update:modelValue", null);
|
|
2057
2054
|
}
|
|
2058
|
-
function
|
|
2059
|
-
|
|
2055
|
+
function ue(z) {
|
|
2056
|
+
p.value = !1, i("blur", z);
|
|
2060
2057
|
}
|
|
2061
|
-
function
|
|
2058
|
+
function de() {
|
|
2059
|
+
p.value = !0, i("focus");
|
|
2060
|
+
}
|
|
2061
|
+
function le() {
|
|
2062
2062
|
E.value?.focus();
|
|
2063
2063
|
}
|
|
2064
|
-
return t({ focus:
|
|
2065
|
-
e.label ? (f(), P(
|
|
2064
|
+
return t({ focus: le }), (z, B) => s(a) ? (f(), y("div", wl, [
|
|
2065
|
+
e.label ? (f(), P(s(oe), {
|
|
2066
2066
|
key: 0,
|
|
2067
2067
|
variant: "block",
|
|
2068
2068
|
width: 60 + (e.label?.length || 0) * 4,
|
|
2069
2069
|
height: 11
|
|
2070
|
-
}, null, 8, ["width"])) :
|
|
2071
|
-
|
|
2070
|
+
}, null, 8, ["width"])) : $("", !0),
|
|
2071
|
+
T(s(oe), {
|
|
2072
2072
|
variant: "block",
|
|
2073
2073
|
width: "100%",
|
|
2074
2074
|
height: 36
|
|
2075
2075
|
})
|
|
2076
2076
|
])) : (f(), y("div", {
|
|
2077
2077
|
key: 1,
|
|
2078
|
-
class:
|
|
2078
|
+
class: H(["vc-color-input", [
|
|
2079
2079
|
{
|
|
2080
|
-
"vc-color-input--error":
|
|
2081
|
-
"vc-color-input--disabled":
|
|
2082
|
-
"vc-color-input--focused":
|
|
2080
|
+
"vc-color-input--error": s(m),
|
|
2081
|
+
"vc-color-input--disabled": s(g),
|
|
2082
|
+
"vc-color-input--focused": p.value
|
|
2083
2083
|
}
|
|
2084
2084
|
]])
|
|
2085
2085
|
}, [
|
|
2086
|
-
e.label ? (f(), P(
|
|
2086
|
+
e.label ? (f(), P(s(Je), {
|
|
2087
2087
|
key: 0,
|
|
2088
|
-
id: r
|
|
2089
|
-
"html-for":
|
|
2088
|
+
id: s(r),
|
|
2089
|
+
"html-for": s(l),
|
|
2090
2090
|
class: "vc-color-input__label",
|
|
2091
2091
|
required: e.required,
|
|
2092
2092
|
multilanguage: e.multilanguage,
|
|
2093
2093
|
"current-language": e.currentLanguage,
|
|
2094
|
-
error:
|
|
2095
|
-
},
|
|
2096
|
-
default:
|
|
2097
|
-
|
|
2094
|
+
error: s(m)
|
|
2095
|
+
}, re({
|
|
2096
|
+
default: w(() => [
|
|
2097
|
+
C("span", null, M(e.label), 1)
|
|
2098
2098
|
]),
|
|
2099
2099
|
_: 2
|
|
2100
2100
|
}, [
|
|
2101
2101
|
e.tooltip ? {
|
|
2102
2102
|
name: "tooltip",
|
|
2103
|
-
fn:
|
|
2104
|
-
|
|
2103
|
+
fn: w(() => [
|
|
2104
|
+
_(M(e.tooltip), 1)
|
|
2105
2105
|
]),
|
|
2106
2106
|
key: "0"
|
|
2107
2107
|
} : void 0
|
|
2108
|
-
]), 1032, ["id", "html-for", "required", "multilanguage", "current-language", "error"])) :
|
|
2109
|
-
|
|
2110
|
-
class:
|
|
2108
|
+
]), 1032, ["id", "html-for", "required", "multilanguage", "current-language", "error"])) : $("", !0),
|
|
2109
|
+
C("div", {
|
|
2110
|
+
class: H(["vc-color-input__field-wrapper", {
|
|
2111
2111
|
"vc-color-input__field-wrapper--default": e.size === "default",
|
|
2112
2112
|
"vc-color-input__field-wrapper--small": e.size === "small"
|
|
2113
2113
|
}])
|
|
2114
2114
|
}, [
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
ct(
|
|
2118
|
-
id:
|
|
2115
|
+
C("div", Ol, [
|
|
2116
|
+
C("div", El, [
|
|
2117
|
+
ct(C("input", {
|
|
2118
|
+
id: s(l),
|
|
2119
2119
|
ref_key: "inputRef",
|
|
2120
2120
|
ref: E,
|
|
2121
|
-
"onUpdate:modelValue":
|
|
2121
|
+
"onUpdate:modelValue": B[0] || (B[0] = (L) => O.value = L),
|
|
2122
2122
|
placeholder: e.placeholder,
|
|
2123
2123
|
type: "text",
|
|
2124
|
-
disabled:
|
|
2124
|
+
disabled: s(g),
|
|
2125
2125
|
name: e.name,
|
|
2126
2126
|
autofocus: e.autofocus,
|
|
2127
|
-
"aria-invalid":
|
|
2128
|
-
"aria-required":
|
|
2129
|
-
"aria-describedby":
|
|
2130
|
-
"aria-labelledby": e.label ? r
|
|
2127
|
+
"aria-invalid": s(m) || void 0,
|
|
2128
|
+
"aria-required": s(d),
|
|
2129
|
+
"aria-describedby": s(c),
|
|
2130
|
+
"aria-labelledby": e.label ? s(r) : void 0,
|
|
2131
2131
|
"aria-label": e.label ? void 0 : e.ariaLabel,
|
|
2132
2132
|
class: "vc-color-input__input",
|
|
2133
2133
|
tabindex: "0",
|
|
2134
|
-
onBlur:
|
|
2135
|
-
onFocus:
|
|
2136
|
-
onInput:
|
|
2134
|
+
onBlur: ue,
|
|
2135
|
+
onFocus: de,
|
|
2136
|
+
onInput: te
|
|
2137
2137
|
}, null, 40, Ll), [
|
|
2138
|
-
[un,
|
|
2138
|
+
[un, O.value]
|
|
2139
2139
|
]),
|
|
2140
|
-
|
|
2141
|
-
|
|
2140
|
+
C("div", Bl, [
|
|
2141
|
+
C("button", {
|
|
2142
2142
|
type: "button",
|
|
2143
2143
|
class: "vc-color-input__color-square",
|
|
2144
|
-
style: Ve({ backgroundColor:
|
|
2145
|
-
"aria-label": `Pick color${
|
|
2146
|
-
onClick:
|
|
2144
|
+
style: Ve({ backgroundColor: V.value || "#ffffff" }),
|
|
2145
|
+
"aria-label": `Pick color${V.value ? ": " + V.value : ""}`,
|
|
2146
|
+
onClick: ae
|
|
2147
2147
|
}, null, 12, Cl),
|
|
2148
|
-
|
|
2148
|
+
C("input", {
|
|
2149
2149
|
ref_key: "colorPickerRef",
|
|
2150
|
-
ref:
|
|
2150
|
+
ref: b,
|
|
2151
2151
|
type: "color",
|
|
2152
|
-
value:
|
|
2152
|
+
value: V.value,
|
|
2153
2153
|
class: "vc-color-input__color-picker-hidden",
|
|
2154
2154
|
tabindex: "-1",
|
|
2155
2155
|
"aria-hidden": "true",
|
|
2156
|
-
onChange:
|
|
2156
|
+
onChange: X
|
|
2157
2157
|
}, null, 40, xl)
|
|
2158
2158
|
]),
|
|
2159
|
-
e.clearable &&
|
|
2159
|
+
e.clearable && O.value && !e.disabled ? (f(), y("button", {
|
|
2160
2160
|
key: 0,
|
|
2161
2161
|
type: "button",
|
|
2162
2162
|
class: "vc-color-input__clear",
|
|
2163
|
-
"aria-label":
|
|
2164
|
-
onClick:
|
|
2163
|
+
"aria-label": z.$t("COMPONENTS.MOLECULES.VC_COLOR_INPUT.CLEAR"),
|
|
2164
|
+
onClick: Z
|
|
2165
2165
|
}, [
|
|
2166
|
-
|
|
2166
|
+
T(s(K), {
|
|
2167
2167
|
size: "xs",
|
|
2168
2168
|
icon: "lucide-x"
|
|
2169
2169
|
})
|
|
2170
|
-
], 8, Tl)) :
|
|
2170
|
+
], 8, Tl)) : $("", !0)
|
|
2171
2171
|
]),
|
|
2172
2172
|
e.loading ? (f(), y("div", Rl, [
|
|
2173
|
-
|
|
2173
|
+
T(s(K), {
|
|
2174
2174
|
icon: "lucide-loader-2",
|
|
2175
2175
|
class: "vc-color-input__loading-icon",
|
|
2176
2176
|
size: "m"
|
|
2177
2177
|
})
|
|
2178
|
-
])) :
|
|
2178
|
+
])) : $("", !0)
|
|
2179
2179
|
])
|
|
2180
2180
|
], 2),
|
|
2181
|
-
|
|
2181
|
+
T(Pe, {
|
|
2182
2182
|
name: "slide-up",
|
|
2183
2183
|
mode: "out-in"
|
|
2184
2184
|
}, {
|
|
2185
|
-
default:
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
id:
|
|
2185
|
+
default: w(() => [
|
|
2186
|
+
s(m) && e.errorMessage ? (f(), y("div", Ml, [
|
|
2187
|
+
T(s(pe), {
|
|
2188
|
+
id: s(u),
|
|
2189
2189
|
class: "vc-color-input__hint-error",
|
|
2190
2190
|
error: !0
|
|
2191
2191
|
}, {
|
|
2192
|
-
default:
|
|
2193
|
-
|
|
2192
|
+
default: w(() => [
|
|
2193
|
+
_(M(e.errorMessage), 1)
|
|
2194
2194
|
]),
|
|
2195
2195
|
_: 1
|
|
2196
2196
|
}, 8, ["id"])
|
|
2197
2197
|
])) : (f(), y("div", Al, [
|
|
2198
|
-
e.hint ? (f(), P(
|
|
2198
|
+
e.hint ? (f(), P(s(pe), {
|
|
2199
2199
|
key: 0,
|
|
2200
|
-
id:
|
|
2200
|
+
id: s(v),
|
|
2201
2201
|
class: "vc-color-input__desc"
|
|
2202
2202
|
}, {
|
|
2203
|
-
default:
|
|
2204
|
-
|
|
2203
|
+
default: w(() => [
|
|
2204
|
+
_(M(e.hint), 1)
|
|
2205
2205
|
]),
|
|
2206
2206
|
_: 1
|
|
2207
|
-
}, 8, ["id"])) :
|
|
2207
|
+
}, 8, ["id"])) : $("", !0)
|
|
2208
2208
|
]))
|
|
2209
2209
|
]),
|
|
2210
2210
|
_: 1
|
|
@@ -2220,7 +2220,7 @@ const pl = {
|
|
|
2220
2220
|
}, zl = { class: "vc-input__field" }, ql = {
|
|
2221
2221
|
key: 0,
|
|
2222
2222
|
class: "vc-input__prefix"
|
|
2223
|
-
}, Ul = ["id", "placeholder", "type", "disabled", "name", "maxlength", "autofocus", "autocomplete", "aria-invalid", "aria-required", "aria-describedby", "aria-labelledby", "aria-label"], Kl = {
|
|
2223
|
+
}, Ul = ["id", "step", "placeholder", "type", "disabled", "name", "maxlength", "autofocus", "autocomplete", "aria-invalid", "aria-required", "aria-describedby", "aria-labelledby", "aria-label"], Kl = {
|
|
2224
2224
|
key: 1,
|
|
2225
2225
|
class: "vc-input__suffix"
|
|
2226
2226
|
}, Wl = ["aria-label"], jl = ["aria-label"], Hl = {
|
|
@@ -2232,7 +2232,7 @@ const pl = {
|
|
|
2232
2232
|
}, Yl = {
|
|
2233
2233
|
key: 1,
|
|
2234
2234
|
class: "vc-input__append"
|
|
2235
|
-
}, Jl = { key: 0 }, Xl = { key: 1 }, bt = /* @__PURE__ */
|
|
2235
|
+
}, Jl = { key: 0 }, Xl = { key: 1 }, bt = /* @__PURE__ */ F({
|
|
2236
2236
|
inheritAttrs: !1,
|
|
2237
2237
|
__name: "vc-input",
|
|
2238
2238
|
props: {
|
|
@@ -2242,7 +2242,7 @@ const pl = {
|
|
|
2242
2242
|
suffix: {},
|
|
2243
2243
|
debounce: {},
|
|
2244
2244
|
maxlength: { default: "1024" },
|
|
2245
|
-
step: {
|
|
2245
|
+
step: {},
|
|
2246
2246
|
autocomplete: {},
|
|
2247
2247
|
ariaLabel: {},
|
|
2248
2248
|
datePickerOptions: {},
|
|
@@ -2264,89 +2264,91 @@ const pl = {
|
|
|
2264
2264
|
},
|
|
2265
2265
|
emits: ["update:modelValue", "blur", "focus"],
|
|
2266
2266
|
setup(e, { emit: t }) {
|
|
2267
|
-
const n = e, a = Lt(), o =
|
|
2267
|
+
const n = e, a = Lt(), o = /* @__PURE__ */ new Set(["min", "max", "minlength", "pattern", "inputmode"]), i = I(
|
|
2268
|
+
() => Object.fromEntries(Object.entries(a).filter(([k]) => o.has(k.toLowerCase())))
|
|
2269
|
+
), l = I(() => {
|
|
2268
2270
|
const { class: k, ...R } = a;
|
|
2269
|
-
return R;
|
|
2270
|
-
}),
|
|
2271
|
-
fieldId:
|
|
2272
|
-
labelId:
|
|
2273
|
-
errorId:
|
|
2274
|
-
hintId:
|
|
2275
|
-
invalid:
|
|
2276
|
-
resolvedDisabled:
|
|
2277
|
-
resolvedName:
|
|
2278
|
-
ariaRequired:
|
|
2279
|
-
ariaDescribedBy:
|
|
2271
|
+
return Object.fromEntries(Object.entries(R).filter(([q]) => !o.has(q.toLowerCase())));
|
|
2272
|
+
}), r = t, u = Ee(), {
|
|
2273
|
+
fieldId: v,
|
|
2274
|
+
labelId: m,
|
|
2275
|
+
errorId: g,
|
|
2276
|
+
hintId: d,
|
|
2277
|
+
invalid: c,
|
|
2278
|
+
resolvedDisabled: p,
|
|
2279
|
+
resolvedName: h,
|
|
2280
|
+
ariaRequired: E,
|
|
2281
|
+
ariaDescribedBy: b
|
|
2280
2282
|
} = He(n);
|
|
2281
|
-
let
|
|
2282
|
-
const
|
|
2283
|
+
let O, V;
|
|
2284
|
+
const U = S(), te = S(), X = S(s(n.type)), ae = S(!1), Z = S(), ue = I({
|
|
2283
2285
|
get() {
|
|
2284
|
-
return
|
|
2286
|
+
return X.value === "integer" ? "number" : X.value;
|
|
2285
2287
|
},
|
|
2286
2288
|
set(k) {
|
|
2287
|
-
|
|
2289
|
+
X.value = k;
|
|
2288
2290
|
}
|
|
2289
|
-
}),
|
|
2291
|
+
}), de = I(() => s(n.modelValue)), le = I({
|
|
2290
2292
|
get() {
|
|
2291
|
-
return (n.type === "integer" || n.type === "number") && isNaN(
|
|
2293
|
+
return (n.type === "integer" || n.type === "number") && isNaN(U.value) ? "" : U.value;
|
|
2292
2294
|
},
|
|
2293
2295
|
set(k) {
|
|
2294
|
-
(n.type === "number" || n.type === "integer") && k < 0 ?
|
|
2296
|
+
(n.type === "number" || n.type === "integer") && k < 0 ? U.value = Math.abs(k) : U.value = k, B(U.value);
|
|
2295
2297
|
}
|
|
2296
2298
|
});
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
+
G(
|
|
2300
|
+
de,
|
|
2299
2301
|
(k) => {
|
|
2300
|
-
n.type === "number" && k !== null ?
|
|
2302
|
+
n.type === "number" && k !== null ? Z.value = parseFloat(k) : n.type === "integer" && k !== null ? Z.value = Math.trunc(k) : Z.value = k, U.value !== Z.value && (U.value = Z.value);
|
|
2301
2303
|
},
|
|
2302
2304
|
{ immediate: !0 }
|
|
2303
2305
|
);
|
|
2304
|
-
function
|
|
2305
|
-
const R = ["Backspace", "Delete", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"],
|
|
2306
|
-
if ((n.type === "number" || n.type === "integer") && (
|
|
2306
|
+
function z(k) {
|
|
2307
|
+
const R = ["Backspace", "Delete", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], q = k.key;
|
|
2308
|
+
if ((n.type === "number" || n.type === "integer") && (q === "-" || q === "e" || q === "+") && k.preventDefault(), n.type === "integer" && !/^\d$/.test(q) && !R.includes(q)) {
|
|
2307
2309
|
k.preventDefault();
|
|
2308
2310
|
return;
|
|
2309
2311
|
}
|
|
2310
2312
|
}
|
|
2311
|
-
function
|
|
2312
|
-
|
|
2313
|
+
function B(k) {
|
|
2314
|
+
L(k);
|
|
2313
2315
|
}
|
|
2314
|
-
function
|
|
2315
|
-
|
|
2316
|
-
if (
|
|
2316
|
+
function L(k) {
|
|
2317
|
+
V = () => {
|
|
2318
|
+
if (Z.value !== k) {
|
|
2317
2319
|
let R;
|
|
2318
|
-
n.type === "number" && k !== null && k !== void 0 ? R = k !== "" ? parseFloat(k) : null : n.type === "integer" && k !== null && k !== void 0 ? R = k !== "" ? Math.trunc(parseInt(k)) : null : R = k,
|
|
2320
|
+
n.type === "number" && k !== null && k !== void 0 ? R = k !== "" ? parseFloat(k) : null : n.type === "integer" && k !== null && k !== void 0 ? R = k !== "" ? Math.trunc(parseInt(k)) : null : R = k, r("update:modelValue", R);
|
|
2319
2321
|
}
|
|
2320
|
-
|
|
2321
|
-
}, n.debounce !== void 0 ? (clearTimeout(
|
|
2322
|
+
V = void 0;
|
|
2323
|
+
}, n.debounce !== void 0 ? (clearTimeout(O), O = setTimeout(V, +n.debounce)) : V();
|
|
2322
2324
|
}
|
|
2323
|
-
function
|
|
2324
|
-
|
|
2325
|
+
function D() {
|
|
2326
|
+
U.value = null, r("update:modelValue", null);
|
|
2325
2327
|
}
|
|
2326
|
-
function
|
|
2327
|
-
|
|
2328
|
+
function N(k) {
|
|
2329
|
+
ae.value = !1, r("blur", k);
|
|
2328
2330
|
}
|
|
2329
|
-
function
|
|
2330
|
-
|
|
2331
|
+
function W() {
|
|
2332
|
+
te.value?.focus();
|
|
2331
2333
|
}
|
|
2332
|
-
function
|
|
2333
|
-
|
|
2334
|
+
function j() {
|
|
2335
|
+
ae.value = !0, r("focus");
|
|
2334
2336
|
}
|
|
2335
|
-
return (k, R) =>
|
|
2337
|
+
return (k, R) => s(u) ? (f(), y("div", ne({ key: 0 }, l.value, {
|
|
2336
2338
|
class: ["vc-input vc-input--skeleton", k.$attrs.class]
|
|
2337
2339
|
}), [
|
|
2338
|
-
e.label ? (f(), P(
|
|
2340
|
+
e.label ? (f(), P(s(oe), {
|
|
2339
2341
|
key: 0,
|
|
2340
2342
|
variant: "block",
|
|
2341
2343
|
width: 60 + (e.label?.length || 0) * 4,
|
|
2342
2344
|
height: 11
|
|
2343
|
-
}, null, 8, ["width"])) :
|
|
2344
|
-
|
|
2345
|
+
}, null, 8, ["width"])) : $("", !0),
|
|
2346
|
+
T(s(oe), {
|
|
2345
2347
|
variant: "block",
|
|
2346
2348
|
width: "100%",
|
|
2347
2349
|
height: 36
|
|
2348
2350
|
})
|
|
2349
|
-
], 16)) : e.type === "date" || e.type === "datetime-local" ? (f(), P(
|
|
2351
|
+
], 16)) : e.type === "date" || e.type === "datetime-local" ? (f(), P(s($l), ne({ key: 1 }, s(a), {
|
|
2350
2352
|
"model-value": e.modelValue,
|
|
2351
2353
|
type: e.type,
|
|
2352
2354
|
"date-picker-options": e.datePickerOptions,
|
|
@@ -2366,10 +2368,10 @@ const pl = {
|
|
|
2366
2368
|
"current-language": e.currentLanguage,
|
|
2367
2369
|
name: e.name,
|
|
2368
2370
|
"aria-label": e.ariaLabel,
|
|
2369
|
-
"onUpdate:modelValue": R[0] || (R[0] = (
|
|
2370
|
-
onBlur: R[1] || (R[1] = (
|
|
2371
|
-
onFocus: R[2] || (R[2] = (
|
|
2372
|
-
}), null, 16, ["model-value", "type", "date-picker-options", "label", "placeholder", "hint", "disabled", "error", "error-message", "required", "clearable", "loading", "autofocus", "size", "tooltip", "multilanguage", "current-language", "name", "aria-label"])) : e.type === "color" ? (f(), P(
|
|
2371
|
+
"onUpdate:modelValue": R[0] || (R[0] = (q) => r("update:modelValue", q ?? null)),
|
|
2372
|
+
onBlur: R[1] || (R[1] = (q) => r("blur", q)),
|
|
2373
|
+
onFocus: R[2] || (R[2] = (q) => r("focus"))
|
|
2374
|
+
}), null, 16, ["model-value", "type", "date-picker-options", "label", "placeholder", "hint", "disabled", "error", "error-message", "required", "clearable", "loading", "autofocus", "size", "tooltip", "multilanguage", "current-language", "name", "aria-label"])) : e.type === "color" ? (f(), P(s(Nl), ne({ key: 2 }, s(a), {
|
|
2373
2375
|
"model-value": e.modelValue ?? null,
|
|
2374
2376
|
label: e.label,
|
|
2375
2377
|
placeholder: e.placeholder,
|
|
@@ -2387,165 +2389,167 @@ const pl = {
|
|
|
2387
2389
|
"current-language": e.currentLanguage,
|
|
2388
2390
|
name: e.name,
|
|
2389
2391
|
"aria-label": e.ariaLabel,
|
|
2390
|
-
"onUpdate:modelValue": R[3] || (R[3] = (
|
|
2391
|
-
onBlur: R[4] || (R[4] = (
|
|
2392
|
-
onFocus: R[5] || (R[5] = (
|
|
2393
|
-
}), null, 16, ["model-value", "label", "placeholder", "hint", "disabled", "error", "error-message", "required", "clearable", "loading", "autofocus", "size", "tooltip", "multilanguage", "current-language", "name", "aria-label"])) : (f(), y("div",
|
|
2392
|
+
"onUpdate:modelValue": R[3] || (R[3] = (q) => r("update:modelValue", q)),
|
|
2393
|
+
onBlur: R[4] || (R[4] = (q) => r("blur", q)),
|
|
2394
|
+
onFocus: R[5] || (R[5] = (q) => r("focus"))
|
|
2395
|
+
}), null, 16, ["model-value", "label", "placeholder", "hint", "disabled", "error", "error-message", "required", "clearable", "loading", "autofocus", "size", "tooltip", "multilanguage", "current-language", "name", "aria-label"])) : (f(), y("div", ne({ key: 3 }, l.value, {
|
|
2394
2396
|
class: ["vc-input", [
|
|
2395
2397
|
k.$attrs.class,
|
|
2396
2398
|
`vc-input--${e.type}`,
|
|
2397
2399
|
{
|
|
2398
2400
|
"vc-input--clearable": e.clearable,
|
|
2399
|
-
"vc-input--error":
|
|
2400
|
-
"vc-input--disabled":
|
|
2401
|
-
"vc-input--focused":
|
|
2401
|
+
"vc-input--error": s(c),
|
|
2402
|
+
"vc-input--disabled": s(p),
|
|
2403
|
+
"vc-input--focused": ae.value
|
|
2402
2404
|
}
|
|
2403
2405
|
]]
|
|
2404
2406
|
}), [
|
|
2405
|
-
e.label ? (f(), P(
|
|
2407
|
+
e.label ? (f(), P(s(Je), {
|
|
2406
2408
|
key: 0,
|
|
2407
|
-
id:
|
|
2408
|
-
"html-for":
|
|
2409
|
+
id: s(m),
|
|
2410
|
+
"html-for": s(v),
|
|
2409
2411
|
class: "vc-input__label",
|
|
2410
2412
|
required: e.required,
|
|
2411
2413
|
multilanguage: e.multilanguage,
|
|
2412
2414
|
"current-language": e.currentLanguage,
|
|
2413
|
-
error:
|
|
2414
|
-
},
|
|
2415
|
-
default:
|
|
2416
|
-
|
|
2415
|
+
error: s(c)
|
|
2416
|
+
}, re({
|
|
2417
|
+
default: w(() => [
|
|
2418
|
+
C("span", null, M(e.label), 1)
|
|
2417
2419
|
]),
|
|
2418
2420
|
_: 2
|
|
2419
2421
|
}, [
|
|
2420
2422
|
e.tooltip ? {
|
|
2421
2423
|
name: "tooltip",
|
|
2422
|
-
fn:
|
|
2423
|
-
|
|
2424
|
+
fn: w(() => [
|
|
2425
|
+
_(M(e.tooltip), 1)
|
|
2424
2426
|
]),
|
|
2425
2427
|
key: "0"
|
|
2426
2428
|
} : void 0
|
|
2427
|
-
]), 1032, ["id", "html-for", "required", "multilanguage", "current-language", "error"])) :
|
|
2428
|
-
|
|
2429
|
+
]), 1032, ["id", "html-for", "required", "multilanguage", "current-language", "error"])) : $("", !0),
|
|
2430
|
+
C("div", Dl, [
|
|
2429
2431
|
k.$slots.prepend ? (f(), y("div", Vl, [
|
|
2430
|
-
|
|
2431
|
-
])) :
|
|
2432
|
-
|
|
2433
|
-
class:
|
|
2432
|
+
x(k.$slots, "prepend", { focus: W })
|
|
2433
|
+
])) : $("", !0),
|
|
2434
|
+
C("div", {
|
|
2435
|
+
class: H(["vc-input__field-wrapper", {
|
|
2434
2436
|
"vc-input__field-wrapper--default": e.size === "default",
|
|
2435
2437
|
"vc-input__field-wrapper--small": e.size === "small"
|
|
2436
2438
|
}])
|
|
2437
2439
|
}, [
|
|
2438
|
-
|
|
2440
|
+
C("div", Pl, [
|
|
2439
2441
|
k.$slots["prepend-inner"] ? (f(), y("div", Fl, [
|
|
2440
|
-
|
|
2441
|
-
])) :
|
|
2442
|
-
|
|
2443
|
-
e.prefix ? (f(), y("div", ql,
|
|
2444
|
-
|
|
2445
|
-
editable:
|
|
2442
|
+
x(k.$slots, "prepend-inner", { focus: W })
|
|
2443
|
+
])) : $("", !0),
|
|
2444
|
+
C("div", zl, [
|
|
2445
|
+
e.prefix ? (f(), y("div", ql, M(e.prefix), 1)) : $("", !0),
|
|
2446
|
+
x(k.$slots, "control", {
|
|
2447
|
+
editable: s(p),
|
|
2446
2448
|
focused: e.autofocus,
|
|
2447
|
-
modelValue:
|
|
2448
|
-
emitValue:
|
|
2449
|
+
modelValue: le.value,
|
|
2450
|
+
emitValue: L,
|
|
2449
2451
|
placeholder: e.placeholder
|
|
2450
2452
|
}, () => [
|
|
2451
|
-
ct(
|
|
2452
|
-
id:
|
|
2453
|
+
ct(C("input", ne({
|
|
2454
|
+
id: s(v),
|
|
2453
2455
|
ref_key: "inputRef",
|
|
2454
|
-
ref:
|
|
2455
|
-
"onUpdate:modelValue": R[6] || (R[6] = (
|
|
2456
|
+
ref: te,
|
|
2457
|
+
"onUpdate:modelValue": R[6] || (R[6] = (q) => le.value = q)
|
|
2458
|
+
}, i.value, {
|
|
2459
|
+
step: e.step,
|
|
2456
2460
|
placeholder: e.placeholder,
|
|
2457
|
-
type:
|
|
2458
|
-
disabled:
|
|
2459
|
-
name:
|
|
2461
|
+
type: ue.value,
|
|
2462
|
+
disabled: s(p),
|
|
2463
|
+
name: s(h),
|
|
2460
2464
|
maxlength: e.maxlength,
|
|
2461
2465
|
autofocus: e.autofocus,
|
|
2462
2466
|
autocomplete: e.autocomplete,
|
|
2463
|
-
"aria-invalid":
|
|
2464
|
-
"aria-required":
|
|
2465
|
-
"aria-describedby":
|
|
2466
|
-
"aria-labelledby": e.label ?
|
|
2467
|
+
"aria-invalid": s(c) || void 0,
|
|
2468
|
+
"aria-required": s(E),
|
|
2469
|
+
"aria-describedby": s(b),
|
|
2470
|
+
"aria-labelledby": e.label ? s(m) : void 0,
|
|
2467
2471
|
"aria-label": e.label ? void 0 : e.ariaLabel,
|
|
2468
2472
|
class: "vc-input__input",
|
|
2469
2473
|
tabindex: "0",
|
|
2470
|
-
onKeydown:
|
|
2471
|
-
onBlur:
|
|
2472
|
-
onFocus:
|
|
2473
|
-
}, null,
|
|
2474
|
-
[cn,
|
|
2474
|
+
onKeydown: z,
|
|
2475
|
+
onBlur: N,
|
|
2476
|
+
onFocus: j
|
|
2477
|
+
}), null, 16, Ul), [
|
|
2478
|
+
[cn, le.value]
|
|
2475
2479
|
])
|
|
2476
2480
|
]),
|
|
2477
|
-
e.suffix ? (f(), y("div", Kl,
|
|
2478
|
-
e.clearable &&
|
|
2481
|
+
e.suffix ? (f(), y("div", Kl, M(e.suffix), 1)) : $("", !0),
|
|
2482
|
+
e.clearable && Z.value && !s(p) && e.type !== "password" ? (f(), y("button", {
|
|
2479
2483
|
key: 2,
|
|
2480
2484
|
type: "button",
|
|
2481
2485
|
class: "vc-input__clear",
|
|
2482
2486
|
"aria-label": k.$t("COMPONENTS.CONTROLS.CLEAR"),
|
|
2483
|
-
onClick:
|
|
2487
|
+
onClick: D
|
|
2484
2488
|
}, [
|
|
2485
|
-
|
|
2489
|
+
T(s(K), {
|
|
2486
2490
|
size: "xs",
|
|
2487
2491
|
icon: "lucide-x"
|
|
2488
2492
|
})
|
|
2489
|
-
], 8, Wl)) :
|
|
2493
|
+
], 8, Wl)) : $("", !0),
|
|
2490
2494
|
e.type === "password" ? (f(), y("button", {
|
|
2491
2495
|
key: 3,
|
|
2492
2496
|
type: "button",
|
|
2493
2497
|
class: "vc-input__showhide",
|
|
2494
|
-
"aria-label":
|
|
2495
|
-
onClick: R[7] || (R[7] = (
|
|
2498
|
+
"aria-label": X.value === "password" ? k.$t("COMPONENTS.CONTROLS.SHOW_PASSWORD") : k.$t("COMPONENTS.CONTROLS.HIDE_PASSWORD"),
|
|
2499
|
+
onClick: R[7] || (R[7] = (q) => X.value = X.value === "password" ? "text" : "password")
|
|
2496
2500
|
}, [
|
|
2497
|
-
|
|
2501
|
+
T(s(K), {
|
|
2498
2502
|
size: "s",
|
|
2499
|
-
icon:
|
|
2503
|
+
icon: X.value === "password" ? "lucide-eye-off" : "lucide-eye"
|
|
2500
2504
|
}, null, 8, ["icon"])
|
|
2501
|
-
], 8, jl)) :
|
|
2505
|
+
], 8, jl)) : $("", !0)
|
|
2502
2506
|
]),
|
|
2503
2507
|
k.$slots["append-inner"] ? (f(), y("div", Hl, [
|
|
2504
|
-
|
|
2505
|
-
])) :
|
|
2508
|
+
x(k.$slots, "append-inner", { focus: W })
|
|
2509
|
+
])) : $("", !0),
|
|
2506
2510
|
e.loading ? (f(), y("div", Gl, [
|
|
2507
|
-
|
|
2511
|
+
T(s(K), {
|
|
2508
2512
|
icon: "lucide-loader-2",
|
|
2509
2513
|
class: "vc-input__loading-icon",
|
|
2510
2514
|
size: "m"
|
|
2511
2515
|
})
|
|
2512
|
-
])) :
|
|
2516
|
+
])) : $("", !0)
|
|
2513
2517
|
])
|
|
2514
2518
|
], 2),
|
|
2515
2519
|
k.$slots.append ? (f(), y("div", Yl, [
|
|
2516
|
-
|
|
2517
|
-
])) :
|
|
2520
|
+
x(k.$slots, "append", { focus: W })
|
|
2521
|
+
])) : $("", !0)
|
|
2518
2522
|
]),
|
|
2519
|
-
|
|
2523
|
+
T(Pe, {
|
|
2520
2524
|
name: "slide-up",
|
|
2521
2525
|
mode: "out-in"
|
|
2522
2526
|
}, {
|
|
2523
|
-
default:
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
id:
|
|
2527
|
+
default: w(() => [
|
|
2528
|
+
s(c) && e.errorMessage ? (f(), y("div", Jl, [
|
|
2529
|
+
x(k.$slots, "error", {}, () => [
|
|
2530
|
+
T(s(pe), {
|
|
2531
|
+
id: s(g),
|
|
2528
2532
|
class: "vc-input__hint-error",
|
|
2529
2533
|
error: !0
|
|
2530
2534
|
}, {
|
|
2531
|
-
default:
|
|
2532
|
-
|
|
2535
|
+
default: w(() => [
|
|
2536
|
+
_(M(e.errorMessage), 1)
|
|
2533
2537
|
]),
|
|
2534
2538
|
_: 1
|
|
2535
2539
|
}, 8, ["id"])
|
|
2536
2540
|
])
|
|
2537
2541
|
])) : (f(), y("div", Xl, [
|
|
2538
|
-
|
|
2539
|
-
e.hint ? (f(), P(
|
|
2542
|
+
x(k.$slots, "hint", {}, () => [
|
|
2543
|
+
e.hint ? (f(), P(s(pe), {
|
|
2540
2544
|
key: 0,
|
|
2541
|
-
id:
|
|
2545
|
+
id: s(d),
|
|
2542
2546
|
class: "vc-input__desc"
|
|
2543
2547
|
}, {
|
|
2544
|
-
default:
|
|
2545
|
-
|
|
2548
|
+
default: w(() => [
|
|
2549
|
+
_(M(e.hint), 1)
|
|
2546
2550
|
]),
|
|
2547
2551
|
_: 1
|
|
2548
|
-
}, 8, ["id"])) :
|
|
2552
|
+
}, 8, ["id"])) : $("", !0)
|
|
2549
2553
|
])
|
|
2550
2554
|
]))
|
|
2551
2555
|
]),
|
|
@@ -2590,74 +2594,74 @@ function Zl(e = {}) {
|
|
|
2590
2594
|
onEnter: a,
|
|
2591
2595
|
onEscape: o,
|
|
2592
2596
|
loop: i = !0
|
|
2593
|
-
} = e, l = S(null),
|
|
2594
|
-
(
|
|
2595
|
-
}, v = (
|
|
2597
|
+
} = e, l = S(null), r = S(-1), u = (b) => {
|
|
2598
|
+
(r.value >= b.length || r.value < 0) && (r.value = b.length > 0 ? 0 : -1);
|
|
2599
|
+
}, v = (b) => {
|
|
2596
2600
|
if (!l.value) return;
|
|
2597
|
-
const
|
|
2598
|
-
if (
|
|
2599
|
-
switch (u(
|
|
2601
|
+
const O = Array.from(l.value.querySelectorAll(n));
|
|
2602
|
+
if (O.length)
|
|
2603
|
+
switch (u(O), b.key) {
|
|
2600
2604
|
case "Tab":
|
|
2601
|
-
m(
|
|
2605
|
+
m(b, O);
|
|
2602
2606
|
break;
|
|
2603
2607
|
case "ArrowDown":
|
|
2604
|
-
|
|
2608
|
+
b.preventDefault(), g(O);
|
|
2605
2609
|
break;
|
|
2606
2610
|
case "ArrowUp":
|
|
2607
|
-
|
|
2611
|
+
b.preventDefault(), d(O);
|
|
2608
2612
|
break;
|
|
2609
2613
|
case "Enter":
|
|
2610
2614
|
case " ":
|
|
2611
|
-
if (
|
|
2612
|
-
const
|
|
2613
|
-
|
|
2615
|
+
if (r.value >= 0 && r.value < O.length) {
|
|
2616
|
+
const V = O[r.value];
|
|
2617
|
+
V && (b.preventDefault(), a ? a(V) : typeof V.click == "function" && V.click());
|
|
2614
2618
|
}
|
|
2615
2619
|
break;
|
|
2616
2620
|
case "Escape":
|
|
2617
|
-
o && (
|
|
2621
|
+
o && (b.preventDefault(), b.stopPropagation(), o());
|
|
2618
2622
|
break;
|
|
2619
2623
|
}
|
|
2620
|
-
}, m = (
|
|
2621
|
-
|
|
2622
|
-
}, g = (
|
|
2623
|
-
if (!
|
|
2624
|
-
if (u(
|
|
2625
|
-
|
|
2624
|
+
}, m = (b, O) => {
|
|
2625
|
+
b.shiftKey ? d(O) : g(O);
|
|
2626
|
+
}, g = (b) => {
|
|
2627
|
+
if (!b.length) return;
|
|
2628
|
+
if (u(b), r.value < b.length - 1)
|
|
2629
|
+
r.value++;
|
|
2626
2630
|
else if (i)
|
|
2627
|
-
|
|
2631
|
+
r.value = 0;
|
|
2628
2632
|
else
|
|
2629
2633
|
return;
|
|
2630
|
-
const
|
|
2631
|
-
|
|
2632
|
-
}, d = (
|
|
2633
|
-
if (!
|
|
2634
|
-
if (u(
|
|
2635
|
-
|
|
2634
|
+
const O = b[r.value];
|
|
2635
|
+
O && typeof O.focus == "function" && O.focus();
|
|
2636
|
+
}, d = (b) => {
|
|
2637
|
+
if (!b.length) return;
|
|
2638
|
+
if (u(b), r.value > 0)
|
|
2639
|
+
r.value--;
|
|
2636
2640
|
else if (i)
|
|
2637
|
-
|
|
2641
|
+
r.value = b.length - 1;
|
|
2638
2642
|
else
|
|
2639
2643
|
return;
|
|
2640
|
-
const
|
|
2641
|
-
|
|
2642
|
-
}, c = (
|
|
2643
|
-
if (!
|
|
2644
|
-
|
|
2645
|
-
const
|
|
2646
|
-
|
|
2647
|
-
},
|
|
2648
|
-
if (!
|
|
2649
|
-
|
|
2650
|
-
const
|
|
2651
|
-
|
|
2652
|
-
}, h = (
|
|
2653
|
-
l.value && l.value.removeEventListener("keydown", v), l.value =
|
|
2644
|
+
const O = b[r.value];
|
|
2645
|
+
O && typeof O.focus == "function" && O.focus();
|
|
2646
|
+
}, c = (b) => {
|
|
2647
|
+
if (!b.length) return;
|
|
2648
|
+
r.value = 0;
|
|
2649
|
+
const O = b[0];
|
|
2650
|
+
O && typeof O.focus == "function" && O.focus();
|
|
2651
|
+
}, p = (b) => {
|
|
2652
|
+
if (!b.length) return;
|
|
2653
|
+
r.value = b.length - 1;
|
|
2654
|
+
const O = b[b.length - 1];
|
|
2655
|
+
O && typeof O.focus == "function" && O.focus();
|
|
2656
|
+
}, h = (b) => {
|
|
2657
|
+
l.value && l.value.removeEventListener("keydown", v), l.value = b, b.addEventListener("keydown", v);
|
|
2654
2658
|
}, E = () => {
|
|
2655
2659
|
l.value && (l.value.removeEventListener("keydown", v), l.value = null);
|
|
2656
2660
|
};
|
|
2657
2661
|
return je(() => {
|
|
2658
2662
|
if (typeof document < "u" && t) {
|
|
2659
|
-
const
|
|
2660
|
-
|
|
2663
|
+
const b = document.querySelector(t);
|
|
2664
|
+
b && h(b);
|
|
2661
2665
|
}
|
|
2662
2666
|
}), rt(() => {
|
|
2663
2667
|
E();
|
|
@@ -2666,35 +2670,35 @@ function Zl(e = {}) {
|
|
|
2666
2670
|
cleanupKeyboardNavigation: E,
|
|
2667
2671
|
focusNextElement: () => {
|
|
2668
2672
|
if (l.value) {
|
|
2669
|
-
const
|
|
2670
|
-
g(
|
|
2673
|
+
const b = Array.from(l.value.querySelectorAll(n));
|
|
2674
|
+
g(b);
|
|
2671
2675
|
}
|
|
2672
2676
|
},
|
|
2673
2677
|
focusPreviousElement: () => {
|
|
2674
2678
|
if (l.value) {
|
|
2675
|
-
const
|
|
2676
|
-
d(
|
|
2679
|
+
const b = Array.from(l.value.querySelectorAll(n));
|
|
2680
|
+
d(b);
|
|
2677
2681
|
}
|
|
2678
2682
|
},
|
|
2679
2683
|
focusFirstElement: () => {
|
|
2680
2684
|
if (l.value) {
|
|
2681
|
-
const
|
|
2682
|
-
c(
|
|
2685
|
+
const b = Array.from(l.value.querySelectorAll(n));
|
|
2686
|
+
c(b);
|
|
2683
2687
|
}
|
|
2684
2688
|
},
|
|
2685
2689
|
focusLastElement: () => {
|
|
2686
2690
|
if (l.value) {
|
|
2687
|
-
const
|
|
2688
|
-
b
|
|
2691
|
+
const b = Array.from(l.value.querySelectorAll(n));
|
|
2692
|
+
p(b);
|
|
2689
2693
|
}
|
|
2690
2694
|
},
|
|
2691
|
-
setFocusedIndex: (
|
|
2695
|
+
setFocusedIndex: (b) => {
|
|
2692
2696
|
if (l.value) {
|
|
2693
|
-
const
|
|
2694
|
-
|
|
2697
|
+
const O = Array.from(l.value.querySelectorAll(n));
|
|
2698
|
+
b >= 0 && b < O.length && (r.value = b);
|
|
2695
2699
|
}
|
|
2696
2700
|
},
|
|
2697
|
-
getFocusedIndex: () =>
|
|
2701
|
+
getFocusedIndex: () => r.value
|
|
2698
2702
|
};
|
|
2699
2703
|
}
|
|
2700
2704
|
function Ot(e, t) {
|
|
@@ -2702,10 +2706,10 @@ function Ot(e, t) {
|
|
|
2702
2706
|
return typeof n == "function" ? n : (a) => a === null || typeof a != "object" ? a : n && n in a ? a[n] : a;
|
|
2703
2707
|
}
|
|
2704
2708
|
function Ql(e) {
|
|
2705
|
-
const t =
|
|
2706
|
-
function a(l,
|
|
2709
|
+
const t = I(() => Ot(e.optionValue(), "id")), n = I(() => Ot(e.optionLabel(), "title"));
|
|
2710
|
+
function a(l, r, u, v) {
|
|
2707
2711
|
const m = (g) => De(t.value(g), l);
|
|
2708
|
-
return u.find(m) || v.find(m) ||
|
|
2712
|
+
return u.find(m) || v.find(m) || r.find(m) || l;
|
|
2709
2713
|
}
|
|
2710
2714
|
function o(l) {
|
|
2711
2715
|
return n.value(l);
|
|
@@ -2766,19 +2770,19 @@ function eo(e) {
|
|
|
2766
2770
|
};
|
|
2767
2771
|
}
|
|
2768
2772
|
const l = ra(a, o, {
|
|
2769
|
-
placement:
|
|
2770
|
-
middleware:
|
|
2773
|
+
placement: I(() => e.placement),
|
|
2774
|
+
middleware: I(() => [
|
|
2771
2775
|
At({ fallbackPlacements: ["top", "bottom"] }),
|
|
2772
2776
|
Nt({ mainAxis: !1 }),
|
|
2773
2777
|
i(),
|
|
2774
2778
|
lt({ mainAxis: 4 })
|
|
2775
2779
|
])
|
|
2776
|
-
}),
|
|
2780
|
+
}), r = I(() => ({
|
|
2777
2781
|
top: `${l.y.value ?? 0}px`,
|
|
2778
2782
|
left: `${l.x.value ?? 0}px`,
|
|
2779
2783
|
width: l.middlewareData.value.sameWidth?.width
|
|
2780
2784
|
}));
|
|
2781
|
-
|
|
2785
|
+
G(
|
|
2782
2786
|
() => l.isPositioned.value,
|
|
2783
2787
|
(v) => {
|
|
2784
2788
|
v && l.update();
|
|
@@ -2793,188 +2797,188 @@ function eo(e) {
|
|
|
2793
2797
|
dropdownToggleRef: a,
|
|
2794
2798
|
dropdownRef: o,
|
|
2795
2799
|
popper: l,
|
|
2796
|
-
dropdownStyle:
|
|
2800
|
+
dropdownStyle: r,
|
|
2797
2801
|
toggleDropdown: u
|
|
2798
2802
|
};
|
|
2799
2803
|
}
|
|
2800
2804
|
function to(e) {
|
|
2801
|
-
const t = S([]), n = S(null), a = S(0), o = S(0), i = S(!1), l = S(!1),
|
|
2802
|
-
let c = !1,
|
|
2803
|
-
const
|
|
2804
|
-
function
|
|
2805
|
-
for (const D of
|
|
2806
|
-
const
|
|
2807
|
-
d.set(
|
|
2805
|
+
const t = S([]), n = S(null), a = S(0), o = S(0), i = S(!1), l = S(!1), r = S(!1), u = S(!1), v = S(), m = S([]), g = S(!1), d = /* @__PURE__ */ new Map();
|
|
2806
|
+
let c = !1, p = 0, h = 0, E = 0, b;
|
|
2807
|
+
const O = I(() => n.value ?? t.value), V = I(() => n.value !== null ? !l.value && n.value.length < o.value : !i.value && t.value.length < a.value);
|
|
2808
|
+
function U(L) {
|
|
2809
|
+
for (const D of L) {
|
|
2810
|
+
const N = String(e.getOptionValue.value(D));
|
|
2811
|
+
d.set(N, D);
|
|
2808
2812
|
}
|
|
2809
2813
|
}
|
|
2810
|
-
function
|
|
2811
|
-
n.value = null, u.value = !1, v.value = void 0, o.value = 0, h = 0, l.value = !1, E++,
|
|
2814
|
+
function te() {
|
|
2815
|
+
n.value = null, u.value = !1, v.value = void 0, o.value = 0, h = 0, l.value = !1, E++, b && (clearTimeout(b), b = void 0);
|
|
2812
2816
|
}
|
|
2813
|
-
async function
|
|
2817
|
+
async function X() {
|
|
2814
2818
|
if (c)
|
|
2815
2819
|
return;
|
|
2816
|
-
const
|
|
2817
|
-
if (typeof
|
|
2820
|
+
const L = e.options();
|
|
2821
|
+
if (typeof L == "function")
|
|
2818
2822
|
try {
|
|
2819
|
-
|
|
2820
|
-
const D = await
|
|
2821
|
-
t.value =
|
|
2823
|
+
r.value = !0;
|
|
2824
|
+
const D = await L(void 0, 0), N = D?.results ?? [];
|
|
2825
|
+
t.value = N, a.value = D?.totalCount ?? 0, p = N.length, i.value = N.length === 0 || p >= a.value, U(t.value), c = !0;
|
|
2822
2826
|
} catch (D) {
|
|
2823
|
-
console.error("useSelectDataSource: error loading options", D), t.value = [], a.value = 0,
|
|
2827
|
+
console.error("useSelectDataSource: error loading options", D), t.value = [], a.value = 0, p = 0, i.value = !0;
|
|
2824
2828
|
} finally {
|
|
2825
|
-
|
|
2829
|
+
r.value = !1;
|
|
2826
2830
|
}
|
|
2827
|
-
else Array.isArray(
|
|
2831
|
+
else Array.isArray(L) && (t.value = [...L], a.value = t.value.length, p = t.value.length, i.value = !0, U(t.value), c = !0);
|
|
2828
2832
|
}
|
|
2829
|
-
function
|
|
2830
|
-
|
|
2833
|
+
function ae() {
|
|
2834
|
+
te();
|
|
2831
2835
|
}
|
|
2832
|
-
async function
|
|
2833
|
-
const
|
|
2834
|
-
if (typeof
|
|
2835
|
-
const D = n.value !== null,
|
|
2836
|
+
async function Z() {
|
|
2837
|
+
const L = e.options();
|
|
2838
|
+
if (typeof L != "function" || r.value || !V.value) return;
|
|
2839
|
+
const D = n.value !== null, N = E, W = n.value;
|
|
2836
2840
|
try {
|
|
2837
|
-
|
|
2838
|
-
const
|
|
2839
|
-
if (D && (n.value !==
|
|
2840
|
-
const
|
|
2841
|
-
if (D ? h +=
|
|
2841
|
+
r.value = !0;
|
|
2842
|
+
const j = await L(v.value, D ? h : p);
|
|
2843
|
+
if (D && (n.value !== W || N !== E)) return;
|
|
2844
|
+
const k = j?.results ?? [];
|
|
2845
|
+
if (D ? h += k.length : p += k.length, k.length === 0) {
|
|
2842
2846
|
D ? l.value = !0 : i.value = !0;
|
|
2843
2847
|
return;
|
|
2844
2848
|
}
|
|
2845
|
-
const
|
|
2846
|
-
D ? (n.value = [...
|
|
2847
|
-
} catch (
|
|
2848
|
-
console.error("useSelectDataSource: error loading more",
|
|
2849
|
+
const R = D ? n.value : t.value, q = new Set(R.map((Te) => String(e.getOptionValue.value(Te)))), fe = k.filter((Te) => !q.has(String(e.getOptionValue.value(Te))));
|
|
2850
|
+
D ? (n.value = [...R, ...fe], o.value = j?.totalCount ?? o.value, h >= o.value && (l.value = !0)) : (t.value = [...R, ...fe], a.value = j?.totalCount ?? a.value, p >= a.value && (i.value = !0)), U(fe);
|
|
2851
|
+
} catch (j) {
|
|
2852
|
+
console.error("useSelectDataSource: error loading more", j);
|
|
2849
2853
|
} finally {
|
|
2850
|
-
|
|
2854
|
+
r.value = !1;
|
|
2851
2855
|
}
|
|
2852
2856
|
}
|
|
2853
|
-
async function
|
|
2854
|
-
v.value =
|
|
2857
|
+
async function ue(L) {
|
|
2858
|
+
v.value = L;
|
|
2855
2859
|
const D = e.options();
|
|
2856
2860
|
if (typeof D == "function") {
|
|
2857
|
-
const
|
|
2861
|
+
const N = ++E;
|
|
2858
2862
|
try {
|
|
2859
2863
|
u.value = !0;
|
|
2860
|
-
const
|
|
2861
|
-
if (
|
|
2862
|
-
const
|
|
2863
|
-
n.value =
|
|
2864
|
-
} catch (
|
|
2865
|
-
if (
|
|
2866
|
-
console.error("useSelectDataSource: error searching",
|
|
2864
|
+
const W = await D(L);
|
|
2865
|
+
if (N !== E) return;
|
|
2866
|
+
const j = W?.results ?? [];
|
|
2867
|
+
n.value = j, o.value = W?.totalCount ?? 0, h = j.length, l.value = j.length === 0 || h >= o.value, U(j);
|
|
2868
|
+
} catch (W) {
|
|
2869
|
+
if (N !== E) return;
|
|
2870
|
+
console.error("useSelectDataSource: error searching", W), n.value = [], o.value = 0, h = 0, l.value = !0;
|
|
2867
2871
|
} finally {
|
|
2868
|
-
|
|
2872
|
+
N === E && (u.value = !1);
|
|
2869
2873
|
}
|
|
2870
2874
|
} else {
|
|
2871
|
-
const
|
|
2872
|
-
const
|
|
2873
|
-
return String(
|
|
2875
|
+
const N = t.value.filter((W) => {
|
|
2876
|
+
const j = e.getOptionLabel.value(W);
|
|
2877
|
+
return String(j).toLowerCase().includes(L.toLowerCase());
|
|
2874
2878
|
});
|
|
2875
|
-
n.value =
|
|
2879
|
+
n.value = N, o.value = N.length, h = N.length, l.value = !0;
|
|
2876
2880
|
}
|
|
2877
2881
|
}
|
|
2878
|
-
function
|
|
2879
|
-
if (!
|
|
2880
|
-
const D =
|
|
2881
|
-
|
|
2882
|
-
e.emit.search(D),
|
|
2883
|
-
},
|
|
2882
|
+
function de(L) {
|
|
2883
|
+
if (!L?.target) return;
|
|
2884
|
+
const D = L.target.value, N = Number(e.debounce());
|
|
2885
|
+
b && clearTimeout(b), N > 0 ? b = setTimeout(() => {
|
|
2886
|
+
e.emit.search(D), ue(D);
|
|
2887
|
+
}, N) : (e.emit.search(D), ue(D));
|
|
2884
2888
|
}
|
|
2885
|
-
function
|
|
2886
|
-
|
|
2889
|
+
function le() {
|
|
2890
|
+
te();
|
|
2887
2891
|
}
|
|
2888
|
-
async function
|
|
2889
|
-
if (
|
|
2890
|
-
const
|
|
2891
|
-
const
|
|
2892
|
-
return
|
|
2893
|
-
}),
|
|
2894
|
-
if (
|
|
2892
|
+
async function z(L) {
|
|
2893
|
+
if (L.length === 0) return [];
|
|
2894
|
+
const N = L.filter((k) => !d.has(String(k))).filter((k) => {
|
|
2895
|
+
const R = t.value.find((q) => De(e.getOptionValue.value(q), k));
|
|
2896
|
+
return R ? (d.set(String(k), R), !1) : !0;
|
|
2897
|
+
}), W = e.options();
|
|
2898
|
+
if (N.length > 0 && typeof W == "function") {
|
|
2895
2899
|
try {
|
|
2896
2900
|
g.value = !0;
|
|
2897
|
-
const
|
|
2898
|
-
|
|
2899
|
-
} catch (
|
|
2900
|
-
console.error("useSelectDataSource: error resolving",
|
|
2901
|
+
const R = await W(void 0, void 0, N);
|
|
2902
|
+
R?.results && U(R.results);
|
|
2903
|
+
} catch (R) {
|
|
2904
|
+
console.error("useSelectDataSource: error resolving", R);
|
|
2901
2905
|
} finally {
|
|
2902
2906
|
g.value = !1;
|
|
2903
2907
|
}
|
|
2904
|
-
|
|
2905
|
-
} else if (
|
|
2906
|
-
for (const
|
|
2907
|
-
const
|
|
2908
|
-
|
|
2908
|
+
N.filter((R) => !d.has(String(R))).length > 0 && !c && await X();
|
|
2909
|
+
} else if (N.length > 0 && Array.isArray(W))
|
|
2910
|
+
for (const k of W) {
|
|
2911
|
+
const R = String(e.getOptionValue.value(k));
|
|
2912
|
+
N.includes(R) && d.set(R, k);
|
|
2909
2913
|
}
|
|
2910
|
-
const
|
|
2911
|
-
return m.value =
|
|
2914
|
+
const j = L.map((k) => d.get(String(k))).filter(Boolean);
|
|
2915
|
+
return m.value = j, j;
|
|
2912
2916
|
}
|
|
2913
|
-
async function
|
|
2914
|
-
t.value = [], a.value = 0,
|
|
2917
|
+
async function B() {
|
|
2918
|
+
t.value = [], a.value = 0, p = 0, i.value = !1, te(), d.clear(), m.value = [], c = !1, await X();
|
|
2915
2919
|
}
|
|
2916
|
-
return
|
|
2920
|
+
return G(
|
|
2917
2921
|
e.options,
|
|
2918
2922
|
async () => {
|
|
2919
|
-
t.value = [], a.value = 0,
|
|
2920
|
-
const
|
|
2921
|
-
if (Array.isArray(
|
|
2923
|
+
t.value = [], a.value = 0, p = 0, i.value = !1, te(), d.clear(), c = !1;
|
|
2924
|
+
const L = e.options();
|
|
2925
|
+
if (Array.isArray(L) && (t.value = [...L], a.value = t.value.length, p = t.value.length, i.value = !0, U(t.value), c = !0, m.value.length === 0)) {
|
|
2922
2926
|
const D = m.value;
|
|
2923
|
-
(D.length === 0 ? t.value.filter((
|
|
2924
|
-
const
|
|
2925
|
-
return d.has(
|
|
2927
|
+
(D.length === 0 ? t.value.filter((W) => {
|
|
2928
|
+
const j = String(e.getOptionValue.value(W));
|
|
2929
|
+
return d.has(j);
|
|
2926
2930
|
}) : D).length;
|
|
2927
2931
|
}
|
|
2928
2932
|
},
|
|
2929
2933
|
{ deep: !1 }
|
|
2930
2934
|
), {
|
|
2931
|
-
displayItems:
|
|
2932
|
-
loading:
|
|
2935
|
+
displayItems: O,
|
|
2936
|
+
loading: r,
|
|
2933
2937
|
searchLoading: u,
|
|
2934
|
-
hasMore:
|
|
2938
|
+
hasMore: V,
|
|
2935
2939
|
filterString: v,
|
|
2936
2940
|
resolvedDefaults: m,
|
|
2937
2941
|
defaultOptionLoading: g,
|
|
2938
2942
|
cachedItems: t,
|
|
2939
|
-
open:
|
|
2940
|
-
close:
|
|
2941
|
-
onInput:
|
|
2942
|
-
clearSearch:
|
|
2943
|
-
loadMore:
|
|
2944
|
-
resolve:
|
|
2945
|
-
refresh:
|
|
2943
|
+
open: X,
|
|
2944
|
+
close: ae,
|
|
2945
|
+
onInput: de,
|
|
2946
|
+
clearSearch: le,
|
|
2947
|
+
loadMore: Z,
|
|
2948
|
+
resolve: z,
|
|
2949
|
+
refresh: B
|
|
2946
2950
|
};
|
|
2947
2951
|
}
|
|
2948
2952
|
function no(e) {
|
|
2949
2953
|
let t = [];
|
|
2950
|
-
const n =
|
|
2954
|
+
const n = I(() => {
|
|
2951
2955
|
const g = e.mapOptions() === !0 && e.multiple() !== !0, d = e.modelValue() !== void 0 && (e.modelValue() !== null || g === !0) ? e.multiple() === !0 && Array.isArray(e.modelValue()) ? e.modelValue() : [e.modelValue()] : [];
|
|
2952
2956
|
if (e.mapOptions() === !0 && Array.isArray(e.displayItems.value) === !0) {
|
|
2953
|
-
const c = e.mapOptions() === !0 && t !== void 0 ? t : [],
|
|
2957
|
+
const c = e.mapOptions() === !0 && t !== void 0 ? t : [], p = d.map((h) => {
|
|
2954
2958
|
const E = e.getOption(h, c, e.resolvedDefaults.value, e.displayItems.value);
|
|
2955
2959
|
if (E === h && e.cachedItems.value.length > 0) {
|
|
2956
|
-
const
|
|
2957
|
-
if (
|
|
2960
|
+
const b = e.getOption(h, c, e.resolvedDefaults.value, e.cachedItems.value);
|
|
2961
|
+
if (b !== h) return b;
|
|
2958
2962
|
}
|
|
2959
2963
|
return E;
|
|
2960
2964
|
});
|
|
2961
|
-
return e.modelValue() === null && g === !0 ?
|
|
2965
|
+
return e.modelValue() === null && g === !0 ? p.filter((h) => h !== null) : p;
|
|
2962
2966
|
}
|
|
2963
2967
|
return d;
|
|
2964
2968
|
});
|
|
2965
|
-
|
|
2969
|
+
G(
|
|
2966
2970
|
n,
|
|
2967
2971
|
(g) => {
|
|
2968
2972
|
t = g;
|
|
2969
2973
|
},
|
|
2970
2974
|
{ immediate: !0 }
|
|
2971
2975
|
);
|
|
2972
|
-
const a =
|
|
2976
|
+
const a = I(() => n.value.map((g) => e.getOptionValue.value(g)));
|
|
2973
2977
|
function o(g) {
|
|
2974
2978
|
const d = e.getOptionValue.value(g);
|
|
2975
2979
|
return a.value.find((c) => De(c, d)) !== void 0;
|
|
2976
2980
|
}
|
|
2977
|
-
const i =
|
|
2981
|
+
const i = I(
|
|
2978
2982
|
() => n.value.map((g, d) => ({
|
|
2979
2983
|
index: d,
|
|
2980
2984
|
opt: g,
|
|
@@ -2982,7 +2986,7 @@ function no(e) {
|
|
|
2982
2986
|
toggleOption: u,
|
|
2983
2987
|
removeAtIndex: v
|
|
2984
2988
|
}))
|
|
2985
|
-
), l =
|
|
2989
|
+
), l = I(() => e.fieldValueIsFilled(n.value)), r = I(() => e.displayItems.value.map((g, d) => ({
|
|
2986
2990
|
index: d,
|
|
2987
2991
|
opt: g,
|
|
2988
2992
|
selected: o(g) === !0,
|
|
@@ -3002,9 +3006,9 @@ function no(e) {
|
|
|
3002
3006
|
e.emit.updateModelValue(e.multiple() === !0 ? [h] : h);
|
|
3003
3007
|
return;
|
|
3004
3008
|
}
|
|
3005
|
-
const c = e.modelValue().slice(),
|
|
3006
|
-
if (
|
|
3007
|
-
c.splice(
|
|
3009
|
+
const c = e.modelValue().slice(), p = a.value.findIndex((h) => De(h, d));
|
|
3010
|
+
if (p > -1)
|
|
3011
|
+
c.splice(p, 1);
|
|
3008
3012
|
else {
|
|
3009
3013
|
const h = e.emitValue() === !0 ? d : g;
|
|
3010
3014
|
c.push(h);
|
|
@@ -3031,7 +3035,7 @@ function no(e) {
|
|
|
3031
3035
|
selectedScope: i,
|
|
3032
3036
|
hasValue: l,
|
|
3033
3037
|
innerOptionsValue: a,
|
|
3034
|
-
optionScope:
|
|
3038
|
+
optionScope: r,
|
|
3035
3039
|
toggleOption: u,
|
|
3036
3040
|
removeAtIndex: v,
|
|
3037
3041
|
isOptionSelected: o,
|
|
@@ -3071,7 +3075,7 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3071
3075
|
}, wo = ["aria-label"], Oo = { class: "vc-select__chevron" }, Eo = { class: "vc-select__hint-error" }, Lo = { key: 0 }, Bo = { key: 1 }, Co = {
|
|
3072
3076
|
key: 1,
|
|
3073
3077
|
class: "vc-select__append"
|
|
3074
|
-
}, xo = /* @__PURE__ */
|
|
3078
|
+
}, xo = /* @__PURE__ */ F({
|
|
3075
3079
|
__name: "SelectTrigger",
|
|
3076
3080
|
props: {
|
|
3077
3081
|
isOpened: { type: Boolean },
|
|
@@ -3103,7 +3107,7 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3103
3107
|
},
|
|
3104
3108
|
emits: ["focus", "blur", "reset", "removeAtIndex"],
|
|
3105
3109
|
setup(e, { expose: t }) {
|
|
3106
|
-
const { t: n } =
|
|
3110
|
+
const { t: n } = Oe({ useScope: "global" }), a = S(null);
|
|
3107
3111
|
return t({
|
|
3108
3112
|
toggleRef: a
|
|
3109
3113
|
}), (o, i) => (f(), y("div", {
|
|
@@ -3111,29 +3115,29 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3111
3115
|
ref: a,
|
|
3112
3116
|
class: "vc-select__dropdown-toggle"
|
|
3113
3117
|
}, [
|
|
3114
|
-
|
|
3118
|
+
x(o.$slots, "control", {
|
|
3115
3119
|
toggleHandler: e.toggleDropdown,
|
|
3116
3120
|
isOpened: e.isOpened
|
|
3117
3121
|
}, () => [
|
|
3118
|
-
|
|
3122
|
+
C("div", ao, [
|
|
3119
3123
|
o.$slots.prepend ? (f(), y("div", lo, [
|
|
3120
|
-
|
|
3121
|
-
])) :
|
|
3122
|
-
|
|
3123
|
-
class:
|
|
3124
|
+
x(o.$slots, "prepend")
|
|
3125
|
+
])) : $("", !0),
|
|
3126
|
+
C("div", {
|
|
3127
|
+
class: H(["vc-select__field-wrapper", {
|
|
3124
3128
|
"vc-select__field-wrapper--default": e.size === "default",
|
|
3125
3129
|
"vc-select__field-wrapper--small": e.size === "small"
|
|
3126
3130
|
}])
|
|
3127
3131
|
}, [
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3132
|
+
C("div", oo, [
|
|
3133
|
+
C("div", io, [
|
|
3134
|
+
C("div", ro, [
|
|
3131
3135
|
o.$slots["prepend-inner"] ? (f(), y("div", so, [
|
|
3132
|
-
|
|
3133
|
-
])) :
|
|
3134
|
-
|
|
3135
|
-
e.prefix ? (f(), y("div", co,
|
|
3136
|
-
|
|
3136
|
+
x(o.$slots, "prepend-inner")
|
|
3137
|
+
])) : $("", !0),
|
|
3138
|
+
C("div", uo, [
|
|
3139
|
+
e.prefix ? (f(), y("div", co, M(e.prefix), 1)) : $("", !0),
|
|
3140
|
+
C("div", {
|
|
3137
3141
|
"data-test-id": "dropdown-toggle",
|
|
3138
3142
|
class: "vc-select__input",
|
|
3139
3143
|
role: "combobox",
|
|
@@ -3145,18 +3149,18 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3145
3149
|
"aria-describedby": e.ariaDescribedBy,
|
|
3146
3150
|
"aria-required": e.ariaRequired,
|
|
3147
3151
|
"aria-invalid": e.error || void 0,
|
|
3148
|
-
onClick: i[0] || (i[0] =
|
|
3152
|
+
onClick: i[0] || (i[0] = Y(
|
|
3149
3153
|
//@ts-ignore
|
|
3150
3154
|
(...l) => e.toggleDropdown && e.toggleDropdown(...l),
|
|
3151
3155
|
["stop"]
|
|
3152
3156
|
)),
|
|
3153
3157
|
onKeydown: [
|
|
3154
|
-
i[1] || (i[1] =
|
|
3158
|
+
i[1] || (i[1] = Q(Y(
|
|
3155
3159
|
//@ts-ignore
|
|
3156
3160
|
(...l) => e.toggleDropdown && e.toggleDropdown(...l),
|
|
3157
3161
|
["stop"]
|
|
3158
3162
|
), ["enter"])),
|
|
3159
|
-
i[2] || (i[2] =
|
|
3163
|
+
i[2] || (i[2] = Q(Y(
|
|
3160
3164
|
//@ts-ignore
|
|
3161
3165
|
(...l) => e.toggleDropdown && e.toggleDropdown(...l),
|
|
3162
3166
|
["stop"]
|
|
@@ -3166,50 +3170,50 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3166
3170
|
onBlur: i[4] || (i[4] = (l) => o.$emit("blur"))
|
|
3167
3171
|
}, [
|
|
3168
3172
|
e.hasValue ? e.selectedScope && e.selectedScope.length && e.hasValue ? (f(), y("div", go, [
|
|
3169
|
-
(f(!0), y(
|
|
3170
|
-
key:
|
|
3173
|
+
(f(!0), y(Be, null, st(e.selectedScope, (l, r) => (f(), y("div", {
|
|
3174
|
+
key: r,
|
|
3171
3175
|
class: "vc-select__selected-item"
|
|
3172
3176
|
}, [
|
|
3173
|
-
e.multiple ?
|
|
3177
|
+
e.multiple ? x(o.$slots, "selected-item", ne({
|
|
3174
3178
|
key: 0,
|
|
3175
3179
|
ref_for: !0
|
|
3176
3180
|
}, l), () => [
|
|
3177
|
-
|
|
3178
|
-
e.loading ? (f(), y("span", po,
|
|
3179
|
-
e.disabled ?
|
|
3181
|
+
C("div", mo, [
|
|
3182
|
+
e.loading ? (f(), y("span", po, M(s(n)("COMPONENTS.MOLECULES.VC_SELECT.LOADING")), 1)) : (f(), y("span", bo, M(e.getOptionLabel(l.opt)), 1)),
|
|
3183
|
+
e.disabled ? $("", !0) : (f(), y("button", {
|
|
3180
3184
|
key: 2,
|
|
3181
3185
|
type: "button",
|
|
3182
3186
|
class: "vc-select__chip-remove",
|
|
3183
3187
|
"aria-label": `Remove ${e.getOptionLabel(l.opt) || ""}`,
|
|
3184
3188
|
tabindex: "0",
|
|
3185
|
-
onClick:
|
|
3186
|
-
onKeydown:
|
|
3189
|
+
onClick: Y((u) => o.$emit("removeAtIndex", l.index), ["stop"]),
|
|
3190
|
+
onKeydown: Q(Y((u) => o.$emit("removeAtIndex", l.index), ["stop", "prevent"]), ["enter"])
|
|
3187
3191
|
}, [
|
|
3188
|
-
|
|
3192
|
+
T(s(K), {
|
|
3189
3193
|
class: "vc-select__icon-remove",
|
|
3190
3194
|
icon: "lucide-x",
|
|
3191
3195
|
size: "xs"
|
|
3192
3196
|
})
|
|
3193
3197
|
], 40, yo))
|
|
3194
3198
|
])
|
|
3195
|
-
]) : e.multiple ?
|
|
3196
|
-
e.loading ? (f(), y("span", ho,
|
|
3199
|
+
]) : e.multiple ? $("", !0) : (f(), y(Be, { key: 1 }, [
|
|
3200
|
+
e.loading ? (f(), y("span", ho, M(s(n)("COMPONENTS.MOLECULES.VC_SELECT.LOADING")), 1)) : x(o.$slots, "selected-item", ne({
|
|
3197
3201
|
key: 1,
|
|
3198
3202
|
ref_for: !0
|
|
3199
3203
|
}, l), () => [
|
|
3200
|
-
|
|
3204
|
+
_(M(e.loading ? s(n)("COMPONENTS.MOLECULES.VC_SELECT.LOADING") : e.getEmittingOptionValue(l.opt)), 1)
|
|
3201
3205
|
])
|
|
3202
3206
|
], 64))
|
|
3203
3207
|
]))), 128))
|
|
3204
|
-
])) :
|
|
3205
|
-
e.placeholder ? (f(), y(
|
|
3206
|
-
|
|
3207
|
-
], 64)) : (f(), y(
|
|
3208
|
-
|
|
3208
|
+
])) : $("", !0) : (f(), y("div", vo, [
|
|
3209
|
+
e.placeholder ? (f(), y(Be, { key: 0 }, [
|
|
3210
|
+
_(M(e.placeholder), 1)
|
|
3211
|
+
], 64)) : (f(), y(Be, { key: 1 }, [
|
|
3212
|
+
_(M(s(n)("COMPONENTS.MOLECULES.VC_SELECT.CLICK_TO_SELECT")), 1)
|
|
3209
3213
|
], 64))
|
|
3210
3214
|
]))
|
|
3211
3215
|
], 40, fo),
|
|
3212
|
-
e.suffix ? (f(), y("div", ko,
|
|
3216
|
+
e.suffix ? (f(), y("div", ko, M(e.suffix), 1)) : $("", !0),
|
|
3213
3217
|
e.clearable && e.hasValue && !e.disabled ? (f(), y("div", {
|
|
3214
3218
|
key: 2,
|
|
3215
3219
|
class: "vc-select__clear",
|
|
@@ -3218,52 +3222,52 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3218
3222
|
tabindex: "0",
|
|
3219
3223
|
onClick: i[5] || (i[5] = (l) => o.$emit("reset")),
|
|
3220
3224
|
onKeydown: [
|
|
3221
|
-
i[6] || (i[6] =
|
|
3222
|
-
i[7] || (i[7] =
|
|
3225
|
+
i[6] || (i[6] = Q((l) => o.$emit("reset"), ["enter"])),
|
|
3226
|
+
i[7] || (i[7] = Q((l) => o.$emit("reset"), ["space"]))
|
|
3223
3227
|
]
|
|
3224
3228
|
}, [
|
|
3225
|
-
|
|
3229
|
+
T(s(K), {
|
|
3226
3230
|
size: "xs",
|
|
3227
3231
|
icon: "lucide-x"
|
|
3228
3232
|
})
|
|
3229
|
-
], 40, So)) :
|
|
3233
|
+
], 40, So)) : $("", !0)
|
|
3230
3234
|
]),
|
|
3231
3235
|
o.$slots["append-inner"] ? (f(), y("div", Io, [
|
|
3232
|
-
|
|
3233
|
-
])) :
|
|
3236
|
+
x(o.$slots, "append-inner")
|
|
3237
|
+
])) : $("", !0),
|
|
3234
3238
|
e.loading || e.listLoading || e.defaultOptionLoading ? (f(), y("div", $o, [
|
|
3235
|
-
|
|
3239
|
+
T(s(K), {
|
|
3236
3240
|
icon: "lucide-loader-2",
|
|
3237
3241
|
class: "tw-animate-spin",
|
|
3238
3242
|
size: "m"
|
|
3239
3243
|
})
|
|
3240
|
-
])) :
|
|
3241
|
-
e.disabled ?
|
|
3244
|
+
])) : $("", !0),
|
|
3245
|
+
e.disabled ? $("", !0) : (f(), y("div", {
|
|
3242
3246
|
key: 3,
|
|
3243
3247
|
class: "vc-select__chevron-container",
|
|
3244
3248
|
role: "button",
|
|
3245
3249
|
"aria-label": o.$t("COMPONENTS.CONTROLS.TOGGLE_DROPDOWN"),
|
|
3246
3250
|
tabindex: "0",
|
|
3247
|
-
onClick: i[8] || (i[8] =
|
|
3251
|
+
onClick: i[8] || (i[8] = Y(
|
|
3248
3252
|
//@ts-ignore
|
|
3249
3253
|
(...l) => e.toggleDropdown && e.toggleDropdown(...l),
|
|
3250
3254
|
["stop"]
|
|
3251
3255
|
)),
|
|
3252
3256
|
onKeydown: [
|
|
3253
|
-
i[9] || (i[9] =
|
|
3257
|
+
i[9] || (i[9] = Q(Y(
|
|
3254
3258
|
//@ts-ignore
|
|
3255
3259
|
(...l) => e.toggleDropdown && e.toggleDropdown(...l),
|
|
3256
3260
|
["stop"]
|
|
3257
3261
|
), ["enter"])),
|
|
3258
|
-
i[10] || (i[10] =
|
|
3262
|
+
i[10] || (i[10] = Q(Y(
|
|
3259
3263
|
//@ts-ignore
|
|
3260
3264
|
(...l) => e.toggleDropdown && e.toggleDropdown(...l),
|
|
3261
3265
|
["stop"]
|
|
3262
3266
|
), ["space"]))
|
|
3263
3267
|
]
|
|
3264
3268
|
}, [
|
|
3265
|
-
|
|
3266
|
-
|
|
3269
|
+
C("div", Oo, [
|
|
3270
|
+
T(s(K), {
|
|
3267
3271
|
size: "s",
|
|
3268
3272
|
icon: "lucide-chevron-down"
|
|
3269
3273
|
})
|
|
@@ -3272,37 +3276,37 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3272
3276
|
])
|
|
3273
3277
|
])
|
|
3274
3278
|
]),
|
|
3275
|
-
|
|
3276
|
-
|
|
3279
|
+
C("div", Eo, [
|
|
3280
|
+
T(Pe, {
|
|
3277
3281
|
name: "slide-up",
|
|
3278
3282
|
mode: "out-in"
|
|
3279
3283
|
}, {
|
|
3280
|
-
default:
|
|
3284
|
+
default: w(() => [
|
|
3281
3285
|
e.error && e.errorMessage ? (f(), y("div", Lo, [
|
|
3282
|
-
|
|
3283
|
-
|
|
3286
|
+
x(o.$slots, "error", {}, () => [
|
|
3287
|
+
T(s(pe), {
|
|
3284
3288
|
id: e.errorId,
|
|
3285
3289
|
class: "vc-select__error-message",
|
|
3286
3290
|
error: !0
|
|
3287
3291
|
}, {
|
|
3288
|
-
default:
|
|
3289
|
-
|
|
3292
|
+
default: w(() => [
|
|
3293
|
+
_(M(e.errorMessage), 1)
|
|
3290
3294
|
]),
|
|
3291
3295
|
_: 1
|
|
3292
3296
|
}, 8, ["id"])
|
|
3293
3297
|
])
|
|
3294
3298
|
])) : (f(), y("div", Bo, [
|
|
3295
|
-
|
|
3296
|
-
e.hint ? (f(), P(
|
|
3299
|
+
x(o.$slots, "hint", {}, () => [
|
|
3300
|
+
e.hint ? (f(), P(s(pe), {
|
|
3297
3301
|
key: 0,
|
|
3298
3302
|
id: e.hintId,
|
|
3299
3303
|
class: "vc-select__hint"
|
|
3300
3304
|
}, {
|
|
3301
|
-
default:
|
|
3302
|
-
|
|
3305
|
+
default: w(() => [
|
|
3306
|
+
_(M(e.hint), 1)
|
|
3303
3307
|
]),
|
|
3304
3308
|
_: 1
|
|
3305
|
-
}, 8, ["id"])) :
|
|
3309
|
+
}, 8, ["id"])) : $("", !0)
|
|
3306
3310
|
])
|
|
3307
3311
|
]))
|
|
3308
3312
|
]),
|
|
@@ -3311,8 +3315,8 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3311
3315
|
])
|
|
3312
3316
|
], 2),
|
|
3313
3317
|
o.$slots.append ? (f(), y("div", Co, [
|
|
3314
|
-
|
|
3315
|
-
])) :
|
|
3318
|
+
x(o.$slots, "append")
|
|
3319
|
+
])) : $("", !0)
|
|
3316
3320
|
])
|
|
3317
3321
|
])
|
|
3318
3322
|
], 512));
|
|
@@ -3326,7 +3330,7 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3326
3330
|
}, Do = { class: "tw-ml-1" }, Vo = {
|
|
3327
3331
|
key: 1,
|
|
3328
3332
|
class: "vc-select__no-options"
|
|
3329
|
-
}, Po = { class: "vc-select__no-options-text" }, Fo = /* @__PURE__ */
|
|
3333
|
+
}, Po = { class: "vc-select__no-options-text" }, Fo = /* @__PURE__ */ F({
|
|
3330
3334
|
__name: "SelectDropdown",
|
|
3331
3335
|
props: {
|
|
3332
3336
|
isOpened: { type: Boolean },
|
|
@@ -3342,40 +3346,40 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3342
3346
|
},
|
|
3343
3347
|
emits: ["input", "clickOutside"],
|
|
3344
3348
|
setup(e, { expose: t, emit: n }) {
|
|
3345
|
-
const a = e, o = n, { t: i } =
|
|
3349
|
+
const a = e, o = n, { t: i } = Oe({ useScope: "global" }), { teleportTarget: l } = wn(), r = S(null), u = S(null), v = S(null), m = S(null), g = I(() => v.value?.viewportRef ?? null);
|
|
3346
3350
|
function d(c) {
|
|
3347
|
-
const
|
|
3348
|
-
if (!
|
|
3349
|
-
if (
|
|
3350
|
-
const E =
|
|
3351
|
-
(E ||
|
|
3351
|
+
const p = g.value;
|
|
3352
|
+
if (!p) return;
|
|
3353
|
+
if (p.contains(c.target)) {
|
|
3354
|
+
const E = p.scrollTop <= 0 && c.deltaY < 0, b = Ft(p) && c.deltaY > 0;
|
|
3355
|
+
(E || b) && c.preventDefault();
|
|
3352
3356
|
} else
|
|
3353
|
-
c.preventDefault(),
|
|
3357
|
+
c.preventDefault(), p.scrollTop += c.deltaY;
|
|
3354
3358
|
v.value?.updateScrollState();
|
|
3355
3359
|
}
|
|
3356
|
-
return
|
|
3360
|
+
return G(
|
|
3357
3361
|
() => a.isOpened,
|
|
3358
3362
|
(c) => {
|
|
3359
|
-
c &&
|
|
3363
|
+
c && $e(() => v.value?.updateScrollState());
|
|
3360
3364
|
}
|
|
3361
|
-
),
|
|
3365
|
+
), G(
|
|
3362
3366
|
() => a.optionScope.length,
|
|
3363
3367
|
() => {
|
|
3364
|
-
a.isOpened &&
|
|
3368
|
+
a.isOpened && $e(() => v.value?.updateScrollState());
|
|
3365
3369
|
}
|
|
3366
3370
|
), t({
|
|
3367
|
-
dropdownElRef:
|
|
3371
|
+
dropdownElRef: r,
|
|
3368
3372
|
searchInputRef: u,
|
|
3369
3373
|
viewportRef: g,
|
|
3370
3374
|
loadMoreRef: m
|
|
3371
|
-
}), (c,
|
|
3372
|
-
|
|
3373
|
-
default:
|
|
3375
|
+
}), (c, p) => (f(), P(dn, { to: s(l) }, [
|
|
3376
|
+
T(Pe, { name: "select-dropdown" }, {
|
|
3377
|
+
default: w(() => [
|
|
3374
3378
|
e.isOpened ? ct((f(), y("div", {
|
|
3375
3379
|
key: 0,
|
|
3376
3380
|
id: e.listboxId,
|
|
3377
3381
|
ref_key: "dropdownElRef",
|
|
3378
|
-
ref:
|
|
3382
|
+
ref: r,
|
|
3379
3383
|
"data-test-id": "dropdown",
|
|
3380
3384
|
class: "vc-select__dropdown",
|
|
3381
3385
|
role: "listbox",
|
|
@@ -3391,75 +3395,75 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3391
3395
|
tabindex: "0",
|
|
3392
3396
|
"aria-label": c.$t("COMPONENTS.CONTROLS.SEARCH_OPTIONS"),
|
|
3393
3397
|
autocomplete: "off",
|
|
3394
|
-
onInput:
|
|
3398
|
+
onInput: p[0] || (p[0] = (h) => o("input", h)),
|
|
3395
3399
|
onKeydown: [
|
|
3396
|
-
|
|
3400
|
+
p[1] || (p[1] = Q(Y(() => {
|
|
3397
3401
|
}, ["stop"]), ["space"])),
|
|
3398
|
-
|
|
3402
|
+
p[2] || (p[2] = Q(Y(() => {
|
|
3399
3403
|
}, ["stop"]), ["enter"]))
|
|
3400
3404
|
]
|
|
3401
|
-
}, null, 40, Ro)) :
|
|
3402
|
-
|
|
3405
|
+
}, null, 40, Ro)) : $("", !0),
|
|
3406
|
+
T(s(il), {
|
|
3403
3407
|
ref_key: "scrollContainerRef",
|
|
3404
3408
|
ref: v,
|
|
3405
3409
|
class: "vc-select__scroll-container"
|
|
3406
3410
|
}, {
|
|
3407
|
-
default:
|
|
3408
|
-
(f(!0), y(
|
|
3411
|
+
default: w(() => [
|
|
3412
|
+
(f(!0), y(Be, null, st(e.optionScope, (h, E) => (f(), y("div", {
|
|
3409
3413
|
key: E,
|
|
3410
|
-
class:
|
|
3414
|
+
class: H(["vc-select__option", { "vc-select__option--selected": h.selected }]),
|
|
3411
3415
|
"data-test-id": "option",
|
|
3412
3416
|
role: "option",
|
|
3413
3417
|
"aria-selected": h.selected,
|
|
3414
3418
|
tabindex: "0",
|
|
3415
3419
|
"data-index": E,
|
|
3416
|
-
onClick: (
|
|
3420
|
+
onClick: (b) => h.toggleOption(h.opt),
|
|
3417
3421
|
onKeydown: [
|
|
3418
|
-
|
|
3419
|
-
|
|
3422
|
+
Q((b) => h.toggleOption(h.opt), ["enter"]),
|
|
3423
|
+
Q((b) => h.toggleOption(h.opt), ["space"])
|
|
3420
3424
|
]
|
|
3421
3425
|
}, [
|
|
3422
|
-
|
|
3423
|
-
|
|
3426
|
+
x(c.$slots, "option", ne({ ref_for: !0 }, h), () => [
|
|
3427
|
+
_(M(h.label), 1)
|
|
3424
3428
|
]),
|
|
3425
3429
|
h.selected ? (f(), y("span", Ao, [
|
|
3426
|
-
|
|
3430
|
+
T(s(K), {
|
|
3427
3431
|
icon: "lucide-check",
|
|
3428
3432
|
size: "xs"
|
|
3429
3433
|
})
|
|
3430
|
-
])) :
|
|
3434
|
+
])) : $("", !0)
|
|
3431
3435
|
], 42, Mo))), 128)),
|
|
3432
3436
|
e.listLoading ? (f(), y("div", No, [
|
|
3433
|
-
|
|
3437
|
+
T(s(K), {
|
|
3434
3438
|
icon: "lucide-loader-2",
|
|
3435
3439
|
class: "tw-animate-spin",
|
|
3436
3440
|
size: "m"
|
|
3437
3441
|
}),
|
|
3438
|
-
|
|
3439
|
-
])) :
|
|
3442
|
+
C("span", Do, M(e.optionsListLength > 0 ? s(i)("COMPONENTS.MOLECULES.VC_SELECT.LOADING_MORE") : s(i)("COMPONENTS.MOLECULES.VC_SELECT.LOADING")), 1)
|
|
3443
|
+
])) : $("", !0),
|
|
3440
3444
|
!e.listLoading && !e.optionsListLength ? (f(), y("div", Vo, [
|
|
3441
|
-
|
|
3442
|
-
|
|
3445
|
+
x(c.$slots, "no-options", {}, () => [
|
|
3446
|
+
C("span", Po, M(s(i)("COMPONENTS.MOLECULES.VC_SELECT.NO_OPTIONS")), 1)
|
|
3443
3447
|
])
|
|
3444
|
-
])) :
|
|
3448
|
+
])) : $("", !0),
|
|
3445
3449
|
e.hasNextPage && !e.listLoading ? (f(), y("span", {
|
|
3446
3450
|
key: 2,
|
|
3447
3451
|
ref_key: "loadMoreRef",
|
|
3448
3452
|
ref: m,
|
|
3449
3453
|
class: "vc-select__load-more-trigger"
|
|
3450
|
-
}, null, 512)) :
|
|
3454
|
+
}, null, 512)) : $("", !0)
|
|
3451
3455
|
]),
|
|
3452
3456
|
_: 3
|
|
3453
3457
|
}, 512)
|
|
3454
3458
|
], 44, To)), [
|
|
3455
|
-
[
|
|
3456
|
-
]) :
|
|
3459
|
+
[s(zn), [() => o("clickOutside"), { ignore: [e.dropdownToggleRef] }]]
|
|
3460
|
+
]) : $("", !0)
|
|
3457
3461
|
]),
|
|
3458
3462
|
_: 3
|
|
3459
3463
|
})
|
|
3460
3464
|
], 8, ["to"]));
|
|
3461
3465
|
}
|
|
3462
|
-
}), zo = ["innerHTML"], qo = { class: "vc-select__field-container" }, Uo = /* @__PURE__ */
|
|
3466
|
+
}), zo = ["innerHTML"], qo = { class: "vc-select__field-container" }, Uo = /* @__PURE__ */ F({
|
|
3463
3467
|
inheritAttrs: !1,
|
|
3464
3468
|
__name: "vc-select",
|
|
3465
3469
|
props: {
|
|
@@ -3493,67 +3497,67 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3493
3497
|
},
|
|
3494
3498
|
emits: ["update:modelValue", "search", "close"],
|
|
3495
3499
|
setup(e, { emit: t }) {
|
|
3496
|
-
const n = e, a = Lt(), o =
|
|
3497
|
-
const { class:
|
|
3498
|
-
return
|
|
3499
|
-
}), i = t, { t: l } =
|
|
3500
|
+
const n = e, a = Lt(), o = I(() => {
|
|
3501
|
+
const { class: A, ...ee } = a;
|
|
3502
|
+
return ee;
|
|
3503
|
+
}), i = t, { t: l } = Oe({ useScope: "global" }), r = Ee(), {
|
|
3500
3504
|
fieldId: u,
|
|
3501
3505
|
labelId: v,
|
|
3502
3506
|
errorId: m,
|
|
3503
3507
|
hintId: g,
|
|
3504
3508
|
invalid: d,
|
|
3505
3509
|
resolvedDisabled: c,
|
|
3506
|
-
resolvedName:
|
|
3510
|
+
resolvedName: p,
|
|
3507
3511
|
ariaRequired: h,
|
|
3508
3512
|
ariaDescribedBy: E
|
|
3509
|
-
} = He(n),
|
|
3513
|
+
} = He(n), b = I(() => `${u.value}-listbox`), O = S(null), V = S(null), { selectRootRef: U, isSelectVisible: te, ensureVisibility: X } = _l(), { getOptionValue: ae, getOptionLabel: Z, getOption: ue, getEmittingOptionValue: de, fieldValueIsFilled: le } = Ql({
|
|
3510
3514
|
optionValue: () => n.optionValue,
|
|
3511
3515
|
optionLabel: () => n.optionLabel
|
|
3512
|
-
}), { isOpened:
|
|
3516
|
+
}), { isOpened: z, isFocused: B, dropdownToggleRef: L, dropdownRef: D, popper: N, dropdownStyle: W, toggleDropdown: j } = eo({
|
|
3513
3517
|
placement: n.placement,
|
|
3514
3518
|
outline: () => n.outline,
|
|
3515
|
-
isSelectVisible:
|
|
3516
|
-
selectRootRef:
|
|
3519
|
+
isSelectVisible: te,
|
|
3520
|
+
selectRootRef: U,
|
|
3517
3521
|
disabled: () => n.disabled ?? !1,
|
|
3518
|
-
ensureVisibility:
|
|
3522
|
+
ensureVisibility: X
|
|
3519
3523
|
});
|
|
3520
3524
|
tt(() => {
|
|
3521
|
-
|
|
3525
|
+
L.value = O.value?.toggleRef ?? null;
|
|
3522
3526
|
}), tt(() => {
|
|
3523
|
-
D.value =
|
|
3527
|
+
D.value = V.value?.dropdownElRef ?? null;
|
|
3524
3528
|
});
|
|
3525
|
-
const
|
|
3529
|
+
const k = to({
|
|
3526
3530
|
options: () => n.options,
|
|
3527
|
-
getOptionValue:
|
|
3528
|
-
getOptionLabel:
|
|
3529
|
-
isSelectVisible:
|
|
3531
|
+
getOptionValue: ae,
|
|
3532
|
+
getOptionLabel: Z,
|
|
3533
|
+
isSelectVisible: te,
|
|
3530
3534
|
debounce: () => n.debounce ?? 500,
|
|
3531
3535
|
emit: {
|
|
3532
|
-
search: (
|
|
3536
|
+
search: (A) => i("search", A)
|
|
3533
3537
|
}
|
|
3534
|
-
}), { selectedScope:
|
|
3538
|
+
}), { selectedScope: R, hasValue: q, optionScope: fe, removeAtIndex: Te, onReset: _t } = no({
|
|
3535
3539
|
modelValue: () => n.modelValue,
|
|
3536
3540
|
multiple: () => n.multiple,
|
|
3537
3541
|
emitValue: () => n.emitValue ?? !0,
|
|
3538
3542
|
mapOptions: () => n.mapOptions ?? !0,
|
|
3539
|
-
displayItems:
|
|
3540
|
-
resolvedDefaults:
|
|
3541
|
-
cachedItems:
|
|
3542
|
-
getOptionValue:
|
|
3543
|
-
getOptionLabel:
|
|
3544
|
-
getOption:
|
|
3545
|
-
fieldValueIsFilled:
|
|
3546
|
-
isOpened:
|
|
3547
|
-
popperUpdate: () =>
|
|
3543
|
+
displayItems: k.displayItems,
|
|
3544
|
+
resolvedDefaults: k.resolvedDefaults,
|
|
3545
|
+
cachedItems: k.cachedItems,
|
|
3546
|
+
getOptionValue: ae,
|
|
3547
|
+
getOptionLabel: Z,
|
|
3548
|
+
getOption: ue,
|
|
3549
|
+
fieldValueIsFilled: le,
|
|
3550
|
+
isOpened: z,
|
|
3551
|
+
popperUpdate: () => N.update(),
|
|
3548
3552
|
emit: {
|
|
3549
|
-
updateModelValue: (
|
|
3553
|
+
updateModelValue: (A) => i("update:modelValue", A),
|
|
3550
3554
|
close: () => i("close")
|
|
3551
3555
|
}
|
|
3552
|
-
}), en =
|
|
3556
|
+
}), en = I(() => V.value?.loadMoreRef ?? null), tn = I(() => V.value?.viewportRef ?? null);
|
|
3553
3557
|
Tn(
|
|
3554
3558
|
en,
|
|
3555
|
-
([{ isIntersecting:
|
|
3556
|
-
|
|
3559
|
+
([{ isIntersecting: A }]) => {
|
|
3560
|
+
A && k.hasMore.value && k.loadMore();
|
|
3557
3561
|
},
|
|
3558
3562
|
// The trigger is a 1px line at the end of the list. Asking for all of it to show never fires
|
|
3559
3563
|
// under a fractional zoom, where the scrolled-to-end line sits a fraction past the viewport.
|
|
@@ -3561,224 +3565,224 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3561
3565
|
{ threshold: 0, rootMargin: "0px 0px 48px 0px", root: tn }
|
|
3562
3566
|
);
|
|
3563
3567
|
const Xe = Zl({
|
|
3564
|
-
onEnter: (
|
|
3565
|
-
const
|
|
3566
|
-
|
|
3568
|
+
onEnter: (A) => {
|
|
3569
|
+
const ee = parseInt(A.getAttribute("data-index") || "0", 10);
|
|
3570
|
+
fe.value && fe.value[ee] && fe.value[ee].toggleOption(fe.value[ee].opt);
|
|
3567
3571
|
},
|
|
3568
3572
|
onEscape: () => {
|
|
3569
|
-
|
|
3570
|
-
|
|
3573
|
+
z.value = !1, i("close"), $e(() => {
|
|
3574
|
+
O.value?.toggleRef?.querySelector('[role="combobox"]')?.focus();
|
|
3571
3575
|
});
|
|
3572
3576
|
}
|
|
3573
3577
|
});
|
|
3574
3578
|
function nn() {
|
|
3575
|
-
|
|
3579
|
+
z.value = !1, i("close");
|
|
3576
3580
|
}
|
|
3577
|
-
return
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
const
|
|
3581
|
-
if (
|
|
3582
|
-
if (Xe.initKeyboardNavigation(
|
|
3583
|
-
|
|
3581
|
+
return G(z, async (A) => {
|
|
3582
|
+
A ? (await k.open(), $e(() => {
|
|
3583
|
+
N.update();
|
|
3584
|
+
const ee = V.value?.dropdownElRef, ie = V.value?.searchInputRef;
|
|
3585
|
+
if (ee)
|
|
3586
|
+
if (Xe.initKeyboardNavigation(ee), n.searchable && ie)
|
|
3587
|
+
ie.focus();
|
|
3584
3588
|
else {
|
|
3585
|
-
const Re =
|
|
3589
|
+
const Re = ee.querySelector(
|
|
3586
3590
|
'.vc-select__option[tabindex="0"], .vc-select__search-input[tabindex="0"]'
|
|
3587
3591
|
);
|
|
3588
3592
|
Re ? Re.focus() : Xe.focusFirstElement();
|
|
3589
3593
|
}
|
|
3590
|
-
})) : (Xe.cleanupKeyboardNavigation(),
|
|
3591
|
-
}),
|
|
3594
|
+
})) : (Xe.cleanupKeyboardNavigation(), k.close());
|
|
3595
|
+
}), G(
|
|
3592
3596
|
() => n.modelValue,
|
|
3593
|
-
async (
|
|
3594
|
-
if (
|
|
3595
|
-
|
|
3597
|
+
async (A) => {
|
|
3598
|
+
if (A == null || Array.isArray(A) && A.length === 0) {
|
|
3599
|
+
k.resolvedDefaults.value = [];
|
|
3596
3600
|
return;
|
|
3597
3601
|
}
|
|
3598
|
-
const
|
|
3602
|
+
const ee = n.emitValue ?? !0;
|
|
3599
3603
|
if (n.mapOptions ?? !0) {
|
|
3600
|
-
const Re = Array.isArray(
|
|
3604
|
+
const Re = Array.isArray(A) ? A : [A], ht = ee ? Re : Re.filter((Me) => Me != null && typeof Me != "object");
|
|
3601
3605
|
if (ht.length > 0) {
|
|
3602
3606
|
const Me = ht.filter((an) => an != null).map(String);
|
|
3603
|
-
Me.length > 0 && await
|
|
3607
|
+
Me.length > 0 && await k.resolve(Me);
|
|
3604
3608
|
}
|
|
3605
3609
|
}
|
|
3606
3610
|
},
|
|
3607
3611
|
{ immediate: !0 }
|
|
3608
|
-
), (
|
|
3609
|
-
class: ["vc-select vc-select--skeleton",
|
|
3612
|
+
), (A, ee) => s(r) ? (f(), y("div", ne({ key: 0 }, o.value, {
|
|
3613
|
+
class: ["vc-select vc-select--skeleton", A.$attrs.class]
|
|
3610
3614
|
}), [
|
|
3611
|
-
e.label ? (f(), P(
|
|
3615
|
+
e.label ? (f(), P(s(oe), {
|
|
3612
3616
|
key: 0,
|
|
3613
3617
|
variant: "block",
|
|
3614
3618
|
width: 60 + (e.label?.length || 0) * 4,
|
|
3615
3619
|
height: 11
|
|
3616
|
-
}, null, 8, ["width"])) :
|
|
3617
|
-
|
|
3620
|
+
}, null, 8, ["width"])) : $("", !0),
|
|
3621
|
+
T(s(oe), {
|
|
3618
3622
|
variant: "block",
|
|
3619
3623
|
width: "100%",
|
|
3620
3624
|
height: 36
|
|
3621
3625
|
})
|
|
3622
|
-
], 16)) : (f(), y("div",
|
|
3626
|
+
], 16)) : (f(), y("div", ne({
|
|
3623
3627
|
key: 1,
|
|
3624
3628
|
ref_key: "selectRootRef",
|
|
3625
|
-
ref:
|
|
3629
|
+
ref: U
|
|
3626
3630
|
}, o.value, {
|
|
3627
3631
|
class: ["vc-select", [
|
|
3628
|
-
|
|
3632
|
+
A.$attrs.class,
|
|
3629
3633
|
{
|
|
3630
|
-
"vc-select--opened":
|
|
3631
|
-
"vc-select--error":
|
|
3632
|
-
"vc-select--disabled":
|
|
3633
|
-
"vc-select--has-hint-or-error":
|
|
3634
|
+
"vc-select--opened": s(z),
|
|
3635
|
+
"vc-select--error": s(d),
|
|
3636
|
+
"vc-select--disabled": s(c),
|
|
3637
|
+
"vc-select--has-hint-or-error": s(d) || e.hint,
|
|
3634
3638
|
"vc-select--no-outline": !e.outline,
|
|
3635
|
-
"vc-select--focused":
|
|
3639
|
+
"vc-select--focused": s(B)
|
|
3636
3640
|
}
|
|
3637
3641
|
]]
|
|
3638
3642
|
}), [
|
|
3639
|
-
e.label ? (f(), P(
|
|
3643
|
+
e.label ? (f(), P(s(Je), {
|
|
3640
3644
|
key: 0,
|
|
3641
|
-
id:
|
|
3645
|
+
id: s(v),
|
|
3642
3646
|
class: "vc-select__label",
|
|
3643
3647
|
required: e.required,
|
|
3644
3648
|
multilanguage: e.multilanguage,
|
|
3645
3649
|
"current-language": e.currentLanguage,
|
|
3646
|
-
error:
|
|
3647
|
-
},
|
|
3648
|
-
default:
|
|
3649
|
-
|
|
3650
|
+
error: s(d)
|
|
3651
|
+
}, re({
|
|
3652
|
+
default: w(() => [
|
|
3653
|
+
C("span", null, M(e.label), 1)
|
|
3650
3654
|
]),
|
|
3651
3655
|
_: 2
|
|
3652
3656
|
}, [
|
|
3653
3657
|
e.tooltip ? {
|
|
3654
3658
|
name: "tooltip",
|
|
3655
|
-
fn:
|
|
3656
|
-
|
|
3657
|
-
innerHTML:
|
|
3659
|
+
fn: w(() => [
|
|
3660
|
+
C("span", {
|
|
3661
|
+
innerHTML: s(Dt).sanitize(e.tooltip)
|
|
3658
3662
|
}, null, 8, zo)
|
|
3659
3663
|
]),
|
|
3660
3664
|
key: "0"
|
|
3661
3665
|
} : void 0
|
|
3662
|
-
]), 1032, ["id", "required", "multilanguage", "current-language", "error"])) :
|
|
3663
|
-
|
|
3664
|
-
|
|
3666
|
+
]), 1032, ["id", "required", "multilanguage", "current-language", "error"])) : $("", !0),
|
|
3667
|
+
C("div", qo, [
|
|
3668
|
+
T(xo, {
|
|
3665
3669
|
ref_key: "selectTriggerRef",
|
|
3666
|
-
ref:
|
|
3667
|
-
"is-opened":
|
|
3668
|
-
"has-value":
|
|
3669
|
-
"selected-scope":
|
|
3670
|
+
ref: O,
|
|
3671
|
+
"is-opened": s(z),
|
|
3672
|
+
"has-value": s(q),
|
|
3673
|
+
"selected-scope": s(R),
|
|
3670
3674
|
multiple: e.multiple,
|
|
3671
3675
|
loading: e.loading,
|
|
3672
|
-
disabled:
|
|
3676
|
+
disabled: s(c),
|
|
3673
3677
|
clearable: e.clearable,
|
|
3674
3678
|
placeholder: e.placeholder,
|
|
3675
3679
|
prefix: e.prefix,
|
|
3676
3680
|
suffix: e.suffix,
|
|
3677
3681
|
size: e.size,
|
|
3678
|
-
error:
|
|
3682
|
+
error: s(d),
|
|
3679
3683
|
"error-message": e.errorMessage,
|
|
3680
3684
|
hint: e.hint,
|
|
3681
|
-
"list-loading":
|
|
3682
|
-
"default-option-loading":
|
|
3683
|
-
"listbox-id":
|
|
3684
|
-
"label-id":
|
|
3685
|
+
"list-loading": s(k).loading.value || s(k).searchLoading.value,
|
|
3686
|
+
"default-option-loading": s(k).defaultOptionLoading.value,
|
|
3687
|
+
"listbox-id": b.value,
|
|
3688
|
+
"label-id": s(v),
|
|
3685
3689
|
label: e.label,
|
|
3686
|
-
"aria-described-by":
|
|
3687
|
-
"aria-required":
|
|
3688
|
-
"error-id":
|
|
3689
|
-
"hint-id":
|
|
3690
|
-
"toggle-dropdown":
|
|
3691
|
-
"get-option-label":
|
|
3692
|
-
"get-emitting-option-value":
|
|
3693
|
-
onFocus:
|
|
3694
|
-
onBlur:
|
|
3695
|
-
onReset:
|
|
3696
|
-
onRemoveAtIndex:
|
|
3697
|
-
},
|
|
3698
|
-
|
|
3690
|
+
"aria-described-by": s(E),
|
|
3691
|
+
"aria-required": s(h),
|
|
3692
|
+
"error-id": s(m),
|
|
3693
|
+
"hint-id": s(g),
|
|
3694
|
+
"toggle-dropdown": s(j),
|
|
3695
|
+
"get-option-label": s(Z),
|
|
3696
|
+
"get-emitting-option-value": s(de),
|
|
3697
|
+
onFocus: ee[0] || (ee[0] = (ie) => B.value = !0),
|
|
3698
|
+
onBlur: ee[1] || (ee[1] = (ie) => B.value = !1),
|
|
3699
|
+
onReset: s(_t),
|
|
3700
|
+
onRemoveAtIndex: s(Te)
|
|
3701
|
+
}, re({ _: 2 }, [
|
|
3702
|
+
A.$slots.control ? {
|
|
3699
3703
|
name: "control",
|
|
3700
|
-
fn:
|
|
3701
|
-
|
|
3704
|
+
fn: w((ie) => [
|
|
3705
|
+
x(A.$slots, "control", Ae(Ne(ie)))
|
|
3702
3706
|
]),
|
|
3703
3707
|
key: "0"
|
|
3704
3708
|
} : void 0,
|
|
3705
|
-
|
|
3709
|
+
A.$slots.prepend ? {
|
|
3706
3710
|
name: "prepend",
|
|
3707
|
-
fn:
|
|
3708
|
-
|
|
3711
|
+
fn: w(() => [
|
|
3712
|
+
x(A.$slots, "prepend")
|
|
3709
3713
|
]),
|
|
3710
3714
|
key: "1"
|
|
3711
3715
|
} : void 0,
|
|
3712
|
-
|
|
3716
|
+
A.$slots.append ? {
|
|
3713
3717
|
name: "append",
|
|
3714
|
-
fn:
|
|
3715
|
-
|
|
3718
|
+
fn: w(() => [
|
|
3719
|
+
x(A.$slots, "append")
|
|
3716
3720
|
]),
|
|
3717
3721
|
key: "2"
|
|
3718
3722
|
} : void 0,
|
|
3719
|
-
|
|
3723
|
+
A.$slots["prepend-inner"] ? {
|
|
3720
3724
|
name: "prepend-inner",
|
|
3721
|
-
fn:
|
|
3722
|
-
|
|
3725
|
+
fn: w(() => [
|
|
3726
|
+
x(A.$slots, "prepend-inner")
|
|
3723
3727
|
]),
|
|
3724
3728
|
key: "3"
|
|
3725
3729
|
} : void 0,
|
|
3726
|
-
|
|
3730
|
+
A.$slots["append-inner"] ? {
|
|
3727
3731
|
name: "append-inner",
|
|
3728
|
-
fn:
|
|
3729
|
-
|
|
3732
|
+
fn: w(() => [
|
|
3733
|
+
x(A.$slots, "append-inner")
|
|
3730
3734
|
]),
|
|
3731
3735
|
key: "4"
|
|
3732
3736
|
} : void 0,
|
|
3733
|
-
|
|
3737
|
+
A.$slots["selected-item"] ? {
|
|
3734
3738
|
name: "selected-item",
|
|
3735
|
-
fn:
|
|
3736
|
-
|
|
3739
|
+
fn: w((ie) => [
|
|
3740
|
+
x(A.$slots, "selected-item", Ae(Ne(ie)))
|
|
3737
3741
|
]),
|
|
3738
3742
|
key: "5"
|
|
3739
3743
|
} : void 0,
|
|
3740
|
-
|
|
3744
|
+
A.$slots.error ? {
|
|
3741
3745
|
name: "error",
|
|
3742
|
-
fn:
|
|
3743
|
-
|
|
3746
|
+
fn: w(() => [
|
|
3747
|
+
x(A.$slots, "error")
|
|
3744
3748
|
]),
|
|
3745
3749
|
key: "6"
|
|
3746
3750
|
} : void 0,
|
|
3747
|
-
|
|
3751
|
+
A.$slots.hint ? {
|
|
3748
3752
|
name: "hint",
|
|
3749
|
-
fn:
|
|
3750
|
-
|
|
3753
|
+
fn: w(() => [
|
|
3754
|
+
x(A.$slots, "hint")
|
|
3751
3755
|
]),
|
|
3752
3756
|
key: "7"
|
|
3753
3757
|
} : void 0
|
|
3754
3758
|
]), 1032, ["is-opened", "has-value", "selected-scope", "multiple", "loading", "disabled", "clearable", "placeholder", "prefix", "suffix", "size", "error", "error-message", "hint", "list-loading", "default-option-loading", "listbox-id", "label-id", "label", "aria-described-by", "aria-required", "error-id", "hint-id", "toggle-dropdown", "get-option-label", "get-emitting-option-value", "onReset", "onRemoveAtIndex"]),
|
|
3755
|
-
|
|
3759
|
+
T(Fo, ne({
|
|
3756
3760
|
ref_key: "selectDropdownRef",
|
|
3757
|
-
ref:
|
|
3758
|
-
"is-opened":
|
|
3759
|
-
"listbox-id":
|
|
3761
|
+
ref: V,
|
|
3762
|
+
"is-opened": s(z),
|
|
3763
|
+
"listbox-id": b.value
|
|
3760
3764
|
}, { ariaLabel: e.label || e.name }, {
|
|
3761
|
-
"dropdown-style":
|
|
3765
|
+
"dropdown-style": s(W),
|
|
3762
3766
|
searchable: e.searchable,
|
|
3763
|
-
"option-scope":
|
|
3764
|
-
"list-loading":
|
|
3765
|
-
"options-list-length":
|
|
3766
|
-
"has-next-page":
|
|
3767
|
-
"dropdown-toggle-ref":
|
|
3768
|
-
onInput:
|
|
3767
|
+
"option-scope": s(fe),
|
|
3768
|
+
"list-loading": s(k).loading.value || s(k).searchLoading.value,
|
|
3769
|
+
"options-list-length": s(k).displayItems.value.length,
|
|
3770
|
+
"has-next-page": s(k).hasMore.value,
|
|
3771
|
+
"dropdown-toggle-ref": O.value?.toggleRef ?? null,
|
|
3772
|
+
onInput: s(k).onInput,
|
|
3769
3773
|
onClickOutside: nn
|
|
3770
|
-
}),
|
|
3771
|
-
|
|
3774
|
+
}), re({ _: 2 }, [
|
|
3775
|
+
A.$slots.option ? {
|
|
3772
3776
|
name: "option",
|
|
3773
|
-
fn:
|
|
3774
|
-
|
|
3777
|
+
fn: w((ie) => [
|
|
3778
|
+
x(A.$slots, "option", Ae(Ne(ie)))
|
|
3775
3779
|
]),
|
|
3776
3780
|
key: "0"
|
|
3777
3781
|
} : void 0,
|
|
3778
|
-
|
|
3782
|
+
A.$slots["no-options"] ? {
|
|
3779
3783
|
name: "no-options",
|
|
3780
|
-
fn:
|
|
3781
|
-
|
|
3784
|
+
fn: w(() => [
|
|
3785
|
+
x(A.$slots, "no-options")
|
|
3782
3786
|
]),
|
|
3783
3787
|
key: "1"
|
|
3784
3788
|
} : void 0
|
|
@@ -3789,7 +3793,7 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3789
3793
|
}), Ko = {
|
|
3790
3794
|
key: 0,
|
|
3791
3795
|
class: "vc-input-dropdown vc-input-dropdown--skeleton"
|
|
3792
|
-
}, Wo = { class: "tw-flex tw-items-center" }, jo = ["aria-label", "aria-expanded", "onClick", "onKeydown"], Ho = /* @__PURE__ */
|
|
3796
|
+
}, Wo = { class: "tw-flex tw-items-center" }, jo = ["aria-label", "aria-expanded", "onClick", "onKeydown"], Ho = /* @__PURE__ */ F({
|
|
3793
3797
|
__name: "vc-input-dropdown",
|
|
3794
3798
|
props: {
|
|
3795
3799
|
modelValue: {},
|
|
@@ -3822,20 +3826,20 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3822
3826
|
},
|
|
3823
3827
|
emits: ["update:model-value", "update:option", "change", "blur"],
|
|
3824
3828
|
setup(e) {
|
|
3825
|
-
const t =
|
|
3826
|
-
return (n, a) =>
|
|
3827
|
-
e.label ? (f(), P(
|
|
3829
|
+
const t = Ee();
|
|
3830
|
+
return (n, a) => s(t) ? (f(), y("div", Ko, [
|
|
3831
|
+
e.label ? (f(), P(s(oe), {
|
|
3828
3832
|
key: 0,
|
|
3829
3833
|
variant: "block",
|
|
3830
3834
|
width: 60 + (e.label?.length || 0) * 4,
|
|
3831
3835
|
height: 11
|
|
3832
|
-
}, null, 8, ["width"])) :
|
|
3833
|
-
|
|
3836
|
+
}, null, 8, ["width"])) : $("", !0),
|
|
3837
|
+
T(s(oe), {
|
|
3834
3838
|
variant: "block",
|
|
3835
3839
|
width: "100%",
|
|
3836
3840
|
height: 36
|
|
3837
3841
|
})
|
|
3838
|
-
])) : (f(), P(
|
|
3842
|
+
])) : (f(), P(s(Uo), {
|
|
3839
3843
|
key: 1,
|
|
3840
3844
|
class: "vc-input-dropdown",
|
|
3841
3845
|
options: e.options,
|
|
@@ -3852,11 +3856,11 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3852
3856
|
"current-language": e.currentLanguage,
|
|
3853
3857
|
"onUpdate:modelValue": a[2] || (a[2] = (o) => n.$emit("update:option", o))
|
|
3854
3858
|
}, {
|
|
3855
|
-
option:
|
|
3856
|
-
|
|
3859
|
+
option: w((o) => [
|
|
3860
|
+
x(n.$slots, "option", Ae(Ne(o)))
|
|
3857
3861
|
]),
|
|
3858
|
-
control:
|
|
3859
|
-
|
|
3862
|
+
control: w(({ toggleHandler: o, isOpened: i }) => [
|
|
3863
|
+
T(s(bt), {
|
|
3860
3864
|
placeholder: e.placeholder,
|
|
3861
3865
|
hint: e.hint,
|
|
3862
3866
|
clearable: e.clearable,
|
|
@@ -3875,10 +3879,10 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3875
3879
|
class: "vc-input-dropdown__input",
|
|
3876
3880
|
"onUpdate:modelValue": a[0] || (a[0] = (l) => n.$emit("update:model-value", l)),
|
|
3877
3881
|
onBlur: a[1] || (a[1] = (l) => n.$emit("blur", l))
|
|
3878
|
-
},
|
|
3879
|
-
"append-inner":
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
+
}, re({
|
|
3883
|
+
"append-inner": w(() => [
|
|
3884
|
+
C("div", Wo, [
|
|
3885
|
+
x(n.$slots, "button", { toggleHandler: o }, () => [
|
|
3882
3886
|
e.options && e.options.length ? (f(), y("button", {
|
|
3883
3887
|
key: 0,
|
|
3884
3888
|
type: "button",
|
|
@@ -3887,52 +3891,52 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3887
3891
|
"aria-label": n.$t("COMPONENTS.CONTROLS.SELECT_OPTION"),
|
|
3888
3892
|
"aria-expanded": i,
|
|
3889
3893
|
"aria-haspopup": "listbox",
|
|
3890
|
-
onClick:
|
|
3894
|
+
onClick: Y(o, ["stop", "prevent"]),
|
|
3891
3895
|
onKeydown: [
|
|
3892
|
-
|
|
3893
|
-
|
|
3896
|
+
Q(Y(o, ["stop", "prevent"]), ["enter"]),
|
|
3897
|
+
Q(Y(o, ["stop", "prevent"]), ["space"])
|
|
3894
3898
|
]
|
|
3895
|
-
},
|
|
3899
|
+
}, M(s(e.option)), 41, jo)) : $("", !0)
|
|
3896
3900
|
]),
|
|
3897
|
-
e.options && e.options.length ? (f(), P(
|
|
3901
|
+
e.options && e.options.length ? (f(), P(s(Ma), {
|
|
3898
3902
|
key: 0,
|
|
3899
3903
|
icon: i ? "lucide-chevron-up" : "lucide-chevron-down",
|
|
3900
3904
|
"icon-size": "s",
|
|
3901
3905
|
text: "",
|
|
3902
3906
|
"aria-label": n.$t("COMPONENTS.CONTROLS.TOGGLE_DROPDOWN"),
|
|
3903
3907
|
"icon-class": "vc-input-dropdown__toggle-button-icon",
|
|
3904
|
-
onClick:
|
|
3905
|
-
}, null, 8, ["icon", "aria-label", "onClick"])) :
|
|
3908
|
+
onClick: Y(o, ["stop", "prevent"])
|
|
3909
|
+
}, null, 8, ["icon", "aria-label", "onClick"])) : $("", !0)
|
|
3906
3910
|
]),
|
|
3907
|
-
n.$slots["append-inner"] ?
|
|
3911
|
+
n.$slots["append-inner"] ? x(n.$slots, "append-inner", { key: 0 }) : $("", !0)
|
|
3908
3912
|
]),
|
|
3909
3913
|
_: 2
|
|
3910
3914
|
}, [
|
|
3911
3915
|
n.$slots.control ? {
|
|
3912
3916
|
name: "control",
|
|
3913
|
-
fn:
|
|
3914
|
-
|
|
3917
|
+
fn: w((l) => [
|
|
3918
|
+
x(n.$slots, "control", Ae(Ne(l)))
|
|
3915
3919
|
]),
|
|
3916
3920
|
key: "0"
|
|
3917
3921
|
} : void 0,
|
|
3918
3922
|
n.$slots["prepend-inner"] ? {
|
|
3919
3923
|
name: "prepend-inner",
|
|
3920
|
-
fn:
|
|
3921
|
-
|
|
3924
|
+
fn: w(() => [
|
|
3925
|
+
x(n.$slots, "prepend-inner")
|
|
3922
3926
|
]),
|
|
3923
3927
|
key: "1"
|
|
3924
3928
|
} : void 0,
|
|
3925
3929
|
n.$slots.append ? {
|
|
3926
3930
|
name: "append",
|
|
3927
|
-
fn:
|
|
3928
|
-
|
|
3931
|
+
fn: w(() => [
|
|
3932
|
+
x(n.$slots, "append")
|
|
3929
3933
|
]),
|
|
3930
3934
|
key: "2"
|
|
3931
3935
|
} : void 0,
|
|
3932
3936
|
n.$slots.prepend ? {
|
|
3933
3937
|
name: "prepend",
|
|
3934
|
-
fn:
|
|
3935
|
-
|
|
3938
|
+
fn: w(() => [
|
|
3939
|
+
x(n.$slots, "prepend")
|
|
3936
3940
|
]),
|
|
3937
3941
|
key: "3"
|
|
3938
3942
|
} : void 0
|
|
@@ -3944,7 +3948,7 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3944
3948
|
}), Go = {
|
|
3945
3949
|
key: 0,
|
|
3946
3950
|
class: "vc-input-currency vc-input-currency--skeleton"
|
|
3947
|
-
}, Yo = ["disabled", "placeholder", "aria-label"], Jo = /* @__PURE__ */
|
|
3951
|
+
}, Yo = ["disabled", "placeholder", "aria-label"], Jo = /* @__PURE__ */ F({
|
|
3948
3952
|
__name: "vc-input-currency",
|
|
3949
3953
|
props: {
|
|
3950
3954
|
modelValue: {},
|
|
@@ -3974,7 +3978,7 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3974
3978
|
},
|
|
3975
3979
|
emits: ["update:model-value", "update:option", "change", "blur"],
|
|
3976
3980
|
setup(e, { emit: t }) {
|
|
3977
|
-
const n = e, a = t, o =
|
|
3981
|
+
const n = e, a = t, o = Ee(), { inputRef: i, setOptions: l, numberValue: r, setValue: u } = Vn(
|
|
3978
3982
|
{
|
|
3979
3983
|
locale: navigator.language,
|
|
3980
3984
|
currency: n.option || "USD",
|
|
@@ -3985,7 +3989,7 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3985
3989
|
hideNegligibleDecimalDigitsOnFocus: !1
|
|
3986
3990
|
}
|
|
3987
3991
|
);
|
|
3988
|
-
|
|
3992
|
+
G(
|
|
3989
3993
|
() => n.option,
|
|
3990
3994
|
(c) => {
|
|
3991
3995
|
c && l({
|
|
@@ -3998,16 +4002,16 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
3998
4002
|
hideNegligibleDecimalDigitsOnFocus: !1
|
|
3999
4003
|
});
|
|
4000
4004
|
}
|
|
4001
|
-
),
|
|
4005
|
+
), G(
|
|
4002
4006
|
() => n.modelValue,
|
|
4003
4007
|
(c) => {
|
|
4004
4008
|
u(c);
|
|
4005
4009
|
}
|
|
4006
|
-
),
|
|
4010
|
+
), G(r, (c) => {
|
|
4007
4011
|
a("update:model-value", c);
|
|
4008
4012
|
});
|
|
4009
4013
|
function v(c) {
|
|
4010
|
-
i.value && (i.value.value = c),
|
|
4014
|
+
i.value && (i.value.value = c), r.value = typeof c == "number" ? c : c === null ? null : parseFloat(String(c)) || null, a("update:model-value", r.value);
|
|
4011
4015
|
}
|
|
4012
4016
|
function m(c) {
|
|
4013
4017
|
a("blur", c);
|
|
@@ -4016,28 +4020,28 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
4016
4020
|
if ((c.key === "-" || c.key === "e") && c.preventDefault(), c.key !== "Tab") {
|
|
4017
4021
|
if (c.key === "Enter") {
|
|
4018
4022
|
c.target && c.target.blur();
|
|
4019
|
-
const
|
|
4020
|
-
h >= 0 && h <
|
|
4023
|
+
const p = Array.from(document.querySelectorAll('[tabindex="0"]:not(:disabled)')), h = p.indexOf(c.target);
|
|
4024
|
+
h >= 0 && h < p.length - 1 && p[h + 1].focus();
|
|
4021
4025
|
}
|
|
4022
4026
|
}
|
|
4023
4027
|
}
|
|
4024
4028
|
function d(c) {
|
|
4025
|
-
const
|
|
4026
|
-
typeof
|
|
4029
|
+
const p = c.clipboardData?.getData("text/plain");
|
|
4030
|
+
typeof p < "u" && parseInt(p) < 0 && c.preventDefault();
|
|
4027
4031
|
}
|
|
4028
|
-
return (c,
|
|
4029
|
-
e.label ? (f(), P(
|
|
4032
|
+
return (c, p) => s(o) ? (f(), y("div", Go, [
|
|
4033
|
+
e.label ? (f(), P(s(oe), {
|
|
4030
4034
|
key: 0,
|
|
4031
4035
|
variant: "block",
|
|
4032
4036
|
width: 60 + (e.label?.length || 0) * 4,
|
|
4033
4037
|
height: 11
|
|
4034
|
-
}, null, 8, ["width"])) :
|
|
4035
|
-
|
|
4038
|
+
}, null, 8, ["width"])) : $("", !0),
|
|
4039
|
+
T(s(oe), {
|
|
4036
4040
|
variant: "block",
|
|
4037
4041
|
width: "100%",
|
|
4038
4042
|
height: 36
|
|
4039
4043
|
})
|
|
4040
|
-
])) : (f(), P(
|
|
4044
|
+
])) : (f(), P(s(Ho), {
|
|
4041
4045
|
key: 1,
|
|
4042
4046
|
class: "vc-input-currency",
|
|
4043
4047
|
options: e.options,
|
|
@@ -4049,7 +4053,7 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
4049
4053
|
label: e.label,
|
|
4050
4054
|
required: e.required,
|
|
4051
4055
|
option: e.option,
|
|
4052
|
-
"model-value": r
|
|
4056
|
+
"model-value": s(r),
|
|
4053
4057
|
tooltip: e.tooltip,
|
|
4054
4058
|
placeholder: e.placeholder,
|
|
4055
4059
|
hint: e.hint,
|
|
@@ -4064,11 +4068,11 @@ const ao = { class: "vc-select__control" }, lo = {
|
|
|
4064
4068
|
maxlength: e.maxlength,
|
|
4065
4069
|
"input-type": "number",
|
|
4066
4070
|
"onUpdate:modelValue": v,
|
|
4067
|
-
"onUpdate:option":
|
|
4071
|
+
"onUpdate:option": p[0] || (p[0] = (h) => c.$emit("update:option", h)),
|
|
4068
4072
|
onBlur: m
|
|
4069
4073
|
}, {
|
|
4070
|
-
control:
|
|
4071
|
-
|
|
4074
|
+
control: w(({ placeholder: h }) => [
|
|
4075
|
+
C("input", {
|
|
4072
4076
|
ref_key: "inputRef",
|
|
4073
4077
|
ref: i,
|
|
4074
4078
|
type: "text",
|
|
@@ -4097,14 +4101,14 @@ function kr() {
|
|
|
4097
4101
|
return Et(Jt, e), e;
|
|
4098
4102
|
}
|
|
4099
4103
|
function Sr() {
|
|
4100
|
-
return
|
|
4104
|
+
return J(Jt, Xo);
|
|
4101
4105
|
}
|
|
4102
4106
|
const Ir = Symbol("TableContext"), Zo = Symbol("ColumnCollector"), $r = Symbol("FillerWidth"), wr = Symbol("IsColumnReordering"), Or = Symbol("MobileCellEdit"), Er = (e, t) => {
|
|
4103
4107
|
const n = e.__vccOpts || e;
|
|
4104
4108
|
for (const [a, o] of t)
|
|
4105
4109
|
n[a] = o;
|
|
4106
4110
|
return n;
|
|
4107
|
-
}, Lr =
|
|
4111
|
+
}, Lr = F({
|
|
4108
4112
|
name: "VcColumn",
|
|
4109
4113
|
inheritAttrs: !1,
|
|
4110
4114
|
props: {
|
|
@@ -4282,7 +4286,7 @@ const Ir = Symbol("TableContext"), Zo = Symbol("ColumnCollector"), $r = Symbol("
|
|
|
4282
4286
|
}
|
|
4283
4287
|
},
|
|
4284
4288
|
setup(e, { slots: t }) {
|
|
4285
|
-
const n =
|
|
4289
|
+
const n = J(Zo, null), a = We();
|
|
4286
4290
|
return je(() => {
|
|
4287
4291
|
n && a && n.add({
|
|
4288
4292
|
instance: a,
|
|
@@ -4293,22 +4297,22 @@ const Ir = Symbol("TableContext"), Zo = Symbol("ColumnCollector"), $r = Symbol("
|
|
|
4293
4297
|
n && a && n.delete(a);
|
|
4294
4298
|
}), () => null;
|
|
4295
4299
|
}
|
|
4296
|
-
}),
|
|
4300
|
+
}), Le = nt(/* @__PURE__ */ new Map());
|
|
4297
4301
|
function Xt() {
|
|
4298
4302
|
return {
|
|
4299
4303
|
register: (l) => {
|
|
4300
|
-
|
|
4304
|
+
Le.set(l.type, l);
|
|
4301
4305
|
},
|
|
4302
|
-
get: (l) =>
|
|
4303
|
-
has: (l) =>
|
|
4304
|
-
getRegisteredTypes: () => Array.from(
|
|
4305
|
-
unregister: (l) =>
|
|
4306
|
+
get: (l) => Le.get(l),
|
|
4307
|
+
has: (l) => Le.has(l),
|
|
4308
|
+
getRegisteredTypes: () => Array.from(Le.keys()),
|
|
4309
|
+
unregister: (l) => Le.delete(l),
|
|
4306
4310
|
clear: () => {
|
|
4307
|
-
|
|
4311
|
+
Le.clear();
|
|
4308
4312
|
}
|
|
4309
4313
|
};
|
|
4310
4314
|
}
|
|
4311
|
-
const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__ */
|
|
4315
|
+
const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__ */ F({
|
|
4312
4316
|
__name: "CellEditableWrapper",
|
|
4313
4317
|
props: {
|
|
4314
4318
|
label: {},
|
|
@@ -4322,7 +4326,7 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4322
4326
|
return je(() => {
|
|
4323
4327
|
const a = t.modelValue === void 0 || t.modelValue === null || t.modelValue === "";
|
|
4324
4328
|
(t.validateOnMount || a && t.rules) && n.value?.validate();
|
|
4325
|
-
}), (a, o) => (f(), P(
|
|
4329
|
+
}), (a, o) => (f(), P(s(On), {
|
|
4326
4330
|
ref_key: "fieldRef",
|
|
4327
4331
|
ref: n,
|
|
4328
4332
|
label: e.label,
|
|
@@ -4330,10 +4334,10 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4330
4334
|
"model-value": e.modelValue,
|
|
4331
4335
|
rules: e.rules
|
|
4332
4336
|
}, {
|
|
4333
|
-
default:
|
|
4334
|
-
|
|
4335
|
-
default:
|
|
4336
|
-
|
|
4337
|
+
default: w(({ errors: i, errorMessage: l }) => [
|
|
4338
|
+
T(Tt, { placement: "bottom" }, re({
|
|
4339
|
+
default: w(() => [
|
|
4340
|
+
x(a.$slots, "default", {
|
|
4337
4341
|
errors: i,
|
|
4338
4342
|
errorMessage: l
|
|
4339
4343
|
})
|
|
@@ -4342,8 +4346,8 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4342
4346
|
}, [
|
|
4343
4347
|
l ? {
|
|
4344
4348
|
name: "tooltip",
|
|
4345
|
-
fn:
|
|
4346
|
-
|
|
4349
|
+
fn: w(() => [
|
|
4350
|
+
C("div", Qo, M(l), 1)
|
|
4347
4351
|
]),
|
|
4348
4352
|
key: "0"
|
|
4349
4353
|
} : void 0
|
|
@@ -4355,7 +4359,7 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4355
4359
|
}), _o = {
|
|
4356
4360
|
key: 1,
|
|
4357
4361
|
class: "vc-table-cell-default"
|
|
4358
|
-
}, Zt = /* @__PURE__ */
|
|
4362
|
+
}, Zt = /* @__PURE__ */ F({
|
|
4359
4363
|
__name: "CellDefault",
|
|
4360
4364
|
props: {
|
|
4361
4365
|
value: {},
|
|
@@ -4369,10 +4373,10 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4369
4373
|
},
|
|
4370
4374
|
emits: ["update", "blur"],
|
|
4371
4375
|
setup(e, { emit: t }) {
|
|
4372
|
-
const n = e, a = t, { isMobile: o, isDesktop: i } = Ye(), l = (
|
|
4373
|
-
|
|
4376
|
+
const n = e, a = t, { isMobile: o, isDesktop: i } = Ye(), l = (r) => {
|
|
4377
|
+
r && r.length > 0 || a("blur", { row: n.rowIndex, field: n.fieldId || "" });
|
|
4374
4378
|
};
|
|
4375
|
-
return (
|
|
4379
|
+
return (r, u) => e.editable ? (f(), P(yt, {
|
|
4376
4380
|
key: 0,
|
|
4377
4381
|
label: e.label || "",
|
|
4378
4382
|
"field-name": e.fieldName || "",
|
|
@@ -4380,19 +4384,19 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4380
4384
|
rules: e.rules,
|
|
4381
4385
|
"validate-on-mount": e.validateOnMount
|
|
4382
4386
|
}, {
|
|
4383
|
-
default:
|
|
4384
|
-
|
|
4387
|
+
default: w(({ errors: v, errorMessage: m }) => [
|
|
4388
|
+
T(bt, {
|
|
4385
4389
|
"model-value": e.value,
|
|
4386
4390
|
class: "vc-table-cell-default__input",
|
|
4387
4391
|
error: v.length > 0,
|
|
4388
|
-
"error-message":
|
|
4389
|
-
"onUpdate:modelValue": u[0] || (u[0] = (g) =>
|
|
4392
|
+
"error-message": s(o) ? m : void 0,
|
|
4393
|
+
"onUpdate:modelValue": u[0] || (u[0] = (g) => r.$emit("update", { field: e.fieldId || "", value: g })),
|
|
4390
4394
|
onBlur: (g) => l(v)
|
|
4391
|
-
},
|
|
4392
|
-
|
|
4395
|
+
}, re({ _: 2 }, [
|
|
4396
|
+
s(i) && v.length > 0 ? {
|
|
4393
4397
|
name: "append-inner",
|
|
4394
|
-
fn:
|
|
4395
|
-
|
|
4398
|
+
fn: w(() => [
|
|
4399
|
+
T(s(K), {
|
|
4396
4400
|
icon: "lucide-circle-alert",
|
|
4397
4401
|
class: "vc-table-cell-default__error-icon"
|
|
4398
4402
|
})
|
|
@@ -4402,7 +4406,7 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4402
4406
|
]), 1032, ["model-value", "error", "error-message", "onBlur"])
|
|
4403
4407
|
]),
|
|
4404
4408
|
_: 1
|
|
4405
|
-
}, 8, ["label", "field-name", "model-value", "rules", "validate-on-mount"])) : (f(), y("span", _o,
|
|
4409
|
+
}, 8, ["label", "field-name", "model-value", "rules", "validate-on-mount"])) : (f(), y("span", _o, M(e.value), 1));
|
|
4406
4410
|
}
|
|
4407
4411
|
}), ei = {
|
|
4408
4412
|
key: 1,
|
|
@@ -4410,7 +4414,7 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4410
4414
|
}, ti = {
|
|
4411
4415
|
key: 2,
|
|
4412
4416
|
class: "vc-table-cell-money vc-table-cell-money--not-set"
|
|
4413
|
-
}, ni = /* @__PURE__ */
|
|
4417
|
+
}, ni = /* @__PURE__ */ F({
|
|
4414
4418
|
__name: "CellMoney",
|
|
4415
4419
|
props: {
|
|
4416
4420
|
value: {},
|
|
@@ -4425,7 +4429,7 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4425
4429
|
},
|
|
4426
4430
|
emits: ["update", "blur"],
|
|
4427
4431
|
setup(e, { emit: t }) {
|
|
4428
|
-
const n = e, a = t, { t: o } =
|
|
4432
|
+
const n = e, a = t, { t: o } = Oe({ useScope: "global" }), i = window.navigator.language, { isMobile: l, isDesktop: r } = Ye(), u = I(() => typeof n.value > "u" || n.value === null || Number(n.value) === 0), v = I(() => {
|
|
4429
4433
|
const g = Number(n.value);
|
|
4430
4434
|
return isNaN(g) ? String(n.value) : new Intl.NumberFormat(i, {
|
|
4431
4435
|
style: "currency",
|
|
@@ -4442,22 +4446,22 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4442
4446
|
rules: e.rules,
|
|
4443
4447
|
"validate-on-mount": e.validateOnMount
|
|
4444
4448
|
}, {
|
|
4445
|
-
default:
|
|
4446
|
-
|
|
4449
|
+
default: w(({ errors: c, errorMessage: p }) => [
|
|
4450
|
+
T(Jo, {
|
|
4447
4451
|
"model-value": e.value,
|
|
4448
4452
|
options: [],
|
|
4449
4453
|
option: e.currency || "USD",
|
|
4450
4454
|
"currency-display": "symbol",
|
|
4451
4455
|
class: "vc-table-cell-money__input",
|
|
4452
4456
|
error: c.length > 0,
|
|
4453
|
-
"error-message":
|
|
4457
|
+
"error-message": s(l) ? p : void 0,
|
|
4454
4458
|
"onUpdate:modelValue": d[0] || (d[0] = (h) => g.$emit("update", { field: e.fieldId || "", value: h })),
|
|
4455
4459
|
onBlur: (h) => m(c)
|
|
4456
|
-
},
|
|
4457
|
-
r
|
|
4460
|
+
}, re({ _: 2 }, [
|
|
4461
|
+
s(r) && c.length > 0 ? {
|
|
4458
4462
|
name: "append-inner",
|
|
4459
|
-
fn:
|
|
4460
|
-
|
|
4463
|
+
fn: w(() => [
|
|
4464
|
+
T(s(K), {
|
|
4461
4465
|
icon: "lucide-circle-alert",
|
|
4462
4466
|
class: "vc-table-cell-money__error-icon"
|
|
4463
4467
|
})
|
|
@@ -4467,7 +4471,7 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4467
4471
|
]), 1032, ["model-value", "option", "error", "error-message", "onBlur"])
|
|
4468
4472
|
]),
|
|
4469
4473
|
_: 1
|
|
4470
|
-
}, 8, ["label", "field-name", "model-value", "rules", "validate-on-mount"])) : u.value ? (f(), y("span", ti,
|
|
4474
|
+
}, 8, ["label", "field-name", "model-value", "rules", "validate-on-mount"])) : u.value ? (f(), y("span", ti, M(s(o)("COMPONENTS.ORGANISMS.VC_TABLE.NOT_SET")), 1)) : (f(), y("span", ei, M(v.value), 1));
|
|
4471
4475
|
}
|
|
4472
4476
|
}), ai = {
|
|
4473
4477
|
key: 1,
|
|
@@ -4475,7 +4479,7 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4475
4479
|
}, li = {
|
|
4476
4480
|
key: 2,
|
|
4477
4481
|
class: "vc-table-cell-number vc-table-cell-number--not-set"
|
|
4478
|
-
}, oi = /* @__PURE__ */
|
|
4482
|
+
}, oi = /* @__PURE__ */ F({
|
|
4479
4483
|
__name: "CellNumber",
|
|
4480
4484
|
props: {
|
|
4481
4485
|
value: {},
|
|
@@ -4489,11 +4493,11 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4489
4493
|
},
|
|
4490
4494
|
emits: ["update", "blur"],
|
|
4491
4495
|
setup(e, { emit: t }) {
|
|
4492
|
-
const n = e, a = t, { t: o } =
|
|
4496
|
+
const n = e, a = t, { t: o } = Oe({ useScope: "global" }), { isMobile: i, isDesktop: l } = Ye(), r = I(() => {
|
|
4493
4497
|
if (n.value === null || n.value === void 0) return !0;
|
|
4494
4498
|
const m = Number(n.value);
|
|
4495
4499
|
return isNaN(m) || m < 0;
|
|
4496
|
-
}), u =
|
|
4500
|
+
}), u = I(() => {
|
|
4497
4501
|
const m = Number(n.value);
|
|
4498
4502
|
return isNaN(m) ? String(n.value) : m.toFixed(0);
|
|
4499
4503
|
}), v = (m) => {
|
|
@@ -4507,20 +4511,20 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4507
4511
|
rules: e.rules,
|
|
4508
4512
|
"validate-on-mount": e.validateOnMount
|
|
4509
4513
|
}, {
|
|
4510
|
-
default:
|
|
4511
|
-
|
|
4514
|
+
default: w(({ errors: d, errorMessage: c }) => [
|
|
4515
|
+
T(bt, {
|
|
4512
4516
|
"model-value": e.value,
|
|
4513
4517
|
class: "vc-table-cell-number__input",
|
|
4514
4518
|
type: "number",
|
|
4515
4519
|
error: d.length > 0,
|
|
4516
|
-
"error-message":
|
|
4517
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
4518
|
-
onBlur: (
|
|
4519
|
-
},
|
|
4520
|
-
|
|
4520
|
+
"error-message": s(i) ? c : void 0,
|
|
4521
|
+
"onUpdate:modelValue": g[0] || (g[0] = (p) => m.$emit("update", { field: e.fieldId || "", value: p })),
|
|
4522
|
+
onBlur: (p) => v(d)
|
|
4523
|
+
}, re({ _: 2 }, [
|
|
4524
|
+
s(l) && d.length > 0 ? {
|
|
4521
4525
|
name: "append-inner",
|
|
4522
|
-
fn:
|
|
4523
|
-
|
|
4526
|
+
fn: w(() => [
|
|
4527
|
+
T(s(K), {
|
|
4524
4528
|
icon: "lucide-circle-alert",
|
|
4525
4529
|
class: "vc-table-cell-number__error-icon"
|
|
4526
4530
|
})
|
|
@@ -4530,7 +4534,7 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4530
4534
|
]), 1032, ["model-value", "error", "error-message", "onBlur"])
|
|
4531
4535
|
]),
|
|
4532
4536
|
_: 1
|
|
4533
|
-
}, 8, ["label", "field-name", "model-value", "rules", "validate-on-mount"])) :
|
|
4537
|
+
}, 8, ["label", "field-name", "model-value", "rules", "validate-on-mount"])) : r.value ? (f(), y("span", li, M(s(o)("COMPONENTS.ORGANISMS.VC_TABLE.NOT_SET")), 1)) : (f(), y("span", ai, M(u.value), 1));
|
|
4534
4538
|
}
|
|
4535
4539
|
}), ii = {
|
|
4536
4540
|
key: 0,
|
|
@@ -4538,7 +4542,7 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4538
4542
|
}, ri = {
|
|
4539
4543
|
key: 1,
|
|
4540
4544
|
class: "vc-table-cell-date vc-table-cell-date--not-set"
|
|
4541
|
-
}, et = /* @__PURE__ */
|
|
4545
|
+
}, et = /* @__PURE__ */ F({
|
|
4542
4546
|
__name: "CellDate",
|
|
4543
4547
|
props: {
|
|
4544
4548
|
value: {},
|
|
@@ -4546,39 +4550,39 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4546
4550
|
format: {}
|
|
4547
4551
|
},
|
|
4548
4552
|
setup(e) {
|
|
4549
|
-
const t = e, { t: n } =
|
|
4553
|
+
const t = e, { t: n } = Oe({ useScope: "global" }), a = window.navigator.language, o = I(() => {
|
|
4550
4554
|
if (!t.value) return "";
|
|
4551
4555
|
if (t.format)
|
|
4552
4556
|
return Qn(t.value, t.format, a);
|
|
4553
4557
|
const i = t.value instanceof Date ? t.value : new Date(t.value), l = t.variant || "date";
|
|
4554
4558
|
return l === "time" ? i.toLocaleTimeString(a) : l === "date-time" ? i.toLocaleString(a) : i.toLocaleDateString(a);
|
|
4555
4559
|
});
|
|
4556
|
-
return (i, l) => e.value ? (f(), y("span", ii,
|
|
4560
|
+
return (i, l) => e.value ? (f(), y("span", ii, M(o.value), 1)) : (f(), y("span", ri, M(s(n)("COMPONENTS.ORGANISMS.VC_TABLE.NOT_SET")), 1));
|
|
4557
4561
|
}
|
|
4558
4562
|
}), si = ["title"], ui = {
|
|
4559
4563
|
key: 1,
|
|
4560
4564
|
class: "vc-table-cell-date-ago vc-table-cell-date-ago--not-set"
|
|
4561
|
-
}, ci = /* @__PURE__ */
|
|
4565
|
+
}, ci = /* @__PURE__ */ F({
|
|
4562
4566
|
__name: "CellDateAgo",
|
|
4563
4567
|
props: {
|
|
4564
4568
|
value: {}
|
|
4565
4569
|
},
|
|
4566
4570
|
setup(e) {
|
|
4567
|
-
const t = e, { t: n } =
|
|
4568
|
-
return (l,
|
|
4571
|
+
const t = e, { t: n } = Oe({ useScope: "global" }), a = window.navigator.language, o = I(() => t.value ? (t.value instanceof Date ? t.value : new Date(t.value)).toLocaleString(a) : ""), i = I(() => t.value ? Zn(t.value) : "");
|
|
4572
|
+
return (l, r) => e.value ? (f(), y("span", {
|
|
4569
4573
|
key: 0,
|
|
4570
4574
|
class: "vc-table-cell-date-ago",
|
|
4571
4575
|
title: o.value
|
|
4572
|
-
},
|
|
4576
|
+
}, M(i.value), 9, si)) : (f(), y("span", ui, M(s(n)("COMPONENTS.ORGANISMS.VC_TABLE.NOT_SET")), 1));
|
|
4573
4577
|
}
|
|
4574
|
-
}), di = /* @__PURE__ */
|
|
4578
|
+
}), di = /* @__PURE__ */ F({
|
|
4575
4579
|
__name: "CellImage",
|
|
4576
4580
|
props: {
|
|
4577
4581
|
value: {},
|
|
4578
4582
|
emptyIcon: {}
|
|
4579
4583
|
},
|
|
4580
4584
|
setup(e) {
|
|
4581
|
-
return (t, n) => (f(), P(
|
|
4585
|
+
return (t, n) => (f(), P(s(Wa), {
|
|
4582
4586
|
class: "vc-table-cell-image",
|
|
4583
4587
|
bordered: !0,
|
|
4584
4588
|
size: "s",
|
|
@@ -4589,46 +4593,46 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4589
4593
|
"thumbnail-size": "sm"
|
|
4590
4594
|
}, null, 8, ["src", "empty-icon"]));
|
|
4591
4595
|
}
|
|
4592
|
-
}), fi = /* @__PURE__ */
|
|
4596
|
+
}), fi = /* @__PURE__ */ F({
|
|
4593
4597
|
__name: "CellStatus",
|
|
4594
4598
|
props: {
|
|
4595
4599
|
value: {}
|
|
4596
4600
|
},
|
|
4597
4601
|
setup(e) {
|
|
4598
|
-
return (t, n) => (f(), P(
|
|
4599
|
-
default:
|
|
4600
|
-
|
|
4602
|
+
return (t, n) => (f(), P(s(nl), { class: "vc-table-cell-status" }, {
|
|
4603
|
+
default: w(() => [
|
|
4604
|
+
_(M(e.value), 1)
|
|
4601
4605
|
]),
|
|
4602
4606
|
_: 1
|
|
4603
4607
|
}));
|
|
4604
4608
|
}
|
|
4605
|
-
}), vi = { class: "vc-table-cell-status-icon" }, gi = /* @__PURE__ */
|
|
4609
|
+
}), vi = { class: "vc-table-cell-status-icon" }, gi = /* @__PURE__ */ F({
|
|
4606
4610
|
__name: "CellStatusIcon",
|
|
4607
4611
|
props: {
|
|
4608
4612
|
value: {}
|
|
4609
4613
|
},
|
|
4610
4614
|
setup(e) {
|
|
4611
4615
|
return (t, n) => (f(), y("div", vi, [
|
|
4612
|
-
typeof e.value == "boolean" ? (f(), P(
|
|
4616
|
+
typeof e.value == "boolean" ? (f(), P(s(ll), {
|
|
4613
4617
|
key: 0,
|
|
4614
4618
|
status: e.value
|
|
4615
|
-
}, null, 8, ["status"])) :
|
|
4619
|
+
}, null, 8, ["status"])) : $("", !0)
|
|
4616
4620
|
]));
|
|
4617
4621
|
}
|
|
4618
|
-
}), mi = /* @__PURE__ */
|
|
4622
|
+
}), mi = /* @__PURE__ */ F({
|
|
4619
4623
|
__name: "CellLink",
|
|
4620
4624
|
props: {
|
|
4621
4625
|
value: {}
|
|
4622
4626
|
},
|
|
4623
4627
|
setup(e) {
|
|
4624
|
-
return (t, n) => (f(), P(
|
|
4625
|
-
default:
|
|
4626
|
-
|
|
4628
|
+
return (t, n) => (f(), P(s(_a), { class: "vc-table-cell-link" }, {
|
|
4629
|
+
default: w(() => [
|
|
4630
|
+
_(M(e.value), 1)
|
|
4627
4631
|
]),
|
|
4628
4632
|
_: 1
|
|
4629
4633
|
}));
|
|
4630
4634
|
}
|
|
4631
|
-
}), pi = ["innerHTML"], bi = 500, yi = /* @__PURE__ */
|
|
4635
|
+
}), pi = ["innerHTML"], bi = 500, yi = /* @__PURE__ */ F({
|
|
4632
4636
|
__name: "CellHtml",
|
|
4633
4637
|
props: {
|
|
4634
4638
|
value: {},
|
|
@@ -4639,7 +4643,7 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4639
4643
|
function a(l) {
|
|
4640
4644
|
if (n.has(l))
|
|
4641
4645
|
return n.get(l);
|
|
4642
|
-
const
|
|
4646
|
+
const r = Dt.sanitize(l, {
|
|
4643
4647
|
ALLOWED_TAGS: [
|
|
4644
4648
|
"p",
|
|
4645
4649
|
"br",
|
|
@@ -4679,10 +4683,10 @@ const Qo = { class: "vc-table-cell-editable__error-tooltip" }, yt = /* @__PURE__
|
|
|
4679
4683
|
const u = n.keys().next().value;
|
|
4680
4684
|
u !== void 0 && n.delete(u);
|
|
4681
4685
|
}
|
|
4682
|
-
return n.set(l,
|
|
4686
|
+
return n.set(l, r), r;
|
|
4683
4687
|
}
|
|
4684
|
-
const o =
|
|
4685
|
-
return (l,
|
|
4688
|
+
const o = I(() => t.value ? a(String(t.value)) : ""), i = I(() => Kn(o.value, t.maxLength || 30));
|
|
4689
|
+
return (l, r) => (f(), y("div", {
|
|
4686
4690
|
class: "vc-table-cell-html",
|
|
4687
4691
|
innerHTML: i.value
|
|
4688
4692
|
}, null, 8, pi));
|
|
@@ -4707,7 +4711,7 @@ function hi() {
|
|
|
4707
4711
|
t(n.type) || e(n);
|
|
4708
4712
|
}
|
|
4709
4713
|
hi();
|
|
4710
|
-
const Cr = /* @__PURE__ */
|
|
4714
|
+
const Cr = /* @__PURE__ */ F({
|
|
4711
4715
|
__name: "DynamicCellRenderer",
|
|
4712
4716
|
props: {
|
|
4713
4717
|
type: {},
|
|
@@ -4725,18 +4729,18 @@ const Cr = /* @__PURE__ */ z({
|
|
|
4725
4729
|
},
|
|
4726
4730
|
emits: ["update", "blur"],
|
|
4727
4731
|
setup(e) {
|
|
4728
|
-
const { get: t } = Xt(), n = e, a =
|
|
4729
|
-
const l = t(n.type)?.config?.editable ?? !1,
|
|
4732
|
+
const { get: t } = Xt(), n = e, a = I(() => t(n.type)?.component || Zt), o = I(() => {
|
|
4733
|
+
const l = t(n.type)?.config?.editable ?? !1, r = {
|
|
4730
4734
|
value: n.value
|
|
4731
4735
|
};
|
|
4732
|
-
return l && n.editable && (
|
|
4736
|
+
return l && n.editable && (r.editable = n.editable, r.label = n.label, r.fieldName = n.fieldName, r.fieldId = n.fieldId, r.rules = n.rules, r.rowIndex = n.rowIndex, n.validateOnMount && (r.validateOnMount = !0)), n.type === "money" && n.currency && (r.currency = n.currency), (n.type === "date" || n.type === "time" || n.type === "datetime") && n.variant && (r.variant = n.variant), n.format && (r.format = n.format), r;
|
|
4733
4737
|
});
|
|
4734
|
-
return (i, l) => (f(), P(ut(a.value),
|
|
4735
|
-
onUpdate: l[0] || (l[0] = (
|
|
4736
|
-
onBlur: l[1] || (l[1] = (
|
|
4738
|
+
return (i, l) => (f(), P(ut(a.value), ne(o.value, {
|
|
4739
|
+
onUpdate: l[0] || (l[0] = (r) => i.$emit("update", r)),
|
|
4740
|
+
onBlur: l[1] || (l[1] = (r) => i.$emit("blur", r))
|
|
4737
4741
|
}), null, 16));
|
|
4738
4742
|
}
|
|
4739
|
-
}), xr =
|
|
4743
|
+
}), xr = F({
|
|
4740
4744
|
name: "SlotProxy",
|
|
4741
4745
|
props: {
|
|
4742
4746
|
slotFn: { type: Function, required: !0 },
|
|
@@ -4757,7 +4761,7 @@ export {
|
|
|
4757
4761
|
kr as D,
|
|
4758
4762
|
hi as E,
|
|
4759
4763
|
Sr as F,
|
|
4760
|
-
|
|
4764
|
+
Ee as G,
|
|
4761
4765
|
Xt as H,
|
|
4762
4766
|
ra as I,
|
|
4763
4767
|
He as J,
|
|
@@ -4767,12 +4771,12 @@ export {
|
|
|
4767
4771
|
ir as N,
|
|
4768
4772
|
la as O,
|
|
4769
4773
|
dt as P,
|
|
4770
|
-
|
|
4771
|
-
|
|
4774
|
+
ce as Q,
|
|
4775
|
+
we as R,
|
|
4772
4776
|
qe as S,
|
|
4773
4777
|
tr as T,
|
|
4774
4778
|
Wn as U,
|
|
4775
|
-
|
|
4779
|
+
pe as V,
|
|
4776
4780
|
ot as W,
|
|
4777
4781
|
oa as X,
|
|
4778
4782
|
Ye as Y,
|
|
@@ -4788,7 +4792,7 @@ export {
|
|
|
4788
4792
|
Oa as a5,
|
|
4789
4793
|
Ea as a6,
|
|
4790
4794
|
Ui as a7,
|
|
4791
|
-
|
|
4795
|
+
he as a8,
|
|
4792
4796
|
Aa as a9,
|
|
4793
4797
|
fr as aA,
|
|
4794
4798
|
_i as aB,
|
|
@@ -4817,7 +4821,7 @@ export {
|
|
|
4817
4821
|
$r as aY,
|
|
4818
4822
|
wr as aZ,
|
|
4819
4823
|
xr as a_,
|
|
4820
|
-
|
|
4824
|
+
se as aa,
|
|
4821
4825
|
Ki as ab,
|
|
4822
4826
|
qi as ac,
|
|
4823
4827
|
zi as ad,
|
|
@@ -4868,7 +4872,7 @@ export {
|
|
|
4868
4872
|
_a as u,
|
|
4869
4873
|
il as v,
|
|
4870
4874
|
Uo as w,
|
|
4871
|
-
|
|
4875
|
+
oe as x,
|
|
4872
4876
|
nl as y,
|
|
4873
4877
|
ll as z
|
|
4874
4878
|
};
|