@equinor/echo-framework 0.20.5-beta9 → 0.20.5

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 (61) hide show
  1. package/index.cjs.js +1 -1
  2. package/package.json +2 -2
  3. package/src/index.d.ts +7 -0
  4. package/src/lib/components/fullScreenButtons/FullScreenChip.d.ts +0 -1
  5. package/src/lib/components/fullScreenButtons/FullScreenModeButton.d.ts +0 -1
  6. package/src/lib/components/fullScreenButtons/FullScreenModeChip.d.ts +5 -0
  7. package/src/lib/components/fullScreenButtons/index.d.ts +1 -1
  8. package/src/lib/components/index.d.ts +1 -1
  9. package/src/lib/components/prepview/Prepview.d.ts +2 -0
  10. package/src/lib/components/prepview/common/index.d.ts +1 -0
  11. package/src/lib/components/prepview/common/info/description/DescriptionBlock.d.ts +10 -0
  12. package/src/lib/components/prepview/common/info/description/index.d.ts +1 -0
  13. package/src/lib/components/prepview/common/info/index.d.ts +1 -0
  14. package/src/lib/components/prepview/common/showMore/ShowMoreButton.d.ts +6 -0
  15. package/src/lib/components/prepview/common/showMore/index.d.ts +1 -0
  16. package/src/lib/components/prepview/context/PrepviewContext.d.ts +2 -0
  17. package/src/lib/components/prepview/panels/history/items/Items.d.ts +1 -1
  18. package/src/lib/components/prepview/types/shared.d.ts +1 -0
  19. package/src/lib/components/prepview/types/workorder.d.ts +1 -0
  20. package/src/lib/components/prepview/utils/enums/tagHistoryItem.d.ts +2 -1
  21. package/src/lib/components/tagSearchDropDown/index.d.ts +1 -0
  22. package/src/lib/components/tagSearchDropDown/tagSearchDropDown.d.ts +9 -0
  23. package/src/lib/feature/equipment/components/equipmentItemHeader/showEquipmentIn3dButton.d.ts +1 -2
  24. package/src/lib/feature/equipment/types/equipment.d.ts +2 -2
  25. package/src/lib/feature/equipment/utils/equipmentUtils.d.ts +1 -2
  26. package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.types.d.ts +15 -4
  27. package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.utils.d.ts +3 -3
  28. package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStoreHelpers.d.ts +10 -0
  29. package/src/lib/feature/globalSelection/panToEcho3d/panTo3DButton.d.ts +7 -0
  30. package/src/lib/feature/globalSelection/panToEcho3d/usePanTo3DWeb.d.ts +4 -0
  31. package/src/lib/feature/measuringPoint/components/index.d.ts +0 -1
  32. package/src/lib/feature/measuringPoint/index.d.ts +1 -1
  33. package/src/lib/feature/openItemsIn3d/index.d.ts +2 -1
  34. package/src/lib/feature/openItemsIn3d/logic/convertToPlantTagPairs.d.ts +10 -0
  35. package/src/lib/feature/openItemsIn3d/logic/createEcho3dInternalLink.d.ts +11 -0
  36. package/src/lib/feature/openItemsIn3d/{openItemsIn3d.utils.d.ts → logic/openItemsIn3d.utils.d.ts} +17 -10
  37. package/src/lib/feature/openItemsIn3d/openItemsIn3dDialog.d.ts +4 -11
  38. package/src/lib/feature/openItemsIn3d/plantNoSelectionDialog.d.ts +5 -4
  39. package/src/lib/hooks/index.d.ts +1 -0
  40. package/src/lib/hooks/useFetchInstCodeBySapPlantId.d.ts +3 -0
  41. package/src/lib/services/dataLayerPanel/dataLayerPanel.store.d.ts +43 -0
  42. package/src/lib/services/dataLayerPanel/index.d.ts +1 -0
  43. package/src/lib/types/echoHubPlant.d.ts +1 -1
  44. package/src/lib/utils/getPdmsPlantCodeForTag.d.ts +6 -0
  45. package/src/lib/utils/index.d.ts +1 -1
  46. package/src/lib/utils/openIn3d/tagLists.d.ts +10 -4
  47. package/src/lib/utils/plantInfo.d.ts +9 -20
  48. package/src/lib/utils/workOrderUtils.d.ts +1 -0
  49. package/src/lib/components/echo3DButton/3dButtonUtils.d.ts +0 -12
  50. package/src/lib/components/echo3DButton/OpenIn3dDropdown.d.ts +0 -11
  51. package/src/lib/components/echo3DButton/echo3DButton.d.ts +0 -18
  52. package/src/lib/components/echo3DButton/echo3DIconButton.d.ts +0 -26
  53. package/src/lib/components/echo3DButton/icons/E3DWebBetaIcon.d.ts +0 -6
  54. package/src/lib/components/echo3DButton/index.d.ts +0 -2
  55. package/src/lib/components/echo3DButton/missingEcho3dAccessDialog.d.ts +0 -8
  56. package/src/lib/components/echo3DButton/plantNotAvailableInfo.d.ts +0 -6
  57. package/src/lib/components/echo3DButton/useGetOpenIn3d.d.ts +0 -5
  58. package/src/lib/components/echo3DButton/useGoToEcho3DWebLink.d.ts +0 -1
  59. package/src/lib/components/fullScreenButtons/FullScreenButton.d.ts +0 -7
  60. package/src/lib/feature/measuringPoint/components/measuringPointDetails/measuringPointDetails.logic.d.ts +0 -2
  61. package/src/lib/utils/tagUtils.d.ts +0 -26
