@equinor/echo-framework 0.20.23-beta-1 → 0.21.0-beta-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 +1 -1
- package/package.json +4 -4
- package/src/index.d.ts +4 -6
- package/src/lib/feature/globalSelection/components/SelectionActionBar.d.ts +1 -2
- package/src/lib/feature/globalSelection/globalSelection.api.d.ts +101 -74
- package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.utils.d.ts +1 -1
- package/src/lib/feature/globalSelection/index.d.ts +1 -4
- package/src/lib/feature/globalSelection/selectionMenu/hooks/{useIsAllIGlobalSelectionItemsHidden.d.ts → useAllItemsHiddenByUser.d.ts} +2 -9
- package/src/lib/feature/globalSelection/selectionMenu/hooks/useSelectionMenuLists.d.ts +7 -0
- package/src/lib/feature/globalSelection/selectionMenu/selectionMenuStore/selectionMenu.store.d.ts +28 -0
- package/src/lib/feature/globalSelection/selectionMenu/selectionMenuStore/selectionMenu.store.types.d.ts +56 -0
- package/src/lib/feature/globalSelection/selectionMenu/selectionMenuStore/selectionMenu.store.utils.d.ts +56 -0
- package/src/lib/feature/globalSelection/hooks/useSelectionCategoriesByGroupId.d.ts +0 -11
- package/src/lib/feature/globalSelection/selectionMenu/hooks/useSelectionMenuGroups.d.ts +0 -7
- package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/selectionTree.store.d.ts +0 -37
- package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/selectionTree.store.types.d.ts +0 -84
- package/src/lib/feature/globalSelection/selectionMenu/selectionTreeStore/selectionTree.store.utils.d.ts +0 -53
- package/src/lib/feature/legend/components/BasicLegendRenderer.d.ts +0 -6
- package/src/lib/feature/legend/components/LegendList.d.ts +0 -5
- package/src/lib/feature/legend/components/basicLegendRenderer.logic.d.ts +0 -5
- package/src/lib/feature/legend/components/pdfMarkers/PositionalItem.d.ts +0 -8
- package/src/lib/feature/legend/components/pdfMarkers/PositionalLegendMarkers.d.ts +0 -24
- package/src/lib/feature/legend/components/pdfMarkers/subComponents/LegendColoredMarkerIcon.d.ts +0 -11
- package/src/lib/feature/legend/components/pdfMarkers/subComponents/LegendMarkersRendererWithPopover.d.ts +0 -13
- package/src/lib/feature/legend/components/pdfMarkers/subComponents/MultipleMarkersByLegends.d.ts +0 -21
- package/src/lib/feature/legend/components/pdfMarkers/subComponents/iconPositionTransform.d.ts +0 -18
- package/src/lib/feature/legend/hooks/useLegendMarkers.d.ts +0 -19
- package/src/lib/feature/legend/index.d.ts +0 -7
- package/src/lib/feature/legend/legendFacade.d.ts +0 -29
- package/src/lib/feature/legend/legendStore.d.ts +0 -43
- package/src/lib/feature/legend/legendStrategies/legendCollections.d.ts +0 -4
- package/src/lib/feature/legend/legendStrategies/workOrderStrategy/WorkOrderLegend.d.ts +0 -1
- package/src/lib/feature/legend/legendUpdater.d.ts +0 -2
- package/src/lib/feature/legend/legendVisibleDataStore.d.ts +0 -61
- package/src/lib/feature/legend/types/legendMarkerBadge.type.d.ts +0 -11
- package/src/lib/feature/legend/types/legendStrategy.type.d.ts +0 -11
- package/src/lib/feature/legend/types/legendType.d.ts +0 -15
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { GlobalSelectionTypes } from '../../globalSelectionStore/globalSelectionStore.types';
|
|
2
|
-
import { SelectionTreeTypes } from './selectionTree.store.types';
|
|
3
|
-
/**
|
|
4
|
-
* Check if an item ID is present in the selection tree.
|
|
5
|
-
*
|
|
6
|
-
* This function checks if a given item ID is present in the selection tree within a specific group and category.
|
|
7
|
-
* If groupId or categoryId is not provided, it checks all groups and categories.
|
|
8
|
-
*
|
|
9
|
-
* @param {Object} args - The function arguments.
|
|
10
|
-
* @param {GlobalSelectionTypes.ItemId} args.itemId - The ID of the item to check.
|
|
11
|
-
* @param {string} [args.groupId] - The ID of the group to check within (optional).
|
|
12
|
-
* @param {string} [args.categoryId] - The ID of the category to check within (optional).
|
|
13
|
-
* @param {SelectionTreeTypes.Group[]} args.groups - The selection tree groups to check within.
|
|
14
|
-
* @returns {boolean} True if the item ID is present in the selection tree, false otherwise.
|
|
15
|
-
*/
|
|
16
|
-
export declare function isItemIdInSelectionTree(args: {
|
|
17
|
-
itemId: GlobalSelectionTypes.ItemId;
|
|
18
|
-
groupId?: string;
|
|
19
|
-
categoryId?: string;
|
|
20
|
-
groups: SelectionTreeTypes.Group[];
|
|
21
|
-
}): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Find a selection category by group ID and optionally category ID.
|
|
24
|
-
*
|
|
25
|
-
* This function finds the group and optionally the category within the selection tree groups.
|
|
26
|
-
*
|
|
27
|
-
* @param {Object} args - The function arguments.
|
|
28
|
-
* @param {string} args.groupId - The ID of the group to search within.
|
|
29
|
-
* @param {string} [args.categoryId] - The ID of the category to search for (optional).
|
|
30
|
-
* @param {SelectionTreeTypes.Group[]} args.groups - The selection tree groups to search within.
|
|
31
|
-
* @returns {Object | undefined} The group and optionally the category, or undefined if not found.
|
|
32
|
-
*/
|
|
33
|
-
export declare function findSelectionCategoryById(args: {
|
|
34
|
-
groupId: string;
|
|
35
|
-
categoryId?: string;
|
|
36
|
-
groups: SelectionTreeTypes.Group[];
|
|
37
|
-
}): {
|
|
38
|
-
group: SelectionTreeTypes.Group;
|
|
39
|
-
category?: SelectionTreeTypes.Category;
|
|
40
|
-
} | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* Retrieves an array of itemIds that were not found in the selection menu.
|
|
43
|
-
*
|
|
44
|
-
* @param {Object} args - The arguments containing the list and itemIds to check.
|
|
45
|
-
* @param {SelectionTreeTypes.Group[]} args.groups - The list of SelectionMenuList objects to search through.
|
|
46
|
-
* @param {GlobalSelectionTypes.ItemId[]} args.itemIds - An array of ItemId objects to check for presence in the list.
|
|
47
|
-
* @returns {GlobalSelectionTypes.ItemId[]} An array of itemId strings that correspond to counts of 0 in the selection menu.
|
|
48
|
-
* itemIds object values are concatenated via '-' char
|
|
49
|
-
*/
|
|
50
|
-
export declare function itemsNotFoundInSelectionTree(args: {
|
|
51
|
-
groups: SelectionTreeTypes.Group[];
|
|
52
|
-
itemIds: GlobalSelectionTypes.ItemId[];
|
|
53
|
-
}): GlobalSelectionTypes.ItemId[];
|
|
@@ -1,5 +0,0 @@
|
|
|
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[];
|
|
@@ -1,24 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,13 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
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 {};
|
package/src/lib/feature/legend/components/pdfMarkers/subComponents/iconPositionTransform.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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;
|
|
@@ -1,19 +0,0 @@
|
|
|
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[];
|
|
@@ -1,7 +0,0 @@
|
|
|
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';
|
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
}>;
|
|
@@ -1,43 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,4 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,61 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
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;
|