@vc-shell/framework 2.5.0-pr316.99df47c → 2.5.0-pr317.07f1a32
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/ai-agent/index.js +3 -3
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-Cfv6Pk05.js +1363 -0
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-Cfv6Pk05.js.map +1 -0
- package/dist/chunks/{VcAiAgentPanel.vue_vue_type_style_index_0_lang-CZdY18Hq.js → VcAiAgentPanel.vue_vue_type_style_index_0_lang-0llGMIi1.js} +74 -68
- package/dist/chunks/{VcAiAgentPanel.vue_vue_type_style_index_0_lang-CZdY18Hq.js.map → VcAiAgentPanel.vue_vue_type_style_index_0_lang-0llGMIi1.js.map} +1 -1
- package/dist/chunks/{VcScheduler.vue_vue_type_script_setup_true_lang-BJDpNlEU.js → VcScheduler.vue_vue_type_script_setup_true_lang-DAp80XnM.js} +7003 -6252
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-DAp80XnM.js.map +1 -0
- package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-CX5yXw-b.js +4125 -0
- package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-CX5yXw-b.js.map +1 -0
- package/dist/chunks/{dashboard-feed-row.vue_vue_type_script_setup_true_lang-DiPHjugE.js → dashboard-feed-row.vue_vue_type_script_setup_true_lang-D2Kl7FBo.js} +43 -43
- package/dist/chunks/{dashboard-feed-row.vue_vue_type_script_setup_true_lang-DiPHjugE.js.map → dashboard-feed-row.vue_vue_type_script_setup_true_lang-D2Kl7FBo.js.map} +1 -1
- package/dist/chunks/{index-B7RhGTNx.js → index-rImb-nAa.js} +2 -2
- package/dist/chunks/{index-B7RhGTNx.js.map → index-rImb-nAa.js.map} +1 -1
- package/dist/core/blade-navigation/types/index.d.ts +17 -0
- package/dist/core/blade-navigation/types/index.d.ts.map +1 -1
- package/dist/core/blade-navigation/utils/urlSync.d.ts +28 -2
- package/dist/core/blade-navigation/utils/urlSync.d.ts.map +1 -1
- package/dist/core/composables/useBlade/index.d.ts.map +1 -1
- package/dist/core/composables/useBladeNavigationAdapter/index.d.ts.map +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/framework.js +1113 -1117
- package/dist/framework.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/shell/_internal/blade-navigation/components/vc-blade-navigation/vc-blade-navigation-new.vue.d.ts.map +1 -1
- package/dist/shell/_internal/blade-navigation/plugin-v2.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/VcColumn.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/VcColumn.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/cells/DynamicCellRenderer.vue.d.ts +6 -30
- package/dist/ui/components/organisms/vc-data-table/components/cells/DynamicCellRenderer.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/index.d.ts +0 -2
- package/dist/ui/components/organisms/vc-data-table/index.d.ts.map +1 -1
- package/dist/ui/index.js +150 -153
- package/package.json +4 -4
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-9mBLzIi1.js +0 -1402
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-9mBLzIi1.js.map +0 -1
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-BJDpNlEU.js.map +0 -1
- package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-C8qaDNLM.js +0 -4829
- package/dist/chunks/VcScheduler.vue_vue_type_style_index_0_lang-C8qaDNLM.js.map +0 -1
- package/dist/ui/components/organisms/vc-data-table/composables/builtinCells.d.ts +0 -12
- package/dist/ui/components/organisms/vc-data-table/composables/builtinCells.d.ts.map +0 -1
|
@@ -0,0 +1,4125 @@
|
|
|
1
|
+
import { mergeProps as ae, computed as C, toValue as fe, inject as U, useId as Wt, ref as S, onBeforeUnmount as Qe, reactive as Ue, provide as mt, getCurrentScope as jt, onScopeDispose as Ht, getCurrentInstance as Fe, onErrorCaptured as Gt, nextTick as ye, defineComponent as G, watch as X, unref as i, openBlock as g, createElementBlock as h, normalizeClass as Z, createBlock as P, createCommentVNode as w, renderSlot as B, createElementVNode as L, toDisplayString as N, Fragment as ke, renderList as _e, normalizeStyle as De, resolveDynamicComponent as yt, withCtx as E, createVNode as T, withKeys as _, withModifiers as Y, watchEffect as He, shallowReactive as Ge, markRaw as Je, createSlots as me, createTextVNode as ee, Transition as Re, withDirectives as et, vModelText as Jt, useAttrs as bt, vModelDynamic as Yt, onMounted as tt, onUnmounted as ht, Teleport as Xt, normalizeProps as Ce, guardReactiveProps as Be } from "vue";
|
|
2
|
+
import { c as ce, ai as Zt, O as Qt, v as _t, r as en, o as tn, I as nn, q as an, p as on, B as It, b as ln, i as rn, _ as W, T as kt, a as sn, V as un, w as cn, u as dn } from "./VcAiAgentPanel.vue_vue_type_style_index_0_lang-0llGMIi1.js";
|
|
3
|
+
import { defineRule as Se } from "vee-validate";
|
|
4
|
+
import { a as ct } from "./vendor-vee-validate-rules-4oWUZPpG.js";
|
|
5
|
+
import { a as St, s as fn, c as gn, b as We, e as Le } from "./vendor-lodash-es-D2n90GJy.js";
|
|
6
|
+
import { X as vn } from "./vendor-microsoft-applicationinsights-core-js-CR3vyuZc.js";
|
|
7
|
+
import { d as wt, e as pn, f as mn, g as yn } from "./vendor-vueuse-core-BFa9je5E.js";
|
|
8
|
+
import { c as bn, u as nt } from "./vendor-vue-i18n-LO-EJStU.js";
|
|
9
|
+
import { j as hn } from "./vendor-vueuse-shared-kZH3-Km1.js";
|
|
10
|
+
import { k as In } from "./vendor-tiptap-core-CZbeo7XQ.js";
|
|
11
|
+
import "./vendor-tiptap-extension-text-style-Bc6nvmn0.js";
|
|
12
|
+
import { C as kn, u as Sn } from "./vendor-vue-currency-input-CckB4kjx.js";
|
|
13
|
+
import { u as wn } from "./vendor-floating-ui-vue-sCrhit51.js";
|
|
14
|
+
import { f as $t, s as Ot, o as Ye, b as $n } from "./vendor-floating-ui-dom-BvVXFZ4B.js";
|
|
15
|
+
import { v as On } from "./vendor-vueuse-components-CoR2FSn3.js";
|
|
16
|
+
import { p as En } from "./vendor-dompurify-DpIUMBYC.js";
|
|
17
|
+
import { q as Cn } from "./vendor-vuepic-vue-datepicker-D0bvbIbh.js";
|
|
18
|
+
const be = bn({
|
|
19
|
+
legacy: !1,
|
|
20
|
+
globalInjection: !0,
|
|
21
|
+
locale: "en",
|
|
22
|
+
fallbackLocale: "en",
|
|
23
|
+
formatFallbackMessages: !0
|
|
24
|
+
});
|
|
25
|
+
function Xe() {
|
|
26
|
+
return Math.random().toString(36).substring(2, 9);
|
|
27
|
+
}
|
|
28
|
+
class ie extends Error {
|
|
29
|
+
constructor(t, n, a) {
|
|
30
|
+
super(t), this.code = n, this.context = a, this.name = "FrameworkError", Error.captureStackTrace && Error.captureStackTrace(this, ie);
|
|
31
|
+
}
|
|
32
|
+
toJSON() {
|
|
33
|
+
return {
|
|
34
|
+
name: this.name,
|
|
35
|
+
code: this.code,
|
|
36
|
+
message: this.message,
|
|
37
|
+
context: this.context,
|
|
38
|
+
stack: this.stack
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
class Vl extends ie {
|
|
43
|
+
constructor(t, n) {
|
|
44
|
+
super(t, "VALIDATION_ERROR", n), this.name = "ValidationError";
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
class Dl extends ie {
|
|
48
|
+
constructor(t, n) {
|
|
49
|
+
super(t, "SERVICE_ERROR", n), this.name = "ServiceError";
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
class Bn extends ie {
|
|
53
|
+
constructor(t, n) {
|
|
54
|
+
super(`${t} not provided. Make sure to call the corresponding 'provide' function.`, "INJECTION_ERROR", {
|
|
55
|
+
serviceName: t,
|
|
56
|
+
...n
|
|
57
|
+
}), this.name = "InjectionError";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
class Nl extends ie {
|
|
61
|
+
constructor(t, n, a) {
|
|
62
|
+
super(`Failed to register '${t}': ${n}`, "REGISTRATION_ERROR", {
|
|
63
|
+
componentName: t,
|
|
64
|
+
...a
|
|
65
|
+
}), this.name = "RegistrationError";
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
class Fl extends ie {
|
|
69
|
+
constructor(t, n, a) {
|
|
70
|
+
super(t, "BLADE_ERROR", {
|
|
71
|
+
bladeId: n,
|
|
72
|
+
...a
|
|
73
|
+
}), this.name = "BladeError";
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
class zl extends ie {
|
|
77
|
+
constructor(t, n, a) {
|
|
78
|
+
super(`Failed to load module '${t}': ${n}`, "MODULE_LOAD_ERROR", {
|
|
79
|
+
moduleId: t,
|
|
80
|
+
...a
|
|
81
|
+
}), this.name = "ModuleLoadError";
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function Ln(e) {
|
|
85
|
+
return e instanceof ie;
|
|
86
|
+
}
|
|
87
|
+
function Pl(e, t = "UNKNOWN_ERROR") {
|
|
88
|
+
return Ln(e) ? e : e instanceof Error ? new ie(e.message, t, {
|
|
89
|
+
originalError: e.name,
|
|
90
|
+
stack: e.stack
|
|
91
|
+
}) : new ie(String(e), t);
|
|
92
|
+
}
|
|
93
|
+
class ge extends Error {
|
|
94
|
+
details;
|
|
95
|
+
originalError;
|
|
96
|
+
constructor(t, n, a) {
|
|
97
|
+
super(t), this.name = "DisplayableError", this.details = n, this.originalError = a;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function Rn(e) {
|
|
101
|
+
return e instanceof Error && typeof e.status == "number" && typeof e.response == "string";
|
|
102
|
+
}
|
|
103
|
+
function Ae(e) {
|
|
104
|
+
if (e instanceof ge)
|
|
105
|
+
return e;
|
|
106
|
+
if (Rn(e)) {
|
|
107
|
+
const { status: t, response: n } = e;
|
|
108
|
+
try {
|
|
109
|
+
return Ae(JSON.parse(n));
|
|
110
|
+
} catch {
|
|
111
|
+
const a = `${t}: ${e.message || "Error"}`;
|
|
112
|
+
return new ge(a, n || e.message, e);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (e instanceof Error && "response" in e && e.response)
|
|
116
|
+
return Ae(e.response);
|
|
117
|
+
if (e instanceof Error)
|
|
118
|
+
return new ge(e.message, e.stack || String(e), e);
|
|
119
|
+
if (typeof e == "string")
|
|
120
|
+
try {
|
|
121
|
+
const t = JSON.parse(e);
|
|
122
|
+
return Ae(t);
|
|
123
|
+
} catch {
|
|
124
|
+
return new ge(e, e, e);
|
|
125
|
+
}
|
|
126
|
+
if (typeof e == "object" && e !== null) {
|
|
127
|
+
const t = e;
|
|
128
|
+
if ("status" in t && "data" in t) {
|
|
129
|
+
const l = t.status, r = t.statusText || "Error", o = `${l}: ${r}`, s = t.data;
|
|
130
|
+
let u = "";
|
|
131
|
+
return s ? typeof s.exceptionMessage == "string" ? u = s.exceptionMessage : typeof s.message == "string" ? u = s.message : Array.isArray(s.errors) ? u = s.errors.join(`
|
|
132
|
+
`) : typeof s == "string" ? u = s : u = JSON.stringify(s, null, 2) : u = JSON.stringify(t, null, 2), new ge(o, u, e);
|
|
133
|
+
}
|
|
134
|
+
const n = t.message || "An unexpected error occurred.", a = t.stack || JSON.stringify(t, null, 2);
|
|
135
|
+
return new ge(n, a, e);
|
|
136
|
+
}
|
|
137
|
+
return new ge("An unknown error occurred.", String(e), e);
|
|
138
|
+
}
|
|
139
|
+
const xn = ce("color-utils");
|
|
140
|
+
function Tn(e) {
|
|
141
|
+
if (!e || typeof e != "string")
|
|
142
|
+
return null;
|
|
143
|
+
try {
|
|
144
|
+
const t = document.createElement("canvas");
|
|
145
|
+
t.width = 1, t.height = 1;
|
|
146
|
+
const n = t.getContext("2d");
|
|
147
|
+
return !n || (n.fillStyle = e.trim(), n.fillStyle === "#000000" && e.trim().toLowerCase() !== "black") ? null : n.fillStyle;
|
|
148
|
+
} catch (t) {
|
|
149
|
+
return xn.warn("Error converting color name to hex:", t), null;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
function Mn(e) {
|
|
153
|
+
if (!e || typeof e != "string")
|
|
154
|
+
return !1;
|
|
155
|
+
const t = e.startsWith("#") ? e : `#${e}`;
|
|
156
|
+
return /^#[0-9A-Fa-f]{6}$/.test(t);
|
|
157
|
+
}
|
|
158
|
+
function dt(e) {
|
|
159
|
+
return !e || typeof e != "string" ? "" : e.startsWith("#") ? e : `#${e}`;
|
|
160
|
+
}
|
|
161
|
+
function An(e) {
|
|
162
|
+
let t = null;
|
|
163
|
+
return {
|
|
164
|
+
register(n) {
|
|
165
|
+
t = n, e?.(t);
|
|
166
|
+
},
|
|
167
|
+
get() {
|
|
168
|
+
return t;
|
|
169
|
+
},
|
|
170
|
+
reset() {
|
|
171
|
+
t = null, e?.(t);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
function ql() {
|
|
176
|
+
const e = /* @__PURE__ */ new Map();
|
|
177
|
+
return {
|
|
178
|
+
register(t, n) {
|
|
179
|
+
e.set(t, n);
|
|
180
|
+
},
|
|
181
|
+
get(t) {
|
|
182
|
+
return e.get(t);
|
|
183
|
+
},
|
|
184
|
+
reset() {
|
|
185
|
+
e.clear();
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
const at = () => {
|
|
190
|
+
const e = Zt();
|
|
191
|
+
return {
|
|
192
|
+
user: e.user,
|
|
193
|
+
loading: e.loading,
|
|
194
|
+
isAdministrator: e.isAdministrator,
|
|
195
|
+
isAuthenticated: e.isAuthenticated,
|
|
196
|
+
validateToken: e.validateToken,
|
|
197
|
+
validatePassword: e.validatePassword,
|
|
198
|
+
resetPasswordByToken: e.resetPasswordByToken,
|
|
199
|
+
getLoginType: e.getLoginType,
|
|
200
|
+
loadUser: e.loadUser,
|
|
201
|
+
requestPasswordReset: e.requestPasswordReset,
|
|
202
|
+
changeUserPassword: e.changeUserPassword,
|
|
203
|
+
signIn: e.signIn,
|
|
204
|
+
signOut: e.signOut
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
function Vn() {
|
|
208
|
+
const { user: e } = at();
|
|
209
|
+
function t(n) {
|
|
210
|
+
const a = e.value?.permissions ?? [];
|
|
211
|
+
if (!n || Array.isArray(n) && n.length === 0 || e.value?.isAdministrator)
|
|
212
|
+
return !0;
|
|
213
|
+
if (Array.isArray(n))
|
|
214
|
+
return n.some((l) => a.includes(l));
|
|
215
|
+
if (typeof n == "string")
|
|
216
|
+
return a.includes(n);
|
|
217
|
+
throw new Error("Permissions must be a string or an array of strings");
|
|
218
|
+
}
|
|
219
|
+
return {
|
|
220
|
+
hasAccess: t
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
const pe = ce("notification"), de = An();
|
|
224
|
+
function Dn(e) {
|
|
225
|
+
de.register(e);
|
|
226
|
+
}
|
|
227
|
+
function xe(e, t) {
|
|
228
|
+
const n = de.get();
|
|
229
|
+
if (!n) {
|
|
230
|
+
pe.debug("Backend not yet registered — notification call ignored.");
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
return t = ae(
|
|
234
|
+
n.defaultOptions,
|
|
235
|
+
t
|
|
236
|
+
), (!t.notificationId || typeof t.notificationId != "string" && typeof t.notificationId != "number") && (t.notificationId = Xe()), t = {
|
|
237
|
+
...t,
|
|
238
|
+
content: e
|
|
239
|
+
}, n.appendInstance(t), t.notificationId;
|
|
240
|
+
}
|
|
241
|
+
const re = (e, t) => xe(e, { ...t, type: "default" });
|
|
242
|
+
re.error = (e, t) => xe(e, { ...t, type: "error" });
|
|
243
|
+
re.warning = (e, t) => xe(e, { ...t, type: "warning" });
|
|
244
|
+
re.success = (e, t) => xe(e, { ...t, type: "success" });
|
|
245
|
+
re.clearAll = () => {
|
|
246
|
+
de.get()?.actions.clear();
|
|
247
|
+
};
|
|
248
|
+
re.remove = (e) => {
|
|
249
|
+
const t = de.get();
|
|
250
|
+
t && (e ? t.actions.dismiss(e) : t.actions.clear());
|
|
251
|
+
};
|
|
252
|
+
re.update = (e, t) => {
|
|
253
|
+
const n = de.get();
|
|
254
|
+
if (!n) return e;
|
|
255
|
+
if (!n.hasNotification(e))
|
|
256
|
+
return pe.warn(`Cannot update: notification with ID ${e} not found`), e;
|
|
257
|
+
const a = n.getNotification(String(e));
|
|
258
|
+
if (a)
|
|
259
|
+
if (t.position && t.position !== a.position) {
|
|
260
|
+
const l = {
|
|
261
|
+
...a,
|
|
262
|
+
...t,
|
|
263
|
+
updateId: Xe(),
|
|
264
|
+
notificationId: e
|
|
265
|
+
};
|
|
266
|
+
let r;
|
|
267
|
+
if (t.content !== void 0 ? (r = t.content, delete l.content) : a.content && (r = a.content, delete l.content), r)
|
|
268
|
+
return n.actions.remove(e), xe(r, l);
|
|
269
|
+
} else {
|
|
270
|
+
const l = {
|
|
271
|
+
...t,
|
|
272
|
+
updateId: Xe(),
|
|
273
|
+
notificationId: e
|
|
274
|
+
};
|
|
275
|
+
return n.actions.update(l), e;
|
|
276
|
+
}
|
|
277
|
+
return e;
|
|
278
|
+
};
|
|
279
|
+
re.setPosition = (e) => {
|
|
280
|
+
const t = de.get();
|
|
281
|
+
t && (t.defaultOptions.position = e);
|
|
282
|
+
};
|
|
283
|
+
re.clearPosition = (e) => {
|
|
284
|
+
const t = de.get();
|
|
285
|
+
if (!t) return;
|
|
286
|
+
t.getAllNotifications().filter((a) => (a.position || t.defaultOptions.position) === e).forEach((a) => {
|
|
287
|
+
a.notificationId && t.actions.dismiss(a.notificationId);
|
|
288
|
+
});
|
|
289
|
+
};
|
|
290
|
+
re.debug = () => {
|
|
291
|
+
const e = de.get();
|
|
292
|
+
if (!e)
|
|
293
|
+
return pe.debug("Backend not registered"), { active: [], defaultOptions: {} };
|
|
294
|
+
Object.entries(e.defaultOptions).forEach(([n, a]) => {
|
|
295
|
+
pe.debug(`Default option ${n}: `, a);
|
|
296
|
+
}), Object.entries(e.actions).forEach(([n]) => {
|
|
297
|
+
pe.debug(`Available action: ${n}`);
|
|
298
|
+
});
|
|
299
|
+
const t = e.getAllNotifications().reduce((n, a) => {
|
|
300
|
+
const l = a.position || e.defaultOptions.position;
|
|
301
|
+
return n[l] || (n[l] = []), n[l].push({
|
|
302
|
+
id: a.notificationId || "unknown",
|
|
303
|
+
type: a.type,
|
|
304
|
+
content: typeof a.content == "string" ? a.content : "[Component]"
|
|
305
|
+
}), n;
|
|
306
|
+
}, {});
|
|
307
|
+
return Object.entries(t).forEach(([n, a]) => {
|
|
308
|
+
pe.debug(`Position ${n}: ${a.length} notifications`), a.forEach((l) => pe.debug(` - ${l.id} (${l.type}): ${l.content}`));
|
|
309
|
+
}), {
|
|
310
|
+
active: e.getAllNotifications(),
|
|
311
|
+
defaultOptions: e.defaultOptions
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
const Nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
315
|
+
__proto__: null,
|
|
316
|
+
notification: re,
|
|
317
|
+
setNotificationBackend: Dn
|
|
318
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
319
|
+
function Fn(e, t, n = {}) {
|
|
320
|
+
const a = C(() => fe(n.placement) ?? "bottom"), l = C(() => fe(n.strategy) ?? "absolute"), r = C(() => {
|
|
321
|
+
const u = fe(n.middleware);
|
|
322
|
+
if (u?.length)
|
|
323
|
+
return u;
|
|
324
|
+
const f = [];
|
|
325
|
+
fe(n.enableFlip) !== !1 && f.push($t({ padding: n.shiftPadding ?? 8 })), fe(n.enableShift) !== !1 && f.push(Ot({ padding: n.shiftPadding ?? 8 }));
|
|
326
|
+
const m = fe(n.offset);
|
|
327
|
+
return typeof m == "number" ? f.push(Ye(m)) : f.push(
|
|
328
|
+
Ye({
|
|
329
|
+
mainAxis: m?.mainAxis ?? 0,
|
|
330
|
+
crossAxis: m?.crossAxis ?? 0,
|
|
331
|
+
alignmentAxis: m?.alignmentAxis
|
|
332
|
+
})
|
|
333
|
+
), f;
|
|
334
|
+
}), o = wn(e, t, {
|
|
335
|
+
placement: a,
|
|
336
|
+
strategy: l,
|
|
337
|
+
whileElementsMounted: fe(n.autoUpdate) === !1 ? void 0 : $n,
|
|
338
|
+
middleware: r
|
|
339
|
+
}), s = C(() => ({
|
|
340
|
+
position: l.value,
|
|
341
|
+
top: `${o.y.value ?? 0}px`,
|
|
342
|
+
left: `${o.x.value ?? 0}px`
|
|
343
|
+
}));
|
|
344
|
+
return {
|
|
345
|
+
...o,
|
|
346
|
+
floatingStyle: s,
|
|
347
|
+
resolvedPlacement: a,
|
|
348
|
+
resolvedStrategy: l
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
const zn = Symbol("vc-input-group-context");
|
|
352
|
+
function ze(e) {
|
|
353
|
+
const t = U(zn, null), n = Wt(), a = C(() => `vc-field-${n}`), l = C(() => `${a.value}-label`), r = C(() => `${a.value}-error`), o = C(() => `${a.value}-hint`), s = C(() => !!e.error || !!e.errorMessage || !!t?.invalid.value), u = C(() => !!e.disabled || !!t?.disabled.value), f = C(() => t?.name.value || e.name), m = C(() => e.required ? !0 : void 0), v = C(() => {
|
|
354
|
+
const d = /* @__PURE__ */ new Set();
|
|
355
|
+
return t?.describedBy.value && t.describedBy.value.split(/\s+/).forEach((c) => d.add(c)), e.errorMessage && d.add(r.value), e.hint && d.add(o.value), d.size ? Array.from(d).join(" ") : void 0;
|
|
356
|
+
});
|
|
357
|
+
return {
|
|
358
|
+
fieldId: a,
|
|
359
|
+
labelId: l,
|
|
360
|
+
errorId: r,
|
|
361
|
+
hintId: o,
|
|
362
|
+
invalid: s,
|
|
363
|
+
resolvedDisabled: u,
|
|
364
|
+
resolvedName: f,
|
|
365
|
+
ariaRequired: m,
|
|
366
|
+
ariaDescribedBy: v,
|
|
367
|
+
groupContext: t
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
function Pn(e, t = {}) {
|
|
371
|
+
const { speed: n = 2 } = t, a = S(!1), l = S(!1);
|
|
372
|
+
let r = null;
|
|
373
|
+
function o() {
|
|
374
|
+
const f = e.value;
|
|
375
|
+
if (!f) {
|
|
376
|
+
a.value = !1, l.value = !1;
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
a.value = f.scrollTop > 0, l.value = Math.ceil(f.scrollTop) < f.scrollHeight - f.clientHeight;
|
|
380
|
+
}
|
|
381
|
+
function s(f) {
|
|
382
|
+
u();
|
|
383
|
+
const m = e.value;
|
|
384
|
+
if (!m) return;
|
|
385
|
+
function v() {
|
|
386
|
+
m && (m.scrollTop += f === "up" ? -n : n, o(), r = requestAnimationFrame(v));
|
|
387
|
+
}
|
|
388
|
+
r = requestAnimationFrame(v);
|
|
389
|
+
}
|
|
390
|
+
function u() {
|
|
391
|
+
r !== null && (cancelAnimationFrame(r), r = null);
|
|
392
|
+
}
|
|
393
|
+
return wt(e, o), Qe(() => {
|
|
394
|
+
u();
|
|
395
|
+
}), {
|
|
396
|
+
canScrollUp: a,
|
|
397
|
+
canScrollDown: l,
|
|
398
|
+
startScroll: s,
|
|
399
|
+
stopScroll: u,
|
|
400
|
+
updateScrollState: o
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
function he() {
|
|
404
|
+
return U(Qt, S(!1));
|
|
405
|
+
}
|
|
406
|
+
Object.keys(ct).forEach((e) => {
|
|
407
|
+
Se(e, ct[e]);
|
|
408
|
+
});
|
|
409
|
+
const qn = (e, [t, n]) => {
|
|
410
|
+
if (!e?.files || !e.files?.length)
|
|
411
|
+
return !0;
|
|
412
|
+
const a = (o, s, u) => {
|
|
413
|
+
const f = window.URL || window.webkitURL;
|
|
414
|
+
return new Promise((m) => {
|
|
415
|
+
const v = new Image(), d = f.createObjectURL(o);
|
|
416
|
+
v.onerror = () => {
|
|
417
|
+
f.revokeObjectURL(d), m(!1);
|
|
418
|
+
}, v.onload = () => {
|
|
419
|
+
f.revokeObjectURL(d);
|
|
420
|
+
const c = v.width >= Number(s) && v.height >= Number(u);
|
|
421
|
+
m(c ? !0 : be.global.t("messages.min_dimensions.error", { width: s, height: u }));
|
|
422
|
+
}, v.src = d;
|
|
423
|
+
});
|
|
424
|
+
}, l = [], r = e.files;
|
|
425
|
+
for (let o = 0; o < r.length; o++) {
|
|
426
|
+
if (!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(r[o].name))
|
|
427
|
+
return Promise.resolve(be.global.t("messages.min_dimensions.not_image_error"));
|
|
428
|
+
l.push(r[o]);
|
|
429
|
+
}
|
|
430
|
+
return Promise.all(l.map((o) => a(o, t, n))).then((o) => {
|
|
431
|
+
const s = o.find((u) => u !== !0);
|
|
432
|
+
return s === !1 || typeof s == "string" ? s : !0;
|
|
433
|
+
});
|
|
434
|
+
};
|
|
435
|
+
Se("mindimensions", qn);
|
|
436
|
+
const Kn = (e, [t]) => {
|
|
437
|
+
if (!e?.files || !e.files?.length)
|
|
438
|
+
return !0;
|
|
439
|
+
const n = t * 1e3, a = (s) => s.size > n, l = [];
|
|
440
|
+
for (let s = 0; s < e.files.length; s++)
|
|
441
|
+
l.push(e.files[s]);
|
|
442
|
+
return l.map((s) => a(s)).find((s) => s === !0) ? be.global.t("messages.file_weight", { size: t }) : !0;
|
|
443
|
+
};
|
|
444
|
+
Se("fileWeight", Kn);
|
|
445
|
+
const Et = (e, [t], n, a) => {
|
|
446
|
+
if (!e || typeof e == "string" && !e.length)
|
|
447
|
+
return !0;
|
|
448
|
+
let l, r;
|
|
449
|
+
return e instanceof Date && (l = e), t instanceof Date && (r = t), typeof e == "string" && (l = new Date(e)), typeof t == "string" && (r = new Date(t)), l?.getTime && l?.getTime() > 0 && r?.getTime && r?.getTime() > 0 && n(r.getTime(), l.getTime()) ? a : !0;
|
|
450
|
+
}, Un = (e, [t]) => Et(e, [t], (n, a) => n < a, be.global.t("messages.before"));
|
|
451
|
+
Se("before", Un);
|
|
452
|
+
const Wn = (e, [t]) => Et(e, [t], (n, a) => n > a, be.global.t("messages.after"));
|
|
453
|
+
Se("after", Wn);
|
|
454
|
+
const jn = (e) => Number.isSafeInteger(parseInt(e)) ? !0 : be.global.t("messages.bigint");
|
|
455
|
+
Se("bigint", jn);
|
|
456
|
+
function we(e) {
|
|
457
|
+
const t = ce(`${e.name}-bus`), n = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set();
|
|
458
|
+
function l(d) {
|
|
459
|
+
const c = e.getKey(d);
|
|
460
|
+
n.set(c, d), a.size > 0 && m((y) => {
|
|
461
|
+
try {
|
|
462
|
+
e.registerIntoService(y, d);
|
|
463
|
+
} catch (b) {
|
|
464
|
+
t.warn(`Failed to live-register item (key=${c}):`, b);
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
function r(d) {
|
|
469
|
+
n.delete(d), e.unregisterFromService && a.size > 0 && a.forEach((c) => {
|
|
470
|
+
try {
|
|
471
|
+
e.unregisterFromService(c, d);
|
|
472
|
+
} catch (y) {
|
|
473
|
+
t.warn(`Failed to live-unregister item (id=${d}):`, y);
|
|
474
|
+
}
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
function o(d) {
|
|
478
|
+
for (const [c, y] of n)
|
|
479
|
+
d(y) && n.delete(c);
|
|
480
|
+
}
|
|
481
|
+
function s() {
|
|
482
|
+
return Array.from(n.values());
|
|
483
|
+
}
|
|
484
|
+
function u(d) {
|
|
485
|
+
a.add(d), n.forEach((c, y) => {
|
|
486
|
+
try {
|
|
487
|
+
e.registerIntoService(d, c);
|
|
488
|
+
} catch (b) {
|
|
489
|
+
t.warn(`Failed to replay item (key=${y}):`, b);
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
function f(d) {
|
|
494
|
+
a.delete(d);
|
|
495
|
+
}
|
|
496
|
+
function m(d) {
|
|
497
|
+
a.forEach((c) => d(c));
|
|
498
|
+
}
|
|
499
|
+
function v() {
|
|
500
|
+
return a.values().next().value;
|
|
501
|
+
}
|
|
502
|
+
return {
|
|
503
|
+
preregister: l,
|
|
504
|
+
unregister: r,
|
|
505
|
+
removePreregistered: o,
|
|
506
|
+
getPreregistered: s,
|
|
507
|
+
replayInto: u,
|
|
508
|
+
dispose: f,
|
|
509
|
+
broadcast: m,
|
|
510
|
+
getFirstInstance: v,
|
|
511
|
+
get instanceCount() {
|
|
512
|
+
return a.size;
|
|
513
|
+
}
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
function Ct(e) {
|
|
517
|
+
const t = Ue({}), n = Ue([]), a = Ue(/* @__PURE__ */ new Map());
|
|
518
|
+
function l(d) {
|
|
519
|
+
a.set(d, (a.get(d) ?? 0) + 1);
|
|
520
|
+
}
|
|
521
|
+
function r(d) {
|
|
522
|
+
const c = a.get(d);
|
|
523
|
+
if (!c || c <= 1) {
|
|
524
|
+
a.delete(d);
|
|
525
|
+
return;
|
|
526
|
+
}
|
|
527
|
+
a.set(d, c - 1);
|
|
528
|
+
}
|
|
529
|
+
function o(d, c) {
|
|
530
|
+
const y = c.toLowerCase();
|
|
531
|
+
t[y] || (t[y] = []);
|
|
532
|
+
const b = t[y].find((p) => p.id === d.id);
|
|
533
|
+
if (b) {
|
|
534
|
+
Object.assign(b, d, { bladeId: y });
|
|
535
|
+
return;
|
|
536
|
+
}
|
|
537
|
+
const O = { ...d, bladeId: y };
|
|
538
|
+
t[y].push(O), n.push(e.createRegistration(y, O)), l(d.id);
|
|
539
|
+
}
|
|
540
|
+
function s(d, c) {
|
|
541
|
+
const y = c.toLowerCase(), b = t[y];
|
|
542
|
+
if (b) {
|
|
543
|
+
const p = b.findIndex((k) => k.id === d);
|
|
544
|
+
if (p !== -1) {
|
|
545
|
+
const [k] = b.splice(p, 1);
|
|
546
|
+
k && r(k.id);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
const O = n.findIndex(
|
|
550
|
+
(p) => e.getRegistrationBladeId(p) === y && e.getRegistrationItemId(p) === d
|
|
551
|
+
);
|
|
552
|
+
O !== -1 && n.splice(O, 1);
|
|
553
|
+
}
|
|
554
|
+
function u(d) {
|
|
555
|
+
const c = d ? d.toLowerCase() : "";
|
|
556
|
+
return [...t[c] || []];
|
|
557
|
+
}
|
|
558
|
+
function f(d) {
|
|
559
|
+
const c = d.toLowerCase(), y = t[c];
|
|
560
|
+
y && (y.forEach((O) => r(O.id)), delete t[c]), n.map((O, p) => e.getRegistrationBladeId(O) === c ? p : -1).filter((O) => O !== -1).reverse().forEach((O) => {
|
|
561
|
+
n.splice(O, 1);
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
function m(d, c, y) {
|
|
565
|
+
const b = c.toLowerCase(), O = t[b]?.find((p) => p.id === d);
|
|
566
|
+
O && Object.assign(O, y, { bladeId: b });
|
|
567
|
+
}
|
|
568
|
+
function v(d) {
|
|
569
|
+
return a.has(d);
|
|
570
|
+
}
|
|
571
|
+
return {
|
|
572
|
+
registry: t,
|
|
573
|
+
registrations: n,
|
|
574
|
+
register: o,
|
|
575
|
+
unregister: s,
|
|
576
|
+
get: u,
|
|
577
|
+
clear: f,
|
|
578
|
+
update: m,
|
|
579
|
+
isRegistered: v
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
function Hn(e) {
|
|
583
|
+
const t = S(/* @__PURE__ */ new Map()), n = C(() => Array.from(t.value.values()).sort((r, o) => (r.order ?? 0) - (o.order ?? 0)));
|
|
584
|
+
function a(r) {
|
|
585
|
+
const o = e.getId(r) || crypto.randomUUID(), s = e.createItem(r, t.value.size);
|
|
586
|
+
return t.value.set(o, { ...s, id: o }), o;
|
|
587
|
+
}
|
|
588
|
+
function l(r) {
|
|
589
|
+
t.value.delete(r);
|
|
590
|
+
}
|
|
591
|
+
return {
|
|
592
|
+
itemsMap: t,
|
|
593
|
+
sortedItems: n,
|
|
594
|
+
register: a,
|
|
595
|
+
unregister: l
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
function Bt(e) {
|
|
599
|
+
const t = Hn({
|
|
600
|
+
createItem: e.createItem,
|
|
601
|
+
getId: e.getId
|
|
602
|
+
}), n = {
|
|
603
|
+
register: (a) => t.register(a),
|
|
604
|
+
unregister: (a) => t.unregister(a),
|
|
605
|
+
items: t.sortedItems
|
|
606
|
+
};
|
|
607
|
+
return e.bus.replayInto(n), n;
|
|
608
|
+
}
|
|
609
|
+
function Ne(e) {
|
|
610
|
+
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(St(e, "title"))}`;
|
|
611
|
+
}
|
|
612
|
+
const Te = S(/* @__PURE__ */ new Map()), se = we({
|
|
613
|
+
name: "menu-service",
|
|
614
|
+
getKey: Ne,
|
|
615
|
+
registerIntoService: (e, t) => e.addMenuItem(t)
|
|
616
|
+
});
|
|
617
|
+
function Kl(e) {
|
|
618
|
+
se.preregister(e);
|
|
619
|
+
}
|
|
620
|
+
function Ul(e) {
|
|
621
|
+
se.removePreregistered((t) => ot(t, e)), se.broadcast((t) => t.removeMenuItem(e));
|
|
622
|
+
}
|
|
623
|
+
function Wl(e, t) {
|
|
624
|
+
Te.value.set(e, t), se.broadcast((n) => {
|
|
625
|
+
n.menuBadges.value.set(e, t);
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
function jl(e) {
|
|
629
|
+
const t = se.getFirstInstance();
|
|
630
|
+
return t ? t.menuBadges.value.get(e) : Te.value.get(e);
|
|
631
|
+
}
|
|
632
|
+
function Hl(e) {
|
|
633
|
+
Te.value.delete(e), se.broadcast((t) => {
|
|
634
|
+
t.menuBadges.value.delete(e);
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
function Gl() {
|
|
638
|
+
return se.getFirstInstance()?.menuBadges ?? Te;
|
|
639
|
+
}
|
|
640
|
+
const Ze = 1 / 0, Gn = 1 / 0;
|
|
641
|
+
function ot(e, t) {
|
|
642
|
+
return Ne(e) === Ne(t);
|
|
643
|
+
}
|
|
644
|
+
function Jn(e) {
|
|
645
|
+
return e.groupConfig ? {
|
|
646
|
+
groupId: e.groupConfig.id,
|
|
647
|
+
groupTitle: e.groupConfig.title || e.groupConfig.id,
|
|
648
|
+
groupIcon: e.groupConfig.icon,
|
|
649
|
+
groupPriority: e.groupConfig.priority,
|
|
650
|
+
groupPermissions: e.groupConfig.permissions
|
|
651
|
+
} : {
|
|
652
|
+
groupId: "group_" + fn(e.group),
|
|
653
|
+
groupTitle: e.group,
|
|
654
|
+
groupIcon: e.groupIcon,
|
|
655
|
+
groupPriority: e.priority,
|
|
656
|
+
groupPermissions: void 0
|
|
657
|
+
};
|
|
658
|
+
}
|
|
659
|
+
function Yn(e, t) {
|
|
660
|
+
return (e.priority ?? Ze) - (t.priority ?? Ze);
|
|
661
|
+
}
|
|
662
|
+
function Xn(e, t) {
|
|
663
|
+
const n = (a) => a.inGroupPriority ?? a.priority ?? Gn;
|
|
664
|
+
return n(e) - n(t);
|
|
665
|
+
}
|
|
666
|
+
function Zn(e, t) {
|
|
667
|
+
const n = Jn(e), a = {
|
|
668
|
+
...St(e, ["group", "groupIcon", "groupPriority", "groupConfig"])
|
|
669
|
+
}, l = t.get(n.groupId);
|
|
670
|
+
if (l) {
|
|
671
|
+
const r = [...l.children ?? []], o = r.findIndex((s) => ot(s, a));
|
|
672
|
+
o > -1 ? r[o] = a : r.push(a), t.set(n.groupId, {
|
|
673
|
+
...l,
|
|
674
|
+
children: r,
|
|
675
|
+
...e.groupConfig?.title && { title: e.groupConfig.title },
|
|
676
|
+
...e.groupConfig?.icon !== void 0 && { groupIcon: e.groupConfig.icon },
|
|
677
|
+
...e.groupConfig?.priority !== void 0 && { priority: e.groupConfig.priority },
|
|
678
|
+
...e.groupConfig?.permissions !== void 0 && { permissions: e.groupConfig.permissions }
|
|
679
|
+
});
|
|
680
|
+
} else
|
|
681
|
+
t.set(n.groupId, {
|
|
682
|
+
groupId: n.groupId,
|
|
683
|
+
groupIcon: n.groupIcon ?? "",
|
|
684
|
+
title: n.groupTitle,
|
|
685
|
+
children: [a],
|
|
686
|
+
priority: n.groupPriority ?? e.priority ?? Ze,
|
|
687
|
+
permissions: n.groupPermissions
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
function ft(e) {
|
|
691
|
+
const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
692
|
+
for (const a of e)
|
|
693
|
+
a.group || a.groupConfig ? Zn(a, t) : a.title && n.set(Ne(a), { ...a });
|
|
694
|
+
return Qn([...t.values(), ...n.values()]);
|
|
695
|
+
}
|
|
696
|
+
function Qn(e) {
|
|
697
|
+
return e.map(
|
|
698
|
+
(t) => ({
|
|
699
|
+
...t,
|
|
700
|
+
children: t.children ? [...t.children].sort(Xn) : void 0
|
|
701
|
+
})
|
|
702
|
+
).sort(Yn);
|
|
703
|
+
}
|
|
704
|
+
function _n() {
|
|
705
|
+
const e = S([]);
|
|
706
|
+
let t = [];
|
|
707
|
+
const n = S(new Map(Te.value));
|
|
708
|
+
function a(o) {
|
|
709
|
+
t.push(o), e.value = ft(t);
|
|
710
|
+
}
|
|
711
|
+
function l(o) {
|
|
712
|
+
const s = t.length;
|
|
713
|
+
t = t.filter((u) => !ot(u, o)), t.length !== s && (e.value = ft(t));
|
|
714
|
+
}
|
|
715
|
+
const r = {
|
|
716
|
+
addMenuItem: a,
|
|
717
|
+
menuItems: e,
|
|
718
|
+
removeMenuItem: l,
|
|
719
|
+
menuBadges: n
|
|
720
|
+
};
|
|
721
|
+
return se.replayInto(r), r;
|
|
722
|
+
}
|
|
723
|
+
function Pe(e) {
|
|
724
|
+
const { key: t, create: n, bus: a, name: l, onMissing: r } = e;
|
|
725
|
+
function o() {
|
|
726
|
+
const u = U(t, null);
|
|
727
|
+
if (u)
|
|
728
|
+
return u;
|
|
729
|
+
const f = n();
|
|
730
|
+
return mt(t, f), jt() && Ht(() => a.dispose(f)), f;
|
|
731
|
+
}
|
|
732
|
+
function s() {
|
|
733
|
+
const u = U(t, null);
|
|
734
|
+
if (!u)
|
|
735
|
+
throw r?.(), new Bn(l);
|
|
736
|
+
return u;
|
|
737
|
+
}
|
|
738
|
+
return {
|
|
739
|
+
provide: o,
|
|
740
|
+
use: s
|
|
741
|
+
};
|
|
742
|
+
}
|
|
743
|
+
const ea = ce("use-menu-service"), Lt = Pe({
|
|
744
|
+
key: _t,
|
|
745
|
+
create: _n,
|
|
746
|
+
bus: se,
|
|
747
|
+
name: "MenuService",
|
|
748
|
+
onMissing: () => ea.error("Menu service not found in current context. Injection chain:", Fe())
|
|
749
|
+
});
|
|
750
|
+
function Jl() {
|
|
751
|
+
return Lt.provide();
|
|
752
|
+
}
|
|
753
|
+
function Yl() {
|
|
754
|
+
return Lt.use();
|
|
755
|
+
}
|
|
756
|
+
function ta() {
|
|
757
|
+
return {
|
|
758
|
+
isMobile: U(on, S(!1)),
|
|
759
|
+
isDesktop: U(an, S(!0)),
|
|
760
|
+
isPhone: U(nn, S(!1)),
|
|
761
|
+
isTablet: U(tn, S(!1)),
|
|
762
|
+
isTouch: U(en, !1)
|
|
763
|
+
};
|
|
764
|
+
}
|
|
765
|
+
const na = Symbol("AppInsightsOptions"), aa = Symbol("AppInsightsInstance");
|
|
766
|
+
function oa() {
|
|
767
|
+
const e = U(aa, null), { user: t } = at(), n = U(na, void 0);
|
|
768
|
+
function a() {
|
|
769
|
+
const l = n?.appName ? `[${n.appName}] ` : "", r = (u) => `${l}${u.name}`;
|
|
770
|
+
function o(u) {
|
|
771
|
+
if (!e) return;
|
|
772
|
+
const f = r(u);
|
|
773
|
+
e.context.telemetryTrace.traceID = vn(), e.context.telemetryTrace.name = u.name, e.startTrackPage(f);
|
|
774
|
+
}
|
|
775
|
+
function s(u) {
|
|
776
|
+
if (!e) return;
|
|
777
|
+
const f = r(u), m = location.protocol + "//" + location.host + u.fullPath;
|
|
778
|
+
e.stopTrackPage(f, m, {
|
|
779
|
+
userId: t.value?.id ?? "",
|
|
780
|
+
userName: t.value?.userName ?? ""
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
return {
|
|
784
|
+
beforeEach: o,
|
|
785
|
+
afterEach: s
|
|
786
|
+
};
|
|
787
|
+
}
|
|
788
|
+
return {
|
|
789
|
+
setupPageTracking: a(),
|
|
790
|
+
appInsights: e
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
const la = ce("use-error-handler");
|
|
794
|
+
function ia(e) {
|
|
795
|
+
const t = S(null), n = Fe(), { appInsights: a } = oa(), { user: l } = at(), r = S(!1);
|
|
796
|
+
function o() {
|
|
797
|
+
t.value = null, n && n.emit("reset");
|
|
798
|
+
}
|
|
799
|
+
return Gt((s) => {
|
|
800
|
+
if (r.value)
|
|
801
|
+
return !e;
|
|
802
|
+
r.value = !0;
|
|
803
|
+
const u = Ae(s);
|
|
804
|
+
return t.value = u, a && a.trackException({
|
|
805
|
+
exception: u,
|
|
806
|
+
properties: {
|
|
807
|
+
userId: l.value?.id ?? "",
|
|
808
|
+
userName: l.value?.userName ?? ""
|
|
809
|
+
}
|
|
810
|
+
}), la.error("Captured Error:", u.originalError), n && n.emit("error", u), ye(() => {
|
|
811
|
+
r.value = !1;
|
|
812
|
+
}), !e;
|
|
813
|
+
}), {
|
|
814
|
+
error: t,
|
|
815
|
+
reset: o
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
const Ve = /* @__PURE__ */ new WeakMap();
|
|
819
|
+
function Xl(e, t, n) {
|
|
820
|
+
Ve.set(e, { timerId: t, notifId: n });
|
|
821
|
+
}
|
|
822
|
+
function ra(e) {
|
|
823
|
+
if (e && typeof e == "object") {
|
|
824
|
+
const t = Ve.get(e), n = "originalError" in e && e.originalError && typeof e.originalError == "object" ? e.originalError : void 0, a = t ?? (n ? Ve.get(n) : void 0), l = t ? e : n;
|
|
825
|
+
if (a && l)
|
|
826
|
+
return clearTimeout(a.timerId), Promise.resolve().then(() => Nn).then(({ notification: r }) => {
|
|
827
|
+
r.remove(a.notifId);
|
|
828
|
+
}), Ve.delete(l), !0;
|
|
829
|
+
}
|
|
830
|
+
return !1;
|
|
831
|
+
}
|
|
832
|
+
const Zl = G({
|
|
833
|
+
name: "ErrorInterceptor",
|
|
834
|
+
props: {
|
|
835
|
+
capture: {
|
|
836
|
+
default: !1,
|
|
837
|
+
type: Boolean
|
|
838
|
+
}
|
|
839
|
+
},
|
|
840
|
+
emits: {
|
|
841
|
+
error(e) {
|
|
842
|
+
return e && e instanceof Error || typeof e == "string";
|
|
843
|
+
},
|
|
844
|
+
reset() {
|
|
845
|
+
return !0;
|
|
846
|
+
}
|
|
847
|
+
},
|
|
848
|
+
setup(e, { slots: t }) {
|
|
849
|
+
const n = U(It, void 0), a = U(ln, void 0), l = !!(n && a), { error: r, reset: o } = ia(l || e.capture);
|
|
850
|
+
return l && X(r, (s) => {
|
|
851
|
+
const u = n.value.id;
|
|
852
|
+
if (s) {
|
|
853
|
+
if (ra(s), rn())
|
|
854
|
+
return;
|
|
855
|
+
a.setBladeError(u, s);
|
|
856
|
+
} else
|
|
857
|
+
a.clearBladeError(u);
|
|
858
|
+
}), () => t.default?.({
|
|
859
|
+
error: r.value,
|
|
860
|
+
reset: o
|
|
861
|
+
});
|
|
862
|
+
}
|
|
863
|
+
}), sa = Symbol("vc-button-group"), ua = ["type", "disabled", "aria-label", "aria-busy", "aria-pressed"], ca = {
|
|
864
|
+
key: 2,
|
|
865
|
+
class: "vc-button__title"
|
|
866
|
+
}, da = /* @__PURE__ */ G({
|
|
867
|
+
__name: "vc-button",
|
|
868
|
+
props: {
|
|
869
|
+
icon: {},
|
|
870
|
+
iconClass: {},
|
|
871
|
+
iconSize: { default: "s" },
|
|
872
|
+
variant: { default: "primary" },
|
|
873
|
+
disabled: { type: Boolean },
|
|
874
|
+
size: { default: "default" },
|
|
875
|
+
selected: { type: Boolean },
|
|
876
|
+
text: { type: Boolean },
|
|
877
|
+
type: { default: "button" },
|
|
878
|
+
loading: { type: Boolean, default: !1 },
|
|
879
|
+
ariaLabel: {}
|
|
880
|
+
},
|
|
881
|
+
emits: ["click"],
|
|
882
|
+
setup(e, { emit: t }) {
|
|
883
|
+
const n = {
|
|
884
|
+
base: "default",
|
|
885
|
+
xs: "sm"
|
|
886
|
+
}, a = e, l = he(), r = t, o = U(sa, null), s = C(() => {
|
|
887
|
+
const m = o?.size?.value ?? a.size;
|
|
888
|
+
return n[m] ?? m;
|
|
889
|
+
}), u = C(() => [
|
|
890
|
+
"vc-button",
|
|
891
|
+
{
|
|
892
|
+
[`vc-button-${a.variant}`]: a.variant,
|
|
893
|
+
[`vc-button--${s.value}`]: s.value,
|
|
894
|
+
"vc-button--selected": a.selected,
|
|
895
|
+
"vc-button--text": a.text,
|
|
896
|
+
"vc-button--disabled": a.disabled || a.loading,
|
|
897
|
+
"vc-button--loading": a.loading
|
|
898
|
+
}
|
|
899
|
+
]);
|
|
900
|
+
function f(m) {
|
|
901
|
+
!a.disabled && !a.loading && (m.preventDefault(), r("click", m));
|
|
902
|
+
}
|
|
903
|
+
return (m, v) => i(l) ? w("", !0) : (g(), h("button", {
|
|
904
|
+
key: 0,
|
|
905
|
+
class: Z(u.value),
|
|
906
|
+
type: e.type,
|
|
907
|
+
disabled: e.disabled || e.loading,
|
|
908
|
+
"aria-label": e.ariaLabel,
|
|
909
|
+
"aria-busy": e.loading || void 0,
|
|
910
|
+
"aria-pressed": e.selected || void 0,
|
|
911
|
+
onClick: f
|
|
912
|
+
}, [
|
|
913
|
+
e.loading ? (g(), P(i(W), {
|
|
914
|
+
key: 0,
|
|
915
|
+
icon: "lucide-loader-2",
|
|
916
|
+
class: "vc-button__icon tw-animate-spin",
|
|
917
|
+
size: e.iconSize
|
|
918
|
+
}, null, 8, ["size"])) : e.icon ? (g(), P(i(W), {
|
|
919
|
+
key: 1,
|
|
920
|
+
class: Z(["vc-button--icon", e.iconClass]),
|
|
921
|
+
icon: e.icon,
|
|
922
|
+
size: e.iconSize
|
|
923
|
+
}, null, 8, ["class", "icon", "size"])) : w("", !0),
|
|
924
|
+
m.$slots.default ? (g(), h("span", ca, [
|
|
925
|
+
B(m.$slots, "default")
|
|
926
|
+
])) : w("", !0)
|
|
927
|
+
], 10, ua));
|
|
928
|
+
}
|
|
929
|
+
}), lt = we({
|
|
930
|
+
name: "toolbar-service",
|
|
931
|
+
getKey: (e) => `${e.bladeId.toLowerCase()}::${e.toolbarItem.id}`,
|
|
932
|
+
registerIntoService: (e, t) => e.registerToolbarItem(t.toolbarItem, t.bladeId)
|
|
933
|
+
});
|
|
934
|
+
function Ql(e, t) {
|
|
935
|
+
const n = t.toLowerCase();
|
|
936
|
+
lt.preregister({
|
|
937
|
+
bladeId: n,
|
|
938
|
+
toolbarItem: e
|
|
939
|
+
});
|
|
940
|
+
}
|
|
941
|
+
function Rt() {
|
|
942
|
+
const e = Ct({
|
|
943
|
+
createRegistration: (s, u) => ({ bladeId: s, toolbarItem: u }),
|
|
944
|
+
getRegistrationBladeId: (s) => s.bladeId,
|
|
945
|
+
getRegistrationItemId: (s) => s.toolbarItem.id
|
|
946
|
+
}), t = (s, u) => {
|
|
947
|
+
e.register(s, u);
|
|
948
|
+
}, n = (s, u) => {
|
|
949
|
+
e.unregister(s, u);
|
|
950
|
+
}, a = (s) => {
|
|
951
|
+
const u = s ? s.toLowerCase() : "", f = e.get(u), m = e.get("*"), v = [...f], d = new Set(v.map((c) => c.id));
|
|
952
|
+
return m.forEach((c) => {
|
|
953
|
+
d.has(c.id) || v.push(c);
|
|
954
|
+
}), [...v];
|
|
955
|
+
}, l = (s) => {
|
|
956
|
+
e.clear(s);
|
|
957
|
+
}, r = ({
|
|
958
|
+
id: s,
|
|
959
|
+
bladeId: u,
|
|
960
|
+
toolbarItem: f
|
|
961
|
+
}) => {
|
|
962
|
+
e.update(s, u, f);
|
|
963
|
+
}, o = {
|
|
964
|
+
registerToolbarItem: t,
|
|
965
|
+
unregisterToolbarItem: n,
|
|
966
|
+
getToolbarItems: a,
|
|
967
|
+
clearBladeToolbarItems: l,
|
|
968
|
+
registeredToolbarItems: e.registrations,
|
|
969
|
+
isToolbarItemRegistered: (s) => e.isRegistered(s),
|
|
970
|
+
updateToolbarItem: r
|
|
971
|
+
};
|
|
972
|
+
return lt.replayInto(o), o;
|
|
973
|
+
}
|
|
974
|
+
const fa = "fallback-blade-id";
|
|
975
|
+
let je = null;
|
|
976
|
+
const ga = Pe({
|
|
977
|
+
key: kt,
|
|
978
|
+
create: Rt,
|
|
979
|
+
bus: lt,
|
|
980
|
+
name: "ToolbarService"
|
|
981
|
+
});
|
|
982
|
+
function _l() {
|
|
983
|
+
return ga.provide();
|
|
984
|
+
}
|
|
985
|
+
function ei(e = {}) {
|
|
986
|
+
const { autoCleanup: t = !0 } = e, n = U(kt, null);
|
|
987
|
+
!n && !je && (je = Rt());
|
|
988
|
+
const a = n || je;
|
|
989
|
+
if (!a)
|
|
990
|
+
throw new Error("Toolbar service is not available");
|
|
991
|
+
const l = U(It, void 0), r = C(() => l?.value?.id ?? fa), o = (c) => c ?? r.value, s = (c, y) => {
|
|
992
|
+
a.registerToolbarItem(c, o(y));
|
|
993
|
+
}, u = (c, y) => {
|
|
994
|
+
a.unregisterToolbarItem(c, o(y));
|
|
995
|
+
}, f = (c, y, b) => {
|
|
996
|
+
a.updateToolbarItem({ id: c, bladeId: o(b), toolbarItem: y });
|
|
997
|
+
}, m = (c) => a.getToolbarItems(o(c)), v = (c) => {
|
|
998
|
+
a.clearBladeToolbarItems(o(c));
|
|
999
|
+
};
|
|
1000
|
+
return Fe() && t && Qe(() => {
|
|
1001
|
+
v();
|
|
1002
|
+
}), {
|
|
1003
|
+
registerToolbarItem: s,
|
|
1004
|
+
unregisterToolbarItem: u,
|
|
1005
|
+
updateToolbarItem: f,
|
|
1006
|
+
getToolbarItems: m,
|
|
1007
|
+
clearBladeToolbarItems: v,
|
|
1008
|
+
isToolbarItemRegistered: a.isToolbarItemRegistered,
|
|
1009
|
+
registeredToolbarItems: a.registeredToolbarItems
|
|
1010
|
+
};
|
|
1011
|
+
}
|
|
1012
|
+
const va = ["aria-label"], pa = { class: "tw-sr-only" }, ma = ["aria-label"], ya = { class: "tw-sr-only" }, oe = /* @__PURE__ */ G({
|
|
1013
|
+
__name: "vc-skeleton",
|
|
1014
|
+
props: {
|
|
1015
|
+
variant: { default: "text" },
|
|
1016
|
+
rows: { default: 1 },
|
|
1017
|
+
width: {},
|
|
1018
|
+
height: {},
|
|
1019
|
+
animated: { type: Boolean, default: !0 },
|
|
1020
|
+
ariaLabel: { default: "Loading..." }
|
|
1021
|
+
},
|
|
1022
|
+
setup(e) {
|
|
1023
|
+
const t = e;
|
|
1024
|
+
function n(l) {
|
|
1025
|
+
return l === t.rows ? "60%" : "100%";
|
|
1026
|
+
}
|
|
1027
|
+
function a(l) {
|
|
1028
|
+
if (l !== void 0)
|
|
1029
|
+
return typeof l == "number" ? `${l}px` : l;
|
|
1030
|
+
}
|
|
1031
|
+
return (l, r) => e.variant === "text" ? (g(), h("div", {
|
|
1032
|
+
key: 0,
|
|
1033
|
+
class: Z(["vc-skeleton", {
|
|
1034
|
+
"vc-skeleton--animated": e.animated
|
|
1035
|
+
}]),
|
|
1036
|
+
role: "status",
|
|
1037
|
+
"aria-busy": "true",
|
|
1038
|
+
"aria-label": e.ariaLabel
|
|
1039
|
+
}, [
|
|
1040
|
+
L("span", pa, N(e.ariaLabel), 1),
|
|
1041
|
+
(g(!0), h(ke, null, _e(e.rows, (o) => (g(), h("div", {
|
|
1042
|
+
key: o,
|
|
1043
|
+
class: "vc-skeleton__row",
|
|
1044
|
+
style: De({
|
|
1045
|
+
width: n(o)
|
|
1046
|
+
}),
|
|
1047
|
+
"aria-hidden": "true"
|
|
1048
|
+
}, null, 4))), 128))
|
|
1049
|
+
], 10, va)) : (g(), h("div", {
|
|
1050
|
+
key: 1,
|
|
1051
|
+
class: Z(["vc-skeleton__shape", [`vc-skeleton__shape--${e.variant}`, { "tw-animate-pulse": e.animated }]]),
|
|
1052
|
+
style: De({
|
|
1053
|
+
width: a(e.width),
|
|
1054
|
+
height: a(e.height)
|
|
1055
|
+
}),
|
|
1056
|
+
role: "status",
|
|
1057
|
+
"aria-busy": "true",
|
|
1058
|
+
"aria-label": e.ariaLabel
|
|
1059
|
+
}, [
|
|
1060
|
+
L("span", ya, N(e.ariaLabel), 1)
|
|
1061
|
+
], 14, ma));
|
|
1062
|
+
}
|
|
1063
|
+
}), ti = /* @__PURE__ */ G({
|
|
1064
|
+
__name: "vc-container",
|
|
1065
|
+
props: {
|
|
1066
|
+
shadow: { type: Boolean },
|
|
1067
|
+
noPadding: { type: Boolean },
|
|
1068
|
+
ariaLabel: {}
|
|
1069
|
+
},
|
|
1070
|
+
emits: ["scroll"],
|
|
1071
|
+
setup(e, { expose: t, emit: n }) {
|
|
1072
|
+
const a = n, l = S(), r = S(!1), o = () => {
|
|
1073
|
+
l.value && l.value.scroll(0, 0);
|
|
1074
|
+
};
|
|
1075
|
+
function s(u) {
|
|
1076
|
+
a("scroll", u);
|
|
1077
|
+
}
|
|
1078
|
+
return wt(l, () => {
|
|
1079
|
+
r.value = !!(l.value && l.value.clientHeight < l.value.scrollHeight);
|
|
1080
|
+
}), t({
|
|
1081
|
+
scrollTop: o,
|
|
1082
|
+
component: l
|
|
1083
|
+
}), (u, f) => (g(), P(yt(e.ariaLabel ? "section" : "div"), {
|
|
1084
|
+
class: Z([
|
|
1085
|
+
"vc-container",
|
|
1086
|
+
{
|
|
1087
|
+
"vc-container--shadow": e.shadow && r.value,
|
|
1088
|
+
"vc-container--nopadding": e.noPadding
|
|
1089
|
+
}
|
|
1090
|
+
]),
|
|
1091
|
+
"aria-label": e.ariaLabel
|
|
1092
|
+
}, {
|
|
1093
|
+
default: E(() => [
|
|
1094
|
+
L("div", {
|
|
1095
|
+
ref_key: "component",
|
|
1096
|
+
ref: l,
|
|
1097
|
+
class: "vc-container__inner",
|
|
1098
|
+
tabindex: "0",
|
|
1099
|
+
onScroll: s
|
|
1100
|
+
}, [
|
|
1101
|
+
B(u.$slots, "default")
|
|
1102
|
+
], 544)
|
|
1103
|
+
]),
|
|
1104
|
+
_: 3
|
|
1105
|
+
}, 8, ["class", "aria-label"]));
|
|
1106
|
+
}
|
|
1107
|
+
}), ba = ["id", "role"], ha = /* @__PURE__ */ G({
|
|
1108
|
+
__name: "vc-hint",
|
|
1109
|
+
props: {
|
|
1110
|
+
id: {},
|
|
1111
|
+
error: { type: Boolean }
|
|
1112
|
+
},
|
|
1113
|
+
setup(e) {
|
|
1114
|
+
return (t, n) => (g(), h("div", {
|
|
1115
|
+
id: e.id,
|
|
1116
|
+
class: Z(["vc-hint", {
|
|
1117
|
+
"vc-hint--error": e.error
|
|
1118
|
+
}]),
|
|
1119
|
+
role: e.error ? "alert" : void 0
|
|
1120
|
+
}, [
|
|
1121
|
+
B(t.$slots, "default")
|
|
1122
|
+
], 10, ba));
|
|
1123
|
+
}
|
|
1124
|
+
}), ue = ha, Ia = { class: "vc-label__text" }, ka = { class: "vc-label__content" }, Sa = {
|
|
1125
|
+
key: 0,
|
|
1126
|
+
class: "vc-label__required",
|
|
1127
|
+
"aria-hidden": "true"
|
|
1128
|
+
}, wa = {
|
|
1129
|
+
key: 0,
|
|
1130
|
+
class: "vc-label__tooltip"
|
|
1131
|
+
}, $a = {
|
|
1132
|
+
key: 1,
|
|
1133
|
+
class: "vc-label__language"
|
|
1134
|
+
}, qe = /* @__PURE__ */ G({
|
|
1135
|
+
__name: "vc-label",
|
|
1136
|
+
props: {
|
|
1137
|
+
required: { type: Boolean },
|
|
1138
|
+
tooltipIcon: { default: "lucide-info" },
|
|
1139
|
+
multilanguage: { type: Boolean },
|
|
1140
|
+
currentLanguage: {},
|
|
1141
|
+
error: { type: Boolean },
|
|
1142
|
+
htmlFor: {}
|
|
1143
|
+
},
|
|
1144
|
+
setup(e) {
|
|
1145
|
+
return (t, n) => (g(), P(yt(e.htmlFor ? "label" : "div"), {
|
|
1146
|
+
class: Z(["vc-label", {
|
|
1147
|
+
"vc-label--error": e.error
|
|
1148
|
+
}]),
|
|
1149
|
+
for: e.htmlFor || void 0
|
|
1150
|
+
}, {
|
|
1151
|
+
default: E(() => [
|
|
1152
|
+
L("div", Ia, [
|
|
1153
|
+
L("span", ka, [
|
|
1154
|
+
B(t.$slots, "default")
|
|
1155
|
+
]),
|
|
1156
|
+
e.required ? (g(), h("span", Sa, "*")) : w("", !0)
|
|
1157
|
+
]),
|
|
1158
|
+
t.$slots.tooltip ? (g(), h("span", wa, [
|
|
1159
|
+
T(i(sn), { placement: "top-start" }, {
|
|
1160
|
+
tooltip: E(() => [
|
|
1161
|
+
B(t.$slots, "tooltip")
|
|
1162
|
+
]),
|
|
1163
|
+
default: E(() => [
|
|
1164
|
+
T(i(W), {
|
|
1165
|
+
class: "vc-label__tooltip-icon",
|
|
1166
|
+
icon: e.tooltipIcon,
|
|
1167
|
+
size: "s"
|
|
1168
|
+
}, null, 8, ["icon"])
|
|
1169
|
+
]),
|
|
1170
|
+
_: 3
|
|
1171
|
+
})
|
|
1172
|
+
])) : w("", !0),
|
|
1173
|
+
e.multilanguage ? (g(), h("div", $a, N(e.currentLanguage), 1)) : w("", !0)
|
|
1174
|
+
]),
|
|
1175
|
+
_: 3
|
|
1176
|
+
}, 8, ["class", "for"]));
|
|
1177
|
+
}
|
|
1178
|
+
}), Oa = ["aria-label"], gt = 40, Ea = /* @__PURE__ */ G({
|
|
1179
|
+
__name: "vc-scrollable-container",
|
|
1180
|
+
props: {
|
|
1181
|
+
speed: { default: void 0 }
|
|
1182
|
+
},
|
|
1183
|
+
setup(e, { expose: t }) {
|
|
1184
|
+
const n = e, a = S(null), l = {};
|
|
1185
|
+
n.speed !== void 0 && (l.speed = n.speed);
|
|
1186
|
+
const { canScrollUp: r, canScrollDown: o, startScroll: s, stopScroll: u, updateScrollState: f } = Pn(
|
|
1187
|
+
a,
|
|
1188
|
+
l
|
|
1189
|
+
);
|
|
1190
|
+
function m(v) {
|
|
1191
|
+
if (!a.value) return;
|
|
1192
|
+
const d = v === "up" ? -gt : gt;
|
|
1193
|
+
a.value.scrollBy({ top: d, behavior: "smooth" });
|
|
1194
|
+
}
|
|
1195
|
+
return t({
|
|
1196
|
+
viewportRef: a,
|
|
1197
|
+
updateScrollState: f
|
|
1198
|
+
}), (v, d) => (g(), h("div", {
|
|
1199
|
+
class: "vc-scrollable-container",
|
|
1200
|
+
role: "region",
|
|
1201
|
+
"aria-label": v.$t("COMPONENTS.ATOMS.VC_SCROLLABLE_CONTAINER.LABEL")
|
|
1202
|
+
}, [
|
|
1203
|
+
L("div", {
|
|
1204
|
+
class: Z(["vc-scrollable-container__arrow", { "vc-scrollable-container__arrow--hidden": !i(r) }]),
|
|
1205
|
+
"aria-hidden": "true",
|
|
1206
|
+
onPointerenter: d[0] || (d[0] = (c) => i(s)("up")),
|
|
1207
|
+
onPointerleave: d[1] || (d[1] = //@ts-ignore
|
|
1208
|
+
(...c) => i(u) && i(u)(...c))
|
|
1209
|
+
}, [
|
|
1210
|
+
B(v.$slots, "arrow-up", {}, () => [
|
|
1211
|
+
T(i(W), {
|
|
1212
|
+
icon: "lucide-chevron-up",
|
|
1213
|
+
size: "xs"
|
|
1214
|
+
})
|
|
1215
|
+
])
|
|
1216
|
+
], 34),
|
|
1217
|
+
L("div", {
|
|
1218
|
+
ref_key: "viewportRef",
|
|
1219
|
+
ref: a,
|
|
1220
|
+
class: "vc-scrollable-container__viewport",
|
|
1221
|
+
tabindex: "0",
|
|
1222
|
+
onScroll: d[2] || (d[2] = //@ts-ignore
|
|
1223
|
+
(...c) => i(f) && i(f)(...c)),
|
|
1224
|
+
onKeydown: [
|
|
1225
|
+
d[3] || (d[3] = _(Y((c) => m("up"), ["prevent"]), ["up"])),
|
|
1226
|
+
d[4] || (d[4] = _(Y((c) => m("down"), ["prevent"]), ["down"]))
|
|
1227
|
+
]
|
|
1228
|
+
}, [
|
|
1229
|
+
B(v.$slots, "default")
|
|
1230
|
+
], 544),
|
|
1231
|
+
L("div", {
|
|
1232
|
+
class: Z(["vc-scrollable-container__arrow", { "vc-scrollable-container__arrow--hidden": !i(o) }]),
|
|
1233
|
+
"aria-hidden": "true",
|
|
1234
|
+
onPointerenter: d[5] || (d[5] = (c) => i(s)("down")),
|
|
1235
|
+
onPointerleave: d[6] || (d[6] = //@ts-ignore
|
|
1236
|
+
(...c) => i(u) && i(u)(...c))
|
|
1237
|
+
}, [
|
|
1238
|
+
B(v.$slots, "arrow-down", {}, () => [
|
|
1239
|
+
T(i(W), {
|
|
1240
|
+
icon: "lucide-chevron-down",
|
|
1241
|
+
size: "xs"
|
|
1242
|
+
})
|
|
1243
|
+
])
|
|
1244
|
+
], 34)
|
|
1245
|
+
], 8, Oa));
|
|
1246
|
+
}
|
|
1247
|
+
}), it = /* @__PURE__ */ new Map();
|
|
1248
|
+
function Ca(e) {
|
|
1249
|
+
return e?.map((t) => t.toLowerCase());
|
|
1250
|
+
}
|
|
1251
|
+
function ni(e) {
|
|
1252
|
+
it.set(e.id, {
|
|
1253
|
+
...e,
|
|
1254
|
+
targetBlades: Ca(e.targetBlades)
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1257
|
+
function Ba(e) {
|
|
1258
|
+
const t = e.toLowerCase();
|
|
1259
|
+
return Array.from(it.values()).filter((n) => !n.targetBlades || n.targetBlades.includes(t)).map((n) => ({ ...n, targetBlades: n.targetBlades ? [...n.targetBlades] : void 0 }));
|
|
1260
|
+
}
|
|
1261
|
+
function La() {
|
|
1262
|
+
return Array.from(it.values()).map((e) => ({
|
|
1263
|
+
...e,
|
|
1264
|
+
targetBlades: e.targetBlades ? [...e.targetBlades] : void 0
|
|
1265
|
+
}));
|
|
1266
|
+
}
|
|
1267
|
+
function Ra(e) {
|
|
1268
|
+
return gn(e);
|
|
1269
|
+
}
|
|
1270
|
+
const xt = we({
|
|
1271
|
+
name: "widget-service",
|
|
1272
|
+
getKey: (e) => `${e.bladeId.toLowerCase()}::${e.widget.id}`,
|
|
1273
|
+
registerIntoService: (e, t) => e.registerWidget(t.widget, t.bladeId)
|
|
1274
|
+
});
|
|
1275
|
+
function ai(e, t) {
|
|
1276
|
+
const n = t.toLowerCase();
|
|
1277
|
+
xt.preregister({
|
|
1278
|
+
bladeId: n,
|
|
1279
|
+
widget: e
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1282
|
+
function oi() {
|
|
1283
|
+
const e = Ct({
|
|
1284
|
+
createRegistration: (a, l) => ({ bladeId: a, widget: l }),
|
|
1285
|
+
getRegistrationBladeId: (a) => a.bladeId,
|
|
1286
|
+
getRegistrationItemId: (a) => a.widget.id
|
|
1287
|
+
}), n = {
|
|
1288
|
+
registerWidget: (a, l) => e.register(a, l),
|
|
1289
|
+
unregisterWidget: (a, l) => e.unregister(a, l),
|
|
1290
|
+
getWidgets: (a) => e.get(a),
|
|
1291
|
+
updateWidget: ({ id: a, bladeId: l, widget: r }) => e.update(a, l, r),
|
|
1292
|
+
getExternalWidgetsForBlade: (a) => Ba(a.toLowerCase()),
|
|
1293
|
+
getAllExternalWidgets: La,
|
|
1294
|
+
cloneWidget: Ra
|
|
1295
|
+
};
|
|
1296
|
+
return xt.replayInto(n), n;
|
|
1297
|
+
}
|
|
1298
|
+
const xa = ce("use-theme"), ve = S([
|
|
1299
|
+
{ key: "light", localizationKey: "CORE.THEMES.LIGHT" },
|
|
1300
|
+
{ key: "dark", localizationKey: "CORE.THEMES.DARK" }
|
|
1301
|
+
]), li = hn(() => {
|
|
1302
|
+
const { t: e } = be.global;
|
|
1303
|
+
function t(f) {
|
|
1304
|
+
(Array.isArray(f) ? f : [f]).forEach((m) => {
|
|
1305
|
+
ve.value.some((v) => v.key === m.key) || ve.value.push(m);
|
|
1306
|
+
});
|
|
1307
|
+
}
|
|
1308
|
+
function n(f) {
|
|
1309
|
+
(Array.isArray(f) ? f : [f]).forEach((m) => {
|
|
1310
|
+
const v = ve.value.findIndex((d) => d.key === m);
|
|
1311
|
+
v >= 0 && ve.value.splice(v, 1);
|
|
1312
|
+
});
|
|
1313
|
+
}
|
|
1314
|
+
const a = C(() => ve.value.map((f) => f.key)), l = pn({
|
|
1315
|
+
attribute: "data-theme",
|
|
1316
|
+
emitAuto: !0,
|
|
1317
|
+
initialValue: "light",
|
|
1318
|
+
// Should align with a default theme in _themeRegistry
|
|
1319
|
+
modes: {
|
|
1320
|
+
// Dynamically build modes from registered theme keys
|
|
1321
|
+
...a.value.reduce(
|
|
1322
|
+
(f, m) => (f[m] = m, f),
|
|
1323
|
+
{}
|
|
1324
|
+
)
|
|
1325
|
+
}
|
|
1326
|
+
}), { state: r, next: o } = mn(a, { initialValue: l });
|
|
1327
|
+
He(() => {
|
|
1328
|
+
r.value && (l.value = r.value);
|
|
1329
|
+
});
|
|
1330
|
+
function s(f) {
|
|
1331
|
+
a.value.includes(f) ? r.value = f : xa.warn(`Attempted to set an unregistered theme: ${f}`);
|
|
1332
|
+
}
|
|
1333
|
+
const u = C(() => {
|
|
1334
|
+
const f = ve.value.find((m) => m.key === r.value);
|
|
1335
|
+
return f ? f.localizationKey ? e(f.localizationKey) : We(f.key) : r.value ? We(r.value) : "";
|
|
1336
|
+
});
|
|
1337
|
+
return {
|
|
1338
|
+
themes: C(
|
|
1339
|
+
() => ve.value.map((f) => ({
|
|
1340
|
+
key: f.key,
|
|
1341
|
+
name: f.localizationKey ? e(f.localizationKey) : We(f.key)
|
|
1342
|
+
}))
|
|
1343
|
+
),
|
|
1344
|
+
currentThemeKey: r,
|
|
1345
|
+
currentLocalizedName: u,
|
|
1346
|
+
next: o,
|
|
1347
|
+
register: t,
|
|
1348
|
+
unregister: n,
|
|
1349
|
+
setTheme: s
|
|
1350
|
+
};
|
|
1351
|
+
}), rt = we({
|
|
1352
|
+
name: "dashboard-service",
|
|
1353
|
+
getKey: (e) => e.id,
|
|
1354
|
+
registerIntoService: (e, t) => e.registerWidget(t)
|
|
1355
|
+
});
|
|
1356
|
+
function ii(e) {
|
|
1357
|
+
rt.preregister(e);
|
|
1358
|
+
}
|
|
1359
|
+
const Ta = () => ({
|
|
1360
|
+
widgets: Ge(/* @__PURE__ */ new Map()),
|
|
1361
|
+
layout: Ge(/* @__PURE__ */ new Map())
|
|
1362
|
+
});
|
|
1363
|
+
function Ma(e = {}) {
|
|
1364
|
+
const t = Ta(), n = e.hasAccess ?? (() => !0), s = {
|
|
1365
|
+
registerWidget: (u) => {
|
|
1366
|
+
if (t.widgets.has(u.id))
|
|
1367
|
+
throw new Error(`Widget with id ${u.id} already registered`);
|
|
1368
|
+
t.widgets.set(u.id, {
|
|
1369
|
+
...u,
|
|
1370
|
+
permissions: u.permissions ? [...u.permissions] : void 0,
|
|
1371
|
+
position: u.position ? { ...u.position } : void 0,
|
|
1372
|
+
props: u.props ? { ...u.props } : void 0
|
|
1373
|
+
}), u.position && t.layout.set(u.id, { ...u.position });
|
|
1374
|
+
},
|
|
1375
|
+
getWidgets: () => Array.from(t.widgets.values()).filter((u) => !u.permissions || u.permissions.length === 0 || n(u.permissions)).map((u) => ({
|
|
1376
|
+
...u,
|
|
1377
|
+
permissions: u.permissions ? [...u.permissions] : void 0,
|
|
1378
|
+
position: u.position ? { ...u.position } : void 0,
|
|
1379
|
+
props: u.props ? { ...u.props } : void 0
|
|
1380
|
+
})),
|
|
1381
|
+
updateWidgetPosition: (u, f) => {
|
|
1382
|
+
if (!t.widgets.has(u))
|
|
1383
|
+
throw new Error(`Widget with id ${u} not found`);
|
|
1384
|
+
t.layout.set(u, { ...f });
|
|
1385
|
+
},
|
|
1386
|
+
getLayout: () => new Map(t.layout)
|
|
1387
|
+
};
|
|
1388
|
+
return rt.replayInto(s), s;
|
|
1389
|
+
}
|
|
1390
|
+
const vt = ce("use-dashboard"), Tt = Pe({
|
|
1391
|
+
key: un,
|
|
1392
|
+
bus: rt,
|
|
1393
|
+
name: "DashboardService",
|
|
1394
|
+
create: () => {
|
|
1395
|
+
let e = () => !0;
|
|
1396
|
+
try {
|
|
1397
|
+
const { hasAccess: t } = Vn();
|
|
1398
|
+
e = (n) => t(n);
|
|
1399
|
+
} catch (t) {
|
|
1400
|
+
vt.warn("Permissions composable unavailable, dashboard falls back to allow-all access check", t);
|
|
1401
|
+
}
|
|
1402
|
+
return Ma({
|
|
1403
|
+
hasAccess: e
|
|
1404
|
+
});
|
|
1405
|
+
},
|
|
1406
|
+
onMissing: () => vt.error("Dashboard service not found")
|
|
1407
|
+
});
|
|
1408
|
+
function ri() {
|
|
1409
|
+
return Tt.provide();
|
|
1410
|
+
}
|
|
1411
|
+
function si() {
|
|
1412
|
+
return Tt.use();
|
|
1413
|
+
}
|
|
1414
|
+
const Mt = we({
|
|
1415
|
+
name: "app-bar-menu-service",
|
|
1416
|
+
getKey: (e) => e.id || crypto.randomUUID(),
|
|
1417
|
+
registerIntoService: (e, t) => e.register(t),
|
|
1418
|
+
unregisterFromService: (e, t) => e.unregister(t)
|
|
1419
|
+
});
|
|
1420
|
+
function ui(e) {
|
|
1421
|
+
Mt.preregister(e);
|
|
1422
|
+
}
|
|
1423
|
+
function ci() {
|
|
1424
|
+
return Bt({
|
|
1425
|
+
bus: Mt,
|
|
1426
|
+
createItem: (e, t) => ({
|
|
1427
|
+
id: e.id || "",
|
|
1428
|
+
order: e.order ?? t,
|
|
1429
|
+
title: e.title,
|
|
1430
|
+
icon: typeof e.icon == "object" ? Je(e.icon) : e.icon,
|
|
1431
|
+
component: e.component ? Je(e.component) : void 0,
|
|
1432
|
+
props: e.props,
|
|
1433
|
+
onClick: e.onClick,
|
|
1434
|
+
slot: e.slot,
|
|
1435
|
+
badge: e.badge,
|
|
1436
|
+
searchTerms: e.searchTerms
|
|
1437
|
+
}),
|
|
1438
|
+
getId: (e) => e.id || ""
|
|
1439
|
+
});
|
|
1440
|
+
}
|
|
1441
|
+
const st = we({
|
|
1442
|
+
name: "settings-menu-service",
|
|
1443
|
+
getKey: (e) => e.id || crypto.randomUUID(),
|
|
1444
|
+
registerIntoService: (e, t) => e.register(t),
|
|
1445
|
+
unregisterFromService: (e, t) => e.unregister(t)
|
|
1446
|
+
});
|
|
1447
|
+
function di(e) {
|
|
1448
|
+
st.preregister(e);
|
|
1449
|
+
}
|
|
1450
|
+
function Aa() {
|
|
1451
|
+
return Bt({
|
|
1452
|
+
bus: st,
|
|
1453
|
+
createItem: (e, t) => ({
|
|
1454
|
+
id: e.id || "",
|
|
1455
|
+
order: e.order ?? t,
|
|
1456
|
+
group: e.group,
|
|
1457
|
+
component: Je(e.component),
|
|
1458
|
+
props: e.props
|
|
1459
|
+
}),
|
|
1460
|
+
getId: (e) => e.id || ""
|
|
1461
|
+
});
|
|
1462
|
+
}
|
|
1463
|
+
const Va = ce("use-settings-menu"), At = Pe({
|
|
1464
|
+
key: cn,
|
|
1465
|
+
create: Aa,
|
|
1466
|
+
bus: st,
|
|
1467
|
+
name: "SettingsMenuService",
|
|
1468
|
+
onMissing: () => Va.error("Settings menu service not found")
|
|
1469
|
+
});
|
|
1470
|
+
function fi() {
|
|
1471
|
+
return At.provide();
|
|
1472
|
+
}
|
|
1473
|
+
function gi() {
|
|
1474
|
+
return At.use();
|
|
1475
|
+
}
|
|
1476
|
+
const Da = {
|
|
1477
|
+
key: 0,
|
|
1478
|
+
class: "vc-date-picker vc-date-picker--skeleton"
|
|
1479
|
+
}, Na = { class: "vc-date-picker__field-container" }, Fa = { class: "vc-date-picker__field" }, za = ["aria-label"], Pa = {
|
|
1480
|
+
key: 0,
|
|
1481
|
+
class: "vc-date-picker__loading"
|
|
1482
|
+
}, qa = { key: 0 }, Ka = { key: 1 }, Ua = /* @__PURE__ */ G({
|
|
1483
|
+
__name: "vc-date-picker",
|
|
1484
|
+
props: {
|
|
1485
|
+
modelValue: {},
|
|
1486
|
+
type: { default: "date" },
|
|
1487
|
+
datePickerOptions: {},
|
|
1488
|
+
placeholder: {},
|
|
1489
|
+
hint: {},
|
|
1490
|
+
clearable: { type: Boolean },
|
|
1491
|
+
loading: { type: Boolean },
|
|
1492
|
+
autofocus: { type: Boolean },
|
|
1493
|
+
size: { default: "default" },
|
|
1494
|
+
multilanguage: { type: Boolean },
|
|
1495
|
+
currentLanguage: {},
|
|
1496
|
+
label: {},
|
|
1497
|
+
tooltip: {},
|
|
1498
|
+
disabled: { type: Boolean },
|
|
1499
|
+
required: { type: Boolean },
|
|
1500
|
+
name: { default: "Field" },
|
|
1501
|
+
error: { type: Boolean },
|
|
1502
|
+
errorMessage: {}
|
|
1503
|
+
},
|
|
1504
|
+
emits: ["update:modelValue", "blur", "focus"],
|
|
1505
|
+
setup(e, { emit: t }) {
|
|
1506
|
+
const n = e, a = t, l = he(), { isMobile: r, isDesktop: o } = ta(), { labelId: s, errorId: u, hintId: f, invalid: m, resolvedDisabled: v, ariaRequired: d, ariaDescribedBy: c } = ze(n), y = S(!1), b = window.navigator.language, O = S(n.modelValue), p = S(null), k = C(() => n.type === "date" && "9999-12-31" || void 0), V = (() => {
|
|
1507
|
+
const I = new Intl.DateTimeFormat(b, { hour: "numeric" }).format();
|
|
1508
|
+
return Number.isInteger(Number(I));
|
|
1509
|
+
})(), j = C(() => {
|
|
1510
|
+
const I = n.type === "datetime-local", R = new Intl.DateTimeFormat(b, {
|
|
1511
|
+
year: "numeric",
|
|
1512
|
+
month: "2-digit",
|
|
1513
|
+
day: "2-digit",
|
|
1514
|
+
...I ? { hour: "2-digit", minute: "2-digit", hour12: !V } : {}
|
|
1515
|
+
}).formatToParts(new Date(2e3, 0, 15, 13, 30)), q = {
|
|
1516
|
+
year: "yyyy",
|
|
1517
|
+
month: "MM",
|
|
1518
|
+
day: "dd",
|
|
1519
|
+
hour: V ? "HH" : "hh",
|
|
1520
|
+
minute: "mm",
|
|
1521
|
+
dayPeriod: "aa"
|
|
1522
|
+
};
|
|
1523
|
+
return R.map((te) => q[te.type] ?? te.value).join("");
|
|
1524
|
+
}), ne = C(() => {
|
|
1525
|
+
if (!n.datePickerOptions?.textInput) return n.datePickerOptions;
|
|
1526
|
+
const I = { ...n.datePickerOptions }, R = typeof I.textInput == "object" ? I.textInput : {};
|
|
1527
|
+
return I.textInput = {
|
|
1528
|
+
format: j.value,
|
|
1529
|
+
rangeSeparator: " - ",
|
|
1530
|
+
...R
|
|
1531
|
+
}, I;
|
|
1532
|
+
}), Q = (I) => {
|
|
1533
|
+
const R = {
|
|
1534
|
+
year: "numeric",
|
|
1535
|
+
month: "numeric",
|
|
1536
|
+
day: "numeric"
|
|
1537
|
+
};
|
|
1538
|
+
n.type === "datetime-local" && (R.hour = "numeric", R.minute = "numeric", R.hour12 = !V);
|
|
1539
|
+
const q = (te) => new Intl.DateTimeFormat(b, R).format(te);
|
|
1540
|
+
return Array.isArray(I) ? I.map((te) => te != null ? q(te) : "").join(" - ") : q(I);
|
|
1541
|
+
};
|
|
1542
|
+
X(
|
|
1543
|
+
() => n.modelValue,
|
|
1544
|
+
(I) => {
|
|
1545
|
+
O.value !== I && (O.value = I);
|
|
1546
|
+
}
|
|
1547
|
+
), X(O, (I, R) => {
|
|
1548
|
+
I !== R && I !== n.modelValue && (p.value = null, a("update:modelValue", I));
|
|
1549
|
+
});
|
|
1550
|
+
function D() {
|
|
1551
|
+
O.value = null, a("update:modelValue", null);
|
|
1552
|
+
}
|
|
1553
|
+
function A(I) {
|
|
1554
|
+
p.value = I;
|
|
1555
|
+
}
|
|
1556
|
+
function F() {
|
|
1557
|
+
p.value = null;
|
|
1558
|
+
}
|
|
1559
|
+
function K(I) {
|
|
1560
|
+
p.value != null && (O.value = [p.value, null], p.value = null), y.value = !1, a("blur", I);
|
|
1561
|
+
}
|
|
1562
|
+
function H() {
|
|
1563
|
+
y.value = !0, a("focus");
|
|
1564
|
+
}
|
|
1565
|
+
return (I, R) => i(l) ? (g(), h("div", Da, [
|
|
1566
|
+
e.label ? (g(), P(i(oe), {
|
|
1567
|
+
key: 0,
|
|
1568
|
+
variant: "block",
|
|
1569
|
+
width: 60 + (e.label?.length || 0) * 4,
|
|
1570
|
+
height: 11
|
|
1571
|
+
}, null, 8, ["width"])) : w("", !0),
|
|
1572
|
+
T(i(oe), {
|
|
1573
|
+
variant: "block",
|
|
1574
|
+
width: "100%",
|
|
1575
|
+
height: 36
|
|
1576
|
+
})
|
|
1577
|
+
])) : (g(), h("div", {
|
|
1578
|
+
key: 1,
|
|
1579
|
+
class: Z(["vc-date-picker", [
|
|
1580
|
+
{
|
|
1581
|
+
"vc-date-picker--error": i(m),
|
|
1582
|
+
"vc-date-picker--disabled": i(v),
|
|
1583
|
+
"vc-date-picker--focused": y.value
|
|
1584
|
+
}
|
|
1585
|
+
]])
|
|
1586
|
+
}, [
|
|
1587
|
+
e.label ? (g(), P(i(qe), {
|
|
1588
|
+
key: 0,
|
|
1589
|
+
id: i(s),
|
|
1590
|
+
class: "vc-date-picker__label",
|
|
1591
|
+
required: e.required,
|
|
1592
|
+
multilanguage: e.multilanguage,
|
|
1593
|
+
"current-language": e.currentLanguage,
|
|
1594
|
+
error: i(m)
|
|
1595
|
+
}, me({
|
|
1596
|
+
default: E(() => [
|
|
1597
|
+
L("span", null, N(e.label), 1)
|
|
1598
|
+
]),
|
|
1599
|
+
_: 2
|
|
1600
|
+
}, [
|
|
1601
|
+
e.tooltip ? {
|
|
1602
|
+
name: "tooltip",
|
|
1603
|
+
fn: E(() => [
|
|
1604
|
+
ee(N(e.tooltip), 1)
|
|
1605
|
+
]),
|
|
1606
|
+
key: "0"
|
|
1607
|
+
} : void 0
|
|
1608
|
+
]), 1032, ["id", "required", "multilanguage", "current-language", "error"])) : w("", !0),
|
|
1609
|
+
L("div", {
|
|
1610
|
+
class: Z(["vc-date-picker__field-wrapper", {
|
|
1611
|
+
"vc-date-picker__field-wrapper--default": e.size === "default",
|
|
1612
|
+
"vc-date-picker__field-wrapper--small": e.size === "small"
|
|
1613
|
+
}])
|
|
1614
|
+
}, [
|
|
1615
|
+
L("div", Na, [
|
|
1616
|
+
L("div", Fa, [
|
|
1617
|
+
T(i(Cn), ae({
|
|
1618
|
+
modelValue: O.value,
|
|
1619
|
+
"onUpdate:modelValue": R[0] || (R[0] = (q) => O.value = q),
|
|
1620
|
+
placeholder: e.placeholder || (e.type === "datetime-local" ? I.$t("COMPONENTS.MOLECULES.VC_INPUT.DATE_TIME_PLACEHOLDER") : I.$t("COMPONENTS.MOLECULES.VC_INPUT.DATE_PLACEHOLDER")),
|
|
1621
|
+
disabled: i(v),
|
|
1622
|
+
name: e.name,
|
|
1623
|
+
autofocus: e.autofocus,
|
|
1624
|
+
"max-date": k.value,
|
|
1625
|
+
"time-picker-inline": "",
|
|
1626
|
+
"enable-time-picker": e.type === "datetime-local",
|
|
1627
|
+
format: Q,
|
|
1628
|
+
locale: i(b),
|
|
1629
|
+
"start-time": { hours: 0, minutes: 0 },
|
|
1630
|
+
clearable: !1,
|
|
1631
|
+
config: { closeOnAutoApply: !1 },
|
|
1632
|
+
"auto-apply": "",
|
|
1633
|
+
"teleport-center": i(r),
|
|
1634
|
+
is24: i(V)
|
|
1635
|
+
}, ne.value, {
|
|
1636
|
+
teleport: i(o) ? "body" : void 0,
|
|
1637
|
+
"aria-invalid": i(m) || void 0,
|
|
1638
|
+
"aria-required": i(d),
|
|
1639
|
+
"aria-describedby": i(c),
|
|
1640
|
+
"aria-labelledby": e.label ? i(s) : void 0,
|
|
1641
|
+
class: "vc-date-picker__input",
|
|
1642
|
+
tabindex: "0",
|
|
1643
|
+
onFocus: H,
|
|
1644
|
+
onClosed: K,
|
|
1645
|
+
onRangeStart: A,
|
|
1646
|
+
onRangeEnd: F,
|
|
1647
|
+
onTooltipOpen: H,
|
|
1648
|
+
onTooltipClose: K
|
|
1649
|
+
}), null, 16, ["modelValue", "placeholder", "disabled", "name", "autofocus", "max-date", "enable-time-picker", "locale", "teleport-center", "is24", "teleport", "aria-invalid", "aria-required", "aria-describedby", "aria-labelledby"]),
|
|
1650
|
+
e.clearable && O.value && !e.disabled ? (g(), h("button", {
|
|
1651
|
+
key: 0,
|
|
1652
|
+
type: "button",
|
|
1653
|
+
class: "vc-date-picker__clear",
|
|
1654
|
+
"aria-label": I.$t("COMPONENTS.MOLECULES.VC_DATE_PICKER.CLEAR"),
|
|
1655
|
+
onClick: D
|
|
1656
|
+
}, [
|
|
1657
|
+
T(i(W), {
|
|
1658
|
+
size: "xs",
|
|
1659
|
+
icon: "lucide-x"
|
|
1660
|
+
})
|
|
1661
|
+
], 8, za)) : w("", !0)
|
|
1662
|
+
]),
|
|
1663
|
+
e.loading ? (g(), h("div", Pa, [
|
|
1664
|
+
T(i(W), {
|
|
1665
|
+
icon: "lucide-loader-2",
|
|
1666
|
+
class: "vc-date-picker__loading-icon",
|
|
1667
|
+
size: "m"
|
|
1668
|
+
})
|
|
1669
|
+
])) : w("", !0)
|
|
1670
|
+
])
|
|
1671
|
+
], 2),
|
|
1672
|
+
T(Re, {
|
|
1673
|
+
name: "slide-up",
|
|
1674
|
+
mode: "out-in"
|
|
1675
|
+
}, {
|
|
1676
|
+
default: E(() => [
|
|
1677
|
+
i(m) && e.errorMessage ? (g(), h("div", qa, [
|
|
1678
|
+
T(i(ue), {
|
|
1679
|
+
id: i(u),
|
|
1680
|
+
class: "vc-date-picker__hint-error",
|
|
1681
|
+
error: !0
|
|
1682
|
+
}, {
|
|
1683
|
+
default: E(() => [
|
|
1684
|
+
ee(N(e.errorMessage), 1)
|
|
1685
|
+
]),
|
|
1686
|
+
_: 1
|
|
1687
|
+
}, 8, ["id"])
|
|
1688
|
+
])) : (g(), h("div", Ka, [
|
|
1689
|
+
e.hint ? (g(), P(i(ue), {
|
|
1690
|
+
key: 0,
|
|
1691
|
+
id: i(f),
|
|
1692
|
+
class: "vc-date-picker__desc"
|
|
1693
|
+
}, {
|
|
1694
|
+
default: E(() => [
|
|
1695
|
+
ee(N(e.hint), 1)
|
|
1696
|
+
]),
|
|
1697
|
+
_: 1
|
|
1698
|
+
}, 8, ["id"])) : w("", !0)
|
|
1699
|
+
]))
|
|
1700
|
+
]),
|
|
1701
|
+
_: 1
|
|
1702
|
+
})
|
|
1703
|
+
], 2));
|
|
1704
|
+
}
|
|
1705
|
+
}), Wa = {
|
|
1706
|
+
key: 0,
|
|
1707
|
+
class: "vc-color-input vc-color-input--skeleton"
|
|
1708
|
+
}, ja = { class: "vc-color-input__field-container" }, Ha = { class: "vc-color-input__field" }, Ga = ["id", "placeholder", "disabled", "name", "autofocus", "aria-invalid", "aria-required", "aria-describedby", "aria-labelledby"], Ja = { class: "vc-color-input__color-container" }, Ya = ["aria-label"], Xa = ["value"], Za = ["aria-label"], Qa = {
|
|
1709
|
+
key: 0,
|
|
1710
|
+
class: "vc-color-input__loading"
|
|
1711
|
+
}, _a = { key: 0 }, eo = { key: 1 }, to = /* @__PURE__ */ G({
|
|
1712
|
+
__name: "vc-color-input",
|
|
1713
|
+
props: {
|
|
1714
|
+
modelValue: {},
|
|
1715
|
+
placeholder: {},
|
|
1716
|
+
hint: {},
|
|
1717
|
+
clearable: { type: Boolean },
|
|
1718
|
+
loading: { type: Boolean },
|
|
1719
|
+
autofocus: { type: Boolean },
|
|
1720
|
+
size: { default: "default" },
|
|
1721
|
+
multilanguage: { type: Boolean },
|
|
1722
|
+
currentLanguage: {},
|
|
1723
|
+
label: {},
|
|
1724
|
+
tooltip: {},
|
|
1725
|
+
disabled: { type: Boolean },
|
|
1726
|
+
required: { type: Boolean },
|
|
1727
|
+
name: { default: "Field" },
|
|
1728
|
+
error: { type: Boolean },
|
|
1729
|
+
errorMessage: {}
|
|
1730
|
+
},
|
|
1731
|
+
emits: ["update:modelValue", "blur", "focus"],
|
|
1732
|
+
setup(e, { expose: t, emit: n }) {
|
|
1733
|
+
const a = he(), l = e, r = n, {
|
|
1734
|
+
fieldId: o,
|
|
1735
|
+
labelId: s,
|
|
1736
|
+
errorId: u,
|
|
1737
|
+
hintId: f,
|
|
1738
|
+
invalid: m,
|
|
1739
|
+
resolvedDisabled: v,
|
|
1740
|
+
ariaRequired: d,
|
|
1741
|
+
ariaDescribedBy: c
|
|
1742
|
+
} = ze(l), y = S(!1), b = S(!1), O = S(), p = S(), k = S(l.modelValue ?? ""), V = S("");
|
|
1743
|
+
function j(I) {
|
|
1744
|
+
if (!I || typeof I != "string") {
|
|
1745
|
+
V.value = "";
|
|
1746
|
+
return;
|
|
1747
|
+
}
|
|
1748
|
+
const R = I.trim();
|
|
1749
|
+
if (Mn(R)) {
|
|
1750
|
+
V.value = dt(R);
|
|
1751
|
+
return;
|
|
1752
|
+
}
|
|
1753
|
+
const q = Tn(R);
|
|
1754
|
+
q && (V.value = q);
|
|
1755
|
+
}
|
|
1756
|
+
X(
|
|
1757
|
+
() => l.modelValue,
|
|
1758
|
+
(I) => {
|
|
1759
|
+
b.value || (b.value = !0, k.value = I ?? "", ye(() => {
|
|
1760
|
+
j(I ?? ""), b.value = !1;
|
|
1761
|
+
}));
|
|
1762
|
+
},
|
|
1763
|
+
{ immediate: !0 }
|
|
1764
|
+
), X(V, (I) => {
|
|
1765
|
+
I && p.value && (p.value.value = I);
|
|
1766
|
+
});
|
|
1767
|
+
function ne() {
|
|
1768
|
+
b.value || (b.value = !0, r("update:modelValue", k.value || null), ye(() => {
|
|
1769
|
+
j(k.value), b.value = !1;
|
|
1770
|
+
}));
|
|
1771
|
+
}
|
|
1772
|
+
function Q(I) {
|
|
1773
|
+
const R = I.target;
|
|
1774
|
+
if (R?.value) {
|
|
1775
|
+
const q = dt(R.value);
|
|
1776
|
+
V.value = q, k.value = q, r("update:modelValue", q);
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
function D() {
|
|
1780
|
+
p.value?.click();
|
|
1781
|
+
}
|
|
1782
|
+
function A() {
|
|
1783
|
+
k.value = "", V.value = "", r("update:modelValue", null);
|
|
1784
|
+
}
|
|
1785
|
+
function F(I) {
|
|
1786
|
+
y.value = !1, r("blur", I);
|
|
1787
|
+
}
|
|
1788
|
+
function K() {
|
|
1789
|
+
y.value = !0, r("focus");
|
|
1790
|
+
}
|
|
1791
|
+
function H() {
|
|
1792
|
+
O.value?.focus();
|
|
1793
|
+
}
|
|
1794
|
+
return t({ focus: H }), (I, R) => i(a) ? (g(), h("div", Wa, [
|
|
1795
|
+
e.label ? (g(), P(i(oe), {
|
|
1796
|
+
key: 0,
|
|
1797
|
+
variant: "block",
|
|
1798
|
+
width: 60 + (e.label?.length || 0) * 4,
|
|
1799
|
+
height: 11
|
|
1800
|
+
}, null, 8, ["width"])) : w("", !0),
|
|
1801
|
+
T(i(oe), {
|
|
1802
|
+
variant: "block",
|
|
1803
|
+
width: "100%",
|
|
1804
|
+
height: 36
|
|
1805
|
+
})
|
|
1806
|
+
])) : (g(), h("div", {
|
|
1807
|
+
key: 1,
|
|
1808
|
+
class: Z(["vc-color-input", [
|
|
1809
|
+
{
|
|
1810
|
+
"vc-color-input--error": i(m),
|
|
1811
|
+
"vc-color-input--disabled": i(v),
|
|
1812
|
+
"vc-color-input--focused": y.value
|
|
1813
|
+
}
|
|
1814
|
+
]])
|
|
1815
|
+
}, [
|
|
1816
|
+
e.label ? (g(), P(i(qe), {
|
|
1817
|
+
key: 0,
|
|
1818
|
+
id: i(s),
|
|
1819
|
+
"html-for": i(o),
|
|
1820
|
+
class: "vc-color-input__label",
|
|
1821
|
+
required: e.required,
|
|
1822
|
+
multilanguage: e.multilanguage,
|
|
1823
|
+
"current-language": e.currentLanguage,
|
|
1824
|
+
error: i(m)
|
|
1825
|
+
}, me({
|
|
1826
|
+
default: E(() => [
|
|
1827
|
+
L("span", null, N(e.label), 1)
|
|
1828
|
+
]),
|
|
1829
|
+
_: 2
|
|
1830
|
+
}, [
|
|
1831
|
+
e.tooltip ? {
|
|
1832
|
+
name: "tooltip",
|
|
1833
|
+
fn: E(() => [
|
|
1834
|
+
ee(N(e.tooltip), 1)
|
|
1835
|
+
]),
|
|
1836
|
+
key: "0"
|
|
1837
|
+
} : void 0
|
|
1838
|
+
]), 1032, ["id", "html-for", "required", "multilanguage", "current-language", "error"])) : w("", !0),
|
|
1839
|
+
L("div", {
|
|
1840
|
+
class: Z(["vc-color-input__field-wrapper", {
|
|
1841
|
+
"vc-color-input__field-wrapper--default": e.size === "default",
|
|
1842
|
+
"vc-color-input__field-wrapper--small": e.size === "small"
|
|
1843
|
+
}])
|
|
1844
|
+
}, [
|
|
1845
|
+
L("div", ja, [
|
|
1846
|
+
L("div", Ha, [
|
|
1847
|
+
et(L("input", {
|
|
1848
|
+
id: i(o),
|
|
1849
|
+
ref_key: "inputRef",
|
|
1850
|
+
ref: O,
|
|
1851
|
+
"onUpdate:modelValue": R[0] || (R[0] = (q) => k.value = q),
|
|
1852
|
+
placeholder: e.placeholder,
|
|
1853
|
+
type: "text",
|
|
1854
|
+
disabled: i(v),
|
|
1855
|
+
name: e.name,
|
|
1856
|
+
autofocus: e.autofocus,
|
|
1857
|
+
"aria-invalid": i(m) || void 0,
|
|
1858
|
+
"aria-required": i(d),
|
|
1859
|
+
"aria-describedby": i(c),
|
|
1860
|
+
"aria-labelledby": e.label ? i(s) : void 0,
|
|
1861
|
+
class: "vc-color-input__input",
|
|
1862
|
+
tabindex: "0",
|
|
1863
|
+
onBlur: F,
|
|
1864
|
+
onFocus: K,
|
|
1865
|
+
onInput: ne
|
|
1866
|
+
}, null, 40, Ga), [
|
|
1867
|
+
[Jt, k.value]
|
|
1868
|
+
]),
|
|
1869
|
+
L("div", Ja, [
|
|
1870
|
+
L("button", {
|
|
1871
|
+
type: "button",
|
|
1872
|
+
class: "vc-color-input__color-square",
|
|
1873
|
+
style: De({ backgroundColor: V.value || "#ffffff" }),
|
|
1874
|
+
"aria-label": `Pick color${V.value ? ": " + V.value : ""}`,
|
|
1875
|
+
onClick: D
|
|
1876
|
+
}, null, 12, Ya),
|
|
1877
|
+
L("input", {
|
|
1878
|
+
ref_key: "colorPickerRef",
|
|
1879
|
+
ref: p,
|
|
1880
|
+
type: "color",
|
|
1881
|
+
value: V.value,
|
|
1882
|
+
class: "vc-color-input__color-picker-hidden",
|
|
1883
|
+
tabindex: "-1",
|
|
1884
|
+
"aria-hidden": "true",
|
|
1885
|
+
onChange: Q
|
|
1886
|
+
}, null, 40, Xa)
|
|
1887
|
+
]),
|
|
1888
|
+
e.clearable && k.value && !e.disabled ? (g(), h("button", {
|
|
1889
|
+
key: 0,
|
|
1890
|
+
type: "button",
|
|
1891
|
+
class: "vc-color-input__clear",
|
|
1892
|
+
"aria-label": I.$t("COMPONENTS.MOLECULES.VC_COLOR_INPUT.CLEAR"),
|
|
1893
|
+
onClick: A
|
|
1894
|
+
}, [
|
|
1895
|
+
T(i(W), {
|
|
1896
|
+
size: "xs",
|
|
1897
|
+
icon: "lucide-x"
|
|
1898
|
+
})
|
|
1899
|
+
], 8, Za)) : w("", !0)
|
|
1900
|
+
]),
|
|
1901
|
+
e.loading ? (g(), h("div", Qa, [
|
|
1902
|
+
T(i(W), {
|
|
1903
|
+
icon: "lucide-loader-2",
|
|
1904
|
+
class: "vc-color-input__loading-icon",
|
|
1905
|
+
size: "m"
|
|
1906
|
+
})
|
|
1907
|
+
])) : w("", !0)
|
|
1908
|
+
])
|
|
1909
|
+
], 2),
|
|
1910
|
+
T(Re, {
|
|
1911
|
+
name: "slide-up",
|
|
1912
|
+
mode: "out-in"
|
|
1913
|
+
}, {
|
|
1914
|
+
default: E(() => [
|
|
1915
|
+
i(m) && e.errorMessage ? (g(), h("div", _a, [
|
|
1916
|
+
T(i(ue), {
|
|
1917
|
+
id: i(u),
|
|
1918
|
+
class: "vc-color-input__hint-error",
|
|
1919
|
+
error: !0
|
|
1920
|
+
}, {
|
|
1921
|
+
default: E(() => [
|
|
1922
|
+
ee(N(e.errorMessage), 1)
|
|
1923
|
+
]),
|
|
1924
|
+
_: 1
|
|
1925
|
+
}, 8, ["id"])
|
|
1926
|
+
])) : (g(), h("div", eo, [
|
|
1927
|
+
e.hint ? (g(), P(i(ue), {
|
|
1928
|
+
key: 0,
|
|
1929
|
+
id: i(f),
|
|
1930
|
+
class: "vc-color-input__desc"
|
|
1931
|
+
}, {
|
|
1932
|
+
default: E(() => [
|
|
1933
|
+
ee(N(e.hint), 1)
|
|
1934
|
+
]),
|
|
1935
|
+
_: 1
|
|
1936
|
+
}, 8, ["id"])) : w("", !0)
|
|
1937
|
+
]))
|
|
1938
|
+
]),
|
|
1939
|
+
_: 1
|
|
1940
|
+
})
|
|
1941
|
+
], 2));
|
|
1942
|
+
}
|
|
1943
|
+
}), no = { class: "vc-input__container" }, ao = {
|
|
1944
|
+
key: 0,
|
|
1945
|
+
class: "vc-input__prepend"
|
|
1946
|
+
}, oo = { class: "vc-input__field-container" }, lo = {
|
|
1947
|
+
key: 0,
|
|
1948
|
+
class: "vc-input__prepend-inner"
|
|
1949
|
+
}, io = { class: "vc-input__field" }, ro = {
|
|
1950
|
+
key: 0,
|
|
1951
|
+
class: "vc-input__prefix"
|
|
1952
|
+
}, so = ["id", "placeholder", "type", "disabled", "name", "maxlength", "autofocus", "autocomplete", "aria-invalid", "aria-required", "aria-describedby", "aria-labelledby"], uo = {
|
|
1953
|
+
key: 1,
|
|
1954
|
+
class: "vc-input__suffix"
|
|
1955
|
+
}, co = ["aria-label"], fo = ["aria-label"], go = {
|
|
1956
|
+
key: 1,
|
|
1957
|
+
class: "vc-input__append-inner"
|
|
1958
|
+
}, vo = {
|
|
1959
|
+
key: 2,
|
|
1960
|
+
class: "vc-input__loading"
|
|
1961
|
+
}, po = {
|
|
1962
|
+
key: 1,
|
|
1963
|
+
class: "vc-input__append"
|
|
1964
|
+
}, mo = { key: 0 }, yo = { key: 1 }, bo = /* @__PURE__ */ G({
|
|
1965
|
+
inheritAttrs: !1,
|
|
1966
|
+
__name: "vc-input",
|
|
1967
|
+
props: {
|
|
1968
|
+
modelValue: {},
|
|
1969
|
+
type: { default: "text" },
|
|
1970
|
+
prefix: {},
|
|
1971
|
+
suffix: {},
|
|
1972
|
+
debounce: {},
|
|
1973
|
+
maxlength: { default: "1024" },
|
|
1974
|
+
step: { default: "1" },
|
|
1975
|
+
autocomplete: {},
|
|
1976
|
+
datePickerOptions: {},
|
|
1977
|
+
placeholder: {},
|
|
1978
|
+
hint: {},
|
|
1979
|
+
clearable: { type: Boolean },
|
|
1980
|
+
loading: { type: Boolean },
|
|
1981
|
+
autofocus: { type: Boolean },
|
|
1982
|
+
size: { default: "default" },
|
|
1983
|
+
multilanguage: { type: Boolean },
|
|
1984
|
+
currentLanguage: {},
|
|
1985
|
+
label: {},
|
|
1986
|
+
tooltip: {},
|
|
1987
|
+
disabled: { type: Boolean },
|
|
1988
|
+
required: { type: Boolean },
|
|
1989
|
+
name: { default: "Field" },
|
|
1990
|
+
error: { type: Boolean },
|
|
1991
|
+
errorMessage: {}
|
|
1992
|
+
},
|
|
1993
|
+
emits: ["update:modelValue", "blur", "focus"],
|
|
1994
|
+
setup(e, { emit: t }) {
|
|
1995
|
+
const n = e, a = bt(), l = C(() => {
|
|
1996
|
+
const { class: $, ...z } = a;
|
|
1997
|
+
return z;
|
|
1998
|
+
}), r = t, o = he(), {
|
|
1999
|
+
fieldId: s,
|
|
2000
|
+
labelId: u,
|
|
2001
|
+
errorId: f,
|
|
2002
|
+
hintId: m,
|
|
2003
|
+
invalid: v,
|
|
2004
|
+
resolvedDisabled: d,
|
|
2005
|
+
resolvedName: c,
|
|
2006
|
+
ariaRequired: y,
|
|
2007
|
+
ariaDescribedBy: b
|
|
2008
|
+
} = ze(n);
|
|
2009
|
+
let O, p;
|
|
2010
|
+
const k = S(), V = S(), j = S(i(n.type)), ne = S(!1), Q = S(), D = C({
|
|
2011
|
+
get() {
|
|
2012
|
+
return j.value === "integer" ? "number" : j.value;
|
|
2013
|
+
},
|
|
2014
|
+
set($) {
|
|
2015
|
+
j.value = $;
|
|
2016
|
+
}
|
|
2017
|
+
}), A = C(() => i(n.modelValue)), F = C({
|
|
2018
|
+
get() {
|
|
2019
|
+
return (n.type === "integer" || n.type === "number") && isNaN(k.value) ? "" : k.value;
|
|
2020
|
+
},
|
|
2021
|
+
set($) {
|
|
2022
|
+
(n.type === "number" || n.type === "integer") && $ < 0 ? k.value = Math.abs($) : k.value = $, H(k.value);
|
|
2023
|
+
}
|
|
2024
|
+
});
|
|
2025
|
+
X(
|
|
2026
|
+
A,
|
|
2027
|
+
($) => {
|
|
2028
|
+
n.type === "number" && $ !== null ? Q.value = parseFloat($) : n.type === "integer" && $ !== null ? Q.value = Math.trunc($) : Q.value = $, k.value !== Q.value && (k.value = Q.value);
|
|
2029
|
+
},
|
|
2030
|
+
{ immediate: !0 }
|
|
2031
|
+
);
|
|
2032
|
+
function K($) {
|
|
2033
|
+
const z = ["Backspace", "Delete", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], M = $.key;
|
|
2034
|
+
if ((n.type === "number" || n.type === "integer") && (M === "-" || M === "e" || M === "+") && $.preventDefault(), n.type === "integer" && !/^\d$/.test(M) && !z.includes(M)) {
|
|
2035
|
+
$.preventDefault();
|
|
2036
|
+
return;
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
function H($) {
|
|
2040
|
+
I($);
|
|
2041
|
+
}
|
|
2042
|
+
function I($) {
|
|
2043
|
+
p = () => {
|
|
2044
|
+
if (Q.value !== $) {
|
|
2045
|
+
let z;
|
|
2046
|
+
n.type === "number" && $ !== null && $ !== void 0 ? z = $ !== "" ? parseFloat($) : null : n.type === "integer" && $ !== null && $ !== void 0 ? z = $ !== "" ? Math.trunc(parseInt($)) : null : z = $, r("update:modelValue", z);
|
|
2047
|
+
}
|
|
2048
|
+
p = void 0;
|
|
2049
|
+
}, n.debounce !== void 0 ? (clearTimeout(O), O = setTimeout(p, +n.debounce)) : p();
|
|
2050
|
+
}
|
|
2051
|
+
function R() {
|
|
2052
|
+
k.value = null, r("update:modelValue", null);
|
|
2053
|
+
}
|
|
2054
|
+
function q($) {
|
|
2055
|
+
ne.value = !1, r("blur", $);
|
|
2056
|
+
}
|
|
2057
|
+
function te() {
|
|
2058
|
+
V.value?.focus();
|
|
2059
|
+
}
|
|
2060
|
+
function Me() {
|
|
2061
|
+
ne.value = !0, r("focus");
|
|
2062
|
+
}
|
|
2063
|
+
return ($, z) => i(o) ? (g(), h("div", ae({ key: 0 }, l.value, {
|
|
2064
|
+
class: ["vc-input vc-input--skeleton", $.$attrs.class]
|
|
2065
|
+
}), [
|
|
2066
|
+
e.label ? (g(), P(i(oe), {
|
|
2067
|
+
key: 0,
|
|
2068
|
+
variant: "block",
|
|
2069
|
+
width: 60 + (e.label?.length || 0) * 4,
|
|
2070
|
+
height: 11
|
|
2071
|
+
}, null, 8, ["width"])) : w("", !0),
|
|
2072
|
+
T(i(oe), {
|
|
2073
|
+
variant: "block",
|
|
2074
|
+
width: "100%",
|
|
2075
|
+
height: 36
|
|
2076
|
+
})
|
|
2077
|
+
], 16)) : e.type === "date" || e.type === "datetime-local" ? (g(), P(i(Ua), ae({ key: 1 }, i(a), {
|
|
2078
|
+
"model-value": e.modelValue,
|
|
2079
|
+
type: e.type,
|
|
2080
|
+
"date-picker-options": e.datePickerOptions,
|
|
2081
|
+
label: e.label,
|
|
2082
|
+
placeholder: e.placeholder,
|
|
2083
|
+
hint: e.hint,
|
|
2084
|
+
disabled: e.disabled,
|
|
2085
|
+
error: e.error,
|
|
2086
|
+
"error-message": e.errorMessage,
|
|
2087
|
+
required: e.required,
|
|
2088
|
+
clearable: e.clearable,
|
|
2089
|
+
loading: e.loading,
|
|
2090
|
+
autofocus: e.autofocus,
|
|
2091
|
+
size: e.size,
|
|
2092
|
+
tooltip: e.tooltip,
|
|
2093
|
+
multilanguage: e.multilanguage,
|
|
2094
|
+
"current-language": e.currentLanguage,
|
|
2095
|
+
name: e.name,
|
|
2096
|
+
"onUpdate:modelValue": z[0] || (z[0] = (M) => r("update:modelValue", M ?? null)),
|
|
2097
|
+
onBlur: z[1] || (z[1] = (M) => r("blur", M)),
|
|
2098
|
+
onFocus: z[2] || (z[2] = (M) => r("focus"))
|
|
2099
|
+
}), 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"])) : e.type === "color" ? (g(), P(i(to), ae({ key: 2 }, i(a), {
|
|
2100
|
+
"model-value": e.modelValue ?? null,
|
|
2101
|
+
label: e.label,
|
|
2102
|
+
placeholder: e.placeholder,
|
|
2103
|
+
hint: e.hint,
|
|
2104
|
+
disabled: e.disabled,
|
|
2105
|
+
error: e.error,
|
|
2106
|
+
"error-message": e.errorMessage,
|
|
2107
|
+
required: e.required,
|
|
2108
|
+
clearable: e.clearable,
|
|
2109
|
+
loading: e.loading,
|
|
2110
|
+
autofocus: e.autofocus,
|
|
2111
|
+
size: e.size,
|
|
2112
|
+
tooltip: e.tooltip,
|
|
2113
|
+
multilanguage: e.multilanguage,
|
|
2114
|
+
"current-language": e.currentLanguage,
|
|
2115
|
+
name: e.name,
|
|
2116
|
+
"onUpdate:modelValue": z[3] || (z[3] = (M) => r("update:modelValue", M)),
|
|
2117
|
+
onBlur: z[4] || (z[4] = (M) => r("blur", M)),
|
|
2118
|
+
onFocus: z[5] || (z[5] = (M) => r("focus"))
|
|
2119
|
+
}), null, 16, ["model-value", "label", "placeholder", "hint", "disabled", "error", "error-message", "required", "clearable", "loading", "autofocus", "size", "tooltip", "multilanguage", "current-language", "name"])) : (g(), h("div", ae({ key: 3 }, l.value, {
|
|
2120
|
+
class: ["vc-input", [
|
|
2121
|
+
$.$attrs.class,
|
|
2122
|
+
`vc-input--${e.type}`,
|
|
2123
|
+
{
|
|
2124
|
+
"vc-input--clearable": e.clearable,
|
|
2125
|
+
"vc-input--error": i(v),
|
|
2126
|
+
"vc-input--disabled": i(d),
|
|
2127
|
+
"vc-input--focused": ne.value
|
|
2128
|
+
}
|
|
2129
|
+
]]
|
|
2130
|
+
}), [
|
|
2131
|
+
e.label ? (g(), P(i(qe), {
|
|
2132
|
+
key: 0,
|
|
2133
|
+
id: i(u),
|
|
2134
|
+
"html-for": i(s),
|
|
2135
|
+
class: "vc-input__label",
|
|
2136
|
+
required: e.required,
|
|
2137
|
+
multilanguage: e.multilanguage,
|
|
2138
|
+
"current-language": e.currentLanguage,
|
|
2139
|
+
error: i(v)
|
|
2140
|
+
}, me({
|
|
2141
|
+
default: E(() => [
|
|
2142
|
+
L("span", null, N(e.label), 1)
|
|
2143
|
+
]),
|
|
2144
|
+
_: 2
|
|
2145
|
+
}, [
|
|
2146
|
+
e.tooltip ? {
|
|
2147
|
+
name: "tooltip",
|
|
2148
|
+
fn: E(() => [
|
|
2149
|
+
ee(N(e.tooltip), 1)
|
|
2150
|
+
]),
|
|
2151
|
+
key: "0"
|
|
2152
|
+
} : void 0
|
|
2153
|
+
]), 1032, ["id", "html-for", "required", "multilanguage", "current-language", "error"])) : w("", !0),
|
|
2154
|
+
L("div", no, [
|
|
2155
|
+
$.$slots.prepend ? (g(), h("div", ao, [
|
|
2156
|
+
B($.$slots, "prepend", { focus: te })
|
|
2157
|
+
])) : w("", !0),
|
|
2158
|
+
L("div", {
|
|
2159
|
+
class: Z(["vc-input__field-wrapper", {
|
|
2160
|
+
"vc-input__field-wrapper--default": e.size === "default",
|
|
2161
|
+
"vc-input__field-wrapper--small": e.size === "small"
|
|
2162
|
+
}])
|
|
2163
|
+
}, [
|
|
2164
|
+
L("div", oo, [
|
|
2165
|
+
$.$slots["prepend-inner"] ? (g(), h("div", lo, [
|
|
2166
|
+
B($.$slots, "prepend-inner", { focus: te })
|
|
2167
|
+
])) : w("", !0),
|
|
2168
|
+
L("div", io, [
|
|
2169
|
+
e.prefix ? (g(), h("div", ro, N(e.prefix), 1)) : w("", !0),
|
|
2170
|
+
B($.$slots, "control", {
|
|
2171
|
+
editable: i(d),
|
|
2172
|
+
focused: e.autofocus,
|
|
2173
|
+
modelValue: F.value,
|
|
2174
|
+
emitValue: I,
|
|
2175
|
+
placeholder: e.placeholder
|
|
2176
|
+
}, () => [
|
|
2177
|
+
et(L("input", {
|
|
2178
|
+
id: i(s),
|
|
2179
|
+
ref_key: "inputRef",
|
|
2180
|
+
ref: V,
|
|
2181
|
+
"onUpdate:modelValue": z[6] || (z[6] = (M) => F.value = M),
|
|
2182
|
+
placeholder: e.placeholder,
|
|
2183
|
+
type: D.value,
|
|
2184
|
+
disabled: i(d),
|
|
2185
|
+
name: i(c),
|
|
2186
|
+
maxlength: e.maxlength,
|
|
2187
|
+
autofocus: e.autofocus,
|
|
2188
|
+
autocomplete: e.autocomplete,
|
|
2189
|
+
"aria-invalid": i(v) || void 0,
|
|
2190
|
+
"aria-required": i(y),
|
|
2191
|
+
"aria-describedby": i(b),
|
|
2192
|
+
"aria-labelledby": e.label ? i(u) : void 0,
|
|
2193
|
+
class: "vc-input__input",
|
|
2194
|
+
tabindex: "0",
|
|
2195
|
+
onKeydown: K,
|
|
2196
|
+
onBlur: q,
|
|
2197
|
+
onFocus: Me
|
|
2198
|
+
}, null, 40, so), [
|
|
2199
|
+
[Yt, F.value]
|
|
2200
|
+
])
|
|
2201
|
+
]),
|
|
2202
|
+
e.suffix ? (g(), h("div", uo, N(e.suffix), 1)) : w("", !0),
|
|
2203
|
+
e.clearable && Q.value && !i(d) && e.type !== "password" ? (g(), h("button", {
|
|
2204
|
+
key: 2,
|
|
2205
|
+
type: "button",
|
|
2206
|
+
class: "vc-input__clear",
|
|
2207
|
+
"aria-label": $.$t("COMPONENTS.CONTROLS.CLEAR"),
|
|
2208
|
+
onClick: R
|
|
2209
|
+
}, [
|
|
2210
|
+
T(i(W), {
|
|
2211
|
+
size: "xs",
|
|
2212
|
+
icon: "lucide-x"
|
|
2213
|
+
})
|
|
2214
|
+
], 8, co)) : w("", !0),
|
|
2215
|
+
e.type === "password" ? (g(), h("button", {
|
|
2216
|
+
key: 3,
|
|
2217
|
+
type: "button",
|
|
2218
|
+
class: "vc-input__showhide",
|
|
2219
|
+
"aria-label": j.value === "password" ? $.$t("COMPONENTS.CONTROLS.SHOW_PASSWORD") : $.$t("COMPONENTS.CONTROLS.HIDE_PASSWORD"),
|
|
2220
|
+
onClick: z[7] || (z[7] = (M) => j.value = j.value === "password" ? "text" : "password")
|
|
2221
|
+
}, [
|
|
2222
|
+
T(i(W), {
|
|
2223
|
+
size: "s",
|
|
2224
|
+
icon: j.value === "password" ? "lucide-eye-off" : "lucide-eye"
|
|
2225
|
+
}, null, 8, ["icon"])
|
|
2226
|
+
], 8, fo)) : w("", !0)
|
|
2227
|
+
]),
|
|
2228
|
+
$.$slots["append-inner"] ? (g(), h("div", go, [
|
|
2229
|
+
B($.$slots, "append-inner", { focus: te })
|
|
2230
|
+
])) : w("", !0),
|
|
2231
|
+
e.loading ? (g(), h("div", vo, [
|
|
2232
|
+
T(i(W), {
|
|
2233
|
+
icon: "lucide-loader-2",
|
|
2234
|
+
class: "vc-input__loading-icon",
|
|
2235
|
+
size: "m"
|
|
2236
|
+
})
|
|
2237
|
+
])) : w("", !0)
|
|
2238
|
+
])
|
|
2239
|
+
], 2),
|
|
2240
|
+
$.$slots.append ? (g(), h("div", po, [
|
|
2241
|
+
B($.$slots, "append", { focus: te })
|
|
2242
|
+
])) : w("", !0)
|
|
2243
|
+
]),
|
|
2244
|
+
T(Re, {
|
|
2245
|
+
name: "slide-up",
|
|
2246
|
+
mode: "out-in"
|
|
2247
|
+
}, {
|
|
2248
|
+
default: E(() => [
|
|
2249
|
+
i(v) && e.errorMessage ? (g(), h("div", mo, [
|
|
2250
|
+
B($.$slots, "error", {}, () => [
|
|
2251
|
+
T(i(ue), {
|
|
2252
|
+
id: i(f),
|
|
2253
|
+
class: "vc-input__hint-error",
|
|
2254
|
+
error: !0
|
|
2255
|
+
}, {
|
|
2256
|
+
default: E(() => [
|
|
2257
|
+
ee(N(e.errorMessage), 1)
|
|
2258
|
+
]),
|
|
2259
|
+
_: 1
|
|
2260
|
+
}, 8, ["id"])
|
|
2261
|
+
])
|
|
2262
|
+
])) : (g(), h("div", yo, [
|
|
2263
|
+
B($.$slots, "hint", {}, () => [
|
|
2264
|
+
e.hint ? (g(), P(i(ue), {
|
|
2265
|
+
key: 0,
|
|
2266
|
+
id: i(m),
|
|
2267
|
+
class: "vc-input__desc"
|
|
2268
|
+
}, {
|
|
2269
|
+
default: E(() => [
|
|
2270
|
+
ee(N(e.hint), 1)
|
|
2271
|
+
]),
|
|
2272
|
+
_: 1
|
|
2273
|
+
}, 8, ["id"])) : w("", !0)
|
|
2274
|
+
])
|
|
2275
|
+
]))
|
|
2276
|
+
]),
|
|
2277
|
+
_: 3
|
|
2278
|
+
})
|
|
2279
|
+
], 16));
|
|
2280
|
+
}
|
|
2281
|
+
}), vi = In.create({
|
|
2282
|
+
name: "fontSize",
|
|
2283
|
+
addOptions() {
|
|
2284
|
+
return {
|
|
2285
|
+
types: ["textStyle"]
|
|
2286
|
+
};
|
|
2287
|
+
},
|
|
2288
|
+
addGlobalAttributes() {
|
|
2289
|
+
return [
|
|
2290
|
+
{
|
|
2291
|
+
types: this.options.types,
|
|
2292
|
+
attributes: {
|
|
2293
|
+
fontSize: {
|
|
2294
|
+
default: null,
|
|
2295
|
+
parseHTML: (e) => e.style.fontSize?.replace(/['"]+/g, ""),
|
|
2296
|
+
renderHTML: (e) => e.fontSize ? {
|
|
2297
|
+
style: `font-size: ${e.fontSize}`
|
|
2298
|
+
} : {}
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
];
|
|
2303
|
+
},
|
|
2304
|
+
addCommands() {
|
|
2305
|
+
return {
|
|
2306
|
+
setFontSize: (e) => ({ chain: t }) => t().setMark("textStyle", { fontSize: e }).run(),
|
|
2307
|
+
unsetFontSize: () => ({ chain: e }) => e().setMark("textStyle", { fontSize: null }).run()
|
|
2308
|
+
};
|
|
2309
|
+
}
|
|
2310
|
+
});
|
|
2311
|
+
function ho(e = {}) {
|
|
2312
|
+
const {
|
|
2313
|
+
containerSelector: t = '[role="menu"]',
|
|
2314
|
+
itemSelector: n = '[tabindex="0"]',
|
|
2315
|
+
onEnter: a,
|
|
2316
|
+
onEscape: l,
|
|
2317
|
+
loop: r = !0
|
|
2318
|
+
} = e, o = S(null), s = S(-1), u = (p) => {
|
|
2319
|
+
(s.value >= p.length || s.value < 0) && (s.value = p.length > 0 ? 0 : -1);
|
|
2320
|
+
}, f = (p) => {
|
|
2321
|
+
if (!o.value) return;
|
|
2322
|
+
const k = Array.from(o.value.querySelectorAll(n));
|
|
2323
|
+
if (k.length)
|
|
2324
|
+
switch (u(k), p.key) {
|
|
2325
|
+
case "Tab":
|
|
2326
|
+
m(p, k);
|
|
2327
|
+
break;
|
|
2328
|
+
case "ArrowDown":
|
|
2329
|
+
p.preventDefault(), v(k);
|
|
2330
|
+
break;
|
|
2331
|
+
case "ArrowUp":
|
|
2332
|
+
p.preventDefault(), d(k);
|
|
2333
|
+
break;
|
|
2334
|
+
case "Enter":
|
|
2335
|
+
case " ":
|
|
2336
|
+
if (s.value >= 0 && s.value < k.length) {
|
|
2337
|
+
const V = k[s.value];
|
|
2338
|
+
V && (p.preventDefault(), a ? a(V) : typeof V.click == "function" && V.click());
|
|
2339
|
+
}
|
|
2340
|
+
break;
|
|
2341
|
+
case "Escape":
|
|
2342
|
+
l && (p.preventDefault(), l());
|
|
2343
|
+
break;
|
|
2344
|
+
}
|
|
2345
|
+
}, m = (p, k) => {
|
|
2346
|
+
p.shiftKey ? d(k) : v(k);
|
|
2347
|
+
}, v = (p) => {
|
|
2348
|
+
if (!p.length) return;
|
|
2349
|
+
if (u(p), s.value < p.length - 1)
|
|
2350
|
+
s.value++;
|
|
2351
|
+
else if (r)
|
|
2352
|
+
s.value = 0;
|
|
2353
|
+
else
|
|
2354
|
+
return;
|
|
2355
|
+
const k = p[s.value];
|
|
2356
|
+
k && typeof k.focus == "function" && k.focus();
|
|
2357
|
+
}, d = (p) => {
|
|
2358
|
+
if (!p.length) return;
|
|
2359
|
+
if (u(p), s.value > 0)
|
|
2360
|
+
s.value--;
|
|
2361
|
+
else if (r)
|
|
2362
|
+
s.value = p.length - 1;
|
|
2363
|
+
else
|
|
2364
|
+
return;
|
|
2365
|
+
const k = p[s.value];
|
|
2366
|
+
k && typeof k.focus == "function" && k.focus();
|
|
2367
|
+
}, c = (p) => {
|
|
2368
|
+
if (!p.length) return;
|
|
2369
|
+
s.value = 0;
|
|
2370
|
+
const k = p[0];
|
|
2371
|
+
k && typeof k.focus == "function" && k.focus();
|
|
2372
|
+
}, y = (p) => {
|
|
2373
|
+
if (!p.length) return;
|
|
2374
|
+
s.value = p.length - 1;
|
|
2375
|
+
const k = p[p.length - 1];
|
|
2376
|
+
k && typeof k.focus == "function" && k.focus();
|
|
2377
|
+
}, b = (p) => {
|
|
2378
|
+
o.value && o.value.removeEventListener("keydown", f), o.value = p, p.addEventListener("keydown", f);
|
|
2379
|
+
}, O = () => {
|
|
2380
|
+
o.value && (o.value.removeEventListener("keydown", f), o.value = null);
|
|
2381
|
+
};
|
|
2382
|
+
return tt(() => {
|
|
2383
|
+
if (typeof document < "u" && t) {
|
|
2384
|
+
const p = document.querySelector(t);
|
|
2385
|
+
p && b(p);
|
|
2386
|
+
}
|
|
2387
|
+
}), Qe(() => {
|
|
2388
|
+
O();
|
|
2389
|
+
}), {
|
|
2390
|
+
initKeyboardNavigation: b,
|
|
2391
|
+
cleanupKeyboardNavigation: O,
|
|
2392
|
+
focusNextElement: () => {
|
|
2393
|
+
if (o.value) {
|
|
2394
|
+
const p = Array.from(o.value.querySelectorAll(n));
|
|
2395
|
+
v(p);
|
|
2396
|
+
}
|
|
2397
|
+
},
|
|
2398
|
+
focusPreviousElement: () => {
|
|
2399
|
+
if (o.value) {
|
|
2400
|
+
const p = Array.from(o.value.querySelectorAll(n));
|
|
2401
|
+
d(p);
|
|
2402
|
+
}
|
|
2403
|
+
},
|
|
2404
|
+
focusFirstElement: () => {
|
|
2405
|
+
if (o.value) {
|
|
2406
|
+
const p = Array.from(o.value.querySelectorAll(n));
|
|
2407
|
+
c(p);
|
|
2408
|
+
}
|
|
2409
|
+
},
|
|
2410
|
+
focusLastElement: () => {
|
|
2411
|
+
if (o.value) {
|
|
2412
|
+
const p = Array.from(o.value.querySelectorAll(n));
|
|
2413
|
+
y(p);
|
|
2414
|
+
}
|
|
2415
|
+
},
|
|
2416
|
+
setFocusedIndex: (p) => {
|
|
2417
|
+
if (o.value) {
|
|
2418
|
+
const k = Array.from(o.value.querySelectorAll(n));
|
|
2419
|
+
p >= 0 && p < k.length && (s.value = p);
|
|
2420
|
+
}
|
|
2421
|
+
},
|
|
2422
|
+
getFocusedIndex: () => s.value
|
|
2423
|
+
};
|
|
2424
|
+
}
|
|
2425
|
+
function pt(e, t) {
|
|
2426
|
+
const n = e !== void 0 ? e : t;
|
|
2427
|
+
return typeof n == "function" ? n : (a) => a === null || typeof a != "object" ? a : n && n in a ? a[n] : a;
|
|
2428
|
+
}
|
|
2429
|
+
function Io(e) {
|
|
2430
|
+
const t = C(() => pt(e.optionValue(), "id")), n = C(() => pt(e.optionLabel(), "title"));
|
|
2431
|
+
function a(o, s, u, f) {
|
|
2432
|
+
const m = (v) => Le(t.value(v), o);
|
|
2433
|
+
return u.find(m) || f.find(m) || s.find(m) || o;
|
|
2434
|
+
}
|
|
2435
|
+
function l(o) {
|
|
2436
|
+
return n.value(o);
|
|
2437
|
+
}
|
|
2438
|
+
function r(o) {
|
|
2439
|
+
return o != null && ("" + o).length > 0;
|
|
2440
|
+
}
|
|
2441
|
+
return {
|
|
2442
|
+
getOptionValue: t,
|
|
2443
|
+
getOptionLabel: n,
|
|
2444
|
+
getOption: a,
|
|
2445
|
+
getEmittingOptionValue: l,
|
|
2446
|
+
fieldValueIsFilled: r
|
|
2447
|
+
};
|
|
2448
|
+
}
|
|
2449
|
+
function ko() {
|
|
2450
|
+
const e = S(null), t = S(!1);
|
|
2451
|
+
let n = null, a = null;
|
|
2452
|
+
function l() {
|
|
2453
|
+
if (e.value && !t.value) {
|
|
2454
|
+
const o = e.value.getBoundingClientRect();
|
|
2455
|
+
o.top < window.innerHeight && o.bottom > 0 && o.left < window.innerWidth && o.right > 0 && (t.value = !0);
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
function r() {
|
|
2459
|
+
if (!t.value && e.value) {
|
|
2460
|
+
const o = e.value.getBoundingClientRect();
|
|
2461
|
+
o.top < window.innerHeight && o.bottom > 0 && o.left < window.innerWidth && o.right > 0 && (t.value = !0);
|
|
2462
|
+
}
|
|
2463
|
+
}
|
|
2464
|
+
return tt(() => {
|
|
2465
|
+
e.value && (n = new IntersectionObserver(
|
|
2466
|
+
([o]) => {
|
|
2467
|
+
t.value = o.isIntersecting;
|
|
2468
|
+
},
|
|
2469
|
+
{ threshold: 0.1 }
|
|
2470
|
+
), n.observe(e.value), a = setTimeout(l, 100));
|
|
2471
|
+
}), ht(() => {
|
|
2472
|
+
a !== null && (clearTimeout(a), a = null), n && e.value && n.unobserve(e.value), n && n.disconnect();
|
|
2473
|
+
}), {
|
|
2474
|
+
selectRootRef: e,
|
|
2475
|
+
isSelectVisible: t,
|
|
2476
|
+
ensureVisibility: r
|
|
2477
|
+
};
|
|
2478
|
+
}
|
|
2479
|
+
function So(e) {
|
|
2480
|
+
const t = S(!1), n = S(!1), a = S(null), l = S(null);
|
|
2481
|
+
function r() {
|
|
2482
|
+
return {
|
|
2483
|
+
name: "sameWidth",
|
|
2484
|
+
fn({ rects: f }) {
|
|
2485
|
+
return {
|
|
2486
|
+
data: {
|
|
2487
|
+
width: e.outline() ? `${f.reference.width}px` : "max-content"
|
|
2488
|
+
}
|
|
2489
|
+
};
|
|
2490
|
+
}
|
|
2491
|
+
};
|
|
2492
|
+
}
|
|
2493
|
+
const o = Fn(a, l, {
|
|
2494
|
+
placement: C(() => e.placement),
|
|
2495
|
+
middleware: C(() => [
|
|
2496
|
+
$t({ fallbackPlacements: ["top", "bottom"] }),
|
|
2497
|
+
Ot({ mainAxis: !1 }),
|
|
2498
|
+
r(),
|
|
2499
|
+
Ye({ mainAxis: 4 })
|
|
2500
|
+
])
|
|
2501
|
+
}), s = C(() => ({
|
|
2502
|
+
top: `${o.y.value ?? 0}px`,
|
|
2503
|
+
left: `${o.x.value ?? 0}px`,
|
|
2504
|
+
width: o.middlewareData.value.sameWidth?.width
|
|
2505
|
+
}));
|
|
2506
|
+
X(
|
|
2507
|
+
() => o.isPositioned.value,
|
|
2508
|
+
(f) => {
|
|
2509
|
+
f && o.update();
|
|
2510
|
+
}
|
|
2511
|
+
);
|
|
2512
|
+
function u() {
|
|
2513
|
+
e.disabled() || (!t.value && !e.isSelectVisible.value && e.ensureVisibility(), t.value = !t.value);
|
|
2514
|
+
}
|
|
2515
|
+
return {
|
|
2516
|
+
isOpened: t,
|
|
2517
|
+
isFocused: n,
|
|
2518
|
+
dropdownToggleRef: a,
|
|
2519
|
+
dropdownRef: l,
|
|
2520
|
+
popper: o,
|
|
2521
|
+
dropdownStyle: s,
|
|
2522
|
+
toggleDropdown: u
|
|
2523
|
+
};
|
|
2524
|
+
}
|
|
2525
|
+
function wo(e) {
|
|
2526
|
+
const t = S([]), n = S(null), a = S(0), l = S(!1), r = S(!1), o = S(), s = S([]), u = S(!1), f = /* @__PURE__ */ new Map();
|
|
2527
|
+
let m = !1, v;
|
|
2528
|
+
const d = C(() => n.value ?? t.value), c = C(() => t.value.length < a.value);
|
|
2529
|
+
function y(D) {
|
|
2530
|
+
for (const A of D) {
|
|
2531
|
+
const F = String(e.getOptionValue.value(A));
|
|
2532
|
+
f.set(F, A);
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2535
|
+
async function b() {
|
|
2536
|
+
if (m)
|
|
2537
|
+
return;
|
|
2538
|
+
const D = e.options();
|
|
2539
|
+
if (typeof D == "function")
|
|
2540
|
+
try {
|
|
2541
|
+
l.value = !0;
|
|
2542
|
+
const A = await D(void 0, 0);
|
|
2543
|
+
t.value = A?.results ?? [], a.value = A?.totalCount ?? 0, y(t.value), m = !0;
|
|
2544
|
+
} catch (A) {
|
|
2545
|
+
console.error("useSelectDataSource: error loading options", A), t.value = [], a.value = 0;
|
|
2546
|
+
} finally {
|
|
2547
|
+
l.value = !1;
|
|
2548
|
+
}
|
|
2549
|
+
else Array.isArray(D) && (t.value = [...D], a.value = t.value.length, y(t.value), m = !0);
|
|
2550
|
+
}
|
|
2551
|
+
function O() {
|
|
2552
|
+
n.value = null, o.value = void 0, v && (clearTimeout(v), v = void 0);
|
|
2553
|
+
}
|
|
2554
|
+
async function p() {
|
|
2555
|
+
const D = e.options();
|
|
2556
|
+
if (!(typeof D != "function" || l.value))
|
|
2557
|
+
try {
|
|
2558
|
+
l.value = !0;
|
|
2559
|
+
const A = await D(o.value, t.value.length), F = new Set(t.value.map((H) => String(e.getOptionValue.value(H)))), K = (A?.results ?? []).filter(
|
|
2560
|
+
(H) => !F.has(String(e.getOptionValue.value(H)))
|
|
2561
|
+
);
|
|
2562
|
+
t.value = [...t.value, ...K], a.value = A?.totalCount ?? a.value, y(K);
|
|
2563
|
+
} catch (A) {
|
|
2564
|
+
console.error("useSelectDataSource: error loading more", A);
|
|
2565
|
+
} finally {
|
|
2566
|
+
l.value = !1;
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2569
|
+
async function k(D) {
|
|
2570
|
+
o.value = D;
|
|
2571
|
+
const A = e.options();
|
|
2572
|
+
if (typeof A == "function")
|
|
2573
|
+
try {
|
|
2574
|
+
r.value = !0;
|
|
2575
|
+
const F = await A(D);
|
|
2576
|
+
n.value = F?.results ?? [], a.value = F?.totalCount ?? 0, y(n.value);
|
|
2577
|
+
} catch (F) {
|
|
2578
|
+
console.error("useSelectDataSource: error searching", F), n.value = [];
|
|
2579
|
+
} finally {
|
|
2580
|
+
r.value = !1;
|
|
2581
|
+
}
|
|
2582
|
+
else
|
|
2583
|
+
n.value = t.value.filter((F) => {
|
|
2584
|
+
const K = e.getOptionLabel.value(F);
|
|
2585
|
+
return String(K).toLowerCase().includes(D.toLowerCase());
|
|
2586
|
+
});
|
|
2587
|
+
}
|
|
2588
|
+
function V(D) {
|
|
2589
|
+
if (!D?.target) return;
|
|
2590
|
+
const A = D.target.value, F = Number(e.debounce());
|
|
2591
|
+
v && clearTimeout(v), F > 0 ? v = setTimeout(() => {
|
|
2592
|
+
e.emit.search(A), k(A);
|
|
2593
|
+
}, F) : (e.emit.search(A), k(A));
|
|
2594
|
+
}
|
|
2595
|
+
function j() {
|
|
2596
|
+
n.value = null, o.value = void 0, v && (clearTimeout(v), v = void 0), a.value = t.value.length;
|
|
2597
|
+
}
|
|
2598
|
+
async function ne(D) {
|
|
2599
|
+
if (D.length === 0) return [];
|
|
2600
|
+
const F = D.filter((I) => !f.has(String(I))).filter((I) => {
|
|
2601
|
+
const R = t.value.find((q) => Le(e.getOptionValue.value(q), I));
|
|
2602
|
+
return R ? (f.set(String(I), R), !1) : !0;
|
|
2603
|
+
}), K = e.options();
|
|
2604
|
+
if (F.length > 0 && typeof K == "function") {
|
|
2605
|
+
try {
|
|
2606
|
+
u.value = !0;
|
|
2607
|
+
const R = await K(void 0, void 0, F);
|
|
2608
|
+
R?.results && y(R.results);
|
|
2609
|
+
} catch (R) {
|
|
2610
|
+
console.error("useSelectDataSource: error resolving", R);
|
|
2611
|
+
} finally {
|
|
2612
|
+
u.value = !1;
|
|
2613
|
+
}
|
|
2614
|
+
F.filter((R) => !f.has(String(R))).length > 0 && !m && await b();
|
|
2615
|
+
} else if (F.length > 0 && Array.isArray(K))
|
|
2616
|
+
for (const I of K) {
|
|
2617
|
+
const R = String(e.getOptionValue.value(I));
|
|
2618
|
+
F.includes(R) && f.set(R, I);
|
|
2619
|
+
}
|
|
2620
|
+
const H = D.map((I) => f.get(String(I))).filter(Boolean);
|
|
2621
|
+
return s.value = H, H;
|
|
2622
|
+
}
|
|
2623
|
+
async function Q() {
|
|
2624
|
+
t.value = [], n.value = null, a.value = 0, f.clear(), s.value = [], m = !1, await b();
|
|
2625
|
+
}
|
|
2626
|
+
return X(
|
|
2627
|
+
e.options,
|
|
2628
|
+
async () => {
|
|
2629
|
+
t.value = [], n.value = null, a.value = 0, f.clear(), m = !1;
|
|
2630
|
+
const D = e.options();
|
|
2631
|
+
if (Array.isArray(D) && (t.value = [...D], a.value = t.value.length, y(t.value), m = !0, s.value.length === 0)) {
|
|
2632
|
+
const A = s.value;
|
|
2633
|
+
(A.length === 0 ? t.value.filter((K) => {
|
|
2634
|
+
const H = String(e.getOptionValue.value(K));
|
|
2635
|
+
return f.has(H);
|
|
2636
|
+
}) : A).length;
|
|
2637
|
+
}
|
|
2638
|
+
},
|
|
2639
|
+
{ deep: !1 }
|
|
2640
|
+
), {
|
|
2641
|
+
displayItems: d,
|
|
2642
|
+
loading: l,
|
|
2643
|
+
searchLoading: r,
|
|
2644
|
+
hasMore: c,
|
|
2645
|
+
filterString: o,
|
|
2646
|
+
resolvedDefaults: s,
|
|
2647
|
+
defaultOptionLoading: u,
|
|
2648
|
+
cachedItems: t,
|
|
2649
|
+
open: b,
|
|
2650
|
+
close: O,
|
|
2651
|
+
onInput: V,
|
|
2652
|
+
clearSearch: j,
|
|
2653
|
+
loadMore: p,
|
|
2654
|
+
resolve: ne,
|
|
2655
|
+
refresh: Q
|
|
2656
|
+
};
|
|
2657
|
+
}
|
|
2658
|
+
function $o(e) {
|
|
2659
|
+
let t = [];
|
|
2660
|
+
const n = C(() => {
|
|
2661
|
+
const v = e.mapOptions() === !0 && e.multiple() !== !0, d = e.modelValue() !== void 0 && (e.modelValue() !== null || v === !0) ? e.multiple() === !0 && Array.isArray(e.modelValue()) ? e.modelValue() : [e.modelValue()] : [];
|
|
2662
|
+
if (e.mapOptions() === !0 && Array.isArray(e.displayItems.value) === !0) {
|
|
2663
|
+
const c = e.mapOptions() === !0 && t !== void 0 ? t : [], y = d.map((b) => {
|
|
2664
|
+
const O = e.getOption(b, c, e.resolvedDefaults.value, e.displayItems.value);
|
|
2665
|
+
if (O === b && e.cachedItems.value.length > 0) {
|
|
2666
|
+
const p = e.getOption(b, c, e.resolvedDefaults.value, e.cachedItems.value);
|
|
2667
|
+
if (p !== b) return p;
|
|
2668
|
+
}
|
|
2669
|
+
return O;
|
|
2670
|
+
});
|
|
2671
|
+
return e.modelValue() === null && v === !0 ? y.filter((b) => b !== null) : y;
|
|
2672
|
+
}
|
|
2673
|
+
return d;
|
|
2674
|
+
});
|
|
2675
|
+
X(
|
|
2676
|
+
n,
|
|
2677
|
+
(v) => {
|
|
2678
|
+
t = v;
|
|
2679
|
+
},
|
|
2680
|
+
{ immediate: !0 }
|
|
2681
|
+
);
|
|
2682
|
+
const a = C(() => n.value.map((v) => e.getOptionValue.value(v)));
|
|
2683
|
+
function l(v) {
|
|
2684
|
+
const d = e.getOptionValue.value(v);
|
|
2685
|
+
return a.value.find((c) => Le(c, d)) !== void 0;
|
|
2686
|
+
}
|
|
2687
|
+
const r = C(
|
|
2688
|
+
() => n.value.map((v, d) => ({
|
|
2689
|
+
index: d,
|
|
2690
|
+
opt: v,
|
|
2691
|
+
selected: !0,
|
|
2692
|
+
toggleOption: u,
|
|
2693
|
+
removeAtIndex: f
|
|
2694
|
+
}))
|
|
2695
|
+
), o = C(() => e.fieldValueIsFilled(n.value)), s = C(() => e.displayItems.value.map((v, d) => ({
|
|
2696
|
+
index: d,
|
|
2697
|
+
opt: v,
|
|
2698
|
+
selected: l(v) === !0,
|
|
2699
|
+
label: e.getOptionLabel.value(v),
|
|
2700
|
+
toggleOption: u
|
|
2701
|
+
})));
|
|
2702
|
+
function u(v) {
|
|
2703
|
+
if (v === void 0)
|
|
2704
|
+
return;
|
|
2705
|
+
const d = e.getOptionValue.value(v);
|
|
2706
|
+
if (e.multiple() !== !0) {
|
|
2707
|
+
(n.value.length === 0 || Le(e.getOptionValue.value(n.value[0]), d) !== !0) && e.emit.updateModelValue(e.emitValue() === !0 ? d : v), e.isOpened.value = !1, e.emit.close();
|
|
2708
|
+
return;
|
|
2709
|
+
}
|
|
2710
|
+
if (n.value.length === 0) {
|
|
2711
|
+
const b = e.emitValue() === !0 ? d : v;
|
|
2712
|
+
e.emit.updateModelValue(e.multiple() === !0 ? [b] : b);
|
|
2713
|
+
return;
|
|
2714
|
+
}
|
|
2715
|
+
const c = e.modelValue().slice(), y = a.value.findIndex((b) => Le(b, d));
|
|
2716
|
+
if (y > -1)
|
|
2717
|
+
c.splice(y, 1);
|
|
2718
|
+
else {
|
|
2719
|
+
const b = e.emitValue() === !0 ? d : v;
|
|
2720
|
+
c.push(b);
|
|
2721
|
+
}
|
|
2722
|
+
e.emit.updateModelValue(c), e.isOpened.value && e.popperUpdate();
|
|
2723
|
+
}
|
|
2724
|
+
function f(v) {
|
|
2725
|
+
if (v > -1 && v < n.value.length)
|
|
2726
|
+
if (e.multiple() === !0) {
|
|
2727
|
+
const d = e.modelValue().slice();
|
|
2728
|
+
d.splice(v, 1), e.emit.updateModelValue(d);
|
|
2729
|
+
} else
|
|
2730
|
+
e.emit.updateModelValue(null);
|
|
2731
|
+
}
|
|
2732
|
+
function m() {
|
|
2733
|
+
if (e.multiple()) {
|
|
2734
|
+
e.emit.updateModelValue([]);
|
|
2735
|
+
return;
|
|
2736
|
+
}
|
|
2737
|
+
e.emit.updateModelValue(null);
|
|
2738
|
+
}
|
|
2739
|
+
return {
|
|
2740
|
+
innerValue: n,
|
|
2741
|
+
selectedScope: r,
|
|
2742
|
+
hasValue: o,
|
|
2743
|
+
innerOptionsValue: a,
|
|
2744
|
+
optionScope: s,
|
|
2745
|
+
toggleOption: u,
|
|
2746
|
+
removeAtIndex: f,
|
|
2747
|
+
isOptionSelected: l,
|
|
2748
|
+
onReset: m
|
|
2749
|
+
};
|
|
2750
|
+
}
|
|
2751
|
+
const Oo = { class: "vc-select__control" }, Eo = {
|
|
2752
|
+
key: 0,
|
|
2753
|
+
class: "vc-select__prepend"
|
|
2754
|
+
}, Co = { class: "vc-select__field" }, Bo = { class: "vc-select__field-inner" }, Lo = { class: "vc-select__field-content" }, Ro = {
|
|
2755
|
+
key: 0,
|
|
2756
|
+
class: "vc-select__prepend-inner"
|
|
2757
|
+
}, xo = { class: "vc-select__field-main" }, To = {
|
|
2758
|
+
key: 0,
|
|
2759
|
+
class: "vc-select__prefix"
|
|
2760
|
+
}, Mo = ["aria-expanded", "aria-controls", "aria-labelledby", "aria-describedby", "aria-required", "aria-invalid"], Ao = {
|
|
2761
|
+
key: 0,
|
|
2762
|
+
class: "vc-select__placeholder"
|
|
2763
|
+
}, Vo = {
|
|
2764
|
+
key: 1,
|
|
2765
|
+
class: "vc-select__selected"
|
|
2766
|
+
}, Do = { class: "vc-select__multiple-item" }, No = {
|
|
2767
|
+
key: 0,
|
|
2768
|
+
class: "vc-select__loading"
|
|
2769
|
+
}, Fo = { key: 1 }, zo = ["aria-label", "onClick", "onKeydown"], Po = {
|
|
2770
|
+
key: 0,
|
|
2771
|
+
class: "vc-select__loading"
|
|
2772
|
+
}, qo = {
|
|
2773
|
+
key: 1,
|
|
2774
|
+
class: "vc-select__suffix"
|
|
2775
|
+
}, Ko = ["aria-label"], Uo = {
|
|
2776
|
+
key: 1,
|
|
2777
|
+
class: "vc-select__append-inner"
|
|
2778
|
+
}, Wo = {
|
|
2779
|
+
key: 2,
|
|
2780
|
+
class: "vc-select__loading-icon"
|
|
2781
|
+
}, jo = ["aria-label"], Ho = { class: "vc-select__chevron" }, Go = { class: "vc-select__hint-error" }, Jo = { key: 0 }, Yo = { key: 1 }, Xo = {
|
|
2782
|
+
key: 1,
|
|
2783
|
+
class: "vc-select__append"
|
|
2784
|
+
}, Zo = /* @__PURE__ */ G({
|
|
2785
|
+
__name: "SelectTrigger",
|
|
2786
|
+
props: {
|
|
2787
|
+
isOpened: { type: Boolean },
|
|
2788
|
+
hasValue: { type: Boolean },
|
|
2789
|
+
selectedScope: {},
|
|
2790
|
+
multiple: { type: Boolean },
|
|
2791
|
+
loading: { type: Boolean },
|
|
2792
|
+
disabled: { type: Boolean },
|
|
2793
|
+
clearable: { type: Boolean },
|
|
2794
|
+
placeholder: {},
|
|
2795
|
+
prefix: {},
|
|
2796
|
+
suffix: {},
|
|
2797
|
+
size: {},
|
|
2798
|
+
error: { type: Boolean },
|
|
2799
|
+
errorMessage: {},
|
|
2800
|
+
hint: {},
|
|
2801
|
+
listLoading: { type: Boolean },
|
|
2802
|
+
defaultOptionLoading: { type: Boolean },
|
|
2803
|
+
listboxId: {},
|
|
2804
|
+
labelId: {},
|
|
2805
|
+
label: {},
|
|
2806
|
+
ariaDescribedBy: {},
|
|
2807
|
+
ariaRequired: { type: Boolean },
|
|
2808
|
+
errorId: {},
|
|
2809
|
+
hintId: {},
|
|
2810
|
+
toggleDropdown: { type: Function },
|
|
2811
|
+
getOptionLabel: { type: Function },
|
|
2812
|
+
getEmittingOptionValue: { type: Function }
|
|
2813
|
+
},
|
|
2814
|
+
emits: ["focus", "blur", "reset", "removeAtIndex"],
|
|
2815
|
+
setup(e, { expose: t }) {
|
|
2816
|
+
const { t: n } = nt({ useScope: "global" }), a = S(null);
|
|
2817
|
+
return t({
|
|
2818
|
+
toggleRef: a
|
|
2819
|
+
}), (l, r) => (g(), h("div", {
|
|
2820
|
+
ref_key: "toggleRef",
|
|
2821
|
+
ref: a,
|
|
2822
|
+
class: "vc-select__dropdown-toggle"
|
|
2823
|
+
}, [
|
|
2824
|
+
B(l.$slots, "control", {
|
|
2825
|
+
toggleHandler: e.toggleDropdown,
|
|
2826
|
+
isOpened: e.isOpened
|
|
2827
|
+
}, () => [
|
|
2828
|
+
L("div", Oo, [
|
|
2829
|
+
l.$slots.prepend ? (g(), h("div", Eo, [
|
|
2830
|
+
B(l.$slots, "prepend")
|
|
2831
|
+
])) : w("", !0),
|
|
2832
|
+
L("div", {
|
|
2833
|
+
class: Z(["vc-select__field-wrapper", {
|
|
2834
|
+
"vc-select__field-wrapper--default": e.size === "default",
|
|
2835
|
+
"vc-select__field-wrapper--small": e.size === "small"
|
|
2836
|
+
}])
|
|
2837
|
+
}, [
|
|
2838
|
+
L("div", Co, [
|
|
2839
|
+
L("div", Bo, [
|
|
2840
|
+
L("div", Lo, [
|
|
2841
|
+
l.$slots["prepend-inner"] ? (g(), h("div", Ro, [
|
|
2842
|
+
B(l.$slots, "prepend-inner")
|
|
2843
|
+
])) : w("", !0),
|
|
2844
|
+
L("div", xo, [
|
|
2845
|
+
e.prefix ? (g(), h("div", To, N(e.prefix), 1)) : w("", !0),
|
|
2846
|
+
L("div", {
|
|
2847
|
+
"data-test-id": "dropdown-toggle",
|
|
2848
|
+
class: "vc-select__input",
|
|
2849
|
+
role: "combobox",
|
|
2850
|
+
tabindex: "0",
|
|
2851
|
+
"aria-expanded": e.isOpened,
|
|
2852
|
+
"aria-haspopup": "listbox",
|
|
2853
|
+
"aria-controls": e.isOpened ? e.listboxId : void 0,
|
|
2854
|
+
"aria-labelledby": e.label ? e.labelId : void 0,
|
|
2855
|
+
"aria-describedby": e.ariaDescribedBy,
|
|
2856
|
+
"aria-required": e.ariaRequired,
|
|
2857
|
+
"aria-invalid": e.error || void 0,
|
|
2858
|
+
onClick: r[0] || (r[0] = Y(
|
|
2859
|
+
//@ts-ignore
|
|
2860
|
+
(...o) => e.toggleDropdown && e.toggleDropdown(...o),
|
|
2861
|
+
["stop"]
|
|
2862
|
+
)),
|
|
2863
|
+
onKeydown: [
|
|
2864
|
+
r[1] || (r[1] = _(Y(
|
|
2865
|
+
//@ts-ignore
|
|
2866
|
+
(...o) => e.toggleDropdown && e.toggleDropdown(...o),
|
|
2867
|
+
["stop"]
|
|
2868
|
+
), ["enter"])),
|
|
2869
|
+
r[2] || (r[2] = _(Y(
|
|
2870
|
+
//@ts-ignore
|
|
2871
|
+
(...o) => e.toggleDropdown && e.toggleDropdown(...o),
|
|
2872
|
+
["stop"]
|
|
2873
|
+
), ["space"]))
|
|
2874
|
+
],
|
|
2875
|
+
onFocus: r[3] || (r[3] = (o) => l.$emit("focus")),
|
|
2876
|
+
onBlur: r[4] || (r[4] = (o) => l.$emit("blur"))
|
|
2877
|
+
}, [
|
|
2878
|
+
e.hasValue ? e.selectedScope && e.selectedScope.length && e.hasValue ? (g(), h("div", Vo, [
|
|
2879
|
+
(g(!0), h(ke, null, _e(e.selectedScope, (o, s) => (g(), h("div", {
|
|
2880
|
+
key: s,
|
|
2881
|
+
class: "vc-select__selected-item"
|
|
2882
|
+
}, [
|
|
2883
|
+
e.multiple ? B(l.$slots, "selected-item", ae({
|
|
2884
|
+
key: 0,
|
|
2885
|
+
ref_for: !0
|
|
2886
|
+
}, o), () => [
|
|
2887
|
+
L("div", Do, [
|
|
2888
|
+
e.loading ? (g(), h("span", No, N(i(n)("COMPONENTS.MOLECULES.VC_SELECT.LOADING")), 1)) : (g(), h("span", Fo, N(e.getOptionLabel(o.opt)), 1)),
|
|
2889
|
+
e.disabled ? w("", !0) : (g(), h("button", {
|
|
2890
|
+
key: 2,
|
|
2891
|
+
type: "button",
|
|
2892
|
+
class: "vc-select__chip-remove",
|
|
2893
|
+
"aria-label": `Remove ${e.getOptionLabel(o.opt) || ""}`,
|
|
2894
|
+
tabindex: "0",
|
|
2895
|
+
onClick: Y((u) => l.$emit("removeAtIndex", o.index), ["stop"]),
|
|
2896
|
+
onKeydown: _(Y((u) => l.$emit("removeAtIndex", o.index), ["stop", "prevent"]), ["enter"])
|
|
2897
|
+
}, [
|
|
2898
|
+
T(i(W), {
|
|
2899
|
+
class: "vc-select__icon-remove",
|
|
2900
|
+
icon: "lucide-x",
|
|
2901
|
+
size: "xs"
|
|
2902
|
+
})
|
|
2903
|
+
], 40, zo))
|
|
2904
|
+
])
|
|
2905
|
+
]) : e.multiple ? w("", !0) : (g(), h(ke, { key: 1 }, [
|
|
2906
|
+
e.loading ? (g(), h("span", Po, N(i(n)("COMPONENTS.MOLECULES.VC_SELECT.LOADING")), 1)) : B(l.$slots, "selected-item", ae({
|
|
2907
|
+
key: 1,
|
|
2908
|
+
ref_for: !0
|
|
2909
|
+
}, o), () => [
|
|
2910
|
+
ee(N(e.loading ? i(n)("COMPONENTS.MOLECULES.VC_SELECT.LOADING") : e.getEmittingOptionValue(o.opt)), 1)
|
|
2911
|
+
])
|
|
2912
|
+
], 64))
|
|
2913
|
+
]))), 128))
|
|
2914
|
+
])) : w("", !0) : (g(), h("div", Ao, [
|
|
2915
|
+
e.placeholder ? (g(), h(ke, { key: 0 }, [
|
|
2916
|
+
ee(N(e.placeholder), 1)
|
|
2917
|
+
], 64)) : (g(), h(ke, { key: 1 }, [
|
|
2918
|
+
ee(N(i(n)("COMPONENTS.MOLECULES.VC_SELECT.CLICK_TO_SELECT")), 1)
|
|
2919
|
+
], 64))
|
|
2920
|
+
]))
|
|
2921
|
+
], 40, Mo),
|
|
2922
|
+
e.suffix ? (g(), h("div", qo, N(e.suffix), 1)) : w("", !0),
|
|
2923
|
+
e.clearable && e.hasValue && !e.disabled ? (g(), h("div", {
|
|
2924
|
+
key: 2,
|
|
2925
|
+
class: "vc-select__clear",
|
|
2926
|
+
role: "button",
|
|
2927
|
+
"aria-label": l.$t("COMPONENTS.CONTROLS.CLEAR_SELECTION"),
|
|
2928
|
+
tabindex: "0",
|
|
2929
|
+
onClick: r[5] || (r[5] = (o) => l.$emit("reset")),
|
|
2930
|
+
onKeydown: [
|
|
2931
|
+
r[6] || (r[6] = _((o) => l.$emit("reset"), ["enter"])),
|
|
2932
|
+
r[7] || (r[7] = _((o) => l.$emit("reset"), ["space"]))
|
|
2933
|
+
]
|
|
2934
|
+
}, [
|
|
2935
|
+
T(i(W), {
|
|
2936
|
+
size: "xs",
|
|
2937
|
+
icon: "lucide-x"
|
|
2938
|
+
})
|
|
2939
|
+
], 40, Ko)) : w("", !0)
|
|
2940
|
+
]),
|
|
2941
|
+
l.$slots["append-inner"] ? (g(), h("div", Uo, [
|
|
2942
|
+
B(l.$slots, "append-inner")
|
|
2943
|
+
])) : w("", !0),
|
|
2944
|
+
e.loading || e.listLoading || e.defaultOptionLoading ? (g(), h("div", Wo, [
|
|
2945
|
+
T(i(W), {
|
|
2946
|
+
icon: "lucide-loader-2",
|
|
2947
|
+
class: "tw-animate-spin",
|
|
2948
|
+
size: "m"
|
|
2949
|
+
})
|
|
2950
|
+
])) : w("", !0),
|
|
2951
|
+
e.disabled ? w("", !0) : (g(), h("div", {
|
|
2952
|
+
key: 3,
|
|
2953
|
+
class: "vc-select__chevron-container",
|
|
2954
|
+
role: "button",
|
|
2955
|
+
"aria-label": l.$t("COMPONENTS.CONTROLS.TOGGLE_DROPDOWN"),
|
|
2956
|
+
tabindex: "0",
|
|
2957
|
+
onClick: r[8] || (r[8] = Y(
|
|
2958
|
+
//@ts-ignore
|
|
2959
|
+
(...o) => e.toggleDropdown && e.toggleDropdown(...o),
|
|
2960
|
+
["stop"]
|
|
2961
|
+
)),
|
|
2962
|
+
onKeydown: [
|
|
2963
|
+
r[9] || (r[9] = _(Y(
|
|
2964
|
+
//@ts-ignore
|
|
2965
|
+
(...o) => e.toggleDropdown && e.toggleDropdown(...o),
|
|
2966
|
+
["stop"]
|
|
2967
|
+
), ["enter"])),
|
|
2968
|
+
r[10] || (r[10] = _(Y(
|
|
2969
|
+
//@ts-ignore
|
|
2970
|
+
(...o) => e.toggleDropdown && e.toggleDropdown(...o),
|
|
2971
|
+
["stop"]
|
|
2972
|
+
), ["space"]))
|
|
2973
|
+
]
|
|
2974
|
+
}, [
|
|
2975
|
+
L("div", Ho, [
|
|
2976
|
+
T(i(W), {
|
|
2977
|
+
size: "s",
|
|
2978
|
+
icon: "lucide-chevron-down"
|
|
2979
|
+
})
|
|
2980
|
+
])
|
|
2981
|
+
], 40, jo))
|
|
2982
|
+
])
|
|
2983
|
+
])
|
|
2984
|
+
]),
|
|
2985
|
+
L("div", Go, [
|
|
2986
|
+
T(Re, {
|
|
2987
|
+
name: "slide-up",
|
|
2988
|
+
mode: "out-in"
|
|
2989
|
+
}, {
|
|
2990
|
+
default: E(() => [
|
|
2991
|
+
e.error && e.errorMessage ? (g(), h("div", Jo, [
|
|
2992
|
+
B(l.$slots, "error", {}, () => [
|
|
2993
|
+
T(i(ue), {
|
|
2994
|
+
id: e.errorId,
|
|
2995
|
+
class: "vc-select__error-message",
|
|
2996
|
+
error: !0
|
|
2997
|
+
}, {
|
|
2998
|
+
default: E(() => [
|
|
2999
|
+
ee(N(e.errorMessage), 1)
|
|
3000
|
+
]),
|
|
3001
|
+
_: 1
|
|
3002
|
+
}, 8, ["id"])
|
|
3003
|
+
])
|
|
3004
|
+
])) : (g(), h("div", Yo, [
|
|
3005
|
+
B(l.$slots, "hint", {}, () => [
|
|
3006
|
+
e.hint ? (g(), P(i(ue), {
|
|
3007
|
+
key: 0,
|
|
3008
|
+
id: e.hintId,
|
|
3009
|
+
class: "vc-select__hint"
|
|
3010
|
+
}, {
|
|
3011
|
+
default: E(() => [
|
|
3012
|
+
ee(N(e.hint), 1)
|
|
3013
|
+
]),
|
|
3014
|
+
_: 1
|
|
3015
|
+
}, 8, ["id"])) : w("", !0)
|
|
3016
|
+
])
|
|
3017
|
+
]))
|
|
3018
|
+
]),
|
|
3019
|
+
_: 3
|
|
3020
|
+
})
|
|
3021
|
+
])
|
|
3022
|
+
], 2),
|
|
3023
|
+
l.$slots.append ? (g(), h("div", Xo, [
|
|
3024
|
+
B(l.$slots, "append")
|
|
3025
|
+
])) : w("", !0)
|
|
3026
|
+
])
|
|
3027
|
+
])
|
|
3028
|
+
], 512));
|
|
3029
|
+
}
|
|
3030
|
+
}), Qo = ["id", "aria-label"], _o = ["aria-label"], el = ["aria-selected", "data-index", "onClick", "onKeydown"], tl = {
|
|
3031
|
+
key: 0,
|
|
3032
|
+
class: "vc-select__check-icon"
|
|
3033
|
+
}, nl = {
|
|
3034
|
+
key: 0,
|
|
3035
|
+
class: "vc-select__list-loading-indicator"
|
|
3036
|
+
}, al = { class: "tw-ml-1" }, ol = {
|
|
3037
|
+
key: 1,
|
|
3038
|
+
class: "vc-select__no-options"
|
|
3039
|
+
}, ll = { class: "vc-select__no-options-text" }, il = /* @__PURE__ */ G({
|
|
3040
|
+
__name: "SelectDropdown",
|
|
3041
|
+
props: {
|
|
3042
|
+
isOpened: { type: Boolean },
|
|
3043
|
+
listboxId: {},
|
|
3044
|
+
ariaLabel: {},
|
|
3045
|
+
dropdownStyle: {},
|
|
3046
|
+
searchable: { type: Boolean },
|
|
3047
|
+
optionScope: {},
|
|
3048
|
+
listLoading: { type: Boolean },
|
|
3049
|
+
optionsListLength: {},
|
|
3050
|
+
hasNextPage: { type: Boolean },
|
|
3051
|
+
dropdownToggleRef: {}
|
|
3052
|
+
},
|
|
3053
|
+
emits: ["input", "clickOutside"],
|
|
3054
|
+
setup(e, { expose: t, emit: n }) {
|
|
3055
|
+
const a = e, l = n, { t: r } = nt({ useScope: "global" }), { teleportTarget: o } = dn(), s = S(null), u = S(null), f = S(null), m = S(null), v = C(() => f.value?.viewportRef ?? null);
|
|
3056
|
+
function d(c) {
|
|
3057
|
+
const y = v.value;
|
|
3058
|
+
if (!y) return;
|
|
3059
|
+
if (y.contains(c.target)) {
|
|
3060
|
+
const O = y.scrollTop <= 0 && c.deltaY < 0, p = Math.ceil(y.scrollTop) >= y.scrollHeight - y.clientHeight && c.deltaY > 0;
|
|
3061
|
+
(O || p) && c.preventDefault();
|
|
3062
|
+
} else
|
|
3063
|
+
c.preventDefault(), y.scrollTop += c.deltaY;
|
|
3064
|
+
f.value?.updateScrollState();
|
|
3065
|
+
}
|
|
3066
|
+
return X(
|
|
3067
|
+
() => a.isOpened,
|
|
3068
|
+
(c) => {
|
|
3069
|
+
c && ye(() => f.value?.updateScrollState());
|
|
3070
|
+
}
|
|
3071
|
+
), X(
|
|
3072
|
+
() => a.optionScope.length,
|
|
3073
|
+
() => {
|
|
3074
|
+
a.isOpened && ye(() => f.value?.updateScrollState());
|
|
3075
|
+
}
|
|
3076
|
+
), t({
|
|
3077
|
+
dropdownElRef: s,
|
|
3078
|
+
searchInputRef: u,
|
|
3079
|
+
viewportRef: v,
|
|
3080
|
+
loadMoreRef: m
|
|
3081
|
+
}), (c, y) => (g(), P(Xt, { to: i(o) }, [
|
|
3082
|
+
T(Re, { name: "select-dropdown" }, {
|
|
3083
|
+
default: E(() => [
|
|
3084
|
+
e.isOpened ? et((g(), h("div", {
|
|
3085
|
+
key: 0,
|
|
3086
|
+
id: e.listboxId,
|
|
3087
|
+
ref_key: "dropdownElRef",
|
|
3088
|
+
ref: s,
|
|
3089
|
+
"data-test-id": "dropdown",
|
|
3090
|
+
class: "vc-select__dropdown",
|
|
3091
|
+
role: "listbox",
|
|
3092
|
+
"aria-label": e.ariaLabel,
|
|
3093
|
+
style: De(e.dropdownStyle),
|
|
3094
|
+
onWheel: d
|
|
3095
|
+
}, [
|
|
3096
|
+
e.searchable ? (g(), h("input", {
|
|
3097
|
+
key: 0,
|
|
3098
|
+
ref_key: "searchInputRef",
|
|
3099
|
+
ref: u,
|
|
3100
|
+
class: "vc-select__search-input",
|
|
3101
|
+
tabindex: "0",
|
|
3102
|
+
"aria-label": c.$t("COMPONENTS.CONTROLS.SEARCH_OPTIONS"),
|
|
3103
|
+
autocomplete: "off",
|
|
3104
|
+
onInput: y[0] || (y[0] = (b) => l("input", b)),
|
|
3105
|
+
onKeydown: [
|
|
3106
|
+
y[1] || (y[1] = _(Y(() => {
|
|
3107
|
+
}, ["stop"]), ["space"])),
|
|
3108
|
+
y[2] || (y[2] = _(Y(() => {
|
|
3109
|
+
}, ["stop"]), ["enter"]))
|
|
3110
|
+
]
|
|
3111
|
+
}, null, 40, _o)) : w("", !0),
|
|
3112
|
+
T(i(Ea), {
|
|
3113
|
+
ref_key: "scrollContainerRef",
|
|
3114
|
+
ref: f,
|
|
3115
|
+
class: "vc-select__scroll-container"
|
|
3116
|
+
}, {
|
|
3117
|
+
default: E(() => [
|
|
3118
|
+
(g(!0), h(ke, null, _e(e.optionScope, (b, O) => (g(), h("div", {
|
|
3119
|
+
key: O,
|
|
3120
|
+
class: Z(["vc-select__option", { "vc-select__option--selected": b.selected }]),
|
|
3121
|
+
"data-test-id": "option",
|
|
3122
|
+
role: "option",
|
|
3123
|
+
"aria-selected": b.selected,
|
|
3124
|
+
tabindex: "0",
|
|
3125
|
+
"data-index": O,
|
|
3126
|
+
onClick: (p) => b.toggleOption(b.opt),
|
|
3127
|
+
onKeydown: [
|
|
3128
|
+
_((p) => b.toggleOption(b.opt), ["enter"]),
|
|
3129
|
+
_((p) => b.toggleOption(b.opt), ["space"])
|
|
3130
|
+
]
|
|
3131
|
+
}, [
|
|
3132
|
+
B(c.$slots, "option", ae({ ref_for: !0 }, b), () => [
|
|
3133
|
+
ee(N(b.label), 1)
|
|
3134
|
+
]),
|
|
3135
|
+
b.selected ? (g(), h("span", tl, [
|
|
3136
|
+
T(i(W), {
|
|
3137
|
+
icon: "lucide-check",
|
|
3138
|
+
size: "xs"
|
|
3139
|
+
})
|
|
3140
|
+
])) : w("", !0)
|
|
3141
|
+
], 42, el))), 128)),
|
|
3142
|
+
e.listLoading ? (g(), h("div", nl, [
|
|
3143
|
+
T(i(W), {
|
|
3144
|
+
icon: "lucide-loader-2",
|
|
3145
|
+
class: "tw-animate-spin",
|
|
3146
|
+
size: "m"
|
|
3147
|
+
}),
|
|
3148
|
+
L("span", al, N(e.optionsListLength > 0 ? i(r)("COMPONENTS.MOLECULES.VC_SELECT.LOADING_MORE") : i(r)("COMPONENTS.MOLECULES.VC_SELECT.LOADING")), 1)
|
|
3149
|
+
])) : w("", !0),
|
|
3150
|
+
!e.listLoading && !e.optionsListLength ? (g(), h("div", ol, [
|
|
3151
|
+
B(c.$slots, "no-options", {}, () => [
|
|
3152
|
+
L("span", ll, N(i(r)("COMPONENTS.MOLECULES.VC_SELECT.NO_OPTIONS")), 1)
|
|
3153
|
+
])
|
|
3154
|
+
])) : w("", !0),
|
|
3155
|
+
e.hasNextPage && !e.listLoading ? (g(), h("span", {
|
|
3156
|
+
key: 2,
|
|
3157
|
+
ref_key: "loadMoreRef",
|
|
3158
|
+
ref: m,
|
|
3159
|
+
class: "vc-select__load-more-trigger"
|
|
3160
|
+
}, null, 512)) : w("", !0)
|
|
3161
|
+
]),
|
|
3162
|
+
_: 3
|
|
3163
|
+
}, 512)
|
|
3164
|
+
], 44, Qo)), [
|
|
3165
|
+
[i(On), [() => l("clickOutside"), { ignore: [e.dropdownToggleRef] }]]
|
|
3166
|
+
]) : w("", !0)
|
|
3167
|
+
]),
|
|
3168
|
+
_: 3
|
|
3169
|
+
})
|
|
3170
|
+
], 8, ["to"]));
|
|
3171
|
+
}
|
|
3172
|
+
}), rl = ["innerHTML"], sl = { class: "vc-select__field-container" }, ul = /* @__PURE__ */ G({
|
|
3173
|
+
inheritAttrs: !1,
|
|
3174
|
+
__name: "vc-select",
|
|
3175
|
+
props: {
|
|
3176
|
+
label: {},
|
|
3177
|
+
tooltip: {},
|
|
3178
|
+
disabled: { type: Boolean },
|
|
3179
|
+
required: { type: Boolean },
|
|
3180
|
+
name: { default: "Field" },
|
|
3181
|
+
error: { type: Boolean },
|
|
3182
|
+
errorMessage: {},
|
|
3183
|
+
mapOptions: { type: Boolean, default: !0 },
|
|
3184
|
+
hint: {},
|
|
3185
|
+
prefix: {},
|
|
3186
|
+
suffix: {},
|
|
3187
|
+
loading: { type: Boolean },
|
|
3188
|
+
clearable: { type: Boolean, default: !0 },
|
|
3189
|
+
multiple: { type: Boolean },
|
|
3190
|
+
options: { type: [Function, Array], default: () => [] },
|
|
3191
|
+
optionValue: { type: [Function, String], default: "id" },
|
|
3192
|
+
optionLabel: { type: [Function, String], default: "title" },
|
|
3193
|
+
debounce: { default: 500 },
|
|
3194
|
+
placeholder: {},
|
|
3195
|
+
searchable: { type: Boolean },
|
|
3196
|
+
multilanguage: { type: Boolean },
|
|
3197
|
+
currentLanguage: {},
|
|
3198
|
+
size: { default: "default" },
|
|
3199
|
+
outline: { type: Boolean, default: !0 },
|
|
3200
|
+
placement: { default: "bottom" },
|
|
3201
|
+
modelValue: {},
|
|
3202
|
+
emitValue: { type: Boolean, default: !0 }
|
|
3203
|
+
},
|
|
3204
|
+
emits: ["update:modelValue", "search", "close"],
|
|
3205
|
+
setup(e, { emit: t }) {
|
|
3206
|
+
const n = e, a = bt(), l = C(() => {
|
|
3207
|
+
const { class: x, ...J } = a;
|
|
3208
|
+
return J;
|
|
3209
|
+
}), r = t, { t: o } = nt({ useScope: "global" }), s = he(), {
|
|
3210
|
+
fieldId: u,
|
|
3211
|
+
labelId: f,
|
|
3212
|
+
errorId: m,
|
|
3213
|
+
hintId: v,
|
|
3214
|
+
invalid: d,
|
|
3215
|
+
resolvedDisabled: c,
|
|
3216
|
+
resolvedName: y,
|
|
3217
|
+
ariaRequired: b,
|
|
3218
|
+
ariaDescribedBy: O
|
|
3219
|
+
} = ze(n), p = C(() => `${u.value}-listbox`), k = S(null), V = S(null), { selectRootRef: j, isSelectVisible: ne, ensureVisibility: Q } = ko(), { getOptionValue: D, getOptionLabel: A, getOption: F, getEmittingOptionValue: K, fieldValueIsFilled: H } = Io({
|
|
3220
|
+
optionValue: () => n.optionValue,
|
|
3221
|
+
optionLabel: () => n.optionLabel
|
|
3222
|
+
}), { isOpened: I, isFocused: R, dropdownToggleRef: q, dropdownRef: te, popper: Me, dropdownStyle: $, toggleDropdown: z } = So({
|
|
3223
|
+
placement: n.placement,
|
|
3224
|
+
outline: () => n.outline,
|
|
3225
|
+
isSelectVisible: ne,
|
|
3226
|
+
selectRootRef: j,
|
|
3227
|
+
disabled: () => n.disabled ?? !1,
|
|
3228
|
+
ensureVisibility: Q
|
|
3229
|
+
});
|
|
3230
|
+
He(() => {
|
|
3231
|
+
q.value = k.value?.toggleRef ?? null;
|
|
3232
|
+
}), He(() => {
|
|
3233
|
+
te.value = V.value?.dropdownElRef ?? null;
|
|
3234
|
+
});
|
|
3235
|
+
const M = wo({
|
|
3236
|
+
options: () => n.options,
|
|
3237
|
+
getOptionValue: D,
|
|
3238
|
+
getOptionLabel: A,
|
|
3239
|
+
isSelectVisible: ne,
|
|
3240
|
+
debounce: () => n.debounce ?? 500,
|
|
3241
|
+
emit: {
|
|
3242
|
+
search: (x) => r("search", x)
|
|
3243
|
+
}
|
|
3244
|
+
}), { selectedScope: Dt, hasValue: Nt, optionScope: $e, removeAtIndex: Ft, onReset: zt } = $o({
|
|
3245
|
+
modelValue: () => n.modelValue,
|
|
3246
|
+
multiple: () => n.multiple,
|
|
3247
|
+
emitValue: () => n.emitValue ?? !0,
|
|
3248
|
+
mapOptions: () => n.mapOptions ?? !0,
|
|
3249
|
+
displayItems: M.displayItems,
|
|
3250
|
+
resolvedDefaults: M.resolvedDefaults,
|
|
3251
|
+
cachedItems: M.cachedItems,
|
|
3252
|
+
getOptionValue: D,
|
|
3253
|
+
getOptionLabel: A,
|
|
3254
|
+
getOption: F,
|
|
3255
|
+
fieldValueIsFilled: H,
|
|
3256
|
+
isOpened: I,
|
|
3257
|
+
popperUpdate: () => Me.update(),
|
|
3258
|
+
emit: {
|
|
3259
|
+
updateModelValue: (x) => r("update:modelValue", x),
|
|
3260
|
+
close: () => r("close")
|
|
3261
|
+
}
|
|
3262
|
+
}), Pt = C(() => V.value?.loadMoreRef ?? null), qt = C(() => V.value?.viewportRef ?? null);
|
|
3263
|
+
yn(
|
|
3264
|
+
Pt,
|
|
3265
|
+
([{ isIntersecting: x }]) => {
|
|
3266
|
+
x && M.hasMore.value && M.loadMore();
|
|
3267
|
+
},
|
|
3268
|
+
{ threshold: 1, root: qt }
|
|
3269
|
+
);
|
|
3270
|
+
const Ke = ho({
|
|
3271
|
+
onEnter: (x) => {
|
|
3272
|
+
const J = parseInt(x.getAttribute("data-index") || "0", 10);
|
|
3273
|
+
$e.value && $e.value[J] && $e.value[J].toggleOption($e.value[J].opt);
|
|
3274
|
+
},
|
|
3275
|
+
onEscape: () => {
|
|
3276
|
+
I.value = !1, r("close"), ye(() => {
|
|
3277
|
+
k.value?.toggleRef?.querySelector('[role="combobox"]')?.focus();
|
|
3278
|
+
});
|
|
3279
|
+
}
|
|
3280
|
+
});
|
|
3281
|
+
function Kt() {
|
|
3282
|
+
I.value = !1, r("close");
|
|
3283
|
+
}
|
|
3284
|
+
return X(I, async (x) => {
|
|
3285
|
+
x ? (await M.open(), ye(() => {
|
|
3286
|
+
Me.update();
|
|
3287
|
+
const J = V.value?.dropdownElRef, le = V.value?.searchInputRef;
|
|
3288
|
+
if (J)
|
|
3289
|
+
if (Ke.initKeyboardNavigation(J), n.searchable && le)
|
|
3290
|
+
le.focus();
|
|
3291
|
+
else {
|
|
3292
|
+
const Oe = J.querySelector(
|
|
3293
|
+
'.vc-select__option[tabindex="0"], .vc-select__search-input[tabindex="0"]'
|
|
3294
|
+
);
|
|
3295
|
+
Oe ? Oe.focus() : Ke.focusFirstElement();
|
|
3296
|
+
}
|
|
3297
|
+
})) : (Ke.cleanupKeyboardNavigation(), M.close());
|
|
3298
|
+
}), X(
|
|
3299
|
+
() => n.modelValue,
|
|
3300
|
+
async (x) => {
|
|
3301
|
+
if (x == null || Array.isArray(x) && x.length === 0) {
|
|
3302
|
+
M.resolvedDefaults.value = [];
|
|
3303
|
+
return;
|
|
3304
|
+
}
|
|
3305
|
+
const J = n.emitValue ?? !0;
|
|
3306
|
+
if (n.mapOptions ?? !0) {
|
|
3307
|
+
const Oe = Array.isArray(x) ? x : [x], ut = J ? Oe : Oe.filter((Ee) => Ee != null && typeof Ee != "object");
|
|
3308
|
+
if (ut.length > 0) {
|
|
3309
|
+
const Ee = ut.filter((Ut) => Ut != null).map(String);
|
|
3310
|
+
Ee.length > 0 && await M.resolve(Ee);
|
|
3311
|
+
}
|
|
3312
|
+
}
|
|
3313
|
+
},
|
|
3314
|
+
{ immediate: !0 }
|
|
3315
|
+
), (x, J) => i(s) ? (g(), h("div", ae({ key: 0 }, l.value, {
|
|
3316
|
+
class: ["vc-select vc-select--skeleton", x.$attrs.class]
|
|
3317
|
+
}), [
|
|
3318
|
+
e.label ? (g(), P(i(oe), {
|
|
3319
|
+
key: 0,
|
|
3320
|
+
variant: "block",
|
|
3321
|
+
width: 60 + (e.label?.length || 0) * 4,
|
|
3322
|
+
height: 11
|
|
3323
|
+
}, null, 8, ["width"])) : w("", !0),
|
|
3324
|
+
T(i(oe), {
|
|
3325
|
+
variant: "block",
|
|
3326
|
+
width: "100%",
|
|
3327
|
+
height: 36
|
|
3328
|
+
})
|
|
3329
|
+
], 16)) : (g(), h("div", ae({
|
|
3330
|
+
key: 1,
|
|
3331
|
+
ref_key: "selectRootRef",
|
|
3332
|
+
ref: j
|
|
3333
|
+
}, l.value, {
|
|
3334
|
+
class: ["vc-select", [
|
|
3335
|
+
x.$attrs.class,
|
|
3336
|
+
{
|
|
3337
|
+
"vc-select--opened": i(I),
|
|
3338
|
+
"vc-select--error": i(d),
|
|
3339
|
+
"vc-select--disabled": i(c),
|
|
3340
|
+
"vc-select--has-hint-or-error": i(d) || e.hint,
|
|
3341
|
+
"vc-select--no-outline": !e.outline,
|
|
3342
|
+
"vc-select--focused": i(R)
|
|
3343
|
+
}
|
|
3344
|
+
]]
|
|
3345
|
+
}), [
|
|
3346
|
+
e.label ? (g(), P(i(qe), {
|
|
3347
|
+
key: 0,
|
|
3348
|
+
id: i(f),
|
|
3349
|
+
class: "vc-select__label",
|
|
3350
|
+
required: e.required,
|
|
3351
|
+
multilanguage: e.multilanguage,
|
|
3352
|
+
"current-language": e.currentLanguage,
|
|
3353
|
+
error: i(d)
|
|
3354
|
+
}, me({
|
|
3355
|
+
default: E(() => [
|
|
3356
|
+
L("span", null, N(e.label), 1)
|
|
3357
|
+
]),
|
|
3358
|
+
_: 2
|
|
3359
|
+
}, [
|
|
3360
|
+
e.tooltip ? {
|
|
3361
|
+
name: "tooltip",
|
|
3362
|
+
fn: E(() => [
|
|
3363
|
+
L("span", {
|
|
3364
|
+
innerHTML: i(En).sanitize(e.tooltip)
|
|
3365
|
+
}, null, 8, rl)
|
|
3366
|
+
]),
|
|
3367
|
+
key: "0"
|
|
3368
|
+
} : void 0
|
|
3369
|
+
]), 1032, ["id", "required", "multilanguage", "current-language", "error"])) : w("", !0),
|
|
3370
|
+
L("div", sl, [
|
|
3371
|
+
T(Zo, {
|
|
3372
|
+
ref_key: "selectTriggerRef",
|
|
3373
|
+
ref: k,
|
|
3374
|
+
"is-opened": i(I),
|
|
3375
|
+
"has-value": i(Nt),
|
|
3376
|
+
"selected-scope": i(Dt),
|
|
3377
|
+
multiple: e.multiple,
|
|
3378
|
+
loading: e.loading,
|
|
3379
|
+
disabled: i(c),
|
|
3380
|
+
clearable: e.clearable,
|
|
3381
|
+
placeholder: e.placeholder,
|
|
3382
|
+
prefix: e.prefix,
|
|
3383
|
+
suffix: e.suffix,
|
|
3384
|
+
size: e.size,
|
|
3385
|
+
error: i(d),
|
|
3386
|
+
"error-message": e.errorMessage,
|
|
3387
|
+
hint: e.hint,
|
|
3388
|
+
"list-loading": i(M).loading.value || i(M).searchLoading.value,
|
|
3389
|
+
"default-option-loading": i(M).defaultOptionLoading.value,
|
|
3390
|
+
"listbox-id": p.value,
|
|
3391
|
+
"label-id": i(f),
|
|
3392
|
+
label: e.label,
|
|
3393
|
+
"aria-described-by": i(O),
|
|
3394
|
+
"aria-required": i(b),
|
|
3395
|
+
"error-id": i(m),
|
|
3396
|
+
"hint-id": i(v),
|
|
3397
|
+
"toggle-dropdown": i(z),
|
|
3398
|
+
"get-option-label": i(A),
|
|
3399
|
+
"get-emitting-option-value": i(K),
|
|
3400
|
+
onFocus: J[0] || (J[0] = (le) => R.value = !0),
|
|
3401
|
+
onBlur: J[1] || (J[1] = (le) => R.value = !1),
|
|
3402
|
+
onReset: i(zt),
|
|
3403
|
+
onRemoveAtIndex: i(Ft)
|
|
3404
|
+
}, me({ _: 2 }, [
|
|
3405
|
+
x.$slots.control ? {
|
|
3406
|
+
name: "control",
|
|
3407
|
+
fn: E((le) => [
|
|
3408
|
+
B(x.$slots, "control", Ce(Be(le)))
|
|
3409
|
+
]),
|
|
3410
|
+
key: "0"
|
|
3411
|
+
} : void 0,
|
|
3412
|
+
x.$slots.prepend ? {
|
|
3413
|
+
name: "prepend",
|
|
3414
|
+
fn: E(() => [
|
|
3415
|
+
B(x.$slots, "prepend")
|
|
3416
|
+
]),
|
|
3417
|
+
key: "1"
|
|
3418
|
+
} : void 0,
|
|
3419
|
+
x.$slots.append ? {
|
|
3420
|
+
name: "append",
|
|
3421
|
+
fn: E(() => [
|
|
3422
|
+
B(x.$slots, "append")
|
|
3423
|
+
]),
|
|
3424
|
+
key: "2"
|
|
3425
|
+
} : void 0,
|
|
3426
|
+
x.$slots["prepend-inner"] ? {
|
|
3427
|
+
name: "prepend-inner",
|
|
3428
|
+
fn: E(() => [
|
|
3429
|
+
B(x.$slots, "prepend-inner")
|
|
3430
|
+
]),
|
|
3431
|
+
key: "3"
|
|
3432
|
+
} : void 0,
|
|
3433
|
+
x.$slots["append-inner"] ? {
|
|
3434
|
+
name: "append-inner",
|
|
3435
|
+
fn: E(() => [
|
|
3436
|
+
B(x.$slots, "append-inner")
|
|
3437
|
+
]),
|
|
3438
|
+
key: "4"
|
|
3439
|
+
} : void 0,
|
|
3440
|
+
x.$slots["selected-item"] ? {
|
|
3441
|
+
name: "selected-item",
|
|
3442
|
+
fn: E((le) => [
|
|
3443
|
+
B(x.$slots, "selected-item", Ce(Be(le)))
|
|
3444
|
+
]),
|
|
3445
|
+
key: "5"
|
|
3446
|
+
} : void 0,
|
|
3447
|
+
x.$slots.error ? {
|
|
3448
|
+
name: "error",
|
|
3449
|
+
fn: E(() => [
|
|
3450
|
+
B(x.$slots, "error")
|
|
3451
|
+
]),
|
|
3452
|
+
key: "6"
|
|
3453
|
+
} : void 0,
|
|
3454
|
+
x.$slots.hint ? {
|
|
3455
|
+
name: "hint",
|
|
3456
|
+
fn: E(() => [
|
|
3457
|
+
B(x.$slots, "hint")
|
|
3458
|
+
]),
|
|
3459
|
+
key: "7"
|
|
3460
|
+
} : void 0
|
|
3461
|
+
]), 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"]),
|
|
3462
|
+
T(il, ae({
|
|
3463
|
+
ref_key: "selectDropdownRef",
|
|
3464
|
+
ref: V,
|
|
3465
|
+
"is-opened": i(I),
|
|
3466
|
+
"listbox-id": p.value
|
|
3467
|
+
}, { ariaLabel: e.label || e.name }, {
|
|
3468
|
+
"dropdown-style": i($),
|
|
3469
|
+
searchable: e.searchable,
|
|
3470
|
+
"option-scope": i($e),
|
|
3471
|
+
"list-loading": i(M).loading.value || i(M).searchLoading.value,
|
|
3472
|
+
"options-list-length": i(M).displayItems.value.length,
|
|
3473
|
+
"has-next-page": i(M).hasMore.value,
|
|
3474
|
+
"dropdown-toggle-ref": k.value?.toggleRef ?? null,
|
|
3475
|
+
onInput: i(M).onInput,
|
|
3476
|
+
onClickOutside: Kt
|
|
3477
|
+
}), me({ _: 2 }, [
|
|
3478
|
+
x.$slots.option ? {
|
|
3479
|
+
name: "option",
|
|
3480
|
+
fn: E((le) => [
|
|
3481
|
+
B(x.$slots, "option", Ce(Be(le)))
|
|
3482
|
+
]),
|
|
3483
|
+
key: "0"
|
|
3484
|
+
} : void 0,
|
|
3485
|
+
x.$slots["no-options"] ? {
|
|
3486
|
+
name: "no-options",
|
|
3487
|
+
fn: E(() => [
|
|
3488
|
+
B(x.$slots, "no-options")
|
|
3489
|
+
]),
|
|
3490
|
+
key: "1"
|
|
3491
|
+
} : void 0
|
|
3492
|
+
]), 1040, ["is-opened", "listbox-id", "dropdown-style", "searchable", "option-scope", "list-loading", "options-list-length", "has-next-page", "dropdown-toggle-ref", "onInput"])
|
|
3493
|
+
])
|
|
3494
|
+
], 16));
|
|
3495
|
+
}
|
|
3496
|
+
}), cl = {
|
|
3497
|
+
key: 0,
|
|
3498
|
+
class: "vc-input-dropdown vc-input-dropdown--skeleton"
|
|
3499
|
+
}, dl = { class: "tw-flex tw-items-center" }, fl = ["aria-label", "aria-expanded", "onClick", "onKeydown"], gl = /* @__PURE__ */ G({
|
|
3500
|
+
__name: "vc-input-dropdown",
|
|
3501
|
+
props: {
|
|
3502
|
+
modelValue: {},
|
|
3503
|
+
prefix: {},
|
|
3504
|
+
suffix: {},
|
|
3505
|
+
debounce: { default: 0 },
|
|
3506
|
+
maxlength: {},
|
|
3507
|
+
option: {},
|
|
3508
|
+
options: {},
|
|
3509
|
+
optionValue: {},
|
|
3510
|
+
optionLabel: {},
|
|
3511
|
+
searchable: { type: Boolean, default: !1 },
|
|
3512
|
+
inputType: { default: "text" },
|
|
3513
|
+
placeholder: {},
|
|
3514
|
+
hint: {},
|
|
3515
|
+
clearable: { type: Boolean },
|
|
3516
|
+
loading: { type: Boolean },
|
|
3517
|
+
autofocus: { type: Boolean },
|
|
3518
|
+
size: {},
|
|
3519
|
+
multilanguage: { type: Boolean },
|
|
3520
|
+
currentLanguage: {},
|
|
3521
|
+
label: {},
|
|
3522
|
+
tooltip: {},
|
|
3523
|
+
disabled: { type: Boolean },
|
|
3524
|
+
required: { type: Boolean },
|
|
3525
|
+
name: {},
|
|
3526
|
+
error: { type: Boolean },
|
|
3527
|
+
errorMessage: {}
|
|
3528
|
+
},
|
|
3529
|
+
emits: ["update:model-value", "update:option", "change", "blur"],
|
|
3530
|
+
setup(e) {
|
|
3531
|
+
const t = he();
|
|
3532
|
+
return (n, a) => i(t) ? (g(), h("div", cl, [
|
|
3533
|
+
e.label ? (g(), P(i(oe), {
|
|
3534
|
+
key: 0,
|
|
3535
|
+
variant: "block",
|
|
3536
|
+
width: 60 + (e.label?.length || 0) * 4,
|
|
3537
|
+
height: 11
|
|
3538
|
+
}, null, 8, ["width"])) : w("", !0),
|
|
3539
|
+
T(i(oe), {
|
|
3540
|
+
variant: "block",
|
|
3541
|
+
width: "100%",
|
|
3542
|
+
height: 36
|
|
3543
|
+
})
|
|
3544
|
+
])) : (g(), P(i(ul), {
|
|
3545
|
+
key: 1,
|
|
3546
|
+
class: "vc-input-dropdown",
|
|
3547
|
+
options: e.options,
|
|
3548
|
+
"option-label": e.optionLabel,
|
|
3549
|
+
"option-value": e.optionValue,
|
|
3550
|
+
searchable: e.searchable,
|
|
3551
|
+
debounce: e.debounce,
|
|
3552
|
+
disabled: e.disabled,
|
|
3553
|
+
label: e.label,
|
|
3554
|
+
required: e.required,
|
|
3555
|
+
"model-value": e.option,
|
|
3556
|
+
tooltip: e.tooltip,
|
|
3557
|
+
multilanguage: e.multilanguage,
|
|
3558
|
+
"current-language": e.currentLanguage,
|
|
3559
|
+
"onUpdate:modelValue": a[2] || (a[2] = (l) => n.$emit("update:option", l))
|
|
3560
|
+
}, {
|
|
3561
|
+
option: E((l) => [
|
|
3562
|
+
B(n.$slots, "option", Ce(Be(l)))
|
|
3563
|
+
]),
|
|
3564
|
+
control: E(({ toggleHandler: l, isOpened: r }) => [
|
|
3565
|
+
T(i(bo), {
|
|
3566
|
+
placeholder: e.placeholder,
|
|
3567
|
+
hint: e.hint,
|
|
3568
|
+
clearable: e.clearable,
|
|
3569
|
+
prefix: e.prefix,
|
|
3570
|
+
suffix: e.suffix,
|
|
3571
|
+
name: e.name,
|
|
3572
|
+
"model-value": e.modelValue,
|
|
3573
|
+
loading: e.loading,
|
|
3574
|
+
disabled: e.disabled,
|
|
3575
|
+
autofocus: e.autofocus,
|
|
3576
|
+
error: e.error,
|
|
3577
|
+
"error-message": e.errorMessage,
|
|
3578
|
+
maxlength: e.maxlength,
|
|
3579
|
+
type: e.inputType,
|
|
3580
|
+
class: "vc-input-dropdown__input",
|
|
3581
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => n.$emit("update:model-value", o)),
|
|
3582
|
+
onBlur: a[1] || (a[1] = (o) => n.$emit("blur", o))
|
|
3583
|
+
}, me({
|
|
3584
|
+
"append-inner": E(() => [
|
|
3585
|
+
L("div", dl, [
|
|
3586
|
+
B(n.$slots, "button", { toggleHandler: l }, () => [
|
|
3587
|
+
e.options && e.options.length ? (g(), h("button", {
|
|
3588
|
+
key: 0,
|
|
3589
|
+
type: "button",
|
|
3590
|
+
class: "vc-input-dropdown__toggle-button",
|
|
3591
|
+
tabindex: "0",
|
|
3592
|
+
"aria-label": n.$t("COMPONENTS.CONTROLS.SELECT_OPTION"),
|
|
3593
|
+
"aria-expanded": r,
|
|
3594
|
+
"aria-haspopup": "listbox",
|
|
3595
|
+
onClick: Y(l, ["stop", "prevent"]),
|
|
3596
|
+
onKeydown: [
|
|
3597
|
+
_(Y(l, ["stop", "prevent"]), ["enter"]),
|
|
3598
|
+
_(Y(l, ["stop", "prevent"]), ["space"])
|
|
3599
|
+
]
|
|
3600
|
+
}, N(i(e.option)), 41, fl)) : w("", !0)
|
|
3601
|
+
]),
|
|
3602
|
+
e.options && e.options.length ? (g(), P(i(da), {
|
|
3603
|
+
key: 0,
|
|
3604
|
+
icon: r ? "lucide-chevron-up" : "lucide-chevron-down",
|
|
3605
|
+
"icon-size": "s",
|
|
3606
|
+
text: "",
|
|
3607
|
+
"aria-label": n.$t("COMPONENTS.CONTROLS.TOGGLE_DROPDOWN"),
|
|
3608
|
+
"icon-class": "vc-input-dropdown__toggle-button-icon",
|
|
3609
|
+
onClick: Y(l, ["stop", "prevent"])
|
|
3610
|
+
}, null, 8, ["icon", "aria-label", "onClick"])) : w("", !0)
|
|
3611
|
+
]),
|
|
3612
|
+
n.$slots["append-inner"] ? B(n.$slots, "append-inner", { key: 0 }) : w("", !0)
|
|
3613
|
+
]),
|
|
3614
|
+
_: 2
|
|
3615
|
+
}, [
|
|
3616
|
+
n.$slots.control ? {
|
|
3617
|
+
name: "control",
|
|
3618
|
+
fn: E((o) => [
|
|
3619
|
+
B(n.$slots, "control", Ce(Be(o)))
|
|
3620
|
+
]),
|
|
3621
|
+
key: "0"
|
|
3622
|
+
} : void 0,
|
|
3623
|
+
n.$slots["prepend-inner"] ? {
|
|
3624
|
+
name: "prepend-inner",
|
|
3625
|
+
fn: E(() => [
|
|
3626
|
+
B(n.$slots, "prepend-inner")
|
|
3627
|
+
]),
|
|
3628
|
+
key: "1"
|
|
3629
|
+
} : void 0,
|
|
3630
|
+
n.$slots.append ? {
|
|
3631
|
+
name: "append",
|
|
3632
|
+
fn: E(() => [
|
|
3633
|
+
B(n.$slots, "append")
|
|
3634
|
+
]),
|
|
3635
|
+
key: "2"
|
|
3636
|
+
} : void 0,
|
|
3637
|
+
n.$slots.prepend ? {
|
|
3638
|
+
name: "prepend",
|
|
3639
|
+
fn: E(() => [
|
|
3640
|
+
B(n.$slots, "prepend")
|
|
3641
|
+
]),
|
|
3642
|
+
key: "3"
|
|
3643
|
+
} : void 0
|
|
3644
|
+
]), 1032, ["placeholder", "hint", "clearable", "prefix", "suffix", "name", "model-value", "loading", "disabled", "autofocus", "error", "error-message", "maxlength", "type"])
|
|
3645
|
+
]),
|
|
3646
|
+
_: 3
|
|
3647
|
+
}, 8, ["options", "option-label", "option-value", "searchable", "debounce", "disabled", "label", "required", "model-value", "tooltip", "multilanguage", "current-language"]));
|
|
3648
|
+
}
|
|
3649
|
+
}), vl = {
|
|
3650
|
+
key: 0,
|
|
3651
|
+
class: "vc-input-currency vc-input-currency--skeleton"
|
|
3652
|
+
}, pl = ["disabled", "placeholder", "aria-label"], pi = /* @__PURE__ */ G({
|
|
3653
|
+
__name: "vc-input-currency",
|
|
3654
|
+
props: {
|
|
3655
|
+
modelValue: {},
|
|
3656
|
+
placeholder: {},
|
|
3657
|
+
hint: {},
|
|
3658
|
+
clearable: { type: Boolean },
|
|
3659
|
+
prefix: {},
|
|
3660
|
+
suffix: {},
|
|
3661
|
+
loading: { type: Boolean },
|
|
3662
|
+
debounce: { default: 0 },
|
|
3663
|
+
autofocus: { type: Boolean },
|
|
3664
|
+
maxlength: {},
|
|
3665
|
+
option: {},
|
|
3666
|
+
options: {},
|
|
3667
|
+
optionValue: {},
|
|
3668
|
+
optionLabel: {},
|
|
3669
|
+
currencyDisplay: { default: kn.hidden },
|
|
3670
|
+
precision: { default: 2 },
|
|
3671
|
+
searchable: { type: Boolean, default: !1 },
|
|
3672
|
+
label: {},
|
|
3673
|
+
tooltip: {},
|
|
3674
|
+
disabled: { type: Boolean },
|
|
3675
|
+
required: { type: Boolean },
|
|
3676
|
+
name: {},
|
|
3677
|
+
error: { type: Boolean },
|
|
3678
|
+
errorMessage: {}
|
|
3679
|
+
},
|
|
3680
|
+
emits: ["update:model-value", "update:option", "change", "blur"],
|
|
3681
|
+
setup(e, { emit: t }) {
|
|
3682
|
+
const n = e, a = t, l = he(), { inputRef: r, setOptions: o, numberValue: s, setValue: u } = Sn(
|
|
3683
|
+
{
|
|
3684
|
+
locale: navigator.language,
|
|
3685
|
+
currency: n.option || "USD",
|
|
3686
|
+
currencyDisplay: n.currencyDisplay,
|
|
3687
|
+
hideGroupingSeparatorOnFocus: !1,
|
|
3688
|
+
precision: n.precision,
|
|
3689
|
+
hideCurrencySymbolOnFocus: !1,
|
|
3690
|
+
hideNegligibleDecimalDigitsOnFocus: !1
|
|
3691
|
+
}
|
|
3692
|
+
);
|
|
3693
|
+
X(
|
|
3694
|
+
() => n.option,
|
|
3695
|
+
(c) => {
|
|
3696
|
+
c && o({
|
|
3697
|
+
locale: navigator.language,
|
|
3698
|
+
currency: c,
|
|
3699
|
+
currencyDisplay: n.currencyDisplay,
|
|
3700
|
+
hideGroupingSeparatorOnFocus: !1,
|
|
3701
|
+
precision: n.precision,
|
|
3702
|
+
hideCurrencySymbolOnFocus: !1,
|
|
3703
|
+
hideNegligibleDecimalDigitsOnFocus: !1
|
|
3704
|
+
});
|
|
3705
|
+
}
|
|
3706
|
+
), X(
|
|
3707
|
+
() => n.modelValue,
|
|
3708
|
+
(c) => {
|
|
3709
|
+
u(c);
|
|
3710
|
+
}
|
|
3711
|
+
), X(s, (c) => {
|
|
3712
|
+
a("update:model-value", c);
|
|
3713
|
+
});
|
|
3714
|
+
function f(c) {
|
|
3715
|
+
r.value && (r.value.value = c), s.value = typeof c == "number" ? c : c === null ? null : parseFloat(String(c)) || null, a("update:model-value", s.value);
|
|
3716
|
+
}
|
|
3717
|
+
function m(c) {
|
|
3718
|
+
a("blur", c);
|
|
3719
|
+
}
|
|
3720
|
+
function v(c) {
|
|
3721
|
+
if ((c.key === "-" || c.key === "e") && c.preventDefault(), c.key !== "Tab") {
|
|
3722
|
+
if (c.key === "Enter") {
|
|
3723
|
+
c.target && c.target.blur();
|
|
3724
|
+
const y = Array.from(document.querySelectorAll('[tabindex="0"]:not(:disabled)')), b = y.indexOf(c.target);
|
|
3725
|
+
b >= 0 && b < y.length - 1 && y[b + 1].focus();
|
|
3726
|
+
}
|
|
3727
|
+
}
|
|
3728
|
+
}
|
|
3729
|
+
function d(c) {
|
|
3730
|
+
const y = c.clipboardData?.getData("text/plain");
|
|
3731
|
+
typeof y < "u" && parseInt(y) < 0 && c.preventDefault();
|
|
3732
|
+
}
|
|
3733
|
+
return (c, y) => i(l) ? (g(), h("div", vl, [
|
|
3734
|
+
e.label ? (g(), P(i(oe), {
|
|
3735
|
+
key: 0,
|
|
3736
|
+
variant: "block",
|
|
3737
|
+
width: 60 + (e.label?.length || 0) * 4,
|
|
3738
|
+
height: 11
|
|
3739
|
+
}, null, 8, ["width"])) : w("", !0),
|
|
3740
|
+
T(i(oe), {
|
|
3741
|
+
variant: "block",
|
|
3742
|
+
width: "100%",
|
|
3743
|
+
height: 36
|
|
3744
|
+
})
|
|
3745
|
+
])) : (g(), P(i(gl), {
|
|
3746
|
+
key: 1,
|
|
3747
|
+
class: "vc-input-currency",
|
|
3748
|
+
options: e.options,
|
|
3749
|
+
"option-label": e.optionLabel,
|
|
3750
|
+
"option-value": e.optionValue,
|
|
3751
|
+
searchable: e.searchable,
|
|
3752
|
+
debounce: e.debounce,
|
|
3753
|
+
disabled: e.disabled,
|
|
3754
|
+
label: e.label,
|
|
3755
|
+
required: e.required,
|
|
3756
|
+
option: e.option,
|
|
3757
|
+
"model-value": i(s),
|
|
3758
|
+
tooltip: e.tooltip,
|
|
3759
|
+
placeholder: e.placeholder,
|
|
3760
|
+
hint: e.hint,
|
|
3761
|
+
clearable: e.clearable,
|
|
3762
|
+
prefix: e.prefix,
|
|
3763
|
+
suffix: e.suffix,
|
|
3764
|
+
name: e.name,
|
|
3765
|
+
loading: e.loading,
|
|
3766
|
+
autofocus: e.autofocus,
|
|
3767
|
+
error: e.error,
|
|
3768
|
+
"error-message": e.errorMessage,
|
|
3769
|
+
maxlength: e.maxlength,
|
|
3770
|
+
"input-type": "number",
|
|
3771
|
+
"onUpdate:modelValue": f,
|
|
3772
|
+
"onUpdate:option": y[0] || (y[0] = (b) => c.$emit("update:option", b)),
|
|
3773
|
+
onBlur: m
|
|
3774
|
+
}, {
|
|
3775
|
+
control: E(({ placeholder: b }) => [
|
|
3776
|
+
L("input", {
|
|
3777
|
+
ref_key: "inputRef",
|
|
3778
|
+
ref: r,
|
|
3779
|
+
type: "text",
|
|
3780
|
+
disabled: e.disabled,
|
|
3781
|
+
placeholder: b,
|
|
3782
|
+
"aria-label": e.label || void 0,
|
|
3783
|
+
class: "vc-input-currency__control",
|
|
3784
|
+
tabindex: "0",
|
|
3785
|
+
onBlur: m,
|
|
3786
|
+
onKeydown: v,
|
|
3787
|
+
onPaste: d
|
|
3788
|
+
}, null, 40, pl)
|
|
3789
|
+
]),
|
|
3790
|
+
_: 1
|
|
3791
|
+
}, 8, ["options", "option-label", "option-value", "searchable", "debounce", "disabled", "label", "required", "option", "model-value", "tooltip", "placeholder", "hint", "clearable", "prefix", "suffix", "name", "loading", "autofocus", "error", "error-message", "maxlength"]));
|
|
3792
|
+
}
|
|
3793
|
+
}), Vt = Symbol("VcAppBarState"), ml = {
|
|
3794
|
+
activeWidgetId: S(null),
|
|
3795
|
+
activeMobileActionId: S(null)
|
|
3796
|
+
};
|
|
3797
|
+
function mi() {
|
|
3798
|
+
const e = {
|
|
3799
|
+
activeWidgetId: S(null),
|
|
3800
|
+
activeMobileActionId: S(null)
|
|
3801
|
+
};
|
|
3802
|
+
return mt(Vt, e), e;
|
|
3803
|
+
}
|
|
3804
|
+
function yi() {
|
|
3805
|
+
return U(Vt, ml);
|
|
3806
|
+
}
|
|
3807
|
+
const bi = Symbol("TableContext"), yl = Symbol("ColumnCollector"), hi = Symbol("FillerWidth"), Ii = Symbol("IsColumnReordering"), ki = Symbol("FilterContext"), Si = (e, t) => {
|
|
3808
|
+
const n = e.__vccOpts || e;
|
|
3809
|
+
for (const [a, l] of t)
|
|
3810
|
+
n[a] = l;
|
|
3811
|
+
return n;
|
|
3812
|
+
}, wi = G({
|
|
3813
|
+
name: "VcColumn",
|
|
3814
|
+
inheritAttrs: !1,
|
|
3815
|
+
props: {
|
|
3816
|
+
// === Identity ===
|
|
3817
|
+
/** Unique column identifier (must be unique within the table) */
|
|
3818
|
+
id: {
|
|
3819
|
+
type: String,
|
|
3820
|
+
required: !0
|
|
3821
|
+
},
|
|
3822
|
+
/** Data field path to read from each item (default: same as `id`) */
|
|
3823
|
+
field: {
|
|
3824
|
+
type: String,
|
|
3825
|
+
default: void 0
|
|
3826
|
+
},
|
|
3827
|
+
// === Display ===
|
|
3828
|
+
/** Column header title text */
|
|
3829
|
+
title: {
|
|
3830
|
+
type: String,
|
|
3831
|
+
default: void 0
|
|
3832
|
+
},
|
|
3833
|
+
/** Cell formatter type — determines how cell value is rendered */
|
|
3834
|
+
type: {
|
|
3835
|
+
type: String,
|
|
3836
|
+
default: "text"
|
|
3837
|
+
},
|
|
3838
|
+
/** Field name to read currency code from (used with `type="money"`, default: `"currency"`) */
|
|
3839
|
+
currencyField: {
|
|
3840
|
+
type: String,
|
|
3841
|
+
default: "currency"
|
|
3842
|
+
},
|
|
3843
|
+
/** Date/number format string (e.g. `"DD.MM.YYYY"`) */
|
|
3844
|
+
format: {
|
|
3845
|
+
type: String,
|
|
3846
|
+
default: void 0
|
|
3847
|
+
},
|
|
3848
|
+
// === Sizing ===
|
|
3849
|
+
/** Column width in px or CSS string (e.g. `200`, `"150px"`) */
|
|
3850
|
+
width: {
|
|
3851
|
+
type: [String, Number],
|
|
3852
|
+
default: void 0
|
|
3853
|
+
},
|
|
3854
|
+
/** Minimum column width (default: `60px`) */
|
|
3855
|
+
minWidth: {
|
|
3856
|
+
type: [String, Number],
|
|
3857
|
+
default: void 0
|
|
3858
|
+
},
|
|
3859
|
+
/** Maximum column width */
|
|
3860
|
+
maxWidth: {
|
|
3861
|
+
type: [String, Number],
|
|
3862
|
+
default: void 0
|
|
3863
|
+
},
|
|
3864
|
+
// === Alignment ===
|
|
3865
|
+
/** Cell text alignment */
|
|
3866
|
+
align: {
|
|
3867
|
+
type: String,
|
|
3868
|
+
default: void 0
|
|
3869
|
+
},
|
|
3870
|
+
/** Header text alignment (default: same as `align`) */
|
|
3871
|
+
headerAlign: {
|
|
3872
|
+
type: String,
|
|
3873
|
+
default: void 0
|
|
3874
|
+
},
|
|
3875
|
+
// === Sorting ===
|
|
3876
|
+
/** Whether the column is sortable (shows sort icon on hover) */
|
|
3877
|
+
sortable: {
|
|
3878
|
+
type: Boolean,
|
|
3879
|
+
default: !1
|
|
3880
|
+
},
|
|
3881
|
+
/** Override backend field name for sorting (default: column `id`) */
|
|
3882
|
+
sortField: {
|
|
3883
|
+
type: String,
|
|
3884
|
+
default: void 0
|
|
3885
|
+
},
|
|
3886
|
+
// === Filtering ===
|
|
3887
|
+
/** Declarative filter config: `true` for text, `"field"` for text with custom field, or object for select/dateRange */
|
|
3888
|
+
filter: {
|
|
3889
|
+
type: [Boolean, String, Object],
|
|
3890
|
+
default: void 0
|
|
3891
|
+
},
|
|
3892
|
+
/** Override backend field name for filtering (default: column `id`) */
|
|
3893
|
+
filterField: {
|
|
3894
|
+
type: String,
|
|
3895
|
+
default: void 0
|
|
3896
|
+
},
|
|
3897
|
+
/** Placeholder text for the filter input */
|
|
3898
|
+
filterPlaceholder: {
|
|
3899
|
+
type: String,
|
|
3900
|
+
default: void 0
|
|
3901
|
+
},
|
|
3902
|
+
// === Visibility ===
|
|
3903
|
+
/** Whether the column is visible (default: `true`). Hidden columns can be toggled via column switcher */
|
|
3904
|
+
visible: {
|
|
3905
|
+
type: Boolean,
|
|
3906
|
+
default: !0
|
|
3907
|
+
},
|
|
3908
|
+
/** If `true`, column stays visible even when `showAllColumns=false` (e.g. when blade narrows) */
|
|
3909
|
+
alwaysVisible: {
|
|
3910
|
+
type: Boolean,
|
|
3911
|
+
default: !1
|
|
3912
|
+
},
|
|
3913
|
+
// === Editing ===
|
|
3914
|
+
/** Whether the cell is editable (enables inline edit on click) */
|
|
3915
|
+
editable: {
|
|
3916
|
+
type: Boolean,
|
|
3917
|
+
default: !1
|
|
3918
|
+
},
|
|
3919
|
+
/** Validation rules for the editable cell (field name → validator) */
|
|
3920
|
+
rules: {
|
|
3921
|
+
type: Object,
|
|
3922
|
+
default: void 0
|
|
3923
|
+
},
|
|
3924
|
+
// === Styling ===
|
|
3925
|
+
/** Custom CSS class applied to the entire column (header + body cells) */
|
|
3926
|
+
class: {
|
|
3927
|
+
type: String,
|
|
3928
|
+
default: void 0
|
|
3929
|
+
},
|
|
3930
|
+
/** Custom CSS class applied only to the header cell */
|
|
3931
|
+
headerClass: {
|
|
3932
|
+
type: String,
|
|
3933
|
+
default: void 0
|
|
3934
|
+
},
|
|
3935
|
+
/** Custom CSS class applied only to body cells */
|
|
3936
|
+
bodyClass: {
|
|
3937
|
+
type: String,
|
|
3938
|
+
default: void 0
|
|
3939
|
+
},
|
|
3940
|
+
/** Number of lines to clamp cell text to (`0` = no clamp, default: `2`) */
|
|
3941
|
+
lineClamp: {
|
|
3942
|
+
type: Number,
|
|
3943
|
+
default: 2
|
|
3944
|
+
},
|
|
3945
|
+
// === Special modes ===
|
|
3946
|
+
/** Renders a selection checkbox column (`"single"` = radio, `"multiple"` = checkbox) */
|
|
3947
|
+
selectionMode: {
|
|
3948
|
+
type: String,
|
|
3949
|
+
default: void 0
|
|
3950
|
+
},
|
|
3951
|
+
/** Renders row edit save/cancel buttons in this column */
|
|
3952
|
+
rowEditor: {
|
|
3953
|
+
type: Boolean,
|
|
3954
|
+
default: !1
|
|
3955
|
+
},
|
|
3956
|
+
/** Renders a drag handle for row reordering */
|
|
3957
|
+
rowReorder: {
|
|
3958
|
+
type: Boolean,
|
|
3959
|
+
default: !1
|
|
3960
|
+
},
|
|
3961
|
+
/** Renders an expand/collapse toggle for row expansion */
|
|
3962
|
+
expander: {
|
|
3963
|
+
type: Boolean,
|
|
3964
|
+
default: !1
|
|
3965
|
+
},
|
|
3966
|
+
// === Mobile ===
|
|
3967
|
+
/**
|
|
3968
|
+
* Mobile card role — determines how column is displayed on mobile.
|
|
3969
|
+
* - `"title"`: Primary identifier, displayed at top (full width, bold)
|
|
3970
|
+
* - `"image"`: Visual element, displayed on left side
|
|
3971
|
+
* - `"field"`: Data with label, auto-distributed in 2x2 grid (max 4)
|
|
3972
|
+
* - `"status"`: Status badge, displayed at bottom (multiple allowed)
|
|
3973
|
+
*/
|
|
3974
|
+
mobileRole: {
|
|
3975
|
+
type: String,
|
|
3976
|
+
default: void 0
|
|
3977
|
+
},
|
|
3978
|
+
/** Explicit grid position for mobile card layout */
|
|
3979
|
+
mobilePosition: {
|
|
3980
|
+
type: String,
|
|
3981
|
+
default: void 0
|
|
3982
|
+
},
|
|
3983
|
+
/** Whether column is visible on mobile (default: `true` — hidden unless `mobileRole` is specified) */
|
|
3984
|
+
mobileVisible: {
|
|
3985
|
+
type: Boolean,
|
|
3986
|
+
default: !0
|
|
3987
|
+
}
|
|
3988
|
+
},
|
|
3989
|
+
setup(e, { slots: t }) {
|
|
3990
|
+
const n = U(yl, null), a = Fe();
|
|
3991
|
+
return tt(() => {
|
|
3992
|
+
n && a && n.add({
|
|
3993
|
+
instance: a,
|
|
3994
|
+
props: e,
|
|
3995
|
+
slots: t
|
|
3996
|
+
});
|
|
3997
|
+
}), ht(() => {
|
|
3998
|
+
n && a && n.delete(a);
|
|
3999
|
+
}), () => null;
|
|
4000
|
+
}
|
|
4001
|
+
}), Ie = Ge(/* @__PURE__ */ new Map());
|
|
4002
|
+
function $i() {
|
|
4003
|
+
return {
|
|
4004
|
+
register: (o) => {
|
|
4005
|
+
Ie.set(o.type, o);
|
|
4006
|
+
},
|
|
4007
|
+
get: (o) => Ie.get(o),
|
|
4008
|
+
has: (o) => Ie.has(o),
|
|
4009
|
+
getRegisteredTypes: () => Array.from(Ie.keys()),
|
|
4010
|
+
unregister: (o) => Ie.delete(o),
|
|
4011
|
+
clear: () => {
|
|
4012
|
+
Ie.clear();
|
|
4013
|
+
}
|
|
4014
|
+
};
|
|
4015
|
+
}
|
|
4016
|
+
const Oi = G({
|
|
4017
|
+
name: "SlotProxy",
|
|
4018
|
+
props: {
|
|
4019
|
+
slotFn: { type: Function, required: !0 },
|
|
4020
|
+
scope: { type: Object, default: () => ({}) }
|
|
4021
|
+
},
|
|
4022
|
+
setup(e) {
|
|
4023
|
+
return () => e.slotFn(e.scope);
|
|
4024
|
+
}
|
|
4025
|
+
}), Ei = (e, t) => {
|
|
4026
|
+
const n = t.arg ? parseInt(t.arg, 10) : 9e3, a = typeof t.value == "object" ? t.value : { blur: !0 };
|
|
4027
|
+
t.value ? (e.classList.add("v-loading"), a.size && e.setAttribute("data-loading-size", a.size), a.color && e.style.setProperty("--v-loading-spinner-color", a.color), a.blur === !1 && e.classList.add("v-loading--no-blur"), a.fullscreen && e.classList.add("v-loading--fullscreen"), e.style.setProperty("--v-loading-z-index", `${n}`)) : (e.classList.remove("v-loading", "v-loading--no-blur", "v-loading--fullscreen"), e.removeAttribute("data-loading-size"), e.style.removeProperty("--v-loading-z-index"), e.style.removeProperty("--v-loading-spinner-color"));
|
|
4028
|
+
};
|
|
4029
|
+
export {
|
|
4030
|
+
Wn as $,
|
|
4031
|
+
Xe as A,
|
|
4032
|
+
sa as B,
|
|
4033
|
+
Dn as C,
|
|
4034
|
+
ta as D,
|
|
4035
|
+
li as E,
|
|
4036
|
+
oi as F,
|
|
4037
|
+
Rt as G,
|
|
4038
|
+
ci as H,
|
|
4039
|
+
Bn as I,
|
|
4040
|
+
_n as J,
|
|
4041
|
+
Aa as K,
|
|
4042
|
+
na as L,
|
|
4043
|
+
aa as M,
|
|
4044
|
+
oa as N,
|
|
4045
|
+
Fl as O,
|
|
4046
|
+
ge as P,
|
|
4047
|
+
fa as Q,
|
|
4048
|
+
ie as R,
|
|
4049
|
+
zl as S,
|
|
4050
|
+
Nl as T,
|
|
4051
|
+
Dl as U,
|
|
4052
|
+
ue as V,
|
|
4053
|
+
Vl as W,
|
|
4054
|
+
ui as X,
|
|
4055
|
+
Kl as Y,
|
|
4056
|
+
di as Z,
|
|
4057
|
+
da as _,
|
|
4058
|
+
to as a,
|
|
4059
|
+
Un as a0,
|
|
4060
|
+
jn as a1,
|
|
4061
|
+
Tn as a2,
|
|
4062
|
+
An as a3,
|
|
4063
|
+
ql as a4,
|
|
4064
|
+
Kn as a5,
|
|
4065
|
+
jl as a6,
|
|
4066
|
+
Gl as a7,
|
|
4067
|
+
Ln as a8,
|
|
4068
|
+
Mn as a9,
|
|
4069
|
+
$i as aA,
|
|
4070
|
+
Oi as aB,
|
|
4071
|
+
yl as aC,
|
|
4072
|
+
ki as aD,
|
|
4073
|
+
Nn as aE,
|
|
4074
|
+
qn as aa,
|
|
4075
|
+
dt as ab,
|
|
4076
|
+
ri as ac,
|
|
4077
|
+
Jl as ad,
|
|
4078
|
+
fi as ae,
|
|
4079
|
+
_l as af,
|
|
4080
|
+
ii as ag,
|
|
4081
|
+
ni as ah,
|
|
4082
|
+
Ql as ai,
|
|
4083
|
+
ai as aj,
|
|
4084
|
+
Hl as ak,
|
|
4085
|
+
Ul as al,
|
|
4086
|
+
Wl as am,
|
|
4087
|
+
ia as an,
|
|
4088
|
+
Yl as ao,
|
|
4089
|
+
gi as ap,
|
|
4090
|
+
ei as aq,
|
|
4091
|
+
Pl as ar,
|
|
4092
|
+
Zl as as,
|
|
4093
|
+
Mt as at,
|
|
4094
|
+
vi as au,
|
|
4095
|
+
ho as av,
|
|
4096
|
+
zn as aw,
|
|
4097
|
+
bi as ax,
|
|
4098
|
+
hi as ay,
|
|
4099
|
+
Ii as az,
|
|
4100
|
+
wi as b,
|
|
4101
|
+
Ua as c,
|
|
4102
|
+
bo as d,
|
|
4103
|
+
pi as e,
|
|
4104
|
+
gl as f,
|
|
4105
|
+
qe as g,
|
|
4106
|
+
Ea as h,
|
|
4107
|
+
ul as i,
|
|
4108
|
+
oe as j,
|
|
4109
|
+
he as k,
|
|
4110
|
+
Ei as l,
|
|
4111
|
+
Fn as m,
|
|
4112
|
+
ze as n,
|
|
4113
|
+
Pn as o,
|
|
4114
|
+
mi as p,
|
|
4115
|
+
Si as q,
|
|
4116
|
+
si as r,
|
|
4117
|
+
ti as s,
|
|
4118
|
+
Vn as t,
|
|
4119
|
+
yi as u,
|
|
4120
|
+
at as v,
|
|
4121
|
+
re as w,
|
|
4122
|
+
be as x,
|
|
4123
|
+
Ae as y,
|
|
4124
|
+
Xl as z
|
|
4125
|
+
};
|