@rh-support/components 2.1.6 → 2.1.8
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneInput.d.ts","sourceRoot":"","sources":["../../../src/PhoneInput/PhoneInput.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAU3B,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,CAAC,MAAM,KAAA,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACtE,mBAAmB,CAAC,EAAE,CAAC,MAAM,KAAA,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,OAAO,KAAA,KAAK,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AA2DD,eAAO,MAAM,WAAW,gBAAiB,MAAM;;;CAqB9C,CAAC;AAEF,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PhoneInput.d.ts","sourceRoot":"","sources":["../../../src/PhoneInput/PhoneInput.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAU3B,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,CAAC,MAAM,KAAA,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACtE,mBAAmB,CAAC,EAAE,CAAC,MAAM,KAAA,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,OAAO,KAAA,KAAK,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AA2DD,eAAO,MAAM,WAAW,gBAAiB,MAAM;;;CAqB9C,CAAC;AAEF,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,eAiPvC"}
|
|
@@ -124,6 +124,7 @@ function PhoneInput(props) {
|
|
|
124
124
|
localPhone = localPhone.replace(/ +/g, '');
|
|
125
125
|
// if the user selects a value from the dropdown and the country code is the same as prev, iso2 values shouldn't override
|
|
126
126
|
if (!isEmpty_1.default(countryObj) && isEqual_1.default(localPhone, countryObj.dialCode)) {
|
|
127
|
+
onCountryCodeChange && onCountryCodeChange(PREFIX + countryObj.countryCode);
|
|
127
128
|
return countryObj.format;
|
|
128
129
|
}
|
|
129
130
|
let localFormat;
|
|
@@ -135,10 +136,6 @@ function PhoneInput(props) {
|
|
|
135
136
|
const exactCountry = initializedCountries.filter((country) => country.dialCode.toString() === localPhone);
|
|
136
137
|
if (!isEmpty_1.default(isCountryCanada)) {
|
|
137
138
|
const canadaCountryObj = initializedCountries.filter((country) => country.iso2.toString() === 'ca');
|
|
138
|
-
if (isEqual_1.default(canadaCountryObj[0].dialCode.toString(), countryObj.dialCode)) {
|
|
139
|
-
setIso2(countryObj.iso2);
|
|
140
|
-
return countryObj.format;
|
|
141
|
-
}
|
|
142
139
|
setIso2(canadaCountryObj[0].iso2.toString());
|
|
143
140
|
localFormat = canadaCountryObj[0].format.toString();
|
|
144
141
|
onCountryCodeChange && onCountryCodeChange(PREFIX + canadaCountryObj[0].dialCode.toString());
|
|
@@ -148,6 +145,7 @@ function PhoneInput(props) {
|
|
|
148
145
|
const localExactCountry = exactCountry.filter((country) => isEqual_1.default(country.priority, 0));
|
|
149
146
|
if (isEqual_1.default(localExactCountry[0].dialCode.toString(), countryObj.dialCode)) {
|
|
150
147
|
setIso2(countryObj.iso2);
|
|
148
|
+
onCountryCodeChange && onCountryCodeChange(PREFIX + countryObj.countryCode);
|
|
151
149
|
return countryObj.format;
|
|
152
150
|
}
|
|
153
151
|
setIso2(localExactCountry[0].iso2.toString());
|
|
@@ -159,6 +157,7 @@ function PhoneInput(props) {
|
|
|
159
157
|
const localPossibleCountry = possibleCountries.filter((country) => isEqual_1.default(country.priority, 0));
|
|
160
158
|
if (isEqual_1.default(localPossibleCountry[0].dialCode.toString(), countryObj.dialCode)) {
|
|
161
159
|
setIso2(countryObj.iso2);
|
|
160
|
+
onCountryCodeChange && onCountryCodeChange(PREFIX + countryObj.countryCode);
|
|
162
161
|
return countryObj.format;
|
|
163
162
|
}
|
|
164
163
|
setIso2(localPossibleCountry[0].iso2.toString());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneInput.d.ts","sourceRoot":"","sources":["../../../src/PhoneInput/PhoneInput.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAU3B,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,CAAC,MAAM,KAAA,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACtE,mBAAmB,CAAC,EAAE,CAAC,MAAM,KAAA,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,OAAO,KAAA,KAAK,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AA2DD,eAAO,MAAM,WAAW,gBAAiB,MAAM;;;CAqB9C,CAAC;AAEF,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PhoneInput.d.ts","sourceRoot":"","sources":["../../../src/PhoneInput/PhoneInput.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAU3B,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,CAAC,MAAM,KAAA,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACtE,mBAAmB,CAAC,EAAE,CAAC,MAAM,KAAA,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,OAAO,KAAA,KAAK,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AA2DD,eAAO,MAAM,WAAW,gBAAiB,MAAM;;;CAqB9C,CAAC;AAEF,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,eAiPvC"}
|
|
@@ -98,6 +98,7 @@ export function PhoneInput(props) {
|
|
|
98
98
|
localPhone = localPhone.replace(/ +/g, '');
|
|
99
99
|
// if the user selects a value from the dropdown and the country code is the same as prev, iso2 values shouldn't override
|
|
100
100
|
if (!isEmpty(countryObj) && isEqual(localPhone, countryObj.dialCode)) {
|
|
101
|
+
onCountryCodeChange && onCountryCodeChange(PREFIX + countryObj.countryCode);
|
|
101
102
|
return countryObj.format;
|
|
102
103
|
}
|
|
103
104
|
let localFormat;
|
|
@@ -109,10 +110,6 @@ export function PhoneInput(props) {
|
|
|
109
110
|
const exactCountry = initializedCountries.filter((country) => country.dialCode.toString() === localPhone);
|
|
110
111
|
if (!isEmpty(isCountryCanada)) {
|
|
111
112
|
const canadaCountryObj = initializedCountries.filter((country) => country.iso2.toString() === 'ca');
|
|
112
|
-
if (isEqual(canadaCountryObj[0].dialCode.toString(), countryObj.dialCode)) {
|
|
113
|
-
setIso2(countryObj.iso2);
|
|
114
|
-
return countryObj.format;
|
|
115
|
-
}
|
|
116
113
|
setIso2(canadaCountryObj[0].iso2.toString());
|
|
117
114
|
localFormat = canadaCountryObj[0].format.toString();
|
|
118
115
|
onCountryCodeChange && onCountryCodeChange(PREFIX + canadaCountryObj[0].dialCode.toString());
|
|
@@ -122,6 +119,7 @@ export function PhoneInput(props) {
|
|
|
122
119
|
const localExactCountry = exactCountry.filter((country) => isEqual(country.priority, 0));
|
|
123
120
|
if (isEqual(localExactCountry[0].dialCode.toString(), countryObj.dialCode)) {
|
|
124
121
|
setIso2(countryObj.iso2);
|
|
122
|
+
onCountryCodeChange && onCountryCodeChange(PREFIX + countryObj.countryCode);
|
|
125
123
|
return countryObj.format;
|
|
126
124
|
}
|
|
127
125
|
setIso2(localExactCountry[0].iso2.toString());
|
|
@@ -133,6 +131,7 @@ export function PhoneInput(props) {
|
|
|
133
131
|
const localPossibleCountry = possibleCountries.filter((country) => isEqual(country.priority, 0));
|
|
134
132
|
if (isEqual(localPossibleCountry[0].dialCode.toString(), countryObj.dialCode)) {
|
|
135
133
|
setIso2(countryObj.iso2);
|
|
134
|
+
onCountryCodeChange && onCountryCodeChange(PREFIX + countryObj.countryCode);
|
|
136
135
|
return countryObj.format;
|
|
137
136
|
}
|
|
138
137
|
setIso2(localPossibleCountry[0].iso2.toString());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/components",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.8",
|
|
4
4
|
"description": "Contains all reusabel components for support app",
|
|
5
5
|
"author": "Vikas Rathee <vrathee@redhat.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"defaults and supports es6-module",
|
|
118
118
|
"maintained node versions"
|
|
119
119
|
],
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "a47ffbcfff1c99bef15fb811497e6c756845e9e8"
|
|
121
121
|
}
|