UNPKG

@lukwil/vue-tel-input-vuetify

Version:

International Telephone Input with Vuetify, based on https://github.com/yogakurniawan/vue-tel-input-vuetify

1,323 lines (1,319 loc) 13.4 kB
// Array of country objects for the flag dropdown. // Here is the criteria for the plugin to support a given country/territory // - It has an iso2 code: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 // - It has it's own country calling code (it is not a sub-region of another country): https://en.wikipedia.org/wiki/List_of_country_calling_codes // - It has a flag in the region-flags project: https://github.com/behdad/region-flags/tree/gh-pages/png // - It is supported by libphonenumber (it must be listed on this page): https://github.com/googlei18n/libphonenumber/blob/master/resources/ShortNumberMetadata.xml // Each country array has the following information: // [ // Country name, // iso2 code, // International dial code, // Order (if >1 country with same dial code), // Area codes // ] const allCountries = [ [ 'Afghanistan', 'af', '93', ], [ 'Albanien', 'al', '355', ], [ 'Algerien', 'dz', '213', ], [ 'Andorra', 'ad', '376', ], [ 'Angola', 'ao', '244', ], [ 'Anguilla', 'ai', '1264', ], [ 'Antigua und Barbuda', 'ag', '1268', ], [ 'Argentinien', 'ar', '54', ], [ 'Armenien', 'am', '374', ], [ 'Aruba', 'aw', '297', ], [ 'Aserbaidschan', 'az', '994', ], [ 'Australien', 'au', '61', 0, ], [ 'Bahamas', 'bs', '1242', ], [ 'Bahrain', 'bh', '973', ], [ 'Bangladesh', 'bd', '880', ], [ 'Barbados', 'bb', '1246', ], [ 'Belarus', 'by', '375', ], [ 'Belgien', 'be', '32', ], [ 'Belize', 'bz', '501', ], [ 'Benin', 'bj', '229', ], [ 'Bermudas', 'bm', '1441', ], [ 'Bhutan', 'bt', '975', ], [ 'Birma', 'mm', '95', ], [ 'Bolivien', 'bo', '591', ], [ 'Bosnien-Herzegowina', 'ba', '387', ], [ 'Botswana', 'bw', '267', ], [ 'Brasilien', 'br', '55', ], [ 'Britisch-Indischer Ozean', 'io', '246', ], [ 'Brunei', 'bn', '673', ], [ 'Bulgarien', 'bg', '359', ], [ 'Burkina Faso', 'bf', '226', ], [ 'Burundi', 'bi', '257', ], [ 'Chile', 'cl', '56', ], [ 'China', 'cn', '86', ], [ 'Christmas Island', 'cx', '61', 2, ], [ 'Cook Inseln', 'ck', '682', ], [ 'Costa Rica', 'cr', '506', ], [ 'Curaçao', 'cw', '599', 0, ], [ 'Deutschland', 'de', '49', ], [ 'Djibuti', 'dj', '253', ], [ 'Dominika', 'dm', '1767', ], [ 'Dominikanische Republik', 'do', '1', 2, [ '809', '829', '849', ], ], [ 'Dänemark', 'dk', '45', ], [ 'Ecuador', 'ec', '593', ], [ 'El Salvador', 'sv', '503', ], [ 'Elfenbeinküste', 'ci', '225', ], [ 'Eritrea', 'er', '291', ], [ 'Estland', 'ee', '372', ], [ 'Falkland Inseln', 'fk', '500', ], [ 'Fidschi', 'fj', '679', ], [ 'Finnland', 'fi', '358', 0, ], [ 'Frankreich', 'fr', '33', ], [ 'Französisch Polynesien', 'pf', '689', ], [ 'Färöer Inseln', 'fo', '298', ], [ 'Gabun', 'ga', '241', ], [ 'Gambia', 'gm', '220', ], [ 'Georgien', 'ge', '995', ], [ 'Ghana', 'gh', '233', ], [ 'Gibraltar', 'gi', '350', ], [ 'Grenada', 'gd', '1473', ], [ 'Griechenland', 'gr', '30', ], [ 'Großbritannien', 'gb', '44', 0, ], [ 'Grönland', 'gl', '299', ], [ 'Guadeloupe', 'gp', '590', 0, ], [ 'Guam', 'gu', '1671', ], [ 'Guatemala', 'gt', '502', ], [ 'Guernsey', 'gg', '44', 1, ], [ 'Guinea', 'gn', '224', ], [ 'Guinea Bissau', 'gw', '245', ], [ 'Guyana', 'gy', '592', ], [ 'Haiti', 'ht', '509', ], [ 'Honduras', 'hn', '504', ], [ 'Hong Kong', 'hk', '852', ], [ 'Indien', 'in', '91', ], [ 'Indonesien', 'id', '62', ], [ 'Irak', 'iq', '964', ], [ 'Iran', 'ir', '98', ], [ 'Irland', 'ie', '353', ], [ 'Island', 'is', '354', ], [ 'Isle of Man', 'im', '44', 2, ], [ 'Israel', 'il', '972', ], [ 'Italien', 'it', '39', 0, ], [ 'Jamaika', 'jm', '1876', ], [ 'Japan', 'jp', '81', ], [ 'Jemen', 'ye', '967', ], [ 'Jersey', 'je', '44', 3, ], [ 'Jordanien', 'jo', '962', ], [ 'Kaiman Inseln', 'ky', '1345', ], [ 'Kambodscha', 'kh', '855', ], [ 'Kamerun', 'cm', '237', ], [ 'Kanada', 'ca', '1', 1, [ '204', '226', '236', '249', '250', '289', '306', '343', '365', '387', '403', '416', '418', '431', '437', '438', '450', '506', '514', '519', '548', '579', '581', '587', '604', '613', '639', '647', '672', '705', '709', '742', '778', '780', '782', '807', '819', '825', '867', '873', '902', '905', ], ], [ 'Kap Verde', 'cv', '238', ], [ 'Karibische Niederlande', 'bq', '599', 1, ], [ 'Kasachstan', 'kz', '7', 1, ], [ 'Katar', 'qa', '974', ], [ 'Kenia', 'ke', '254', ], [ 'Kirgisistan', 'kg', '996', ], [ 'Kiribati', 'ki', '686', ], [ 'Kokosinseln', 'cc', '61', 1, ], [ 'Kolumbien', 'co', '57', ], [ 'Komoren', 'km', '269', ], [ 'Kongo', 'cg', '242', ], [ 'Kongo, Demokratische Republik', 'cd', '243', ], [ 'Kosovo', 'xk', '383', ], [ 'Kroatien', 'hr', '385', ], [ 'Kuba', 'cu', '53', ], [ 'Kuwait', 'kw', '965', ], [ 'Laos', 'la', '856', ], [ 'Lesotho', 'ls', '266', ], [ 'Lettland', 'lv', '371', ], [ 'Libanon', 'lb', '961', ], [ 'Liberia', 'lr', '231', ], [ 'Libyen', 'ly', '218', ], [ 'Liechtenstein', 'li', '423', ], [ 'Litauen', 'lt', '370', ], [ 'Luxemburg', 'lu', '352', ], [ 'Macao', 'mo', '853', ], [ 'Madagaskar', 'mg', '261', ], [ 'Malawi', 'mw', '265', ], [ 'Malaysia', 'my', '60', ], [ 'Malediven', 'mv', '960', ], [ 'Mali', 'ml', '223', ], [ 'Malta', 'mt', '356', ], [ 'Marianen', 'mp', '1670', ], [ 'Marokko', 'ma', '212', 0, ], [ 'Marshall Inseln', 'mh', '692', ], [ 'Martinique', 'mq', '596', ], [ 'Mauretanien', 'mr', '222', ], [ 'Mauritius', 'mu', '230', ], [ 'Mayotte', 'yt', '262', 1, ], [ 'Mazedonien', 'mk', '389', ], [ 'Mexiko', 'mx', '52', ], [ 'Mikronesien', 'fm', '691', ], [ 'Moldavien', 'md', '373', ], [ 'Monaco', 'mc', '377', ], [ 'Mongolei', 'mn', '976', ], [ 'Montenegro', 'me', '382', ], [ 'Montserrat', 'ms', '1664', ], [ 'Mosambik', 'mz', '258', ], [ 'Namibia', 'na', '264', ], [ 'Nauru', 'nr', '674', ], [ 'Nepal', 'np', '977', ], [ 'Neukaledonien', 'nc', '687', ], [ 'Neuseeland', 'nz', '64', ], [ 'Nicaragua', 'ni', '505', ], [ 'Niederlande', 'nl', '31', ], [ 'Niger', 'ne', '227', ], [ 'Nigeria', 'ng', '234', ], [ 'Niue', 'nu', '683', ], [ 'Nord Korea', 'kp', '850', ], [ 'Norfolk Inseln', 'nf', '672', ], [ 'Norwegen', 'no', '47', 0, ], [ 'Oman', 'om', '968', ], [ 'Osttimor', 'tl', '670', ], [ 'Pakistan', 'pk', '92', ], [ 'Palau', 'pw', '680', ], [ 'Palästina', 'ps', '970', ], [ 'Panama', 'pa', '507', ], [ 'Papua Neuguinea', 'pg', '675', ], [ 'Paraguay', 'py', '595', ], [ 'Peru', 'pe', '51', ], [ 'Philippinen', 'ph', '63', ], [ 'Polen', 'pl', '48', ], [ 'Portugal', 'pt', '351', ], [ 'Puerto Rico', 'pr', '1', 3, [ '787', '939', ], ], [ 'Reunion', 're', '262', 0, ], [ 'Ruanda', 'rw', '250', ], [ 'Rumänien', 'ro', '40', ], [ 'Russland', 'ru', '7', 0, ], [ 'Saint Lucia', 'lc', '1758', ], [ 'Sambia', 'zm', '260', ], [ 'Samoa', 'as', '1684', ], [ 'Samoa', 'ws', '685', ], [ 'San Marino', 'sm', '378', ], [ 'Sao Tome', 'st', '239', ], [ 'Saudi Arabien', 'sa', '966', ], [ 'Schweden', 'se', '46', ], [ 'Schweiz', 'ch', '41', ], [ 'Senegal', 'sn', '221', ], [ 'Serbien', 'rs', '381', ], [ 'Seychellen', 'sc', '248', ], [ 'Sierra Leone', 'sl', '232', ], [ 'Singapur', 'sg', '65', ], [ 'Sint Maarten', 'sx', '1721', ], [ 'Slowakei', 'sk', '421', ], [ 'Slowenien', 'si', '386', ], [ 'Solomon Inseln', 'sb', '677', ], [ 'Somalia', 'so', '252', ], [ 'Spanien', 'es', '34', ], [ 'Sri Lanka', 'lk', '94', ], [ 'St. Barthélemy', 'bl', '590', 1, ], [ 'St. Helena', 'sh', '290', ], [ 'St. Kitts Nevis Anguilla', 'kn', '1869', ], [ 'St. Martin', 'mf', '590', 2, ], [ 'St. Pierre und Miquelon', 'pm', '508', ], [ 'St. Vincent', 'vc', '1784', ], [ 'Sudan', 'sd', '249', ], [ 'Surinam', 'sr', '597', ], [ 'Svalbard und Jan Mayen Islands', 'sj', '47', 1, ], [ 'Swasiland', 'sz', '268', ], [ 'Syrien', 'sy', '963', ], [ 'Süd Korea', 'kr', '82', ], [ 'Südafrika', 'za', '27', ], [ 'Südsudan', 'ss', '211', ], [ 'Tadschikistan', 'tj', '992', ], [ 'Taiwan', 'tw', '886', ], [ 'Tansania', 'tz', '255', ], [ 'Thailand', 'th', '66', ], [ 'Togo', 'tg', '228', ], [ 'Tokelau', 'tk', '690', ], [ 'Tonga', 'to', '676', ], [ 'Trinidad Tobago', 'tt', '1868', ], [ 'Tschad', 'td', '235', ], [ 'Tschechische Republik', 'cz', '420', ], [ 'Tunesien', 'tn', '216', ], [ 'Turkmenistan', 'tm', '993', ], [ 'Turks und Kaikos Inseln', 'tc', '1649', ], [ 'Tuvalu', 'tv', '688', ], [ 'Türkei', 'tr', '90', ], [ 'Uganda', 'ug', '256', ], [ 'Ukraine', 'ua', '380', ], [ 'Ungarn', 'hu', '36', ], [ 'Uruguay', 'uy', '598', ], [ 'Usbekistan', 'uz', '998', ], [ 'Vanuatu', 'vu', '678', ], [ 'Vatikan', 'va', '39', 1, ], [ 'Venezuela', 've', '58', ], [ 'Vereinigte Arabische Emirate', 'ae', '971', ], [ 'Vereinigte Staaten von Amerika', 'us', '1', 0, ], [ 'Vietnam', 'vn', '84', ], [ 'Virgin Island (Brit.)', 'vg', '1284', ], [ 'Virgin Island (USA)', 'vi', '1340', ], [ 'Wallis und Futuna', 'wf', '681', ], [ 'Westsahara', 'eh', '212', 1, ], [ 'Zentralafrikanische Republik', 'cf', '236', ], [ 'Zimbabwe', 'zw', '263', ], [ 'Zypern', 'cy', '357', ], [ 'französisch Guyana', 'gf', '594', ], [ 'Ägypten', 'eg', '20', ], [ 'Äquatorial Guinea', 'gq', '240', ], [ 'Äthiopien', 'et', '251', ], [ 'Åland', 'ax', '358', 1, ], [ 'Österreich', 'at', '43', ], ]; export default allCountries.map(country => ({ name: `${country[0]}, +${country[2]}`, iso2: country[1].toUpperCase(), dialCode: country[2], priority: country[3] || 0, areaCodes: country[4] || null, }));