@equinor/echo-framework 2.3.0 → 2.4.1

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 (47) hide show
  1. package/index.cjs.js +3 -3
  2. package/package.json +12 -8
  3. package/src/index.d.ts +7 -3
  4. package/src/lib/components/index.d.ts +2 -0
  5. package/src/lib/components/prepview/Prepview.d.ts +11 -1
  6. package/src/lib/components/prepview/context/PrepviewContext.d.ts +1 -1
  7. package/src/lib/components/prepview/panels/objects/EquipmentListItem.d.ts +9 -0
  8. package/src/lib/components/prepview/panels/objects/NotificationListItem.d.ts +9 -0
  9. package/src/lib/components/requestAccess/MissingAccessInfoButton.d.ts +6 -0
  10. package/src/lib/components/requestAccess/RequestAccessButton.d.ts +2 -1
  11. package/src/lib/components/requestAccess/RequestProCoSysAccess.d.ts +0 -1
  12. package/src/lib/components/verticalTabsSplitView/VerticalTabsSplitView.d.ts +1 -1
  13. package/src/lib/coreApplication/EchoUserInterfaceStore.d.ts +5 -0
  14. package/src/lib/feature/equipment/hooks/useEquipmentWithMeasuringPoints.d.ts +1 -1
  15. package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.d.ts +205 -2
  16. package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/persist/selectionTree.load.utils.d.ts +7 -0
  17. package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/selectionTree.store.d.ts +78 -2
  18. package/src/lib/feature/legend/components/pdfMarkers/PositionalItem.d.ts +1 -1
  19. package/src/lib/feature/legend/components/pdfMarkers/subComponents/LegendMarkersRenderer.d.ts +1 -1
  20. package/src/lib/feature/legend/components/pdfMarkers/subComponents/MarkerWithPopover.d.ts +13 -0
  21. package/src/lib/feature/legend/components/pdfMarkers/subComponents/MultipleMarkersByLegends.d.ts +1 -5
  22. package/src/lib/feature/legend/components/pdfMarkers/subComponents/MultipleMarkersBySingleLegend.d.ts +1 -2
  23. package/src/lib/feature/legend/components/pdfMarkers/subComponents/hooks/useMarkerPopover.d.ts +19 -0
  24. package/src/lib/feature/legend/components/pdfMarkers/utils/markerId.utils.d.ts +18 -0
  25. package/src/lib/feature/legend/components/pdfMarkers/utils/splitMarkerByBadgeSelectionGroup.types.d.ts +4 -1
  26. package/src/lib/feature/legend/components/selectionLegend/SelectionLegendChip.d.ts +1 -1
  27. package/src/lib/feature/legend/components/selectionLegend/hooks/useSelectionGroupsForLegendRenderer.d.ts +5 -0
  28. package/src/lib/feature/legend/components/selectionLegend/hooks/useSelectionGroupsForLegendRenderer.utils.d.ts +17 -0
  29. package/src/lib/feature/legend/components/selectionLegend/selectionLegend.utils.d.ts +9 -6
  30. package/src/lib/feature/legend/legendFacade.d.ts +36 -9
  31. package/src/lib/feature/legend/stores/legendDataStore/legendStore.d.ts +35 -39
  32. package/src/lib/feature/legend/stores/legendUIStore/legendUIStore.d.ts +2 -3
  33. package/src/lib/feature/legend/stores/legendUIStore/legendUIStore.types.d.ts +7 -0
  34. package/src/lib/feature/legend/stores/legendVisibleDataAsTagsStore/legendVisibleDataAsTagsStore.d.ts +34 -1
  35. package/src/lib/feature/legend/stores/legendVisibleDataStore/legendVisibleDataStore.d.ts +20 -1
  36. package/src/lib/feature/legend/types/legendStrategy.type.d.ts +7 -3
  37. package/src/lib/hooks/useOpenPrepview.d.ts +1 -1
  38. package/src/lib/services/dataLayerPanel/dataLayerPanel.store.d.ts +30 -1
  39. package/src/lib/services/leftPanelNavigation/leftPanelNavigation.store.d.ts +14 -11
  40. package/src/lib/services/userSetting/userSettingStore.d.ts +8 -4
  41. package/src/lib/utils/dataAccess/accessGuidanceSections.d.ts +27 -0
  42. package/src/lib/{types → utils}/dataAccess/dataAccessLinks.d.ts +6 -1
  43. package/src/lib/utils/dataAccess/dataAccessLinks.utils.d.ts +9 -0
  44. package/src/lib/components/requestAccess/RequestSapAccess.d.ts +0 -7
  45. package/src/lib/feature/legend/components/pdfMarkers/subComponents/hooks/usePopoverHandler.d.ts +0 -7
  46. package/src/lib/feature/legend/components/pdfMarkers/subComponents/hooks/usePopoverHandler.types.d.ts +0 -14
  47. package/src/lib/types/dataAccess/index.d.ts +0 -1
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@equinor/echo-framework",
3
- "version": "2.3.0",
3
+ "version": "2.4.1",
4
4
  "peerDependencies": {
5
- "@equinor/echo-base": ">= 2.3.0 < 3.0.0",
6
- "@equinor/echo-components": ">= 2.3.0 < 3.0.0",
7
- "@equinor/echo-core": ">= 2.3.0 < 3.0.0",
8
- "@equinor/echo-search": ">= 2.3.0 < 3.0.0",
9
- "@equinor/echo-utils": ">= 2.3.0 < 3.0.0",
5
+ "@equinor/echo-base": ">= 2.4.1 < 3.0.0",
6
+ "@equinor/echo-components": ">= 2.4.1 < 3.0.0",
7
+ "@equinor/echo-core": ">= 2.4.1 < 3.0.0",
8
+ "@equinor/echo-search": ">= 2.4.1 < 3.0.0",
9
+ "@equinor/echo-utils": ">= 2.4.1 < 3.0.0",
10
10
  "@equinor/eds-core-react": "0.49.0",
11
11
  "@equinor/eds-icons": "0.22.0",
12
12
  "react": ">= 17.0.2",
@@ -18,8 +18,8 @@
18
18
  "lodash": "4.17.21",
19
19
  "react-router-dom": "5.3.4",
20
20
  "zustand": ">= 4.4.7 < 5",
21
- "immer": "10.1.3",
22
- "msw": "2.11.6"
21
+ "immer": "11.1.3",
22
+ "msw": "2.12.7"
23
23
  },
