@quidgest/ui 0.19.0 → 0.20.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 +10 -0
- package/dist/json/api.json +1109 -3
- package/dist/manifest/components.json +1 -0
- package/dist/ui.css +1181 -5
- package/dist/ui.esm.js +1444 -843
- package/dist/ui.js +1405 -804
- package/dist/ui.min.css +2 -1
- package/dist/ui.min.js +1405 -804
- package/dist/ui.scss +373 -7
- package/esm/components/QField/QField.d.ts.map +1 -1
- package/esm/components/QField/QField.vue.js +1 -1
- package/esm/components/QInputGroup/QInputGroup.d.ts +147 -3
- package/esm/components/QInputGroup/QInputGroup.d.ts.map +1 -1
- package/esm/components/QInputGroup/QInputGroup.vue.js +32 -23
- package/esm/components/QInputGroup/index.d.ts +81 -4
- package/esm/components/QInputGroup/index.d.ts.map +1 -1
- package/esm/components/QList/QList.d.ts.map +1 -1
- package/esm/components/QList/QList.vue.js +3 -1
- package/esm/components/QList/QListItem.d.ts.map +1 -1
- package/esm/components/QList/QListItem.vue.js +24 -28
- package/esm/components/QList/types.d.ts +1 -1
- package/esm/components/QOverlay/types.d.ts +3 -1
- package/esm/components/QOverlay/types.d.ts.map +1 -1
- package/esm/components/QPhoneField/QPhoneField.d.ts +2263 -0
- package/esm/components/QPhoneField/QPhoneField.d.ts.map +1 -0
- package/esm/components/QPhoneField/QPhoneField.vue.js +478 -0
- package/esm/components/QPhoneField/QPhoneField2.vue.js +5 -0
- package/esm/components/QPhoneField/constants.d.ts +11 -0
- package/esm/components/QPhoneField/constants.d.ts.map +1 -0
- package/esm/components/QPhoneField/constants.js +14 -0
- package/esm/components/QPhoneField/index.d.ts +1253 -0
- package/esm/components/QPhoneField/index.d.ts.map +1 -0
- package/esm/components/QPhoneField/index.js +6 -0
- package/esm/components/QPhoneField/types.d.ts +108 -0
- package/esm/components/QPhoneField/types.d.ts.map +1 -0
- package/esm/components/QSelect/QSelect.d.ts +16 -1
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +158 -129
- package/esm/components/QSelect/index.d.ts +31 -3
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/esm/components/QSelect/types.d.ts +13 -0
- package/esm/components/QSelect/types.d.ts.map +1 -1
- package/esm/components/index.d.ts +1 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +36 -34
- package/esm/composables/useDialog/index.d.ts +2 -88
- package/esm/composables/useDialog/index.d.ts.map +1 -1
- package/esm/composables/useDialog/index.js +6 -6
- package/esm/composables/useDialog/types.d.ts +14 -4
- package/esm/composables/useDialog/types.d.ts.map +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/vendors/country-flag-icons/modules/countries.json.js +4 -0
- package/esm/vendors/country-flag-icons/modules/hasFlag.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouType.js +312 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.js +142 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.js +145 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.complete.js +45 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.js +258 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.util.js +57 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeParser.js +242 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeState.js +115 -0
- package/esm/vendors/libphonenumber-js/es6/ParseError.js +116 -0
- package/esm/vendors/libphonenumber-js/es6/PhoneNumber.js +164 -0
- package/esm/vendors/libphonenumber-js/es6/constants.js +4 -0
- package/esm/vendors/libphonenumber-js/es6/format.js +77 -0
- package/esm/vendors/libphonenumber-js/es6/formatIncompletePhoneNumber.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/getCountries.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/getExampleNumber.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/RFC3966.js +9 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/checkNumberLength.js +21 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +11 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extension/extractExtension.js +16 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +36 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +21 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +18 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractNationalNumber.js +27 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +27 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractPhoneContext.js +15 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +11 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getCountryAndCallingCodeFromOneOfThem.js +13 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +12 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +43 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getIddPrefix.js +10 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getNumberType.js +61 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +14 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/isCallingCode.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/isCountryCode.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/isObject.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +12 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/matchesEntirely.js +6 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/mergeArrays.js +39 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/parseDigits.js +82 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/stripIddPrefix.js +18 -0
- package/esm/vendors/libphonenumber-js/es6/isPossible.js +32 -0
- package/esm/vendors/libphonenumber-js/es6/isValid.js +11 -0
- package/esm/vendors/libphonenumber-js/es6/metadata.js +474 -0
- package/esm/vendors/libphonenumber-js/es6/normalizeArguments.js +110 -0
- package/esm/vendors/libphonenumber-js/es6/parse.js +103 -0
- package/esm/vendors/libphonenumber-js/es6/parseIncompletePhoneNumber.js +48 -0
- package/esm/vendors/libphonenumber-js/es6/parsePhoneNumber.js +9 -0
- package/esm/vendors/libphonenumber-js/es6/parsePhoneNumberWithError_.js +58 -0
- package/esm/vendors/libphonenumber-js/es6/parsePhoneNumber_.js +66 -0
- package/esm/vendors/libphonenumber-js/es6/tools/semver-compare.js +14 -0
- package/esm/vendors/libphonenumber-js/examples.mobile.json.js +250 -0
- package/esm/vendors/libphonenumber-js/max/exports/AsYouType.js +9 -0
- package/esm/vendors/libphonenumber-js/max/exports/formatIncompletePhoneNumber.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/getCountries.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/getCountryCallingCode.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/getExampleNumber.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/isSupportedCountry.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/parsePhoneNumber.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/withMetadataArgument.js +8 -0
- package/esm/vendors/libphonenumber-js/metadata.max.json.js +10489 -0
- package/package.json +3 -1
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { PLUS_CHARS as e, VALID_DIGITS as t, VALID_PUNCTUATION as n } from "./constants.js";
|
|
2
|
+
import r from "./helpers/parseDigits.js";
|
|
3
|
+
import i from "./helpers/stripIddPrefix.js";
|
|
4
|
+
import a from "./helpers/extractNationalNumberFromPossiblyIncompleteNumber.js";
|
|
5
|
+
import o from "./helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js";
|
|
6
|
+
import s from "./helpers/extractCountryCallingCode.js";
|
|
7
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/AsYouTypeParser.js
|
|
8
|
+
function c(e) {
|
|
9
|
+
"@babel/helpers - typeof";
|
|
10
|
+
return c = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
11
|
+
return typeof e;
|
|
12
|
+
} : function(e) {
|
|
13
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
14
|
+
}, c(e);
|
|
15
|
+
}
|
|
16
|
+
function l(e, t) {
|
|
17
|
+
return m(e) || p(e, t) || d(e, t) || u();
|
|
18
|
+
}
|
|
19
|
+
function u() {
|
|
20
|
+
throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
21
|
+
}
|
|
22
|
+
function d(e, t) {
|
|
23
|
+
if (e) {
|
|
24
|
+
if (typeof e == "string") return f(e, t);
|
|
25
|
+
var n = {}.toString.call(e).slice(8, -1);
|
|
26
|
+
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? f(e, t) : void 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function f(e, t) {
|
|
30
|
+
(t == null || t > e.length) && (t = e.length);
|
|
31
|
+
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
32
|
+
return r;
|
|
33
|
+
}
|
|
34
|
+
function p(e, t) {
|
|
35
|
+
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
36
|
+
if (n != null) {
|
|
37
|
+
var r, i, a, o, s = [], c = !0, l = !1;
|
|
38
|
+
try {
|
|
39
|
+
if (a = (n = n.call(e)).next, t === 0) {
|
|
40
|
+
if (Object(n) !== n) return;
|
|
41
|
+
c = !1;
|
|
42
|
+
} else for (; !(c = (r = a.call(n)).done) && (s.push(r.value), s.length !== t); c = !0);
|
|
43
|
+
} catch (e) {
|
|
44
|
+
l = !0, i = e;
|
|
45
|
+
} finally {
|
|
46
|
+
try {
|
|
47
|
+
if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
|
|
48
|
+
} finally {
|
|
49
|
+
if (l) throw i;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return s;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function m(e) {
|
|
56
|
+
if (Array.isArray(e)) return e;
|
|
57
|
+
}
|
|
58
|
+
function h(e, t) {
|
|
59
|
+
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
60
|
+
}
|
|
61
|
+
function g(e, t) {
|
|
62
|
+
for (var n = 0; n < t.length; n++) {
|
|
63
|
+
var r = t[n];
|
|
64
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, v(r.key), r);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function _(e, t, n) {
|
|
68
|
+
return t && g(e.prototype, t), n && g(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
69
|
+
}
|
|
70
|
+
function v(e) {
|
|
71
|
+
var t = y(e, "string");
|
|
72
|
+
return c(t) == "symbol" ? t : t + "";
|
|
73
|
+
}
|
|
74
|
+
function y(e, t) {
|
|
75
|
+
if (c(e) != "object" || !e) return e;
|
|
76
|
+
var n = e[Symbol.toPrimitive];
|
|
77
|
+
if (n !== void 0) {
|
|
78
|
+
var r = n.call(e, t || "default");
|
|
79
|
+
if (c(r) != "object") return r;
|
|
80
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
81
|
+
}
|
|
82
|
+
return (t === "string" ? String : Number)(e);
|
|
83
|
+
}
|
|
84
|
+
var b = "[" + n + t + "]+", x = RegExp("^" + b + "$", "i"), S = "(?:[" + e + "][" + n + t + "]*|[" + n + t + "]+)", C = RegExp("[^" + n + t + "]+.*$"), w = /[^\d\[\]]/, T = /*#__PURE__*/ function() {
|
|
85
|
+
function e(t) {
|
|
86
|
+
var n = t.defaultCountry, r = t.defaultCallingCode, i = t.metadata, a = t.onNationalSignificantNumberChange;
|
|
87
|
+
h(this, e), this.defaultCountry = n, this.defaultCallingCode = r, this.metadata = i, this.onNationalSignificantNumberChange = a;
|
|
88
|
+
}
|
|
89
|
+
return _(e, [
|
|
90
|
+
{
|
|
91
|
+
key: "input",
|
|
92
|
+
value: function(e, t) {
|
|
93
|
+
var n = l(O(e), 2), i = n[0], a = n[1], o = r(i), s;
|
|
94
|
+
return a && (t.digits || (t.startInternationalNumber(void 0, void 0), o || (s = !0))), o && this.inputDigits(o, t), {
|
|
95
|
+
digits: o,
|
|
96
|
+
justLeadingPlus: s
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
key: "inputDigits",
|
|
102
|
+
value: function(e, t) {
|
|
103
|
+
var n = t.digits, r = n.length < 3 && n.length + e.length >= 3;
|
|
104
|
+
if (t.appendDigits(e), r && this.extractIddPrefix(t), this.isWaitingForCountryCallingCode(t)) {
|
|
105
|
+
if (!this.extractCountryCallingCode(t)) return;
|
|
106
|
+
} else t.appendNationalSignificantNumberDigits(e);
|
|
107
|
+
t.international || this.hasExtractedNationalSignificantNumber || this.extractNationalSignificantNumber(t.getNationalDigits(), function(e) {
|
|
108
|
+
return t.update(e);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
key: "isWaitingForCountryCallingCode",
|
|
114
|
+
value: function(e) {
|
|
115
|
+
var t = e.international, n = e.callingCode;
|
|
116
|
+
return t && !n;
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
key: "extractCountryCallingCode",
|
|
121
|
+
value: function(e) {
|
|
122
|
+
var t = s("+" + e.getDigitsWithoutInternationalPrefix(), e.country, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata), n = t.countryCallingCode, r = t.number;
|
|
123
|
+
if (n) return e.setCallingCode(n), e.update({ nationalSignificantNumber: r }), !0;
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
key: "reset",
|
|
128
|
+
value: function(e) {
|
|
129
|
+
if (e) {
|
|
130
|
+
this.hasSelectedNumberingPlan = !0;
|
|
131
|
+
var t = e._nationalPrefixForParsing();
|
|
132
|
+
this.couldPossiblyExtractAnotherNationalSignificantNumber = t && w.test(t);
|
|
133
|
+
} else this.hasSelectedNumberingPlan = void 0, this.couldPossiblyExtractAnotherNationalSignificantNumber = void 0;
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
key: "extractNationalSignificantNumber",
|
|
138
|
+
value: function(e, t) {
|
|
139
|
+
if (this.hasSelectedNumberingPlan) {
|
|
140
|
+
var n = a(e, this.metadata), r = n.nationalPrefix, i = n.nationalNumber, o = n.carrierCode;
|
|
141
|
+
if (i !== e) return this.onExtractedNationalNumber(r, o, i, e, t), !0;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
key: "extractAnotherNationalSignificantNumber",
|
|
147
|
+
value: function(e, t, n) {
|
|
148
|
+
if (!this.hasExtractedNationalSignificantNumber) return this.extractNationalSignificantNumber(e, n);
|
|
149
|
+
if (this.couldPossiblyExtractAnotherNationalSignificantNumber) {
|
|
150
|
+
var r = a(e, this.metadata), i = r.nationalPrefix, o = r.nationalNumber, s = r.carrierCode;
|
|
151
|
+
if (o !== t) return this.onExtractedNationalNumber(i, s, o, e, n), !0;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
key: "onExtractedNationalNumber",
|
|
157
|
+
value: function(e, t, n, r, i) {
|
|
158
|
+
var a = !1, o, s = r.lastIndexOf(n);
|
|
159
|
+
if (s < 0 || s !== r.length - n.length) a = !0;
|
|
160
|
+
else {
|
|
161
|
+
var c = r.slice(0, s);
|
|
162
|
+
/* istanbul ignore if */
|
|
163
|
+
c && c !== e && (o = c);
|
|
164
|
+
}
|
|
165
|
+
i({
|
|
166
|
+
nationalPrefix: e,
|
|
167
|
+
carrierCode: t,
|
|
168
|
+
nationalSignificantNumber: n,
|
|
169
|
+
nationalSignificantNumberIsModified: a,
|
|
170
|
+
prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix: o
|
|
171
|
+
}), this.hasExtractedNationalSignificantNumber = !0, this.onNationalSignificantNumberChange();
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
key: "reExtractNationalSignificantNumber",
|
|
176
|
+
value: function(e) {
|
|
177
|
+
if (this.extractAnotherNationalSignificantNumber(e.getNationalDigits(), e.nationalSignificantNumber, function(t) {
|
|
178
|
+
return e.update(t);
|
|
179
|
+
})) return !0;
|
|
180
|
+
if (this.extractIddPrefix(e) || this.fixMissingPlus(e)) return this.extractCallingCodeAndNationalSignificantNumber(e), !0;
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
key: "extractIddPrefix",
|
|
185
|
+
value: function(e) {
|
|
186
|
+
var t = e.international, n = e.IDDPrefix, r = e.digits;
|
|
187
|
+
if (e.nationalSignificantNumber, !(t || n)) {
|
|
188
|
+
var a = i(r, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata);
|
|
189
|
+
if (a !== void 0 && a !== r) return e.update({ IDDPrefix: r.slice(0, r.length - a.length) }), this.startInternationalNumber(e, {
|
|
190
|
+
country: void 0,
|
|
191
|
+
callingCode: void 0
|
|
192
|
+
}), !0;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
key: "fixMissingPlus",
|
|
198
|
+
value: function(e) {
|
|
199
|
+
if (!e.international) {
|
|
200
|
+
var t = o(e.digits, e.country, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata).countryCallingCode;
|
|
201
|
+
if (t) return e.update({ missingPlus: !0 }), this.startInternationalNumber(e, {
|
|
202
|
+
country: e.country,
|
|
203
|
+
callingCode: t
|
|
204
|
+
}), !0;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
key: "startInternationalNumber",
|
|
210
|
+
value: function(e, t) {
|
|
211
|
+
var n = t.country, r = t.callingCode;
|
|
212
|
+
e.startInternationalNumber(n, r), e.nationalSignificantNumber && (e.resetNationalSignificantNumber(), this.onNationalSignificantNumberChange(), this.hasExtractedNationalSignificantNumber = void 0);
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
key: "extractCallingCodeAndNationalSignificantNumber",
|
|
217
|
+
value: function(e) {
|
|
218
|
+
this.extractCountryCallingCode(e) && this.extractNationalSignificantNumber(e.getNationalDigits(), function(t) {
|
|
219
|
+
return e.update(t);
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
]);
|
|
224
|
+
}();
|
|
225
|
+
function E(e) {
|
|
226
|
+
var t = e.search(S);
|
|
227
|
+
if (!(t < 0)) {
|
|
228
|
+
e = e.slice(t);
|
|
229
|
+
var n;
|
|
230
|
+
return e[0] === "+" && (n = !0, e = e.slice(1)), e = e.replace(C, ""), n && (e = "+" + e), e;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
function D(e) {
|
|
234
|
+
var t = E(e) || "";
|
|
235
|
+
return t[0] === "+" ? [t.slice(1), !0] : [t];
|
|
236
|
+
}
|
|
237
|
+
function O(e) {
|
|
238
|
+
var t = l(D(e), 2), n = t[0], r = t[1];
|
|
239
|
+
return x.test(n) || (n = ""), [n, r];
|
|
240
|
+
}
|
|
241
|
+
//#endregion
|
|
242
|
+
export { T as default, O as extractFormattedDigitsAndPlus };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/AsYouTypeState.js
|
|
2
|
+
function e(t) {
|
|
3
|
+
"@babel/helpers - typeof";
|
|
4
|
+
return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
5
|
+
return typeof e;
|
|
6
|
+
} : function(e) {
|
|
7
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
8
|
+
}, e(t);
|
|
9
|
+
}
|
|
10
|
+
function t(e, t) {
|
|
11
|
+
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
12
|
+
}
|
|
13
|
+
function n(e, t) {
|
|
14
|
+
for (var n = 0; n < t.length; n++) {
|
|
15
|
+
var r = t[n];
|
|
16
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, i(r.key), r);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function r(e, t, r) {
|
|
20
|
+
return t && n(e.prototype, t), r && n(e, r), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
21
|
+
}
|
|
22
|
+
function i(t) {
|
|
23
|
+
var n = a(t, "string");
|
|
24
|
+
return e(n) == "symbol" ? n : n + "";
|
|
25
|
+
}
|
|
26
|
+
function a(t, n) {
|
|
27
|
+
if (e(t) != "object" || !t) return t;
|
|
28
|
+
var r = t[Symbol.toPrimitive];
|
|
29
|
+
if (r !== void 0) {
|
|
30
|
+
var i = r.call(t, n || "default");
|
|
31
|
+
if (e(i) != "object") return i;
|
|
32
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
33
|
+
}
|
|
34
|
+
return (n === "string" ? String : Number)(t);
|
|
35
|
+
}
|
|
36
|
+
var o = /*#__PURE__*/ function() {
|
|
37
|
+
function e(n) {
|
|
38
|
+
var r = n.onCountryChange, i = n.onCallingCodeChange;
|
|
39
|
+
t(this, e), this.onCountryChange = r, this.onCallingCodeChange = i;
|
|
40
|
+
}
|
|
41
|
+
return r(e, [
|
|
42
|
+
{
|
|
43
|
+
key: "reset",
|
|
44
|
+
value: function(e) {
|
|
45
|
+
var t = e.country, n = e.callingCode;
|
|
46
|
+
this.international = !1, this.missingPlus = !1, this.IDDPrefix = void 0, this.callingCode = void 0, this.digits = "", this.resetNationalSignificantNumber(), this.initCountryAndCallingCode(t, n);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
key: "resetNationalSignificantNumber",
|
|
51
|
+
value: function() {
|
|
52
|
+
this.nationalSignificantNumber = this.getNationalDigits(), this.nationalSignificantNumberIsModified = !1, this.nationalPrefix = void 0, this.carrierCode = void 0, this.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = void 0;
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
key: "update",
|
|
57
|
+
value: function(e) {
|
|
58
|
+
for (var t = 0, n = Object.keys(e); t < n.length; t++) {
|
|
59
|
+
var r = n[t];
|
|
60
|
+
this[r] = e[r];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
key: "initCountryAndCallingCode",
|
|
66
|
+
value: function(e, t) {
|
|
67
|
+
this.setCountry(e), this.setCallingCode(t);
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: "setCountry",
|
|
72
|
+
value: function(e) {
|
|
73
|
+
this.country = e, this.onCountryChange(e);
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
key: "setCallingCode",
|
|
78
|
+
value: function(e) {
|
|
79
|
+
this.callingCode = e, this.onCallingCodeChange(e, this.country);
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
key: "startInternationalNumber",
|
|
84
|
+
value: function(e, t) {
|
|
85
|
+
this.international = !0, this.initCountryAndCallingCode(e, t);
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
key: "appendDigits",
|
|
90
|
+
value: function(e) {
|
|
91
|
+
this.digits += e;
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
key: "appendNationalSignificantNumberDigits",
|
|
96
|
+
value: function(e) {
|
|
97
|
+
this.nationalSignificantNumber += e;
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
key: "getNationalDigits",
|
|
102
|
+
value: function() {
|
|
103
|
+
return this.international ? this.digits.slice((this.IDDPrefix ? this.IDDPrefix.length : 0) + (this.callingCode ? this.callingCode.length : 0)) : this.digits;
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
key: "getDigitsWithoutInternationalPrefix",
|
|
108
|
+
value: function() {
|
|
109
|
+
return this.international && this.IDDPrefix ? this.digits.slice(this.IDDPrefix.length) : this.digits;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
]);
|
|
113
|
+
}();
|
|
114
|
+
//#endregion
|
|
115
|
+
export { o as default };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/ParseError.js
|
|
2
|
+
function e(t) {
|
|
3
|
+
"@babel/helpers - typeof";
|
|
4
|
+
return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
5
|
+
return typeof e;
|
|
6
|
+
} : function(e) {
|
|
7
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
8
|
+
}, e(t);
|
|
9
|
+
}
|
|
10
|
+
function t(e, t) {
|
|
11
|
+
for (var n = 0; n < t.length; n++) {
|
|
12
|
+
var i = t[n];
|
|
13
|
+
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, r(i.key), i);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function n(e, n, r) {
|
|
17
|
+
return n && t(e.prototype, n), r && t(e, r), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
18
|
+
}
|
|
19
|
+
function r(t) {
|
|
20
|
+
var n = i(t, "string");
|
|
21
|
+
return e(n) == "symbol" ? n : n + "";
|
|
22
|
+
}
|
|
23
|
+
function i(t, n) {
|
|
24
|
+
if (e(t) != "object" || !t) return t;
|
|
25
|
+
var r = t[Symbol.toPrimitive];
|
|
26
|
+
if (r !== void 0) {
|
|
27
|
+
var i = r.call(t, n || "default");
|
|
28
|
+
if (e(i) != "object") return i;
|
|
29
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
30
|
+
}
|
|
31
|
+
return (n === "string" ? String : Number)(t);
|
|
32
|
+
}
|
|
33
|
+
function a(e, t) {
|
|
34
|
+
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
35
|
+
}
|
|
36
|
+
function o(e, t, n) {
|
|
37
|
+
return t = h(t), s(e, f() ? Reflect.construct(t, n || [], h(e).constructor) : t.apply(e, n));
|
|
38
|
+
}
|
|
39
|
+
function s(t, n) {
|
|
40
|
+
if (n && (e(n) == "object" || typeof n == "function")) return n;
|
|
41
|
+
if (n !== void 0) throw TypeError("Derived constructors may only return object or undefined");
|
|
42
|
+
return c(t);
|
|
43
|
+
}
|
|
44
|
+
function c(e) {
|
|
45
|
+
if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
46
|
+
return e;
|
|
47
|
+
}
|
|
48
|
+
function l(e, t) {
|
|
49
|
+
if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function");
|
|
50
|
+
e.prototype = Object.create(t && t.prototype, { constructor: {
|
|
51
|
+
value: e,
|
|
52
|
+
writable: !0,
|
|
53
|
+
configurable: !0
|
|
54
|
+
} }), Object.defineProperty(e, "prototype", { writable: !1 }), t && m(e, t);
|
|
55
|
+
}
|
|
56
|
+
function u(e) {
|
|
57
|
+
var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
58
|
+
return u = function(e) {
|
|
59
|
+
if (e === null || !p(e)) return e;
|
|
60
|
+
if (typeof e != "function") throw TypeError("Super expression must either be null or a function");
|
|
61
|
+
if (t !== void 0) {
|
|
62
|
+
if (t.has(e)) return t.get(e);
|
|
63
|
+
t.set(e, n);
|
|
64
|
+
}
|
|
65
|
+
function n() {
|
|
66
|
+
return d(e, arguments, h(this).constructor);
|
|
67
|
+
}
|
|
68
|
+
return n.prototype = Object.create(e.prototype, { constructor: {
|
|
69
|
+
value: n,
|
|
70
|
+
enumerable: !1,
|
|
71
|
+
writable: !0,
|
|
72
|
+
configurable: !0
|
|
73
|
+
} }), m(n, e);
|
|
74
|
+
}, u(e);
|
|
75
|
+
}
|
|
76
|
+
function d(e, t, n) {
|
|
77
|
+
if (f()) return Reflect.construct.apply(null, arguments);
|
|
78
|
+
var r = [null];
|
|
79
|
+
r.push.apply(r, t);
|
|
80
|
+
var i = new (e.bind.apply(e, r))();
|
|
81
|
+
return n && m(i, n.prototype), i;
|
|
82
|
+
}
|
|
83
|
+
function f() {
|
|
84
|
+
try {
|
|
85
|
+
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
86
|
+
} catch {}
|
|
87
|
+
return (f = function() {
|
|
88
|
+
return !!e;
|
|
89
|
+
})();
|
|
90
|
+
}
|
|
91
|
+
function p(e) {
|
|
92
|
+
try {
|
|
93
|
+
return Function.toString.call(e).indexOf("[native code]") !== -1;
|
|
94
|
+
} catch {
|
|
95
|
+
return typeof e == "function";
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function m(e, t) {
|
|
99
|
+
return m = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
100
|
+
return e.__proto__ = t, e;
|
|
101
|
+
}, m(e, t);
|
|
102
|
+
}
|
|
103
|
+
function h(e) {
|
|
104
|
+
return h = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
105
|
+
return e.__proto__ || Object.getPrototypeOf(e);
|
|
106
|
+
}, h(e);
|
|
107
|
+
}
|
|
108
|
+
var g = /*#__PURE__*/ function(e) {
|
|
109
|
+
function t(e) {
|
|
110
|
+
var n;
|
|
111
|
+
return a(this, t), n = o(this, t, [e]), Object.setPrototypeOf(n, t.prototype), n.name = n.constructor.name, n;
|
|
112
|
+
}
|
|
113
|
+
return l(t, e), n(t);
|
|
114
|
+
}(/*#__PURE__*/ u(Error));
|
|
115
|
+
//#endregion
|
|
116
|
+
export { g as default };
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import e from "./helpers/isObject.js";
|
|
2
|
+
import t, { validateMetadata as n } from "./metadata.js";
|
|
3
|
+
import r from "./isPossible.js";
|
|
4
|
+
import i from "./helpers/getNumberType.js";
|
|
5
|
+
import a from "./isValid.js";
|
|
6
|
+
import o from "./helpers/getCountryAndCallingCodeFromOneOfThem.js";
|
|
7
|
+
import s from "./helpers/getPossibleCountriesForNumber.js";
|
|
8
|
+
import c from "./helpers/extractCountryCallingCode.js";
|
|
9
|
+
import l from "./format.js";
|
|
10
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/PhoneNumber.js
|
|
11
|
+
function u(e) {
|
|
12
|
+
"@babel/helpers - typeof";
|
|
13
|
+
return u = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
14
|
+
return typeof e;
|
|
15
|
+
} : function(e) {
|
|
16
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
17
|
+
}, u(e);
|
|
18
|
+
}
|
|
19
|
+
function d(e, t) {
|
|
20
|
+
var n = Object.keys(e);
|
|
21
|
+
if (Object.getOwnPropertySymbols) {
|
|
22
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
23
|
+
t && (r = r.filter(function(t) {
|
|
24
|
+
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
25
|
+
})), n.push.apply(n, r);
|
|
26
|
+
}
|
|
27
|
+
return n;
|
|
28
|
+
}
|
|
29
|
+
function f(e) {
|
|
30
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
31
|
+
var n = arguments[t] == null ? {} : arguments[t];
|
|
32
|
+
t % 2 ? d(Object(n), !0).forEach(function(t) {
|
|
33
|
+
p(e, t, n[t]);
|
|
34
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : d(Object(n)).forEach(function(t) {
|
|
35
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return e;
|
|
39
|
+
}
|
|
40
|
+
function p(e, t, n) {
|
|
41
|
+
return (t = _(t)) in e ? Object.defineProperty(e, t, {
|
|
42
|
+
value: n,
|
|
43
|
+
enumerable: !0,
|
|
44
|
+
configurable: !0,
|
|
45
|
+
writable: !0
|
|
46
|
+
}) : e[t] = n, e;
|
|
47
|
+
}
|
|
48
|
+
function m(e, t) {
|
|
49
|
+
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
50
|
+
}
|
|
51
|
+
function h(e, t) {
|
|
52
|
+
for (var n = 0; n < t.length; n++) {
|
|
53
|
+
var r = t[n];
|
|
54
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, _(r.key), r);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function g(e, t, n) {
|
|
58
|
+
return t && h(e.prototype, t), n && h(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
59
|
+
}
|
|
60
|
+
function _(e) {
|
|
61
|
+
var t = v(e, "string");
|
|
62
|
+
return u(t) == "symbol" ? t : t + "";
|
|
63
|
+
}
|
|
64
|
+
function v(e, t) {
|
|
65
|
+
if (u(e) != "object" || !e) return e;
|
|
66
|
+
var n = e[Symbol.toPrimitive];
|
|
67
|
+
if (n !== void 0) {
|
|
68
|
+
var r = n.call(e, t || "default");
|
|
69
|
+
if (u(r) != "object") return r;
|
|
70
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
71
|
+
}
|
|
72
|
+
return (t === "string" ? String : Number)(e);
|
|
73
|
+
}
|
|
74
|
+
var y = /*#__PURE__*/ function() {
|
|
75
|
+
function u(t, r, i) {
|
|
76
|
+
if (m(this, u), !t) throw TypeError("First argument is required");
|
|
77
|
+
if (typeof t != "string") throw TypeError("First argument must be a string");
|
|
78
|
+
if (t[0] === "+" && !r) throw TypeError("`metadata` argument not passed");
|
|
79
|
+
if (e(r) && e(r.countries)) {
|
|
80
|
+
i = r;
|
|
81
|
+
var a = t;
|
|
82
|
+
if (!b.test(a)) throw Error("Invalid `number` argument passed: must consist of a \"+\" followed by digits");
|
|
83
|
+
var s = c(a, void 0, void 0, void 0, i), l = s.countryCallingCode;
|
|
84
|
+
if (r = s.number, t = l, !r) throw Error("Invalid `number` argument passed: too short");
|
|
85
|
+
}
|
|
86
|
+
if (!r) throw TypeError("`nationalNumber` argument is required");
|
|
87
|
+
if (typeof r != "string") throw TypeError("`nationalNumber` argument must be a string");
|
|
88
|
+
n(i);
|
|
89
|
+
var d = o(t, i), f = d.country, p = d.callingCode;
|
|
90
|
+
this.country = f, this.countryCallingCode = p, this.nationalNumber = r, this.number = "+" + this.countryCallingCode + this.nationalNumber, this.getMetadata = function() {
|
|
91
|
+
return i;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
return g(u, [
|
|
95
|
+
{
|
|
96
|
+
key: "setExt",
|
|
97
|
+
value: function(e) {
|
|
98
|
+
this.ext = e;
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
key: "getPossibleCountries",
|
|
103
|
+
value: function() {
|
|
104
|
+
return this.country ? [this.country] : s(this.countryCallingCode, this.nationalNumber, this.getMetadata());
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
key: "isPossible",
|
|
109
|
+
value: function() {
|
|
110
|
+
return r(this, { v2: !0 }, this.getMetadata());
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
key: "isValid",
|
|
115
|
+
value: function() {
|
|
116
|
+
return a(this, { v2: !0 }, this.getMetadata());
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
key: "isNonGeographic",
|
|
121
|
+
value: function() {
|
|
122
|
+
return new t(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode);
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
key: "isEqual",
|
|
127
|
+
value: function(e) {
|
|
128
|
+
return this.number === e.number && this.ext === e.ext;
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
key: "getType",
|
|
133
|
+
value: function() {
|
|
134
|
+
return i(this, { v2: !0 }, this.getMetadata());
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
key: "format",
|
|
139
|
+
value: function(e, t) {
|
|
140
|
+
return l(this, e, t ? f(f({}, t), {}, { v2: !0 }) : { v2: !0 }, this.getMetadata());
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
key: "formatNational",
|
|
145
|
+
value: function(e) {
|
|
146
|
+
return this.format("NATIONAL", e);
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
key: "formatInternational",
|
|
151
|
+
value: function(e) {
|
|
152
|
+
return this.format("INTERNATIONAL", e);
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
key: "getURI",
|
|
157
|
+
value: function(e) {
|
|
158
|
+
return this.format("RFC3966", e);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
]);
|
|
162
|
+
}(), b = /^\+\d+$/;
|
|
163
|
+
//#endregion
|
|
164
|
+
export { y as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/constants.js
|
|
2
|
+
var e = "0-90-9٠-٩۰-۹", t = "-‐-―−ー-", n = "//", r = "..", i = " \xA0 ", a = `${t}${n}${r}${i}()()[]\\[\\]~⁓∼~`, o = "++";
|
|
3
|
+
//#endregion
|
|
4
|
+
export { o as PLUS_CHARS, e as VALID_DIGITS, a as VALID_PUNCTUATION, i as WHITESPACE };
|