@equinor/echo-framework 0.9.13 → 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.
- 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/hookLibrary.d.ts +0 -1
- package/package.json +42 -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,165 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
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; }
|
|
4
|
-
|
|
5
|
-
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; }
|
|
6
|
-
|
|
7
|
-
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; }
|
|
8
|
-
|
|
9
|
-
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); }
|
|
10
|
-
|
|
11
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12
|
-
|
|
13
|
-
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); } }
|
|
14
|
-
|
|
15
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
-
|
|
17
|
-
Object.defineProperty(exports, '__esModule', {
|
|
18
|
-
value: true
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
var DefaultReconnectPolicy = require('./DefaultReconnectPolicy.js');
|
|
22
|
-
|
|
23
|
-
var HttpConnection = require('./HttpConnection.js');
|
|
24
|
-
|
|
25
|
-
var HubConnection = require('./HubConnection.js');
|
|
26
|
-
|
|
27
|
-
var ILogger = require('./ILogger.js');
|
|
28
|
-
|
|
29
|
-
var JsonHubProtocol = require('./JsonHubProtocol.js');
|
|
30
|
-
|
|
31
|
-
var Loggers = require('./Loggers.js');
|
|
32
|
-
|
|
33
|
-
var Utils = require('./Utils.js'); // Licensed to the .NET Foundation under one or more agreements.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var LogLevelNameMapping = {
|
|
37
|
-
trace: ILogger.LogLevel.Trace,
|
|
38
|
-
debug: ILogger.LogLevel.Debug,
|
|
39
|
-
info: ILogger.LogLevel.Information,
|
|
40
|
-
information: ILogger.LogLevel.Information,
|
|
41
|
-
warn: ILogger.LogLevel.Warning,
|
|
42
|
-
warning: ILogger.LogLevel.Warning,
|
|
43
|
-
error: ILogger.LogLevel.Error,
|
|
44
|
-
critical: ILogger.LogLevel.Critical,
|
|
45
|
-
none: ILogger.LogLevel.None
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
function parseLogLevel(name) {
|
|
49
|
-
// Case-insensitive matching via lower-casing
|
|
50
|
-
// Yes, I know case-folding is a complicated problem in Unicode, but we only support
|
|
51
|
-
// the ASCII strings defined in LogLevelNameMapping anyway, so it's fine -anurse.
|
|
52
|
-
var mapping = LogLevelNameMapping[name.toLowerCase()];
|
|
53
|
-
|
|
54
|
-
if (typeof mapping !== "undefined") {
|
|
55
|
-
return mapping;
|
|
56
|
-
} else {
|
|
57
|
-
throw new Error("Unknown log level: ".concat(name));
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
/** A builder for configuring {@link @microsoft/signalr.HubConnection} instances. */
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
var HubConnectionBuilder = /*#__PURE__*/function () {
|
|
64
|
-
function HubConnectionBuilder() {
|
|
65
|
-
_classCallCheck(this, HubConnectionBuilder);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
_createClass(HubConnectionBuilder, [{
|
|
69
|
-
key: "configureLogging",
|
|
70
|
-
value: function configureLogging(logging) {
|
|
71
|
-
Utils.Arg.isRequired(logging, "logging");
|
|
72
|
-
|
|
73
|
-
if (isLogger(logging)) {
|
|
74
|
-
this.logger = logging;
|
|
75
|
-
} else if (typeof logging === "string") {
|
|
76
|
-
var logLevel = parseLogLevel(logging);
|
|
77
|
-
this.logger = new Utils.ConsoleLogger(logLevel);
|
|
78
|
-
} else {
|
|
79
|
-
this.logger = new Utils.ConsoleLogger(logging);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return this;
|
|
83
|
-
}
|
|
84
|
-
}, {
|
|
85
|
-
key: "withUrl",
|
|
86
|
-
value: function withUrl(url, transportTypeOrOptions) {
|
|
87
|
-
Utils.Arg.isRequired(url, "url");
|
|
88
|
-
Utils.Arg.isNotEmpty(url, "url");
|
|
89
|
-
this.url = url; // Flow-typing knows where it's at. Since HttpTransportType is a number and IHttpConnectionOptions is guaranteed
|
|
90
|
-
// to be an object, we know (as does TypeScript) this comparison is all we need to figure out which overload was called.
|
|
91
|
-
|
|
92
|
-
if (_typeof(transportTypeOrOptions) === "object") {
|
|
93
|
-
this.httpConnectionOptions = _objectSpread(_objectSpread({}, this.httpConnectionOptions), transportTypeOrOptions);
|
|
94
|
-
} else {
|
|
95
|
-
this.httpConnectionOptions = _objectSpread(_objectSpread({}, this.httpConnectionOptions), {}, {
|
|
96
|
-
transport: transportTypeOrOptions
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return this;
|
|
101
|
-
}
|
|
102
|
-
/** Configures the {@link @microsoft/signalr.HubConnection} to use the specified Hub Protocol.
|
|
103
|
-
*
|
|
104
|
-
* @param {IHubProtocol} protocol The {@link @microsoft/signalr.IHubProtocol} implementation to use.
|
|
105
|
-
*/
|
|
106
|
-
|
|
107
|
-
}, {
|
|
108
|
-
key: "withHubProtocol",
|
|
109
|
-
value: function withHubProtocol(protocol) {
|
|
110
|
-
Utils.Arg.isRequired(protocol, "protocol");
|
|
111
|
-
this.protocol = protocol;
|
|
112
|
-
return this;
|
|
113
|
-
}
|
|
114
|
-
}, {
|
|
115
|
-
key: "withAutomaticReconnect",
|
|
116
|
-
value: function withAutomaticReconnect(retryDelaysOrReconnectPolicy) {
|
|
117
|
-
if (this.reconnectPolicy) {
|
|
118
|
-
throw new Error("A reconnectPolicy has already been set.");
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
if (!retryDelaysOrReconnectPolicy) {
|
|
122
|
-
this.reconnectPolicy = new DefaultReconnectPolicy.DefaultReconnectPolicy();
|
|
123
|
-
} else if (Array.isArray(retryDelaysOrReconnectPolicy)) {
|
|
124
|
-
this.reconnectPolicy = new DefaultReconnectPolicy.DefaultReconnectPolicy(retryDelaysOrReconnectPolicy);
|
|
125
|
-
} else {
|
|
126
|
-
this.reconnectPolicy = retryDelaysOrReconnectPolicy;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
return this;
|
|
130
|
-
}
|
|
131
|
-
/** Creates a {@link @microsoft/signalr.HubConnection} from the configuration options specified in this builder.
|
|
132
|
-
*
|
|
133
|
-
* @returns {HubConnection} The configured {@link @microsoft/signalr.HubConnection}.
|
|
134
|
-
*/
|
|
135
|
-
|
|
136
|
-
}, {
|
|
137
|
-
key: "build",
|
|
138
|
-
value: function build() {
|
|
139
|
-
// If httpConnectionOptions has a logger, use it. Otherwise, override it with the one
|
|
140
|
-
// provided to configureLogger
|
|
141
|
-
var httpConnectionOptions = this.httpConnectionOptions || {}; // If it's 'null', the user **explicitly** asked for null, don't mess with it.
|
|
142
|
-
|
|
143
|
-
if (httpConnectionOptions.logger === undefined) {
|
|
144
|
-
// If our logger is undefined or null, that's OK, the HttpConnection constructor will handle it.
|
|
145
|
-
httpConnectionOptions.logger = this.logger;
|
|
146
|
-
} // Now create the connection
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
if (!this.url) {
|
|
150
|
-
throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
var connection = new HttpConnection.HttpConnection(this.url, httpConnectionOptions);
|
|
154
|
-
return HubConnection.HubConnection.create(connection, this.logger || Loggers.NullLogger.instance, this.protocol || new JsonHubProtocol.JsonHubProtocol(), this.reconnectPolicy);
|
|
155
|
-
}
|
|
156
|
-
}]);
|
|
157
|
-
|
|
158
|
-
return HubConnectionBuilder;
|
|
159
|
-
}();
|
|
160
|
-
|
|
161
|
-
function isLogger(logger) {
|
|
162
|
-
return logger.log !== undefined;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
exports.HubConnectionBuilder = HubConnectionBuilder;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
}); // Licensed to the .NET Foundation under one or more agreements.
|
|
6
|
-
// The .NET Foundation licenses this file to you under the MIT license.
|
|
7
|
-
|
|
8
|
-
/** Defines the type of a Hub Message. */
|
|
9
|
-
|
|
10
|
-
exports.MessageType = void 0;
|
|
11
|
-
|
|
12
|
-
(function (MessageType) {
|
|
13
|
-
/** Indicates the message is an Invocation message and implements the {@link @microsoft/signalr.InvocationMessage} interface. */
|
|
14
|
-
MessageType[MessageType["Invocation"] = 1] = "Invocation";
|
|
15
|
-
/** Indicates the message is a StreamItem message and implements the {@link @microsoft/signalr.StreamItemMessage} interface. */
|
|
16
|
-
|
|
17
|
-
MessageType[MessageType["StreamItem"] = 2] = "StreamItem";
|
|
18
|
-
/** Indicates the message is a Completion message and implements the {@link @microsoft/signalr.CompletionMessage} interface. */
|
|
19
|
-
|
|
20
|
-
MessageType[MessageType["Completion"] = 3] = "Completion";
|
|
21
|
-
/** Indicates the message is a Stream Invocation message and implements the {@link @microsoft/signalr.StreamInvocationMessage} interface. */
|
|
22
|
-
|
|
23
|
-
MessageType[MessageType["StreamInvocation"] = 4] = "StreamInvocation";
|
|
24
|
-
/** Indicates the message is a Cancel Invocation message and implements the {@link @microsoft/signalr.CancelInvocationMessage} interface. */
|
|
25
|
-
|
|
26
|
-
MessageType[MessageType["CancelInvocation"] = 5] = "CancelInvocation";
|
|
27
|
-
/** Indicates the message is a Ping message and implements the {@link @microsoft/signalr.PingMessage} interface. */
|
|
28
|
-
|
|
29
|
-
MessageType[MessageType["Ping"] = 6] = "Ping";
|
|
30
|
-
/** Indicates the message is a Close message and implements the {@link @microsoft/signalr.CloseMessage} interface. */
|
|
31
|
-
|
|
32
|
-
MessageType[MessageType["Close"] = 7] = "Close";
|
|
33
|
-
})(exports.MessageType || (exports.MessageType = {}));
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
}); // Licensed to the .NET Foundation under one or more agreements.
|
|
6
|
-
// The .NET Foundation licenses this file to you under the MIT license.
|
|
7
|
-
// These values are designed to match the ASP.NET Log Levels since that's the pattern we're emulating here.
|
|
8
|
-
|
|
9
|
-
/** Indicates the severity of a log message.
|
|
10
|
-
*
|
|
11
|
-
* Log Levels are ordered in increasing severity. So `Debug` is more severe than `Trace`, etc.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
exports.LogLevel = void 0;
|
|
15
|
-
|
|
16
|
-
(function (LogLevel) {
|
|
17
|
-
/** Log level for very low severity diagnostic messages. */
|
|
18
|
-
LogLevel[LogLevel["Trace"] = 0] = "Trace";
|
|
19
|
-
/** Log level for low severity diagnostic messages. */
|
|
20
|
-
|
|
21
|
-
LogLevel[LogLevel["Debug"] = 1] = "Debug";
|
|
22
|
-
/** Log level for informational diagnostic messages. */
|
|
23
|
-
|
|
24
|
-
LogLevel[LogLevel["Information"] = 2] = "Information";
|
|
25
|
-
/** Log level for diagnostic messages that indicate a non-fatal problem. */
|
|
26
|
-
|
|
27
|
-
LogLevel[LogLevel["Warning"] = 3] = "Warning";
|
|
28
|
-
/** Log level for diagnostic messages that indicate a failure in the current operation. */
|
|
29
|
-
|
|
30
|
-
LogLevel[LogLevel["Error"] = 4] = "Error";
|
|
31
|
-
/** Log level for diagnostic messages that indicate a failure that will terminate the entire application. */
|
|
32
|
-
|
|
33
|
-
LogLevel[LogLevel["Critical"] = 5] = "Critical";
|
|
34
|
-
/** The highest possible log level. Used when configuring logging to indicate that no log messages should be emitted. */
|
|
35
|
-
|
|
36
|
-
LogLevel[LogLevel["None"] = 6] = "None";
|
|
37
|
-
})(exports.LogLevel || (exports.LogLevel = {}));
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
}); // Licensed to the .NET Foundation under one or more agreements.
|
|
6
|
-
// The .NET Foundation licenses this file to you under the MIT license.
|
|
7
|
-
// This will be treated as a bit flag in the future, so we keep it using power-of-two values.
|
|
8
|
-
|
|
9
|
-
/** Specifies a specific HTTP transport type. */
|
|
10
|
-
|
|
11
|
-
exports.HttpTransportType = void 0;
|
|
12
|
-
|
|
13
|
-
(function (HttpTransportType) {
|
|
14
|
-
/** Specifies no transport preference. */
|
|
15
|
-
HttpTransportType[HttpTransportType["None"] = 0] = "None";
|
|
16
|
-
/** Specifies the WebSockets transport. */
|
|
17
|
-
|
|
18
|
-
HttpTransportType[HttpTransportType["WebSockets"] = 1] = "WebSockets";
|
|
19
|
-
/** Specifies the Server-Sent Events transport. */
|
|
20
|
-
|
|
21
|
-
HttpTransportType[HttpTransportType["ServerSentEvents"] = 2] = "ServerSentEvents";
|
|
22
|
-
/** Specifies the Long Polling transport. */
|
|
23
|
-
|
|
24
|
-
HttpTransportType[HttpTransportType["LongPolling"] = 4] = "LongPolling";
|
|
25
|
-
})(exports.HttpTransportType || (exports.HttpTransportType = {}));
|
|
26
|
-
/** Specifies the transfer format for a connection. */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
exports.TransferFormat = void 0;
|
|
30
|
-
|
|
31
|
-
(function (TransferFormat) {
|
|
32
|
-
/** Specifies that only text data will be transmitted over the connection. */
|
|
33
|
-
TransferFormat[TransferFormat["Text"] = 1] = "Text";
|
|
34
|
-
/** Specifies that binary data will be transmitted over the connection. */
|
|
35
|
-
|
|
36
|
-
TransferFormat[TransferFormat["Binary"] = 2] = "Binary";
|
|
37
|
-
})(exports.TransferFormat || (exports.TransferFormat = {}));
|
|
@@ -1,179 +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 IHubProtocol = require('./IHubProtocol.js');
|
|
20
|
-
|
|
21
|
-
var ILogger = require('./ILogger.js');
|
|
22
|
-
|
|
23
|
-
var ITransport = require('./ITransport.js');
|
|
24
|
-
|
|
25
|
-
var Loggers = require('./Loggers.js');
|
|
26
|
-
|
|
27
|
-
var TextMessageFormat = require('./TextMessageFormat.js'); // Licensed to the .NET Foundation under one or more agreements.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var JSON_HUB_PROTOCOL_NAME = "json";
|
|
31
|
-
/** Implements the JSON Hub Protocol. */
|
|
32
|
-
|
|
33
|
-
var JsonHubProtocol = /*#__PURE__*/function () {
|
|
34
|
-
function JsonHubProtocol() {
|
|
35
|
-
_classCallCheck(this, JsonHubProtocol);
|
|
36
|
-
|
|
37
|
-
/** @inheritDoc */
|
|
38
|
-
this.name = JSON_HUB_PROTOCOL_NAME;
|
|
39
|
-
/** @inheritDoc */
|
|
40
|
-
|
|
41
|
-
this.version = 1;
|
|
42
|
-
/** @inheritDoc */
|
|
43
|
-
|
|
44
|
-
this.transferFormat = ITransport.TransferFormat.Text;
|
|
45
|
-
}
|
|
46
|
-
/** Creates an array of {@link @microsoft/signalr.HubMessage} objects from the specified serialized representation.
|
|
47
|
-
*
|
|
48
|
-
* @param {string} input A string containing the serialized representation.
|
|
49
|
-
* @param {ILogger} logger A logger that will be used to log messages that occur during parsing.
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
_createClass(JsonHubProtocol, [{
|
|
54
|
-
key: "parseMessages",
|
|
55
|
-
value: function parseMessages(input, logger) {
|
|
56
|
-
// The interface does allow "ArrayBuffer" to be passed in, but this implementation does not. So let's throw a useful error.
|
|
57
|
-
if (typeof input !== "string") {
|
|
58
|
-
throw new Error("Invalid input for JSON hub protocol. Expected a string.");
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (!input) {
|
|
62
|
-
return [];
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (logger === null) {
|
|
66
|
-
logger = Loggers.NullLogger.instance;
|
|
67
|
-
} // Parse the messages
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
var messages = TextMessageFormat.TextMessageFormat.parse(input);
|
|
71
|
-
var hubMessages = [];
|
|
72
|
-
|
|
73
|
-
var _iterator = _createForOfIteratorHelper(messages),
|
|
74
|
-
_step;
|
|
75
|
-
|
|
76
|
-
try {
|
|
77
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
78
|
-
var message = _step.value;
|
|
79
|
-
var parsedMessage = JSON.parse(message);
|
|
80
|
-
|
|
81
|
-
if (typeof parsedMessage.type !== "number") {
|
|
82
|
-
throw new Error("Invalid payload.");
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
switch (parsedMessage.type) {
|
|
86
|
-
case IHubProtocol.MessageType.Invocation:
|
|
87
|
-
this._isInvocationMessage(parsedMessage);
|
|
88
|
-
|
|
89
|
-
break;
|
|
90
|
-
|
|
91
|
-
case IHubProtocol.MessageType.StreamItem:
|
|
92
|
-
this._isStreamItemMessage(parsedMessage);
|
|
93
|
-
|
|
94
|
-
break;
|
|
95
|
-
|
|
96
|
-
case IHubProtocol.MessageType.Completion:
|
|
97
|
-
this._isCompletionMessage(parsedMessage);
|
|
98
|
-
|
|
99
|
-
break;
|
|
100
|
-
|
|
101
|
-
case IHubProtocol.MessageType.Ping:
|
|
102
|
-
// Single value, no need to validate
|
|
103
|
-
break;
|
|
104
|
-
|
|
105
|
-
case IHubProtocol.MessageType.Close:
|
|
106
|
-
// All optional values, no need to validate
|
|
107
|
-
break;
|
|
108
|
-
|
|
109
|
-
default:
|
|
110
|
-
// Future protocol changes can add message types, old clients can ignore them
|
|
111
|
-
logger.log(ILogger.LogLevel.Information, "Unknown message type '" + parsedMessage.type + "' ignored.");
|
|
112
|
-
continue;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
hubMessages.push(parsedMessage);
|
|
116
|
-
}
|
|
117
|
-
} catch (err) {
|
|
118
|
-
_iterator.e(err);
|
|
119
|
-
} finally {
|
|
120
|
-
_iterator.f();
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return hubMessages;
|
|
124
|
-
}
|
|
125
|
-
/** Writes the specified {@link @microsoft/signalr.HubMessage} to a string and returns it.
|
|
126
|
-
*
|
|
127
|
-
* @param {HubMessage} message The message to write.
|
|
128
|
-
* @returns {string} A string containing the serialized representation of the message.
|
|
129
|
-
*/
|
|
130
|
-
|
|
131
|
-
}, {
|
|
132
|
-
key: "writeMessage",
|
|
133
|
-
value: function writeMessage(message) {
|
|
134
|
-
return TextMessageFormat.TextMessageFormat.write(JSON.stringify(message));
|
|
135
|
-
}
|
|
136
|
-
}, {
|
|
137
|
-
key: "_isInvocationMessage",
|
|
138
|
-
value: function _isInvocationMessage(message) {
|
|
139
|
-
this._assertNotEmptyString(message.target, "Invalid payload for Invocation message.");
|
|
140
|
-
|
|
141
|
-
if (message.invocationId !== undefined) {
|
|
142
|
-
this._assertNotEmptyString(message.invocationId, "Invalid payload for Invocation message.");
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}, {
|
|
146
|
-
key: "_isStreamItemMessage",
|
|
147
|
-
value: function _isStreamItemMessage(message) {
|
|
148
|
-
this._assertNotEmptyString(message.invocationId, "Invalid payload for StreamItem message.");
|
|
149
|
-
|
|
150
|
-
if (message.item === undefined) {
|
|
151
|
-
throw new Error("Invalid payload for StreamItem message.");
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}, {
|
|
155
|
-
key: "_isCompletionMessage",
|
|
156
|
-
value: function _isCompletionMessage(message) {
|
|
157
|
-
if (message.result && message.error) {
|
|
158
|
-
throw new Error("Invalid payload for Completion message.");
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
if (!message.result && message.error) {
|
|
162
|
-
this._assertNotEmptyString(message.error, "Invalid payload for Completion message.");
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
this._assertNotEmptyString(message.invocationId, "Invalid payload for Completion message.");
|
|
166
|
-
}
|
|
167
|
-
}, {
|
|
168
|
-
key: "_assertNotEmptyString",
|
|
169
|
-
value: function _assertNotEmptyString(value, errorMessage) {
|
|
170
|
-
if (typeof value !== "string" || value === "") {
|
|
171
|
-
throw new Error(errorMessage);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}]);
|
|
175
|
-
|
|
176
|
-
return JsonHubProtocol;
|
|
177
|
-
}();
|
|
178
|
-
|
|
179
|
-
exports.JsonHubProtocol = JsonHubProtocol;
|
|
@@ -1,35 +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
|
-
|
|
14
|
-
/** A logger that does nothing when log messages are sent to it. */
|
|
15
|
-
|
|
16
|
-
var NullLogger = /*#__PURE__*/function () {
|
|
17
|
-
function NullLogger() {
|
|
18
|
-
_classCallCheck(this, NullLogger);
|
|
19
|
-
}
|
|
20
|
-
/** @inheritDoc */
|
|
21
|
-
// eslint-disable-next-line
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_createClass(NullLogger, [{
|
|
25
|
-
key: "log",
|
|
26
|
-
value: function log(_logLevel, _message) {}
|
|
27
|
-
}]);
|
|
28
|
-
|
|
29
|
-
return NullLogger;
|
|
30
|
-
}();
|
|
31
|
-
/** The singleton instance of the {@link @microsoft/signalr.NullLogger}. */
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
NullLogger.instance = new NullLogger();
|
|
35
|
-
exports.NullLogger = NullLogger;
|