24
24
  "dependencies": {
25
25
  "dexie": "4.2.1",
@@ -28,6 +28,10 @@
28
28
  "ag-charts-react": "12.3.1",
29
29
  "ag-charts-enterprise": "12.3.1"
30
30
  },
31
+ "exports": {
32
+ "./package.json": "./package.json",
33
+ ".": "./index.cjs.js"
34
+ },
31
35
  "main": "./index.cjs.js",
32
36
  "type": "commonjs",
33
37
  "types": "./index.d.ts"
package/src/index.d.ts CHANGED
@@ -7,8 +7,9 @@ export { NotificationListItem } from './lib/components/notificationListItem';
7
7
  export type { NotificationListItemType } from './lib/components/notificationListItem';
8
8
  export { PrepviewButton } from './lib/components/prepviewButton/prepviewButton';
9
9
  export { useFetchPlantInfo } from './lib/components/requestAccess/hooks/fetchPlantInfo';
10
+ export { MissingAccessInfoButton } from './lib/components/requestAccess/MissingAccessInfoButton';
11
+ export { RequestAccessButton } from './lib/components/requestAccess/RequestAccessButton';
10
12
  export { RequestProCoSysAccess } from './lib/components/requestAccess/RequestProCoSysAccess';
11
- export { RequestSapAccess } from './lib/components/requestAccess/RequestSapAccess';
12
13
  export { WorkOrderListItem } from './lib/components/workOrderListItem';
13
14
  export type { WorkOrderListItemData } from './lib/components/workOrderListItem/types/types';
14
15
  export * from './lib/coreApplication';
@@ -28,7 +29,8 @@ export { PopoverLoading } from './lib/feature/legend/components/pdfMarkers/subCo
28
29
  export * from './lib/feature/legend/index';
29
30
  export { legendVisibleTagsSubscribeToStore } from './lib/feature/legend/stores/legendVisibleDataAsTagsStore/legendVisibleDataAsTagsStore';
30
31
  export { knownLegendIds } from './lib/feature/legend/types/legendType';
31
- export type { LegendDataId, LegendEquipmentId, LegendState, LegendTagId } from './lib/feature/legend/types/legendType';
32
+ export type { LegendDataId, LegendEquipmentId, LegendId, LegendState, LegendTagId } from './lib/feature/legend/types/legendType';
33
+ export type { Brand } from '@equinor/echo-utils';
32
34
  export { getLatestMeasurementDate, sortMeasuringPointsByMeasurementDate } from './lib/feature/measuringPoint/components/measuringPoints.utils';
33
35
  export * from './lib/feature/measuringPoint/index';
34
36
  export * from './lib/feature/measuringPoint/types/measuringPoint';
@@ -59,7 +61,6 @@ export { createSimpleStore } from './lib/services/stores/createSimpleStore';
59
61
  export * from './lib/services/userSetting';
60
62
  export * from './lib/types/activeTag.types';
61
63
  export * from './lib/types/api-echohub';
62
- export { dataAccessLinks } from './lib/types/dataAccess/dataAccessLinks';
63
64
  export { DocType } from './lib/types/docType';
64
65
  export type { EchoHubPlant } from './lib/types/echoHubPlant';
