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

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 (57) hide show
  1. package/{47deeba42768c5d1.svg → 063009f06499d102.svg} +8 -8
  2. package/README.md +48 -48
  3. package/{1bd97dd2170d0f64.svg → f4c85313e79b1662.svg} +850 -850
  4. package/index.cjs.js +2 -15
  5. package/index.d.ts +2 -2
  6. package/package.json +12 -12
  7. package/src/lib/components/appLauncherButton/AppLauncherButton.d.ts +3 -6
  8. package/src/lib/components/contextualAppLinks/externalLinkButtons/iconButtonSpinner.d.ts +1 -1
  9. package/src/lib/components/errorBoundary/components/chunkLoadErrorMessage.d.ts +1 -1
  10. package/src/lib/components/errorBoundary/errorBoundary.d.ts +1 -1
  11. package/src/lib/components/externalLinkButton/externalLinkButton.d.ts +3 -2
  12. package/src/lib/components/lazyLoading/appLoadingIndicator.d.ts +2 -1
  13. package/src/lib/components/lazyLoading/lazyLoadedAppWrapper.d.ts +2 -2
  14. package/src/lib/components/listItemAdditionalInfoRow/listItemAdditionalInfoRow.d.ts +2 -2
  15. package/src/lib/components/pageMenu/defaultAccordionItem.d.ts +1 -1
  16. package/src/lib/components/plantSelector/index.d.ts +1 -0
  17. package/src/lib/components/plantSelector/plantSelector.d.ts +5 -14
  18. package/src/lib/components/plantSelector/plantSelector.hooks.d.ts +19 -0
  19. package/src/lib/components/prepview/Prepview.d.ts +1 -1
  20. package/src/lib/components/prepview/common/additionalInformation/WOAdditionalDetails.d.ts +1 -1
  21. package/src/lib/components/prepview/common/info/block/InfoBlock.d.ts +2 -2
  22. package/src/lib/components/prepview/common/info/description/DescriptionBlock.d.ts +1 -1
  23. package/src/lib/components/prepview/notification/Notification.d.ts +1 -1
  24. package/src/lib/components/prepview/notification/details/DetailsNotification.d.ts +1 -1
  25. package/src/lib/components/prepview/notification/header/NotificationHeader.d.ts +1 -1
  26. package/src/lib/components/prepview/panels/history/TagHistory.d.ts +1 -1
  27. package/src/lib/components/prepview/panels/history/TagHistoryGroup.d.ts +1 -1
  28. package/src/lib/components/prepview/punch/Punch.d.ts +1 -1
  29. package/src/lib/components/prepview/punch/details/Details.d.ts +1 -1
  30. package/src/lib/components/prepview/punch/header/Header.d.ts +1 -1
  31. package/src/lib/components/prepview/workorder/details/DetailsWorkOrder.d.ts +1 -1
  32. package/src/lib/components/prepview/workorder/header/WorkOrderHeader.d.ts +1 -1
  33. package/src/lib/components/realTimeData/RealTimePopoverButton.d.ts +1 -1
  34. package/src/lib/components/realTimeData/components/IMSDropdown/RealTimeIMSDropdown.d.ts +1 -1
  35. package/src/lib/components/realTimeData/components/connectorForIMSTag/RealTimeConnectorForIMSTag.d.ts +2 -1
  36. package/src/lib/components/searchListItem/searchListItem.d.ts +1 -1
  37. package/src/lib/components/tagNumber/tagNumber.d.ts +1 -1
  38. package/src/lib/components/tagSearchDropDown/tagSearchDropDown.d.ts +1 -1
  39. package/src/lib/components/workOrderListItem/components/WorkOrderHeaderDate.d.ts +1 -1
  40. package/src/lib/feature/equipment/components/equipmentLinkField/equipmentLinkField.d.ts +1 -1
  41. package/src/lib/feature/globalSelection/globalSelectionStore/actions/tagFetch.logic.d.ts +1 -1
  42. package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/colorConflictHandling/SelectionColorConflictDialog.d.ts +1 -1
  43. package/src/lib/feature/legend/components/legendTextSelector/LegendTextSelector.d.ts +1 -1
  44. package/src/lib/feature/legend/components/pdfMarkers/subComponents/LegendColoredMarkerIcon.d.ts +1 -1
  45. package/src/lib/feature/legend/components/pdfMarkers/subComponents/hooks/useMarkerPopover.d.ts +1 -1
  46. package/src/lib/feature/legend/hooks/useFetchNotificationsByWorkOrderId.d.ts +13 -0
  47. package/src/lib/feature/legend/hooks/useWorkOrdersByTagNos.d.ts +11 -0
  48. package/src/lib/feature/legend/hooks/useWorkOrdersByTagsQuery.d.ts +15 -0
  49. package/src/lib/feature/legend/index.d.ts +2 -0
  50. package/src/lib/feature/legend/legendStrategies/workOrderStrategy/CreateWorkOrderPopoverContent.d.ts +1 -1
  51. package/src/lib/feature/legend/legendStrategies/workOrderStrategy/components/WorkOrderPopoverPrimaryRow.d.ts +3 -3
  52. package/src/lib/feature/legend/legendStrategies/workOrderStrategy/workOrderPopover.types.d.ts +8 -8
  53. package/src/lib/feature/measuringPoint/components/lastRecordedMeasurement/lastRecordedMeasurement.logic.d.ts +3 -3
  54. package/src/lib/feature/openItemsIn3d/components/plantNoSelectionDialog/plantNoSelectionDialog.d.ts +1 -1
  55. package/src/lib/feature/workOrder/api/api-workOrder-notification.d.ts +12 -0
  56. package/src/lib/services/api/api-work-orders-by-tag-nos.d.ts +15 -0
  57. package/src/lib/feature/measuringPoint/components/lastRecordedMeasurement/lastRecordedMeasurement.d.ts +0 -8
