@caspeco/casper-ui-library 10.0.4 → 10.1.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/dist/components/input/input-recipe.d.ts.map +1 -1
- package/dist/components/input/input-recipe.js +8 -3
- package/dist/components/input/input.composition.d.ts.map +1 -1
- package/dist/components/input/input.d.ts +1 -0
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/input/input.js +76 -52
- package/dist/components/input/types.d.ts +2 -2
- package/dist/components/input/types.d.ts.map +1 -1
- package/dist/components/menu/menu-box-button.d.ts +4 -1
- package/dist/components/menu/menu-box-button.d.ts.map +1 -1
- package/dist/components/menu/menu-box-button.js +15 -14
- package/dist/components/phone-input/country-data.d.ts +22 -0
- package/dist/components/phone-input/country-data.d.ts.map +1 -0
- package/dist/components/phone-input/country-data.js +38 -0
- package/dist/components/phone-input/country-data.spec.d.ts +2 -0
- package/dist/components/phone-input/country-data.spec.d.ts.map +1 -0
- package/dist/components/phone-input/country-list.d.ts +19 -0
- package/dist/components/phone-input/country-list.d.ts.map +1 -0
- package/dist/components/phone-input/country-list.js +27 -0
- package/dist/components/phone-input/country-selector.d.ts +59 -0
- package/dist/components/phone-input/country-selector.d.ts.map +1 -0
- package/dist/components/phone-input/country-selector.js +120 -0
- package/dist/components/phone-input/index.d.ts +5 -0
- package/dist/components/phone-input/index.d.ts.map +1 -0
- package/dist/components/phone-input/phone-input-helpers.d.ts +47 -0
- package/dist/components/phone-input/phone-input-helpers.d.ts.map +1 -0
- package/dist/components/phone-input/phone-input-helpers.js +134 -0
- package/dist/components/phone-input/phone-input-helpers.spec.d.ts +2 -0
- package/dist/components/phone-input/phone-input-helpers.spec.d.ts.map +1 -0
- package/dist/components/phone-input/phone-input.composition.d.ts +26 -0
- package/dist/components/phone-input/phone-input.composition.d.ts.map +1 -0
- package/dist/components/phone-input/phone-input.d.ts +22 -0
- package/dist/components/phone-input/phone-input.d.ts.map +1 -0
- package/dist/components/phone-input/phone-input.js +43 -0
- package/dist/components/phone-input/phone-input.spec.d.ts +2 -0
- package/dist/components/phone-input/phone-input.spec.d.ts.map +1 -0
- package/dist/components/phone-input/phone-input.visual.test.d.ts +2 -0
- package/dist/components/phone-input/phone-input.visual.test.d.ts.map +1 -0
- package/dist/components/phone-input/translations.d.ts +60 -0
- package/dist/components/phone-input/translations.d.ts.map +1 -0
- package/dist/components/phone-input/translations.js +54 -0
- package/dist/components/phone-input/types.d.ts +45 -0
- package/dist/components/phone-input/types.d.ts.map +1 -0
- package/dist/components/phone-input/use-phone-input.d.ts +49 -0
- package/dist/components/phone-input/use-phone-input.d.ts.map +1 -0
- package/dist/components/phone-input/use-phone-input.js +138 -0
- package/dist/components/phone-input/use-phone-input.spec.d.ts +2 -0
- package/dist/components/phone-input/use-phone-input.spec.d.ts.map +1 -0
- package/dist/hooks/use-measured-width.d.ts +23 -0
- package/dist/hooks/use-measured-width.d.ts.map +1 -0
- package/dist/hooks/use-measured-width.js +22 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +289 -285
- package/dist/node_modules/country-flag-icons/modules/countries.json.js +4 -0
- package/dist/node_modules/country-flag-icons/modules/hasFlag.js +7 -0
- package/dist/node_modules/country-flag-icons/modules/react/3x2/index.js +6303 -0
- package/dist/node_modules/country-flag-icons/react/3x2/index.js +269 -0
- package/dist/node_modules/libphonenumber-js/es6/ParseError.js +89 -0
- package/dist/node_modules/libphonenumber-js/es6/PhoneNumber.js +192 -0
- package/dist/node_modules/libphonenumber-js/es6/constants.js +10 -0
- package/dist/node_modules/libphonenumber-js/es6/format.js +98 -0
- package/dist/node_modules/libphonenumber-js/es6/getCountries.js +7 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/RFC3966.js +11 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +7 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +16 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +11 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js +18 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +46 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +27 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +23 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js +39 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +31 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js +23 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +25 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryAndCallingCodeFromOneOfThem.js +12 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +9 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +43 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js +12 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +52 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +14 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/isCallingCode.js +7 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/isCountryCode.js +7 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/isObject.js +7 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +20 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js +6 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/parseDigits.js +79 -0
- package/dist/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js +19 -0
- package/dist/node_modules/libphonenumber-js/es6/isPossible.js +35 -0
- package/dist/node_modules/libphonenumber-js/es6/isValid.js +14 -0
- package/dist/node_modules/libphonenumber-js/es6/isValidPhoneNumber.js +59 -0
- package/dist/node_modules/libphonenumber-js/es6/metadata.js +494 -0
- package/dist/node_modules/libphonenumber-js/es6/normalizeArguments.js +108 -0
- package/dist/node_modules/libphonenumber-js/es6/parse.js +138 -0
- package/dist/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +40 -0
- package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumber.js +9 -0
- package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js +55 -0
- package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js +62 -0
- package/dist/node_modules/libphonenumber-js/es6/tools/semver-compare.js +14 -0
- package/dist/node_modules/libphonenumber-js/metadata.min.json.js +4 -0
- package/dist/node_modules/libphonenumber-js/min/exports/getCountries.js +8 -0
- package/dist/node_modules/libphonenumber-js/min/exports/getCountryCallingCode.js +8 -0
- package/dist/node_modules/libphonenumber-js/min/exports/isSupportedCountry.js +8 -0
- package/dist/node_modules/libphonenumber-js/min/exports/isValidPhoneNumber.js +8 -0
- package/dist/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js +8 -0
- package/dist/node_modules/libphonenumber-js/min/exports/withMetadataArgument.js +8 -0
- package/dist/test-utils/create-visual-tests.d.ts.map +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { AC as G, AD as B, AE as A, AF as C, AG as T, AI as E, AL as N, AM as I, AO as L, AQ as K, AR as R, AS as P, AT as U, AU as F, AW as H, AX as O, AZ as D, BA as V, BB as W, BD as Z, BE as Y, BF as J, BG as Q, BH as X, BI as _, BJ as e, BL as f, BM as o, BN as r, BO as t, BQ as a, BQ_BO as d, BQ_SA as l, BQ_SE as m, BR as p, BS as u, BT as x, BV as b, BW as c, BY as g, BZ as h, CA as i, CC as j, CD as k, CF as n, CG as q, CH as s, CI as v, CK as w, CL as y, CM as z, CN as $, CO as MM, CR as SM, CU as GM, CV as BM, CW as AM, CX as CM, CY as TM, CZ as EM, DE as NM, DJ as IM, DK as LM, DM as KM, DO as RM, DZ as PM, EC as UM, EE as FM, EG as HM, EH as OM, ER as DM, ES as VM, ES_CT as WM, ET as ZM, EU as YM, FI as JM, FJ as QM, FK as XM, FM as _M, FO as eM, FR as fM, GA as oM, GB as rM, GB_ENG as tM, GB_NIR as aM, GB_SCT as dM, GB_WLS as lM, GD as mM, GE as pM, GF as uM, GG as xM, GH as bM, GI as cM, GL as gM, GM as hM, GN as iM, GP as jM, GQ as kM, GR as nM, GS as qM, GT as sM, GU as vM, GW as wM, GY as yM, HK as zM, HM as $M, HN as MS, HR as SS, HT as GS, HU as BS, IC as AS, ID as CS, IE as TS, IL as ES, IM as NS, IN as IS, IO as LS, IQ as KS, IR as RS, IS as PS, IT as US, JE as FS, JM as HS, JO as OS, JP as DS, KE as VS, KG as WS, KH as ZS, KI as YS, KM as JS, KN as QS, KP as XS, KR as _S, KW as eS, KY as fS, KZ as oS, LA as rS, LB as tS, LC as aS, LI as dS, LK as lS, LR as mS, LS as pS, LT as uS, LU as xS, LV as bS, LY as cS, MA as gS, MC as hS, MD as iS, ME as jS, MF as kS, MG as nS, MH as qS, MK as sS, ML as vS, MM as wS, MN as yS, MO as zS, MP as $S, MQ as MG, MR as SG, MS as GG, MT as BG, MU as AG, MV as CG, MW as TG, MX as EG, MY as NG, MZ as IG, NA as LG, NC as KG, NE as RG, NF as PG, NG as UG, NI as FG, NL as HG, NO as OG, NP as DG, NR as VG, NU as WG, NZ as ZG, OM as YG, PA as JG, PE as QG, PF as XG, PG as _G, PH as eG, PK as fG, PL as oG, PM as rG, PN as tG, PR as aG, PS as dG, PT as lG, PW as mG, PY as pG, QA as uG, RE as xG, RO as bG, RS as cG, RU as gG, RW as hG, SA as iG, SB as jG, SC as kG, SD as nG, SE as qG, SG as sG, SH as vG, SI as wG, SJ as yG, SK as zG, SL as $G, SM as MB, SN as SB, SO as GB, SR as BB, SS as AB, ST as CB, SV as TB, SX as EB, SY as NB, SZ as IB, TA as LB, TC as KB, TD as RB, TF as PB, TG as UB, TH as FB, TJ as HB, TK as OB, TL as DB, TM as VB, TN as WB, TO as ZB, TR as YB, TT as JB, TV as QB, TW as XB, TZ as _B, UA as eB, UG as fB, UM as oB, US as rB, UY as tB, UZ as aB, VA as dB, VC as lB, VE as mB, VG as pB, VI as uB, VN as xB, VU as bB, WF as cB, WS as gB, XA as hB, XC as iB, XK as jB, XO as kB, YE as nB, YT as qB, ZA as sB, ZM as vB, ZW as wB, default as yB } from "../../modules/react/3x2/index.js";
|
|
2
|
+
export {
|
|
3
|
+
G as AC,
|
|
4
|
+
B as AD,
|
|
5
|
+
A as AE,
|
|
6
|
+
C as AF,
|
|
7
|
+
T as AG,
|
|
8
|
+
E as AI,
|
|
9
|
+
N as AL,
|
|
10
|
+
I as AM,
|
|
11
|
+
L as AO,
|
|
12
|
+
K as AQ,
|
|
13
|
+
R as AR,
|
|
14
|
+
P as AS,
|
|
15
|
+
U as AT,
|
|
16
|
+
F as AU,
|
|
17
|
+
H as AW,
|
|
18
|
+
O as AX,
|
|
19
|
+
D as AZ,
|
|
20
|
+
V as BA,
|
|
21
|
+
W as BB,
|
|
22
|
+
Z as BD,
|
|
23
|
+
Y as BE,
|
|
24
|
+
J as BF,
|
|
25
|
+
Q as BG,
|
|
26
|
+
X as BH,
|
|
27
|
+
_ as BI,
|
|
28
|
+
e as BJ,
|
|
29
|
+
f as BL,
|
|
30
|
+
o as BM,
|
|
31
|
+
r as BN,
|
|
32
|
+
t as BO,
|
|
33
|
+
a as BQ,
|
|
34
|
+
d as BQ_BO,
|
|
35
|
+
l as BQ_SA,
|
|
36
|
+
m as BQ_SE,
|
|
37
|
+
p as BR,
|
|
38
|
+
u as BS,
|
|
39
|
+
x as BT,
|
|
40
|
+
b as BV,
|
|
41
|
+
c as BW,
|
|
42
|
+
g as BY,
|
|
43
|
+
h as BZ,
|
|
44
|
+
i as CA,
|
|
45
|
+
j as CC,
|
|
46
|
+
k as CD,
|
|
47
|
+
n as CF,
|
|
48
|
+
q as CG,
|
|
49
|
+
s as CH,
|
|
50
|
+
v as CI,
|
|
51
|
+
w as CK,
|
|
52
|
+
y as CL,
|
|
53
|
+
z as CM,
|
|
54
|
+
$ as CN,
|
|
55
|
+
MM as CO,
|
|
56
|
+
SM as CR,
|
|
57
|
+
GM as CU,
|
|
58
|
+
BM as CV,
|
|
59
|
+
AM as CW,
|
|
60
|
+
CM as CX,
|
|
61
|
+
TM as CY,
|
|
62
|
+
EM as CZ,
|
|
63
|
+
NM as DE,
|
|
64
|
+
IM as DJ,
|
|
65
|
+
LM as DK,
|
|
66
|
+
KM as DM,
|
|
67
|
+
RM as DO,
|
|
68
|
+
PM as DZ,
|
|
69
|
+
UM as EC,
|
|
70
|
+
FM as EE,
|
|
71
|
+
HM as EG,
|
|
72
|
+
OM as EH,
|
|
73
|
+
DM as ER,
|
|
74
|
+
VM as ES,
|
|
75
|
+
WM as ES_CT,
|
|
76
|
+
ZM as ET,
|
|
77
|
+
YM as EU,
|
|
78
|
+
JM as FI,
|
|
79
|
+
QM as FJ,
|
|
80
|
+
XM as FK,
|
|
81
|
+
_M as FM,
|
|
82
|
+
eM as FO,
|
|
83
|
+
fM as FR,
|
|
84
|
+
oM as GA,
|
|
85
|
+
rM as GB,
|
|
86
|
+
tM as GB_ENG,
|
|
87
|
+
aM as GB_NIR,
|
|
88
|
+
dM as GB_SCT,
|
|
89
|
+
lM as GB_WLS,
|
|
90
|
+
mM as GD,
|
|
91
|
+
pM as GE,
|
|
92
|
+
uM as GF,
|
|
93
|
+
xM as GG,
|
|
94
|
+
bM as GH,
|
|
95
|
+
cM as GI,
|
|
96
|
+
gM as GL,
|
|
97
|
+
hM as GM,
|
|
98
|
+
iM as GN,
|
|
99
|
+
jM as GP,
|
|
100
|
+
kM as GQ,
|
|
101
|
+
nM as GR,
|
|
102
|
+
qM as GS,
|
|
103
|
+
sM as GT,
|
|
104
|
+
vM as GU,
|
|
105
|
+
wM as GW,
|
|
106
|
+
yM as GY,
|
|
107
|
+
zM as HK,
|
|
108
|
+
$M as HM,
|
|
109
|
+
MS as HN,
|
|
110
|
+
SS as HR,
|
|
111
|
+
GS as HT,
|
|
112
|
+
BS as HU,
|
|
113
|
+
AS as IC,
|
|
114
|
+
CS as ID,
|
|
115
|
+
TS as IE,
|
|
116
|
+
ES as IL,
|
|
117
|
+
NS as IM,
|
|
118
|
+
IS as IN,
|
|
119
|
+
LS as IO,
|
|
120
|
+
KS as IQ,
|
|
121
|
+
RS as IR,
|
|
122
|
+
PS as IS,
|
|
123
|
+
US as IT,
|
|
124
|
+
FS as JE,
|
|
125
|
+
HS as JM,
|
|
126
|
+
OS as JO,
|
|
127
|
+
DS as JP,
|
|
128
|
+
VS as KE,
|
|
129
|
+
WS as KG,
|
|
130
|
+
ZS as KH,
|
|
131
|
+
YS as KI,
|
|
132
|
+
JS as KM,
|
|
133
|
+
QS as KN,
|
|
134
|
+
XS as KP,
|
|
135
|
+
_S as KR,
|
|
136
|
+
eS as KW,
|
|
137
|
+
fS as KY,
|
|
138
|
+
oS as KZ,
|
|
139
|
+
rS as LA,
|
|
140
|
+
tS as LB,
|
|
141
|
+
aS as LC,
|
|
142
|
+
dS as LI,
|
|
143
|
+
lS as LK,
|
|
144
|
+
mS as LR,
|
|
145
|
+
pS as LS,
|
|
146
|
+
uS as LT,
|
|
147
|
+
xS as LU,
|
|
148
|
+
bS as LV,
|
|
149
|
+
cS as LY,
|
|
150
|
+
gS as MA,
|
|
151
|
+
hS as MC,
|
|
152
|
+
iS as MD,
|
|
153
|
+
jS as ME,
|
|
154
|
+
kS as MF,
|
|
155
|
+
nS as MG,
|
|
156
|
+
qS as MH,
|
|
157
|
+
sS as MK,
|
|
158
|
+
vS as ML,
|
|
159
|
+
wS as MM,
|
|
160
|
+
yS as MN,
|
|
161
|
+
zS as MO,
|
|
162
|
+
$S as MP,
|
|
163
|
+
MG as MQ,
|
|
164
|
+
SG as MR,
|
|
165
|
+
GG as MS,
|
|
166
|
+
BG as MT,
|
|
167
|
+
AG as MU,
|
|
168
|
+
CG as MV,
|
|
169
|
+
TG as MW,
|
|
170
|
+
EG as MX,
|
|
171
|
+
NG as MY,
|
|
172
|
+
IG as MZ,
|
|
173
|
+
LG as NA,
|
|
174
|
+
KG as NC,
|
|
175
|
+
RG as NE,
|
|
176
|
+
PG as NF,
|
|
177
|
+
UG as NG,
|
|
178
|
+
FG as NI,
|
|
179
|
+
HG as NL,
|
|
180
|
+
OG as NO,
|
|
181
|
+
DG as NP,
|
|
182
|
+
VG as NR,
|
|
183
|
+
WG as NU,
|
|
184
|
+
ZG as NZ,
|
|
185
|
+
YG as OM,
|
|
186
|
+
JG as PA,
|
|
187
|
+
QG as PE,
|
|
188
|
+
XG as PF,
|
|
189
|
+
_G as PG,
|
|
190
|
+
eG as PH,
|
|
191
|
+
fG as PK,
|
|
192
|
+
oG as PL,
|
|
193
|
+
rG as PM,
|
|
194
|
+
tG as PN,
|
|
195
|
+
aG as PR,
|
|
196
|
+
dG as PS,
|
|
197
|
+
lG as PT,
|
|
198
|
+
mG as PW,
|
|
199
|
+
pG as PY,
|
|
200
|
+
uG as QA,
|
|
201
|
+
xG as RE,
|
|
202
|
+
bG as RO,
|
|
203
|
+
cG as RS,
|
|
204
|
+
gG as RU,
|
|
205
|
+
hG as RW,
|
|
206
|
+
iG as SA,
|
|
207
|
+
jG as SB,
|
|
208
|
+
kG as SC,
|
|
209
|
+
nG as SD,
|
|
210
|
+
qG as SE,
|
|
211
|
+
sG as SG,
|
|
212
|
+
vG as SH,
|
|
213
|
+
wG as SI,
|
|
214
|
+
yG as SJ,
|
|
215
|
+
zG as SK,
|
|
216
|
+
$G as SL,
|
|
217
|
+
MB as SM,
|
|
218
|
+
SB as SN,
|
|
219
|
+
GB as SO,
|
|
220
|
+
BB as SR,
|
|
221
|
+
AB as SS,
|
|
222
|
+
CB as ST,
|
|
223
|
+
TB as SV,
|
|
224
|
+
EB as SX,
|
|
225
|
+
NB as SY,
|
|
226
|
+
IB as SZ,
|
|
227
|
+
LB as TA,
|
|
228
|
+
KB as TC,
|
|
229
|
+
RB as TD,
|
|
230
|
+
PB as TF,
|
|
231
|
+
UB as TG,
|
|
232
|
+
FB as TH,
|
|
233
|
+
HB as TJ,
|
|
234
|
+
OB as TK,
|
|
235
|
+
DB as TL,
|
|
236
|
+
VB as TM,
|
|
237
|
+
WB as TN,
|
|
238
|
+
ZB as TO,
|
|
239
|
+
YB as TR,
|
|
240
|
+
JB as TT,
|
|
241
|
+
QB as TV,
|
|
242
|
+
XB as TW,
|
|
243
|
+
_B as TZ,
|
|
244
|
+
eB as UA,
|
|
245
|
+
fB as UG,
|
|
246
|
+
oB as UM,
|
|
247
|
+
rB as US,
|
|
248
|
+
tB as UY,
|
|
249
|
+
aB as UZ,
|
|
250
|
+
dB as VA,
|
|
251
|
+
lB as VC,
|
|
252
|
+
mB as VE,
|
|
253
|
+
pB as VG,
|
|
254
|
+
uB as VI,
|
|
255
|
+
xB as VN,
|
|
256
|
+
bB as VU,
|
|
257
|
+
cB as WF,
|
|
258
|
+
gB as WS,
|
|
259
|
+
hB as XA,
|
|
260
|
+
iB as XC,
|
|
261
|
+
jB as XK,
|
|
262
|
+
kB as XO,
|
|
263
|
+
nB as YE,
|
|
264
|
+
qB as YT,
|
|
265
|
+
sB as ZA,
|
|
266
|
+
vB as ZM,
|
|
267
|
+
wB as ZW,
|
|
268
|
+
yB as default
|
|
269
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
function i(r) {
|
|
2
|
+
"@babel/helpers - typeof";
|
|
3
|
+
return i = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
4
|
+
return typeof t;
|
|
5
|
+
} : function(t) {
|
|
6
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
7
|
+
}, i(r);
|
|
8
|
+
}
|
|
9
|
+
function a(r, t, n) {
|
|
10
|
+
return Object.defineProperty(r, "prototype", { writable: !1 }), r;
|
|
11
|
+
}
|
|
12
|
+
function s(r, t) {
|
|
13
|
+
if (!(r instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
14
|
+
}
|
|
15
|
+
function l(r, t, n) {
|
|
16
|
+
return t = c(t), y(r, p() ? Reflect.construct(t, n || [], c(r).constructor) : t.apply(r, n));
|
|
17
|
+
}
|
|
18
|
+
function y(r, t) {
|
|
19
|
+
if (t && (i(t) == "object" || typeof t == "function")) return t;
|
|
20
|
+
if (t !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
21
|
+
return b(r);
|
|
22
|
+
}
|
|
23
|
+
function b(r) {
|
|
24
|
+
if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
25
|
+
return r;
|
|
26
|
+
}
|
|
27
|
+
function _(r, t) {
|
|
28
|
+
if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function");
|
|
29
|
+
r.prototype = Object.create(t && t.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), Object.defineProperty(r, "prototype", { writable: !1 }), t && u(r, t);
|
|
30
|
+
}
|
|
31
|
+
function f(r) {
|
|
32
|
+
var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
33
|
+
return f = function(e) {
|
|
34
|
+
if (e === null || !v(e)) return e;
|
|
35
|
+
if (typeof e != "function") throw new TypeError("Super expression must either be null or a function");
|
|
36
|
+
if (t !== void 0) {
|
|
37
|
+
if (t.has(e)) return t.get(e);
|
|
38
|
+
t.set(e, o);
|
|
39
|
+
}
|
|
40
|
+
function o() {
|
|
41
|
+
return h(e, arguments, c(this).constructor);
|
|
42
|
+
}
|
|
43
|
+
return o.prototype = Object.create(e.prototype, { constructor: { value: o, enumerable: !1, writable: !0, configurable: !0 } }), u(o, e);
|
|
44
|
+
}, f(r);
|
|
45
|
+
}
|
|
46
|
+
function h(r, t, n) {
|
|
47
|
+
if (p()) return Reflect.construct.apply(null, arguments);
|
|
48
|
+
var e = [null];
|
|
49
|
+
e.push.apply(e, t);
|
|
50
|
+
var o = new (r.bind.apply(r, e))();
|
|
51
|
+
return n && u(o, n.prototype), o;
|
|
52
|
+
}
|
|
53
|
+
function p() {
|
|
54
|
+
try {
|
|
55
|
+
var r = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
56
|
+
}));
|
|
57
|
+
} catch {
|
|
58
|
+
}
|
|
59
|
+
return (p = function() {
|
|
60
|
+
return !!r;
|
|
61
|
+
})();
|
|
62
|
+
}
|
|
63
|
+
function v(r) {
|
|
64
|
+
try {
|
|
65
|
+
return Function.toString.call(r).indexOf("[native code]") !== -1;
|
|
66
|
+
} catch {
|
|
67
|
+
return typeof r == "function";
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function u(r, t) {
|
|
71
|
+
return u = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, e) {
|
|
72
|
+
return n.__proto__ = e, n;
|
|
73
|
+
}, u(r, t);
|
|
74
|
+
}
|
|
75
|
+
function c(r) {
|
|
76
|
+
return c = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
77
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
78
|
+
}, c(r);
|
|
79
|
+
}
|
|
80
|
+
var O = /* @__PURE__ */ (function(r) {
|
|
81
|
+
function t(n) {
|
|
82
|
+
var e;
|
|
83
|
+
return s(this, t), e = l(this, t, [n]), Object.setPrototypeOf(e, t.prototype), e.name = e.constructor.name, e;
|
|
84
|
+
}
|
|
85
|
+
return _(t, r), a(t);
|
|
86
|
+
})(/* @__PURE__ */ f(Error));
|
|
87
|
+
export {
|
|
88
|
+
O as default
|
|
89
|
+
};
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import g, { validateMetadata as h } from "./metadata.js";
|
|
2
|
+
import d from "./isPossible.js";
|
|
3
|
+
import v from "./isValid.js";
|
|
4
|
+
import w from "./helpers/getNumberType.js";
|
|
5
|
+
import P from "./helpers/getCountryAndCallingCodeFromOneOfThem.js";
|
|
6
|
+
import E from "./helpers/getPossibleCountriesForNumber.js";
|
|
7
|
+
import O from "./helpers/extractCountryCallingCode.js";
|
|
8
|
+
import s from "./helpers/isObject.js";
|
|
9
|
+
import j from "./format.js";
|
|
10
|
+
function i(r) {
|
|
11
|
+
"@babel/helpers - typeof";
|
|
12
|
+
return i = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
13
|
+
return typeof e;
|
|
14
|
+
} : function(e) {
|
|
15
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
16
|
+
}, i(r);
|
|
17
|
+
}
|
|
18
|
+
function f(r, e) {
|
|
19
|
+
var t = Object.keys(r);
|
|
20
|
+
if (Object.getOwnPropertySymbols) {
|
|
21
|
+
var n = Object.getOwnPropertySymbols(r);
|
|
22
|
+
e && (n = n.filter(function(o) {
|
|
23
|
+
return Object.getOwnPropertyDescriptor(r, o).enumerable;
|
|
24
|
+
})), t.push.apply(t, n);
|
|
25
|
+
}
|
|
26
|
+
return t;
|
|
27
|
+
}
|
|
28
|
+
function l(r) {
|
|
29
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
30
|
+
var t = arguments[e] != null ? arguments[e] : {};
|
|
31
|
+
e % 2 ? f(Object(t), !0).forEach(function(n) {
|
|
32
|
+
k(r, n, t[n]);
|
|
33
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : f(Object(t)).forEach(function(n) {
|
|
34
|
+
Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n));
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return r;
|
|
38
|
+
}
|
|
39
|
+
function k(r, e, t) {
|
|
40
|
+
return (e = c(e)) in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
|
|
41
|
+
}
|
|
42
|
+
function C(r, e) {
|
|
43
|
+
if (!(r instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
44
|
+
}
|
|
45
|
+
function T(r, e) {
|
|
46
|
+
for (var t = 0; t < e.length; t++) {
|
|
47
|
+
var n = e[t];
|
|
48
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, c(n.key), n);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function N(r, e, t) {
|
|
52
|
+
return e && T(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r;
|
|
53
|
+
}
|
|
54
|
+
function c(r) {
|
|
55
|
+
var e = M(r, "string");
|
|
56
|
+
return i(e) == "symbol" ? e : e + "";
|
|
57
|
+
}
|
|
58
|
+
function M(r, e) {
|
|
59
|
+
if (i(r) != "object" || !r) return r;
|
|
60
|
+
var t = r[Symbol.toPrimitive];
|
|
61
|
+
if (t !== void 0) {
|
|
62
|
+
var n = t.call(r, e);
|
|
63
|
+
if (i(n) != "object") return n;
|
|
64
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
65
|
+
}
|
|
66
|
+
return String(r);
|
|
67
|
+
}
|
|
68
|
+
var U = /* @__PURE__ */ (function() {
|
|
69
|
+
function r(e, t, n) {
|
|
70
|
+
if (C(this, r), !e)
|
|
71
|
+
throw new TypeError("First argument is required");
|
|
72
|
+
if (typeof e != "string")
|
|
73
|
+
throw new TypeError("First argument must be a string");
|
|
74
|
+
if (e[0] === "+" && !t)
|
|
75
|
+
throw new TypeError("`metadata` argument not passed");
|
|
76
|
+
if (s(t) && s(t.countries)) {
|
|
77
|
+
n = t;
|
|
78
|
+
var o = e;
|
|
79
|
+
if (!S.test(o))
|
|
80
|
+
throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');
|
|
81
|
+
var u = O(o, void 0, void 0, void 0, n), m = u.countryCallingCode, y = u.number;
|
|
82
|
+
if (t = y, e = m, !t)
|
|
83
|
+
throw new Error("Invalid `number` argument passed: too short");
|
|
84
|
+
}
|
|
85
|
+
if (!t)
|
|
86
|
+
throw new TypeError("`nationalNumber` argument is required");
|
|
87
|
+
if (typeof t != "string")
|
|
88
|
+
throw new TypeError("`nationalNumber` argument must be a string");
|
|
89
|
+
h(n);
|
|
90
|
+
var a = P(e, n), p = a.country, b = a.callingCode;
|
|
91
|
+
this.country = p, this.countryCallingCode = b, this.nationalNumber = t, this.number = "+" + this.countryCallingCode + this.nationalNumber, this.getMetadata = function() {
|
|
92
|
+
return n;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
return N(r, [{
|
|
96
|
+
key: "setExt",
|
|
97
|
+
value: function(t) {
|
|
98
|
+
this.ext = t;
|
|
99
|
+
}
|
|
100
|
+
}, {
|
|
101
|
+
key: "getPossibleCountries",
|
|
102
|
+
value: function() {
|
|
103
|
+
return this.country ? [this.country] : E(this.countryCallingCode, this.nationalNumber, this.getMetadata());
|
|
104
|
+
}
|
|
105
|
+
}, {
|
|
106
|
+
key: "isPossible",
|
|
107
|
+
value: function() {
|
|
108
|
+
return d(this, {
|
|
109
|
+
v2: !0
|
|
110
|
+
}, this.getMetadata());
|
|
111
|
+
}
|
|
112
|
+
}, {
|
|
113
|
+
key: "isValid",
|
|
114
|
+
value: function() {
|
|
115
|
+
return v(this, {
|
|
116
|
+
v2: !0
|
|
117
|
+
}, this.getMetadata());
|
|
118
|
+
}
|
|
119
|
+
}, {
|
|
120
|
+
key: "isNonGeographic",
|
|
121
|
+
value: function() {
|
|
122
|
+
var t = new g(this.getMetadata());
|
|
123
|
+
return t.isNonGeographicCallingCode(this.countryCallingCode);
|
|
124
|
+
}
|
|
125
|
+
}, {
|
|
126
|
+
key: "isEqual",
|
|
127
|
+
value: function(t) {
|
|
128
|
+
return this.number === t.number && this.ext === t.ext;
|
|
129
|
+
}
|
|
130
|
+
// `validateLength()` method was originally meant to be an equivalent for `validatePhoneNumberLength()`.
|
|
131
|
+
//
|
|
132
|
+
// Later, it became apparent that it's not really a true equivalent.
|
|
133
|
+
// The reason is that a `PhoneNumber` instance is not created
|
|
134
|
+
// when the phone number string is too short for it to be considered a valid phone number:
|
|
135
|
+
// * When there must be at least 2 national (significant) number digits: `"1"`.
|
|
136
|
+
// * When the country calling code part of an international number is incomplete: `"+12"`.
|
|
137
|
+
//
|
|
138
|
+
// So leaving this `validateLength()` method here would suggest a hidden anti-pattern
|
|
139
|
+
// of using it instead of `validatePhoneNumberLength()` while ignoring
|
|
140
|
+
// the "too short to be even possible" case from phone number length validation.
|
|
141
|
+
// And ignoring that case wouldn't make any sense in a real-world application
|
|
142
|
+
// because it would still be a valid case that should be handled.
|
|
143
|
+
//
|
|
144
|
+
// Because of that, this method was eventually commented out in order to not introduce
|
|
145
|
+
// that kind of an anti-pattern.
|
|
146
|
+
//
|
|
147
|
+
// validateLength() {
|
|
148
|
+
// const result = checkNumberLength(
|
|
149
|
+
// this.nationalNumber,
|
|
150
|
+
// undefined,
|
|
151
|
+
// this.getMetadata()
|
|
152
|
+
// )
|
|
153
|
+
// if (result !== 'IS_POSSIBLE') {
|
|
154
|
+
// return result
|
|
155
|
+
// }
|
|
156
|
+
// }
|
|
157
|
+
}, {
|
|
158
|
+
key: "getType",
|
|
159
|
+
value: function() {
|
|
160
|
+
return w(this, {
|
|
161
|
+
v2: !0
|
|
162
|
+
}, this.getMetadata());
|
|
163
|
+
}
|
|
164
|
+
}, {
|
|
165
|
+
key: "format",
|
|
166
|
+
value: function(t, n) {
|
|
167
|
+
return j(this, t, n ? l(l({}, n), {}, {
|
|
168
|
+
v2: !0
|
|
169
|
+
}) : {
|
|
170
|
+
v2: !0
|
|
171
|
+
}, this.getMetadata());
|
|
172
|
+
}
|
|
173
|
+
}, {
|
|
174
|
+
key: "formatNational",
|
|
175
|
+
value: function(t) {
|
|
176
|
+
return this.format("NATIONAL", t);
|
|
177
|
+
}
|
|
178
|
+
}, {
|
|
179
|
+
key: "formatInternational",
|
|
180
|
+
value: function(t) {
|
|
181
|
+
return this.format("INTERNATIONAL", t);
|
|
182
|
+
}
|
|
183
|
+
}, {
|
|
184
|
+
key: "getURI",
|
|
185
|
+
value: function(t) {
|
|
186
|
+
return this.format("RFC3966", t);
|
|
187
|
+
}
|
|
188
|
+
}]);
|
|
189
|
+
})(), S = /^\+\d+$/;
|
|
190
|
+
export {
|
|
191
|
+
U as default
|
|
192
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var v = 2, A = 17, E = 3, _ = "0-90-9٠-٩۰-۹", F = "-‐-―−ー-", u = "//", a = "..", S = " ", r = "()()[]\\[\\]", c = "~⁓∼~", N = "".concat(F).concat(u).concat(a).concat(S).concat(r).concat(c), T = "++";
|
|
2
|
+
export {
|
|
3
|
+
E as MAX_LENGTH_COUNTRY_CODE,
|
|
4
|
+
A as MAX_LENGTH_FOR_NSN,
|
|
5
|
+
v as MIN_LENGTH_FOR_NSN,
|
|
6
|
+
T as PLUS_CHARS,
|
|
7
|
+
_ as VALID_DIGITS,
|
|
8
|
+
N as VALID_PUNCTUATION,
|
|
9
|
+
S as WHITESPACE
|
|
10
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import N from "./helpers/matchesEntirely.js";
|
|
2
|
+
import g from "./helpers/formatNationalNumberUsingFormat.js";
|
|
3
|
+
import s, { getCountryCallingCode as h } from "./metadata.js";
|
|
4
|
+
import d from "./helpers/getIddPrefix.js";
|
|
5
|
+
import { formatRFC3966 as I } from "./helpers/RFC3966.js";
|
|
6
|
+
var m = {
|
|
7
|
+
formatExtension: function(t, r, e) {
|
|
8
|
+
return "".concat(t).concat(e.ext()).concat(r);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
function O(n, t, r, e) {
|
|
12
|
+
r ? r = A({}, m, r) : r = m;
|
|
13
|
+
var a = new s(e);
|
|
14
|
+
if (n.country && n.country !== "001") {
|
|
15
|
+
if (!a.hasCountry(n.country))
|
|
16
|
+
throw new Error("Unknown country: ".concat(n.country));
|
|
17
|
+
a.selectNumberingPlan(n.country);
|
|
18
|
+
} else if (n.countryCallingCode)
|
|
19
|
+
a.selectNumberingPlan(n.countryCallingCode);
|
|
20
|
+
else return n.phone || "";
|
|
21
|
+
var o = a.countryCallingCode(), c = r.v2 ? n.nationalNumber : n.phone, i;
|
|
22
|
+
switch (t) {
|
|
23
|
+
case "NATIONAL":
|
|
24
|
+
return c ? (i = f(c, n.carrierCode, "NATIONAL", a, r), u(i, n.ext, a, r.formatExtension)) : "";
|
|
25
|
+
case "INTERNATIONAL":
|
|
26
|
+
return c ? (i = f(c, null, "INTERNATIONAL", a, r), i = "+".concat(o, " ").concat(i), u(i, n.ext, a, r.formatExtension)) : "+".concat(o);
|
|
27
|
+
case "E.164":
|
|
28
|
+
return "+".concat(o).concat(c);
|
|
29
|
+
case "RFC3966":
|
|
30
|
+
return I({
|
|
31
|
+
number: "+".concat(o).concat(c),
|
|
32
|
+
ext: n.ext
|
|
33
|
+
});
|
|
34
|
+
// For reference, here's Google's IDD formatter:
|
|
35
|
+
// https://github.com/google/libphonenumber/blob/32719cf74e68796788d1ca45abc85dcdc63ba5b9/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L1546
|
|
36
|
+
// Not saying that this IDD formatter replicates it 1:1, but it seems to work.
|
|
37
|
+
// Who would even need to format phone numbers in IDD format anyway?
|
|
38
|
+
case "IDD":
|
|
39
|
+
if (!r.fromCountry)
|
|
40
|
+
return;
|
|
41
|
+
var l = v(c, n.carrierCode, o, r.fromCountry, a);
|
|
42
|
+
return l ? u(l, n.ext, a, r.formatExtension) : void 0;
|
|
43
|
+
default:
|
|
44
|
+
throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t, '"'));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function f(n, t, r, e, a) {
|
|
48
|
+
var o = x(e.formats(), n);
|
|
49
|
+
return o ? g(n, o, {
|
|
50
|
+
useInternationalFormat: r === "INTERNATIONAL",
|
|
51
|
+
withNationalPrefix: !(o.nationalPrefixIsOptionalWhenFormattingInNationalFormat() && a && a.nationalPrefix === !1)
|
|
52
|
+
}) : n;
|
|
53
|
+
}
|
|
54
|
+
function x(n, t) {
|
|
55
|
+
return E(n, function(r) {
|
|
56
|
+
if (r.leadingDigitsPatterns().length > 0) {
|
|
57
|
+
var e = r.leadingDigitsPatterns()[r.leadingDigitsPatterns().length - 1];
|
|
58
|
+
if (t.search(e) !== 0)
|
|
59
|
+
return !1;
|
|
60
|
+
}
|
|
61
|
+
return N(t, r.pattern());
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function u(n, t, r, e) {
|
|
65
|
+
return t ? e(n, t, r) : n;
|
|
66
|
+
}
|
|
67
|
+
function v(n, t, r, e, a) {
|
|
68
|
+
var o = h(e, a.metadata);
|
|
69
|
+
if (o === r) {
|
|
70
|
+
var c = f(n, t, "NATIONAL", a);
|
|
71
|
+
return r === "1" ? r + " " + c : c;
|
|
72
|
+
}
|
|
73
|
+
var i = d(e, void 0, a.metadata);
|
|
74
|
+
if (i)
|
|
75
|
+
return "".concat(i, " ").concat(r, " ").concat(f(n, null, "INTERNATIONAL", a));
|
|
76
|
+
}
|
|
77
|
+
function A() {
|
|
78
|
+
for (var n = 1, t = arguments.length, r = new Array(t), e = 0; e < t; e++)
|
|
79
|
+
r[e] = arguments[e];
|
|
80
|
+
for (; n < r.length; ) {
|
|
81
|
+
if (r[n])
|
|
82
|
+
for (var a in r[n])
|
|
83
|
+
r[0][a] = r[n][a];
|
|
84
|
+
n++;
|
|
85
|
+
}
|
|
86
|
+
return r[0];
|
|
87
|
+
}
|
|
88
|
+
function E(n, t) {
|
|
89
|
+
for (var r = 0; r < n.length; ) {
|
|
90
|
+
if (t(n[r]))
|
|
91
|
+
return n[r];
|
|
92
|
+
r++;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
export {
|
|
96
|
+
x as chooseFormatForNumber,
|
|
97
|
+
O as default
|
|
98
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
function n(r) {
|
|
2
|
+
var t = r.number, e = r.ext;
|
|
3
|
+
if (!t)
|
|
4
|
+
return "";
|
|
5
|
+
if (t[0] !== "+")
|
|
6
|
+
throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');
|
|
7
|
+
return "tel:".concat(t).concat(e ? ";ext=" + e : "");
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
n as formatRFC3966
|
|
11
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import h from "../metadata.js";
|
|
2
|
+
function L(i, u, r) {
|
|
3
|
+
return s(i, void 0, u, r);
|
|
4
|
+
}
|
|
5
|
+
function s(i, u, r, e) {
|
|
6
|
+
r && (e = new h(e.metadata), e.selectNumberingPlan(r));
|
|
7
|
+
var f = e.type(u), n = f && f.possibleLengths() || e.possibleLengths();
|
|
8
|
+
if (!n)
|
|
9
|
+
return "IS_POSSIBLE";
|
|
10
|
+
var t = i.length, l = n[0];
|
|
11
|
+
return l === t ? "IS_POSSIBLE" : l > t ? "TOO_SHORT" : n[n.length - 1] < t ? "TOO_LONG" : n.indexOf(t, 1) >= 0 ? "IS_POSSIBLE" : "INVALID_LENGTH";
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
s as checkNumberLengthForType,
|
|
15
|
+
L as default
|
|
16
|
+
};
|