@equinor/echo-framework 3.0.0 → 4.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 (35) hide show
  1. package/c75f3f2bffe3eddf.png +0 -0
  2. package/index.cjs.js +3 -3
  3. package/package.json +9 -7
  4. package/src/index.d.ts +3 -0
  5. package/src/lib/components/appLauncherButton/AppLauncherButton.d.ts +13 -0
  6. package/src/lib/components/appLauncherButton/index.d.ts +2 -0
  7. package/src/lib/components/externalLinkButton/externalLinkButton.d.ts +5 -5
  8. package/src/lib/components/footer/{footer.d.ts → Footer.d.ts} +1 -1
  9. package/src/lib/components/footer/index.d.ts +1 -1
  10. package/src/lib/components/index.d.ts +1 -0
  11. package/src/lib/coreApplication/BarComponents/TopBarContent.d.ts +33 -3
  12. package/src/lib/coreApplication/EchoBarComponent.d.ts +1 -0
  13. package/src/lib/coreApplication/EchoUserInterfaceStore.d.ts +4 -3
  14. package/src/lib/coreApplication/index.d.ts +1 -0
  15. package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/selectionTree.api.types.d.ts +9 -6
  16. package/src/lib/feature/legend/components/selectionLegend/selectionLegendAnalytics.d.ts +4 -0
  17. package/src/lib/feature/legend/index.d.ts +1 -0
  18. package/src/lib/feature/legend/legendAnalytics.d.ts +7 -0
  19. package/src/lib/feature/legend/legendStrategies/legendCollections.d.ts +2 -2
  20. package/src/lib/feature/legend/legendStrategies/workOrderStrategy/CreateWorkOrderPopoverContent.d.ts +14 -0
  21. package/src/lib/feature/legend/legendStrategies/workOrderStrategy/components/WorkOrderPopoverContent.d.ts +16 -0
  22. package/src/lib/feature/legend/legendStrategies/workOrderStrategy/components/WorkOrderPopoverPrimaryRow.d.ts +15 -0
  23. package/src/lib/feature/legend/legendStrategies/workOrderStrategy/components/WorkOrderPopoverThirdRow.d.ts +16 -0
  24. package/src/lib/feature/legend/legendStrategies/workOrderStrategy/useCreateWorkOrderMarkers.d.ts +17 -0
  25. package/src/lib/feature/legend/legendStrategies/workOrderStrategy/workOrder.utils.d.ts +2 -0
  26. package/src/lib/feature/legend/legendStrategies/workOrderStrategy/workOrderPopover.types.d.ts +16 -0
  27. package/src/lib/feature/legend/logic/reloadPage.d.ts +7 -0
  28. package/src/lib/feature/legend/stores/initializeLegendInStores.d.ts +17 -2
  29. package/src/lib/feature/legend/stores/legendDataStore/legendStore.d.ts +5 -2
  30. package/src/lib/feature/legend/stores/legendUIStore/legendUIStore.d.ts +1 -0
  31. package/src/lib/icons/echoMapsIcon.d.ts +2 -0
  32. package/src/lib/services/echoViewService/loadEchoViewIdAndSelectionIdFromUrl.d.ts +6 -1
  33. package/src/lib/types/navigation/internalApplicationLinks.d.ts +0 -1
  34. package/src/lib/utils/endDateStatus/getEndDateStatus.d.ts +2 -0
  35. package/src/lib/utils/index.d.ts +1 -0
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "@equinor/echo-framework",
3
- "version": "3.0.0",
3
+ "version": "4.0.0",
4
4
  "peerDependencies": {
5
- "@equinor/echo-base": ">= 3.0.0 < 4.0.0",
6
- "@equinor/echo-components": ">= 3.0.0 < 4.0.0",
7
- "@equinor/echo-core": ">= 3.0.0 < 4.0.0",
8
- "@equinor/echo-search": ">= 3.0.0 < 4.0.0",
9
- "@equinor/echo-utils": ">= 3.0.0 < 4.0.0",
5
+ "@equinor/echo-base": ">= 4.0.0 < 5.0.0",
6
+ "@equinor/echo-components": ">= 4.0.0 < 5.0.0",
7
+ "@equinor/echo-core": ">= 4.0.0 < 5.0.0",
8
+ "@equinor/echo-search": ">= 4.0.0 < 5.0.0",
9
+ "@equinor/echo-utils": ">= 4.0.0 < 5.0.0",
10
10
  "@equinor/eds-core-react": "0.49.0",
11
11
  "@equinor/eds-icons": "0.22.0",
12
+ "@equinor/eds-tokens": "2.1.0",
12
13
  "react": ">= 17.0.2",
13
14
  "react-dom": ">= 17.0.2",
14
15
  "@tanstack/react-query": ">= 5.14.2 < 6",
@@ -18,7 +19,8 @@
18
19
  "react-router-dom": ">= 6.30.1 < 7",
19
20
  "zustand": ">= 4.4.7 < 5",
20
21
  "immer": "11.1.3",
21
- "msw": "2.12.7"
22
+ "msw": "2.12.7",
23
+ "date-fns": "4.1.0"
22
24
  },
