@equinor/echo-framework 0.24.0-beta-2 → 0.24.1

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 (56) hide show
  1. package/{f4c85313e79b1662.svg → 1bd97dd2170d0f64.svg} +850 -850
  2. package/{063009f06499d102.svg → 47deeba42768c5d1.svg} +8 -8
  3. package/README.md +28 -28
  4. package/index.cjs.d.ts +2 -2
  5. package/index.cjs.js +3 -3
  6. package/package.json +8 -7
  7. package/src/index.d.ts +4 -1
  8. package/src/lib/components/notificationListItem/NotificationListItem.d.ts +3 -0
  9. package/src/lib/components/notificationListItem/components/NotificationListItemEndDateLabel.d.ts +4 -0
  10. package/src/lib/components/notificationListItem/components/NotificationListItemFailureImpactLabel.d.ts +3 -0
  11. package/src/lib/components/notificationListItem/components/NotificationListItemIcons.d.ts +2 -0
  12. package/src/lib/components/notificationListItem/components/index.d.ts +3 -0
  13. package/src/lib/components/notificationListItem/index.d.ts +2 -0
  14. package/src/lib/components/notificationListItem/notificationListItem.type.d.ts +15 -0
  15. package/src/lib/components/notificationListItem/types/types.d.ts +11 -0
  16. package/src/lib/components/searchListItem/searchListItem.d.ts +1 -0
  17. package/src/lib/components/workOrderListItem/WorkOrderListItem.d.ts +1 -1
  18. package/src/lib/feature/globalSelection/globalSelection.api.d.ts +15 -0
  19. package/src/lib/feature/globalSelection/globalSelection.internal.d.ts +8 -0
  20. package/src/lib/feature/globalSelection/globalSelectionStore/actions/addMeasuringPointsToSelection.action.d.ts +6 -0
  21. package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.d.ts +1 -0
  22. package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.types.d.ts +20 -8
  23. package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.utils.d.ts +3 -0
  24. package/src/lib/feature/globalSelection/globalSelectionStore/nullItems/createNullMeasurintPoint.d.ts +2 -0
  25. package/src/lib/feature/globalSelection/hooks/useGlobalSelectionLists.d.ts +1 -1
  26. package/src/lib/feature/globalSelection/index.d.ts +2 -0
  27. package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/actions/addMeasuringPoints.action.d.ts +2 -0
  28. package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/actions/{createAddItemsFactory.d.ts → createAddItemsToSelectionTreeFactory.d.ts} +1 -1
  29. package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/api/selectionTree.api.d.ts +7 -0
  30. package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/initialData.d.ts +1 -0
  31. package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/selectionTree.store.repository.d.ts +4 -2
  32. package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/selectionTree.store.types.d.ts +18 -15
  33. package/src/lib/feature/legend/components/pdfMarkers/subComponents/{LegendMarkersRendererWithPopover.d.ts → LegendMarkersRenderer.d.ts} +2 -3
  34. package/src/lib/feature/legend/components/pdfMarkers/subComponents/MultipleMarkersByLegends.d.ts +2 -2
  35. package/src/lib/feature/legend/components/pdfMarkers/subComponents/iconPositionTransform.d.ts +0 -8
  36. package/src/lib/feature/measuringPoint/FullMeasuringPointItem.d.ts +25 -0
  37. package/src/lib/feature/measuringPoint/components/MeasuringPointListItem.d.ts +18 -0
  38. package/src/lib/feature/measuringPoint/components/index.d.ts +0 -1
  39. package/src/lib/feature/measuringPoint/components/lastRecordedMeasurement/lastRecordedMeasurement.d.ts +2 -2
  40. package/src/lib/feature/measuringPoint/components/lastRecordedMeasurement/lastRecordedMeasurement.logic.d.ts +1 -0
  41. package/src/lib/feature/measuringPoint/components/measuringPointDetails/lastReportedFields.d.ts +5 -3
  42. package/src/lib/feature/measuringPoint/components/measuringPointDetails/measuringPointDetails.d.ts +7 -3
  43. package/src/lib/feature/measuringPoint/components/measuringPointDetails/measuringPointHistoryList/measuringPointHistoryList.d.ts +3 -2
  44. package/src/lib/feature/measuringPoint/components/measuringPointHeader/measuringPointHeader.d.ts +2 -2
  45. package/src/lib/feature/measuringPoint/components/measuringPoints.utils.d.ts +1 -1
  46. package/src/lib/feature/measuringPoint/hooks/useOpenMeasuringPointDetails.d.ts +5 -3
  47. package/src/lib/feature/measuringPoint/index.d.ts +1 -1
  48. package/src/lib/hooks/index.d.ts +1 -1
  49. package/src/lib/hooks/useAgChartsLicense.d.ts +1 -0
  50. package/src/lib/hooks/useInstCodeSafe.d.ts +10 -0
  51. package/src/lib/services/api/api-measurements.d.ts +4 -0
  52. package/src/lib/services/api/api-measuringPoints.d.ts +6 -0
  53. package/src/lib/services/license/setAgChartsEnterpriseLicense.d.ts +2 -0
  54. package/src/lib/utils/handleErrors.d.ts +3 -1
  55. package/src/lib/feature/measuringPoint/components/measuringPointItem.d.ts +0 -15
  56. package/src/lib/hooks/useHas3dAccess.d.ts +0 -1
