@equinor/echo-framework 0.9.13 → 0.9.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/appLinks/applinkUtils.d.ts +2 -0
- package/dist/components/appLinks/applinkUtils.test.d.ts +1 -0
- package/dist/components/containers/layouts.d.ts +5 -3
- package/dist/components/panel/corePanelLeft.d.ts +1 -4
- package/dist/components/panel/corePanelRight.d.ts +1 -4
- package/dist/components/router/echoRoute.d.ts +2 -2
- package/dist/components/router/index.d.ts +1 -0
- package/dist/components/router/useLayout.d.ts +3 -0
- package/dist/coreApplication/index.d.ts +0 -2
- package/dist/hooks/index.d.ts +0 -2
- package/dist/index.d.ts +0 -8
- package/dist/index.js +3 -0
- package/dist/types/eventTypes/legendEvent.d.ts +1 -1
- package/dist/types/hookLibrary.d.ts +0 -1
- package/package.json +43 -39
- package/dist/_virtual/_tslib.js +0 -67
- package/dist/_virtual/index.js +0 -9
- package/dist/coreApplication/EchoBarComponent.d.ts +0 -9
- package/dist/coreApplication/EchoUserInterfaceContextProvider.d.ts +0 -11
- package/dist/hooks/useIsCompactLayout.d.ts +0 -5
- package/dist/hooks/useScreenOrientation.d.ts +0 -5
- package/dist/hooks/useScreenValues.d.ts +0 -13
- package/dist/hooks/useWindowSize.d.ts +0 -9
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +0 -25
- package/dist/node_modules/@equinor/eds-icons/dist/icons.esm.js +0 -5285
- package/dist/node_modules/@microsoft/signalr/dist/esm/AbortController.js +0 -54
- package/dist/node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js +0 -96
- package/dist/node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js +0 -47
- package/dist/node_modules/@microsoft/signalr/dist/esm/Errors.js +0 -287
- package/dist/node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js +0 -283
- package/dist/node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js +0 -86
- package/dist/node_modules/@microsoft/signalr/dist/esm/HeaderNames.js +0 -20
- package/dist/node_modules/@microsoft/signalr/dist/esm/HttpClient.js +0 -82
- package/dist/node_modules/@microsoft/signalr/dist/esm/HttpConnection.js +0 -1169
- package/dist/node_modules/@microsoft/signalr/dist/esm/HubConnection.js +0 -1346
- package/dist/node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js +0 -165
- package/dist/node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js +0 -33
- package/dist/node_modules/@microsoft/signalr/dist/esm/ILogger.js +0 -37
- package/dist/node_modules/@microsoft/signalr/dist/esm/ITransport.js +0 -37
- package/dist/node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js +0 -179
- package/dist/node_modules/@microsoft/signalr/dist/esm/Loggers.js +0 -35
- package/dist/node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js +0 -448
- package/dist/node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js +0 -238
- package/dist/node_modules/@microsoft/signalr/dist/esm/Subject.js +0 -99
- package/dist/node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js +0 -45
- package/dist/node_modules/@microsoft/signalr/dist/esm/Utils.js +0 -435
- package/dist/node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js +0 -264
- package/dist/node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js +0 -133
- package/dist/node_modules/classnames/index.js +0 -67
- package/dist/node_modules/history/esm/history.js +0 -498
- package/dist/node_modules/resolve-pathname/esm/resolve-pathname.js +0 -73
- package/dist/node_modules/style-inject/dist/style-inject.es.js +0 -36
- package/dist/node_modules/tiny-invariant/dist/tiny-invariant.esm.js +0 -23
- package/dist/node_modules/tiny-warning/dist/tiny-warning.esm.js +0 -26
- package/dist/src/components/appLinks/AppLinks.js +0 -38
- package/dist/src/components/appLinks/AppLinks.module.css.js +0 -14
- package/dist/src/components/appLinks/linkButton/linkButton.js +0 -45
- package/dist/src/components/containers/layout.module.css.js +0 -29
- package/dist/src/components/containers/layouts.js +0 -101
- package/dist/src/components/contextualAppLinks/contextualAppLinks.context.js +0 -20
- package/dist/src/components/contextualAppLinks/contextualAppLinks.js +0 -47
- package/dist/src/components/contextualAppLinks/externalAppsMenu.js +0 -157
- package/dist/src/components/contextualAppLinks/externalAppsMenu.module.css.js +0 -16
- package/dist/src/components/contextualAppLinks/externalLinkButtons/allExternalLinks.js +0 -127
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.js +0 -169
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToCommApp.js +0 -95
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToMcApp.js +0 -95
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToProCoSys.js +0 -84
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSafeX.js +0 -38
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSap.js +0 -110
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSemiDoc.js +0 -59
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToStid.js +0 -40
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.js +0 -114
- package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.js +0 -44
- package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.module.css.js +0 -15
- package/dist/src/components/contextualAppLinks/hooks/useContextualAppLinks.js +0 -52
- package/dist/src/components/contextualAppLinks/hooks/useContextualAppLinksContext.js +0 -36
- package/dist/src/components/contextualAppLinks/index.js +0 -22
- package/dist/src/components/contextualAppLinks/internalAppLinks.js +0 -115
- package/dist/src/components/contextualAppLinks/linkButton.js +0 -57
- package/dist/src/components/echoLogo/echoLogo.js +0 -30
- package/dist/src/components/echoLogo/echoLogo.module.css.js +0 -15
- package/dist/src/components/errorBoundary/components/chunkLoadErrorMessage.js +0 -64
- package/dist/src/components/errorBoundary/components/chunkLoadErrorMessage.module.css.js +0 -17
- package/dist/src/components/errorBoundary/components/errorBoundaryBaseMessage.js +0 -85
- package/dist/src/components/errorBoundary/components/errorBoundaryBaseMessage.module.css.js +0 -19
- package/dist/src/components/errorBoundary/components/notificationCardWithLogo.js +0 -55
- package/dist/src/components/errorBoundary/components/notificationCardWithLogo.module.css.js +0 -19
- package/dist/src/components/errorBoundary/errorBoundary.js +0 -100
- package/dist/src/components/externalLinkButton/externalLinkButton.js +0 -310
- package/dist/src/components/externalLinkButton/externalLinkButton.module.css.js +0 -23
- package/dist/src/components/footer/footer.js +0 -42
- package/dist/src/components/footer/footer.module.css.js +0 -17
- package/dist/src/components/lazyLoading/appLoadingIndicator.js +0 -34
- package/dist/src/components/lazyLoading/appLoadingIndicator.module.css.js +0 -15
- package/dist/src/components/lazyLoading/lazyLoadedAppWrapper.js +0 -40
- package/dist/src/components/mediator/mediator.js +0 -32
- package/dist/src/components/pageMenu/Navigation/applicationList.js +0 -35
- package/dist/src/components/pageMenu/Navigation/applicationList.module.css.js +0 -17
- package/dist/src/components/pageMenu/accordionItem.module.css.js +0 -16
- package/dist/src/components/pageMenu/defaultAccordionItem.js +0 -61
- package/dist/src/components/pageMenu/pageMenu.js +0 -141
- package/dist/src/components/pageMenu/pageMenu.module.css.js +0 -17
- package/dist/src/components/pageMenu/pageMenuDrawerItem.js +0 -77
- package/dist/src/components/pageMenu/pageMenuDrawerItem.module.css.js +0 -20
- package/dist/src/components/pageMenu/settings/asset.js +0 -40
- package/dist/src/components/pageMenu/settings/profile.js +0 -62
- package/dist/src/components/pageMenu/settings/settings.js +0 -41
- package/dist/src/components/pageMenu/settings/settings.module.css.js +0 -25
- package/dist/src/components/pageMenu/version/version.js +0 -88
- package/dist/src/components/pageMenu/version/version.module.css.js +0 -14
- package/dist/src/components/panel/corePanelIcon.js +0 -31
- package/dist/src/components/panel/corePanelLeft.js +0 -94
- package/dist/src/components/panel/corePanelLeft.module.css.js +0 -21
- package/dist/src/components/panel/corePanelRight.js +0 -98
- package/dist/src/components/panel/corePanelRight.module.css.js +0 -18
- package/dist/src/components/panelButton/panelButton.js +0 -124
- package/dist/src/components/panelButton/panelButton.module.css.js +0 -25
- package/dist/src/components/plantSelector/plantSelector.js +0 -137
- package/dist/src/components/projectSelector/ProcosysProjectSelector.js +0 -115
- package/dist/src/components/projectSelector/ProcosysProjectSelector.module.css.js +0 -14
- package/dist/src/components/realTimeData/RealTimePopoverButton.js +0 -168
- package/dist/src/components/realTimeData/components/IMSDropdown/RealTimeIMSDropdown.js +0 -83
- package/dist/src/components/realTimeData/components/IMSDropdown/RealTimeIMSDropdown.module.css.js +0 -15
- package/dist/src/components/realTimeData/components/connectorForIMSTag/IMSConnector.module.css.js +0 -17
- package/dist/src/components/realTimeData/components/connectorForIMSTag/RealTimeConnectorForIMSTag.js +0 -149
- package/dist/src/components/realTimeData/components/contextButton/RealTimeContextButton.js +0 -75
- package/dist/src/components/realTimeData/components/contextButton/RealTimeContextButton.module.css.js +0 -15
- package/dist/src/components/realTimeData/components/contextPopover/Popover.js +0 -37
- package/dist/src/components/realTimeData/components/contextPopover/Popover.module.css.js +0 -15
- package/dist/src/components/realTimeData/hooks/useRealTimeHub.js +0 -124
- package/dist/src/components/realTimeData/hooks/useSignalR.js +0 -175
- package/dist/src/components/realTimeData/hooks/useSignalRListener.js +0 -22
- package/dist/src/components/router/echoRoute.js +0 -51
- package/dist/src/components/router/echoRouter.js +0 -30
- package/dist/src/components/router/echoWrapper.js +0 -33
- package/dist/src/components/router/routes.js +0 -43
- package/dist/src/components/searchMenu/searchMenu.js +0 -46
- package/dist/src/components/searchMenu/searchMenu.module.css.js +0 -16
- package/dist/src/components/tagNumber/tagNo.module.css.js +0 -14
- package/dist/src/components/tagNumber/tagNumber.js +0 -38
- package/dist/src/components/toaster/toaster.js +0 -44
- package/dist/src/components/toaster/toaster.module.css.js +0 -16
- package/dist/src/components/toaster/toasters.js +0 -101
- package/dist/src/coreApplication/EchoBarComponent.js +0 -164
- package/dist/src/coreApplication/EchoContent.js +0 -52
- package/dist/src/coreApplication/EchoContent.module.css.js +0 -17
- package/dist/src/coreApplication/EchoContentPanels.js +0 -40
- package/dist/src/coreApplication/EchoEventHandler.js +0 -79
- package/dist/src/coreApplication/EchoEventHandler.module.css.js +0 -14
- package/dist/src/coreApplication/EchoUserInterfaceContextProvider.js +0 -66
- package/dist/src/globalStyles.css.js +0 -6
- package/dist/src/hooks/hookLibrary.js +0 -86
- package/dist/src/hooks/index.js +0 -18
- package/dist/src/hooks/useEchoHistory.js +0 -38
- package/dist/src/hooks/useIsCompactLayout.js +0 -50
- package/dist/src/hooks/useLongPress.js +0 -37
- package/dist/src/hooks/useScreenOrientation.js +0 -62
- package/dist/src/hooks/useScreenValues.js +0 -35
- package/dist/src/hooks/useSemi.js +0 -100
- package/dist/src/hooks/useTagDetails.js +0 -153
- package/dist/src/hooks/useWindowSize.js +0 -62
- package/dist/src/icons/common/CommissionApp-icon.png.js +0 -7
- package/dist/src/icons/common/Evision.svg.js +0 -68
- package/dist/src/icons/common/Fusion.svg.js +0 -111
- package/dist/src/icons/common/McApp.svg.js +0 -70
- package/dist/src/icons/common/Notification.svg.js +0 -81
- package/dist/src/icons/common/ProCoSysIcon.svg.js +0 -68
- package/dist/src/icons/common/Robim.svg.js +0 -66
- package/dist/src/icons/common/SX-logo.png.js +0 -7
- package/dist/src/icons/common/SapLogo.svg.js +0 -95
- package/dist/src/icons/common/SemiIcon.svg.js +0 -82
- package/dist/src/icons/common/Stid.svg.js +0 -65
- package/dist/src/icons/common/TR2000.svg.js +0 -73
- package/dist/src/icons/common/WorkOrder.svg.js +0 -71
- package/dist/src/icons/common/Yammer.svg.js +0 -65
- package/dist/src/icons/common/satos-logo.png.js +0 -7
- package/dist/src/icons/edsIons.js +0 -15
- package/dist/src/icons/equinor-logo.js +0 -62
- package/dist/src/icons/logo_ee.js +0 -37
- package/dist/src/icons/search.js +0 -35
- package/dist/src/index.js +0 -218
- package/dist/src/index2.js +0 -205
- package/dist/src/services/api/api-manager.js +0 -190
- package/dist/src/services/api/api-plantinfo.js +0 -196
- package/dist/src/services/api/api-plants.js +0 -75
- package/dist/src/services/api/api-realtimedata.js +0 -55
- package/dist/src/services/api/api-tag-details.js +0 -69
- package/dist/src/services/api/api-tags.js +0 -88
- package/dist/src/services/api/api-version.js +0 -124
- package/dist/src/services/componentRegistry/componentRegistry.js +0 -69
- package/dist/src/services/echopediaAnalyticsModule/echopediaAnalyticsModule.js +0 -10
- package/dist/src/services/eventCallbacks/plantChanged.js +0 -42
- package/dist/src/services/eventHubActions/toastActions.js +0 -18
- package/dist/src/theme/themeConst.js +0 -75
- package/dist/src/types/extensions.js +0 -10
- package/dist/src/types/legend.js +0 -58
- package/dist/src/types/pingableSources.js +0 -11
- package/dist/src/utils/copyText.js +0 -67
- package/dist/src/utils/eventHandlerUtils.js +0 -11
- package/dist/src/utils/legendUtils.js +0 -168
- package/dist/src/utils/navigationUtils.js +0 -28
- package/dist/src/utils/plantInfo.js +0 -535
- package/dist/src/utils/plantsDataUtils.js +0 -35
- package/dist/src/utils/projectSelectorUtils.js +0 -19
- package/dist/src/utils/startup.js +0 -89
- package/dist/src/utils/taskCache.js +0 -89
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4
|
-
|
|
5
|
-
function _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); }
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, '__esModule', {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
var _tslib = require('../../../../_virtual/_tslib.js');
|
|
12
|
-
|
|
13
|
-
var EchoUtils = require('@equinor/echo-utils');
|
|
14
|
-
|
|
15
|
-
var React = require('react');
|
|
16
|
-
|
|
17
|
-
var pingableSources = require('../../../types/pingableSources.js');
|
|
18
|
-
|
|
19
|
-
var externalLinkButton = require('../../externalLinkButton/externalLinkButton.js');
|
|
20
|
-
|
|
21
|
-
var externalLinkButtons_helpers = require('./externalLinkButtons.helpers.js');
|
|
22
|
-
|
|
23
|
-
function _interopDefaultLegacy(e) {
|
|
24
|
-
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
25
|
-
'default': e
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
var EchoUtils__default = /*#__PURE__*/_interopDefaultLegacy(EchoUtils);
|
|
30
|
-
|
|
31
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
32
|
-
/**
|
|
33
|
-
* External link button to SAP.
|
|
34
|
-
* Will only render if the passed tagNo has any tag details in the actually selected plant and SAP is available.
|
|
35
|
-
* It pings SAP to determine whether is available or not.
|
|
36
|
-
*
|
|
37
|
-
* @param {string} tagNo The tag's number to open in SAP.
|
|
38
|
-
* @param {string} instCode Plant installation code.
|
|
39
|
-
* @param {(isLoading: boolean) => void} loadingStatusCallback Callback which provides an 'isLoading' param reflecting the actual loading state of the ping to SAP.
|
|
40
|
-
* @returns {React.FC<ExternalLinkToSapProps>} React component.
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var ExternalLinkToSap = function ExternalLinkToSap(_ref) {
|
|
45
|
-
var tagNo = _ref.tagNo,
|
|
46
|
-
instCode = _ref.instCode,
|
|
47
|
-
loadingStatusCallback = _ref.loadingStatusCallback;
|
|
48
|
-
var _EchoUtils__default$d = EchoUtils__default["default"].Hooks,
|
|
49
|
-
usePing = _EchoUtils__default$d.usePing,
|
|
50
|
-
useIsIosDevice = _EchoUtils__default$d.useIsIosDevice;
|
|
51
|
-
|
|
52
|
-
var _usePing = usePing(pingableSources.PingableSources.Sap),
|
|
53
|
-
isSourceAvailable = _usePing.isSourceAvailable,
|
|
54
|
-
isPingLoading = _usePing.isPingLoading;
|
|
55
|
-
|
|
56
|
-
var isIosDevice = useIsIosDevice();
|
|
57
|
-
|
|
58
|
-
function createUrl(params) {
|
|
59
|
-
return _tslib.__awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
60
|
-
var _yield$externalLinkBu, tagDetails, hasError;
|
|
61
|
-
|
|
62
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
63
|
-
while (1) {
|
|
64
|
-
switch (_context.prev = _context.next) {
|
|
65
|
-
case 0:
|
|
66
|
-
_context.next = 2;
|
|
67
|
-
return externalLinkButtons_helpers.getTagDetailsWithErrorHandling({
|
|
68
|
-
tagNo: params.tagNo,
|
|
69
|
-
instCode: params.instCode
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
case 2:
|
|
73
|
-
_yield$externalLinkBu = _context.sent;
|
|
74
|
-
tagDetails = _yield$externalLinkBu.tagDetails;
|
|
75
|
-
hasError = _yield$externalLinkBu.hasError;
|
|
76
|
-
return _context.abrupt("return", hasError ? undefined : "https://p03web.statoil.no/sap/bc/gui/sap/its/webgui?sap-client=505&sap-language=EN&~transaction=*ih06%20STRNO-LOW=".concat(tagDetails === null || tagDetails === void 0 ? void 0 : tagDetails.plantNo, "-").concat(tagNo, "#"));
|
|
77
|
-
|
|
78
|
-
case 6:
|
|
79
|
-
case "end":
|
|
80
|
-
return _context.stop();
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}, _callee);
|
|
84
|
-
}));
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
React.useEffect(function () {
|
|
88
|
-
if (!!loadingStatusCallback) {
|
|
89
|
-
loadingStatusCallback(isPingLoading);
|
|
90
|
-
}
|
|
91
|
-
}, [isPingLoading, loadingStatusCallback]);
|
|
92
|
-
|
|
93
|
-
if (!isIosDevice && !isSourceAvailable) {
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return /*#__PURE__*/React__default["default"].createElement(externalLinkButton.ExternalLinkButton, {
|
|
98
|
-
buttonName: "Sap",
|
|
99
|
-
buttonIcon: "Sap",
|
|
100
|
-
getUrlToOpen: function getUrlToOpen() {
|
|
101
|
-
return createUrl({
|
|
102
|
-
tagNo: tagNo,
|
|
103
|
-
instCode: instCode
|
|
104
|
-
});
|
|
105
|
-
},
|
|
106
|
-
buttonStyle: externalLinkButton.ExternalLinkButtonStyle.Rounded
|
|
107
|
-
});
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
exports.ExternalLinkToSap = ExternalLinkToSap;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, '__esModule', {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
var React = require('react');
|
|
10
|
-
|
|
11
|
-
var useSemi = require('../../../hooks/useSemi.js');
|
|
12
|
-
|
|
13
|
-
var externalLinkButton = require('../../externalLinkButton/externalLinkButton.js');
|
|
14
|
-
|
|
15
|
-
function _interopDefaultLegacy(e) {
|
|
16
|
-
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
17
|
-
'default': e
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
|
-
/**
|
|
23
|
-
* External link button to SemiDoc.
|
|
24
|
-
* Will only render if Semi is available for the passed tagNo.
|
|
25
|
-
*
|
|
26
|
-
* @param {string} tagNo The tag's number to open in Semi.
|
|
27
|
-
* @param {string} instCode Plant installation code.
|
|
28
|
-
* @param {(isLoading: boolean) => void} loadingStatusCallback Callback which provides an 'isLoading' param reflecting the actual API call state for checking Semi availability.
|
|
29
|
-
* @returns {React.FC<ExternalLinkToSemiDocProps>} React component.
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var ExternalLinkToSemiDoc = function ExternalLinkToSemiDoc(_ref) {
|
|
34
|
-
var tagNo = _ref.tagNo,
|
|
35
|
-
instCode = _ref.instCode,
|
|
36
|
-
loadingStatusCallback = _ref.loadingStatusCallback;
|
|
37
|
-
|
|
38
|
-
var _useSemi$useSemi = useSemi.useSemi({
|
|
39
|
-
tagNo: tagNo,
|
|
40
|
-
instCode: instCode
|
|
41
|
-
}),
|
|
42
|
-
isSemiDocumentAvailable = _useSemi$useSemi.isSemiDocumentAvailable,
|
|
43
|
-
semiDocumentId = _useSemi$useSemi.semiDocumentId,
|
|
44
|
-
isSemiLoading = _useSemi$useSemi.isSemiLoading;
|
|
45
|
-
|
|
46
|
-
React.useEffect(function () {
|
|
47
|
-
if (!!loadingStatusCallback) {
|
|
48
|
-
loadingStatusCallback(isSemiLoading);
|
|
49
|
-
}
|
|
50
|
-
}, [isSemiLoading, loadingStatusCallback]);
|
|
51
|
-
return isSemiDocumentAvailable && !isSemiLoading ? /*#__PURE__*/React__default["default"].createElement(externalLinkButton.ExternalLinkButton, {
|
|
52
|
-
buttonName: "Semi",
|
|
53
|
-
buttonIcon: "Semi",
|
|
54
|
-
linkTo: "https://semi.equinor.com/uploaddocumentation?semiId=".concat(semiDocumentId),
|
|
55
|
-
buttonStyle: externalLinkButton.ExternalLinkButtonStyle.Rounded
|
|
56
|
-
}) : null;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
exports.ExternalLinkToSemiDoc = ExternalLinkToSemiDoc;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, '__esModule', {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
var React = require('react');
|
|
10
|
-
|
|
11
|
-
var externalLinkButton = require('../../externalLinkButton/externalLinkButton.js');
|
|
12
|
-
|
|
13
|
-
function _interopDefaultLegacy(e) {
|
|
14
|
-
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
15
|
-
'default': e
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
20
|
-
/**
|
|
21
|
-
* External link button to Stid.
|
|
22
|
-
*
|
|
23
|
-
* @param {string} tagNo The tag's number to open in Stid.
|
|
24
|
-
* @param {string} instCode Plant installation code.
|
|
25
|
-
* @returns {React.FC<ExternalLinkToStidProps>} React component.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var ExternalLinkToStid = function ExternalLinkToStid(_ref) {
|
|
30
|
-
var tagNo = _ref.tagNo,
|
|
31
|
-
instCode = _ref.instCode;
|
|
32
|
-
return /*#__PURE__*/React__default["default"].createElement(externalLinkButton.ExternalLinkButton, {
|
|
33
|
-
buttonName: "STID",
|
|
34
|
-
buttonIcon: "Stid",
|
|
35
|
-
linkTo: "https://stid.equinor.com/".concat(instCode, "/tag/").concat(tagNo),
|
|
36
|
-
buttonStyle: externalLinkButton.ExternalLinkButtonStyle.Rounded
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
exports.ExternalLinkToStid = ExternalLinkToStid;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
-
|
|
5
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
|
|
7
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
-
|
|
9
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
10
|
-
|
|
11
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
12
|
-
|
|
13
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
-
|
|
15
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
16
|
-
|
|
17
|
-
Object.defineProperty(exports, '__esModule', {
|
|
18
|
-
value: true
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
var EchoCore = require('@equinor/echo-core');
|
|
22
|
-
|
|
23
|
-
var EchoUtils = require('@equinor/echo-utils');
|
|
24
|
-
|
|
25
|
-
var React = require('react');
|
|
26
|
-
|
|
27
|
-
require('react-router-dom');
|
|
28
|
-
|
|
29
|
-
var useTagDetails = require('../../../hooks/useTagDetails.js');
|
|
30
|
-
|
|
31
|
-
var externalLinkButton = require('../../externalLinkButton/externalLinkButton.js');
|
|
32
|
-
|
|
33
|
-
function _interopDefaultLegacy(e) {
|
|
34
|
-
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
35
|
-
'default': e
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
var EchoUtils__default = /*#__PURE__*/_interopDefaultLegacy(EchoUtils);
|
|
40
|
-
|
|
41
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
42
|
-
/**
|
|
43
|
-
* External link button to TR2000.
|
|
44
|
-
* Will only render if the actually selected plant has TR2000.
|
|
45
|
-
*
|
|
46
|
-
* @param {string} tagNo The tag's number to open in TR2000.
|
|
47
|
-
* @param {string} instCode Plant installation code.
|
|
48
|
-
* @param {(isLoading: boolean) => void} loadingStatusCallback Callback which provides an 'isLoading' param reflecting the actual API call state for checking TR2000 availability.
|
|
49
|
-
* @returns {React.FC<ExternalLinkToTr2000Props>} React component.
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
var ExternalLinkToTr2000 = function ExternalLinkToTr2000(_ref) {
|
|
54
|
-
var tagNo = _ref.tagNo,
|
|
55
|
-
instCode = _ref.instCode,
|
|
56
|
-
loadingStatusCallback = _ref.loadingStatusCallback;
|
|
57
|
-
var useStateSafe = EchoUtils__default["default"].Hooks.useStateSafe;
|
|
58
|
-
var selectedPlant = EchoCore.EchoSettings.plant.getSelectedPlant();
|
|
59
|
-
|
|
60
|
-
var _useStateSafe = useStateSafe(''),
|
|
61
|
-
_useStateSafe2 = _slicedToArray(_useStateSafe, 2),
|
|
62
|
-
url = _useStateSafe2[0],
|
|
63
|
-
setUrl = _useStateSafe2[1];
|
|
64
|
-
|
|
65
|
-
var _useStateSafe3 = useStateSafe(false),
|
|
66
|
-
_useStateSafe4 = _slicedToArray(_useStateSafe3, 2),
|
|
67
|
-
hasTr2000 = _useStateSafe4[0],
|
|
68
|
-
setHasTr2000 = _useStateSafe4[1];
|
|
69
|
-
|
|
70
|
-
var _useTagDetails$useTag = useTagDetails.useTagDetails({
|
|
71
|
-
tagNo: tagNo,
|
|
72
|
-
instCode: instCode
|
|
73
|
-
}),
|
|
74
|
-
tagDetails = _useTagDetails$useTag.tagDetails,
|
|
75
|
-
hasError = _useTagDetails$useTag.hasError,
|
|
76
|
-
isTagDetailsLoading = _useTagDetails$useTag.isTagDetailsLoading;
|
|
77
|
-
|
|
78
|
-
React.useEffect(function () {
|
|
79
|
-
function evaluateTr2000Status(tagDetails) {
|
|
80
|
-
var valveOk = (tagDetails === null || tagDetails === void 0 ? void 0 : tagDetails.tagCategory) === 9 && !!tagDetails.valveDatash;
|
|
81
|
-
var pipeOk = (tagDetails === null || tagDetails === void 0 ? void 0 : tagDetails.tagCategory) === 6 && !!tagDetails.pipingClass && !!tagDetails.nomDiam;
|
|
82
|
-
return (valveOk || pipeOk) && !!(selectedPlant === null || selectedPlant === void 0 ? void 0 : selectedPlant.hasTr2000);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (!!loadingStatusCallback) {
|
|
86
|
-
loadingStatusCallback(isTagDetailsLoading);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (hasError) {
|
|
90
|
-
setHasTr2000(false);
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
setHasTr2000(evaluateTr2000Status(tagDetails));
|
|
95
|
-
|
|
96
|
-
if (hasTr2000) {
|
|
97
|
-
var ds = (tagDetails === null || tagDetails === void 0 ? void 0 : tagDetails.tagCategory) === 6 ? 'PCS' : 'VDS';
|
|
98
|
-
var id = (tagDetails === null || tagDetails === void 0 ? void 0 : tagDetails.tagCategory) === 6 ? tagDetails.pipingClass : tagDetails === null || tagDetails === void 0 ? void 0 : tagDetails.valveDatash;
|
|
99
|
-
setUrl("https://tr2000.equinor.com/TR2000/integration/get_datasheet.jsp?SYS=STID&DS=".concat(ds, "&ID=").concat(id, "&PLANT=").concat(instCode));
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
if (!!loadingStatusCallback) {
|
|
103
|
-
loadingStatusCallback(isTagDetailsLoading);
|
|
104
|
-
}
|
|
105
|
-
}, [tagNo, instCode, loadingStatusCallback, setUrl, setHasTr2000, isTagDetailsLoading, tagDetails, hasError, hasTr2000, selectedPlant]);
|
|
106
|
-
return hasTr2000 && !hasError ? /*#__PURE__*/React__default["default"].createElement(externalLinkButton.ExternalLinkButton, {
|
|
107
|
-
buttonName: "TR2000",
|
|
108
|
-
buttonIcon: "TR2000",
|
|
109
|
-
linkTo: url,
|
|
110
|
-
buttonStyle: externalLinkButton.ExternalLinkButtonStyle.Rounded
|
|
111
|
-
}) : null;
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
exports.ExternalLinkToTr2000 = ExternalLinkToTr2000;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, '__esModule', {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
var edsCoreReact = require('@equinor/eds-core-react');
|
|
10
|
-
|
|
11
|
-
var React = require('react');
|
|
12
|
-
|
|
13
|
-
var iconButtonSpinner_module = require('./iconButtonSpinner.module.css.js');
|
|
14
|
-
|
|
15
|
-
function _interopDefaultLegacy(e) {
|
|
16
|
-
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
17
|
-
'default': e
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
|
-
/**
|
|
23
|
-
* Local component for external link buttons. Provides a spinner overlay for any icon buttons, which might have any async calls.
|
|
24
|
-
* @param {Object} param
|
|
25
|
-
* @param {number} param.size The size of the spinner. Default value is 24.
|
|
26
|
-
* @param {Object} param.customClassNames Optional custom class names to customize the component's parts.
|
|
27
|
-
* @param {string} param.customClassNames.spinner Class name applied on the spinner.
|
|
28
|
-
* @param {string} param.customClassNames.container Class name applied on the container element.
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var IconButtonSpinner = function IconButtonSpinner(_ref) {
|
|
33
|
-
var customClassNames = _ref.customClassNames,
|
|
34
|
-
size = _ref.size;
|
|
35
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
36
|
-
className: "".concat((customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.container) || '', " ").concat(iconButtonSpinner_module["default"].container)
|
|
37
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
38
|
-
className: "".concat((customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.spinner) || '', " ").concat(iconButtonSpinner_module["default"].spinner)
|
|
39
|
-
}, /*#__PURE__*/React__default["default"].createElement(edsCoreReact.Progress.Circular, {
|
|
40
|
-
size: size || 24
|
|
41
|
-
})));
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
exports.IconButtonSpinner = IconButtonSpinner;
|
package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.module.css.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var styleInject_es = require('../../../../node_modules/style-inject/dist/style-inject.es.js');
|
|
8
|
-
|
|
9
|
-
var css_248z = ".iconButtonSpinner-module_container__56QXT{height:48px;position:relative;width:48px}.iconButtonSpinner-module_spinner__Rym9p{position:relative;text-align:center;top:50%;transform:translateY(-50%)}";
|
|
10
|
-
var styles = {
|
|
11
|
-
"container": "iconButtonSpinner-module_container__56QXT",
|
|
12
|
-
"spinner": "iconButtonSpinner-module_spinner__Rym9p"
|
|
13
|
-
};
|
|
14
|
-
styleInject_es["default"](css_248z);
|
|
15
|
-
exports["default"] = styles;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, '__esModule', {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
var EchoCore = require('@equinor/echo-core');
|
|
10
|
-
|
|
11
|
-
var extensions = require('../../../types/extensions.js');
|
|
12
|
-
|
|
13
|
-
function _interopDefaultLegacy(e) {
|
|
14
|
-
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
15
|
-
'default': e
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
var EchoCore__default = /*#__PURE__*/_interopDefaultLegacy(EchoCore);
|
|
20
|
-
/**
|
|
21
|
-
* Gets the registered extensions for ContextualAppLinks component from the Core App State.
|
|
22
|
-
*
|
|
23
|
-
* @param params Optional. If not provided, the hook will return with all extensions for this component.
|
|
24
|
-
* @param {boolean} params.onlyExternalLinks Optional - set this to true to get external app links only.
|
|
25
|
-
* @param {boolean} params.onlyInternalLinks Optional - set this to true to get internal app links only.
|
|
26
|
-
* @returns
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
function useContextualAppLinks(params) {
|
|
31
|
-
var extensions$1 = EchoCore__default["default"].hooks.useExtensionsByComponentName(extensions.ExtendableComponentName.ContextualAppLinks);
|
|
32
|
-
|
|
33
|
-
if (params === null || params === void 0 ? void 0 : params.onlyExternalLinks) {
|
|
34
|
-
return extensions$1.filter(function (navExtensionItem) {
|
|
35
|
-
var _a;
|
|
36
|
-
|
|
37
|
-
return (_a = navExtensionItem.options) === null || _a === void 0 ? void 0 : _a.isExternalLink;
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (params === null || params === void 0 ? void 0 : params.onlyInternalLinks) {
|
|
42
|
-
return extensions$1.filter(function (navExtensionItem) {
|
|
43
|
-
var _a;
|
|
44
|
-
|
|
45
|
-
return !((_a = navExtensionItem.options) === null || _a === void 0 ? void 0 : _a.isExternalLink);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return extensions$1;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
exports.useContextualAppLinks = useContextualAppLinks;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, '__esModule', {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
var echoBase = require('@equinor/echo-base');
|
|
10
|
-
|
|
11
|
-
var React = require('react');
|
|
12
|
-
|
|
13
|
-
var contextualAppLinks_context = require('../contextualAppLinks.context.js');
|
|
14
|
-
|
|
15
|
-
function _interopDefaultLegacy(e) {
|
|
16
|
-
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
17
|
-
'default': e
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
|
-
|
|
23
|
-
function useContextualAppLinksContext() {
|
|
24
|
-
var context = React__default["default"].useContext(contextualAppLinks_context.AppLinksContext);
|
|
25
|
-
|
|
26
|
-
if (!context) {
|
|
27
|
-
throw new echoBase.BaseError({
|
|
28
|
-
name: 'CompoundComponentOutsideContextError',
|
|
29
|
-
message: '[EchoFramework.useContextualAppLinksContext] ContextualAppLinks compound components cannot be rendered outside the ContextualAppLinks component'
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return Object.assign({}, context);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
exports.useContextualAppLinksContext = useContextualAppLinksContext;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var contextualAppLinks = require('./contextualAppLinks.js');
|
|
8
|
-
|
|
9
|
-
var externalAppsMenu = require('./externalAppsMenu.js');
|
|
10
|
-
|
|
11
|
-
var allExternalLinks = require('./externalLinkButtons/allExternalLinks.js');
|
|
12
|
-
|
|
13
|
-
var internalAppLinks = require('./internalAppLinks.js');
|
|
14
|
-
|
|
15
|
-
var linkButton = require('./linkButton.js');
|
|
16
|
-
|
|
17
|
-
var ContextualAppLinks = contextualAppLinks["default"];
|
|
18
|
-
ContextualAppLinks.InternalApps = internalAppLinks.InternalAppLinks;
|
|
19
|
-
ContextualAppLinks.ExternalAppsMenu = externalAppsMenu.ExternalAppsMenu;
|
|
20
|
-
ContextualAppLinks.LinkButton = linkButton.LinkButton;
|
|
21
|
-
ContextualAppLinks.AllExternalApps = allExternalLinks.AllExternalLinks;
|
|
22
|
-
exports.ContextualAppLinks = ContextualAppLinks;
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, '__esModule', {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
var _tslib = require('../../../_virtual/_tslib.js');
|
|
10
|
-
|
|
11
|
-
var EchoCore = require('@equinor/echo-core');
|
|
12
|
-
|
|
13
|
-
var EchoUtils = require('@equinor/echo-utils');
|
|
14
|
-
|
|
15
|
-
var React = require('react');
|
|
16
|
-
|
|
17
|
-
var useContextualAppLinks = require('./hooks/useContextualAppLinks.js');
|
|
18
|
-
|
|
19
|
-
var useContextualAppLinksContext = require('./hooks/useContextualAppLinksContext.js');
|
|
20
|
-
|
|
21
|
-
var linkButton = require('./linkButton.js');
|
|
22
|
-
|
|
23
|
-
function _interopDefaultLegacy(e) {
|
|
24
|
-
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
25
|
-
'default': e
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
var EchoUtils__default = /*#__PURE__*/_interopDefaultLegacy(EchoUtils);
|
|
30
|
-
|
|
31
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
32
|
-
/**
|
|
33
|
-
* Wrapper component for internal, Echo application links. To be used inside ContextualAppLinks component.
|
|
34
|
-
* This component is extendable: renders any Echo app link component, which is registered in the EchoCore application state.
|
|
35
|
-
*
|
|
36
|
-
* @param {InternalAppLinksProps} props
|
|
37
|
-
* @param {React.ReactNode} props.children Optional. Passed children will be rendred after the app link extensions.
|
|
38
|
-
* @param {Object} props.options Optional prop: pass custom options to alter the components behaviour.
|
|
39
|
-
* @param {string[]} props.options.hiddenAppKeys List of registered, app link extenesion keys. Each registered component with a matched key will be hidden.
|
|
40
|
-
* @param {[key: string]: unknown} ...rest: All other props will be passed to registered app links extension components, and to the isVisible() => boolean function for those components
|
|
41
|
-
* @returns {React.FC<InternalAppLinksProps>} React component.
|
|
42
|
-
*
|
|
43
|
-
* @throws {BaseError} If used outside of ContextualAppLinks compound component - requires react context provided by it.
|
|
44
|
-
*
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
var InternalAppLinks = function InternalAppLinks(_a) {
|
|
49
|
-
var children = _a.children,
|
|
50
|
-
options = _a.options,
|
|
51
|
-
rest = _tslib.__rest(_a, ["children", "options"]);
|
|
52
|
-
|
|
53
|
-
var goToInternalLink = EchoCore.useInternalLink();
|
|
54
|
-
var isSmallScreen = EchoUtils__default["default"].Hooks.useIsSmallScreen();
|
|
55
|
-
var registeredInternalAppLinks = useContextualAppLinks.useContextualAppLinks({
|
|
56
|
-
onlyInternalLinks: true
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
var _useContextualAppLink = useContextualAppLinksContext.useContextualAppLinksContext(),
|
|
60
|
-
tag = _useContextualAppLink.tag,
|
|
61
|
-
instCode = _useContextualAppLink.instCode;
|
|
62
|
-
|
|
63
|
-
function navigateToInternalApp(event, appPath) {
|
|
64
|
-
goToInternalLink(appPath, {
|
|
65
|
-
params: "?instCode=".concat(instCode, "&tagNo=").concat(tag.tagNo, "&search=").concat(tag.tagNo, "&refresh=true")
|
|
66
|
-
});
|
|
67
|
-
event.stopPropagation();
|
|
68
|
-
|
|
69
|
-
if (isSmallScreen) {
|
|
70
|
-
EchoCore.setActivePanel('');
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function renderNavIcon(extension) {
|
|
75
|
-
var hiddenAppKeys = (options === null || options === void 0 ? void 0 : options.hiddenAppKeys) || [];
|
|
76
|
-
var PreDefinedNavIconComponent = extension.component;
|
|
77
|
-
|
|
78
|
-
var _ref = extension.options || {},
|
|
79
|
-
label = _ref.label,
|
|
80
|
-
iconName = _ref.iconName,
|
|
81
|
-
appPath = _ref.appPath;
|
|
82
|
-
|
|
83
|
-
var isHiddenByProps = hiddenAppKeys.includes(extension.key);
|
|
84
|
-
|
|
85
|
-
if (PreDefinedNavIconComponent) {
|
|
86
|
-
return /*#__PURE__*/React__default["default"].createElement(PreDefinedNavIconComponent, Object.assign({
|
|
87
|
-
tag: tag,
|
|
88
|
-
instCode: instCode,
|
|
89
|
-
key: extension.key
|
|
90
|
-
}, rest));
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
if (iconName && !isHiddenByProps && (extension.isVisible && extension.isVisible(Object.assign({
|
|
94
|
-
tag: tag,
|
|
95
|
-
instCode: instCode
|
|
96
|
-
}, rest)) || !extension.isVisible)) {
|
|
97
|
-
return /*#__PURE__*/React__default["default"].createElement(linkButton.LinkButton, {
|
|
98
|
-
key: extension.key,
|
|
99
|
-
label: label,
|
|
100
|
-
onClick: function onClick(event) {
|
|
101
|
-
return navigateToInternalApp(event, appPath || '/');
|
|
102
|
-
},
|
|
103
|
-
iconName: iconName
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return null;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, registeredInternalAppLinks.map(function (internalAppLink) {
|
|
111
|
-
return renderNavIcon(internalAppLink);
|
|
112
|
-
}), children);
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
exports.InternalAppLinks = InternalAppLinks;
|