@wssto2/vue-core 0.13.1 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/README.md +2 -2
- package/bin/architecture/engine.mjs +11 -1
- package/bin/architecture/rules.mjs +95 -0
- package/bin/commands/check-architecture.mjs +8 -1
- package/bin/config.mjs +2 -0
- package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-DEzXovsY.js → AccessGate.vue_vue_type_script_setup_true_lang-BH3f0hda.js} +1 -1
- package/dist/{Activity-ChfxdvXf.js → Activity-MOAIv6s4.js} +5 -5
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-lPj9hPqV.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-Bsv5j5Z8.js} +1 -1
- package/dist/{Changes-BCa43_mO.js → Changes-Bu7D0dhY.js} +2 -2
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-C1GCvyZx.js → CollectionPage.vue_vue_type_script_setup_true_lang-D5HsYIck.js} +6 -6
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-B9r9M5Gt.js → DataTable.vue_vue_type_script_setup_true_lang-J3PhyJAS.js} +1 -1
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-B5UUY1OO.js → DateField.vue_vue_type_script_setup_true_lang-CKKG4JEg.js} +2 -2
- package/dist/{DeadLetters-wFTqhISU.js → DeadLetters-DsujMnLG.js} +5 -5
- package/dist/FormGroup.vue_vue_type_script_setup_true_lang-CTVuhEbW.js +428 -0
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-DvbPEiNQ.js → FormView.vue_vue_type_script_setup_true_lang-Cfvh7rF6.js} +1 -1
- package/dist/{General-jW7u4MjH.js → General-Dswj1oXt.js} +7 -7
- package/dist/IncidentRecord-DcmqpziF.js +522 -0
- package/dist/{IncidentsList-yu0xSMrH.js → IncidentsList-BRNqHZdU.js} +6 -6
- package/dist/{NewRolePage-CQ5UVaHs.js → NewRolePage-dFLznJGH.js} +3 -3
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-YVgf5CP6.js → NumberField.vue_vue_type_script_setup_true_lang-U-_kcnGr.js} +1 -1
- package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-CWCt9_dM.js → PersonAccess.vue_vue_type_script_setup_true_lang-D3yp43o5.js} +4 -4
- package/dist/{ProfilePage-Ca3x3UAH.js → ProfilePage-BnHR3xGB.js} +10 -10
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-Do_ATJwT.js → RecordHeader.vue_vue_type_script_setup_true_lang-SDgLjwEI.js} +1 -1
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-Coz91xht.js → ResourcePage.vue_vue_type_script_setup_true_lang-DRC3h71-.js} +1 -1
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-d_aaeXTT.js → RoleEditor.vue_vue_type_script_setup_true_lang-DNF9wzE9.js} +4 -4
- package/dist/{RolePage-BUj1w1m1.js → RolePage-BtM2rFLm.js} +7 -7
- package/dist/{RolesPage-NKzBUsrM.js → RolesPage-MO1gAfdT.js} +4 -4
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-DfKEhTFv.js → SectionNavigator.vue_vue_type_script_setup_true_lang-TMdsmYAg.js} +2 -2
- package/dist/ServiceAccountDialog.vue_vue_type_script_setup_true_lang-Bo3phlqB.js +127 -0
- package/dist/{ServiceAccountRecord-ClbyeLhL.js → ServiceAccountRecord-C1M-dcju.js} +10 -10
- package/dist/{ServiceAccountsList-B2VDnYxD.js → ServiceAccountsList-zfyS2WJB.js} +6 -6
- package/dist/{Sessions-BjkciyHH.js → Sessions-BYBUSqHI.js} +3 -3
- package/dist/{SettingsPage-Csb14qsx.js → SettingsPage-C9Kp2ddX.js} +9 -9
- package/dist/{SignIn-DPFMv4C7.js → SignIn-HBYLSZ1M.js} +5 -5
- package/dist/{SignInPage-DukoFqkt.js → SignInPage-CEoz3fWE.js} +3 -3
- package/dist/{SignIns-DvdpNkiS.js → SignIns-BAz7V4vy.js} +2 -2
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-DpDXHH7u.js → TimeField.vue_vue_type_script_setup_true_lang-BDlTAMsh.js} +2 -2
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-DlEUKWra.js → Timestamp.vue_vue_type_script_setup_true_lang-jCXYFLtq.js} +1 -1
- package/dist/{UserRecord-B9SeSWQh.js → UserRecord-DkyhGma-.js} +9 -9
- package/dist/{UsersList-CREG8q3l.js → UsersList-CsW-jU0m.js} +4 -4
- package/dist/access/RestrictedPanel.vue.d.ts +20 -0
- package/dist/access/index.d.ts +1 -0
- package/dist/access/index.js +91 -31
- package/dist/app/application.d.ts +2 -2
- package/dist/app/current.d.ts +6 -0
- package/dist/app/index.d.ts +1 -1
- package/dist/app/index.js +17 -16
- package/dist/{application-DomS6sbx.js → application-2gHiwAVy.js} +6 -6
- package/dist/client/client.d.ts +6 -0
- package/dist/client/index.js +1 -1
- package/dist/client-Do8v1I5l.js +193 -0
- package/dist/collection/index.js +6 -6
- package/dist/config/index.d.ts +21 -1
- package/dist/content/StatSummary.vue.d.ts +40 -0
- package/dist/content/index.d.ts +1 -0
- package/dist/content/index.js +245 -176
- package/dist/{contributions-obnyn03x.js → contributions-9CPT-Z5v.js} +1 -1
- package/dist/{current-B0lHKTWr.js → current-CslcEPXp.js} +8 -4
- package/dist/eslint/index.js +2 -2
- package/dist/form/index.js +16 -16
- package/dist/form/useForm.d.ts +1 -1
- package/dist/format/format.d.ts +5 -2
- package/dist/format/index.js +1 -1
- package/dist/format-Cp1h0vsC.js +125 -0
- package/dist/{guards-DGcSfTEh.js → guards-6fJxfUtk.js} +1 -1
- package/dist/{http-DOEfFCDA.js → http-D6qOS6xs.js} +1 -1
- package/dist/i18n/index.d.ts +5 -1
- package/dist/i18n/index.js +21 -20
- package/dist/i18n/serverMessages.d.ts +15 -1
- package/dist/identity/index.js +2 -2
- package/dist/incidents/Occurrences.vue.d.ts +9 -0
- package/dist/incidents/api.d.ts +11 -2
- package/dist/incidents/index.js +1 -1
- package/dist/{index-DZikGJ8L.js → index--AF_DNhE.js} +22 -22
- package/dist/{index-D_yyd4C2.js → index-DYva-K_4.js} +5 -5
- package/dist/{index-Be9Q1PB_.js → index-Dlu-PA4W.js} +104 -98
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/incident/entities.d.ts +19 -0
- package/dist/modules/incident/routes.d.ts +4 -1
- package/dist/{navigation-CctcxT51.js → navigation-DMJ6akat.js} +1 -1
- package/dist/{neighbors-Csfan8Ho.js → neighbors-DrEahe7B.js} +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/onboarding/index.js +1 -1
- package/dist/page/index.js +3 -3
- package/dist/phone/index.d.ts +1 -1
- package/dist/phone/index.js +154 -142
- package/dist/phone/phone.d.ts +6 -0
- package/dist/platform/index.js +3 -3
- package/dist/{platform-DtISOEt7.js → platform-ORzRR3Tw.js} +1 -1
- package/dist/resource/index.js +2 -2
- package/dist/router/index.js +3 -3
- package/dist/{rowLayout-y1IB_h2r.js → rowLayout-Ohh5ng1u.js} +2 -2
- package/dist/{sections-fkW_IJLc.js → sections-DI_JhgQG.js} +1 -1
- package/dist/serverMessages-Ce8-MK4e.js +30 -0
- package/dist/shell/index.js +4 -4
- package/dist/{state-CXMexi0l.js → state-QDaxntgR.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/testing/index.js +3 -3
- package/dist/{useCommand-Ch_nx1AQ.js → useCommand-BvcU3AlW.js} +1 -1
- package/dist/{useGroupSheet-CPjHydQV.js → useGroupSheet-BGIntPKD.js} +1 -1
- package/dist/{usePreferences-B8LIZp_f.js → usePreferences-BfMXVbSO.js} +1 -1
- package/dist/{useRecordDialog-DdkauXnU.js → useRecordDialog-q_BNXdb7.js} +1 -1
- package/dist/{useResourceForm-Dl6YFYyz.js → useResourceForm-C1S628UI.js} +1 -1
- package/dist/{useTypedEntry-DKs8I1yP.js → useTypedEntry-tttjrClq.js} +1 -1
- package/package.json +2 -2
- package/dist/FormGroup.vue_vue_type_script_setup_true_lang-D6jYfNjW.js +0 -427
- package/dist/IncidentRecord-zTemLz2R.js +0 -404
- package/dist/ServiceAccountDialog.vue_vue_type_script_setup_true_lang-4nbhEpv_.js +0 -127
- package/dist/client-Dg303Pmc.js +0 -193
- package/dist/format-DoKs29bZ.js +0 -118
- package/dist/serverMessages-Ddghrewh.js +0 -25
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type PageMeta, type QueryValue } from "../../client";
|
|
2
|
-
import type { CommentResponse, Created, Incident, Meta } from "./entities";
|
|
2
|
+
import type { CommentResponse, Created, Incident, Meta, OccurrenceResponse } from "./entities";
|
|
3
3
|
export declare const incidentRoutes: {
|
|
4
4
|
readonly index: import("../../client").ApiRoute<Record<string, QueryValue>, Incident[], PageMeta>;
|
|
5
5
|
readonly show: import("../../client").ApiRoute<{
|
|
@@ -8,6 +8,9 @@ export declare const incidentRoutes: {
|
|
|
8
8
|
readonly comments: import("../../client").ApiRoute<{
|
|
9
9
|
incidentID: number;
|
|
10
10
|
}, CommentResponse[], unknown>;
|
|
11
|
+
readonly occurrences: import("../../client").ApiRoute<{
|
|
12
|
+
incidentID: number;
|
|
13
|
+
} & Record<string, QueryValue>, OccurrenceResponse[], PageMeta>;
|
|
11
14
|
readonly report: import("../../client").ApiRoute<{
|
|
12
15
|
title: string;
|
|
13
16
|
description: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed as k } from "vue";
|
|
2
2
|
import { d as y } from "./context-Ch1r4fdN.js";
|
|
3
|
-
import { h as N } from "./platform-
|
|
3
|
+
import { h as N } from "./platform-ORzRR3Tw.js";
|
|
4
4
|
function F(l, a = {}) {
|
|
5
5
|
const i = /* @__PURE__ */ new Map(), o = [];
|
|
6
6
|
for (const e of l) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as j, ref as z, shallowRef as I, watch as F, getCurrentScope as J, onScopeDispose as Q } from "vue";
|
|
2
2
|
import { useRoute as O } from "vue-router";
|
|
3
3
|
import { i as N } from "./error-CD7x0Jrz.js";
|
|
4
|
-
import { L as k, d as B, e as D, o as U, q as V } from "./state-
|
|
4
|
+
import { L as k, d as B, e as D, o as U, q as V } from "./state-QDaxntgR.js";
|
|
5
5
|
function K(l, t, n, g) {
|
|
6
6
|
return typeof t == "string" ? t : { ...t, query: { ...t.query, [n]: D(l, g) } };
|
|
7
7
|
}
|
package/dist/onboarding/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as L, ref as d, computed as x, watch as v, nextTick as H, onBeforeUnmount as O, openBlock as F, createBlock as j, Teleport as q, createVNode as w, Transition as U, withCtx as Y, createElementBlock as G, withKeys as J, withModifiers as Q, normalizeStyle as M, unref as n, createElementVNode as l, normalizeClass as W, toDisplayString as k, renderSlot as X, createTextVNode as Z, createCommentVNode as ee } from "vue";
|
|
2
2
|
import { useI18n as te } from "vue-i18n";
|
|
3
3
|
import { _ as V } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
|
|
4
|
-
import { u as ne } from "../usePreferences-
|
|
4
|
+
import { u as ne } from "../usePreferences-BfMXVbSO.js";
|
|
5
5
|
import { u as oe, a as h } from "../anchored-DpuUwf-9.js";
|
|
6
6
|
const ie = (o) => typeof o == "object" && o !== null && !Array.isArray(o);
|
|
7
7
|
function se(o, e) {
|
package/dist/page/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { _ as W, a as X, b as Y, c as Z, p as ee, u as te, d as ae } from "../AdaptivePageShell.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as W, a as X, b as Y, c as Z, p as ee, u as te, d as ae } from "../AdaptivePageShell.vue_vue_type_script_setup_true_lang-Bsv5j5Z8.js";
|
|
2
2
|
import { _ as se } from "../BottomDock.vue_vue_type_script_setup_true_lang-CjN7xYEr.js";
|
|
3
3
|
import { b as ne, i as re, u as ie } from "../bottomDock-BZEiOPYZ.js";
|
|
4
4
|
import { _ as x } from "../BottomDockPortal.vue_vue_type_script_setup_true_lang-DmwR-2SP.js";
|
|
5
5
|
import { defineComponent as v, openBlock as a, createBlock as b, withCtx as c, createElementVNode as s, normalizeStyle as k, createElementBlock as l, Fragment as y, renderList as B, normalizeClass as d, unref as _, createCommentVNode as p, toDisplayString as f, useModel as S, useId as C, useTemplateRef as P, computed as $, mergeProps as w, createSlots as T, renderSlot as m, mergeModels as D } from "vue";
|
|
6
6
|
import { _ as L } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
|
|
7
|
-
import { _ as ue } from "../RecordHeader.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { _ as ue } from "../RecordHeader.vue_vue_type_script_setup_true_lang-SDgLjwEI.js";
|
|
8
8
|
import { c as pe, i as fe, p as me, a as be, u as ge, b as ve } from "../chrome-nUcmVu8G.js";
|
|
9
9
|
import { s as z, u as I } from "../sectionIndex-BS0ic5W7.js";
|
|
10
10
|
import { p as he, a as xe } from "../sectionIndex-BS0ic5W7.js";
|
|
11
|
-
import { _ as ye } from "../SectionNavigator.vue_vue_type_script_setup_true_lang-
|
|
11
|
+
import { _ as ye } from "../SectionNavigator.vue_vue_type_script_setup_true_lang-TMdsmYAg.js";
|
|
12
12
|
import { a as Se, _ as Ce } from "../SectionList.vue_vue_type_script_setup_true_lang-DR0_NsqC.js";
|
|
13
13
|
import { _ as A } from "../Panel.vue_vue_type_script_setup_true_lang-D_Wg42hu.js";
|
|
14
14
|
const K = ["aria-label"], M = ["aria-label"], N = ["aria-selected", "tabindex", "onClick"], R = { class: "relative" }, E = {
|
package/dist/phone/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as PhoneField } from "./PhoneField.vue";
|
|
2
2
|
export { phoneDefaultsKey } from "./environment";
|
|
3
3
|
export type { PhoneDefaults } from "./environment";
|
|
4
|
-
export { COMMON_COUNTRIES, countryName, dialCode, formatInternational, isValidPhone, phoneCountry, phoneKind, phoneProblem } from "./phone";
|
|
4
|
+
export { COMMON_COUNTRIES, countryName, dialCode, formatInternational, isValidPhone, phoneCountry, phoneKind, phoneProblem, whatsAppLink } from "./phone";
|
|
5
5
|
export type { PhoneCountry, PhoneKind, PhoneProblem } from "./phone";
|
package/dist/phone/index.js
CHANGED
|
@@ -1,62 +1,73 @@
|
|
|
1
|
-
import { defineComponent as fe, useModel as me, useTemplateRef as
|
|
1
|
+
import { defineComponent as fe, useModel as me, useTemplateRef as z, ref as B, computed as g, watch as ne, nextTick as W, openBlock as w, createElementBlock as $, createElementVNode as f, normalizeClass as P, unref as i, createVNode as M, toDisplayString as T, normalizeStyle as xe, Fragment as ee, renderList as le, createCommentVNode as J, withModifiers as we, withDirectives as _e, vModelText as ke, mergeModels as re, inject as Ce, shallowRef as $e, onBeforeUnmount as De, createBlock as Me, mergeProps as Te, createSlots as Se, withCtx as se, createTextVNode as Ne, renderSlot as Ie, mergeDefaults as Pe } from "vue";
|
|
2
2
|
import { useI18n as pe } from "vue-i18n";
|
|
3
|
-
import { u as ve } from "../format-
|
|
3
|
+
import { u as ve } from "../format-Cp1h0vsC.js";
|
|
4
4
|
import { b as Ve } from "../controlSurface-t7OEFESJ.js";
|
|
5
|
-
import { c as ie, a as Oe, e as
|
|
6
|
-
import { _ as
|
|
5
|
+
import { c as ie, a as Oe, e as Le, _ as Re, f as Be, b as Ee } from "../options-B48UiYsG.js";
|
|
6
|
+
import { _ as A } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
|
|
7
7
|
import { _ as ue } from "../CountryFlag.vue_vue_type_script_setup_true_lang-Kry_vPPZ.js";
|
|
8
8
|
import { u as Fe } from "../anchored-DpuUwf-9.js";
|
|
9
|
-
import { AsYouType as
|
|
10
|
-
import
|
|
9
|
+
import { AsYouType as q, validatePhoneNumberLength as ze, parsePhoneNumberFromString as he, getCountries as Ae, getCountryCallingCode as We } from "libphonenumber-js/max";
|
|
10
|
+
import qe from "libphonenumber-js/max/metadata";
|
|
11
11
|
const ce = ["HR", "BA", "SI", "RS"], Ke = 15;
|
|
12
12
|
function ye(t) {
|
|
13
|
-
return
|
|
13
|
+
return qe.country_calling_codes[t]?.[0];
|
|
14
14
|
}
|
|
15
|
-
const
|
|
15
|
+
const E = (t) => We(t), de = (t) => `+${E(t)}`;
|
|
16
|
+
function Dt(t, a) {
|
|
17
|
+
let e = (t ?? "").replace(/\D/g, "");
|
|
18
|
+
if (e.length < 6) return null;
|
|
19
|
+
let n = "";
|
|
20
|
+
try {
|
|
21
|
+
n = E(a.toUpperCase());
|
|
22
|
+
} catch {
|
|
23
|
+
}
|
|
24
|
+
return e.startsWith("00") ? e = e.slice(2) : !(t ?? "").trim().startsWith("+") && n && !e.startsWith(n) && (e = n + e.replace(/^0/, "")), `https://wa.me/${e}`;
|
|
25
|
+
}
|
|
26
|
+
const te = () => Ae();
|
|
16
27
|
function Ue(t, a) {
|
|
17
|
-
const
|
|
18
|
-
return new
|
|
28
|
+
const e = `+${t}`;
|
|
29
|
+
return new q().input(`${e}${a}`).slice(e.length).trim();
|
|
19
30
|
}
|
|
20
|
-
function
|
|
21
|
-
const
|
|
22
|
-
return
|
|
31
|
+
function ae(t, a, e) {
|
|
32
|
+
const n = e.slice(0, Math.max(0, Ke - a.length));
|
|
33
|
+
return n === "" ? { country: t, e164: "", text: "" } : { country: t, e164: `+${a}${n}`, text: Ue(a, n) };
|
|
23
34
|
}
|
|
24
35
|
function oe(t, a) {
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
27
|
-
const l = new
|
|
28
|
-
l.input(
|
|
36
|
+
const e = t.trim().replace(/^00(?=\d)/, "+");
|
|
37
|
+
if (e.startsWith("+")) {
|
|
38
|
+
const l = new q();
|
|
39
|
+
l.input(e);
|
|
29
40
|
const x = l.getCallingCode();
|
|
30
|
-
if (!x) return { country: a, e164: "", text:
|
|
31
|
-
const p = l.getCountry() ?? (
|
|
32
|
-
return
|
|
41
|
+
if (!x) return { country: a, e164: "", text: e.replace(/[^\d+]/g, "") };
|
|
42
|
+
const p = l.getCountry() ?? (E(a) === x ? a : ye(x) ?? a);
|
|
43
|
+
return ae(p, x, l.getNumber()?.nationalNumber ?? "");
|
|
33
44
|
}
|
|
34
|
-
const
|
|
35
|
-
return
|
|
45
|
+
const n = new q(a);
|
|
46
|
+
return n.input(e.replace(/\D/g, "")), ae(a, E(a), n.getNumber()?.nationalNumber ?? "");
|
|
36
47
|
}
|
|
37
48
|
function je(t, a) {
|
|
38
|
-
return
|
|
49
|
+
return ae(a, E(a), t.text.replace(/\D/g, ""));
|
|
39
50
|
}
|
|
40
51
|
function He(t) {
|
|
41
|
-
return t.startsWith("+") ? new
|
|
52
|
+
return t.startsWith("+") ? new q().input(t) : t;
|
|
42
53
|
}
|
|
43
54
|
const Ge = { MOBILE: "mobile", FIXED_LINE: "landline", TOLL_FREE: "toll_free", PREMIUM_RATE: "premium_rate", VOIP: "voip" };
|
|
44
55
|
function Xe(t) {
|
|
45
|
-
const a = t ? he(t) : void 0,
|
|
46
|
-
return
|
|
56
|
+
const a = t ? he(t) : void 0, e = a?.isValid() ? a.getType() : void 0;
|
|
57
|
+
return e ? Ge[e] : void 0;
|
|
47
58
|
}
|
|
48
59
|
function Ye(t) {
|
|
49
|
-
const a = new
|
|
60
|
+
const a = new q();
|
|
50
61
|
a.input(t);
|
|
51
|
-
const
|
|
52
|
-
return a.getCountry() ?? (
|
|
62
|
+
const e = a.getCallingCode();
|
|
63
|
+
return a.getCountry() ?? (e ? ye(e) : void 0);
|
|
53
64
|
}
|
|
54
65
|
function be(t) {
|
|
55
66
|
if (t === "") return null;
|
|
56
|
-
const a = Ye(t),
|
|
57
|
-
return
|
|
67
|
+
const a = Ye(t), e = ze(t);
|
|
68
|
+
return e === "TOO_SHORT" ? { kind: "too_short", country: a } : e === "TOO_LONG" ? { kind: "too_long", country: a } : e !== void 0 ? { kind: "invalid", country: a } : he(t)?.isValid() ? null : { kind: "invalid", country: a };
|
|
58
69
|
}
|
|
59
|
-
const
|
|
70
|
+
const Mt = (t) => be(t) === null;
|
|
60
71
|
function ge(t, a) {
|
|
61
72
|
try {
|
|
62
73
|
return new Intl.DisplayNames([a], { type: "region" }).of(t) ?? t;
|
|
@@ -64,23 +75,23 @@ function ge(t, a) {
|
|
|
64
75
|
return t;
|
|
65
76
|
}
|
|
66
77
|
}
|
|
67
|
-
function Je(t, a,
|
|
68
|
-
const
|
|
69
|
-
if (
|
|
70
|
-
const l =
|
|
71
|
-
return
|
|
78
|
+
function Je(t, a, e) {
|
|
79
|
+
const n = ie(t.trim());
|
|
80
|
+
if (n === "") return e;
|
|
81
|
+
const l = n.replace(/\D/g, ""), x = new Intl.DisplayNames([a], { type: "region" }), p = (h) => ie(x.of(h) ?? h), _ = n.startsWith("+") || /^\d+$/.test(n);
|
|
82
|
+
return e.filter((h) => _ ? E(h).startsWith(l) : p(h).includes(n) || h.toLowerCase() === n);
|
|
72
83
|
}
|
|
73
84
|
const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tabular-nums" }, et = ["id", "aria-label"], tt = {
|
|
74
85
|
key: 0,
|
|
75
86
|
role: "presentation",
|
|
76
87
|
class: "px-2 pb-1 pt-1.5 text-caption font-semibold uppercase text-content-disabled"
|
|
77
|
-
}, ot = ["id", "aria-selected", "data-country", "onMouseenter", "onClick"], nt = { class: "shrink-0 tabular-nums text-content-muted" },
|
|
88
|
+
}, ot = ["id", "aria-selected", "data-country", "onMouseenter", "onClick"], nt = { class: "shrink-0 tabular-nums text-content-muted" }, rt = {
|
|
78
89
|
key: 0,
|
|
79
90
|
class: "px-3 py-2 text-footnote text-content-muted",
|
|
80
91
|
role: "status"
|
|
81
|
-
},
|
|
92
|
+
}, at = { class: "border-t border-border-separator px-3 py-2" }, lt = ["aria-controls", "aria-activedescendant", "aria-label", "placeholder"], st = /* @__PURE__ */ fe({
|
|
82
93
|
__name: "CountryPicker",
|
|
83
|
-
props: /* @__PURE__ */
|
|
94
|
+
props: /* @__PURE__ */ re({
|
|
84
95
|
id: {},
|
|
85
96
|
common: {},
|
|
86
97
|
disabled: { type: Boolean },
|
|
@@ -89,79 +100,79 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
|
|
|
89
100
|
modelValue: { required: !0 },
|
|
90
101
|
modelModifiers: {}
|
|
91
102
|
}),
|
|
92
|
-
emits: /* @__PURE__ */
|
|
93
|
-
setup(t, { expose: a, emit:
|
|
94
|
-
const
|
|
95
|
-
const
|
|
96
|
-
for (const s of te())
|
|
97
|
-
return
|
|
98
|
-
}), S = (
|
|
99
|
-
const
|
|
103
|
+
emits: /* @__PURE__ */ re(["picked"], ["update:modelValue"]),
|
|
104
|
+
setup(t, { expose: a, emit: e }) {
|
|
105
|
+
const n = t, l = me(t, "modelValue"), x = e, { t: p } = pe(), _ = ve(), h = z("root"), V = z("trigger"), k = z("panel"), K = z("search"), C = B(!1), v = B(""), d = B(0), O = g(() => {
|
|
106
|
+
const o = /* @__PURE__ */ new Map();
|
|
107
|
+
for (const s of te()) o.set(s, ge(s, _.intlLocale));
|
|
108
|
+
return o;
|
|
109
|
+
}), S = (o) => O.value.get(o) ?? o, D = g(() => {
|
|
110
|
+
const o = n.common.filter((c) => O.value.has(c));
|
|
100
111
|
if (v.value.trim() !== "") {
|
|
101
112
|
const c = Je(v.value, _.intlLocale, te());
|
|
102
|
-
return [{ title: null, countries: [...c.filter((
|
|
113
|
+
return [{ title: null, countries: [...c.filter((r) => o.includes(r)), ...c.filter((r) => !o.includes(r))] }];
|
|
103
114
|
}
|
|
104
|
-
const s = te().filter((c) => !
|
|
105
|
-
return [{ title: p("core.form.phone.common"), countries:
|
|
106
|
-
}), y = g(() => D.value.flatMap((
|
|
115
|
+
const s = te().filter((c) => !o.includes(c)).sort((c, r) => S(c).localeCompare(S(r), _.intlLocale));
|
|
116
|
+
return [{ title: p("core.form.phone.common"), countries: o }, { title: p("core.form.phone.all"), countries: s }].filter((c) => c.countries.length > 0);
|
|
117
|
+
}), y = g(() => D.value.flatMap((o) => o.countries)), F = g(() => D.value.map((o, s) => D.value.slice(0, s).reduce((c, r) => c + r.countries.length, 0))), U = (o) => `${n.id}-country-${o}`, { style: Q } = Fe(k, {
|
|
107
118
|
reference: () => V.value,
|
|
108
119
|
placement: () => "bottom-start",
|
|
109
120
|
offset: 4,
|
|
110
121
|
padding: 8,
|
|
111
|
-
fit: (
|
|
112
|
-
|
|
122
|
+
fit: (o, s) => {
|
|
123
|
+
o.style.width = "min(20rem, calc(100vw - 1rem))", o.style.maxHeight = `${Math.max(200, Math.min(380, s.height))}px`;
|
|
113
124
|
}
|
|
114
125
|
});
|
|
115
126
|
async function j() {
|
|
116
|
-
|
|
127
|
+
n.disabled || C.value || (v.value = "", d.value = Math.max(0, y.value.indexOf(l.value)), C.value = !0, await W(), K.value?.focus());
|
|
117
128
|
}
|
|
118
|
-
function N(
|
|
119
|
-
C.value = !1,
|
|
129
|
+
function N(o) {
|
|
130
|
+
C.value = !1, o && V.value?.focus();
|
|
120
131
|
}
|
|
121
|
-
function
|
|
122
|
-
l.value =
|
|
132
|
+
function L(o) {
|
|
133
|
+
l.value = o, x("picked", o), N(!1);
|
|
123
134
|
}
|
|
124
|
-
ne(v, () => d.value = 0), ne(d, () => void
|
|
125
|
-
function H(
|
|
126
|
-
C.value && !h.value?.contains(
|
|
135
|
+
ne(v, () => d.value = 0), ne(d, () => void W(() => k.value?.querySelector("[aria-selected='true']")?.scrollIntoView?.({ block: "nearest" })));
|
|
136
|
+
function H(o) {
|
|
137
|
+
C.value && !h.value?.contains(o.relatedTarget) && N(!1);
|
|
127
138
|
}
|
|
128
|
-
function G(
|
|
129
|
-
if (
|
|
130
|
-
|
|
131
|
-
else if (
|
|
132
|
-
|
|
133
|
-
else if (
|
|
134
|
-
|
|
139
|
+
function G(o) {
|
|
140
|
+
if (o.key === "Escape")
|
|
141
|
+
o.stopPropagation(), o.preventDefault(), N(!0);
|
|
142
|
+
else if (o.key === "ArrowDown" || o.key === "ArrowUp")
|
|
143
|
+
o.preventDefault(), d.value = Math.min(Math.max(d.value + (o.key === "ArrowDown" ? 1 : -1), 0), y.value.length - 1);
|
|
144
|
+
else if (o.key === "Enter") {
|
|
145
|
+
o.preventDefault();
|
|
135
146
|
const s = y.value[d.value];
|
|
136
|
-
s &&
|
|
147
|
+
s && L(s);
|
|
137
148
|
}
|
|
138
149
|
}
|
|
139
|
-
function
|
|
140
|
-
(
|
|
150
|
+
function R(o) {
|
|
151
|
+
(o.key === "ArrowDown" || o.key === "ArrowUp") && (o.preventDefault(), j());
|
|
141
152
|
}
|
|
142
|
-
return a({ focus: () => V.value?.focus() }), (
|
|
153
|
+
return a({ focus: () => V.value?.focus() }), (o, s) => (w(), $("div", {
|
|
143
154
|
ref_key: "root",
|
|
144
155
|
ref: h,
|
|
145
156
|
class: "shrink-0",
|
|
146
157
|
onFocusout: H
|
|
147
158
|
}, [
|
|
148
159
|
f("button", {
|
|
149
|
-
id: `${
|
|
160
|
+
id: `${n.id}-country`,
|
|
150
161
|
ref_key: "trigger",
|
|
151
162
|
ref: V,
|
|
152
163
|
type: "button",
|
|
153
|
-
disabled:
|
|
164
|
+
disabled: n.disabled,
|
|
154
165
|
"aria-label": i(p)("core.form.phone.country", { country: S(l.value) }),
|
|
155
166
|
"aria-haspopup": "listbox",
|
|
156
167
|
"aria-expanded": C.value,
|
|
157
168
|
"data-test": "country-button",
|
|
158
|
-
class: P(["flex h-full min-h-8 cursor-pointer items-center gap-1.5 whitespace-nowrap text-body font-medium text-content-strong focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus disabled:cursor-not-allowed compact:border-r compact:border-border-separator",
|
|
169
|
+
class: P(["flex h-full min-h-8 cursor-pointer items-center gap-1.5 whitespace-nowrap text-body font-medium text-content-strong focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus disabled:cursor-not-allowed compact:border-r compact:border-border-separator", n.surface]),
|
|
159
170
|
onClick: s[0] || (s[0] = (c) => C.value ? N(!0) : j()),
|
|
160
|
-
onKeydown:
|
|
171
|
+
onKeydown: R
|
|
161
172
|
}, [
|
|
162
173
|
M(ue, { country: l.value }, null, 8, ["country"]),
|
|
163
174
|
f("span", Ze, T(i(de)(l.value)), 1),
|
|
164
|
-
M(i(
|
|
175
|
+
M(i(A), {
|
|
165
176
|
name: "arrowDownSLine",
|
|
166
177
|
size: 14,
|
|
167
178
|
class: "text-content-muted"
|
|
@@ -176,12 +187,12 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
|
|
|
176
187
|
class: "z-1000 flex flex-col overflow-hidden rounded-menu bg-surface-overlay shadow-float"
|
|
177
188
|
}, [
|
|
178
189
|
f("div", {
|
|
179
|
-
id: `${
|
|
190
|
+
id: `${n.id}-countries`,
|
|
180
191
|
role: "listbox",
|
|
181
192
|
"aria-label": i(p)("core.form.phone.countries"),
|
|
182
193
|
class: "min-h-0 flex-1 overflow-y-auto p-2"
|
|
183
194
|
}, [
|
|
184
|
-
(w(!0), $(ee, null, le(D.value, (c,
|
|
195
|
+
(w(!0), $(ee, null, le(D.value, (c, r) => (w(), $(ee, {
|
|
185
196
|
key: c.title ?? "found"
|
|
186
197
|
}, [
|
|
187
198
|
c.title ? (w(), $("p", tt, T(c.title), 1)) : J("", !0),
|
|
@@ -189,14 +200,14 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
|
|
|
189
200
|
id: U(u),
|
|
190
201
|
key: u,
|
|
191
202
|
role: "option",
|
|
192
|
-
"aria-selected": (
|
|
203
|
+
"aria-selected": (F.value[r] ?? 0) + b === d.value,
|
|
193
204
|
"data-test": "country-option",
|
|
194
205
|
"data-country": u,
|
|
195
|
-
class: P(["flex cursor-pointer items-center gap-2.5 rounded-control px-2 py-2 text-body", (
|
|
206
|
+
class: P(["flex cursor-pointer items-center gap-2.5 rounded-control px-2 py-2 text-body", (F.value[r] ?? 0) + b === d.value ? "bg-tint-soft" : "hover:bg-fill"]),
|
|
196
207
|
onMousedown: s[1] || (s[1] = we(() => {
|
|
197
208
|
}, ["prevent"])),
|
|
198
|
-
onMouseenter: (m) => d.value = (
|
|
199
|
-
onClick: (m) =>
|
|
209
|
+
onMouseenter: (m) => d.value = (F.value[r] ?? 0) + b,
|
|
210
|
+
onClick: (m) => L(u)
|
|
200
211
|
}, [
|
|
201
212
|
M(ue, { country: u }, null, 8, ["country"]),
|
|
202
213
|
f("span", {
|
|
@@ -205,9 +216,9 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
|
|
|
205
216
|
f("span", nt, T(i(de)(u)), 1)
|
|
206
217
|
], 42, ot))), 128))
|
|
207
218
|
], 64))), 128)),
|
|
208
|
-
y.value.length === 0 ? (w(), $("p",
|
|
219
|
+
y.value.length === 0 ? (w(), $("p", rt, T(i(p)("core.form.phone.no_match")), 1)) : J("", !0)
|
|
209
220
|
], 8, et),
|
|
210
|
-
f("div",
|
|
221
|
+
f("div", at, [
|
|
211
222
|
_e(f("input", {
|
|
212
223
|
ref_key: "search",
|
|
213
224
|
ref: K,
|
|
@@ -217,7 +228,7 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
|
|
|
217
228
|
autocomplete: "off",
|
|
218
229
|
"aria-autocomplete": "list",
|
|
219
230
|
"aria-expanded": "true",
|
|
220
|
-
"aria-controls": `${
|
|
231
|
+
"aria-controls": `${n.id}-countries`,
|
|
221
232
|
"aria-activedescendant": y.value[d.value] ? U(y.value[d.value]) : void 0,
|
|
222
233
|
"aria-label": i(p)("core.form.phone.search"),
|
|
223
234
|
placeholder: i(p)("core.form.phone.search"),
|
|
@@ -238,9 +249,9 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
|
|
|
238
249
|
}, ft = ["href", "aria-label", "title"], mt = ["href", "aria-label", "title"], pt = ["aria-label", "title"], vt = {
|
|
239
250
|
class: "sr-only",
|
|
240
251
|
role: "status"
|
|
241
|
-
},
|
|
252
|
+
}, Tt = /* @__PURE__ */ fe({
|
|
242
253
|
__name: "PhoneField",
|
|
243
|
-
props: /* @__PURE__ */
|
|
254
|
+
props: /* @__PURE__ */ re(/* @__PURE__ */ Pe({
|
|
244
255
|
label: {},
|
|
245
256
|
labelHidden: { type: Boolean },
|
|
246
257
|
hint: {},
|
|
@@ -255,66 +266,66 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
|
|
|
255
266
|
commonCountries: {},
|
|
256
267
|
placeholder: {},
|
|
257
268
|
width: {}
|
|
258
|
-
}, { ...
|
|
269
|
+
}, { ...Ee, defaultCountry: void 0, commonCountries: void 0, placeholder: void 0, width: "lg" }), {
|
|
259
270
|
modelValue: { default: "" },
|
|
260
271
|
modelModifiers: {}
|
|
261
272
|
}),
|
|
262
273
|
emits: ["update:modelValue"],
|
|
263
274
|
setup(t, { expose: a }) {
|
|
264
|
-
const
|
|
275
|
+
const e = t, n = me(t, "modelValue"), { t: l } = pe(), x = ve(), p = Ce(it, {}), _ = !!Oe(), h = Le("text", () => e.error || L.value ? "error" : e.disabled ? "locked" : "rest"), V = g(() => _ ? Ve(e.width) : "w-full"), k = z("input"), K = g(() => e.defaultCountry ?? p.defaultCountry ?? (e.commonCountries ?? p.commonCountries ?? ce)[0] ?? "HR"), C = g(() => e.commonCountries ?? p.commonCountries ?? ce), v = $e(K.value), d = B("");
|
|
265
276
|
let O = null;
|
|
266
|
-
function S(
|
|
267
|
-
v.value =
|
|
277
|
+
function S(r) {
|
|
278
|
+
v.value = r.country, d.value = r.text;
|
|
268
279
|
}
|
|
269
|
-
ne(() =>
|
|
270
|
-
|
|
280
|
+
ne(() => n.value, (r) => {
|
|
281
|
+
r !== O && (O = null, S(oe(r, v.value)));
|
|
271
282
|
}, { immediate: !0 });
|
|
272
|
-
function D(
|
|
273
|
-
S(
|
|
283
|
+
function D(r) {
|
|
284
|
+
S(r), O = r.e164, n.value = r.e164;
|
|
274
285
|
}
|
|
275
|
-
const y = (
|
|
276
|
-
async function
|
|
277
|
-
await
|
|
286
|
+
const y = (r) => r.replace(/\D/g, "").length;
|
|
287
|
+
async function F(r) {
|
|
288
|
+
await W();
|
|
278
289
|
const u = k.value;
|
|
279
290
|
if (!u || document.activeElement !== u) return;
|
|
280
291
|
u.value = d.value;
|
|
281
292
|
let b = 0, m = 0;
|
|
282
|
-
for (; m < d.value.length && b <
|
|
293
|
+
for (; m < d.value.length && b < r; ) /\d/.test(d.value[m++] ?? "") && b++;
|
|
283
294
|
u.setSelectionRange(m, m);
|
|
284
295
|
}
|
|
285
|
-
function U(
|
|
286
|
-
const u =
|
|
296
|
+
function U(r) {
|
|
297
|
+
const u = r.target, b = u.selectionStart ?? u.value.length;
|
|
287
298
|
let m = u.value, I = y(m.slice(0, b));
|
|
288
|
-
const X =
|
|
299
|
+
const X = r.inputType ?? "";
|
|
289
300
|
if (X.startsWith("delete") && y(m) === y(d.value) && y(m) > 0) {
|
|
290
301
|
const Z = m.replace(/\D/g, ""), Y = X === "deleteContentForward" ? I : I - 1;
|
|
291
302
|
Y >= 0 && Y < Z.length && (m = (m.trimStart().startsWith("+") ? "+" : "") + Z.slice(0, Y) + Z.slice(Y + 1), I = Math.max(0, I - (X === "deleteContentForward" ? 0 : 1)));
|
|
292
303
|
}
|
|
293
|
-
D(oe(m, v.value)),
|
|
304
|
+
D(oe(m, v.value)), F(I);
|
|
294
305
|
}
|
|
295
|
-
function Q(
|
|
296
|
-
const u =
|
|
297
|
-
/^(\+|00)\d/.test(u) && (
|
|
306
|
+
function Q(r) {
|
|
307
|
+
const u = r.clipboardData?.getData("text")?.trim() ?? "";
|
|
308
|
+
/^(\+|00)\d/.test(u) && (r.preventDefault(), D(oe(u, v.value)), W(() => k.value?.setSelectionRange(d.value.length, d.value.length)));
|
|
298
309
|
}
|
|
299
|
-
function j(
|
|
300
|
-
D(je({ country: v.value, e164:
|
|
310
|
+
function j(r) {
|
|
311
|
+
D(je({ country: v.value, e164: n.value, text: d.value }, r)), W(() => k.value?.focus());
|
|
301
312
|
}
|
|
302
|
-
const N =
|
|
303
|
-
const
|
|
304
|
-
if (
|
|
305
|
-
return
|
|
306
|
-
}), G = g(() =>
|
|
313
|
+
const N = B(!1), L = g(() => N.value && n.value !== "" ? be(n.value) : null), H = g(() => {
|
|
314
|
+
const r = L.value;
|
|
315
|
+
if (r)
|
|
316
|
+
return r.country ? l(`core.form.phone.${r.kind}`, { country: ge(r.country, x.intlLocale) }) : l("core.form.phone.invalid_any");
|
|
317
|
+
}), G = g(() => n.value !== "" && !L.value ? Xe(n.value) : void 0), R = g(() => He(n.value)), o = B(!1);
|
|
307
318
|
let s = null;
|
|
308
319
|
async function c() {
|
|
309
320
|
try {
|
|
310
|
-
await navigator.clipboard.writeText(
|
|
321
|
+
await navigator.clipboard.writeText(R.value);
|
|
311
322
|
} catch {
|
|
312
323
|
return;
|
|
313
324
|
}
|
|
314
|
-
|
|
325
|
+
o.value = !0, s && clearTimeout(s), s = setTimeout(() => o.value = !1, 1800);
|
|
315
326
|
}
|
|
316
|
-
return De(() => s && clearTimeout(s)), a({ focus: () => k.value?.focus() }), (
|
|
317
|
-
value:
|
|
327
|
+
return De(() => s && clearTimeout(s)), a({ focus: () => k.value?.focus() }), (r, u) => (w(), Me(Re, Te({ ...i(Be)(e), error: e.error ?? H.value }, {
|
|
328
|
+
value: n.value === "" ? null : R.value,
|
|
318
329
|
"value-style": "numeric"
|
|
319
330
|
}), Se({
|
|
320
331
|
default: se(({ id: b, describedby: m, invalid: I }) => [
|
|
@@ -326,7 +337,7 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
|
|
|
326
337
|
id: b,
|
|
327
338
|
"model-value": v.value,
|
|
328
339
|
common: C.value,
|
|
329
|
-
disabled:
|
|
340
|
+
disabled: e.disabled,
|
|
330
341
|
surface: `${i(h)} px-2.5`,
|
|
331
342
|
onPicked: j
|
|
332
343
|
}, null, 8, ["id", "model-value", "common", "disabled", "surface"]),
|
|
@@ -341,11 +352,11 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
|
|
|
341
352
|
type: "tel",
|
|
342
353
|
inputmode: "tel",
|
|
343
354
|
autocomplete: "tel-national",
|
|
344
|
-
name:
|
|
345
|
-
placeholder:
|
|
346
|
-
disabled:
|
|
347
|
-
required:
|
|
348
|
-
"aria-required":
|
|
355
|
+
name: e.name,
|
|
356
|
+
placeholder: e.placeholder,
|
|
357
|
+
disabled: e.disabled,
|
|
358
|
+
required: e.required,
|
|
359
|
+
"aria-required": e.required || void 0,
|
|
349
360
|
"aria-invalid": I || void 0,
|
|
350
361
|
"aria-describedby": m,
|
|
351
362
|
"data-test": "phone-input",
|
|
@@ -356,8 +367,8 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
|
|
|
356
367
|
}, null, 40, ct)
|
|
357
368
|
], 2)
|
|
358
369
|
], 2),
|
|
359
|
-
G.value && !(
|
|
360
|
-
M(i(
|
|
370
|
+
G.value && !(e.error ?? H.value) ? (w(), $("p", dt, [
|
|
371
|
+
M(i(A), {
|
|
361
372
|
name: "checkCustom",
|
|
362
373
|
size: 14,
|
|
363
374
|
class: "shrink-0"
|
|
@@ -368,7 +379,7 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
|
|
|
368
379
|
]),
|
|
369
380
|
_: 2
|
|
370
381
|
}, [
|
|
371
|
-
|
|
382
|
+
n.value !== "" ? {
|
|
372
383
|
name: "readonly",
|
|
373
384
|
fn: se(() => [
|
|
374
385
|
f("div", {
|
|
@@ -377,34 +388,34 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
|
|
|
377
388
|
}, [
|
|
378
389
|
f("span", {
|
|
379
390
|
class: P(["flex-auto whitespace-nowrap text-body tabular-nums text-content-strong", _ ? "text-right" : ""])
|
|
380
|
-
}, T(
|
|
391
|
+
}, T(R.value), 3),
|
|
381
392
|
f("a", {
|
|
382
|
-
href: `tel:${
|
|
393
|
+
href: `tel:${n.value}`,
|
|
383
394
|
"aria-label": i(l)("core.form.phone.call"),
|
|
384
395
|
title: i(l)("core.form.phone.call"),
|
|
385
396
|
"data-test": "phone-call",
|
|
386
397
|
class: "flex size-9 shrink-0 items-center justify-center rounded-full bg-tint-soft text-content-link transition-colors duration-motion-fast hover:bg-fill focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus"
|
|
387
398
|
}, [
|
|
388
|
-
M(i(
|
|
399
|
+
M(i(A), {
|
|
389
400
|
name: "phone",
|
|
390
401
|
size: 18
|
|
391
402
|
})
|
|
392
403
|
], 8, ft),
|
|
393
404
|
f("a", {
|
|
394
|
-
href: `sms:${
|
|
405
|
+
href: `sms:${n.value}`,
|
|
395
406
|
"aria-label": i(l)("core.form.phone.message"),
|
|
396
407
|
title: i(l)("core.form.phone.message"),
|
|
397
408
|
"data-test": "phone-message",
|
|
398
409
|
class: "flex size-9 shrink-0 items-center justify-center rounded-full bg-tint-soft text-content-link transition-colors duration-motion-fast hover:bg-fill focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus"
|
|
399
410
|
}, [
|
|
400
|
-
M(i(
|
|
411
|
+
M(i(A), {
|
|
401
412
|
name: "message",
|
|
402
413
|
size: 18
|
|
403
414
|
})
|
|
404
415
|
], 8, mt),
|
|
405
|
-
Ie(
|
|
406
|
-
number:
|
|
407
|
-
formatted:
|
|
416
|
+
Ie(r.$slots, "actions", {
|
|
417
|
+
number: n.value,
|
|
418
|
+
formatted: R.value
|
|
408
419
|
}),
|
|
409
420
|
f("button", {
|
|
410
421
|
type: "button",
|
|
@@ -414,12 +425,12 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
|
|
|
414
425
|
class: "flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full bg-fill text-content-strong transition-colors duration-motion-fast hover:bg-fill-strong focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
415
426
|
onClick: c
|
|
416
427
|
}, [
|
|
417
|
-
M(i(
|
|
418
|
-
name:
|
|
428
|
+
M(i(A), {
|
|
429
|
+
name: o.value ? "checkCustom" : "copy",
|
|
419
430
|
size: 18
|
|
420
431
|
}, null, 8, ["name"])
|
|
421
432
|
], 8, pt),
|
|
422
|
-
f("span", vt, T(
|
|
433
|
+
f("span", vt, T(o.value ? i(l)("core.form.phone.copied") : ""), 1)
|
|
423
434
|
], 2)
|
|
424
435
|
]),
|
|
425
436
|
key: "0"
|
|
@@ -429,13 +440,14 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
|
|
|
429
440
|
});
|
|
430
441
|
export {
|
|
431
442
|
ce as COMMON_COUNTRIES,
|
|
432
|
-
|
|
443
|
+
Tt as PhoneField,
|
|
433
444
|
ge as countryName,
|
|
434
445
|
de as dialCode,
|
|
435
446
|
He as formatInternational,
|
|
436
|
-
|
|
447
|
+
Mt as isValidPhone,
|
|
437
448
|
Ye as phoneCountry,
|
|
438
449
|
it as phoneDefaultsKey,
|
|
439
450
|
Xe as phoneKind,
|
|
440
|
-
be as phoneProblem
|
|
451
|
+
be as phoneProblem,
|
|
452
|
+
Dt as whatsAppLink
|
|
441
453
|
};
|