@equinor/echo-framework 0.26.7 → 0.26.9

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 (49) hide show
  1. package/index.cjs.js +3 -3
  2. package/package.json +9 -9
  3. package/src/index.d.ts +3 -0
  4. package/src/lib/__mocks__/mockedProjects.d.ts +16 -0
  5. package/src/lib/__mocks__/mockedTags.d.ts +5 -0
  6. package/src/lib/__mocks__/mockedWorkOrders.d.ts +4 -0
  7. package/src/lib/__mocks__/plants.d.ts +17 -0
  8. package/src/lib/components/echoLogo/echoLogo.d.ts +1 -0
  9. package/src/lib/components/fullScreenButtons/FullScreenModeButton.d.ts +8 -1
  10. package/src/lib/components/prepview/panels/objects/HorizontalObjects.d.ts +1 -1
  11. package/src/lib/components/prepview/panels/objects/Objects.d.ts +1 -1
  12. package/src/lib/feature/equipment/hooks/useOpenEquipmentDetails.d.ts +27 -4
  13. package/src/lib/feature/globalSelection/components/AddToSelectionMenuTrigger/AddToSelectionMenuItem.d.ts +8 -0
  14. package/src/lib/feature/globalSelection/components/AddToSelectionMenuTrigger/AddToSelectionMenuTrigger.d.ts +6 -0
  15. package/src/lib/feature/globalSelection/components/SelectionActionBar.d.ts +2 -3
  16. package/src/lib/feature/globalSelection/globalSelection.api.d.ts +10 -2
  17. package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.repository.d.ts +5 -2
  18. package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.types.d.ts +11 -5
  19. package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.utils.d.ts +3 -0
  20. package/src/lib/feature/globalSelection/index.d.ts +1 -0
  21. package/src/lib/feature/globalSelection/selectionMenu/hooks/useGlobalSelectionColorsSortedByFrequency.d.ts +2 -0
  22. package/src/lib/feature/globalSelection/selectionMenu/hooks/useMoveSelectionTreeItems.d.ts +10 -0
  23. package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/actions/selectionTree.action.types.d.ts +7 -2
  24. package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/selectionTree.store.types.d.ts +11 -2
  25. package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/selectionTree.store.utils.d.ts +13 -2
  26. package/src/lib/feature/legend/components/pdfMarkers/subComponents/MultipleMarkersByLegends.d.ts +8 -12
  27. package/src/lib/feature/legend/components/pdfMarkers/subComponents/components/PopoverLoading.d.ts +2 -0
  28. package/src/lib/feature/legend/components/pdfMarkers/subComponents/hooks/usePopoverHandler.d.ts +7 -0
  29. package/src/lib/feature/legend/components/popover/LegendPopoverContent.d.ts +1 -0
  30. package/src/lib/feature/legend/types/legendStrategy.type.d.ts +7 -2
  31. package/src/lib/feature/measuringPoint/components/measuringPointDetails/measuringPointHistoryList/hooks/useMeasuringChartConfig.d.ts +1 -1
  32. package/src/lib/feature/measuringPoint/hooks/useOpenMeasuringPointDetails.d.ts +25 -2
  33. package/src/lib/feature/workOrder/components/WorkOrderPanelSafeX/WorkOrderPanelSafeX.d.ts +5 -0
  34. package/src/lib/feature/workOrder/components/WorkOrderPanelSafeX/api/api-prepview-workOrder-safetyCards.d.ts +6 -0
  35. package/src/lib/feature/workOrder/components/WorkOrderPanelSafeX/components/SSUListItem/SSUListItem.d.ts +6 -0
  36. package/src/lib/feature/workOrder/components/WorkOrderPanelSafeX/components/SSUListItem/SSUListItemMarker.d.ts +5 -0
  37. package/src/lib/feature/workOrder/components/WorkOrderPanelSafeX/hooks/usePrepviewWorkOrderSafetyCards.d.ts +6 -0
  38. package/src/lib/feature/workOrder/components/WorkOrderPanelSafeX/types/workOrder-safetyCards.d.ts +16 -0
  39. package/src/lib/hooks/hookLibrary.d.ts +20 -1
  40. package/src/lib/hooks/useOpenPrepview.d.ts +25 -0
  41. package/src/lib/icons/index.d.ts +13 -0
  42. package/src/lib/services/eventHubActions/toastActions.d.ts +1 -1
  43. package/src/lib/services/leftPanelNavigation/index.d.ts +1 -0
  44. package/src/lib/services/leftPanelNavigation/leftPanelNavigation.store.types.d.ts +0 -1
  45. package/src/lib/services/leftPanelNavigation/leftPanelNavigation.utils.d.ts +12 -0
  46. package/src/lib/types/dataAccess/dataAccessLinks.d.ts +34 -0
  47. package/src/lib/types/dataAccess/index.d.ts +1 -0
  48. package/src/lib/types/hookLibrary.d.ts +1 -0
  49. package/src/lib/utils/asyncUtils.d.ts +2 -0
