cozy-client 46.11.0 → 47.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.
- package/dist/CozyClient.js +1 -1
- package/dist/models/{countries.js → country/countries.js} +180 -276
- package/dist/models/country/countries.spec.js +167 -0
- package/dist/models/country/locales/en.json +496 -0
- package/dist/models/country/locales/fr.json +496 -0
- package/dist/models/country/locales/index.js +41 -0
- package/dist/models/document/locales/index.js +3 -3
- package/dist/types.js +16 -0
- package/package.json +3 -3
- package/types/models/country/countries.d.ts +18 -0
- package/types/models/country/locales/index.d.ts +1 -0
- package/types/types.d.ts +36 -0
- package/dist/models/countries.spec.js +0 -18
- package/dist/models/document/emojiCountry.js +0 -36
- package/dist/models/document/emojiCountry.spec.js +0 -34
- package/types/models/countries.d.ts +0 -33
|
@@ -0,0 +1,496 @@
|
|
|
1
|
+
{
|
|
2
|
+
"nationalities": {
|
|
3
|
+
"AD": "Andorran",
|
|
4
|
+
"AE": "Émirien",
|
|
5
|
+
"AF": "Afghan",
|
|
6
|
+
"AG": "Antiguayen",
|
|
7
|
+
"AL": "Albanais",
|
|
8
|
+
"AM": "Arménien",
|
|
9
|
+
"AO": "Angolais",
|
|
10
|
+
"AR": "Argentin",
|
|
11
|
+
"AT": "Autrichien",
|
|
12
|
+
"AU": "Australien",
|
|
13
|
+
"AX": "Îles Aland",
|
|
14
|
+
"AZ": "Azerbaïdjanais",
|
|
15
|
+
"BA": "Bosnien",
|
|
16
|
+
"BB": "Barbadien",
|
|
17
|
+
"BD": "Bangladais",
|
|
18
|
+
"BE": "Belge",
|
|
19
|
+
"BF": "Burkinabé",
|
|
20
|
+
"BG": "Bulgare",
|
|
21
|
+
"BH": "Bahreïnien",
|
|
22
|
+
"BI": "Burundais",
|
|
23
|
+
"BJ": "Béninois",
|
|
24
|
+
"BL": "Saint-Barthélemy",
|
|
25
|
+
"BM": "Bermudien",
|
|
26
|
+
"BN": "Brunéien",
|
|
27
|
+
"BO": "Bolivien",
|
|
28
|
+
"BQ": "Pays-Bas Caribéens",
|
|
29
|
+
"BR": "Brésilien",
|
|
30
|
+
"BS": "Bahamien",
|
|
31
|
+
"BT": "Bhoutanais",
|
|
32
|
+
"BV": "Île Bouvet",
|
|
33
|
+
"BW": "Botswanais",
|
|
34
|
+
"BY": "Biélorusse",
|
|
35
|
+
"BZ": "Bélizien",
|
|
36
|
+
"CA": "Canadien",
|
|
37
|
+
"CC": "Îles Cocos",
|
|
38
|
+
"CD": "Congolais (République démocratique du Congo)",
|
|
39
|
+
"CF": "Centrafricain",
|
|
40
|
+
"CG": "Congolais (République du Congo)",
|
|
41
|
+
"CH": "Suisse",
|
|
42
|
+
"CI": "Ivoirien",
|
|
43
|
+
"CK": "Îles Cook",
|
|
44
|
+
"CL": "Chilien",
|
|
45
|
+
"CM": "Camerounais",
|
|
46
|
+
"CN": "Chinois",
|
|
47
|
+
"CO": "Colombien",
|
|
48
|
+
"CR": "Costaricain",
|
|
49
|
+
"CU": "Cubain",
|
|
50
|
+
"CV": "Cap verdien",
|
|
51
|
+
"CW": "Curacien",
|
|
52
|
+
"CX": "L'île Christmas",
|
|
53
|
+
"CY": "Chypriote",
|
|
54
|
+
"CZ": "Tchèque",
|
|
55
|
+
"DE": "Allemand",
|
|
56
|
+
"DJ": "Djiboutien",
|
|
57
|
+
"DK": "Danois",
|
|
58
|
+
"DM": "Dominicain (Dominique)",
|
|
59
|
+
"DO": "Dominicain (République dominicaine)",
|
|
60
|
+
"DZ": "Algérien",
|
|
61
|
+
"EC": "Équatorien",
|
|
62
|
+
"EE": "Estonien",
|
|
63
|
+
"EG": "Égyptien",
|
|
64
|
+
"EH": "Sahara Occidental",
|
|
65
|
+
"ER": "Érythréen",
|
|
66
|
+
"ES": "Espagnol",
|
|
67
|
+
"ET": "Éthiopien",
|
|
68
|
+
"FI": "Finlandais",
|
|
69
|
+
"FJ": "Fidjien",
|
|
70
|
+
"FK": "Malouin",
|
|
71
|
+
"FM": "Micronésien",
|
|
72
|
+
"FO": "Féroïen",
|
|
73
|
+
"FR": "Français",
|
|
74
|
+
"GA": "Gabonais",
|
|
75
|
+
"GB": "Britannique",
|
|
76
|
+
"GD": "Grenadien",
|
|
77
|
+
"GE": "Géorgien",
|
|
78
|
+
"GF": "Français (Guyane)",
|
|
79
|
+
"GG": "Guernesiais",
|
|
80
|
+
"GH": "Ghanéen",
|
|
81
|
+
"GI": "Gibraltariens",
|
|
82
|
+
"GL": "Groenlandais",
|
|
83
|
+
"GM": "Gambien",
|
|
84
|
+
"GN": "Guinéen",
|
|
85
|
+
"GP": "Guadeloupéen",
|
|
86
|
+
"GQ": "Équato-guinéen",
|
|
87
|
+
"GR": "Grec",
|
|
88
|
+
"GS": "Géorgie du Sud et les îles Sandwich du Sud",
|
|
89
|
+
"GT": "Guatémaltèque",
|
|
90
|
+
"GU": "Guam",
|
|
91
|
+
"GW": "Bissaoguinéen",
|
|
92
|
+
"GY": "Guyanais",
|
|
93
|
+
"HK": "Hongkongais",
|
|
94
|
+
"HM": "Îles Heard-et-MacDonald",
|
|
95
|
+
"HN": "Hondurien",
|
|
96
|
+
"HR": "Croate",
|
|
97
|
+
"HT": "Haïtien",
|
|
98
|
+
"HU": "Hongrois",
|
|
99
|
+
"ID": "Indonésien",
|
|
100
|
+
"IE": "Irlandais",
|
|
101
|
+
"IL": "Israélien",
|
|
102
|
+
"IM": "Île de Man",
|
|
103
|
+
"IN": "Indien",
|
|
104
|
+
"IO": "Territoire britannique de l'océan Indien",
|
|
105
|
+
"IQ": "Irakien",
|
|
106
|
+
"IR": "Iranien",
|
|
107
|
+
"IS": "Islandais",
|
|
108
|
+
"IT": "Italien",
|
|
109
|
+
"JE": "Jersiais",
|
|
110
|
+
"JM": "Jamaïquain",
|
|
111
|
+
"JO": "Jordanien",
|
|
112
|
+
"JP": "Japonais",
|
|
113
|
+
"KE": "Kényan",
|
|
114
|
+
"KG": "Kirghiz",
|
|
115
|
+
"KH": "Cambodgien",
|
|
116
|
+
"KI": "Kiribatiens",
|
|
117
|
+
"KM": "Comorien",
|
|
118
|
+
"KN": "Afro-Kittitien et Afro-Nevisien",
|
|
119
|
+
"KP": "Nord coréen",
|
|
120
|
+
"KR": "Sud coréen",
|
|
121
|
+
"KW": "Koweïtien",
|
|
122
|
+
"KY": "Caïmanien",
|
|
123
|
+
"KZ": "Kazakhstanais",
|
|
124
|
+
"LA": "Laotien",
|
|
125
|
+
"LB": "Libanais",
|
|
126
|
+
"LC": "Saint-Lucien",
|
|
127
|
+
"LI": "Liechtensteinois",
|
|
128
|
+
"LK": "Sri Lankais",
|
|
129
|
+
"LR": "Liberian",
|
|
130
|
+
"LS": "Mosotho",
|
|
131
|
+
"LT": "Lituanien",
|
|
132
|
+
"LU": "Luxembourgeois",
|
|
133
|
+
"LV": "Letton",
|
|
134
|
+
"LY": "Libyen",
|
|
135
|
+
"MA": "Marocain",
|
|
136
|
+
"MC": "Monégasque",
|
|
137
|
+
"MD": "Moldave",
|
|
138
|
+
"ME": "Monténégrin",
|
|
139
|
+
"MF": "Saint-Martinois (France)",
|
|
140
|
+
"MG": "Malgache",
|
|
141
|
+
"MH": "Marshallais",
|
|
142
|
+
"MK": "Macédonien",
|
|
143
|
+
"ML": "Malien",
|
|
144
|
+
"MM": "Birman",
|
|
145
|
+
"MN": "Mongol",
|
|
146
|
+
"MO": "Macanéen",
|
|
147
|
+
"MP": "Îles Mariannes du Nord",
|
|
148
|
+
"MQ": "Martiniquais",
|
|
149
|
+
"MR": "Mauritanien",
|
|
150
|
+
"MS": "Montserratien",
|
|
151
|
+
"MT": "Maltais",
|
|
152
|
+
"MU": "Mauricien",
|
|
153
|
+
"MV": "Maldivien",
|
|
154
|
+
"MW": "Malawien",
|
|
155
|
+
"MX": "Mexicain",
|
|
156
|
+
"MY": "Malaisien",
|
|
157
|
+
"MZ": "Mozambicain",
|
|
158
|
+
"NA": "Namibien",
|
|
159
|
+
"NC": "Néo-Calédonien",
|
|
160
|
+
"NE": "Nigérien",
|
|
161
|
+
"NF": "Norfolkais",
|
|
162
|
+
"NG": "Nigérian",
|
|
163
|
+
"NI": "Nicaraguayen",
|
|
164
|
+
"NL": "Néerlandais",
|
|
165
|
+
"NO": "Norvégien",
|
|
166
|
+
"NP": "Népalais",
|
|
167
|
+
"NR": "Nauruan",
|
|
168
|
+
"NU": "Niuéen",
|
|
169
|
+
"NZ": "Néo-Zélandais",
|
|
170
|
+
"OM": "Omanais",
|
|
171
|
+
"PA": "Panaméen",
|
|
172
|
+
"PE": "Péruvien",
|
|
173
|
+
"PF": "Français (Polynésie française)",
|
|
174
|
+
"PG": "Papouasien",
|
|
175
|
+
"PH": "Philippin",
|
|
176
|
+
"PK": "Pakistanais",
|
|
177
|
+
"PL": "Polonais",
|
|
178
|
+
"PM": "Saint-Pierrais ou Miquelonais",
|
|
179
|
+
"PN": "Îles Pitcairn",
|
|
180
|
+
"PR": "Portoricain",
|
|
181
|
+
"PS": "Territoires Palestiniens, Occupés",
|
|
182
|
+
"PT": "Portugais",
|
|
183
|
+
"PW": "Palauan",
|
|
184
|
+
"PY": "Paraguayen",
|
|
185
|
+
"QA": "Qatarien",
|
|
186
|
+
"RE": "Réunionnais",
|
|
187
|
+
"RO": "Roumain",
|
|
188
|
+
"RS": "Serbe",
|
|
189
|
+
"RU": "Russe",
|
|
190
|
+
"RW": "Rwandais",
|
|
191
|
+
"SA": "Saoudien",
|
|
192
|
+
"SB": "Salomonais",
|
|
193
|
+
"SC": "Seychellois",
|
|
194
|
+
"SD": "Soudanais",
|
|
195
|
+
"SE": "Suédois",
|
|
196
|
+
"SG": "Singapourien",
|
|
197
|
+
"SH": "Sainte Hélène",
|
|
198
|
+
"SI": "Slovène",
|
|
199
|
+
"SJ": "Svalbard et Jan Mayen",
|
|
200
|
+
"SK": "Slovaque",
|
|
201
|
+
"SL": "Sierra Léonais",
|
|
202
|
+
"SM": "Saint-Marinais",
|
|
203
|
+
"SN": "Sénégalais",
|
|
204
|
+
"SO": "Somalien",
|
|
205
|
+
"SR": "Surinamais",
|
|
206
|
+
"SS": "Sud-Soudanais",
|
|
207
|
+
"ST": "Santoméen",
|
|
208
|
+
"SV": "Salvadorien",
|
|
209
|
+
"SX": "Saint-Martinois (Pays-Bas)",
|
|
210
|
+
"SY": "Syrien",
|
|
211
|
+
"SZ": "Swazi",
|
|
212
|
+
"TC": "Îles Turques-et-Caïques",
|
|
213
|
+
"TD": "Tchadien",
|
|
214
|
+
"TF": "Français (TAAF)",
|
|
215
|
+
"TG": "Togolais",
|
|
216
|
+
"TH": "Thaïlandais",
|
|
217
|
+
"TJ": "Tadjik",
|
|
218
|
+
"TK": "Tokélaou",
|
|
219
|
+
"TL": "Est-Timorais",
|
|
220
|
+
"TM": "Turkmène",
|
|
221
|
+
"TN": "Tunisien",
|
|
222
|
+
"TO": "Tongien",
|
|
223
|
+
"TR": "Turc",
|
|
224
|
+
"TT": "Trinidadien ou Tobagonien",
|
|
225
|
+
"TV": "Tuvalais",
|
|
226
|
+
"TW": "Taïwanais",
|
|
227
|
+
"TZ": "Tanzanien",
|
|
228
|
+
"UA": "Ukrainien",
|
|
229
|
+
"UG": "Ougandais",
|
|
230
|
+
"UM": "Îles mineures éloignées des États-Unis",
|
|
231
|
+
"US": "Américain",
|
|
232
|
+
"UY": "Uruguayen",
|
|
233
|
+
"UZ": "Ouzbek",
|
|
234
|
+
"VA": "Saint-Siège (État de la cité du Vatican)",
|
|
235
|
+
"VC": "Vincentais",
|
|
236
|
+
"VE": "Vénézuélien",
|
|
237
|
+
"VG": "Îles Vierges Britanniques",
|
|
238
|
+
"VI": "Îles Vierges Américaines",
|
|
239
|
+
"VN": "Vietnamien",
|
|
240
|
+
"VU": "Vanuatais",
|
|
241
|
+
"WF": "Gallois",
|
|
242
|
+
"WS": "Samoan",
|
|
243
|
+
"YE": "Yéménite",
|
|
244
|
+
"YT": "Mahorais",
|
|
245
|
+
"ZA": "Sud Africain",
|
|
246
|
+
"ZM": "Zambien",
|
|
247
|
+
"ZW": "Zimbabwéen"
|
|
248
|
+
},
|
|
249
|
+
"countries": {
|
|
250
|
+
"AD": "Andorre",
|
|
251
|
+
"AE": "Émirats Arabes Unis",
|
|
252
|
+
"AF": "Afghanistan",
|
|
253
|
+
"AG": "Antigua-et-Barbuda",
|
|
254
|
+
"AL": "Albanie",
|
|
255
|
+
"AM": "Arménie",
|
|
256
|
+
"AO": "Angola",
|
|
257
|
+
"AR": "Argentine",
|
|
258
|
+
"AT": "Autriche",
|
|
259
|
+
"AU": "Australie",
|
|
260
|
+
"AX": "Åland",
|
|
261
|
+
"AZ": "Azerbaïdjan",
|
|
262
|
+
"BA": "Bosnie-Herzégovine",
|
|
263
|
+
"BB": "Barbade",
|
|
264
|
+
"BD": "Bangladesh",
|
|
265
|
+
"BE": "Belgique",
|
|
266
|
+
"BF": "Burkina Faso",
|
|
267
|
+
"BG": "Bulgarie",
|
|
268
|
+
"BH": "Bahreïn",
|
|
269
|
+
"BI": "Burundi",
|
|
270
|
+
"BJ": "Bénin",
|
|
271
|
+
"BL": "Saint-Barthélemy",
|
|
272
|
+
"BM": "Bermudes",
|
|
273
|
+
"BN": "Brunei Darussalam",
|
|
274
|
+
"BO": "Bolivie",
|
|
275
|
+
"BQ": "Bonaire, Saint-Eustache et Saba",
|
|
276
|
+
"BR": "Brésil",
|
|
277
|
+
"BS": "Bahamas",
|
|
278
|
+
"BT": "Bhoutan",
|
|
279
|
+
"BV": "Île Bouvet",
|
|
280
|
+
"BW": "Botswana",
|
|
281
|
+
"BY": "Biélorussie",
|
|
282
|
+
"BZ": "Belize",
|
|
283
|
+
"CA": "Canada",
|
|
284
|
+
"CC": "Îles Cocos",
|
|
285
|
+
"CD": "République démocratique du Congo",
|
|
286
|
+
"CF": "République Centrafricaine",
|
|
287
|
+
"CG": "République du Congo",
|
|
288
|
+
"CH": "Suisse",
|
|
289
|
+
"CI": "Côte-d'Ivoire",
|
|
290
|
+
"CK": "Îles Cook",
|
|
291
|
+
"CL": "Chili",
|
|
292
|
+
"CM": "Cameroun",
|
|
293
|
+
"CN": "Chine",
|
|
294
|
+
"CO": "Colombie",
|
|
295
|
+
"CR": "Costa Rica",
|
|
296
|
+
"CU": "Cuba",
|
|
297
|
+
"CV": "Cap-Vert",
|
|
298
|
+
"CW": "Curaçao",
|
|
299
|
+
"CX": "Île Christmas",
|
|
300
|
+
"CY": "Chypre",
|
|
301
|
+
"CZ": "République Tchèque",
|
|
302
|
+
"DE": "Allemagne",
|
|
303
|
+
"DJ": "Djibouti",
|
|
304
|
+
"DK": "Danemark",
|
|
305
|
+
"DM": "Dominique",
|
|
306
|
+
"DO": "République Dominicaine",
|
|
307
|
+
"DZ": "Algérie",
|
|
308
|
+
"EC": "Équateur",
|
|
309
|
+
"EE": "Estonie",
|
|
310
|
+
"EG": "Égypte",
|
|
311
|
+
"EH": "Sahara occidental",
|
|
312
|
+
"ER": "Érythrée",
|
|
313
|
+
"ES": "Espagne",
|
|
314
|
+
"ET": "Éthiopie",
|
|
315
|
+
"FI": "Finlande",
|
|
316
|
+
"FJ": "Fidji",
|
|
317
|
+
"FK": "Îles Malouines",
|
|
318
|
+
"FM": "Micronésie",
|
|
319
|
+
"FO": "Îles Féroé",
|
|
320
|
+
"FR": "France",
|
|
321
|
+
"GA": "Gabon",
|
|
322
|
+
"GB": "Royaume-Uni",
|
|
323
|
+
"GD": "Grenade",
|
|
324
|
+
"GE": "Géorgie",
|
|
325
|
+
"GF": "Guyane française",
|
|
326
|
+
"GG": "Guernesey",
|
|
327
|
+
"GH": "Ghana",
|
|
328
|
+
"GI": "Gibraltar",
|
|
329
|
+
"GL": "Groenland",
|
|
330
|
+
"GM": "Gambie",
|
|
331
|
+
"GN": "Guinée",
|
|
332
|
+
"GP": "Guadeloupe",
|
|
333
|
+
"GQ": "Guinée équatoriale",
|
|
334
|
+
"GR": "Grèce",
|
|
335
|
+
"GS": "Géorgie du Sud-et-les Îles Sandwich du Sud",
|
|
336
|
+
"GT": "Guatemala",
|
|
337
|
+
"GU": "Guam",
|
|
338
|
+
"GW": "Guinée-Bissau",
|
|
339
|
+
"GY": "Guyana",
|
|
340
|
+
"HK": "Hong Kong",
|
|
341
|
+
"HM": "Îles Heard-et-MacDonald",
|
|
342
|
+
"HN": "Honduras",
|
|
343
|
+
"HR": "Croatie",
|
|
344
|
+
"HT": "Haïti",
|
|
345
|
+
"HU": "Hongrie",
|
|
346
|
+
"ID": "Indonésie",
|
|
347
|
+
"IE": "Irlande",
|
|
348
|
+
"IL": "Israël",
|
|
349
|
+
"IM": "Île de Man",
|
|
350
|
+
"IN": "Inde",
|
|
351
|
+
"IO": "Océan Indien Britannique",
|
|
352
|
+
"IQ": "Irak",
|
|
353
|
+
"IR": "Iran",
|
|
354
|
+
"IS": "Islande",
|
|
355
|
+
"IT": "Italie",
|
|
356
|
+
"JE": "Jersey",
|
|
357
|
+
"JM": "Jamaïque",
|
|
358
|
+
"JO": "Jordanie",
|
|
359
|
+
"JP": "Japon",
|
|
360
|
+
"KE": "Kenya",
|
|
361
|
+
"KG": "Kirghizistan",
|
|
362
|
+
"KH": "Cambodge",
|
|
363
|
+
"KI": "Kiribati",
|
|
364
|
+
"KM": "Comores",
|
|
365
|
+
"KN": "Saint-Christophe-et-Niévès",
|
|
366
|
+
"KP": "Corée du Nord",
|
|
367
|
+
"KR": "Corée du Sud",
|
|
368
|
+
"KW": "Koweït",
|
|
369
|
+
"KY": "Îles Caïmans",
|
|
370
|
+
"KZ": "Kazakhstan",
|
|
371
|
+
"LA": "Laos",
|
|
372
|
+
"LB": "Liban",
|
|
373
|
+
"LC": "Sainte-Lucie",
|
|
374
|
+
"LI": "Liechtenstein",
|
|
375
|
+
"LK": "Sri Lanka",
|
|
376
|
+
"LR": "Libéria",
|
|
377
|
+
"LS": "Lesotho",
|
|
378
|
+
"LT": "Lituanie",
|
|
379
|
+
"LU": "Luxembourg",
|
|
380
|
+
"LV": "Lettonie",
|
|
381
|
+
"LY": "Libye",
|
|
382
|
+
"MA": "Maroc",
|
|
383
|
+
"MC": "Monaco",
|
|
384
|
+
"MD": "Moldavie",
|
|
385
|
+
"ME": "Monténégro",
|
|
386
|
+
"MF": "Saint-Martin (partie française)",
|
|
387
|
+
"MG": "Madagascar",
|
|
388
|
+
"MH": "Îles Marshall",
|
|
389
|
+
"MK": "Macédoine du Nord",
|
|
390
|
+
"ML": "Mali",
|
|
391
|
+
"MM": "Myanmar",
|
|
392
|
+
"MN": "Mongolie",
|
|
393
|
+
"MO": "Macao",
|
|
394
|
+
"MP": "Îles Mariannes du Nord",
|
|
395
|
+
"MQ": "Martinique",
|
|
396
|
+
"MR": "Mauritanie",
|
|
397
|
+
"MS": "Montserrat",
|
|
398
|
+
"MT": "Malte",
|
|
399
|
+
"MU": "Maurice",
|
|
400
|
+
"MV": "Maldives",
|
|
401
|
+
"MW": "Malawi",
|
|
402
|
+
"MX": "Mexique",
|
|
403
|
+
"MY": "Malaisie",
|
|
404
|
+
"MZ": "Mozambique",
|
|
405
|
+
"NA": "Namibie",
|
|
406
|
+
"NC": "Nouvelle-Calédonie",
|
|
407
|
+
"NE": "Niger",
|
|
408
|
+
"NF": "Île Norfolk",
|
|
409
|
+
"NG": "Nigéria",
|
|
410
|
+
"NI": "Nicaragua",
|
|
411
|
+
"NL": "Pays-Bas",
|
|
412
|
+
"NO": "Norvège",
|
|
413
|
+
"NP": "Népal",
|
|
414
|
+
"NR": "Nauru",
|
|
415
|
+
"NU": "Niué",
|
|
416
|
+
"NZ": "Nouvelle-Zélande",
|
|
417
|
+
"OM": "Oman",
|
|
418
|
+
"PA": "Panama",
|
|
419
|
+
"PE": "Pérou",
|
|
420
|
+
"PF": "Polynésie française",
|
|
421
|
+
"PG": "Papouasie-Nouvelle-Guinée",
|
|
422
|
+
"PH": "Philippines",
|
|
423
|
+
"PK": "Pakistan",
|
|
424
|
+
"PL": "Pologne",
|
|
425
|
+
"PM": "Saint-Pierre-et-Miquelon",
|
|
426
|
+
"PN": "Îles Pitcairn",
|
|
427
|
+
"PR": "Porto Rico",
|
|
428
|
+
"PS": "Palestine",
|
|
429
|
+
"PT": "Portugal",
|
|
430
|
+
"PW": "Palaos",
|
|
431
|
+
"PY": "Paraguay",
|
|
432
|
+
"QA": "Qatar",
|
|
433
|
+
"RE": "Réunion",
|
|
434
|
+
"RO": "Roumanie",
|
|
435
|
+
"RS": "Serbie",
|
|
436
|
+
"RU": "Russie",
|
|
437
|
+
"RW": "Rwanda",
|
|
438
|
+
"SA": "Arabie Saoudite",
|
|
439
|
+
"SB": "Îles Salomon",
|
|
440
|
+
"SC": "Seychelles",
|
|
441
|
+
"SD": "Soudan",
|
|
442
|
+
"SE": "Suède",
|
|
443
|
+
"SG": "Singapour",
|
|
444
|
+
"SH": "Sainte-Hélène",
|
|
445
|
+
"SI": "Slovénie",
|
|
446
|
+
"SJ": "Svalbard et Île Jan Mayen",
|
|
447
|
+
"SK": "Slovaquie",
|
|
448
|
+
"SL": "Sierra Leone",
|
|
449
|
+
"SM": "Saint-Marin",
|
|
450
|
+
"SN": "Sénégal",
|
|
451
|
+
"SO": "Somalie",
|
|
452
|
+
"SR": "Suriname",
|
|
453
|
+
"SS": "Soudan du Sud",
|
|
454
|
+
"ST": "São Tomé-et-Principe",
|
|
455
|
+
"SV": "El Salvador",
|
|
456
|
+
"SX": "Saint-Martin (partie néerlandaise)",
|
|
457
|
+
"SY": "Syrie",
|
|
458
|
+
"SZ": "Royaume d'Eswatini",
|
|
459
|
+
"TC": "Îles Turques-et-Caïques",
|
|
460
|
+
"TD": "Tchad",
|
|
461
|
+
"TF": "Terres australes françaises",
|
|
462
|
+
"TG": "Togo",
|
|
463
|
+
"TH": "Thaïlande",
|
|
464
|
+
"TJ": "Tadjikistan",
|
|
465
|
+
"TK": "Tokelau",
|
|
466
|
+
"TL": "Timor-Leste",
|
|
467
|
+
"TM": "Turkménistan",
|
|
468
|
+
"TN": "Tunisie",
|
|
469
|
+
"TO": "Tonga",
|
|
470
|
+
"TR": "Turquie",
|
|
471
|
+
"TT": "Trinité-et-Tobago",
|
|
472
|
+
"TV": "Tuvalu",
|
|
473
|
+
"TW": "Taïwan",
|
|
474
|
+
"TZ": "République unie de Tanzanie",
|
|
475
|
+
"UA": "Ukraine",
|
|
476
|
+
"UG": "Ouganda",
|
|
477
|
+
"UM": "Îles mineures éloignées des États-Unis",
|
|
478
|
+
"US": "États-Unis d'Amérique",
|
|
479
|
+
"UY": "Uruguay",
|
|
480
|
+
"UZ": "Ouzbékistan",
|
|
481
|
+
"VA": "Saint-Siège (Vatican)",
|
|
482
|
+
"VC": "Saint-Vincent-et-les-Grenadines",
|
|
483
|
+
"VE": "Venezuela",
|
|
484
|
+
"VG": "Îles vierges britanniques",
|
|
485
|
+
"VI": "Îles vierges américaines",
|
|
486
|
+
"VN": "Vietnam",
|
|
487
|
+
"VU": "Vanuatu",
|
|
488
|
+
"WF": "Wallis-et-Futuna",
|
|
489
|
+
"WS": "Samoa",
|
|
490
|
+
"YE": "Yémen",
|
|
491
|
+
"YT": "Mayotte",
|
|
492
|
+
"ZA": "Afrique du Sud",
|
|
493
|
+
"ZM": "Zambie",
|
|
494
|
+
"ZW": "Zimbabwe"
|
|
495
|
+
}
|
|
496
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.getLocalizer = void 0;
|
|
9
|
+
|
|
10
|
+
var _nodePolyglot = _interopRequireDefault(require("node-polyglot"));
|
|
11
|
+
|
|
12
|
+
var _en = _interopRequireDefault(require("./en.json"));
|
|
13
|
+
|
|
14
|
+
var _fr = _interopRequireDefault(require("./fr.json"));
|
|
15
|
+
|
|
16
|
+
var locales = {
|
|
17
|
+
en: _en.default,
|
|
18
|
+
fr: _fr.default
|
|
19
|
+
};
|
|
20
|
+
var polyglots = {};
|
|
21
|
+
var langs = ['fr', 'en'];
|
|
22
|
+
|
|
23
|
+
for (var _i = 0, _langs = langs; _i < _langs.length; _i++) {
|
|
24
|
+
var lang = _langs[_i];
|
|
25
|
+
var polyglot = new _nodePolyglot.default();
|
|
26
|
+
polyglot.extend(locales[lang]);
|
|
27
|
+
polyglots[lang] = polyglot;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @param {string} lang - fr, en, etc
|
|
31
|
+
* @returns {Function} - localization function
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
var getLocalizer = function getLocalizer(lang) {
|
|
36
|
+
var polyglot = polyglots[lang] || polyglots['en'];
|
|
37
|
+
var t = polyglot.t.bind(polyglot);
|
|
38
|
+
return t;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
exports.getLocalizer = getLocalizer;
|
|
@@ -11,12 +11,12 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
11
11
|
|
|
12
12
|
var _nodePolyglot = _interopRequireDefault(require("node-polyglot"));
|
|
13
13
|
|
|
14
|
-
var _emojiCountry = require("../emojiCountry");
|
|
15
|
-
|
|
16
14
|
var _en = _interopRequireDefault(require("./en.json"));
|
|
17
15
|
|
|
18
16
|
var _fr = _interopRequireDefault(require("./fr.json"));
|
|
19
17
|
|
|
18
|
+
var _countries = require("../../country/countries");
|
|
19
|
+
|
|
20
20
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
21
21
|
|
|
22
22
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
@@ -50,7 +50,7 @@ var getBoundT = function getBoundT(lang) {
|
|
|
50
50
|
});
|
|
51
51
|
|
|
52
52
|
var country = opts === null || opts === void 0 ? void 0 : opts.country;
|
|
53
|
-
var emojiCountry = country !== 'stranger' ? (0,
|
|
53
|
+
var emojiCountry = country !== 'stranger' ? (0, _countries.getEmojiByCountry)(country) : null;
|
|
54
54
|
var strangerLabel = country === 'stranger' ? t('country.stranger') : null;
|
|
55
55
|
return emojiCountry || strangerLabel ? "".concat(t(label, newOpts), " ").concat(emojiCountry || strangerLabel) : t(label, newOpts);
|
|
56
56
|
};
|
package/dist/types.js
CHANGED
|
@@ -956,5 +956,21 @@ var _dsl = require("./queries/dsl");
|
|
|
956
956
|
* @property {Context} context - The Cozy's context parameters
|
|
957
957
|
* @property {DiskUsage} diskUsage - The Cozy's disk usage
|
|
958
958
|
*/
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* @typedef {Object} CountryISO
|
|
962
|
+
* @property {string} code2 - ISO 3166-1 alpha-2
|
|
963
|
+
* @property {string} code3 - ISO 3166-1 alpha-3
|
|
964
|
+
* @property {string} number - ISO 3166-1 numeric
|
|
965
|
+
*/
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* @typedef {Object} Country
|
|
969
|
+
* @property {string} code2 - ISO 3166-1 alpha-2
|
|
970
|
+
* @property {string} code3 - ISO 3166-1 alpha-3
|
|
971
|
+
* @property {string} number - ISO 3166-1 numeric
|
|
972
|
+
* @property {string} name - Country name
|
|
973
|
+
* @property {string} nationality - Nationality name
|
|
974
|
+
*/
|
|
959
975
|
var _default = {};
|
|
960
976
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "47.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.node.js",
|
|
6
6
|
"browser": "dist/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@types/jest": "^26.0.20",
|
|
19
19
|
"@types/lodash": "^4.14.170",
|
|
20
20
|
"btoa": "^1.2.1",
|
|
21
|
-
"cozy-stack-client": "^
|
|
21
|
+
"cozy-stack-client": "^47.0.0",
|
|
22
22
|
"date-fns": "2.29.3",
|
|
23
23
|
"json-stable-stringify": "^1.0.1",
|
|
24
24
|
"lodash": "^4.17.13",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"react-native-ios11-devicecheck": "https://github.com/cozy/react-native-devicecheck#app-attest-v0.1"
|
|
76
76
|
},
|
|
77
77
|
"sideEffects": false,
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "9a454aef0f381d797b6fede937d926b3cfb9e607"
|
|
79
79
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List of countries with their ISO codes
|
|
3
|
+
*
|
|
4
|
+
* @constant
|
|
5
|
+
* @type {import('../../types').CountryISO[]}
|
|
6
|
+
*/
|
|
7
|
+
export const COUNTRIES_ISO: import('../../types').CountryISO[];
|
|
8
|
+
export function checkCountryCode(code: string): boolean;
|
|
9
|
+
export function getAllCountries(lang: string): import('../../types').Country[];
|
|
10
|
+
export function getCountryNameByCodeISO(code: string | number, { lang }?: {
|
|
11
|
+
lang: string;
|
|
12
|
+
}): string | null;
|
|
13
|
+
export function getAllCountryNames(lang: string): string[];
|
|
14
|
+
export function getNationalityByCodeISO(code: string | number, { lang }?: {
|
|
15
|
+
lang: string;
|
|
16
|
+
}): string | null;
|
|
17
|
+
export function getAllNationalities(lang: string): string[];
|
|
18
|
+
export function getEmojiByCountry(countryCode: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getLocalizer(lang: string): Function;
|
package/types/types.d.ts
CHANGED
|
@@ -1608,4 +1608,40 @@ export type InstanceInfo = {
|
|
|
1608
1608
|
*/
|
|
1609
1609
|
diskUsage: DiskUsage;
|
|
1610
1610
|
};
|
|
1611
|
+
export type CountryISO = {
|
|
1612
|
+
/**
|
|
1613
|
+
* - ISO 3166-1 alpha-2
|
|
1614
|
+
*/
|
|
1615
|
+
code2: string;
|
|
1616
|
+
/**
|
|
1617
|
+
* - ISO 3166-1 alpha-3
|
|
1618
|
+
*/
|
|
1619
|
+
code3: string;
|
|
1620
|
+
/**
|
|
1621
|
+
* - ISO 3166-1 numeric
|
|
1622
|
+
*/
|
|
1623
|
+
number: string;
|
|
1624
|
+
};
|
|
1625
|
+
export type Country = {
|
|
1626
|
+
/**
|
|
1627
|
+
* - ISO 3166-1 alpha-2
|
|
1628
|
+
*/
|
|
1629
|
+
code2: string;
|
|
1630
|
+
/**
|
|
1631
|
+
* - ISO 3166-1 alpha-3
|
|
1632
|
+
*/
|
|
1633
|
+
code3: string;
|
|
1634
|
+
/**
|
|
1635
|
+
* - ISO 3166-1 numeric
|
|
1636
|
+
*/
|
|
1637
|
+
number: string;
|
|
1638
|
+
/**
|
|
1639
|
+
* - Country name
|
|
1640
|
+
*/
|
|
1641
|
+
name: string;
|
|
1642
|
+
/**
|
|
1643
|
+
* - Nationality name
|
|
1644
|
+
*/
|
|
1645
|
+
nationality: string;
|
|
1646
|
+
};
|
|
1611
1647
|
import { QueryDefinition } from "./queries/dsl";
|