@equinor/echo-framework 0.23.0 → 0.23.1
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 +2 -2
- package/package.json +1 -2
- package/src/index.d.ts +1 -0
- package/src/lib/components/plantSelector/plantSelector.d.ts +7 -6
- package/src/lib/components/plantSelector/plantSelectorHelper.d.ts +4 -0
- package/src/lib/components/projectSelector/ProcosysProjectSelector.d.ts +3 -2
- package/src/lib/components/projectSelector/procosysProjectSelectorHelper.d.ts +1 -0
- package/src/lib/hooks/index.d.ts +1 -0
- package/src/lib/hooks/useClosePanelByKey.d.ts +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/echo-framework",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@equinor/echo-base": ">= 0.7.0 < 0.8.0",
|
|
6
6
|
"@equinor/echo-components": ">= 0.12.0 < 0.13.0",
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
"lodash": "4.17.21",
|
|
19
19
|
"react-router-dom": "5.3.4",
|
|
20
20
|
"zustand": ">= 4.4.7 < 5",
|
|
21
|
-
"react-swipeable": "7.0.2",
|
|
22
21
|
"immer": "10.1.1"
|
|
23
22
|
},
|
|
24
23
|
"dependencies": {
|
package/src/index.d.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface PlantSelectorProps {
|
|
3
|
-
variant?: 'compact' | 'default';
|
|
4
|
-
maxCharacterCount?: number;
|
|
5
|
-
isDisabled?: boolean;
|
|
6
|
-
stayOnPath?: boolean;
|
|
7
|
-
}
|
|
8
2
|
/**
|
|
9
3
|
* Dropdown component for displaying a searchable plant selector.
|
|
10
4
|
* @param {PlantSelectorProps} {
|
|
@@ -14,5 +8,12 @@ interface PlantSelectorProps {
|
|
|
14
8
|
* }
|
|
15
9
|
* @return {*}
|
|
16
10
|
*/
|
|
11
|
+
interface PlantSelectorProps {
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
stayOnPath?: boolean;
|
|
14
|
+
textSize?: 'small' | 'medium' | 'large';
|
|
15
|
+
noneBackground?: boolean;
|
|
16
|
+
autoWidth?: boolean;
|
|
17
|
+
}
|
|
17
18
|
export declare const PlantSelector: React.FC<PlantSelectorProps>;
|
|
18
19
|
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Plant } from '@equinor/echo-core';
|
|
2
|
+
export declare const addSapPlantIdSuffix: (text: string, plantId?: string) => string;
|
|
3
|
+
export declare const findPlant: (plants: Plant[], plantName: string) => Plant | undefined;
|
|
4
|
+
export declare const filterPlants: (option: string, inputValue: string, plants: Plant[]) => boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface ProjectSelectorProps {
|
|
3
|
-
variant?: 'compact' | 'default';
|
|
4
|
-
maxCharacterCount?: number;
|
|
5
3
|
isDisabled?: boolean;
|
|
4
|
+
textSize?: 'small' | 'medium' | 'large';
|
|
5
|
+
noneBackground?: boolean;
|
|
6
6
|
}
|
|
7
7
|
export declare const ALL_PROJECTS = "All projects";
|
|
8
8
|
/**
|
|
@@ -12,6 +12,7 @@ export declare const ALL_PROJECTS = "All projects";
|
|
|
12
12
|
* isDisabled: Flag which decides whether the dropdown should be disabled or not.
|
|
13
13
|
* }
|
|
14
14
|
* @return {*}
|
|
15
|
+
*
|
|
15
16
|
*/
|
|
16
17
|
export declare const ProjectSelector: React.FC<ProjectSelectorProps>;
|
|
17
18
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const filterProjects: (inputValue: string, projects: string[]) => string[];
|
package/src/lib/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a function to close a panel by its key if the provided key matches the currently active application menu item.
|
|
3
|
+
* If the panel key is not specified, it will close any panel, that is open.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} panelKey - The key of the panel to close.
|
|
6
|
+
* @returns {() => void} - A function that, when invoked, closes the panel and updates the active application menu item.
|
|
7
|
+
*
|
|
8
|
+
* This function uses the `usePanels` hook to set the active panel to an empty string,
|
|
9
|
+
* effectively closing the panel. It also updates the active application menu item
|
|
10
|
+
* using the `useEchoUserInterfaceStore` hook. If the provided `panelKey` does not
|
|
11
|
+
* match the currently active application menu item, the returned function exits early.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useClosePanelByKey(panelKey?: string): () => void;
|