@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/cjs/index.js
CHANGED
|
@@ -45230,11 +45230,6 @@ var TableChips = function TableChips(props) {
|
|
|
45230
45230
|
color: "danger",
|
|
45231
45231
|
title: "Clear All",
|
|
45232
45232
|
className: modules_016d9b3e.clear,
|
|
45233
|
-
leftComponent: function leftComponent() {
|
|
45234
|
-
return /*#__PURE__*/jsxRuntime.jsx(Trash, {
|
|
45235
|
-
className: modules_016d9b3e.icon
|
|
45236
|
-
});
|
|
45237
|
-
},
|
|
45238
45233
|
onClick: onClear
|
|
45239
45234
|
}) : ''
|
|
45240
45235
|
});
|
|
@@ -109259,6 +109254,10 @@ var BaseMap = function BaseMap(props) {
|
|
|
109259
109254
|
_useState2 = _slicedToArray(_useState, 2),
|
|
109260
109255
|
map = _useState2[0],
|
|
109261
109256
|
setMap = _useState2[1];
|
|
109257
|
+
var _useState3 = React.useState(null),
|
|
109258
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
109259
|
+
activeInfoWindow = _useState4[0],
|
|
109260
|
+
setActiveInfoWindow = _useState4[1];
|
|
109262
109261
|
React.useEffect(function () {
|
|
109263
109262
|
if (ref.current && !map) {
|
|
109264
109263
|
setMap(new window.google.maps.Map(ref.current, {
|
|
@@ -109329,7 +109328,9 @@ var BaseMap = function BaseMap(props) {
|
|
|
109329
109328
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
109330
109329
|
ref: ref,
|
|
109331
109330
|
style: style
|
|
109332
|
-
}), React.Children.
|
|
109331
|
+
}), React.Children.toArray(children).filter(function (child) {
|
|
109332
|
+
return /*#__PURE__*/React.isValidElement(child);
|
|
109333
|
+
}).map(function (child, index) {
|
|
109333
109334
|
if (index === 0) {
|
|
109334
109335
|
markersRef.current = [];
|
|
109335
109336
|
}
|
|
@@ -109340,7 +109341,10 @@ var BaseMap = function BaseMap(props) {
|
|
|
109340
109341
|
// set the map prop on the child component
|
|
109341
109342
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
109342
109343
|
map: map,
|
|
109343
|
-
ref: childRef
|
|
109344
|
+
ref: childRef,
|
|
109345
|
+
index: index,
|
|
109346
|
+
activeInfoWindow: activeInfoWindow,
|
|
109347
|
+
setActiveInfoWindow: setActiveInfoWindow
|
|
109344
109348
|
});
|
|
109345
109349
|
}
|
|
109346
109350
|
return null;
|
|
@@ -109378,11 +109382,14 @@ Map$1.defaultProps = {
|
|
|
109378
109382
|
libraries: undefined
|
|
109379
109383
|
};
|
|
109380
109384
|
|
|
109381
|
-
var _excluded = ["children"];
|
|
109385
|
+
var _excluded = ["children", "activeInfoWindow", "setActiveInfoWindow", "index"];
|
|
109382
109386
|
|
|
109383
109387
|
// eslint-disable-next-line prefer-arrow-callback
|
|
109384
109388
|
var Marker = /*#__PURE__*/React.forwardRef(function Marker(_ref, ref) {
|
|
109385
109389
|
var children = _ref.children,
|
|
109390
|
+
activeInfoWindow = _ref.activeInfoWindow,
|
|
109391
|
+
setActiveInfoWindow = _ref.setActiveInfoWindow,
|
|
109392
|
+
index = _ref.index,
|
|
109386
109393
|
options = _objectWithoutProperties$1(_ref, _excluded);
|
|
109387
109394
|
var _useState = React.useState(),
|
|
109388
109395
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -109411,6 +109418,7 @@ var Marker = /*#__PURE__*/React.forwardRef(function Marker(_ref, ref) {
|
|
|
109411
109418
|
if (marker && React.Children.count(children) === 1 && infoWindowRef !== null && infoWindowRef !== void 0 && infoWindowRef.current) {
|
|
109412
109419
|
var infoWindow = infoWindowRef === null || infoWindowRef === void 0 ? void 0 : infoWindowRef.current;
|
|
109413
109420
|
marker.addListener('click', function () {
|
|
109421
|
+
setActiveInfoWindow(index);
|
|
109414
109422
|
infoWindow.open({
|
|
109415
109423
|
anchor: marker,
|
|
109416
109424
|
map: options.map
|
|
@@ -109423,6 +109431,12 @@ var Marker = /*#__PURE__*/React.forwardRef(function Marker(_ref, ref) {
|
|
|
109423
109431
|
marker.setOptions(options);
|
|
109424
109432
|
}
|
|
109425
109433
|
}, [marker, options]);
|
|
109434
|
+
React.useEffect(function () {
|
|
109435
|
+
if (activeInfoWindow == null || activeInfoWindow !== index) {
|
|
109436
|
+
var infoWindow = infoWindowRef === null || infoWindowRef === void 0 ? void 0 : infoWindowRef.current;
|
|
109437
|
+
infoWindow.close();
|
|
109438
|
+
}
|
|
109439
|
+
}, [activeInfoWindow]);
|
|
109426
109440
|
if (React.Children.count(children) === 1) {
|
|
109427
109441
|
var _Children$toArray;
|
|
109428
109442
|
var child = (_Children$toArray = React.Children.toArray(children)) === null || _Children$toArray === void 0 ? void 0 : _Children$toArray[0];
|