@equinor/echo-framework 6.2.3 → 6.2.4

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 (19) hide show
  1. package/index.cjs.js +2 -2
  2. package/package.json +6 -6
  3. package/src/lib/components/prepview/panels/attachments/AttachmentTable.d.ts +1 -1
  4. package/src/lib/components/prepview/utils/index.d.ts +0 -1
  5. package/src/lib/feature/globalSelection/index.d.ts +2 -1
  6. package/src/lib/feature/legend/legendStrategies/iocAnnotationStrategy/hooks/useIocAnnotationMarkers.utils.d.ts +3 -3
  7. package/src/lib/feature/legend/legendStrategies/iocAnnotationStrategy/iocAnnotationStrategy.types.d.ts +1 -1
  8. package/src/lib/feature/legend/legendStrategies/iocAnnotationStrategy/utils/getColorForIocAnnotationLegendStatus.d.ts +2 -0
  9. package/src/lib/feature/legend/legendStrategies/iocAnnotationStrategy/utils/getIocAnnotationBadgesByPropertyName.d.ts +7 -0
  10. package/src/lib/feature/legend/legendStrategies/iocAnnotationStrategy/utils/getNotificationTypeColor.d.ts +8 -0
  11. package/src/lib/feature/legend/legendStrategies/iocAnnotationStrategy/utils/notificationType.utils.d.ts +3 -0
  12. package/src/lib/feature/legend/logic/legendDataId.utils.d.ts +3 -3
  13. package/src/lib/feature/legend/types/legendMarkerBadge.type.d.ts +1 -0
  14. package/src/lib/feature/legend/types/legendType.d.ts +3 -2
  15. package/src/lib/types/grid/bucketSideDrawer.types.d.ts +1 -1
  16. package/src/lib/utils/index.d.ts +0 -1
  17. package/src/lib/components/prepview/utils/date.d.ts +0 -5
  18. package/src/lib/feature/legend/legendStrategies/iocAnnotationStrategy/utils/getIocAnnotationTitlesByPropertyName.d.ts +0 -2
  19. package/src/lib/utils/formatTimeHelpers.d.ts +0 -1
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@equinor/echo-framework",
3
- "version": "6.2.3",
3
+ "version": "6.2.4",
4
4
  "peerDependencies": {
5
- "@equinor/echo-base": ">= 6.2.3 < 7.0.0",
6
- "@equinor/echo-components": ">= 6.2.3 < 7.0.0",
7
- "@equinor/echo-core": ">= 6.2.3 < 7.0.0",
8
- "@equinor/echo-search": ">= 6.2.3 < 7.0.0",
9
- "@equinor/echo-utils": ">= 6.2.3 < 7.0.0",
5
+ "@equinor/echo-base": ">= 6.2.4 < 7.0.0",
6
+ "@equinor/echo-components": ">= 6.2.4 < 7.0.0",
7
+ "@equinor/echo-core": ">= 6.2.4 < 7.0.0",
8
+ "@equinor/echo-search": ">= 6.2.4 < 7.0.0",
9
+ "@equinor/echo-utils": ">= 6.2.4 < 7.0.0",
10
10
  "@equinor/eds-core-react": "0.49.0",
11
11
  "@equinor/eds-icons": "0.22.0",
12
12
  "@equinor/eds-tokens": "2.1.0",
@@ -4,5 +4,5 @@ interface AttachmentTableProps {
4
4
  recordId: string;
5
5
  attachments: PrepviewAttachment[];
6
6
  }
7
- declare function AttachmentTable({ recordType, recordId, attachments, }: AttachmentTableProps): import("react").JSX.Element;
7
+ declare function AttachmentTable({ recordType, recordId, attachments }: AttachmentTableProps): import("react").JSX.Element;
8
8
  export { AttachmentTable };
@@ -1,4 +1,3 @@
1
- export * from './date';
2
1
  export * from './documents';
3
2
  export * from './enums';
4
3
  export * from './logger';
@@ -1,7 +1,8 @@
1
1
  export * from './globalSelectionStore/globalSelectionStore.types';
2
+ export type { AddItemArgs, AddItemsResponse, SelectionTreeActionResult } from './selectionMenu/selectionTreeStore/actions/selectionTree.action.types';
2
3
  export * from './selectionMenu/selectionTreeStore/selectionTree.api.types';
3
4
  export * from './selectionMenu/selectionTreeStore/selectionTree.store.types';
4
- export { PDMS_INTERNAL_TAG_TYPES, isPdmsInternalTagType } from './pdmsTag/pdmsTag.types';
5
+ export { isPdmsInternalTagType, PDMS_INTERNAL_TAG_TYPES } from './pdmsTag/pdmsTag.types';
5
6
  export type { PdmsInternalTagType, PdmsTagId, PdmsTagSummaryDto, StidTagId } from './pdmsTag/pdmsTag.types';
6
7
  export type { CoordinateData, CoordinateId } from './coordinate/coordinate.types';
7
8
  export { useAreAllItemsVisible } from './hooks/useAreAllItemsVisible';
@@ -1,5 +1,5 @@
1
1
  import type { RawItemAppearance, RawMarkerData } from '../../../types/legendMarkerBadge.type';
2
- import type { LegendBadgeOptionConfig } from '../../../types/legendType';
2
+ import type { LegendBadgeOptionConfig, LegendMarkerOptionConfig } from '../../../types/legendType';
3
3
  import { IocAnnotationDto, IocAnnotationFunctionalLocationLookup, IocAnnotationLegendStatus, IocAnnotationMarkerData, IocAnnotationMarkerDataByTagKey, IocAnnotationTagKey, IocAnnotationTagLookup } from '../iocAnnotationStrategy.types';
4
4
  /**
5
5
  * Maps an IOC annotation state code (e.g. `ow`, `ip`, `er`) to its corresponding `IocAnnotationState`.
@@ -14,6 +14,6 @@ export declare function buildIocAnnotationMarkerDataByTagKey({ iocAnnotations, f
14
14
  readonly iocAnnotations: ReadonlyArray<IocAnnotationDto>;
15
15
  readonly functionalLocationLookups: ReadonlyArray<IocAnnotationFunctionalLocationLookup>;
16
16
  }): IocAnnotationMarkerDataByTagKey;
17
- export declare function createIocAnnotationMarkers(markerData: IocAnnotationMarkerData, selectedBadgeOption: LegendBadgeOptionConfig): ReadonlyArray<RawMarkerData>;
18
- export declare const getIOCMarkerAppearances: (iocAnnotation: IocAnnotationDto) => ReadonlyArray<RawItemAppearance>;
17
+ export declare function createIocAnnotationMarkers(markerData: IocAnnotationMarkerData, selectedMarkerOption: LegendMarkerOptionConfig, selectedBadgeOption: LegendBadgeOptionConfig): ReadonlyArray<RawMarkerData>;
18
+ export declare const getIOCMarkerAppearances: (iocAnnotation: IocAnnotationDto, selectedMarkerOption: LegendMarkerOptionConfig) => ReadonlyArray<RawItemAppearance>;
19
19
  export declare const getIOCBadgeAppearances: (iocAnnotation: IocAnnotationDto, selectedBadgeOption: LegendBadgeOptionConfig) => ReadonlyArray<RawItemAppearance>;
@@ -8,7 +8,7 @@ export type FunctionalLocation = string;
8
8
  export type IocAnnotationTagKey = string;
9
9
  export type IocAnnotationMarkerOptions = 'status';
10
10
  type BadgeKeysFromIocAnnotationLegendData = Pick<IocAnnotationData, 'id'>;
11
- export type IocAnnotationBadgeOptions = keyof BadgeKeysFromIocAnnotationLegendData | 'count';
11
+ export type IocAnnotationBadgeOptions = keyof BadgeKeysFromIocAnnotationLegendData | 'count' | 'notificationType';
12
12
  export interface IocAnnotationTagLookup {
13
13
  readonly tagNo: TagNo;
14
14
  readonly instCode: InstCode;
@@ -0,0 +1,2 @@
1
+ import type { LegendOptionConfig } from '../../../types/legendType';
2
+ export declare const getColorForIocAnnotationLegendStatus: (title: string, selectedProperty: LegendOptionConfig) => string;
@@ -0,0 +1,7 @@
1
+ import type { LegendDataId } from '../../../types/legendType';
2
+ import type { IocAnnotationDto } from '../iocAnnotationStrategy.types';
3
+ export type IocAnnotationBadge = {
4
+ readonly title: string;
5
+ readonly itemId: LegendDataId | undefined;
6
+ };
7
+ export declare function getIocAnnotationBadgesByPropertyName(propertyName: string, iocAnnotation: IocAnnotationDto): ReadonlyArray<IocAnnotationBadge>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Resolves the color for a given notification type.
3
+ * Falls back to the default color if the notification type is not recognized.
4
+ *
5
+ * @param notificationType - The notification type identifier (M1-M9)
6
+ * @returns The color string (hex code or CSS variable) for the notification type
7
+ */
8
+ export declare function getColorForNotificationType(notificationType: string): string;
@@ -0,0 +1,3 @@
1
+ import { NotificationTypes } from '../../../../../types/notificationTypes';
2
+ export declare function isNotificationType(value: string): value is NotificationTypes;
3
+ export declare function normalizeNotificationType(notificationType: string): NotificationTypes | undefined;
@@ -30,10 +30,10 @@ export declare const selectionGuards: SelectionGuardMap;
30
30
  */
31
31
  export declare const isGlobalSelectionItemId: (id: LegendDataId) => id is GlobalSelectionLegendDataId;
32
32
  /**
33
- * Converts any LegendDataId to a stable, unique string.
33
+ * Converts any LegendDataId to a stable, human-readable string.
34
34
  * For global selection types this delegates to globalSelectionUtils.itemIdToString.
35
- * For non-selection types (e.g. notifications) it produces a prefixed string
36
- * that will never collide with global selection ID strings.
35
+ * For non-selection types (e.g. notifications, IOC annotations) this prefers
36
+ * dedicated conversion logic and falls back to joining object values.
37
37
  */
38
38
  export declare const dataIdToString: (id: LegendDataId) => LegendDataIdString;
39
39
  /**
@@ -3,6 +3,7 @@ import type { LegendDataId } from './legendType';
3
3
  export interface RawItemAppearance {
4
4
  readonly getTitle: () => string;
5
5
  readonly getColor: () => string;
6
+ readonly getItemId?: () => LegendDataId;
6
7
  }
7
8
  /**
8
9
  * Raw marker data from strategy. Contains the source information and marker data.
@@ -51,7 +51,7 @@ interface LegendOptionConfigBase<T = string> {
51
51
  readonly showChipsInViewportOnly?: boolean;
52
52
  }
53
53
  export type LegendMarkerOptionConfig<T = string> = LegendOptionConfigBase<T>;
54
- export type LegendBadgeColorMode = 'status' | 'marker';
54
+ export type LegendBadgeColorMode = 'marker';
55
55
  /**
56
56
  * Configuration for badge options. Badges can have display options to control
57
57
  * how badge text is rendered (displayName, id, or count).
@@ -59,8 +59,9 @@ export type LegendBadgeColorMode = 'status' | 'marker';
59
59
  export interface LegendBadgeOptionConfig<T = string> extends LegendOptionConfigBase<T> {
60
60
  readonly enableDisplayOptions?: boolean;
61
61
  readonly displayOption?: LegendOptionDisplayOption;
62
+ readonly displayOptionLabel?: string;
62
63
  /**
63
- * Controls how badge color is determined. 'status' uses the same status color resolver as markers, while 'marker' inherits the marker color.
64
+ * Controls how badge color is determined. 'marker' inherits the marker color.
64
65
  * When set to 'marker', the generic processRawBadges resolves badge color from marker appearances automatically.
65
66
  */
66
67
  readonly badgeColorMode?: LegendBadgeColorMode;
@@ -1,2 +1,2 @@
1
1
  export type BucketPanelKey = 'turnaround' | 'sharedWithMe' | 'project' | 'workOrders';
2
- export type BucketSourceKey = 'Turnaround grid' | 'Project grid' | 'Work Orders grid';
2
+ export type BucketSourceKey = 'Turnaround grid' | 'Project grid' | 'Work Orders grid' | 'Notifications grid';
@@ -2,7 +2,6 @@ export { fireAndForget } from './asyncUtils';
2
2
  export { getFileByProdViewCode } from './documentUtils';
3
3
  export { echopediaWebReactPortalUtils } from './echopediaWebReactPortal.utils';
4
4
  export * from './endDateStatus/getEndDateStatus';
5
- export * from './formatTimeHelpers';
6
5
  export * from './highlightTextUtil';
7
6
  export * from './navigationUtils';
8
7
  export * from './notification.utils';
@@ -1,5 +0,0 @@
1
- /**
2
- * Returns a date as a friendly readable string. If the date is undefined, it returns empty string.
3
- * @param date The date to convert to friendly string format.
4
- */
5
- export declare function dateToStringOrEmpty(date: Date | string | undefined): string;
@@ -1,2 +0,0 @@
1
- import type { IocAnnotationDto } from '../iocAnnotationStrategy.types';
2
- export declare function getIocAnnotationTitlesByPropertyName(propertyName: string, iocAnnotation: IocAnnotationDto): ReadonlyArray<string>;
@@ -1 +0,0 @@
1
- export declare function dateToStringOrEmptyWithoutTime(date: Date | string | undefined): string;