@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,238 +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
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
8
-
9
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
-
11
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
-
13
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
14
-
15
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
-
17
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
18
-
19
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
20
-
21
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
22
-
23
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
24
-
25
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
26
-
27
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
28
-
29
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
30
-
31
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
32
-
33
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
34
-
35
- Object.defineProperty(exports, '__esModule', {
36
- value: true
37
- });
38
-
39
- var ILogger = require('./ILogger.js');
40
-
41
- var ITransport = require('./ITransport.js');
42
-
43
- var Utils = require('./Utils.js'); // Licensed to the .NET Foundation under one or more agreements.
44
-
45
- /** @private */
46
-
47
-
48
- var ServerSentEventsTransport = /*#__PURE__*/function () {
49
- function ServerSentEventsTransport(httpClient, accessTokenFactory, logger, options) {
50
- _classCallCheck(this, ServerSentEventsTransport);
51
-
52
- this._httpClient = httpClient;
53
- this._accessTokenFactory = accessTokenFactory;
54
- this._logger = logger;
55
- this._options = options;
56
- this.onreceive = null;
57
- this.onclose = null;
58
- }
59
-
60
- _createClass(ServerSentEventsTransport, [{
61
- key: "connect",
62
- value: function () {
63
- var _connect = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(url, transferFormat) {
64
- var _this = this;
65
-
66
- var token;
67
- return _regeneratorRuntime().wrap(function _callee$(_context) {
68
- while (1) {
69
- switch (_context.prev = _context.next) {
70
- case 0:
71
- Utils.Arg.isRequired(url, "url");
72
- Utils.Arg.isRequired(transferFormat, "transferFormat");
73
- Utils.Arg.isIn(transferFormat, ITransport.TransferFormat, "transferFormat");
74
-
75
- this._logger.log(ILogger.LogLevel.Trace, "(SSE transport) Connecting."); // set url before accessTokenFactory because this.url is only for send and we set the auth header instead of the query string for send
76
-
77
-
78
- this._url = url;
79
-
80
- if (!this._accessTokenFactory) {
81
- _context.next = 10;
82
- break;
83
- }
84
-
85
- _context.next = 8;
86
- return this._accessTokenFactory();
87
-
88
- case 8:
89
- token = _context.sent;
90
-
91
- if (token) {
92
- url += (url.indexOf("?") < 0 ? "?" : "&") + "access_token=".concat(encodeURIComponent(token));
93
- }
94
-
95
- case 10:
96
- return _context.abrupt("return", new Promise(function (resolve, reject) {
97
- var opened = false;
98
-
99
- if (transferFormat !== ITransport.TransferFormat.Text) {
100
- reject(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));
101
- return;
102
- }
103
-
104
- var eventSource;
105
-
106
- if (Utils.Platform.isBrowser || Utils.Platform.isWebWorker) {
107
- eventSource = new _this._options.EventSource(url, {
108
- withCredentials: _this._options.withCredentials
109
- });
110
- } else {
111
- // Non-browser passes cookies via the dictionary
112
- var cookies = _this._httpClient.getCookieString(url);
113
-
114
- var headers = {};
115
- headers.Cookie = cookies;
116
-
117
- var _Utils$getUserAgentHe = Utils.getUserAgentHeader(),
118
- _Utils$getUserAgentHe2 = _slicedToArray(_Utils$getUserAgentHe, 2),
119
- name = _Utils$getUserAgentHe2[0],
120
- value = _Utils$getUserAgentHe2[1];
121
-
122
- headers[name] = value;
123
- eventSource = new _this._options.EventSource(url, {
124
- withCredentials: _this._options.withCredentials,
125
- headers: _objectSpread(_objectSpread({}, headers), _this._options.headers)
126
- });
127
- }
128
-
129
- try {
130
- eventSource.onmessage = function (e) {
131
- if (_this.onreceive) {
132
- try {
133
- _this._logger.log(ILogger.LogLevel.Trace, "(SSE transport) data received. ".concat(Utils.getDataDetail(e.data, _this._options.logMessageContent), "."));
134
-
135
- _this.onreceive(e.data);
136
- } catch (error) {
137
- _this._close(error);
138
-
139
- return;
140
- }
141
- }
142
- }; // @ts-ignore: not using event on purpose
143
-
144
-
145
- eventSource.onerror = function (e) {
146
- // EventSource doesn't give any useful information about server side closes.
147
- if (opened) {
148
- _this._close();
149
- } else {
150
- reject(new Error("EventSource failed to connect. The connection could not be found on the server," + " either the connection ID is not present on the server, or a proxy is refusing/buffering the connection." + " If you have multiple servers check that sticky sessions are enabled."));
151
- }
152
- };
153
-
154
- eventSource.onopen = function () {
155
- _this._logger.log(ILogger.LogLevel.Information, "SSE connected to ".concat(_this._url));
156
-
157
- _this._eventSource = eventSource;
158
- opened = true;
159
- resolve();
160
- };
161
- } catch (e) {
162
- reject(e);
163
- return;
164
- }
165
- }));
166
-
167
- case 11:
168
- case "end":
169
- return _context.stop();
170
- }
171
- }
172
- }, _callee, this);
173
- }));
174
-
175
- function connect(_x, _x2) {
176
- return _connect.apply(this, arguments);
177
- }
178
-
179
- return connect;
180
- }()
181
- }, {
182
- key: "send",
183
- value: function () {
184
- var _send = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(data) {
185
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
186
- while (1) {
187
- switch (_context2.prev = _context2.next) {
188
- case 0:
189
- if (this._eventSource) {
190
- _context2.next = 2;
191
- break;
192
- }
193
-
194
- return _context2.abrupt("return", Promise.reject(new Error("Cannot send until the transport is connected")));
195
-
196
- case 2:
197
- return _context2.abrupt("return", Utils.sendMessage(this._logger, "SSE", this._httpClient, this._url, this._accessTokenFactory, data, this._options));
198
-
199
- case 3:
200
- case "end":
201
- return _context2.stop();
202
- }
203
- }
204
- }, _callee2, this);
205
- }));
206
-
207
- function send(_x3) {
208
- return _send.apply(this, arguments);
209
- }
210
-
211
- return send;
212
- }()
213
- }, {
214
- key: "stop",
215
- value: function stop() {
216
- this._close();
217
-
218
- return Promise.resolve();
219
- }
220
- }, {
221
- key: "_close",
222
- value: function _close(e) {
223
- if (this._eventSource) {
224
- this._eventSource.close();
225
-
226
- this._eventSource = undefined;
227
-
228
- if (this.onclose) {
229
- this.onclose(e);
230
- }
231
- }
232
- }
233
- }]);
234
-
235
- return ServerSentEventsTransport;
236
- }();
237
-
238
- exports.ServerSentEventsTransport = ServerSentEventsTransport;
@@ -1,99 +0,0 @@
1
- 'use strict';
2
-
3
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
4
-
5
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
-
7
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8
-
9
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10
-
11
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
12
-
13
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
14
-
15
- Object.defineProperty(exports, '__esModule', {
16
- value: true
17
- });
18
-
19
- var Utils = require('./Utils.js'); // Licensed to the .NET Foundation under one or more agreements.
20
-
21
- /** Stream implementation to stream items to the server. */
22
-
23
-
24
- var Subject = /*#__PURE__*/function () {
25
- function Subject() {
26
- _classCallCheck(this, Subject);
27
-
28
- this.observers = [];
29
- }
30
-
31
- _createClass(Subject, [{
32
- key: "next",
33
- value: function next(item) {
34
- var _iterator = _createForOfIteratorHelper(this.observers),
35
- _step;
36
-
37
- try {
38
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
39
- var observer = _step.value;
40
- observer.next(item);
41
- }
42
- } catch (err) {
43
- _iterator.e(err);
44
- } finally {
45
- _iterator.f();
46
- }
47
- }
48
- }, {
49
- key: "error",
50
- value: function error(err) {
51
- var _iterator2 = _createForOfIteratorHelper(this.observers),
52
- _step2;
53
-
54
- try {
55
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
56
- var observer = _step2.value;
57
-
58
- if (observer.error) {
59
- observer.error(err);
60
- }
61
- }
62
- } catch (err) {
63
- _iterator2.e(err);
64
- } finally {
65
- _iterator2.f();
66
- }
67
- }
68
- }, {
69
- key: "complete",
70
- value: function complete() {
71
- var _iterator3 = _createForOfIteratorHelper(this.observers),
72
- _step3;
73
-
74
- try {
75
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
76
- var observer = _step3.value;
77
-
78
- if (observer.complete) {
79
- observer.complete();
80
- }
81
- }
82
- } catch (err) {
83
- _iterator3.e(err);
84
- } finally {
85
- _iterator3.f();
86
- }
87
- }
88
- }, {
89
- key: "subscribe",
90
- value: function subscribe(observer) {
91
- this.observers.push(observer);
92
- return new Utils.SubjectSubscription(this, observer);
93
- }
94
- }]);
95
-
96
- return Subject;
97
- }();
98
-
99
- exports.Subject = Subject;
@@ -1,45 +0,0 @@
1
- 'use strict';
2
-
3
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
-
5
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
6
-
7
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
8
-
9
- Object.defineProperty(exports, '__esModule', {
10
- value: true
11
- }); // Licensed to the .NET Foundation under one or more agreements.
12
- // The .NET Foundation licenses this file to you under the MIT license.
13
- // Not exported from index
14
-
15
- /** @private */
16
-
17
- var TextMessageFormat = /*#__PURE__*/function () {
18
- function TextMessageFormat() {
19
- _classCallCheck(this, TextMessageFormat);
20
- }
21
-
22
- _createClass(TextMessageFormat, null, [{
23
- key: "write",
24
- value: function write(output) {
25
- return "".concat(output).concat(TextMessageFormat.RecordSeparator);
26
- }
27
- }, {
28
- key: "parse",
29
- value: function parse(input) {
30
- if (input[input.length - 1] !== TextMessageFormat.RecordSeparator) {
31
- throw new Error("Message is incomplete.");
32
- }
33
-
34
- var messages = input.split(TextMessageFormat.RecordSeparator);
35
- messages.pop();
36
- return messages;
37
- }
38
- }]);
39
-
40
- return TextMessageFormat;
41
- }();
42
-
43
- TextMessageFormat.RecordSeparatorCode = 0x1e;
44
- TextMessageFormat.RecordSeparator = String.fromCharCode(TextMessageFormat.RecordSeparatorCode);
45
- exports.TextMessageFormat = TextMessageFormat;