@equinor/echo-framework 0.9.13 → 0.9.14
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/components/appLinks/applinkUtils.d.ts +2 -0
- package/dist/components/appLinks/applinkUtils.test.d.ts +1 -0
- package/dist/components/containers/layouts.d.ts +5 -3
- package/dist/components/panel/corePanelLeft.d.ts +1 -4
- package/dist/components/panel/corePanelRight.d.ts +1 -4
- package/dist/components/router/echoRoute.d.ts +2 -2
- package/dist/components/router/index.d.ts +1 -0
- package/dist/components/router/useLayout.d.ts +3 -0
- package/dist/coreApplication/index.d.ts +0 -2
- package/dist/hooks/index.d.ts +0 -2
- package/dist/index.d.ts +0 -8
- package/dist/index.js +3 -0
- package/dist/types/hookLibrary.d.ts +0 -1
- package/package.json +42 -39
- package/dist/_virtual/_tslib.js +0 -67
- package/dist/_virtual/index.js +0 -9
- package/dist/coreApplication/EchoBarComponent.d.ts +0 -9
- package/dist/coreApplication/EchoUserInterfaceContextProvider.d.ts +0 -11
- package/dist/hooks/useIsCompactLayout.d.ts +0 -5
- package/dist/hooks/useScreenOrientation.d.ts +0 -5
- package/dist/hooks/useScreenValues.d.ts +0 -13
- package/dist/hooks/useWindowSize.d.ts +0 -9
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +0 -25
- package/dist/node_modules/@equinor/eds-icons/dist/icons.esm.js +0 -5285
- package/dist/node_modules/@microsoft/signalr/dist/esm/AbortController.js +0 -54
- package/dist/node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js +0 -96
- package/dist/node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js +0 -47
- package/dist/node_modules/@microsoft/signalr/dist/esm/Errors.js +0 -287
- package/dist/node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js +0 -283
- package/dist/node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js +0 -86
- package/dist/node_modules/@microsoft/signalr/dist/esm/HeaderNames.js +0 -20
- package/dist/node_modules/@microsoft/signalr/dist/esm/HttpClient.js +0 -82
- package/dist/node_modules/@microsoft/signalr/dist/esm/HttpConnection.js +0 -1169
- package/dist/node_modules/@microsoft/signalr/dist/esm/HubConnection.js +0 -1346
- package/dist/node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js +0 -165
- package/dist/node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js +0 -33
- package/dist/node_modules/@microsoft/signalr/dist/esm/ILogger.js +0 -37
- package/dist/node_modules/@microsoft/signalr/dist/esm/ITransport.js +0 -37
- package/dist/node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js +0 -179
- package/dist/node_modules/@microsoft/signalr/dist/esm/Loggers.js +0 -35
- package/dist/node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js +0 -448
- package/dist/node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js +0 -238
- package/dist/node_modules/@microsoft/signalr/dist/esm/Subject.js +0 -99
- package/dist/node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js +0 -45
- package/dist/node_modules/@microsoft/signalr/dist/esm/Utils.js +0 -435
- package/dist/node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js +0 -264
- package/dist/node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js +0 -133
- package/dist/node_modules/classnames/index.js +0 -67
- package/dist/node_modules/history/esm/history.js +0 -498
- package/dist/node_modules/resolve-pathname/esm/resolve-pathname.js +0 -73
- package/dist/node_modules/style-inject/dist/style-inject.es.js +0 -36
- package/dist/node_modules/tiny-invariant/dist/tiny-invariant.esm.js +0 -23
- package/dist/node_modules/tiny-warning/dist/tiny-warning.esm.js +0 -26
- package/dist/src/components/appLinks/AppLinks.js +0 -38
- package/dist/src/components/appLinks/AppLinks.module.css.js +0 -14
- package/dist/src/components/appLinks/linkButton/linkButton.js +0 -45
- package/dist/src/components/containers/layout.module.css.js +0 -29
- package/dist/src/components/containers/layouts.js +0 -101
- package/dist/src/components/contextualAppLinks/contextualAppLinks.context.js +0 -20
- package/dist/src/components/contextualAppLinks/contextualAppLinks.js +0 -47
- package/dist/src/components/contextualAppLinks/externalAppsMenu.js +0 -157
- package/dist/src/components/contextualAppLinks/externalAppsMenu.module.css.js +0 -16
- package/dist/src/components/contextualAppLinks/externalLinkButtons/allExternalLinks.js +0 -127
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.js +0 -169
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToCommApp.js +0 -95
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToMcApp.js +0 -95
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToProCoSys.js +0 -84
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSafeX.js +0 -38
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSap.js +0 -110
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSemiDoc.js +0 -59
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToStid.js +0 -40
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.js +0 -114
- package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.js +0 -44
- package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.module.css.js +0 -15
- package/dist/src/components/contextualAppLinks/hooks/useContextualAppLinks.js +0 -52
- package/dist/src/components/contextualAppLinks/hooks/useContextualAppLinksContext.js +0 -36
- package/dist/src/components/contextualAppLinks/index.js +0 -22
- package/dist/src/components/contextualAppLinks/internalAppLinks.js +0 -115
- package/dist/src/components/contextualAppLinks/linkButton.js +0 -57
- package/dist/src/components/echoLogo/echoLogo.js +0 -30
- package/dist/src/components/echoLogo/echoLogo.module.css.js +0 -15
- package/dist/src/components/errorBoundary/components/chunkLoadErrorMessage.js +0 -64
- package/dist/src/components/errorBoundary/components/chunkLoadErrorMessage.module.css.js +0 -17
- package/dist/src/components/errorBoundary/components/errorBoundaryBaseMessage.js +0 -85
- package/dist/src/components/errorBoundary/components/errorBoundaryBaseMessage.module.css.js +0 -19
- package/dist/src/components/errorBoundary/components/notificationCardWithLogo.js +0 -55
- package/dist/src/components/errorBoundary/components/notificationCardWithLogo.module.css.js +0 -19
- package/dist/src/components/errorBoundary/errorBoundary.js +0 -100
- package/dist/src/components/externalLinkButton/externalLinkButton.js +0 -310
- package/dist/src/components/externalLinkButton/externalLinkButton.module.css.js +0 -23
- package/dist/src/components/footer/footer.js +0 -42
- package/dist/src/components/footer/footer.module.css.js +0 -17
- package/dist/src/components/lazyLoading/appLoadingIndicator.js +0 -34
- package/dist/src/components/lazyLoading/appLoadingIndicator.module.css.js +0 -15
- package/dist/src/components/lazyLoading/lazyLoadedAppWrapper.js +0 -40
- package/dist/src/components/mediator/mediator.js +0 -32
- package/dist/src/components/pageMenu/Navigation/applicationList.js +0 -35
- package/dist/src/components/pageMenu/Navigation/applicationList.module.css.js +0 -17
- package/dist/src/components/pageMenu/accordionItem.module.css.js +0 -16
- package/dist/src/components/pageMenu/defaultAccordionItem.js +0 -61
- package/dist/src/components/pageMenu/pageMenu.js +0 -141
- package/dist/src/components/pageMenu/pageMenu.module.css.js +0 -17
- package/dist/src/components/pageMenu/pageMenuDrawerItem.js +0 -77
- package/dist/src/components/pageMenu/pageMenuDrawerItem.module.css.js +0 -20
- package/dist/src/components/pageMenu/settings/asset.js +0 -40
- package/dist/src/components/pageMenu/settings/profile.js +0 -62
- package/dist/src/components/pageMenu/settings/settings.js +0 -41
- package/dist/src/components/pageMenu/settings/settings.module.css.js +0 -25
- package/dist/src/components/pageMenu/version/version.js +0 -88
- package/dist/src/components/pageMenu/version/version.module.css.js +0 -14
- package/dist/src/components/panel/corePanelIcon.js +0 -31
- package/dist/src/components/panel/corePanelLeft.js +0 -94
- package/dist/src/components/panel/corePanelLeft.module.css.js +0 -21
- package/dist/src/components/panel/corePanelRight.js +0 -98
- package/dist/src/components/panel/corePanelRight.module.css.js +0 -18
- package/dist/src/components/panelButton/panelButton.js +0 -124
- package/dist/src/components/panelButton/panelButton.module.css.js +0 -25
- package/dist/src/components/plantSelector/plantSelector.js +0 -137
- package/dist/src/components/projectSelector/ProcosysProjectSelector.js +0 -115
- package/dist/src/components/projectSelector/ProcosysProjectSelector.module.css.js +0 -14
- package/dist/src/components/realTimeData/RealTimePopoverButton.js +0 -168
- package/dist/src/components/realTimeData/components/IMSDropdown/RealTimeIMSDropdown.js +0 -83
- package/dist/src/components/realTimeData/components/IMSDropdown/RealTimeIMSDropdown.module.css.js +0 -15
- package/dist/src/components/realTimeData/components/connectorForIMSTag/IMSConnector.module.css.js +0 -17
- package/dist/src/components/realTimeData/components/connectorForIMSTag/RealTimeConnectorForIMSTag.js +0 -149
- package/dist/src/components/realTimeData/components/contextButton/RealTimeContextButton.js +0 -75
- package/dist/src/components/realTimeData/components/contextButton/RealTimeContextButton.module.css.js +0 -15
- package/dist/src/components/realTimeData/components/contextPopover/Popover.js +0 -37
- package/dist/src/components/realTimeData/components/contextPopover/Popover.module.css.js +0 -15
- package/dist/src/components/realTimeData/hooks/useRealTimeHub.js +0 -124
- package/dist/src/components/realTimeData/hooks/useSignalR.js +0 -175
- package/dist/src/components/realTimeData/hooks/useSignalRListener.js +0 -22
- package/dist/src/components/router/echoRoute.js +0 -51
- package/dist/src/components/router/echoRouter.js +0 -30
- package/dist/src/components/router/echoWrapper.js +0 -33
- package/dist/src/components/router/routes.js +0 -43
- package/dist/src/components/searchMenu/searchMenu.js +0 -46
- package/dist/src/components/searchMenu/searchMenu.module.css.js +0 -16
- package/dist/src/components/tagNumber/tagNo.module.css.js +0 -14
- package/dist/src/components/tagNumber/tagNumber.js +0 -38
- package/dist/src/components/toaster/toaster.js +0 -44
- package/dist/src/components/toaster/toaster.module.css.js +0 -16
- package/dist/src/components/toaster/toasters.js +0 -101
- package/dist/src/coreApplication/EchoBarComponent.js +0 -164
- package/dist/src/coreApplication/EchoContent.js +0 -52
- package/dist/src/coreApplication/EchoContent.module.css.js +0 -17
- package/dist/src/coreApplication/EchoContentPanels.js +0 -40
- package/dist/src/coreApplication/EchoEventHandler.js +0 -79
- package/dist/src/coreApplication/EchoEventHandler.module.css.js +0 -14
- package/dist/src/coreApplication/EchoUserInterfaceContextProvider.js +0 -66
- package/dist/src/globalStyles.css.js +0 -6
- package/dist/src/hooks/hookLibrary.js +0 -86
- package/dist/src/hooks/index.js +0 -18
- package/dist/src/hooks/useEchoHistory.js +0 -38
- package/dist/src/hooks/useIsCompactLayout.js +0 -50
- package/dist/src/hooks/useLongPress.js +0 -37
- package/dist/src/hooks/useScreenOrientation.js +0 -62
- package/dist/src/hooks/useScreenValues.js +0 -35
- package/dist/src/hooks/useSemi.js +0 -100
- package/dist/src/hooks/useTagDetails.js +0 -153
- package/dist/src/hooks/useWindowSize.js +0 -62
- package/dist/src/icons/common/CommissionApp-icon.png.js +0 -7
- package/dist/src/icons/common/Evision.svg.js +0 -68
- package/dist/src/icons/common/Fusion.svg.js +0 -111
- package/dist/src/icons/common/McApp.svg.js +0 -70
- package/dist/src/icons/common/Notification.svg.js +0 -81
- package/dist/src/icons/common/ProCoSysIcon.svg.js +0 -68
- package/dist/src/icons/common/Robim.svg.js +0 -66
- package/dist/src/icons/common/SX-logo.png.js +0 -7
- package/dist/src/icons/common/SapLogo.svg.js +0 -95
- package/dist/src/icons/common/SemiIcon.svg.js +0 -82
- package/dist/src/icons/common/Stid.svg.js +0 -65
- package/dist/src/icons/common/TR2000.svg.js +0 -73
- package/dist/src/icons/common/WorkOrder.svg.js +0 -71
- package/dist/src/icons/common/Yammer.svg.js +0 -65
- package/dist/src/icons/common/satos-logo.png.js +0 -7
- package/dist/src/icons/edsIons.js +0 -15
- package/dist/src/icons/equinor-logo.js +0 -62
- package/dist/src/icons/logo_ee.js +0 -37
- package/dist/src/icons/search.js +0 -35
- package/dist/src/index.js +0 -218
- package/dist/src/index2.js +0 -205
- package/dist/src/services/api/api-manager.js +0 -190
- package/dist/src/services/api/api-plantinfo.js +0 -196
- package/dist/src/services/api/api-plants.js +0 -75
- package/dist/src/services/api/api-realtimedata.js +0 -55
- package/dist/src/services/api/api-tag-details.js +0 -69
- package/dist/src/services/api/api-tags.js +0 -88
- package/dist/src/services/api/api-version.js +0 -124
- package/dist/src/services/componentRegistry/componentRegistry.js +0 -69
- package/dist/src/services/echopediaAnalyticsModule/echopediaAnalyticsModule.js +0 -10
- package/dist/src/services/eventCallbacks/plantChanged.js +0 -42
- package/dist/src/services/eventHubActions/toastActions.js +0 -18
- package/dist/src/theme/themeConst.js +0 -75
- package/dist/src/types/extensions.js +0 -10
- package/dist/src/types/legend.js +0 -58
- package/dist/src/types/pingableSources.js +0 -11
- package/dist/src/utils/copyText.js +0 -67
- package/dist/src/utils/eventHandlerUtils.js +0 -11
- package/dist/src/utils/legendUtils.js +0 -168
- package/dist/src/utils/navigationUtils.js +0 -28
- package/dist/src/utils/plantInfo.js +0 -535
- package/dist/src/utils/plantsDataUtils.js +0 -35
- package/dist/src/utils/projectSelectorUtils.js +0 -19
- package/dist/src/utils/startup.js +0 -89
- package/dist/src/utils/taskCache.js +0 -89
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
-
|
|
5
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
|
|
7
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
-
|
|
9
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
10
|
-
|
|
11
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
12
|
-
|
|
13
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
-
|
|
15
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
16
|
-
|
|
17
|
-
Object.defineProperty(exports, '__esModule', {
|
|
18
|
-
value: true
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
var echoComponents = require('@equinor/echo-components');
|
|
22
|
-
|
|
23
|
-
var edsCoreReact = require('@equinor/eds-core-react');
|
|
24
|
-
|
|
25
|
-
var React = require('react');
|
|
26
|
-
|
|
27
|
-
var Popover = require('../contextPopover/Popover.js');
|
|
28
|
-
|
|
29
|
-
var RealTimeContextButton_module = require('./RealTimeContextButton.module.css.js');
|
|
30
|
-
|
|
31
|
-
function _interopDefaultLegacy(e) {
|
|
32
|
-
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
33
|
-
'default': e
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
38
|
-
|
|
39
|
-
var RealTimeContextButton = function RealTimeContextButton(_ref) {
|
|
40
|
-
var onOpen = _ref.onOpen,
|
|
41
|
-
children = _ref.children;
|
|
42
|
-
|
|
43
|
-
var _React$useState = React.useState(false),
|
|
44
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
45
|
-
expanded = _React$useState2[0],
|
|
46
|
-
setExpanded = _React$useState2[1];
|
|
47
|
-
|
|
48
|
-
function handleClick() {
|
|
49
|
-
var nextState = !expanded;
|
|
50
|
-
|
|
51
|
-
if (nextState) {
|
|
52
|
-
onOpen && onOpen();
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
setExpanded(nextState);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
59
|
-
className: RealTimeContextButton_module["default"].wrapper
|
|
60
|
-
}, /*#__PURE__*/React__default["default"].createElement(edsCoreReact.Button, {
|
|
61
|
-
className: RealTimeContextButton_module["default"].button,
|
|
62
|
-
variant: "ghost_icon",
|
|
63
|
-
onClick: handleClick
|
|
64
|
-
}, expanded ? /*#__PURE__*/React__default["default"].createElement(edsCoreReact.Icon, {
|
|
65
|
-
name: "close",
|
|
66
|
-
title: "Close Real Time Data",
|
|
67
|
-
color: echoComponents.themeConst.asBuilt
|
|
68
|
-
}) : /*#__PURE__*/React__default["default"].createElement(edsCoreReact.Icon, {
|
|
69
|
-
name: "timeline",
|
|
70
|
-
title: "Real Time Data",
|
|
71
|
-
color: echoComponents.themeConst.asBuilt
|
|
72
|
-
})), expanded && /*#__PURE__*/React__default["default"].createElement(Popover.ContextPopover, null, children));
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
exports.RealTimeContextButton = RealTimeContextButton;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var styleInject_es = require('../../../../../node_modules/style-inject/dist/style-inject.es.js');
|
|
8
|
-
|
|
9
|
-
var css_248z = ".RealTimeContextButton-module_wrapper__2hzo4{margin-left:4px}.RealTimeContextButton-module_button__TxZmh{background-color:var(--white)!important;border:3px solid var(--white)!important;border-radius:10rem;box-shadow:0 4px 4px rgba(0,0,0,.25);box-sizing:border-box;height:46px!important;width:46px!important}.RealTimeContextButton-module_button__TxZmh:hover{background:#deedee!important}";
|
|
10
|
-
var style = {
|
|
11
|
-
"wrapper": "RealTimeContextButton-module_wrapper__2hzo4",
|
|
12
|
-
"button": "RealTimeContextButton-module_button__TxZmh"
|
|
13
|
-
};
|
|
14
|
-
styleInject_es["default"](css_248z);
|
|
15
|
-
exports["default"] = style;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, '__esModule', {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
var React = require('react');
|
|
10
|
-
|
|
11
|
-
var Popover_module = require('./Popover.module.css.js');
|
|
12
|
-
|
|
13
|
-
function _interopDefaultLegacy(e) {
|
|
14
|
-
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
15
|
-
'default': e
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
20
|
-
/**
|
|
21
|
-
* Generic Popover placement component that can take in optional background color
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var ContextPopover = function ContextPopover(_ref) {
|
|
26
|
-
var children = _ref.children;
|
|
27
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
28
|
-
className: Popover_module["default"].wrapper,
|
|
29
|
-
onClick: function onClick(e) {
|
|
30
|
-
return e.stopPropagation();
|
|
31
|
-
}
|
|
32
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
33
|
-
className: Popover_module["default"].optionsPopover
|
|
34
|
-
}, children));
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
exports.ContextPopover = ContextPopover;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var styleInject_es = require('../../../../../node_modules/style-inject/dist/style-inject.es.js');
|
|
8
|
-
|
|
9
|
-
var css_248z = ".Popover-module_wrapper__6HoPX{display:flex;flex-direction:column;left:0;position:absolute;right:0;z-index:10}.Popover-module_optionsPopover__Qp7UL{display:flex}@media screen and (max-width:440px){.Popover-module_optionsPopover__Qp7UL{max-width:270px}.Popover-module_wrapper__6HoPX{left:0}.Popover-module_optionsPopover__Qp7UL{align-self:flex-start}}";
|
|
10
|
-
var styles = {
|
|
11
|
-
"wrapper": "Popover-module_wrapper__6HoPX",
|
|
12
|
-
"optionsPopover": "Popover-module_optionsPopover__Qp7UL"
|
|
13
|
-
};
|
|
14
|
-
styleInject_es["default"](css_248z);
|
|
15
|
-
exports["default"] = styles;
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4
|
-
|
|
5
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
-
|
|
7
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
-
|
|
9
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
-
|
|
11
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12
|
-
|
|
13
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
14
|
-
|
|
15
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
-
|
|
17
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
18
|
-
|
|
19
|
-
Object.defineProperty(exports, '__esModule', {
|
|
20
|
-
value: true
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
var _tslib = require('../../../../_virtual/_tslib.js');
|
|
24
|
-
|
|
25
|
-
var React = require('react');
|
|
26
|
-
|
|
27
|
-
var EchoUtils = require('@equinor/echo-utils');
|
|
28
|
-
|
|
29
|
-
var EchoCore = require('@equinor/echo-core');
|
|
30
|
-
|
|
31
|
-
var useSignalR = require('./useSignalR.js');
|
|
32
|
-
|
|
33
|
-
var useSignalRListener = require('./useSignalRListener.js');
|
|
34
|
-
|
|
35
|
-
var apiRealtimedata = require('../../../services/api/api-realtimedata.js');
|
|
36
|
-
|
|
37
|
-
function _interopDefaultLegacy(e) {
|
|
38
|
-
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
39
|
-
'default': e
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
var EchoUtils__default = /*#__PURE__*/_interopDefaultLegacy(EchoUtils);
|
|
44
|
-
|
|
45
|
-
var EchoCore__default = /*#__PURE__*/_interopDefaultLegacy(EchoCore);
|
|
46
|
-
|
|
47
|
-
function useRealTimeHub(id, instCode) {
|
|
48
|
-
var _this = this;
|
|
49
|
-
|
|
50
|
-
var _a = useSignalR.useSignalR('/real-time-data'),
|
|
51
|
-
connection = _a.connection,
|
|
52
|
-
loading = _a.loading,
|
|
53
|
-
rest = _tslib.__rest(_a, ["connection", "loading"]);
|
|
54
|
-
|
|
55
|
-
var _React$useState = React.useState(),
|
|
56
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
57
|
-
metadata = _React$useState2[0],
|
|
58
|
-
setMetadata = _React$useState2[1];
|
|
59
|
-
|
|
60
|
-
var _React$useState3 = React.useState(),
|
|
61
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
62
|
-
present = _React$useState4[0],
|
|
63
|
-
setPresent = _React$useState4[1];
|
|
64
|
-
|
|
65
|
-
useSignalRListener.useSignalRListener(connection, 'realtimedata', function (timeData) {
|
|
66
|
-
var _timeData$dataPoints = _slicedToArray(timeData.dataPoints, 1),
|
|
67
|
-
present = _timeData$dataPoints[0];
|
|
68
|
-
|
|
69
|
-
setPresent(present);
|
|
70
|
-
}); // SignalR connection starter + listen to timeseries data
|
|
71
|
-
|
|
72
|
-
EchoUtils__default["default"].Hooks.useEffectAsync(function () {
|
|
73
|
-
return _tslib.__awaiter(_this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
74
|
-
var timeseries, timeseriesId, accessToken;
|
|
75
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
76
|
-
while (1) {
|
|
77
|
-
switch (_context.prev = _context.next) {
|
|
78
|
-
case 0:
|
|
79
|
-
if (!(!instCode || !connection)) {
|
|
80
|
-
_context.next = 2;
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return _context.abrupt("return");
|
|
85
|
-
|
|
86
|
-
case 2:
|
|
87
|
-
_context.next = 4;
|
|
88
|
-
return apiRealtimedata.getTimeseriesByName(id, instCode);
|
|
89
|
-
|
|
90
|
-
case 4:
|
|
91
|
-
timeseries = _context.sent;
|
|
92
|
-
|
|
93
|
-
if (!timeseries) {
|
|
94
|
-
_context.next = 13;
|
|
95
|
-
break;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
setMetadata(timeseries);
|
|
99
|
-
timeseriesId = timeseries.id;
|
|
100
|
-
_context.next = 10;
|
|
101
|
-
return EchoCore__default["default"].EchoClient.getAccessToken();
|
|
102
|
-
|
|
103
|
-
case 10:
|
|
104
|
-
accessToken = _context.sent;
|
|
105
|
-
_context.next = 13;
|
|
106
|
-
return connection.send('subscribe', accessToken, timeseriesId);
|
|
107
|
-
|
|
108
|
-
case 13:
|
|
109
|
-
case "end":
|
|
110
|
-
return _context.stop();
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}, _callee);
|
|
114
|
-
}));
|
|
115
|
-
}, [connection, id, instCode]);
|
|
116
|
-
return Object.assign({
|
|
117
|
-
metadata: metadata,
|
|
118
|
-
present: present,
|
|
119
|
-
connection: connection,
|
|
120
|
-
loading: loading || !present
|
|
121
|
-
}, rest);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
exports.useRealTimeHub = useRealTimeHub;
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
-
|
|
5
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
|
|
7
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
-
|
|
9
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
10
|
-
|
|
11
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
12
|
-
|
|
13
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
-
|
|
15
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
16
|
-
|
|
17
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
18
|
-
|
|
19
|
-
Object.defineProperty(exports, '__esModule', {
|
|
20
|
-
value: true
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
var _tslib = require('../../../../_virtual/_tslib.js');
|
|
24
|
-
|
|
25
|
-
var React = require('react');
|
|
26
|
-
|
|
27
|
-
require('../../../../node_modules/@microsoft/signalr/dist/esm/ILogger.js');
|
|
28
|
-
|
|
29
|
-
require('../../../../node_modules/@microsoft/signalr/dist/esm/Loggers.js');
|
|
30
|
-
|
|
31
|
-
require('../../../../node_modules/@microsoft/signalr/dist/esm/HubConnection.js');
|
|
32
|
-
|
|
33
|
-
var HubConnectionBuilder = require('../../../../node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js');
|
|
34
|
-
|
|
35
|
-
require('../../../../node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js');
|
|
36
|
-
|
|
37
|
-
require('../../../../node_modules/@microsoft/signalr/dist/esm/ITransport.js');
|
|
38
|
-
|
|
39
|
-
require('../../../../node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js');
|
|
40
|
-
|
|
41
|
-
var EchoUtils = require('@equinor/echo-utils');
|
|
42
|
-
|
|
43
|
-
var EchoCore = require('@equinor/echo-core');
|
|
44
|
-
|
|
45
|
-
var apiManager = require('../../../services/api/api-manager.js');
|
|
46
|
-
|
|
47
|
-
var useSignalRListener = require('./useSignalRListener.js');
|
|
48
|
-
|
|
49
|
-
function _interopDefaultLegacy(e) {
|
|
50
|
-
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
51
|
-
'default': e
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
var EchoUtils__default = /*#__PURE__*/_interopDefaultLegacy(EchoUtils);
|
|
56
|
-
|
|
57
|
-
var EchoCore__default = /*#__PURE__*/_interopDefaultLegacy(EchoCore);
|
|
58
|
-
|
|
59
|
-
function setLoading(state) {
|
|
60
|
-
return Object.assign(Object.assign({}, state), {
|
|
61
|
-
loading: false
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function setDoneLoading(state) {
|
|
66
|
-
return Object.assign(Object.assign({}, state), {
|
|
67
|
-
loading: true
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function accessTokenFactory() {
|
|
72
|
-
return _tslib.__awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
73
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
74
|
-
while (1) {
|
|
75
|
-
switch (_context.prev = _context.next) {
|
|
76
|
-
case 0:
|
|
77
|
-
return _context.abrupt("return", EchoCore__default["default"].EchoClient.getAccessToken());
|
|
78
|
-
|
|
79
|
-
case 1:
|
|
80
|
-
case "end":
|
|
81
|
-
return _context.stop();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}, _callee);
|
|
85
|
-
}));
|
|
86
|
-
} // TODO - Add unit test - need to figure out how to test hooks with useEffectAsync
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
function useSignalR(hubUrl) {
|
|
90
|
-
var _this = this;
|
|
91
|
-
|
|
92
|
-
var _React$useState = React.useState({
|
|
93
|
-
status: 'ok',
|
|
94
|
-
loading: false
|
|
95
|
-
}),
|
|
96
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
97
|
-
state = _React$useState2[0],
|
|
98
|
-
setState = _React$useState2[1]; // we will always default to listening for the subscribe message
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
useSignalRListener.useSignalRListener(state.connection, 'subscribe', function (id, status, payload) {
|
|
102
|
-
if (status === 200) {
|
|
103
|
-
setState(function (state) {
|
|
104
|
-
return Object.assign(Object.assign({}, state), {
|
|
105
|
-
loading: false,
|
|
106
|
-
status: 'ok',
|
|
107
|
-
statusCode: status
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
} else {
|
|
111
|
-
setState(function (state) {
|
|
112
|
-
return Object.assign(Object.assign({}, state), {
|
|
113
|
-
loading: false,
|
|
114
|
-
status: 'error',
|
|
115
|
-
statusCode: status,
|
|
116
|
-
message: typeof payload === 'string' ? payload : ''
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
}); // SignalR start/stop connection hook
|
|
121
|
-
|
|
122
|
-
EchoUtils__default["default"].Hooks.useEffectAsync(function (signal) {
|
|
123
|
-
return _tslib.__awaiter(_this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
124
|
-
var setStateWhenMounted, connection;
|
|
125
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
126
|
-
while (1) {
|
|
127
|
-
switch (_context2.prev = _context2.next) {
|
|
128
|
-
case 0:
|
|
129
|
-
setStateWhenMounted = function _setStateWhenMounted(value) {
|
|
130
|
-
if (signal.aborted) {
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
setState(value);
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
connection = new HubConnectionBuilder.HubConnectionBuilder().withUrl(apiManager.baseApiUrl + hubUrl, {
|
|
138
|
-
accessTokenFactory: accessTokenFactory
|
|
139
|
-
}).withAutomaticReconnect().build(); // reconnect things
|
|
140
|
-
|
|
141
|
-
connection.onreconnected(function () {
|
|
142
|
-
return setStateWhenMounted(setDoneLoading);
|
|
143
|
-
});
|
|
144
|
-
connection.onreconnecting(function () {
|
|
145
|
-
return setStateWhenMounted(setLoading);
|
|
146
|
-
}); // starting connection
|
|
147
|
-
|
|
148
|
-
_context2.next = 6;
|
|
149
|
-
return connection.start();
|
|
150
|
-
|
|
151
|
-
case 6:
|
|
152
|
-
// should set connection and then loading to done
|
|
153
|
-
setStateWhenMounted(function (state) {
|
|
154
|
-
return Object.assign(Object.assign({}, state), {
|
|
155
|
-
connection: connection
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
setStateWhenMounted(setDoneLoading); // stop connection when unmounted
|
|
159
|
-
|
|
160
|
-
return _context2.abrupt("return", function () {
|
|
161
|
-
connection.stop();
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
case 9:
|
|
165
|
-
case "end":
|
|
166
|
-
return _context2.stop();
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}, _callee2);
|
|
170
|
-
}));
|
|
171
|
-
}, []);
|
|
172
|
-
return state;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
exports.useSignalR = useSignalR;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var React = require('react');
|
|
8
|
-
|
|
9
|
-
function useSignalRListener(hubConnection, target, method) {
|
|
10
|
-
React.useEffect(function () {
|
|
11
|
-
if (!hubConnection) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
hubConnection.on(target, method);
|
|
16
|
-
return function () {
|
|
17
|
-
hubConnection.off(target, method);
|
|
18
|
-
};
|
|
19
|
-
}, [hubConnection, target, method]);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
exports.useSignalRListener = useSignalRListener;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, '__esModule', {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
var React = require('react');
|
|
10
|
-
|
|
11
|
-
var reactRouterDom = require('react-router-dom');
|
|
12
|
-
|
|
13
|
-
var errorBoundary = require('../errorBoundary/errorBoundary.js');
|
|
14
|
-
|
|
15
|
-
var layouts = require('../containers/layouts.js');
|
|
16
|
-
|
|
17
|
-
var echoWrapper = require('./echoWrapper.js');
|
|
18
|
-
|
|
19
|
-
function _interopDefaultLegacy(e) {
|
|
20
|
-
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
21
|
-
'default': e
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
26
|
-
|
|
27
|
-
var EchoRoute = function EchoRoute(_ref) {
|
|
28
|
-
var key = _ref.key,
|
|
29
|
-
Component = _ref.component,
|
|
30
|
-
layoutKey = _ref.layoutKey,
|
|
31
|
-
path = _ref.path,
|
|
32
|
-
errorHandler = _ref.errorHandler,
|
|
33
|
-
_ref$exactPath = _ref.exactPath,
|
|
34
|
-
exactPath = _ref$exactPath === void 0 ? true : _ref$exactPath;
|
|
35
|
-
return /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Route, {
|
|
36
|
-
key: key,
|
|
37
|
-
exact: exactPath,
|
|
38
|
-
path: path,
|
|
39
|
-
render: function render(props) {
|
|
40
|
-
return /*#__PURE__*/React__default["default"].createElement(layouts.Layout, {
|
|
41
|
-
layoutKey: layoutKey
|
|
42
|
-
}, /*#__PURE__*/React__default["default"].createElement(echoWrapper.EchoWrapper, {
|
|
43
|
-
path: path
|
|
44
|
-
}, /*#__PURE__*/React__default["default"].createElement(errorBoundary.ErrorBoundary, {
|
|
45
|
-
onComponentDidCatch: errorHandler
|
|
46
|
-
}, /*#__PURE__*/React__default["default"].createElement(Component, Object.assign({}, props)))));
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
exports.EchoRoute = EchoRoute;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, '__esModule', {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
var history = require('../../../node_modules/history/esm/history.js');
|
|
10
|
-
|
|
11
|
-
var React = require('react');
|
|
12
|
-
|
|
13
|
-
var reactRouterDom = require('react-router-dom');
|
|
14
|
-
|
|
15
|
-
function _interopDefaultLegacy(e) {
|
|
16
|
-
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
17
|
-
'default': e
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
|
-
|
|
23
|
-
var EchoRouter = function EchoRouter(_ref) {
|
|
24
|
-
var children = _ref.children;
|
|
25
|
-
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Router, {
|
|
26
|
-
history: history.createBrowserHistory()
|
|
27
|
-
}, children));
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
exports.EchoRouter = EchoRouter;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, '__esModule', {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
var EchoCore = require('@equinor/echo-core');
|
|
10
|
-
|
|
11
|
-
var React = require('react');
|
|
12
|
-
|
|
13
|
-
var eventHandlerUtils = require('../../utils/eventHandlerUtils.js');
|
|
14
|
-
|
|
15
|
-
function _interopDefaultLegacy(e) {
|
|
16
|
-
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
17
|
-
'default': e
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
|
-
|
|
23
|
-
var EchoWrapper = function EchoWrapper(_ref) {
|
|
24
|
-
var children = _ref.children,
|
|
25
|
-
path = _ref.path;
|
|
26
|
-
var key = eventHandlerUtils.getKeyFromPath(path);
|
|
27
|
-
React.useEffect(function () {
|
|
28
|
-
EchoCore.setActiveModulePanels(key);
|
|
29
|
-
}, [key]);
|
|
30
|
-
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, children);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
exports.EchoWrapper = EchoWrapper;
|