@equinor/echo-framework 0.9.13 → 0.9.16

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.
Files changed (207) hide show
  1. package/dist/components/appLinks/applinkUtils.d.ts +2 -0
  2. package/dist/components/appLinks/applinkUtils.test.d.ts +1 -0
  3. package/dist/components/containers/layouts.d.ts +5 -3
  4. package/dist/components/panel/corePanelLeft.d.ts +1 -4
  5. package/dist/components/panel/corePanelRight.d.ts +1 -4
  6. package/dist/components/router/echoRoute.d.ts +2 -2
  7. package/dist/components/router/index.d.ts +1 -0
  8. package/dist/components/router/useLayout.d.ts +3 -0
  9. package/dist/coreApplication/index.d.ts +0 -2
  10. package/dist/hooks/index.d.ts +0 -2
  11. package/dist/index.d.ts +0 -8
  12. package/dist/index.js +3 -0
  13. package/dist/types/eventTypes/legendEvent.d.ts +1 -1
  14. package/dist/types/hookLibrary.d.ts +0 -1
  15. package/package.json +43 -39
  16. package/dist/_virtual/_tslib.js +0 -67
  17. package/dist/_virtual/index.js +0 -9
  18. package/dist/coreApplication/EchoBarComponent.d.ts +0 -9
  19. package/dist/coreApplication/EchoUserInterfaceContextProvider.d.ts +0 -11
  20. package/dist/hooks/useIsCompactLayout.d.ts +0 -5
  21. package/dist/hooks/useScreenOrientation.d.ts +0 -5
  22. package/dist/hooks/useScreenValues.d.ts +0 -13
  23. package/dist/hooks/useWindowSize.d.ts +0 -9
  24. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +0 -25
  25. package/dist/node_modules/@equinor/eds-icons/dist/icons.esm.js +0 -5285
  26. package/dist/node_modules/@microsoft/signalr/dist/esm/AbortController.js +0 -54
  27. package/dist/node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js +0 -96
  28. package/dist/node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js +0 -47
  29. package/dist/node_modules/@microsoft/signalr/dist/esm/Errors.js +0 -287
  30. package/dist/node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js +0 -283
  31. package/dist/node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js +0 -86
  32. package/dist/node_modules/@microsoft/signalr/dist/esm/HeaderNames.js +0 -20
  33. package/dist/node_modules/@microsoft/signalr/dist/esm/HttpClient.js +0 -82
  34. package/dist/node_modules/@microsoft/signalr/dist/esm/HttpConnection.js +0 -1169
  35. package/dist/node_modules/@microsoft/signalr/dist/esm/HubConnection.js +0 -1346
  36. package/dist/node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js +0 -165
  37. package/dist/node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js +0 -33
  38. package/dist/node_modules/@microsoft/signalr/dist/esm/ILogger.js +0 -37
  39. package/dist/node_modules/@microsoft/signalr/dist/esm/ITransport.js +0 -37
  40. package/dist/node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js +0 -179
  41. package/dist/node_modules/@microsoft/signalr/dist/esm/Loggers.js +0 -35
  42. package/dist/node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js +0 -448
  43. package/dist/node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js +0 -238
  44. package/dist/node_modules/@microsoft/signalr/dist/esm/Subject.js +0 -99
  45. package/dist/node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js +0 -45
  46. package/dist/node_modules/@microsoft/signalr/dist/esm/Utils.js +0 -435
  47. package/dist/node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js +0 -264
  48. package/dist/node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js +0 -133
  49. package/dist/node_modules/classnames/index.js +0 -67
  50. package/dist/node_modules/history/esm/history.js +0 -498
  51. package/dist/node_modules/resolve-pathname/esm/resolve-pathname.js +0 -73
  52. package/dist/node_modules/style-inject/dist/style-inject.es.js +0 -36
  53. package/dist/node_modules/tiny-invariant/dist/tiny-invariant.esm.js +0 -23
  54. package/dist/node_modules/tiny-warning/dist/tiny-warning.esm.js +0 -26
  55. package/dist/src/components/appLinks/AppLinks.js +0 -38
  56. package/dist/src/components/appLinks/AppLinks.module.css.js +0 -14
  57. package/dist/src/components/appLinks/linkButton/linkButton.js +0 -45
  58. package/dist/src/components/containers/layout.module.css.js +0 -29
  59. package/dist/src/components/containers/layouts.js +0 -101
  60. package/dist/src/components/contextualAppLinks/contextualAppLinks.context.js +0 -20
  61. package/dist/src/components/contextualAppLinks/contextualAppLinks.js +0 -47
  62. package/dist/src/components/contextualAppLinks/externalAppsMenu.js +0 -157
  63. package/dist/src/components/contextualAppLinks/externalAppsMenu.module.css.js +0 -16
  64. package/dist/src/components/contextualAppLinks/externalLinkButtons/allExternalLinks.js +0 -127
  65. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.js +0 -169
  66. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToCommApp.js +0 -95
  67. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToMcApp.js +0 -95
  68. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToProCoSys.js +0 -84
  69. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSafeX.js +0 -38
  70. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSap.js +0 -110
  71. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSemiDoc.js +0 -59
  72. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToStid.js +0 -40
  73. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.js +0 -114
  74. package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.js +0 -44
  75. package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.module.css.js +0 -15
  76. package/dist/src/components/contextualAppLinks/hooks/useContextualAppLinks.js +0 -52
  77. package/dist/src/components/contextualAppLinks/hooks/useContextualAppLinksContext.js +0 -36
  78. package/dist/src/components/contextualAppLinks/index.js +0 -22
  79. package/dist/src/components/contextualAppLinks/internalAppLinks.js +0 -115
  80. package/dist/src/components/contextualAppLinks/linkButton.js +0 -57
  81. package/dist/src/components/echoLogo/echoLogo.js +0 -30
  82. package/dist/src/components/echoLogo/echoLogo.module.css.js +0 -15
  83. package/dist/src/components/errorBoundary/components/chunkLoadErrorMessage.js +0 -64
  84. package/dist/src/components/errorBoundary/components/chunkLoadErrorMessage.module.css.js +0 -17
  85. package/dist/src/components/errorBoundary/components/errorBoundaryBaseMessage.js +0 -85
  86. package/dist/src/components/errorBoundary/components/errorBoundaryBaseMessage.module.css.js +0 -19
  87. package/dist/src/components/errorBoundary/components/notificationCardWithLogo.js +0 -55
  88. package/dist/src/components/errorBoundary/components/notificationCardWithLogo.module.css.js +0 -19
  89. package/dist/src/components/errorBoundary/errorBoundary.js +0 -100
  90. package/dist/src/components/externalLinkButton/externalLinkButton.js +0 -310
  91. package/dist/src/components/externalLinkButton/externalLinkButton.module.css.js +0 -23
  92. package/dist/src/components/footer/footer.js +0 -42
  93. package/dist/src/components/footer/footer.module.css.js +0 -17
  94. package/dist/src/components/lazyLoading/appLoadingIndicator.js +0 -34
  95. package/dist/src/components/lazyLoading/appLoadingIndicator.module.css.js +0 -15
  96. package/dist/src/components/lazyLoading/lazyLoadedAppWrapper.js +0 -40
  97. package/dist/src/components/mediator/mediator.js +0 -32
  98. package/dist/src/components/pageMenu/Navigation/applicationList.js +0 -35
  99. package/dist/src/components/pageMenu/Navigation/applicationList.module.css.js +0 -17
  100. package/dist/src/components/pageMenu/accordionItem.module.css.js +0 -16
  101. package/dist/src/components/pageMenu/defaultAccordionItem.js +0 -61
  102. package/dist/src/components/pageMenu/pageMenu.js +0 -141
  103. package/dist/src/components/pageMenu/pageMenu.module.css.js +0 -17
  104. package/dist/src/components/pageMenu/pageMenuDrawerItem.js +0 -77
  105. package/dist/src/components/pageMenu/pageMenuDrawerItem.module.css.js +0 -20
  106. package/dist/src/components/pageMenu/settings/asset.js +0 -40
  107. package/dist/src/components/pageMenu/settings/profile.js +0 -62
  108. package/dist/src/components/pageMenu/settings/settings.js +0 -41
  109. package/dist/src/components/pageMenu/settings/settings.module.css.js +0 -25
  110. package/dist/src/components/pageMenu/version/version.js +0 -88
  111. package/dist/src/components/pageMenu/version/version.module.css.js +0 -14
  112. package/dist/src/components/panel/corePanelIcon.js +0 -31
  113. package/dist/src/components/panel/corePanelLeft.js +0 -94
  114. package/dist/src/components/panel/corePanelLeft.module.css.js +0 -21
  115. package/dist/src/components/panel/corePanelRight.js +0 -98
  116. package/dist/src/components/panel/corePanelRight.module.css.js +0 -18
  117. package/dist/src/components/panelButton/panelButton.js +0 -124
  118. package/dist/src/components/panelButton/panelButton.module.css.js +0 -25
  119. package/dist/src/components/plantSelector/plantSelector.js +0 -137
  120. package/dist/src/components/projectSelector/ProcosysProjectSelector.js +0 -115
  121. package/dist/src/components/projectSelector/ProcosysProjectSelector.module.css.js +0 -14
  122. package/dist/src/components/realTimeData/RealTimePopoverButton.js +0 -168
  123. package/dist/src/components/realTimeData/components/IMSDropdown/RealTimeIMSDropdown.js +0 -83
  124. package/dist/src/components/realTimeData/components/IMSDropdown/RealTimeIMSDropdown.module.css.js +0 -15
  125. package/dist/src/components/realTimeData/components/connectorForIMSTag/IMSConnector.module.css.js +0 -17
  126. package/dist/src/components/realTimeData/components/connectorForIMSTag/RealTimeConnectorForIMSTag.js +0 -149
  127. package/dist/src/components/realTimeData/components/contextButton/RealTimeContextButton.js +0 -75
  128. package/dist/src/components/realTimeData/components/contextButton/RealTimeContextButton.module.css.js +0 -15
  129. package/dist/src/components/realTimeData/components/contextPopover/Popover.js +0 -37
  130. package/dist/src/components/realTimeData/components/contextPopover/Popover.module.css.js +0 -15
  131. package/dist/src/components/realTimeData/hooks/useRealTimeHub.js +0 -124
  132. package/dist/src/components/realTimeData/hooks/useSignalR.js +0 -175
  133. package/dist/src/components/realTimeData/hooks/useSignalRListener.js +0 -22
  134. package/dist/src/components/router/echoRoute.js +0 -51
  135. package/dist/src/components/router/echoRouter.js +0 -30
  136. package/dist/src/components/router/echoWrapper.js +0 -33
  137. package/dist/src/components/router/routes.js +0 -43
  138. package/dist/src/components/searchMenu/searchMenu.js +0 -46
  139. package/dist/src/components/searchMenu/searchMenu.module.css.js +0 -16
  140. package/dist/src/components/tagNumber/tagNo.module.css.js +0 -14
  141. package/dist/src/components/tagNumber/tagNumber.js +0 -38
  142. package/dist/src/components/toaster/toaster.js +0 -44
  143. package/dist/src/components/toaster/toaster.module.css.js +0 -16
  144. package/dist/src/components/toaster/toasters.js +0 -101
  145. package/dist/src/coreApplication/EchoBarComponent.js +0 -164
  146. package/dist/src/coreApplication/EchoContent.js +0 -52
  147. package/dist/src/coreApplication/EchoContent.module.css.js +0 -17
  148. package/dist/src/coreApplication/EchoContentPanels.js +0 -40
  149. package/dist/src/coreApplication/EchoEventHandler.js +0 -79
  150. package/dist/src/coreApplication/EchoEventHandler.module.css.js +0 -14
  151. package/dist/src/coreApplication/EchoUserInterfaceContextProvider.js +0 -66
  152. package/dist/src/globalStyles.css.js +0 -6
  153. package/dist/src/hooks/hookLibrary.js +0 -86
  154. package/dist/src/hooks/index.js +0 -18
  155. package/dist/src/hooks/useEchoHistory.js +0 -38
  156. package/dist/src/hooks/useIsCompactLayout.js +0 -50
  157. package/dist/src/hooks/useLongPress.js +0 -37
  158. package/dist/src/hooks/useScreenOrientation.js +0 -62
  159. package/dist/src/hooks/useScreenValues.js +0 -35
  160. package/dist/src/hooks/useSemi.js +0 -100
  161. package/dist/src/hooks/useTagDetails.js +0 -153
  162. package/dist/src/hooks/useWindowSize.js +0 -62
  163. package/dist/src/icons/common/CommissionApp-icon.png.js +0 -7
  164. package/dist/src/icons/common/Evision.svg.js +0 -68
  165. package/dist/src/icons/common/Fusion.svg.js +0 -111
  166. package/dist/src/icons/common/McApp.svg.js +0 -70
  167. package/dist/src/icons/common/Notification.svg.js +0 -81
  168. package/dist/src/icons/common/ProCoSysIcon.svg.js +0 -68
  169. package/dist/src/icons/common/Robim.svg.js +0 -66
  170. package/dist/src/icons/common/SX-logo.png.js +0 -7
  171. package/dist/src/icons/common/SapLogo.svg.js +0 -95
  172. package/dist/src/icons/common/SemiIcon.svg.js +0 -82
  173. package/dist/src/icons/common/Stid.svg.js +0 -65
  174. package/dist/src/icons/common/TR2000.svg.js +0 -73
  175. package/dist/src/icons/common/WorkOrder.svg.js +0 -71
  176. package/dist/src/icons/common/Yammer.svg.js +0 -65
  177. package/dist/src/icons/common/satos-logo.png.js +0 -7
  178. package/dist/src/icons/edsIons.js +0 -15
  179. package/dist/src/icons/equinor-logo.js +0 -62
  180. package/dist/src/icons/logo_ee.js +0 -37
  181. package/dist/src/icons/search.js +0 -35
  182. package/dist/src/index.js +0 -218
  183. package/dist/src/index2.js +0 -205
  184. package/dist/src/services/api/api-manager.js +0 -190
  185. package/dist/src/services/api/api-plantinfo.js +0 -196
  186. package/dist/src/services/api/api-plants.js +0 -75
  187. package/dist/src/services/api/api-realtimedata.js +0 -55
  188. package/dist/src/services/api/api-tag-details.js +0 -69
  189. package/dist/src/services/api/api-tags.js +0 -88
  190. package/dist/src/services/api/api-version.js +0 -124
  191. package/dist/src/services/componentRegistry/componentRegistry.js +0 -69
  192. package/dist/src/services/echopediaAnalyticsModule/echopediaAnalyticsModule.js +0 -10
  193. package/dist/src/services/eventCallbacks/plantChanged.js +0 -42
  194. package/dist/src/services/eventHubActions/toastActions.js +0 -18
  195. package/dist/src/theme/themeConst.js +0 -75
  196. package/dist/src/types/extensions.js +0 -10
  197. package/dist/src/types/legend.js +0 -58
  198. package/dist/src/types/pingableSources.js +0 -11
  199. package/dist/src/utils/copyText.js +0 -67
  200. package/dist/src/utils/eventHandlerUtils.js +0 -11
  201. package/dist/src/utils/legendUtils.js +0 -168
  202. package/dist/src/utils/navigationUtils.js +0 -28
  203. package/dist/src/utils/plantInfo.js +0 -535
  204. package/dist/src/utils/plantsDataUtils.js +0 -35
  205. package/dist/src/utils/projectSelectorUtils.js +0 -19
  206. package/dist/src/utils/startup.js +0 -89
  207. package/dist/src/utils/taskCache.js +0 -89