@@ -0,0 +1,6 @@
1
+ import { PrepViewSafetyCard } from '../../types/workOrder-safetyCards';
2
+ interface SSUListItemProps {
3
+ readonly data: PrepViewSafetyCard;
4
+ }
5
+ export declare const SSUListItem: (props: SSUListItemProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,5 @@
1
+ interface SSUListItemMarkerProps {
2
+ readonly severity: number;
3
+ }
4
+ declare function SSUListItemMarker({ severity }: SSUListItemMarkerProps): import("react/jsx-runtime").JSX.Element;
5
+ export { SSUListItemMarker };
@@ -0,0 +1,6 @@
1
+ import { PrepViewSafetyCard } from '../types/workOrder-safetyCards';
2
+ export declare const usePrepviewWorkOrderSafetyCards: (workOrderId: string) => {
3
+ isLoading: boolean;
4
+ error: Error | null;
5
+ safetyCards?: PrepViewSafetyCard[];
6
+ };
@@ -0,0 +1,16 @@
1
+ export interface PrepViewSafetyCardDto {
2
+ title: string;
3
+ description?: string | null;
4
+ caseDate: string;
5
+ country?: string | null;
6
+ url?: string | null;
7
+ severity: number;
8
+ }
9
+ export interface PrepViewSafetyCard {
10
+ title: string;
11
+ description: string;
12
+ caseDate?: Date;
13
+ country: string;
14
+ url: string;
15
+ severity: number;
16
+ }
@@ -11,7 +11,26 @@ export declare enum RegisteredHookName {
11
11
  export declare const HookLibrary: Readonly<{
12
12
  /**
13
13
  * Hook for setting the selected tag application wide.
14
- * @returns {SetActiveTagNo}
14
+ *
15
+ * @param {SetActiveTagNoArgs | string} argsORtagNo - Arguments for setting the active tag and controlling tag details panel behavior.
16
+ * If you pass a string, it will be handled as the tagNo
17
+ * @property {string} argsORtagNo.tagNo - The tag number to activate and open details for.
18
+ * @property {TagItemContentTabsType} [argsORtagNo.activeTagTab] - The main tab to activate in the tag details panel (e.g., Info, History, etc.).
19
+ * @property {SubTabType} [argsORtagNo.activeTagSubTab] - The sub-tab to activate within the main tab, if applicable.
20
+ * @property {string} [argsORtagNo.instCode] - The installation code associated with the tag (for multi-installation contexts).
21
+ * @property {string} [argsORtagNo.activePanelKey] - The key of the panel to activate (if using multiple panels).
22
+ * @property {boolean} [argsORtagNo.keepLastNavigationItem] - If true, keeps the last navigation item in the breadcrumb/search flow.
23
+ * @property {boolean} [argsORtagNo.openInPanel] - If true, opens the tag details in a side panel instead of the main view.
24
+ * @property {boolean} [argsORtagNo.displayMessageOnItemNotFound] - If true, displays a message if the tag is not found.
25
+ * @property {boolean} [argsORtagNo.allowToggle] - If true, enables toggle mode (e.g., toggling selection or panel state).
26
+ * @property {boolean} [argsORtagNo.omitTagNoFromUrl] - If true, omits the tag number from the URL (used only by echo maps; planned for removal).
27
+ *
28
+ * @param {TagItemContentTabsType} [activeTagTab] - The active tab for the tag item.
29
+ * @param {SubTabType} [activeTagSubTab] - The active sub-tab for the tag item.
30
+ * @param {string} [instCode] - The installation code associated with the tag.
31
+ * @param {boolean} [openInPanel] - Whether to open the tag details in a panel.
32
+ * @param {boolean} [displayMessageOnItemNotFound] - Whether to display a message if the tag is not found.
33
+ * @returns {void}
15
34
  */
16
35
  useSetActiveTagNo: () => SetActiveTagNo;
17
36
  /**
@@ -1,3 +1,27 @@
1
+ /**
2
+ * Custom React hook that returns a function to open a "Prepview" panel with specified content and navigation state.
3
+ *
4
+ * This hook integrates with the panel management system and search hooks for MC and Comm packages.
5
+ * The returned function allows opening a panel with a "Prepview" component, handling toggling, navigation state,
6
+ * and package/tag click events.
7
+ *
8
+ * @returns A function that opens a "Prepview" panel with the provided input and options.
9
+ *
10
+ * @param args - The arguments for opening the Prepview panel.
11
+ * @param args.prepviewInput - Input object containing optional identifiers for the item to display:
12
+ * - `notificationId` (optional): The notification ID.
13
+ * - `workOrderId` (optional): The work order ID.
14
+ * - `punchId` (optional): The punch ID.
15
+ * - `instCode` (optional): The instrument code.
16
+ * @param args.panelKey - The key identifying the panel to open.
17
+ * @param args.keepLastNavigationItem - (optional) Whether to keep the last navigation item in the panel.
18
+ * @param args.allowToggle - (optional) If true, toggles the panel closed if the same item is already open.
19
+ *
20
+ * @remarks
21
+ * - At least one of `notificationId`, `workOrderId`, or `punchId` should be provided in `prepviewInput`.
22
+ * - Handles package and tag click events by invoking appropriate search or navigation actions.
23
+ * - If `allowToggle` is true and the item is already open in the panel, the panel will be closed.
24
+ */
1
25
  export declare function useOpenPrepview(): (args: {
2
26
  prepviewInput: {
3
27
  notificationId?: string;
@@ -7,4 +31,5 @@ export declare function useOpenPrepview(): (args: {
7
31
  };
8
32
  panelKey: string;
9
33
  keepLastNavigationItem?: boolean;
34
+ allowToggle?: boolean;
10
35
  }) => void;
@@ -0,0 +1,13 @@
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';
@@ -3,4 +3,4 @@ import { ToasterEvent } from './../../types/eventTypes/toasterEvent';
3
3
  * Emit a Toaster event on echo core eventHub with a specific payload.
4
4
  * @param {ToasterEvent} payload
5
5
  */
6
- export declare const displayToast: (payload: ToasterEvent) => void;
6
+ export declare function displayToast(payload: ToasterEvent): Promise<void>;
@@ -1,2 +1,3 @@
1
1
  export { getLeftPanelNavigationState } from './leftPanelNavigation.store';
2
+ export { isItemOpenInPanel } from './leftPanelNavigation.utils';
2
3
  export * from './leftPanelNavigation.store.types';
@@ -4,7 +4,6 @@ export type LeftPanelNavigationContent = {
4
4
  header?: ReactNode;
5
5
  subHeader?: ReactNode;
6
6
  itemId?: string;
7
- isOpen: boolean;
8
7
  };
9
8
  export interface LeftPanelNavigationStore {
10
9
  addContent: (args: {
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Determines whether a specific item is currently open in a given left panel.
3
+ *
4
+ * @param args - An object containing:
5
+ * - `itemId`: The unique identifier of the item to check.
6
+ * - `panelKey` (optional): The key of the panel to check. If not provided, defaults to `ECHO_CORE_SEARCH`.
7
+ * @returns `true` if the item with the specified `itemId` is the last item in the specified panel and the panel is currently active; otherwise, `false`.
8
+ */
9
+ export declare function isItemOpenInPanel(args: {
10
+ itemId: string;
11
+ panelKey: string;
12
+ }): boolean;
@@ -0,0 +1,34 @@
1
+ export declare const dataAccessLinks: {
2
+ Y0900: {
3
+ label: string;
4
+ url: string;
5
+ };
6
+ YT105: {
7
+ label: string;
8
+ url: string;
9
+ };
10
+ Y0018: {
11
+ label: string;
12
+ url: string;
13
+ };
14
+ YO017: {
15
+ label: string;
16
+ url: string;
17
+ };
18
+ UserAccessIOCSolutions: {
19
+ label: string;
20
+ url: string;
21
+ };
22
+ DataAccessIOCSolutions: {
23
+ label: string;
24
+ url: string;
25
+ };
26
+ STIDReadInternal: (plantName: string) => {
27
+ label: string;
28
+ url: string;
29
+ };
30
+ ProCoSys: (plantName: string) => {
31
+ label: string;
32
+ url: string;
33
+ };
34
+ };
@@ -0,0 +1 @@
1
+ export type { dataAccessLinks } from './dataAccessLinks';
@@ -7,6 +7,7 @@ export type SetActiveTagNo = (argsORtagNo: string | {
7
7
  keepLastNavigationItem?: boolean;
8
8
  openInPanel?: boolean;
9
9
  displayMessageOnItemNotFound?: boolean;
10
+ allowToggle?: boolean;
10
11
  omitTagNoFromUrl?: boolean;
11
12
  }, activeTagTab?: string, activeTagSubTab?: string, instCode?: string, openInPanel?: boolean, displayMessageOnItemNotFound?: boolean) => void;
12
13
  export type TagData = [(tagNo: string, instCode: string) => void];
@@ -8,4 +8,6 @@
8
8
  export declare function fireAndForget(asyncFunc: () => Promise<void>, options: {
9
9
  userFriendlyErrorMessage: string;
10
10
  displayToast?: boolean;
11
+ preAction?: () => void;
12
+ postAction?: () => void;
11
13
  }): void;