@equinor/echo-framework 5.0.0-beta-r19-0 → 5.0.0

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 (52) hide show
  1. package/{f4c85313e79b1662.svg → 1bd97dd2170d0f64.svg} +850 -850
  2. package/{063009f06499d102.svg → 47deeba42768c5d1.svg} +8 -8
  3. package/README.md +48 -48
  4. package/index.cjs.js +2 -2
  5. package/index.d.ts +2 -2
  6. package/package.json +6 -6
  7. package/src/index.d.ts +6 -1
  8. package/src/lib/components/prepview/panels/objects/selectionActionBarMultiple/logic/selectionActionBarMultiple.logic.d.ts +4 -0
  9. package/src/lib/feature/equipment/components/fullEquipmentItem/fullEquipmentItem.d.ts +3 -3
  10. package/src/lib/feature/globalSelection/components/selectionActionBar/SelectionActionBar.d.ts +3 -1
  11. package/src/lib/feature/globalSelection/components/selectionActionBar/hooks/useSelectionAction.d.ts +28 -0
  12. package/src/lib/feature/globalSelection/globalSelectionStore/actions/addItemsByStrategy.action.d.ts +17 -0
  13. package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.d.ts +13 -16
  14. package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.types.d.ts +9 -16
  15. package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.utils.d.ts +2 -36
  16. package/src/lib/feature/globalSelection/globalSelectionStore/selectionActionFeedbackStore.d.ts +30 -0
  17. package/src/lib/feature/globalSelection/hooks/useGlobalSelectionLists.d.ts +5 -3
  18. package/src/lib/feature/globalSelection/hooks/useIsInGlobalSelection.d.ts +0 -1
  19. package/src/lib/feature/globalSelection/hooks/useSelectionCategoriesByGroupId.d.ts +3 -2
  20. package/src/lib/feature/globalSelection/selectionMenu/hooks/{useIsAllIGlobalSelectionItemsHidden.d.ts → useIsAllGlobalSelectionItemsHidden.d.ts} +4 -6
  21. package/src/lib/feature/globalSelection/selectionMenu/hooks/useSelectionColorFrequency.d.ts +5 -2
  22. package/src/lib/feature/globalSelection/strategies/equipmentSelection.strategy.d.ts +3 -0
  23. package/src/lib/feature/globalSelection/strategies/index.d.ts +2 -0
  24. package/src/lib/feature/globalSelection/strategies/isItemIdOfType.d.ts +2 -0
  25. package/src/lib/feature/globalSelection/strategies/measuringPointSelection.strategy.d.ts +3 -0
  26. package/src/lib/feature/globalSelection/strategies/registerStrategies.d.ts +1 -0
  27. package/src/lib/feature/globalSelection/strategies/selectionItemTypeRegistry.d.ts +37 -0
  28. package/src/lib/feature/globalSelection/strategies/selectionItemTypeStrategy.types.d.ts +50 -0
  29. package/src/lib/feature/globalSelection/strategies/tagSelection.strategy.d.ts +3 -0
  30. package/src/lib/feature/globalSelection/strategies/workOrderSelection.strategy.d.ts +3 -0
  31. package/src/lib/feature/legend/components/pdfMarkers/subComponents/MarkerWithPopover.d.ts +1 -1
  32. package/src/lib/feature/legend/components/pdfMarkers/subComponents/components/MultipleMarkersBySingleLegend/multipleMarkersBySingleLegend.logic.d.ts +1 -1
  33. package/src/lib/feature/legend/components/pdfMarkers/subComponents/components/MultipleMarkersBySingleLegend/useStalePopoverMarkers.d.ts +3 -3
  34. package/src/lib/feature/legend/components/pdfMarkers/subComponents/hooks/useMarkerPopover.d.ts +1 -2
  35. package/src/lib/feature/legend/components/pdfMarkers/utils/markerId.utils.d.ts +1 -2
  36. package/src/lib/feature/legend/legendAnalytics.d.ts +1 -1
  37. package/src/lib/feature/legend/legendFacade.d.ts +8 -0
  38. package/src/lib/feature/legend/legendStrategies/notificationStrategy/hooks/{useNotificationsByTagIds.d.ts → useOpenNotificationsByTagIds.d.ts} +2 -2
  39. package/src/lib/feature/legend/legendStrategies/notificationStrategy/logic/notificationLegend.logic.d.ts +1 -1
  40. package/src/lib/feature/legend/stores/legendUIStore/legendUIStore.types.d.ts +1 -12
  41. package/src/lib/feature/legend/stores/legendVisibleDataAsTagsStore/legendVisibleDataAsTagsStore.d.ts +8 -0
  42. package/src/lib/feature/shared/markerId.types.d.ts +11 -0
  43. package/src/lib/utils/index.d.ts +1 -0
  44. package/src/lib/utils/notification.utils.d.ts +2 -0
  45. package/src/lib/feature/globalSelection/globalSelectionStore/actions/addEquipmentsToSelection.action.d.ts +0 -7
  46. package/src/lib/feature/globalSelection/globalSelectionStore/actions/addItemsToSelectionFactory.d.ts +0 -21
  47. package/src/lib/feature/globalSelection/globalSelectionStore/actions/addMeasuringPointsToSelection.action.d.ts +0 -7
  48. package/src/lib/feature/globalSelection/globalSelectionStore/actions/addTagsToSelection.action.d.ts +0 -12
  49. package/src/lib/feature/globalSelection/globalSelectionStore/actions/addWorkOrdersToSelection.action.d.ts +0 -7
  50. package/src/lib/feature/globalSelection/hooks/useSelectionAction.d.ts +0 -21
  51. package/src/lib/icons/index.d.ts +0 -13
  52. package/src/lib/icons/search.d.ts +0 -3
