@banyan_cloud/roots 1.0.68 → 1.0.70
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/cjs/index.js +22 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +22 -8
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +22 -8
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -45210,11 +45210,6 @@ var TableChips = function TableChips(props) {
|
|
|
45210
45210
|
color: "danger",
|
|
45211
45211
|
title: "Clear All",
|
|
45212
45212
|
className: modules_016d9b3e.clear,
|
|
45213
|
-
leftComponent: function leftComponent() {
|
|
45214
|
-
return /*#__PURE__*/jsx(Trash, {
|
|
45215
|
-
className: modules_016d9b3e.icon
|
|
45216
|
-
});
|
|
45217
|
-
},
|
|
45218
45213
|
onClick: onClear
|
|
45219
45214
|
}) : ''
|
|
45220
45215
|
});
|
|
@@ -109239,6 +109234,10 @@ var BaseMap = function BaseMap(props) {
|
|
|
109239
109234
|
_useState2 = _slicedToArray(_useState, 2),
|
|
109240
109235
|
map = _useState2[0],
|
|
109241
109236
|
setMap = _useState2[1];
|
|
109237
|
+
var _useState3 = useState(null),
|
|
109238
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
109239
|
+
activeInfoWindow = _useState4[0],
|
|
109240
|
+
setActiveInfoWindow = _useState4[1];
|
|
109242
109241
|
useEffect(function () {
|
|
109243
109242
|
if (ref.current && !map) {
|
|
109244
109243
|
setMap(new window.google.maps.Map(ref.current, {
|
|
@@ -109309,7 +109308,9 @@ var BaseMap = function BaseMap(props) {
|
|
|
109309
109308
|
children: [/*#__PURE__*/jsx("div", {
|
|
109310
109309
|
ref: ref,
|
|
109311
109310
|
style: style
|
|
109312
|
-
}), Children.
|
|
109311
|
+
}), Children.toArray(children).filter(function (child) {
|
|
109312
|
+
return /*#__PURE__*/isValidElement(child);
|
|
109313
|
+
}).map(function (child, index) {
|
|
109313
109314
|
if (index === 0) {
|
|
109314
109315
|
markersRef.current = [];
|
|
109315
109316
|
}
|
|
@@ -109320,7 +109321,10 @@ var BaseMap = function BaseMap(props) {
|
|
|
109320
109321
|
// set the map prop on the child component
|
|
109321
109322
|
return /*#__PURE__*/cloneElement(child, {
|
|
109322
109323
|
map: map,
|
|
109323
|
-
ref: childRef
|
|
109324
|
+
ref: childRef,
|
|
109325
|
+
index: index,
|
|
109326
|
+
activeInfoWindow: activeInfoWindow,
|
|
109327
|
+
setActiveInfoWindow: setActiveInfoWindow
|
|
109324
109328
|
});
|
|
109325
109329
|
}
|
|
109326
109330
|
return null;
|
|
@@ -109358,11 +109362,14 @@ Map$1.defaultProps = {
|
|
|
109358
109362
|
libraries: undefined
|
|
109359
109363
|
};
|
|
109360
109364
|
|
|
109361
|
-
var _excluded = ["children"];
|
|
109365
|
+
var _excluded = ["children", "activeInfoWindow", "setActiveInfoWindow", "index"];
|
|
109362
109366
|
|
|
109363
109367
|
// eslint-disable-next-line prefer-arrow-callback
|
|
109364
109368
|
var Marker = /*#__PURE__*/forwardRef(function Marker(_ref, ref) {
|
|
109365
109369
|
var children = _ref.children,
|
|
109370
|
+
activeInfoWindow = _ref.activeInfoWindow,
|
|
109371
|
+
setActiveInfoWindow = _ref.setActiveInfoWindow,
|
|
109372
|
+
index = _ref.index,
|
|
109366
109373
|
options = _objectWithoutProperties$1(_ref, _excluded);
|
|
109367
109374
|
var _useState = useState(),
|
|
109368
109375
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -109391,6 +109398,7 @@ var Marker = /*#__PURE__*/forwardRef(function Marker(_ref, ref) {
|
|
|
109391
109398
|
if (marker && Children.count(children) === 1 && infoWindowRef !== null && infoWindowRef !== void 0 && infoWindowRef.current) {
|
|
109392
109399
|
var infoWindow = infoWindowRef === null || infoWindowRef === void 0 ? void 0 : infoWindowRef.current;
|
|
109393
109400
|
marker.addListener('click', function () {
|
|
109401
|
+
setActiveInfoWindow(index);
|
|
109394
109402
|
infoWindow.open({
|
|
109395
109403
|
anchor: marker,
|
|
109396
109404
|
map: options.map
|
|
@@ -109403,6 +109411,12 @@ var Marker = /*#__PURE__*/forwardRef(function Marker(_ref, ref) {
|
|
|
109403
109411
|
marker.setOptions(options);
|
|
109404
109412
|
}
|
|
109405
109413
|
}, [marker, options]);
|
|
109414
|
+
useEffect(function () {
|
|
109415
|
+
if (activeInfoWindow == null || activeInfoWindow !== index) {
|
|
109416
|
+
var infoWindow = infoWindowRef === null || infoWindowRef === void 0 ? void 0 : infoWindowRef.current;
|
|
109417
|
+
infoWindow.close();
|
|
109418
|
+
}
|
|
109419
|
+
}, [activeInfoWindow]);
|
|
109406
109420
|
if (Children.count(children) === 1) {
|
|
109407
109421
|
var _Children$toArray;
|
|
109408
109422
|
var child = (_Children$toArray = Children.toArray(children)) === null || _Children$toArray === void 0 ? void 0 : _Children$toArray[0];
|