@popsure/dirty-swan 0.28.0-beta.2 → 0.28.0-beta.3

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
@@ -4078,26 +4078,21 @@ function useJsApiLoader(_a) {
4078
4078
  }
4079
4079
 
4080
4080
  var AutoCompleteAddress = function (_a) {
4081
- var _b = _a.mapId, mapId = _b === void 0 ? 'map' : _b, apiKey = _a.apiKey, initialAddress = _a.initialAddress, _c = _a.staticVersion, staticVersion = _c === void 0 ? !!process.env.STORYBOOK_STATIC : _c, onAddressChange = _a.onAddressChange, manualAddressEntryTexts = _a.manualAddressEntryTexts;
4081
+ var _b = _a.mapId, mapId = _b === void 0 ? 'map' : _b, apiKey = _a.apiKey, address = _a.address, _c = _a.staticVersion, staticVersion = _c === void 0 ? !!process.env.STORYBOOK_STATIC : _c, onAddressChange = _a.onAddressChange, manualAddressEntryTexts = _a.manualAddressEntryTexts;
4082
4082
  var _d = require$$0.useState(false), isLoading = _d[0], setIsLoading = _d[1];
4083
- var _e = require$$0.useState(initialAddress), address = _e[0], setAddress = _e[1];
4084
- var _f = require$$0.useState(undefined), geometry = _f[0], setGeometry = _f[1];
4085
- var _g = require$$0.useState(!!initialAddress), manualAddressEntry = _g[0], setManualAddressEntry = _g[1];
4083
+ var _e = require$$0.useState(undefined), geometry = _e[0], setGeometry = _e[1];
4084
+ var _f = require$$0.useState(!!address), manualAddressEntry = _f[0], setManualAddressEntry = _f[1];
4086
4085
  // you can read more about it here:
4087
4086
  // https://github.com/JustFly1984/react-google-maps-api/blob/develop/packages/react-google-maps-api/src/useJsApiLoader.md
4088
- var _h = useJsApiLoader({
4087
+ var _g = useJsApiLoader({
4089
4088
  googleMapsApiKey: apiKey,
4090
- }), hasLoadedGoogleAPI = _h.isLoaded, loadGoogleAPIError = _h.loadError;
4089
+ }), hasLoadedGoogleAPI = _g.isLoaded, loadGoogleAPIError = _g.loadError;
4091
4090
  var isGeometryEnabled = !staticVersion;
4092
4091
  var handleModeSwitch = function (event) {
4093
4092
  setManualAddressEntry(event.currentTarget.dataset.value === 'true');
4094
4093
  };
4095
- var handleAddressChange = function (address) {
4096
- setAddress(address);
4097
- onAddressChange(address);
4098
- };
4099
4094
  var handleDynamicAddress = function (address) {
4100
- handleAddressChange(address);
4095
+ onAddressChange(address);
4101
4096
  setManualAddressEntry(true);
4102
4097
  };
4103
4098
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -4115,7 +4110,7 @@ var AutoCompleteAddress = function (_a) {
4115
4110
  });
4116
4111
  }, 1000), [lodash_debounce]);
4117
4112
  var handleManualAddress = function (address) {
4118
- handleAddressChange(address);
4113
+ onAddressChange(address);
4119
4114
  if (isGeometryEnabled) {
4120
4115
  setIsLoading(true);
4121
4116
  updateMapGeometry(address);