@awell-health/ui-library 0.1.113 → 0.1.114
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/index.js
CHANGED
|
@@ -37355,7 +37355,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
37355
37355
|
var countries = getDefaultCountries(availableCountries, initialCountry);
|
|
37356
37356
|
var _e = build.exports.usePhoneInput({
|
|
37357
37357
|
initialCountry: initialCountry,
|
|
37358
|
-
value: value,
|
|
37358
|
+
value: value !== null && value !== void 0 ? value : '',
|
|
37359
37359
|
hideSpaceAfterDialCode: true,
|
|
37360
37360
|
countries: countries,
|
|
37361
37361
|
forceDialCode: forceDialCode,
|
|
@@ -37364,7 +37364,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
37364
37364
|
onChange({ target: { value: phone } });
|
|
37365
37365
|
} else
|
|
37366
37366
|
{
|
|
37367
|
-
onChange({ target: { value:
|
|
37367
|
+
onChange({ target: { value: '' } });
|
|
37368
37368
|
}
|
|
37369
37369
|
} }),
|
|
37370
37370
|
phone = _e.phone,handlePhoneValueChange = _e.handlePhoneValueChange,inputRef = _e.inputRef,country = _e.country,setCountry = _e.setCountry;
|
|
@@ -48668,7 +48668,6 @@ var Kr=[{
|
|
|
48668
48668
|
return validation.isValid;
|
|
48669
48669
|
};
|
|
48670
48670
|
var numberMatchesAvailableCountries = function (number, availableCountries) {
|
|
48671
|
-
var _a;
|
|
48672
48671
|
try {
|
|
48673
48672
|
var validation = build.exports.validatePhone(number, {
|
|
48674
48673
|
countries: getDefaultCountries(availableCountries, undefined),
|
|
@@ -48682,11 +48681,11 @@ var Kr=[{
|
|
|
48682
48681
|
return false;
|
|
48683
48682
|
}
|
|
48684
48683
|
if (typeof availableCountries === 'string') {
|
|
48685
|
-
return
|
|
48684
|
+
return availableCountries === validation.country.iso2;
|
|
48686
48685
|
}
|
|
48687
48686
|
return availableCountries.includes(validation.country.iso2);
|
|
48688
48687
|
}
|
|
48689
|
-
catch (
|
|
48688
|
+
catch (_a) {
|
|
48690
48689
|
return false;
|
|
48691
48690
|
}
|
|
48692
48691
|
};
|
|
@@ -4,9 +4,9 @@ import { CountryIso2 } from 'react-international-phone';
|
|
|
4
4
|
export interface PhoneInputFieldProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
5
5
|
label: string;
|
|
6
6
|
id: string;
|
|
7
|
-
onChange: ({ target: { value }
|
|
7
|
+
onChange: ({ target: { value } }: {
|
|
8
8
|
target: {
|
|
9
|
-
value: string
|
|
9
|
+
value: string;
|
|
10
10
|
};
|
|
11
11
|
}) => void;
|
|
12
12
|
onClick?: MouseEventHandler<HTMLInputElement>;
|