@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.js CHANGED
@@ -2696,6 +2696,10 @@ var DateMenuForm = function (props) {
2696
2696
  }
2697
2697
  // eslint-disable-next-line react-hooks/exhaustive-deps
2698
2698
  }, [state]);
2699
+ // listen to value changes.
2700
+ React.useEffect(function () {
2701
+ setState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : { startDate: null, endDate: null });
2702
+ }, [defaultValue]);
2699
2703
  return (jsxRuntime.jsxs("div", { className: styles.container, children: [jsxRuntime.jsxs("div", { className: styles.head, children: [label && (jsxRuntime.jsx("label", { htmlFor: name, className: styles.label, children: label })), !required && !isRequired && typeof label === 'string' && (jsxRuntime.jsx("span", { className: styles.hint, children: "Optional" })), required && required({ isRequired: isRequired })] }), jsxRuntime.jsxs("div", { className: styles.container, "data-cy": inputDataCy, children: [jsxRuntime.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,
2700
2704
  //
2701
2705
  value: state,
@@ -10668,7 +10672,8 @@ var AddressInputGroupForm = function (props) {
10668
10672
  })) === null || _a === void 0 ? void 0 : _a.long_name;
10669
10673
  };
10670
10674
  var street = handleExtractValueWithKey('route');
10671
- var city = handleExtractValueWithKey('locality');
10675
+ var city = handleExtractValueWithKey('sublocality') ||
10676
+ handleExtractValueWithKey('locality');
10672
10677
  var country = handleExtractValueWithKey('country');
10673
10678
  var zipCode = handleExtractValueWithKey('postal_code');
10674
10679
  var houseNumber = handleExtractValueWithKey('street_number');