@equinor/echo-framework 0.9.12 → 0.9.15

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 (180) hide show
  1. package/dist/index.js +3 -0
  2. package/package.json +10 -6
  3. package/dist/_virtual/_tslib.js +0 -67
  4. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +0 -24
  5. package/dist/node_modules/@equinor/eds-icons/dist/icons.esm.js +0 -5285
  6. package/dist/node_modules/@microsoft/signalr/dist/esm/AbortController.js +0 -54
  7. package/dist/node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js +0 -96
  8. package/dist/node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js +0 -47
  9. package/dist/node_modules/@microsoft/signalr/dist/esm/Errors.js +0 -287
  10. package/dist/node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js +0 -283
  11. package/dist/node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js +0 -86
  12. package/dist/node_modules/@microsoft/signalr/dist/esm/HeaderNames.js +0 -20
  13. package/dist/node_modules/@microsoft/signalr/dist/esm/HttpClient.js +0 -82
  14. package/dist/node_modules/@microsoft/signalr/dist/esm/HttpConnection.js +0 -1169
  15. package/dist/node_modules/@microsoft/signalr/dist/esm/HubConnection.js +0 -1346
  16. package/dist/node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js +0 -165
  17. package/dist/node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js +0 -33
  18. package/dist/node_modules/@microsoft/signalr/dist/esm/ILogger.js +0 -37
  19. package/dist/node_modules/@microsoft/signalr/dist/esm/ITransport.js +0 -37
  20. package/dist/node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js +0 -179
  21. package/dist/node_modules/@microsoft/signalr/dist/esm/Loggers.js +0 -35
  22. package/dist/node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js +0 -448
  23. package/dist/node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js +0 -238
  24. package/dist/node_modules/@microsoft/signalr/dist/esm/Subject.js +0 -99
  25. package/dist/node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js +0 -45
  26. package/dist/node_modules/@microsoft/signalr/dist/esm/Utils.js +0 -435
  27. package/dist/node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js +0 -264
  28. package/dist/node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js +0 -133
  29. package/dist/node_modules/history/esm/history.js +0 -498
  30. package/dist/node_modules/resolve-pathname/esm/resolve-pathname.js +0 -73
  31. package/dist/node_modules/style-inject/dist/style-inject.es.js +0 -36
  32. package/dist/node_modules/tiny-invariant/dist/tiny-invariant.esm.js +0 -23
  33. package/dist/node_modules/tiny-warning/dist/tiny-warning.esm.js +0 -26
  34. package/dist/src/components/appLinks/AppLinks.js +0 -41
  35. package/dist/src/components/appLinks/AppLinks.module.css.js +0 -14
  36. package/dist/src/components/appLinks/applinkUtils.js +0 -19
  37. package/dist/src/components/appLinks/linkButton/linkButton.js +0 -45
  38. package/dist/src/components/containers/layout.module.css.js +0 -25
  39. package/dist/src/components/containers/layouts.js +0 -62
  40. package/dist/src/components/contextualAppLinks/contextualAppLinks.context.js +0 -20
  41. package/dist/src/components/contextualAppLinks/contextualAppLinks.js +0 -47
  42. package/dist/src/components/contextualAppLinks/externalAppsMenu.js +0 -157
  43. package/dist/src/components/contextualAppLinks/externalAppsMenu.module.css.js +0 -16
  44. package/dist/src/components/contextualAppLinks/externalLinkButtons/allExternalLinks.js +0 -127
  45. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.js +0 -169
  46. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToCommApp.js +0 -95
  47. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToMcApp.js +0 -95
  48. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToProCoSys.js +0 -84
  49. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSafeX.js +0 -38
  50. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSap.js +0 -110
  51. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSemiDoc.js +0 -59
  52. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToStid.js +0 -40
  53. package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.js +0 -114
  54. package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.js +0 -44
  55. package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.module.css.js +0 -15
  56. package/dist/src/components/contextualAppLinks/hooks/useContextualAppLinks.js +0 -52
  57. package/dist/src/components/contextualAppLinks/hooks/useContextualAppLinksContext.js +0 -36
  58. package/dist/src/components/contextualAppLinks/index.js +0 -22
  59. package/dist/src/components/contextualAppLinks/internalAppLinks.js +0 -115
  60. package/dist/src/components/contextualAppLinks/linkButton.js +0 -57
  61. package/dist/src/components/echoLogo/echoLogo.js +0 -30
  62. package/dist/src/components/echoLogo/echoLogo.module.css.js +0 -15
  63. package/dist/src/components/errorBoundary/components/chunkLoadErrorMessage.js +0 -64
  64. package/dist/src/components/errorBoundary/components/chunkLoadErrorMessage.module.css.js +0 -17
  65. package/dist/src/components/errorBoundary/components/errorBoundaryBaseMessage.js +0 -85
  66. package/dist/src/components/errorBoundary/components/errorBoundaryBaseMessage.module.css.js +0 -19
  67. package/dist/src/components/errorBoundary/components/notificationCardWithLogo.js +0 -55
  68. package/dist/src/components/errorBoundary/components/notificationCardWithLogo.module.css.js +0 -19
  69. package/dist/src/components/errorBoundary/errorBoundary.js +0 -100
  70. package/dist/src/components/externalLinkButton/externalLinkButton.js +0 -310
  71. package/dist/src/components/externalLinkButton/externalLinkButton.module.css.js +0 -23
  72. package/dist/src/components/footer/footer.js +0 -42
  73. package/dist/src/components/footer/footer.module.css.js +0 -17
  74. package/dist/src/components/lazyLoading/appLoadingIndicator.js +0 -34
  75. package/dist/src/components/lazyLoading/appLoadingIndicator.module.css.js +0 -15
  76. package/dist/src/components/lazyLoading/lazyLoadedAppWrapper.js +0 -40
  77. package/dist/src/components/mediator/mediator.js +0 -32
  78. package/dist/src/components/pageMenu/Navigation/applicationList.js +0 -35
  79. package/dist/src/components/pageMenu/Navigation/applicationList.module.css.js +0 -17
  80. package/dist/src/components/pageMenu/accordionItem.module.css.js +0 -16
  81. package/dist/src/components/pageMenu/defaultAccordionItem.js +0 -61
  82. package/dist/src/components/pageMenu/pageMenu.js +0 -141
  83. package/dist/src/components/pageMenu/pageMenu.module.css.js +0 -17
  84. package/dist/src/components/pageMenu/pageMenuDrawerItem.js +0 -77
  85. package/dist/src/components/pageMenu/pageMenuDrawerItem.module.css.js +0 -20
  86. package/dist/src/components/pageMenu/settings/asset.js +0 -40
  87. package/dist/src/components/pageMenu/settings/profile.js +0 -62
  88. package/dist/src/components/pageMenu/settings/settings.js +0 -41
  89. package/dist/src/components/pageMenu/settings/settings.module.css.js +0 -25
  90. package/dist/src/components/pageMenu/version/version.js +0 -88
  91. package/dist/src/components/pageMenu/version/version.module.css.js +0 -14
  92. package/dist/src/components/panel/corePanelIcon.js +0 -31
  93. package/dist/src/components/panel/corePanelLeft.js +0 -91
  94. package/dist/src/components/panel/corePanelLeft.module.css.js +0 -19
  95. package/dist/src/components/panel/corePanelRight.js +0 -95
  96. package/dist/src/components/panel/corePanelRight.module.css.js +0 -18
  97. package/dist/src/components/panelButton/panelButton.js +0 -124
  98. package/dist/src/components/panelButton/panelButton.module.css.js +0 -25
  99. package/dist/src/components/plantSelector/plantSelector.js +0 -137
  100. package/dist/src/components/projectSelector/ProcosysProjectSelector.js +0 -115
  101. package/dist/src/components/projectSelector/ProcosysProjectSelector.module.css.js +0 -14
  102. package/dist/src/components/realTimeData/RealTimePopoverButton.js +0 -168
  103. package/dist/src/components/realTimeData/components/IMSDropdown/RealTimeIMSDropdown.js +0 -83
  104. package/dist/src/components/realTimeData/components/IMSDropdown/RealTimeIMSDropdown.module.css.js +0 -15
  105. package/dist/src/components/realTimeData/components/connectorForIMSTag/IMSConnector.module.css.js +0 -17
  106. package/dist/src/components/realTimeData/components/connectorForIMSTag/RealTimeConnectorForIMSTag.js +0 -149
  107. package/dist/src/components/realTimeData/components/contextButton/RealTimeContextButton.js +0 -75
  108. package/dist/src/components/realTimeData/components/contextButton/RealTimeContextButton.module.css.js +0 -15
  109. package/dist/src/components/realTimeData/components/contextPopover/Popover.js +0 -37
  110. package/dist/src/components/realTimeData/components/contextPopover/Popover.module.css.js +0 -15
  111. package/dist/src/components/realTimeData/hooks/useRealTimeHub.js +0 -124
  112. package/dist/src/components/realTimeData/hooks/useSignalR.js +0 -175
  113. package/dist/src/components/realTimeData/hooks/useSignalRListener.js +0 -22
  114. package/dist/src/components/router/echoRoute.js +0 -45
  115. package/dist/src/components/router/echoRouter.js +0 -30
  116. package/dist/src/components/router/echoWrapper.js +0 -33
  117. package/dist/src/components/router/routes.js +0 -46
  118. package/dist/src/components/router/useLayout.js +0 -32
  119. package/dist/src/components/searchMenu/searchMenu.js +0 -46
  120. package/dist/src/components/searchMenu/searchMenu.module.css.js +0 -16
  121. package/dist/src/components/tagNumber/tagNo.module.css.js +0 -14
  122. package/dist/src/components/tagNumber/tagNumber.js +0 -38
  123. package/dist/src/components/toaster/toaster.js +0 -43
  124. package/dist/src/components/toaster/toaster.module.css.js +0 -15
  125. package/dist/src/components/toaster/toasters.js +0 -101
  126. package/dist/src/coreApplication/EchoContent.js +0 -32
  127. package/dist/src/coreApplication/EchoContentPanels.js +0 -40
  128. package/dist/src/coreApplication/EchoEventHandler.js +0 -79
  129. package/dist/src/coreApplication/EchoEventHandler.module.css.js +0 -14
  130. package/dist/src/globalStyles.css.js +0 -6
  131. package/dist/src/hooks/hookLibrary.js +0 -86
  132. package/dist/src/hooks/index.js +0 -12
  133. package/dist/src/hooks/useEchoHistory.js +0 -38
  134. package/dist/src/hooks/useLongPress.js +0 -37
  135. package/dist/src/hooks/useSemi.js +0 -100
  136. package/dist/src/hooks/useTagDetails.js +0 -153
  137. package/dist/src/icons/common/CommissionApp-icon.png.js +0 -7
  138. package/dist/src/icons/common/Evision.svg.js +0 -68
  139. package/dist/src/icons/common/Fusion.svg.js +0 -111
  140. package/dist/src/icons/common/McApp.svg.js +0 -70
  141. package/dist/src/icons/common/Notification.svg.js +0 -81
  142. package/dist/src/icons/common/ProCoSysIcon.svg.js +0 -68
  143. package/dist/src/icons/common/Robim.svg.js +0 -66
  144. package/dist/src/icons/common/SX-logo.png.js +0 -7
  145. package/dist/src/icons/common/SapLogo.svg.js +0 -95
  146. package/dist/src/icons/common/SemiIcon.svg.js +0 -82
  147. package/dist/src/icons/common/Stid.svg.js +0 -65
  148. package/dist/src/icons/common/TR2000.svg.js +0 -73
  149. package/dist/src/icons/common/WorkOrder.svg.js +0 -71
  150. package/dist/src/icons/common/Yammer.svg.js +0 -65
  151. package/dist/src/icons/common/satos-logo.png.js +0 -7
  152. package/dist/src/icons/edsIons.js +0 -15
  153. package/dist/src/icons/equinor-logo.js +0 -62
  154. package/dist/src/icons/logo_ee.js +0 -37
  155. package/dist/src/icons/search.js +0 -35
  156. package/dist/src/index.js +0 -252
  157. package/dist/src/services/api/api-manager.js +0 -190
  158. package/dist/src/services/api/api-plantinfo.js +0 -196
  159. package/dist/src/services/api/api-plants.js +0 -75
  160. package/dist/src/services/api/api-realtimedata.js +0 -55
  161. package/dist/src/services/api/api-tag-details.js +0 -69
  162. package/dist/src/services/api/api-tags.js +0 -88
  163. package/dist/src/services/api/api-version.js +0 -124
  164. package/dist/src/services/componentRegistry/componentRegistry.js +0 -69
  165. package/dist/src/services/echopediaAnalyticsModule/echopediaAnalyticsModule.js +0 -10
  166. package/dist/src/services/eventCallbacks/plantChanged.js +0 -42
  167. package/dist/src/services/eventHubActions/toastActions.js +0 -18
  168. package/dist/src/theme/themeConst.js +0 -75
  169. package/dist/src/types/extensions.js +0 -10
  170. package/dist/src/types/legend.js +0 -58
  171. package/dist/src/types/pingableSources.js +0 -11
  172. package/dist/src/utils/copyText.js +0 -67
  173. package/dist/src/utils/eventHandlerUtils.js +0 -11
  174. package/dist/src/utils/legendUtils.js +0 -168
  175. package/dist/src/utils/navigationUtils.js +0 -28
  176. package/dist/src/utils/plantInfo.js +0 -535
  177. package/dist/src/utils/plantsDataUtils.js +0 -35
  178. package/dist/src/utils/projectSelectorUtils.js +0 -19
  179. package/dist/src/utils/startup.js +0 -89
  180. package/dist/src/utils/taskCache.js +0 -89
