@equinor/echo-framework 0.9.11 → 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.
Files changed (182) 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/index.js +3 -0
  4. package/package.json +42 -39
  5. package/dist/_virtual/_tslib.js +0 -67
  6. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +0 -25
  7. package/dist/node_modules/@equinor/eds-icons/dist/icons.esm.js +0 -5285
  8. package/dist/node_modules/@microsoft/signalr/dist/esm/AbortController.js +0 -54
  9. package/dist/node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js +0 -96
  10. package/dist/node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js +0 -47
  11. package/dist/node_modules/@microsoft/signalr/dist/esm/Errors.js +0 -287
  12. package/dist/node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js +0 -283
  13. package/dist/node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js +0 -86
  14. package/dist/node_modules/@microsoft/signalr/dist/esm/HeaderNames.js +0 -20
  15. package/dist/node_modules/@microsoft/signalr/dist/esm/HttpClient.js +0 -82
  16. package/dist/node_modules/@microsoft/signalr/dist/esm/HttpConnection.js +0 -1169
  17. package/dist/node_modules/@microsoft/signalr/dist/esm/HubConnection.js +0 -1346
  18. package/dist/node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js +0 -165
  19. package/dist/node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js +0 -33
  20. package/dist/node_modules/@microsoft/signalr/dist/esm/ILogger.js +0 -37
  21. package/dist/node_modules/@microsoft/signalr/dist/esm/ITransport.js +0 -37
  22. package/dist/node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js +0 -179
  23. package/dist/node_modules/@microsoft/signalr/dist/esm/Loggers.js +0 -35
  24. package/dist/node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js +0 -448
  25. package/dist/node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js +0 -238
  26. package/dist/node_modules/@microsoft/signalr/dist/esm/Subject.js +0 -99
  27. package/dist/node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js +0 -45
  28. package/dist/node_modules/@microsoft/signalr/dist/esm/Utils.js +0 -435
  29. package/dist/node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js +0 -264
  30. package/dist/node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js +0 -133
  31. package/dist/node_modules/history/esm/history.js +0 -498
  32. package/dist/node_modules/resolve-pathname/esm/resolve-pathname.js +0 -73
  33. package/dist/node_modules/style-inject/dist/style-inject.es.js +0 -36
  34. package/dist/node_modules/tiny-invariant/dist/tiny-invariant.esm.js +0 -23
  35. package/dist/node_modules/tiny-warning/dist/tiny-warning.esm.js +0 -26
  36. package/dist/src/components/appLinks/AppLinks.js +0 -38
  37. package/dist/src/components/appLinks/AppLinks.module.css.js +0 -14
  38. package/dist/src/components/appLinks/linkButton/linkButton.js +0 -45
  39. package/dist/src/components/containers/layout.module.css.js +0 -25
  40. package/dist/src/components/containers/layouts.js +0 -62
  41. package/dist/src/components/contextualAppLinks/contextualAppLinks.context.js +0 -20
  42. package/dist/src/components/contextualAppLinks/contextualAppLinks.js +0 -47
  43. package/dist/src/components/contextualAppLinks/externalAppsMenu.js +0 -157
  44. package/dist/src/components/contextualAppLinks/externalAppsMenu.module.css.js +0 -16
  45. package/dist/src/components/contextualAppLinks/externalLinkButtons/allExternalLinks.js +0 -127
  46. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.js +0 -169
  47. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToCommApp.js +0 -95
  48. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToMcApp.js +0 -95
  49. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToProCoSys.js +0 -84
  50. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSafeX.js +0 -38
  51. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSap.js +0 -110
  52. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSemiDoc.js +0 -59
  53. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToStid.js +0 -40
  54. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.js +0 -114
  55. package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.js +0 -44
  56. package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.module.css.js +0 -15
  57. package/dist/src/components/contextualAppLinks/hooks/useContextualAppLinks.js +0 -52
  58. package/dist/src/components/contextualAppLinks/hooks/useContextualAppLinksContext.js +0 -36
  59. package/dist/src/components/contextualAppLinks/index.js +0 -22
  60. package/dist/src/components/contextualAppLinks/internalAppLinks.js +0 -115
  61. package/dist/src/components/contextualAppLinks/linkButton.js +0 -57
  62. package/dist/src/components/echoLogo/echoLogo.js +0 -30
  63. package/dist/src/components/echoLogo/echoLogo.module.css.js +0 -15
  64. package/dist/src/components/errorBoundary/components/chunkLoadErrorMessage.js +0 -64
  65. package/dist/src/components/errorBoundary/components/chunkLoadErrorMessage.module.css.js +0 -17
  66. package/dist/src/components/errorBoundary/components/errorBoundaryBaseMessage.js +0 -85
  67. package/dist/src/components/errorBoundary/components/errorBoundaryBaseMessage.module.css.js +0 -19
  68. package/dist/src/components/errorBoundary/components/notificationCardWithLogo.js +0 -55
  69. package/dist/src/components/errorBoundary/components/notificationCardWithLogo.module.css.js +0 -19
  70. package/dist/src/components/errorBoundary/errorBoundary.js +0 -100
  71. package/dist/src/components/externalLinkButton/externalLinkButton.js +0 -310
  72. package/dist/src/components/externalLinkButton/externalLinkButton.module.css.js +0 -23
  73. package/dist/src/components/footer/footer.js +0 -42
  74. package/dist/src/components/footer/footer.module.css.js +0 -17
  75. package/dist/src/components/lazyLoading/appLoadingIndicator.js +0 -34
  76. package/dist/src/components/lazyLoading/appLoadingIndicator.module.css.js +0 -15
  77. package/dist/src/components/lazyLoading/lazyLoadedAppWrapper.js +0 -40
  78. package/dist/src/components/mediator/mediator.js +0 -32
  79. package/dist/src/components/pageMenu/Navigation/applicationList.js +0 -35
  80. package/dist/src/components/pageMenu/Navigation/applicationList.module.css.js +0 -17
  81. package/dist/src/components/pageMenu/accordionItem.module.css.js +0 -16
  82. package/dist/src/components/pageMenu/defaultAccordionItem.js +0 -61
  83. package/dist/src/components/pageMenu/pageMenu.js +0 -141
  84. package/dist/src/components/pageMenu/pageMenu.module.css.js +0 -17
  85. package/dist/src/components/pageMenu/pageMenuDrawerItem.js +0 -77
  86. package/dist/src/components/pageMenu/pageMenuDrawerItem.module.css.js +0 -20
  87. package/dist/src/components/pageMenu/settings/asset.js +0 -40
  88. package/dist/src/components/pageMenu/settings/profile.js +0 -62
  89. package/dist/src/components/pageMenu/settings/settings.js +0 -41
  90. package/dist/src/components/pageMenu/settings/settings.module.css.js +0 -25
  91. package/dist/src/components/pageMenu/version/version.js +0 -88
  92. package/dist/src/components/pageMenu/version/version.module.css.js +0 -14
  93. package/dist/src/components/panel/corePanelIcon.js +0 -31
  94. package/dist/src/components/panel/corePanelLeft.js +0 -91
  95. package/dist/src/components/panel/corePanelLeft.module.css.js +0 -19
  96. package/dist/src/components/panel/corePanelRight.js +0 -95
  97. package/dist/src/components/panel/corePanelRight.module.css.js +0 -18
  98. package/dist/src/components/panelButton/panelButton.js +0 -124
  99. package/dist/src/components/panelButton/panelButton.module.css.js +0 -25
  100. package/dist/src/components/plantSelector/plantSelector.js +0 -137
  101. package/dist/src/components/projectSelector/ProcosysProjectSelector.js +0 -115
  102. package/dist/src/components/projectSelector/ProcosysProjectSelector.module.css.js +0 -14
  103. package/dist/src/components/realTimeData/RealTimePopoverButton.js +0 -168
  104. package/dist/src/components/realTimeData/components/IMSDropdown/RealTimeIMSDropdown.js +0 -83
  105. package/dist/src/components/realTimeData/components/IMSDropdown/RealTimeIMSDropdown.module.css.js +0 -15
  106. package/dist/src/components/realTimeData/components/connectorForIMSTag/IMSConnector.module.css.js +0 -17
  107. package/dist/src/components/realTimeData/components/connectorForIMSTag/RealTimeConnectorForIMSTag.js +0 -149
  108. package/dist/src/components/realTimeData/components/contextButton/RealTimeContextButton.js +0 -75
  109. package/dist/src/components/realTimeData/components/contextButton/RealTimeContextButton.module.css.js +0 -15
  110. package/dist/src/components/realTimeData/components/contextPopover/Popover.js +0 -37
  111. package/dist/src/components/realTimeData/components/contextPopover/Popover.module.css.js +0 -15
  112. package/dist/src/components/realTimeData/hooks/useRealTimeHub.js +0 -124
  113. package/dist/src/components/realTimeData/hooks/useSignalR.js +0 -175
  114. package/dist/src/components/realTimeData/hooks/useSignalRListener.js +0 -22
  115. package/dist/src/components/router/echoRoute.js +0 -45
  116. package/dist/src/components/router/echoRouter.js +0 -30
  117. package/dist/src/components/router/echoWrapper.js +0 -33
  118. package/dist/src/components/router/routes.js +0 -46
  119. package/dist/src/components/router/useLayout.js +0 -32
  120. package/dist/src/components/searchMenu/searchMenu.js +0 -46
  121. package/dist/src/components/searchMenu/searchMenu.module.css.js +0 -16
  122. package/dist/src/components/tagNumber/tagNo.module.css.js +0 -14
  123. package/dist/src/components/tagNumber/tagNumber.js +0 -38
  124. package/dist/src/components/toaster/toaster.js +0 -43
  125. package/dist/src/components/toaster/toaster.module.css.js +0 -15
  126. package/dist/src/components/toaster/toasters.js +0 -101
  127. package/dist/src/coreApplication/EchoContent.js +0 -32
  128. package/dist/src/coreApplication/EchoContentPanels.js +0 -40
  129. package/dist/src/coreApplication/EchoEventHandler.js +0 -79
  130. package/dist/src/coreApplication/EchoEventHandler.module.css.js +0 -14
  131. package/dist/src/globalStyles.css.js +0 -6
  132. package/dist/src/hooks/hookLibrary.js +0 -86
  133. package/dist/src/hooks/index.js +0 -12
  134. package/dist/src/hooks/useEchoHistory.js +0 -38
  135. package/dist/src/hooks/useLongPress.js +0 -37
  136. package/dist/src/hooks/useSemi.js +0 -100
  137. package/dist/src/hooks/useTagDetails.js +0 -153
  138. package/dist/src/icons/common/CommissionApp-icon.png.js +0 -7
  139. package/dist/src/icons/common/Evision.svg.js +0 -68
  140. package/dist/src/icons/common/Fusion.svg.js +0 -111
  141. package/dist/src/icons/common/McApp.svg.js +0 -70
  142. package/dist/src/icons/common/Notification.svg.js +0 -81
  143. package/dist/src/icons/common/ProCoSysIcon.svg.js +0 -68
  144. package/dist/src/icons/common/Robim.svg.js +0 -66
  145. package/dist/src/icons/common/SX-logo.png.js +0 -7
  146. package/dist/src/icons/common/SapLogo.svg.js +0 -95
  147. package/dist/src/icons/common/SemiIcon.svg.js +0 -82
  148. package/dist/src/icons/common/Stid.svg.js +0 -65
  149. package/dist/src/icons/common/TR2000.svg.js +0 -73
  150. package/dist/src/icons/common/WorkOrder.svg.js +0 -71
  151. package/dist/src/icons/common/Yammer.svg.js +0 -65
  152. package/dist/src/icons/common/satos-logo.png.js +0 -7
  153. package/dist/src/icons/edsIons.js +0 -15
  154. package/dist/src/icons/equinor-logo.js +0 -62
  155. package/dist/src/icons/logo_ee.js +0 -37
  156. package/dist/src/icons/search.js +0 -35
  157. package/dist/src/index.js +0 -209
  158. package/dist/src/index2.js +0 -201
  159. package/dist/src/services/api/api-manager.js +0 -190
  160. package/dist/src/services/api/api-plantinfo.js +0 -196
  161. package/dist/src/services/api/api-plants.js +0 -75
  162. package/dist/src/services/api/api-realtimedata.js +0 -55
  163. package/dist/src/services/api/api-tag-details.js +0 -69
  164. package/dist/src/services/api/api-tags.js +0 -88
  165. package/dist/src/services/api/api-version.js +0 -124
  166. package/dist/src/services/componentRegistry/componentRegistry.js +0 -69
  167. package/dist/src/services/echopediaAnalyticsModule/echopediaAnalyticsModule.js +0 -10
  168. package/dist/src/services/eventCallbacks/plantChanged.js +0 -42
  169. package/dist/src/services/eventHubActions/toastActions.js +0 -18
  170. package/dist/src/theme/themeConst.js +0 -75
  171. package/dist/src/types/extensions.js +0 -10
  172. package/dist/src/types/legend.js +0 -58
  173. package/dist/src/types/pingableSources.js +0 -11
  174. package/dist/src/utils/copyText.js +0 -67
  175. package/dist/src/utils/eventHandlerUtils.js +0 -11
  176. package/dist/src/utils/legendUtils.js +0 -168
  177. package/dist/src/utils/navigationUtils.js +0 -28
  178. package/dist/src/utils/plantInfo.js +0 -535
  179. package/dist/src/utils/plantsDataUtils.js +0 -35
  180. package/dist/src/utils/projectSelectorUtils.js +0 -19
  181. package/dist/src/utils/startup.js +0 -89
  182. package/dist/src/utils/taskCache.js +0 -89
