diff --git a/packages-new/common/core/src/i18n/countries/en.json b/packages-new/common/core/src/i18n/countries/en.json new file mode 100644 index 0000000000..0100b6b031 --- /dev/null +++ b/packages-new/common/core/src/i18n/countries/en.json @@ -0,0 +1,251 @@ +[ + {"isoCode":"af", "name":"Afghanistan"}, + {"isoCode":"ax", "name":"Åland Islands"}, + {"isoCode":"al", "name":"Albania"}, + {"isoCode":"dz", "name":"Algeria"}, + {"isoCode":"as", "name":"American Samoa"}, + {"isoCode":"ad", "name":"Andorra"}, + {"isoCode":"ao", "name":"Angola"}, + {"isoCode":"ai", "name":"Anguilla"}, + {"isoCode":"aq", "name":"Antarctica"}, + {"isoCode":"ag", "name":"Antigua and Barbuda"}, + {"isoCode":"ar", "name":"Argentina"}, + {"isoCode":"am", "name":"Armenia"}, + {"isoCode":"aw", "name":"Aruba"}, + {"isoCode":"au", "name":"Australia"}, + {"isoCode":"at", "name":"Austria"}, + {"isoCode":"az", "name":"Azerbaijan"}, + {"isoCode":"bs", "name":"Bahamas"}, + {"isoCode":"bh", "name":"Bahrain"}, + {"isoCode":"bd", "name":"Bangladesh"}, + {"isoCode":"bb", "name":"Barbados"}, + {"isoCode":"by", "name":"Belarus"}, + {"isoCode":"be", "name":"Belgium"}, + {"isoCode":"bz", "name":"Belize"}, + {"isoCode":"bj", "name":"Benin"}, + {"isoCode":"bm", "name":"Bermuda"}, + {"isoCode":"bt", "name":"Bhutan"}, + {"isoCode":"bo", "name":"Bolivia (Plurinational State of)"}, + {"isoCode":"bq", "name":"Bonaire, Sint Eustatius and Saba"}, + {"isoCode":"ba", "name":"Bosnia and Herzegovina"}, + {"isoCode":"bw", "name":"Botswana"}, + {"isoCode":"bv", "name":"Bouvet Island"}, + {"isoCode":"br", "name":"Brazil"}, + {"isoCode":"io", "name":"British Indian Ocean Territory"}, + {"isoCode":"bn", "name":"Brunei Darussalam"}, + {"isoCode":"bg", "name":"Bulgaria"}, + {"isoCode":"bf", "name":"Burkina Faso"}, + {"isoCode":"bi", "name":"Burundi"}, + {"isoCode":"cv", "name":"Cabo Verde"}, + {"isoCode":"kh", "name":"Cambodia"}, + {"isoCode":"cm", "name":"Cameroon"}, + {"isoCode":"ca", "name":"Canada"}, + {"isoCode":"ky", "name":"Cayman Islands"}, + {"isoCode":"cf", "name":"Central African Republic"}, + {"isoCode":"td", "name":"Chad"}, + {"isoCode":"cl", "name":"Chile"}, + {"isoCode":"cn", "name":"China"}, + {"isoCode":"cx", "name":"Christmas Island"}, + {"isoCode":"cc", "name":"Cocos (Keeling) Islands"}, + {"isoCode":"co", "name":"Colombia"}, + {"isoCode":"km", "name":"Comoros"}, + {"isoCode":"cg", "name":"Congo"}, + {"isoCode":"cd", "name":"Congo, Democratic Republic of the"}, + {"isoCode":"ck", "name":"Cook Islands"}, + {"isoCode":"cr", "name":"Costa Rica"}, + {"isoCode":"ci", "name":"Côte d'Ivoire"}, + {"isoCode":"hr", "name":"Croatia"}, + {"isoCode":"cu", "name":"Cuba"}, + {"isoCode":"cw", "name":"Curaçao"}, + {"isoCode":"cy", "name":"Cyprus"}, + {"isoCode":"cz", "name":"Czechia"}, + {"isoCode":"dk", "name":"Denmark"}, + {"isoCode":"dj", "name":"Djibouti"}, + {"isoCode":"dm", "name":"Dominica"}, + {"isoCode":"do", "name":"Dominican Republic"}, + {"isoCode":"ec", "name":"Ecuador"}, + {"isoCode":"eg", "name":"Egypt"}, + {"isoCode":"sv", "name":"El Salvador"}, + {"isoCode":"gq", "name":"Equatorial Guinea"}, + {"isoCode":"er", "name":"Eritrea"}, + {"isoCode":"ee", "name":"Estonia"}, + {"isoCode":"sz", "name":"Eswatini"}, + {"isoCode":"et", "name":"Ethiopia"}, + {"isoCode":"fk", "name":"Falkland Islands (Malvinas)"}, + {"isoCode":"fo", "name":"Faroe Islands"}, + {"isoCode":"fj", "name":"Fiji"}, + {"isoCode":"fi", "name":"Finland"}, + {"isoCode":"fr", "name":"France"}, + {"isoCode":"gf", "name":"French Guiana"}, + {"isoCode":"pf", "name":"French Polynesia"}, + {"isoCode":"tf", "name":"French Southern Territories"}, + {"isoCode":"ga", "name":"Gabon"}, + {"isoCode":"gm", "name":"Gambia"}, + {"isoCode":"ge", "name":"Georgia"}, + {"isoCode":"de", "name":"Germany"}, + {"isoCode":"gh", "name":"Ghana"}, + {"isoCode":"gi", "name":"Gibraltar"}, + {"isoCode":"gr", "name":"Greece"}, + {"isoCode":"gl", "name":"Greenland"}, + {"isoCode":"gd", "name":"Grenada"}, + {"isoCode":"gp", "name":"Guadeloupe"}, + {"isoCode":"gu", "name":"Guam"}, + {"isoCode":"gt", "name":"Guatemala"}, + {"isoCode":"gg", "name":"Guernsey"}, + {"isoCode":"gn", "name":"Guinea"}, + {"isoCode":"gw", "name":"Guinea-Bissau"}, + {"isoCode":"gy", "name":"Guyana"}, + {"isoCode":"ht", "name":"Haiti"}, + {"isoCode":"hm", "name":"Heard Island and McDonald Islands"}, + {"isoCode":"va", "name":"Holy See"}, + {"isoCode":"hn", "name":"Honduras"}, + {"isoCode":"hk", "name":"Hong Kong"}, + {"isoCode":"hu", "name":"Hungary"}, + {"isoCode":"is", "name":"Iceland"}, + {"isoCode":"in", "name":"India"}, + {"isoCode":"id", "name":"Indonesia"}, + {"isoCode":"ir", "name":"Iran (Islamic Republic of)"}, + {"isoCode":"iq", "name":"Iraq"}, + {"isoCode":"ie", "name":"Ireland"}, + {"isoCode":"im", "name":"Isle of Man"}, + {"isoCode":"il", "name":"Israel"}, + {"isoCode":"it", "name":"Italy"}, + {"isoCode":"jm", "name":"Jamaica"}, + {"isoCode":"jp", "name":"Japan"}, + {"isoCode":"je", "name":"Jersey"}, + {"isoCode":"jo", "name":"Jordan"}, + {"isoCode":"kz", "name":"Kazakhstan"}, + {"isoCode":"ke", "name":"Kenya"}, + {"isoCode":"ki", "name":"Kiribati"}, + {"isoCode":"kp", "name":"Korea (Democratic People's Republic of)"}, + {"isoCode":"kr", "name":"Korea, Republic of"}, + {"isoCode":"kw", "name":"Kuwait"}, + {"isoCode":"kg", "name":"Kyrgyzstan"}, + {"isoCode":"la", "name":"Lao People's Democratic Republic"}, + {"isoCode":"lv", "name":"Latvia"}, + {"isoCode":"lb", "name":"Lebanon"}, + {"isoCode":"ls", "name":"Lesotho"}, + {"isoCode":"lr", "name":"Liberia"}, + {"isoCode":"ly", "name":"Libya"}, + {"isoCode":"li", "name":"Liechtenstein"}, + {"isoCode":"lt", "name":"Lithuania"}, + {"isoCode":"lu", "name":"Luxembourg"}, + {"isoCode":"mo", "name":"Macao"}, + {"isoCode":"mg", "name":"Madagascar"}, + {"isoCode":"mw", "name":"Malawi"}, + {"isoCode":"my", "name":"Malaysia"}, + {"isoCode":"mv", "name":"Maldives"}, + {"isoCode":"ml", "name":"Mali"}, + {"isoCode":"mt", "name":"Malta"}, + {"isoCode":"mh", "name":"Marshall Islands"}, + {"isoCode":"mq", "name":"Martinique"}, + {"isoCode":"mr", "name":"Mauritania"}, + {"isoCode":"mu", "name":"Mauritius"}, + {"isoCode":"yt", "name":"Mayotte"}, + {"isoCode":"mx", "name":"Mexico"}, + {"isoCode":"fm", "name":"Micronesia (Federated States of)"}, + {"isoCode":"md", "name":"Moldova, Republic of"}, + {"isoCode":"mc", "name":"Monaco"}, + {"isoCode":"mn", "name":"Mongolia"}, + {"isoCode":"me", "name":"Montenegro"}, + {"isoCode":"ms", "name":"Montserrat"}, + {"isoCode":"ma", "name":"Morocco"}, + {"isoCode":"mz", "name":"Mozambique"}, + {"isoCode":"mm", "name":"Myanmar"}, + {"isoCode":"na", "name":"Namibia"}, + {"isoCode":"nr", "name":"Nauru"}, + {"isoCode":"np", "name":"Nepal"}, + {"isoCode":"nl", "name":"Netherlands"}, + {"isoCode":"nc", "name":"New Caledonia"}, + {"isoCode":"nz", "name":"New Zealand"}, + {"isoCode":"ni", "name":"Nicaragua"}, + {"isoCode":"ne", "name":"Niger"}, + {"isoCode":"ng", "name":"Nigeria"}, + {"isoCode":"nu", "name":"Niue"}, + {"isoCode":"nf", "name":"Norfolk Island"}, + {"isoCode":"mk", "name":"North Macedonia"}, + {"isoCode":"mp", "name":"Northern Mariana Islands"}, + {"isoCode":"no", "name":"Norway"}, + {"isoCode":"om", "name":"Oman"}, + {"isoCode":"pk", "name":"Pakistan"}, + {"isoCode":"pw", "name":"Palau"}, + {"isoCode":"ps", "name":"Palestine, State of"}, + {"isoCode":"pa", "name":"Panama"}, + {"isoCode":"pg", "name":"Papua New Guinea"}, + {"isoCode":"py", "name":"Paraguay"}, + {"isoCode":"pe", "name":"Peru"}, + {"isoCode":"ph", "name":"Philippines"}, + {"isoCode":"pn", "name":"Pitcairn"}, + {"isoCode":"pl", "name":"Poland"}, + {"isoCode":"pt", "name":"Portugal"}, + {"isoCode":"pr", "name":"Puerto Rico"}, + {"isoCode":"qa", "name":"Qatar"}, + {"isoCode":"re", "name":"Réunion"}, + {"isoCode":"ro", "name":"Romania"}, + {"isoCode":"ru", "name":"Russian Federation"}, + {"isoCode":"rw", "name":"Rwanda"}, + {"isoCode":"bl", "name":"Saint Barthélemy"}, + {"isoCode":"sh", "name":"Saint Helena, Ascension and Tristan da Cunha"}, + {"isoCode":"kn", "name":"Saint Kitts and Nevis"}, + {"isoCode":"lc", "name":"Saint Lucia"}, + {"isoCode":"mf", "name":"Saint Martin (French part)"}, + {"isoCode":"pm", "name":"Saint Pierre and Miquelon"}, + {"isoCode":"vc", "name":"Saint Vincent and the Grenadines"}, + {"isoCode":"ws", "name":"Samoa"}, + {"isoCode":"sm", "name":"San Marino"}, + {"isoCode":"st", "name":"Sao Tome and Principe"}, + {"isoCode":"sa", "name":"Saudi Arabia"}, + {"isoCode":"sn", "name":"Senegal"}, + {"isoCode":"rs", "name":"Serbia"}, + {"isoCode":"sc", "name":"Seychelles"}, + {"isoCode":"sl", "name":"Sierra Leone"}, + {"isoCode":"sg", "name":"Singapore"}, + {"isoCode":"sx", "name":"Sint Maarten (Dutch part)"}, + {"isoCode":"sk", "name":"Slovakia"}, + {"isoCode":"si", "name":"Slovenia"}, + {"isoCode":"sb", "name":"Solomon Islands"}, + {"isoCode":"so", "name":"Somalia"}, + {"isoCode":"za", "name":"South Africa"}, + {"isoCode":"gs", "name":"South Georgia and the South Sandwich Islands"}, + {"isoCode":"ss", "name":"South Sudan"}, + {"isoCode":"es", "name":"Spain"}, + {"isoCode":"lk", "name":"Sri Lanka"}, + {"isoCode":"sd", "name":"Sudan"}, + {"isoCode":"sr", "name":"Suriname"}, + {"isoCode":"sj", "name":"Svalbard and Jan Mayen"}, + {"isoCode":"se", "name":"Sweden"}, + {"isoCode":"ch", "name":"Switzerland"}, + {"isoCode":"sy", "name":"Syrian Arab Republic"}, + {"isoCode":"tw", "name":"Taiwan, Province of China"}, + {"isoCode":"tj", "name":"Tajikistan"}, + {"isoCode":"tz", "name":"Tanzania, United Republic of"}, + {"isoCode":"th", "name":"Thailand"}, + {"isoCode":"tl", "name":"Timor-Leste"}, + {"isoCode":"tg", "name":"Togo"}, + {"isoCode":"tk", "name":"Tokelau"}, + {"isoCode":"to", "name":"Tonga"}, + {"isoCode":"tt", "name":"Trinidad and Tobago"}, + {"isoCode":"tn", "name":"Tunisia"}, + {"isoCode":"tr", "name":"Türkiye"}, + {"isoCode":"tm", "name":"Turkmenistan"}, + {"isoCode":"tc", "name":"Turks and Caicos Islands"}, + {"isoCode":"tv", "name":"Tuvalu"}, + {"isoCode":"ug", "name":"Uganda"}, + {"isoCode":"ua", "name":"Ukraine"}, + {"isoCode":"ae", "name":"United Arab Emirates"}, + {"isoCode":"gb", "name":"United Kingdom of Great Britain and Northern Ireland"}, + {"isoCode":"us", "name":"United States of America"}, + {"isoCode":"um", "name":"United States Minor Outlying Islands"}, + {"isoCode":"uy", "name":"Uruguay"}, + {"isoCode":"uz", "name":"Uzbekistan"}, + {"isoCode":"vu", "name":"Vanuatu"}, + {"isoCode":"ve", "name":"Venezuela (Bolivarian Republic of)"}, + {"isoCode":"vn", "name":"Viet Nam"}, + {"isoCode":"vg", "name":"Virgin Islands (British)"}, + {"isoCode":"vi", "name":"Virgin Islands (U.S.)"}, + {"isoCode":"wf", "name":"Wallis and Futuna"}, + {"isoCode":"eh", "name":"Western Sahara"}, + {"isoCode":"ye", "name":"Yemen"}, + {"isoCode":"zm", "name":"Zambia"}, + {"isoCode":"zw", "name":"Zimbabwe"} +] \ No newline at end of file diff --git a/packages-new/common/core/src/i18n/countries/fr.json b/packages-new/common/core/src/i18n/countries/fr.json new file mode 100644 index 0000000000..b4c35a8202 --- /dev/null +++ b/packages-new/common/core/src/i18n/countries/fr.json @@ -0,0 +1,251 @@ +[ + {"isoCode":"af", "name":"Afghanistan"}, + {"isoCode":"za", "name":"Afrique du Sud"}, + {"isoCode":"ax", "name":"Îles Åland"}, + {"isoCode":"al", "name":"Albanie"}, + {"isoCode":"dz", "name":"Algérie"}, + {"isoCode":"de", "name":"Allemagne"}, + {"isoCode":"ad", "name":"Andorre"}, + {"isoCode":"ao", "name":"Angola"}, + {"isoCode":"ai", "name":"Anguilla"}, + {"isoCode":"aq", "name":"Antarctique"}, + {"isoCode":"ag", "name":"Antigua-et-Barbuda"}, + {"isoCode":"sa", "name":"Arabie saoudite"}, + {"isoCode":"ar", "name":"Argentine"}, + {"isoCode":"am", "name":"Arménie"}, + {"isoCode":"aw", "name":"Aruba"}, + {"isoCode":"au", "name":"Australie"}, + {"isoCode":"at", "name":"Autriche"}, + {"isoCode":"az", "name":"Azerbaïdjan"}, + {"isoCode":"bs", "name":"Bahamas"}, + {"isoCode":"bh", "name":"Bahreïn"}, + {"isoCode":"bd", "name":"Bangladesh"}, + {"isoCode":"bb", "name":"Barbade"}, + {"isoCode":"by", "name":"Biélorussie"}, + {"isoCode":"be", "name":"Belgique"}, + {"isoCode":"bz", "name":"Belize"}, + {"isoCode":"bj", "name":"Bénin"}, + {"isoCode":"bm", "name":"Bermudes"}, + {"isoCode":"bt", "name":"Bhoutan"}, + {"isoCode":"bo", "name":"Bolivie"}, + {"isoCode":"bq", "name":"Pays-Bas caribéens"}, + {"isoCode":"ba", "name":"Bosnie-Herzégovine"}, + {"isoCode":"bw", "name":"Botswana"}, + {"isoCode":"bv", "name":"Île Bouvet"}, + {"isoCode":"br", "name":"Brésil"}, + {"isoCode":"bn", "name":"Brunei"}, + {"isoCode":"bg", "name":"Bulgarie"}, + {"isoCode":"bf", "name":"Burkina Faso"}, + {"isoCode":"bi", "name":"Burundi"}, + {"isoCode":"ky", "name":"Îles Caïmans"}, + {"isoCode":"kh", "name":"Cambodge"}, + {"isoCode":"cm", "name":"Cameroun"}, + {"isoCode":"ca", "name":"Canada"}, + {"isoCode":"cv", "name":"Cap-Vert"}, + {"isoCode":"cf", "name":"République centrafricaine"}, + {"isoCode":"cl", "name":"Chili"}, + {"isoCode":"cn", "name":"Chine"}, + {"isoCode":"cx", "name":"Île Christmas"}, + {"isoCode":"cy", "name":"Chypre"}, + {"isoCode":"cc", "name":"Îles Cocos"}, + {"isoCode":"co", "name":"Colombie"}, + {"isoCode":"km", "name":"Comores"}, + {"isoCode":"cg", "name":"République du Congo"}, + {"isoCode":"cd", "name":"République démocratique du Congo"}, + {"isoCode":"ck", "name":"Îles Cook"}, + {"isoCode":"kr", "name":"Corée du Sud"}, + {"isoCode":"kp", "name":"Corée du Nord"}, + {"isoCode":"cr", "name":"Costa Rica"}, + {"isoCode":"ci", "name":"Côte d'Ivoire"}, + {"isoCode":"hr", "name":"Croatie"}, + {"isoCode":"cu", "name":"Cuba"}, + {"isoCode":"cw", "name":"Curaçao"}, + {"isoCode":"dk", "name":"Danemark"}, + {"isoCode":"dj", "name":"Djibouti"}, + {"isoCode":"do", "name":"République dominicaine"}, + {"isoCode":"dm", "name":"Dominique"}, + {"isoCode":"eg", "name":"Égypte"}, + {"isoCode":"sv", "name":"Salvador"}, + {"isoCode":"ae", "name":"Émirats arabes unis"}, + {"isoCode":"ec", "name":"Équateur"}, + {"isoCode":"er", "name":"Érythrée"}, + {"isoCode":"es", "name":"Espagne"}, + {"isoCode":"ee", "name":"Estonie"}, + {"isoCode":"us", "name":"États-Unis"}, + {"isoCode":"et", "name":"Éthiopie"}, + {"isoCode":"fk", "name":"Malouines"}, + {"isoCode":"fo", "name":"Îles Féroé"}, + {"isoCode":"fj", "name":"Fidji"}, + {"isoCode":"fi", "name":"Finlande"}, + {"isoCode":"fr", "name":"France"}, + {"isoCode":"ga", "name":"Gabon"}, + {"isoCode":"gm", "name":"Gambie"}, + {"isoCode":"ge", "name":"Géorgie"}, + {"isoCode":"gs", "name":"Géorgie du Sud-et-les îles Sandwich du Sud"}, + {"isoCode":"gh", "name":"Ghana"}, + {"isoCode":"gi", "name":"Gibraltar"}, + {"isoCode":"gr", "name":"Grèce"}, + {"isoCode":"gd", "name":"Grenade"}, + {"isoCode":"gl", "name":"Groenland"}, + {"isoCode":"gp", "name":"Guadeloupe"}, + {"isoCode":"gu", "name":"Guam"}, + {"isoCode":"gt", "name":"Guatemala"}, + {"isoCode":"gg", "name":"Guernesey"}, + {"isoCode":"gn", "name":"Guinée"}, + {"isoCode":"gw", "name":"Guinée-Bissau"}, + {"isoCode":"gq", "name":"Guinée équatoriale"}, + {"isoCode":"gy", "name":"Guyana"}, + {"isoCode":"gf", "name":"Guyane"}, + {"isoCode":"ht", "name":"Haïti"}, + {"isoCode":"hm", "name":"Îles Heard-et-MacDonald"}, + {"isoCode":"hn", "name":"Honduras"}, + {"isoCode":"hk", "name":"Hong Kong"}, + {"isoCode":"hu", "name":"Hongrie"}, + {"isoCode":"im", "name":"Île de Man"}, + {"isoCode":"um", "name":"Îles mineures éloignées des États-Unis"}, + {"isoCode":"vg", "name":"Îles Vierges britanniques"}, + {"isoCode":"vi", "name":"Îles Vierges des États-Unis"}, + {"isoCode":"in", "name":"Inde"}, + {"isoCode":"id", "name":"Indonésie"}, + {"isoCode":"ir", "name":"Iran"}, + {"isoCode":"iq", "name":"Irak"}, + {"isoCode":"ie", "name":"Irlande"}, + {"isoCode":"is", "name":"Islande"}, + {"isoCode":"il", "name":"Israël"}, + {"isoCode":"it", "name":"Italie"}, + {"isoCode":"jm", "name":"Jamaïque"}, + {"isoCode":"jp", "name":"Japon"}, + {"isoCode":"je", "name":"Jersey"}, + {"isoCode":"jo", "name":"Jordanie"}, + {"isoCode":"kz", "name":"Kazakhstan"}, + {"isoCode":"ke", "name":"Kenya"}, + {"isoCode":"kg", "name":"Kirghizistan"}, + {"isoCode":"ki", "name":"Kiribati"}, + {"isoCode":"kw", "name":"Koweït"}, + {"isoCode":"la", "name":"Laos"}, + {"isoCode":"ls", "name":"Lesotho"}, + {"isoCode":"lv", "name":"Lettonie"}, + {"isoCode":"lb", "name":"Liban"}, + {"isoCode":"lr", "name":"Liberia"}, + {"isoCode":"ly", "name":"Libye"}, + {"isoCode":"li", "name":"Liechtenstein"}, + {"isoCode":"lt", "name":"Lituanie"}, + {"isoCode":"lu", "name":"Luxembourg"}, + {"isoCode":"mo", "name":"Macao"}, + {"isoCode":"mk", "name":"Macédoine du Nord"}, + {"isoCode":"mg", "name":"Madagascar"}, + {"isoCode":"my", "name":"Malaisie"}, + {"isoCode":"mw", "name":"Malawi"}, + {"isoCode":"mv", "name":"Maldives"}, + {"isoCode":"ml", "name":"Mali"}, + {"isoCode":"mt", "name":"Malte"}, + {"isoCode":"mp", "name":"Îles Mariannes du Nord"}, + {"isoCode":"ma", "name":"Maroc"}, + {"isoCode":"mh", "name":"Îles Marshall"}, + {"isoCode":"mq", "name":"Martinique"}, + {"isoCode":"mu", "name":"Maurice"}, + {"isoCode":"mr", "name":"Mauritanie"}, + {"isoCode":"yt", "name":"Mayotte"}, + {"isoCode":"mx", "name":"Mexique"}, + {"isoCode":"fm", "name":"États fédérés de Micronésie"}, + {"isoCode":"md", "name":"Moldavie"}, + {"isoCode":"mc", "name":"Monaco"}, + {"isoCode":"mn", "name":"Mongolie"}, + {"isoCode":"me", "name":"Monténégro"}, + {"isoCode":"ms", "name":"Montserrat"}, + {"isoCode":"mz", "name":"Mozambique"}, + {"isoCode":"mm", "name":"Birmanie"}, + {"isoCode":"na", "name":"Namibie"}, + {"isoCode":"nr", "name":"Nauru"}, + {"isoCode":"np", "name":"Népal"}, + {"isoCode":"ni", "name":"Nicaragua"}, + {"isoCode":"ne", "name":"Niger"}, + {"isoCode":"ng", "name":"Nigeria"}, + {"isoCode":"nu", "name":"Niue"}, + {"isoCode":"nf", "name":"Île Norfolk"}, + {"isoCode":"no", "name":"Norvège"}, + {"isoCode":"nc", "name":"Nouvelle-Calédonie"}, + {"isoCode":"nz", "name":"Nouvelle-Zélande"}, + {"isoCode":"io", "name":"Territoire britannique de l'océan Indien"}, + {"isoCode":"om", "name":"Oman"}, + {"isoCode":"ug", "name":"Ouganda"}, + {"isoCode":"uz", "name":"Ouzbékistan"}, + {"isoCode":"pk", "name":"Pakistan"}, + {"isoCode":"pw", "name":"Palaos"}, + {"isoCode":"ps", "name":"Palestine"}, + {"isoCode":"pa", "name":"Panama"}, + {"isoCode":"pg", "name":"Papouasie-Nouvelle-Guinée"}, + {"isoCode":"py", "name":"Paraguay"}, + {"isoCode":"nl", "name":"Pays-Bas"}, + {"isoCode":"pe", "name":"Pérou"}, + {"isoCode":"ph", "name":"Philippines"}, + {"isoCode":"pn", "name":"Îles Pitcairn"}, + {"isoCode":"pl", "name":"Pologne"}, + {"isoCode":"pf", "name":"Polynésie française"}, + {"isoCode":"pr", "name":"Porto Rico"}, + {"isoCode":"pt", "name":"Portugal"}, + {"isoCode":"qa", "name":"Qatar"}, + {"isoCode":"re", "name":"La Réunion"}, + {"isoCode":"ro", "name":"Roumanie"}, + {"isoCode":"gb", "name":"Royaume-Uni"}, + {"isoCode":"ru", "name":"Russie"}, + {"isoCode":"rw", "name":"Rwanda"}, + {"isoCode":"eh", "name":"République arabe sahraouie démocratique"}, + {"isoCode":"bl", "name":"Saint-Barthélemy"}, + {"isoCode":"kn", "name":"Saint-Christophe-et-Niévès"}, + {"isoCode":"sm", "name":"Saint-Marin"}, + {"isoCode":"mf", "name":"Saint-Martin"}, + {"isoCode":"sx", "name":"Saint-Martin"}, + {"isoCode":"pm", "name":"Saint-Pierre-et-Miquelon"}, + {"isoCode":"va", "name":"Saint-Siège (État de la Cité du Vatican)"}, + {"isoCode":"vc", "name":"Saint-Vincent-et-les-Grenadines"}, + {"isoCode":"sh", "name":"Sainte-Hélène, Ascension et Tristan da Cunha"}, + {"isoCode":"lc", "name":"Sainte-Lucie"}, + {"isoCode":"sb", "name":"Îles Salomon"}, + {"isoCode":"ws", "name":"Samoa"}, + {"isoCode":"as", "name":"Samoa américaines"}, + {"isoCode":"st", "name":"Sao Tomé-et-Principe"}, + {"isoCode":"sn", "name":"Sénégal"}, + {"isoCode":"rs", "name":"Serbie"}, + {"isoCode":"sc", "name":"Seychelles"}, + {"isoCode":"sl", "name":"Sierra Leone"}, + {"isoCode":"sg", "name":"Singapour"}, + {"isoCode":"sk", "name":"Slovaquie"}, + {"isoCode":"si", "name":"Slovénie"}, + {"isoCode":"so", "name":"Somalie"}, + {"isoCode":"sd", "name":"Soudan"}, + {"isoCode":"ss", "name":"Soudan du Sud"}, + {"isoCode":"lk", "name":"Sri Lanka"}, + {"isoCode":"se", "name":"Suède"}, + {"isoCode":"ch", "name":"Suisse"}, + {"isoCode":"sr", "name":"Suriname"}, + {"isoCode":"sj", "name":"Svalbard et île Jan Mayen"}, + {"isoCode":"sz", "name":"Eswatini"}, + {"isoCode":"sy", "name":"Syrie"}, + {"isoCode":"tj", "name":"Tadjikistan"}, + {"isoCode":"tw", "name":"Taïwan \/ (République de Chine (Taïwan))"}, + {"isoCode":"tz", "name":"Tanzanie"}, + {"isoCode":"td", "name":"Tchad"}, + {"isoCode":"cz", "name":"Tchéquie"}, + {"isoCode":"tf", "name":"Terres australes et antarctiques françaises"}, + {"isoCode":"th", "name":"Thaïlande"}, + {"isoCode":"tl", "name":"Timor oriental"}, + {"isoCode":"tg", "name":"Togo"}, + {"isoCode":"tk", "name":"Tokelau"}, + {"isoCode":"to", "name":"Tonga"}, + {"isoCode":"tt", "name":"Trinité-et-Tobago"}, + {"isoCode":"tn", "name":"Tunisie"}, + {"isoCode":"tm", "name":"Turkménistan"}, + {"isoCode":"tc", "name":"Îles Turques-et-Caïques"}, + {"isoCode":"tr", "name":"Turquie"}, + {"isoCode":"tv", "name":"Tuvalu"}, + {"isoCode":"ua", "name":"Ukraine"}, + {"isoCode":"uy", "name":"Uruguay"}, + {"isoCode":"vu", "name":"Vanuatu"}, + {"isoCode":"ve", "name":"Venezuela"}, + {"isoCode":"vn", "name":"Viêt Nam"}, + {"isoCode":"wf", "name":"Wallis-et-Futuna"}, + {"isoCode":"ye", "name":"Yémen"}, + {"isoCode":"zm", "name":"Zambie"}, + {"isoCode":"zw", "name":"Zimbabwe"} +] \ No newline at end of file diff --git a/packages/common/core/src/i18n/ods-country-iso-codes.types.ts b/packages/common/core/src/i18n/ods-country-iso-codes.types.ts index eab3846e1b..86df335a82 100644 --- a/packages/common/core/src/i18n/ods-country-iso-codes.types.ts +++ b/packages/common/core/src/i18n/ods-country-iso-codes.types.ts @@ -1,10 +1,19 @@ export enum ODS_COUNTRY_ISO_CODE { + AD = 'ad', // Andorra + AE = 'ae', // United Arab Emirates + AF = 'af', // Afghanistan + AG = 'ag', // Antigua and Barbuda + AL = 'al', // Albania + AO = 'ao', // Angola + AI = 'ai', // Anguilla + AM = 'am', // Armenia AR = 'ar', // Argentina AS = 'as', // American Samoa AT = 'at', // Austria AU = 'au', // Australia AW = 'aw', // Aruba AX = 'ax', // Åland Islands + AQ = 'aq', // Antarctica AZ = 'az', // Azerbaijan BA = 'ba', // Bosnia and Herzegovina BB = 'bb', // Barbados @@ -23,6 +32,7 @@ export enum ODS_COUNTRY_ISO_CODE { BR = 'br', // Brazil BS = 'bs', // Bahamas BT = 'bt', // Bhutan + BV = 'bv', // Bouvet Island BW = 'bw', // Botswana BY = 'by', // Belarus BZ = 'bz', // Belize @@ -32,7 +42,7 @@ export enum ODS_COUNTRY_ISO_CODE { CF = 'cf', // Central African Republic CG = 'cg', // Congo CH = 'ch', // Switzerland - CI = 'ci', // ôte d\'Ivoire + CI = 'ci', // Côte d\'Ivoire CK = 'ck', // Cook Islands CL = 'cl', // Chile CM = 'cm', // Cameroon @@ -86,6 +96,7 @@ export enum ODS_COUNTRY_ISO_CODE { GY = 'gy', // Guyana HK = 'hk', // Hong Kong HN = 'hn', // Honduras + HM = 'hm', // Heard Island and McDonald Islands HR = 'hr', // Croatia HT = 'ht', // Haiti HU = 'hu', // Hungary @@ -104,7 +115,11 @@ export enum ODS_COUNTRY_ISO_CODE { JO = 'jo', // Jordan JP = 'jp', // Japan KE = 'ke', // Kenya + KG = 'kg', // Kiribati + KH = 'kh', // Cambodia + KI = 'ki', // Kiribati KN = 'kn', // Saint Kitts and Nevis + KM = 'km', // Comoros KP = 'kp', // orea (Democratic People\'s Republic of) KR = 'kr', // Korea, Republic of KW = 'kw', // Kuwait @@ -114,6 +129,7 @@ export enum ODS_COUNTRY_ISO_CODE { LB = 'lb', // Lebanon LC = 'lc', // Saint Lucia LI = 'li', // Liechtenstein + LK = 'lk', // Sri lanka LR = 'lr', // Liberia LS = 'ls', // Lesotho LT = 'lt', // Lithuania @@ -157,6 +173,7 @@ export enum ODS_COUNTRY_ISO_CODE { NZ = 'nz', // New Zealand OM = 'om', // Oman PA = 'pa', // Panama + PE = 'pe', // Peru PF = 'pf', // French Polynesia PG = 'pg', // Papua New Guinea PH = 'ph', // Philippines @@ -234,8 +251,7 @@ export enum ODS_COUNTRY_ISO_CODE { YT = 'yt', // Mayotte ZA = 'za', // South Africa ZM = 'zm', // Zambia + ZW = 'zw', // Zimbabwe } -export type OdsCountryIsoCodeUnion = `${keyof typeof ODS_COUNTRY_ISO_CODE}`; -export const OdsCountryIsoCodeList = Object.keys(ODS_COUNTRY_ISO_CODE) - .map((key) => ODS_COUNTRY_ISO_CODE[key as OdsCountryIsoCodeUnion]); +export const ODS_COUNTRY_ISO_CODES = Object.freeze(Object.keys(ODS_COUNTRY_ISO_CODE)); diff --git a/packages/components/flag/src/components/osds-flag/core/controller.spec.ts b/packages/components/flag/src/components/osds-flag/core/controller.spec.ts index 4673efd47f..137f49009b 100644 --- a/packages/components/flag/src/components/osds-flag/core/controller.spec.ts +++ b/packages/components/flag/src/components/osds-flag/core/controller.spec.ts @@ -22,7 +22,7 @@ import { odsGetAssetPath, odsGetSrc, ODS_COUNTRY_ISO_CODE, - OdsCountryIsoCodeList + ODS_COUNTRY_ISO_CODES, } from '@ovhcloud/ods-common-core'; import { OsdsFlag } from '../osds-flag'; import { OdsFlagController } from './controller'; @@ -71,7 +71,7 @@ describe('ods-flag-controller', () => { describe('methods', () => { describe('validateISO', () => { - const expected = `The iso attribute must be one of those values ${OdsCountryIsoCodeList}`; + const expected = `The iso attribute must be one of those values ${ODS_COUNTRY_ISO_CODES}`; beforeEach(() => { setup(); diff --git a/packages/components/flag/src/components/osds-flag/core/controller.ts b/packages/components/flag/src/components/osds-flag/core/controller.ts index 2ea3f58bb7..4e6f04eb5c 100644 --- a/packages/components/flag/src/components/osds-flag/core/controller.ts +++ b/packages/components/flag/src/components/osds-flag/core/controller.ts @@ -2,7 +2,7 @@ import type { OsdsFlag } from '../osds-flag'; import { ODS_COUNTRY_ISO_CODE, - OdsCountryIsoCodeList, + ODS_COUNTRY_ISO_CODES, OdsLogger, odsIsTermInEnum, OdsLoadContent, @@ -66,9 +66,10 @@ class OdsFlagController { * @param iso - iso code */ validateISO(iso?: ODS_COUNTRY_ISO_CODE): void { + console.log('iso', iso, odsIsTermInEnum(iso, ODS_COUNTRY_ISO_CODE)) if (!iso || !odsIsTermInEnum(iso, ODS_COUNTRY_ISO_CODE)) { this.component.iso = undefined; - this.logger.warn(`The iso attribute must be one of those values ${OdsCountryIsoCodeList}`); + this.logger.warn(`The iso attribute must be one of those values ${ODS_COUNTRY_ISO_CODES}`); } } diff --git a/packages/components/flag/src/components/osds-flag/osds-flag.e2e.screenshot.ts b/packages/components/flag/src/components/osds-flag/osds-flag.e2e.screenshot.ts index 5348131024..56c5e9abee 100644 --- a/packages/components/flag/src/components/osds-flag/osds-flag.e2e.screenshot.ts +++ b/packages/components/flag/src/components/osds-flag/osds-flag.e2e.screenshot.ts @@ -1,6 +1,6 @@ import type { E2EElement, E2EPage } from '@stencil/core/testing'; import type { OdsFlagAttribute } from './interfaces/attributes'; -import { ODS_COUNTRY_ISO_CODE, OdsCountryIsoCodeList } from '@ovhcloud/ods-common-core'; +import { ODS_COUNTRY_ISO_CODE, ODS_COUNTRY_ISO_CODES } from '@ovhcloud/ods-common-core'; import { odsComponentAttributes2StringAttributes, odsStringAttributes2Str } from '@ovhcloud/ods-common-testing'; import { newE2EPage } from '@stencil/core/testing'; import { DEFAULT_ATTRIBUTE } from './constants/default-attributes'; @@ -21,7 +21,7 @@ describe('e2e:osds-flag', () => { } describe('screenshots', () => { - OdsCountryIsoCodeList.forEach((iso) => { + ODS_COUNTRY_ISO_CODES.forEach((iso) => { it(`The flag ${iso} is displaying correctly`, async () => { await setup({ attributes: { iso, assetPath: `./dist/flags/flags-4x3/` }, diff --git a/packages/storybook/stories/components/flag/flag.web-components.stories.all.ts b/packages/storybook/stories/components/flag/flag.web-components.stories.all.ts index e04b31f15c..46729bd700 100644 --- a/packages/storybook/stories/components/flag/flag.web-components.stories.all.ts +++ b/packages/storybook/stories/components/flag/flag.web-components.stories.all.ts @@ -1,19 +1,6 @@ import { html } from 'lit-html'; import { repeat } from 'lit-html/directives/repeat'; - -const allFlagIsos = ['ar', 'as', 'at', 'au', 'aw', 'ax', 'az', 'ba', 'bb', 'bd', 'be', 'bf', 'bg', 'bh', 'bi', 'bj', - 'bl', 'bm', 'bn', 'bo', 'bq', 'br', 'bs', 'bt', 'bw', 'by', 'bz', 'ca', 'cc', 'cd', 'cf', 'cg', 'ch', 'ci', 'ck', - 'cl', 'cm', 'cn', 'co', 'cr', 'cu', 'cv', 'cw', 'cx', 'cy', 'cz', 'de', 'dj', 'dk', 'dm', 'do', 'dz', 'ec', 'ee', - 'eg', 'eh', 'er', 'es', 'et', 'eu', 'fi', 'fj', 'fk', 'fm', 'fo', 'fr', 'ga', 'gb', 'gd', 'ge', 'gf', 'gg', 'gh', - 'gi', 'gl', 'gm', 'gn', 'gp', 'gq', 'gr', 'gs', 'gt', 'gu', 'gw', 'gy', 'hk', 'hn', 'hr', 'ht', 'hu', 'id', 'ie', - 'il', 'im', 'in', 'io', 'iq', 'ir', 'is', 'it', 'je', 'jm', 'jo', 'jp', 'ke', 'kn', 'kp', 'kr', 'kw', 'ky', 'kz', - 'la', 'lb', 'lc', 'li', 'lr', 'ls', 'lt', 'lu', 'lv', 'ly', 'ma', 'mc', 'md', 'me', 'mf', 'mg', 'mh', 'mk', 'ml', - 'mm', 'mn', 'mo', 'mp', 'mq', 'mr', 'ms', 'mt', 'mu', 'mv', 'mw', 'mx', 'my', 'mz', 'na', 'nc', 'ne', 'nf', 'ng', - 'ni', 'nl', 'no', 'np', 'nr', 'nu', 'nz', 'om', 'pa', 'pf', 'pg', 'ph', 'pk', 'pl', 'pm', 'pn', 'pr', 'ps', 'pt', - 'pw', 'py', 'qa', 're', 'ro', 'rs', 'ru', 'rw', 'sa', 'sb', 'sc', 'sd', 'se', 'sg', 'sh', 'si', 'sj', 'sk', 'sl', - 'sm', 'sn', 'so', 'sr', 'ss', 'st', 'sv', 'sx', 'sy', 'sz', 'tc', 'td', 'tf', 'tg', 'th', 'tj', 'tk', 'tl', 'tm', - 'tn', 'to', 'tr', 'tt', 'tv', 'tw', 'tz', 'ua', 'ug', 'um', 'un', 'unia', 'us', 'uy', 'uz', 'va', 'vc', 've', 'vg', - 'vi', 'vn', 'vu', 'wf', 'ws', 'xk', 'ye', 'yt', 'za', 'zm']; +import { ODS_COUNTRY_ISO_CODES } from '@ovhcloud/ods-common-core'; const flagTemplate = (iso:string) => html` @@ -46,11 +33,12 @@ const TemplateAll = () => html` default - ${repeat(allFlagIsos, (iso) => flagTemplate(iso))} + ${repeat(ODS_COUNTRY_ISO_CODES, (iso: string) => flagTemplate(iso.toLowerCase()))} `; export const All = TemplateAll.bind({}); +// @ts-ignore All.parameters = { controls: { hideNoControlsWarning: true }, options: { showPanel: false }