@equinor/echo-framework 0.10.27 → 0.10.28
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/__tests__/3dButtonUtils.test.d.ts +1 -0
- package/dist/components/contextualAppLinks/externalLinkButtons/trainingCenterForValvesMenu.d.ts +7 -0
- package/dist/components/echo3DButton/3dButtonUtils.d.ts +12 -0
- package/dist/components/echo3DButton/OpenIn3dDropdown.d.ts +11 -0
- package/dist/components/echo3DButton/echo3DButton.d.ts +18 -0
- package/dist/components/echo3DButton/echo3DIconButton.d.ts +26 -0
- package/dist/components/echo3DButton/icons/E3DWebBetaIcon.d.ts +6 -0
- package/dist/components/echo3DButton/index.d.ts +2 -0
- package/dist/components/echo3DButton/missingEcho3dAccessDialog.d.ts +8 -0
- package/dist/components/echo3DButton/plantNotAvailableInfo.d.ts +6 -0
- package/dist/components/echo3DButton/useGetOpenIn3d.d.ts +5 -0
- package/dist/components/echo3DButton/useGoToEcho3DWebLink.d.ts +1 -0
- package/dist/components/index.d.ts +2 -1
- package/dist/components/prepview/common/index.d.ts +1 -0
- package/dist/components/prepview/common/link/Link.d.ts +7 -0
- package/dist/components/prepview/workorder/header/{Header.d.ts → WorkOrderHeader.d.ts} +3 -3
- package/dist/components/prepview/workorder/header/index.d.ts +1 -1
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/useHas3dAccess.d.ts +1 -0
- package/dist/hooks/usePlantAvailableIn3d.d.ts +1 -0
- package/dist/hooks/usePlantAvailableIn3dWeb.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +6 -6
- package/dist/theme/themeConst.d.ts +1 -0
- package/dist/utils/arrayUtils.d.ts +8 -0
- package/dist/utils/arrayUtils.test.d.ts +1 -0
- package/dist/utils/tagUtils.d.ts +23 -0
- package/dist/utils/tagUtils.test.d.ts +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TagDetailsDto } from '@equinor/echo-search';
|
|
2
|
+
export declare enum ApplicationLinks {
|
|
3
|
+
Launch3D = "echo://",
|
|
4
|
+
Echo3dWeb = "/echo3d"
|
|
5
|
+
}
|
|
6
|
+
export declare enum OpenIn3DOption {
|
|
7
|
+
App = "App",
|
|
8
|
+
Web = "Web"
|
|
9
|
+
}
|
|
10
|
+
export declare const getEcho3DAppLink: (tagDetailsInput: TagDetailsDto | undefined) => Promise<string>;
|
|
11
|
+
export declare const getApplyForEchoAccessUrl: (instCode: string, tagDetails?: TagDetailsDto) => Promise<string>;
|
|
12
|
+
export declare const getParamsFor3DWeb: (instCode: string, tagDetails: TagDetailsDto | undefined, tagNo: string | undefined) => Promise<string>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface OpenIn3dDropdownProps {
|
|
3
|
+
anchorRef: React.RefObject<HTMLButtonElement>;
|
|
4
|
+
plantIsAvailableIn3d: boolean;
|
|
5
|
+
plantIsAvailableIn3dWeb: boolean;
|
|
6
|
+
setShow3dDropdown: React.Dispatch<React.SetStateAction<boolean>>;
|
|
7
|
+
openIn3dWeb: (event: React.MouseEvent) => void;
|
|
8
|
+
openIn3dApp: (event: React.MouseEvent) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const OpenIn3dDropdown: React.FC<OpenIn3dDropdownProps>;
|
|
11
|
+
export default OpenIn3dDropdown;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Echo3DButtonProps {
|
|
3
|
+
instCode: string;
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
openInNewWindow?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* Component for rendering 3D buttons. Will display both echo 3D web and echo 3D (App) button
|
|
10
|
+
* By using the 'enabled' attribute, you can control if the button should be enabled or not.
|
|
11
|
+
* @param {Echo3DButtonProps} {
|
|
12
|
+
* enabled,
|
|
13
|
+
* openInNewWindow
|
|
14
|
+
* }
|
|
15
|
+
* @return {*}
|
|
16
|
+
*/
|
|
17
|
+
export declare const Echo3DButton: React.FC<Echo3DButtonProps>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { TagDetailsDto } from '@equinor/echo-search';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface Echo3DIconButtonProps {
|
|
4
|
+
instCode: string;
|
|
5
|
+
tagDetails?: TagDetailsDto;
|
|
6
|
+
tagNo: string;
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
openInNewWindow?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* Component for rendering 3D buttons.
|
|
13
|
+
* Will render a ghost icon that displays a dropdown upon click with 3D web and 3D app items.
|
|
14
|
+
* The items in the dropdown will be enabled/disabled based on plant info - where it is stated if the plant is available for 3D App and/or 3D Web.
|
|
15
|
+
* Setting openInNewWindow to true will open 3d web in new tab if 3D web button is clicked.
|
|
16
|
+
* Echo 3D app will always open in new tab/open 3D app
|
|
17
|
+
* @param {OLDModel3dButtonProps} {
|
|
18
|
+
* tagDetails,
|
|
19
|
+
* tagNo,
|
|
20
|
+
* enabled,
|
|
21
|
+
* openInNewWindow
|
|
22
|
+
* }
|
|
23
|
+
* @return {*}
|
|
24
|
+
*/
|
|
25
|
+
export declare const Echo3DIconButton: React.FC<Echo3DIconButtonProps>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface MissingEcho3dAccessDialogProps {
|
|
3
|
+
getApplyForAccessUrl: Promise<string>;
|
|
4
|
+
isDialogOpen: boolean;
|
|
5
|
+
setIsDialogOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
6
|
+
}
|
|
7
|
+
export declare const MissingEcho3dAccessDialog: React.FC<MissingEcho3dAccessDialogProps>;
|
|
8
|
+
export default MissingEcho3dAccessDialog;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TagDetailsDto } from '@equinor/echo-search';
|
|
2
|
+
export declare const useGetOpenIn3d: (instCode: string, plantIsAvailableIn3d: boolean, plantIsAvailableIn3dWeb: boolean) => {
|
|
3
|
+
openIn3dWeb: (openInNewWindow?: boolean, tagDetails?: TagDetailsDto, tagNo?: string) => Promise<void>;
|
|
4
|
+
openIn3dApp: (event: React.MouseEvent, tagDetails?: TagDetailsDto) => Promise<void>;
|
|
5
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useGoToEcho3DWebLink: () => (openInNewWindow: boolean, linkTo: string, paramsString: string) => void;
|
|
@@ -2,6 +2,7 @@ export * from './appLinks';
|
|
|
2
2
|
export * from './containers';
|
|
3
3
|
export * from './contextualAppLinks/externalLinkButtons/index';
|
|
4
4
|
export { ContextualAppLinks } from './contextualAppLinks/index';
|
|
5
|
+
export * from './echo3DButton';
|
|
5
6
|
export * from './echoLogo';
|
|
6
7
|
export * from './errorBoundary';
|
|
7
8
|
export * from './externalLinkButton/externalLinkButton';
|
|
@@ -12,9 +13,9 @@ export * from './pageMenu';
|
|
|
12
13
|
export * from './panel';
|
|
13
14
|
export * from './panelButton';
|
|
14
15
|
export * from './plantSelector';
|
|
16
|
+
export * from './prepview';
|
|
15
17
|
export * from './projectSelector';
|
|
16
18
|
export * from './realTimeData';
|
|
17
|
-
export * from './prepview';
|
|
18
19
|
export * from './router';
|
|
19
20
|
export * from './searchMenu';
|
|
20
21
|
export * from './tagNumber';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { WorkOrderDetails } from '../../types';
|
|
3
|
-
interface
|
|
3
|
+
interface WorkOrderHeaderProps {
|
|
4
4
|
instCode: string;
|
|
5
5
|
workOrder: WorkOrderDetails;
|
|
6
6
|
workOrderHeaderAction?: React.ReactNode;
|
|
7
7
|
}
|
|
8
|
-
declare function
|
|
9
|
-
export {
|
|
8
|
+
declare function WorkOrderHeader(props: WorkOrderHeaderProps): JSX.Element | null;
|
|
9
|
+
export { WorkOrderHeader };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './WorkOrderHeader';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export * from './useEchoHistory';
|
|
2
|
+
export * from './useHas3dAccess';
|
|
3
|
+
export * from './usePlantAvailableIn3d';
|
|
4
|
+
export * from './usePlantAvailableIn3dWeb';
|
|
2
5
|
export * from './useScreenOrientation';
|
|
3
6
|
export * from './useScreenValues';
|
|
4
7
|
export * from './useTagDetails';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useHas3dAccess(plantCode?: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function usePlantAvailableIn3d(plantCode?: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function usePlantAvailableIn3dWeb(plantCode?: string): boolean;
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--xSmall:0.25rem;--small:0.5rem;--medium:1rem;--large:1.5rem;--xLarge:2rem;--black:#000;--white:#fff;--equiBlue1:#233746;--equiBlue2:#d7e1ed;--equiBlue3:#d5eaf4;--equiGray1:#87929a;--equiGray2:#b4bbc0;--equiGray3:#d1d5d8;--equiGray4:#e3e6e8;--equiRed1:#ff1243;--darkEquiRed:#ce183e;--equiGreen1:#006f79;--equiGreen2:#deedee;--equiGreen3:#e6faec;--echoText:#3d3d3d;--disabledBackgroundColor:#eaeaea;--disabledColor:#6f6f6f;--onGoing:#fbca36;--done:#4bb748;--asBuilt:#007079;--planned:#4bb748;--future:#52c0ff;--historic:#ff7d98;--outOfService:#ff9200;--reserved:#243746;--voided:#eb0000;--default:#dcdcdc;--ok:#23ef2a;--os:#adaead;--pa:#f94693;--pb:#fd0;--unknown:#525252;--rfccSent:#bcf316;--rfccPartly:#c7f316;--rfcc:#60f316;--rfocSent:#0dccf2;--rfocPartly:#1accf2;--rfoc:#0d59f2;--rfccRejected:#ff1243;--rfocRejected:#ff1243;--handoverError:#eb0000;--priorityHigh:#ff1243;--priorityMedium:#fbca36;--systems:#d5eaf4;--locations:#3eb54a;--warningText:#ad6200;--warningIcon:#ff9200;--warningBackground:#ffe7d6;--dropDownButtonBackground:#f0f0f0;--dropDownTextColor:grey;--searchBarBackground:#f7f7f7;--highSeverity:#ffc1c1;--mediumSeverity:#ffe7d6;--lowSeverity:#dce6ee;--defaultSeverity:#d5eaf4;--highSeverityText:#eb0000;--mediumSeverityText:#52c0ff;--lowSeverityText:#4bb748;--defaultSeverityText:#3d3d3d;--toggleActive:#4bb748;--toggleInactive:#b30d2f;--hoverIcon:#004f55;--tertiaryText:#6f6f6f}#root,body,html{height:100%;overflow:hidden;width:100%}html[data-theme=dark]{--equiGreen1:#006f79}body,h1,h2,h3,h4,h5,h6,label,p{color:var(--echoText)}body,html,span{font-family:Equinor!important}::-webkit-scrollbar{width:10px}::-webkit-scrollbar-track{background:#f7f7f7;border-radius:5px}::-webkit-scrollbar-thumb{background:#007079;border-radius:5px}::-webkit-scrollbar-thumb:hover{background:#004f55}button,input{appearance:none;background:transparent;border:inherit;color:inherit;font:inherit;outline:0}input,input:after,input:before{-webkit-user-select:initial;-khtml-user-select:initial;-moz-user-select:initial;-ms-user-select:initial;user-select:auto}
|
|
1
|
+
:root{--xSmall:0.25rem;--small:0.5rem;--medium:1rem;--large:1.5rem;--xLarge:2rem;--black:#000;--white:#fff;--equiBlue1:#233746;--equiBlue2:#d7e1ed;--equiBlue3:#d5eaf4;--equiGray1:#87929a;--equiGray2:#b4bbc0;--equiGray3:#d1d5d8;--equiGray4:#e3e6e8;--equiRed1:#ff1243;--darkEquiRed:#ce183e;--equiGreen1:#006f79;--equiGreen2:#deedee;--equiGreen3:#e6faec;--echoText:#3d3d3d;--disabledBackgroundColor:#eaeaea;--disabledColor:#6f6f6f;--onGoing:#fbca36;--done:#4bb748;--asBuilt:#007079;--planned:#4bb748;--future:#52c0ff;--historic:#ff7d98;--outOfService:#ff9200;--reserved:#243746;--voided:#eb0000;--default:#dcdcdc;--ok:#23ef2a;--os:#adaead;--pa:#f94693;--pb:#fd0;--unknown:#525252;--rfccSent:#bcf316;--rfccPartly:#c7f316;--rfcc:#60f316;--rfocSent:#0dccf2;--rfocPartly:#1accf2;--rfoc:#0d59f2;--rfccRejected:#ff1243;--rfocRejected:#ff1243;--handoverError:#eb0000;--priorityHigh:#ff1243;--priorityMedium:#fbca36;--systems:#d5eaf4;--locations:#3eb54a;--warningText:#ad6200;--warningIcon:#ff9200;--warningBackground:#ffe7d6;--dropDownButtonBackground:#f0f0f0;--dropDownTextColor:grey;--searchBarBackground:#f7f7f7;--highSeverity:#ffc1c1;--mediumSeverity:#ffe7d6;--lowSeverity:#dce6ee;--defaultSeverity:#d5eaf4;--highSeverityText:#eb0000;--mediumSeverityText:#52c0ff;--lowSeverityText:#4bb748;--defaultSeverityText:#3d3d3d;--toggleActive:#4bb748;--toggleInactive:#b30d2f;--hoverIcon:#004f55;--tertiaryText:#6f6f6f;--dividerColor:#dcdcdc}#root,body,html{height:100%;overflow:hidden;width:100%}html[data-theme=dark]{--equiGreen1:#006f79}body,h1,h2,h3,h4,h5,h6,label,p{color:var(--echoText)}body,html,span{font-family:Equinor!important}::-webkit-scrollbar{width:10px}::-webkit-scrollbar-track{background:#f7f7f7;border-radius:5px}::-webkit-scrollbar-thumb{background:#007079;border-radius:5px}::-webkit-scrollbar-thumb:hover{background:#004f55}button,input{appearance:none;background:transparent;border:inherit;color:inherit;font:inherit;outline:0}input,input:after,input:before{-webkit-user-select:initial;-khtml-user-select:initial;-moz-user-select:initial;-ms-user-select:initial;user-select:auto}
|
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,9 @@ declare const EchoFramework: Readonly<{
|
|
|
48
48
|
useEchoHistory(): (path: string, params?: {
|
|
49
49
|
[key: string]: string;
|
|
50
50
|
} | undefined, state?: any) => void;
|
|
51
|
+
useHas3dAccess(plantCode?: string | undefined): boolean;
|
|
52
|
+
usePlantAvailableIn3d(plantCode?: string | undefined): boolean;
|
|
53
|
+
usePlantAvailableIn3dWeb(plantCode?: string | undefined): boolean;
|
|
51
54
|
useScreenOrientation(): import("./types/hookLibrary").ScreenOrientation;
|
|
52
55
|
useScreenValues(): {
|
|
53
56
|
isScreenMobileSize: boolean;
|