@equinor/echo-framework 0.17.2 → 0.18.0-beta-0

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,12 +1,12 @@
1
1
  {
2
2
  "name": "@equinor/echo-framework",
3
- "version": "0.17.2",
3
+ "version": "0.18.0-beta-0",
4
4
  "peerDependencies": {
5
5
  "@equinor/echo-base": ">= 0.7.0 < 0.8.0",
6
- "@equinor/echo-components": ">= 0.10.0 < 0.11.0",
6
+ "@equinor/echo-components": "0.11.0-beta-0",
7
7
  "@equinor/echo-core": ">= 0.9.0 < 0.10.0",
8
8
  "@equinor/echo-search": ">= 0.15.0 < 0.16.0",
9
- "@equinor/echo-utils": ">= 0.3.0 < 0.4.0",
9
+ "@equinor/echo-utils": "0.4.0-beta-0",
10
10
  "@equinor/eds-core-react": "0.34.0",
11
11
  "@equinor/eds-icons": "0.19.3",
12
12
  "react": ">= 17.0.2",
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';
@@ -122,7 +121,7 @@ declare const EchoFramework: Readonly<{
122
121
  web3dUrl: string;
123
122
  }>;
124
123
  createTemporarilyEchoHubListFor3D: (request: import("./lib/types/api-echohub").TemporaryEchoHubListDto, abortSignal?: AbortSignal | undefined) => Promise<import("./lib/types/api-echohub").TemporaryHubListCreatedResponse>;
125
- getEquipmentInfoFromApi: typeof getEquipmentInfoFromApi;
124
+ getEquipmentWithMeasuringPointsFromApi: typeof getEquipmentWithMeasuringPointsFromApi;
126
125
  }>;
127
126
  }>;
128
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
  }
@@ -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
- }