@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/index.cjs.js +1 -1
- package/package.json +1 -1
- package/src/index.d.ts +4 -3
- package/src/lib/components/prepview/Prepview.d.ts +2 -1
- package/src/lib/components/prepview/context/PrepviewContext.d.ts +2 -1
- package/src/lib/feature/equipment/api/api-equipmentWithMeasuringPoints.d.ts +2 -3
- package/src/lib/feature/equipment/components/equipmentInfoItem.d.ts +2 -2
- package/src/lib/feature/equipment/components/equipmentItemDetails/equipmentItemDetails.d.ts +8 -1
- package/src/lib/feature/equipment/components/equipmentItemHeader/equipmentItemHeader.d.ts +1 -2
- package/src/lib/feature/equipment/components/equipmentTabs/equipmentTabs.d.ts +1 -1
- package/src/lib/feature/equipment/hooks/useEquipmentWithMeasuringPoints.d.ts +4 -0
- package/src/lib/feature/equipment/hooks/useOpenEquipmentDetails.d.ts +1 -1
- package/src/lib/feature/equipment/index.d.ts +3 -1
- package/src/lib/feature/equipment/types/equipment.d.ts +23 -0
- package/src/lib/feature/equipment/types/equipmentWithMeasuringPoints.d.ts +2 -15
- package/src/lib/hooks/index.d.ts +1 -0
- package/src/lib/hooks/useTabTitle.d.ts +1 -0
- package/src/lib/services/searchItemDetails/searchItemDetails.store.d.ts +3 -0
- package/src/lib/types/searchItemDetailsType.d.ts +12 -0
- package/src/lib/utils/moduleNameUtils.d.ts +2 -0
- package/src/lib/utils/previousUtils.d.ts +2 -2
- package/src/lib/feature/equipment/api/api-equipmentInfo.d.ts +0 -5
- package/src/lib/feature/equipment/types/equipmentInfo.d.ts +0 -18
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
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
|
-
|
|
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({
|
|
3
|
-
|
|
4
|
-
instCode: string;
|
|
2
|
+
export declare function getEquipmentWithMeasuringPointsFromApi({ equipmentId }: {
|
|
3
|
+
equipmentId: string;
|
|
5
4
|
}): Promise<EquipmentWithMeasuringPoints[]>;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
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,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
|
|
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
|
}
|
package/src/lib/hooks/index.d.ts
CHANGED
|
@@ -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
|
+
}
|
|
@@ -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 {
|
|
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(
|
|
12
|
+
export declare function getPreviousItemIdOrPanelTitle(openedSearchItems: SearchItemDetailsObject[], modulePanels: Panel[], activePanelKey: string): string;
|
|
13
13
|
/**
|
|
14
14
|
* Get the active panel label
|
|
15
15
|
*
|
|
@@ -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
|
-
}
|