@@ -7,7 +7,7 @@ type FailureMechanismParams = {
7
7
  measurement: MeasurementDto | undefined;
8
8
  quantitativeCharacteristicId: string | undefined;
9
9
  };
10
- type FailureMechanismConfigValues = {
10
+ export type FailureMechanismConfigValues = {
11
11
  value: string;
12
12
  color: string;
13
13
  description: string;
@@ -1,11 +1,13 @@
1
- import { MeasuringPointDto } from '../types/measuringPoint';
1
+ import { MeasuringPointData } from '@equinor/echo-search';
2
+ import { MeasurementDto } from '../types/measuringPoint';
2
3
  /**
3
4
  * Opens measuring point details panel on the left side of the screen
4
- * @returns {function}
5
+ * @returns {function} A function to open the measuring point details panel
5
6
  */
6
7
  export declare function useOpenMeasuringPointDetails(): (args: MeasuringPointArgs) => void;
7
8
  type MeasuringPointArgs = {
8
- measuringPoint: MeasuringPointDto;
9
+ measuringPointProps: Pick<MeasuringPointData, 'measuringPosition' | 'measuringPointId' | 'quantitativeCharacteristicId' | 'tagPlantId' | 'tagId' | 'measuringPoint' | 'equipmentId'>;
10
+ measurements?: MeasurementDto[];
9
11
  panelKey?: string;
10
12
  keepLastNavigationItem?: boolean;
11
13
  };
@@ -1,4 +1,4 @@
1
- export { MeasuringPointDetails, MeasuringPointHeader, MeasuringPointItem, failureMechanismConfig } from './components';
1
+ export { failureMechanismConfig, MeasuringPointDetails, MeasuringPointHeader } from './components';
2
2
  export { useOpenMeasuringPointDetails } from './hooks';
3
3
  export type { DocumentRelationships } from './types/documentRelationships';
4
4
  export type { MeasurementDto, MeasuringPointDto } from './types/measuringPoint';
@@ -1,7 +1,7 @@
1
1
  export * from './useClosePanelByKey';
2
2
  export * from './useEchoHistory';
3
3
  export * from './useFetchInstCodeBySapPlantId';
4
- export * from './useHas3dAccess';
4
+ export { useInstCodeSafe } from './useInstCodeSafe';
5
5
  export * from './useIsFullScreenModeEnabled';
6
6
  export * from './useOpenPdfFile';
7
7
  export * from './usePlantAvailableIn3d';
@@ -0,0 +1 @@
1
+ export declare const useAgChartsLicense: () => boolean;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Returns with the current instCode in the app, considering deep-linking as well.
3
+ * If there's `instCode` query param in the URL, it will return with that value.
4
+ * Otherwise it will return with the instCode found in the user settings.
5
+ *
6
+ * Handles `mounted` check for components when setting inner state out of the box.
7
+ *
8
+ * @returns {string} instCode - installation code for a plant
9
+ */
10
+ export declare const useInstCodeSafe: () => string;
@@ -0,0 +1,4 @@
1
+ import { MeasurementDto } from '../../feature/measuringPoint/types/measuringPoint';
2
+ export declare function getMeasurementsByMeasuringPointIds(args: {
3
+ measuringPointIds: string[];
4
+ }): Promise<MeasurementDto[] | undefined>;
@@ -0,0 +1,6 @@
1
+ import { MeasurementDto, MeasuringPointDto } from '../../feature/measuringPoint/types/measuringPoint';
2
+ export declare function getMeasurementsFromMaintenanceDataApi(args: {
3
+ instCode: string;
4
+ tagNos: string[];
5
+ }): Promise<MeasuringPointDto[]>;
6
+ export declare function cleanUpMeasurement(measurement: MeasurementDto): MeasurementDto;
@@ -0,0 +1,2 @@
1
+ export declare function GetLicense(): Promise<string | undefined>;
2
+ export declare function setAgChartsEnterpriseLicense(): Promise<boolean>;
@@ -1 +1,3 @@
1
- export default function handleErrors(exception: Error | unknown): void;
1
+ export default function handleErrors(exception: Error | unknown, options?: {
2
+ userFriendlyErrorMessage: string;
3
+ }): void;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import { MeasuringPointDto } from '../types/measuringPoint';
3
- interface MeasuringPointItemProps {
4
- children?: React.ReactNode;
5
- measuringPoint: MeasuringPointDto;
6
- onClick: () => void;
7
- }
8
- /**
9
- * Component for displaying measuring point item.
10
- * Displays information about the condition of the measuring point, as well as the last reported measurement.
11
- * @param {MeasuringPointItemProps}
12
- * @returns {*}
13
- */
14
- export declare const MeasuringPointItem: React.FC<React.PropsWithChildren<MeasuringPointItemProps>>;
15
- export {};
@@ -1 +0,0 @@
1
- export declare function useHas3dAccess(plantCode?: string): boolean;