@equinor/echo-framework 0.17.1 → 0.17.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/echo-framework",
3
- "version": "0.17.1",
3
+ "version": "0.17.3",
4
4
  "peerDependencies": {
5
5
  "@equinor/echo-base": ">= 0.7.0 < 0.8.0",
6
6
  "@equinor/echo-components": ">= 0.10.0 < 0.11.0",
package/src/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { getEquipmentInfoFromApi } from './lib/feature/equipment/api/api-equipmentInfo';
2
+ import { getEquipmentWithMeasuringPointsFromApi } from './lib/feature/equipment/api/api-equipmentWithMeasuringPoints';
3
3
  import { getLegendStatusColor } from './lib/feature/legend/utils/legendUtils';
4
4
  import './lib/globalStyles.css';
5
5
  import { getPlantsInfo, getTagDetails } from './lib/services/api';
@@ -7,7 +7,6 @@ export * from './lib/components';
7
7
  export { RequestSapAccess } from './lib/components/requestAccess/RequestSapAccess';
8
8
  export * from './lib/coreApplication';
9
9
  export * from './lib/feature/equipment/index';
10
- export * from './lib/feature/equipment/types/equipmentInfo';
11
10
  export * from './lib/feature/legend/index';
12
11
  export * from './lib/feature/measuringPoint/index';
13
12
  export * from './lib/feature/measuringPoint/types/measuringPoint';
@@ -29,6 +28,7 @@ export * from './lib/types/extensions';
29
28
  export type { SetActiveTagNo, TagData } from './lib/types/hookLibrary';
30
29
  export type { ModelPermissions } from './lib/types/modelPermissions';
31
30
  export { PingableSources } from './lib/types/pingableSources';
31
+ export { searchItemDetailsType } from './lib/types/searchItemDetailsType';
32
32
  export * from './lib/utils';
33
33
  export * from './lib/utils/startup';
34
34
  export declare const registerEchopediaComponent: ({ name, component }: {
@@ -82,6 +82,7 @@ declare const EchoFramework: Readonly<{
82
82
  isScreenMobileSize: boolean;
83
83
  screenOrientation: import("./lib/types/hookLibrary").ScreenOrientation;
84
84
  };
85
+ useTabTitle(): void;
85
86
  useTagDetails({ instCode, tagNo }: {
86
87
  tagNo: string;
87
88
  instCode: string;
@@ -120,7 +121,7 @@ declare const EchoFramework: Readonly<{
120
121
  web3dUrl: string;
121
122
  }>;
122
123
  createTemporarilyEchoHubListFor3D: (request: import("./lib/types/api-echohub").TemporaryEchoHubListDto, abortSignal?: AbortSignal | undefined) => Promise<import("./lib/types/api-echohub").TemporaryHubListCreatedResponse>;
123
- getEquipmentInfoFromApi: typeof getEquipmentInfoFromApi;
124
+ getEquipmentWithMeasuringPointsFromApi: typeof getEquipmentWithMeasuringPointsFromApi;
124
125
  }>;
125
126
  }>;
126
127
  export default EchoFramework;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { SideSheetOrientation } from '@equinor/echo-components';
2
+ import { ColorMap, SideSheetOrientation } from '@equinor/echo-components';
3
3
  import { PrepviewEvents } from './context/PrepviewContext';
4
4
  interface PrepviewProps {
5
5
  orientation: SideSheetOrientation;
@@ -11,6 +11,7 @@ interface PrepviewProps {
11
11
  closePanel: () => void;
12
12
  headerAction?: React.ReactNode;
13
13
  events?: PrepviewEvents;
14
+ colorMap?: ColorMap;
14
15
  }
15
16
  declare function Prepview(props: PrepviewProps): JSX.Element | null;
16
17
  export { MaintenanceApiNameForWorkOrders, WorkItemType } from './utils';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { SideSheetOrientation } from '@equinor/echo-components';
2
+ import { ColorMap, SideSheetOrientation } from '@equinor/echo-components';
3
3
  import { WorkItemType } from '../utils';
4
4
  export interface PrepviewEvents {
5
5
  onClickHistoricItem?: (instCode: string, id: string, type: WorkItemType) => void;
@@ -10,6 +10,7 @@ interface PrepviewContext {
10
10
  isWorkOrder: boolean;
11
11
  workOrderOperationId?: string;
12
12
  events: PrepviewEvents;
13
+ colorMap?: ColorMap;
13
14
  }
14
15
  export declare const PrepviewContext: React.Context<PrepviewContext>;
15
16
  export declare const usePrepviewContext: () => PrepviewContext;
@@ -1,5 +1,4 @@
1
1
  import { EquipmentWithMeasuringPoints } from '../types/equipmentWithMeasuringPoints';
2
- export declare function getEquipmentWithMeasuringPointsFromApi({ tagNos, instCode }: {
3
- tagNos: string[];
4
- instCode: string;
2
+ export declare function getEquipmentWithMeasuringPointsFromApi({ equipmentId }: {
3
+ equipmentId: string;
5
4
  }): Promise<EquipmentWithMeasuringPoints[]>;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { EquipmentInfo } from '../types/equipmentInfo';
2
+ import { Equipment } from '../types/equipment';
3
3
  interface EquipmentItemProps {
4
- equipment: EquipmentInfo;
4
+ equipment: Equipment;
5
5
  tagNo: string;
6
6
  plantNo: string;
7
7
  }
@@ -1,3 +1,10 @@
1
1
  import * as React from 'react';
2
- import { EquipmentAccordionContentProps } from '../equipmentTabs/equipmentTabs';
2
+ import { EquipmentWithMeasuringPoints } from '../../types/equipmentWithMeasuringPoints';
3
+ interface EquipmentAccordionContentProps {
4
+ equipmentWithMeasuringPoints: EquipmentWithMeasuringPoints[];
5
+ tagNo: string;
6
+ plantNo: string;
7
+ showAdditionalInfo?: boolean;
8
+ }
3
9
  export declare const EquipmentItemDetails: React.FC<EquipmentAccordionContentProps>;
10
+ export {};
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  interface EquipmentItemHeaderProps {
3
- equipmentNo: string;
4
- tagNo: string;
3
+ equipmentId: string;
5
4
  }
6
5
  export declare const EquipmentItemHeader: React.FC<EquipmentItemHeaderProps>;
7
6
  export {};
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export interface EquipmentAccordionContentProps {
3
- equipmentNo: string;
3
+ equipmentId: string;
4
4
  tagNo: string;
5
5
  plantNo: string;
6
6
  showAdditionalInfo?: boolean;
@@ -0,0 +1,4 @@
1
+ export declare function useEquipmentWithMeasuringPoints(equipmentId: string): {
2
+ status: "error" | "success" | "pending";
3
+ equipmentWithMeasuringPoints: import("..").EquipmentWithMeasuringPoints[];
4
+ };
@@ -3,7 +3,7 @@
3
3
  * @returns {function}
4
4
  */
5
5
  export declare function useOpenEquipmentDetails(): (args: {
6
- equipmentNo: string;
6
+ equipmentId: string;
7
7
  tagNo: string;
8
8
  plantNo: string;
9
9
  panelKey?: string | undefined;
@@ -1,3 +1,5 @@
1
- export { useOpenEquipmentDetails } from './hooks/useOpenEquipmentDetails';
2
1
  export { getEquipmentWithMeasuringPointsFromApi } from './api/api-equipmentWithMeasuringPoints';
3
2
  export { EquipmentInfoItem, EquipmentItemDetails, EquipmentItemHeader, EquipmentTabs } from './components';
3
+ export { useOpenEquipmentDetails } from './hooks/useOpenEquipmentDetails';
4
+ export type { Equipment } from './types/equipment';
5
+ export type { EquipmentWithMeasuringPoints } from './types/equipmentWithMeasuringPoints';
@@ -0,0 +1,23 @@
1
+ export interface Equipment {
2
+ readonly equipmentId: string;
3
+ readonly equipmentDescription: string;
4
+ readonly maintenancePlantId: string;
5
+ readonly functionalLocationId: string;
6
+ readonly manufacturer: string;
7
+ readonly materialNo: string;
8
+ readonly modelNo: string;
9
+ readonly partNo: string;
10
+ readonly serialNo: string;
11
+ readonly tagPlantId?: string;
12
+ readonly tagId?: string;
13
+ readonly locationId: string;
14
+ readonly area?: string;
15
+ readonly categoryId?: string;
16
+ readonly activeStatusIds: string[];
17
+ readonly systemStatusIds: string[];
18
+ readonly userStatusIds: string[];
19
+ readonly equipmentsStatus: string[];
20
+ readonly changedDate?: string;
21
+ readonly createdDate?: string;
22
+ readonly e3DRef?: string;
23
+ }
@@ -1,19 +1,6 @@
1
1
  import { MeasuringPointDto } from '../../measuringPoint/types/measuringPoint';
2
+ import { Equipment } from './equipment';
2
3
  export interface EquipmentWithMeasuringPoints {
3
- readonly equipmentId: string;
4
- readonly equipment: string;
5
- readonly maintenancePlantId: string;
6
- readonly functionalLocationId: string;
7
- readonly tagPlantId: string;
8
- readonly tagId: string;
9
- readonly locationId: string;
10
- readonly area: string;
11
- readonly categoryId: string;
12
- readonly activeStatusIds: string[];
13
- readonly systemStatusIds: string[];
14
- readonly userStatusIds: string[];
15
- readonly equipmentsStatus: string[];
16
- readonly changedDate: string;
17
- readonly createdDate: string;
4
+ readonly equipment: Equipment;
18
5
  readonly measuringPoints: MeasuringPointDto[];
19
6
  }
@@ -6,4 +6,5 @@ export * from './usePlantAvailableIn3d';
6
6
  export * from './usePlantAvailableIn3dWeb';
7
7
  export * from './useScreenOrientation';
8
8
  export * from './useScreenValues';
9
+ export * from './useTabTitle';
9
10
  export * from './useTagDetails';
@@ -0,0 +1 @@
1
+ export declare function useTabTitle(): void;
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { searchItemDetailsType } from '../../types/searchItemDetailsType';
2
3
  export declare const useSearchItemDetailsStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<unknown>, "setState"> & {
3
4
  setState(nextStateOrUpdater: unknown, shouldReplace?: boolean | undefined): void;
4
5
  }>;
@@ -7,6 +8,7 @@ export type SearchItemDetailsObject = {
7
8
  header?: ReactNode;
8
9
  subHeader?: ReactNode;
9
10
  itemId: string;
11
+ itemType: searchItemDetailsType;
10
12
  isOpen: boolean;
11
13
  };
12
14
  export type SearchItemDetailsState = {
@@ -24,5 +26,6 @@ type ShowDetailsArgs = {
24
26
  subHeader?: ReactNode;
25
27
  keepLastNavigationItem?: boolean;
26
28
  itemId: string;
29
+ itemType: searchItemDetailsType;
27
30
  };
28
31
  export {};
@@ -0,0 +1,12 @@
1
+ export declare enum searchItemDetailsType {
2
+ Tag = "Tag",
3
+ Document = "Document",
4
+ Punch = "Punch",
5
+ Checklist = "Checklist",
6
+ CommPk = "CommPk",
7
+ McPk = "McPk",
8
+ Notification = "Notification",
9
+ WorkOrder = "WorkOrder",
10
+ MeasuringPoint = "MeasuringPoint",
11
+ Equipment = "Equipment"
12
+ }
@@ -0,0 +1,2 @@
1
+ export declare const showModuleName: (moduleName: string, moduleNameToReadableString: string) => string | undefined;
2
+ export declare const convertPathNameToReadableString: (pathName: string) => string;
@@ -4,12 +4,12 @@ import { SearchItemDetailsObject } from '../services/searchItemDetails/searchIte
4
4
  * Get the previous search item id or the previous active panel label
5
5
  *
6
6
  * @export
7
- * @param {Record<string, SearchItemDetailsObject[]>} openedSearchItemsByPanel Opened search items by panel
7
+ * @param {SearchItemDetailsObject[]} openedSearchItems Opened search items
8
8
  * @param {Panel[]} modulePanels Module panels
9
9
  * @param {string} activePanelKey The active panel key
10
10
  * @return {*} {string} Returns the previous search item id or active panel label
11
11
  */
12
- export declare function getPreviousItemIdOrPanelTitle(openedSearchItemsByPanel: Record<string, SearchItemDetailsObject[]>, modulePanels: Panel[], activePanelKey: string): string;
12
+ export declare function getPreviousItemIdOrPanelTitle(openedSearchItems: SearchItemDetailsObject[], modulePanels: Panel[], activePanelKey: string): string;
13
13
  /**
14
14
  * Get the active panel label
15
15
  *
@@ -1,5 +0,0 @@
1
- import { EquipmentInfo } from '../types/equipmentInfo';
2
- export declare function getEquipmentInfoFromApi({ tagNo, instCode }: {
3
- tagNo: string;
4
- instCode: string;
5
- }): Promise<EquipmentInfo[]>;
@@ -1,18 +0,0 @@
1
- export interface EquipmentInfo {
2
- readonly equipmentNo: string;
3
- readonly description: string;
4
- readonly manufacturer: string;
5
- readonly modelNo: string;
6
- readonly partNo: string;
7
- readonly serialNo: string;
8
- readonly materialNo: string;
9
- readonly functionalLocation: string;
10
- readonly validFrom: string;
11
- readonly weightNet: number;
12
- readonly documents: {
13
- readonly docId: string;
14
- readonly docNo: string;
15
- readonly description: string;
16
- readonly url: string;
17
- };
18
- }