@@ -1,79 +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 echoBase = require('@equinor/echo-base');
10
-
11
- var EchoCore = require('@equinor/echo-core');
12
-
13
- var React = require('react');
14
-
15
- var reactRouterDom = require('react-router-dom');
16
-
17
- var useLongPress = require('../hooks/useLongPress.js');
18
-
19
- var plantChanged = require('../services/eventCallbacks/plantChanged.js');
20
-
21
- var copyText = require('../utils/copyText.js');
22
-
23
- var eventHandlerUtils = require('../utils/eventHandlerUtils.js');
24
-
25
- var EchoEventHandler_module = require('./EchoEventHandler.module.css.js');
26
-
27
- function _interopDefaultLegacy(e) {
28
- return e && _typeof(e) === 'object' && 'default' in e ? e : {
29
- 'default': e
30
- };
31
- }
32
-
33
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
34
- /**
35
- * Wrapper component for listening to events.
36
- * @param {EchoEventHandlerProps} { children }
37
- * @return {*}
38
- */
39
-
40
-
41
- var EchoEventHandler = function EchoEventHandler(_ref) {
42
- var children = _ref.children;
43
- var history = reactRouterDom.useHistory();
44
- var touchEvents = useLongPress.useLongPress(copyText.copyText, 800);
45
- React.useEffect(function () {
46
- var unsubscribe = echoBase.eventHub.subscribe(EchoCore.EchoEvents.PlantChanged, function (plantEvent) {
47
- plantChanged.handlePlantChanged(plantEvent.selectedPlant, history, plantEvent.stayOnPath);
48
- });
49
- return function () {
50
- unsubscribe();
51
- };
52
- });
53
- React.useEffect(function () {
54
- document.addEventListener('contextmenu', copyText.copyText);
55
- return function () {
56
- document.removeEventListener('contextmenu', copyText.copyText);
57
- };
58
- }, []);
59
- React.useEffect(function () {
60
- if (!history) {
61
- console.error('No react history found!', history);
62
- return;
63
- }
64
-
65
- var unListen = history.listen(function (location) {
66
- var pathname = location.pathname;
67
- var pathKey = eventHandlerUtils.getKeyFromPath(pathname);
68
- EchoCore.setActiveModulePanels(pathKey);
69
- });
70
- return function () {
71
- unListen();
72
- };
73
- }, [history]);
74
- return /*#__PURE__*/React__default["default"].createElement("div", Object.assign({
75
- className: EchoEventHandler_module["default"].echoEventContainer
76
- }, touchEvents), children);
77
- };
78
-
79
- exports.EchoEventHandler = EchoEventHandler;
@@ -1,14 +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 = ".EchoEventHandler-module_echoEventContainer__zFKRh{height:100%}";
10
- var style = {
11
- "echoEventContainer": "EchoEventHandler-module_echoEventContainer__zFKRh"
12
- };
13
- styleInject_es["default"](css_248z);
14
- exports["default"] = style;
@@ -1,66 +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 React = require('react');
22
-
23
- function _interopDefaultLegacy(e) {
24
- return e && _typeof(e) === 'object' && 'default' in e ? e : {
25
- 'default': e
26
- };
27
- }
28
-
29
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
30
-
31
- var EchoUiContext = /*#__PURE__*/React__default["default"].createContext({
32
- activeAppMenuItem: '',
33
- // eslint-disable-next-line @typescript-eslint/no-unused-vars -- need to match interface
34
- updateActiveAppMenuItem: function updateActiveAppMenuItem(newActiveAppMenuItem) {
35
- throw new Error('Echo UI Context not initialized');
36
- }
37
- });
38
-
39
- var useEchoUiContext = function useEchoUiContext() {
40
- return React__default["default"].useContext(EchoUiContext);
41
- };
42
-
43
- var EchoUiContextProvider = function EchoUiContextProvider(_ref) {
44
- var children = _ref.children;
45
-
46
- var _React__default$defau = React__default["default"].useState(''),
47
- _React__default$defau2 = _slicedToArray(_React__default$defau, 2),
48
- activeAppMenuItem = _React__default$defau2[0],
49
- setActiveAppMenuItem = _React__default$defau2[1];
50
-
51
- var updateActiveAppMenuItem = React__default["default"].useCallback(function (newActiveAppMenuItem) {
52
- return setActiveAppMenuItem(newActiveAppMenuItem);
53
- }, []);
54
- var value = React__default["default"].useMemo(function () {
55
- return {
56
- activeAppMenuItem: activeAppMenuItem,
57
- updateActiveAppMenuItem: updateActiveAppMenuItem
58
- };
59
- }, [activeAppMenuItem, updateActiveAppMenuItem]);
60
- return /*#__PURE__*/React__default["default"].createElement(EchoUiContext.Provider, {
61
- value: value
62
- }, children);
63
- };
64
-
65
- exports.EchoUiContextProvider = EchoUiContextProvider;
66
- exports.useEchoUiContext = useEchoUiContext;
@@ -1,6 +0,0 @@
1
- 'use strict';
2
-
3
- var styleInject_es = require('../node_modules/style-inject/dist/style-inject.es.js');
4
-
5
- var css_248z = ":root{--echo-framework-z-level-panel-left:500;--echo-framework-z-level-panel-main:550;--echo-framework-z-level-bottom-bar:1500;--echo-framework-z-level-scrim:1450}[class^=Scrim__StyledScrim]{z-index:var(--echo-framework-z-level-scrim)!important}";
6
- styleInject_es["default"](css_248z);
@@ -1,86 +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
- function _interopDefaultLegacy(e) {
12
- return e && _typeof(e) === 'object' && 'default' in e ? e : {
13
- 'default': e
14
- };
15
- }
16
-
17
- var EchoCore__default = /*#__PURE__*/_interopDefaultLegacy(EchoCore);
18
-
19
- exports.RegisteredHookName = void 0;
20
-
21
- (function (RegisteredHookName) {
22
- RegisteredHookName["useSetActiveTagNo"] = "useSetActiveTagNo";
23
- RegisteredHookName["useContextMenuDataInfo"] = "useContextMenuDataInfo";
24
- RegisteredHookName["useTagData"] = "useTagData";
25
- RegisteredHookName["useIsContextMenuInfoLoading"] = "useIsContextMenuInfoLoading";
26
- RegisteredHookName["useSetActiveCommPackNo"] = "useSetActiveCommPackNo";
27
- RegisteredHookName["useSetActiveMcPackNo"] = "useSetActiveMcPackNo";
28
- })(exports.RegisteredHookName || (exports.RegisteredHookName = {}));
29
-
30
- var HookLibrary = Object.freeze({
31
- /**
32
- * Hook for setting the selected tag application wide.
33
- * @returns {SetActiveTagNo}
34
- */
35
- useSetActiveTagNo: function useSetActiveTagNo() {
36
- return EchoCore__default["default"].echoHookRegistry.getHookByName(exports.RegisteredHookName.useSetActiveTagNo)();
37
- },
38
-
39
- /**
40
- * Hook used for getting additional information for a given tag, like: docs, checklists, work orders etc. in an array of DataInformation type structure.
41
- * Usually used together with a context menu for a tag, to show an overview of the tag and all related items.
42
- * @param tagNo {string} the tag number
43
- * @param expanded {boolean} flag for indicating if the context menu is expanded or not
44
- * @param setActivePanel {callback function} Function to call when the context menu's "i" button is clicked
45
- * @returns {DataInformation[]}
46
- */
47
- useContextMenuDataInfo: function useContextMenuDataInfo(tagNo, expanded, setActivePanel) {
48
- return EchoCore__default["default"].echoHookRegistry.getHookByName(exports.RegisteredHookName.useContextMenuDataInfo)(tagNo, expanded, setActivePanel);
49
- },
50
-
51
- /**
52
- * Fetches tag details and documents and sets it in `tag` data in echopediaWeb redux store.
53
- * The following will be fetchted and set only, if the webApp is configured to store these as well:
54
- * tag notifications, work orders, proCoSys punches and proCoSys Checklists.
55
- * EchopediaWeb uses these data to display tag details, documents etc. in the search (left hand side) panel when an active tag is opened.
56
- * @returns {TagData}
57
- */
58
- useTagData: function useTagData() {
59
- return EchoCore__default["default"].echoHookRegistry.getHookByName(exports.RegisteredHookName.useTagData)();
60
- },
61
-
62
- /**
63
- * Getting loading status for context menu,
64
- * @returns {boolean}
65
- */
66
- useIsContextMenuInfoLoading: function useIsContextMenuInfoLoading() {
67
- return EchoCore__default["default"].echoHookRegistry.getHookByName(exports.RegisteredHookName.useIsContextMenuInfoLoading)();
68
- },
69
-
70
- /**
71
- * Hook for setting the selected commPack and opening the search left side menu.
72
- * @returns {SetActiveCommPackNo}
73
- */
74
- useSetActiveCommPackNo: function useSetActiveCommPackNo() {
75
- return EchoCore__default["default"].echoHookRegistry.getHookByName(exports.RegisteredHookName.useSetActiveCommPackNo)();
76
- },
77
-
78
- /**
79
- * Hook for setting the selected mcPack and opening the search left side menu.
80
- * @returns {SetActiveMcPackNo}
81
- */
82
- useSetActiveMcPackNo: function useSetActiveMcPackNo() {
83
- return EchoCore__default["default"].echoHookRegistry.getHookByName(exports.RegisteredHookName.useSetActiveMcPackNo)();
84
- }
85
- });
86
- exports.HookLibrary = HookLibrary;
@@ -1,18 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- });
6
-
7
- var useEchoHistory = require('./useEchoHistory.js');
8
-
9
- var useScreenOrientation = require('./useScreenOrientation.js');
10
-
11
- var useScreenValues = require('./useScreenValues.js');
12
-
13
- var useTagDetails = require('./useTagDetails.js');
14
-
15
- exports.useEchoHistory = useEchoHistory.useEchoHistory;
16
- exports.useScreenOrientation = useScreenOrientation.useScreenOrientation;
17
- exports.useScreenValues = useScreenValues.useScreenValues;
18
- exports.useTagDetails = useTagDetails.useTagDetails;
@@ -1,38 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- });
6
-
7
- var EchoCore = require('@equinor/echo-core');
8
-
9
- var React = require('react');
10
-
11
- var reactRouterDom = require('react-router-dom');
12
- /* eslint-disable @typescript-eslint/no-explicit-any */
13
-
14
- /**
15
- * Hook returns a Echo compliant push function for the browser history
16
- * Which supports deeplinking functionality via EchoHistoryParams and forces to use instCode.
17
- * @returns {EchoHistory} a history push function
18
- */
19
-
20
-
21
- function useEchoHistory() {
22
- var history = reactRouterDom.useHistory();
23
- var selectedInstCode = EchoCore.useInstCode();
24
- var pushHistory = React.useCallback(function (path, params, state) {
25
- state ? history.push(path, state) : history.push(path); //Always set instCode parameter.
26
-
27
- if (!(params === null || params === void 0 ? void 0 : params.hasOwnProperty(EchoCore.DeepLinkParameters.InstCode))) {
28
- EchoCore.setDeepLinkParams(EchoCore.DeepLinkParameters.InstCode, selectedInstCode);
29
- }
30
-
31
- params && Object.keys(params).forEach(function (key) {
32
- EchoCore.setDeepLinkParams(key, params[key]);
33
- });
34
- }, [history, selectedInstCode]);
35
- return pushHistory;
36
- }
37
-
38
- exports.useEchoHistory = useEchoHistory;
@@ -1,50 +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
- Object.defineProperty(exports, '__esModule', {
16
- value: true
17
- });
18
-
19
- var React = require('react');
20
-
21
- var useWindowSize = require('./useWindowSize.js');
22
- /**
23
- * Hook for checking if the current size of the browser window is mobile size.
24
- * @returns {boolean} If the current screen is below threshold or not.
25
- */
26
-
27
-
28
- function useIsCompactLayout(isLandscape) {
29
- var windowSize = useWindowSize.useWindowSize();
30
-
31
- var _React$useState = React.useState(false),
32
- _React$useState2 = _slicedToArray(_React$useState, 2),
33
- isMobileWidth = _React$useState2[0],
34
- setIsMobileWidth = _React$useState2[1]; //This calculation is connected to the viewport metatag in index.html
35
-
36
-
37
- var scaledClientWidth = windowSize.width * 0.86;
38
- var roundedClientWidth = Math.ceil(scaledClientWidth);
39
- var smallScreenPortrait = roundedClientWidth < 768 && !isLandscape;
40
- var smallScreenLandscape = roundedClientWidth < 928 && isLandscape;
41
- var isCurrentSizeSmall = smallScreenLandscape || smallScreenPortrait;
42
-
43
- if (isMobileWidth !== isCurrentSizeSmall) {
44
- setIsMobileWidth(isCurrentSizeSmall);
45
- }
46
-
47
- return isMobileWidth;
48
- }
49
-
50
- exports.useIsCompactLayout = useIsCompactLayout;
@@ -1,37 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- });
6
-
7
- var React = require('react'); // https://stackoverflow.com/questions/48048957/react-long-press-event
8
-
9
-
10
- function useLongPress(onLongPress) {
11
- var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
12
- var timeout = React.useRef();
13
-
14
- var start = function start(event) {
15
- timeout.current = setTimeout(function () {
16
- onLongPress(event);
17
- }, delay);
18
- };
19
-
20
- var clear = function clear() {
21
- timeout.current && clearTimeout(timeout.current);
22
- };
23
-
24
- return {
25
- onTouchStart: function onTouchStart(e) {
26
- return start(e);
27
- },
28
- onTouchMove: function onTouchMove() {
29
- return clear();
30
- },
31
- onTouchEnd: function onTouchEnd() {
32
- return clear();
33
- }
34
- };
35
- }
36
-
37
- exports.useLongPress = useLongPress;
@@ -1,62 +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 EchoUtils = require('@equinor/echo-utils');
22
-
23
- var React = require('react');
24
-
25
- function _interopDefaultLegacy(e) {
26
- return e && _typeof(e) === 'object' && 'default' in e ? e : {
27
- 'default': e
28
- };
29
- }
30
-
31
- var EchoUtils__default = /*#__PURE__*/_interopDefaultLegacy(EchoUtils);
32
- /**
33
- * @returns {ScreenOrientation}
34
- */
35
-
36
-
37
- function useScreenOrientation() {
38
- var useStateSafe = EchoUtils__default["default"].Hooks.useStateSafe;
39
-
40
- var _useStateSafe = useStateSafe(undefined),
41
- _useStateSafe2 = _slicedToArray(_useStateSafe, 2),
42
- orientation = _useStateSafe2[0],
43
- setOrientation = _useStateSafe2[1];
44
-
45
- var updateOrientation = React.useCallback(function () {
46
- if (document.documentElement.clientWidth > document.documentElement.clientHeight) {
47
- setOrientation('landscape');
48
- } else {
49
- setOrientation('portrait');
50
- }
51
- }, [setOrientation]);
52
- React.useEffect(function () {
53
- updateOrientation();
54
- window.addEventListener('resize', updateOrientation);
55
- return function () {
56
- window.removeEventListener('resize', updateOrientation);
57
- };
58
- }, [updateOrientation]);
59
- return orientation;
60
- }
61
-
62
- exports.useScreenOrientation = useScreenOrientation;
@@ -1,35 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- });
6
-
7
- require('@equinor/echo-core');
8
-
9
- require('react');
10
-
11
- require('react-router-dom');
12
-
13
- var useScreenOrientation = require('./useScreenOrientation.js');
14
-
15
- var useIsCompactLayout = require('./useIsCompactLayout.js');
16
-
17
- require('@equinor/echo-utils');
18
-
19
- require('@equinor/echo-base');
20
-
21
- require('@equinor/echo-search');
22
-
23
- require('../services/echopediaAnalyticsModule/echopediaAnalyticsModule.js');
24
-
25
- function useScreenValues() {
26
- var screenOrientation = useScreenOrientation.useScreenOrientation();
27
- var isLandscape = screenOrientation === 'landscape';
28
- var isScreenMobileSize = useIsCompactLayout.useIsCompactLayout(isLandscape);
29
- return {
30
- isScreenMobileSize: isScreenMobileSize,
31
- screenOrientation: screenOrientation
32
- };
33
- }
34
-
35
- exports.useScreenValues = useScreenValues;
@@ -1,100 +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 EchoUtils = require('@equinor/echo-utils');
22
-
23
- var React = require('react');
24
-
25
- var useTagDetails = require('./useTagDetails.js');
26
-
27
- function _interopDefaultLegacy(e) {
28
- return e && _typeof(e) === 'object' && 'default' in e ? e : {
29
- 'default': e
30
- };
31
- }
32
-
33
- var EchoUtils__default = /*#__PURE__*/_interopDefaultLegacy(EchoUtils);
34
- /**
35
- * Provides information about Semi document for a given tag.
36
- *
37
- * @param {{ tagNo: string; instCode: string }} params
38
- * @param {string} params.tagNo The given tag's number.
39
- * @param {string} params.instCode Plant's inst code.
40
- * @returns {Semi} object
41
- * @returns {boolean} object.isSemiDocumentAvailable - Will be set to true if the tag has Semi document.
42
- * @returns {string} object.semiDocumentId - If there's a document for the given tag, this will be set.
43
- * @returns {boolean} object.isSemiLoading - Indicates if Semi is performing an API call (to get tag details)
44
- */
45
-
46
-
47
- function useSemi(_ref) {
48
- var tagNo = _ref.tagNo,
49
- instCode = _ref.instCode;
50
-
51
- var _useTagDetails$useTag = useTagDetails.useTagDetails({
52
- tagNo: tagNo,
53
- instCode: instCode
54
- }),
55
- tagDetails = _useTagDetails$useTag.tagDetails,
56
- isTagDetailsLoading = _useTagDetails$useTag.isTagDetailsLoading,
57
- hasError = _useTagDetails$useTag.hasError;
58
-
59
- var _React$useState = React.useState(false),
60
- _React$useState2 = _slicedToArray(_React$useState, 2),
61
- isSemiDocumentAvailable = _React$useState2[0],
62
- setIsSemiDocumentAvailable = _React$useState2[1];
63
-
64
- var _React$useState3 = React.useState(false),
65
- _React$useState4 = _slicedToArray(_React$useState3, 2),
66
- isSemiLoading = _React$useState4[0],
67
- setIsSemiLoading = _React$useState4[1];
68
-
69
- var _React$useState5 = React.useState(''),
70
- _React$useState6 = _slicedToArray(_React$useState5, 2),
71
- semiDocumentId = _React$useState6[0],
72
- setSemiDocumentId = _React$useState6[1];
73
-
74
- React.useEffect(function () {
75
- var additionalTagDetailsFields = tagDetails === null || tagDetails === void 0 ? void 0 : tagDetails.additionalFields;
76
-
77
- if (Array.isArray(additionalTagDetailsFields) && additionalTagDetailsFields.length > 0) {
78
- var semi = additionalTagDetailsFields.find(function (field) {
79
- return field.type === 'SMI';
80
- });
81
-
82
- if (semi) {
83
- setIsSemiDocumentAvailable(true);
84
- setSemiDocumentId(semi.value);
85
- }
86
- }
87
- }, [tagDetails, hasError]);
88
- EchoUtils__default["default"].Hooks.useEffectAsync(function (signal) {
89
- if (!signal.aborted) {
90
- setIsSemiLoading(isTagDetailsLoading);
91
- }
92
- }, [isTagDetailsLoading]);
93
- return {
94
- isSemiDocumentAvailable: isSemiDocumentAvailable,
95
- semiDocumentId: semiDocumentId,
96
- isSemiLoading: isSemiLoading
97
- };
98
- }
99
-
100
- exports.useSemi = useSemi;