@equinor/echo-framework 0.17.1 → 0.17.2
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 +2 -0
- 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/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export * from './lib/types/extensions';
|
|
|
29
29
|
export type { SetActiveTagNo, TagData } from './lib/types/hookLibrary';
|
|
30
30
|
export type { ModelPermissions } from './lib/types/modelPermissions';
|
|
31
31
|
export { PingableSources } from './lib/types/pingableSources';
|
|
32
|
+
export { searchItemDetailsType } from './lib/types/searchItemDetailsType';
|
|
32
33
|
export * from './lib/utils';
|
|
33
34
|
export * from './lib/utils/startup';
|
|
34
35
|
export declare const registerEchopediaComponent: ({ name, component }: {
|
|
@@ -82,6 +83,7 @@ declare const EchoFramework: Readonly<{
|
|
|
82
83
|
isScreenMobileSize: boolean;
|
|
83
84
|
screenOrientation: import("./lib/types/hookLibrary").ScreenOrientation;
|
|
84
85
|
};
|
|
86
|
+
useTabTitle(): void;
|
|
85
87
|
useTagDetails({ instCode, tagNo }: {
|
|
86
88
|
tagNo: string;
|
|
87
89
|
instCode: string;
|
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
|
*
|