@equinor/echo-framework 0.15.4-beta-0 → 0.15.4
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/{f4c85313e79b1662.svg → 1bd97dd2170d0f64.svg} +850 -850
- package/{063009f06499d102.svg → 47deeba42768c5d1.svg} +8 -8
- package/README.md +28 -26
- package/index.cjs.d.ts +2 -2
- package/index.cjs.js +1 -1
- package/package.json +4 -4
- package/src/index.d.ts +14 -1
- package/src/lib/components/prepview/Prepview.d.ts +2 -1
- package/src/lib/components/prepview/api/api.d.ts +1 -1
- package/src/lib/components/prepview/api/resources.d.ts +1 -1
- package/src/lib/components/prepview/common/access/request/RequestAccess.d.ts +2 -2
- package/src/lib/components/prepview/common/additionalInformation/AdditionalDetails.d.ts +1 -1
- package/src/lib/components/prepview/common/additionalInformation/tabsPanels/TabsPanels.d.ts +1 -1
- package/src/lib/components/prepview/context/PrepviewContext.d.ts +1 -0
- package/src/lib/components/prepview/panels/operations/Operations.d.ts +2 -1
- package/src/lib/components/prepview/types/workorder.d.ts +1 -0
- package/src/lib/components/requestAccess/RequestAccessButton.d.ts +9 -0
- package/src/lib/components/requestAccess/RequestSapAccess.d.ts +7 -0
- package/src/lib/hooks/index.d.ts +1 -0
- package/src/lib/hooks/useOpenPdfFile.d.ts +12 -0
- package/src/lib/services/searchItemDetails/previous.d.ts +7 -0
- package/src/lib/services/searchItemDetails/searchItemDetails.store.d.ts +2 -0
- package/src/lib/services/searchItemDetails/searchItemDetailsContainer.d.ts +2 -1
- package/src/lib/services/searchItemDetails/searchItemDetailsSideSheet.d.ts +7 -0
- package/src/lib/types/eventTypes/index.d.ts +1 -0
- package/src/lib/types/eventTypes/leftPanelNavigationUpdateEvent.d.ts +5 -0
- package/src/lib/utils/index.d.ts +2 -0
- package/src/lib/utils/previousUtils.d.ts +21 -0
- package/src/lib/utils/stringUtils.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/echo-framework",
|
|
3
|
-
"version": "0.15.4
|
|
3
|
+
"version": "0.15.4",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@equinor/echo-base": "0.7.0
|
|
5
|
+
"@equinor/echo-base": ">= 0.7.0 < 0.8.0",
|
|
6
6
|
"@equinor/echo-components": ">= 0.8.0 < 0.9.0",
|
|
7
|
-
"@equinor/echo-core": "0.9.0
|
|
8
|
-
"@equinor/echo-search": "0.15.0
|
|
7
|
+
"@equinor/echo-core": ">= 0.9.0 < 0.10.0",
|
|
8
|
+
"@equinor/echo-search": ">= 0.15.0 < 0.16.0",
|
|
9
9
|
"@equinor/echo-utils": ">= 0.3.0 < 0.4.0",
|
|
10
10
|
"@equinor/eds-core-react": "^0.25.0",
|
|
11
11
|
"@equinor/eds-icons": "^0.17.0",
|
package/src/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { getPlantsInfo, getTagDetails } from './lib/services/api';
|
|
|
4
4
|
import './lib/theme/theme.css';
|
|
5
5
|
import { getLegendStatusColor } from './lib/utils/legendUtils';
|
|
6
6
|
export * from './lib/components';
|
|
7
|
+
export { RequestSapAccess } from './lib/components/requestAccess/RequestSapAccess';
|
|
7
8
|
export * from './lib/coreApplication';
|
|
8
9
|
export { RegisteredHookName } from './lib/hooks/hookLibrary';
|
|
9
10
|
export { useIsCompactLayout } from './lib/hooks/useIsCompactLayout';
|
|
@@ -15,7 +16,7 @@ export { DetailedDeviceInformationProvider, detailedDeviceInformationProvider }
|
|
|
15
16
|
export { DeviceInformation, deviceInfo } from './lib/services/deviceInformation/deviceInfo';
|
|
16
17
|
export * from './lib/services/eventHubActions';
|
|
17
18
|
export * from './lib/services/searchItemDetails/searchItemDetails.store';
|
|
18
|
-
export {
|
|
19
|
+
export { SearchItemDetailsSideSheet } from './lib/services/searchItemDetails/searchItemDetailsSideSheet';
|
|
19
20
|
export * from './lib/theme/themeConst';
|
|
20
21
|
export * from './lib/types/api-echohub';
|
|
21
22
|
export type { EchoHubPlant } from './lib/types/echoHubPlant';
|
|
@@ -60,6 +61,18 @@ declare const EchoFramework: Readonly<{
|
|
|
60
61
|
} | undefined, state?: any) => void;
|
|
61
62
|
useHas3dAccess(plantCode?: string | undefined): boolean;
|
|
62
63
|
useIsFullScreenModeEnabled(): boolean;
|
|
64
|
+
useOpenPdfFile(): (args: {
|
|
65
|
+
instCode: string;
|
|
66
|
+
docNo: string;
|
|
67
|
+
fileId: string | number;
|
|
68
|
+
revNo: string;
|
|
69
|
+
tagNo?: string | undefined;
|
|
70
|
+
}) => void;
|
|
71
|
+
useOpenPdfFileUrl(): (args: {
|
|
72
|
+
instCode: string;
|
|
73
|
+
fileUrl: string;
|
|
74
|
+
tagNo?: string | undefined;
|
|
75
|
+
}) => void;
|
|
63
76
|
usePlantAvailableIn3d(plantCode?: string | undefined): boolean;
|
|
64
77
|
usePlantAvailableIn3dWeb(plantCode?: string | undefined): boolean;
|
|
65
78
|
useScreenOrientation(): import("./lib/types/hookLibrary").ScreenOrientation;
|
|
@@ -2,9 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { SideSheetOrientation } from '@equinor/echo-components';
|
|
3
3
|
import { PrepviewEvents } from './context/PrepviewContext';
|
|
4
4
|
interface PrepviewProps {
|
|
5
|
-
instCode: string;
|
|
6
5
|
orientation: SideSheetOrientation;
|
|
6
|
+
instCode?: string;
|
|
7
7
|
workOrderId?: string;
|
|
8
|
+
workOrderOperationId?: string;
|
|
8
9
|
notificationId?: string;
|
|
9
10
|
punchId?: string;
|
|
10
11
|
closePanel: () => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PrepviewNotificationDto, PrepviewWorkOrderDto, PunchDetails } from '../types';
|
|
2
2
|
import * as workOrderApi from './attachment';
|
|
3
3
|
export { workOrderApi };
|
|
4
|
-
export declare function getWorkOrder(
|
|
4
|
+
export declare function getWorkOrder(workOrderId: string): Promise<PrepviewWorkOrderDto>;
|
|
5
5
|
export declare function getNotification(instCode: string, notificationId: string): Promise<PrepviewNotificationDto>;
|
|
6
6
|
export declare function getPunch(instCode: string, punchId: string): Promise<PunchDetails>;
|
|
7
7
|
export declare function getWorkType(instCode: string, workOrderId: string): Promise<string[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function getWorkOrder(
|
|
1
|
+
export declare function getWorkOrder(workOrderId: string): string;
|
|
2
2
|
export declare function getNotification(instCode: string, notificationId: string): string;
|
|
3
3
|
export declare function getPunch(instCode: string, punchId: string): string;
|
|
4
4
|
export declare function getWorkTypeUrl(instCode: string, workOrderId: string): string;
|
|
@@ -5,5 +5,5 @@ interface Props {
|
|
|
5
5
|
additionalDetails: AdditionalDetailsDto;
|
|
6
6
|
closePanel: () => void;
|
|
7
7
|
}
|
|
8
|
-
declare function AdditionalDetails({ workOrderDetails, notificationDetails, additionalDetails, closePanel }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AdditionalDetails({ workOrderDetails, notificationDetails, additionalDetails, closePanel, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export { AdditionalDetails };
|
|
@@ -6,7 +6,7 @@ interface Props {
|
|
|
6
6
|
additionalDetails: AdditionalDetailsDto;
|
|
7
7
|
closePanel: () => void;
|
|
8
8
|
}
|
|
9
|
-
declare function TabsPanels({ workOrderDetails, notificationDetails, additionalDetails, closePanel }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
declare function TabsPanels({ workOrderDetails, notificationDetails, additionalDetails, closePanel, }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
10
10
|
interface TabsListProps {
|
|
11
11
|
tabListRef: React.RefObject<HTMLDivElement>;
|
|
12
12
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PrepviewOperation } from '../../types';
|
|
2
2
|
interface Props {
|
|
3
3
|
operations: PrepviewOperation[];
|
|
4
|
+
workOrderId: string;
|
|
4
5
|
}
|
|
5
|
-
declare function OperationsPanel({ operations }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function OperationsPanel({ operations, workOrderId }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export { OperationsPanel };
|
package/src/lib/hooks/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './useEchoHistory';
|
|
2
2
|
export * from './useHas3dAccess';
|
|
3
3
|
export * from './useIsFullScreenModeEnabled';
|
|
4
|
+
export * from './useOpenPdfFile';
|
|
4
5
|
export * from './usePlantAvailableIn3d';
|
|
5
6
|
export * from './usePlantAvailableIn3dWeb';
|
|
6
7
|
export * from './useScreenOrientation';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function useOpenPdfFile(): (args: {
|
|
2
|
+
instCode: string;
|
|
3
|
+
docNo: string;
|
|
4
|
+
fileId: string | number;
|
|
5
|
+
revNo: string;
|
|
6
|
+
tagNo?: string;
|
|
7
|
+
}) => void;
|
|
8
|
+
export declare function useOpenPdfFileUrl(): (args: {
|
|
9
|
+
instCode: string;
|
|
10
|
+
fileUrl: string;
|
|
11
|
+
tagNo?: string;
|
|
12
|
+
}) => void;
|
|
@@ -6,6 +6,7 @@ export type SearchItemDetailsObject = {
|
|
|
6
6
|
content: ReactNode;
|
|
7
7
|
header?: ReactNode;
|
|
8
8
|
subHeader?: ReactNode;
|
|
9
|
+
itemId: string;
|
|
9
10
|
isOpen: boolean;
|
|
10
11
|
};
|
|
11
12
|
export type SearchItemDetailsState = {
|
|
@@ -22,5 +23,6 @@ type ShowDetailsArgs = {
|
|
|
22
23
|
header?: ReactNode;
|
|
23
24
|
subHeader?: ReactNode;
|
|
24
25
|
keepLastNavigationItem?: boolean;
|
|
26
|
+
itemId: string;
|
|
25
27
|
};
|
|
26
28
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { SearchItemDetailsObject } from './searchItemDetails.store';
|
|
2
3
|
interface SearchItemDetailsContainerProps {
|
|
3
|
-
|
|
4
|
+
itemToDisplay: SearchItemDetailsObject;
|
|
4
5
|
}
|
|
5
6
|
export declare const SearchItemDetailsContainer: React.FC<SearchItemDetailsContainerProps>;
|
|
6
7
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SearchItemDetailsObject } from './searchItemDetails.store';
|
|
3
|
+
interface SearchItemDetailsSideSheetProps {
|
|
4
|
+
itemToDisplay: SearchItemDetailsObject | undefined;
|
|
5
|
+
}
|
|
6
|
+
export declare const SearchItemDetailsSideSheet: React.FC<SearchItemDetailsSideSheetProps>;
|
|
7
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { FullScreenModeEvent } from './fullScreenModeEvent';
|
|
2
|
+
export type { LeftPanelNavigationUpdateEvent } from './leftPanelNavigationUpdateEvent';
|
|
2
3
|
export type { LegendChangedEvent } from './legendEvent';
|
|
3
4
|
export type { PlantEvent } from './plantEvent';
|
|
4
5
|
export type { SearchItemDetailsClosedEvent } from './searchDetailsContainerEvents';
|
package/src/lib/utils/index.d.ts
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Panel } from '@equinor/echo-core';
|
|
2
|
+
import { SearchItemDetailsObject } from '../services/searchItemDetails/searchItemDetails.store';
|
|
3
|
+
/**
|
|
4
|
+
* Get the previous search item id or the previous active panel label
|
|
5
|
+
*
|
|
6
|
+
* @export
|
|
7
|
+
* @param {Record<string, SearchItemDetailsObject[]>} openedSearchItemsByPanel Opened search items by panel
|
|
8
|
+
* @param {Panel[]} modulePanels Module panels
|
|
9
|
+
* @param {string} activePanelKey The active panel key
|
|
10
|
+
* @return {*} {string} Returns the previous search item id or active panel label
|
|
11
|
+
*/
|
|
12
|
+
export declare function getPreviousItemIdOrPanelTitle(openedSearchItemsByPanel: Record<string, SearchItemDetailsObject[]>, modulePanels: Panel[], activePanelKey: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Get the active panel label
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @param {Panel[]} modulePanels Module panels
|
|
18
|
+
* @param {string} activePanelKey The active panel key
|
|
19
|
+
* @return {*} {string} Returns the active panel label
|
|
20
|
+
*/
|
|
21
|
+
export declare function getPanelTitle(modulePanels: Panel[], activePanelKey: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function removeLeadingZeros(inputString: string): string;
|