andoncloud-map-widget 1.0.2 → 1.0.4
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 +15 -10
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -4324,7 +4324,7 @@ function hasMultilineItems(maybeArray) {
|
|
|
4324
4324
|
return maybeArray != null && maybeArray.some(isMultiline);
|
|
4325
4325
|
}
|
|
4326
4326
|
|
|
4327
|
-
var LIBRARY_VERSION = '1.0.
|
|
4327
|
+
var LIBRARY_VERSION = '1.0.4';
|
|
4328
4328
|
|
|
4329
4329
|
var SettingsFormContent = function SettingsFormContent(_ref) {
|
|
4330
4330
|
var _data$floorPlans;
|
|
@@ -22447,6 +22447,10 @@ var Map$1 = function Map(_ref) {
|
|
|
22447
22447
|
return Promise.reject(e);
|
|
22448
22448
|
}
|
|
22449
22449
|
}, [removeFeatures]);
|
|
22450
|
+
React.useEffect(function () {
|
|
22451
|
+
var _mapRef$current2;
|
|
22452
|
+
(_mapRef$current2 = mapRef.current) == null ? void 0 : _mapRef$current2.invalidateSize();
|
|
22453
|
+
}, [width, height]);
|
|
22450
22454
|
React.useEffect(function () {
|
|
22451
22455
|
var map = mapRef.current;
|
|
22452
22456
|
setControlsDisplay(!!editMode);
|
|
@@ -22489,8 +22493,8 @@ var Map$1 = function Map(_ref) {
|
|
|
22489
22493
|
// @ts-ignore no typings
|
|
22490
22494
|
layer.dragging.disable();
|
|
22491
22495
|
if (tooltip) {
|
|
22492
|
-
var _mapRef$
|
|
22493
|
-
(_mapRef$
|
|
22496
|
+
var _mapRef$current3;
|
|
22497
|
+
(_mapRef$current3 = mapRef.current) == null ? void 0 : _mapRef$current3.openTooltip(tooltip);
|
|
22494
22498
|
}
|
|
22495
22499
|
}
|
|
22496
22500
|
});
|
|
@@ -22544,15 +22548,15 @@ var Map$1 = function Map(_ref) {
|
|
|
22544
22548
|
var openTooltip = function openTooltip(layer) {
|
|
22545
22549
|
var tooltip = layer.getTooltip();
|
|
22546
22550
|
if (tooltip) {
|
|
22547
|
-
var _mapRef$
|
|
22548
|
-
(_mapRef$
|
|
22551
|
+
var _mapRef$current4;
|
|
22552
|
+
(_mapRef$current4 = mapRef.current) == null ? void 0 : _mapRef$current4.openTooltip(tooltip);
|
|
22549
22553
|
}
|
|
22550
22554
|
};
|
|
22551
22555
|
var closeTooltip = function closeTooltip(layer) {
|
|
22552
22556
|
var tooltip = layer.getTooltip();
|
|
22553
22557
|
if (tooltip) {
|
|
22554
|
-
var _mapRef$
|
|
22555
|
-
(_mapRef$
|
|
22558
|
+
var _mapRef$current5;
|
|
22559
|
+
(_mapRef$current5 = mapRef.current) == null ? void 0 : _mapRef$current5.closeTooltip(tooltip);
|
|
22556
22560
|
}
|
|
22557
22561
|
};
|
|
22558
22562
|
var centerTooltip = function centerTooltip(layer) {
|
|
@@ -22747,9 +22751,10 @@ var WidgetView = function WidgetView(props) {
|
|
|
22747
22751
|
return React__default["default"].createElement(Map$1, _extends$1({}, props));
|
|
22748
22752
|
};
|
|
22749
22753
|
|
|
22750
|
-
var _excluded = ["url", "token", "lang", "data"];
|
|
22754
|
+
var _excluded = ["url", "wsUrl", "token", "lang", "data"];
|
|
22751
22755
|
var Widget = function Widget(_ref) {
|
|
22752
22756
|
var url = _ref.url,
|
|
22757
|
+
wsUrl = _ref.wsUrl,
|
|
22753
22758
|
token = _ref.token,
|
|
22754
22759
|
lang = _ref.lang,
|
|
22755
22760
|
data = _ref.data,
|
|
@@ -22769,9 +22774,9 @@ var Widget = function Widget(_ref) {
|
|
|
22769
22774
|
React.useEffect(function () {
|
|
22770
22775
|
if (url && token) {
|
|
22771
22776
|
setGraphqlSdk(andoncloudDashboardToolkit.getGraphqlSdk(url, token));
|
|
22772
|
-
setGqlWsClient(andoncloudDashboardToolkit.getGqlWsClient(url.replace('graphql', 'cable'), token, lang));
|
|
22777
|
+
setGqlWsClient(andoncloudDashboardToolkit.getGqlWsClient(wsUrl || url.replace('graphql', 'cable'), token, lang));
|
|
22773
22778
|
}
|
|
22774
|
-
}, [url, token, lang]);
|
|
22779
|
+
}, [url, wsUrl, token, lang]);
|
|
22775
22780
|
React.useEffect(function () {
|
|
22776
22781
|
if (!widgetData && graphqlSdk) {
|
|
22777
22782
|
graphqlSdk.workplaces().then(function (_ref2) {
|