@equinor/echo-framework 6.1.0 → 6.2.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.
- package/index.cjs.js +2 -2
- package/package.json +8 -8
- package/src/index.d.ts +1 -1
- package/src/lib/components/panel/panelNavigation.helper.d.ts +1 -2
- package/src/lib/feature/globalSelection/selectionMenu/hooks/useFetchSelectionHistory.d.ts +1 -1
- package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/colorConflictHandling/SelectionColorConflictDialog.d.ts +1 -1
- package/src/lib/feature/legend/components/pdfMarkers/subComponents/LegendColoredMarkerIcon.d.ts +6 -9
- package/src/lib/feature/legend/components/pdfMarkers/subComponents/MarkerWithPopover.d.ts +6 -7
- package/src/lib/feature/legend/components/pdfMarkers/subComponents/components/MultipleMarkersBySingleLegend/multipleMarkersBySingleLegend.logic.d.ts +5 -7
- package/src/lib/feature/legend/components/pdfMarkers/subComponents/components/MultipleMarkersBySingleLegend/useStalePopoverMarkers.d.ts +3 -3
- package/src/lib/feature/legend/components/pdfMarkers/subComponents/hooks/useMarkerPopover.d.ts +2 -2
- package/src/lib/feature/legend/components/pdfMarkers/utils/markerId.utils.d.ts +11 -3
- package/src/lib/feature/legend/components/popover/LegendPopoverContent.logic.d.ts +14 -21
- package/src/lib/feature/legend/components/selectionLegend/hooks/useAllMarkerItemIdsForEnabledLegends.d.ts +4 -4
- package/src/lib/feature/legend/components/selectionLegend/selectionLegend.utils.d.ts +9 -9
- package/src/lib/feature/legend/hooks/useLegendBadgeChips.d.ts +7 -0
- package/src/lib/feature/legend/hooks/useLegendHiddenItemsSubscription.d.ts +4 -14
- package/src/lib/feature/legend/hooks/useLegendMarkerChips.d.ts +7 -0
- package/src/lib/feature/legend/hooks/useLegendMarkers/useLegendMarkers.d.ts +17 -0
- package/src/lib/feature/legend/hooks/useLegendMarkers/useLegendMarkers.logic.d.ts +65 -0
- package/src/lib/feature/legend/hooks/useLegendMarkers/useLegendMarkers.utils.d.ts +14 -0
- package/src/lib/feature/legend/hooks/useWorkOrdersByTagsQuery.d.ts +1 -1
- package/src/lib/feature/legend/index.d.ts +8 -6
- package/src/lib/feature/legend/legendFacade.d.ts +9 -15
- package/src/lib/feature/legend/legendStrategies/iocAnnotationStrategy/api/iocAnnotationLegend.api.d.ts +3 -0
- package/src/lib/feature/legend/legendStrategies/iocAnnotationStrategy/hooks/useIocAnnotationMarkers.d.ts +3 -0
- package/src/lib/feature/legend/legendStrategies/iocAnnotationStrategy/hooks/useIocAnnotationMarkers.utils.d.ts +21 -0
- package/src/lib/feature/legend/legendStrategies/iocAnnotationStrategy/iocAnnotationStrategy.d.ts +1 -0
- package/src/lib/feature/legend/legendStrategies/iocAnnotationStrategy/iocAnnotationStrategy.types.d.ts +25 -0
- package/src/lib/feature/legend/legendStrategies/iocAnnotationStrategy/optionConfigs/iocAnnotationBadgeLegendOptionConfig.d.ts +3 -0
- package/src/lib/feature/legend/legendStrategies/iocAnnotationStrategy/optionConfigs/iocAnnotationMarkerLegendOptionConfig.d.ts +3 -0
- package/src/lib/feature/legend/legendStrategies/notificationStrategy/hooks/useNotificationDetailsByIds.d.ts +1 -1
- package/src/lib/feature/legend/legendStrategies/notificationStrategy/hooks/useNotificationRawMarkers.d.ts +10 -0
- package/src/lib/feature/legend/legendStrategies/notificationStrategy/logic/notificationLegend.logic.d.ts +5 -5
- package/src/lib/feature/legend/legendStrategies/notificationStrategy/utils/getNotificationTitlesByPropertyName.d.ts +1 -1
- package/src/lib/feature/legend/legendStrategies/notificationStrategy/utils/notificationLegend.utils.d.ts +2 -4
- package/src/lib/feature/legend/legendStrategies/workOrderStrategy/useCreateWorkOrderMarkers.d.ts +7 -4
- package/src/lib/feature/legend/logic/displayKeys.logic.d.ts +11 -0
- package/src/lib/feature/legend/logic/legendChips.logic.d.ts +8 -0
- package/src/lib/feature/legend/logic/propertyAccessor.utils.d.ts +5 -16
- package/src/lib/feature/legend/stores/legendUIStore/legendUIStore.d.ts +2 -2
- package/src/lib/feature/legend/stores/legendUIStore/legendUIStore.types.d.ts +25 -12
- package/src/lib/feature/legend/types/legendMarkerBadge.type.d.ts +74 -11
- package/src/lib/feature/legend/types/legendStrategy.type.d.ts +10 -5
- package/src/lib/feature/legend/types/legendType.d.ts +17 -6
- package/src/lib/feature/measuringPoint/components/lastRecordedMeasurement/lastRecordedMeasurement.logic.d.ts +1 -6
- package/src/lib/feature/measuringPoint/components/lastRecordedMeasurement/lastRecordedMeasurement.types.d.ts +5 -0
- package/src/lib/feature/measuringPoint/components/measuringPointDetails/measuringPointImageList.logic.d.ts +6 -0
- package/src/lib/feature/measuringPoint/components/measuringPointDetails/type/attachment.d.ts +4 -4
- package/src/lib/feature/measuringPoint/components/measuringPoints.utils.d.ts +2 -0
- package/src/lib/feature/measuringPoint/hooks/useDocumentRelationships.d.ts +1 -1
- package/src/lib/feature/measuringPoint/types/documentRelationships.d.ts +7 -7
- package/src/lib/feature/measuringPoint/types/measuringPoint.d.ts +14 -14
- package/src/lib/types/hookLibrary.d.ts +34 -22
- package/src/lib/feature/legend/components/basicLegendRenderer.logic.d.ts +0 -5
- package/src/lib/feature/legend/components/pdfMarkers/utils/splitMarkerByColor.d.ts +0 -34
- package/src/lib/feature/legend/components/pdfMarkers/utils/splitMarkerByColor.types.d.ts +0 -37
- package/src/lib/feature/legend/hooks/useGroupedMarkers.d.ts +0 -23
- package/src/lib/feature/legend/hooks/useGroupedMarkers.utils.d.ts +0 -9
- package/src/lib/feature/legend/hooks/useLegendMarker/useLegendMarker.d.ts +0 -19
- package/src/lib/feature/legend/hooks/useLegendMarker/useLegendMarker.utils.d.ts +0 -21
- package/src/lib/feature/legend/hooks/useLegendUniqueBadges.d.ts +0 -7
- package/src/lib/feature/legend/hooks/useLegendUniqueMarkers.d.ts +0 -7
- package/src/lib/feature/legend/hooks/useUniqueSelectionOnlyBadgeIdStrings.d.ts +0 -8
- package/src/lib/feature/legend/legendStrategies/notificationStrategy/hooks/useNotificationMarkers.d.ts +0 -10
- package/src/lib/feature/legend/logic/hiddenLegendChips.logic.d.ts +0 -6
|
@@ -1,24 +1,36 @@
|
|
|
1
|
-
export type SetActiveTagNo =
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
export type SetActiveTagNo = {
|
|
2
|
+
(args: {
|
|
3
|
+
tagNo: string;
|
|
4
|
+
activeTagTab?: string;
|
|
5
|
+
activeTagSubTab?: string;
|
|
6
|
+
instCode?: string;
|
|
7
|
+
activePanelKey?: string;
|
|
8
|
+
keepLastNavigationItem?: boolean;
|
|
9
|
+
openInPanel?: boolean;
|
|
10
|
+
displayMessageOnItemNotFound?: boolean;
|
|
11
|
+
allowToggle?: boolean;
|
|
12
|
+
omitTagNoFromUrl?: boolean;
|
|
13
|
+
}): void;
|
|
14
|
+
/** @deprecated Use the args object form instead: `setActiveTagNo({ tagNo, activeTagTab?, activeTagSubTab?, instCode?, openInPanel?, displayMessageOnItemNotFound? })` */
|
|
15
|
+
(tagNo: string, activeTagTab?: string, activeTagSubTab?: string, instCode?: string, openInPanel?: boolean, displayMessageOnItemNotFound?: boolean): void;
|
|
16
|
+
};
|
|
13
17
|
export type TagData = [(tagNo: string, instCode: string) => void];
|
|
14
|
-
export type SetActiveCommPackNo =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
export type SetActiveCommPackNo = {
|
|
19
|
+
(args: {
|
|
20
|
+
commPackNo: string;
|
|
21
|
+
activeCommPackProject: string;
|
|
22
|
+
activePanelKey?: string;
|
|
23
|
+
}): void;
|
|
24
|
+
/** @deprecated Use the args object form instead: `setActiveCommPackNo({ commPackNo, activeCommPackProject, activePanelKey? })` */
|
|
25
|
+
(commPackNo: string, activeCommPackProject: string): void;
|
|
26
|
+
};
|
|
27
|
+
export type SetActiveMcPackNo = {
|
|
28
|
+
(args: {
|
|
29
|
+
mcPackNo: string;
|
|
30
|
+
activeMcPackProject: string;
|
|
31
|
+
activePanelKey?: string;
|
|
32
|
+
}): void;
|
|
33
|
+
/** @deprecated Use the args object form instead: `setActiveMcPackNo({ mcPackNo, activeMcPackProject, activePanelKey? })` */
|
|
34
|
+
(mcPackNo: string, activeMcPackProject: string): void;
|
|
35
|
+
};
|
|
24
36
|
export type ScreenOrientation = 'landscape' | 'portrait' | undefined;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { LegendChipProps } from '@equinor/echo-components';
|
|
2
|
-
import { Badge, Marker } from '../types/legendMarkerBadge.type';
|
|
3
|
-
import { LegendState } from '../types/legendType';
|
|
4
|
-
export declare const getMarkerChips: (markers: ReadonlyArray<Marker>, legend: LegendState, hiddenMarkers: string[]) => LegendChipProps[];
|
|
5
|
-
export declare const getBadgeChips: (badges: ReadonlyArray<Badge>, legend: LegendState, hiddenBadges: string[]) => LegendChipProps[];
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ItemToSelectionGroupsMap } from '../../../stores/itemToSelectionGroupsMapStore/itemToSelectionGroupsMapStore.types';
|
|
2
|
-
import { Marker } from '../../../types/legendMarkerBadge.type';
|
|
3
|
-
import { ColorGroupedMarker } from './splitMarkerByColor.types';
|
|
4
|
-
/**
|
|
5
|
-
* Splits a marker into variants based on selection color only (not selection group).
|
|
6
|
-
*
|
|
7
|
-
* The selection color is the color assigned to items in the global selection store
|
|
8
|
-
* (item.metaData.color). This is used for the marker highlight color on the PDF.
|
|
9
|
-
|
|
10
|
-
* Example: Marker with 3 equipment badges:
|
|
11
|
-
* - Badge A (group1, red selection color)
|
|
12
|
-
* - Badge B (group2, red selection color)
|
|
13
|
-
* - Badge C (group3, blue selection color)
|
|
14
|
-
*
|
|
15
|
-
* Returns 2 marker variants:
|
|
16
|
-
* - Red variant: [BadgeA(from group1), BadgeB(from group2)]
|
|
17
|
-
* - Blue variant: [BadgeC(from group3)]
|
|
18
|
-
*
|
|
19
|
-
* When group2 is hidden, red variant filters to [BadgeA] only.
|
|
20
|
-
*
|
|
21
|
-
* @param itemToGroupsMap - Pre-built map of itemIdString -> SelectionGroup[] for lookup
|
|
22
|
-
* @param marker - The marker containing badges to be split by selection color
|
|
23
|
-
* @returns Array of selection-color-grouped marker variants
|
|
24
|
-
*/
|
|
25
|
-
export declare const splitMarkerByColor: (itemToGroupsMap: ItemToSelectionGroupsMap, marker?: Marker) => ColorGroupedMarker[];
|
|
26
|
-
/**
|
|
27
|
-
* Filters a color-grouped marker's badges by hidden groups.
|
|
28
|
-
* Returns undefined if all badges are hidden (marker should not render).
|
|
29
|
-
*
|
|
30
|
-
* @param marker - The color-grouped marker to filter
|
|
31
|
-
* @param hiddenGroupKeys - Array of hidden group key strings
|
|
32
|
-
* @returns Marker with filtered badges, or undefined if all hidden
|
|
33
|
-
*/
|
|
34
|
-
export declare const filterBadgesByHiddenGroups: (marker: ColorGroupedMarker, hiddenGroupKeys: string[]) => ColorGroupedMarker | undefined;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Guid } from '@equinor/echo-utils';
|
|
2
|
-
import { GlobalSelectionItemType } from '../../../../globalSelection';
|
|
3
|
-
import { Badge, Marker } from '../../../types/legendMarkerBadge.type';
|
|
4
|
-
export interface GroupKey {
|
|
5
|
-
/** Helper to get the full string representation of the group key based on groupId, color, and optional itemType */
|
|
6
|
-
toString: () => string;
|
|
7
|
-
groupId: Guid;
|
|
8
|
-
color: string;
|
|
9
|
-
/** Optional item type for local selection which will be split by type */
|
|
10
|
-
itemType?: GlobalSelectionItemType;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Badge with its associated group key for visibility filtering.
|
|
14
|
-
*/
|
|
15
|
-
export interface BadgeWithGroup {
|
|
16
|
-
badge: Badge;
|
|
17
|
-
/** The group key this badge belongs to, for visibility filtering */
|
|
18
|
-
groupKey: GroupKey;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* A group of badges that share the same selection color.
|
|
22
|
-
*/
|
|
23
|
-
export interface SelectionColorGroup {
|
|
24
|
-
selectionColor: string;
|
|
25
|
-
badgesWithGroups: BadgeWithGroup[];
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* A color-grouped marker variant.
|
|
29
|
-
* Contains badges of the same color, each tracking its own group for filtering.
|
|
30
|
-
*/
|
|
31
|
-
export interface ColorGroupedMarker extends Marker {
|
|
32
|
-
/** Color-based key for this marker variant.
|
|
33
|
-
* We could use Marker.getHighlightColor() here, but using a key allows for future flexibility only related to PDF rendering.*/
|
|
34
|
-
getColorKey: () => string;
|
|
35
|
-
/** Badges with their group info for filtering */
|
|
36
|
-
badgesWithGroups: BadgeWithGroup[];
|
|
37
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ColorGroupedMarker } from '../components/pdfMarkers/utils/splitMarkerByColor.types';
|
|
2
|
-
import { Marker } from '../types/legendMarkerBadge.type';
|
|
3
|
-
import { LegendId } from '../types/legendType';
|
|
4
|
-
/**
|
|
5
|
-
* Processes a marker and groups them by color, filtering badges by hidden groups.
|
|
6
|
-
*
|
|
7
|
-
* This hook splits marker into variants based on badge color (not selection group),
|
|
8
|
-
* then filters individual badges based on whether their group is hidden.
|
|
9
|
-
*
|
|
10
|
-
* Rules:
|
|
11
|
-
* - marker are grouped by **color only**
|
|
12
|
-
* - Badges track their selection group for visibility filtering
|
|
13
|
-
* - When a group is hidden, badges from that group are filtered out
|
|
14
|
-
* - Marker variant hides only when ALL its badges are hidden
|
|
15
|
-
*
|
|
16
|
-
* @param args.legendId - The legend ID for UI state subscriptions
|
|
17
|
-
* @param args.marker - The marker to process (typically a single marker)
|
|
18
|
-
* @returns Array of color-grouped marker variants, or undefined if selection legend is disabled
|
|
19
|
-
*/
|
|
20
|
-
export declare const useGroupedMarkers: (args: {
|
|
21
|
-
legendId: LegendId;
|
|
22
|
-
marker?: Marker;
|
|
23
|
-
}) => ColorGroupedMarker[] | undefined;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SelectionGroup } from '../../globalSelection/selectionMenu/selectionTreeStore/selectionTree.store.types';
|
|
2
|
-
import { Marker } from '../types/legendMarkerBadge.type';
|
|
3
|
-
/**
|
|
4
|
-
* Gets all potential group keys a marker could generate.
|
|
5
|
-
* Used for per-marker hidden state subscriptions.
|
|
6
|
-
* @param marker - The marker to get group keys for
|
|
7
|
-
* @param itemToGroupsMap - Pre-built map of itemIdString -> selectionGroups - handled in store
|
|
8
|
-
*/
|
|
9
|
-
export declare const getPotentialGroupKeysForMarker: (marker: Marker, itemToGroupsMap: Map<string, SelectionGroup[]>) => string[];
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Marker } from '../../types/legendMarkerBadge.type';
|
|
2
|
-
import { LegendDataId, LegendId } from '../../types/legendType';
|
|
3
|
-
export interface UseLegendMarkerProps {
|
|
4
|
-
legendId: LegendId;
|
|
5
|
-
itemIds: LegendDataId[];
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Returns the visible marker for the given legendId and itemIds.
|
|
9
|
-
* If the legend is disabled or the marker is hidden, returns undefined.
|
|
10
|
-
*
|
|
11
|
-
* Performance optimization:
|
|
12
|
-
* Uses per-marker subscription to hidden state - only re-renders when THIS specific
|
|
13
|
-
* marker's visibility changes, not when any marker in the legend is hidden/shown.
|
|
14
|
-
*
|
|
15
|
-
* @param props.legendId - The legend to get the marker from
|
|
16
|
-
* @param props.itemIds - The item IDs to create the marker from
|
|
17
|
-
* @returns The marker if visible and legend is enabled, undefined otherwise
|
|
18
|
-
*/
|
|
19
|
-
export declare function useLegendMarker(props: UseLegendMarkerProps): Marker | undefined;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility functions for legend visible markers functionality.
|
|
3
|
-
*
|
|
4
|
-
* This module contains shared utilities, helper functions, and debugging tools
|
|
5
|
-
* used across the legend marker hooks.
|
|
6
|
-
*/
|
|
7
|
-
import { Marker } from '../../types/legendMarkerBadge.type';
|
|
8
|
-
import { LegendDataId, LegendId } from '../../types/legendType';
|
|
9
|
-
/**
|
|
10
|
-
* Development helper to track hook calls
|
|
11
|
-
*/
|
|
12
|
-
export declare const trackMarkerCallsInDevelopment: () => void;
|
|
13
|
-
/**
|
|
14
|
-
* Helper to get unique data from the legend visible data store
|
|
15
|
-
*/
|
|
16
|
-
export declare const useUniqueVisibleData: () => LegendDataId[];
|
|
17
|
-
/**
|
|
18
|
-
* Common logic for creating markers from data using strategy.
|
|
19
|
-
* Selection-based grouping is handled at the viewport rendering level.
|
|
20
|
-
*/
|
|
21
|
-
export declare const useCreateMarkers: (legendId: LegendId, data: LegendDataId[]) => ReadonlyArray<Marker>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Badge } from '../types/legendMarkerBadge.type';
|
|
2
|
-
import { LegendId } from '../types/legendType';
|
|
3
|
-
/**
|
|
4
|
-
* Returns all unique badges for the given legendId, determined by unique title + color.
|
|
5
|
-
* This will also return markers that are not visible on screen.
|
|
6
|
-
*/
|
|
7
|
-
export declare function useLegendUniqueBadges(legendId: LegendId): ReadonlyArray<Badge>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Marker } from '../types/legendMarkerBadge.type';
|
|
2
|
-
import { LegendId } from '../types/legendType';
|
|
3
|
-
/**
|
|
4
|
-
* Returns all unique markers for the given legendId, determined by unique displayKey (title + color).
|
|
5
|
-
* This will also return markers that are not visible on screen.
|
|
6
|
-
*/
|
|
7
|
-
export declare function useLegendUniqueMarkers(legendId: LegendId): ReadonlyArray<Marker>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { GlobalSelectionTypes } from '../../globalSelection/globalSelectionStore/globalSelectionStore.types';
|
|
2
|
-
import { Marker } from '../types/legendMarkerBadge.type';
|
|
3
|
-
/**
|
|
4
|
-
* Returns unique global-selection item ID strings from all badges on the marker.
|
|
5
|
-
* Non-selection items are filtered out since they
|
|
6
|
-
* don't exist in global selection and need no selection lookups.
|
|
7
|
-
*/
|
|
8
|
-
export declare const useUniqueSelectionOnlyBadgeIdStrings: (marker?: Marker) => GlobalSelectionTypes.ItemIdString[];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Marker } from '../../../types/legendMarkerBadge.type';
|
|
2
|
-
import { type LegendDataId } from '../../../types/legendType';
|
|
3
|
-
/**
|
|
4
|
-
* Creates notification markers from two sources:
|
|
5
|
-
* 1. Tag-based: fetches open notifications for selected tags
|
|
6
|
-
* 2. ID-based: fetches notification details by direct notification IDs
|
|
7
|
-
*
|
|
8
|
-
* Both sources are merged into a single marker array.
|
|
9
|
-
*/
|
|
10
|
-
export declare const useNotificationMarkers: (itemIds: ReadonlyArray<LegendDataId>) => ReadonlyArray<Marker>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Badge, Marker } from '../types/legendMarkerBadge.type';
|
|
2
|
-
import { LegendId } from '../types/legendType';
|
|
3
|
-
export declare function isHiddenMarker(marker: Marker, hiddenMarkers: ReadonlyArray<string>): boolean;
|
|
4
|
-
export declare function setHiddenMarker(marker: Marker, isHidden: boolean, legendId: LegendId): void;
|
|
5
|
-
export declare function isHiddenBadge(badge: Badge, hiddenBadges: ReadonlyArray<string>): boolean;
|
|
6
|
-
export declare function setHiddenBadge(badge: Badge, isHidden: boolean, legendId: LegendId): void;
|