@equinor/echo-framework 0.8.1 → 0.8.2
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/contextualAppLinks/externalLinkButtons/externalLinkToMcApp.d.ts +1 -3
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToProCoSys.d.ts +2 -1
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToSap.d.ts +0 -3
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToSemiDoc.d.ts +0 -4
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.d.ts +0 -2
- package/dist/components/contextualAppLinks/externalLinkButtons/index.d.ts +0 -1
- package/dist/components/externalLinkButton/externalLinkButton.d.ts +7 -16
- package/dist/components/panel/corePanelLeft.d.ts +4 -1
- package/dist/components/panel/corePanelRight.d.ts +4 -1
- package/dist/components/realTimeData/hooks/useSignalR.d.ts +2 -3
- package/dist/coreApplication/EchoBarComponent.d.ts +6 -0
- package/dist/coreApplication/EchoContent.d.ts +1 -0
- package/dist/coreApplication/index.d.ts +1 -0
- package/dist/hooks/hookLibrary.d.ts +8 -2
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useScreenOrientation.d.ts +1 -0
- package/dist/hooks/useSemi.d.ts +7 -11
- package/dist/hooks/useTagDetails.d.ts +3 -10
- package/dist/index.d.ts +7 -12
- package/dist/services/api/api-manager.d.ts +1 -1
- package/dist/services/api/index.d.ts +0 -1
- package/dist/src/components/containers/layout.module.css.js +3 -1
- package/dist/src/components/containers/layouts.js +5 -7
- package/dist/src/components/contextualAppLinks/externalAppsMenu.js +4 -4
- package/dist/src/components/contextualAppLinks/externalLinkButtons/allExternalLinks.js +11 -66
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToMcApp.js +5 -60
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToProCoSys.js +11 -43
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSafeX.js +1 -1
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSap.js +11 -58
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToSemiDoc.js +5 -16
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToStid.js +1 -1
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToTr2000.js +16 -67
- package/dist/src/components/externalLinkButton/externalLinkButton.js +34 -89
- package/dist/src/components/externalLinkButton/externalLinkButton.module.css.js +2 -5
- package/dist/src/components/footer/footer.module.css.js +1 -1
- package/dist/src/components/panel/corePanelLeft.js +5 -2
- package/dist/src/components/panel/corePanelLeft.module.css.js +1 -1
- package/dist/src/components/panel/corePanelRight.js +5 -2
- package/dist/src/components/panel/corePanelRight.module.css.js +1 -1
- package/dist/src/components/realTimeData/components/connectorForIMSTag/IMSConnector.module.css.js +2 -3
- package/dist/src/components/realTimeData/components/connectorForIMSTag/RealTimeConnectorForIMSTag.js +7 -32
- package/dist/src/components/realTimeData/hooks/useSignalR.js +2 -4
- package/dist/src/coreApplication/EchoBarComponent.js +190 -0
- package/dist/src/coreApplication/EchoContent.js +36 -2
- package/dist/src/coreApplication/EchoContent.module.css.js +21 -0
- package/dist/src/globalStyles.css.js +1 -1
- package/dist/src/hooks/hookLibrary.js +9 -0
- package/dist/src/hooks/index.js +3 -0
- package/dist/src/hooks/useScreenOrientation.js +50 -0
- package/dist/src/hooks/useSemi.js +14 -40
- package/dist/src/hooks/useTagDetails.js +45 -116
- package/dist/src/icons/common/Evision.svg.js +2 -3
- package/dist/src/icons/common/Fusion.svg.js +25 -30
- package/dist/src/icons/common/McApp.svg.js +6 -10
- package/dist/src/icons/common/ProCoSysIcon.svg.js +2 -3
- package/dist/src/icons/common/SapLogo.svg.js +4 -5
- package/dist/src/icons/common/SemiIcon.svg.js +11 -11
- package/dist/src/icons/common/Stid.svg.js +2 -3
- package/dist/src/icons/common/TR2000.svg.js +6 -8
- package/dist/src/icons/common/Yammer.svg.js +1 -2
- package/dist/src/index.js +13 -15
- package/dist/src/services/api/api-manager.js +2 -2
- package/dist/src/services/api/api-realtimedata.js +1 -3
- package/dist/src/types/pingableSources.js +0 -1
- package/dist/src/utils/plantInfo.js +0 -1
- package/dist/types/hookLibrary.d.ts +4 -0
- package/dist/types/pingableSources.d.ts +1 -2
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/plantInfo.d.ts +0 -6
- package/package.json +2 -2
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.d.ts +0 -47
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.test.d.ts +0 -1
- package/dist/components/contextualAppLinks/externalLinkButtons/externalLinkToCommApp.d.ts +0 -14
- package/dist/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.d.ts +0 -18
- package/dist/services/api/api-tag-details.d.ts +0 -18
- package/dist/services/api/api-tag-details.test.d.ts +0 -1
- package/dist/services/api/api-tags.d.ts +0 -17
- package/dist/services/api/api-tags.test.d.ts +0 -1
- package/dist/services/echopediaAnalyticsModule/echopediaAnalyticsModule.d.ts +0 -1
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkButtons.helpers.js +0 -169
- package/dist/src/components/contextualAppLinks/externalLinkButtons/externalLinkToCommApp.js +0 -93
- 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/icons/common/CommissionApp-icon.png.js +0 -7
- package/dist/src/icons/common/Notification.svg.js +0 -82
- package/dist/src/icons/common/WorkOrder.svg.js +0 -72
- package/dist/src/icons/common/satos-logo.png.js +0 -7
- package/dist/src/services/api/api-tag-details.js +0 -66
- package/dist/src/services/api/api-tags.js +0 -29
- package/dist/src/services/echopediaAnalyticsModule/echopediaAnalyticsModule.js +0 -10
- package/dist/src/utils/navigationUtils.js +0 -28
- package/dist/types/api-proCoSysTagResponse.d.ts +0 -8
- package/dist/utils/navigationUtils.d.ts +0 -7
- package/dist/utils/navigationUtils.test.d.ts +0 -1
- package/dist/utils/plantInfo.test.d.ts +0 -1
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare type ExternalLinkToMcAppProps = {
|
|
3
3
|
tagNo: string;
|
|
4
|
-
instCode: string;
|
|
5
4
|
};
|
|
6
5
|
/**
|
|
7
|
-
* External link button to
|
|
6
|
+
* External link button to McApp.
|
|
8
7
|
*
|
|
9
8
|
* @param {string} tagNo The tag's number to open in McApp.
|
|
10
|
-
* @param {string} instCode Plant installation code.
|
|
11
9
|
* @returns {React.FC<ExternalLinkToMcAppProps>} React component.
|
|
12
10
|
*/
|
|
13
11
|
export declare const ExternalLinkToMcApp: React.FC<ExternalLinkToMcAppProps>;
|
|
@@ -5,9 +5,10 @@ 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.
|
|
8
9
|
*
|
|
9
10
|
* @param {string} tagNo The tag's number to open in ProCoSys.
|
|
10
|
-
* @param {
|
|
11
|
+
* @param {string} instCode Plant installation code.
|
|
11
12
|
* @returns {React.FC<ExternalLinkToProCoSysProps>} React component.
|
|
12
13
|
*/
|
|
13
14
|
export declare const ExternalLinkToProCoSys: React.FC<ExternalLinkToProCoSysProps>;
|
|
@@ -2,16 +2,13 @@ import React from 'react';
|
|
|
2
2
|
declare type ExternalLinkToSapProps = {
|
|
3
3
|
tagNo: string;
|
|
4
4
|
instCode: string;
|
|
5
|
-
loadingStatusCallback?: (isLoading: boolean) => void;
|
|
6
5
|
};
|
|
7
6
|
/**
|
|
8
7
|
* External link button to SAP.
|
|
9
8
|
* 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.
|
|
11
9
|
*
|
|
12
10
|
* @param {string} tagNo The tag's number to open in SAP.
|
|
13
11
|
* @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.
|
|
15
12
|
* @returns {React.FC<ExternalLinkToSapProps>} React component.
|
|
16
13
|
*/
|
|
17
14
|
export declare const ExternalLinkToSap: React.FC<ExternalLinkToSapProps>;
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare type ExternalLinkToSemiDocProps = {
|
|
3
3
|
tagNo: string;
|
|
4
|
-
instCode: string;
|
|
5
|
-
loadingStatusCallback?: (isLoading: boolean) => void;
|
|
6
4
|
};
|
|
7
5
|
/**
|
|
8
6
|
* External link button to SemiDoc.
|
|
9
7
|
* Will only render if Semi is available for the passed tagNo.
|
|
10
8
|
*
|
|
11
9
|
* @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.
|
|
14
10
|
* @returns {React.FC<ExternalLinkToSemiDocProps>} React component.
|
|
15
11
|
*/
|
|
16
12
|
export declare const ExternalLinkToSemiDoc: React.FC<ExternalLinkToSemiDocProps>;
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
declare type ExternalLinkToTr2000Props = {
|
|
3
3
|
tagNo: string;
|
|
4
4
|
instCode: string;
|
|
5
|
-
loadingStatusCallback?: (isLoading: boolean) => void;
|
|
6
5
|
};
|
|
7
6
|
/**
|
|
8
7
|
* External link button to TR2000.
|
|
@@ -10,7 +9,6 @@ declare type ExternalLinkToTr2000Props = {
|
|
|
10
9
|
*
|
|
11
10
|
* @param {string} tagNo The tag's number to open in TR2000.
|
|
12
11
|
* @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.
|
|
14
12
|
* @returns {React.FC<ExternalLinkToTr2000Props>} React component.
|
|
15
13
|
*/
|
|
16
14
|
export declare const ExternalLinkToTr2000: React.FC<ExternalLinkToTr2000Props>;
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
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 = {
|
|
2
|
+
interface ExternalLinkButtonProps {
|
|
12
3
|
buttonName: string;
|
|
13
4
|
buttonIcon: string;
|
|
5
|
+
linkTo: string;
|
|
14
6
|
hideText?: boolean;
|
|
15
7
|
redirect?: boolean;
|
|
16
8
|
buttonStyle?: ExternalLinkButtonStyle;
|
|
9
|
+
getUrlToOpen?: () => Promise<string>;
|
|
17
10
|
disabledColor?: boolean;
|
|
18
11
|
disabledButton?: boolean;
|
|
19
12
|
hoverText?: string;
|
|
20
|
-
}
|
|
13
|
+
}
|
|
21
14
|
export declare enum ExternalLinkButtonStyle {
|
|
22
|
-
Rounded = "Rounded"
|
|
23
|
-
Large = "Large"
|
|
15
|
+
Rounded = "Rounded"
|
|
24
16
|
}
|
|
25
17
|
/**
|
|
26
18
|
*
|
|
@@ -31,12 +23,11 @@ export declare enum ExternalLinkButtonStyle {
|
|
|
31
23
|
* @param {boolean} props.hideText Optional. If set to `true`, will hide `buttonName`.
|
|
32
24
|
* @param {boolean} props.redirect Optional. If set to `true`, the app will not open in a new tab / window, but in the current one.
|
|
33
25
|
* @param {ExternalLinkButtonStyle} props.buttonStyle Optional.
|
|
34
|
-
* @param {(
|
|
35
|
-
* Return with 'undefined' to prevent any navigation. (Useful when the API call fails)
|
|
26
|
+
* @param {() => Promise<string>} props.getUrlToOpen Optional. Function () => Promise<string>. Custom async function to be called to handle the navigation.
|
|
36
27
|
* @param {boolean} props.disabledColor Optional. If set to `true`, the button will show disabled color. (If not Rounded button style is used)
|
|
37
28
|
* @param {boolean} props.disabledButton Optional.
|
|
38
29
|
* @param {string} props.hoverText Optional. Applies only if Rounded button style is applied.
|
|
39
30
|
* @returns {React.FC<ExternalLinkButtonProps>} React component.
|
|
40
31
|
*/
|
|
41
|
-
|
|
32
|
+
declare const ExternalLinkButton: React.FC<ExternalLinkButtonProps>;
|
|
42
33
|
export default ExternalLinkButton;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { HubConnection } from '@microsoft/signalr';
|
|
2
2
|
export interface SignalRState {
|
|
3
|
-
loading: boolean;
|
|
4
|
-
status: 'ok' | 'error';
|
|
5
3
|
connection?: HubConnection;
|
|
6
|
-
|
|
4
|
+
status: string;
|
|
5
|
+
loading: boolean;
|
|
7
6
|
message?: string;
|
|
8
7
|
}
|
|
9
8
|
declare function useSignalR(hubUrl: string): SignalRState;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { DataInformation } from '@equinor/echo-components';
|
|
2
|
-
import { SetActiveCommPackNo, SetActiveMcPackNo, SetActiveTagNo, TagData } from './../types/hookLibrary';
|
|
2
|
+
import { DeviceOrientation, 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"
|
|
9
|
+
useSetActiveMcPackNo = "useSetActiveMcPackNo",
|
|
10
|
+
useDeviceOrientation = "useDeviceOrientation"
|
|
10
11
|
}
|
|
11
12
|
export declare const HookLibrary: Readonly<{
|
|
12
13
|
/**
|
|
@@ -46,4 +47,9 @@ export declare const HookLibrary: Readonly<{
|
|
|
46
47
|
* @returns {SetActiveMcPackNo}
|
|
47
48
|
*/
|
|
48
49
|
useSetActiveMcPackNo: () => SetActiveMcPackNo;
|
|
50
|
+
/**
|
|
51
|
+
* Hook for detecting device orientation from native devices.
|
|
52
|
+
* @returns {DeviceOrientation}
|
|
53
|
+
*/
|
|
54
|
+
useDeviceOrientation: () => DeviceOrientation;
|
|
49
55
|
}>;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useScreenOrientation(): string;
|
package/dist/hooks/useSemi.d.ts
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
|
+
declare type Semi = {
|
|
2
|
+
isSemiDocumentAvailable: boolean;
|
|
3
|
+
semiDocumentId: string;
|
|
4
|
+
};
|
|
1
5
|
/**
|
|
2
6
|
* Provides information about Semi document for a given tag.
|
|
3
7
|
*
|
|
4
|
-
* @param {{ tagNo: string
|
|
5
|
-
* @param {string} params.tagNo
|
|
6
|
-
* @param {string} params.instCode Plant's inst code.
|
|
8
|
+
* @param {{ tagNo: string }} params
|
|
9
|
+
* @param {string} params.tagNo Tag number in question.
|
|
7
10
|
* @returns {Semi} object
|
|
8
11
|
* @returns {boolean} object.isSemiDocumentAvailable - Will be set to true if the tag has Semi document.
|
|
9
12
|
* @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)
|
|
11
13
|
*/
|
|
12
|
-
export declare function useSemi({ tagNo
|
|
14
|
+
export declare function useSemi({ tagNo }: {
|
|
13
15
|
tagNo: string;
|
|
14
|
-
instCode: string;
|
|
15
16
|
}): Semi;
|
|
16
|
-
declare type Semi = {
|
|
17
|
-
isSemiDocumentAvailable: boolean;
|
|
18
|
-
semiDocumentId: string;
|
|
19
|
-
isSemiLoading: boolean;
|
|
20
|
-
};
|
|
21
17
|
export {};
|
|
@@ -5,16 +5,9 @@ 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 {
|
|
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'
|
|
8
|
+
* @returns {TagDetailsDto | undefined} TagDetailsDto or undefined
|
|
12
9
|
*/
|
|
13
|
-
export declare function useTagDetails({
|
|
10
|
+
export declare function useTagDetails({ tagNo, instCode }: {
|
|
14
11
|
tagNo: string;
|
|
15
12
|
instCode: string;
|
|
16
|
-
}):
|
|
17
|
-
tagDetails: TagDetailsDto | undefined;
|
|
18
|
-
isTagDetailsLoading: boolean;
|
|
19
|
-
hasError: boolean;
|
|
20
|
-
};
|
|
13
|
+
}): TagDetailsDto | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import './globalStyles.css';
|
|
3
|
-
import { getPlantsInfo
|
|
3
|
+
import { getPlantsInfo } from './services/api/api-plantinfo';
|
|
4
4
|
import './theme/theme.css';
|
|
5
5
|
import { getLegendStatusColor } from './utils/legendUtils';
|
|
6
6
|
export * from './components';
|
|
7
7
|
export * from './coreApplication';
|
|
8
|
+
export * from './hooks';
|
|
8
9
|
export { RegisteredHookName } from './hooks/hookLibrary';
|
|
9
10
|
export { RegisteredComponentName } from './services/componentRegistry/componentRegistry';
|
|
10
11
|
export * from './services/eventHubActions';
|
|
@@ -12,7 +13,7 @@ export * from './theme/themeConst';
|
|
|
12
13
|
export type { EchoHubPlant } from './types/echoHubPlant';
|
|
13
14
|
export * from './types/eventTypes';
|
|
14
15
|
export * from './types/extensions';
|
|
15
|
-
export type { SetActiveTagNo, TagData } from './types/hookLibrary';
|
|
16
|
+
export type { DeviceOrientation, SetActiveTagNo, TagData } from './types/hookLibrary';
|
|
16
17
|
export { LegendStatus, LegendType } from './types/legend';
|
|
17
18
|
export type { ModelPermissions } from './types/modelPermissions';
|
|
18
19
|
export { PingableSources } from './types/pingableSources';
|
|
@@ -25,9 +26,6 @@ export declare const registerEchopediaComponent: ({ name, component }: {
|
|
|
25
26
|
}) => void;
|
|
26
27
|
declare const EchoFramework: Readonly<{
|
|
27
28
|
Utils: Readonly<{
|
|
28
|
-
Navigation: Readonly<{
|
|
29
|
-
goToExternalLink: (link: string, redirect?: boolean | undefined) => void;
|
|
30
|
-
}>;
|
|
31
29
|
Color: Readonly<{
|
|
32
30
|
getLegendStatusColor: typeof getLegendStatusColor;
|
|
33
31
|
}>;
|
|
@@ -36,27 +34,24 @@ declare const EchoFramework: Readonly<{
|
|
|
36
34
|
useEchoHistory(): (path: string, params?: {
|
|
37
35
|
[key: string]: string;
|
|
38
36
|
} | undefined, state?: any) => void;
|
|
39
|
-
|
|
37
|
+
useScreenOrientation(): string;
|
|
38
|
+
useTagDetails({ tagNo, instCode }: {
|
|
40
39
|
tagNo: string;
|
|
41
40
|
instCode: string;
|
|
42
|
-
}):
|
|
43
|
-
tagDetails: import("@equinor/echo-search").TagDetailsDto | undefined;
|
|
44
|
-
isTagDetailsLoading: boolean;
|
|
45
|
-
hasError: boolean;
|
|
46
|
-
};
|
|
41
|
+
}): import("@equinor/echo-search").TagDetailsDto | undefined;
|
|
47
42
|
useSetActiveTagNo: () => import("./types/hookLibrary").SetActiveTagNo;
|
|
48
43
|
useContextMenuDataInfo: (tagNo: string, expanded: boolean, setActivePanel?: (() => void) | undefined) => import("@equinor/echo-components").DataInformation[];
|
|
49
44
|
useTagData: () => import("./types/hookLibrary").TagData;
|
|
50
45
|
useIsContextMenuInfoLoading: () => boolean;
|
|
51
46
|
useSetActiveCommPackNo: () => import("./types/hookLibrary").SetActiveCommPackNo;
|
|
52
47
|
useSetActiveMcPackNo: () => import("./types/hookLibrary").SetActiveMcPackNo;
|
|
48
|
+
useDeviceOrientation: () => import("./types/hookLibrary").DeviceOrientation;
|
|
53
49
|
}>;
|
|
54
50
|
EchopediaComponentLibrary: Readonly<{
|
|
55
51
|
getTagItem: () => import("react").FunctionComponent<any>;
|
|
56
52
|
}>;
|
|
57
53
|
APIs: Readonly<{
|
|
58
54
|
getPlantsInfo: typeof getPlantsInfo;
|
|
59
|
-
getTagDetails: typeof getTagDetails;
|
|
60
55
|
}>;
|
|
61
56
|
}>;
|
|
62
57
|
export default EchoFramework;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const baseApiUrl: string;
|
|
2
|
-
export declare function request<T>(url: string, requestType: T
|
|
2
|
+
export declare function request<T>(url: string, requestType: T): Promise<T>;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
6
6
|
|
|
7
7
|
var styleInject_es = require('../../../node_modules/style-inject/dist/style-inject.es.js');
|
|
8
8
|
|
|
9
|
-
var css_248z = ".layout-module_applicationWrapper__adzds{animation:layout-module_fadeIn__-OF4H 2s;background-color:#fff;background-image:url(../../images/frontpage-brand-placeholder-vert.jpg);background-size:cover;height:100%;overflow:auto;width:100%}@keyframes layout-module_fadeIn__-OF4H{0%{opacity:0}to{opacity:1}}@media screen and (min-width:640px){.layout-module_applicationWrapper__adzds{background-image:none}}.layout-module_mainLayoutWrapper__4kuIT{height:100%;overflow:hidden;width:100%}.layout-module_bgTransparent__bBfb-{background-color:transparent}.layout-module_footerDisclaimer__-F6dv{font-size:.7rem}.layout-module_footerLogo__CBb-F{max-height:2.5rem}.layout-module_fullBodyHeight__hQfe5{min-height:calc(100vh - 75px)!important;padding-bottom:16px}.layout-module_navbarBrand__2IOPY{color:red}::selection{background-color:#cce2ff;color:rgba(0,0,0,.87)}.layout-module_colorLayout__VHJcU{background-color:#eaf4f9;height:100%;overflow:hidden;position:relative;width:100%}.layout-module_pdfViewerNative__hnAgy{background-color:#323639;height:100%;overflow:hidden;padding-top:6.5rem;position:relative;width:100%}.layout-module_noPadding__7amV4{padding:0}.layout-module_noMargin__1eUBf{margin:0}";
|
|
9
|
+
var css_248z = ".layout-module_applicationWrapper__adzds{animation:layout-module_fadeIn__-OF4H 2s;background-color:#fff;background-image:url(../../images/frontpage-brand-placeholder-vert.jpg);background-size:cover;height:100%;overflow:auto;position:relative;width:100%}@keyframes layout-module_fadeIn__-OF4H{0%{opacity:0}to{opacity:1}}@media screen and (min-width:640px){.layout-module_applicationWrapper__adzds{background-image:none}}.layout-module_mainLayoutWrapper__4kuIT{height:100%;overflow:hidden;width:100%}.layout-module_bgTransparent__bBfb-{background-color:transparent}.layout-module_footerDisclaimer__-F6dv{font-size:.7rem}.layout-module_footerLogo__CBb-F{max-height:2.5rem}.layout-module_fullBodyHeight__hQfe5{min-height:calc(100vh - 75px)!important;padding-bottom:16px}.layout-module_navbarBrand__2IOPY{color:red}::selection{background-color:#cce2ff;color:rgba(0,0,0,.87)}.layout-module_colorLayout__VHJcU{background-color:#eaf4f9;height:100%;overflow:hidden;position:relative;width:100%}.layout-module_pdfViewerNative__hnAgy{background-color:#323639;height:100%;overflow:hidden;padding-top:6.5rem;position:relative;width:100%}.layout-module_cameraLayout__iVPug{background-color:\"transparent\"}.layout-module_cameraLayout__iVPug,.layout-module_defaultLayout__3MIwa{height:100%;position:relative;width:100%}.layout-module_noPadding__7amV4{padding:0}.layout-module_noMargin__1eUBf{margin:0}@media screen and (orientation:landscape) and (max-width:927px){.layout-module_applicationWrapper__adzds,.layout-module_cameraLayout__iVPug,.layout-module_colorLayout__VHJcU,.layout-module_defaultLayout__3MIwa,.layout-module_pdfViewerNative__hnAgy{width:calc(100% - 48px)}}@media screen and (orientation:portrait) and (max-width:767px){.layout-module_applicationWrapper__adzds,.layout-module_cameraLayout__iVPug,.layout-module_colorLayout__VHJcU,.layout-module_defaultLayout__3MIwa,.layout-module_pdfViewerNative__hnAgy{height:calc(100% - 48px)}}";
|
|
10
10
|
var style = {
|
|
11
11
|
"applicationWrapper": "layout-module_applicationWrapper__adzds",
|
|
12
12
|
"fadeIn": "layout-module_fadeIn__-OF4H",
|
|
@@ -18,6 +18,8 @@ var style = {
|
|
|
18
18
|
"navbarBrand": "layout-module_navbarBrand__2IOPY",
|
|
19
19
|
"colorLayout": "layout-module_colorLayout__VHJcU",
|
|
20
20
|
"pdfViewerNative": "layout-module_pdfViewerNative__hnAgy",
|
|
21
|
+
"cameraLayout": "layout-module_cameraLayout__iVPug",
|
|
22
|
+
"defaultLayout": "layout-module_defaultLayout__3MIwa",
|
|
21
23
|
"noPadding": "layout-module_noPadding__7amV4",
|
|
22
24
|
"noMargin": "layout-module_noMargin__1eUBf"
|
|
23
25
|
};
|
|
@@ -21,10 +21,8 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
21
21
|
var MainLayout = function MainLayout(_ref) {
|
|
22
22
|
var children = _ref.children;
|
|
23
23
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
24
|
-
className: layout_module["default"].applicationWrapper
|
|
25
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26
24
|
className: layout_module["default"].mainLayoutWrapper
|
|
27
|
-
}, children)
|
|
25
|
+
}, children);
|
|
28
26
|
};
|
|
29
27
|
|
|
30
28
|
var ColorLayout = function ColorLayout(_ref2) {
|
|
@@ -44,15 +42,15 @@ var PdfViewerNative = function PdfViewerNative(_ref3) {
|
|
|
44
42
|
var CameraLayout = function CameraLayout(_ref4) {
|
|
45
43
|
var children = _ref4.children;
|
|
46
44
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
47
|
-
|
|
48
|
-
backgroundColor: 'transparent'
|
|
49
|
-
}
|
|
45
|
+
className: layout_module["default"].cameraLayout
|
|
50
46
|
}, children);
|
|
51
47
|
};
|
|
52
48
|
|
|
53
49
|
var DefaultLayout = function DefaultLayout(_ref5) {
|
|
54
50
|
var children = _ref5.children;
|
|
55
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
51
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
52
|
+
className: layout_module["default"].defaultLayout
|
|
53
|
+
}, children);
|
|
56
54
|
};
|
|
57
55
|
|
|
58
56
|
exports.CameraLayout = CameraLayout;
|
|
@@ -121,7 +121,7 @@ var ExternalAppsMenu = function ExternalAppsMenu(_a) {
|
|
|
121
121
|
id: menuButtonId,
|
|
122
122
|
"aria-controls": appMenuOnButtonId,
|
|
123
123
|
"aria-haspopup": "true",
|
|
124
|
-
"aria-expanded":
|
|
124
|
+
"aria-expanded": Boolean(menuState.buttonEl),
|
|
125
125
|
onClick: function onClick() {
|
|
126
126
|
isOpen ? closeMenu() : openMenu(buttonElRef);
|
|
127
127
|
},
|
|
@@ -138,7 +138,7 @@ var ExternalAppsMenu = function ExternalAppsMenu(_a) {
|
|
|
138
138
|
})), /*#__PURE__*/React__default["default"].createElement(edsCoreReact.Menu, {
|
|
139
139
|
id: appMenuOnButtonId,
|
|
140
140
|
"aria-labelledby": menuButtonId,
|
|
141
|
-
open:
|
|
141
|
+
open: Boolean(menuState.buttonEl),
|
|
142
142
|
anchorEl: buttonElRef === null || buttonElRef === void 0 ? void 0 : buttonElRef.current,
|
|
143
143
|
placement: 'bottom-end',
|
|
144
144
|
onClose: closeMenu,
|
|
@@ -149,9 +149,9 @@ var ExternalAppsMenu = function ExternalAppsMenu(_a) {
|
|
|
149
149
|
onMouseLeave: function onMouseLeave() {
|
|
150
150
|
closeMenu();
|
|
151
151
|
}
|
|
152
|
-
},
|
|
152
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", null, externalAppLinks.map(function (AppLink) {
|
|
153
153
|
return renderAppLink(AppLink.component);
|
|
154
|
-
}), children)
|
|
154
|
+
}), children)));
|
|
155
155
|
};
|
|
156
156
|
|
|
157
157
|
exports.ExternalAppsMenu = ExternalAppsMenu;
|
|
@@ -1,33 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
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
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); }
|
|
16
4
|
|
|
17
5
|
Object.defineProperty(exports, '__esModule', {
|
|
18
6
|
value: true
|
|
19
7
|
});
|
|
20
8
|
|
|
21
|
-
var EchoUtils = require('@equinor/echo-utils');
|
|
22
|
-
|
|
23
9
|
var React = require('react');
|
|
24
10
|
|
|
25
11
|
var useContextualAppLinksContext = require('../hooks/useContextualAppLinksContext.js');
|
|
26
12
|
|
|
27
|
-
var iconButtonSpinner = require('./iconButtonSpinner.js');
|
|
28
|
-
|
|
29
|
-
var externalLinkToCommApp = require('./externalLinkToCommApp.js');
|
|
30
|
-
|
|
31
13
|
var externalLinkToMcApp = require('./externalLinkToMcApp.js');
|
|
32
14
|
|
|
33
15
|
var externalLinkToProCoSys = require('./externalLinkToProCoSys.js');
|
|
@@ -48,8 +30,6 @@ function _interopDefaultLegacy(e) {
|
|
|
48
30
|
};
|
|
49
31
|
}
|
|
50
32
|
|
|
51
|
-
var EchoUtils__default = /*#__PURE__*/_interopDefaultLegacy(EchoUtils);
|
|
52
|
-
|
|
53
33
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
54
34
|
/**
|
|
55
35
|
* To be used inside ContextualAppLinks component.
|
|
@@ -64,64 +44,29 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
64
44
|
|
|
65
45
|
|
|
66
46
|
var AllExternalLinks = function AllExternalLinks() {
|
|
67
|
-
var useStateSafe = EchoUtils__default["default"].Hooks.useStateSafe;
|
|
68
|
-
|
|
69
47
|
var _useContextualAppLink = useContextualAppLinksContext.useContextualAppLinksContext(),
|
|
70
48
|
tag = _useContextualAppLink.tag,
|
|
71
49
|
instCode = _useContextualAppLink.instCode;
|
|
72
50
|
|
|
73
|
-
var tagNo = tag.tagNo;
|
|
74
|
-
|
|
75
|
-
var _useStateSafe = useStateSafe(false),
|
|
76
|
-
_useStateSafe2 = _slicedToArray(_useStateSafe, 2),
|
|
77
|
-
isTR2000Loading = _useStateSafe2[0],
|
|
78
|
-
setIsisTR2000LoadingLoading = _useStateSafe2[1];
|
|
79
|
-
|
|
80
|
-
var _useStateSafe3 = useStateSafe(false),
|
|
81
|
-
_useStateSafe4 = _slicedToArray(_useStateSafe3, 2),
|
|
82
|
-
isSapLoading = _useStateSafe4[0],
|
|
83
|
-
setIsSapLoading = _useStateSafe4[1];
|
|
84
|
-
|
|
85
|
-
var _useStateSafe5 = useStateSafe(false),
|
|
86
|
-
_useStateSafe6 = _slicedToArray(_useStateSafe5, 2),
|
|
87
|
-
isSemiLoading = _useStateSafe6[0],
|
|
88
|
-
setIsSemiLoading = _useStateSafe6[1];
|
|
89
|
-
|
|
90
51
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(externalLinkToStid.ExternalLinkToStid, {
|
|
91
|
-
tagNo: tagNo,
|
|
52
|
+
tagNo: tag.tagNo,
|
|
92
53
|
instCode: instCode
|
|
93
54
|
}), /*#__PURE__*/React__default["default"].createElement(externalLinkToProCoSys.ExternalLinkToProCoSys, {
|
|
94
|
-
tagNo: tagNo,
|
|
55
|
+
tagNo: tag.tagNo,
|
|
95
56
|
instCode: instCode
|
|
96
|
-
}), /*#__PURE__*/React__default["default"].createElement(
|
|
97
|
-
tagNo: tagNo,
|
|
98
|
-
instCode: instCode
|
|
99
|
-
}), /*#__PURE__*/React__default["default"].createElement(externalLinkToCommApp.ExternalLinkToCommApp, {
|
|
100
|
-
tagNo: tagNo,
|
|
57
|
+
}), /*#__PURE__*/React__default["default"].createElement(externalLinkToSap.ExternalLinkToSap, {
|
|
58
|
+
tagNo: tag.tagNo,
|
|
101
59
|
instCode: instCode
|
|
60
|
+
}), /*#__PURE__*/React__default["default"].createElement(externalLinkToSemiDoc.ExternalLinkToSemiDoc, {
|
|
61
|
+
tagNo: tag.tagNo
|
|
62
|
+
}), /*#__PURE__*/React__default["default"].createElement(externalLinkToMcApp.ExternalLinkToMcApp, {
|
|
63
|
+
tagNo: tag.tagNo
|
|
102
64
|
}), /*#__PURE__*/React__default["default"].createElement(externalLinkToSafeX.ExternalLinkToSafeX, {
|
|
103
65
|
tag: tag
|
|
104
|
-
}), /*#__PURE__*/React__default["default"].createElement(externalLinkToSemiDoc.ExternalLinkToSemiDoc, {
|
|
105
|
-
tagNo: tagNo,
|
|
106
|
-
instCode: instCode,
|
|
107
|
-
loadingStatusCallback: function loadingStatusCallback(isButtonLoading) {
|
|
108
|
-
setIsSemiLoading(isButtonLoading);
|
|
109
|
-
}
|
|
110
66
|
}), /*#__PURE__*/React__default["default"].createElement(externalLinkToTr2000.ExternalLinkToTr2000, {
|
|
111
|
-
tagNo: tagNo,
|
|
112
|
-
instCode: instCode
|
|
113
|
-
|
|
114
|
-
setIsisTR2000LoadingLoading(isButtonLoading);
|
|
115
|
-
}
|
|
116
|
-
}), /*#__PURE__*/React__default["default"].createElement(externalLinkToSap.ExternalLinkToSap, {
|
|
117
|
-
tagNo: tagNo,
|
|
118
|
-
instCode: instCode,
|
|
119
|
-
loadingStatusCallback: function loadingStatusCallback(isButtonLoading) {
|
|
120
|
-
setIsSapLoading(isButtonLoading);
|
|
121
|
-
}
|
|
122
|
-
}), isTR2000Loading || isSapLoading || isSemiLoading ? /*#__PURE__*/React__default["default"].createElement(iconButtonSpinner.IconButtonSpinner, {
|
|
123
|
-
size: 24
|
|
124
|
-
}) : null);
|
|
67
|
+
tagNo: tag.tagNo,
|
|
68
|
+
instCode: instCode
|
|
69
|
+
}));
|
|
125
70
|
};
|
|
126
71
|
|
|
127
72
|
exports.AllExternalLinks = AllExternalLinks;
|
|
@@ -6,16 +6,10 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
-
var _tslib = require('../../../../_virtual/_tslib.js');
|
|
10
|
-
|
|
11
|
-
var EchoCore = require('@equinor/echo-core');
|
|
12
|
-
|
|
13
9
|
var React = require('react');
|
|
14
10
|
|
|
15
11
|
var externalLinkButton = require('../../externalLinkButton/externalLinkButton.js');
|
|
16
12
|
|
|
17
|
-
var externalLinkButtons_helpers = require('./externalLinkButtons.helpers.js');
|
|
18
|
-
|
|
19
13
|
function _interopDefaultLegacy(e) {
|
|
20
14
|
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
21
15
|
'default': e
|
|
@@ -24,68 +18,19 @@ function _interopDefaultLegacy(e) {
|
|
|
24
18
|
|
|
25
19
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
26
20
|
/**
|
|
27
|
-
* External link button to
|
|
21
|
+
* External link button to McApp.
|
|
28
22
|
*
|
|
29
23
|
* @param {string} tagNo The tag's number to open in McApp.
|
|
30
|
-
* @param {string} instCode Plant installation code.
|
|
31
24
|
* @returns {React.FC<ExternalLinkToMcAppProps>} React component.
|
|
32
25
|
*/
|
|
33
26
|
|
|
34
27
|
|
|
35
28
|
var ExternalLinkToMcApp = function ExternalLinkToMcApp(_ref) {
|
|
36
|
-
var tagNo = _ref.tagNo
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
function createUrl(params) {
|
|
41
|
-
return _tslib.__awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
42
|
-
var _yield$externalLinkBu, tagDetails, proCoSysTag, hasError;
|
|
43
|
-
|
|
44
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
45
|
-
while (1) {
|
|
46
|
-
switch (_context.prev = _context.next) {
|
|
47
|
-
case 0:
|
|
48
|
-
_context.next = 2;
|
|
49
|
-
return externalLinkButtons_helpers.getTagDetailsAndProCoSysData(Object.assign({}, params));
|
|
50
|
-
|
|
51
|
-
case 2:
|
|
52
|
-
_yield$externalLinkBu = _context.sent;
|
|
53
|
-
tagDetails = _yield$externalLinkBu.tagDetails;
|
|
54
|
-
proCoSysTag = _yield$externalLinkBu.proCoSysTag;
|
|
55
|
-
hasError = _yield$externalLinkBu.hasError;
|
|
56
|
-
return _context.abrupt("return", hasError ? undefined : "https://apps.procosys.com/mc/".concat(proCoSysPlantCode, "/").concat(tagDetails === null || tagDetails === void 0 ? void 0 : tagDetails.projectCode, "/Tag/").concat(proCoSysTag === null || proCoSysTag === void 0 ? void 0 : proCoSysTag.id));
|
|
57
|
-
|
|
58
|
-
case 7:
|
|
59
|
-
case "end":
|
|
60
|
-
return _context.stop();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}, _callee);
|
|
64
|
-
}));
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return /*#__PURE__*/React__default["default"].createElement(externalLinkButton.ExternalLinkButton, {
|
|
68
|
-
buttonName: "Mc App",
|
|
29
|
+
var tagNo = _ref.tagNo;
|
|
30
|
+
return /*#__PURE__*/React__default["default"].createElement(externalLinkButton["default"], {
|
|
31
|
+
buttonName: "McApp",
|
|
69
32
|
buttonIcon: "McApp",
|
|
70
|
-
|
|
71
|
-
return _tslib.__awaiter(void 0, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
72
|
-
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
73
|
-
while (1) {
|
|
74
|
-
switch (_context2.prev = _context2.next) {
|
|
75
|
-
case 0:
|
|
76
|
-
return _context2.abrupt("return", createUrl({
|
|
77
|
-
tagNo: tagNo,
|
|
78
|
-
instCode: instCode
|
|
79
|
-
}));
|
|
80
|
-
|
|
81
|
-
case 1:
|
|
82
|
-
case "end":
|
|
83
|
-
return _context2.stop();
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}, _callee2);
|
|
87
|
-
}));
|
|
88
|
-
},
|
|
33
|
+
linkTo: "mcapp://v1:tagscope:".concat(tagNo),
|
|
89
34
|
buttonStyle: externalLinkButton.ExternalLinkButtonStyle.Rounded
|
|
90
35
|
});
|
|
91
36
|
};
|