package/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./src/index";
2
- export { default } from "./src/index";
1
+ export * from "./src\\index";
2
+ export { default } from "./src\\index";
package/package.json CHANGED
@@ -1,29 +1,29 @@
1
1
  {
2
2
  "name": "@equinor/echo-framework",
3
- "version": "4.1.0",
3
+ "version": "5.0.0-beta-r19",
4
4
  "peerDependencies": {
5
- "@equinor/echo-base": ">= 4.1.0 < 5.0.0",
6
- "@equinor/echo-components": ">= 4.1.0 < 5.0.0",
7
- "@equinor/echo-core": ">= 4.1.0 < 5.0.0",
8
- "@equinor/echo-search": ">= 4.1.0 < 5.0.0",
9
- "@equinor/echo-utils": ">= 4.1.0 < 5.0.0",
5
+ "@equinor/echo-base": "5.0.0-beta-r19",
6
+ "@equinor/echo-components": "5.0.0-beta-r19",
7
+ "@equinor/echo-core": "5.0.0-beta-r19",
8
+ "@equinor/echo-search": "5.0.0-beta-r19",
9
+ "@equinor/echo-utils": "5.0.0-beta-r19",
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",
13
- "react": ">= 17.0.2",
14
- "react-dom": ">= 17.0.2",
13
+ "react": ">= 19.2.4",
14
+ "react-dom": ">= 19.2.4",
15
15
  "@tanstack/react-query": ">= 5.14.2 < 6",
16
16
  "@microsoft/signalr": "9.0.6",
17
17
  "classnames": "2.5.1",
18
18
  "lodash": ">= 4.17.23 < 5",
19
- "react-router-dom": ">= 6.30.1 < 7",
19
+ "react-router-dom": ">= 6.30.3 < 7",
20
20
  "zustand": ">= 4.4.7 < 5",
21
- "immer": "11.1.3",
22
- "msw": "2.12.7",
21
+ "immer": ">= 11.1.4 < 12.0.0",
22
+ "msw": "2.12.10",
23
23
  "date-fns": "4.1.0"
24
24
  },
25
25
  "dependencies": {
26
- "dexie": "4.2.1",
26
+ "dexie": "4.3.0",
27
27
  "mark.js": "8.11.1",
28
28
  "ag-charts-community": "12.3.1",
29
29
  "ag-charts-react": "12.3.1",
@@ -1,13 +1,10 @@
1
1
  import type { ButtonProps } from '@equinor/eds-core-react';
2
+ import React from 'react';
2
3
  export type AppLauncherButtonProps = {
3
4
  readonly icon: React.ReactNode;
4
5
  readonly label: string;
5
6
  readonly tooltip?: string;
6
7
  readonly allowIconHoverFill?: boolean;
8
+ readonly ref?: React.Ref<HTMLButtonElement>;
7
9
  } & 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>>;
10
+ export declare const AppLauncherButton: ({ icon, label, tooltip, allowIconHoverFill, variant, ref, ...other }: AppLauncherButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -13,5 +13,5 @@ type SpinnerProps = {
13
13
  * @param {string} param.customClassNames.spinner Class name applied on the spinner.
14
14
  * @param {string} param.customClassNames.container Class name applied on the container element.
15
15
  */
16
- export declare const IconButtonSpinner: ({ customClassNames, size }: SpinnerProps) => JSX.Element;
16
+ export declare const IconButtonSpinner: ({ customClassNames, size }: SpinnerProps) => React.JSX.Element;
17
17
  export {};
@@ -1,5 +1,5 @@
1
1
  type Props = {
2
2
  error: Error | undefined;
3
3
  };
4
- export declare const ChunkLoadErrorMessage: ({ error }: Props) => JSX.Element;
4
+ export declare const ChunkLoadErrorMessage: ({ error }: Props) => React.JSX.Element;
5
5
  export {};
@@ -10,6 +10,6 @@ export interface ErrorBoundaryProps {
10
10
  export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
11
11
  constructor(props: Readonly<ErrorBoundaryProps>);
12
12
  componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
13
- render(): JSX.Element | ReactNode;
13
+ render(): React.JSX.Element | ReactNode;
14
14
  }
15
15
  export {};
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  type ExternalLinkButtonProps = AsyncButtonProps | SyncButtonProps;
2
3
  type AsyncButtonProps = BaseProps & {
3
4
  linkTo?: never;
@@ -39,7 +40,7 @@ export declare enum ExternalLinkButtonStyle {
39
40
  * @param {boolean} props.disabledColor Optional. If set to `true`, the button will show disabled color. (If not Rounded button style is used)
40
41
  * @param {boolean} props.disabledButton Optional.
41
42
  * @param {string} props.hoverText Optional. Applies only if Rounded button style is applied.
42
- * @returns {JSX.Element} React component.
43
+ * @returns {React.JSX.Element} React component.
43
44
  */
44
- export declare const ExternalLinkButton: ({ buttonName, buttonIcon, linkTo, hideText, redirect, buttonStyle, getUrlToOpen, disabledColor, disabledButton, hoverText }: ExternalLinkButtonProps) => JSX.Element;
45
+ export declare const ExternalLinkButton: ({ buttonName, buttonIcon, linkTo, hideText, redirect, buttonStyle, getUrlToOpen, disabledColor, disabledButton, hoverText }: ExternalLinkButtonProps) => React.JSX.Element;
45
46
  export default ExternalLinkButton;
@@ -1,5 +1,6 @@
1
+ import React from 'react';
1
2
  interface AppLoadingIndicatorProps {
2
3
  loadingText?: string;
3
4
  }
4
- export declare const AppLoadingIndicator: ({ loadingText }: AppLoadingIndicatorProps) => JSX.Element;
5
+ export declare const AppLoadingIndicator: ({ loadingText }: AppLoadingIndicatorProps) => React.JSX.Element;
5
6
  export {};
@@ -9,6 +9,6 @@ export interface LazyLoadedAppWrapperProps {
9
9
  * @param {LazyLoadedAppWrapperProps}
10
10
  * children: {React.ReactNode} The lazy loaded app you need to wrap.
11
11
  * loadingText: {string} The text to display under the Equinor logo. If not provided, it will default to "Loading application..."
12
- * @returns {JSX.Element}
12
+ * @returns {React.JSX.Element}
13
13
  */
14
- export declare const LazyLoadedAppWrapper: ({ children, loadingText }: LazyLoadedAppWrapperProps) => JSX.Element;
14
+ export declare const LazyLoadedAppWrapper: ({ children, loadingText }: LazyLoadedAppWrapperProps) => React.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  interface AdditionalInfoProps {
2
- leftHandInfo: JSX.Element;
3
- rightHandInfo?: JSX.Element;
2
+ leftHandInfo: React.JSX.Element;
3
+ rightHandInfo?: React.JSX.Element;
4
4
  }
5
5
  export declare const ListItemAdditionalInfoRow: React.FC<AdditionalInfoProps>;
6
6
  export {};
@@ -6,7 +6,7 @@ type DefaultAccordionItemProps = {
6
6
  subtitle?: string;
7
7
  iconName: string;
8
8
  iconTitle: string;
9
- children: React.ReactChild | React.ReactChild[];
9
+ children: React.ReactNode;
10
10
  };
11
11
  declare const DefaultAccordionItem: React.FC<DefaultAccordionItemProps>;
12
12
  export default DefaultAccordionItem;
@@ -1 +1,2 @@
1
1
  export * from './plantSelector';
2
+ export { usePlantSelector } from './plantSelector.hooks';
@@ -1,19 +1,10 @@
1
1
  import React from 'react';
2
- /**
3
- * Dropdown component for displaying a searchable plant selector.
4
- * @param {PlantSelectorProps} {
5
- * isDisabled: Flag which decides whether the dropdown should be disabled or not.
6
- * stayOnPath: Flag which decides if you should stay on your current path after selecting a plant.
7
- * textSize: Size of the text in the dropdown. Can be 'small', 'medium' or 'large'.
8
- * noneBackground: Flag which decides if the background of the dropdown should be transparent or not.
9
- * }
10
- * @return {*}
11
- */
12
2
  interface PlantSelectorProps {
13
- isDisabled?: boolean;
14
- stayOnPath?: boolean;
15
- textSize?: 'small' | 'medium' | 'large';
16
- noneBackground?: boolean;
3
+ readonly isDisabled?: boolean;
4
+ readonly stayOnPath?: boolean;
5
+ readonly textSize?: 'small' | 'medium' | 'large';
6
+ readonly noneBackground?: boolean;
7
+ readonly wrapperClassName?: string;
17
8
  }
18
9
  export declare const PlantSelector: React.FC<PlantSelectorProps>;
19
10
  export {};
@@ -0,0 +1,19 @@
1
+ import type { Plant } from '@equinor/echo-core';
2
+ interface UsePlantSelectorResult {
3
+ readonly plants: readonly Plant[];
4
+ readonly selectedPlant: Plant | undefined;
5
+ readonly selectedPlantText: string;
6
+ readonly isDisabled: boolean;
7
+ readonly changePlant: (plant: Plant) => void;
8
+ readonly filterPlant: (plant: Plant, inputValue: string) => boolean;
9
+ readonly formatPlantOptionText: (plantName: string, plantId: string | null) => string;
10
+ }
11
+ /**
12
+ * Common logic for plant selection, used by multiple components.
13
+ * Handles fetching plants, determining the selected plant,
14
+ * and managing plant-related state and actions.
15
+ */
16
+ export declare function usePlantSelector(options?: {
17
+ readonly stayOnPath: boolean;
18
+ } | undefined): UsePlantSelectorResult;
19
+ export {};
@@ -33,7 +33,7 @@ interface PrepviewProps {
33
33
  onEquipmentLocationClick?: (coordinates: Coordinates) => void;
34
34
  onEquipmentClick?: (equipment: WorkOrderEquipment) => void;
35
35
  }
36
- declare function Prepview(props: PrepviewProps): JSX.Element | null;
36
+ declare function Prepview(props: PrepviewProps): React.JSX.Element | null;
37
37
  export * from './types/shared';
38
38
  export { WorkItemType } from './utils';
39
39
  export { Prepview };
@@ -2,5 +2,5 @@ import type { WorkOrderDetails } from '../../types';
2
2
  interface Props {
3
3
  workOrderDetails?: WorkOrderDetails;
4
4
  }
5
- export declare function WOAdditionalDetails({ workOrderDetails }: Readonly<Props>): JSX.Element | null;
5
+ export declare function WOAdditionalDetails({ workOrderDetails }: Readonly<Props>): React.JSX.Element | null;
6
6
  export {};
@@ -2,8 +2,8 @@ interface InfoBlockType {
2
2
  label: string;
3
3
  stretched?: boolean;
4
4
  fit?: boolean;
5
- children: JSX.Element | string[] | string | number;
5
+ children: React.JSX.Element | string[] | string | number;
6
6
  contentClassName?: string;
7
7
  }
8
- export declare function InfoBlock({ label, stretched, fit, children, contentClassName }: Readonly<InfoBlockType>): JSX.Element;
8
+ export declare function InfoBlock({ label, stretched, fit, children, contentClassName }: Readonly<InfoBlockType>): React.JSX.Element;
9
9
  export {};
@@ -6,5 +6,5 @@ export interface Props {
6
6
  longText?: string;
7
7
  contentClassName?: string;
8
8
  }
9
- declare function DescriptionBlock({ itemId, itemType, shortText, longText, contentClassName, }: Props): JSX.Element;
9
+ declare function DescriptionBlock({ itemId, itemType, shortText, longText, contentClassName, }: Props): React.JSX.Element;
10
10
  export { DescriptionBlock };
@@ -2,5 +2,5 @@ interface NotificationProps {
2
2
  notificationId: string;
3
3
  headerAction?: React.ReactNode;
4
4
  }
5
- declare function Notification(props: NotificationProps): JSX.Element | null;
5
+ declare function Notification(props: NotificationProps): React.JSX.Element | null;
6
6
  export { Notification };
@@ -3,5 +3,5 @@ export interface Props {
3
3
  details: NotificationDetails;
4
4
  isLoading?: boolean;
5
5
  }
6
- declare function DetailsNotification({ details }: Readonly<Props>): JSX.Element;
6
+ declare function DetailsNotification({ details }: Readonly<Props>): React.JSX.Element;
7
7
  export { DetailsNotification };
@@ -3,5 +3,5 @@ interface NotificationHeaderProps {
3
3
  notificationDetails: NotificationDetails;
4
4
  headerAction?: React.ReactNode;
5
5
  }
6
- declare function NotificationHeader({ notificationDetails, headerAction }: NotificationHeaderProps): JSX.Element | null;
6
+ declare function NotificationHeader({ notificationDetails, headerAction }: NotificationHeaderProps): React.JSX.Element | null;
7
7
  export { NotificationHeader };
@@ -2,5 +2,5 @@ interface HistoryProps {
2
2
  itemId: string;
3
3
  isWorkOrder?: boolean;
4
4
  }
5
- declare function TagHistoryPanel({ itemId, isWorkOrder }: HistoryProps): JSX.Element;
5
+ declare function TagHistoryPanel({ itemId, isWorkOrder }: HistoryProps): React.JSX.Element;
6
6
  export { TagHistoryPanel };
@@ -6,5 +6,5 @@ interface Props {
6
6
  groups: NotificationGroup[] | WorkOrderGroup[] | PunchGroup[];
7
7
  statusCode: number;
8
8
  }
9
- declare function TagHistoryGroup({ groups, emptyText, workItemType, statusCode, }: Props): JSX.Element;
9
+ declare function TagHistoryGroup({ groups, emptyText, workItemType, statusCode, }: Props): React.JSX.Element;
10
10
  export { TagHistoryGroup };
@@ -2,5 +2,5 @@ interface PunchProps {
2
2
  punchId: string;
3
3
  instCode: string;
4
4
  }
5
- declare function Punch(props: PunchProps): JSX.Element | null;
5
+ declare function Punch(props: PunchProps): React.JSX.Element | null;
6
6
  export { Punch };
@@ -3,5 +3,5 @@ export interface Props {
3
3
  details: PunchDetails;
4
4
  isLoading?: boolean;
5
5
  }
6
- declare function Details({ details }: Props): JSX.Element;
6
+ declare function Details({ details }: Props): React.JSX.Element;
7
7
  export { Details };
@@ -2,5 +2,5 @@ import { PunchDetails } from '../../types';
2
2
  interface HeaderProps {
3
3
  punch: PunchDetails;
4
4
  }
5
- declare function Header(props: HeaderProps): JSX.Element | null;
5
+ declare function Header(props: HeaderProps): React.JSX.Element | null;
6
6
  export { Header };
@@ -3,4 +3,4 @@ export interface Props {
3
3
  workOrderDetails: WorkOrderDetails;
4
4
  isLoading?: boolean;
5
5
  }
6
- export declare function DetailsWorkOrder({ workOrderDetails }: Readonly<Props>): JSX.Element;
6
+ export declare function DetailsWorkOrder({ workOrderDetails }: Readonly<Props>): React.JSX.Element;
@@ -5,5 +5,5 @@ interface WorkOrderHeaderProps {
5
5
  headerAction?: React.ReactNode;
6
6
  workOrderDateType?: WorkOrderDateType;
7
7
  }
8
- declare function WorkOrderHeader(props: WorkOrderHeaderProps): JSX.Element | null;
8
+ declare function WorkOrderHeader(props: WorkOrderHeaderProps): React.JSX.Element | null;
9
9
  export { WorkOrderHeader };
@@ -13,5 +13,5 @@ interface RTDProps {
13
13
  * }
14
14
  * @return {*}
15
15
  */
16
- declare function RealTimePopoverButton({ tagNo, onOpen }: RTDProps): JSX.Element | null;
16
+ declare function RealTimePopoverButton({ tagNo, onOpen }: RTDProps): React.JSX.Element | null;
17
17
  export { RealTimePopoverButton };
@@ -3,5 +3,5 @@ interface Props {
3
3
  imsFields: AdditionalFieldDto[];
4
4
  instCode: string;
5
5
  }
6
- declare function RealTimeIMSDropdown({ imsFields, instCode }: Props): JSX.Element;
6
+ declare function RealTimeIMSDropdown({ imsFields, instCode }: Props): React.JSX.Element;
7
7
  export { RealTimeIMSDropdown };
@@ -1,6 +1,7 @@
1
+ import React from 'react';
1
2
  interface Props {
2
3
  ims: string;
3
4
  instCode: string;
4
5
  }
5
- declare function RealTimeConnectorForIMSTag({ ims, instCode }: Props): JSX.Element;
6
+ declare function RealTimeConnectorForIMSTag({ ims, instCode }: Props): React.JSX.Element;
6
7
  export { RealTimeConnectorForIMSTag };
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  * SearchListItem component renders a styled list item with optional visual or icon, title, subtitle, and other customizable properties.
4
4
  *
5
5
  * @param {SearchListItemProps} props - The properties for the SearchListItem component.
6
- * @returns {JSX.Element} The rendered SearchListItem component.
6
+ * @returns {React.JSX.Element} The rendered SearchListItem component.
7
7
  */
8
8
  export declare const SearchListItem: React.FC<SearchListItemProps>;
9
9
  interface VisualComponent {
@@ -4,5 +4,5 @@ interface TagNoProps {
4
4
  keepLastNavigationItem?: boolean;
5
5
  activePanelKey?: string;
6
6
  }
7
- export declare const TagNumber: ({ tagNo, className, keepLastNavigationItem, activePanelKey }: TagNoProps) => JSX.Element;
7
+ export declare const TagNumber: ({ tagNo, className, keepLastNavigationItem, activePanelKey }: TagNoProps) => React.JSX.Element;
8
8
  export {};
@@ -1,7 +1,7 @@
1
1
  import type { TagSummaryDto } from '@equinor/echo-search';
2
2
  import React from 'react';
3
3
  interface TagsDropdownProps {
4
- tags: TagSummaryDto[];
4
+ tags: ReadonlyArray<TagSummaryDto>;
5
5
  onTagSelected: (tag: TagSummaryDto) => void;
6
6
  loadingTags?: boolean;
7
7
  }
@@ -4,6 +4,6 @@ import { WorkOrderHeaderDataProps } from '../types/types';
4
4
  *
5
5
  * @param props.basicFinishDateStatus - The status of the basic finish date, used to determine color.
6
6
  * @param props.basicFinishDateTime - The basic finish date/time value to display.
7
- * @returns {JSX.Element} The formatted date label.
7
+ * @returns {React.JSX.Element} The formatted date label.
8
8
  */
9
9
  export declare const WorkOrderHeaderDate: React.FC<WorkOrderHeaderDataProps>;
@@ -5,5 +5,5 @@ interface EquipmentLinkFieldProps {
5
5
  plantNo: string;
6
6
  }
7
7
  export declare const EquipmentLinkField: React.FC<EquipmentLinkFieldProps>;
8
- export declare function getEquipmentLinkField(equipmentId: string, tagNo: string, plantNo: string): JSX.Element;
8
+ export declare function getEquipmentLinkField(equipmentId: string, tagNo: string, plantNo: string): React.JSX.Element;
9
9
  export {};
@@ -2,7 +2,7 @@ import { type TagSummaryDto } from '@equinor/echo-search';
2
2
  import type { GlobalSelectionTypes } from '../globalSelectionStore.types';
3
3
  export type TagFetchResult = {
4
4
  result: {
5
- values: TagSummaryDto[];
5
+ values: ReadonlyArray<TagSummaryDto>;
6
6
  isSuccess: boolean;
7
7
  };
8
8
  itemIdsUsed: GlobalSelectionTypes.TagId[];
@@ -6,6 +6,6 @@ import React from 'react';
6
6
  * It notifies the user that the latest (incoming) color will be assigned to these items.
7
7
  * The dialog is rendered via a portal and adapts its width for mobile devices.
8
8
  *
9
- * @returns {JSX.Element} The portal-rendered dialog component.
9
+ * @returns {React.JSX.Element} The portal-rendered dialog component.
10
10
  */
11
11
  export declare const SelectionColorConflictDialog: React.FC;
@@ -14,7 +14,7 @@ interface LegendTextSelectorProps<T extends string> {
14
14
  * @param {ReadonlyArray<string>} props.options - List of selectable options.
15
15
  * @param {string} props.selectedOption - The currently selected option.
16
16
  * @param {(option: string) => void} [props.onOptionSelected] - Callback invoked when a new option is selected.
17
- * @returns {JSX.Element | null} The rendered button group, or null if no options are provided.
17
+ * @returns {React.JSX.Element | null} The rendered button group, or null if no options are provided.
18
18
  */
19
19
  export declare const LegendTextSelector: <T extends string>(props: LegendTextSelectorProps<T>) => import("react/jsx-runtime").JSX.Element | null;
20
20
  export {};
@@ -17,7 +17,7 @@ interface LegendColoredMarkerIconProps {
17
17
  * @param {string[]} hiddenBadges - Array of badge titles that should be hidden.
18
18
  * @param {Marker} marker - The marker data to be rendered.
19
19
  *
20
- * @returns {JSX.Element | null} The rendered colored marker icon or null if no marker is provided.
20
+ * @returns {React.JSX.Element | null} The rendered colored marker icon or null if no marker is provided.
21
21
  *
22
22
  * @example
23
23
  * <LegendColoredMarkerIcon
@@ -14,7 +14,7 @@ export declare const POPOVER_UPDATE_DELAY_MS = 2000;
14
14
  */
15
15
  export declare function useMarkerPopover(markerId: MarkerId, legendId: LegendId, itemId: LegendDataId, marker: ColorGroupedMarker): {
16
16
  isPopoverActive: boolean;
17
- elements: readonly import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>[];
17
+ elements: readonly import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>[];
18
18
  handleOpen: () => Promise<void>;
19
19
  handleClose: () => void;
20
20
  };
@@ -0,0 +1,13 @@
1
+ import { WorkOrderNotificationStatus } from '../../workOrder/api/api-workOrder-notification';
2
+ /**
3
+ * React Query hook that fetches maintenance record/attachment notification data for a given work order.
4
+ *
5
+ * This hook returns only the resolved `data` value from React Query.
6
+ * Callers that need loading/error state should use `useQuery` directly.
7
+ *
8
+ * @param workOrderId - Unique identifier of the work order for which to fetch notification data.
9
+ * @returns Notification data for the work order, or `undefined` when not yet loaded or when the API returns no data.
10
+ */
11
+ export declare function useFetchNotificationsByWorkOrderId({ workOrderId }: {
12
+ workOrderId: string;
13
+ }): WorkOrderNotificationStatus | undefined;
@@ -0,0 +1,11 @@
1
+ import { WorkOrderDto } from '@equinor/echo-search';
2
+ interface TagNoWithWorkOrders {
3
+ readonly tagNo: string;
4
+ readonly openWorkOrders: ReadonlyArray<WorkOrderDto>;
5
+ }
6
+ export declare function useOpenWorkOrdersByTagNos(items: ReadonlyArray<{
7
+ tagNo: string;
8
+ }>): {
9
+ tagNosWithOpenWorkOrders: readonly TagNoWithWorkOrders[];
10
+ };
11
+ export {};
@@ -0,0 +1,15 @@
1
+ import { WorkOrderDto } from '@equinor/echo-search';
2
+ /**
3
+ * Fetches work orders for multiple tags using React Query.
4
+ *
5
+ * @param tagNos - Array of tag numbers to search work orders for
6
+ * @returns React Query result with work orders data, loading state, and error state
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * const tagNos = ['23-PV-1234', '23-XV-5678'];
11
+ * const { data: workOrders = [], isLoading, error } = useWorkOrdersByTagsQuery(tagNos);
12
+ * ```
13
+ *
14
+ */
15
+ export declare function useWorkOrdersByTagsQuery(tagNos: string[]): import("@tanstack/react-query").UseQueryResult<readonly WorkOrderDto[], Error>;
@@ -16,6 +16,8 @@ export type { LegendStrategy } from './types/legendStrategy.type';
16
16
  export type { LegendId, LegendOptionConfig } from './types/legendType';
17
17
  export { useLegendUniqueBadges } from './hooks/useLegendUniqueBadges';
18
18
  export { useLegendUniqueMarkers } from './hooks/useLegendUniqueMarkers';
19
+ export { useOpenWorkOrdersByTagNos } from './hooks/useWorkOrdersByTagNos';
20
+ export { useWorkOrdersByTagsQuery } from './hooks/useWorkOrdersByTagsQuery';
19
21
  export { COUNT_MODE_KEYWORD } from './logic/normalizeBadges';
20
22
  export { useLegendVisibleDataStore } from './stores/legendVisibleDataStore/legendVisibleDataStore';
21
23
  export { useLegendUIStore } from './stores/legendUIStore/legendUIStore';
@@ -10,4 +10,4 @@ import { LegendDataId } from '../../types/legendType';
10
10
  * @param itemIds - Selected item ids used to filter which work orders should be shown in the popover.
11
11
  * @returns A JSX element array when work orders are found, otherwise a single fallback JSX element.
12
12
  */
13
- export declare function createPopoverContent(legendDataId: LegendDataId, itemIds: ReadonlyArray<LegendDataId>): Promise<JSX.Element | JSX.Element[]>;
13
+ export declare function createPopoverContent(legendDataId: LegendDataId, itemIds: ReadonlyArray<LegendDataId>): Promise<React.JSX.Element | React.JSX.Element[]>;
@@ -5,11 +5,11 @@
5
5
  * a list of unique notification type identifiers resolved for the work order.
6
6
  *
7
7
  * @param props \- Component props.
8
- * @param props.workOrderNumber \- Work order identifier used for display and for fetching related objects.
8
+ * @param props.workOrderId \- Work order identifier used for display and for fetching related objects.
9
9
  * @param props.isActive \- Whether the work order is active \(`true`\) or completed \(`false`\).
10
10
  * @returns A React element containing the primary row content.
11
11
  */
12
- export declare const WorkOrderPopoverPrimaryRow: ({ workOrderNumber, isActive }: {
13
- workOrderNumber: string;
12
+ export declare const WorkOrderPopoverPrimaryRow: ({ workOrderId, isActive }: {
13
+ workOrderId: string;
14
14
  isActive: boolean;
15
15
  }) => import("react/jsx-runtime").JSX.Element;
@@ -4,12 +4,12 @@ export type PopoverProps = {
4
4
  itemIds?: ReadonlyArray<LegendDataId>;
5
5
  };
6
6
  export interface WorkOrderPopover {
7
- workOrderId: string;
8
- isActive: boolean;
9
- orderTypeId: string;
10
- description: string;
11
- plantNo: string;
12
- workCenter: string;
13
- basicFinishDateTime: Date | undefined;
14
- basicFinishDateStatus: string | undefined;
7
+ readonly workOrderId: string;
8
+ readonly isActive: boolean;
9
+ readonly orderTypeId: string;
10
+ readonly description: string;
11
+ readonly plantNo: string;
12
+ readonly workCenter: string;
13
+ readonly basicFinishDateTime: Date | undefined;
14
+ readonly basicFinishDateStatus: string | undefined;
15
15
  }
@@ -1,8 +1,8 @@
1
1
  import { MeasurementDto } from '../../types/measuringPoint';
2
2
  export type LastRecordedMeasurementData = {
3
- conditionAsText?: string;
4
- measurementDateTime: string | null;
5
- codeAsText?: string;
3
+ conditionAsText: string | undefined;
4
+ measurementDateTime: string | undefined;
5
+ codeAsText: string | undefined;
6
6
  lastRecordedMeasurement: MeasurementDto | undefined;
7
7
  };
8
8
  export declare const getLastRecordedMeasurement: (measurements: MeasurementDto[]) => LastRecordedMeasurementData;
@@ -22,5 +22,5 @@ interface PlantNoSelectionDialogProps {
22
22
  *
23
23
  * @returns The plant selection dialog JSX element, or null if not open.
24
24
  */
25
- export declare const PlantNoSelectionDialog: ({ itemGetterCallback, onPlantSelectionConfirmed, onCancelButtonClicked, onSetIsWarningDialogOpen, open, title }: PlantNoSelectionDialogProps) => JSX.Element | null;
25
+ export declare const PlantNoSelectionDialog: ({ itemGetterCallback, onPlantSelectionConfirmed, onCancelButtonClicked, onSetIsWarningDialogOpen, open, title }: PlantNoSelectionDialogProps) => React.JSX.Element | null;
26
26
  export {};
@@ -0,0 +1,12 @@
1
+ export interface WorkOrderNotificationStatus {
2
+ readonly workOrderId: string;
3
+ readonly maintenanceRecordTypes: string[];
4
+ readonly hasB30Document: boolean;
5
+ }
6
+ /**
7
+ * Fetches maintenance record types and attachment type information for a work order.
8
+ *
9
+ * @param workOrderId - Unique work order identifier.
10
+ * @returns The notification data for the given work order, or `undefined` if the request returns no data.
11
+ */
12
+ export declare function fetchNotificationStatusByWorkOrderId(workOrderId: string): Promise<WorkOrderNotificationStatus | undefined>;
@@ -0,0 +1,15 @@
1
+ import { WorkOrderDto } from '@equinor/echo-search';
2
+ /**
3
+ * Fetches work orders for multiple tags using echo-search.
4
+ * Wraps the echo-search API call for use with React Query.
5
+ * Throws via `resultHelper.throwIfError` when the search result contains errors.
6
+ *
7
+ * @param tagNos - Array of tag numbers to search work orders for
8
+ * @returns Promise resolving to array of work orders
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * const workOrders = await fetchWorkOrdersByTagNos(['23-PV-1234', '23-XV-5678']);
13
+ * ```
14
+ */
15
+ export declare function fetchWorkOrdersByTagNos(tagNos: ReadonlyArray<string>): Promise<ReadonlyArray<WorkOrderDto>>;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { LastRecordedMeasurementData } from './lastRecordedMeasurement.logic';
3
- type LastRecordedMeasurementProps = {
4
- lastRecordedMeasurement: LastRecordedMeasurementData;
5
- failureMechanismDescription: string;
6
- };
7
- export declare const LastRecordedMeasurement: React.FC<LastRecordedMeasurementProps>;
8
- export {};