@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/echo-framework",
3
- "version": "0.20.5-beta9",
3
+ "version": "0.20.5",
4
4
  "peerDependencies": {
5
5
  "@equinor/echo-base": ">= 0.7.0 < 0.8.0",
6
6
  "@equinor/echo-components": ">= 0.11.0 < 0.12.0",
@@ -22,4 +22,4 @@
22
22
  },
23
23
  "main": "./index.cjs.js",
24
24
  "type": "commonjs"
25
- }
25
+ }
package/src/index.d.ts CHANGED
@@ -11,11 +11,13 @@ export * from './lib/coreApplication';
11
11
  export * from './lib/feature/equipment/index';
12
12
  export * from './lib/feature/globalSelection';
13
13
  export type { GlobalSelectionItem, OptimizedWorkOrderDto } from './lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.types';
14
+ export { PanTo3DButton } from './lib/feature/globalSelection/panToEcho3d/panTo3DButton';
14
15
  export * from './lib/feature/legend/index';
15
16
  export { getLatestMeasurementDate, sortMeasuringPointsByMeasurementDate } from './lib/feature/measuringPoint/components/measuringPoints.utils';
16
17
  export * from './lib/feature/measuringPoint/index';
17
18
  export * from './lib/feature/measuringPoint/types/measuringPoint';
18
19
  export * from './lib/feature/openItemsIn3d';
20
+ export { createEcho3dInternalLink } from './lib/feature/openItemsIn3d/logic/createEcho3dInternalLink';
19
21
  export { SelectedItemsMenu } from './lib/feature/openItemsIn3d/SelectedItemsMenu';
20
22
  export { RegisteredHookName } from './lib/hooks/hookLibrary';
21
23
  export { useIsCompactLayout } from './lib/hooks/useIsCompactLayout';
@@ -24,6 +26,7 @@ export { useScreenOrientation } from './lib/hooks/useScreenOrientation';
24
26
  export { useScreenValues } from './lib/hooks/useScreenValues';
25
27
  export { getPlantsCachedOrApi, getPlantsFromApi } from './lib/services/api/api-plants';
26
28
  export { RegisteredComponentName } from './lib/services/componentRegistry/componentRegistry';
29
+ export * from './lib/services/dataLayerPanel';
27
30
  export * from './lib/services/eventHubActions';
28
31
  export * from './lib/services/leftPanelNavigation';
29
32
  export * from './lib/theme/themeConst';
@@ -38,6 +41,7 @@ export { InternalApplicationLinks } from './lib/types/navigation/internalApplica
38
41
  export { PingableSources } from './lib/types/pingableSources';
39
42
  export { SearchItemDetailsType as searchItemDetailsType } from './lib/types/searchItemDetailsType';
40
43
  export * from './lib/utils';
44
+ export { getPdmsPlantCodeForTag } from './lib/utils/getPdmsPlantCodeForTag';
41
45
  export { convertPathNameToReadableString } from './lib/utils/moduleNameUtils';
42
46
  export * from './lib/utils/startup';
