@azure-net/kit 3.9.2 → 4.0.0-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.
@@ -1,246 +0,0 @@
1
- export const masks = {
2
- AF: { name: 'Afghanistan', iso2: 'AF', cc: '+93', mask: '+93 ## ### ####' },
3
- AX: { name: 'Aland Islands', iso2: 'AX', cc: '+358', mask: '+358 ## ### ####' },
4
- AL: { name: 'Albania', iso2: 'AL', cc: '+355', mask: '+355 ## ### ####' },
5
- DZ: { name: 'Algeria', iso2: 'DZ', cc: '+213', mask: '+213 ## ### ## ##' },
6
- AS: { name: 'American Samoa', iso2: 'AS', cc: '+1', mask: '+1 (684) ###-####' },
7
- AD: { name: 'Andorra', iso2: 'AD', cc: '+376', mask: '+376 ### ###' },
8
- AO: { name: 'Angola', iso2: 'AO', cc: '+244', mask: '+244 ### ### ###' },
9
- AI: { name: 'Anguilla', iso2: 'AI', cc: '+1', mask: '+1 (264) ###-####' },
10
- AQ: { name: 'Antarctica', iso2: 'AQ', cc: '+672', mask: '+672 1 ## ###' },
11
- AG: { name: 'Antigua And Barbuda', iso2: 'AG', cc: '+1', mask: '+1 (268) ###-####' },
12
- AR: { name: 'Argentina', iso2: 'AR', cc: '+54', mask: '+54 9 ## ###-####' },
13
- AM: { name: 'Armenia', iso2: 'AM', cc: '+374', mask: '+374 ## ### ###' },
14
- AW: { name: 'Aruba', iso2: 'AW', cc: '+297', mask: '+297 ### ####' },
15
- AU: { name: 'Australia', iso2: 'AU', cc: '+61', mask: '+61 # #### ####' },
16
- AT: { name: 'Austria', iso2: 'AT', cc: '+43', mask: '+43 ## ### ####' },
17
- AZ: { name: 'Azerbaijan', iso2: 'AZ', cc: '+994', mask: '+994 ## ### ## ##' },
18
- BS: { name: 'Bahamas', iso2: 'BS', cc: '+1', mask: '+1 (242) ###-####' },
19
- BH: { name: 'Bahrain', iso2: 'BH', cc: '+973', mask: '+973 #### ####' },
20
- BD: { name: 'Bangladesh', iso2: 'BD', cc: '+880', mask: '+880 # ### ###[#]' },
21
- BB: { name: 'Barbados', iso2: 'BB', cc: '+1', mask: '+1 (246) ###-####' },
22
- BY: { name: 'Belarus', iso2: 'BY', cc: '+375', mask: '+375 (##) ###-##-##' },
23
- BE: { name: 'Belgium', iso2: 'BE', cc: '+32', mask: '+32 # ### ## ##' },
24
- BZ: { name: 'Belize', iso2: 'BZ', cc: '+501', mask: '+501 ###-####' },
25
- BJ: { name: 'Benin', iso2: 'BJ', cc: '+229', mask: '+229 ## ## ####' },
26
- BM: { name: 'Bermuda', iso2: 'BM', cc: '+1', mask: '+1 (441) ###-####' },
27
- BT: { name: 'Bhutan', iso2: 'BT', cc: '+975', mask: '+975 # ### ###' },
28
- BO: { name: 'Bolivia', iso2: 'BO', cc: '+591', mask: '+591 # ### ####' },
29
- BA: { name: 'Bosnia And Herzegovina', iso2: 'BA', cc: '+387', mask: '+387 ## ###-###[#]' },
30
- BW: { name: 'Botswana', iso2: 'BW', cc: '+267', mask: '+267 ## ### ###' },
31
- BV: { name: 'Bouvet Island', iso2: 'BV', cc: '+47', mask: '+47 ### ## ###' },
32
- BR: { name: 'Brazil', iso2: 'BR', cc: '+55', mask: '+55 ## #### ####[#]' },
33
- IO: { name: 'British Indian Ocean Territory', iso2: 'IO', cc: '+246', mask: '+246 ### ####' },
34
- BN: { name: 'Brunei Darussalam', iso2: 'BN', cc: '+673', mask: '+673 ### ####' },
35
- BG: { name: 'Bulgaria', iso2: 'BG', cc: '+359', mask: '+359 ## ### ####' },
36
- BF: { name: 'Burkina Faso', iso2: 'BF', cc: '+226', mask: '+226 ## ## ####' },
37
- BI: { name: 'Burundi', iso2: 'BI', cc: '+257', mask: '+257 ## ## ####' },
38
- KH: { name: 'Cambodia', iso2: 'KH', cc: '+855', mask: '+855 ## ### ###' },
39
- CM: { name: 'Cameroon', iso2: 'CM', cc: '+237', mask: '+237 # ## ## ## ##' },
40
- CA: { name: 'Canada', iso2: 'CA', cc: '+1', mask: '+1 (###) ###-####' },
41
- CV: { name: 'Cape Verde', iso2: 'CV', cc: '+238', mask: '+238 (##) ## ##' },
42
- KY: { name: 'Cayman Islands', iso2: 'KY', cc: '+1', mask: '+1 (345) ###-####' },
43
- CF: { name: 'Central African Republic', iso2: 'CF', cc: '+236', mask: '+236 ## ## ####' },
44
- TD: { name: 'Chad', iso2: 'TD', cc: '+235', mask: '+235 ## ## ## ##' },
45
- CL: { name: 'Chile', iso2: 'CL', cc: '+56', mask: '+56 # #### ####' },
46
- CN: { name: 'China', iso2: 'CN', cc: '+86', mask: '+86 ## #### ####' },
47
- CX: { name: 'Christmas Island', iso2: 'CX', cc: '+61', mask: '+61 4 ## ### ###' },
48
- CC: { name: 'Cocos (Keeling) Islands', iso2: 'CC', cc: '+61', mask: '+61 4 ## ### ###' },
49
- CO: { name: 'Colombia', iso2: 'CO', cc: '+57', mask: '+57 # ### ####' },
50
- KM: { name: 'Comoros', iso2: 'KM', cc: '+269', mask: '+269 ## ## ##' },
51
- CG: { name: 'Congo', iso2: 'CG', cc: '+242', mask: '+242 ## ### ####' },
52
- CD: { name: 'Congo, Democratic Republic', iso2: 'CD', cc: '+243', mask: '+243 ## ### ####' },
53
- CK: { name: 'Cook Islands', iso2: 'CK', cc: '+682', mask: '+682 ## ###' },
54
- CR: { name: 'Costa Rica', iso2: 'CR', cc: '+506', mask: '+506 #### ####' },
55
- CI: { name: "Cote D'Ivoire", iso2: 'CI', cc: '+225', mask: '+225 ## ## ## ##' },
56
- HR: { name: 'Croatia', iso2: 'HR', cc: '+385', mask: '+385 # ### ####' },
57
- CU: { name: 'Cuba', iso2: 'CU', cc: '+53', mask: '+53 # ### ####' },
58
- CY: { name: 'Cyprus', iso2: 'CY', cc: '+357', mask: '+357 ## ### ###' },
59
- CZ: { name: 'Czech Republic', iso2: 'CZ', cc: '+420', mask: '+420 ### ### ###' },
60
- DK: { name: 'Denmark', iso2: 'DK', cc: '+45', mask: '+45 ## ## ## ##' },
61
- DJ: { name: 'Djibouti', iso2: 'DJ', cc: '+253', mask: '+253 ## ## ## ##' },
62
- DM: { name: 'Dominica', iso2: 'DM', cc: '+1', mask: '+1 (767) ###-####' },
63
- DO: { name: 'Dominican Republic', iso2: 'DO', cc: '+1', mask: '+1 (###) ###-####' },
64
- EC: { name: 'Ecuador', iso2: 'EC', cc: '+593', mask: '+593 ## ### ####' },
65
- EG: { name: 'Egypt', iso2: 'EG', cc: '+20', mask: '+20 # #### ####' },
66
- SV: { name: 'El Salvador', iso2: 'SV', cc: '+503', mask: '+503 #### ####' },
67
- GQ: { name: 'Equatorial Guinea', iso2: 'GQ', cc: '+240', mask: '+240 ## ### ####' },
68
- ER: { name: 'Eritrea', iso2: 'ER', cc: '+291', mask: '+291 # ### ###' },
69
- EE: { name: 'Estonia', iso2: 'EE', cc: '+372', mask: '+372 #### ####' },
70
- ET: { name: 'Ethiopia', iso2: 'ET', cc: '+251', mask: '+251 ## ### ####' },
71
- FK: { name: 'Falkland Islands (Malvinas)', iso2: 'FK', cc: '+500', mask: '+500 #####' },
72
- FO: { name: 'Faroe Islands', iso2: 'FO', cc: '+298', mask: '+298 ######' },
73
- FJ: { name: 'Fiji', iso2: 'FJ', cc: '+679', mask: '+679 ### ####' },
74
- FI: { name: 'Finland', iso2: 'FI', cc: '+358', mask: '+358 ## ### ####' },
75
- FR: { name: 'France', iso2: 'FR', cc: '+33', mask: '+33 # ## ## ## ##' },
76
- GF: { name: 'French Guiana', iso2: 'GF', cc: '+594', mask: '+594 ##### ####' },
77
- PF: { name: 'French Polynesia', iso2: 'PF', cc: '+689', mask: '+689 ## ## ##' },
78
- TF: { name: 'French Southern Territories', iso2: 'TF', cc: '+262', mask: '+262 ##### ####' },
79
- GA: { name: 'Gabon', iso2: 'GA', cc: '+241', mask: '+241 # ## ## ##' },
80
- GM: { name: 'Gambia', iso2: 'GM', cc: '+220', mask: '+220 ### ####' },
81
- GE: { name: 'Georgia', iso2: 'GE', cc: '+995', mask: '+995 ## ### ####' },
82
- DE: { name: 'Germany', iso2: 'DE', cc: '+49', mask: '+49 ## ######' },
83
- GH: { name: 'Ghana', iso2: 'GH', cc: '+233', mask: '+233 ## ### ####' },
84
- GI: { name: 'Gibraltar', iso2: 'GI', cc: '+350', mask: '+350 200 #####' },
85
- GR: { name: 'Greece', iso2: 'GR', cc: '+30', mask: '+30 ## ### ####' },
86
- GL: { name: 'Greenland', iso2: 'GL', cc: '+299', mask: '+299 ## ## ##' },
87
- GD: { name: 'Grenada', iso2: 'GD', cc: '+1', mask: '+1 (473) ###-####' },
88
- GP: { name: 'Guadeloupe', iso2: 'GP', cc: '+590', mask: '+590 #### ####' },
89
- GU: { name: 'Guam', iso2: 'GU', cc: '+1', mask: '+1 (671) ###-####' },
90
- GT: { name: 'Guatemala', iso2: 'GT', cc: '+502', mask: '+502 # ### ####' },
91
- GG: { name: 'Guernsey', iso2: 'GG', cc: '+44', mask: '+44 1481 ## ####' },
92
- GN: { name: 'Guinea', iso2: 'GN', cc: '+224', mask: '+224 ## ### ####' },
93
- GW: { name: 'Guinea-Bissau', iso2: 'GW', cc: '+245', mask: '+245 # ### ###' },
94
- GY: { name: 'Guyana', iso2: 'GY', cc: '+592', mask: '+592 ### ####' },
95
- HT: { name: 'Haiti', iso2: 'HT', cc: '+509', mask: '+509 ## ## ####' },
96
- HM: { name: 'Heard Island & Mcdonald Islands', iso2: 'HM', cc: '+672', mask: '+672 1 ## ###' },
97
- VA: { name: 'Holy See (Vatican City State)', iso2: 'VA', cc: '+39', mask: '+39 06 698 #####' },
98
- HN: { name: 'Honduras', iso2: 'HN', cc: '+504', mask: '+504 #### ####' },
99
- HK: { name: 'Hong Kong', iso2: 'HK', cc: '+852', mask: '+852 #### ####' },
100
- HU: { name: 'Hungary', iso2: 'HU', cc: '+36', mask: '+36 #[#] ### ###[#]' },
101
- IS: { name: 'Iceland', iso2: 'IS', cc: '+354', mask: '+354 ### ####' },
102
- IN: { name: 'India', iso2: 'IN', cc: '+91', mask: '+91 ## #### ####' },
103
- ID: { name: 'Indonesia', iso2: 'ID', cc: '+62', mask: '+62 ## #### ####' },
104
- IR: { name: 'Iran, Islamic Republic Of', iso2: 'IR', cc: '+98', mask: '+98 ## #### ####' },
105
- IQ: { name: 'Iraq', iso2: 'IQ', cc: '+964', mask: '+964 ## ### ####' },
106
- IE: { name: 'Ireland', iso2: 'IE', cc: '+353', mask: '+353 ## ### ####' },
107
- IM: { name: 'Isle Of Man', iso2: 'IM', cc: '+44', mask: '+44 1624 ######' },
108
- IL: { name: 'Israel', iso2: 'IL', cc: '+972', mask: '+972 # ### ####' },
109
- IT: { name: 'Italy', iso2: 'IT', cc: '+39', mask: '+39 ## #### ####' },
110
- JM: { name: 'Jamaica', iso2: 'JM', cc: '+1', mask: '+1 (876) ###-####' },
111
- JP: { name: 'Japan', iso2: 'JP', cc: '+81', mask: '+81 ##-####-####' },
112
- JE: { name: 'Jersey', iso2: 'JE', cc: '+44', mask: '+44 1534 ######' },
113
- JO: { name: 'Jordan', iso2: 'JO', cc: '+962', mask: '+962 # #### ####' },
114
- KZ: { name: 'Kazakhstan', iso2: 'KZ', cc: '+7', mask: '+7 700 ### ####' },
115
- KE: { name: 'Kenya', iso2: 'KE', cc: '+254', mask: '+254 ## #######' },
116
- KI: { name: 'Kiribati', iso2: 'KI', cc: '+686', mask: '+686 ## ###' },
117
- KR: { name: 'Korea', iso2: 'KR', cc: '+82', mask: '+82 ##-####-####' },
118
- KW: { name: 'Kuwait', iso2: 'KW', cc: '+965', mask: '+965 #### ####' },
119
- KG: { name: 'Kyrgyzstan', iso2: 'KG', cc: '+996', mask: '+996 ## ### ####' },
120
- LA: { name: "Lao People's Democratic Republic", iso2: 'LA', cc: '+856', mask: '+856 ## ### ###' },
121
- LV: { name: 'Latvia', iso2: 'LV', cc: '+371', mask: '+371 #### ####' },
122
- LB: { name: 'Lebanon', iso2: 'LB', cc: '+961', mask: '+961 # ### ###' },
123
- LS: { name: 'Lesotho', iso2: 'LS', cc: '+266', mask: '+266 # ### ####' },
124
- LR: { name: 'Liberia', iso2: 'LR', cc: '+231', mask: '+231 ## ### ###' },
125
- LY: { name: 'Libyan Arab Jamahiriya', iso2: 'LY', cc: '+218', mask: '+218 ## ### ####' },
126
- LI: { name: 'Liechtenstein', iso2: 'LI', cc: '+423', mask: '+423 ### ####' },
127
- LT: { name: 'Lithuania', iso2: 'LT', cc: '+370', mask: '+370 ### #####' },
128
- LU: { name: 'Luxembourg', iso2: 'LU', cc: '+352', mask: '+352 ### ### ###' },
129
- MO: { name: 'Macao', iso2: 'MO', cc: '+853', mask: '+853 #### ####' },
130
- MK: { name: 'Macedonia', iso2: 'MK', cc: '+389', mask: '+389 ## ### ###' },
131
- MG: { name: 'Madagascar', iso2: 'MG', cc: '+261', mask: '+261 ## ## #####' },
132
- MW: { name: 'Malawi', iso2: 'MW', cc: '+265', mask: '+265 # ### ####' },
133
- MY: { name: 'Malaysia', iso2: 'MY', cc: '+60', mask: '+60 ##-### ####' },
134
- MV: { name: 'Maldives', iso2: 'MV', cc: '+960', mask: '+960 ###-####' },
135
- ML: { name: 'Mali', iso2: 'ML', cc: '+223', mask: '+223 ## ## ####' },
136
- MT: { name: 'Malta', iso2: 'MT', cc: '+356', mask: '+356 #### ####' },
137
- MH: { name: 'Marshall Islands', iso2: 'MH', cc: '+692', mask: '+692 ###-####' },
138
- MQ: { name: 'Martinique', iso2: 'MQ', cc: '+596', mask: '+596 ### ## ##' },
139
- MR: { name: 'Mauritania', iso2: 'MR', cc: '+222', mask: '+222 ## ## ####' },
140
- MU: { name: 'Mauritius', iso2: 'MU', cc: '+230', mask: '+230 ### ####' },
141
- YT: { name: 'Mayotte', iso2: 'YT', cc: '+262', mask: '+262 ##### ####' },
142
- MX: { name: 'Mexico', iso2: 'MX', cc: '+52', mask: '+52 ## #### ####' },
143
- FM: { name: 'Micronesia, Federated States Of', iso2: 'FM', cc: '+691', mask: '+691 ### ####' },
144
- MD: { name: 'Moldova', iso2: 'MD', cc: '+373', mask: '+373 #### ####' },
145
- MC: { name: 'Monaco', iso2: 'MC', cc: '+377', mask: '+377 ## ## ## ##' },
146
- MN: { name: 'Mongolia', iso2: 'MN', cc: '+976', mask: '+976 ## ## ####' },
147
- ME: { name: 'Montenegro', iso2: 'ME', cc: '+382', mask: '+382 ## ### ###' },
148
- MS: { name: 'Montserrat', iso2: 'MS', cc: '+1', mask: '+1 (664) ###-####' },
149
- MA: { name: 'Morocco', iso2: 'MA', cc: '+212', mask: '+212 ## #### ####' },
150
- MZ: { name: 'Mozambique', iso2: 'MZ', cc: '+258', mask: '+258 ## ### ###' },
151
- MM: { name: 'Myanmar', iso2: 'MM', cc: '+95', mask: '+95 ## ### ###' },
152
- NA: { name: 'Namibia', iso2: 'NA', cc: '+264', mask: '+264 ## ### ####' },
153
- NR: { name: 'Nauru', iso2: 'NR', cc: '+674', mask: '+674 ### ####' },
154
- NP: { name: 'Nepal', iso2: 'NP', cc: '+977', mask: '+977 ## ### ####' },
155
- NL: { name: 'Netherlands', iso2: 'NL', cc: '+31', mask: '+31 ## ### ####' },
156
- NC: { name: 'New Caledonia', iso2: 'NC', cc: '+687', mask: '+687 ## ####' },
157
- NZ: { name: 'New Zealand', iso2: 'NZ', cc: '+64', mask: '+64 # ### ####' },
158
- NI: { name: 'Nicaragua', iso2: 'NI', cc: '+505', mask: '+505 #### ####' },
159
- NE: { name: 'Niger', iso2: 'NE', cc: '+227', mask: '+227 ## ## ####' },
160
- NG: { name: 'Nigeria', iso2: 'NG', cc: '+234', mask: '+234 ## ### ####' },
161
- NU: { name: 'Niue', iso2: 'NU', cc: '+683', mask: '+683 ####' },
162
- NF: { name: 'Norfolk Island', iso2: 'NF', cc: '+672', mask: '+672 ## ###' },
163
- MP: { name: 'Northern Mariana Islands', iso2: 'MP', cc: '+1', mask: '+1 (670) ###-####' },
164
- NO: { name: 'Norway', iso2: 'NO', cc: '+47', mask: '+47 ## ## ## ##' },
165
- OM: { name: 'Oman', iso2: 'OM', cc: '+968', mask: '+968 #### ####' },
166
- PK: { name: 'Pakistan', iso2: 'PK', cc: '+92', mask: '+92 ## ### ####' },
167
- PW: { name: 'Palau', iso2: 'PW', cc: '+680', mask: '+680 ### ####' },
168
- PS: { name: 'Palestinian Territory, Occupied', iso2: 'PS', cc: '+970', mask: '+970 ## ### ####' },
169
- PA: { name: 'Panama', iso2: 'PA', cc: '+507', mask: '+507 ### ####' },
170
- PG: { name: 'Papua New Guinea', iso2: 'PG', cc: '+675', mask: '+675 ## ### ###' },
171
- PY: { name: 'Paraguay', iso2: 'PY', cc: '+595', mask: '+595 ## ### ####' },
172
- PE: { name: 'Peru', iso2: 'PE', cc: '+51', mask: '+51 ## ### ###' },
173
- PH: { name: 'Philippines', iso2: 'PH', cc: '+63', mask: '+63 ## ### ####' },
174
- PN: { name: 'Pitcairn', iso2: 'PN', cc: '+64', mask: '+64 ## ### ####' },
175
- PL: { name: 'Poland', iso2: 'PL', cc: '+48', mask: '+48 ## ### ####' },
176
- PT: { name: 'Portugal', iso2: 'PT', cc: '+351', mask: '+351 ## ### ####' },
177
- PR: { name: 'Puerto Rico', iso2: 'PR', cc: '+1', mask: '+1 (###) ###-####' },
178
- QA: { name: 'Qatar', iso2: 'QA', cc: '+974', mask: '+974 #### ####' },
179
- RE: { name: 'Reunion', iso2: 'RE', cc: '+262', mask: '+262 ##### ####' },
180
- RO: { name: 'Romania', iso2: 'RO', cc: '+40', mask: '+40 ## ### ####' },
181
- RU: { name: 'Russian Federation', iso2: 'RU', cc: '+7', mask: '+7 (###) ###-##-##' },
182
- RW: { name: 'Rwanda', iso2: 'RW', cc: '+250', mask: '+250 ## ### ###' },
183
- BL: { name: 'Saint Barthelemy', iso2: 'BL', cc: '+590', mask: '+590 ### ####' },
184
- SH: { name: 'Saint Helena', iso2: 'SH', cc: '+290', mask: '+290 ####' },
185
- KN: { name: 'Saint Kitts And Nevis', iso2: 'KN', cc: '+1', mask: '+1 (869) ###-####' },
186
- LC: { name: 'Saint Lucia', iso2: 'LC', cc: '+1', mask: '+1 (758) ###-####' },
187
- MF: { name: 'Saint Martin', iso2: 'MF', cc: '+590', mask: '+590 ### ####' },
188
- PM: { name: 'Saint Pierre And Miquelon', iso2: 'PM', cc: '+508', mask: '+508 ## ## ##' },
189
- VC: { name: 'Saint Vincent And Grenadines', iso2: 'VC', cc: '+1', mask: '+1 (784) ###-####' },
190
- WS: { name: 'Samoa', iso2: 'WS', cc: '+685', mask: '+685 ## ####' },
191
- SM: { name: 'San Marino', iso2: 'SM', cc: '+378', mask: '+378 #### ######' },
192
- ST: { name: 'Sao Tome And Principe', iso2: 'ST', cc: '+239', mask: '+239 ## ## ##' },
193
- SA: { name: 'Saudi Arabia', iso2: 'SA', cc: '+966', mask: '+966 # #### ####' },
194
- SN: { name: 'Senegal', iso2: 'SN', cc: '+221', mask: '+221 ## ### ####' },
195
- RS: { name: 'Serbia', iso2: 'RS', cc: '+381', mask: '+381 ## #### ###' },
196
- SC: { name: 'Seychelles', iso2: 'SC', cc: '+248', mask: '+248 # ### ###' },
197
- SL: { name: 'Sierra Leone', iso2: 'SL', cc: '+232', mask: '+232 ## ######' },
198
- SG: { name: 'Singapore', iso2: 'SG', cc: '+65', mask: '+65 #### ####' },
199
- SK: { name: 'Slovakia', iso2: 'SK', cc: '+421', mask: '+421 [##]# ### ####' },
200
- SI: { name: 'Slovenia', iso2: 'SI', cc: '+386', mask: '+386 # ### ## ##' },
201
- SB: { name: 'Solomon Islands', iso2: 'SB', cc: '+677', mask: '+677 #####' },
202
- SO: { name: 'Somalia', iso2: 'SO', cc: '+252', mask: '+252 # ### ###' },
203
- ZA: { name: 'South Africa', iso2: 'ZA', cc: '+27', mask: '+27 ## ### ####' },
204
- GS: { name: 'South Georgia And Sandwich Isl.', iso2: 'GS', cc: '+500', mask: '+500 #####' },
205
- ES: { name: 'Spain', iso2: 'ES', cc: '+34', mask: '+34 ### ### ###' },
206
- LK: { name: 'Sri Lanka', iso2: 'LK', cc: '+94', mask: '+94 ## ### ####' },
207
- SD: { name: 'Sudan', iso2: 'SD', cc: '+249', mask: '+249 ## ### ####' },
208
- SR: { name: 'Suriname', iso2: 'SR', cc: '+597', mask: '+597 ### ###' },
209
- SJ: { name: 'Svalbard And Jan Mayen', iso2: 'SJ', cc: '+47', mask: '+47 ### ## ###' },
210
- SZ: { name: 'Swaziland', iso2: 'SZ', cc: '+268', mask: '+268 ## ## ####' },
211
- SE: { name: 'Sweden', iso2: 'SE', cc: '+46', mask: '+46 ## ### ####' },
212
- CH: { name: 'Switzerland', iso2: 'CH', cc: '+41', mask: '+41 ## ### ####' },
213
- SY: { name: 'Syrian Arab Republic', iso2: 'SY', cc: '+963', mask: '+963 ## #### ###' },
214
- TW: { name: 'Taiwan', iso2: 'TW', cc: '+886', mask: '+886 # #### ####' },
215
- TJ: { name: 'Tajikistan', iso2: 'TJ', cc: '+992', mask: '+992 ## ### ####' },
216
- TZ: { name: 'Tanzania', iso2: 'TZ', cc: '+255', mask: '+255 ## ### ####' },
217
- TH: { name: 'Thailand', iso2: 'TH', cc: '+66', mask: '+66 # #### ####' },
218
- TL: { name: 'Timor-Leste', iso2: 'TL', cc: '+670', mask: '+670 ### ####' },
219
- TG: { name: 'Togo', iso2: 'TG', cc: '+228', mask: '+228 ## ### ###' },
220
- TK: { name: 'Tokelau', iso2: 'TK', cc: '+690', mask: '+690 ####' },
221
- TO: { name: 'Tonga', iso2: 'TO', cc: '+676', mask: '+676 ## ###' },
222
- TT: { name: 'Trinidad And Tobago', iso2: 'TT', cc: '+1', mask: '+1 (868) ###-####' },
223
- TN: { name: 'Tunisia', iso2: 'TN', cc: '+216', mask: '+216 ## ### ###' },
224
- TR: { name: 'Turkey', iso2: 'TR', cc: '+90', mask: '+90 (###) ### ####' },
225
- TM: { name: 'Turkmenistan', iso2: 'TM', cc: '+993', mask: '+993 # ### ###' },
226
- TC: { name: 'Turks And Caicos Islands', iso2: 'TC', cc: '+1', mask: '+1 (649) ###-####' },
227
- TV: { name: 'Tuvalu', iso2: 'TV', cc: '+688', mask: '+688 ## ###' },
228
- UG: { name: 'Uganda', iso2: 'UG', cc: '+256', mask: '+256 [#]## ### ###' },
229
- UA: { name: 'Ukraine', iso2: 'UA', cc: '+380', mask: '+380 ## ### ####' },
230
- AE: { name: 'United Arab Emirates', iso2: 'AE', cc: '+971', mask: '+971 ## ### ## ##' },
231
- GB: { name: 'United Kingdom', iso2: 'GB', cc: '+44', mask: '+44 ## #### ####' },
232
- US: { name: 'United States', iso2: 'US', cc: '+1', mask: '+1 (###) ###-####' },
233
- UM: { name: 'United States Outlying Islands', iso2: 'UM', cc: 'N/A', mask: 'N/A' },
234
- UY: { name: 'Uruguay', iso2: 'UY', cc: '+598', mask: '+598 # ### ## ##' },
235
- UZ: { name: 'Uzbekistan', iso2: 'UZ', cc: '+998', mask: '+998 ## ### ####' },
236
- VU: { name: 'Vanuatu', iso2: 'VU', cc: '+678', mask: '+678 ## ####' },
237
- VE: { name: 'Venezuela', iso2: 'VE', cc: '+58', mask: '+58 ###-#######' },
238
- VN: { name: 'Viet Nam', iso2: 'VN', cc: '+84', mask: '+84 ## #### ###' },
239
- VG: { name: 'Virgin Islands, British', iso2: 'VG', cc: '+1', mask: '+1 (284) ###-####' },
240
- VI: { name: 'Virgin Islands, U.S.', iso2: 'VI', cc: '+1', mask: '+1 (340) ###-####' },
241
- WF: { name: 'Wallis And Futuna', iso2: 'WF', cc: '+681', mask: '+681 ## ####' },
242
- EH: { name: 'Western Sahara', iso2: 'EH', cc: '+212', mask: '+212 5288-#####' },
243
- YE: { name: 'Yemen', iso2: 'YE', cc: '+967', mask: '+967 # ### ###' },
244
- ZM: { name: 'Zambia', iso2: 'ZM', cc: '+260', mask: '+260 ## ### ####' },
245
- ZW: { name: 'Zimbabwe', iso2: 'ZW', cc: '+263', mask: '+263 # ######' }
246
- };
@@ -1,17 +0,0 @@
1
- export type EventHandler<E = Event> = (event: E) => void;
2
- interface EventModifier<E extends Event = Event> {
3
- (fn: () => void): EventHandler<E>;
4
- prevent: EventModifier<E>;
5
- stop: EventModifier<E>;
6
- immediate: EventModifier<E>;
7
- once: EventModifier<E>;
8
- preventDefault: EventModifier<E>;
9
- stopPropagation: EventModifier<E>;
10
- stopImmediatePropagation: EventModifier<E>;
11
- }
12
- export declare const prevent: EventModifier<Event>;
13
- export declare const stop: EventModifier<Event>;
14
- export declare const immediate: EventModifier<Event>;
15
- export declare const once: EventModifier<Event>;
16
- export declare const event: EventModifier<Event>;
17
- export {};
@@ -1,31 +0,0 @@
1
- const createEventModifier = (modifiers = new Set()) => {
2
- return new Proxy(() => { }, {
3
- get(_, prop) {
4
- return createEventModifier(new Set([...modifiers, prop]));
5
- },
6
- apply(_, __, [fn]) {
7
- let executed = false;
8
- return (event) => {
9
- if (modifiers.has('once') && executed)
10
- return;
11
- if (modifiers.has('prevent') || modifiers.has('preventDefault')) {
12
- event.preventDefault();
13
- }
14
- if (modifiers.has('stop') || modifiers.has('stopPropagation')) {
15
- event.stopPropagation();
16
- }
17
- if (modifiers.has('immediate') || modifiers.has('stopImmediatePropagation')) {
18
- event.stopImmediatePropagation();
19
- }
20
- if (modifiers.has('once'))
21
- executed = true;
22
- fn();
23
- };
24
- }
25
- });
26
- };
27
- export const prevent = createEventModifier(new Set(['prevent']));
28
- export const stop = createEventModifier(new Set(['stop']));
29
- export const immediate = createEventModifier(new Set(['immediate']));
30
- export const once = createEventModifier(new Set(['once']));
31
- export const event = createEventModifier();
@@ -1 +0,0 @@
1
- export * from './EventModifiers.js';
@@ -1 +0,0 @@
1
- export * from './EventModifiers.js';
@@ -1,4 +0,0 @@
1
- export * from './eventModifiers/index.js';
2
- export * from './onClickOutside/index.js';
3
- export * from './mask/index.js';
4
- export * from './scrollTo/index.js';
@@ -1,4 +0,0 @@
1
- export * from './eventModifiers/index.js';
2
- export * from './onClickOutside/index.js';
3
- export * from './mask/index.js';
4
- export * from './scrollTo/index.js';
@@ -1,13 +0,0 @@
1
- export type TokenSettings = {
2
- pattern?: RegExp;
3
- escape?: boolean;
4
- transform?: (v: string) => string;
5
- };
6
- export type Tokens = Record<string, TokenSettings>;
7
- export declare class Mask {
8
- static tokens: Tokens;
9
- static dynamicMask(maskIt: typeof Mask.maskIt, masks: string[], tokens: Tokens): (value: string, masked?: boolean) => string;
10
- static maskIt(value: string, mask: string | undefined, masked: boolean | undefined, tokens: Tokens): string;
11
- static masker(value: string, mask: string | undefined, masked: boolean | undefined, tokens: Tokens): string;
12
- }
13
- export declare const masked: (el: HTMLInputElement, mask?: string, tokens?: Tokens) => void;
@@ -1,110 +0,0 @@
1
- export class Mask {
2
- static tokens = {
3
- X: { pattern: /[0-9a-zA-Z]/ },
4
- S: { pattern: /[a-zA-Z]/ },
5
- A: { pattern: /[a-zA-Z]/, transform: (v) => v.toLocaleUpperCase() },
6
- a: { pattern: /[a-zA-Z]/, transform: (v) => v.toLocaleLowerCase() },
7
- '#': { pattern: /\d/ },
8
- '!': { escape: true }
9
- };
10
- static dynamicMask(maskIt, masks, tokens) {
11
- masks = masks.sort((a, b) => a.length - b.length);
12
- return function (value, masked = true) {
13
- let i = 0;
14
- while (i < masks.length) {
15
- const currentMask = masks[i];
16
- i++;
17
- const nextMask = masks[i];
18
- if (!(nextMask && maskIt(value, nextMask, true, tokens).length > currentMask.length)) {
19
- return maskIt(value, currentMask, masked, tokens);
20
- }
21
- }
22
- return '';
23
- };
24
- }
25
- static maskIt(value, mask = undefined, masked = true, tokens) {
26
- value = value || '';
27
- mask = mask || '';
28
- let iMask = 0;
29
- let iValue = 0;
30
- let output = '';
31
- while (iMask < mask.length && iValue < value.length) {
32
- let cMask = mask[iMask];
33
- const masker = tokens[cMask];
34
- const cValue = value[iValue];
35
- if (masker && !masker.escape) {
36
- if (masker.pattern?.test(cValue)) {
37
- output += masker.transform ? masker.transform(cValue) : cValue;
38
- iMask++;
39
- }
40
- iValue++;
41
- }
42
- else {
43
- if (masker && masker.escape) {
44
- iMask++;
45
- cMask = mask[iMask];
46
- }
47
- if (masked)
48
- output += cMask;
49
- if (cValue === cMask)
50
- iValue++;
51
- iMask++;
52
- }
53
- }
54
- let restOutput = '';
55
- while (iMask < mask.length && masked) {
56
- const cMask = mask[iMask];
57
- if (tokens[cMask]) {
58
- restOutput = '';
59
- break;
60
- }
61
- restOutput += cMask;
62
- iMask++;
63
- }
64
- return output + restOutput;
65
- }
66
- static masker(value, mask = undefined, masked = true, tokens) {
67
- return Array.isArray(mask) ? this.dynamicMask(Mask.maskIt, mask, tokens)(value, masked) : this.maskIt(value, mask, masked, tokens);
68
- }
69
- }
70
- export const masked = (el, mask, tokens) => {
71
- const config = {
72
- mask,
73
- tokens: tokens ? { ...Mask.tokens, ...tokens } : Mask.tokens
74
- };
75
- if (el.tagName.toLocaleUpperCase() !== 'INPUT') {
76
- const els = el.getElementsByTagName('input');
77
- if (els.length !== 1) {
78
- throw new Error('mask requires 1 input, found ' + els.length);
79
- }
80
- else {
81
- el = els[0];
82
- }
83
- }
84
- if (config.mask) {
85
- el.oninput = function (evt) {
86
- if (!evt.isTrusted)
87
- return;
88
- let position = el.selectionEnd;
89
- if (position) {
90
- const digit = el.value[position - 1];
91
- el.value = Mask.masker(el.value, config.mask, true, config.tokens);
92
- while (position < el.value.length && el.value.charAt(position - 1) !== digit) {
93
- position++;
94
- }
95
- }
96
- if (el === document.activeElement) {
97
- el.setSelectionRange(position, position);
98
- setTimeout(function () {
99
- el.setSelectionRange(position, position);
100
- }, 0);
101
- }
102
- el.dispatchEvent(new Event('input'));
103
- };
104
- const newDisplay = Mask.masker(el.value, config.mask, true, config.tokens);
105
- if (newDisplay !== el.value) {
106
- el.value = newDisplay;
107
- el.dispatchEvent(new Event('input'));
108
- }
109
- }
110
- };
@@ -1 +0,0 @@
1
- export * from './Mask.js';
@@ -1 +0,0 @@
1
- export * from './Mask.js';
@@ -1,3 +0,0 @@
1
- export declare const onClickOutside: (node: HTMLElement, initiator?: HTMLElement) => {
2
- destroy: () => void;
3
- };
@@ -1,22 +0,0 @@
1
- import { EnvironmentUtil } from '@azure-net/tools';
2
- export const onClickOutside = (node, initiator) => {
3
- if (EnvironmentUtil.isServer)
4
- return { destroy: () => { } };
5
- const handleClick = (event) => {
6
- if (event.target instanceof HTMLElement) {
7
- if (event.target === node ||
8
- (node && event.composedPath().includes(node)) ||
9
- (initiator && event.target === initiator) ||
10
- (initiator && event.composedPath().includes(initiator))) {
11
- return;
12
- }
13
- node.dispatchEvent(new CustomEvent('outside', { detail: node }));
14
- }
15
- };
16
- document.addEventListener('click', handleClick, true);
17
- return {
18
- destroy() {
19
- document.removeEventListener('click', handleClick, true);
20
- }
21
- };
22
- };
@@ -1 +0,0 @@
1
- export * from './OnClickOutside.js';
@@ -1 +0,0 @@
1
- export * from './OnClickOutside.js';
@@ -1 +0,0 @@
1
- export declare const scrollTo: (nodeOrName: string | Element, offset?: number) => void;
@@ -1,23 +0,0 @@
1
- import { BROWSER } from '@azure-net/tools/environment';
2
- export const scrollTo = (nodeOrName, offset = 220) => {
3
- if (BROWSER) {
4
- setTimeout(() => { }, 1);
5
- let element;
6
- if (typeof nodeOrName === 'string') {
7
- const node = document.querySelector(nodeOrName);
8
- if (node) {
9
- element = node;
10
- }
11
- }
12
- else {
13
- element = nodeOrName;
14
- }
15
- if (element) {
16
- const obj_pos = element.getBoundingClientRect();
17
- window.scrollTo({
18
- top: obj_pos.top + scrollY - offset,
19
- behavior: 'smooth'
20
- });
21
- }
22
- }
23
- };