@ballistix.digital/react-components 0.8.0 → 0.8.2

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.esm.js CHANGED
@@ -2694,6 +2694,10 @@ var DateMenuForm = function (props) {
2694
2694
  }
2695
2695
  // eslint-disable-next-line react-hooks/exhaustive-deps
2696
2696
  }, [state]);
2697
+ // listen to value changes.
2698
+ useEffect(function () {
2699
+ setState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : { startDate: null, endDate: null });
2700
+ }, [defaultValue]);
2697
2701
  return (jsxs("div", { className: styles.container, children: [jsxs("div", { className: styles.head, children: [label && (jsx("label", { htmlFor: name, className: styles.label, children: label })), !required && !isRequired && typeof label === 'string' && (jsx("span", { className: styles.hint, children: "Optional" })), required && required({ isRequired: isRequired })] }), jsxs("div", { className: styles.container, "data-cy": inputDataCy, children: [jsx(Datepicker, { inputName: name, inputId: name, i18n: i18n, useRange: size === 'expanded', placeholder: placeholder, asSingle: !isRanged, separator: separator, startFrom: startFrom, displayFormat: displayFormat, disabled: isDisabled, popoverDirection: direction, minDate: minDate, maxDate: maxDate, toggleIcon: icon,
2698
2702
  //
2699
2703
  value: state,
@@ -10666,7 +10670,8 @@ var AddressInputGroupForm = function (props) {
10666
10670
  })) === null || _a === void 0 ? void 0 : _a.long_name;
10667
10671
  };
10668
10672
  var street = handleExtractValueWithKey('route');
10669
- var city = handleExtractValueWithKey('locality');
10673
+ var city = handleExtractValueWithKey('sublocality') ||
10674
+ handleExtractValueWithKey('locality');
10670
10675
  var country = handleExtractValueWithKey('country');
10671
10676
  var zipCode = handleExtractValueWithKey('postal_code');
10672
10677
  var houseNumber = handleExtractValueWithKey('street_number');