@equinor/echo-framework 2.4.3 → 3.0.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 +8 -9
- package/src/index.d.ts +2 -0
- package/src/lib/components/router/index.d.ts +0 -2
- package/src/lib/feature/legend/components/NewLegendToggler.d.ts +7 -0
- package/src/lib/feature/legend/components/selectionLegend/selectionLegend.utils.d.ts +0 -5
- package/src/lib/feature/legend/index.d.ts +0 -1
- package/src/lib/feature/legend/legendStrategies/workOrderStrategy/WorkOrderLegend.d.ts +1 -1
- package/src/lib/feature/legend/logic/newLegendFeatureFlag.d.ts +5 -0
- package/src/lib/feature/legend/stores/legendDataLayerSync.d.ts +15 -0
- package/src/lib/services/eventCallbacks/plantChanged.d.ts +2 -2
- package/src/lib/components/router/echoRoute.d.ts +0 -11
- package/src/lib/components/router/echoRouter.d.ts +0 -6
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/echo-framework",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@equinor/echo-base": ">=
|
|
6
|
-
"@equinor/echo-components": ">=
|
|
7
|
-
"@equinor/echo-core": ">=
|
|
8
|
-
"@equinor/echo-search": ">=
|
|
9
|
-
"@equinor/echo-utils": ">=
|
|
5
|
+
"@equinor/echo-base": ">= 3.0.0 < 4.0.0",
|
|
6
|
+
"@equinor/echo-components": ">= 3.0.0 < 4.0.0",
|
|
7
|
+
"@equinor/echo-core": ">= 3.0.0 < 4.0.0",
|
|
8
|
+
"@equinor/echo-search": ">= 3.0.0 < 4.0.0",
|
|
9
|
+
"@equinor/echo-utils": ">= 3.0.0 < 4.0.0",
|
|
10
10
|
"@equinor/eds-core-react": "0.49.0",
|
|
11
11
|
"@equinor/eds-icons": "0.22.0",
|
|
12
12
|
"react": ">= 17.0.2",
|
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
"@tanstack/react-query": ">= 5.14.2 < 6",
|
|
15
15
|
"@microsoft/signalr": "9.0.6",
|
|
16
16
|
"classnames": "2.5.1",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"react-router-dom": "5.3.4",
|
|
17
|
+
"lodash": ">= 4.17.23 < 5",
|
|
18
|
+
"react-router-dom": ">= 6.30.1 < 7",
|
|
20
19
|
"zustand": ">= 4.4.7 < 5",
|
|
21
20
|
"immer": "11.1.3",
|
|
22
21
|
"msw": "2.12.7"
|
package/src/index.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ export { legendVisibleTagsSubscribeToStore } from './lib/feature/legend/stores/l
|
|
|
31
31
|
export { knownLegendIds } from './lib/feature/legend/types/legendType';
|
|
32
32
|
export type { LegendDataId, LegendEquipmentId, LegendId, LegendState, LegendTagId } from './lib/feature/legend/types/legendType';
|
|
33
33
|
export type { Brand } from '@equinor/echo-utils';
|
|
34
|
+
export { NewLegendToggler } from './lib/feature/legend/components/NewLegendToggler';
|
|
35
|
+
export { newLegendFeatureFlag } from './lib/feature/legend/logic/newLegendFeatureFlag';
|
|
34
36
|
export { getLatestMeasurementDate, sortMeasuringPointsByMeasurementDate } from './lib/feature/measuringPoint/components/measuringPoints.utils';
|
|
35
37
|
export * from './lib/feature/measuringPoint/index';
|
|
36
38
|
export * from './lib/feature/measuringPoint/types/measuringPoint';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TODO: Remove this component when the new legend is fully launched.
|
|
3
|
+
* A non-reactive toggle component for enabling/disabling the new legend feature flag.
|
|
4
|
+
* The flag state is stored in local storage, and changing it reloads the application.¨
|
|
5
|
+
* @deprecated Only for temporary development purposes.
|
|
6
|
+
*/
|
|
7
|
+
export declare const NewLegendToggler: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { Guid } from '@equinor/echo-utils';
|
|
2
2
|
import { GlobalSelectionItemType } from '../../../globalSelection';
|
|
3
3
|
import { ColorGroupedMarker, GroupKey } from '../pdfMarkers/utils/splitMarkerByColor.types';
|
|
4
|
-
/**
|
|
5
|
-
* TODO: Remove this flag when Selection Legend is stable and ready for production
|
|
6
|
-
* Flag to enable/disable Selection Legend feature
|
|
7
|
-
*/
|
|
8
|
-
export declare const isSelectionLegendEnabled: () => boolean;
|
|
9
4
|
/**
|
|
10
5
|
* Key used for badges that don't belong to any selection group
|
|
11
6
|
*/
|
|
@@ -16,5 +16,4 @@ export { useLegendUniqueBadges } from './hooks/useLegendUniqueBadges';
|
|
|
16
16
|
export { useLegendUniqueMarkers } from './hooks/useLegendUniqueMarkers';
|
|
17
17
|
export { COUNT_MODE_KEYWORD } from './logic/normalizeBadges';
|
|
18
18
|
export { useLegendVisibleDataStore } from './stores/legendVisibleDataStore/legendVisibleDataStore';
|
|
19
|
-
export { isWorkOrderLegendFeatureEnabled } from './legendStrategies/workOrderStrategy/WorkOrderLegend';
|
|
20
19
|
export { useLegendUIStore } from './stores/legendUIStore/legendUIStore';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LegendId } from '../types/legendType';
|
|
2
|
+
/**
|
|
3
|
+
* Gets the current visibility state from the data layer panel for a given legend.
|
|
4
|
+
* Returns undefined if the legend has no corresponding data layer setting.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getDataLayerVisibilityForLegend(legendId: LegendId): boolean | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Initializes a subscription that syncs a legend's enabled state with its data layer panel visibility setting.
|
|
9
|
+
* When a user toggles a data layer (e.g., Tags, Equipment, Work Orders), the corresponding legend
|
|
10
|
+
* is automatically enabled/disabled.
|
|
11
|
+
*
|
|
12
|
+
* This is a one-way sync: DataLayerPanelStore → LegendStore
|
|
13
|
+
* The data layer panel is the source of truth for what the user wants visible.
|
|
14
|
+
*/
|
|
15
|
+
export declare function initializeLegendDataLayerSync(legendId: LegendId): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Plant } from '@equinor/echo-core';
|
|
2
|
-
import {
|
|
2
|
+
import { NavigateFunction } from 'react-router-dom';
|
|
3
3
|
/**
|
|
4
4
|
* Callback function to be used with the event listener for changing plants.
|
|
5
5
|
* Sets the selected plant in our local storage.
|
|
6
6
|
* @param {Plant} newSelectedPlant
|
|
7
7
|
* @return {*} {Promise<void>}
|
|
8
8
|
*/
|
|
9
|
-
export declare const handlePlantChanged: (newSelectedPlant: Plant,
|
|
9
|
+
export declare const handlePlantChanged: (newSelectedPlant: Plant, navigate: NavigateFunction, stayOnPath?: boolean) => Promise<void>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AppComponentProps, WrappedComponent } from '@equinor/echo-core';
|
|
2
|
-
import React, { ErrorInfo } from 'react';
|
|
3
|
-
interface EchoRouteProps {
|
|
4
|
-
component: WrappedComponent<AppComponentProps>;
|
|
5
|
-
layoutKey?: string;
|
|
6
|
-
path: string;
|
|
7
|
-
errorHandler?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
8
|
-
exactPath?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const EchoRoute: React.FC<EchoRouteProps>;
|
|
11
|
-
export {};
|