@8wave/ai-elements 0.121.0-beta.40 → 0.121.0-beta.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{PkChatbotFilePreview-CpFXWpU7.js → PkChatbotFilePreview-DxpEIFOG.js} +2 -2
- package/dist/_chunks/{PkChatbotFilePreview-CpFXWpU7.js.map → PkChatbotFilePreview-DxpEIFOG.js.map} +1 -1
- package/dist/_chunks/{PkHeldImage-DvHKY7Vh.js → PkHeldImage-CztNY8OZ.js} +2 -2
- package/dist/_chunks/{PkHeldImage-DvHKY7Vh.js.map → PkHeldImage-CztNY8OZ.js.map} +1 -1
- package/dist/_chunks/{PkLazyImg-BBFsS16D.js → PkLazyImg-BqbuNQgf.js} +2 -2
- package/dist/_chunks/{PkLazyImg-BBFsS16D.js.map → PkLazyImg-BqbuNQgf.js.map} +1 -1
- package/dist/_chunks/{PkStreamingMarkdown-D2aqCD0I.js → PkStreamingMarkdown-BlTH2AJX.js} +2 -2
- package/dist/_chunks/{PkStreamingMarkdown-D2aqCD0I.js.map → PkStreamingMarkdown-BlTH2AJX.js.map} +1 -1
- package/dist/_chunks/{PkToolEditSpreadsheet-83ZdmGeA.js → PkToolEditSpreadsheet-CDxglslA.js} +2 -2
- package/dist/_chunks/{PkToolEditSpreadsheet-83ZdmGeA.js.map → PkToolEditSpreadsheet-CDxglslA.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-1cOmCG8P.js → PkToolRequestGeolocation-CxMAoAv6.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-1cOmCG8P.js.map → PkToolRequestGeolocation-CxMAoAv6.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-CCu3FCyo.js → PkToolRequestOAuthConnection-DU1Y2odZ.js} +3 -3
- package/dist/_chunks/{PkToolRequestOAuthConnection-CCu3FCyo.js.map → PkToolRequestOAuthConnection-DU1Y2odZ.js.map} +1 -1
- package/dist/_chunks/{PkToolShareDocument-BhT59J9o.js → PkToolShareDocument-YrPrexhS.js} +5 -5
- package/dist/_chunks/{PkToolShareDocument-BhT59J9o.js.map → PkToolShareDocument-YrPrexhS.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-CiYkZkpe.js → PkToolShowArtifact-jQeIv65U.js} +4 -4
- package/dist/_chunks/{PkToolShowArtifact-CiYkZkpe.js.map → PkToolShowArtifact-jQeIv65U.js.map} +1 -1
- package/dist/_chunks/{PkToolShowCalendarEvent-Dzh4JURs.js → PkToolShowCalendarEvent-CAN5-qnM.js} +4 -4
- package/dist/_chunks/{PkToolShowCalendarEvent-Dzh4JURs.js.map → PkToolShowCalendarEvent-CAN5-qnM.js.map} +1 -1
- package/dist/_chunks/{PkToolShowComparison-CFHrXnaB.js → PkToolShowComparison-DGxHYpl3.js} +4 -4
- package/dist/_chunks/{PkToolShowComparison-CFHrXnaB.js.map → PkToolShowComparison-DGxHYpl3.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-D7TEzrYe.js → PkToolShowContactForm-D7wg3Jlu.js} +5 -5
- package/dist/_chunks/{PkToolShowContactForm-D7TEzrYe.js.map → PkToolShowContactForm-D7wg3Jlu.js.map} +1 -1
- package/dist/_chunks/{PkToolShowDiagram-DGnIuRst.js → PkToolShowDiagram-BBs1rh96.js} +4 -4
- package/dist/_chunks/{PkToolShowDiagram-DGnIuRst.js.map → PkToolShowDiagram-BBs1rh96.js.map} +1 -1
- package/dist/_chunks/{PkToolShowEmail-C3jped-R.js → PkToolShowEmail-CeiSo-zx.js} +4 -4
- package/dist/_chunks/{PkToolShowEmail-C3jped-R.js.map → PkToolShowEmail-CeiSo-zx.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-CSh4Q6sl.js → PkToolShowForm-BMVgXxzl.js} +4 -4
- package/dist/_chunks/{PkToolShowForm-CSh4Q6sl.js.map → PkToolShowForm-BMVgXxzl.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-CQEaEfYE.js → PkToolShowImageGallery-Ba0CfKt6.js} +3 -3
- package/dist/_chunks/{PkToolShowImageGallery-CQEaEfYE.js.map → PkToolShowImageGallery-Ba0CfKt6.js.map} +1 -1
- package/dist/_chunks/{PkToolShowLocation-gyMiVjhi.js → PkToolShowLocation-Cp95-u2H.js} +4 -4
- package/dist/_chunks/{PkToolShowLocation-gyMiVjhi.js.map → PkToolShowLocation-Cp95-u2H.js.map} +1 -1
- package/dist/_chunks/{PkToolShowMessage-wGPPnOAM.js → PkToolShowMessage-Bn8O_W0D.js} +4 -4
- package/dist/_chunks/{PkToolShowMessage-wGPPnOAM.js.map → PkToolShowMessage-Bn8O_W0D.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-BCmULLct.js → PkToolShowProductList-DbZfUUWe.js} +4 -4
- package/dist/_chunks/{PkToolShowProductList-BCmULLct.js.map → PkToolShowProductList-DbZfUUWe.js.map} +1 -1
- package/dist/_chunks/{PkToolShowQrCode-CeZsvZvb.js → PkToolShowQrCode-D_9_c-Ws.js} +4 -4
- package/dist/_chunks/{PkToolShowQrCode-CeZsvZvb.js.map → PkToolShowQrCode-D_9_c-Ws.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-R9KWsfTQ.js → PkToolShowSources-Dkt4IId2.js} +4 -4
- package/dist/_chunks/{PkToolShowSources-R9KWsfTQ.js.map → PkToolShowSources-Dkt4IId2.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-DYZz9aV2.js → PkToolShowSuggestedReply-BF2sT3B1.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-DYZz9aV2.js.map → PkToolShowSuggestedReply-BF2sT3B1.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-C_9SZtZM.js → PkToolShowVideo-l8JoSKCj.js} +3 -3
- package/dist/_chunks/{PkToolShowVideo-C_9SZtZM.js.map → PkToolShowVideo-l8JoSKCj.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWeather-BgS4_SWb.js → PkToolShowWeather-DifqBB7o.js} +2 -2
- package/dist/_chunks/{PkToolShowWeather-BgS4_SWb.js.map → PkToolShowWeather-DifqBB7o.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-DwRYfle9.js → PkToolShowWebPages-DtcEmrYt.js} +4 -4
- package/dist/_chunks/{PkToolShowWebPages-DwRYfle9.js.map → PkToolShowWebPages-DtcEmrYt.js.map} +1 -1
- package/dist/_chunks/{VvButtonLocalized-B6igS2e0.js → VvButtonLocalized-D7K9ZslZ.js} +2 -2
- package/dist/_chunks/{VvButtonLocalized-B6igS2e0.js.map → VvButtonLocalized-D7K9ZslZ.js.map} +1 -1
- package/dist/_chunks/{VvCheckboxGroup.es-OXhptnPU.js → VvCheckboxGroup.es-BebSMBKU.js} +2 -2
- package/dist/_chunks/{VvCheckboxGroup.es-OXhptnPU.js.map → VvCheckboxGroup.es-BebSMBKU.js.map} +1 -1
- package/dist/_chunks/{VvCombobox.es-SLzX9VnX.js → VvCombobox.es-BfiDcdcw.js} +481 -481
- package/dist/_chunks/{VvCombobox.es-SLzX9VnX.js.map → VvCombobox.es-BfiDcdcw.js.map} +1 -1
- package/dist/_chunks/{VvInputText.es-CETcNKlr.js → VvInputText.es-DllQ2Tue.js} +435 -435
- package/dist/_chunks/{VvInputText.es-CETcNKlr.js.map → VvInputText.es-DllQ2Tue.js.map} +1 -1
- package/dist/_chunks/{VvRadioGroup.es-UBZBB89A.js → VvRadioGroup.es-D6uqf6a1.js} +2 -2
- package/dist/_chunks/{VvRadioGroup.es-UBZBB89A.js.map → VvRadioGroup.es-D6uqf6a1.js.map} +1 -1
- package/dist/_chunks/{VvSelect.es-B_MShGnJ.js → VvSelect.es-BR5Ci5VC.js} +2 -2
- package/dist/_chunks/{VvSelect.es-B_MShGnJ.js.map → VvSelect.es-BR5Ci5VC.js.map} +1 -1
- package/dist/_chunks/{VvTextarea.es-Dm2Yq3WM.js → VvTextarea.es-Bwe5xjXl.js} +29 -29
- package/dist/_chunks/{VvTextarea.es-Dm2Yq3WM.js.map → VvTextarea.es-Bwe5xjXl.js.map} +1 -1
- package/dist/_chunks/{dist-Do_Ac5Yv.js → dist-CB7v_M5z.js} +52 -46
- package/dist/_chunks/dist-CB7v_M5z.js.map +1 -0
- package/dist/_chunks/{index.es-BTDKU45u.js → index.es-CKF2q-ww.js} +26 -26
- package/dist/_chunks/{index.es-BTDKU45u.js.map → index.es-CKF2q-ww.js.map} +1 -1
- package/dist/_chunks/{index.es-BZS9Cscn.js → index.es-CoWhnabo.js} +16 -16
- package/dist/_chunks/{index.es-BZS9Cscn.js.map → index.es-CoWhnabo.js.map} +1 -1
- package/dist/ai-elements.es.js +4173 -3915
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotQueuedMessages.d.ts +2 -0
- package/dist-vue/PkChatbotQueuedMessages.js +1 -0
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/PkChatbot-CObEhs2T.js +279 -0
- package/dist-vue/_chunks/PkChatbot-CObEhs2T.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotInput-BJHtmPR-.js → PkChatbotInput-CuEoeb_M.js} +47 -22
- package/dist-vue/_chunks/PkChatbotInput-CuEoeb_M.js.map +1 -0
- package/dist-vue/_chunks/PkChatbotQueuedMessages-DlydYgwC.js +51 -0
- package/dist-vue/_chunks/PkChatbotQueuedMessages-DlydYgwC.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-BI_PtT72.js → PkChatbotViewChat-BZb-U7Ju.js} +246 -224
- package/dist-vue/_chunks/PkChatbotViewChat-BZb-U7Ju.js.map +1 -0
- package/dist-vue/_chunks/PkChatbotViewConversations-CCPRWCKs.js +210 -0
- package/dist-vue/_chunks/PkChatbotViewConversations-CCPRWCKs.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewFiles-Cwm-JQMF.js → PkChatbotViewFiles-BgqksCn0.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewFiles-Cwm-JQMF.js.map → PkChatbotViewFiles-BgqksCn0.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-C_GElIM3.js → PkChatbotViewProfile-B6tHWrqn.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-C_GElIM3.js.map → PkChatbotViewProfile-B6tHWrqn.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-DUz4dwzY.js → createChatbotApiClient-hcFAulTq.js} +12 -3
- package/dist-vue/_chunks/createChatbotApiClient-hcFAulTq.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-D7LcpA-6.js → useChatbotStore-Ct7G-voO.js} +953 -800
- package/dist-vue/_chunks/useChatbotStore-Ct7G-voO.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +12 -8
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +97 -83
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +16 -2
- package/dist-vue/packages/components/src/chat/PkChatSidebarConversationItem.d.ts +2 -0
- package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +17 -3
- package/dist-vue/packages/components/src/chat/PkChatbotQueuedMessages.d.ts +22 -0
- package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +5 -1
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +37 -2
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/dist-Do_Ac5Yv.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-DIqduIwr.js +0 -290
- package/dist-vue/_chunks/PkChatbot-DIqduIwr.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotInput-BJHtmPR-.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-BI_PtT72.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewConversations-Bg4jSO9a.js +0 -199
- package/dist-vue/_chunks/PkChatbotViewConversations-Bg4jSO9a.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-DUz4dwzY.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-D7LcpA-6.js.map +0 -1
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import { $ as e, A as t, B as n, Ct as r, D as i, Dt as a, E as o, Et as s, G as c, I as l, J as u, K as d, N as f, Ot as ee, P as te, R as p, S as ne, Tt as re, V as m, W as ie, Z as h, _ as g, at as ae, b as oe, bt as se, d as _, et as v, f as ce, ft as le, g as
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import { t as
|
|
1
|
+
import { $ as e, A as t, B as n, Ct as r, D as i, Dt as a, E as o, Et as s, G as c, I as l, J as u, K as d, N as f, Ot as ee, P as te, R as p, S as ne, Tt as re, V as m, W as ie, Z as h, _ as g, at as ae, b as oe, bt as se, d as _, et as v, f as ce, ft as le, g as y, h as b, ht as x, j as ue, k as S, l as de, lt as fe, r as pe, t as me, tt as he, v as C, w, wt as ge, x as _e, xt as T, y as E, z as D } from "./vue.runtime.esm-bundler-BkvITeKg.js";
|
|
2
|
+
import { a as O, i as ve, t as k } from "./iconify-Lm6SAZ2s.js";
|
|
3
|
+
import { b as ye, d as be, l as xe, m as Se, n as Ce, r as we, s as A, u as Te, y as j } from "./dist-CB7v_M5z.js";
|
|
4
|
+
import { a as Ee, c as De, i as Oe, l as ke, n as M, o as N, r as Ae, s as je, t as P } from "./floating-ui.vue-DgWctTmX.js";
|
|
5
|
+
import { t as Me } from "./esm-B4GALDiT.js";
|
|
6
6
|
//#region ../../node_modules/.pnpm/@volverjs+ui-vue@0.0.25_@json-render+core@0.19.0_zod@4.6.7__@volverjs+style@0.1.32_@vue_6457cdc65e61a009108dae6427ee3925/node_modules/@volverjs/ui-vue/dist/components/VvInputText/VvInputText.es.js
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
if (typeof e != "string" || !
|
|
7
|
+
S(), pe(), ae(), ge();
|
|
8
|
+
var F = (e) => e.toString().padStart(2, "0"), I = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
|
|
9
|
+
function Ne(e) {
|
|
10
|
+
if (typeof e != "string" || !I.test(e)) return !1;
|
|
11
11
|
let t = new Date(e);
|
|
12
12
|
return !Number.isNaN(t.getTime()) && t.toISOString() === e;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
if (typeof e == "string" && !
|
|
14
|
+
function Pe(e, t = "date", n) {
|
|
15
|
+
if (typeof e == "string" && !Ne(e)) return "";
|
|
16
16
|
let r = new Date(e);
|
|
17
17
|
if (Number.isNaN(r.getTime())) return "";
|
|
18
|
-
let i = `${r.getFullYear()}-${
|
|
19
|
-
if (t === "month" || (i += `-${
|
|
20
|
-
let a = n ? `${
|
|
18
|
+
let i = `${r.getFullYear()}-${F(r.getMonth() + 1)}`;
|
|
19
|
+
if (t === "month" || (i += `-${F(r.getDate())}`, t === "date")) return i;
|
|
20
|
+
let a = n ? `${F(r.getHours())}:${F(r.getMinutes())}:${F(r.getSeconds())}` : `${F(r.getHours())}:${F(r.getMinutes())}`;
|
|
21
21
|
return t === "time" ? a : `${i}T${a}`;
|
|
22
22
|
}
|
|
23
|
-
var
|
|
24
|
-
function
|
|
23
|
+
var Fe = /^\d{4}-\d{2}-\d{2}$/, Ie = /^\d{4}-\d{2}$/, L = /^(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d)?$/, R = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2})?$/;
|
|
24
|
+
function z(e, t = "date") {
|
|
25
25
|
if (!e?.trim()) return null;
|
|
26
26
|
let n = /* @__PURE__ */ new Date(), r = n.getFullYear(), i = n.getMonth(), a = n.getDate();
|
|
27
27
|
if (t === "date") {
|
|
28
|
-
if (!
|
|
28
|
+
if (!Fe.test(e)) throw Error("Invalid date format. Expected: YYYY-MM-DD");
|
|
29
29
|
return /* @__PURE__ */ new Date(`${e}T00:00:00`);
|
|
30
30
|
}
|
|
31
31
|
if (t === "month") {
|
|
32
|
-
if (!
|
|
32
|
+
if (!Ie.test(e)) throw Error("Invalid month format. Expected: YYYY-MM");
|
|
33
33
|
return /* @__PURE__ */ new Date(`${e}-01T00:00:00`);
|
|
34
34
|
}
|
|
35
35
|
if (t === "time") {
|
|
36
|
-
if (!
|
|
37
|
-
return e.length === 8 ? /* @__PURE__ */ new Date(`${r}-${
|
|
36
|
+
if (!L.test(e)) throw Error("Invalid time format. Expected: HH:mm or HH:mm:ss");
|
|
37
|
+
return e.length === 8 ? /* @__PURE__ */ new Date(`${r}-${F(i + 1)}-${F(a)}T${e}`) : /* @__PURE__ */ new Date(`${r}-${F(i + 1)}-${F(a)}T${e}:00`);
|
|
38
38
|
}
|
|
39
|
-
if (!
|
|
39
|
+
if (!R.test(e)) throw Error("Invalid datetime format. Expected: YYYY-MM-DDThh:mm or YYYY-MM-DDThh:mm:ss");
|
|
40
40
|
return e.length === 16 ? /* @__PURE__ */ new Date(`${e}:00`) : /* @__PURE__ */ new Date(`${e}`);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function B(e) {
|
|
43
43
|
return ((e) => e == null || e === "" || Array.isArray(e) && e.length === 0 || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0)(r(e));
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function V(e) {
|
|
46
46
|
return typeof e == "string";
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return Array.isArray(e) ? e.filter((e) =>
|
|
48
|
+
function Le(e) {
|
|
49
|
+
return Array.isArray(e) ? e.filter((e) => V(e)).join(" ") : e;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
let n =
|
|
51
|
+
function Re(e, t) {
|
|
52
|
+
let n = b(() => fe(e) ? e.value : e), r = b(() => Le(n.value.invalidLabel)), a = b(() => Le(n.value.validLabel)), o = b(() => n.value.loadingLabel), s = b(() => n.value.hintLabel), c = b(() => !!(n.value.loading && (t.loading || o.value))), l = b(() => !c.value && !!(n.value.invalid && (t.invalid || r.value))), u = b(() => !c.value && !l.value && !!(n.value.valid && (t.valid || a.value))), d = b(() => !c.value && !l.value && !u.value && !!(t.hint || s.value)), f = b(() => l.value || u.value || c.value || d.value);
|
|
53
53
|
return {
|
|
54
54
|
hasInvalidLabelOrSlot: l,
|
|
55
55
|
hasHintLabelOrSlot: d,
|
|
56
56
|
hasValidLabelOrSlot: u,
|
|
57
57
|
hasLoadingLabelOrSlot: c,
|
|
58
|
-
hintSlotScope:
|
|
58
|
+
hintSlotScope: b(() => ({
|
|
59
59
|
modelValue: n.value.modelValue,
|
|
60
60
|
valid: n.value.valid,
|
|
61
61
|
invalid: n.value.invalid,
|
|
62
62
|
loading: n.value.loading
|
|
63
63
|
})),
|
|
64
|
-
HintSlot:
|
|
64
|
+
HintSlot: w({
|
|
65
65
|
name: "HintSlot",
|
|
66
66
|
props: { tag: {
|
|
67
67
|
type: String,
|
|
@@ -90,27 +90,27 @@ function ze(e, t) {
|
|
|
90
90
|
})
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
var
|
|
93
|
+
var H = /* @__PURE__ */ (function(e) {
|
|
94
94
|
return e.local = "local", e.session = "session", e;
|
|
95
|
-
})({}),
|
|
95
|
+
})({}), ze = /* @__PURE__ */ (function(e) {
|
|
96
96
|
return e.absolute = "absolute", e.fixed = "fixed", e;
|
|
97
|
-
})({}),
|
|
97
|
+
})({}), U = /* @__PURE__ */ (function(e) {
|
|
98
98
|
return e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e;
|
|
99
|
-
})({}),
|
|
99
|
+
})({}), Be = /* @__PURE__ */ (function(e) {
|
|
100
100
|
return e.topStart = "top-start", e.topEnd = "top-end", e.bottomStart = "bottom-start", e.bottomEnd = "bottom-end", e.leftStart = "left-start", e.leftEnd = "left-end", e.rightStart = "right-start", e.rightEnd = "right-end", e;
|
|
101
|
-
})({}),
|
|
101
|
+
})({}), W = /* @__PURE__ */ (function(e) {
|
|
102
102
|
return e.before = "before", e.after = "after", e;
|
|
103
|
-
})({}),
|
|
103
|
+
})({}), Ve = /* @__PURE__ */ (function(e) {
|
|
104
104
|
return e.button = "button", e.submit = "submit", e.reset = "reset", e;
|
|
105
|
-
})({}),
|
|
105
|
+
})({}), He = /* @__PURE__ */ (function(e) {
|
|
106
106
|
return e.nuxtLink = "nuxt-link", e.routerLink = "router-link", e.a = "a", e.button = "button", e;
|
|
107
|
-
})({}), W = /* @__PURE__ */ (function(e) {
|
|
108
|
-
return e.button = "button", e.link = "link", e.menuitem = "menuitem", e;
|
|
109
107
|
})({}), G = /* @__PURE__ */ (function(e) {
|
|
108
|
+
return e.button = "button", e.link = "link", e.menuitem = "menuitem", e;
|
|
109
|
+
})({}), K = /* @__PURE__ */ (function(e) {
|
|
110
110
|
return e.listbox = "listbox", e.menu = "menu", e;
|
|
111
|
-
})({}),
|
|
111
|
+
})({}), Ue = /* @__PURE__ */ (function(e) {
|
|
112
112
|
return e.option = "option", e.presentation = "presentation", e;
|
|
113
|
-
})({}),
|
|
113
|
+
})({}), We = /* @__PURE__ */ Symbol.for("volver"), Ge = /* @__PURE__ */ Symbol.for("dropdownTrigger"), Ke = /* @__PURE__ */ Symbol.for("dropdownItem"), qe = /* @__PURE__ */ Symbol.for("dropdownAction"), q = {
|
|
114
114
|
showPassword: "eye-on",
|
|
115
115
|
hidePassword: "eye-off",
|
|
116
116
|
showDatePicker: "calendar",
|
|
@@ -121,7 +121,7 @@ var V = /* @__PURE__ */ (function(e) {
|
|
|
121
121
|
remove: "trash",
|
|
122
122
|
edit: "edit",
|
|
123
123
|
download: "download"
|
|
124
|
-
},
|
|
124
|
+
}, Je = { prefix: "normal" }, Ye = {
|
|
125
125
|
to: { type: [String, Object] },
|
|
126
126
|
href: String,
|
|
127
127
|
target: String,
|
|
@@ -129,7 +129,7 @@ var V = /* @__PURE__ */ (function(e) {
|
|
|
129
129
|
type: String,
|
|
130
130
|
default: "noopener noreferrer"
|
|
131
131
|
}
|
|
132
|
-
},
|
|
132
|
+
}, Xe = {
|
|
133
133
|
valid: {
|
|
134
134
|
type: Boolean,
|
|
135
135
|
default: !1
|
|
@@ -138,7 +138,7 @@ var V = /* @__PURE__ */ (function(e) {
|
|
|
138
138
|
type: [String, Array],
|
|
139
139
|
default: void 0
|
|
140
140
|
}
|
|
141
|
-
},
|
|
141
|
+
}, Ze = {
|
|
142
142
|
invalid: {
|
|
143
143
|
type: Boolean,
|
|
144
144
|
default: !1
|
|
@@ -147,7 +147,7 @@ var V = /* @__PURE__ */ (function(e) {
|
|
|
147
147
|
type: [String, Array],
|
|
148
148
|
default: void 0
|
|
149
149
|
}
|
|
150
|
-
},
|
|
150
|
+
}, Qe = {
|
|
151
151
|
loading: {
|
|
152
152
|
type: Boolean,
|
|
153
153
|
default: !1
|
|
@@ -156,24 +156,24 @@ var V = /* @__PURE__ */ (function(e) {
|
|
|
156
156
|
type: String,
|
|
157
157
|
default: "Loading..."
|
|
158
158
|
}
|
|
159
|
-
},
|
|
159
|
+
}, J = { disabled: {
|
|
160
160
|
type: Boolean,
|
|
161
161
|
default: !1
|
|
162
|
-
} },
|
|
162
|
+
} }, $e = { required: {
|
|
163
163
|
type: Boolean,
|
|
164
164
|
default: !1
|
|
165
|
-
} },
|
|
165
|
+
} }, et = { selected: {
|
|
166
166
|
type: Boolean,
|
|
167
167
|
default: !1
|
|
168
|
-
} },
|
|
168
|
+
} }, Y = { active: {
|
|
169
169
|
type: Boolean,
|
|
170
170
|
default: !1
|
|
171
|
-
} },
|
|
171
|
+
} }, tt = { current: {
|
|
172
172
|
type: Boolean,
|
|
173
173
|
default: !1
|
|
174
174
|
} };
|
|
175
|
-
|
|
176
|
-
var
|
|
175
|
+
q.clear;
|
|
176
|
+
var nt = { pressed: {
|
|
177
177
|
type: Boolean,
|
|
178
178
|
default: !1
|
|
179
179
|
} }, rt = { label: {
|
|
@@ -237,8 +237,8 @@ var Y = { pressed: {
|
|
|
237
237
|
},
|
|
238
238
|
iconPosition: {
|
|
239
239
|
type: String,
|
|
240
|
-
default:
|
|
241
|
-
validator: (e) => Object.values(
|
|
240
|
+
default: W.before,
|
|
241
|
+
validator: (e) => Object.values(W).includes(e)
|
|
242
242
|
}
|
|
243
243
|
}, ut = { tabindex: {
|
|
244
244
|
type: [String, Number],
|
|
@@ -252,13 +252,13 @@ var Y = { pressed: {
|
|
|
252
252
|
} }, pt = { id: [String, Number] }, mt = {
|
|
253
253
|
placement: {
|
|
254
254
|
type: String,
|
|
255
|
-
default:
|
|
256
|
-
validator: (e) => Object.values(
|
|
255
|
+
default: U.bottom,
|
|
256
|
+
validator: (e) => Object.values(U).includes(e) || Object.values(Be).includes(e)
|
|
257
257
|
},
|
|
258
258
|
strategy: {
|
|
259
259
|
type: String,
|
|
260
260
|
default: void 0,
|
|
261
|
-
validator: (e) => Object.values(
|
|
261
|
+
validator: (e) => Object.values(ze).includes(e)
|
|
262
262
|
},
|
|
263
263
|
transitionName: {
|
|
264
264
|
type: String,
|
|
@@ -325,12 +325,12 @@ var Y = { pressed: {
|
|
|
325
325
|
...gt,
|
|
326
326
|
..._t,
|
|
327
327
|
...ut,
|
|
328
|
-
...
|
|
328
|
+
...J,
|
|
329
329
|
...Z,
|
|
330
|
+
...Xe,
|
|
330
331
|
...Ze,
|
|
331
|
-
...Qe,
|
|
332
332
|
...at,
|
|
333
|
-
|
|
333
|
+
...Qe,
|
|
334
334
|
...it,
|
|
335
335
|
...st,
|
|
336
336
|
...ct,
|
|
@@ -350,44 +350,44 @@ var Y = { pressed: {
|
|
|
350
350
|
type: String,
|
|
351
351
|
default: void 0
|
|
352
352
|
},
|
|
353
|
-
|
|
353
|
+
...$e
|
|
354
354
|
};
|
|
355
355
|
({
|
|
356
356
|
...ht,
|
|
357
357
|
...ut,
|
|
358
|
+
...Xe,
|
|
358
359
|
...Ze,
|
|
359
|
-
...Qe,
|
|
360
360
|
...at,
|
|
361
|
-
...
|
|
361
|
+
...J,
|
|
362
362
|
...Z,
|
|
363
363
|
...it,
|
|
364
364
|
...rt,
|
|
365
365
|
...X,
|
|
366
|
-
|
|
366
|
+
...Qe
|
|
367
367
|
}), {
|
|
368
|
+
...Xe,
|
|
368
369
|
...Ze,
|
|
369
|
-
...Qe,
|
|
370
370
|
...ot,
|
|
371
371
|
...at,
|
|
372
|
-
...
|
|
372
|
+
...J,
|
|
373
373
|
...Z,
|
|
374
374
|
...it,
|
|
375
375
|
...rt,
|
|
376
|
-
|
|
377
|
-
|
|
376
|
+
...Qe,
|
|
377
|
+
...$e
|
|
378
378
|
}, {
|
|
379
|
-
...q,
|
|
380
|
-
...rt,
|
|
381
|
-
...Y,
|
|
382
379
|
...J,
|
|
380
|
+
...rt,
|
|
383
381
|
...nt,
|
|
384
|
-
...
|
|
385
|
-
|
|
382
|
+
...Y,
|
|
383
|
+
...tt,
|
|
384
|
+
...Ye
|
|
385
|
+
}, Ve.button, He.button;
|
|
386
386
|
var yt = {
|
|
387
387
|
storageType: {
|
|
388
388
|
type: String,
|
|
389
|
-
default:
|
|
390
|
-
validator: (e) => Object.values(
|
|
389
|
+
default: H.local,
|
|
390
|
+
validator: (e) => Object.values(H).includes(e)
|
|
391
391
|
},
|
|
392
392
|
storageKey: String
|
|
393
393
|
}, bt = {
|
|
@@ -404,15 +404,15 @@ var yt = {
|
|
|
404
404
|
},
|
|
405
405
|
role: {
|
|
406
406
|
type: String,
|
|
407
|
-
default:
|
|
408
|
-
validator: (e) => Object.values(
|
|
407
|
+
default: K.menu,
|
|
408
|
+
validator: (e) => Object.values(K).includes(e)
|
|
409
409
|
}
|
|
410
410
|
}, xt = { focusOnHover: {
|
|
411
411
|
type: Boolean,
|
|
412
412
|
default: !1
|
|
413
413
|
} }, St = {
|
|
414
|
-
...
|
|
415
|
-
...
|
|
414
|
+
...J,
|
|
415
|
+
...et,
|
|
416
416
|
...ft,
|
|
417
417
|
...it,
|
|
418
418
|
deselectHintLabel: { type: String },
|
|
@@ -425,10 +425,10 @@ var yt = {
|
|
|
425
425
|
};
|
|
426
426
|
function Ct(e) {
|
|
427
427
|
let t = d();
|
|
428
|
-
return
|
|
428
|
+
return b(() => String(e?.value || t));
|
|
429
429
|
}
|
|
430
430
|
function wt(e, t) {
|
|
431
|
-
let n = globalThis.HTMLElement !== void 0 && "popover" in globalThis.HTMLElement.prototype, r =
|
|
431
|
+
let n = globalThis.HTMLElement !== void 0 && "popover" in globalThis.HTMLElement.prototype, r = b(() => n && T(t)), i = b(() => r.value ? "manual" : void 0);
|
|
432
432
|
function a() {
|
|
433
433
|
return (n && e.value?.matches(":popover-open")) ?? !1;
|
|
434
434
|
}
|
|
@@ -450,13 +450,13 @@ function wt(e, t) {
|
|
|
450
450
|
};
|
|
451
451
|
}
|
|
452
452
|
function Tt({ reference: e, id: t, expanded: n, aria: r }) {
|
|
453
|
-
let a =
|
|
453
|
+
let a = ke();
|
|
454
454
|
return {
|
|
455
455
|
bus: a,
|
|
456
|
-
component:
|
|
456
|
+
component: w({
|
|
457
457
|
name: "VvDropdownTriggerProvider",
|
|
458
458
|
setup() {
|
|
459
|
-
|
|
459
|
+
D(Ge, {
|
|
460
460
|
reference: e,
|
|
461
461
|
id: t,
|
|
462
462
|
expanded: n,
|
|
@@ -471,20 +471,20 @@ function Tt({ reference: e, id: t, expanded: n, aria: r }) {
|
|
|
471
471
|
};
|
|
472
472
|
}
|
|
473
473
|
function Et({ role: e, ...t }) {
|
|
474
|
-
let n =
|
|
475
|
-
return
|
|
474
|
+
let n = b(() => e.value === K.listbox ? Ue.option : Ue.presentation);
|
|
475
|
+
return D(Ke, {
|
|
476
476
|
role: n,
|
|
477
477
|
...t
|
|
478
478
|
}), { itemRole: n };
|
|
479
479
|
}
|
|
480
480
|
function Dt({ expanded: e }) {
|
|
481
|
-
|
|
482
|
-
role:
|
|
481
|
+
D(qe, {
|
|
482
|
+
role: x(G.menuitem),
|
|
483
483
|
expanded: e
|
|
484
484
|
});
|
|
485
485
|
}
|
|
486
486
|
function Ot(e, t, n) {
|
|
487
|
-
return
|
|
487
|
+
return b(() => {
|
|
488
488
|
let i = { [e]: !0 }, a = typeof t?.value == "string" ? t.value.split(" ") : t?.value;
|
|
489
489
|
return a && Array.isArray(a) && a.forEach((t) => {
|
|
490
490
|
t && (i[`${e}--${t}`] = !0);
|
|
@@ -498,7 +498,7 @@ var kt = ["popover"], At = [
|
|
|
498
498
|
"tabindex",
|
|
499
499
|
"role",
|
|
500
500
|
"aria-labelledby"
|
|
501
|
-
], jt = /* @__PURE__ */
|
|
501
|
+
], jt = /* @__PURE__ */ w({
|
|
502
502
|
name: "VvDropdown",
|
|
503
503
|
inheritAttrs: !1,
|
|
504
504
|
props: bt,
|
|
@@ -520,164 +520,164 @@ var kt = ["popover"], At = [
|
|
|
520
520
|
"leaveCancelled"
|
|
521
521
|
],
|
|
522
522
|
setup(t, { expose: n, emit: i }) {
|
|
523
|
-
let u = t, d = i, { id: ee } = se(u), g = Ct(ee), ae = c(), oe =
|
|
523
|
+
let u = t, d = i, { id: ee } = se(u), g = Ct(ee), ae = c(), oe = x(), _ = x(), le = x(), ue = x(), S = b({
|
|
524
524
|
get: () => u.reference ?? oe.value,
|
|
525
525
|
set: (e) => {
|
|
526
526
|
oe.value = e;
|
|
527
527
|
}
|
|
528
|
-
}), { isTopLayer:
|
|
528
|
+
}), { isTopLayer: fe, popover: pe, show: w, hide: ge } = wt(_, () => u.topLayer), _e = b(() => fe.value ? ze.fixed : u.strategy), T = x(!1);
|
|
529
529
|
l(() => {
|
|
530
|
-
|
|
531
|
-
|
|
530
|
+
Se(_.value, () => {
|
|
531
|
+
T.value = globalThis.getComputedStyle(_.value).getPropertyValue("--dropdown-custom-position")?.trim() === "true";
|
|
532
532
|
}, {
|
|
533
533
|
attributeFilter: ["style"],
|
|
534
534
|
window: globalThis.window
|
|
535
535
|
});
|
|
536
536
|
});
|
|
537
|
-
function
|
|
537
|
+
function D(e, t, n) {
|
|
538
538
|
return typeof e == "boolean" ? t() : n(e);
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function O(e) {
|
|
541
541
|
return !e.width && !e.height;
|
|
542
542
|
}
|
|
543
|
-
let
|
|
543
|
+
let ve = {
|
|
544
544
|
name: "uncap",
|
|
545
545
|
fn({ elements: e, rects: t, middlewareData: n }) {
|
|
546
546
|
let { style: r } = e.floating, i = t.floating.height >= Number.parseFloat(r.maxHeight) - 1 || t.floating.width >= Number.parseFloat(r.maxWidth) - 1;
|
|
547
|
-
return n.uncap || !i ||
|
|
547
|
+
return n.uncap || !i || O(t.floating) ? {} : (r.maxHeight = "", r.maxWidth = "", {
|
|
548
548
|
data: { uncapped: !0 },
|
|
549
549
|
reset: { rects: !0 }
|
|
550
550
|
});
|
|
551
551
|
}
|
|
552
|
-
},
|
|
552
|
+
}, k = b(() => {
|
|
553
553
|
let e = [];
|
|
554
|
-
u.size && e.push(
|
|
554
|
+
u.size && e.push(ve), u.offset && e.push(["string", "number"].includes(typeof u.offset) ? N(Number(u.offset)) : N(u.offset));
|
|
555
555
|
let t = typeof u.size == "object" ? u.size.padding : void 0;
|
|
556
|
-
if (u.autoPlacement ? e.push(
|
|
556
|
+
if (u.autoPlacement ? e.push(D(u.autoPlacement, () => Ae(), (e) => Ae(e))) : u.flip && e.push(D(u.flip, () => Ee({
|
|
557
557
|
fallbackStrategy: "initialPlacement",
|
|
558
558
|
padding: t
|
|
559
|
-
}), (e) =>
|
|
559
|
+
}), (e) => Ee({
|
|
560
560
|
padding: t,
|
|
561
561
|
...e
|
|
562
|
-
}))), u.shift && e.push(
|
|
562
|
+
}))), u.shift && e.push(D(u.shift, () => je(), (e) => je(e))), u.size) {
|
|
563
563
|
let t = ({ availableWidth: e, availableHeight: t, elements: n, rects: r }) => {
|
|
564
|
-
if (
|
|
564
|
+
if (O(r.floating) || T.value) return;
|
|
565
565
|
let { style: i } = n.floating;
|
|
566
|
-
i.maxWidth = u.triggerWidth &&
|
|
566
|
+
i.maxWidth = u.triggerWidth && S.value ? "" : `${Math.max(0, e)}px`, i.maxHeight = `${Math.max(0, t)}px`;
|
|
567
567
|
};
|
|
568
|
-
e.push(
|
|
568
|
+
e.push(D(u.size, () => De({ apply: t }), (e) => De({
|
|
569
569
|
...e,
|
|
570
570
|
apply: (n) => (t(n), e?.apply?.(n))
|
|
571
571
|
})));
|
|
572
572
|
}
|
|
573
|
-
return u.arrow && e.push(
|
|
574
|
-
}), { x:
|
|
575
|
-
placement:
|
|
576
|
-
strategy:
|
|
577
|
-
middleware:
|
|
578
|
-
}),
|
|
579
|
-
if (
|
|
580
|
-
let e = u.triggerWidth &&
|
|
573
|
+
return u.arrow && e.push(P({ element: le })), e;
|
|
574
|
+
}), { x: xe, y: Te, middlewareData: j, placement: ke, strategy: Me, update: F } = M(S, _, {
|
|
575
|
+
placement: b(() => u.placement),
|
|
576
|
+
strategy: _e,
|
|
577
|
+
middleware: k
|
|
578
|
+
}), I = b(() => {
|
|
579
|
+
if (T.value) return;
|
|
580
|
+
let e = u.triggerWidth && S.value ? `${S.value?.offsetWidth}px` : void 0;
|
|
581
581
|
return {
|
|
582
|
-
position:
|
|
583
|
-
top: `${
|
|
584
|
-
left: `${
|
|
582
|
+
position: Me.value,
|
|
583
|
+
top: `${Te.value ?? 0}px`,
|
|
584
|
+
left: `${xe.value ?? 0}px`,
|
|
585
585
|
width: e
|
|
586
586
|
};
|
|
587
|
-
}),
|
|
588
|
-
if (
|
|
587
|
+
}), Ne = b(() => ke.value.split("-")[0]), Pe = b(() => {
|
|
588
|
+
if (T.value) return;
|
|
589
589
|
let e = {
|
|
590
|
-
[
|
|
591
|
-
[
|
|
592
|
-
[
|
|
593
|
-
[
|
|
594
|
-
}[
|
|
590
|
+
[U.top]: U.bottom,
|
|
591
|
+
[U.right]: U.left,
|
|
592
|
+
[U.bottom]: U.top,
|
|
593
|
+
[U.left]: U.right
|
|
594
|
+
}[Ne.value];
|
|
595
595
|
return {
|
|
596
|
-
left:
|
|
597
|
-
top:
|
|
596
|
+
left: j.value.arrow?.x === void 0 ? void 0 : `${j.value.arrow?.x}px`,
|
|
597
|
+
top: j.value.arrow?.y === void 0 ? void 0 : `${j.value.arrow?.y}px`,
|
|
598
598
|
[e]: `${-(le.value?.offsetWidth ?? 0) / 2}px`
|
|
599
599
|
};
|
|
600
|
-
}),
|
|
601
|
-
get: () =>
|
|
600
|
+
}), Fe = ye(u, "modelValue", d), Ie = x(!1), L = b({
|
|
601
|
+
get: () => Fe.value ?? Ie.value,
|
|
602
602
|
set: (e) => {
|
|
603
|
-
|
|
603
|
+
Fe.value === void 0 ? Ie.value = e : Fe.value = e;
|
|
604
604
|
}
|
|
605
605
|
});
|
|
606
606
|
h([
|
|
607
|
-
|
|
608
|
-
|
|
607
|
+
L,
|
|
608
|
+
S,
|
|
609
609
|
_,
|
|
610
|
-
|
|
610
|
+
_e
|
|
611
611
|
], ([e, t, n, r], i, a) => {
|
|
612
|
-
!e || !t || !n || a(
|
|
612
|
+
!e || !t || !n || a(Oe(t, n, F, { animationFrame: r === ze.fixed }));
|
|
613
613
|
}, {
|
|
614
614
|
flush: "post",
|
|
615
615
|
immediate: !0
|
|
616
|
-
}),
|
|
617
|
-
|
|
616
|
+
}), Se(ue, () => {
|
|
617
|
+
L.value && F();
|
|
618
618
|
}, {
|
|
619
619
|
childList: !0,
|
|
620
620
|
subtree: !0,
|
|
621
621
|
characterData: !0
|
|
622
622
|
}), e(() => {
|
|
623
|
-
|
|
623
|
+
L.value && w();
|
|
624
624
|
});
|
|
625
|
-
function L() {
|
|
626
|
-
I.value = !0;
|
|
627
|
-
}
|
|
628
625
|
function R() {
|
|
629
|
-
|
|
626
|
+
L.value = !0;
|
|
630
627
|
}
|
|
631
628
|
function z() {
|
|
632
|
-
|
|
629
|
+
L.value = !1;
|
|
630
|
+
}
|
|
631
|
+
function B() {
|
|
632
|
+
L.value = !L.value;
|
|
633
633
|
}
|
|
634
|
-
function
|
|
635
|
-
|
|
634
|
+
function V(e) {
|
|
635
|
+
S.value = e;
|
|
636
636
|
}
|
|
637
|
-
|
|
638
|
-
!u.keepOpen &&
|
|
639
|
-
}, { ignore: [
|
|
640
|
-
let
|
|
637
|
+
Ce(_, () => {
|
|
638
|
+
!u.keepOpen && L.value && (L.value = !1);
|
|
639
|
+
}, { ignore: [S] });
|
|
640
|
+
let Le = b(() => S.value?.getAttribute?.("id") ?? void 0), Re = b(() => ({
|
|
641
641
|
"aria-controls": g.value,
|
|
642
642
|
"aria-haspopup": !0,
|
|
643
|
-
"aria-expanded":
|
|
644
|
-
})), { component:
|
|
645
|
-
reference:
|
|
643
|
+
"aria-expanded": L.value
|
|
644
|
+
})), { component: H, bus: Be } = Tt({
|
|
645
|
+
reference: S,
|
|
646
646
|
id: g,
|
|
647
|
-
expanded:
|
|
648
|
-
aria:
|
|
647
|
+
expanded: L,
|
|
648
|
+
aria: Re
|
|
649
649
|
});
|
|
650
|
-
|
|
651
|
-
let { role:
|
|
652
|
-
function
|
|
650
|
+
Be.on("click", B);
|
|
651
|
+
let { role: W, modifiers: Ve } = se(u), He = Ot("vv-dropdown", Ve, b(() => ({ arrow: u.arrow }))), { focused: G } = be(_);
|
|
652
|
+
function K(e) {
|
|
653
653
|
return e ? [...e.querySelectorAll("a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])")].filter((e) => !e.hasAttribute("disabled") && !e.getAttribute("aria-hidden")) : [];
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function Ue() {
|
|
656
656
|
te(() => {
|
|
657
|
-
let e =
|
|
657
|
+
let e = K(_.value);
|
|
658
658
|
e.length > 0 && e[0].focus({ preventScroll: !0 });
|
|
659
659
|
});
|
|
660
660
|
}
|
|
661
|
-
function
|
|
661
|
+
function We() {
|
|
662
662
|
te(() => {
|
|
663
|
-
let e =
|
|
663
|
+
let e = K(ue.value);
|
|
664
664
|
e.length > 0 && e[0].focus({ preventScroll: !0 });
|
|
665
665
|
});
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function Ge() {
|
|
668
668
|
te(() => {
|
|
669
|
-
if (
|
|
670
|
-
let e =
|
|
669
|
+
if (G.value) {
|
|
670
|
+
let e = K(_.value);
|
|
671
671
|
if (e.length === 0 || !document.activeElement) return;
|
|
672
672
|
let t = e.indexOf(document.activeElement);
|
|
673
673
|
t < e.length - 1 ? e[t + 1].focus({ preventScroll: !0 }) : e[0].focus({ preventScroll: !0 });
|
|
674
674
|
}
|
|
675
675
|
});
|
|
676
676
|
}
|
|
677
|
-
function
|
|
677
|
+
function Ke() {
|
|
678
678
|
te(() => {
|
|
679
|
-
if (
|
|
680
|
-
let e =
|
|
679
|
+
if (G.value) {
|
|
680
|
+
let e = K(_.value);
|
|
681
681
|
if (e.length === 0 || !document.activeElement) return;
|
|
682
682
|
let t = e.indexOf(document.activeElement);
|
|
683
683
|
if (t > 0) {
|
|
@@ -688,41 +688,41 @@ var kt = ["popover"], At = [
|
|
|
688
688
|
}
|
|
689
689
|
});
|
|
690
690
|
}
|
|
691
|
-
h(
|
|
692
|
-
e && u.autofocusFirst &&
|
|
691
|
+
h(L, (e) => {
|
|
692
|
+
e && u.autofocusFirst && Ue();
|
|
693
693
|
}), n({
|
|
694
|
-
toggle:
|
|
695
|
-
show:
|
|
696
|
-
hide:
|
|
697
|
-
init:
|
|
698
|
-
focusFirst:
|
|
699
|
-
focusFirstListElement:
|
|
700
|
-
focusNext:
|
|
701
|
-
focusPrev:
|
|
702
|
-
customPosition:
|
|
694
|
+
toggle: B,
|
|
695
|
+
show: R,
|
|
696
|
+
hide: z,
|
|
697
|
+
init: V,
|
|
698
|
+
focusFirst: Ue,
|
|
699
|
+
focusFirstListElement: We,
|
|
700
|
+
focusNext: Ge,
|
|
701
|
+
focusPrev: Ke,
|
|
702
|
+
customPosition: T
|
|
703
703
|
});
|
|
704
|
-
let { itemRole:
|
|
705
|
-
role:
|
|
706
|
-
expanded:
|
|
707
|
-
focused:
|
|
708
|
-
hovered:
|
|
704
|
+
let { itemRole: qe } = Et({
|
|
705
|
+
role: W,
|
|
706
|
+
expanded: L,
|
|
707
|
+
focused: G,
|
|
708
|
+
hovered: A(_)
|
|
709
709
|
});
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
}),
|
|
713
|
-
|
|
714
|
-
}),
|
|
715
|
-
|
|
716
|
-
}),
|
|
710
|
+
we("Escape", (e) => {
|
|
711
|
+
L.value && (e.preventDefault(), z());
|
|
712
|
+
}), we("ArrowDown", (e) => {
|
|
713
|
+
L.value && G.value && (e.preventDefault(), Ge());
|
|
714
|
+
}), we("ArrowUp", (e) => {
|
|
715
|
+
L.value && G.value && (e.preventDefault(), Ke());
|
|
716
|
+
}), we([" ", "Enter"], (e) => {
|
|
717
717
|
let t = e.target;
|
|
718
|
-
|
|
718
|
+
L.value && G.value && t && t?.click();
|
|
719
719
|
});
|
|
720
|
-
let
|
|
720
|
+
let q = {
|
|
721
721
|
"before-enter": () => {
|
|
722
722
|
d("beforeExpand"), d("beforeEnter");
|
|
723
723
|
},
|
|
724
724
|
"after-leave": () => {
|
|
725
|
-
|
|
725
|
+
L.value || ge(), d("afterCollapse"), d("afterLeave");
|
|
726
726
|
},
|
|
727
727
|
enter: () => {
|
|
728
728
|
d("enter");
|
|
@@ -743,90 +743,90 @@ var kt = ["popover"], At = [
|
|
|
743
743
|
d("leaveCancelled");
|
|
744
744
|
}
|
|
745
745
|
};
|
|
746
|
-
return (e, t) => (p(),
|
|
746
|
+
return (e, t) => (p(), E(ce, null, [ne(r(H), null, {
|
|
747
747
|
default: v(() => [m(e.$slots, "default", s(o({
|
|
748
|
-
init:
|
|
749
|
-
show:
|
|
750
|
-
hide:
|
|
751
|
-
toggle:
|
|
752
|
-
expanded: r(
|
|
753
|
-
aria: r(
|
|
748
|
+
init: V,
|
|
749
|
+
show: R,
|
|
750
|
+
hide: z,
|
|
751
|
+
toggle: B,
|
|
752
|
+
expanded: r(L),
|
|
753
|
+
aria: r(Re)
|
|
754
754
|
})))]),
|
|
755
755
|
_: 3
|
|
756
|
-
}), ne(
|
|
757
|
-
default: v(() => [
|
|
756
|
+
}), ne(me, f({ name: e.transitionName }, ie(q), { persisted: "" }), {
|
|
757
|
+
default: v(() => [he(y("div", {
|
|
758
758
|
ref_key: "floatingEl",
|
|
759
759
|
ref: _,
|
|
760
|
-
popover: r(
|
|
761
|
-
style: a(r(
|
|
762
|
-
class: re(r(
|
|
760
|
+
popover: r(pe),
|
|
761
|
+
style: a(r(I)),
|
|
762
|
+
class: re(r(He))
|
|
763
763
|
}, [
|
|
764
|
-
u.arrow ? (p(),
|
|
764
|
+
u.arrow ? (p(), E("div", {
|
|
765
765
|
key: 0,
|
|
766
766
|
ref_key: "arrowEl",
|
|
767
767
|
ref: le,
|
|
768
|
-
style: a(r(
|
|
768
|
+
style: a(r(Pe)),
|
|
769
769
|
class: "vv-dropdown__arrow"
|
|
770
|
-
}, null, 4)) :
|
|
770
|
+
}, null, 4)) : C("v-if", !0),
|
|
771
771
|
m(e.$slots, "before", s(o({
|
|
772
|
-
show:
|
|
773
|
-
hide:
|
|
774
|
-
toggle:
|
|
775
|
-
expanded: r(
|
|
772
|
+
show: R,
|
|
773
|
+
hide: z,
|
|
774
|
+
toggle: B,
|
|
775
|
+
expanded: r(L)
|
|
776
776
|
}))),
|
|
777
|
-
|
|
777
|
+
y("div", f(r(ae), {
|
|
778
778
|
id: r(g),
|
|
779
779
|
ref_key: "listEl",
|
|
780
|
-
ref:
|
|
781
|
-
tabindex: r(
|
|
782
|
-
role: r(
|
|
783
|
-
"aria-labelledby": r(
|
|
780
|
+
ref: ue,
|
|
781
|
+
tabindex: r(L) ? void 0 : -1,
|
|
782
|
+
role: r(W),
|
|
783
|
+
"aria-labelledby": r(Le),
|
|
784
784
|
class: "vv-dropdown__list"
|
|
785
785
|
}), [m(e.$slots, "items", s(o({
|
|
786
|
-
show:
|
|
787
|
-
hide:
|
|
788
|
-
toggle:
|
|
789
|
-
expanded: r(
|
|
790
|
-
role: r(
|
|
786
|
+
show: R,
|
|
787
|
+
hide: z,
|
|
788
|
+
toggle: B,
|
|
789
|
+
expanded: r(L),
|
|
790
|
+
role: r(qe)
|
|
791
791
|
})))], 16, At),
|
|
792
792
|
m(e.$slots, "after", s(o({
|
|
793
|
-
show:
|
|
794
|
-
hide:
|
|
795
|
-
toggle:
|
|
796
|
-
expanded: r(
|
|
793
|
+
show: R,
|
|
794
|
+
hide: z,
|
|
795
|
+
toggle: B,
|
|
796
|
+
expanded: r(L)
|
|
797
797
|
})))
|
|
798
|
-
], 14, kt), [[
|
|
798
|
+
], 14, kt), [[de, r(L)]])]),
|
|
799
799
|
_: 3
|
|
800
800
|
}, 16, ["name"])], 64));
|
|
801
801
|
}
|
|
802
802
|
});
|
|
803
803
|
function Mt() {
|
|
804
|
-
return t(
|
|
804
|
+
return t(Ke, {});
|
|
805
805
|
}
|
|
806
|
-
var Nt = /* @__PURE__ */
|
|
806
|
+
var Nt = /* @__PURE__ */ w({
|
|
807
807
|
name: "VvDropdownItem",
|
|
808
808
|
props: xt,
|
|
809
809
|
setup(e) {
|
|
810
|
-
let t = e, { role: n, expanded: i } = Mt(), a =
|
|
810
|
+
let t = e, { role: n, expanded: i } = Mt(), a = x(null);
|
|
811
811
|
Dt({ expanded: i });
|
|
812
|
-
let o =
|
|
812
|
+
let o = A(a), { focused: s } = Te(a), { focused: c } = be(a);
|
|
813
813
|
return h(o, (e) => {
|
|
814
814
|
e && t.focusOnHover && (s.value = !0);
|
|
815
|
-
}), (e, t) => (p(),
|
|
815
|
+
}), (e, t) => (p(), E("div", f({ role: r(n) }, {
|
|
816
816
|
ref_key: "element",
|
|
817
817
|
ref: a,
|
|
818
818
|
class: ["vv-dropdown__item", { "focus-visible": r(s) || r(c) }]
|
|
819
819
|
}), [m(e.$slots, "default")], 16));
|
|
820
820
|
}
|
|
821
|
-
}), Pt = ["title"], Ft = /* @__PURE__ */
|
|
821
|
+
}), Pt = ["title"], Ft = /* @__PURE__ */ w({
|
|
822
822
|
name: "VvDropdownOption",
|
|
823
823
|
props: St,
|
|
824
824
|
setup(e) {
|
|
825
|
-
let t = e, { modifiers: n } = se(t), i = Ot("vv-dropdown-option", n,
|
|
825
|
+
let t = e, { modifiers: n } = se(t), i = Ot("vv-dropdown-option", n, b(() => ({
|
|
826
826
|
disabled: t.disabled,
|
|
827
827
|
selected: t.selected,
|
|
828
828
|
unselectable: t.unselectable && t.selected
|
|
829
|
-
}))), a =
|
|
829
|
+
}))), a = b(() => t.selected ? t.unselectable ? t.deselectHintLabel : t.selectedHintLabel : t.disabled ? "" : t.selectHintLabel);
|
|
830
830
|
return (e, t) => (p(), g(Nt, {
|
|
831
831
|
class: re(r(i)),
|
|
832
832
|
tabindex: e.disabled ? -1 : 0,
|
|
@@ -834,14 +834,14 @@ var Nt = /* @__PURE__ */ C({
|
|
|
834
834
|
"aria-disabled": e.disabled,
|
|
835
835
|
"focus-on-hover": e.focusOnHover
|
|
836
836
|
}, {
|
|
837
|
-
default: v(() => [m(e.$slots, "default"),
|
|
837
|
+
default: v(() => [m(e.$slots, "default"), y("span", {
|
|
838
838
|
class: "vv-dropdown-option__hint",
|
|
839
839
|
title: r(a)
|
|
840
840
|
}, [m(e.$slots, "hint", s(o({
|
|
841
841
|
disabled: e.disabled,
|
|
842
842
|
selected: e.selected,
|
|
843
843
|
unselectable: e.unselectable
|
|
844
|
-
})), () => [
|
|
844
|
+
})), () => [_e(ee(r(a)), 1)])], 8, Pt)]),
|
|
845
845
|
_: 3
|
|
846
846
|
}, 8, [
|
|
847
847
|
"class",
|
|
@@ -853,11 +853,11 @@ var Nt = /* @__PURE__ */ C({
|
|
|
853
853
|
}
|
|
854
854
|
});
|
|
855
855
|
function It() {
|
|
856
|
-
return t(
|
|
856
|
+
return t(We, void 0);
|
|
857
857
|
}
|
|
858
|
-
var Q = /* @__PURE__ */
|
|
858
|
+
var Q = /* @__PURE__ */ w({
|
|
859
859
|
name: "VvIcon",
|
|
860
|
-
props: /* @__PURE__ */
|
|
860
|
+
props: /* @__PURE__ */ ue({
|
|
861
861
|
name: {},
|
|
862
862
|
color: {},
|
|
863
863
|
width: {},
|
|
@@ -874,14 +874,14 @@ var Q = /* @__PURE__ */ C({
|
|
|
874
874
|
onLoad: { type: Function },
|
|
875
875
|
svg: {},
|
|
876
876
|
modifiers: {}
|
|
877
|
-
},
|
|
877
|
+
}, Je),
|
|
878
878
|
setup(e) {
|
|
879
|
-
let t = e, n =
|
|
879
|
+
let t = e, n = b(() => typeof t.rotate == "string" ? Number.parseFloat(t.rotate) : t.rotate), i = x(!0), a = It(), { modifiers: o } = se(t), s = Ot("vv-icon", o), c = b(() => t.provider || a?.iconsProvider), l = b(() => {
|
|
880
880
|
let e = t.name ?? "", n = `@${c.value}:${t.prefix}:${e}`;
|
|
881
|
-
if (
|
|
881
|
+
if (O(n)) return n;
|
|
882
882
|
let r = a?.iconsCollections.find((t) => {
|
|
883
883
|
let n = `@${c.value}:${t.prefix}:${e}`;
|
|
884
|
-
return
|
|
884
|
+
return O(n);
|
|
885
885
|
});
|
|
886
886
|
return r ? `@${c.value}:${r.prefix}:${e}` : e;
|
|
887
887
|
});
|
|
@@ -890,17 +890,17 @@ var Q = /* @__PURE__ */ C({
|
|
|
890
890
|
}
|
|
891
891
|
function d(e) {
|
|
892
892
|
let n = u(e), r = n?.innerHTML.trim() || "";
|
|
893
|
-
n && r &&
|
|
893
|
+
n && r && ve(`@${c.value}:${t.prefix}:${t.name}`, {
|
|
894
894
|
body: r,
|
|
895
895
|
height: n.viewBox.baseVal.height,
|
|
896
896
|
width: n.viewBox.baseVal.width
|
|
897
897
|
});
|
|
898
898
|
}
|
|
899
|
-
return a && t.src && !
|
|
899
|
+
return a && t.src && !O(`@${c.value}:${t.prefix}:${t.name}`) && (i.value = !1, a.fetchIcon(t.src).then((e) => {
|
|
900
900
|
e && d(e), i.value = !0;
|
|
901
901
|
}).catch((e) => {
|
|
902
902
|
throw i.value = !0, /* @__PURE__ */ Error(`Error during fetch icon: ${e?.message}`);
|
|
903
|
-
})), t.svg && d(t.svg), (t, a) => r(i) ? (p(), g(r(
|
|
903
|
+
})), t.svg && d(t.svg), (t, a) => r(i) ? (p(), g(r(k), f({
|
|
904
904
|
key: 0,
|
|
905
905
|
class: r(s)
|
|
906
906
|
}, {
|
|
@@ -913,7 +913,7 @@ var Q = /* @__PURE__ */ C({
|
|
|
913
913
|
rotate: r(n),
|
|
914
914
|
color: e.color,
|
|
915
915
|
icon: r(l)
|
|
916
|
-
}, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) :
|
|
916
|
+
}, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) : C("v-if", !0);
|
|
917
917
|
}
|
|
918
918
|
}), $ = {
|
|
919
919
|
TEXT: "text",
|
|
@@ -979,19 +979,19 @@ var Q = /* @__PURE__ */ C({
|
|
|
979
979
|
multiple: Boolean,
|
|
980
980
|
iconShowPassword: {
|
|
981
981
|
type: [String, Object],
|
|
982
|
-
default:
|
|
982
|
+
default: q.showPassword
|
|
983
983
|
},
|
|
984
984
|
iconHidePassword: {
|
|
985
985
|
type: [String, Object],
|
|
986
|
-
default:
|
|
986
|
+
default: q.hidePassword
|
|
987
987
|
},
|
|
988
988
|
iconClear: {
|
|
989
989
|
type: [String, Object],
|
|
990
|
-
default:
|
|
990
|
+
default: q.clear
|
|
991
991
|
},
|
|
992
992
|
iconRemoveSuggestion: {
|
|
993
993
|
type: [String, Object],
|
|
994
|
-
default:
|
|
994
|
+
default: q.remove
|
|
995
995
|
},
|
|
996
996
|
labelStepUp: {
|
|
997
997
|
type: String,
|
|
@@ -1053,18 +1053,18 @@ var Q = /* @__PURE__ */ C({
|
|
|
1053
1053
|
}
|
|
1054
1054
|
};
|
|
1055
1055
|
function zt(e, t) {
|
|
1056
|
-
let n =
|
|
1056
|
+
let n = b(() => typeof e?.value == "string" ? { name: e?.value } : e?.value), r = b(() => t?.value === W.before ? n.value : void 0), i = b(() => t?.value === W.after ? n.value : void 0);
|
|
1057
1057
|
return {
|
|
1058
1058
|
hasIcon: n,
|
|
1059
|
-
hasIconLeft:
|
|
1060
|
-
hasIconRight:
|
|
1061
|
-
hasIconTop:
|
|
1062
|
-
hasIconBottom:
|
|
1059
|
+
hasIconLeft: b(() => t?.value === U.left ? n.value : void 0),
|
|
1060
|
+
hasIconRight: b(() => t?.value === U.right ? n.value : void 0),
|
|
1061
|
+
hasIconTop: b(() => t?.value === U.top ? n.value : void 0),
|
|
1062
|
+
hasIconBottom: b(() => t?.value === U.bottom ? n.value : void 0),
|
|
1063
1063
|
hasIconBefore: r,
|
|
1064
1064
|
hasIconAfter: i
|
|
1065
1065
|
};
|
|
1066
1066
|
}
|
|
1067
|
-
var Bt =
|
|
1067
|
+
var Bt = w({
|
|
1068
1068
|
components: { VvIcon: Q },
|
|
1069
1069
|
props: {
|
|
1070
1070
|
inputType: {
|
|
@@ -1086,7 +1086,7 @@ var Bt = C({
|
|
|
1086
1086
|
},
|
|
1087
1087
|
emits: ["clear"],
|
|
1088
1088
|
setup(e, { emit: t }) {
|
|
1089
|
-
let { hasIcon: n } = zt(
|
|
1089
|
+
let { hasIcon: n } = zt(b(() => e.icon));
|
|
1090
1090
|
function r(n) {
|
|
1091
1091
|
n?.stopPropagation(), e.disabled || t("clear");
|
|
1092
1092
|
}
|
|
@@ -1108,7 +1108,7 @@ var Bt = C({
|
|
|
1108
1108
|
onClick: this.onClick
|
|
1109
1109
|
}, e);
|
|
1110
1110
|
}
|
|
1111
|
-
}), Vt =
|
|
1111
|
+
}), Vt = w({
|
|
1112
1112
|
components: { VvIcon: Q },
|
|
1113
1113
|
props: {
|
|
1114
1114
|
inputType: {
|
|
@@ -1129,16 +1129,16 @@ var Bt = C({
|
|
|
1129
1129
|
},
|
|
1130
1130
|
iconShow: {
|
|
1131
1131
|
type: [String, Object],
|
|
1132
|
-
default:
|
|
1132
|
+
default: q.showPassword
|
|
1133
1133
|
},
|
|
1134
1134
|
iconHide: {
|
|
1135
1135
|
type: [String, Object],
|
|
1136
|
-
default:
|
|
1136
|
+
default: q.hidePassword
|
|
1137
1137
|
}
|
|
1138
1138
|
},
|
|
1139
1139
|
emits: ["toggle-password"],
|
|
1140
1140
|
setup(e, { emit: t }) {
|
|
1141
|
-
let n =
|
|
1141
|
+
let n = x(!1), r = b(() => n.value ? e.iconHide : e.iconShow), { hasIcon: i } = zt(r);
|
|
1142
1142
|
function a(r) {
|
|
1143
1143
|
r?.stopPropagation(), e.disabled || (n.value = !n.value, t("toggle-password", n.value));
|
|
1144
1144
|
}
|
|
@@ -1162,7 +1162,7 @@ var Bt = C({
|
|
|
1162
1162
|
onClick: this.onClick
|
|
1163
1163
|
}, e);
|
|
1164
1164
|
}
|
|
1165
|
-
}), Ht =
|
|
1165
|
+
}), Ht = w({
|
|
1166
1166
|
components: { VvIcon: Q },
|
|
1167
1167
|
props: {
|
|
1168
1168
|
inputType: {
|
|
@@ -1182,7 +1182,7 @@ var Bt = C({
|
|
|
1182
1182
|
},
|
|
1183
1183
|
emits: ["step-up", "step-down"],
|
|
1184
1184
|
setup(e, { emit: t }) {
|
|
1185
|
-
let n =
|
|
1185
|
+
let n = b(() => e.mode === "up");
|
|
1186
1186
|
return {
|
|
1187
1187
|
isUp: n,
|
|
1188
1188
|
onClick: (r) => {
|
|
@@ -1216,7 +1216,7 @@ function Ut(e, t, n) {
|
|
|
1216
1216
|
setup() {
|
|
1217
1217
|
return {
|
|
1218
1218
|
isDirty: n,
|
|
1219
|
-
isDisabled:
|
|
1219
|
+
isDisabled: b(() => t.disabled || t.readonly),
|
|
1220
1220
|
labelStepUp: t.labelStepUp,
|
|
1221
1221
|
labelStepDown: t.labelStepDown,
|
|
1222
1222
|
labelShowPassword: t.labelShowPassword,
|
|
@@ -1285,10 +1285,10 @@ function Wt(e, t, n) {
|
|
|
1285
1285
|
return r;
|
|
1286
1286
|
}
|
|
1287
1287
|
function Gt(e, t, n) {
|
|
1288
|
-
let r = It(), i =
|
|
1288
|
+
let r = It(), i = b(() => {
|
|
1289
1289
|
if (r?.defaults.value?.[e]) return r.defaults.value[e];
|
|
1290
1290
|
});
|
|
1291
|
-
return
|
|
1291
|
+
return b(() => {
|
|
1292
1292
|
if (i.value === void 0) return n;
|
|
1293
1293
|
let e = i.value, r = t, a = n;
|
|
1294
1294
|
return Object.keys(r).reduce((t, n) => {
|
|
@@ -1298,8 +1298,8 @@ function Gt(e, t, n) {
|
|
|
1298
1298
|
});
|
|
1299
1299
|
}
|
|
1300
1300
|
function Kt(e, t, n = 0, { getter: r = (e) => e, setter: i = (e) => e } = {}) {
|
|
1301
|
-
let a, o, s =
|
|
1302
|
-
let e =
|
|
1301
|
+
let a, o, s = b(() => {
|
|
1302
|
+
let e = T(n) ?? 0, t = typeof e == "string" ? Number.parseInt(e) : e;
|
|
1303
1303
|
return Number.isNaN(t) ? 0 : t;
|
|
1304
1304
|
});
|
|
1305
1305
|
function c() {
|
|
@@ -1311,7 +1311,7 @@ function Kt(e, t, n = 0, { getter: r = (e) => e, setter: i = (e) => e } = {}) {
|
|
|
1311
1311
|
return c(), t("update:modelValue", e), e;
|
|
1312
1312
|
}
|
|
1313
1313
|
return le(c), {
|
|
1314
|
-
model:
|
|
1314
|
+
model: b({
|
|
1315
1315
|
get: () => r(e?.value),
|
|
1316
1316
|
set: (e) => {
|
|
1317
1317
|
s.value <= 0 ? (c(), t("update:modelValue", i(e))) : (o = { value: e }, a && clearTimeout(a), a = setTimeout(l, s.value));
|
|
@@ -1322,34 +1322,34 @@ function Kt(e, t, n = 0, { getter: r = (e) => e, setter: i = (e) => e } = {}) {
|
|
|
1322
1322
|
};
|
|
1323
1323
|
}
|
|
1324
1324
|
function qt(e, t) {
|
|
1325
|
-
let { focused: n } =
|
|
1325
|
+
let { focused: n } = Te(e);
|
|
1326
1326
|
return h(n, (n) => {
|
|
1327
1327
|
t(n ? "focus" : "blur", r(e));
|
|
1328
1328
|
}), { focused: n };
|
|
1329
1329
|
}
|
|
1330
1330
|
function Jt(e, t) {
|
|
1331
|
-
let n =
|
|
1331
|
+
let n = b(() => (r(e) ?? "").length), i = b(() => t?.lowerLimit !== void 0 && n.value < t?.lowerLimit ? n.value - t.lowerLimit : t?.upperLimit === void 0 ? 0 : t.upperLimit - n.value);
|
|
1332
1332
|
return {
|
|
1333
1333
|
length: n,
|
|
1334
1334
|
gap: i,
|
|
1335
|
-
formatted:
|
|
1335
|
+
formatted: b(() => t?.mode === !1 ? "" : t?.mode === "limit" && t?.upperLimit ? `${n.value} / ${t.lowerLimit ? `${t.lowerLimit}-` : ""}${t.upperLimit}` : t?.mode === "countdown" ? i.value === 0 ? void 0 : i.value : n.value)
|
|
1336
1336
|
};
|
|
1337
1337
|
}
|
|
1338
|
-
function Yt(e, t =
|
|
1339
|
-
let i =
|
|
1338
|
+
function Yt(e, t = H.local, n) {
|
|
1339
|
+
let i = x();
|
|
1340
1340
|
n && (i.value = n);
|
|
1341
1341
|
let a;
|
|
1342
1342
|
return l(() => {
|
|
1343
1343
|
e && h(e, (e, n) => {
|
|
1344
|
-
let o = r(t) ===
|
|
1345
|
-
n && n !== e && o.removeItem(n), e ? (a =
|
|
1346
|
-
}, { immediate: !0 }),
|
|
1344
|
+
let o = r(t) === H.session ? sessionStorage : localStorage;
|
|
1345
|
+
n && n !== e && o.removeItem(n), e ? (a = j(e, a?.value ?? i.value, o), a.value && (i.value = a.value)) : a = void 0;
|
|
1346
|
+
}, { immediate: !0 }), fe(t) && h(t, (t, n) => {
|
|
1347
1347
|
if (e?.value) {
|
|
1348
1348
|
if (t) {
|
|
1349
|
-
let n = t ===
|
|
1350
|
-
a =
|
|
1349
|
+
let n = t === H.session ? sessionStorage : localStorage;
|
|
1350
|
+
a = j(e.value, a?.value ?? i.value, n);
|
|
1351
1351
|
}
|
|
1352
|
-
n && n !== t && (n ===
|
|
1352
|
+
n && n !== t && (n === H.session ? sessionStorage : localStorage).removeItem(e.value);
|
|
1353
1353
|
}
|
|
1354
1354
|
});
|
|
1355
1355
|
}), h(i, (e) => {
|
|
@@ -1371,16 +1371,16 @@ var Xt = ["for"], Zt = {
|
|
|
1371
1371
|
}, tn = {
|
|
1372
1372
|
key: 6,
|
|
1373
1373
|
class: "vv-input-text__limit"
|
|
1374
|
-
}, nn = { class: "flex-1" }, rn = ["title", "onClick"], an = /* @__PURE__ */
|
|
1374
|
+
}, nn = { class: "flex-1" }, rn = ["title", "onClick"], an = /* @__PURE__ */ w({
|
|
1375
1375
|
name: "VvInputText",
|
|
1376
1376
|
props: Rt,
|
|
1377
1377
|
emits: Lt,
|
|
1378
1378
|
setup(e, { expose: t, emit: i }) {
|
|
1379
|
-
let a = e, c = i, d = u(), te = It(), ie = Gt("VvInputText", Rt, a), { count: ae, debounce: le, icon:
|
|
1380
|
-
let e = Number(
|
|
1379
|
+
let a = e, c = i, d = u(), te = It(), ie = Gt("VvInputText", Rt, a), { count: ae, debounce: le, icon: ue, iconPosition: S, iconRemoveSuggestion: de, id: fe, invalid: pe, label: me, labelRemoveSuggestion: he, loading: w, maxlength: ge, minlength: T, modelValue: D, step: O, storageType: ve, type: k, unit: ye, valid: be } = se(a), Se = Ct(fe), Ce = b(() => `${Se.value}-hint`), we = b(() => a.floating && B(a.placeholder) ? " " : a.placeholder), { model: A, flush: Te } = Kt(D, c, le), j = b(() => {
|
|
1380
|
+
let e = Number(O.value);
|
|
1381
1381
|
return !Number.isNaN(e) && e % 60 != 0;
|
|
1382
|
-
}),
|
|
1383
|
-
if (!a.iMask) return { mask:
|
|
1382
|
+
}), Ee = /^-0?[.,]?[0*]?$/, De = /./, Oe = /^-$|^$/, ke = x(!1), M = x(), N = x(), { el: Ae, mask: je, typed: P, masked: F, unmasked: I } = Me(b(() => {
|
|
1383
|
+
if (!a.iMask) return { mask: De };
|
|
1384
1384
|
if (a.iMask.mask === Number) {
|
|
1385
1385
|
let e = { ...a.iMask };
|
|
1386
1386
|
return a.min && (e.min = Number(a.min)), a.max && (e.max = Number(a.max)), e;
|
|
@@ -1389,202 +1389,202 @@ var Xt = ["for"], Zt = {
|
|
|
1389
1389
|
}), {
|
|
1390
1390
|
emit: c,
|
|
1391
1391
|
onAccept: () => {
|
|
1392
|
-
if (
|
|
1393
|
-
if (c("update:masked",
|
|
1394
|
-
|
|
1392
|
+
if (ke.value) {
|
|
1393
|
+
if (c("update:masked", F.value), k.value === $.NUMBER) {
|
|
1394
|
+
Fe();
|
|
1395
1395
|
return;
|
|
1396
1396
|
}
|
|
1397
|
-
if (
|
|
1398
|
-
|
|
1397
|
+
if (k.value === $.DATETIME_LOCAL || k.value === $.DATE || k.value === $.TIME || k.value === $.MONTH) {
|
|
1398
|
+
L();
|
|
1399
1399
|
return;
|
|
1400
1400
|
}
|
|
1401
|
-
!
|
|
1401
|
+
!A.value && !I.value || (A.value = I.value);
|
|
1402
1402
|
}
|
|
1403
1403
|
}
|
|
1404
1404
|
});
|
|
1405
|
-
function
|
|
1406
|
-
if (
|
|
1407
|
-
if (
|
|
1408
|
-
|
|
1409
|
-
} else
|
|
1405
|
+
function Fe() {
|
|
1406
|
+
if (Oe.test(I.value)) {
|
|
1407
|
+
if (A.value === null || A.value === void 0) return;
|
|
1408
|
+
A.value = void 0;
|
|
1409
|
+
} else Ee.test(I.value) ? A.value = 0 : typeof P.value == "number" ? A.value = P.value : A.value = Number(P.value);
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1412
|
-
let t = new Date(
|
|
1413
|
-
if ((
|
|
1414
|
-
if (
|
|
1415
|
-
|
|
1416
|
-
} else
|
|
1411
|
+
function Ie(e) {
|
|
1412
|
+
let t = new Date(M.value || N.value);
|
|
1413
|
+
if ((k.value === $.DATETIME_LOCAL || k.value === $.DATE || k.value === $.MONTH) && (t.setFullYear(e.getFullYear()), t.setMonth(e.getMonth())), (k.value === $.DATETIME_LOCAL || k.value === $.DATE) && t.setDate(e.getDate()), (k.value === $.DATETIME_LOCAL || k.value === $.TIME) && (t.setHours(e.getHours()), t.setMinutes(e.getMinutes()), t.setSeconds(e.getSeconds())), M.value instanceof Date) {
|
|
1414
|
+
if (A.value?.getTime() === t.getTime()) return;
|
|
1415
|
+
A.value = t;
|
|
1416
|
+
} else A.value = t.toISOString();
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1419
|
-
let e =
|
|
1420
|
-
if (!
|
|
1421
|
-
if (!
|
|
1422
|
-
if (
|
|
1423
|
-
|
|
1418
|
+
function L() {
|
|
1419
|
+
let e = k.value;
|
|
1420
|
+
if (!P.value) {
|
|
1421
|
+
if (!A.value) return;
|
|
1422
|
+
if (M.value) {
|
|
1423
|
+
A.value = void 0;
|
|
1424
1424
|
return;
|
|
1425
1425
|
}
|
|
1426
|
-
|
|
1426
|
+
A.value = "";
|
|
1427
1427
|
return;
|
|
1428
1428
|
}
|
|
1429
|
-
if (!(
|
|
1430
|
-
|
|
1429
|
+
if (!(P.value instanceof Date) && !M.value && !N.value) {
|
|
1430
|
+
A.value = P.value;
|
|
1431
1431
|
return;
|
|
1432
1432
|
}
|
|
1433
|
-
let t =
|
|
1434
|
-
t instanceof Date || (t =
|
|
1433
|
+
let t = P.value;
|
|
1434
|
+
t instanceof Date || (t = z(P.value, e)), M.value || N.value ? Ie(t) : A.value = Pe(t, e, j.value);
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1437
|
-
if (e == null)
|
|
1438
|
-
else if (a.iMask?.mask === Date)
|
|
1439
|
-
else if (!(
|
|
1436
|
+
function R(e) {
|
|
1437
|
+
if (e == null) P.value = "", I.value = "";
|
|
1438
|
+
else if (a.iMask?.mask === Date) P.value = e instanceof Date ? e : new Date(e);
|
|
1439
|
+
else if (!(k.value === $.NUMBER && Ee.test(I.value) && e === 0)) {
|
|
1440
1440
|
if (dt.value) {
|
|
1441
|
-
if (e instanceof Date ||
|
|
1442
|
-
if (e instanceof Date ? (
|
|
1441
|
+
if (e instanceof Date || Ne(e)) {
|
|
1442
|
+
if (e instanceof Date ? (M.value = e, N.value = void 0) : (N.value = e, M.value = void 0), ft.value) {
|
|
1443
1443
|
let t = new Date(e);
|
|
1444
|
-
|
|
1444
|
+
P.value = Pe(t, ft.value, j.value), I.value = P.value;
|
|
1445
1445
|
}
|
|
1446
1446
|
return;
|
|
1447
1447
|
}
|
|
1448
|
-
|
|
1448
|
+
M.value = void 0, N.value = void 0;
|
|
1449
1449
|
}
|
|
1450
|
-
|
|
1450
|
+
P.value = e, I.value = `${P.value}`;
|
|
1451
1451
|
}
|
|
1452
1452
|
}
|
|
1453
1453
|
l(() => {
|
|
1454
|
-
|
|
1454
|
+
je.value && (ke.value = !0, R(a.modelValue));
|
|
1455
1455
|
}), h(() => a.modelValue, (e) => {
|
|
1456
|
-
|
|
1456
|
+
je.value && R(e);
|
|
1457
1457
|
}), h(() => a.masked, (e) => {
|
|
1458
|
-
|
|
1458
|
+
F.value = e ?? "";
|
|
1459
1459
|
});
|
|
1460
|
-
let
|
|
1460
|
+
let V = Ae, Le = x(), H = x(), ze = x();
|
|
1461
1461
|
t({
|
|
1462
|
-
$input:
|
|
1463
|
-
$inner:
|
|
1464
|
-
$wrapper:
|
|
1465
|
-
flush:
|
|
1462
|
+
$input: V,
|
|
1463
|
+
$inner: Le,
|
|
1464
|
+
$wrapper: H,
|
|
1465
|
+
flush: Te
|
|
1466
1466
|
});
|
|
1467
|
-
let { focused:
|
|
1468
|
-
function
|
|
1469
|
-
e ?
|
|
1467
|
+
let { focused: U } = qt(V, c), Be = b(() => U.value && !a.disabled && !a.readonly);
|
|
1468
|
+
function W(e) {
|
|
1469
|
+
e ? Ve() : He();
|
|
1470
1470
|
}
|
|
1471
|
-
function
|
|
1472
|
-
ie.value.selectOnFocus &&
|
|
1471
|
+
function Ve() {
|
|
1472
|
+
ie.value.selectOnFocus && V.value && V.value.select(), Z.value.size && ze.value?.show();
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1475
|
-
let e =
|
|
1476
|
-
if (!X.value ||
|
|
1474
|
+
function He() {
|
|
1475
|
+
let e = Te() ?? A.value;
|
|
1476
|
+
if (!X.value || B(e)) return;
|
|
1477
1477
|
let t = a.maxSuggestions;
|
|
1478
1478
|
X.value.size >= t && !X.value.has(e) && (X.value = new Set([...X.value].slice(X.value.size - t + 1))), X.value.add(e);
|
|
1479
1479
|
}
|
|
1480
|
-
h(
|
|
1481
|
-
let
|
|
1482
|
-
h(
|
|
1483
|
-
e && a.autofocus && !a.disabled && !a.readonly && (
|
|
1480
|
+
h(Be, W);
|
|
1481
|
+
let G = xe(V);
|
|
1482
|
+
h(G, (e) => {
|
|
1483
|
+
e && a.autofocus && !a.disabled && !a.readonly && (U.value = !0);
|
|
1484
1484
|
});
|
|
1485
|
-
let
|
|
1486
|
-
function
|
|
1487
|
-
|
|
1485
|
+
let K = x(!1), Ue = b(() => a.type === $.PASSWORD);
|
|
1486
|
+
function We() {
|
|
1487
|
+
K.value = !K.value;
|
|
1488
1488
|
}
|
|
1489
|
-
let
|
|
1490
|
-
function
|
|
1491
|
-
if (!
|
|
1489
|
+
let Ge = b(() => dt.value), Ke = b(() => a.type === $.NUMBER);
|
|
1490
|
+
function qe() {
|
|
1491
|
+
if (!Y.value) {
|
|
1492
1492
|
if (a.iMask) {
|
|
1493
|
-
|
|
1493
|
+
P.value = Number(P.value) + Number(O?.value ?? 1);
|
|
1494
1494
|
return;
|
|
1495
1495
|
}
|
|
1496
|
-
|
|
1496
|
+
V.value.stepUp(), A.value = Number(V.value.value);
|
|
1497
1497
|
}
|
|
1498
1498
|
}
|
|
1499
|
-
function
|
|
1500
|
-
if (!
|
|
1499
|
+
function Je() {
|
|
1500
|
+
if (!Y.value) {
|
|
1501
1501
|
if (a.iMask) {
|
|
1502
|
-
|
|
1502
|
+
P.value = Number(P.value) - Number(O?.value ?? 1);
|
|
1503
1503
|
return;
|
|
1504
1504
|
}
|
|
1505
|
-
|
|
1505
|
+
V.value.stepDown(), A.value = Number(V.value.value);
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
|
-
let
|
|
1509
|
-
function
|
|
1510
|
-
|
|
1508
|
+
let Ye = b(() => a.type === $.SEARCH);
|
|
1509
|
+
function Xe() {
|
|
1510
|
+
A.value = "", c("clear");
|
|
1511
1511
|
}
|
|
1512
|
-
let { hasIconBefore:
|
|
1513
|
-
if (
|
|
1512
|
+
let { hasIconBefore: Ze, hasIconAfter: Qe } = zt(ue, S), J = b(() => {
|
|
1513
|
+
if (Qe.value !== void 0) return Qe.value;
|
|
1514
1514
|
switch (a.type) {
|
|
1515
|
-
case $.COLOR: return { name:
|
|
1515
|
+
case $.COLOR: return { name: q.showColorPicker };
|
|
1516
1516
|
case $.DATE:
|
|
1517
1517
|
case $.DATETIME_LOCAL:
|
|
1518
1518
|
case $.WEEK:
|
|
1519
|
-
case $.MONTH: return { name:
|
|
1520
|
-
case $.TIME: return { name:
|
|
1519
|
+
case $.MONTH: return { name: q.showDatePicker };
|
|
1520
|
+
case $.TIME: return { name: q.showTimePicker };
|
|
1521
1521
|
}
|
|
1522
|
-
}), { hasIcon:
|
|
1522
|
+
}), { hasIcon: $e } = zt(de), { formatted: et } = Jt(A, {
|
|
1523
1523
|
mode: ae.value,
|
|
1524
|
-
upperLimit: Number(
|
|
1525
|
-
lowerLimit: Number(
|
|
1526
|
-
}),
|
|
1527
|
-
if (
|
|
1528
|
-
if (
|
|
1529
|
-
}), X = Yt(
|
|
1524
|
+
upperLimit: Number(ge?.value),
|
|
1525
|
+
lowerLimit: Number(T?.value)
|
|
1526
|
+
}), Y = b(() => a.disabled || a.readonly), tt = b(() => Y.value ? -1 : a.tabindex), nt = b(() => !B(D?.value)), rt = b(() => {
|
|
1527
|
+
if (pe.value === !0) return !0;
|
|
1528
|
+
if (be.value === !0) return !1;
|
|
1529
|
+
}), X = Yt(b(() => a.storageKey ?? (te?.experimentalFeatures.forceInputSuggestions ? a.name : void 0)), ve, /* @__PURE__ */ new Set()), Z = b(() => {
|
|
1530
1530
|
let e = /* @__PURE__ */ new Map();
|
|
1531
1531
|
if (X.value) for (let t of X.value) e.set(t, { isFromStorage: !0 });
|
|
1532
1532
|
if (a.suggestions) for (let t of a.suggestions) e.set(t, { isFromStorage: !1 });
|
|
1533
1533
|
return e;
|
|
1534
|
-
}), it =
|
|
1534
|
+
}), it = b(() => Z.value.size === 0 ? [] : [...Z.value.entries()].filter(([e]) => B(A.value) || `${e}`.toLowerCase().includes(`${A.value}`.toLowerCase()) && e !== A.value).reverse().map(([e]) => e)), at = b(() => Z.value.size > 0);
|
|
1535
1535
|
function ot(e) {
|
|
1536
|
-
|
|
1536
|
+
A.value = e, ze.value?.hide(), c("suggestion:selected", e);
|
|
1537
1537
|
}
|
|
1538
1538
|
function st(e) {
|
|
1539
1539
|
Z.value.get(e)?.isFromStorage && (X.value?.delete(e), c("suggestion:removed", e));
|
|
1540
1540
|
}
|
|
1541
|
-
let { modifiers: ct } = se(a), lt = Ot("vv-input-text", ct,
|
|
1542
|
-
valid:
|
|
1543
|
-
invalid:
|
|
1544
|
-
loading:
|
|
1541
|
+
let { modifiers: ct } = se(a), lt = Ot("vv-input-text", ct, b(() => ({
|
|
1542
|
+
valid: be.value,
|
|
1543
|
+
invalid: pe.value,
|
|
1544
|
+
loading: w.value,
|
|
1545
1545
|
disabled: a.disabled,
|
|
1546
1546
|
required: a.required,
|
|
1547
1547
|
readonly: a.readonly,
|
|
1548
|
-
"icon-before": !!
|
|
1549
|
-
"icon-after": !!
|
|
1550
|
-
floating: a.floating && !
|
|
1551
|
-
dirty:
|
|
1552
|
-
focus:
|
|
1548
|
+
"icon-before": !!Ze.value,
|
|
1549
|
+
"icon-after": !!J.value,
|
|
1550
|
+
floating: a.floating && !B(a.label),
|
|
1551
|
+
dirty: nt.value,
|
|
1552
|
+
focus: Be.value && !Y.value,
|
|
1553
1553
|
"auto-width": a.autoWidth
|
|
1554
|
-
}))), ut =
|
|
1554
|
+
}))), ut = b(() => [
|
|
1555
1555
|
$.TEXT,
|
|
1556
1556
|
$.SEARCH,
|
|
1557
1557
|
$.URL,
|
|
1558
1558
|
$.TEL,
|
|
1559
1559
|
$.EMAIL,
|
|
1560
1560
|
$.PASSWORD
|
|
1561
|
-
].includes(
|
|
1561
|
+
].includes(k.value)), dt = b(() => [
|
|
1562
1562
|
$.DATE,
|
|
1563
1563
|
$.MONTH,
|
|
1564
1564
|
$.WEEK,
|
|
1565
1565
|
$.TIME,
|
|
1566
1566
|
$.DATETIME_LOCAL
|
|
1567
|
-
].includes(
|
|
1567
|
+
].includes(k.value)), ft = b(() => dt.value && k.value !== $.WEEK ? k.value : void 0), pt = b(() => [
|
|
1568
1568
|
$.TEXT,
|
|
1569
1569
|
$.SEARCH,
|
|
1570
1570
|
$.URL,
|
|
1571
1571
|
$.TEL,
|
|
1572
1572
|
$.EMAIL,
|
|
1573
1573
|
$.PASSWORD
|
|
1574
|
-
].includes(
|
|
1574
|
+
].includes(k.value)), mt = {
|
|
1575
1575
|
[$.DATE]: "9999-12-31",
|
|
1576
1576
|
[$.DATETIME_LOCAL]: "9999-12-31T23:59:59.999",
|
|
1577
1577
|
[$.MONTH]: "9999-12",
|
|
1578
1578
|
[$.WEEK]: "9999-W52"
|
|
1579
1579
|
};
|
|
1580
1580
|
function ht(e) {
|
|
1581
|
-
if (!
|
|
1581
|
+
if (!B(e)) return (e instanceof Date || typeof e == "string" && Ne(e)) && ft.value ? Pe(e, ft.value, j.value) || void 0 : String(e);
|
|
1582
1582
|
}
|
|
1583
|
-
let gt =
|
|
1584
|
-
let e =
|
|
1583
|
+
let gt = b(() => {
|
|
1584
|
+
let e = Ue.value && K.value || Ge.value && !nt.value && !U.value || a.iMask ? $.TEXT : a.type, t = {
|
|
1585
1585
|
type: e,
|
|
1586
1586
|
name: a.name,
|
|
1587
|
-
tabindex:
|
|
1587
|
+
tabindex: tt.value,
|
|
1588
1588
|
disabled: a.disabled,
|
|
1589
1589
|
readonly: a.readonly,
|
|
1590
1590
|
required: a.required,
|
|
@@ -1592,86 +1592,86 @@ var Xt = ["for"], Zt = {
|
|
|
1592
1592
|
"aria-label": a.ariaLabel || void 0,
|
|
1593
1593
|
"aria-labelledby": a.ariaLabelledby || void 0,
|
|
1594
1594
|
"aria-invalid": rt.value,
|
|
1595
|
-
"aria-describedby": [a.ariaDescribedby, yt.value ?
|
|
1596
|
-
"aria-errormessage": bt.value ?
|
|
1595
|
+
"aria-describedby": [a.ariaDescribedby, yt.value ? Ce.value : void 0].filter(Boolean).join(" ") || void 0,
|
|
1596
|
+
"aria-errormessage": bt.value ? Ce.value : void 0,
|
|
1597
1597
|
inputMode: a.inputMode
|
|
1598
1598
|
};
|
|
1599
|
-
return (dt.value || e === $.NUMBER) && (t.step = a.step, t.max = ht(a.max) ?? mt[e], t.min = ht(a.min)), (ut.value || e === $.TEXT || e === $.NUMBER) && (t.placeholder =
|
|
1600
|
-
}), _t =
|
|
1599
|
+
return (dt.value || e === $.NUMBER) && (t.step = a.step, t.max = ht(a.max) ?? mt[e], t.min = ht(a.min)), (ut.value || e === $.TEXT || e === $.NUMBER) && (t.placeholder = we.value), pt.value && (t.minlength = a.minlength, t.maxlength = a.maxlength, t.pattern = a.pattern), e === $.EMAIL && (t.multiple = a.multiple), t;
|
|
1600
|
+
}), _t = b(() => ({
|
|
1601
1601
|
valid: a.valid,
|
|
1602
1602
|
invalid: a.invalid,
|
|
1603
1603
|
modelValue: a.modelValue,
|
|
1604
|
-
togglePassword:
|
|
1605
|
-
stepUp:
|
|
1606
|
-
stepDown:
|
|
1607
|
-
clear:
|
|
1608
|
-
})), { HintSlot: vt, hasHintLabelOrSlot: yt, hasInvalidLabelOrSlot: bt, hintSlotScope: xt } =
|
|
1604
|
+
togglePassword: We,
|
|
1605
|
+
stepUp: qe,
|
|
1606
|
+
stepDown: Je,
|
|
1607
|
+
clear: Xe
|
|
1608
|
+
})), { HintSlot: vt, hasHintLabelOrSlot: yt, hasInvalidLabelOrSlot: bt, hintSlotScope: xt } = Re(ie, d), St = Ut($.PASSWORD, a, nt), wt = Ut($.NUMBER, a, nt), Tt = Ut($.SEARCH, a, nt);
|
|
1609
1609
|
function Et() {
|
|
1610
|
-
|
|
1610
|
+
Y.value || (U.value = !0);
|
|
1611
1611
|
}
|
|
1612
|
-
let Dt =
|
|
1613
|
-
if (a.autoWidth) return { width:
|
|
1612
|
+
let Dt = b(() => {
|
|
1613
|
+
if (a.autoWidth) return { width: A.value === void 0 ? void 0 : `${String(A.value).length + 1}ch` };
|
|
1614
1614
|
});
|
|
1615
1615
|
function kt(e) {
|
|
1616
1616
|
switch (e.code) {
|
|
1617
1617
|
case "ArrowUp":
|
|
1618
|
-
|
|
1618
|
+
Ke.value && (qe(), e.preventDefault());
|
|
1619
1619
|
break;
|
|
1620
1620
|
case "ArrowDown":
|
|
1621
|
-
|
|
1621
|
+
Ke.value && (Je(), e.preventDefault());
|
|
1622
1622
|
break;
|
|
1623
1623
|
case "Enter":
|
|
1624
|
-
case "NumpadEnter":
|
|
1624
|
+
case "NumpadEnter": Te();
|
|
1625
1625
|
}
|
|
1626
1626
|
c("keydown", e);
|
|
1627
1627
|
}
|
|
1628
|
-
return (e, t) => (p(),
|
|
1629
|
-
r(
|
|
1628
|
+
return (e, t) => (p(), E("div", { class: re(r(lt)) }, [
|
|
1629
|
+
r(me) ? (p(), E("label", {
|
|
1630
1630
|
key: 0,
|
|
1631
|
-
for: r(
|
|
1631
|
+
for: r(Se),
|
|
1632
1632
|
class: "vv-input-text__label"
|
|
1633
|
-
}, ee(r(
|
|
1634
|
-
|
|
1633
|
+
}, ee(r(me)), 9, Xt)) : C("v-if", !0),
|
|
1634
|
+
y("div", {
|
|
1635
1635
|
ref_key: "wrapperEl",
|
|
1636
|
-
ref:
|
|
1636
|
+
ref: H,
|
|
1637
1637
|
class: "vv-input-text__wrapper"
|
|
1638
1638
|
}, [
|
|
1639
|
-
e.$slots.before ? (p(),
|
|
1640
|
-
|
|
1639
|
+
e.$slots.before ? (p(), E("div", Zt, [m(e.$slots, "before", s(o(r(_t))))])) : C("v-if", !0),
|
|
1640
|
+
y("div", {
|
|
1641
1641
|
ref_key: "innerEl",
|
|
1642
|
-
ref:
|
|
1642
|
+
ref: Le,
|
|
1643
1643
|
class: "vv-input-text__inner",
|
|
1644
1644
|
onClick: _(Et, ["stop"])
|
|
1645
1645
|
}, [
|
|
1646
|
-
r(
|
|
1647
|
-
|
|
1648
|
-
id: r(
|
|
1646
|
+
r(Ze) ? (p(), g(Q, f({ key: 0 }, r(Ze), { class: "vv-input-text__icon" }), null, 16)) : C("v-if", !0),
|
|
1647
|
+
y("input", f({
|
|
1648
|
+
id: r(Se),
|
|
1649
1649
|
ref_key: "inputEl",
|
|
1650
|
-
ref:
|
|
1650
|
+
ref: V
|
|
1651
1651
|
}, r(gt), {
|
|
1652
1652
|
style: r(Dt),
|
|
1653
1653
|
onKeyup: t[0] ||= (e) => c("keyup", e),
|
|
1654
1654
|
onKeydown: kt,
|
|
1655
1655
|
onKeypress: t[1] ||= (e) => c("keypress", e)
|
|
1656
1656
|
}), null, 16, Qt),
|
|
1657
|
-
(r(
|
|
1657
|
+
(r(ye) || e.$slots.unit) && r(nt) ? (p(), E("div", $t, [m(e.$slots, "unit", s(o(r(_t))), () => [_e(ee(r(ye)), 1)])])) : C("v-if", !0)
|
|
1658
1658
|
], 512),
|
|
1659
|
-
r(
|
|
1659
|
+
r(J) ? (p(), g(Q, f({ key: 1 }, r(J), { class: "vv-input-text__icon vv-input-text__icon-after" }), null, 16)) : r(Ue) && !e.hideActions && !r(Y) ? (p(), g(r(St), {
|
|
1660
1660
|
key: 2,
|
|
1661
|
-
onTogglePassword:
|
|
1662
|
-
})) : r(
|
|
1661
|
+
onTogglePassword: We
|
|
1662
|
+
})) : r(Ke) && !e.hideActions && !r(Y) ? (p(), g(r(wt), {
|
|
1663
1663
|
key: 3,
|
|
1664
|
-
onStepUp:
|
|
1665
|
-
onStepDown:
|
|
1666
|
-
})) : r(
|
|
1664
|
+
onStepUp: qe,
|
|
1665
|
+
onStepDown: Je
|
|
1666
|
+
})) : r(Ye) && !e.hideActions && !r(Y) ? (p(), g(r(Tt), {
|
|
1667
1667
|
key: 4,
|
|
1668
|
-
onClear:
|
|
1669
|
-
})) :
|
|
1670
|
-
e.$slots.after ? (p(),
|
|
1671
|
-
r(ae) ? (p(),
|
|
1668
|
+
onClear: Xe
|
|
1669
|
+
})) : C("v-if", !0),
|
|
1670
|
+
e.$slots.after ? (p(), E("div", en, [m(e.$slots, "after", s(o(r(_t))))])) : C("v-if", !0),
|
|
1671
|
+
r(ae) ? (p(), E("span", tn, [m(e.$slots, "count", s(o(r(_t))), () => [_e(ee(r(et)), 1)])])) : C("v-if", !0)
|
|
1672
1672
|
], 512),
|
|
1673
1673
|
ne(r(vt), {
|
|
1674
|
-
id: r(
|
|
1674
|
+
id: r(Ce),
|
|
1675
1675
|
class: "vv-input-text__hint"
|
|
1676
1676
|
}, oe({ _: 2 }, [
|
|
1677
1677
|
e.$slots.hint ? {
|
|
@@ -1698,32 +1698,32 @@ var Xt = ["for"], Zt = {
|
|
|
1698
1698
|
r(at) ? (p(), g(jt, {
|
|
1699
1699
|
key: 1,
|
|
1700
1700
|
ref_key: "suggestionsDropdownEl",
|
|
1701
|
-
ref:
|
|
1702
|
-
reference: r(
|
|
1701
|
+
ref: ze,
|
|
1702
|
+
reference: r(H),
|
|
1703
1703
|
"autofocus-first": !1,
|
|
1704
1704
|
"trigger-width": !0,
|
|
1705
1705
|
"top-layer": r(ie).topLayer
|
|
1706
1706
|
}, {
|
|
1707
|
-
items: v(() => [(p(!0),
|
|
1707
|
+
items: v(() => [(p(!0), E(ce, null, n(r(it), (t) => (p(), g(Ft, {
|
|
1708
1708
|
key: String(t),
|
|
1709
1709
|
onClick: _((e) => ot(t), ["stop"])
|
|
1710
1710
|
}, {
|
|
1711
|
-
default: v(() => [
|
|
1711
|
+
default: v(() => [y("div", nn, [m(e.$slots, "suggestion", f({ ref_for: !0 }, { value: t }), () => [_e(ee(t), 1)])]), r(Z).get(t)?.isFromStorage && r($e) ? (p(), E("button", {
|
|
1712
1712
|
key: 0,
|
|
1713
1713
|
type: "button",
|
|
1714
1714
|
tabindex: "-1",
|
|
1715
1715
|
class: "cursor-pointer",
|
|
1716
|
-
title: r(
|
|
1716
|
+
title: r(he),
|
|
1717
1717
|
onClick: _((e) => st(t), ["stop"])
|
|
1718
|
-
}, [ne(Q, f({ ref_for: !0 }, r(
|
|
1718
|
+
}, [ne(Q, f({ ref_for: !0 }, r($e)), null, 16)], 8, rn)) : C("v-if", !0)]),
|
|
1719
1719
|
_: 2
|
|
1720
1720
|
}, 1032, ["onClick"]))), 128))]),
|
|
1721
1721
|
_: 3
|
|
1722
|
-
}, 8, ["reference", "top-layer"])) :
|
|
1722
|
+
}, 8, ["reference", "top-layer"])) : C("v-if", !0)
|
|
1723
1723
|
], 2));
|
|
1724
1724
|
}
|
|
1725
1725
|
});
|
|
1726
1726
|
//#endregion
|
|
1727
1727
|
export { an as default };
|
|
1728
1728
|
|
|
1729
|
-
//# sourceMappingURL=VvInputText.es-
|
|
1729
|
+
//# sourceMappingURL=VvInputText.es-DllQ2Tue.js.map
|