@equinor/echo-framework 0.11.0-rc13 → 0.11.0-rc15

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.
Files changed (44) hide show
  1. package/dist/__tests__/3dButtonUtils.test.d.ts +1 -0
  2. package/dist/components/contextualAppLinks/externalLinkButtons/trainingCenterForValvesMenu.d.ts +7 -0
  3. package/dist/components/echo3DButton/3dButtonUtils.d.ts +12 -0
  4. package/dist/components/echo3DButton/OpenIn3dDropdown.d.ts +11 -0
  5. package/dist/components/echo3DButton/echo3DButton.d.ts +18 -0
  6. package/dist/components/echo3DButton/echo3DIconButton.d.ts +26 -0
  7. package/dist/components/echo3DButton/icons/E3DWebBetaIcon.d.ts +6 -0
  8. package/dist/components/echo3DButton/index.d.ts +2 -0
  9. package/dist/components/echo3DButton/missingEcho3dAccessDialog.d.ts +8 -0
  10. package/dist/components/echo3DButton/plantNotAvailableInfo.d.ts +6 -0
  11. package/dist/components/echo3DButton/useGetOpenIn3d.d.ts +5 -0
  12. package/dist/components/echo3DButton/useGoToEcho3DWebLink.d.ts +1 -0
  13. package/dist/components/index.d.ts +2 -1
  14. package/dist/components/prepview/common/index.d.ts +1 -0
  15. package/dist/components/prepview/common/info/section/longText/LongTextSection.d.ts +1 -1
  16. package/dist/components/prepview/common/link/Link.d.ts +7 -0
  17. package/dist/components/prepview/workorder/header/{Header.d.ts → WorkOrderHeader.d.ts} +3 -3
  18. package/dist/components/prepview/workorder/header/index.d.ts +1 -1
  19. package/dist/components/tagNumber/tagNumber.d.ts +3 -2
  20. package/dist/coreApplication/EchoToolBar.d.ts +11 -2
  21. package/dist/coreApplication/EchoUserInterfaceStore.d.ts +4 -0
  22. package/dist/hooks/index.d.ts +3 -0
  23. package/dist/hooks/useHas3dAccess.d.ts +1 -0
  24. package/dist/hooks/usePlantAvailableIn3d.d.ts +1 -0
  25. package/dist/hooks/usePlantAvailableIn3dWeb.d.ts +1 -0
  26. package/dist/index.css +1 -1
  27. package/dist/index.d.ts +24 -0
  28. package/dist/index.js +11 -11
  29. package/dist/services/componentRegistry/componentRegistry.d.ts +26 -6
  30. package/dist/services/deviceInformation/deepDeviceInfo.d.ts +41 -0
  31. package/dist/services/deviceInformation/deviceInfo.d.ts +45 -0
  32. package/dist/services/searchItemDetails/searchItemDetails.store.d.ts +26 -0
  33. package/dist/services/searchItemDetails/searchItemDetails.store.test.d.ts +1 -0
  34. package/dist/services/searchItemDetails/searchItemDetailsContainer.d.ts +6 -0
  35. package/dist/theme/themeConst.d.ts +1 -0
  36. package/dist/types/device.d.ts +53 -0
  37. package/dist/types/eventTypes/index.d.ts +1 -0
  38. package/dist/types/eventTypes/searchDetailsContainerEvents.d.ts +3 -0
  39. package/dist/types/hookLibrary.d.ts +18 -3
  40. package/dist/utils/arrayUtils.d.ts +8 -0
  41. package/dist/utils/arrayUtils.test.d.ts +1 -0
  42. package/dist/utils/tagUtils.d.ts +23 -0
  43. package/dist/utils/tagUtils.test.d.ts +1 -0
  44. package/package.json +7 -5
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ type TrainingCenterForValvesMenuProps = {
3
+ tagNo: string;
4
+ instCode: string;
5
+ };
6
+ export declare const TrainingCenterForValvesMenu: React.FC<TrainingCenterForValvesMenuProps>;
7
+ 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,6 @@
1
+ import React from 'react';
2
+ interface E3DWebBetaIconProps {
3
+ color: string;
4
+ }
5
+ declare const E3DWebBetaIcon: React.FC<E3DWebBetaIconProps>;
6
+ export default E3DWebBetaIcon;
@@ -0,0 +1,2 @@
1
+ export * from './echo3DButton';
2
+ export * from './echo3DIconButton';
@@ -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,6 @@
1
+ import React from 'react';
2
+ interface PlantNotAvailableInfoProps {
3
+ children: React.ReactNode;
4
+ }
5
+ declare const PlantNotAvailableInfo: React.FC<PlantNotAvailableInfoProps>;
6
+ export default PlantNotAvailableInfo;
@@ -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';
@@ -3,3 +3,4 @@ export * from './contentPicker';
3
3
  export * from './details';
4
4
  export * from './fileSizeDisplay';
5
5
  export * from './info';
6
+ export * from './link/Link';
@@ -4,5 +4,5 @@ interface Props {
4
4
  toggleLongText: () => void;
5
5
  isPunch?: boolean;
6
6
  }
