@mappedin/viewer 0.53.2-cf1d87e.0 → 0.53.2-ddb45b8.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/dist/index.js +68068 -68502
- package/dist/types/src/components/common/utils.d.ts +4 -5
- package/dist/types/src/lib/utils/data-utils.d.ts +1 -13
- package/dist/types/src/lib/utils/object-utils.d.ts +0 -4
- package/dist/types/src/lib/utils/process-places.d.ts +1 -2
- package/dist/types/src/stores/map-store/controllers/geometries.d.ts +5 -3
- package/dist/types/src/stores/map-store/controllers/labels.d.ts +2 -2
- package/dist/types/src/stores/map-store/controllers/markers.d.ts +1 -0
- package/dist/types/src/stores/map-store/index.d.ts +1 -5
- package/dist/types/src/stores/root-store/index.d.ts +2 -9
- package/package.json +2 -4
- package/dist/types/src/lib/types/area-state.d.ts +0 -1
- package/dist/types/src/lib/utils/geojson-utils.d.ts +0 -8
- package/dist/types/src/lib/utils/geojson-utils.test.d.ts +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Place } from '../../lib/sdk';
|
|
2
2
|
import { E_DEPARTURE_MODE } from '../../lib/types/directions';
|
|
3
3
|
import { E_APP_STATE } from '../../lib/types/state';
|
|
4
|
-
import { TAreaState } from '../../lib/types/area-state';
|
|
5
4
|
export type Transient<T> = {
|
|
6
5
|
[K in keyof T as K extends `$${string}` ? K : `$${K & string}`]: T[K];
|
|
7
6
|
};
|
|
@@ -27,9 +26,9 @@ type TGenerateGlobalClassNamesOptions = {
|
|
|
27
26
|
darkMode: boolean;
|
|
28
27
|
departureMode: E_DEPARTURE_MODE;
|
|
29
28
|
safetyMode: boolean;
|
|
30
|
-
|
|
29
|
+
areaZoomed: boolean;
|
|
31
30
|
};
|
|
32
|
-
export declare const generateGlobalClassNames: ({ state, selectedPlaces, departures, droppedPinHoverVisible, darkMode, departureMode, safetyMode,
|
|
31
|
+
export declare const generateGlobalClassNames: ({ state, selectedPlaces, departures, droppedPinHoverVisible, darkMode, departureMode, safetyMode, areaZoomed, }: TGenerateGlobalClassNamesOptions) => string;
|
|
33
32
|
/**
|
|
34
33
|
* Low level utility to generate class name selectors. Do not use this directly.
|
|
35
34
|
*/
|
|
@@ -136,5 +135,5 @@ export declare const isSafetyMode: (safetyMode: boolean) => ((...args: any) => s
|
|
|
136
135
|
* threshold. Requires {@link generateGlobalClassNames} to be used to apply the correct class names
|
|
137
136
|
* to the root element.
|
|
138
137
|
*/
|
|
139
|
-
export declare const
|
|
138
|
+
export declare const isAreaZoomed: (zoomed: boolean) => ((...args: any) => string);
|
|
140
139
|
export {};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Any utilities that work on MapData from the SDK should be in this file.
|
|
3
|
-
*/
|
|
4
|
-
import { Annotation, Place, Coordinate, TNavigationTarget, Floor, LocationProfile, IFocusable, Geometry, LocationCategory, Area } from '../sdk';
|
|
1
|
+
import { Annotation, Place, Coordinate, TNavigationTarget, Floor, LocationProfile, IFocusable, Geometry, LocationCategory } from '../sdk';
|
|
5
2
|
import OpeningHours from '../time/opening-hours';
|
|
6
3
|
/**
|
|
7
4
|
* Whether the location can be assumed to be a washroom
|
|
@@ -71,12 +68,3 @@ export declare const isGeometry: (place: object) => place is Geometry;
|
|
|
71
68
|
export declare const isPlace: (place: object) => place is Place;
|
|
72
69
|
export declare const flattenCategories: (categories: LocationCategory[]) => LocationCategory[];
|
|
73
70
|
export declare const filterPlacesByCategories: <T extends Place>(places: T[], categories: LocationCategory[]) => T[];
|
|
74
|
-
/**
|
|
75
|
-
* Given an array of {@link Area}s, compute the depth of each area. The depth is the number of areas that fully
|
|
76
|
-
* contain this area.
|
|
77
|
-
*
|
|
78
|
-
* Note that this is most often, but not necessarily, how deep the area is in a tree of containment. For example,
|
|
79
|
-
* an area may be contained fully by two overlapping areas that themselves are not fully contained by any other
|
|
80
|
-
* areas. The contained area will have a depth of 2, but its parents with both have a depth of 0.
|
|
81
|
-
*/
|
|
82
|
-
export declare const computeAreaDepths: (areas: Area[]) => Record<string, number>;
|
|
@@ -19,8 +19,4 @@ export declare const hasArray: <T extends object>(object: T, key: string) => boo
|
|
|
19
19
|
* Whether the object has a string property with a length greater than 0.
|
|
20
20
|
*/
|
|
21
21
|
export declare const hasString: <T extends object>(object: T, key: string) => boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Split an object into two objects, one with only the specified keys, and one with all other keys.
|
|
24
|
-
*/
|
|
25
|
-
export declare const splitObject: <T extends object, K extends keyof T>(obj: T, keys: K[]) => [Pick<T, K>, Omit<T, K>];
|
|
26
22
|
export {};
|
|
@@ -23,9 +23,8 @@ type TProcessedPlaces = {
|
|
|
23
23
|
floorStacksByNameNormalized: Record<string, FloorStack>;
|
|
24
24
|
categoriesByNameNormalized: Record<string, LocationCategory>;
|
|
25
25
|
geometryRbushByFloorId: Record<string, RBush<Polygon, TRbushLookupProperties>>;
|
|
26
|
-
pointRbushByFloorId: Record<string, RBush<Point, TRbushLookupProperties>>;
|
|
26
|
+
pointRbushByFloorId: Record<string, RBush<Point | Polygon, TRbushLookupProperties>>;
|
|
27
27
|
facadesBySpaceId: Record<string, Facade>;
|
|
28
|
-
areaDepthsById: Record<string, number>;
|
|
29
28
|
};
|
|
30
29
|
/**
|
|
31
30
|
* Generate a bunch of useful immutable collections from the map data.
|
|
@@ -7,6 +7,8 @@ declare class GeometriesController {
|
|
|
7
7
|
private reactionDisposers;
|
|
8
8
|
private cachedHighlightedGeometries;
|
|
9
9
|
private cachedInteractiveGeometries;
|
|
10
|
+
private shapesByAreaId;
|
|
11
|
+
private cachedHighlightedAreas;
|
|
10
12
|
focusedFloorStacks: FloorStack[];
|
|
11
13
|
constructor({ rootStore, mapStore }: {
|
|
12
14
|
rootStore: RootStore;
|
|
@@ -19,9 +21,9 @@ declare class GeometriesController {
|
|
|
19
21
|
private syncGeometryStateWithTheme;
|
|
20
22
|
private highlightGeometry;
|
|
21
23
|
private highlightGeometries;
|
|
22
|
-
private
|
|
23
|
-
private
|
|
24
|
-
private
|
|
24
|
+
private unhighlightArea;
|
|
25
|
+
private highlightArea;
|
|
26
|
+
private highlightAreas;
|
|
25
27
|
private setInteractivityForGeometry;
|
|
26
28
|
private initInteractiveGeometries;
|
|
27
29
|
private updateDefaultFloorForFloorStackByElevation;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type MapStore from '..';
|
|
2
2
|
import type RootStore from '../../root-store';
|
|
3
|
-
import { Place, Label,
|
|
3
|
+
import { Place, Label, Floor, Facade } from '../../../lib/sdk';
|
|
4
4
|
import { FloorStack } from '@mappedin/mappedin-js';
|
|
5
5
|
declare class LabelsController {
|
|
6
6
|
private rootStore;
|
|
@@ -9,7 +9,7 @@ declare class LabelsController {
|
|
|
9
9
|
private state;
|
|
10
10
|
private isImageLabelDark;
|
|
11
11
|
private labelImagesProcessed;
|
|
12
|
-
|
|
12
|
+
labelsInAreas: Set<Label>;
|
|
13
13
|
initialized: boolean;
|
|
14
14
|
syncedWithTheme: boolean;
|
|
15
15
|
placeLabels: Label[];
|
|
@@ -6,12 +6,11 @@ import DirectionsController from './controllers/directions';
|
|
|
6
6
|
import CameraController from './controllers/camera';
|
|
7
7
|
import LabelsController from './controllers/labels';
|
|
8
8
|
import HoverController from './controllers/hover';
|
|
9
|
-
import {
|
|
9
|
+
import { MapView } from '../../lib/sdk';
|
|
10
10
|
import EventsController from './controllers/events';
|
|
11
11
|
import ArcController from './controllers/arc';
|
|
12
12
|
import BlueDotController from './controllers/blue-dot';
|
|
13
13
|
import { DynamicFocus } from '@mappedin/dynamic-focus';
|
|
14
|
-
import { TAreaState } from '../../lib/types/area-state';
|
|
15
14
|
export declare const ATTRIBUTION_MARGIN = 20;
|
|
16
15
|
declare class MapStore {
|
|
17
16
|
private rootStore;
|
|
@@ -48,11 +47,8 @@ declare class MapStore {
|
|
|
48
47
|
private syncCameraInteractions;
|
|
49
48
|
get mapView(): Omit<MapView, 'on' | 'off'> | null;
|
|
50
49
|
get interactionMode(): E_MAP_INTERACTION_MODE;
|
|
51
|
-
get areaInteriorsVisible(): boolean;
|
|
52
|
-
get maximumVisibleAreaDepth(): number;
|
|
53
50
|
get initialized(): boolean;
|
|
54
51
|
init(container: HTMLElement): Promise<void>;
|
|
55
|
-
getAreaState(area: Area): TAreaState;
|
|
56
52
|
onContainerFocus(): void;
|
|
57
53
|
onContainerBlur(): void;
|
|
58
54
|
cleanup(): void;
|
|
@@ -84,7 +84,6 @@ declare class RootStore {
|
|
|
84
84
|
readonly geometryRbushByFloorId: ReturnType<typeof processPlaces>['geometryRbushByFloorId'];
|
|
85
85
|
readonly pointRbushByFloorId: ReturnType<typeof processPlaces>['pointRbushByFloorId'];
|
|
86
86
|
readonly facadesBySpaceId: Record<string, Facade>;
|
|
87
|
-
readonly areaDepthsById: Record<string, number>;
|
|
88
87
|
constructor({ router, featureFlagStore, data, startupOptions, mvf, mapId, configId, configName, isMobile, isMini, theme, }: {
|
|
89
88
|
router: RouterStore;
|
|
90
89
|
featureFlagStore: FeatureFlagStore;
|
|
@@ -109,6 +108,7 @@ declare class RootStore {
|
|
|
109
108
|
private syncSelectedCategory;
|
|
110
109
|
private syncCurrentFloor;
|
|
111
110
|
private syncDeparture;
|
|
111
|
+
private getMVFConnectionFeatureById;
|
|
112
112
|
private isFloorEmpty;
|
|
113
113
|
get title(): string;
|
|
114
114
|
get timeZone(): string;
|
|
@@ -126,8 +126,6 @@ declare class RootStore {
|
|
|
126
126
|
get isOutdoorsVisible(): boolean;
|
|
127
127
|
get isBlueDotEnabled(): string | boolean;
|
|
128
128
|
get isMultiFloorViewEnabled(): boolean;
|
|
129
|
-
get hasNestedAreas(): boolean;
|
|
130
|
-
get areaDepths(): string[][];
|
|
131
129
|
get dynamicFocusBuildingChangeMode(): DynamicFocusMode;
|
|
132
130
|
get onlineDirections(): boolean;
|
|
133
131
|
/**
|
|
@@ -219,12 +217,7 @@ declare class RootStore {
|
|
|
219
217
|
departures?: Place[] | undefined;
|
|
220
218
|
}): string;
|
|
221
219
|
/**
|
|
222
|
-
*
|
|
223
|
-
*/
|
|
224
|
-
getParentAreaDepth(area: Area): number;
|
|
225
|
-
/**
|
|
226
|
-
* Get all the places whose relevant coordinates (usually the center) are within the area and not within
|
|
227
|
-
* any further nested areas.
|
|
220
|
+
* Get all the places whose relevant coordinates (usually the center) are within the area.
|
|
228
221
|
*/
|
|
229
222
|
getPlacesWithinArea(area: Area): Set<Place>;
|
|
230
223
|
getFloorBeneathCoordinate(coordinate: Coordinate): Floor | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mappedin/viewer",
|
|
3
|
-
"version": "0.53.2-
|
|
3
|
+
"version": "0.53.2-ddb45b8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"browser": "./dist/index.js",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -20,14 +20,12 @@
|
|
|
20
20
|
"@ladle/react": "^2.17.2",
|
|
21
21
|
"@mappedin/dynamic-focus": "6.0.1-pr-1037-bl-SDKS-3363-06dabc34.0",
|
|
22
22
|
"@mappedin/mappedin-js": "6.0.1-pr-1037-bl-SDKS-3363-06dabc34.0",
|
|
23
|
-
"@mappedin/blue-dot": "6.0.1-
|
|
23
|
+
"@mappedin/blue-dot": "6.0.1-canary-v6-899786eb.871",
|
|
24
24
|
"@mappedin/mvf": "3.0.0-69b7308.0",
|
|
25
25
|
"@mappedin/self-serve-icons": "1.105.0-alpha.SRV-2719-add-bleed-kit-annotation.1754600609",
|
|
26
26
|
"@testing-library/jest-dom": "^6.6.2",
|
|
27
27
|
"@testing-library/react": "^14.2.2",
|
|
28
|
-
"@turf/boolean-contains": "^7.2.0",
|
|
29
28
|
"@turf/boolean-point-in-polygon": "^7.2.0",
|
|
30
|
-
"@turf/difference": "^7.2.0",
|
|
31
29
|
"@turf/geojson-rbush": "^7.2.0",
|
|
32
30
|
"@turf/helpers": "^7.2.0",
|
|
33
31
|
"@types/geojson": "^7946.0.16",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type TAreaState = 'hidden' | 'filled' | 'open';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Feature, GeoJsonProperties, Geometry } from 'geojson';
|
|
2
|
-
/**
|
|
3
|
-
* Returns true if the second feature is completely contained within the first feature.
|
|
4
|
-
*
|
|
5
|
-
* This is preferable over Turf's `booleanContains` when working with concave polygons,
|
|
6
|
-
* because Turf cannot handle them correctly.
|
|
7
|
-
*/
|
|
8
|
-
export declare const betterBooleanContains: (feature1: Feature<Geometry, GeoJsonProperties>, feature2: Feature<Geometry, GeoJsonProperties>) => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|