@@ -1,5 +1,4 @@
1
- import type { SelectionBarFeedbackType } from '@equinor/echo-components';
2
- import { MarkerId } from '../../components/pdfMarkers/utils/markerId.utils';
1
+ import type { MarkerId } from '../../../shared/markerId.types';
3
2
  import { LegendId } from '../../types/legendType';
4
3
  export type { SelectionBarFeedbackType } from '@equinor/echo-components';
5
4
  export type LegendFeedbackVariant = 'error' | 'info' | 'warning';
@@ -19,16 +18,11 @@ export type LegendUIStoreValues = {
19
18
  readonly activePopover: {
20
19
  readonly id?: MarkerId;
21
20
  readonly elements: ReadonlyArray<React.ReactElement>;
22
- readonly selectionFeedback?: {
23
- readonly isLoading: boolean;
24
- readonly feedbackType: SelectionBarFeedbackType | null;
25
- };
26
21
  };
27
22
  readonly selectionLegend: {
28
23
  readonly isHighlightVisible: boolean;
29
24
  readonly markersOutsideSelectionVisibility: MarkersOutsideSelectionVisibility;
30
25
  };
31
- readonly shouldDelayPopoverUpdate: boolean;
32
26
  };
33
27
  export interface LegendUIStoreActions {
34
28
  toggleAccordion: (legendId: LegendId, newValue: boolean) => void;
@@ -52,11 +46,6 @@ export interface LegendUIStoreActions {
52
46
  setSelectionLegendIsHighlightVisible: (visible: boolean) => void;
53
47
  setActivePopoverId: (popoverId: MarkerId | undefined) => void;
54
48
  setActivePopoverElements: (elements: ReadonlyArray<React.ReactElement>) => void;
55
- setPopoverSelectionFeedback: (feedback: {
56
- isLoading: boolean;
57
- feedbackType: SelectionBarFeedbackType | null;
58
- } | undefined) => void;
59
- setShouldDelayPopoverUpdate: (delay: boolean) => void;
60
49
  setAccordionFeedback: (legendId: LegendId, feedback: {
61
50
  message: string;
62
51
  variant?: LegendFeedbackVariant;
@@ -56,6 +56,14 @@ export declare const useVisibleDataAsTagsStore: import("zustand").UseBoundStore<
56
56
  type: string;
57
57
  value: string;
58
58
  }[];
59
+ coordinates: {
60
+ tagSeqNo: number;
61
+ xEasting: number;
62
+ yNorthing: number;
63
+ zElevation: number;
64
+ uom: string;
65
+ linePosition: number | undefined;
66
+ }[];
59
67
  tagNo: string;
60
68
  description: string;
61
69
  projectCode: string;
@@ -0,0 +1,11 @@
1
+ import { Brand } from '@equinor/echo-utils';
2
+ /**
3
+ * Uniquely identifies a marker by its position, the legend it is rendered for,
4
+ * and the selection group it belongs to.
5
+ *
6
+ * Format: `positionId::legendId::groupKey`
7
+ *
8
+ * Shared here so both the `legend` and `globalSelection` features can reference
9
+ * the type without creating a circular dependency.
10
+ */
11
+ export type MarkerId = Brand<string, 'MarkerId'>;
@@ -4,6 +4,7 @@ export * from './endDateStatus/getEndDateStatus';
4
4
  export * from './formatTimeHelpers';
5
5
  export * from './highlightTextUtil';
6
6
  export * from './navigationUtils';
7
+ export * from './notification.utils';
7
8
  export * from './openIn3d';
8
9
  export * from './plantInfo';
9
10
  export * from './previousUtils';
@@ -0,0 +1,2 @@
1
+ export declare function isNotificationClosed(systemStatusIds: string[]): boolean;
2
+ export declare function isNotificationOpen(systemStatusIds: string[]): boolean;
@@ -1,7 +0,0 @@
1
- export declare const addEquipmentsToSelectionAction: (set: (set: (state: import("../globalSelectionStore.types").GlobalSelectionStore) => void, shouldReplace?: boolean | undefined, action?: string) => void, get: import("zustand").StoreApi<import("../globalSelectionStore.types").GlobalSelectionStore>["getState"], args: {
2
- itemIds: import("../globalSelectionStore.types").GlobalSelectionTypes.EquipmentId[];
3
- color?: string;
4
- }) => Promise<{
5
- fetchResult: import("@equinor/echo-search").ResultArray<import("@equinor/echo-search").EquipmentData>[];
6
- actionResult: import("../globalSelectionStore.types").GlobalSelectionTypes.ActionResult;
7
- }>;
@@ -1,21 +0,0 @@
1
- import type { ResultArray } from '@equinor/echo-search';
2
- import { StoreApi } from 'zustand';
3
- import { GlobalSelectionItemType, GlobalSelectionItemTypeToDataMap, GlobalSelectionStore, GlobalSelectionTypes, SelectionItemTypeToItemIdMap } from '../globalSelectionStore.types';
4
- type FetchFunction<T, U> = (itemIds: Readonly<U[]>) => Promise<{
5
- result: ResultArray<T>;
6
- itemIdsUsed: U[];
7
- }[]>;
8
- type NullItemGenerator<T, U> = (itemId: U) => T;
9
- type SetFunction = (set: (state: GlobalSelectionStore) => void, shouldReplace?: boolean | undefined, action?: string) => void;
10
- export declare function addItemsToSelectionFactory<T extends GlobalSelectionItemType>(args: {
11
- itemType: T;
12
- fetchFunction: FetchFunction<GlobalSelectionItemTypeToDataMap[T], SelectionItemTypeToItemIdMap[T]>;
13
- nullItemGenerator: NullItemGenerator<GlobalSelectionItemTypeToDataMap[T], SelectionItemTypeToItemIdMap[T]>;
14
- }): (set: SetFunction, get: StoreApi<GlobalSelectionStore>["getState"], args: {
15
- itemIds: SelectionItemTypeToItemIdMap[T][];
16
- color?: string;
17
- }) => Promise<{
18
- fetchResult: ResultArray<GlobalSelectionItemTypeToDataMap[T]>[];
19
- actionResult: GlobalSelectionTypes.ActionResult;
20
- }>;
21
- export {};
@@ -1,7 +0,0 @@
1
- export declare const addMeasuringPointsToSelectionAction: (set: (set: (state: import("../globalSelectionStore.types").GlobalSelectionStore) => void, shouldReplace?: boolean | undefined, action?: string) => void, get: import("zustand").StoreApi<import("../globalSelectionStore.types").GlobalSelectionStore>["getState"], args: {
2
- itemIds: import("../globalSelectionStore.types").GlobalSelectionTypes.MeasuringPointId[];
3
- color?: string;
4
- }) => Promise<{
5
- fetchResult: import("@equinor/echo-search").ResultArray<import("@equinor/echo-search").MeasuringPointData>[];
6
- actionResult: import("../globalSelectionStore.types").GlobalSelectionTypes.ActionResult;
7
- }>;
@@ -1,12 +0,0 @@
1
- import type { ResultArray, TagSummaryDto } from '@equinor/echo-search';
2
- import type { StoreApi } from 'zustand';
3
- import { GlobalSelectionStore, GlobalSelectionTypes } from '../globalSelectionStore.types';
4
- export declare function addTagsToSelectionAction(set: SetFunction, get: StoreApi<GlobalSelectionStore>['getState'], args: {
5
- itemIds: GlobalSelectionTypes.TagId[];
6
- color?: string;
7
- }): Promise<{
8
- fetchResult: ResultArray<TagSummaryDto>[];
9
- actionResult: GlobalSelectionTypes.ActionResult;
10
- }>;
11
- type SetFunction = (set: (state: GlobalSelectionStore) => void, shouldReplace?: boolean | undefined, action?: string) => void;
12
- export {};
@@ -1,7 +0,0 @@
1
- export declare const addWorkOrdersToSelectionAction: (set: (set: (state: import("../globalSelectionStore.types").GlobalSelectionStore) => void, shouldReplace?: boolean | undefined, action?: string) => void, get: import("zustand").StoreApi<import("../globalSelectionStore.types").GlobalSelectionStore>["getState"], args: {
2
- itemIds: import("../globalSelectionStore.types").GlobalSelectionTypes.WorkOrderId[];
3
- color?: string;
4
- }) => Promise<{
5
- fetchResult: import("@equinor/echo-search").ResultArray<import("@equinor/echo-search").WorkOrderData>[];
6
- actionResult: import("../globalSelectionStore.types").GlobalSelectionTypes.ActionResult;
7
- }>;
@@ -1,21 +0,0 @@
1
- import type { SelectionBarFeedbackType } from '@equinor/echo-components';
2
- import { Guid } from '@equinor/echo-utils';
3
- import { GlobalSelectionTypes } from '../globalSelectionStore/globalSelectionStore.types';
4
- /**
5
- *
6
- * Hook to manage selection actions for global selection.
7
- *
8
- * When showPopoverUpdateDelay is true, isLoading and feedbackType are stored in legendUIStore
9
- * so they survive component remounts during the stale-marker holding period.
10
- * When false, they live in local React state.
11
- *
12
- * @param showPopoverUpdateDelay Whether to delay the popover update to avoid flickering. Temporary hack to be resolved in #397869
13
- * @returns Object containing loading state, feedback type, and functions to add/remove items from selection.
14
- */
15
- export declare function useSelectionAction(showPopoverUpdateDelay?: boolean): {
16
- isLoading: boolean;
17
- feedbackType: SelectionBarFeedbackType | null;
18
- addToSelection: (groupId: Guid, itemId: GlobalSelectionTypes.ItemId) => Promise<void>;
19
- removeFromSelection: (groupId: Guid, itemId: GlobalSelectionTypes.ItemId) => void;
20
- changeColor: (itemId: GlobalSelectionTypes.ItemId, color: string) => void;
21
- };
@@ -1,13 +0,0 @@
1
- export { ReactComponent as ConditionAdviserIcon } from './ConditionAdviserIcon.svg';
2
- export { ReactComponent as Evision } from './Evision.svg';
3
- export { ReactComponent as Fusion } from './Fusion.svg';
4
- export { ReactComponent as McApp } from './McApp.svg';
5
- export { ReactComponent as NotificationIcon } from './Notification.svg';
6
- export { ReactComponent as ProCoSysIcon } from './ProCoSysIcon.svg';
7
- export { ReactComponent as SapLogo } from './SapLogo.svg';
8
- export { ReactComponent as Stid } from './Stid.svg';
9
- export { ReactComponent as TR2000 } from './TR2000.svg';
10
- export { ReactComponent as TrendingAppIcon } from './TrendingAppIcon.svg';
11
- export { ReactComponent as VivaEngage } from './VivaEngage.svg';
12
- export { ReactComponent as WorkOrderIcon } from './WorkOrder.svg';
13
- export { ReactComponent as Yammer } from './Yammer.svg';
@@ -1,3 +0,0 @@
1
- import React, { FunctionComponent } from 'react';
2
- export declare const icon: FunctionComponent<React.SVGProps<SVGSVGElement>>;
3
- export default icon;