@@ -29,30 +29,19 @@ export declare function getPlantsOnInstallation(instCode: string): Promise<EchoH
29
29
  */
30
30
  export declare function getAllPlants(): Promise<EchoHubPlant[]>;
31
31
  /**
32
- * Filters out a single plant information for a installation code from a lost of plant information
33
- *
34
- * @export
35
- * @param {EchoHubPlant[]} plantInfo list of plant information to filter from
36
- * @param {string} instCode installation code to filter list with
37
- * @param {string} [plantIdentificator] alternative way of filtering the provided plant information
38
- * @return {*} {(EchoHubPlant | null)} Returns a single plant information or null if no match was found
32
+ * Returns all echo hub plant for given sap id, or undefined if not found.
33
+ * Note: There may exist multiple echo hub plants with the same sap id: DRA where both DRS and DRE has sap id 1150.
34
+ * Instead use getEchoHubPlantForTag or getPlantCodeForTag if possible, or useFetchInstCodeBySapPlantId.
39
35
  */
40
- export declare function getPlant(plantInfo: EchoHubPlant[], instCode: string, plantIdentificator?: string): EchoHubPlant | null;
41
- /**
42
- * Gets plant information from a given sap id
43
- *
44
- * @export
45
- * @param {string} sapId Sap id to look for
46
- * @return {*} {(Promise<EchoHubPlant | null>)} Returns a single plant information or null if no match was found
47
- */
48
- export declare function getPlantBySapId(sapId: string): Promise<EchoHubPlant | null>;
36
+ export declare function allEchoHubPlantsBySapId(item: {
37
+ sapId: string | undefined;
38
+ }): Promise<EchoHubPlant[] | undefined>;
39
+ export declare function instCodeBySapId(sapId: string): Promise<string | undefined>;
40
+ export declare function instCodeByPlantCode(pdmsPlantCode: string): Promise<string | undefined>;
49
41
  /**
50
42
  * Gets all plant codes for a given installation code
51
- * @export
52
- * @param {string} instCode installation code to look for
53
- * @return {*} {Promise<string[]>} list of plant codes for the given installation
54
43
  */
55
- export declare function getPlantCodesOnInstallation(instCode: string): Promise<string[]>;
44
+ export declare function allPlantCodesOnInstallation(instCode: string): Promise<string[]>;
56
45
  /**
57
46
  * Method for checking a users access to a given installation
58
47
  *
@@ -0,0 +1 @@
1
+ export declare function getColorForWorkOrderTypeId(workOrderTypeId: string): string;
@@ -1,12 +0,0 @@
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>;
@@ -1,11 +0,0 @@
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;
@@ -1,18 +0,0 @@
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 {};
@@ -1,26 +0,0 @@
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 {};
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- interface E3DWebBetaIconProps {
3
- color: string;
4
- }
5
- declare const E3DWebBetaIcon: React.FC<E3DWebBetaIconProps>;
6
- export default E3DWebBetaIcon;
@@ -1,2 +0,0 @@
1
- export * from './echo3DButton';
2
- export * from './echo3DIconButton';
@@ -1,8 +0,0 @@
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;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- interface PlantNotAvailableInfoProps {
3
- children: React.ReactNode;
4
- }
5
- declare const PlantNotAvailableInfo: React.FC<PlantNotAvailableInfoProps>;
6
- export default PlantNotAvailableInfo;
@@ -1,5 +0,0 @@
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
- };
@@ -1 +0,0 @@
1
- export declare const useGoToEcho3DWebLink: () => (openInNewWindow: boolean, linkTo: string, paramsString: string) => void;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- export interface FullScreenButtonProps {
3
- active: boolean;
4
- onClick: () => void;
5
- }
6
- export declare const FullScreenButton: React.FC<FullScreenButtonProps>;
7
- export default FullScreenButton;
@@ -1,2 +0,0 @@
1
- export declare const getInstCodeForSapPlantId: (sapPlantId: string) => string;
2
- export declare const isNumberInRange: (sapPlantIdStr: string, sapPlantIdRange: string) => boolean;
@@ -1,26 +0,0 @@
1
- import { TagDetailsDto } from '@equinor/echo-search';
2
- /**
3
- * Function for getting the echoUrl based on tag details
4
- * Returns the url if found, builds and returns an url if plantCode and tagNo is found
5
- * Otherwise - returns empty string
6
- * @param {(TagDetailsDto | undefined)} tagDetails
7
- * @return {*} {string}
8
- */
9
- export declare function getEcho3DAppUrlForTag(tagDetails: TagDetailsDto | undefined): Promise<string>;
10
- /**
11
- * Function for getting Plant Code based on Tag Details data
12
- * Returns the plant Code if found, returns empty string otherwise.
13
- * @param {TagDetailsDto} tagDetails
14
- * @returns {*} {string}
15
- */
16
- export declare function getPlantCodeForTag(args: {
17
- plantNo: string;
18
- instCode: string;
19
- }): Promise<string>;
20
- /**
21
- * Function for getting plant project description based on Tag Details
22
- * Returns the plant project description if found, otherwise, return empty string.
23
- * @param {TagDetailsDto} tagDetails
24
- * @returns {*} {string}
25
- */
26
- export declare function getProjectDescriptionForTag(tagDetails: TagDetailsDto): Promise<string>;