@equinor/echo-framework 0.20.22 → 0.20.23-beta-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 +1 -1
- package/package.json +1 -1
- package/src/index.d.ts +4 -0
- package/src/lib/feature/legend/components/BasicLegendRenderer.d.ts +6 -0
- package/src/lib/feature/legend/components/LegendList.d.ts +5 -0
- package/src/lib/feature/legend/components/basicLegendRenderer.logic.d.ts +5 -0
- package/src/lib/feature/legend/components/pdfMarkers/PositionalItem.d.ts +8 -0
- package/src/lib/feature/legend/components/pdfMarkers/PositionalLegendMarkers.d.ts +24 -0
- package/src/lib/feature/legend/components/pdfMarkers/subComponents/LegendColoredMarkerIcon.d.ts +11 -0
- package/src/lib/feature/legend/components/pdfMarkers/subComponents/LegendMarkersRendererWithPopover.d.ts +13 -0
- package/src/lib/feature/legend/components/pdfMarkers/subComponents/MultipleMarkersByLegends.d.ts +21 -0
- package/src/lib/feature/legend/components/pdfMarkers/subComponents/iconPositionTransform.d.ts +18 -0
- package/src/lib/feature/legend/hooks/useLegendMarkers.d.ts +19 -0
- package/src/lib/feature/legend/index.d.ts +7 -0
- package/src/lib/feature/legend/legendFacade.d.ts +29 -0
- package/src/lib/feature/legend/legendStore.d.ts +43 -0
- package/src/lib/feature/legend/legendStrategies/legendCollections.d.ts +4 -0
- package/src/lib/feature/legend/legendStrategies/workOrderStrategy/WorkOrderLegend.d.ts +1 -0
- package/src/lib/feature/legend/legendUpdater.d.ts +2 -0
- package/src/lib/feature/legend/legendVisibleDataStore.d.ts +61 -0
- package/src/lib/feature/legend/types/legendMarkerBadge.type.d.ts +11 -0
- package/src/lib/feature/legend/types/legendStrategy.type.d.ts +11 -0
- package/src/lib/feature/legend/types/legendType.d.ts +15 -0
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -17,6 +17,10 @@ export { PanTo3DButton } from './lib/feature/globalSelection/panToEcho3d/panTo3D
|
|
|
17
17
|
export { useIsAllIGlobalSelectionItemsHidden } from './lib/feature/globalSelection/selectionMenu/hooks/useIsAllIGlobalSelectionItemsHidden';
|
|
18
18
|
export { GlobalSelectionCategoryId, SelectionMenuDefaultListIds } from './lib/feature/globalSelection/selectionMenu/selectionTreeStore/selectionTree.store.types';
|
|
19
19
|
export * from './lib/feature/legacyLegend/index';
|
|
20
|
+
export { PositionalLegendMarkers } from './lib/feature/legend/components/pdfMarkers/PositionalLegendMarkers';
|
|
21
|
+
export * from './lib/feature/legend/index';
|
|
22
|
+
export { subscribeToLegendDataChanged } from './lib/feature/legend/legendUpdater';
|
|
23
|
+
export type { LegendDataId, LegendEquipmentId, LegendState, LegendTagId } from './lib/feature/legend/types/legendType';
|
|
20
24
|
export { getLatestMeasurementDate, sortMeasuringPointsByMeasurementDate } from './lib/feature/measuringPoint/components/measuringPoints.utils';
|
|
21
25
|
export * from './lib/feature/measuringPoint/index';
|
|
22
26
|
export * from './lib/feature/measuringPoint/types/measuringPoint';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LegendChipProps } from '@equinor/echo-components';
|
|
2
|
+
import { Badge, Marker } from '../types/legendMarkerBadge.type';
|
|
3
|
+
import { LegendState } from '../types/legendType';
|
|
4
|
+
export declare const getMarkerChips: (markers: Marker[], legend: LegendState) => LegendChipProps[];
|
|
5
|
+
export declare const getBadgeChips: (badges: Badge[], legend: LegendState) => LegendChipProps[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Point } from '@equinor/echo-utils';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { LegendDataId } from '../../types/legendType';
|
|
4
|
+
interface LegendPositionItem {
|
|
5
|
+
itemId: LegendDataId;
|
|
6
|
+
position: Point;
|
|
7
|
+
hasPointer: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface PositionalLegendMarkersProps {
|
|
10
|
+
items: ReadonlyArray<LegendPositionItem>;
|
|
11
|
+
pdfRotation: number;
|
|
12
|
+
currentPageScale: number;
|
|
13
|
+
pdfZoom: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Component that renders positional legend markers on a PDF or on other view.
|
|
17
|
+
*
|
|
18
|
+
* @param {ReadonlyArray<LegendPositionItem>} items - Array of position items.
|
|
19
|
+
* @param {number} pdfRotation - The rotation angle of the PDF.
|
|
20
|
+
* @param {number} currentPageScale - The current scale of the PDF page.
|
|
21
|
+
* @param {number} pdfZoom - The zoom level of the PDF.
|
|
22
|
+
*/
|
|
23
|
+
export declare const PositionalLegendMarkers: React.FC<PositionalLegendMarkersProps>;
|
|
24
|
+
export {};
|
package/src/lib/feature/legend/components/pdfMarkers/subComponents/LegendColoredMarkerIcon.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LegendDataId } from '../../../types/legendType';
|
|
3
|
+
interface LegendColoredMarkerIconProps {
|
|
4
|
+
legendId: string;
|
|
5
|
+
itemId: LegendDataId;
|
|
6
|
+
hasPointer: boolean;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
onClick: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const MemoizedLegendColoredMarkerIcon: React.NamedExoticComponent<LegendColoredMarkerIconProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LegendDataId } from '../../../types/legendType';
|
|
3
|
+
interface LegendPositionItem {
|
|
4
|
+
itemId: LegendDataId;
|
|
5
|
+
positionString: string;
|
|
6
|
+
hasPointer: boolean;
|
|
7
|
+
popoverOffset: string;
|
|
8
|
+
}
|
|
9
|
+
interface LegendMarkersRendererWithPopoverProps {
|
|
10
|
+
positionItems: ReadonlyArray<LegendPositionItem>;
|
|
11
|
+
}
|
|
12
|
+
export declare const LegendMarkersRendererWithPopover: React.FC<LegendMarkersRendererWithPopoverProps>;
|
|
13
|
+
export {};
|
package/src/lib/feature/legend/components/pdfMarkers/subComponents/MultipleMarkersByLegends.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LegendDataId } from '../../../types/legendType';
|
|
3
|
+
interface MultipleMarkersByLegendsProps {
|
|
4
|
+
itemId: LegendDataId;
|
|
5
|
+
hasPointer: boolean;
|
|
6
|
+
popoverOffset: string;
|
|
7
|
+
setOpenItem: (value: PopoverContent | undefined) => void;
|
|
8
|
+
activeItem: ActiveItem | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface PopoverContent {
|
|
11
|
+
elements: JSX.Element[];
|
|
12
|
+
popoverOffset: string;
|
|
13
|
+
activeItem: ActiveItem;
|
|
14
|
+
}
|
|
15
|
+
interface ActiveItem {
|
|
16
|
+
itemId: LegendDataId;
|
|
17
|
+
legendId: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const MultipleMarkersByLegendsComponent: React.FC<MultipleMarkersByLegendsProps>;
|
|
20
|
+
export declare const MultipleMarkersByLegends: React.NamedExoticComponent<MultipleMarkersByLegendsProps>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Point } from '@equinor/echo-utils';
|
|
2
|
+
export declare const calculateIconScale: (currentPageScale: number) => number;
|
|
3
|
+
export declare function calculatePopoverStyling(args: {
|
|
4
|
+
pdfZoom: number;
|
|
5
|
+
hasPointer: boolean;
|
|
6
|
+
position: Point;
|
|
7
|
+
pdfRotation: number;
|
|
8
|
+
currentPageScale: number;
|
|
9
|
+
markerHeight: number;
|
|
10
|
+
}): string;
|
|
11
|
+
export declare function iconPositionTransform(args: {
|
|
12
|
+
position: Point;
|
|
13
|
+
pdfRotation: number;
|
|
14
|
+
currentPageScale: number;
|
|
15
|
+
isMobileDevice: boolean;
|
|
16
|
+
pdfZoom: number;
|
|
17
|
+
hasPointer: boolean;
|
|
18
|
+
}): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Badge, Marker } from '../types/legendMarkerBadge.type';
|
|
2
|
+
import { LegendDataId } from '../types/legendType';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the markers for the given legendId and itemId.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useLegendMarker(args: {
|
|
7
|
+
legendId: string;
|
|
8
|
+
itemId: LegendDataId;
|
|
9
|
+
}): Marker[];
|
|
10
|
+
/**
|
|
11
|
+
* Returns all unique markers for the given legendId, determined by unique markerKey (title + color).
|
|
12
|
+
*/
|
|
13
|
+
export declare function useLegendUniqueMarkers(args: {
|
|
14
|
+
legendId: string;
|
|
15
|
+
}): Marker[];
|
|
16
|
+
/**
|
|
17
|
+
* Returns all unique badges for the given legendId, determined by unique title + color.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useLegendUniqueBadges(legendId: string): Badge[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import './legendStrategies/workOrderStrategy/WorkOrderLegend';
|
|
2
|
+
export { LegendList as LegendsRenderer } from './components/LegendList';
|
|
3
|
+
export { PositionalItem } from './components/pdfMarkers/PositionalItem';
|
|
4
|
+
export { MultipleMarkersByLegends } from './components/pdfMarkers/subComponents/MultipleMarkersByLegends';
|
|
5
|
+
export { legendFacade } from './legendFacade';
|
|
6
|
+
export type { Badge, Marker } from './types/legendMarkerBadge.type';
|
|
7
|
+
export type { LegendStrategy } from './types/legendStrategy.type';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { legendSnapShot, useAllLegends, useLegendById } from './legendStore';
|
|
2
|
+
import { getLegendStrategy, injectLegendStrategy } from './legendStrategies/legendCollections';
|
|
3
|
+
import { legendVisibleDataSnapshot, useAddVisibleItems } from './legendVisibleDataStore';
|
|
4
|
+
export declare const legendFacade: Readonly<{
|
|
5
|
+
injectLegendStrategy: typeof injectLegendStrategy;
|
|
6
|
+
useVisibleDataStore: import("zustand").UseBoundStore<Omit<Omit<Omit<import("zustand").StoreApi<import("./legendVisibleDataStore").LegendVisibleData & import("./legendVisibleDataStore").LegendVisibleDataStoreActions>, "setState"> & {
|
|
7
|
+
setState<A extends string | {
|
|
8
|
+
type: string;
|
|
9
|
+
}>(partial: (import("./legendVisibleDataStore").LegendVisibleData & import("./legendVisibleDataStore").LegendVisibleDataStoreActions) | Partial<import("./legendVisibleDataStore").LegendVisibleData & import("./legendVisibleDataStore").LegendVisibleDataStoreActions> | ((state: import("./legendVisibleDataStore").LegendVisibleData & import("./legendVisibleDataStore").LegendVisibleDataStoreActions) => (import("./legendVisibleDataStore").LegendVisibleData & import("./legendVisibleDataStore").LegendVisibleDataStoreActions) | Partial<import("./legendVisibleDataStore").LegendVisibleData & import("./legendVisibleDataStore").LegendVisibleDataStoreActions>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
10
|
+
}, "subscribe"> & {
|
|
11
|
+
subscribe: {
|
|
12
|
+
(listener: (selectedState: import("./legendVisibleDataStore").LegendVisibleData & import("./legendVisibleDataStore").LegendVisibleDataStoreActions, previousSelectedState: import("./legendVisibleDataStore").LegendVisibleData & import("./legendVisibleDataStore").LegendVisibleDataStoreActions) => void): () => void;
|
|
13
|
+
<U>(selector: (state: import("./legendVisibleDataStore").LegendVisibleData & import("./legendVisibleDataStore").LegendVisibleDataStoreActions) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
14
|
+
equalityFn?: ((a: U, b: U) => boolean) | undefined;
|
|
15
|
+
fireImmediately?: boolean;
|
|
16
|
+
} | undefined): () => void;
|
|
17
|
+
};
|
|
18
|
+
}, "setState"> & {
|
|
19
|
+
setState(nextStateOrUpdater: (import("./legendVisibleDataStore").LegendVisibleData & import("./legendVisibleDataStore").LegendVisibleDataStoreActions) | Partial<import("./legendVisibleDataStore").LegendVisibleData & import("./legendVisibleDataStore").LegendVisibleDataStoreActions> | ((state: import("immer").WritableDraft<import("./legendVisibleDataStore").LegendVisibleData & import("./legendVisibleDataStore").LegendVisibleDataStoreActions>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
20
|
+
type: string;
|
|
21
|
+
} | undefined): void;
|
|
22
|
+
}>;
|
|
23
|
+
visibleDataSnapshot: typeof legendVisibleDataSnapshot;
|
|
24
|
+
storeSnapshot: typeof legendSnapShot;
|
|
25
|
+
getStrategy: typeof getLegendStrategy;
|
|
26
|
+
useLegendById: typeof useLegendById;
|
|
27
|
+
useAllLegends: typeof useAllLegends;
|
|
28
|
+
useAddVisibleItems: typeof useAddVisibleItems;
|
|
29
|
+
}>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { PersistOptions } from 'zustand/middleware';
|
|
2
|
+
import { LegendState } from './types/legendType';
|
|
3
|
+
interface LegendStoreData {
|
|
4
|
+
legends: Record<string, LegendState>;
|
|
5
|
+
}
|
|
6
|
+
interface LegendStoreActions {
|
|
7
|
+
updateLegend: (legendId: string, updates: Partial<LegendState>) => void;
|
|
8
|
+
setHiddenMarker: (legendId: string, marker: string, isHidden: boolean) => void;
|
|
9
|
+
setHiddenBadge: (legendId: string, badge: string, isHidden: boolean) => void;
|
|
10
|
+
getLegendById: (legendId: string) => LegendState | undefined;
|
|
11
|
+
}
|
|
12
|
+
type LegendStore = LegendStoreData & LegendStoreActions;
|
|
13
|
+
export declare const useLegendStore: import("zustand").UseBoundStore<Omit<Omit<Omit<Omit<import("zustand").StoreApi<LegendStore>, "setState"> & {
|
|
14
|
+
setState<A extends string | {
|
|
15
|
+
type: string;
|
|
16
|
+
}>(partial: LegendStore | Partial<LegendStore> | ((state: LegendStore) => LegendStore | Partial<LegendStore>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
17
|
+
}, "subscribe"> & {
|
|
18
|
+
subscribe: {
|
|
19
|
+
(listener: (selectedState: LegendStore, previousSelectedState: LegendStore) => void): () => void;
|
|
20
|
+
<U>(selector: (state: LegendStore) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
21
|
+
equalityFn?: ((a: U, b: U) => boolean) | undefined;
|
|
22
|
+
fireImmediately?: boolean;
|
|
23
|
+
} | undefined): () => void;
|
|
24
|
+
};
|
|
25
|
+
}, "persist"> & {
|
|
26
|
+
persist: {
|
|
27
|
+
setOptions: (options: Partial<PersistOptions<LegendStore, LegendStore>>) => void;
|
|
28
|
+
clearStorage: () => void;
|
|
29
|
+
rehydrate: () => Promise<void> | void;
|
|
30
|
+
hasHydrated: () => boolean;
|
|
31
|
+
onHydrate: (fn: (state: LegendStore) => void) => () => void;
|
|
32
|
+
onFinishHydration: (fn: (state: LegendStore) => void) => () => void;
|
|
33
|
+
getOptions: () => Partial<PersistOptions<LegendStore, LegendStore>>;
|
|
34
|
+
};
|
|
35
|
+
}, "setState"> & {
|
|
36
|
+
setState(nextStateOrUpdater: LegendStore | Partial<LegendStore> | ((state: import("immer").WritableDraft<LegendStore>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
37
|
+
type: string;
|
|
38
|
+
} | undefined): void;
|
|
39
|
+
}>;
|
|
40
|
+
export declare function useLegendById(legendId: string): LegendState;
|
|
41
|
+
export declare function useAllLegends(): LegendState[];
|
|
42
|
+
export declare function legendSnapShot(): LegendStore;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LegendStrategy } from '../types/legendStrategy.type';
|
|
2
|
+
import { LegendState } from '../types/legendType';
|
|
3
|
+
export declare function injectLegendStrategy(strategy: LegendStrategy, properties: Partial<LegendState>): void;
|
|
4
|
+
export declare function getLegendStrategy(strategyTypeName: string): LegendStrategy;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { LegendDataId, LegendEquipmentId, LegendTagId } from './types/legendType';
|
|
2
|
+
/**
|
|
3
|
+
* Maps (string) keyword to the data type.
|
|
4
|
+
* We don't have any other sources so far, pdf has TagNo and EquipmentId (ecm)
|
|
5
|
+
*/
|
|
6
|
+
type KnownDataTypes = {
|
|
7
|
+
Tag: LegendTagId;
|
|
8
|
+
Equipment: LegendEquipmentId;
|
|
9
|
+
};
|
|
10
|
+
type KnownDataTypeKeys = keyof KnownDataTypes;
|
|
11
|
+
type ResolvedDataType<T extends KnownDataTypeKeys> = KnownDataTypes[T];
|
|
12
|
+
/**
|
|
13
|
+
* Data structure:
|
|
14
|
+
* Data
|
|
15
|
+
* - Tag
|
|
16
|
+
* - key1: [data1, data2, ...]
|
|
17
|
+
* - key2: [data1, data2, ...]
|
|
18
|
+
* - Equipment
|
|
19
|
+
* - key1: [data1, data2, ...]
|
|
20
|
+
* ...
|
|
21
|
+
*/
|
|
22
|
+
interface LegendVisibleData {
|
|
23
|
+
data: LegendVisibleDataState;
|
|
24
|
+
}
|
|
25
|
+
type LegendVisibleDataState = {
|
|
26
|
+
[K in KnownDataTypeKeys]: {
|
|
27
|
+
[key: string]: ResolvedDataType<K>[];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export interface LegendVisibleDataStoreActions {
|
|
31
|
+
addData: <T extends KnownDataTypeKeys>(type: T, key: string, value: ResolvedDataType<T>[]) => void;
|
|
32
|
+
removeData: (key: string) => void;
|
|
33
|
+
getData: <T extends KnownDataTypeKeys>(type: T) => ResolvedDataType<T>[];
|
|
34
|
+
useDataByType: <T extends KnownDataTypeKeys>(type: T) => ResolvedDataType<T>[];
|
|
35
|
+
getAll(): LegendDataId[];
|
|
36
|
+
}
|
|
37
|
+
type LegendVisibleDataStore = LegendVisibleData & LegendVisibleDataStoreActions;
|
|
38
|
+
export declare const useLegendVisibleDataStore: import("zustand").UseBoundStore<Omit<Omit<Omit<import("zustand").StoreApi<LegendVisibleDataStore>, "setState"> & {
|
|
39
|
+
setState<A extends string | {
|
|
40
|
+
type: string;
|
|
41
|
+
}>(partial: LegendVisibleDataStore | Partial<LegendVisibleDataStore> | ((state: LegendVisibleDataStore) => LegendVisibleDataStore | Partial<LegendVisibleDataStore>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
42
|
+
}, "subscribe"> & {
|
|
43
|
+
subscribe: {
|
|
44
|
+
(listener: (selectedState: LegendVisibleDataStore, previousSelectedState: LegendVisibleDataStore) => void): () => void;
|
|
45
|
+
<U>(selector: (state: LegendVisibleDataStore) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
46
|
+
equalityFn?: ((a: U, b: U) => boolean) | undefined;
|
|
47
|
+
fireImmediately?: boolean;
|
|
48
|
+
} | undefined): () => void;
|
|
49
|
+
};
|
|
50
|
+
}, "setState"> & {
|
|
51
|
+
setState(nextStateOrUpdater: LegendVisibleDataStore | Partial<LegendVisibleDataStore> | ((state: import("immer").WritableDraft<LegendVisibleDataStore>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
52
|
+
type: string;
|
|
53
|
+
} | undefined): void;
|
|
54
|
+
}>;
|
|
55
|
+
export declare function legendVisibleDataSnapshot(): LegendVisibleDataStore;
|
|
56
|
+
/**
|
|
57
|
+
* Visible items are all items on screen that should be affected by the legend.
|
|
58
|
+
* @returns A function for adding visible items by type and key, which is automatically removed when the component unmounts.
|
|
59
|
+
*/
|
|
60
|
+
export declare function useAddVisibleItems(): <T extends KnownDataTypeKeys>(type: T, key: string, value: ResolvedDataType<T>[]) => void;
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface Marker {
|
|
2
|
+
getTitle: () => string;
|
|
3
|
+
getColor: () => string;
|
|
4
|
+
getIcon: () => string;
|
|
5
|
+
badges: Badge[];
|
|
6
|
+
}
|
|
7
|
+
export declare function markerKey(marker: Marker): string;
|
|
8
|
+
export interface Badge {
|
|
9
|
+
getColor: () => string;
|
|
10
|
+
getTitle: () => string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Marker } from './legendMarkerBadge.type';
|
|
2
|
+
import { LegendDataId } from './legendType';
|
|
3
|
+
export interface LegendStrategy {
|
|
4
|
+
legendId: string;
|
|
5
|
+
useMarkers: (itemIds: ReadonlyArray<LegendDataId>) => Marker[];
|
|
6
|
+
popoverContent: (itemId: LegendDataId) => React.JSX.Element[];
|
|
7
|
+
fetchData?: (visibleItemIds: ReadonlyArray<LegendDataId>) => Promise<void>;
|
|
8
|
+
markerOptions?: string[];
|
|
9
|
+
badgeOptions?: string[];
|
|
10
|
+
customLegendUi?: () => React.JSX.Element;
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GlobalSelectionTypes } from '../../globalSelection';
|
|
2
|
+
export interface LegendState {
|
|
3
|
+
legendId: string;
|
|
4
|
+
isEnabled: boolean;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
hiddenMarkers: string[];
|
|
7
|
+
hiddenBadges: string[];
|
|
8
|
+
selectedMarkerOption: string;
|
|
9
|
+
selectedBadgeOption: string;
|
|
10
|
+
isExpanded: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type LegendTagId = GlobalSelectionTypes.TagId;
|
|
13
|
+
export type LegendEquipmentId = GlobalSelectionTypes.EquipmentId;
|
|
14
|
+
export type LegendWorkOrderId = GlobalSelectionTypes.WorkOrderId;
|
|
15
|
+
export type LegendDataId = LegendTagId | LegendEquipmentId | LegendWorkOrderId;
|