@@ -1,69 +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 echoBase = require('@equinor/echo-base');
14
-
15
- var echoSearch = require('@equinor/echo-search');
16
- /**
17
- * Wraps Search.Tags.getTagDetailsAsync(), and throws proper NotFoundError if search was unable to find the given tag.
18
- * It also converts Search's result.error responses to proper errors and throws them.
19
- *
20
- * @param {Object} param
21
- * @param {string} params.tagNo The tag number to query.
22
- * @param {string} params.instCode Plant installation code for the given tag.
23
- * @param {AbortSignal} params.abortSignal A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object.
24
- * @throws {NotFoundError} NotFoundError when there are no matches for the tagNo instCode pair.
25
- * @throws {BaseError} In any other failed API call.
26
- * @returns {Promise<TagDetailsDto>} Promise resolving in tag details DTO.
27
- */
28
-
29
-
30
- function getTagDetails(_ref) {
31
- var tagNo = _ref.tagNo,
32
- instCode = _ref.instCode;
33
- return _tslib.__awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
34
- var result;
35
- return _regeneratorRuntime().wrap(function _callee$(_context) {
36
- while (1) {
37
- switch (_context.prev = _context.next) {
38
- case 0:
39
- _context.next = 2;
40
- return echoSearch.Search.Tags.getTagDetailsAsync(tagNo, instCode);
41
-
42
- case 2:
43
- result = _context.sent;
44
- echoSearch.resultHelper.throwIfError(result);
45
-
46
- if (result.value) {
47
- _context.next = 6;
48
- break;
49
- }
50
-
51
- throw new echoBase.NotFoundError({
52
- message: "Could not find ".concat(instCode, " ").concat(tagNo),
53
- httpStatusCode: 404,
54
- url: 'getTagDetails'
55
- });
56
-
57
- case 6:
58
- return _context.abrupt("return", result.value);
59
-
60
- case 7:
61
- case "end":
62
- return _context.stop();
63
- }
64
- }
65
- }, _callee);
66
- }));
67
- }
68
-
69
- exports.getTagDetails = getTagDetails;
@@ -1,88 +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 apiManager = require('./api-manager.js');
14
- /**
15
- * Fetches tag information from ProCoSys.
16
- *
17
- * @param {Object} param
18
- * @param {string} params.tagNo The tag number to query.
19
- * @param {string} params.instCode Plant installation code for the given tag.
20
- * @param {AbortSignal} params.abortSignal A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object.
21
- * @throws {BaseError} If the response can't be parsed to JSON.
22
- * @throws {Error} In any other API call issues.
23
- * @returns {Promise<TProCoSysApiTag[]>} Promise resolving in array of tags.
24
- */
25
-
26
-
27
- function getTagFromProCoSys(_ref) {
28
- var instCode = _ref.instCode,
29
- tagNo = _ref.tagNo,
30
- abortSignal = _ref.abortSignal;
31
-
32
- var _a;
33
-
34
- return _tslib.__awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
35
- var url, tenMinutes;
36
- return _regeneratorRuntime().wrap(function _callee$(_context) {
37
- while (1) {
38
- switch (_context.prev = _context.next) {
39
- case 0:
40
- url = "".concat(apiManager.baseApiUrl, "/").concat(instCode, "/tags/procosys?tagNo=").concat(tagNo);
41
- tenMinutes = 1000 * 10;
42
- _context.next = 4;
43
- return apiManager.request({
44
- url: url,
45
- abortSignal: abortSignal,
46
- cache: {
47
- isEnabled: true,
48
- timeToLiveMilliseconds: tenMinutes
49
- }
50
- });
51
-
52
- case 4:
53
- _context.t1 = _a = _context.sent;
54
- _context.t0 = _context.t1 !== null;
55
-
56
- if (!_context.t0) {
57
- _context.next = 8;
58
- break;
59
- }
60
-
61
- _context.t0 = _a !== void 0;
62
-
63
- case 8:
64
- if (!_context.t0) {
65
- _context.next = 12;
66
- break;
67
- }
68
-
69
- _context.t2 = _a;
70
- _context.next = 13;
71
- break;
72
-
73
- case 12:
74
- _context.t2 = [];
75
-
76
- case 13:
77
- return _context.abrupt("return", _context.t2);
78
-
79
- case 14:
80
- case "end":
81
- return _context.stop();
82
- }
83
- }
84
- }, _callee);
85
- }));
86
- }
87
-
88
- exports.getTagFromProCoSys = getTagFromProCoSys;
@@ -1,124 +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 apiManager = require('./api-manager.js');
14
-
15
- function getApiVersion() {
16
- var _a;
17
-
18
- return _tslib.__awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
19
- var url;
20
- return _regeneratorRuntime().wrap(function _callee$(_context) {
21
- while (1) {
22
- switch (_context.prev = _context.next) {
23
- case 0:
24
- url = "".concat(apiManager.baseApiUrl, "/Version");
25
- _context.next = 3;
26
- return apiManager.request({
27
- url: url,
28
- cache: {
29
- isEnabled: true
30
- }
31
- });
32
-
33
- case 3:
34
- _context.t1 = _a = _context.sent;
35
- _context.t0 = _context.t1 !== null;
36
-
37
- if (!_context.t0) {
38
- _context.next = 7;
39
- break;
40
- }
41
-
42
- _context.t0 = _a !== void 0;
43
-
44
- case 7:
45
- if (!_context.t0) {
46
- _context.next = 11;
47
- break;
48
- }
49
-
50
- _context.t2 = _a;
51
- _context.next = 12;
52
- break;
53
-
54
- case 11:
55
- _context.t2 = '';
56
-
57
- case 12:
58
- return _context.abrupt("return", _context.t2);
59
-
60
- case 13:
61
- case "end":
62
- return _context.stop();
63
- }
64
- }
65
- }, _callee);
66
- }));
67
- }
68
-
69
- function getAppVersion() {
70
- var _a;
71
-
72
- return _tslib.__awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
73
- var url;
74
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
75
- while (1) {
76
- switch (_context2.prev = _context2.next) {
77
- case 0:
78
- url = "".concat(apiManager.baseApiUrl, "/Version/ProductVersion");
79
- _context2.next = 3;
80
- return apiManager.request({
81
- url: url,
82
- cache: {
83
- isEnabled: true
84
- }
85
- });
86
-
87
- case 3:
88
- _context2.t1 = _a = _context2.sent;
89
- _context2.t0 = _context2.t1 !== null;
90
-
91
- if (!_context2.t0) {
92
- _context2.next = 7;
93
- break;
94
- }
95
-
96
- _context2.t0 = _a !== void 0;
97
-
98
- case 7:
99
- if (!_context2.t0) {
100
- _context2.next = 11;
101
- break;
102
- }
103
-
104
- _context2.t2 = _a;
105
- _context2.next = 12;
106
- break;
107
-
108
- case 11:
109
- _context2.t2 = '';
110
-
111
- case 12:
112
- return _context2.abrupt("return", _context2.t2);
113
-
114
- case 13:
115
- case "end":
116
- return _context2.stop();
117
- }
118
- }
119
- }, _callee2);
120
- }));
121
- }
122
-
123
- exports.getApiVersion = getApiVersion;
124
- exports.getAppVersion = getAppVersion;
@@ -1,69 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- });
6
-
7
- var echoBase = require('@equinor/echo-base');
8
-
9
- exports.RegisteredComponentName = void 0;
10
-
11
- (function (RegisteredComponentName) {
12
- RegisteredComponentName["TagItem"] = "TagItem";
13
- })(exports.RegisteredComponentName || (exports.RegisteredComponentName = {}));
14
-
15
- var componentRegistry = function () {
16
- var legacyComponentRegistry = {};
17
- return Object.freeze({
18
- /**
19
- * Should be only used by EchopediaWeb, when bootstrapping Echo app.
20
- * Use this method to register a legacy component from Echopedia to EchoFramework, so it's available for others to use.
21
- * Originally created to make tightly coupled components available until they are properly refactored and decoupled.
22
- * @param name {RegisteredComponentName} The component will be assigned to this key.
23
- * @param component {React.FC<any>} The component which should be registered.
24
- */
25
- registerComponent: function registerComponent(_ref) {
26
- var name = _ref.name,
27
- component = _ref.component;
28
-
29
- if (!legacyComponentRegistry[name]) {
30
- legacyComponentRegistry[name] = component;
31
- } else {
32
- throw new echoBase.BaseError({
33
- name: 'ComponentAlreadyRegisteredError',
34
- message: "[EchoFramework.componentRegistry.registerComponent] Can not set component: a component with name ".concat(name, " is already set."),
35
- innerError: {
36
- componentName: name
37
- }
38
- });
39
- }
40
- },
41
-
42
- /**
43
- * Returns with the TagItem component, which is used in EchopediaWeb's search panel
44
- * and pdf side drawer when listing out tags.
45
- * @returns {React.FC<any>}
46
- */
47
- getTagItem: function getTagItem() {
48
- var componentName = exports.RegisteredComponentName.TagItem;
49
-
50
- if (!legacyComponentRegistry[componentName]) {
51
- throwUnregisteredComponentNameError(componentName);
52
- }
53
-
54
- return legacyComponentRegistry[componentName];
55
- }
56
- });
57
- }();
58
-
59
- function throwUnregisteredComponentNameError(componentName) {
60
- throw new echoBase.BaseError({
61
- name: 'UnregisteredComponentNameError',
62
- message: "[EchoFramework.componentRegistry] Can not get component: there is no component by the name \"".concat(componentName, "\" registered."),
63
- innerError: {
64
- componentName: componentName
65
- }
66
- });
67
- }
68
-
69
- exports.componentRegistry = componentRegistry;
@@ -1,10 +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 echopediaAnalyticsModule = EchoCore.analytics.createAnalyticsModule('ep');
10
- exports.echopediaAnalyticsModule = echopediaAnalyticsModule;
@@ -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 = {}));