Permalink
Browse files

Phone Input: Fix uppercase differences

  • Loading branch information...
1 parent 086b91d commit 6df3a688160bde54ef9bb3d2a1074ebfe965472f @umurkontaci umurkontaci committed Jan 18, 2017
Showing with 54 additions and 51 deletions.
  1. +28 −28 bin/build-metadata.js
  2. +26 −23 client/components/phone-input/data.js
View
@@ -30,7 +30,7 @@ var priorityData = {
CA: 5,
DO: 3,
PR: 1,
- um: -99,
+ UM: -99,
// dial code: +7
RU: 10,
KZ: 1,
@@ -45,24 +45,24 @@ var priorityData = {
// dial code: +47
NO: 10,
SJ: 1,
- bv: -99,
+ BV: -99,
// dial code: +61
AU: 10,
CX: 5,
CC: 1,
- hm: -99,
+ HM: -99,
// dial code: +64
- nz: 10,
- pn: -99,
+ NZ: 10,
+ PN: -99,
// dial code: +290
SH: 10,
TA: 1,
// dial code: +358
FI: 10,
AX: 1,
// dial code: +500
- fk: 10,
- gs: -99,
+ FK: 10,
+ GS: -99,
// dial code: +590
GP: 10,
MF: 5,
@@ -273,48 +273,48 @@ function processLibPhoneNumberMetadata( libPhoneNumberData ) {
// Political correction
function injectHardCodedValues( libPhoneNumberData ) {
return Object.assign( {}, {
- kv: {
- isoCode: 'kv',
+ KV: {
+ isoCode: 'KV',
dialCode: '383',
nationalPrefix: '0',
- priority: priorityData.kv
+ priority: priorityData.KV
},
- um: {
- isoCode: 'um',
+ UM: {
+ isoCode: 'UM',
dialCode: '1',
nationalPrefix: '',
patternRegion: 'us',
- priority: priorityData.um
+ priority: priorityData.UM
},
- bv: {
- isoCode: 'bv',
+ BV: {
+ isoCode: 'BV',
dialCode: '47',
nationalPrefix: '',
- priority: priorityData.bv
+ priority: priorityData.BV
},
- tf: {
- isoCode: 'tf',
+ TF: {
+ isoCode: 'TF',
dialCode: '262',
nationalPrefix: '0',
- priority: priorityData.tf
+ priority: priorityData.TF
},
- hm: {
- isoCode: 'hm',
+ HM: {
+ isoCode: 'HM',
dialCode: '61',
nationalPrefix: '0',
- priority: priorityData.hm
+ priority: priorityData.HM
},
- pn: {
- isoCode: 'pn',
+ PN: {
+ isoCode: 'PN',
dialCode: '64',
nationalPrefix: '0',
- priority: priorityData.pn
+ priority: priorityData.PN
},
- gs: {
- isoCode: 'gs',
+ GS: {
+ isoCode: 'GS',
nationalPrefix: '',
dialCode: '500',
- priority: priorityData.gs
+ priority: priorityData.GS
}
}, libPhoneNumberData );
}
@@ -2,43 +2,43 @@
/* eslint-disable */
module.exports = {
countries: {
- kv: {
- isoCode: "kv",
+ KV: {
+ isoCode: "KV",
dialCode: "383",
nationalPrefix: "0"
},
- um: {
- isoCode: "um",
+ UM: {
+ isoCode: "UM",
dialCode: "1",
nationalPrefix: "",
patternRegion: "us",
priority: -99
},
- bv: {
- isoCode: "bv",
+ BV: {
+ isoCode: "BV",
dialCode: "47",
nationalPrefix: "",
priority: -99
},
- tf: {
- isoCode: "tf",
+ TF: {
+ isoCode: "TF",
dialCode: "262",
nationalPrefix: "0"
},
- hm: {
- isoCode: "hm",
+ HM: {
+ isoCode: "HM",
dialCode: "61",
nationalPrefix: "0",
priority: -99
},
- pn: {
- isoCode: "pn",
+ PN: {
+ isoCode: "PN",
dialCode: "64",
nationalPrefix: "0",
priority: -99
},
- gs: {
- isoCode: "gs",
+ GS: {
+ isoCode: "GS",
nationalPrefix: "",
dialCode: "500",
priority: -99
@@ -1851,7 +1851,9 @@ module.exports = {
},
FK: {
isoCode: "FK",
- dialCode: "500"
+ dialCode: "500",
+ priority: 10,
+ patternRegion: "FK"
},
FM: {
isoCode: "FM",
@@ -4247,7 +4249,8 @@ module.exports = {
nationalFormat: "0$1",
leadingDigitPattern: "2(?:10|74)|5|[89]0"
}
- ]
+ ],
+ priority: 10
},
OM: {
isoCode: "OM",
@@ -6037,7 +6040,7 @@ module.exports = {
1: [
"US",
"CA",
- "um"
+ "UM"
],
7: [
"RU",
@@ -6095,7 +6098,7 @@ module.exports = {
47: [
"NO",
"SJ",
- "bv"
+ "BV"
],
48: [
"PL"
@@ -6134,7 +6137,7 @@ module.exports = {
"AU",
"CX",
"CC",
- "hm"
+ "HM"
],
62: [
"ID"
@@ -6144,7 +6147,7 @@ module.exports = {
],
64: [
"NZ",
- "pn"
+ "PN"
],
65: [
"SG"
@@ -6324,7 +6327,7 @@ module.exports = {
"MG"
],
262: [
- "tf"
+ "TF"
],
263: [
"ZW"
@@ -6431,7 +6434,7 @@ module.exports = {
"ME"
],
383: [
- "kv"
+ "KV"
],
385: [
"HR"
@@ -6456,7 +6459,7 @@ module.exports = {
],
500: [
"FK",
- "gs"
+ "GS"
],
501: [
"BZ"

0 comments on commit 6df3a68

Please sign in to comment.