awing-library 2.1.195-dev → 2.1.197-dev

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.
@@ -292,7 +292,7 @@ var CreateOrEdit = function (props) {
292
292
  };
293
293
  var handleSaveProfessionalEditing = function () {
294
294
  return new Promise(function (resolve, reject) {
295
- confirm(function () { var _a; return (_a = handleSubmit()) === null || _a === void 0 ? void 0 : _a.then(resolve).catch(reject); }, undefined, t("Campaign.SwitchToProfessionalEditMode"));
295
+ confirm(function () { var _a; return (_a = handleSubmit()) === null || _a === void 0 ? void 0 : _a.then(resolve); }, function () { return reject(); }, t("Campaign.SwitchToProfessionalEditMode"));
296
296
  });
297
297
  };
298
298
  return ((0, jsx_runtime_1.jsx)(ClassicDrawer_1.default, { title: "".concat(t(['Campaign', campaignId ? 'TitleDetail' : 'Create'].join('.'))).concat(campaignId ? ": ".concat((_a = campaignData === null || campaignData === void 0 ? void 0 : campaignData.campaign) === null || _a === void 0 ? void 0 : _a.name) : '', "\n "), onSubmit: function () { return editModeWizard ? handleSaveProfessionalEditing() : handleSubmit(); }, disableButtonSubmit: handleDisableButtonSubmit(), confirmExit: confirmExit, childrenWrapperStyle: { padding: 0 }, onClose: handleClose, children: (0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, sx: {
@@ -138,7 +138,7 @@ var GGMap = function (_a) {
138
138
  };
139
139
  }, [markerPosition]);
140
140
  var calculateRadius = function (currentZoom) {
141
- return Math.max(100000 * Math.pow(2, 5 - currentZoom), 300);
141
+ return Math.max(100000 * Math.pow(2, 5 - (currentZoom / 20)), 250);
142
142
  };
143
143
  return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: sxMap ? sxMap : stylesDefault, ref: boxRef, children: (0, jsx_runtime_1.jsxs)(api_1.LoadScript, { googleMapsApiKey: apiKey || '', libraries: libraries, children: [!isDisplayAutoComplete &&
144
144
  ((0, jsx_runtime_1.jsx)(api_1.Autocomplete, { onPlaceChanged: onPlaceChanged, onLoad: onLoad, children: (0, jsx_runtime_1.jsx)("input", { type: "text", placeholder: t('Common.PlaceHolderLocation'), onFocus: function () {
@@ -186,7 +186,7 @@ var GGMap = function (_a) {
186
186
  } })] })
187
187
  : (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: markerConvert === null || markerConvert === void 0 ? void 0 : markerConvert.map(function (coordinates, index, positions) {
188
188
  var _a, _b, _c;
189
- return (0, jsx_runtime_1.jsx)(api_1.CircleF, { center: { lat: (_a = coordinates.latitude) !== null && _a !== void 0 ? _a : 0, lng: (_b = coordinates.longitude) !== null && _b !== void 0 ? _b : 0 }, radius: calculateRadius(zoom * (((_c = coordinates === null || coordinates === void 0 ? void 0 : coordinates.count) !== null && _c !== void 0 ? _c : 0))), options: {
189
+ return (0, jsx_runtime_1.jsx)(api_1.CircleF, { center: { lat: (_a = coordinates.latitude) !== null && _a !== void 0 ? _a : 0, lng: (_b = coordinates.longitude) !== null && _b !== void 0 ? _b : 0 }, radius: calculateRadius(zoom * ((_c = coordinates === null || coordinates === void 0 ? void 0 : coordinates.count) !== null && _c !== void 0 ? _c : 0)), options: {
190
190
  strokeColor: '#4285F4',
191
191
  strokeOpacity: 0.8,
192
192
  strokeWeight: 2,
@@ -82,8 +82,9 @@ var Drawer = function (props) {
82
82
  }, 700);
83
83
  closeDrawer((typeof state === 'string' && state) ? state : CloseAction.Reload);
84
84
  })
85
- .catch(function () {
86
- snackbar('error');
85
+ .catch(function (e) {
86
+ if (e)
87
+ snackbar('error');
87
88
  })
88
89
  .finally(function () {
89
90
  setLoading(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.195-dev",
3
+ "version": "2.1.197-dev",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",