@awell-health/ui-library 0.1.78 → 0.1.80
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
|
@@ -37271,14 +37271,15 @@ Check the top-level render call using <` + t + ">.");
|
|
|
37271
37271
|
};
|
|
37272
37272
|
|
|
37273
37273
|
var PhoneInputField = function (_a) {
|
|
37274
|
-
var onChange = _a.onChange,id = _a.id,label = _a.label,mandatory = _a.mandatory,value = _a.value,placeholder = _a.placeholder,_b = _a.initialCountry,initialCountry = _b === void 0 ? 'us' : _b,availableCountries = _a.availableCountries,props = __rest(_a, ["onChange", "id", "label", "mandatory", "value", "placeholder", "initialCountry", "availableCountries"]);
|
|
37274
|
+
var onChange = _a.onChange,id = _a.id,label = _a.label,mandatory = _a.mandatory,value = _a.value,placeholder = _a.placeholder,_b = _a.initialCountry,initialCountry = _b === void 0 ? 'us' : _b,availableCountries = _a.availableCountries,_c = _a.forceDialCode,forceDialCode = _c === void 0 ? false : _c,props = __rest(_a, ["onChange", "id", "label", "mandatory", "value", "placeholder", "initialCountry", "availableCountries", "forceDialCode"]);
|
|
37275
37275
|
var countries = getDefaultCountries(availableCountries, initialCountry);
|
|
37276
|
-
var
|
|
37276
|
+
var _d = build.exports.usePhoneInput({
|
|
37277
37277
|
initialCountry: initialCountry,
|
|
37278
37278
|
value: value,
|
|
37279
37279
|
hideSpaceAfterDialCode: true,
|
|
37280
|
-
countries: countries
|
|
37281
|
-
|
|
37280
|
+
countries: countries,
|
|
37281
|
+
forceDialCode: forceDialCode }),
|
|
37282
|
+
phone = _d.phone,handlePhoneValueChange = _d.handlePhoneValueChange,inputRef = _d.inputRef,country = _d.country,setCountry = _d.setCountry;
|
|
37282
37283
|
var handleInputChange = function (e) {
|
|
37283
37284
|
handlePhoneValueChange(e);
|
|
37284
37285
|
onChange(e);
|
|
@@ -37644,7 +37645,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
37644
37645
|
return jsxRuntime.exports.jsx(PhoneInputField, { autoFocus: inputAutoFocus, onChange: function (e) {
|
|
37645
37646
|
onChange(e.target.value);
|
|
37646
37647
|
onAnswerChange();
|
|
37647
|
-
}, label: question.title, id: question.id, value: value, mandatory: (_b = question.questionConfig) === null || _b === void 0 ? void 0 : _b.mandatory, availableCountries: availableCountries_1, initialCountry: initialCountry_1 });
|
|
37648
|
+
}, label: question.title, id: question.id, value: value, mandatory: (_b = question.questionConfig) === null || _b === void 0 ? void 0 : _b.mandatory, availableCountries: availableCountries_1, initialCountry: initialCountry_1, forceDialCode: true });
|
|
37648
37649
|
} });
|
|
37649
37650
|
case exports.UserQuestionType.Slider:
|
|
37650
37651
|
return jsxRuntime.exports.jsx(Controller, { name: question.id, control: control, rules: {
|
|
@@ -15,8 +15,9 @@ export interface PhoneInputFieldProps extends InputHTMLAttributes<HTMLInputEleme
|
|
|
15
15
|
initialCountry?: CountryIso2;
|
|
16
16
|
availableCountries?: Array<CountryIso2>;
|
|
17
17
|
placeholder?: string;
|
|
18
|
+
forceDialCode?: boolean;
|
|
18
19
|
}
|
|
19
20
|
export declare const PhoneInputField: {
|
|
20
|
-
({ onChange, id, label, mandatory, value, placeholder, initialCountry, availableCountries, ...props }: PhoneInputFieldProps): JSX.Element;
|
|
21
|
+
({ onChange, id, label, mandatory, value, placeholder, initialCountry, availableCountries, forceDialCode, ...props }: PhoneInputFieldProps): JSX.Element;
|
|
21
22
|
displayName: string;
|
|
22
23
|
};
|