@awell-health/ui-library 0.1.119 → 0.1.121

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.
Files changed (2) hide show
  1. package/dist/index.js +11 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -37360,12 +37360,15 @@ Check the top-level render call using <` + t + ">.");
37360
37360
  countries: countries,
37361
37361
  forceDialCode: forceDialCode,
37362
37362
  onPhoneUpdate: function (phone) {
37363
- var _a, _b;
37364
- if (touched && phone.length > 3) {
37363
+ var hasSignificantValue = phone.length > 4;
37364
+ if (touched || hasSignificantValue) {
37365
37365
  onChange({ target: { value: phone } });
37366
+ if (!touched) {
37367
+ setTouched(true);
37368
+ }
37366
37369
  } else
37367
37370
  {
37368
- onChange({ target: { value: (_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '' } });
37371
+ onChange({ target: { value: '' } });
37369
37372
  }
37370
37373
  } }),
37371
37374
  phone = _e.phone,handlePhoneValueChange = _e.handlePhoneValueChange,inputRef = _e.inputRef,country = _e.country,setCountry = _e.setCountry;
@@ -48830,6 +48833,11 @@ var Kr=[{
48830
48833
  return {
48831
48834
  isValid: true };
48832
48835
 
48836
+ }
48837
+ if ((questionConfig === null || questionConfig === void 0 ? void 0 : questionConfig.mandatory) === false && (lodash.exports.isNil(value) || value === '')) {
48838
+ return {
48839
+ isValid: true };
48840
+
48833
48841
  }
48834
48842
  var pattern = questionConfig.input_validation.pattern;
48835
48843
  if (pattern) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/ui-library",
3
- "version": "0.1.119",
3
+ "version": "0.1.121",
4
4
  "description": "UI components to integrate with Awell Health",
5
5
  "repository": {
6
6
  "type": "git",