@@ -1,42 +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
- 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; }
6
-
7
- Object.defineProperty(exports, '__esModule', {
8
- value: true
9
- });
10
-
11
- var _tslib = require('../../../_virtual/_tslib.js');
12
-
13
- var EchoCore = require('@equinor/echo-core');
14
- /**
15
- * Callback function to be used with the event listener for changing plants.
16
- * Sets the selected plant in our local storage.
17
- * @param {Plant} newSelectedPlant
18
- * @return {*} {Promise<void>}
19
- */
20
-
21
-
22
- var handlePlantChanged = function handlePlantChanged(newSelectedPlant, history, stayOnPath) {
23
- return _tslib.__awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
24
- return _regeneratorRuntime().wrap(function _callee$(_context) {
25
- while (1) {
26
- switch (_context.prev = _context.next) {
27
- case 0:
28
- EchoCore.setSelectedPlant(Object.assign(Object.assign({}, newSelectedPlant), {
29
- plantName: newSelectedPlant.description
30
- }));
31
- !stayOnPath && history.push('');
32
-
33
- case 2:
34
- case "end":
35
- return _context.stop();
36
- }
37
- }
38
- }, _callee);
39
- }));
40
- };
41
-
42
- exports.handlePlantChanged = handlePlantChanged;
@@ -1,18 +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
- * Emit a Toaster event on echo core eventHub with a specific payload.
10
- * @param {ToasterEvent} payload
11
- */
12
-
13
-
14
- var displayToast = function displayToast(payload) {
15
- EchoCore.eventHub.emit(EchoCore.EchoEvents.Toaster, payload);
16
- };
17
-
18
- exports.displayToast = displayToast;
@@ -1,75 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- });
6
- var themeConst = {
7
- /* Echo - Digital Twin Colors*/
8
- black: '#000000',
9
- white: '#ffffff',
10
- equiBlue1: '#233746',
11
- equiBlue2: '#d7e1ed',
12
- equiBlue3: '#D5EAF4',
13
- equiGray1: '#87929a',
14
- equiGray2: '#b4bbc0',
15
- equiGray3: '#d1d5d8',
16
- equiGray4: '#e3e6e8',
17
- equiRed1: '#ff1243',
18
- darkEquiRed: '#ce183e',
19
- equiGreen1: '#006f79',
20
- equiGreen2: '#deedee',
21
- equiGreen3: '#e6faec',
22
- echoText: '#3d3d3d',
23
- disabledBackgroundColor: '#eaeaea',
24
- disabledColor: '#6f6f6f',
25
-
26
- /* Echopedia Notifications status color */
27
- onGoing: '#fbca36',
28
- done: '#4bb748',
29
-
30
- /* Echopedia Stid StatusCode */
31
- asBuilt: '#007079',
32
- planned: '#4bb748',
33
- future: '#52c0ff',
34
- historic: '#ff7d98',
35
- outOfService: '#ff9200',
36
- reserved: '#243746',
37
- voided: '#eb0000',
38
- "default": '#dcdcdc',
39
-
40
- /*Echopedia Procosys StatusCodes*/
41
- ok: '#23ef2a',
42
- os: '#adaead',
43
- pa: '#f94693',
44
- pb: '#ffdd00',
45
- unknown: '#525252',
46
-
47
- /*Echopedia Procosys Filters*/
48
- priorityHigh: '#FF1243',
49
- priorityMedium: '#FBCA36',
50
- systems: '#D5EAF4',
51
- locations: '#3EB54A',
52
-
53
- /* Popover colors */
54
- warningText: '#ad6200',
55
- warningIcon: '#ff9200',
56
- warningBackground: '#ffe7d6',
57
-
58
- /* Dropdown colors */
59
- dropDownButtonBackground: '#f0f0f0',
60
- dropDownTextColor: '#808080',
61
-
62
- /* Search */
63
- searchBarBackground: '#f7f7f7',
64
-
65
- /*Application notifications*/
66
- highSeverity: '#ffc1c1',
67
- mediumSeverity: '#ffe7d6',
68
- lowSeverity: '#dce6ee',
69
- defaultSeverity: '#d5eaf4',
70
-
71
- /* Toggle colors */
72
- toggleActive: '#4bb748',
73
- toggleInactive: '#b30d2f'
74
- };
75
- exports.themeConst = themeConst;
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- });
6
- exports.ExtendableComponentName = void 0;
7
-
8
- (function (ExtendableComponentName) {
9
- ExtendableComponentName["ContextualAppLinks"] = "ContextualAppLinks";
10
- })(exports.ExtendableComponentName || (exports.ExtendableComponentName = {}));
@@ -1,58 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- });
6
- exports.LegendStatus = void 0;
7
-
8
- (function (LegendStatus) {
9
- LegendStatus["Unknown"] = "Unknown"; //Stid statuses
10
-
11
- LegendStatus["AsBuilt"] = "AsBuilt";
12
- LegendStatus["Planned"] = "Planned";
13
- LegendStatus["Reserved"] = "Reserved";
14
- LegendStatus["Future"] = "Future";
15
- LegendStatus["Historic"] = "Historic";
16
- LegendStatus["OutOfService"] = "Out Of Service";
17
- LegendStatus["Voided"] = "Voided"; //Procosys statuses
18
-
19
- LegendStatus["OK"] = "OK";
20
- LegendStatus["OS"] = "OS";
21
- LegendStatus["PA"] = "PA";
22
- LegendStatus["PB"] = "PB"; // CommPk statuses
23
-
24
- LegendStatus["RFCCSent"] = "RFCCSent";
25
- LegendStatus["RFCCPartly"] = "RFCCPartly";
26
- LegendStatus["RFCC"] = "RFCC";
27
- LegendStatus["RFOCSent"] = "RFOCSent";
28
- LegendStatus["RFOCPartly"] = "RFOCPartly";
29
- LegendStatus["RFOC"] = "RFOC";
30
- LegendStatus["RFCCRejected"] = "RFCCRejected";
31
- LegendStatus["RFOCRejected"] = "RFOCRejected";
32
- LegendStatus["Error"] = "Error"; // WO statuses
33
-
34
- LegendStatus["PM01"] = "PM01";
35
- LegendStatus["PM02"] = "PM02";
36
- LegendStatus["PM03"] = "PM03";
37
- LegendStatus["PM04"] = "PM04";
38
- LegendStatus["PM05"] = "PM05";
39
- LegendStatus["PM06"] = "PM06";
40
- LegendStatus["PM010"] = "PM010";
41
- LegendStatus["PM015"] = "PM015";
42
- LegendStatus["PM020"] = "PM020";
43
- })(exports.LegendStatus || (exports.LegendStatus = {}));
44
-
45
- exports.LegendType = void 0;
46
-
47
- (function (LegendType) {
48
- LegendType["Stid"] = "Stid";
49
- LegendType["CommPk"] = "CommPk";
50
- LegendType["CommPkStatus"] = "CommPkStatus";
51
- LegendType["MCCRStatus"] = "MCCRStatus";
52
- LegendType["CPCLStatus"] = "CPCLStatus";
53
- LegendType["Notifications"] = "Notifications";
54
- LegendType["WorkOrders"] = "WorkOrders";
55
- LegendType["ValvePosition"] = "ValvePosition";
56
- LegendType["MeasuringPosition"] = "MeasuringPosition";
57
- LegendType["WorkPermit"] = "WorkPermit";
58
- })(exports.LegendType || (exports.LegendType = {}));
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- });
6
- exports.PingableSources = void 0;
7
-
8
- (function (PingableSources) {
9
- PingableSources["Sap"] = "https://p03web.statoil.no/sap/public/icmandir/its/lsgui/images/img/splashscreen_corbu.png";
10
- PingableSources["Statos"] = "https://satos.equinor.com/files/4/bilder/johan_svedrup.png";
11
- })(exports.PingableSources || (exports.PingableSources = {}));
@@ -1,67 +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
- 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; }
6
-
7
- Object.defineProperty(exports, '__esModule', {
8
- value: true
9
- });
10
-
11
- var _tslib = require('../../_virtual/_tslib.js');
12
-
13
- var toastActions = require('../services/eventHubActions/toastActions.js');
14
-
15
- function copyText(event) {
16
- return _tslib.__awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
17
- var target, isMarkElement, text;
18
- return _regeneratorRuntime().wrap(function _callee$(_context) {
19
- while (1) {
20
- switch (_context.prev = _context.next) {
21
- case 0:
22
- target = event === null || event === void 0 ? void 0 : event.target;
23
- isMarkElement = target.nodeName === 'MARK';
24
-
25
- if (isMarkElement && target.parentElement) {
26
- target = target.parentElement;
27
- }
28
-
29
- text = getTextContentBySubTree(target);
30
-
31
- if (!text) {
32
- _context.next = 8;
33
- break;
34
- }
35
-
36
- _context.next = 7;
37
- return navigator.clipboard.writeText(text);
38
-
39
- case 7:
40
- toastActions.displayToast({
41
- message: "Text copied to clipboard: ".concat(text)
42
- });
43
-
44
- case 8:
45
- case "end":
46
- return _context.stop();
47
- }
48
- }
49
- }, _callee);
50
- }));
51
- }
52
-
53
- function getTextContentBySubTree(element) {
54
- var child = element.firstChild;
55
- if (!child) return;
56
- var texts = [];
57
-
58
- while (child) {
59
- if (child.nodeName === 'MARK' && child.textContent) texts.push(child.textContent);
60
- if (child.nodeType === Node.TEXT_NODE && child.nodeValue) texts.push(child.nodeValue);
61
- child = child.nextSibling;
62
- }
63
-
64
- return texts.join('');
65
- }
66
-
67
- exports.copyText = copyText;
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- });
6
-
7
- var getKeyFromPath = function getKeyFromPath(path) {
8
- return path.split('/')[1].split('?')[0];
9
- };
10
-
11
- exports.getKeyFromPath = getKeyFromPath;
@@ -1,168 +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 EchoUtils = require('@equinor/echo-utils');
10
-
11
- var legend = require('../types/legend.js');
12
-
13
- function _interopDefaultLegacy(e) {
14
- return e && _typeof(e) === 'object' && 'default' in e ? e : {
15
- 'default': e
16
- };
17
- }
18
-
19
- var EchoUtils__default = /*#__PURE__*/_interopDefaultLegacy(EchoUtils);
20
- /**
21
- * Get the right status color for a given tag status
22
- * @param {LegendStatus} tagStatus
23
- * @returns {string} The mapped css color variable name
24
- */
25
-
26
-
27
- function getLegendStatusColor() {
28
- var tagStatus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
29
- var style = getComputedStyle(document.documentElement);
30
- if (!tagStatus) return style.getPropertyValue('--unknown');
31
-
32
- switch (tagStatus.toString().toLowerCase()) {
33
- //Stid statuses
34
- case legend.LegendStatus.AsBuilt.toLowerCase():
35
- return style.getPropertyValue('--asBuilt');
36
-
37
- case legend.LegendStatus.Planned.toLowerCase():
38
- return style.getPropertyValue('--planned');
39
-
40
- case legend.LegendStatus.Future.toLowerCase():
41
- return style.getPropertyValue('--future');
42
-
43
- case legend.LegendStatus.Historic.toLowerCase():
44
- return style.getPropertyValue('--historic');
45
-
46
- case legend.LegendStatus.OutOfService.toLowerCase():
47
- return style.getPropertyValue('--outOfService');
48
-
49
- case legend.LegendStatus.Reserved.toLowerCase():
50
- return style.getPropertyValue('--reserved');
51
-
52
- case legend.LegendStatus.Voided.toLowerCase():
53
- return style.getPropertyValue('--voided');
54
- //ProCoSys statuses
55
-
56
- case legend.LegendStatus.OK.toLowerCase():
57
- return style.getPropertyValue('--ok');
58
-
59
- case legend.LegendStatus.OS.toLowerCase():
60
- return style.getPropertyValue('--os');
61
-
62
- case legend.LegendStatus.PA.toLowerCase():
63
- return style.getPropertyValue('--pa');
64
-
65
- case legend.LegendStatus.PB.toLowerCase():
66
- return style.getPropertyValue('--pb');
67
- // CommPk statuses
68
-
69
- case legend.LegendStatus.RFCCSent.toLowerCase():
70
- return style.getPropertyValue('--rfccSent');
71
-
72
- case legend.LegendStatus.RFCCPartly.toLowerCase():
73
- return style.getPropertyValue('--rfccPartly');
74
-
75
- case legend.LegendStatus.RFCC.toLowerCase():
76
- return style.getPropertyValue('--rfcc');
77
-
78
- case legend.LegendStatus.RFOCSent.toLowerCase():
79
- return style.getPropertyValue('--rfocSent');
80
-
81
- case legend.LegendStatus.RFOCPartly.toLowerCase():
82
- return style.getPropertyValue('--rfocPartly');
83
-
84
- case legend.LegendStatus.RFOC.toLowerCase():
85
- return style.getPropertyValue('--rfoc');
86
-
87
- case legend.LegendStatus.RFCCRejected.toLowerCase():
88
- return style.getPropertyValue('--rfccRejected');
89
-
90
- case legend.LegendStatus.RFOCRejected.toLowerCase():
91
- return style.getPropertyValue('--rfocRejected');
92
-
93
- case legend.LegendStatus.Error.toLowerCase():
94
- return style.getPropertyValue('--handoverError');
95
-
96
- case legend.LegendStatus.Unknown.toLowerCase():
97
- return style.getPropertyValue('--unknown');
98
- // WO statuses
99
-
100
- case legend.LegendStatus.PM01.toLocaleLowerCase():
101
- return style.getPropertyValue('--pm01');
102
-
103
- case legend.LegendStatus.PM02.toLocaleLowerCase():
104
- return style.getPropertyValue('--pm02');
105
-
106
- case legend.LegendStatus.PM03.toLocaleLowerCase():
107
- return style.getPropertyValue('--pm03');
108
-
109
- case legend.LegendStatus.PM04.toLocaleLowerCase():
110
- return style.getPropertyValue('--pm04');
111
-
112
- case legend.LegendStatus.PM05.toLocaleLowerCase():
113
- return style.getPropertyValue('--pm05');
114
-
115
- case legend.LegendStatus.PM06.toLocaleLowerCase():
116
- return style.getPropertyValue('--pm06');
117
-
118
- case legend.LegendStatus.PM010.toLocaleLowerCase():
119
- return style.getPropertyValue('--pm010');
120
-
121
- case legend.LegendStatus.PM015.toLocaleLowerCase():
122
- return style.getPropertyValue('--pm015');
123
-
124
- case legend.LegendStatus.PM020.toLocaleLowerCase():
125
- return style.getPropertyValue('--pm020');
126
-
127
- default:
128
- return EchoUtils__default["default"].Utils.Color.getColorStatusFromString(tagStatus);
129
- }
130
- }
131
- /**
132
- * Returns the matching legend status for a given legend type.
133
- * @param legendType {LegendType}
134
- * @param status {string} the status to be matched with the given legendType
135
- * @returns {string | LegendStatus}
136
- */
137
-
138
-
139
- function legendTypeToLegendStatus(legendType, status) {
140
- if (!status) return legend.LegendStatus.Unknown;
141
-
142
- if (legendType === legend.LegendType.CommPk || legendType === legend.LegendType.CommPkStatus || legendType === legend.LegendType.Notifications || legendType === legend.LegendType.WorkOrders || legendType === legend.LegendType.ValvePosition || legendType === legend.LegendType.MeasuringPosition || legendType === legend.LegendType.WorkPermit) {
143
- return status;
144
- } else {
145
- return valueToEnum(status, legend.LegendStatus);
146
- }
147
- }
148
-
149
- function valueToEnum(value, enumType) {
150
- if (!value) return Object.keys(enumType)[0];
151
- var enumTypeIndexForValue = listToLowerCase(Object.values(enumType)).indexOf(value.toLowerCase());
152
-
153
- if (enumTypeIndexForValue === -1) {
154
- return Object.values(enumType)[0];
155
- } else {
156
- return Object.values(enumType)[enumTypeIndexForValue];
157
- }
158
- }
159
-
160
- function listToLowerCase(values) {
161
- return values.map(function (v) {
162
- return v.toLowerCase();
163
- });
164
- }
165
-
166
- exports.getLegendStatusColor = getLegendStatusColor;
167
- exports.legendTypeToLegendStatus = legendTypeToLegendStatus;
168
- exports.valueToEnum = valueToEnum;
@@ -1,28 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- });
6
-
7
- var echopediaAnalyticsModule = require('../services/echopediaAnalyticsModule/echopediaAnalyticsModule.js');
8
- /**
9
- * Helper function to execute a redirection to an outer source.
10
- *
11
- * @param {string} link Link to navigate to.
12
- * @param {boolean} redirect Set this to 'true' to load the given url to navigate to in the current tab / window.
13
- */
14
-
15
-
16
- var goToExternalLink = function goToExternalLink(link, redirect) {
17
- echopediaAnalyticsModule.echopediaAnalyticsModule.trackEventBy('ExternalLink', 'Opened', {
18
- linkTo: link
19
- });
20
-
21
- if (redirect) {
22
- window.location.href = link;
23
- } else {
24
- window.open(link, '_blank');
25
- }
26
- };
27
-
28
- exports.goToExternalLink = goToExternalLink;