65
66
  export * from './lib/types/eventTypes';
@@ -73,6 +74,9 @@ export { PingableSources } from './lib/types/pingableSources';
73
74
  export { SearchItemDetailsType as searchItemDetailsType } from './lib/types/searchItemDetailsType';
74
75
  export { allWorkOrderTypes, WorkOrderTypes } from './lib/types/workOrderTypes';
75
76
  export * from './lib/utils';
77
+ export { IocAccessGuidanceSection, ProCoSysAccessGuidanceSection, SapAccessGuidanceSection } from './lib/utils/dataAccess/accessGuidanceSections';
78
+ export type { AccessGuidanceSection } from './lib/utils/dataAccess/accessGuidanceSections';
79
+ export { dataAccessLinks } from './lib/utils/dataAccess/dataAccessLinks';
76
80
  export { getPdmsPlantCodeForTag } from './lib/utils/getPdmsPlantCodeForTag';
77
81
  export { isImage, isVideo } from './lib/utils/mediaTypeUtils';
78
82
  export { convertPathNameToReadableString } from './lib/utils/moduleNameUtils';
@@ -20,6 +20,8 @@ export * from './prepview';
20
20
  export * from './prepviewButton/prepviewButton';
21
21
  export * from './projectSelector';
22
22
  export * from './realTimeData';
23
+ export { MissingAccessInfoButton } from './requestAccess/MissingAccessInfoButton';
24
+ export { RequestAccessButton } from './requestAccess/RequestAccessButton';
23
25
  export * from './router';
24
26
  export { SearchListItem } from './searchListItem/searchListItem';
25
27
  export * from './searchMenu';