23
25
  "dependencies": {
24
26
  "dexie": "4.2.1",
package/src/index.d.ts CHANGED
@@ -3,6 +3,8 @@ import './lib/globalStyles.css';
3
3
  import * as hooks from './lib/hooks';
4
4
  import { getPlantsInfo, getTagDetails } from './lib/services/api';
5
5
  export * from './lib/components';
6
+ export { AppLauncherButton } from './lib/components/appLauncherButton';
7
+ export type { AppLauncherButtonProps } from './lib/components/appLauncherButton';
6
8
  export { NotificationListItem } from './lib/components/notificationListItem';
7
9
  export type { NotificationListItemType } from './lib/components/notificationListItem';
8
10
  export { PrepviewButton } from './lib/components/prepviewButton/prepviewButton';
@@ -30,6 +32,7 @@ export * from './lib/feature/legend/index';
30
32
  export { legendVisibleTagsSubscribeToStore } from './lib/feature/legend/stores/legendVisibleDataAsTagsStore/legendVisibleDataAsTagsStore';
31
33
  export { knownLegendIds } from './lib/feature/legend/types/legendType';
32
34
  export type { LegendDataId, LegendEquipmentId, LegendId, LegendState, LegendTagId } from './lib/feature/legend/types/legendType';
35
+ export { echoMapsIcon } from './lib/icons/echoMapsIcon';
33
36
  export type { Brand } from '@equinor/echo-utils';
34
37
  export { NewLegendToggler } from './lib/feature/legend/components/NewLegendToggler';
35
38
  export { newLegendFeatureFlag } from './lib/feature/legend/logic/newLegendFeatureFlag';
@@ -0,0 +1,13 @@
1
+ import type { ButtonProps } from '@equinor/eds-core-react';
2
+ export type AppLauncherButtonProps = {
3
+ readonly icon: React.ReactNode;
4
+ readonly label: string;
5
+ readonly tooltip?: string;
6
+ readonly allowIconHoverFill?: boolean;
7
+ } & Omit<ButtonProps, 'children'>;
8
+ export declare const AppLauncherButton: import("react").ForwardRefExoticComponent<{
9
+ readonly icon: React.ReactNode;
10
+ readonly label: string;
11
+ readonly tooltip?: string;
12
+ readonly allowIconHoverFill?: boolean;
13
+ } & Omit<ButtonProps, "children"> & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,2 @@
1
+ export { AppLauncherButton } from './AppLauncherButton';
2
+ export type { AppLauncherButtonProps } from './AppLauncherButton';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  type ExternalLinkButtonProps = AsyncButtonProps | SyncButtonProps;
3
2
  type AsyncButtonProps = BaseProps & {
4
3
  linkTo?: never;
@@ -8,7 +7,7 @@ type SyncButtonProps = BaseProps & {
8
7
  linkTo: string;
9
8
  getUrlToOpen?: never;
10
9
  };
11
- type ButtonIcon = 'Fusion' | 'TR2000' | 'ProCoSys' | 'PermitVision' | 'Stid' | 'VivaEngage' | '3DModel' | 'Tag' | 'Launch' | 'Media' | 'McApp' | 'CommApp' | 'Sap' | 'Semi' | 'SafeX' | 'TrendingApp' | 'ConditionAdviser' | 'Satos' | 'GoToApp' | 'Tr2000' | 'Notification' | 'WorkOrder' | 'Robim' | 'Ayelix';
10
+ type ButtonIcon = 'Fusion' | 'TR2000' | 'ProCoSys' | 'PermitVision' | 'Stid' | 'VivaEngage' | '3DModel' | 'Tag' | 'Launch' | 'Media' | 'McApp' | 'CommApp' | 'Sap' | 'Semi' | 'SafeX' | 'TrendingApp' | 'ConditionAdviser' | 'Satos' | 'GoToApp' | 'Tr2000' | 'Notification' | 'WorkOrder' | 'Robim' | 'Ayelix' | 'EchoMaps' | 'Eqhub';
12
11
  type ButtonIconBackwardCompatible = ButtonIcon | 'Yammer';
13
12
  type BaseProps = {
14
13
  buttonName: string;
@@ -23,7 +22,8 @@ type BaseProps = {
23
22
  export declare enum ExternalLinkButtonStyle {
24
23
  Rounded = "Rounded",
25
24
  Large = "Large",
26
- MenuItem = "MenuItem"
25
+ MenuItem = "MenuItem",
26
+ AppLauncher = "AppLauncher"
27
27
  }
28
28
  /**
29
29
  *
@@ -39,7 +39,7 @@ export declare enum ExternalLinkButtonStyle {
39
39
  * @param {boolean} props.disabledColor Optional. If set to `true`, the button will show disabled color. (If not Rounded button style is used)
40
40
  * @param {boolean} props.disabledButton Optional.
41
41
  * @param {string} props.hoverText Optional. Applies only if Rounded button style is applied.
42
- * @returns {React.FC<ExternalLinkButtonProps>} React component.
42
+ * @returns {JSX.Element} React component.
43
43
  */
44
- export declare const ExternalLinkButton: React.FC<ExternalLinkButtonProps>;
44
+ export declare const ExternalLinkButton: ({ buttonName, buttonIcon, linkTo, hideText, redirect, buttonStyle, getUrlToOpen, disabledColor, disabledButton, hoverText }: ExternalLinkButtonProps) => JSX.Element;
45
45
  export default ExternalLinkButton;
@@ -4,7 +4,7 @@ export declare enum FooterType {
4
4
  termOfService = "tos"
5
5
  }
6
6
  interface FooterProps {
7
- footerType?: FooterType;
7
+ readonly footerType?: FooterType;
8
8
  }
9
9
  export declare const Footer: React.FC<FooterProps>;
10
10
  export {};
@@ -1 +1 @@
1
- export * from './footer';
1
+ export * from './Footer';
@@ -1,3 +1,4 @@
1
+ export * from './appLauncherButton';
1
2
  export * from './appLinks';
2
3
  export * from './containers';
3
4
  export * from './contextualAppLinks/externalLinkButtons/index';
@@ -1,5 +1,35 @@
1
1
  import { FunctionComponent } from 'react';
2
- export interface TopBarProps {
3
- topBarItems: FunctionComponent[];
2
+ import type { MenuProps } from '@equinor/eds-core-react';
3
+ /**
4
+ * Type-safe function component that requires a displayName property.
5
+ *
6
+ * This ensures stable React keys without relying on:
7
+ * - `Component.name` (gets minified to single letters in production)
8
+ * - Array index (unstable during reordering)
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * export const MyPanel: TopBarComponent = () => {
13
+ * return <Button>My Panel</Button>;
14
+ * };
15
+ * MyPanel.displayName = 'MyPanel';
16
+ * ```
17
+ *
18
+ * @remarks
19
+ * Components without displayName will fall back to component.name with a dev warning,
20
+ * but this is unreliable in production builds due to minification.
21
+ */
22
+ export type TopBarComponent = FunctionComponent & {
23
+ displayName: string;
24
+ };
25
+ export interface TopBarToolbarBaseProps {
26
+ topBarItems: (TopBarComponent | FunctionComponent)[];
4
27
  }
5
- export declare const TopBarButtons: FunctionComponent<TopBarProps>;
28
+ export interface TopBarToolbarProps extends TopBarToolbarBaseProps {
29
+ asMenu?: false;
30
+ }
31
+ export interface TopBarMenuProps extends TopBarToolbarBaseProps, Omit<MenuProps, 'children'> {
32
+ asMenu: true;
33
+ }
34
+ export type TopBarButtonsProps = TopBarToolbarProps | TopBarMenuProps;
35
+ export declare const TopBarButtons: FunctionComponent<TopBarButtonsProps>;
@@ -4,6 +4,7 @@ interface EchoBottomBarProps {
4
4
  isFullScreenModeEnabled: boolean;
5
5
  activeAppMenuItem: string;
6
6
  updateActiveAppMenuItem: (newActiveAppMenuItem: string) => void;
7
+ screenOrientation: 'landscape' | 'portrait';
7
8
  }
8
9
  export declare const EchoBarComponent: React.FC<EchoBottomBarProps>;
9
10
  declare const _default: React.NamedExoticComponent<EchoBottomBarProps>;
@@ -1,18 +1,19 @@
1
- import { FunctionComponent } from 'react';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { TopBarComponent } from './BarComponents/TopBarContent';
2
3
  import * as zustand from 'zustand';
3
4
  export type ProfileSettingsScrollTarget = 'dataAccess' | undefined;
4
5
  export interface EchoUiState {
5
6
  activeAppMenuItem: string;
6
7
  isLegendActive: boolean | undefined;
7
8
  activeTopMenuItem: string;
8
- activeTopMenuComponents: FunctionComponent[];
9
+ activeTopMenuComponents: (TopBarComponent | FunctionComponent)[];
9
10
  moduleName: string;
10
11
  isDataAccessSettingsExpanded: boolean;
11
12
  profileSettingsScrollTarget: ProfileSettingsScrollTarget;
12
13
  updateActiveAppMenuItem: (newActiveAppMenuItem: string) => void;
13
14
  updateIsLegendActive: (isLegendActive: boolean) => void;
14
15
  updateActiveTopMenuItem: (newActiveTopMenuItem: string) => void;
15
- updateActiveTopMenuComponents: (newActiveTopMenuComponents: FunctionComponent[]) => void;
16
+ updateActiveTopMenuComponents: (newActiveTopMenuComponents: (TopBarComponent | FunctionComponent)[]) => void;
16
17
  updateModuleName: (newModuleName: string) => void;
17
18
  updateIsDataAccessSettingsExpanded: (isDataAccessSettingsExpanded: boolean) => void;
18
19
  updateProfileSettingsScrollTarget: (scrollTarget: ProfileSettingsScrollTarget) => void;
@@ -1,3 +1,4 @@
1
+ export type { TopBarComponent } from './BarComponents/TopBarContent';
1
2
  export * from './EchoBarComponent';
2
3
  export * from './EchoContent';
3
4
  export * from './EchoContentPanels';
@@ -1,21 +1,24 @@
1
1
  import { Guid } from '@equinor/echo-utils';
2
- import { GlobalSelectionItemType, GlobalSelectionMetaData, SelectionItemTypeToItemIdMap } from '../../globalSelectionStore/globalSelectionStore.types';
2
+ import { GlobalSelectionItemType, SelectionItemTypeToItemIdMap } from '../../globalSelectionStore/globalSelectionStore.types';
3
3
  export type ApiSelectionTreeItemId = SelectionItemTypeToItemIdMap[GlobalSelectionItemType];
4
- export type ApiGlobalSelectionMetaData = Partial<Pick<GlobalSelectionMetaData, 'color' | 'isHiddenByUser'>>;
4
+ export interface ApiGlobalSelectionMetaData {
5
+ readonly color: string | undefined;
6
+ readonly isHiddenByUser: boolean | undefined;
7
+ }
5
8
  export interface ApiSelectionTreeRootBase {
6
- data: ApiSelectionGroup[];
9
+ readonly data: ApiSelectionGroup[];
7
10
  /**
8
11
  * Short is used by 3rd party apps, it should not be visible/selectable by user
9
12
  * Long will show up in recent sessions in UI.
10
13
  */
11
- lifetime: 'Short' | 'Long';
14
+ readonly lifetime: 'Short' | 'Long';
12
15
  }
13
16
  /**
14
17
  * Represents the root of the selection tree in the API.
15
18
  */
16
19
  export interface ApiSelectionTreeRoot extends ApiSelectionTreeRootBase {
17
- id: Guid;
18
- versionNo: string;
20
+ readonly id: Guid;
21
+ readonly versionNo: string;
19
22
  }
20
23
  export interface ApiSelectionGroup {
21
24
  readonly groupId: Guid;
@@ -0,0 +1,4 @@
1
+ import type { MarkersOutsideSelectionVisibility } from '../../stores/legendUIStore/legendUIStore.types';
2
+ export declare function trackEventSelectionLegendGroupToggled(groupId: string, isHidden: boolean): void;
3
+ export declare function trackEventSelectionLegendMarkersOutsideSelectionVisibility(visibility: MarkersOutsideSelectionVisibility): void;
4
+ export declare function trackEventSelectionLegendHighlightVisibilityChanged(isVisible: boolean): void;
@@ -6,6 +6,7 @@ export { PositionalItem } from './components/pdfMarkers/PositionalItem';
6
6
  export { MultipleMarkersByLegends } from './components/pdfMarkers/subComponents/MultipleMarkersByLegends';
7
7
  export { LegendPopoverContent } from './components/popover/LegendPopoverContent';
8
8
  export type { LegendPopoverContentProps, LegendPopoverTertiaryLabels } from './components/popover/LegendPopoverContent';
9
+ export { trackEventNewLegendAccordionToggled, trackEventNewLegendSelectedBadgeOptionChanged, trackEventNewLegendSelectedMarkerOptionChanged } from './legendAnalytics';
9
10
  export { legendFacade } from './legendFacade';
10
11
  export { getLegendStrategy } from './legendStrategies/legendCollections';
11
12
  export { legendSnapShot } from './stores/legendDataStore/legendStore';
@@ -0,0 +1,7 @@
1
+ import type { MarkerId } from './components/pdfMarkers/utils/markerId.utils';
2
+ import type { LegendId, LegendState } from './types/legendType';
3
+ export declare const LEGEND_OBJECT_NAME = "Legend";
4
+ export declare function trackEventNewLegendSelectedMarkerOptionChanged(legendId: LegendId, legendState: LegendState): void;
5
+ export declare function trackEventNewLegendSelectedBadgeOptionChanged(legendId: LegendId, legendState: LegendState): void;
6
+ export declare function trackEventNewLegendActivePopoverChanged(activePopover: MarkerId | undefined): void;
7
+ export declare function trackEventNewLegendAccordionToggled(legendId: LegendId, isExpanded: boolean): void;
@@ -1,4 +1,4 @@
1
+ import { type InitialValues } from '../stores/initializeLegendInStores';
1
2
  import { LegendStrategy } from '../types/legendStrategy.type';
2
- import { LegendState } from '../types/legendType';
3
- export declare function injectLegendStrategy(strategy: LegendStrategy, initialValues: Partial<LegendState>): void;
3
+ export declare function injectLegendStrategy(strategy: LegendStrategy, initialValues: InitialValues): void;
4
4
  export declare function getLegendStrategy(strategyTypeName: string): LegendStrategy;
@@ -0,0 +1,14 @@
1
+ import { GlobalSelectionTypes } from '../../../globalSelection';
2
+ import { LegendDataId } from '../../types/legendType';
3
+ /**
4
+ * Creates popover content for a work order legend item.
5
+ *
6
+ * Fetches work orders based on the provided `legendDataId` and the current `itemIds` filter.
7
+ * If work orders are found, returns a list of `WorkOrderPopoverContent` elements (one per work order).
8
+ * Otherwise, returns a fallback `LegendPopoverContent` indicating an unknown work order.
9
+ *
10
+ * @param legendDataId - Legend identifier payload (e.g. tag id or work order id) used to resolve work orders.
11
+ * @param itemIds - Selected item ids used to filter which work orders should be shown in the popover.
12
+ * @returns A JSX element array when work orders are found, otherwise a single fallback JSX element.
13
+ */
14
+ export declare function createPopoverContent(legendDataId: LegendDataId, itemIds: ReadonlyArray<GlobalSelectionTypes.ItemId>): Promise<JSX.Element | JSX.Element[]>;
@@ -0,0 +1,16 @@
1
+ import { WorkOrderPopover } from '../workOrderPopover.types';
2
+ /**
3
+ * Renders the popover content for a single work order entry in the legend UI.
4
+ *
5
+ * Displays a primary row with the work order number (with leading zeros removed) and active state,
6
+ * plus description and a tertiary row with additional work order metadata.
7
+ *
8
+ * When the popover is clicked, it opens the work order details panel for the given work order.
9
+ *
10
+ * @param props \- Component props.
11
+ * @param props.wo \- Work order data used to populate the popover content.
12
+ * @returns A `LegendPopoverContent` element configured for the work order legend.
13
+ */
14
+ export declare const WorkOrderPopoverContent: ({ wo }: {
15
+ wo: WorkOrderPopover;
16
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Renders the primary (first) row of the Work Order popover.
3
+ *
4
+ * Displays the work order number, an active/completed status label, and (if present)
5
+ * a list of unique notification type identifiers resolved for the work order.
6
+ *
7
+ * @param props \- Component props.
8
+ * @param props.workOrderNumber \- Work order identifier used for display and for fetching related objects.
9
+ * @param props.isActive \- Whether the work order is active \(`true`\) or completed \(`false`\).
10
+ * @returns A React element containing the primary row content.
11
+ */
12
+ export declare const WorkOrderPopoverPrimaryRow: ({ workOrderNumber, isActive }: {
13
+ workOrderNumber: string;
14
+ isActive: boolean;
15
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Renders the 3rd row in the Work Order popover (plant, work center, and finish date).
3
+ *
4
+ * @param props \- Component props.
5
+ * @param props.plantNo \- The plant identifier/number to display.
6
+ * @param props.workCenter \- The work center identifier to display.
7
+ * @param props.basicFinishDateTime \- Optional planned/basic finish date/time for the work order.
8
+ * @param props.basicFinishDateStatus \- Optional status label associated with the finish date (e.g. overdue, upcoming).
9
+ * @returns A React element containing the 3rd row content.
10
+ */
11
+ export declare const WorkOrderPopoverThirdRow: ({ plantNo, workCenter, basicFinishDateTime, basicFinishDateStatus }: {
12
+ plantNo: string;
13
+ workCenter: string;
14
+ basicFinishDateTime: Date | undefined;
15
+ basicFinishDateStatus: string | undefined;
16
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { LegendDataId } from '../../types/legendType';
2
+ import { Marker } from '../../types/legendMarkerBadge.type';
3
+ /**
4
+ * Creates legend markers for work orders grouped by `tagId`.
5
+ *
6
+ * The hook:
7
+ * \- filters `itemIds` to tag selections,
8
+ * \- searches work orders by `tagNo`,
9
+ * \- groups results by `tagId`,
10
+ * \- maps each group to a purple marker with orange badges (one per work order).
11
+ *
12
+ * Badge titles are derived from `workOrderId` using `removeLeadingZeros`.
13
+ *
14
+ * @param itemIds \- Current legend selection ids.
15
+ * @returns An array of `Marker` objects, or an empty array when no data is available.
16
+ */
17
+ export declare const useCreateWorkOrderMarkers: (itemIds: ReadonlyArray<LegendDataId>) => readonly Marker[];
@@ -0,0 +1,2 @@
1
+ import { PopoverProps, WorkOrderPopover } from './workOrderPopover.types';
2
+ export declare function fetchWorkOrdersByLegendIdType({ legendDataId, itemIds }: PopoverProps): Promise<WorkOrderPopover[] | undefined>;
@@ -0,0 +1,16 @@
1
+ import { LegendDataId } from '../../types/legendType';
2
+ import { GlobalSelectionTypes } from '../../../globalSelection';
3
+ export type PopoverProps = {
4
+ legendDataId: LegendDataId;
5
+ itemIds?: ReadonlyArray<GlobalSelectionTypes.ItemId>;
6
+ };
7
+ export interface WorkOrderPopover {
8
+ workOrderId: string;
9
+ isActive: boolean;
10
+ orderTypeId: string;
11
+ description: string;
12
+ plantNo: string;
13
+ workCenter: string;
14
+ basicFinishDateTime: Date | undefined;
15
+ basicFinishDateStatus: string | undefined;
16
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Had to move this simple reload function so that it can be mocked in tests without mocking the entire location object,
3
+ * which caused issues with jsdom and test execution.
4
+ * By placing it in its own module, we can easily mock it in our tests without affecting other parts of the environment.
5
+ * This also ensures that we dont get console errors about jsdom not implementing location.reload when we mock it in our tests.
6
+ */
7
+ export declare function reloadPage(): void;
@@ -1,2 +1,17 @@
1
- import { LegendId } from '../types/legendType';
2
- export declare const initializeLegendInStores: (legendId: LegendId) => void;
1
+ import type { LegendStrategy } from '../types/legendStrategy.type';
2
+ import type { LegendOptionConfig } from '../types/legendType';
3
+ export interface InitialValues {
4
+ readonly isEnabled?: boolean;
5
+ readonly selectedMarkerOption?: LegendOptionConfig;
6
+ readonly selectedBadgeOption?: LegendOptionConfig;
7
+ readonly selectedBadgeTextOptions?: Record<string, string>;
8
+ }
9
+ /**
10
+ * Ensures that a legend exists in all relevant stores. If the legend already exists,
11
+ * it will not be re-initialized. This function initializes the legend in both the legend data store
12
+ * and the legend UI store with the provided initial values.
13
+ *
14
+ * @param strategy - The legend strategy to initialize in the stores.
15
+ * @param initialValues - The initial values to use for initializing the legend in the stores.
16
+ */
17
+ export declare const initializeLegendInStores: (strategy: LegendStrategy, initialValues?: InitialValues) => void;
@@ -4,11 +4,14 @@ export interface LegendStoreData {
4
4
  legends: LegendsDictionary;
5
5
  }
6
6
  export interface LegendStoreActions {
7
- updateLegend: (legendId: LegendId, updates: Partial<Omit<LegendState, 'isLoading'>>) => void;
8
7
  startLoading: (legendId: LegendId) => void;
9
8
  finishLoading: (legendId: LegendId) => void;
10
9
  getLegendById: (legendId: LegendId) => LegendState | undefined;
11
- initializeLegendInStore: (legendId: LegendId) => void;
10
+ initializeLegendInStore: (legendId: LegendId, initialValues?: Partial<LegendState>) => void;
11
+ setIsEnabled: (legendId: LegendId, isEnabled: boolean) => void;
12
+ setSelectedMarkerOption: (legendId: LegendId, option: LegendState['selectedMarkerOption']) => void;
13
+ setSelectedBadgeOption: (legendId: LegendId, option: LegendState['selectedBadgeOption']) => void;
14
+ setSelectedBadgeTextOptions: (legendId: LegendId, options: LegendState['selectedBadgeTextOptions']) => void;
12
15
  }
13
16
  type LegendStore = LegendStoreData & LegendStoreActions;
14
17
  /**
@@ -35,3 +35,4 @@ export declare function legendExistsInLegendUIStore(legendId: LegendId): boolean
35
35
  * @internal - Exported for testing purposes only
36
36
  */
37
37
  export declare function toggleItemInArray(array: string[], item: string, isHidden: boolean): void;
38
+ export declare function legendUIStoreSnapshot(): LegendUIStore;
@@ -0,0 +1,2 @@
1
+ import type { IconData } from '@equinor/eds-icons';
2
+ export declare const echoMapsIcon: IconData;
@@ -3,5 +3,10 @@ import { Guid } from '@equinor/echo-utils';
3
3
  * Load echo view from url with or without echo selection
4
4
  * Or load only echo selection from url
5
5
  */
6
- export declare function loadEchoViewIdAndSelectionIdFromUrl(selectionId: Guid | undefined, echoViewId: Guid | undefined): Promise<boolean>;
6
+ interface LoadEchoViewParams {
7
+ readonly selectionIdFromUrl: Guid | undefined;
8
+ readonly echoViewId: Guid | undefined;
9
+ }
10
+ export declare function loadEchoViewIdAndSelectionIdFromUrl({ selectionIdFromUrl, echoViewId }: LoadEchoViewParams): Promise<boolean>;
7
11
  export declare function extractAndClearFromUrl(parameterName: string): string | undefined;
12
+ export {};
@@ -11,7 +11,6 @@ export declare enum InternalApplicationLinks {
11
11
  OfflineDocuments = "/OfflineDocuments",
12
12
  Viewer = "/viewer",
13
13
  Echo4Project = "/project",
14
- XLD = "/xld",
15
14
  SmartPortal = "/smartportal",
16
15
  EchoMaps = "/maps",
17
16
  Echo3dWeb = "/echo3d",
@@ -0,0 +1,2 @@
1
+ import { EndDateStatus } from '@equinor/echo-components';
2
+ export declare function getEndDateStatus(isCompleted: boolean, date?: Date): EndDateStatus;
@@ -1,5 +1,6 @@
1
1
  export { fireAndForget } from './asyncUtils';
2
2
  export { echopediaWebReactPortalUtils } from './echopediaWebReactPortal.utils';
3
+ export * from './endDateStatus/getEndDateStatus';
3
4
  export * from './formatTimeHelpers';
4
5
  export * from './highlightTextUtil';
5
6
  export * from './navigationUtils';