@equinor/echo-framework 1.1.1 → 1.2.0
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 +3 -3
- package/package.json +6 -6
- package/src/lib/components/panel/useCalculateLegendHeight.d.ts +1 -0
- package/src/lib/feature/globalSelection/globalSelection.internal.d.ts +2 -1
- package/src/lib/feature/globalSelection/index.d.ts +2 -0
- package/src/lib/feature/globalSelection/selectionMenu/hooks/useFetchSelectionHistory.d.ts +5 -0
- package/src/lib/feature/globalSelection/selectionMenu/invalidateHistorySelectionQuery.d.ts +1 -0
- package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/api/selectionTree.api.d.ts +3 -2
- package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/persist/selectionTree.load.utils.d.ts +13 -1
- package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/selectionTree.api.types.d.ts +6 -0
- package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/selectionTree.store.types.d.ts +1 -0
- package/src/lib/types/dataAccess/dataAccessLinks.d.ts +1 -0
- package/src/lib/coreApplication/BarComponents/SelectionStatusDotIndicator.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/echo-framework",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@equinor/echo-base": ">= 1.
|
|
6
|
-
"@equinor/echo-components": ">= 1.0
|
|
7
|
-
"@equinor/echo-core": ">= 1.0
|
|
8
|
-
"@equinor/echo-search": ">= 1.0
|
|
9
|
-
"@equinor/echo-utils": ">= 1.
|
|
5
|
+
"@equinor/echo-base": ">= 1.2.0 < 2.0.0",
|
|
6
|
+
"@equinor/echo-components": ">= 1.2.0 < 2.0.0",
|
|
7
|
+
"@equinor/echo-core": ">= 1.2.0 < 2.0.0",
|
|
8
|
+
"@equinor/echo-search": ">= 1.2.0 < 2.0.0",
|
|
9
|
+
"@equinor/echo-utils": ">= 1.2.0 < 2.0.0",
|
|
10
10
|
"@equinor/eds-core-react": "0.43.0",
|
|
11
11
|
"@equinor/eds-icons": "0.22.0",
|
|
12
12
|
"react": ">= 17.0.2",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useCalculateLegendHeight: () => number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Guid } from '@equinor/echo-utils';
|
|
2
|
-
import { deleteSelectionId, fetchUserSelectionIds } from './selectionMenu/selectionTreeStore/api/selectionTree.api';
|
|
2
|
+
import { deleteSelectionId, fetchSelectionHistory, fetchUserSelectionIds } from './selectionMenu/selectionTreeStore/api/selectionTree.api';
|
|
3
3
|
/**
|
|
4
4
|
* Internal that should only be used by echopedia
|
|
5
5
|
*/
|
|
@@ -7,6 +7,7 @@ export declare const globalSelectionInternal: Readonly<{
|
|
|
7
7
|
loadFromApi: typeof loadFromApi;
|
|
8
8
|
deleteSelectionId: typeof deleteSelectionId;
|
|
9
9
|
fetchUserSelectionIds: typeof fetchUserSelectionIds;
|
|
10
|
+
fetchSelectionHistory: typeof fetchSelectionHistory;
|
|
10
11
|
}>;
|
|
11
12
|
declare function loadFromApi(idToLoad: Guid): Promise<boolean>;
|
|
12
13
|
export {};
|
|
@@ -11,6 +11,7 @@ export { useSelectionCategoriesByGroupId } from './hooks/useSelectionCategoriesB
|
|
|
11
11
|
export { useCurrentSelectionId } from './selectionMenu/hooks/useCurrentSelectionId';
|
|
12
12
|
export { useGlobalSelectionGroups } from './selectionMenu/hooks/useGlobalSelectionGroups';
|
|
13
13
|
export { useMostUsedSelectionColorByIds } from './selectionMenu/hooks/useSelectionColorFrequency';
|
|
14
|
+
export { useFetchSelectionHistory } from './selectionMenu/hooks/useFetchSelectionHistory';
|
|
14
15
|
export { RemoveSelectionItemsConfirmDialog } from './components/RemoveSelectionItemsConfirmDialog';
|
|
15
16
|
export { globalSelectionApi } from './globalSelection.api';
|
|
16
17
|
export { globalSelectionInternal } from './globalSelection.internal';
|
|
@@ -19,5 +20,6 @@ export { globalSelectionUtils } from './globalSelectionStore/globalSelectionStor
|
|
|
19
20
|
export { OpenGlobalSelectionIn3DButton } from './OpenGlobalSelectionIn3DButton';
|
|
20
21
|
export { convertGlobalSelectionItemsToPlantTagPairs } from './OpenGlobalSelectionIn3DButton.utils';
|
|
21
22
|
export { saveEquipmentAsNewSelectionToApi } from './selectionMenu/selectionTreeStore/api/selectionTree.equipment';
|
|
23
|
+
export { invalidateHistorySelectionQuery } from './selectionMenu/invalidateHistorySelectionQuery';
|
|
22
24
|
export { SelectionColorConflictDialog } from './selectionMenu/selectionTreeStore/colorConflictHandling/SelectionColorConflictDialog';
|
|
23
25
|
export { simulatedSelectionTreeApiError } from './selectionMenu/selectionTreeStore/persist/devOnlySimulateOffline';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const invalidateHistorySelectionQuery: () => Promise<void>;
|
package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/api/selectionTree.api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Guid } from '@equinor/echo-utils';
|
|
2
|
-
import { ApiSelectionTreeRoot, ApiSelectionTreeRootBase } from '../selectionTree.api.types';
|
|
2
|
+
import { ApiSelectionHistory, ApiSelectionTreeRoot, ApiSelectionTreeRootBase } from '../selectionTree.api.types';
|
|
3
3
|
import { SelectionGroup } from '../selectionTree.store.types';
|
|
4
4
|
/**
|
|
5
5
|
* Maps the selection tree data to the API format.
|
|
@@ -15,5 +15,6 @@ export declare function saveSelectionTreeToApi(args: {
|
|
|
15
15
|
itemToSave: ApiSelectionTreeRootBase;
|
|
16
16
|
}): Promise<Guid | undefined>;
|
|
17
17
|
export declare function fetchSelectionTreeById(id: string): Promise<ApiSelectionTreeRoot | undefined>;
|
|
18
|
+
export declare function fetchSelectionHistory(): Promise<ApiSelectionHistory[] | undefined>;
|
|
18
19
|
export declare function fetchUserSelectionIds(): Promise<Guid[]>;
|
|
19
|
-
export declare function deleteSelectionId(id:
|
|
20
|
+
export declare function deleteSelectionId(id: Guid): Promise<void>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ApiSelectionGroup, ApiSelectionTreeRootBase } from '../selectionTree.api.types';
|
|
2
1
|
import { GlobalSelectionItemType, GlobalSelectionObject, GlobalSelectionTypes } from '../../../globalSelectionStore/globalSelectionStore.types';
|
|
2
|
+
import { ApiSelectionGroup, ApiSelectionTreeRootBase } from '../selectionTree.api.types';
|
|
3
|
+
import { SelectionGroup } from '../selectionTree.store.types';
|
|
3
4
|
/**
|
|
4
5
|
* Processes API selection tree data and organizes item IDs by their types.
|
|
5
6
|
*
|
|
@@ -40,3 +41,14 @@ export declare function createListsByTypeFromApiData({ data }: {
|
|
|
40
41
|
* @returns A new array of selection groups with colors assigned to items as needed.
|
|
41
42
|
*/
|
|
42
43
|
export declare function applyColorsOnSelectionApiData(groups: ApiSelectionGroup[]): ApiSelectionGroup[];
|
|
44
|
+
/**
|
|
45
|
+
* Builds an array of `SelectionGroup` objects from the provided API selection tree root.
|
|
46
|
+
*
|
|
47
|
+
* This function maps the API data structure into the application's selection tree format,
|
|
48
|
+
* transforming each group and its categories accordingly. It also ensures that the local
|
|
49
|
+
* selection group is inserted at the correct position within the resulting array.
|
|
50
|
+
*
|
|
51
|
+
* @param root - The root object from the API containing selection tree data.
|
|
52
|
+
* @returns An array of `SelectionGroup` objects constructed from the API data, with the local selection group positioned as specified.
|
|
53
|
+
*/
|
|
54
|
+
export declare function buildSelectionTreeFromApi(root: ApiSelectionTreeRootBase): SelectionGroup[];
|
|
@@ -31,4 +31,10 @@ export interface ApiSelectionTreeItem {
|
|
|
31
31
|
readonly id: ApiSelectionTreeItemId;
|
|
32
32
|
readonly metaData?: ApiGlobalSelectionMetaData;
|
|
33
33
|
}
|
|
34
|
+
export interface ApiSelectionHistory {
|
|
35
|
+
readonly id: Guid;
|
|
36
|
+
readonly lastChangedUtc: Date;
|
|
37
|
+
readonly totalItems: number;
|
|
38
|
+
}
|
|
34
39
|
export declare function cleanApiSelectionTreeRoot(root: ApiSelectionTreeRoot): ApiSelectionTreeRoot;
|
|
40
|
+
export declare function cleanApiSelectionHistory(roots: ApiSelectionHistory[]): ApiSelectionHistory[];
|
|
@@ -29,6 +29,7 @@ export interface SelectionTreeData {
|
|
|
29
29
|
currentSelectionId?: Guid;
|
|
30
30
|
readonly groups: SelectionGroup[];
|
|
31
31
|
}
|
|
32
|
+
export declare const itemTypeToCategoryId: Record<GlobalSelectionItemType, GlobalSelectionCategoryId>;
|
|
32
33
|
export interface SelectionTreeStore extends SelectionTreeData {
|
|
33
34
|
setCurrentSelectionId: (args: {
|
|
34
35
|
guid: Guid | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function SelectionStatusDotIndicator(): import("react/jsx-runtime").JSX.Element | null;
|