43
47
  export declare const registerEchopediaComponent: ({ name, component }: {
@@ -65,6 +69,9 @@ declare const EchoFramework: Readonly<{
65
69
  useEchoHistory(): (path: string, params?: {
66
70
  [key: string]: string;
67
71
  } | undefined, state?: any) => void;
72
+ useFetchInstCodeBySapPlantId: (args: {
73
+ sapPlantId: string | undefined;
74
+ }) => string | undefined;
68
75
  useHas3dAccess(plantCode?: string): boolean;
69
76
  useIsFullScreenModeEnabled(): boolean;
70
77
  useOpenPdfFile(): (args: {
@@ -5,4 +5,3 @@ export interface FullScreenChipProps {
5
5
  onDelete: () => void;
6
6
  }
7
7
  export declare const FullScreenChip: React.FC<FullScreenChipProps>;
8
- export default FullScreenChip;
@@ -1,3 +1,2 @@
1
1
  import React from 'react';
2
2
  export declare const FullScreenModeButton: React.FC;
3
- export default FullScreenModeButton;
@@ -0,0 +1,5 @@
1
+ interface FullScreenModeChipProps {
2
+ className?: string;
3
+ }
4
+ export declare const FullScreenModeChip: ({ className }: FullScreenModeChipProps) => false | import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -1,3 +1,3 @@
1
- export * from './FullScreenButton';
2
1
  export * from './FullScreenChip';
3
2
  export * from './FullScreenModeButton';
3
+ export * from './FullScreenModeChip';
@@ -2,7 +2,6 @@ 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';
6
5
  export * from './echoLogo';
7
6
  export * from './errorBoundary';
8
7
  export * from './externalLinkButton/externalLinkButton';
@@ -24,5 +23,6 @@ export * from './router';
24
23
  export * from './searchMenu';
25
24
  export * from './spinner/spinner';
26
25
  export * from './tagNumber';
26
+ export * from './tagSearchDropDown';
27
27
  export * from './toaster';
28
28
  export { WorkOrderListItem } from './workOrderListItem';
@@ -12,6 +12,8 @@ interface PrepviewProps {
12
12
  tagClicked: (tagId: string, instCode: string) => void;
13
13
  packageClicked?: (type: ItemTypes, itemNumber: string, projectNumber: string) => void;
14
14
  historicItemClicked?: (item: HistoricNotificationItem | HistoricWorkOrderItem | HistoricPunchItem, itemType: WorkItemType) => void;
15
+ objectNotificationClicked?: (notification: HistoricNotificationItem) => void;
16
+ showLongTextClicked?: (id: string, type: WorkItemType, longText: string) => void;
15
17
  headerAction?: React.ReactNode;
16
18
  colorMap?: ColorMap;
17
19
  workOrderDateType?: WorkOrderDateType;
@@ -5,3 +5,4 @@ export * from './fileSizeDisplay';
5
5
  export * from './info';
6
6
  export * from './statusLabel/StatusLabel';
7
7
  export * from './error';
8
+ export * from './showMore';
@@ -0,0 +1,10 @@
1
+ import { WorkItemType } from '../../../utils';
2
+ export interface Props {
3
+ itemId: string;
4
+ itemType: WorkItemType;
5
+ shortText: string;
6
+ longText?: string;
7
+ contentClassName?: string;
8
+ }
9
+ declare function DescriptionBlock({ itemId, itemType, shortText, longText, contentClassName, }: Props): JSX.Element;
10
+ export { DescriptionBlock };
@@ -0,0 +1 @@
1
+ export * from './DescriptionBlock';
@@ -2,3 +2,4 @@ export * from './block';
2
2
  export * from './section';
3
3
  export * from './list';
4
4
  export * from './label';
5
+ export * from './description';
@@ -0,0 +1,6 @@
1
+ interface ShowMoreButtonProps {
2
+ isActive: boolean;
3
+ onClick: () => void;
4
+ }
5
+ export declare const ShowMoreButton: ({ isActive, onClick }: ShowMoreButtonProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1 @@
1
+ export * from './ShowMoreButton';
@@ -11,6 +11,8 @@ interface PrepviewContext {
11
11
  tagClicked: (tagId: string, instCode: string) => void;
12
12
  packageClicked?: (type: ItemTypes, itemNumber: string, projectNumber: string) => void;
13
13
  historicItemClicked?: (item: HistoricNotificationItem | HistoricWorkOrderItem | HistoricPunchItem, itemType: WorkItemType) => void;
14
+ objectNotificationClicked?: (notification: HistoricNotificationItem) => void;
15
+ showLongTextClicked?: (id: string, type: WorkItemType, longText: string) => void;
14
16
  }
15
17
  export declare const PrepviewContext: React.Context<PrepviewContext>;
16
18
  export declare const usePrepviewContext: () => PrepviewContext;
@@ -1,4 +1,4 @@
1
- import { HistoricNotificationItem, HistoricWorkOrderItem, HistoricPunchItem } from '../../../types';
1
+ import { HistoricNotificationItem, HistoricPunchItem, HistoricWorkOrderItem } from '../../../types';
2
2
  import { WorkItemType } from '../../../utils';
3
3
  type Items = Array<HistoricNotificationItem | HistoricWorkOrderItem | HistoricPunchItem>;
4
4
  export interface ItemProps {
@@ -15,6 +15,7 @@ export type ContentPickerItem = {
15
15
  id: string;
16
16
  title: string;
17
17
  content: React.ReactNode;
18
+ onClick?: () => void;
18
19
  };
19
20
  export type PrepviewTagInformation = {
20
21
  id: string;
@@ -42,6 +42,7 @@ export type SubseaWorkOrderDetails = FetchStatus & {
42
42
  export type PrepviewOperation = {
43
43
  operationNumber: string;
44
44
  title: string;
45
+ longText: string;
45
46
  workCenterId: string;
46
47
  activeStatusIds: string;
47
48
  earliestStartDateTime: Date;
@@ -1,5 +1,6 @@
1
1
  export declare enum WorkItemType {
2
2
  Notifications = 0,
3
3
  WorkOrders = 1,
4
- Punches = 2
4
+ Punches = 2,
5
+ Operations = 3
5
6
  }
@@ -0,0 +1 @@
1
+ export * from './tagSearchDropDown';
@@ -0,0 +1,9 @@
1
+ import { TagSummaryDto } from '@equinor/echo-search';
2
+ import React from 'react';
3
+ interface TagsDropdownProps {
4
+ tags: TagSummaryDto[];
5
+ onTagSelected: (tag: TagSummaryDto) => void;
6
+ loadingTags?: boolean;
7
+ }
8
+ export declare const TagsDropdown: React.FC<TagsDropdownProps>;
9
+ export {};
@@ -2,7 +2,6 @@ import { Equipment } from '../../types/equipment';
2
2
  interface ShowEquipmentIn3DButtonArgs {
3
3
  equipment: Equipment;
4
4
  tagNo: string;
5
- plantNo: string;
6
5
  }
7
- export declare const ShowEquipmentIn3DButton: ({ equipment, tagNo, plantNo }: ShowEquipmentIn3DButtonArgs) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const ShowEquipmentIn3DButton: ({ equipment, tagNo }: ShowEquipmentIn3DButtonArgs) => import("react/jsx-runtime").JSX.Element;
8
7
  export {};
@@ -25,8 +25,8 @@ export interface Equipment {
25
25
  readonly serialNo: string;
26
26
  readonly surfaceItems?: string;
27
27
  readonly systemStatusIds: string[];
28
- readonly tagId?: string;
29
- readonly tagPlantId?: string;
28
+ readonly tagId: string | undefined;
29
+ readonly tagPlantId: string | undefined;
30
30
  readonly userStatusIds: string[];
31
31
  }
32
32
  export declare enum EquipmentCategoryId {
@@ -8,9 +8,8 @@ interface OpenMeasuringPointsArgs {
8
8
  pathname: string;
9
9
  instCode: string;
10
10
  tagNo: string;
11
- plantNo: string;
12
11
  }
13
- export declare const openEquipmentIn3dWeb: ({ equipmentId, e3dRef, goToLink, pathname, instCode, tagNo, plantNo }: OpenMeasuringPointsArgs) => Promise<void>;
12
+ export declare const openEquipmentIn3dWeb: ({ equipmentId, e3dRef, goToLink, pathname, instCode, tagNo }: OpenMeasuringPointsArgs) => Promise<void>;
14
13
  export declare const is3DEquipment: (equipment: Equipment) => boolean;
15
14
  export declare const sortMeasurementsInMeasuringPointsByNewestFirst: (measuringPoints: MeasuringPointDto[]) => {
16
15
  measuringPointId: string;
@@ -37,7 +37,7 @@ export type TagGlobalSelectionList = GlobalSelectionList<GlobalSelectionItemType
37
37
  export type GlobalSelectionListUnion = WorkOrderGlobalSelectionList | TagGlobalSelectionList | EquipmentGlobalSelectionList;
38
38
  export declare enum GlobalSelectionItemErrorStatuses {
39
39
  NotFoundInActiveEchoModule = "NotFoundInActiveEchoModule",
40
- UnableToDisplay = "UnableToDisplay"
40
+ NotShownInActiveEchoModule = "NotShownInActiveEchoModule"
41
41
  }
42
42
  export interface GlobalSelectionStore {
43
43
  lists: GlobalSelectionListUnion[];
@@ -50,8 +50,9 @@ export interface GlobalSelectionStore {
50
50
  removeItemFromSelection: (args: {
51
51
  itemId: string;
52
52
  }) => void;
53
- setNotFoundItems: (args: {
54
- itemIds: Readonly<string[]>;
53
+ setVisibilityList: (args: {
54
+ listKey: string;
55
+ isVisible: boolean;
55
56
  }) => void;
56
57
  setVisibility: (args: {
57
58
  itemId: string;
@@ -59,10 +60,20 @@ export interface GlobalSelectionStore {
59
60
  }) => void;
60
61
  resetItemNotFoundStates: () => void;
61
62
  resetState: () => void;
63
+ setStatusForItems: (args: {
64
+ itemIds: string[];
65
+ status: GlobalSelectionItemErrorStatuses;
66
+ }) => void;
67
+ /**
68
+ *@deprecated This method is deprecated. Use `setStatusForItems` instead, with `GlobalSelectionItemErrorStatuses.NotFoundInActiveEchoModule`.
69
+ */
70
+ setNotFoundItems: (args: {
71
+ itemIds: string[];
72
+ }) => void;
62
73
  }
63
74
  export type OptimizedWorkOrderDto = {
64
75
  workOrderId: string;
65
- tagId?: string;
76
+ tagId: string | undefined;
66
77
  tagPlantId: string;
67
78
  workCenterId?: string;
68
79
  workCenterPlantId: string;
@@ -1,7 +1,7 @@
1
- import { PlantTagPair } from '../../openItemsIn3d/openItemsIn3d.utils';
2
- import { GlobalSelectionGenericItem, GlobalSelectionItem, GlobalSelectionItemErrorStatuses, GlobalSelectionItemType, GlobalSelectionItemTypeToDataMap, GlobalSelectionListUnion, GlobalSelectionStore } from './globalSelectionStore.types';
1
+ import { PlantAndTagForOpenIn3d } from '../../openItemsIn3d/logic/openItemsIn3d.utils';
2
+ import { GlobalSelectionGenericItem, GlobalSelectionItemErrorStatuses, GlobalSelectionItemType, GlobalSelectionItemTypeToDataMap, GlobalSelectionListUnion, GlobalSelectionStore } from './globalSelectionStore.types';
3
3
  export declare function toGlobalSelectionItem<T extends GlobalSelectionItemTypeToDataMap[K], K extends GlobalSelectionItemType>(item: T, type: K, idSelector: (item: T) => string): GlobalSelectionGenericItem<K>;
4
4
  export declare function toGlobalSelectionItems<T extends GlobalSelectionItemTypeToDataMap[K], K extends GlobalSelectionItemType>(items: T[], type: K, idSelector: (item: T) => string): GlobalSelectionGenericItem<K>[];
5
5
  export declare function findGlobalSelectionListByKey(state: GlobalSelectionStore, key: string): GlobalSelectionListUnion | undefined;
6
6
  export declare function hasGlobalSelectionItemErrorStatus<T extends GlobalSelectionItemType>(item: GlobalSelectionGenericItem<T>, status: GlobalSelectionItemErrorStatuses): boolean;
7
- export declare const convertGlobalSelectionItemsToPlantTagPairs: (items: GlobalSelectionItem[]) => PlantTagPair[];
7
+ export declare function convertGlobalSelectionItemsToPlantTagPairs(): Promise<PlantAndTagForOpenIn3d[]>;
@@ -0,0 +1,10 @@
1
+ declare function allWorkOrders(): import("./globalSelectionStore.types").OptimizedWorkOrderDto[];
2
+ declare function allTags(): import("dist/libs/echo-search/src").TagSummaryDto[];
3
+ declare function allEquipments(): import("../../equipment").Equipment[];
4
+ export declare const globalSelectionStoreHelpers: {
5
+ allTags: typeof allTags;
6
+ allEquipments: typeof allEquipments;
7
+ allWorkOrders: typeof allWorkOrders;
8
+ snapshot: () => import("./globalSelectionStore.types").GlobalSelectionStore;
9
+ };
10
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { GlobalSelectionItem } from '../globalSelectionStore/globalSelectionStore.types';
3
+ interface PanTo3DButtonProps {
4
+ item: GlobalSelectionItem;
5
+ }
6
+ export declare const PanTo3DButton: React.FC<PanTo3DButtonProps>;
7
+ export {};
@@ -0,0 +1,4 @@
1
+ import { GlobalSelectionItem } from '../globalSelectionStore/globalSelectionStore.types';
2
+ export declare const usePanTo3dWeb: () => {
3
+ panTo3D: (item: GlobalSelectionItem) => Promise<void>;
4
+ };
@@ -1,5 +1,4 @@
1
1
  export { failureMechanismConfig } from './failureMechanism.config';
2
2
  export { MeasuringPointDetails } from './measuringPointDetails/measuringPointDetails';
3
- export { getInstCodeForSapPlantId } from './measuringPointDetails/measuringPointDetails.logic';
4
3
  export { MeasuringPointHeader } from './measuringPointHeader/measuringPointHeader';
5
4
  export { MeasuringPointItem } from './measuringPointItem';
@@ -1,3 +1,3 @@
1
- export { MeasuringPointDetails, MeasuringPointHeader, MeasuringPointItem, failureMechanismConfig, getInstCodeForSapPlantId } from './components';
1
+ export { MeasuringPointDetails, MeasuringPointHeader, MeasuringPointItem, failureMechanismConfig } from './components';
2
2
  export { useOpenMeasuringPointDetails } from './hooks';
3
3
  export type { MeasurementDto, MeasuringPointDto } from './types/measuringPoint';
@@ -1,3 +1,4 @@
1
- export type { PlantTagPair } from './openItemsIn3d.utils';
1
+ export { workOrdersToPlantTagPairs } from './logic/convertToPlantTagPairs';
2
+ export type { Plant3dInfo, PlantAndTagForOpenIn3d } from './logic/openItemsIn3d.utils';
2
3
  export { OpenItemsIn3dDialog } from './openItemsIn3dDialog';
3
4
  export { SelectedItemsMenu } from './SelectedItemsMenu';
@@ -0,0 +1,10 @@
1
+ import { PlantAndTagForOpenIn3d } from './openItemsIn3d.utils';
2
+ export interface WorkOrderTag {
3
+ tagPlantId: string | undefined;
4
+ tagId: string | undefined;
5
+ }
6
+ export declare function tagToPlantTagPairs(selectedWorkOrders: {
7
+ tagNo: string;
8
+ instCode: string;
9
+ }[]): Promise<PlantAndTagForOpenIn3d[]>;
10
+ export declare function workOrdersToPlantTagPairs(selectedWorkOrders: WorkOrderTag[]): Promise<PlantAndTagForOpenIn3d[]>;
@@ -0,0 +1,11 @@
1
+ export declare function createEcho3dInternalLink(instCode: string, params: {
2
+ tagNo?: string;
3
+ pdmsPlantCode?: string;
4
+ equipmentId?: string;
5
+ e3dRef?: string;
6
+ tagArea?: string;
7
+ measuringPointIds?: ReadonlyArray<string>;
8
+ }): {
9
+ echo3d: string;
10
+ params: string;
11
+ };
@@ -5,12 +5,9 @@
5
5
  * @param args.items - The array of PlantTagPair objects.
6
6
  * @returns An object containing unique plant numbers and item number counts.
7
7
  */
8
- export declare function getUniquePlantNosAndItemNoCounts(args: {
9
- items: PlantTagPair[];
10
- }): {
11
- uniquePlantNos: string[];
12
- itemCountsByPlantNo: Record<string, number>;
13
- };
8
+ export declare function getUniquePlantsWithItemCount(args: {
9
+ items: PlantAndTagForOpenIn3d[];
10
+ }): Plant3dInfoCount[];
14
11
  /**
15
12
  * Retrieves the items from the given array that have the same plant number as the selected plant number.
16
13
  *
@@ -18,21 +15,31 @@ export declare function getUniquePlantNosAndItemNoCounts(args: {
18
15
  * @param selectedPlantNo - The selected plant number.
19
16
  * @returns An array of PlantTagPair objects that have the same plant number as the selected plant number.
20
17
  */
21
- export declare function getItemsForSelectedPlantNo(selectedItems: PlantTagPair[], selectedPlantNo: string): PlantTagPair[];
18
+ export declare function getItemsForSelectedPlantNo(selectedItems: PlantAndTagForOpenIn3d[], selectedPlantNo: string): PlantAndTagForOpenIn3d[];
22
19
  /**
23
20
  * Checks if there are more then one unique plant numbers in the passed PlantTagPair[].
24
21
  *
25
22
  * @param items - The array of PlantTagPair objects to check.
26
23
  * @returns A boolean indicating whether multiple, unique plant numbers are present in the passed array.
27
24
  */
28
- export declare function isMultiplePlantNoSelected(items: PlantTagPair[]): boolean;
25
+ export declare function isMultiplePlantNoSelected(items: PlantAndTagForOpenIn3d[]): boolean;
29
26
  /**
30
27
  * Retrieves the plant SAP ID from an array of PlantTagPair. It will return with the first, non empty plant SAP ID found.
31
28
  * @param items - The array of PlantTagPair items.
32
29
  * @returns The plant SAP ID if found, otherwise undefined.
33
30
  */
34
- export declare function getPlantSapIdFromItems(items: PlantTagPair[]): string | undefined;
35
- export interface PlantTagPair {
31
+ export declare function getFirstPlantSapIdFromItems(items: PlantAndTagForOpenIn3d[]): string | undefined;
32
+ export interface Plant3dInfo {
33
+ instCode: string;
34
+ sapId: string | undefined;
35
+ pdmsPlantCode: string | undefined;
36
+ }
37
+ export interface Plant3dInfoCount extends Plant3dInfo {
38
+ count: number;
39
+ }
40
+ export interface PlantAndTagForOpenIn3d {
41
+ instCode: string;
42
+ pdmsPlantCode: string | undefined;
36
43
  plantNo: string | undefined;
37
44
  tagNo: string | undefined;
38
45
  }
@@ -1,5 +1,4 @@
1
- import { BaseError } from '@equinor/echo-base';
2
- import { PlantTagPair } from './openItemsIn3d.utils';
1
+ import { Plant3dInfo, PlantAndTagForOpenIn3d } from './logic/openItemsIn3d.utils';
3
2
  /**
4
3
  * This component is designed to facilitate the opening of items in a 3D view within the application.
5
4
  * It manages user interactions for selecting a plant number when multiple options are available,
@@ -10,7 +9,6 @@ import { PlantTagPair } from './openItemsIn3d.utils';
10
9
  * @param {Object} props - The properties passed to the component.
11
10
  * @param {Array} props.items - Array of items that the user intends to open in 3D. Each item should contain necessary information for the 3D view to be rendered.
12
11
  * @param {boolean} props.open - Boolean indicating whether the dialog should be open or closed.
13
- * @param {Function} props.onPlantLoadError - Function to be called when there is an error loading the plant information. Only needed when props.disableDefault3dOpener=false.
14
12
  * @param {Function} props.onPlantSelectionCompleted - Function to be called when the plant selection process has been completed by the user.
15
13
  * @param {Function} props.onCancelButtonClicked - Function to be called when the user clicks the cancel button.
16
14
  * @param {Object} props.plantNotAvailableDialogProps - Object containing properties for the dialog shown when a plant is not available. Only needed when props.disableDefault3dOpener=true.
@@ -19,22 +17,17 @@ import { PlantTagPair } from './openItemsIn3d.utils';
19
17
  * @returns {React.ReactElement} A React Element representing the OpenItemsIn3dDialog.
20
18
  *
21
19
  */
22
- export declare const OpenItemsIn3dDialog: ({ items, open, onPlantLoadError, onPlantSelectionCompleted, onCancelButtonClicked, plantNotAvailableDialogProps, disableDefault3dOpener }: OpenItemsIn3dDialogProps) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const OpenItemsIn3dDialog: ({ getItems, open, onPlantSelectionCompleted, onCancelButtonClicked, plantNotAvailableDialogProps, disableDefault3dOpener }: OpenItemsIn3dDialogProps) => import("react/jsx-runtime").JSX.Element;
23
21
  interface BaseOpenItemsIn3dDialogProps {
24
- items: PlantTagPair[];
22
+ getItems: () => Promise<PlantAndTagForOpenIn3d[]>;
25
23
  onPlantSelectionCompleted: (args: {
26
- plantId: string | undefined;
27
- itemsForSelectedPlant: PlantTagPair[];
24
+ selectedPlant: Plant3dInfo;
28
25
  }) => void;
29
26
  onCancelButtonClicked: () => void;
30
27
  open: boolean;
31
28
  }
32
29
  interface WithDefault3dOpener extends BaseOpenItemsIn3dDialogProps {
33
30
  disableDefault3dOpener?: false;
34
- onPlantLoadError: (args: {
35
- error: Error | BaseError;
36
- errorMessage: string;
37
- }) => void;
38
31
  plantNotAvailableDialogProps?: never;
39
32
  }
40
33
  interface WithDefault3dOpenerDisabled extends BaseOpenItemsIn3dDialogProps {
@@ -1,9 +1,10 @@
1
- import { PlantTagPair } from './openItemsIn3d.utils';
1
+ import { Plant3dInfo, PlantAndTagForOpenIn3d } from './logic/openItemsIn3d.utils';
2
2
  interface PlantNoSelectionDialogProps {
3
- items: PlantTagPair[];
4
- onPlantSelectionConfirmed: (plantId: string, itemsForSelectedPlant: PlantTagPair[]) => void;
3
+ getItems: () => Promise<PlantAndTagForOpenIn3d[]>;
4
+ onPlantSelectionConfirmed: (selectedPlantNo: Plant3dInfo) => void;
5
5
  onCancelButtonClicked: () => void;
6
+ onSetIsWarningDialogOpen: () => void;
6
7
  open: boolean;
7
8
  }
8
- export declare const PlantNoSelectionDialog: ({ items, onPlantSelectionConfirmed, onCancelButtonClicked, open }: PlantNoSelectionDialogProps) => JSX.Element;
9
+ export declare const PlantNoSelectionDialog: ({ getItems, onPlantSelectionConfirmed, onCancelButtonClicked, onSetIsWarningDialogOpen, open }: PlantNoSelectionDialogProps) => JSX.Element | null;
9
10
  export {};
@@ -1,4 +1,5 @@
1
1
  export * from './useEchoHistory';
2
+ export * from './useFetchInstCodeBySapPlantId';
2
3
  export * from './useHas3dAccess';
3
4
  export * from './useIsFullScreenModeEnabled';
4
5
  export * from './useOpenPdfFile';
@@ -0,0 +1,3 @@
1
+ export declare const useFetchInstCodeBySapPlantId: (args: {
2
+ sapPlantId: string | undefined;
3
+ }) => string | undefined;
@@ -0,0 +1,43 @@
1
+ interface PanelUserSettings {
2
+ readonly isTagsVisible: boolean;
3
+ readonly isWorkOrdersVisible: boolean;
4
+ }
5
+ interface DataLayerPanelState {
6
+ readonly isOpen: boolean;
7
+ readonly userSettings: PanelUserSettings;
8
+ }
9
+ interface DataLayerPanelActions {
10
+ togglePanel: () => void;
11
+ toggleWorkOrders: () => void;
12
+ toggleTags: () => void;
13
+ }
14
+ type DataLayerPanelStore = DataLayerPanelState & DataLayerPanelActions;
15
+ export declare const useDataLayerPanelStore: import("zustand").UseBoundStore<Omit<Omit<Omit<Omit<import("zustand").StoreApi<DataLayerPanelStore>, "setState"> & {
16
+ setState<A extends string | {
17
+ type: string;
18
+ }>(partial: DataLayerPanelStore | Partial<DataLayerPanelStore> | ((state: DataLayerPanelStore) => DataLayerPanelStore | Partial<DataLayerPanelStore>), replace?: boolean | undefined, action?: A | undefined): void;
19
+ }, "subscribe"> & {
20
+ subscribe: {
21
+ (listener: (selectedState: DataLayerPanelStore, previousSelectedState: DataLayerPanelStore) => void): () => void;
22
+ <U>(selector: (state: DataLayerPanelStore) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
23
+ equalityFn?: ((a: U, b: U) => boolean) | undefined;
24
+ fireImmediately?: boolean;
25
+ } | undefined): () => void;
26
+ };
27
+ }, "persist"> & {
28
+ persist: {
29
+ setOptions: (options: Partial<import("zustand/middleware").PersistOptions<DataLayerPanelStore, unknown>>) => void;
30
+ clearStorage: () => void;
31
+ rehydrate: () => Promise<void> | void;
32
+ hasHydrated: () => boolean;
33
+ onHydrate: (fn: (state: DataLayerPanelStore) => void) => () => void;
34
+ onFinishHydration: (fn: (state: DataLayerPanelStore) => void) => () => void;
35
+ getOptions: () => Partial<import("zustand/middleware").PersistOptions<DataLayerPanelStore, unknown>>;
36
+ };
37
+ }, "setState"> & {
38
+ setState(nextStateOrUpdater: DataLayerPanelStore | Partial<DataLayerPanelStore> | ((state: import("immer").WritableDraft<DataLayerPanelStore>) => void), shouldReplace?: boolean | undefined, action?: string | {
39
+ type: string;
40
+ } | undefined): void;
41
+ }>;
42
+ export declare function dataLayerStoreSnapshot(): DataLayerPanelStore;
43
+ export {};
@@ -0,0 +1 @@
1
+ export * from './dataLayerPanel.store';
@@ -6,6 +6,6 @@ export interface EchoHubPlant {
6
6
  operationArea: string;
7
7
  availableInEcho3D: boolean;
8
8
  availableInEcho3DWebReveal: boolean;
9
- sapId: number;
9
+ sapId?: number;
10
10
  ayelixSiteId?: number;
11
11
  }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Returns the pdms plant code for the tagSummary.
3
+ */
4
+ export declare function getPdmsPlantCodeForTag(tag: {
5
+ pdmsPlantCode: string | undefined;
6
+ }): string | undefined;
@@ -6,4 +6,4 @@ export * from './plantInfo';
6
6
  export * from './previousUtils';
7
7
  export * from './searchUtil';
8
8
  export * from './stringUtils';
9
- export * from './tagUtils';
9
+ export * from './workOrderUtils';
@@ -1,5 +1,4 @@
1
1
  import { TemporaryEchoHubListDto, TemporaryHubResultsList } from '../../types/api-echohub';
2
- import { EchoHubPlant } from '../../types/echoHubPlant';
3
2
  export declare const getTemporarilyEchoHubListFor3d: (instCode: string, request: TemporaryEchoHubListDto, abortSignal?: AbortSignal | undefined, withoutBaseUrl?: boolean) => Promise<{
4
3
  app3dUrl: string;
5
4
  web3dUrl: string;
@@ -17,12 +16,19 @@ export type HubListReturnType = {
17
16
  * @export
18
17
  * @param {string} sourceModuleName name of the source module name
19
18
  * @param {string} createdBy created by (e.g: user email)
20
- * @param {EchoHubPlant} plant plant
19
+ * @param {string} plantCode pdmsPlantCode from stid tag
21
20
  * @param {TemporaryHubResultsList[]} tagList tag list
22
21
  * @param {string} source source (e.g: Echo)
23
- * @param {number} timeToLiveSeconds time to live (in seconds) for the temporary list
24
22
 
25
23
  * @return {*} {TemporaryEchoHubListDto} temporary tag list object
26
24
  */
27
- export declare const generateTemporaryTagListObject: (ObjectsToSendTo3d: ObjectsToSendTo3dTypes, sourceModuleName: string, createdBy: string, plant: EchoHubPlant, tagList: TemporaryHubResultsList[], source: string, section?: string | undefined, timeToLiveSeconds?: number) => TemporaryEchoHubListDto;
25
+ export declare const generateTemporaryTagListObject: (args: {
26
+ ObjectsToSendTo3d: ObjectsToSendTo3dTypes;
27
+ sourceModuleName: string;
28
+ createdBy: string;
29
+ plantCode: string;
30
+ tagList: TemporaryHubResultsList[];
31
+ source: string;
32
+ section?: string;
33
+ }) => TemporaryEchoHubListDto;
28
34
  export declare function getRandomColor(): string;