@@ -9,13 +9,23 @@ interface PrepviewProps {
9
9
  tagClicked: (tagId: string, instCode: string) => void;
10
10
  historicItemClicked?: (item: HistoricNotificationItem | HistoricWorkOrderItem | HistoricPunchItem, itemType: WorkItemType) => void;
11
11
  showLongTextClicked?: (id: string, type: WorkItemType, longText: string) => void;
12
+ openPrepviewCallback?: (args: {
13
+ prepviewInput: {
14
+ notificationId?: string;
15
+ workOrderId?: string;
16
+ punchId?: string;
17
+ instCode?: string;
18
+ };
19
+ panelKey?: string;
20
+ keepLastNavigationItem?: boolean;
21
+ allowToggle?: boolean;
22
+ }) => void;
12
23
  notificationId?: string;
13
24
  currentNotificationLegendOption?: SNBadgeType;
14
25
  workOrderId?: string;
15
26
  currentWorkOrderLegendOption?: WoBadgeType;
16
27
  workOrderOperationId?: string;
17
28
  workOrderDateType?: WorkOrderDateType;
18
- objectNotificationClicked?: (notification: HistoricNotificationItem) => void;
19
29
  punchId?: string;
20
30
  instCode?: string;
21
31
  packageClicked?: (type: ItemTypes, itemNumber: string, projectNumber: string) => void;
@@ -9,9 +9,9 @@ interface PrepviewContext {
9
9
  historicItemClicked?: (item: HistoricNotificationItem | HistoricWorkOrderItem | HistoricPunchItem, itemType: WorkItemType) => void;
10
10
  showLongTextClicked?: (id: string, type: WorkItemType, longText: string) => void;
11
11
  currentNotificationLegendOption?: SNBadgeType;
12
+ openNotificationById?: (notificationId: string) => void;
12
13
  isWorkOrder: boolean;
13
14
  workOrderOperationId?: string;
14
- objectNotificationClicked?: (notification: HistoricNotificationItem) => void;
15
15
  currentWorkOrderLegendOption?: WoBadgeType;
16
16
  instCode?: string;
17
17
  packageClicked?: (type: ItemTypes, itemNumber: string, projectNumber: string) => void;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface EquipmentListItemProps {
3
+ readonly equipmentId: string;
4
+ readonly equipmentDescription: string | undefined;
5
+ readonly tagId: string | undefined;
6
+ readonly tagPlantId: string | undefined;
7
+ }
8
+ export declare const EquipmentListItem: React.FC<EquipmentListItemProps>;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface NotificationListItemProps {
3
+ readonly notificationId: string;
4
+ readonly notificationTypeId: string;
5
+ readonly isActive: boolean;
6
+ readonly onNotificationClick: () => void;
7
+ }
8
+ export declare const NotificationListItem: React.FC<NotificationListItemProps>;
9
+ export {};
@@ -0,0 +1,6 @@
1
+ import { AccessGuidanceSection } from '../../utils/dataAccess/accessGuidanceSections';
2
+ type MissingAccessInfoProps = {
3
+ accessGuidanceSection: AccessGuidanceSection;
4
+ };
5
+ export declare const MissingAccessInfoButton: React.FC<MissingAccessInfoProps>;
6
+ export {};
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
+ type RequestAccessButtonVariant = 'linkButton' | 'standaloneButton';
2
3
  interface Props {
3
4
  applyForAccessUrl: string;
4
5
  buttonLabel?: string;
5
- className?: string;
6
+ variant?: RequestAccessButtonVariant;
6
7
  onClicked?: () => void;
7
8
  }
8
9
  export declare const RequestAccessButton: React.FC<React.PropsWithChildren<Props>>;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  type RequestProCoSysAccessProps = {
3
- className?: string;
4
3
  onClicked?: () => void;
5
4
  plantName?: string;
6
5
  };
@@ -18,5 +18,5 @@ interface VerticalTabsSplitViewProps {
18
18
  infoLabelText?: string;
19
19
  actionRow?: React.ReactNode;
20
20
  }
21
- declare function VerticalTabsSplitView({ groups, listItemStyle, infoLabelText, actionRow, }: VerticalTabsSplitViewProps): import("react/jsx-runtime").JSX.Element;
21
+ declare function VerticalTabsSplitView({ groups, listItemStyle, infoLabelText, actionRow }: VerticalTabsSplitViewProps): import("react/jsx-runtime").JSX.Element;
22
22
  export { VerticalTabsSplitView };
@@ -1,15 +1,20 @@
1
1
  import { FunctionComponent } from 'react';
2
2
  import * as zustand from 'zustand';
3
+ export type ProfileSettingsScrollTarget = 'dataAccess' | undefined;
3
4
  export interface EchoUiState {
4
5
  activeAppMenuItem: string;
5
6
  isLegendActive: boolean | undefined;
6
7
  activeTopMenuItem: string;
7
8
  activeTopMenuComponents: FunctionComponent[];
8
9
  moduleName: string;
10
+ isDataAccessSettingsExpanded: boolean;
11
+ profileSettingsScrollTarget: ProfileSettingsScrollTarget;
9
12
  updateActiveAppMenuItem: (newActiveAppMenuItem: string) => void;
10
13
  updateIsLegendActive: (isLegendActive: boolean) => void;
11
14
  updateActiveTopMenuItem: (newActiveTopMenuItem: string) => void;
12
15
  updateActiveTopMenuComponents: (newActiveTopMenuComponents: FunctionComponent[]) => void;
13
16
  updateModuleName: (newModuleName: string) => void;
17
+ updateIsDataAccessSettingsExpanded: (isDataAccessSettingsExpanded: boolean) => void;
18
+ updateProfileSettingsScrollTarget: (scrollTarget: ProfileSettingsScrollTarget) => void;
14
19
  }
15
20
  export declare const useEchoUserInterfaceStore: zustand.UseBoundStore<zustand.StoreApi<EchoUiState>>;
@@ -3,7 +3,7 @@ export declare function useEquipmentWithoutMeasuringPoints(equipmentId: string):
3
3
  status: 'error' | 'success' | 'pending';
4
4
  equipmentWithMeasuringPoints: EquipmentWithMeasuringPoints[];
5
5
  };
6
- export declare function useEquipmentWithMeasuringPoints(equipmentId: string, isEnabledMeasuringPoints: boolean): {
6
+ export declare function useEquipmentWithMeasuringPoints(equipmentId: string): {
7
7
  status: 'error' | 'success' | 'pending';
8
8
  equipmentWithMeasuringPoints: EquipmentWithMeasuringPoints[];
9
9
  };
@@ -1,4 +1,4 @@
1
- import { GlobalSelectionStore, GlobalSelectionTypes } from './globalSelectionStore.types';
1
+ import { GlobalSelectionItemType, GlobalSelectionStore, GlobalSelectionTypes } from './globalSelectionStore.types';
2
2
  export declare const initialWorkOrderList: GlobalSelectionTypes.WorkOrderList;
3
3
  export declare const initialTagList: GlobalSelectionTypes.TagList;
4
4
  export declare const initialEquipmentList: GlobalSelectionTypes.EquipmentList;
@@ -34,7 +34,210 @@ export declare const useGlobalSelectionStore: import("zustand").UseBoundStore<Om
34
34
  } | undefined): () => void;
35
35
  };
