@8wave/ai-elements 0.99.0-beta.1 → 0.99.0-beta.2
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-vue/_chunks/PkStreamingMarkdown-DEhbK-3c.js → dist/_chunks/PkStreamingMarkdown-6Xx9n1ue.js} +379 -362
- package/dist/_chunks/PkStreamingMarkdown-6Xx9n1ue.js.map +1 -0
- package/dist/_chunks/{PkToolRequestGeolocation-BJ9NJZIg.js → PkToolRequestGeolocation-B73evGBg.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-BJ9NJZIg.js.map → PkToolRequestGeolocation-B73evGBg.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-DdvJ6n1K.js → PkToolRequestOAuthConnection-BWP5dsK_.js} +3 -3
- package/dist/_chunks/{PkToolRequestOAuthConnection-DdvJ6n1K.js.map → PkToolRequestOAuthConnection-BWP5dsK_.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-BaGEr7O9.js → PkToolShowArtifact-bYYaMGxq.js} +7 -7
- package/dist/_chunks/{PkToolShowArtifact-BaGEr7O9.js.map → PkToolShowArtifact-bYYaMGxq.js.map} +1 -1
- package/dist/_chunks/{PkToolShowCalendarEvent-BYnhl2er.js → PkToolShowCalendarEvent-DdEWaTj-.js} +4 -4
- package/dist/_chunks/{PkToolShowCalendarEvent-BYnhl2er.js.map → PkToolShowCalendarEvent-DdEWaTj-.js.map} +1 -1
- package/dist/_chunks/{PkToolShowComparison-DahL5vHr.js → PkToolShowComparison-Dcar7HPW.js} +4 -4
- package/dist/_chunks/{PkToolShowComparison-DahL5vHr.js.map → PkToolShowComparison-Dcar7HPW.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-upUNZtId.js → PkToolShowContactForm-DtjVW-n6.js} +13 -13
- package/dist/_chunks/{PkToolShowContactForm-upUNZtId.js.map → PkToolShowContactForm-DtjVW-n6.js.map} +1 -1
- package/dist/_chunks/{PkToolShowDiagram-Jq_4KWiK.js → PkToolShowDiagram-X35nsoIY.js} +8 -8
- package/dist/_chunks/{PkToolShowDiagram-Jq_4KWiK.js.map → PkToolShowDiagram-X35nsoIY.js.map} +1 -1
- package/dist/_chunks/{PkToolShowEmail-CtmpDS1B.js → PkToolShowEmail-jVoK8qEh.js} +4 -4
- package/dist/_chunks/{PkToolShowEmail-CtmpDS1B.js.map → PkToolShowEmail-jVoK8qEh.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-dFuoqTPs.js → PkToolShowForm-BP8asXtz.js} +101 -79
- package/dist/_chunks/PkToolShowForm-BP8asXtz.js.map +1 -0
- package/dist/_chunks/{PkToolShowImageGallery-mLq2p3aH.js → PkToolShowImageGallery-WQL3T4Hr.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-mLq2p3aH.js.map → PkToolShowImageGallery-WQL3T4Hr.js.map} +1 -1
- package/dist/_chunks/{PkToolShowLocation-SbgTbuGu.js → PkToolShowLocation-w2t7lKpb.js} +4 -4
- package/dist/_chunks/{PkToolShowLocation-SbgTbuGu.js.map → PkToolShowLocation-w2t7lKpb.js.map} +1 -1
- package/dist/_chunks/{PkToolShowMessage-CAVpDTzd.js → PkToolShowMessage-BPo7WPim.js} +4 -4
- package/dist/_chunks/{PkToolShowMessage-CAVpDTzd.js.map → PkToolShowMessage-BPo7WPim.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-puiPFItN.js → PkToolShowProductList-BbY4ni7Y.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-puiPFItN.js.map → PkToolShowProductList-BbY4ni7Y.js.map} +1 -1
- package/dist/_chunks/{PkToolShowQrCode-CctXvRyG.js → PkToolShowQrCode-CN0ms27N.js} +4 -4
- package/dist/_chunks/{PkToolShowQrCode-CctXvRyG.js.map → PkToolShowQrCode-CN0ms27N.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-DwB6VXrK.js → PkToolShowSources-D2tBcx7n.js} +18 -18
- package/dist/_chunks/{PkToolShowSources-DwB6VXrK.js.map → PkToolShowSources-D2tBcx7n.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-QEcIhSxa.js → PkToolShowSuggestedReply-Cdh_elSh.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-QEcIhSxa.js.map → PkToolShowSuggestedReply-Cdh_elSh.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-DoLoI8_N.js → PkToolShowVideo-D3aU5FMO.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-DoLoI8_N.js.map → PkToolShowVideo-D3aU5FMO.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWeather-C2rPCQ_K.js → PkToolShowWeather-CzanXIJp.js} +3 -3
- package/dist/_chunks/{PkToolShowWeather-C2rPCQ_K.js.map → PkToolShowWeather-CzanXIJp.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-BBJYzF8V.js → PkToolShowWebPages-DkMJrWmT.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-BBJYzF8V.js.map → PkToolShowWebPages-DkMJrWmT.js.map} +1 -1
- package/dist/_chunks/{VvCheckbox.es-D5d8k9yP.js → VvCheckbox.es-CRhIKQNR.js} +2 -2
- package/dist/_chunks/{VvCheckbox.es-D5d8k9yP.js.map → VvCheckbox.es-CRhIKQNR.js.map} +1 -1
- package/dist/_chunks/{VvCheckboxGroup.es-DVnsOjX0.js → VvCheckboxGroup.es-gOy2kM1Y.js} +5 -5
- package/dist/_chunks/{VvCheckboxGroup.es-DVnsOjX0.js.map → VvCheckboxGroup.es-gOy2kM1Y.js.map} +1 -1
- package/dist/_chunks/{VvCombobox.es-CFA-K-cQ.js → VvCombobox.es-BOwH3LmO.js} +9 -9
- package/dist/_chunks/VvCombobox.es-BOwH3LmO.js.map +1 -0
- package/dist/_chunks/{VvInputText.es-csEQ-bSG.js → VvInputText.es-D8nXroKO.js} +536 -513
- package/dist/_chunks/VvInputText.es-D8nXroKO.js.map +1 -0
- package/dist/_chunks/{VvRadio.es-BpymhC73.js → VvRadio.es-Djy5J33A.js} +2 -2
- package/dist/_chunks/{VvRadio.es-BpymhC73.js.map → VvRadio.es-Djy5J33A.js.map} +1 -1
- package/dist/_chunks/{VvRadioGroup.es-CSNzOJKx.js → VvRadioGroup.es-DQq3JYCR.js} +5 -5
- package/dist/_chunks/VvRadioGroup.es-DQq3JYCR.js.map +1 -0
- package/dist/_chunks/{VvSelect.es-CjKMd0nH.js → VvSelect.es-CE4x1ww0.js} +4 -4
- package/dist/_chunks/{VvSelect.es-CjKMd0nH.js.map → VvSelect.es-CE4x1ww0.js.map} +1 -1
- package/dist/_chunks/VvTextarea.es-BU2vqdEQ.js +1129 -0
- package/dist/_chunks/VvTextarea.es-BU2vqdEQ.js.map +1 -0
- package/dist/_chunks/{dist-BNET2z7b.js → dist-CvMCBce7.js} +39 -21
- package/dist/_chunks/dist-CvMCBce7.js.map +1 -0
- package/dist/_chunks/dot-prop-CObyt75F.js +141 -0
- package/dist/_chunks/dot-prop-CObyt75F.js.map +1 -0
- package/dist/_chunks/{floating-ui.vue-CIKvCpTA.js → floating-ui.vue-BacoFpVq.js} +278 -305
- package/dist/_chunks/floating-ui.vue-BacoFpVq.js.map +1 -0
- package/dist/_chunks/{index.es-u1dF1xg2.js → index.es-DpqfagWZ.js} +12 -12
- package/dist/_chunks/{index.es-u1dF1xg2.js.map → index.es-DpqfagWZ.js.map} +1 -1
- package/dist/_chunks/{index.es-BYny0uhz.js → index.es-_oXVRjHy.js} +2352 -2329
- package/dist/_chunks/index.es-_oXVRjHy.js.map +1 -0
- package/dist/ai-elements.es.js +4087 -5205
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotAuth.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotFeedbackForm.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- 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-Bf5uY3cO.js +236 -0
- package/dist-vue/_chunks/{PkChatbot-BlG1WlAO.js.map → PkChatbot-Bf5uY3cO.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotAuth-C_L2xWuD.js → PkChatbotAuth-BGn2MDYD.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotAuth-C_L2xWuD.js.map → PkChatbotAuth-BGn2MDYD.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-BGOC6vxr.js → PkChatbotEmptyState-CPqLqXek.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-BGOC6vxr.js.map → PkChatbotEmptyState-CPqLqXek.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BSe40qlc.js → PkChatbotFeedbackForm-C_y__RH8.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BSe40qlc.js.map → PkChatbotFeedbackForm-C_y__RH8.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-DTazYlPd.js → PkChatbotInput-jvb0vuak.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-DTazYlPd.js.map → PkChatbotInput-jvb0vuak.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-BrufA7o1.js → PkChatbotMessages-B3G12zah.js} +246 -246
- package/dist-vue/_chunks/{PkChatbotMessages-BrufA7o1.js.map → PkChatbotMessages-B3G12zah.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotSteps-BdU6YC_N.js +172 -0
- package/dist-vue/_chunks/{PkChatbotSteps-Dv9NkYER.js.map → PkChatbotSteps-BdU6YC_N.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-CAqvbbfN.js → PkChatbotViewChat-c0Ecpzoc.js} +6 -6
- package/dist-vue/_chunks/{PkChatbotViewChat-CAqvbbfN.js.map → PkChatbotViewChat-c0Ecpzoc.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-Cq41H-tc.js → PkChatbotViewConversations-BfhRCA_1.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-Cq41H-tc.js.map → PkChatbotViewConversations-BfhRCA_1.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-DNuzmBJc.js → PkChatbotViewFiles-BipRoidH.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewFiles-DNuzmBJc.js.map → PkChatbotViewFiles-BipRoidH.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-C0BXIY2N.js → PkChatbotViewProfile-DuLwYpGZ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-C0BXIY2N.js.map → PkChatbotViewProfile-DuLwYpGZ.js.map} +1 -1
- package/{dist/_chunks/PkStreamingMarkdown-Djw604Ny.js → dist-vue/_chunks/PkStreamingMarkdown-CjBMQ18U.js} +344 -347
- package/dist-vue/_chunks/PkStreamingMarkdown-CjBMQ18U.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowArtifact-CTBwt4DN.js → PkToolShowArtifact-COwSXmF4.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-CTBwt4DN.js.map → PkToolShowArtifact-COwSXmF4.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-B6-MsExL.js → PkToolShowContactForm-DRRtCCxB.js} +10 -10
- package/dist-vue/_chunks/{PkToolShowContactForm-B6-MsExL.js.map → PkToolShowContactForm-DRRtCCxB.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-CQuX08lk.js → PkToolShowForm-j7Ha-0X3.js} +109 -87
- package/dist-vue/_chunks/PkToolShowForm-j7Ha-0X3.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowSources-CFh-i60o.js → PkToolShowSources-BVLw4W5l.js} +43 -43
- package/dist-vue/_chunks/{PkToolShowSources-CFh-i60o.js.map → PkToolShowSources-BVLw4W5l.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-BMZltBLh.js → createChatbotApiClient-IH6wBh4s.js} +365 -381
- package/dist-vue/_chunks/createChatbotApiClient-IH6wBh4s.js.map +1 -0
- package/dist-vue/_chunks/{index.es-XfWQ82pb.js → index.es-Bk1O0p8N.js} +166 -156
- package/dist-vue/_chunks/index.es-Bk1O0p8N.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-DZiorgLW.js → useChatbotStore-C3uKi2FS.js} +3 -5
- package/dist-vue/_chunks/useChatbotStore-C3uKi2FS.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +2 -2
- package/dist-vue/index.js +4430 -4221
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +27 -7
- package/dist-vue/packages/components/src/PkCheckboxField.d.ts +1 -1
- package/dist-vue/packages/components/src/PkOfflineScreen.d.ts +18 -0
- package/dist-vue/packages/components/src/PkPwaNotices.d.ts +19 -0
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +9 -3
- package/dist-vue/packages/components/src/index.d.ts +3 -3
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +36 -0
- package/dist-vue/packages/composable/src/index.d.ts +1 -0
- package/dist-vue/packages/composable/src/useConnectivity.d.ts +28 -0
- package/dist-vue/packages/models/src/schema/Agent.d.ts +81 -0
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +24 -0
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +24 -0
- package/dist-vue/style.css +1 -1
- package/package.json +3 -3
- package/dist/_chunks/PkStreamingMarkdown-Djw604Ny.js.map +0 -1
- package/dist/_chunks/PkToolShowForm-dFuoqTPs.js.map +0 -1
- package/dist/_chunks/VvCombobox.es-CFA-K-cQ.js.map +0 -1
- package/dist/_chunks/VvInputText.es-csEQ-bSG.js.map +0 -1
- package/dist/_chunks/VvRadioGroup.es-CSNzOJKx.js.map +0 -1
- package/dist/_chunks/VvTextarea.es-eEyRRpuT.js +0 -1109
- package/dist/_chunks/VvTextarea.es-eEyRRpuT.js.map +0 -1
- package/dist/_chunks/dist-BNET2z7b.js.map +0 -1
- package/dist/_chunks/dot-prop-BXrC9bAX.js +0 -131
- package/dist/_chunks/dot-prop-BXrC9bAX.js.map +0 -1
- package/dist/_chunks/floating-ui.vue-CIKvCpTA.js.map +0 -1
- package/dist/_chunks/index.es-BYny0uhz.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-BlG1WlAO.js +0 -236
- package/dist-vue/_chunks/PkChatbotSteps-Dv9NkYER.js +0 -172
- package/dist-vue/_chunks/PkStreamingMarkdown-DEhbK-3c.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowForm-CQuX08lk.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-BMZltBLh.js.map +0 -1
- package/dist-vue/_chunks/index.es-XfWQ82pb.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-DZiorgLW.js.map +0 -1
- package/dist-vue/packages/components/src/PkPwaInstallPrompt.d.ts +0 -4
- package/dist-vue/packages/components/src/PkPwaOfflineNotice.d.ts +0 -4
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { A as e, B as t, C as n, D as r, F as i, G as a, H as o, Ht as s, K as c, L as l, M as u, O as d, P as f, Q as p, S as m, T as h, Ut as g, V as ee, Wt as te, Y as ne, _, at as
|
|
2
|
-
import { a as
|
|
3
|
-
import { c as A, d as
|
|
4
|
-
import { a as
|
|
5
|
-
import { t as
|
|
6
|
-
//#region ../../node_modules/.pnpm/@volverjs+ui-vue@0.0.
|
|
7
|
-
e(),
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
if (typeof e != "string" || !
|
|
1
|
+
import { A as e, B as t, C as n, D as r, F as i, G as a, H as o, Ht as s, K as c, L as l, M as u, O as d, P as f, Q as p, S as m, T as h, Ut as g, V as ee, Wt as te, Y as ne, _ as re, at as ie, b as _, bt as ae, dt as oe, et as v, f as y, g as b, i as se, j as ce, kt as x, lt as S, mt as C, n as le, p as ue, q as de, qt as fe, tt as pe, u as me, v as w, x as he, xt as T, y as E, yt as ge, z as D } from "./vue.runtime.esm-bundler-DbhD_IvR.js";
|
|
2
|
+
import { a as O, i as k, t as _e } from "./iconify-D4alNs0B.js";
|
|
3
|
+
import { c as A, d as ve, l as ye, m as be, n as xe, o as Se, p as j, r as Ce, s as we } from "./dist-CvMCBce7.js";
|
|
4
|
+
import { a as Te, c as Ee, i as De, l as Oe, n as ke, o as M, r as N, s as Ae, t as je } from "./floating-ui.vue-BacoFpVq.js";
|
|
5
|
+
import { t as Me } from "./esm-Bnbw3aaA.js";
|
|
6
|
+
//#region ../../node_modules/.pnpm/@volverjs+ui-vue@0.0.16_@json-render+core@0.19.0_zod@4.4.3__@volverjs+style@0.1.24_@vue_2f22628193d1c391adccdccf4d8cf3c8/node_modules/@volverjs/ui-vue/dist/components/VvInputText/VvInputText.es.js
|
|
7
|
+
e(), se(), ie(), x();
|
|
8
|
+
var P = (e) => e.toString().padStart(2, "0"), F = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
|
|
9
|
+
function I(e) {
|
|
10
|
+
if (typeof e != "string" || !F.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 L(e, t = "date", n) {
|
|
15
|
+
if (typeof e == "string" && !I(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()}-${P(r.getMonth() + 1)}`;
|
|
19
|
+
if (t === "month" || (i += `-${P(r.getDate())}`, t === "date")) return i;
|
|
20
|
+
let a = n ? `${P(r.getHours())}:${P(r.getMinutes())}:${P(r.getSeconds())}` : `${P(r.getHours())}:${P(r.getMinutes())}`;
|
|
21
21
|
return t === "time" ? a : `${i}T${a}`;
|
|
22
22
|
}
|
|
23
|
-
var
|
|
24
|
-
function
|
|
23
|
+
var R = /^\d{4}-\d{2}-\d{2}$/, Ne = /^\d{4}-\d{2}$/, Pe = /^(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d)?$/, Fe = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2})?$/;
|
|
24
|
+
function Ie(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 (!R.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 (!Ne.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 (!Pe.test(e)) throw Error("Invalid time format. Expected: HH:mm or HH:mm:ss");
|
|
37
|
+
return e.length === 8 ? /* @__PURE__ */ new Date(`${r}-${P(i + 1)}-${P(a)}T${e}`) : /* @__PURE__ */ new Date(`${r}-${P(i + 1)}-${P(a)}T${e}:00`);
|
|
38
38
|
}
|
|
39
|
-
if (!
|
|
39
|
+
if (!Fe.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
|
|
43
|
-
return ((e) => e == null || e === "" || Array.isArray(e) && e.length === 0 || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0)(
|
|
42
|
+
function z(e) {
|
|
43
|
+
return ((e) => e == null || e === "" || Array.isArray(e) && e.length === 0 || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0)(T(e));
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function Le(e) {
|
|
46
46
|
return typeof e == "string";
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return Array.isArray(e) ? e.filter((e) =>
|
|
48
|
+
function B(e) {
|
|
49
|
+
return Array.isArray(e) ? e.filter((e) => Le(e)).join(" ") : e;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
let n = b(() =>
|
|
51
|
+
function V(e, t) {
|
|
52
|
+
let n = b(() => S(e) ? e.value : e), r = b(() => B(n.value.invalidLabel)), i = b(() => B(n.value.validLabel)), a = b(() => n.value.loadingLabel), o = b(() => n.value.hintLabel), s = b(() => !!(n.value.loading && (t.loading || a.value))), c = b(() => !s.value && !!(n.value.invalid && (t.invalid || r.value))), l = b(() => !s.value && !c.value && !!(n.value.valid && (t.valid || i.value))), u = b(() => !s.value && !c.value && !l.value && !!(t.hint || o.value)), f = b(() => c.value || l.value || s.value || u.value);
|
|
53
53
|
return {
|
|
54
54
|
hasInvalidLabelOrSlot: c,
|
|
55
55
|
hasHintLabelOrSlot: u,
|
|
@@ -90,27 +90,27 @@ function Ie(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
|
+
})({}), Re = /* @__PURE__ */ (function(e) {
|
|
96
96
|
return e.absolute = "absolute", e.fixed = "fixed", e;
|
|
97
|
-
})({}), H = /* @__PURE__ */ (function(e) {
|
|
98
|
-
return e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e;
|
|
99
97
|
})({}), U = /* @__PURE__ */ (function(e) {
|
|
100
|
-
return e.
|
|
98
|
+
return e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e;
|
|
101
99
|
})({}), W = /* @__PURE__ */ (function(e) {
|
|
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
|
+
})({}), G = /* @__PURE__ */ (function(e) {
|
|
102
102
|
return e.before = "before", e.after = "after", e;
|
|
103
|
-
})({}), Re = /* @__PURE__ */ (function(e) {
|
|
104
|
-
return e.button = "button", e.submit = "submit", e.reset = "reset", e;
|
|
105
103
|
})({}), ze = /* @__PURE__ */ (function(e) {
|
|
106
|
-
return e.
|
|
104
|
+
return e.button = "button", e.submit = "submit", e.reset = "reset", e;
|
|
107
105
|
})({}), Be = /* @__PURE__ */ (function(e) {
|
|
106
|
+
return e.nuxtLink = "nuxt-link", e.routerLink = "router-link", e.a = "a", e.button = "button", e;
|
|
107
|
+
})({}), Ve = /* @__PURE__ */ (function(e) {
|
|
108
108
|
return e.button = "button", e.link = "link", e.menuitem = "menuitem", e;
|
|
109
|
-
})({}),
|
|
109
|
+
})({}), K = /* @__PURE__ */ (function(e) {
|
|
110
110
|
return e.listbox = "listbox", e.menu = "menu", e;
|
|
111
|
-
})({}),
|
|
111
|
+
})({}), He = /* @__PURE__ */ (function(e) {
|
|
112
112
|
return e.option = "option", e.presentation = "presentation", e;
|
|
113
|
-
})({}),
|
|
113
|
+
})({}), Ue = /* @__PURE__ */ Symbol.for("volver"), We = /* @__PURE__ */ Symbol.for("dropdownTrigger"), Ge = /* @__PURE__ */ Symbol.for("dropdownItem"), Ke = /* @__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
|
+
}, qe = { prefix: "normal" }, Je = {
|
|
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
|
+
}, Ye = {
|
|
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
|
+
}, Xe = {
|
|
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
|
+
}, Ze = {
|
|
151
151
|
loading: {
|
|
152
152
|
type: Boolean,
|
|
153
153
|
default: !1
|
|
@@ -156,39 +156,39 @@ 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
|
+
} }, Qe = { required: {
|
|
163
163
|
type: Boolean,
|
|
164
164
|
default: !1
|
|
165
|
-
} },
|
|
165
|
+
} }, $e = { selected: {
|
|
166
166
|
type: Boolean,
|
|
167
167
|
default: !1
|
|
168
|
-
} },
|
|
168
|
+
} }, Y = { active: {
|
|
169
169
|
type: Boolean,
|
|
170
170
|
default: !1
|
|
171
|
-
} },
|
|
171
|
+
} }, et = { current: {
|
|
172
172
|
type: Boolean,
|
|
173
173
|
default: !1
|
|
174
174
|
} };
|
|
175
|
-
|
|
176
|
-
var
|
|
175
|
+
q.clear;
|
|
176
|
+
var tt = { pressed: {
|
|
177
177
|
type: Boolean,
|
|
178
178
|
default: !1
|
|
179
|
-
} },
|
|
179
|
+
} }, nt = { label: {
|
|
180
180
|
type: [String, Number],
|
|
181
181
|
default: void 0
|
|
182
|
-
} },
|
|
182
|
+
} }, X = { readonly: {
|
|
183
183
|
type: Boolean,
|
|
184
184
|
default: !1
|
|
185
|
-
} },
|
|
185
|
+
} }, Z = { modifiers: {
|
|
186
186
|
type: [String, Array],
|
|
187
187
|
default: void 0
|
|
188
|
-
} },
|
|
188
|
+
} }, rt = { hintLabel: {
|
|
189
189
|
type: String,
|
|
190
190
|
default: ""
|
|
191
|
-
} },
|
|
191
|
+
} }, it = {
|
|
192
192
|
options: {
|
|
193
193
|
type: Array,
|
|
194
194
|
default: () => []
|
|
@@ -205,7 +205,7 @@ var et = { pressed: {
|
|
|
205
205
|
type: [String, Function],
|
|
206
206
|
default: "disabled"
|
|
207
207
|
}
|
|
208
|
-
},
|
|
208
|
+
}, at = { count: {
|
|
209
209
|
type: [Boolean, String],
|
|
210
210
|
default: !1,
|
|
211
211
|
validator: (e) => [
|
|
@@ -214,38 +214,38 @@ var et = { pressed: {
|
|
|
214
214
|
"limit",
|
|
215
215
|
"countdown"
|
|
216
216
|
].includes(e)
|
|
217
|
-
} },
|
|
217
|
+
} }, ot = { debounce: {
|
|
218
218
|
type: [Number, String],
|
|
219
219
|
default: void 0
|
|
220
|
-
} },
|
|
220
|
+
} }, st = {
|
|
221
221
|
icon: {
|
|
222
222
|
type: [String, Object],
|
|
223
223
|
default: void 0
|
|
224
224
|
},
|
|
225
225
|
iconPosition: {
|
|
226
226
|
type: String,
|
|
227
|
-
default:
|
|
228
|
-
validation: (e) => Object.values(
|
|
227
|
+
default: G.before,
|
|
228
|
+
validation: (e) => Object.values(G).includes(e)
|
|
229
229
|
}
|
|
230
|
-
},
|
|
230
|
+
}, ct = { tabindex: {
|
|
231
231
|
type: [String, Number],
|
|
232
232
|
default: 0
|
|
233
|
-
} },
|
|
233
|
+
} }, lt = { floating: {
|
|
234
234
|
type: Boolean,
|
|
235
235
|
default: !1
|
|
236
|
-
} },
|
|
236
|
+
} }, ut = { unselectable: {
|
|
237
237
|
type: Boolean,
|
|
238
238
|
default: !0
|
|
239
|
-
} },
|
|
239
|
+
} }, dt = { id: [String, Number] }, ft = {
|
|
240
240
|
placement: {
|
|
241
241
|
type: String,
|
|
242
|
-
default:
|
|
243
|
-
validator: (e) => Object.values(
|
|
242
|
+
default: U.bottom,
|
|
243
|
+
validator: (e) => Object.values(U).includes(e) || Object.values(W).includes(e)
|
|
244
244
|
},
|
|
245
245
|
strategy: {
|
|
246
246
|
type: String,
|
|
247
247
|
default: void 0,
|
|
248
|
-
validator: (e) => Object.values(
|
|
248
|
+
validator: (e) => Object.values(Re).includes(e)
|
|
249
249
|
},
|
|
250
250
|
transitionName: {
|
|
251
251
|
type: String,
|
|
@@ -291,35 +291,35 @@ var et = { pressed: {
|
|
|
291
291
|
type: Boolean,
|
|
292
292
|
default: !1
|
|
293
293
|
}
|
|
294
|
-
},
|
|
295
|
-
...
|
|
294
|
+
}, pt = {
|
|
295
|
+
...dt,
|
|
296
296
|
name: {
|
|
297
297
|
type: String,
|
|
298
298
|
required: !0
|
|
299
299
|
}
|
|
300
|
-
},
|
|
300
|
+
}, mt = { autofocus: {
|
|
301
301
|
type: Boolean,
|
|
302
302
|
default: !1
|
|
303
|
-
} },
|
|
303
|
+
} }, ht = { autocomplete: {
|
|
304
304
|
type: String,
|
|
305
305
|
default: "off"
|
|
306
|
-
} },
|
|
307
|
-
...dt,
|
|
308
|
-
...ft,
|
|
306
|
+
} }, gt = {
|
|
309
307
|
...pt,
|
|
310
|
-
...
|
|
311
|
-
...
|
|
312
|
-
...
|
|
313
|
-
...
|
|
308
|
+
...mt,
|
|
309
|
+
...ht,
|
|
310
|
+
...ct,
|
|
311
|
+
...J,
|
|
312
|
+
...X,
|
|
314
313
|
...Ye,
|
|
315
|
-
...Z,
|
|
316
314
|
...Xe,
|
|
317
|
-
...X,
|
|
318
315
|
...rt,
|
|
319
|
-
...
|
|
316
|
+
...Ze,
|
|
317
|
+
...Z,
|
|
320
318
|
...at,
|
|
319
|
+
...ot,
|
|
321
320
|
...st,
|
|
322
|
-
...
|
|
321
|
+
...lt,
|
|
322
|
+
...nt,
|
|
323
323
|
minlength: {
|
|
324
324
|
type: [String, Number],
|
|
325
325
|
default: void 0
|
|
@@ -332,49 +332,49 @@ var et = { pressed: {
|
|
|
332
332
|
type: String,
|
|
333
333
|
default: void 0
|
|
334
334
|
},
|
|
335
|
-
...
|
|
335
|
+
...Qe
|
|
336
336
|
};
|
|
337
337
|
({
|
|
338
|
-
...
|
|
339
|
-
...
|
|
340
|
-
...Je,
|
|
338
|
+
...pt,
|
|
339
|
+
...ct,
|
|
341
340
|
...Ye,
|
|
342
|
-
...
|
|
343
|
-
...
|
|
344
|
-
...
|
|
341
|
+
...Xe,
|
|
342
|
+
...rt,
|
|
343
|
+
...J,
|
|
345
344
|
...X,
|
|
346
|
-
...
|
|
347
|
-
...
|
|
345
|
+
...Z,
|
|
346
|
+
...nt,
|
|
347
|
+
...Ze
|
|
348
348
|
}), {
|
|
349
|
-
...Je,
|
|
350
349
|
...Ye,
|
|
351
|
-
...nt,
|
|
352
|
-
...Z,
|
|
353
|
-
...q,
|
|
354
|
-
...tt,
|
|
355
|
-
...X,
|
|
356
|
-
...Y,
|
|
357
350
|
...Xe,
|
|
358
|
-
...
|
|
351
|
+
...it,
|
|
352
|
+
...rt,
|
|
353
|
+
...J,
|
|
354
|
+
...X,
|
|
355
|
+
...Z,
|
|
356
|
+
...nt,
|
|
357
|
+
...Ze,
|
|
358
|
+
...Qe
|
|
359
359
|
}, {
|
|
360
|
-
...
|
|
360
|
+
...J,
|
|
361
|
+
...nt,
|
|
362
|
+
...tt,
|
|
361
363
|
...Y,
|
|
362
364
|
...et,
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}, Re.button, ze.button;
|
|
367
|
-
var ht = {
|
|
365
|
+
...Je
|
|
366
|
+
}, ze.button, Be.button;
|
|
367
|
+
var _t = {
|
|
368
368
|
storageType: {
|
|
369
369
|
type: String,
|
|
370
|
-
default:
|
|
371
|
-
validator: (e) => Object.values(
|
|
370
|
+
default: H.local,
|
|
371
|
+
validator: (e) => Object.values(H).includes(e)
|
|
372
372
|
},
|
|
373
373
|
storageKey: String
|
|
374
|
-
},
|
|
375
|
-
...
|
|
376
|
-
...
|
|
377
|
-
...
|
|
374
|
+
}, vt = {
|
|
375
|
+
...dt,
|
|
376
|
+
...ft,
|
|
377
|
+
...Z,
|
|
378
378
|
modelValue: {
|
|
379
379
|
type: Boolean,
|
|
380
380
|
default: void 0
|
|
@@ -385,17 +385,17 @@ var ht = {
|
|
|
385
385
|
},
|
|
386
386
|
role: {
|
|
387
387
|
type: String,
|
|
388
|
-
default:
|
|
389
|
-
validator: (e) => Object.values(
|
|
388
|
+
default: K.menu,
|
|
389
|
+
validator: (e) => Object.values(K).includes(e)
|
|
390
390
|
}
|
|
391
|
-
},
|
|
391
|
+
}, yt = { focusOnHover: {
|
|
392
392
|
type: Boolean,
|
|
393
393
|
default: !1
|
|
394
|
-
} },
|
|
395
|
-
...
|
|
396
|
-
|
|
397
|
-
...
|
|
398
|
-
...
|
|
394
|
+
} }, bt = {
|
|
395
|
+
...J,
|
|
396
|
+
...$e,
|
|
397
|
+
...ut,
|
|
398
|
+
...Z,
|
|
399
399
|
deselectHintLabel: { type: String },
|
|
400
400
|
selectHintLabel: { type: String },
|
|
401
401
|
selectedHintLabel: { type: String },
|
|
@@ -404,17 +404,17 @@ var ht = {
|
|
|
404
404
|
default: !1
|
|
405
405
|
}
|
|
406
406
|
};
|
|
407
|
-
function
|
|
408
|
-
return b(() => String(e?.value ||
|
|
407
|
+
function xt(e) {
|
|
408
|
+
return b(() => String(e?.value || de()));
|
|
409
409
|
}
|
|
410
|
-
function
|
|
411
|
-
let a =
|
|
410
|
+
function St({ reference: e, id: n, expanded: r, aria: i }) {
|
|
411
|
+
let a = Oe();
|
|
412
412
|
return {
|
|
413
413
|
bus: a,
|
|
414
414
|
component: h({
|
|
415
415
|
name: "VvDropdownTriggerProvider",
|
|
416
416
|
setup() {
|
|
417
|
-
t(
|
|
417
|
+
t(We, {
|
|
418
418
|
reference: e,
|
|
419
419
|
id: n,
|
|
420
420
|
expanded: r,
|
|
@@ -423,43 +423,43 @@ function bt({ reference: e, id: n, expanded: r, aria: i }) {
|
|
|
423
423
|
});
|
|
424
424
|
},
|
|
425
425
|
render() {
|
|
426
|
-
return d(
|
|
426
|
+
return d(ue, {}, this.$slots.default?.());
|
|
427
427
|
}
|
|
428
428
|
})
|
|
429
429
|
};
|
|
430
430
|
}
|
|
431
|
-
function
|
|
432
|
-
let r = b(() => e.value ===
|
|
433
|
-
return t(
|
|
431
|
+
function Ct({ role: e, ...n }) {
|
|
432
|
+
let r = b(() => e.value === K.listbox ? He.option : He.presentation);
|
|
433
|
+
return t(Ge, {
|
|
434
434
|
role: r,
|
|
435
435
|
...n
|
|
436
436
|
}), { itemRole: r };
|
|
437
437
|
}
|
|
438
|
-
function
|
|
439
|
-
t(
|
|
440
|
-
role:
|
|
438
|
+
function wt({ expanded: e }) {
|
|
439
|
+
t(Ke, {
|
|
440
|
+
role: C(Ve.menuitem),
|
|
441
441
|
expanded: e
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function Tt(e, t, n) {
|
|
445
445
|
return b(() => {
|
|
446
446
|
let r = { [e]: !0 }, i = typeof t?.value == "string" ? t.value.split(" ") : t?.value;
|
|
447
447
|
return i && Array.isArray(i) && i.forEach((t) => {
|
|
448
448
|
t && (r[`${e}--${t}`] = !0);
|
|
449
449
|
}), n && Object.keys(n.value).forEach((t) => {
|
|
450
|
-
r[`${e}--${t}`] =
|
|
450
|
+
r[`${e}--${t}`] = T(n.value[t]);
|
|
451
451
|
}), r;
|
|
452
452
|
});
|
|
453
453
|
}
|
|
454
|
-
var
|
|
454
|
+
var Et = [
|
|
455
455
|
"id",
|
|
456
456
|
"tabindex",
|
|
457
457
|
"role",
|
|
458
458
|
"aria-labelledby"
|
|
459
|
-
],
|
|
459
|
+
], Dt = /* @__PURE__ */ h({
|
|
460
460
|
name: "VvDropdown",
|
|
461
461
|
inheritAttrs: !1,
|
|
462
|
-
props:
|
|
462
|
+
props: vt,
|
|
463
463
|
emits: [
|
|
464
464
|
"update:modelValue",
|
|
465
465
|
"beforeEnter",
|
|
@@ -478,130 +478,130 @@ var wt = [
|
|
|
478
478
|
"leaveCancelled"
|
|
479
479
|
],
|
|
480
480
|
setup(e, { expose: t, emit: u }) {
|
|
481
|
-
let d = e, m = u, { id: h } =
|
|
482
|
-
get: () => d.reference ??
|
|
481
|
+
let d = e, m = u, { id: h } = ge(d), ee = xt(h), ne = c(), ie = C("auto"), ae = C("auto"), oe = C(), y = C(), se = C(), ce = C(), x = b({
|
|
482
|
+
get: () => d.reference ?? oe.value,
|
|
483
483
|
set: (e) => {
|
|
484
|
-
|
|
484
|
+
oe.value = e;
|
|
485
485
|
}
|
|
486
|
-
}),
|
|
486
|
+
}), S = C(!1);
|
|
487
487
|
l(() => {
|
|
488
|
-
|
|
489
|
-
|
|
488
|
+
ve(y.value, () => {
|
|
489
|
+
S.value = globalThis.getComputedStyle(y.value).getPropertyValue("--dropdown-custom-position")?.trim() === "true";
|
|
490
490
|
}, {
|
|
491
491
|
attributeFilter: ["style"],
|
|
492
492
|
window: globalThis.window
|
|
493
493
|
});
|
|
494
494
|
});
|
|
495
|
-
function
|
|
495
|
+
function de(e, t, n) {
|
|
496
496
|
return typeof e == "boolean" ? t() : n(e);
|
|
497
497
|
}
|
|
498
498
|
let fe = b(() => {
|
|
499
499
|
let e = [];
|
|
500
|
-
if (d.autoPlacement ? e.push(
|
|
500
|
+
if (d.autoPlacement ? e.push(de(d.autoPlacement, () => N(), (e) => N(e))) : d.flip && e.push(de(d.flip, () => Te({ fallbackStrategy: "initialPlacement" }), (e) => Te(e))), d.shift && e.push(de(d.shift, () => Ae(), (e) => Ae(e))), d.size) {
|
|
501
501
|
let t = ({ availableWidth: e, availableHeight: t }) => {
|
|
502
|
-
|
|
502
|
+
ie.value = `${e}px`, ae.value = `${t}px`;
|
|
503
503
|
};
|
|
504
|
-
e.push(
|
|
504
|
+
e.push(de(d.size, () => Ee({ apply: t }), (e) => Ee({
|
|
505
505
|
...e,
|
|
506
506
|
apply: t
|
|
507
507
|
})));
|
|
508
508
|
}
|
|
509
|
-
return d.offset && e.push(["string", "number"].includes(typeof d.offset) ?
|
|
510
|
-
}), { x:
|
|
511
|
-
whileElementsMounted: (...e) =>
|
|
509
|
+
return d.offset && e.push(["string", "number"].includes(typeof d.offset) ? M(Number(d.offset)) : M(d.offset)), d.arrow && e.push(je({ element: se })), e;
|
|
510
|
+
}), { x: w, y: he, middlewareData: O, placement: k, strategy: _e } = ke(x, y, {
|
|
511
|
+
whileElementsMounted: (...e) => De(...e, { animationFrame: d.strategy === Re.fixed }),
|
|
512
512
|
placement: b(() => d.placement),
|
|
513
513
|
strategy: b(() => d.strategy),
|
|
514
514
|
middleware: fe
|
|
515
|
-
}),
|
|
516
|
-
if (
|
|
517
|
-
let e = d.triggerWidth &&
|
|
515
|
+
}), A = b(() => {
|
|
516
|
+
if (S.value) return;
|
|
517
|
+
let e = d.triggerWidth && x.value ? `${x.value?.offsetWidth}px` : void 0;
|
|
518
518
|
return {
|
|
519
|
-
position:
|
|
519
|
+
position: _e.value,
|
|
520
520
|
top: `${he.value ?? 0}px`,
|
|
521
|
-
left: `${
|
|
522
|
-
maxWidth: e ? void 0 :
|
|
523
|
-
maxHeight:
|
|
521
|
+
left: `${w.value ?? 0}px`,
|
|
522
|
+
maxWidth: e ? void 0 : ie.value,
|
|
523
|
+
maxHeight: ae.value,
|
|
524
524
|
width: e
|
|
525
525
|
};
|
|
526
|
-
}),
|
|
527
|
-
if (
|
|
526
|
+
}), j = b(() => k.value.split("-")[0]), we = b(() => {
|
|
527
|
+
if (S.value) return;
|
|
528
528
|
let e = {
|
|
529
|
-
[
|
|
530
|
-
[
|
|
531
|
-
[
|
|
532
|
-
[
|
|
533
|
-
}[
|
|
529
|
+
[U.top]: U.bottom,
|
|
530
|
+
[U.right]: U.left,
|
|
531
|
+
[U.bottom]: U.top,
|
|
532
|
+
[U.left]: U.right
|
|
533
|
+
}[j.value];
|
|
534
534
|
return {
|
|
535
|
-
left:
|
|
536
|
-
top:
|
|
537
|
-
[e]: `${-(
|
|
535
|
+
left: O.value.arrow?.x === void 0 ? void 0 : `${O.value.arrow?.x}px`,
|
|
536
|
+
top: O.value.arrow?.y === void 0 ? void 0 : `${O.value.arrow?.y}px`,
|
|
537
|
+
[e]: `${-(se.value?.offsetWidth ?? 0) / 2}px`
|
|
538
538
|
};
|
|
539
|
-
}),
|
|
540
|
-
get: () =>
|
|
539
|
+
}), Oe = be(d, "modelValue", m), Me = C(!1), P = b({
|
|
540
|
+
get: () => Oe.value ?? Me.value,
|
|
541
541
|
set: (e) => {
|
|
542
|
-
if (
|
|
543
|
-
|
|
542
|
+
if (Oe.value === void 0) {
|
|
543
|
+
Me.value = e;
|
|
544
544
|
return;
|
|
545
545
|
}
|
|
546
|
-
|
|
546
|
+
Oe.value = e;
|
|
547
547
|
}
|
|
548
548
|
});
|
|
549
|
-
function
|
|
550
|
-
|
|
549
|
+
function F() {
|
|
550
|
+
P.value = !0;
|
|
551
551
|
}
|
|
552
|
-
function
|
|
553
|
-
|
|
552
|
+
function I() {
|
|
553
|
+
P.value = !1;
|
|
554
554
|
}
|
|
555
|
-
function
|
|
556
|
-
|
|
555
|
+
function L() {
|
|
556
|
+
P.value = !P.value;
|
|
557
557
|
}
|
|
558
|
-
function
|
|
559
|
-
|
|
558
|
+
function R(e) {
|
|
559
|
+
x.value = e;
|
|
560
560
|
}
|
|
561
|
-
|
|
562
|
-
!d.keepOpen &&
|
|
563
|
-
}, { ignore: [
|
|
564
|
-
let
|
|
561
|
+
xe(y, () => {
|
|
562
|
+
!d.keepOpen && P.value && (P.value = !1);
|
|
563
|
+
}, { ignore: [x] });
|
|
564
|
+
let Ne = b(() => x.value?.getAttribute?.("id") ?? void 0), Pe = b(() => ({
|
|
565
565
|
"aria-controls": ee.value,
|
|
566
566
|
"aria-haspopup": !0,
|
|
567
|
-
"aria-expanded":
|
|
568
|
-
})), { component:
|
|
569
|
-
reference:
|
|
567
|
+
"aria-expanded": P.value
|
|
568
|
+
})), { component: Fe, bus: Ie } = St({
|
|
569
|
+
reference: x,
|
|
570
570
|
id: ee,
|
|
571
|
-
expanded:
|
|
572
|
-
aria:
|
|
571
|
+
expanded: P,
|
|
572
|
+
aria: Pe
|
|
573
573
|
});
|
|
574
|
-
|
|
575
|
-
let { role:
|
|
576
|
-
function
|
|
574
|
+
Ie.on("click", L);
|
|
575
|
+
let { role: z, modifiers: Le } = ge(d), B = Tt("vv-dropdown", Le, b(() => ({ arrow: d.arrow }))), { focused: V } = ye(y);
|
|
576
|
+
function H(e) {
|
|
577
577
|
return e ? [...e.querySelectorAll("a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])")].filter((e) => !e.hasAttribute("disabled") && !e.getAttribute("aria-hidden")) : [];
|
|
578
578
|
}
|
|
579
|
-
function
|
|
579
|
+
function W() {
|
|
580
580
|
i(() => {
|
|
581
|
-
let e =
|
|
581
|
+
let e = H(y.value);
|
|
582
582
|
e.length > 0 && e[0].focus({ preventScroll: !0 });
|
|
583
583
|
});
|
|
584
584
|
}
|
|
585
|
-
function
|
|
585
|
+
function G() {
|
|
586
586
|
i(() => {
|
|
587
|
-
let e =
|
|
587
|
+
let e = H(ce.value);
|
|
588
588
|
e.length > 0 && e[0].focus({ preventScroll: !0 });
|
|
589
589
|
});
|
|
590
590
|
}
|
|
591
|
-
function
|
|
591
|
+
function ze() {
|
|
592
592
|
i(() => {
|
|
593
|
-
if (
|
|
594
|
-
let e =
|
|
593
|
+
if (V.value) {
|
|
594
|
+
let e = H(y.value);
|
|
595
595
|
if (e.length === 0 || !document.activeElement) return;
|
|
596
596
|
let t = e.indexOf(document.activeElement);
|
|
597
597
|
t < e.length - 1 ? e[t + 1].focus({ preventScroll: !0 }) : e[0].focus({ preventScroll: !0 });
|
|
598
598
|
}
|
|
599
599
|
});
|
|
600
600
|
}
|
|
601
|
-
function
|
|
601
|
+
function Be() {
|
|
602
602
|
i(() => {
|
|
603
|
-
if (
|
|
604
|
-
let e =
|
|
603
|
+
if (V.value) {
|
|
604
|
+
let e = H(y.value);
|
|
605
605
|
if (e.length === 0 || !document.activeElement) return;
|
|
606
606
|
let t = e.indexOf(document.activeElement);
|
|
607
607
|
if (t > 0) {
|
|
@@ -612,41 +612,41 @@ var wt = [
|
|
|
612
612
|
}
|
|
613
613
|
});
|
|
614
614
|
}
|
|
615
|
-
p(
|
|
616
|
-
e && d.autofocusFirst &&
|
|
615
|
+
p(P, (e) => {
|
|
616
|
+
e && d.autofocusFirst && W();
|
|
617
617
|
}), t({
|
|
618
|
-
toggle:
|
|
619
|
-
show:
|
|
620
|
-
hide:
|
|
621
|
-
init:
|
|
622
|
-
focusFirst:
|
|
623
|
-
focusFirstListElement:
|
|
624
|
-
focusNext:
|
|
625
|
-
focusPrev:
|
|
626
|
-
customPosition:
|
|
618
|
+
toggle: L,
|
|
619
|
+
show: F,
|
|
620
|
+
hide: I,
|
|
621
|
+
init: R,
|
|
622
|
+
focusFirst: W,
|
|
623
|
+
focusFirstListElement: G,
|
|
624
|
+
focusNext: ze,
|
|
625
|
+
focusPrev: Be,
|
|
626
|
+
customPosition: S
|
|
627
627
|
});
|
|
628
|
-
let { itemRole: Ve } =
|
|
629
|
-
role:
|
|
630
|
-
expanded:
|
|
631
|
-
focused:
|
|
632
|
-
hovered:
|
|
628
|
+
let { itemRole: Ve } = Ct({
|
|
629
|
+
role: z,
|
|
630
|
+
expanded: P,
|
|
631
|
+
focused: V,
|
|
632
|
+
hovered: Se(y)
|
|
633
633
|
});
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
}),
|
|
637
|
-
|
|
638
|
-
}),
|
|
639
|
-
|
|
640
|
-
}),
|
|
634
|
+
Ce("Escape", (e) => {
|
|
635
|
+
P.value && (e.preventDefault(), I());
|
|
636
|
+
}), Ce("ArrowDown", (e) => {
|
|
637
|
+
P.value && V.value && (e.preventDefault(), ze());
|
|
638
|
+
}), Ce("ArrowUp", (e) => {
|
|
639
|
+
P.value && V.value && (e.preventDefault(), Be());
|
|
640
|
+
}), Ce([" ", "Enter"], (e) => {
|
|
641
641
|
let t = e.target;
|
|
642
|
-
|
|
642
|
+
P.value && V.value && t && t?.click();
|
|
643
643
|
});
|
|
644
|
-
let
|
|
644
|
+
let K = {
|
|
645
645
|
"before-enter": () => {
|
|
646
|
-
m(
|
|
646
|
+
m(P.value ? "beforeExpand" : "beforeCollapse"), m("beforeEnter");
|
|
647
647
|
},
|
|
648
648
|
"after-leave": () => {
|
|
649
|
-
m(
|
|
649
|
+
m(P.value ? "afterExpand" : "afterCollapse"), m("afterLeave");
|
|
650
650
|
},
|
|
651
651
|
enter: () => {
|
|
652
652
|
m("enter");
|
|
@@ -667,104 +667,104 @@ var wt = [
|
|
|
667
667
|
m("leaveCancelled");
|
|
668
668
|
}
|
|
669
669
|
};
|
|
670
|
-
return (e, t) => (
|
|
671
|
-
default:
|
|
672
|
-
init:
|
|
673
|
-
show:
|
|
674
|
-
hide:
|
|
675
|
-
toggle:
|
|
676
|
-
expanded:
|
|
677
|
-
aria:
|
|
670
|
+
return (e, t) => (D(), _(ue, null, [n(T(Fe), null, {
|
|
671
|
+
default: v(() => [o(e.$slots, "default", g(r({
|
|
672
|
+
init: R,
|
|
673
|
+
show: F,
|
|
674
|
+
hide: I,
|
|
675
|
+
toggle: L,
|
|
676
|
+
expanded: T(P),
|
|
677
|
+
aria: T(Pe)
|
|
678
678
|
})))]),
|
|
679
679
|
_: 3
|
|
680
|
-
}), n(
|
|
681
|
-
default:
|
|
680
|
+
}), n(le, f({ name: e.transitionName }, a(K), { persisted: "" }), {
|
|
681
|
+
default: v(() => [pe(re("div", {
|
|
682
682
|
ref_key: "floatingEl",
|
|
683
|
-
ref:
|
|
684
|
-
style: te(
|
|
685
|
-
class: s(
|
|
683
|
+
ref: y,
|
|
684
|
+
style: te(T(A)),
|
|
685
|
+
class: s(T(B))
|
|
686
686
|
}, [
|
|
687
|
-
d.arrow ? (
|
|
687
|
+
d.arrow ? (D(), _("div", {
|
|
688
688
|
key: 0,
|
|
689
689
|
ref_key: "arrowEl",
|
|
690
|
-
ref:
|
|
691
|
-
style: te(
|
|
690
|
+
ref: se,
|
|
691
|
+
style: te(T(we)),
|
|
692
692
|
class: "vv-dropdown__arrow"
|
|
693
|
-
}, null, 4)) :
|
|
693
|
+
}, null, 4)) : E("v-if", !0),
|
|
694
694
|
o(e.$slots, "before", g(r({
|
|
695
|
-
show:
|
|
696
|
-
hide:
|
|
697
|
-
toggle:
|
|
698
|
-
expanded:
|
|
695
|
+
show: F,
|
|
696
|
+
hide: I,
|
|
697
|
+
toggle: L,
|
|
698
|
+
expanded: T(P)
|
|
699
699
|
}))),
|
|
700
|
-
|
|
701
|
-
id:
|
|
700
|
+
re("div", f(T(ne), {
|
|
701
|
+
id: T(ee),
|
|
702
702
|
ref_key: "listEl",
|
|
703
|
-
ref:
|
|
704
|
-
tabindex:
|
|
705
|
-
role:
|
|
706
|
-
"aria-labelledby":
|
|
703
|
+
ref: ce,
|
|
704
|
+
tabindex: T(P) ? void 0 : -1,
|
|
705
|
+
role: T(z),
|
|
706
|
+
"aria-labelledby": T(Ne),
|
|
707
707
|
class: "vv-dropdown__list"
|
|
708
708
|
}), [o(e.$slots, "items", g(r({
|
|
709
|
-
show:
|
|
710
|
-
hide:
|
|
711
|
-
toggle:
|
|
712
|
-
expanded:
|
|
713
|
-
role:
|
|
714
|
-
})))], 16,
|
|
709
|
+
show: F,
|
|
710
|
+
hide: I,
|
|
711
|
+
toggle: L,
|
|
712
|
+
expanded: T(P),
|
|
713
|
+
role: T(Ve)
|
|
714
|
+
})))], 16, Et),
|
|
715
715
|
o(e.$slots, "after", g(r({
|
|
716
|
-
show:
|
|
717
|
-
hide:
|
|
718
|
-
toggle:
|
|
719
|
-
expanded:
|
|
716
|
+
show: F,
|
|
717
|
+
hide: I,
|
|
718
|
+
toggle: L,
|
|
719
|
+
expanded: T(P)
|
|
720
720
|
})))
|
|
721
|
-
], 6), [[
|
|
721
|
+
], 6), [[me, T(P)]])]),
|
|
722
722
|
_: 3
|
|
723
723
|
}, 16, ["name"])], 64));
|
|
724
724
|
}
|
|
725
725
|
});
|
|
726
|
-
function
|
|
727
|
-
return
|
|
726
|
+
function Ot() {
|
|
727
|
+
return ce(Ge, {});
|
|
728
728
|
}
|
|
729
|
-
var
|
|
729
|
+
var kt = /* @__PURE__ */ h({
|
|
730
730
|
name: "VvDropdownItem",
|
|
731
|
-
props:
|
|
731
|
+
props: yt,
|
|
732
732
|
setup(e) {
|
|
733
|
-
let t = e, { role: n, expanded: r } =
|
|
734
|
-
|
|
735
|
-
let a =
|
|
733
|
+
let t = e, { role: n, expanded: r } = Ot(), i = C(null);
|
|
734
|
+
wt({ expanded: r });
|
|
735
|
+
let a = Se(i), { focused: s } = A(i), { focused: c } = ye(i);
|
|
736
736
|
return p(a, (e) => {
|
|
737
737
|
e && t.focusOnHover && (s.value = !0);
|
|
738
|
-
}), (e, t) => (
|
|
738
|
+
}), (e, t) => (D(), _("div", f({ role: T(n) }, {
|
|
739
739
|
ref_key: "element",
|
|
740
740
|
ref: i,
|
|
741
|
-
class: ["vv-dropdown__item", { "focus-visible":
|
|
741
|
+
class: ["vv-dropdown__item", { "focus-visible": T(s) || T(c) }]
|
|
742
742
|
}), [o(e.$slots, "default")], 16));
|
|
743
743
|
}
|
|
744
|
-
}),
|
|
744
|
+
}), At = ["title"], jt = /* @__PURE__ */ h({
|
|
745
745
|
name: "VvDropdownOption",
|
|
746
|
-
props:
|
|
746
|
+
props: bt,
|
|
747
747
|
setup(e) {
|
|
748
|
-
let t = e, { modifiers: n } =
|
|
748
|
+
let t = e, { modifiers: n } = ge(t), i = Tt("vv-dropdown-option", n, b(() => ({
|
|
749
749
|
disabled: t.disabled,
|
|
750
750
|
selected: t.selected,
|
|
751
751
|
unselectable: t.unselectable && t.selected
|
|
752
752
|
}))), a = b(() => t.selected ? t.unselectable ? t.deselectHintLabel : t.selectedHintLabel : t.disabled ? "" : t.selectHintLabel);
|
|
753
|
-
return (e, t) => (
|
|
754
|
-
class: s(
|
|
753
|
+
return (e, t) => (D(), w(kt, {
|
|
754
|
+
class: s(T(i)),
|
|
755
755
|
tabindex: e.disabled ? -1 : 0,
|
|
756
756
|
"aria-selected": e.selected,
|
|
757
757
|
"aria-disabled": e.disabled,
|
|
758
758
|
"focus-on-hover": e.focusOnHover
|
|
759
759
|
}, {
|
|
760
|
-
default:
|
|
760
|
+
default: v(() => [o(e.$slots, "default"), re("span", {
|
|
761
761
|
class: "vv-dropdown-option__hint",
|
|
762
|
-
title:
|
|
762
|
+
title: T(a)
|
|
763
763
|
}, [o(e.$slots, "hint", g(r({
|
|
764
764
|
disabled: e.disabled,
|
|
765
765
|
selected: e.selected,
|
|
766
766
|
unselectable: e.unselectable
|
|
767
|
-
})), () => [m(
|
|
767
|
+
})), () => [m(fe(T(a)), 1)])], 8, At)]),
|
|
768
768
|
_: 3
|
|
769
769
|
}, 8, [
|
|
770
770
|
"class",
|
|
@@ -775,8 +775,8 @@ var Dt = /* @__PURE__ */ h({
|
|
|
775
775
|
]));
|
|
776
776
|
}
|
|
777
777
|
});
|
|
778
|
-
function
|
|
779
|
-
return
|
|
778
|
+
function Mt() {
|
|
779
|
+
return ce(Ue, void 0);
|
|
780
780
|
}
|
|
781
781
|
var Q = /* @__PURE__ */ h({
|
|
782
782
|
name: "VvIcon",
|
|
@@ -797,12 +797,12 @@ var Q = /* @__PURE__ */ h({
|
|
|
797
797
|
onLoad: { type: Function },
|
|
798
798
|
svg: {},
|
|
799
799
|
modifiers: {}
|
|
800
|
-
},
|
|
800
|
+
}, qe),
|
|
801
801
|
setup(e) {
|
|
802
|
-
let t = e, n = b(() => typeof t.rotate == "string" ? Number.parseFloat(t.rotate) : t.rotate), r =
|
|
802
|
+
let t = e, n = b(() => typeof t.rotate == "string" ? Number.parseFloat(t.rotate) : t.rotate), r = C(!0), i = Mt(), { modifiers: a } = ge(t), o = Tt("vv-icon", a), s = b(() => t.provider || i?.iconsProvider), c = b(() => {
|
|
803
803
|
let e = t.name ?? "", n = `@${s.value}:${t.prefix}:${e}`;
|
|
804
|
-
if (
|
|
805
|
-
let r = i?.iconsCollections.find((t) =>
|
|
804
|
+
if (O(n)) return n;
|
|
805
|
+
let r = i?.iconsCollections.find((t) => O(`@${s.value}:${t.prefix}:${e}`));
|
|
806
806
|
return r ? `@${s.value}:${r.prefix}:${e}` : e;
|
|
807
807
|
});
|
|
808
808
|
function l(e) {
|
|
@@ -810,19 +810,19 @@ var Q = /* @__PURE__ */ h({
|
|
|
810
810
|
}
|
|
811
811
|
function u(e) {
|
|
812
812
|
let n = l(e), r = n?.innerHTML.trim() || "";
|
|
813
|
-
n && r &&
|
|
813
|
+
n && r && k(`@${s.value}:${t.prefix}:${t.name}`, {
|
|
814
814
|
body: r,
|
|
815
815
|
height: n.viewBox.baseVal.height,
|
|
816
816
|
width: n.viewBox.baseVal.width
|
|
817
817
|
});
|
|
818
818
|
}
|
|
819
|
-
return i && t.src && !
|
|
819
|
+
return i && t.src && !O(`@${s.value}:${t.prefix}:${t.name}`) && (r.value = !1, i.fetchIcon(t.src).then((e) => {
|
|
820
820
|
e && u(e), r.value = !0;
|
|
821
821
|
}).catch((e) => {
|
|
822
822
|
throw r.value = !0, /* @__PURE__ */ Error(`Error during fetch icon: ${e?.message}`);
|
|
823
|
-
})), t.svg && u(t.svg), (t, i) =>
|
|
823
|
+
})), t.svg && u(t.svg), (t, i) => T(r) ? (D(), w(T(_e), f({
|
|
824
824
|
key: 0,
|
|
825
|
-
class:
|
|
825
|
+
class: T(o)
|
|
826
826
|
}, {
|
|
827
827
|
inline: e.inline,
|
|
828
828
|
width: e.width,
|
|
@@ -830,10 +830,10 @@ var Q = /* @__PURE__ */ h({
|
|
|
830
830
|
horizontalFlip: e.horizontalFlip,
|
|
831
831
|
verticalFlip: e.verticalFlip,
|
|
832
832
|
flip: e.flip,
|
|
833
|
-
rotate:
|
|
833
|
+
rotate: T(n),
|
|
834
834
|
color: e.color,
|
|
835
|
-
icon:
|
|
836
|
-
}, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) :
|
|
835
|
+
icon: T(c)
|
|
836
|
+
}, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) : E("v-if", !0);
|
|
837
837
|
}
|
|
838
838
|
}), $ = {
|
|
839
839
|
TEXT: "text",
|
|
@@ -849,7 +849,7 @@ var Q = /* @__PURE__ */ h({
|
|
|
849
849
|
DATETIME_LOCAL: "datetime-local",
|
|
850
850
|
MONTH: "month",
|
|
851
851
|
WEEK: "week"
|
|
852
|
-
},
|
|
852
|
+
}, Nt = [
|
|
853
853
|
"update:modelValue",
|
|
854
854
|
"update:masked",
|
|
855
855
|
"accept",
|
|
@@ -868,9 +868,9 @@ var Q = /* @__PURE__ */ h({
|
|
|
868
868
|
"keydown",
|
|
869
869
|
"keypress",
|
|
870
870
|
"clear"
|
|
871
|
-
],
|
|
872
|
-
...
|
|
873
|
-
...
|
|
871
|
+
], Pt = {
|
|
872
|
+
...gt,
|
|
873
|
+
..._t,
|
|
874
874
|
modelValue: [
|
|
875
875
|
String,
|
|
876
876
|
Number,
|
|
@@ -899,19 +899,19 @@ var Q = /* @__PURE__ */ h({
|
|
|
899
899
|
multiple: Boolean,
|
|
900
900
|
iconShowPassword: {
|
|
901
901
|
type: [String, Object],
|
|
902
|
-
default:
|
|
902
|
+
default: q.showPassword
|
|
903
903
|
},
|
|
904
904
|
iconHidePassword: {
|
|
905
905
|
type: [String, Object],
|
|
906
|
-
default:
|
|
906
|
+
default: q.hidePassword
|
|
907
907
|
},
|
|
908
908
|
iconClear: {
|
|
909
909
|
type: [String, Object],
|
|
910
|
-
default:
|
|
910
|
+
default: q.clear
|
|
911
911
|
},
|
|
912
912
|
iconRemoveSuggestion: {
|
|
913
913
|
type: [String, Object],
|
|
914
|
-
default:
|
|
914
|
+
default: q.remove
|
|
915
915
|
},
|
|
916
916
|
labelStepUp: {
|
|
917
917
|
type: String,
|
|
@@ -971,19 +971,19 @@ var Q = /* @__PURE__ */ h({
|
|
|
971
971
|
default: "text"
|
|
972
972
|
}
|
|
973
973
|
};
|
|
974
|
-
function
|
|
975
|
-
let n = b(() => typeof e?.value == "string" ? { name: e?.value } : e?.value), r = b(() => t?.value ===
|
|
974
|
+
function Ft(e, t) {
|
|
975
|
+
let n = b(() => typeof e?.value == "string" ? { name: e?.value } : e?.value), r = b(() => t?.value === G.before ? n.value : void 0), i = b(() => t?.value === G.after ? n.value : void 0);
|
|
976
976
|
return {
|
|
977
977
|
hasIcon: n,
|
|
978
|
-
hasIconLeft: b(() => t?.value ===
|
|
979
|
-
hasIconRight: b(() => t?.value ===
|
|
980
|
-
hasIconTop: b(() => t?.value ===
|
|
981
|
-
hasIconBottom: b(() => t?.value ===
|
|
978
|
+
hasIconLeft: b(() => t?.value === U.left ? n.value : void 0),
|
|
979
|
+
hasIconRight: b(() => t?.value === U.right ? n.value : void 0),
|
|
980
|
+
hasIconTop: b(() => t?.value === U.top ? n.value : void 0),
|
|
981
|
+
hasIconBottom: b(() => t?.value === U.bottom ? n.value : void 0),
|
|
982
982
|
hasIconBefore: r,
|
|
983
983
|
hasIconAfter: i
|
|
984
984
|
};
|
|
985
985
|
}
|
|
986
|
-
var
|
|
986
|
+
var It = h({
|
|
987
987
|
components: { VvIcon: Q },
|
|
988
988
|
props: {
|
|
989
989
|
inputType: {
|
|
@@ -1005,7 +1005,7 @@ var Pt = h({
|
|
|
1005
1005
|
},
|
|
1006
1006
|
emits: ["clear"],
|
|
1007
1007
|
setup(e, { emit: t }) {
|
|
1008
|
-
let { hasIcon: n } =
|
|
1008
|
+
let { hasIcon: n } = Ft(b(() => e.icon));
|
|
1009
1009
|
function r(n) {
|
|
1010
1010
|
n?.stopPropagation(), e.disabled || t("clear");
|
|
1011
1011
|
}
|
|
@@ -1027,7 +1027,7 @@ var Pt = h({
|
|
|
1027
1027
|
onClick: this.onClick
|
|
1028
1028
|
}, e);
|
|
1029
1029
|
}
|
|
1030
|
-
}),
|
|
1030
|
+
}), Lt = h({
|
|
1031
1031
|
components: { VvIcon: Q },
|
|
1032
1032
|
props: {
|
|
1033
1033
|
inputType: {
|
|
@@ -1048,16 +1048,16 @@ var Pt = h({
|
|
|
1048
1048
|
},
|
|
1049
1049
|
iconShow: {
|
|
1050
1050
|
type: [String, Object],
|
|
1051
|
-
default:
|
|
1051
|
+
default: q.showPassword
|
|
1052
1052
|
},
|
|
1053
1053
|
iconHide: {
|
|
1054
1054
|
type: [String, Object],
|
|
1055
|
-
default:
|
|
1055
|
+
default: q.hidePassword
|
|
1056
1056
|
}
|
|
1057
1057
|
},
|
|
1058
1058
|
emits: ["toggle-password"],
|
|
1059
1059
|
setup(e, { emit: t }) {
|
|
1060
|
-
let n =
|
|
1060
|
+
let n = C(!1), r = b(() => n.value ? e.iconHide : e.iconShow), { hasIcon: i } = Ft(r);
|
|
1061
1061
|
function a(r) {
|
|
1062
1062
|
r?.stopPropagation(), e.disabled || (n.value = !n.value, t("toggle-password", n.value));
|
|
1063
1063
|
}
|
|
@@ -1081,7 +1081,7 @@ var Pt = h({
|
|
|
1081
1081
|
onClick: this.onClick
|
|
1082
1082
|
}, e);
|
|
1083
1083
|
}
|
|
1084
|
-
}),
|
|
1084
|
+
}), Rt = h({
|
|
1085
1085
|
components: { VvIcon: Q },
|
|
1086
1086
|
props: {
|
|
1087
1087
|
inputType: {
|
|
@@ -1123,14 +1123,14 @@ var Pt = h({
|
|
|
1123
1123
|
});
|
|
1124
1124
|
}
|
|
1125
1125
|
});
|
|
1126
|
-
function
|
|
1126
|
+
function zt(e, t, n) {
|
|
1127
1127
|
return {
|
|
1128
1128
|
name: "VvInputTextActions",
|
|
1129
1129
|
components: {
|
|
1130
1130
|
VvIcon: Q,
|
|
1131
|
-
VvInputPasswordAction:
|
|
1132
|
-
VvInputStepAction:
|
|
1133
|
-
VvInputClearAction:
|
|
1131
|
+
VvInputPasswordAction: Lt,
|
|
1132
|
+
VvInputStepAction: Rt,
|
|
1133
|
+
VvInputClearAction: It
|
|
1134
1134
|
},
|
|
1135
1135
|
setup() {
|
|
1136
1136
|
return {
|
|
@@ -1150,7 +1150,7 @@ function Lt(e, t, n) {
|
|
|
1150
1150
|
switch (e) {
|
|
1151
1151
|
case $.SEARCH: {
|
|
1152
1152
|
let { onClear: e } = this.$attrs;
|
|
1153
|
-
n = [d(
|
|
1153
|
+
n = [d(It, {
|
|
1154
1154
|
disabled: this.isDisabled || !this.isDirty,
|
|
1155
1155
|
label: this.labelClear,
|
|
1156
1156
|
onClear: e
|
|
@@ -1159,7 +1159,7 @@ function Lt(e, t, n) {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
case $.PASSWORD: {
|
|
1161
1161
|
let { onTogglePassword: e } = this.$attrs;
|
|
1162
|
-
n = [d(
|
|
1162
|
+
n = [d(Lt, {
|
|
1163
1163
|
disabled: this.isDisabled,
|
|
1164
1164
|
onTogglePassword: e,
|
|
1165
1165
|
labelShow: this.labelShowPassword,
|
|
@@ -1171,13 +1171,13 @@ function Lt(e, t, n) {
|
|
|
1171
1171
|
}
|
|
1172
1172
|
case $.NUMBER: {
|
|
1173
1173
|
let { onStepUp: e, onStepDown: r } = this.$attrs;
|
|
1174
|
-
n = [d(
|
|
1174
|
+
n = [d(Rt, {
|
|
1175
1175
|
mode: "up",
|
|
1176
1176
|
disabled: this.isDisabled || t.max !== void 0 && t.modelValue === t.max,
|
|
1177
1177
|
label: this.labelStepUp,
|
|
1178
1178
|
onStepUp: e,
|
|
1179
1179
|
onStepDown: r
|
|
1180
|
-
}), d(
|
|
1180
|
+
}), d(Rt, {
|
|
1181
1181
|
mode: "down",
|
|
1182
1182
|
disabled: this.isDisabled || t.min !== void 0 && t.modelValue === t.min,
|
|
1183
1183
|
label: this.labelStepDown,
|
|
@@ -1191,7 +1191,7 @@ function Lt(e, t, n) {
|
|
|
1191
1191
|
}
|
|
1192
1192
|
};
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1194
|
+
function Bt(e, t, n) {
|
|
1195
1195
|
let r = t;
|
|
1196
1196
|
if (Array.isArray(e) && e.length) {
|
|
1197
1197
|
let i = e[0];
|
|
@@ -1203,8 +1203,8 @@ function Rt(e, t, n) {
|
|
|
1203
1203
|
}
|
|
1204
1204
|
return r;
|
|
1205
1205
|
}
|
|
1206
|
-
function
|
|
1207
|
-
let r =
|
|
1206
|
+
function Vt(e, t, n) {
|
|
1207
|
+
let r = Mt(), i = b(() => {
|
|
1208
1208
|
if (r?.defaults.value?.[e]) return r.defaults.value[e];
|
|
1209
1209
|
});
|
|
1210
1210
|
return b(() => {
|
|
@@ -1212,54 +1212,71 @@ function zt(e, t, n) {
|
|
|
1212
1212
|
let e = i.value, r = t, a = n;
|
|
1213
1213
|
return Object.keys(r).reduce((t, n) => {
|
|
1214
1214
|
let i = a[n];
|
|
1215
|
-
return t[n] = n in e ?
|
|
1215
|
+
return t[n] = n in e ? Bt(r[n], i, e[n]) : i, t;
|
|
1216
1216
|
}, {});
|
|
1217
1217
|
});
|
|
1218
1218
|
}
|
|
1219
|
-
function
|
|
1220
|
-
let a
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
set: (e) => {
|
|
1224
|
-
a && clearTimeout(a), a = setTimeout(() => {
|
|
1225
|
-
t("update:modelValue", i(e));
|
|
1226
|
-
}, n);
|
|
1227
|
-
}
|
|
1219
|
+
function Ht(e, t, n = 0, { getter: r = (e) => e, setter: i = (e) => e } = {}) {
|
|
1220
|
+
let a, o, s = b(() => {
|
|
1221
|
+
let e = ae(n) ?? 0, t = typeof e == "string" ? Number.parseInt(e) : e;
|
|
1222
|
+
return Number.isNaN(t) ? 0 : t;
|
|
1228
1223
|
});
|
|
1224
|
+
function c() {
|
|
1225
|
+
a &&= (clearTimeout(a), void 0), o = void 0;
|
|
1226
|
+
}
|
|
1227
|
+
function l() {
|
|
1228
|
+
if (!o) return;
|
|
1229
|
+
let e = i(o.value);
|
|
1230
|
+
return c(), t("update:modelValue", e), e;
|
|
1231
|
+
}
|
|
1232
|
+
return oe(c), {
|
|
1233
|
+
model: b({
|
|
1234
|
+
get: () => r(e?.value),
|
|
1235
|
+
set: (e) => {
|
|
1236
|
+
if (s.value <= 0) {
|
|
1237
|
+
c(), t("update:modelValue", i(e));
|
|
1238
|
+
return;
|
|
1239
|
+
}
|
|
1240
|
+
o = { value: e }, a && clearTimeout(a), a = setTimeout(l, s.value);
|
|
1241
|
+
}
|
|
1242
|
+
}),
|
|
1243
|
+
flush: l,
|
|
1244
|
+
cancel: c
|
|
1245
|
+
};
|
|
1229
1246
|
}
|
|
1230
|
-
function
|
|
1247
|
+
function Ut(e, t) {
|
|
1231
1248
|
let { focused: n } = A(e);
|
|
1232
1249
|
return p(n, (n) => {
|
|
1233
|
-
t(n ? "focus" : "blur",
|
|
1250
|
+
t(n ? "focus" : "blur", T(e));
|
|
1234
1251
|
}), { focused: n };
|
|
1235
1252
|
}
|
|
1236
|
-
function
|
|
1237
|
-
let n = b(() => (
|
|
1253
|
+
function Wt(e, t) {
|
|
1254
|
+
let n = b(() => (T(e) ?? "").length), r = b(() => t?.lowerLimit !== void 0 && n.value < t?.lowerLimit ? n.value - t.lowerLimit : t?.upperLimit === void 0 ? 0 : t.upperLimit - n.value);
|
|
1238
1255
|
return {
|
|
1239
1256
|
length: n,
|
|
1240
1257
|
gap: r,
|
|
1241
1258
|
formatted: b(() => t?.mode === !1 ? "" : t?.mode === "limit" && t?.upperLimit ? `${n.value} / ${t.lowerLimit ? `${t.lowerLimit}-` : ""}${t.upperLimit}` : t?.mode === "countdown" ? r.value === 0 ? void 0 : r.value : n.value)
|
|
1242
1259
|
};
|
|
1243
1260
|
}
|
|
1244
|
-
function
|
|
1245
|
-
let r =
|
|
1261
|
+
function Gt(e, t = H.local, n) {
|
|
1262
|
+
let r = C();
|
|
1246
1263
|
n && (r.value = n);
|
|
1247
1264
|
let i;
|
|
1248
1265
|
return l(() => {
|
|
1249
1266
|
e && p(e, (e, n) => {
|
|
1250
|
-
let a =
|
|
1267
|
+
let a = T(t) === H.session ? sessionStorage : localStorage;
|
|
1251
1268
|
if (n && n !== e && a.removeItem(n), e) {
|
|
1252
|
-
i =
|
|
1269
|
+
i = j(e, i?.value ?? r.value, a), i.value && (r.value = i.value);
|
|
1253
1270
|
return;
|
|
1254
1271
|
}
|
|
1255
1272
|
i = void 0;
|
|
1256
|
-
}, { immediate: !0 }),
|
|
1273
|
+
}, { immediate: !0 }), S(t) && p(t, (t, n) => {
|
|
1257
1274
|
if (e?.value) {
|
|
1258
1275
|
if (t) {
|
|
1259
|
-
let n = t ===
|
|
1260
|
-
i =
|
|
1276
|
+
let n = t === H.session ? sessionStorage : localStorage;
|
|
1277
|
+
i = j(e.value, i?.value ?? r.value, n);
|
|
1261
1278
|
}
|
|
1262
|
-
n && n !== t && (n ===
|
|
1279
|
+
n && n !== t && (n === H.session ? sessionStorage : localStorage).removeItem(e.value);
|
|
1263
1280
|
}
|
|
1264
1281
|
});
|
|
1265
1282
|
}), p(r, (e) => {
|
|
@@ -1269,28 +1286,28 @@ function Ut(e, t = V.local, n) {
|
|
|
1269
1286
|
immediate: !0
|
|
1270
1287
|
}), r;
|
|
1271
1288
|
}
|
|
1272
|
-
var
|
|
1289
|
+
var Kt = ["for"], qt = {
|
|
1273
1290
|
key: 0,
|
|
1274
1291
|
class: "vv-input-text__input-before"
|
|
1275
|
-
},
|
|
1292
|
+
}, Jt = ["id"], Yt = {
|
|
1276
1293
|
key: 1,
|
|
1277
1294
|
class: "vv-input-text__unit"
|
|
1278
|
-
},
|
|
1295
|
+
}, Xt = {
|
|
1279
1296
|
key: 5,
|
|
1280
1297
|
class: "vv-input-text__input-after"
|
|
1281
|
-
},
|
|
1298
|
+
}, Zt = {
|
|
1282
1299
|
key: 6,
|
|
1283
1300
|
class: "vv-input-text__limit"
|
|
1284
|
-
},
|
|
1301
|
+
}, Qt = { class: "flex-1" }, $t = ["title", "onClick"], en = /* @__PURE__ */ h({
|
|
1285
1302
|
name: "VvInputText",
|
|
1286
|
-
props:
|
|
1287
|
-
emits:
|
|
1303
|
+
props: Pt,
|
|
1304
|
+
emits: Nt,
|
|
1288
1305
|
setup(e, { expose: t, emit: i }) {
|
|
1289
|
-
let a = e, c = i, u = ne(), d =
|
|
1290
|
-
let e = typeof
|
|
1306
|
+
let a = e, c = i, u = ne(), d = Mt(), h = Vt("VvInputText", Pt, a), { count: te, debounce: ie, icon: ae, iconPosition: oe, iconRemoveSuggestion: se, id: ce, invalid: x, label: S, labelRemoveSuggestion: le, loading: de, maxlength: pe, minlength: me, modelValue: O, step: k, storageType: _e, type: A, unit: ve, valid: ye } = ge(a), be = xt(ce), xe = b(() => `${be.value}-hint`), Se = b(() => a.floating && z(a.placeholder) ? " " : a.placeholder), { model: j, flush: Ce } = Ht(O, c, ie), Te = b(() => {
|
|
1307
|
+
let e = typeof k.value == "number" ? k.value : Number.parseInt(k.value);
|
|
1291
1308
|
return !Number.isNaN(e) && e % 60 != 0;
|
|
1292
|
-
}),
|
|
1293
|
-
if (!a.iMask) return { mask:
|
|
1309
|
+
}), Ee = /^-0?[.,]?[0*]?$/, De = /./, Oe = /^-$|^$/, ke = C(!1), M = C(), N = C(), { el: Ae, mask: je, typed: P, masked: F, unmasked: R } = Me(b(() => {
|
|
1310
|
+
if (!a.iMask) return { mask: De };
|
|
1294
1311
|
if (a.iMask.mask === Number) {
|
|
1295
1312
|
let e = { ...a.iMask };
|
|
1296
1313
|
return a.min && (e.min = Number(a.min)), a.max && (e.max = Number(a.max)), e;
|
|
@@ -1299,208 +1316,210 @@ var Wt = ["for"], Gt = {
|
|
|
1299
1316
|
}), {
|
|
1300
1317
|
emit: c,
|
|
1301
1318
|
onAccept: () => {
|
|
1302
|
-
if (
|
|
1303
|
-
if (c("update:masked",
|
|
1304
|
-
|
|
1319
|
+
if (ke.value) {
|
|
1320
|
+
if (c("update:masked", F.value), A.value === $.NUMBER) {
|
|
1321
|
+
Ne();
|
|
1305
1322
|
return;
|
|
1306
1323
|
}
|
|
1307
|
-
if (
|
|
1308
|
-
|
|
1324
|
+
if (A.value === $.DATETIME_LOCAL || A.value === $.DATE || A.value === $.TIME || A.value === $.MONTH) {
|
|
1325
|
+
Fe();
|
|
1309
1326
|
return;
|
|
1310
1327
|
}
|
|
1311
|
-
!
|
|
1328
|
+
!j.value && !R.value || (j.value = R.value);
|
|
1312
1329
|
}
|
|
1313
1330
|
}
|
|
1314
1331
|
});
|
|
1315
|
-
function
|
|
1316
|
-
if (
|
|
1317
|
-
if (
|
|
1318
|
-
|
|
1332
|
+
function Ne() {
|
|
1333
|
+
if (Oe.test(R.value)) {
|
|
1334
|
+
if (j.value === null || j.value === void 0) return;
|
|
1335
|
+
j.value = void 0;
|
|
1319
1336
|
return;
|
|
1320
1337
|
}
|
|
1321
|
-
if (
|
|
1322
|
-
|
|
1338
|
+
if (Ee.test(R.value)) {
|
|
1339
|
+
j.value = 0;
|
|
1323
1340
|
return;
|
|
1324
1341
|
}
|
|
1325
|
-
if (typeof
|
|
1326
|
-
|
|
1342
|
+
if (typeof P.value != "number") {
|
|
1343
|
+
j.value = Number(P.value);
|
|
1327
1344
|
return;
|
|
1328
1345
|
}
|
|
1329
|
-
|
|
1346
|
+
j.value = P.value;
|
|
1330
1347
|
}
|
|
1331
|
-
function
|
|
1332
|
-
let t = new Date(
|
|
1333
|
-
if ((
|
|
1334
|
-
if (
|
|
1335
|
-
|
|
1348
|
+
function Pe(e) {
|
|
1349
|
+
let t = new Date(M.value || N.value);
|
|
1350
|
+
if ((A.value === $.DATETIME_LOCAL || A.value === $.DATE || A.value === $.MONTH) && (t.setFullYear(e.getFullYear()), t.setMonth(e.getMonth())), (A.value === $.DATETIME_LOCAL || A.value === $.DATE) && t.setDate(e.getDate()), (A.value === $.DATETIME_LOCAL || A.value === $.TIME) && (t.setHours(e.getHours()), t.setMinutes(e.getMinutes()), t.setSeconds(e.getSeconds())), M.value instanceof Date) {
|
|
1351
|
+
if (j.value?.getTime() === t.getTime()) return;
|
|
1352
|
+
j.value = t;
|
|
1336
1353
|
return;
|
|
1337
1354
|
}
|
|
1338
|
-
|
|
1355
|
+
j.value = t.toISOString();
|
|
1339
1356
|
}
|
|
1340
|
-
function
|
|
1341
|
-
let e =
|
|
1342
|
-
if (!
|
|
1343
|
-
if (!
|
|
1344
|
-
if (
|
|
1345
|
-
|
|
1357
|
+
function Fe() {
|
|
1358
|
+
let e = A.value;
|
|
1359
|
+
if (!P.value) {
|
|
1360
|
+
if (!j.value) return;
|
|
1361
|
+
if (M.value) {
|
|
1362
|
+
j.value = void 0;
|
|
1346
1363
|
return;
|
|
1347
1364
|
}
|
|
1348
|
-
|
|
1365
|
+
j.value = "";
|
|
1349
1366
|
return;
|
|
1350
1367
|
}
|
|
1351
|
-
if (!(
|
|
1352
|
-
|
|
1368
|
+
if (!(P.value instanceof Date) && !M.value && !N.value) {
|
|
1369
|
+
j.value = P.value;
|
|
1353
1370
|
return;
|
|
1354
1371
|
}
|
|
1355
|
-
let t =
|
|
1356
|
-
if (t instanceof Date || (t =
|
|
1357
|
-
|
|
1372
|
+
let t = P.value;
|
|
1373
|
+
if (t instanceof Date || (t = Ie(P.value, e)), M.value || N.value) {
|
|
1374
|
+
Pe(t);
|
|
1358
1375
|
return;
|
|
1359
1376
|
}
|
|
1360
|
-
|
|
1377
|
+
j.value = L(t, e, Te.value);
|
|
1361
1378
|
}
|
|
1362
|
-
function
|
|
1379
|
+
function Le(e) {
|
|
1363
1380
|
if (e == null) {
|
|
1364
|
-
|
|
1381
|
+
P.value = "", R.value = "";
|
|
1365
1382
|
return;
|
|
1366
1383
|
}
|
|
1367
1384
|
if (a.iMask?.mask === Date) {
|
|
1368
|
-
|
|
1385
|
+
P.value = e instanceof Date ? e : new Date(e);
|
|
1369
1386
|
return;
|
|
1370
1387
|
}
|
|
1371
|
-
if (!(
|
|
1372
|
-
if (
|
|
1373
|
-
if (e instanceof Date ||
|
|
1374
|
-
if (e instanceof Date ? (
|
|
1375
|
-
let t = new Date(e), n =
|
|
1376
|
-
|
|
1388
|
+
if (!(A.value === $.NUMBER && Ee.test(R.value) && e === 0)) {
|
|
1389
|
+
if (ut.value) {
|
|
1390
|
+
if (e instanceof Date || I(e)) {
|
|
1391
|
+
if (e instanceof Date ? (M.value = e, N.value = void 0) : (N.value = e, M.value = void 0), A.value !== $.WEEK) {
|
|
1392
|
+
let t = new Date(e), n = A.value;
|
|
1393
|
+
P.value = L(t, n, Te.value), R.value = P.value;
|
|
1377
1394
|
}
|
|
1378
1395
|
return;
|
|
1379
1396
|
}
|
|
1380
|
-
|
|
1397
|
+
M.value = void 0, N.value = void 0;
|
|
1381
1398
|
}
|
|
1382
|
-
|
|
1399
|
+
P.value = e, R.value = `${P.value}`;
|
|
1383
1400
|
}
|
|
1384
1401
|
}
|
|
1385
1402
|
l(() => {
|
|
1386
|
-
|
|
1403
|
+
je.value && (ke.value = !0, Le(a.modelValue));
|
|
1387
1404
|
}), p(() => a.modelValue, (e) => {
|
|
1388
|
-
|
|
1405
|
+
je.value && Le(e);
|
|
1389
1406
|
}), p(() => a.masked, (e) => {
|
|
1390
|
-
|
|
1407
|
+
F.value = e ?? "";
|
|
1391
1408
|
});
|
|
1392
|
-
let
|
|
1409
|
+
let B = Ae, H = C(), Re = C(), U = C();
|
|
1393
1410
|
t({
|
|
1394
|
-
$input:
|
|
1395
|
-
$inner:
|
|
1396
|
-
$wrapper:
|
|
1411
|
+
$input: B,
|
|
1412
|
+
$inner: H,
|
|
1413
|
+
$wrapper: Re,
|
|
1414
|
+
flush: Ce
|
|
1397
1415
|
});
|
|
1398
|
-
let { focused: W } =
|
|
1416
|
+
let { focused: W } = Ut(B, c), G = b(() => W.value && !a.disabled && !a.readonly);
|
|
1399
1417
|
function ze(e) {
|
|
1400
|
-
e ? Be() :
|
|
1418
|
+
e ? Be() : Ve();
|
|
1401
1419
|
}
|
|
1402
1420
|
function Be() {
|
|
1403
|
-
h.value.selectOnFocus &&
|
|
1421
|
+
h.value.selectOnFocus && B.value && B.value.select(), Z.value.size && U.value?.show();
|
|
1404
1422
|
}
|
|
1405
|
-
function
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1423
|
+
function Ve() {
|
|
1424
|
+
let e = Ce() ?? j.value;
|
|
1425
|
+
if (!X.value || z(e)) return;
|
|
1426
|
+
let t = a.maxSuggestions;
|
|
1427
|
+
X.value.size >= t && !X.value.has(e) && (X.value = new Set([...X.value].slice(X.value.size - t + 1))), X.value.add(e);
|
|
1409
1428
|
}
|
|
1410
|
-
p(
|
|
1429
|
+
p(G, ze), p(we(B), (e) => {
|
|
1411
1430
|
e && a.autofocus && !a.disabled && !a.readonly && (W.value = !0);
|
|
1412
1431
|
});
|
|
1413
|
-
let
|
|
1432
|
+
let K = C(!1), He = b(() => a.type === $.PASSWORD);
|
|
1414
1433
|
function Ue() {
|
|
1415
|
-
|
|
1434
|
+
K.value = !K.value;
|
|
1416
1435
|
}
|
|
1417
|
-
let We = b(() =>
|
|
1436
|
+
let We = b(() => ut.value), Ge = b(() => a.type === $.NUMBER);
|
|
1418
1437
|
function Ke() {
|
|
1419
|
-
if (!
|
|
1438
|
+
if (!Y.value) {
|
|
1420
1439
|
if (a.iMask) {
|
|
1421
|
-
|
|
1440
|
+
P.value = Number(P.value) + Number(k?.value ?? 1);
|
|
1422
1441
|
return;
|
|
1423
1442
|
}
|
|
1424
|
-
|
|
1443
|
+
B.value.stepUp(), j.value = Number(B.value.value);
|
|
1425
1444
|
}
|
|
1426
1445
|
}
|
|
1427
1446
|
function qe() {
|
|
1428
|
-
if (!
|
|
1447
|
+
if (!Y.value) {
|
|
1429
1448
|
if (a.iMask) {
|
|
1430
|
-
|
|
1449
|
+
P.value = Number(P.value) - Number(k?.value ?? 1);
|
|
1431
1450
|
return;
|
|
1432
1451
|
}
|
|
1433
|
-
|
|
1452
|
+
B.value.stepDown(), j.value = Number(B.value.value);
|
|
1434
1453
|
}
|
|
1435
1454
|
}
|
|
1436
1455
|
let Je = b(() => a.type === $.SEARCH);
|
|
1437
1456
|
function Ye() {
|
|
1438
|
-
|
|
1457
|
+
j.value = "", c("clear");
|
|
1439
1458
|
}
|
|
1440
|
-
let { hasIconBefore: Xe, hasIconAfter:
|
|
1441
|
-
if (
|
|
1459
|
+
let { hasIconBefore: Xe, hasIconAfter: Ze } = Ft(ae, oe), J = b(() => {
|
|
1460
|
+
if (Ze.value !== void 0) return Ze.value;
|
|
1442
1461
|
switch (a.type) {
|
|
1443
|
-
case $.COLOR: return { name:
|
|
1462
|
+
case $.COLOR: return { name: q.showColorPicker };
|
|
1444
1463
|
case $.DATE:
|
|
1445
1464
|
case $.DATETIME_LOCAL:
|
|
1446
1465
|
case $.WEEK:
|
|
1447
|
-
case $.MONTH: return { name:
|
|
1448
|
-
case $.TIME: return { name:
|
|
1466
|
+
case $.MONTH: return { name: q.showDatePicker };
|
|
1467
|
+
case $.TIME: return { name: q.showTimePicker };
|
|
1449
1468
|
}
|
|
1450
|
-
}), { hasIcon: Qe } =
|
|
1469
|
+
}), { hasIcon: Qe } = Ft(se), { formatted: $e } = Wt(j, {
|
|
1451
1470
|
mode: te.value,
|
|
1452
|
-
upperLimit: Number(
|
|
1453
|
-
lowerLimit: Number(
|
|
1454
|
-
}),
|
|
1455
|
-
if (
|
|
1456
|
-
if (
|
|
1457
|
-
}), X =
|
|
1471
|
+
upperLimit: Number(pe?.value),
|
|
1472
|
+
lowerLimit: Number(me?.value)
|
|
1473
|
+
}), Y = b(() => a.disabled || a.readonly), et = b(() => Y.value ? -1 : a.tabindex), tt = b(() => !z(O?.value)), nt = b(() => {
|
|
1474
|
+
if (x.value === !0) return !0;
|
|
1475
|
+
if (ye.value === !0) return !1;
|
|
1476
|
+
}), X = Gt(b(() => a.storageKey ?? (d?.experimentalFeatures.forceInputSuggestions ? a.name : void 0)), _e, /* @__PURE__ */ new Set()), Z = b(() => {
|
|
1458
1477
|
let e = /* @__PURE__ */ new Map();
|
|
1459
1478
|
if (X.value) for (let t of X.value) e.set(t, { isFromStorage: !0 });
|
|
1460
1479
|
if (a.suggestions) for (let t of a.suggestions) e.set(t, { isFromStorage: !1 });
|
|
1461
1480
|
return e;
|
|
1462
|
-
}),
|
|
1463
|
-
function it(e) {
|
|
1464
|
-
M.value = e, U.value?.hide(), c("suggestion:selected", e);
|
|
1465
|
-
}
|
|
1481
|
+
}), rt = b(() => Z.value.size === 0 ? [] : [...Z.value.entries()].filter(([e]) => z(j.value) || `${e}`.toLowerCase().includes(`${j.value}`.toLowerCase()) && e !== j.value).reverse().map(([e]) => e)), it = b(() => Z.value.size > 0);
|
|
1466
1482
|
function at(e) {
|
|
1483
|
+
j.value = e, U.value?.hide(), c("suggestion:selected", e);
|
|
1484
|
+
}
|
|
1485
|
+
function ot(e) {
|
|
1467
1486
|
Z.value.get(e)?.isFromStorage && (X.value?.delete(e), c("suggestion:removed", e));
|
|
1468
1487
|
}
|
|
1469
|
-
let { modifiers:
|
|
1470
|
-
valid:
|
|
1471
|
-
invalid:
|
|
1488
|
+
let { modifiers: st } = ge(a), ct = Tt("vv-input-text", st, b(() => ({
|
|
1489
|
+
valid: ye.value,
|
|
1490
|
+
invalid: x.value,
|
|
1472
1491
|
loading: de.value,
|
|
1473
1492
|
disabled: a.disabled,
|
|
1474
1493
|
required: a.required,
|
|
1475
1494
|
readonly: a.readonly,
|
|
1476
1495
|
"icon-before": !!Xe.value,
|
|
1477
|
-
"icon-after": !!
|
|
1478
|
-
floating: a.floating && !
|
|
1479
|
-
dirty:
|
|
1480
|
-
focus:
|
|
1496
|
+
"icon-after": !!J.value,
|
|
1497
|
+
floating: a.floating && !z(a.label),
|
|
1498
|
+
dirty: tt.value,
|
|
1499
|
+
focus: G.value && !Y.value,
|
|
1481
1500
|
"auto-width": a.autoWidth
|
|
1482
|
-
}))),
|
|
1501
|
+
}))), lt = b(() => [
|
|
1483
1502
|
$.TEXT,
|
|
1484
1503
|
$.SEARCH,
|
|
1485
1504
|
$.URL,
|
|
1486
1505
|
$.TEL,
|
|
1487
1506
|
$.EMAIL,
|
|
1488
1507
|
$.PASSWORD
|
|
1489
|
-
].includes(
|
|
1508
|
+
].includes(A.value)), ut = b(() => [
|
|
1490
1509
|
$.DATE,
|
|
1491
1510
|
$.MONTH,
|
|
1492
1511
|
$.WEEK,
|
|
1493
1512
|
$.TIME,
|
|
1494
1513
|
$.DATETIME_LOCAL
|
|
1495
|
-
].includes(
|
|
1514
|
+
].includes(A.value)), dt = b(() => [
|
|
1496
1515
|
$.TEXT,
|
|
1497
1516
|
$.SEARCH,
|
|
1498
1517
|
$.URL,
|
|
1499
1518
|
$.TEL,
|
|
1500
1519
|
$.EMAIL,
|
|
1501
1520
|
$.PASSWORD
|
|
1502
|
-
].includes(
|
|
1503
|
-
let e = He.value &&
|
|
1521
|
+
].includes(A.value)), ft = b(() => {
|
|
1522
|
+
let e = He.value && K.value || We.value && !tt.value && !W.value || a.iMask ? $.TEXT : a.type, t = {
|
|
1504
1523
|
type: e,
|
|
1505
1524
|
name: a.name,
|
|
1506
1525
|
tabindex: et.value,
|
|
@@ -1508,17 +1527,17 @@ var Wt = ["for"], Gt = {
|
|
|
1508
1527
|
readonly: a.readonly,
|
|
1509
1528
|
required: a.required,
|
|
1510
1529
|
autocomplete: a.autocomplete,
|
|
1511
|
-
"aria-invalid":
|
|
1512
|
-
"aria-describedby":
|
|
1513
|
-
"aria-errormessage":
|
|
1530
|
+
"aria-invalid": nt.value,
|
|
1531
|
+
"aria-describedby": ht.value ? xe.value : void 0,
|
|
1532
|
+
"aria-errormessage": gt.value ? xe.value : void 0,
|
|
1514
1533
|
inputMode: a.inputMode
|
|
1515
1534
|
};
|
|
1516
|
-
if (
|
|
1535
|
+
if (ut.value || e === $.NUMBER) {
|
|
1517
1536
|
let n = a.max;
|
|
1518
1537
|
e === $.DATE && !n && (n = "9999-12-31"), t.step = a.step, t.max = n === void 0 ? void 0 : String(n), t.min = a.min === void 0 ? void 0 : String(a.min);
|
|
1519
1538
|
}
|
|
1520
|
-
return (
|
|
1521
|
-
}),
|
|
1539
|
+
return (lt.value || e === $.TEXT || e === $.NUMBER) && (t.placeholder = Se.value), dt.value && (t.minlength = a.minlength, t.maxlength = a.maxlength, t.pattern = a.pattern), e === $.EMAIL && (t.multiple = a.multiple), t;
|
|
1540
|
+
}), pt = b(() => ({
|
|
1522
1541
|
valid: a.valid,
|
|
1523
1542
|
invalid: a.invalid,
|
|
1524
1543
|
modelValue: a.modelValue,
|
|
@@ -1526,12 +1545,12 @@ var Wt = ["for"], Gt = {
|
|
|
1526
1545
|
stepUp: Ke,
|
|
1527
1546
|
stepDown: qe,
|
|
1528
1547
|
clear: Ye
|
|
1529
|
-
})), { HintSlot:
|
|
1530
|
-
function
|
|
1531
|
-
|
|
1548
|
+
})), { HintSlot: mt, hasHintLabelOrSlot: ht, hasInvalidLabelOrSlot: gt, hintSlotScope: _t } = V(h, u), vt = zt($.PASSWORD, a, tt), yt = zt($.NUMBER, a, tt), bt = zt($.SEARCH, a, tt);
|
|
1549
|
+
function St() {
|
|
1550
|
+
Y.value || (W.value = !0);
|
|
1532
1551
|
}
|
|
1533
|
-
let
|
|
1534
|
-
if (a.autoWidth) return { width:
|
|
1552
|
+
let Ct = b(() => {
|
|
1553
|
+
if (a.autoWidth) return { width: j.value === void 0 ? void 0 : `${String(j.value).length + 1}ch` };
|
|
1535
1554
|
});
|
|
1536
1555
|
function wt(e) {
|
|
1537
1556
|
switch (e.code) {
|
|
@@ -1541,107 +1560,111 @@ var Wt = ["for"], Gt = {
|
|
|
1541
1560
|
case "ArrowDown":
|
|
1542
1561
|
Ge.value && (qe(), e.preventDefault());
|
|
1543
1562
|
break;
|
|
1563
|
+
case "Enter":
|
|
1564
|
+
case "NumpadEnter":
|
|
1565
|
+
Ce();
|
|
1566
|
+
break;
|
|
1544
1567
|
}
|
|
1545
1568
|
c("keydown", e);
|
|
1546
1569
|
}
|
|
1547
|
-
return (e, t) => (
|
|
1548
|
-
|
|
1570
|
+
return (e, t) => (D(), _("div", { class: s(T(ct)) }, [
|
|
1571
|
+
T(S) ? (D(), _("label", {
|
|
1549
1572
|
key: 0,
|
|
1550
|
-
for:
|
|
1573
|
+
for: T(be),
|
|
1551
1574
|
class: "vv-input-text__label"
|
|
1552
|
-
},
|
|
1553
|
-
|
|
1575
|
+
}, fe(T(S)), 9, Kt)) : E("v-if", !0),
|
|
1576
|
+
re("div", {
|
|
1554
1577
|
ref_key: "wrapperEl",
|
|
1555
|
-
ref:
|
|
1578
|
+
ref: Re,
|
|
1556
1579
|
class: "vv-input-text__wrapper"
|
|
1557
1580
|
}, [
|
|
1558
|
-
e.$slots.before ? (
|
|
1559
|
-
|
|
1581
|
+
e.$slots.before ? (D(), _("div", qt, [o(e.$slots, "before", g(r(T(pt))))])) : E("v-if", !0),
|
|
1582
|
+
re("div", {
|
|
1560
1583
|
ref_key: "innerEl",
|
|
1561
|
-
ref:
|
|
1584
|
+
ref: H,
|
|
1562
1585
|
class: "vv-input-text__inner",
|
|
1563
|
-
onClick:
|
|
1586
|
+
onClick: y(St, ["stop"])
|
|
1564
1587
|
}, [
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
id:
|
|
1588
|
+
T(Xe) ? (D(), w(Q, f({ key: 0 }, T(Xe), { class: "vv-input-text__icon" }), null, 16)) : E("v-if", !0),
|
|
1589
|
+
re("input", f({
|
|
1590
|
+
id: T(be),
|
|
1568
1591
|
ref_key: "inputEl",
|
|
1569
|
-
ref:
|
|
1570
|
-
},
|
|
1571
|
-
style:
|
|
1592
|
+
ref: B
|
|
1593
|
+
}, T(ft), {
|
|
1594
|
+
style: T(Ct),
|
|
1572
1595
|
onKeyup: t[0] ||= (e) => c("keyup", e),
|
|
1573
1596
|
onKeydown: wt,
|
|
1574
1597
|
onKeypress: t[1] ||= (e) => c("keypress", e)
|
|
1575
|
-
}), null, 16,
|
|
1576
|
-
(
|
|
1598
|
+
}), null, 16, Jt),
|
|
1599
|
+
(T(ve) || e.$slots.unit) && T(tt) ? (D(), _("div", Yt, [o(e.$slots, "unit", g(r(T(pt))), () => [m(fe(T(ve)), 1)])])) : E("v-if", !0)
|
|
1577
1600
|
], 512),
|
|
1578
|
-
|
|
1601
|
+
T(J) ? (D(), w(Q, f({ key: 1 }, T(J), { class: "vv-input-text__icon vv-input-text__icon-after" }), null, 16)) : T(He) && !e.hideActions && !T(Y) ? (D(), w(T(vt), {
|
|
1579
1602
|
key: 2,
|
|
1580
1603
|
onTogglePassword: Ue
|
|
1581
|
-
})) :
|
|
1604
|
+
})) : T(Ge) && !e.hideActions && !T(Y) ? (D(), w(T(yt), {
|
|
1582
1605
|
key: 3,
|
|
1583
1606
|
onStepUp: Ke,
|
|
1584
1607
|
onStepDown: qe
|
|
1585
|
-
})) :
|
|
1608
|
+
})) : T(Je) && !e.hideActions && !T(Y) ? (D(), w(T(bt), {
|
|
1586
1609
|
key: 4,
|
|
1587
1610
|
onClear: Ye
|
|
1588
|
-
})) :
|
|
1589
|
-
e.$slots.after ? (
|
|
1590
|
-
|
|
1611
|
+
})) : E("v-if", !0),
|
|
1612
|
+
e.$slots.after ? (D(), _("div", Xt, [o(e.$slots, "after", g(r(T(pt))))])) : E("v-if", !0),
|
|
1613
|
+
T(te) ? (D(), _("span", Zt, [o(e.$slots, "count", g(r(T(pt))), () => [m(fe(T($e)), 1)])])) : E("v-if", !0)
|
|
1591
1614
|
], 512),
|
|
1592
|
-
n(
|
|
1593
|
-
id:
|
|
1615
|
+
n(T(mt), {
|
|
1616
|
+
id: T(xe),
|
|
1594
1617
|
class: "vv-input-text__hint"
|
|
1595
|
-
},
|
|
1618
|
+
}, he({ _: 2 }, [
|
|
1596
1619
|
e.$slots.hint ? {
|
|
1597
1620
|
name: "hint",
|
|
1598
|
-
fn:
|
|
1621
|
+
fn: v(() => [o(e.$slots, "hint", g(r(T(_t))))]),
|
|
1599
1622
|
key: "0"
|
|
1600
1623
|
} : void 0,
|
|
1601
1624
|
e.$slots.loading ? {
|
|
1602
1625
|
name: "loading",
|
|
1603
|
-
fn:
|
|
1626
|
+
fn: v(() => [o(e.$slots, "loading", g(r(T(_t))))]),
|
|
1604
1627
|
key: "1"
|
|
1605
1628
|
} : void 0,
|
|
1606
1629
|
e.$slots.valid ? {
|
|
1607
1630
|
name: "valid",
|
|
1608
|
-
fn:
|
|
1631
|
+
fn: v(() => [o(e.$slots, "valid", g(r(T(_t))))]),
|
|
1609
1632
|
key: "2"
|
|
1610
1633
|
} : void 0,
|
|
1611
1634
|
e.$slots.invalid ? {
|
|
1612
1635
|
name: "invalid",
|
|
1613
|
-
fn:
|
|
1636
|
+
fn: v(() => [o(e.$slots, "invalid", g(r(T(_t))))]),
|
|
1614
1637
|
key: "3"
|
|
1615
1638
|
} : void 0
|
|
1616
1639
|
]), 1032, ["id"]),
|
|
1617
|
-
|
|
1640
|
+
T(it) ? (D(), w(Dt, {
|
|
1618
1641
|
key: 1,
|
|
1619
1642
|
ref_key: "suggestionsDropdownEl",
|
|
1620
1643
|
ref: U,
|
|
1621
|
-
reference:
|
|
1644
|
+
reference: T(Re),
|
|
1622
1645
|
"autofocus-first": !1,
|
|
1623
1646
|
"trigger-width": !0
|
|
1624
1647
|
}, {
|
|
1625
|
-
items:
|
|
1648
|
+
items: v(() => [(D(!0), _(ue, null, ee(T(rt), (t) => (D(), w(jt, {
|
|
1626
1649
|
key: String(t),
|
|
1627
|
-
onClick:
|
|
1650
|
+
onClick: y((e) => at(t), ["stop"])
|
|
1628
1651
|
}, {
|
|
1629
|
-
default:
|
|
1652
|
+
default: v(() => [re("div", Qt, [o(e.$slots, "suggestion", f({ ref_for: !0 }, { value: t }), () => [m(fe(t), 1)])]), T(Z).get(t)?.isFromStorage && T(Qe) ? (D(), _("button", {
|
|
1630
1653
|
key: 0,
|
|
1631
1654
|
type: "button",
|
|
1632
1655
|
tabindex: "-1",
|
|
1633
1656
|
class: "cursor-pointer",
|
|
1634
|
-
title:
|
|
1635
|
-
onClick:
|
|
1636
|
-
}, [n(Q, f({ ref_for: !0 },
|
|
1657
|
+
title: T(le),
|
|
1658
|
+
onClick: y((e) => ot(t), ["stop"])
|
|
1659
|
+
}, [n(Q, f({ ref_for: !0 }, T(Qe)), null, 16)], 8, $t)) : E("v-if", !0)]),
|
|
1637
1660
|
_: 2
|
|
1638
1661
|
}, 1032, ["onClick"]))), 128))]),
|
|
1639
1662
|
_: 3
|
|
1640
|
-
}, 8, ["reference"])) :
|
|
1663
|
+
}, 8, ["reference"])) : E("v-if", !0)
|
|
1641
1664
|
], 2));
|
|
1642
1665
|
}
|
|
1643
1666
|
});
|
|
1644
1667
|
//#endregion
|
|
1645
|
-
export {
|
|
1668
|
+
export { en as default };
|
|
1646
1669
|
|
|
1647
|
-
//# sourceMappingURL=VvInputText.es-
|
|
1670
|
+
//# sourceMappingURL=VvInputText.es-D8nXroKO.js.map
|