@equinor/echo-framework 0.8.6 → 0.9.0
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/_virtual/_tslib.js +1 -1
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.d.ts +46 -0
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.test.d.ts +1 -0
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToCommApp.d.ts +14 -0
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToMcApp.d.ts +3 -1
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToProCoSys.d.ts +1 -2
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToSap.d.ts +3 -0
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToSemiDoc.d.ts +4 -0
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.d.ts +2 -0
- package/dist/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.d.ts +18 -0
- package/dist/components/contextualAppLinks/externalLinkButtons/index.d.ts +1 -0
- package/dist/components/externalLinkButton/externalLinkButton.d.ts +16 -7
- package/dist/components/panel/corePanelLeft.d.ts +1 -4
- package/dist/components/panel/corePanelRight.d.ts +1 -4
- package/dist/components/realTimeData/components/contextButton/RealTimeContextButton.d.ts +1 -0
- package/dist/components/realTimeData/components/contextPopover/Popover.d.ts +4 -1
- package/dist/components/realTimeData/hooks/useSignalR.d.ts +3 -2
- package/dist/coreApplication/EchoContent.d.ts +0 -1
- package/dist/coreApplication/index.d.ts +0 -1
- package/dist/hooks/hookLibrary.d.ts +3 -9
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/useSemi.d.ts +11 -7
- package/dist/hooks/useTagDetails.d.ts +10 -3
- package/dist/index.d.ts +12 -7
- package/dist/node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js +2 -2
- package/dist/node_modules/@microsoft/signalr/dist/esm/Errors.js +3 -3
- package/dist/node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js +6 -4
- package/dist/node_modules/@microsoft/signalr/dist/esm/HttpConnection.js +16 -14
- package/dist/node_modules/@microsoft/signalr/dist/esm/HubConnection.js +14 -10
- package/dist/node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js +14 -10
- package/dist/node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js +8 -5
- package/dist/node_modules/@microsoft/signalr/dist/esm/Utils.js +5 -3
- package/dist/node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js +6 -5
- package/dist/node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js +2 -2
- package/dist/services/api/api-manager.d.ts +1 -1
- package/dist/services/api/api-tag-details.d.ts +17 -0
- package/dist/services/api/api-tag-details.test.d.ts +1 -0
- package/dist/services/api/api-tags.d.ts +17 -0
- package/dist/services/api/api-tags.test.d.ts +1 -0
- package/dist/services/api/index.d.ts +1 -0
- package/dist/services/echopediaAnalyticsModule/echopediaAnalyticsModule.d.ts +1 -0
- package/dist/services/eventCallbacks/plantChanged.d.ts +1 -1
- package/dist/src/components/containers/layout.module.css.js +1 -4
- package/dist/src/components/containers/layouts.js +10 -122
- package/dist/src/components/contextualAppLinks/externalAppsMenu.js +4 -4
- package/dist/src/components/contextualAppLinks/externalLinkButtons/allExternalLinks.js +66 -11
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.js +169 -0
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToCommApp.js +95 -0
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToMcApp.js +62 -5
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToProCoSys.js +45 -11
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSafeX.js +1 -1
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSap.js +60 -11
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSemiDoc.js +16 -5
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToStid.js +1 -1
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.js +67 -16
- package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.js +44 -0
- package/dist/src/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.module.css.js +15 -0
- package/dist/src/components/errorBoundary/errorBoundary.js +2 -2
- package/dist/src/components/externalLinkButton/externalLinkButton.js +99 -36
- package/dist/src/components/externalLinkButton/externalLinkButton.module.css.js +5 -2
- package/dist/src/components/footer/footer.module.css.js +1 -1
- package/dist/src/components/pageMenu/version/version.js +4 -2
- package/dist/src/components/panel/corePanelLeft.js +2 -5
- package/dist/src/components/panel/corePanelLeft.module.css.js +1 -1
- package/dist/src/components/panel/corePanelRight.js +2 -5
- package/dist/src/components/panel/corePanelRight.module.css.js +1 -1
- package/dist/src/components/plantSelector/plantSelector.js +4 -2
- package/dist/src/components/projectSelector/ProcosysProjectSelector.js +4 -2
- package/dist/src/components/realTimeData/RealTimePopoverButton.js +18 -2
- package/dist/src/components/realTimeData/components/connectorForIMSTag/IMSConnector.module.css.js +3 -2
- package/dist/src/components/realTimeData/components/connectorForIMSTag/RealTimeConnectorForIMSTag.js +46 -7
- package/dist/src/components/realTimeData/components/contextButton/RealTimeContextButton.js +4 -4
- package/dist/src/components/realTimeData/hooks/useRealTimeHub.js +4 -2
- package/dist/src/components/realTimeData/hooks/useSignalR.js +24 -8
- package/dist/src/coreApplication/EchoContent.js +2 -11
- package/dist/src/globalStyles.css.js +1 -1
- package/dist/src/hooks/hookLibrary.js +0 -9
- package/dist/src/hooks/index.js +0 -3
- package/dist/src/hooks/useSemi.js +40 -14
- package/dist/src/hooks/useTagDetails.js +118 -45
- package/dist/src/icons/common/CommissionApp-icon.png.js +7 -0
- package/dist/src/icons/common/Evision.svg.js +4 -4
- package/dist/src/icons/common/Fusion.svg.js +31 -27
- package/dist/src/icons/common/McApp.svg.js +11 -8
- package/dist/src/icons/common/Notification.svg.js +81 -0
- package/dist/src/icons/common/ProCoSysIcon.svg.js +4 -4
- package/dist/src/icons/common/Robim.svg.js +66 -0
- package/dist/src/icons/common/SapLogo.svg.js +6 -6
- package/dist/src/icons/common/SemiIcon.svg.js +12 -13
- package/dist/src/icons/common/Stid.svg.js +4 -4
- package/dist/src/icons/common/TR2000.svg.js +9 -8
- package/dist/src/icons/common/WorkOrder.svg.js +71 -0
- package/dist/src/icons/common/Yammer.svg.js +3 -3
- package/dist/src/icons/common/satos-logo.png.js +7 -0
- package/dist/src/index.js +38 -73
- package/dist/src/index2.js +201 -0
- package/dist/src/services/api/api-manager.js +6 -4
- package/dist/src/services/api/api-plantinfo.js +10 -6
- package/dist/src/services/api/api-plants.js +6 -2
- package/dist/src/services/api/api-realtimedata.js +9 -3
- package/dist/src/services/api/api-tag-details.js +69 -0
- package/dist/src/services/api/api-tags.js +29 -0
- package/dist/src/services/api/api-version.js +8 -4
- package/dist/src/services/echopediaAnalyticsModule/echopediaAnalyticsModule.js +10 -0
- package/dist/src/services/eventCallbacks/plantChanged.js +6 -2
- package/dist/src/types/pingableSources.js +1 -0
- package/dist/src/utils/copyText.js +6 -2
- package/dist/src/utils/navigationUtils.js +28 -0
- package/dist/src/utils/plantInfo.js +25 -20
- package/dist/src/utils/startup.js +6 -4
- package/dist/types/api-proCoSysTagResponse.d.ts +8 -0
- package/dist/types/hookLibrary.d.ts +0 -4
- package/dist/types/pingableSources.d.ts +2 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/navigationUtils.d.ts +7 -0
- package/dist/utils/navigationUtils.test.d.ts +1 -0
- package/dist/utils/plantInfo.d.ts +6 -0
- package/dist/utils/plantInfo.test.d.ts +1 -0
- package/package.json +34 -33
- package/dist/coreApplication/EchoBarComponent.d.ts +0 -6
- package/dist/hooks/useScreenOrientation.d.ts +0 -1
- package/dist/src/coreApplication/EchoBarComponent.js +0 -190
- package/dist/src/coreApplication/EchoContent.module.css.js +0 -21
- package/dist/src/hooks/useScreenOrientation.js +0 -50
package/dist/_virtual/_tslib.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
6
|
+
/******************************************************************************
|
|
7
7
|
Copyright (c) Microsoft Corporation.
|
|
8
8
|
|
|
9
9
|
Permission to use, copy, modify, and/or distribute this software for any
|
package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { TagDetailsDto } from '@equinor/echo-search';
|
|
2
|
+
import { ProCoSysApiTag } from '../../../types/api-proCoSysTagResponse';
|
|
3
|
+
declare type GetTagDetailsAndProCoSysDataResult = {
|
|
4
|
+
tagDetails: TagDetailsDto | undefined;
|
|
5
|
+
proCoSysTag: ProCoSysApiTag | undefined;
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Specific tool for external link buttons to help build URLS for deep linking into ProCoSys web app.
|
|
10
|
+
* Fetches both tag details and tag information from ProCoSys.
|
|
11
|
+
*
|
|
12
|
+
* @param {Object} params
|
|
13
|
+
* @param {string} params.tagNo The tag number to query.
|
|
14
|
+
* @param {string} params.instCode Plant installation code for the given tag.
|
|
15
|
+
* @returns {GetTagDetailsAndProCoSysDataResult} response - The returned promise will resolve once both API calls are resolved. (with Promise.all)
|
|
16
|
+
* @returns {TagDetailsDto} response.tagDetails - Result of tag details API call.
|
|
17
|
+
* @returns {ProCoSysApiTag} response.proCoSysTag - Tag related information from the ProCoSys system.
|
|
18
|
+
* @returns {hasError} response.hasError - indicates if there were any errors during the API calls. The exception is handled under the hood.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getTagDetailsAndProCoSysData({ tagNo, instCode }: {
|
|
21
|
+
tagNo: any;
|
|
22
|
+
instCode: any;
|
|
23
|
+
}): Promise<GetTagDetailsAndProCoSysDataResult>;
|
|
24
|
+
declare type getTagDetailsWithErrorHandlingResponse = {
|
|
25
|
+
tagDetails: TagDetailsDto | undefined;
|
|
26
|
+
hasError: boolean;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Wraps the 'getTagDetails' function. Handles and logs any Error thrown by it whi;e displaying an error message toast.
|
|
30
|
+
* Use 'getTagDetails' if you want complete freedom on how you handle any exceptions.
|
|
31
|
+
*
|
|
32
|
+
* If there were any errors during the API call, the returned value will have a 'hasError' flag set to 'true'.
|
|
33
|
+
*
|
|
34
|
+
* @param {Object} params
|
|
35
|
+
* @param {string} params.tagNo The tag number to query.
|
|
36
|
+
* @param {string} params.instCode Plant installation code for the given tag.
|
|
37
|
+
* @param {AbortSignal} params.abortSignal A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object.
|
|
38
|
+
* @returns {getTagDetailsWithErrorHandlingResponse} response
|
|
39
|
+
* @returns {TagDetailsDto} response.tagDetails - Result of tag details API call.
|
|
40
|
+
* @returns {hasError} response.hasError - indicates if there were any errors during the API call.
|
|
41
|
+
*/
|
|
42
|
+
export declare function getTagDetailsWithErrorHandling({ tagNo, instCode }: {
|
|
43
|
+
tagNo: string;
|
|
44
|
+
instCode?: string;
|
|
45
|
+
}): Promise<getTagDetailsWithErrorHandlingResponse>;
|
|
46
|
+
export {};
|
package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type ExternalLinkToCommAppProps = {
|
|
3
|
+
tagNo: string;
|
|
4
|
+
instCode: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* External link button to Commissioning web app.
|
|
8
|
+
*
|
|
9
|
+
* @param {string} tagNo The tag's number to open in the Comm app.
|
|
10
|
+
* @param {string} instCode Plant installation code.
|
|
11
|
+
* @returns {React.FC<ExternalLinkToMcAppProps>} React component.
|
|
12
|
+
*/
|
|
13
|
+
export declare const ExternalLinkToCommApp: React.FC<ExternalLinkToCommAppProps>;
|
|
14
|
+
export {};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare type ExternalLinkToMcAppProps = {
|
|
3
3
|
tagNo: string;
|
|
4
|
+
instCode: string;
|
|
4
5
|
};
|
|
5
6
|
/**
|
|
6
|
-
* External link button to
|
|
7
|
+
* External link button to Mechanical Completion web app.
|
|
7
8
|
*
|
|
8
9
|
* @param {string} tagNo The tag's number to open in McApp.
|
|
10
|
+
* @param {string} instCode Plant installation code.
|
|
9
11
|
* @returns {React.FC<ExternalLinkToMcAppProps>} React component.
|
|
10
12
|
*/
|
|
11
13
|
export declare const ExternalLinkToMcApp: React.FC<ExternalLinkToMcAppProps>;
|
|
@@ -5,10 +5,9 @@ declare type ExternalLinkToProCoSysProps = {
|
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
7
7
|
* External link button to ProCoSys.
|
|
8
|
-
* Will only render if the passed tagNo has any tag details in the actually selected plant.
|
|
9
8
|
*
|
|
10
9
|
* @param {string} tagNo The tag's number to open in ProCoSys.
|
|
11
|
-
* @param {
|
|
10
|
+
* @param {TagDetailsDto} tagDetails The given tags detailed information.
|
|
12
11
|
* @returns {React.FC<ExternalLinkToProCoSysProps>} React component.
|
|
13
12
|
*/
|
|
14
13
|
export declare const ExternalLinkToProCoSys: React.FC<ExternalLinkToProCoSysProps>;
|
|
@@ -2,13 +2,16 @@ import React from 'react';
|
|
|
2
2
|
declare type ExternalLinkToSapProps = {
|
|
3
3
|
tagNo: string;
|
|
4
4
|
instCode: string;
|
|
5
|
+
loadingStatusCallback?: (isLoading: boolean) => void;
|
|
5
6
|
};
|
|
6
7
|
/**
|
|
7
8
|
* External link button to SAP.
|
|
8
9
|
* Will only render if the passed tagNo has any tag details in the actually selected plant and SAP is available.
|
|
10
|
+
* It pings SAP to determine whether is available or not.
|
|
9
11
|
*
|
|
10
12
|
* @param {string} tagNo The tag's number to open in SAP.
|
|
11
13
|
* @param {string} instCode Plant installation code.
|
|
14
|
+
* @param {(isLoading: boolean) => void} loadingStatusCallback Callback which provides an 'isLoading' param reflecting the actual loading state of the ping to SAP.
|
|
12
15
|
* @returns {React.FC<ExternalLinkToSapProps>} React component.
|
|
13
16
|
*/
|
|
14
17
|
export declare const ExternalLinkToSap: React.FC<ExternalLinkToSapProps>;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare type ExternalLinkToSemiDocProps = {
|
|
3
3
|
tagNo: string;
|
|
4
|
+
instCode: string;
|
|
5
|
+
loadingStatusCallback?: (isLoading: boolean) => void;
|
|
4
6
|
};
|
|
5
7
|
/**
|
|
6
8
|
* External link button to SemiDoc.
|
|
7
9
|
* Will only render if Semi is available for the passed tagNo.
|
|
8
10
|
*
|
|
9
11
|
* @param {string} tagNo The tag's number to open in Semi.
|
|
12
|
+
* @param {string} instCode Plant installation code.
|
|
13
|
+
* @param {(isLoading: boolean) => void} loadingStatusCallback Callback which provides an 'isLoading' param reflecting the actual API call state for checking Semi availability.
|
|
10
14
|
* @returns {React.FC<ExternalLinkToSemiDocProps>} React component.
|
|
11
15
|
*/
|
|
12
16
|
export declare const ExternalLinkToSemiDoc: React.FC<ExternalLinkToSemiDocProps>;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
declare type ExternalLinkToTr2000Props = {
|
|
3
3
|
tagNo: string;
|
|
4
4
|
instCode: string;
|
|
5
|
+
loadingStatusCallback?: (isLoading: boolean) => void;
|
|
5
6
|
};
|
|
6
7
|
/**
|
|
7
8
|
* External link button to TR2000.
|
|
@@ -9,6 +10,7 @@ declare type ExternalLinkToTr2000Props = {
|
|
|
9
10
|
*
|
|
10
11
|
* @param {string} tagNo The tag's number to open in TR2000.
|
|
11
12
|
* @param {string} instCode Plant installation code.
|
|
13
|
+
* @param {(isLoading: boolean) => void} loadingStatusCallback Callback which provides an 'isLoading' param reflecting the actual API call state for checking TR2000 availability.
|
|
12
14
|
* @returns {React.FC<ExternalLinkToTr2000Props>} React component.
|
|
13
15
|
*/
|
|
14
16
|
export declare const ExternalLinkToTr2000: React.FC<ExternalLinkToTr2000Props>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type SpinnerProps = {
|
|
3
|
+
size?: 16 | 24 | 32 | 40 | 48;
|
|
4
|
+
customClassNames?: {
|
|
5
|
+
spinner?: string;
|
|
6
|
+
container?: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Local component for external link buttons. Provides a spinner overlay for any icon buttons, which might have any async calls.
|
|
11
|
+
* @param {Object} param
|
|
12
|
+
* @param {number} param.size The size of the spinner. Default value is 24.
|
|
13
|
+
* @param {Object} param.customClassNames Optional custom class names to customize the component's parts.
|
|
14
|
+
* @param {string} param.customClassNames.spinner Class name applied on the spinner.
|
|
15
|
+
* @param {string} param.customClassNames.container Class name applied on the container element.
|
|
16
|
+
*/
|
|
17
|
+
export declare const IconButtonSpinner: ({ customClassNames, size }: SpinnerProps) => JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
declare type ExternalLinkButtonProps = AsyncButtonProps | SyncButtonProps;
|
|
3
|
+
declare type AsyncButtonProps = BaseProps & {
|
|
4
|
+
linkTo?: never;
|
|
5
|
+
getUrlToOpen: (...args: any[]) => Promise<string | undefined>;
|
|
6
|
+
};
|
|
7
|
+
declare type SyncButtonProps = BaseProps & {
|
|
8
|
+
linkTo: string;
|
|
9
|
+
getUrlToOpen?: never;
|
|
10
|
+
};
|
|
11
|
+
declare type BaseProps = {
|
|
3
12
|
buttonName: string;
|
|
4
13
|
buttonIcon: string;
|
|
5
|
-
linkTo: string;
|
|
6
14
|
hideText?: boolean;
|
|
7
15
|
redirect?: boolean;
|
|
8
16
|
buttonStyle?: ExternalLinkButtonStyle;
|
|
9
|
-
getUrlToOpen?: () => Promise<string>;
|
|
10
17
|
disabledColor?: boolean;
|
|
11
18
|
disabledButton?: boolean;
|
|
12
19
|
hoverText?: string;
|
|
13
|
-
}
|
|
20
|
+
};
|
|
14
21
|
export declare enum ExternalLinkButtonStyle {
|
|
15
|
-
Rounded = "Rounded"
|
|
22
|
+
Rounded = "Rounded",
|
|
23
|
+
Large = "Large"
|
|
16
24
|
}
|
|
17
25
|
/**
|
|
18
26
|
*
|
|
@@ -23,11 +31,12 @@ export declare enum ExternalLinkButtonStyle {
|
|
|
23
31
|
* @param {boolean} props.hideText Optional. If set to `true`, will hide `buttonName`.
|
|
24
32
|
* @param {boolean} props.redirect Optional. If set to `true`, the app will not open in a new tab / window, but in the current one.
|
|
25
33
|
* @param {ExternalLinkButtonStyle} props.buttonStyle Optional.
|
|
26
|
-
* @param {() => Promise<string>} props.getUrlToOpen Optional.
|
|
34
|
+
* @param {(...args) => Promise<string | undefined>} props.getUrlToOpen Optional. Pass this custom async function to create a URL based on async data.
|
|
35
|
+
* Return with 'undefined' to prevent any navigation. (Useful when the API call fails)
|
|
27
36
|
* @param {boolean} props.disabledColor Optional. If set to `true`, the button will show disabled color. (If not Rounded button style is used)
|
|
28
37
|
* @param {boolean} props.disabledButton Optional.
|
|
29
38
|
* @param {string} props.hoverText Optional. Applies only if Rounded button style is applied.
|
|
30
39
|
* @returns {React.FC<ExternalLinkButtonProps>} React component.
|
|
31
40
|
*/
|
|
32
|
-
declare const ExternalLinkButton: React.FC<ExternalLinkButtonProps>;
|
|
41
|
+
export declare const ExternalLinkButton: React.FC<ExternalLinkButtonProps>;
|
|
33
42
|
export default ExternalLinkButton;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
interface ContextPopoverProps {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
}
|
|
2
5
|
/**
|
|
3
6
|
* Generic Popover placement component that can take in optional background color
|
|
4
7
|
*/
|
|
5
|
-
declare const ContextPopover: React.FC
|
|
8
|
+
declare const ContextPopover: React.FC<ContextPopoverProps>;
|
|
6
9
|
export { ContextPopover };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { HubConnection } from '@microsoft/signalr';
|
|
2
2
|
export interface SignalRState {
|
|
3
|
-
connection?: HubConnection;
|
|
4
|
-
status: string;
|
|
5
3
|
loading: boolean;
|
|
4
|
+
status: 'ok' | 'error';
|
|
5
|
+
connection?: HubConnection;
|
|
6
|
+
statusCode?: number;
|
|
6
7
|
message?: string;
|
|
7
8
|
}
|
|
8
9
|
declare function useSignalR(hubUrl: string): SignalRState;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { DataInformation } from '@equinor/echo-components';
|
|
2
|
-
import {
|
|
2
|
+
import { SetActiveCommPackNo, SetActiveMcPackNo, SetActiveTagNo, TagData } from './../types/hookLibrary';
|
|
3
3
|
export declare enum RegisteredHookName {
|
|
4
4
|
useSetActiveTagNo = "useSetActiveTagNo",
|
|
5
5
|
useContextMenuDataInfo = "useContextMenuDataInfo",
|
|
6
6
|
useTagData = "useTagData",
|
|
7
7
|
useIsContextMenuInfoLoading = "useIsContextMenuInfoLoading",
|
|
8
8
|
useSetActiveCommPackNo = "useSetActiveCommPackNo",
|
|
9
|
-
useSetActiveMcPackNo = "useSetActiveMcPackNo"
|
|
10
|
-
useDeviceOrientation = "useDeviceOrientation"
|
|
9
|
+
useSetActiveMcPackNo = "useSetActiveMcPackNo"
|
|
11
10
|
}
|
|
12
11
|
export declare const HookLibrary: Readonly<{
|
|
13
12
|
/**
|
|
@@ -23,7 +22,7 @@ export declare const HookLibrary: Readonly<{
|
|
|
23
22
|
* @param setActivePanel {callback function} Function to call when the context menu's "i" button is clicked
|
|
24
23
|
* @returns {DataInformation[]}
|
|
25
24
|
*/
|
|
26
|
-
useContextMenuDataInfo: (tagNo: string, expanded: boolean, setActivePanel?: (
|
|
25
|
+
useContextMenuDataInfo: (tagNo: string, expanded: boolean, setActivePanel?: () => void) => DataInformation[];
|
|
27
26
|
/**
|
|
28
27
|
* Fetches tag details and documents and sets it in `tag` data in echopediaWeb redux store.
|
|
29
28
|
* The following will be fetchted and set only, if the webApp is configured to store these as well:
|
|
@@ -47,9 +46,4 @@ export declare const HookLibrary: Readonly<{
|
|
|
47
46
|
* @returns {SetActiveMcPackNo}
|
|
48
47
|
*/
|
|
49
48
|
useSetActiveMcPackNo: () => SetActiveMcPackNo;
|
|
50
|
-
/**
|
|
51
|
-
* Hook for detecting device orientation from native devices.
|
|
52
|
-
* @returns {DeviceOrientation}
|
|
53
|
-
*/
|
|
54
|
-
useDeviceOrientation: () => DeviceOrientation;
|
|
55
49
|
}>;
|
package/dist/hooks/index.d.ts
CHANGED
package/dist/hooks/useSemi.d.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
declare type Semi = {
|
|
2
|
-
isSemiDocumentAvailable: boolean;
|
|
3
|
-
semiDocumentId: string;
|
|
4
|
-
};
|
|
5
1
|
/**
|
|
6
2
|
* Provides information about Semi document for a given tag.
|
|
7
3
|
*
|
|
8
|
-
* @param {{ tagNo: string }} params
|
|
9
|
-
* @param {string} params.tagNo
|
|
4
|
+
* @param {{ tagNo: string; instCode: string }} params
|
|
5
|
+
* @param {string} params.tagNo The given tag's number.
|
|
6
|
+
* @param {string} params.instCode Plant's inst code.
|
|
10
7
|
* @returns {Semi} object
|
|
11
8
|
* @returns {boolean} object.isSemiDocumentAvailable - Will be set to true if the tag has Semi document.
|
|
12
9
|
* @returns {string} object.semiDocumentId - If there's a document for the given tag, this will be set.
|
|
10
|
+
* @returns {boolean} object.isSemiLoading - Indicates if Semi is performing an API call (to get tag details)
|
|
13
11
|
*/
|
|
14
|
-
export declare function useSemi({ tagNo }: {
|
|
12
|
+
export declare function useSemi({ tagNo, instCode }: {
|
|
15
13
|
tagNo: string;
|
|
14
|
+
instCode: string;
|
|
16
15
|
}): Semi;
|
|
16
|
+
declare type Semi = {
|
|
17
|
+
isSemiDocumentAvailable: boolean;
|
|
18
|
+
semiDocumentId: string;
|
|
19
|
+
isSemiLoading: boolean;
|
|
20
|
+
};
|
|
17
21
|
export {};
|
|
@@ -5,9 +5,16 @@ import { TagDetailsDto } from '@equinor/echo-search';
|
|
|
5
5
|
* @param {{ tagNo: string; instCode: string }} params
|
|
6
6
|
* @param {string} params.tagNo The given tag's number.
|
|
7
7
|
* @param {string} params.instCode Plant's inst code.
|
|
8
|
-
* @returns {
|
|
8
|
+
* @returns {Object} response
|
|
9
|
+
* @returns {TagDetailsDto | undefined} response.tagDetails
|
|
10
|
+
* @returns {boolean} response.isLoading Whether tag details API call is loading or not.
|
|
11
|
+
* @returns {boolean} response.hasError If the API call had any issues, this will be set to 'true'
|
|
9
12
|
*/
|
|
10
|
-
export declare function useTagDetails({
|
|
13
|
+
export declare function useTagDetails({ instCode, tagNo }: {
|
|
11
14
|
tagNo: string;
|
|
12
15
|
instCode: string;
|
|
13
|
-
}):
|
|
16
|
+
}): {
|
|
17
|
+
tagDetails: TagDetailsDto | undefined;
|
|
18
|
+
isTagDetailsLoading: boolean;
|
|
19
|
+
hasError: boolean;
|
|
20
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import './globalStyles.css';
|
|
3
|
-
import { getPlantsInfo } from './services/api
|
|
3
|
+
import { getPlantsInfo, getTagDetails } from './services/api';
|
|
4
4
|
import './theme/theme.css';
|
|
5
5
|
import { getLegendStatusColor } from './utils/legendUtils';
|
|
6
6
|
export * from './components';
|
|
7
7
|
export * from './coreApplication';
|
|
8
8
|
export { RegisteredHookName } from './hooks/hookLibrary';
|
|
9
|
-
export { useScreenOrientation } from './hooks/useScreenOrientation';
|
|
10
9
|
export { RegisteredComponentName } from './services/componentRegistry/componentRegistry';
|
|
11
10
|
export * from './services/eventHubActions';
|
|
12
11
|
export * from './theme/themeConst';
|
|
13
12
|
export type { EchoHubPlant } from './types/echoHubPlant';
|
|
14
13
|
export * from './types/eventTypes';
|
|
15
14
|
export * from './types/extensions';
|
|
16
|
-
export type {
|
|
15
|
+
export type { SetActiveTagNo, TagData } from './types/hookLibrary';
|
|
17
16
|
export { LegendStatus, LegendType } from './types/legend';
|
|
18
17
|
export type { ModelPermissions } from './types/modelPermissions';
|
|
19
18
|
export { PingableSources } from './types/pingableSources';
|
|
@@ -26,6 +25,9 @@ export declare const registerEchopediaComponent: ({ name, component }: {
|
|
|
26
25
|
}) => void;
|
|
27
26
|
declare const EchoFramework: Readonly<{
|
|
28
27
|
Utils: Readonly<{
|
|
28
|
+
Navigation: Readonly<{
|
|
29
|
+
goToExternalLink: (link: string, redirect?: boolean | undefined) => void;
|
|
30
|
+
}>;
|
|
29
31
|
Color: Readonly<{
|
|
30
32
|
getLegendStatusColor: typeof getLegendStatusColor;
|
|
31
33
|
}>;
|
|
@@ -34,24 +36,27 @@ declare const EchoFramework: Readonly<{
|
|
|
34
36
|
useEchoHistory(): (path: string, params?: {
|
|
35
37
|
[key: string]: string;
|
|
36
38
|
} | undefined, state?: any) => void;
|
|
37
|
-
|
|
38
|
-
useTagDetails({ tagNo, instCode }: {
|
|
39
|
+
useTagDetails({ instCode, tagNo }: {
|
|
39
40
|
tagNo: string;
|
|
40
41
|
instCode: string;
|
|
41
|
-
}):
|
|
42
|
+
}): {
|
|
43
|
+
tagDetails: import("@equinor/echo-search").TagDetailsDto | undefined;
|
|
44
|
+
isTagDetailsLoading: boolean;
|
|
45
|
+
hasError: boolean;
|
|
46
|
+
};
|
|
42
47
|
useSetActiveTagNo: () => import("./types/hookLibrary").SetActiveTagNo;
|
|
43
48
|
useContextMenuDataInfo: (tagNo: string, expanded: boolean, setActivePanel?: (() => void) | undefined) => import("@equinor/echo-components").DataInformation[];
|
|
44
49
|
useTagData: () => import("./types/hookLibrary").TagData;
|
|
45
50
|
useIsContextMenuInfoLoading: () => boolean;
|
|
46
51
|
useSetActiveCommPackNo: () => import("./types/hookLibrary").SetActiveCommPackNo;
|
|
47
52
|
useSetActiveMcPackNo: () => import("./types/hookLibrary").SetActiveMcPackNo;
|
|
48
|
-
useDeviceOrientation: () => import("./types/hookLibrary").DeviceOrientation;
|
|
49
53
|
}>;
|
|
50
54
|
EchopediaComponentLibrary: Readonly<{
|
|
51
55
|
getTagItem: () => import("react").FunctionComponent<any>;
|
|
52
56
|
}>;
|
|
53
57
|
APIs: Readonly<{
|
|
54
58
|
getPlantsInfo: typeof getPlantsInfo;
|
|
59
|
+
getTagDetails: typeof getTagDetails;
|
|
55
60
|
}>;
|
|
56
61
|
}>;
|
|
57
62
|
export default EchoFramework;
|
|
@@ -10,7 +10,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
10
10
|
|
|
11
11
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
12
12
|
|
|
13
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
13
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
14
14
|
|
|
15
15
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
16
16
|
|
|
@@ -20,7 +20,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
20
20
|
|
|
21
21
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
22
22
|
|
|
23
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
23
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
24
24
|
|
|
25
25
|
Object.defineProperty(exports, '__esModule', {
|
|
26
26
|
value: true
|
|
@@ -18,15 +18,15 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
18
18
|
|
|
19
19
|
function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
|
|
20
20
|
|
|
21
|
-
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
21
|
+
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
22
22
|
|
|
23
23
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
24
24
|
|
|
25
25
|
function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
|
26
26
|
|
|
27
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
27
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
28
28
|
|
|
29
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
29
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
30
30
|
|
|
31
31
|
Object.defineProperty(exports, '__esModule', {
|
|
32
32
|
value: true
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
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
4
|
|
|
5
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
6
|
+
|
|
5
7
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
8
|
|
|
7
9
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -20,7 +22,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
20
22
|
|
|
21
23
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
22
24
|
|
|
23
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
25
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
24
26
|
|
|
25
27
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
26
28
|
|
|
@@ -30,7 +32,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
30
32
|
|
|
31
33
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
32
34
|
|
|
33
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
35
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
34
36
|
|
|
35
37
|
Object.defineProperty(exports, '__esModule', {
|
|
36
38
|
value: true
|
|
@@ -91,11 +93,11 @@ var FetchHttpClient = /*#__PURE__*/function (_HttpClient$HttpClien) {
|
|
|
91
93
|
_createClass(FetchHttpClient, [{
|
|
92
94
|
key: "send",
|
|
93
95
|
value: function () {
|
|
94
|
-
var _send = _asyncToGenerator( /*#__PURE__*/
|
|
96
|
+
var _send = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(request) {
|
|
95
97
|
var _this2 = this;
|
|
96
98
|
|
|
97
99
|
var abortController, error, timeoutId, msTimeout, response, errorMessage, content, payload;
|
|
98
|
-
return
|
|
100
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
99
101
|
while (1) {
|
|
100
102
|
switch (_context.prev = _context.next) {
|
|
101
103
|
case 0:
|