36
36
  }, "setState"> & {
37
- setState(nextStateOrUpdater: GlobalSelectionStore | Partial<GlobalSelectionStore> | ((state: import("immer").WritableDraft<GlobalSelectionStore>) => void), shouldReplace?: boolean | undefined, action?: string | {
37
+ setState(nextStateOrUpdater: GlobalSelectionStore | Partial<GlobalSelectionStore> | ((state: {
38
+ addWorkOrdersToSelection: (args: {
39
+ workOrderIds: GlobalSelectionTypes.WorkOrderId[];
40
+ color?: string;
41
+ }) => Promise<import("./globalSelectionStore.types").GlobalSelectionAddItemResult<import("@equinor/echo-search").ResultArray<import("@equinor/echo-search").WorkOrderData>[]>>;
42
+ addTagsToSelection: (args: {
43
+ tagIds: GlobalSelectionTypes.TagId[];
44
+ color?: string;
45
+ }) => Promise<import("./globalSelectionStore.types").GlobalSelectionAddItemResult<import("@equinor/echo-search").ResultArray<import("@equinor/echo-search").TagSummaryDto>[]>>;
46
+ addEquipmentsToSelection: (args: {
47
+ equipmentIds: GlobalSelectionTypes.EquipmentId[];
48
+ color?: string;
49
+ }) => Promise<import("./globalSelectionStore.types").GlobalSelectionAddItemResult<import("@equinor/echo-search").ResultArray<import("@equinor/echo-search").EquipmentData>[]>>;
50
+ addMeasuringPointsToSelection: (args: {
51
+ measuringPointIds: GlobalSelectionTypes.MeasuringPointId[];
52
+ color?: string;
53
+ }) => Promise<import("./globalSelectionStore.types").GlobalSelectionAddItemResult<import("@equinor/echo-search").ResultArray<import("@equinor/echo-search").MeasuringPointData>[]>>;
54
+ removeItemsFromSelection: (args: {
55
+ itemIds: ReadonlyArray<GlobalSelectionTypes.ItemId>;
56
+ }) => void;
57
+ setColorByItemIds: (args: {
58
+ itemIds: ReadonlyArray<Readonly<GlobalSelectionTypes.ItemId>>;
59
+ color: string;
60
+ }) => void;
61
+ setVisibilityByItemIds: (args: {
62
+ itemIds: ReadonlyArray<Readonly<GlobalSelectionTypes.ItemId>>;
63
+ isVisible: boolean;
64
+ }) => void;
65
+ setAllItemsVisibility: (args: {
66
+ isVisible: boolean;
67
+ }) => void;
68
+ setItemMetaData: (args: ReadonlyArray<import("./globalSelectionStore.types").GlobalSelectionItemIdMetadata>) => void;
69
+ resetItemErrorStatuses: () => void;
70
+ getStoredItemIds: () => ReadonlyArray<GlobalSelectionTypes.ItemId>;
71
+ resetState: () => void;
72
+ setErrorStatusForItems: (args: {
73
+ itemErrorStatuses: GlobalSelectionTypes.ItemErrorStatusUpdate[];
74
+ }) => void;
75
+ removeErrorStatusForItems: (args: {
76
+ itemIds: Readonly<GlobalSelectionTypes.ItemId[]>;
77
+ }) => void;
78
+ lists: {
79
+ WorkOrder: {
80
+ items: Map<GlobalSelectionTypes.ItemIdString, {
81
+ id: {
82
+ workOrderId: string;
83
+ } | {
84
+ instCode: string;
85
+ tagNo: string;
86
+ } | {
87
+ equipmentId: string;
88
+ } | {
89
+ measuringPointId: string;
90
+ };
91
+ type: GlobalSelectionItemType.WorkOrder;
92
+ data: {
93
+ workOrderType: import("@equinor/echo-search").WorkOrderType;
94
+ workOrderTypeDescription: import("@equinor/echo-search").WorkOrderTypeDescription;
95
+ workOrderId: string;
96
+ tagId: string | undefined;
97
+ tagPlantId: string | undefined;
98
+ workCenterId: string;
99
+ workCenterPlantId: string;
100
+ title: string;
101
+ plantId: string;
102
+ activeStatusIds: string[];
103
+ sortField: string;
104
+ revisionId: string;
105
+ basicStartDateTime: Date | undefined;
106
+ basicEndDateTime: Date | undefined;
107
+ createdDateTime: Date | undefined;
108
+ changedDateTime: Date | undefined;
109
+ isTimeOnlyWorkOrder: boolean | undefined;
110
+ };
111
+ metaData: {
112
+ color: string;
113
+ isHiddenByUser: boolean;
114
+ errorStatus?: string | undefined;
115
+ systemStatus: import("./globalSelectionStore.types").SelectionItemSystemStatus;
116
+ };
117
+ }>;
118
+ };
119
+ Tag: {
120
+ items: Map<GlobalSelectionTypes.ItemIdString, {
121
+ id: {
122
+ workOrderId: string;
123
+ } | {
124
+ instCode: string;
125
+ tagNo: string;
126
+ } | {
127
+ equipmentId: string;
128
+ } | {
129
+ measuringPointId: string;
130
+ };
131
+ type: GlobalSelectionItemType.Tag;
132
+ data: {
133
+ instCode: string;
134
+ pdmsPlantCode: string | undefined;
135
+ tagCategoryDescription: string;
136
+ tagCategory: number;
137
+ tagStatus: import("@equinor/echo-search").TagStatus;
138
+ tagType: string;
139
+ updatedDate: Date;
140
+ locationCode: string;
141
+ contrCode: string;
142
+ plantNo: string;
143
+ poNo: string;
144
+ xCoordinate?: number | undefined;
145
+ yCoordinate?: number | undefined;
146
+ zCoordinate?: number | undefined;
147
+ additionalFields: {
148
+ type: string;
149
+ value: string;
150
+ }[];
151
+ tagNo: string;
152
+ description: string;
153
+ projectCode: string;
154
+ system: string;
155
+ };
156
+ metaData: {
157
+ color: string;
158
+ isHiddenByUser: boolean;
159
+ errorStatus?: string | undefined;
160
+ systemStatus: import("./globalSelectionStore.types").SelectionItemSystemStatus;
161
+ };
162
+ }>;
163
+ };
164
+ Equipment: {
165
+ items: Map<GlobalSelectionTypes.ItemIdString, {
166
+ id: {
167
+ workOrderId: string;
168
+ } | {
169
+ instCode: string;
170
+ tagNo: string;
171
+ } | {
172
+ equipmentId: string;
173
+ } | {
174
+ measuringPointId: string;
175
+ };
176
+ type: GlobalSelectionItemType.Equipment;
177
+ data: {
178
+ equipmentId: string;
179
+ activeStatusIds: string[];
180
+ area: string;
181
+ categoryId: import("dist/libs/echo-search/src/dataService/maintenance/equipment/equipment.type").EquipmentCategoryId | string;
182
+ changedDate?: Date | undefined;
183
+ createdDate?: Date | undefined;
184
+ e3DRef: string;
185
+ equipmentDescription: string;
186
+ equipmentsStatus: string[];
187
+ locationId: string;
188
+ maintenancePlantId: string;
189
+ tagId: string | undefined;
190
+ tagPlantId: string | undefined;
191
+ partType: string;
192
+ partTypeText: string;
193
+ };
194
+ metaData: {
195
+ color: string;
196
+ isHiddenByUser: boolean;
197
+ errorStatus?: string | undefined;
198
+ systemStatus: import("./globalSelectionStore.types").SelectionItemSystemStatus;
199
+ };
200
+ }>;
201
+ };
202
+ MeasuringPoint: {
203
+ items: Map<GlobalSelectionTypes.ItemIdString, {
204
+ id: {
205
+ workOrderId: string;
206
+ } | {
207
+ instCode: string;
208
+ tagNo: string;
209
+ } | {
210
+ equipmentId: string;
211
+ } | {
212
+ measuringPointId: string;
213
+ };
214
+ type: GlobalSelectionItemType.MeasuringPoint;
215
+ data: {
216
+ measuringPointId: string;
217
+ measuringPosition: string;
218
+ measuringPoint: string;
219
+ functionalLocationId: string | undefined;
220
+ tagPlantId: string | undefined;
221
+ tagId: string | undefined;
222
+ equipmentId: string | undefined;
223
+ quantitativeCharacteristicId: string | undefined;
224
+ quantitativeCharacteristicUnit: string | undefined;
225
+ positionDetails_CoordinateSystemName?: string | undefined;
226
+ positionDetails_E3DReferenceNumber?: string | undefined;
227
+ positionDetails_CoordinateEast?: string | undefined;
228
+ positionDetails_CoordinateNorth?: string | undefined;
229
+ positionDetails_CoordinateUp?: string | undefined;
230
+ };
231
+ metaData: {
232
+ color: string;
233
+ isHiddenByUser: boolean;
234
+ errorStatus?: string | undefined;
235
+ systemStatus: import("./globalSelectionStore.types").SelectionItemSystemStatus;
236
+ };
237
+ }>;
238
+ };
239
+ };
240
+ }) => void), shouldReplace?: boolean | undefined, action?: string | {
38
241
  type: string;
39
242
  } | undefined): void;
40
243
  }>;
@@ -52,3 +52,10 @@ export declare function applyColorsOnSelectionApiData(groups: ApiSelectionGroup[
52
52
  * @returns An array of `SelectionGroup` objects constructed from the API data, with the local selection group positioned as specified.
53
53
  */
54
54
  export declare function buildSelectionTreeFromApi(root: ApiSelectionTreeRootBase): SelectionGroup[];
55
+ /**
56
+ * Displays a user-friendly error message using the error handling system and a toast notification.
57
+ *
58
+ * @param userFriendlyMessage - The message to be displayed to the user.
59
+ * @param errorName - An optional name for the error (default is "Error").
60
+ */
61
+ export declare function displayUserFriendlyErrorMessage(userFriendlyMessage: string, errorName?: string | undefined): void;
@@ -1,4 +1,6 @@
1
- import { SelectionTreeStore } from './selectionTree.store.types';
1
+ import { Guid } from '@equinor/echo-utils';
2
+ import { GlobalSelectionTypes } from '../../globalSelectionStore/globalSelectionStore.types';
3
+ import { SelectionGroup, SelectionTreeStore } from './selectionTree.store.types';
2
4
  /**
3
5
  * Zustand store hook for managing the selection tree state in the global selection feature.
4
6
  *
@@ -27,7 +29,81 @@ export declare const useSelectionTreeStore: import("zustand").UseBoundStore<Omit
27
29
  } | undefined): () => void;
28
30
  };
29
31
  }, "setState"> & {
30
- setState(nextStateOrUpdater: SelectionTreeStore | Partial<SelectionTreeStore> | ((state: import("immer").WritableDraft<SelectionTreeStore>) => void), shouldReplace?: boolean | undefined, action?: string | {
32
+ setState(nextStateOrUpdater: SelectionTreeStore | Partial<SelectionTreeStore> | ((state: {
33
+ setCurrentSelectionId: (args: {
34
+ guid: Guid | undefined;
35
+ }) => void;
36
+ addItems: (args: {
37
+ itemIds: GlobalSelectionTypes.ItemId[];
38
+ groupId?: Guid;
39
+ }) => Promise<void>;
40
+ addTags: (args: import("./actions/selectionTree.action.types").AddItemArgs<GlobalSelectionTypes.TagId>) => import("./selectionTree.store.types").AddTagsReturnType;
41
+ addWorkOrders: (args: import("./actions/selectionTree.action.types").AddItemArgs<GlobalSelectionTypes.WorkOrderId>) => import("./selectionTree.store.types").AddWorkOrdersReturnType;
42
+ addEquipments: (args: import("./actions/selectionTree.action.types").AddItemArgs<GlobalSelectionTypes.EquipmentId>) => import("./selectionTree.store.types").AddEquipmentsReturnType;
43
+ addMeasuringPoints: (args: import("./actions/selectionTree.action.types").AddItemArgs<GlobalSelectionTypes.MeasuringPointId>) => import("./selectionTree.store.types").AddMeasuringPointsReturnType;
44
+ createGroup: (args: {
45
+ groupId?: string;
46
+ label: string;
47
+ subLabel: string;
48
+ }) => Guid;
49
+ removeGroupById: (args: {
50
+ groupId: Guid;
51
+ categoryId?: import("./selectionTree.store.types").GlobalSelectionCategoryId;
52
+ }) => void;
53
+ findGroupIdByLabel: (args: {
54
+ label: string;
55
+ }) => Guid | undefined;
56
+ findGroupById: (args: {
57
+ id: Guid;
58
+ }) => SelectionGroup | undefined;
59
+ removeItemsById: (args: {
60
+ groupId?: Guid;
61
+ categoryId: import("./selectionTree.store.types").GlobalSelectionCategoryId;
62
+ itemIds: GlobalSelectionTypes.ItemId[];
63
+ }) => void;
64
+ removeAllItemsById: (args: {
65
+ itemIds: GlobalSelectionTypes.ItemId[];
66
+ }) => void;
67
+ moveItems: (args: {
68
+ sourceGroupId: Guid;
69
+ sourceCategoryId?: import("./selectionTree.store.types").GlobalSelectionCategoryId;
70
+ sourceItemId?: GlobalSelectionTypes.ItemId;
71
+ targetGroupId: Guid;
72
+ }) => void;
73
+ setVisibilityById: (args: {
74
+ groupId: Guid;
75
+ categoryId?: import("./selectionTree.store.types").GlobalSelectionCategoryId;
76
+ isVisible: boolean;
77
+ }) => void;
78
+ resetState: () => void;
79
+ setWholeState: (args: {
80
+ selectionId: Guid | undefined;
81
+ groups: SelectionGroup[];
82
+ }) => void;
83
+ currentSelectionId?: Guid | undefined;
84
+ groups: {
85
+ categories: {
86
+ id: import("./selectionTree.store.types").GlobalSelectionCategoryId;
87
+ label: string;
88
+ items: Map<GlobalSelectionTypes.ItemIdString, {
89
+ id: {
90
+ workOrderId: string;
91
+ } | {
92
+ instCode: string;
93
+ tagNo: string;
94
+ } | {
95
+ equipmentId: string;
96
+ } | {
97
+ measuringPointId: string;
98
+ };
99
+ type: import("../../globalSelectionStore/globalSelectionStore.types").GlobalSelectionItemType;
100
+ }>;
101
+ }[];
102
+ groupId: Guid;
103
+ label: string;
104
+ subLabel: string;
105
+ }[];
106
+ }) => void), shouldReplace?: boolean | undefined, action?: string | {
31
107
  type: string;
32
108
  } | undefined): void;
33
109
  }>;
@@ -4,7 +4,7 @@ interface PositionalItemProps {
4
4
  * This is the CSS position string, that will be used in --transform: var(--position);
5
5
  */
6
6
  position: string;
7
- isOpen: boolean;
7
+ isActive: boolean;
8
8
  children: React.ReactNode;
9
9
  }
10
10
  /**
@@ -5,7 +5,7 @@ interface LegendPositionItem {
5
5
  positionString: string;
6
6
  hasPointer: boolean;
7
7
  /** Unique identifier that doesn't change on viewport changes */
8
- uniqueIdentifier: string;
8
+ positionId: string;
9
9
  }
10
10
  interface LegendMarkersRendererProps {
11
11
  positionItems: ReadonlyArray<LegendPositionItem>;
@@ -0,0 +1,13 @@
1
+ import { LegendDataId, LegendId } from '../../../types/legendType';
2
+ import { MarkerId } from '../utils/markerId.utils';
3
+ import { GroupedMarker } from '../utils/splitMarkerByBadgeSelectionGroup.types';
4
+ interface MarkerWithPopoverProps {
5
+ legendId: LegendId;
6
+ hasPointer: boolean;
7
+ hiddenBadges: string[];
8
+ marker: GroupedMarker;
9
+ itemId: LegendDataId;
10
+ markerId: MarkerId;
11
+ }
12
+ export declare const MarkerWithPopover: (props: MarkerWithPopoverProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -1,12 +1,8 @@
1
1
  import { LegendDataId } from '../../../types/legendType';
2
- import { PopoverContent, RequestPopoverHandler } from './hooks/usePopoverHandler.types';
3
2
  interface MultipleMarkersByLegendsProps {
4
3
  itemId: LegendDataId;
5
4
  hasPointer: boolean;
6
- onOpenPopover: RequestPopoverHandler;
7
- onClosePopover: () => void;
8
- currentPopover?: PopoverContent;
9
- uniqueIdentifier: string;
5
+ positionId: string;
10
6
  }
11
7
  export declare const MultipleMarkersByLegends: import("react").MemoExoticComponent<(props: MultipleMarkersByLegendsProps) => import("react/jsx-runtime").JSX.Element>;
12
8
  export {};
@@ -3,8 +3,7 @@ interface MultipleMarkersBySingleLegendComponentProps {
3
3
  legendId: LegendId;
4
4
  itemId: LegendDataId;
5
5
  hasPointer: boolean;
6
- isActive: boolean;
7
- onClick: () => void;
6
+ positionId: string;
8
7
  }
9
8
  export declare const MultipleMarkersBySingleLegend: import("react").MemoExoticComponent<(props: MultipleMarkersBySingleLegendComponentProps) => import("react/jsx-runtime").JSX.Element[] | null>;
10
9
  export {};
@@ -0,0 +1,19 @@
1
+ import { LegendDataId, LegendId } from '../../../../types/legendType';
2
+ import { MarkerId } from '../../utils/markerId.utils';
3
+ import { GroupedMarker } from '../../utils/splitMarkerByBadgeSelectionGroup.types';
4
+ /**
5
+ * Hook to manage popover state and async content loading for legend markers.
6
+ * When fetching, it will show a loading spinner if content takes too long to load.
7
+ *
8
+ * @param markerId - Unique identifier for this marker
9
+ * @param legendId - The legend this marker belongs to
10
+ * @param itemId - The data ID for this legend item
11
+ * @param marker - The grouped marker data containing badges
12
+ * @returns Object with isActive state, elements array, and handlers for open/close
13
+ */
14
+ export declare function useMarkerPopover(markerId: MarkerId, legendId: LegendId, itemId: LegendDataId, marker: GroupedMarker): {
15
+ isPopoverActive: boolean;
16
+ elements: readonly import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>[];
17
+ handleOpen: () => Promise<void>;
18
+ handleClose: () => void;
19
+ };
@@ -0,0 +1,18 @@
1
+ import { Brand } from '@equinor/echo-utils';
2
+ import { LegendId } from '../../../types/legendType';
3
+ export type MarkerId = Brand<string, 'MarkerId'>;
4
+ /**
5
+ * Creates a unique marker ID from its component parts.
6
+ * Format: positionId::legendId::groupKey
7
+ */
8
+ export declare function createMarkerId(positionId: string, legendId: LegendId, groupKey: string): MarkerId;
9
+ /**
10
+ * Extracts the position ID from a marker ID.
11
+ * Returns undefined if the marker ID is invalid.
12
+ * @internal - Only exported for testing purposes
13
+ */
14
+ export declare function getPositionIdFromMarkerId(markerId: MarkerId): string | undefined;
15
+ /**
16
+ * Checks if a marker ID belongs to a specific position.
17
+ */
18
+ export declare function isMarkerAtPosition(markerId: MarkerId | undefined, positionId: string): boolean;