@equinor/echo-framework 0.18.1 → 0.18.3

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 (39) hide show
  1. package/index.cjs.js +1 -1
  2. package/package.json +5 -5
  3. package/src/index.d.ts +6 -1
  4. package/src/lib/components/contextualAppLinks/hooks/useContextualAppLinksContext.d.ts +1 -1
  5. package/src/lib/components/panel/corePanelLeft.d.ts +1 -2
  6. package/src/lib/components/panel/corePanelRight.d.ts +1 -2
  7. package/src/lib/components/panel/panelNavigation.helper.d.ts +14 -0
  8. package/src/lib/components/prepview/common/error/ErrorCard.d.ts +8 -0
  9. package/src/lib/components/prepview/common/error/index.d.ts +1 -0
  10. package/src/lib/components/prepview/common/index.d.ts +1 -0
  11. package/src/lib/components/prepview/panels/history/TagHistory.d.ts +1 -1
  12. package/src/lib/components/prepview/panels/objects/Objects.d.ts +3 -3
  13. package/src/lib/components/prepview/panels/tagInformation/TagInformation.d.ts +2 -1
  14. package/src/lib/components/prepview/types/attachment.d.ts +1 -1
  15. package/src/lib/components/prepview/types/common.d.ts +3 -3
  16. package/src/lib/components/prepview/types/operation.d.ts +1 -0
  17. package/src/lib/components/prepview/types/tag.d.ts +10 -6
  18. package/src/lib/components/prepview/types/workorder.d.ts +2 -2
  19. package/src/lib/coreApplication/EchoContentPanels.d.ts +1 -1
  20. package/src/lib/feature/legend/legend.d.ts +6 -2
  21. package/src/lib/feature/measuringPoint/components/index.d.ts +3 -2
  22. package/src/lib/feature/measuringPoint/components/lastRecordedMeasurement/lastRecordedMeasurement.logic.d.ts +2 -1
  23. package/src/lib/feature/measuringPoint/components/measuringPoints.utils.d.ts +14 -6
  24. package/src/lib/feature/measuringPoint/index.d.ts +2 -2
  25. package/src/lib/feature/measuringPoint/types/measuringPoint.d.ts +1 -0
  26. package/src/lib/services/api/api-plants.d.ts +1 -0
  27. package/src/lib/services/api/api-stid-tags.d.ts +0 -1
  28. package/src/lib/services/eventHubActions/index.d.ts +2 -1
  29. package/src/lib/services/eventHubActions/searchActions.d.ts +6 -0
  30. package/src/lib/types/eventTypes/index.d.ts +1 -0
  31. package/src/lib/types/eventTypes/plantEvent.d.ts +1 -0
  32. package/src/lib/types/eventTypes/setMainSearchTextEvent.d.ts +3 -0
  33. package/src/lib/types/grid/bucketSideDrawer.types.d.ts +2 -0
  34. package/src/lib/types/grid/index.d.ts +1 -0
  35. package/src/lib/types/navigation/index.d.ts +1 -0
  36. package/src/lib/types/navigation/internalApplicationLinks.d.ts +20 -0
  37. package/src/lib/utils/index.d.ts +1 -0
  38. package/src/lib/utils/svgUtil.d.ts +2 -0
  39. package/src/lib/services/api/api-manager.d.ts +0 -22
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@equinor/echo-framework",
3
- "version": "0.18.1",
3
+ "version": "0.18.3",
4
4
  "peerDependencies": {
5
5
  "@equinor/echo-base": ">= 0.7.0 < 0.8.0",
6
6
  "@equinor/echo-components": ">= 0.11.0 < 0.12.0",
7
7
  "@equinor/echo-core": ">= 0.9.0 < 0.10.0",
8
8
  "@equinor/echo-search": ">= 0.15.0 < 0.16.0",
9
9
  "@equinor/echo-utils": ">= 0.4.0 < 0.5.0",
10
- "@equinor/eds-core-react": "0.34.0",
11
- "@equinor/eds-icons": "0.19.3",
10
+ "@equinor/eds-core-react": "0.36.0",
11
+ "@equinor/eds-icons": "0.21.0",
12
12
  "react": ">= 17.0.2",
13
13
  "react-dom": ">= 17.0.2",
14
14
  "@tanstack/react-query": ">= 5.14.2 < 6",
15
- "@microsoft/signalr": "7.0.12",
16
- "classnames": "2.3.2",
15
+ "@microsoft/signalr": "8.0.0",
16
+ "classnames": "2.5.1",
17
17
  "history": "5.3.0",
18
18
  "lodash": "4.17.21",
19
19
  "react-router-dom": "5.3.4",
package/src/index.d.ts CHANGED
@@ -9,6 +9,7 @@ export { RequestSapAccess } from './lib/components/requestAccess/RequestSapAcces
9
9
  export * from './lib/coreApplication';
10
10
  export * from './lib/feature/equipment/index';
11
11
  export * from './lib/feature/legend/index';
12
+ export { getLatestMeasurementDate, sortMeasuringPointsByMeasurementDate } from './lib/feature/measuringPoint/components/measuringPoints.utils';
12
13
  export * from './lib/feature/measuringPoint/index';
13
14
  export * from './lib/feature/measuringPoint/types/measuringPoint';
14
15
  export { RegisteredHookName } from './lib/hooks/hookLibrary';
@@ -17,6 +18,7 @@ export { useIsFullScreenModeEnabled } from './lib/hooks/useIsFullScreenModeEnabl
17
18
  export { useScreenOrientation } from './lib/hooks/useScreenOrientation';
18
19
  export { useScreenValues } from './lib/hooks/useScreenValues';
19
20
  export * from './lib/services/activeSelectionStore';
21
+ export { getPlantsCachedOrApi, getPlantsFromApi } from './lib/services/api/api-plants';
20
22
  export { RegisteredComponentName } from './lib/services/componentRegistry/componentRegistry';
21
23
  export * from './lib/services/eventHubActions';
22
24
  export * from './lib/services/searchItemDetails/searchItemDetails.store';
@@ -26,11 +28,14 @@ export * from './lib/types/api-echohub';
26
28
  export type { EchoHubPlant } from './lib/types/echoHubPlant';
27
29
  export * from './lib/types/eventTypes';
28
30
  export * from './lib/types/extensions';
31
+ export type { BucketPanelKey, BucketSourceKey } from './lib/types/grid/bucketSideDrawer.types';
29
32
  export type { SetActiveTagNo, TagData } from './lib/types/hookLibrary';
30
33
  export type { ModelPermissions } from './lib/types/modelPermissions';
34
+ export { InternalApplicationLinks } from './lib/types/navigation/internalApplicationLinks';
31
35
  export { PingableSources } from './lib/types/pingableSources';
32
36
  export { searchItemDetailsType } from './lib/types/searchItemDetailsType';
33
37
  export * from './lib/utils';
38
+ export { convertPathNameToReadableString } from './lib/utils/moduleNameUtils';
34
39
  export * from './lib/utils/startup';
35
40
  export declare const registerEchopediaComponent: ({ name, component }: {
36
41
  name: import("./lib/services/componentRegistry/componentRegistry").RegisteredComponentName;
@@ -88,7 +93,7 @@ declare const EchoFramework: Readonly<{
88
93
  tagNo: string;
89
94
  instCode: string;
90
95
  }): {
91
- tagDetails: import("@equinor/echo-search").TagDetailsDto | undefined;
96
+ tagDetails: import("dist/libs/echo-search/src").TagDetailsDto | undefined;
92
97
  isTagDetailsLoading: boolean;
93
98
  hasError: boolean;
94
99
  };
@@ -1,4 +1,4 @@
1
1
  export declare function useContextualAppLinksContext(): {
2
- tag: import("@equinor/echo-search").TagSummaryDto;
2
+ tag: import("dist/libs/echo-search/src").TagSummaryDto;
3
3
  instCode: string;
4
4
  };
@@ -1,3 +1,2 @@
1
1
  import React from 'react';
2
- declare const CorePanelLeft: React.FC;
3
- export default CorePanelLeft;
2
+ export declare const CorePanelLeft: React.FC;
@@ -1,3 +1,2 @@
1
1
  import React from 'react';
2
- declare const _default: React.NamedExoticComponent<{}>;
3
- export default _default;
2
+ export declare const CorePanelRight: React.FC;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { SearchItemDetailsObject } from '../../services/searchItemDetails/searchItemDetails.store';
3
+ /**
4
+ * Hook for support the search panel navigation: it supports the "breadcumb" functionality, where the currently open item
5
+ * needs to refer back to the previous one.
6
+ *
7
+ * @returns { previousButton: React.ReactNode, activeSearchItem: React.ReactNode } An object containing two React components.
8
+ * previousButton to go back to the previous item in the search flow.
9
+ * activeSearchItem: the currently opened search item in the search flow.
10
+ */
11
+ export declare const useLeftPanelNavigation: () => {
12
+ previousButton: React.ReactNode;
13
+ activeSearchItem: SearchItemDetailsObject | undefined;
14
+ };
@@ -0,0 +1,8 @@
1
+ type ErrorContentProps = {
2
+ workOrderId?: string;
3
+ notificationId?: string;
4
+ punchId?: string;
5
+ error: Error;
6
+ };
7
+ export declare function ErrorCard(props: ErrorContentProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1 @@
1
+ export * from './ErrorCard';
@@ -4,3 +4,4 @@ export * from './details';
4
4
  export * from './fileSizeDisplay';
5
5
  export * from './info';
6
6
  export * from './statusLabel/StatusLabel';
7
+ export * from './error';
@@ -5,5 +5,5 @@ interface HistoryProps {
5
5
  workOrderGroups: PrepviewTagHistoryGroup<PrepviewWorkOrder>[];
6
6
  punchGroups: PrepviewTagHistoryGroup<PrepviewPunch>[];
7
7
  }
8
- declare function TagHistoryPanel({ notificationGroups, workOrderGroups, punchGroups }: HistoryProps): JSX.Element;
8
+ declare function TagHistoryPanel({ notificationGroups, workOrderGroups, punchGroups, }: HistoryProps): JSX.Element;
9
9
  export { TagHistoryPanel };
@@ -1,6 +1,6 @@
1
- import { PrepviewRelatedTag } from '../../types';
1
+ import { ObjectDto } from '../../types';
2
2
  interface Props {
3
- relatedTags: PrepviewRelatedTag[];
3
+ objectDtos: ObjectDto[];
4
4
  }
5
- declare function ObjectsPanel({ relatedTags }: Props): import("react/jsx-runtime").JSX.Element;
5
+ declare function ObjectsPanel({ objectDtos }: Props): import("react/jsx-runtime").JSX.Element;
6
6
  export { ObjectsPanel };
@@ -1,10 +1,11 @@
1
1
  import { PrepviewTagInformation } from '../../types';
2
2
  interface Props {
3
3
  tagInformation: PrepviewTagInformation;
4
+ noInformationFound: boolean;
4
5
  }
5
6
  /**
6
7
  * TagInformationPanel
7
8
  * this panel requires the user to have maintenance access to show data.
8
9
  */
9
- declare function TagInformationPanel({ tagInformation }: Props): import("react/jsx-runtime").JSX.Element;
10
+ declare function TagInformationPanel({ tagInformation, noInformationFound: notFound, }: Props): import("react/jsx-runtime").JSX.Element;
10
11
  export { TagInformationPanel };
@@ -3,5 +3,5 @@ export type PrepviewAttachment = {
3
3
  fileName: string;
4
4
  fileSize: number;
5
5
  id: string;
6
- statusCode?: string;
6
+ statusCode?: number;
7
7
  };
@@ -5,10 +5,10 @@ import { PrepviewNotification } from './notification';
5
5
  import { PrepviewOperation } from './operation';
6
6
  import { PrepviewPunch } from './punch';
7
7
  import { PrepviewSafety } from './safety';
8
- import { PrepviewRelatedTag, PrepviewTagInformation } from './tag';
8
+ import { ObjectDto, PrepviewTagInformation } from './tag';
9
9
  import { PrepviewTagHistoryGroup, PrepviewWorkOrder } from './workorder';
10
10
  export type FetchStatus = {
11
- statusCode?: 'Forbidden' | string;
11
+ statusCode?: 'Forbidden' | number;
12
12
  };
13
13
  export type ContentPickerGroup = {
14
14
  title?: string;
@@ -38,7 +38,7 @@ export type AdditionalDetailsDto = {
38
38
  };
39
39
  };
40
40
  objects: FetchStatus & {
41
- objects: Array<PrepviewRelatedTag>;
41
+ objects: Array<ObjectDto>;
42
42
  };
43
43
  operations: FetchStatus & {
44
44
  operations: Array<PrepviewOperation>;
@@ -3,6 +3,7 @@ export type PrepviewOperation = {
3
3
  title: string;
4
4
  workCenterId: string;
5
5
  plantId: string;
6
+ plantName: string;
6
7
  activeStatusIds: string;
7
8
  earliestStartDateTime: Date;
8
9
  earliestFinishDateTime: Date;
@@ -14,11 +14,15 @@ export type PrepviewTagInformation = {
14
14
  repairStrategy: string;
15
15
  unsafeFailure: string[];
16
16
  };
17
- export type PrepviewRelatedTag = {
18
- tagId: string;
19
- tagPlantId: string;
20
- tag: string;
21
- notification?: string;
17
+ export type ObjectDto = {
18
+ functionalLocationId?: string;
19
+ tagId?: string;
20
+ tag?: string;
21
+ tagPlantId?: string;
22
+ notificationId?: string;
23
+ notificationTypeId?: string;
24
+ notificationIsActive?: boolean;
25
+ notificationDescription?: string;
22
26
  equipment?: string;
23
- description?: string;
27
+ equipmentId?: string;
24
28
  };
@@ -5,7 +5,7 @@ import { PrepviewNotification } from './notification';
5
5
  import { PrepviewOperation } from './operation';
6
6
  import { PrepviewPunch } from './punch';
7
7
  import { PrepviewSafety } from './safety';
8
- import { PrepviewRelatedTag, PrepviewTagInformation } from './tag';
8
+ import { ObjectDto, PrepviewTagInformation } from './tag';
9
9
  export type PrepviewWorkOrderDto = {
10
10
  details: WorkOrderDetails;
11
11
  additionalDetails?: WorkOrderAdditionalDetails;
@@ -62,7 +62,7 @@ export type WorkOrderAdditionalDetails = {
62
62
  };
63
63
  };
64
64
  objects: FetchStatus & {
65
- objects: Array<PrepviewRelatedTag>;
65
+ objects: Array<ObjectDto>;
66
66
  };
67
67
  operations: FetchStatus & {
68
68
  operations: Array<PrepviewOperation>;
@@ -1,5 +1,5 @@
1
1
  import { Panel } from '@equinor/echo-core';
2
- /** TODO: This is not used (?) **/
2
+ /** Used in echo-client for creating a host application for echo modules in dev mode **/
3
3
  /**
4
4
  * Core Main menu panel registered at client startup
5
5
  */
@@ -33,7 +33,10 @@ export declare enum LegendStatus {
33
33
  PM15 = "PM15",
34
34
  PM20 = "PM20",
35
35
  LC = "LC",
36
- LO = "LO"
36
+ LO = "LO",
37
+ OnWatch = "OnWatch",
38
+ InProgress = "InProgress",
39
+ AnnotationError = "AnnotationError"
37
40
  }
38
41
  export declare enum LegendType {
39
42
  Stid = "Stid",
@@ -46,5 +49,6 @@ export declare enum LegendType {
46
49
  WorkOrderRevision = "WorkOrderRevision",
47
50
  ValvePosition = "ValvePosition",
48
51
  MeasuringPosition = "MeasuringPosition",
49
- WorkPermit = "WorkPermit"
52
+ WorkPermit = "WorkPermit",
53
+ Annotations = "Annotations"
50
54
  }
@@ -1,3 +1,4 @@
1
- export { MeasuringPointItem } from './measuringPointItem';
2
- export { MeasuringPointHeader } from './measuringPointHeader/measuringPointHeader';
1
+ export { failureMechanismConfig } from './failureMechanism.config';
3
2
  export { MeasuringPointDetails } from './measuringPointDetails/measuringPointDetails';
3
+ export { MeasuringPointHeader } from './measuringPointHeader/measuringPointHeader';
4
+ export { MeasuringPointItem } from './measuringPointItem';
@@ -1,6 +1,7 @@
1
1
  import { MeasurementDto } from '../../types/measuringPoint';
2
2
  export type LastRecordedMeasurementData = {
3
- conditionAsText: string;
3
+ conditionAsText?: string;
4
4
  measurementDateTime: string | null;
5
+ codeAsText?: string;
5
6
  };
6
7
  export declare const getLastRecordedMeasurement: (measurements: MeasurementDto[]) => LastRecordedMeasurementData;
@@ -1,7 +1,15 @@
1
- interface FailureMechanismCondition {
2
- id: string | undefined;
3
- value: string | undefined;
4
- color: string;
5
- }
6
- export declare function getFailureMechanismCondition(qualitativeCodeGroupId: string | undefined, qualitativeCodeId: string | number | undefined): FailureMechanismCondition;
1
+ import { MeasurementDto, MeasuringPointDto } from '../types/measuringPoint';
2
+ type FailureMechanismIdAndValue = {
3
+ id: string;
4
+ value: string;
5
+ };
6
+ type FailureMechanismParams = {
7
+ lastRecordedMeasurement: MeasurementDto | undefined;
8
+ quantitativeCharacteristicId: string | undefined;
9
+ };
10
+ export declare function getFailureMechanismColor({ lastRecordedMeasurement, quantitativeCharacteristicId }: FailureMechanismParams): string;
11
+ export declare function getFailureMechanismIdAndValue({ lastRecordedMeasurement, quantitativeCharacteristicId }: FailureMechanismParams): FailureMechanismIdAndValue | undefined;
12
+ export declare function getColor(measurement: FailureMechanismIdAndValue): string | undefined;
13
+ export declare const getLatestMeasurementDate: (point: MeasuringPointDto) => Date | undefined;
14
+ export declare const sortMeasuringPointsByMeasurementDate: (a: MeasuringPointDto, b: MeasuringPointDto) => number;
7
15
  export {};
@@ -1,3 +1,3 @@
1
- export { MeasuringPointDetails, MeasuringPointItem, MeasuringPointHeader } from './components';
2
- export type { MeasurementDto, MeasuringPointDto } from './types/measuringPoint';
1
+ export { MeasuringPointDetails, MeasuringPointHeader, MeasuringPointItem, failureMechanismConfig } from './components';
3
2
  export { useOpenMeasuringPointDetails } from './hooks';
3
+ export type { MeasurementDto, MeasuringPointDto } from './types/measuringPoint';
@@ -22,6 +22,7 @@ export interface MeasuringPointDto {
22
22
  readonly tagPlantId?: string;
23
23
  readonly tagId?: string;
24
24
  readonly equipmentId?: string;
25
+ readonly quantitativeCharacteristicId?: string;
25
26
  readonly quantitativeCharacteristicUnit?: string;
26
27
  readonly positionDetails_CoordinateSystemName?: string;
27
28
  readonly positionDetails_E3DReferenceNumber?: string;
@@ -5,3 +5,4 @@ import { Plant } from '@equinor/echo-core';
5
5
  * @return {*} {Promise<Plant[]>}
6
6
  */
7
7
  export declare function getPlantsFromApi(): Promise<Plant[]>;
8
+ export declare function getPlantsCachedOrApi(): Promise<ReadonlyArray<Plant>>;
@@ -10,5 +10,4 @@ import { TagSummaryDto } from '@equinor/echo-search';
10
10
  export declare function getTagsFromStidApi(args: {
11
11
  instCode: string;
12
12
  tagNos: string[];
13
- enableCache?: boolean;
14
13
  }): Promise<TagSummaryDto[]>;
@@ -1,2 +1,3 @@
1
- export * from './toastActions';
2
1
  export * from './legendActions';
2
+ export * from './searchActions';
3
+ export * from './toastActions';
@@ -0,0 +1,6 @@
1
+ import { SetMainSearchTextEvent } from '../../types/eventTypes/setMainSearchTextEvent';
2
+ /**
3
+ * Emit a SetSearchTextEvent on echo core eventHub with a specific payload.
4
+ * @param {SetMainSearchTextEvent} payload
5
+ */
6
+ export declare const setMainSearchText: (payload: SetMainSearchTextEvent) => void;
@@ -3,4 +3,5 @@ export type { LeftPanelNavigationUpdateEvent } from './leftPanelNavigationUpdate
3
3
  export type { LegendChangedEvent, LegendStatusesChangedEvent } from './legendEvent';
4
4
  export type { PlantEvent } from './plantEvent';
5
5
  export type { SearchItemDetailsClosedEvent } from './searchDetailsContainerEvents';
6
+ export type { SetMainSearchTextEvent } from './setMainSearchTextEvent';
6
7
  export type { ToasterEvent } from './toasterEvent';
@@ -2,4 +2,5 @@ import { Plant } from '@equinor/echo-core';
2
2
  export interface PlantEvent {
3
3
  selectedPlant: Plant;
4
4
  stayOnPath?: boolean;
5
+ alertUserPlantChanged?: boolean;
5
6
  }
@@ -0,0 +1,3 @@
1
+ export interface SetMainSearchTextEvent {
2
+ searchText: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ export type BucketPanelKey = 'turnaround' | 'sharedWithMe' | 'project';
2
+ export type BucketSourceKey = 'Turnaround grid' | 'Project grid';
@@ -0,0 +1 @@
1
+ export type { BucketPanelKey, BucketSourceKey } from './bucketSideDrawer.types';
@@ -0,0 +1 @@
1
+ export { InternalApplicationLinks } from './internalApplicationLinks';
@@ -0,0 +1,20 @@
1
+ export declare enum InternalApplicationLinks {
2
+ Ayelix = "/ayelix",
3
+ Events = "/events",
4
+ OfflineCamera = "/camera",
5
+ OnlineCamera = "/newcamera",
6
+ MyTasks = "/MyTasks",
7
+ Media = "/media",
8
+ MissionPlanner = "/missionplanner",
9
+ EchoHub = "/EchoHub",
10
+ RelatedTag = "/RelatedTag",
11
+ Tags = "/tags",
12
+ OfflineDocuments = "/OfflineDocuments",
13
+ Viewer = "/viewer",
14
+ Echo4Project = "/project",
15
+ XLD = "/xld",
16
+ SmartPortal = "/smartportal",
17
+ EchoMaps = "/maps",
18
+ Echo3dWeb = "/echo3d",
19
+ Turnaround = "/turnaround"
20
+ }
@@ -5,3 +5,4 @@ export * from './plantInfo';
5
5
  export * from './previousUtils';
6
6
  export * from './searchUtil';
7
7
  export * from './stringUtils';
8
+ export * from './svgUtil';
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function addTypeToSvg(SvgComponent: any): React.FunctionComponent<React.SVGAttributes<SVGElement>>;
@@ -1,22 +0,0 @@
1
- export declare const baseApiUrl: string;
2
- type ResponseParser<T> = (response: Response) => Promise<T>;
3
- interface RequestOptions<T> {
4
- /**
5
- * Optional response parsing function
6
- */
7
- successResponseParser?: ResponseParser<T>;
8
- }
9
- interface Request<T> {
10
- url: string;
11
- abortSignal?: AbortSignal;
12
- cache: {
13
- isEnabled: boolean;
14
- timeToLiveMilliseconds?: number;
15
- };
16
- method?: string;
17
- body?: BodyInit;
18
- headerOptions?: Record<string, unknown>;
19
- options?: RequestOptions<T>;
20
- }
21
- export declare function request<T>({ cache, url, abortSignal, options, headerOptions, method, body }: Request<T>): Promise<T | undefined>;
22
- export {};