7
- declare function LongTextSection({ text, toggleLongText, isPunch }: Props): JSX.Element;
7
+ declare function LongTextSection({ text, toggleLongText }: Props): JSX.Element;
8
8
  export { LongTextSection };
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface LinkProps {
3
+ href: string;
4
+ linkText: string;
5
+ }
6
+ declare const Link: ({ href, linkText }: LinkProps) => JSX.Element;
7
+ export { Link };
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import { WorkOrderDetails } from '../../types';
3
- interface HeaderProps {
3
+ interface WorkOrderHeaderProps {
4
4
  instCode: string;
5
5
  workOrder: WorkOrderDetails;
6
6
  workOrderHeaderAction?: React.ReactNode;
7
7
  }
8
- declare function Header(props: HeaderProps): JSX.Element | null;
9
- export { Header };
8
+ declare function WorkOrderHeader(props: WorkOrderHeaderProps): JSX.Element | null;
9
+ export { WorkOrderHeader };
@@ -1 +1 @@
1
- export * from './Header';
1
+ export * from './WorkOrderHeader';
@@ -2,6 +2,7 @@
2
2
  interface TagNoProps {
3
3
  tagNo: string;
4
4
  className?: string;
5
+ replaceLastNavigationItem?: boolean;
5
6
  }
6
- export declare const TagNumber: ({ tagNo, className }: TagNoProps) => JSX.Element;
7
- export default TagNumber;
7
+ export declare const TagNumber: ({ tagNo, className, replaceLastNavigationItem }: TagNoProps) => JSX.Element;
8
+ export {};
@@ -1,3 +1,12 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
+ export interface SidebarButtonListType {
3
+ buttonTitle: string;
4
+ onClick: () => void;
5
+ iconName: string;
6
+ iconColor: string;
7
+ isVisible: boolean;
8
+ active: boolean;
9
+ }
2
10
  export declare const EchoToolBar: () => JSX.Element;
3
- export default EchoToolBar;
11
+ declare const _default: React.MemoExoticComponent<() => JSX.Element>;
12
+ export default _default;
@@ -15,3 +15,7 @@ export interface EchoUiState {
15
15
  updateShowPlantNameContent: (showPlantNameContent: boolean) => void;
16
16
  }
17
17
  export declare const useEchoUserInterfaceStore: zustand.UseBoundStore<zustand.StoreApi<EchoUiState>>;
18
+ /**
19
+ * @deprecated renamed to useEchoUserInterfaceStore
20
+ */
21
+ export declare const useEchoUiContext: zustand.UseBoundStore<zustand.StoreApi<EchoUiState>>;
@@ -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
@@ -10,7 +10,11 @@ export { useIsCompactLayout } from './hooks/useIsCompactLayout';
10
10
  export { useScreenOrientation } from './hooks/useScreenOrientation';
11
11
  export { useScreenValues } from './hooks/useScreenValues';
12
12
  export { RegisteredComponentName } from './services/componentRegistry/componentRegistry';
13
+ export { DetailedDeviceInformationProvider, detailedDeviceInformationProvider } from './services/deviceInformation/deepDeviceInfo';
14
+ export { deviceInfo, DeviceInformation } from './services/deviceInformation/deviceInfo';
13
15
  export * from './services/eventHubActions';
16
+ export * from './services/searchItemDetails/searchItemDetails.store';
17
+ export { SearchItemDetailsContainer } from './services/searchItemDetails/searchItemDetailsContainer';
14
18
  export * from './theme/themeConst';
15
19
  export type { EchoHubPlant } from './types/echoHubPlant';
16
20
  export * from './types/eventTypes';
@@ -36,9 +40,17 @@ declare const EchoFramework: Readonly<{
36
40
  }>;
37
41
  }>;
38
42
  Hooks: Readonly<{
43
+ searchItems: Readonly<{
44
+ useSearchItemDetailsStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<import("./services/searchItemDetails/searchItemDetails.store").SearchItemDetailsState>, "setState"> & {
45
+ setState(nextStateOrUpdater: import("./services/searchItemDetails/searchItemDetails.store").SearchItemDetailsState | Partial<import("./services/searchItemDetails/searchItemDetails.store").SearchItemDetailsState> | ((state: import("immer/dist/internal").WritableDraft<import("./services/searchItemDetails/searchItemDetails.store").SearchItemDetailsState>) => void), shouldReplace?: boolean | undefined): void;
46
+ }>;
47
+ }>;
39
48
  useEchoHistory(): (path: string, params?: {
40
49
  [key: string]: string;
41
50
  } | undefined, state?: any) => void;
51
+ useHas3dAccess(plantCode?: string | undefined): boolean;
52
+ usePlantAvailableIn3d(plantCode?: string | undefined): boolean;
53
+ usePlantAvailableIn3dWeb(plantCode?: string | undefined): boolean;
42
54
  useScreenOrientation(): import("./types/hookLibrary").ScreenOrientation;
43
55
  useScreenValues(): {
44
56
  isScreenMobileSize: boolean;
@@ -60,7 +72,19 @@ declare const EchoFramework: Readonly<{
60
72
  useSetActiveMcPackNo: () => import("./types/hookLibrary").SetActiveMcPackNo;
61
73
  }>;
62
74
  EchopediaComponentLibrary: Readonly<{
75
+ /**
76
+ * @deprecated Please use 'getTagListItem()' instead - that supports the new search flow
77
+ * Returns with the TagItem component, which is used in EchopediaWeb's search panel
78
+ * and pdf side drawer when listing out tags.
79
+ * @returns {React.FC<any>} legacy TagItem component
80
+ */
63
81
  getTagItem: () => import("react").FunctionComponent<any>;
82
+ /**
83
+ * Returns with the TagItem component, which is used in EchopediaWeb's search panel
84
+ * and pdf side drawer when listing out tags.
85
+ * @returns {React.FC<any>} TagListItem component
86
+ */
87
+ getTagListItem: () => import("react").FunctionComponent<any>;
64
88
  }>;
65
89
  APIs: Readonly<{
66
90
  getPlantsInfo: typeof getPlantsInfo;