@equinor/echo-framework 0.15.2 → 0.15.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.15.2",
3
+ "version": "0.15.3",
4
4
  "peerDependencies": {
5
5
  "@equinor/echo-base": ">= 0.6.12 < 0.7.0",
6
6
  "@equinor/echo-components": ">= 0.8.0 < 0.9.0",
package/src/index.d.ts CHANGED
@@ -16,7 +16,7 @@ export { DetailedDeviceInformationProvider, detailedDeviceInformationProvider }
16
16
  export { DeviceInformation, deviceInfo } from './lib/services/deviceInformation/deviceInfo';
17
17
  export * from './lib/services/eventHubActions';
18
18
  export * from './lib/services/searchItemDetails/searchItemDetails.store';
19
- export { SearchItemDetailsContainer } from './lib/services/searchItemDetails/searchItemDetailsContainer';
19
+ export { SearchItemDetailsSideSheet } from './lib/services/searchItemDetails/searchItemDetailsSideSheet';
20
20
  export * from './lib/theme/themeConst';
21
21
  export * from './lib/types/api-echohub';
22
22
  export type { EchoHubPlant } from './lib/types/echoHubPlant';
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface PreviousProps {
3
+ title: string;
4
+ onClick: () => void;
5
+ }
6
+ export declare const Previous: React.FC<PreviousProps>;
7
+ export {};
@@ -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
- onSearchDetailsClose?: (panelKey: string) => void;
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';
@@ -0,0 +1,5 @@
1
+ export interface LeftPanelNavigationUpdateEvent {
2
+ previousTitle?: string;
3
+ onClick?: () => void;
4
+ resetNavigation?: boolean;
5
+ }
@@ -1,3 +1,5 @@
1
1
  export * from './navigationUtils';
2
2
  export * from './plantInfo';
3
+ export * from './previousUtils';
3
4
  export * from './searchUtil';
5
+ export * from './stringUtils';
@@ -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;