@mappedin/viewer 0.52.3-e96fd64.0 → 0.53.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/CHANGELOG.md +15 -0
- package/dist/index.js +170891 -114739
- package/dist/types/src/lib/sdk/hydrate-directions.d.ts +2 -0
- package/dist/types/src/lib/sdk/online-directions.d.ts +1 -2
- package/dist/types/src/lib/sdk/types.d.ts +2 -2
- package/dist/types/src/lib/types/options.d.ts +9 -0
- package/dist/types/src/lib/utils/data-utils.d.ts +3 -1
- package/dist/types/src/stores/map-store/controllers/blue-dot.d.ts +5 -2
- package/dist/types/src/stores/map-store/controllers/directions.d.ts +2 -2411
- package/dist/types/src/stores/map-store/controllers/labels.d.ts +1 -1
- package/dist/types/src/stores/map-store/controllers/markers.d.ts +1 -0
- package/dist/types/src/stores/root-store/index.d.ts +3 -66
- package/dist/types/src/stores/ui-store/index.d.ts +98 -98
- package/dist/types/src/test-utils/test-mocks.d.ts +11 -3
- package/dist/types/src/test-utils/test-with-map.d.ts +3 -1
- package/package.json +4 -3
|
@@ -38,7 +38,7 @@ declare class LabelsController {
|
|
|
38
38
|
private getVisibilityForPlaceLabel;
|
|
39
39
|
private updateLabelsInAreas;
|
|
40
40
|
private updateFloorStackLabels;
|
|
41
|
-
private
|
|
41
|
+
private updateAllLabels;
|
|
42
42
|
cleanup(): void;
|
|
43
43
|
}
|
|
44
44
|
export default LabelsController;
|
|
@@ -5,7 +5,7 @@ import { E_APP_STATE } from '../../lib/types/state';
|
|
|
5
5
|
import RouterStore from '../router-store';
|
|
6
6
|
import { TStartViewerOptions, TStartViewerWithLocalDataOptions } from '../../lib/types/options';
|
|
7
7
|
import FeatureFlagStore from '../feature-flag-store';
|
|
8
|
-
import { MapData, Place, Floor, Coordinate, Geometry, Area, LocationCategory,
|
|
8
|
+
import { MapData, Place, Floor, Coordinate, Geometry, Area, LocationCategory, FloorStack, Facade } from '../../lib/sdk';
|
|
9
9
|
import { processPlaces } from '../../lib/utils/process-places';
|
|
10
10
|
import SearchStore from '../search-store';
|
|
11
11
|
import { Feature, ParsedMVF, Point, SpaceProperties } from '@mappedin/mvf';
|
|
@@ -105,6 +105,7 @@ declare class RootStore {
|
|
|
105
105
|
private inferDepartureMode;
|
|
106
106
|
private checkForEmbeddedMode;
|
|
107
107
|
private syncState;
|
|
108
|
+
private syncSelectedCategory;
|
|
108
109
|
private syncCurrentFloor;
|
|
109
110
|
private syncDeparture;
|
|
110
111
|
private getMVFConnectionFeatureById;
|
|
@@ -138,71 +139,7 @@ declare class RootStore {
|
|
|
138
139
|
*/
|
|
139
140
|
get initialBearing(): number | undefined;
|
|
140
141
|
get cameraMode(): TCameraMode;
|
|
141
|
-
get exteriorDoors():
|
|
142
|
-
"__#17@#private": any;
|
|
143
|
-
readonly __type: "door";
|
|
144
|
-
readonly floor: Floor;
|
|
145
|
-
readonly center: Coordinate;
|
|
146
|
-
readonly isExterior: boolean;
|
|
147
|
-
readonly geoJSON: {
|
|
148
|
-
properties: null;
|
|
149
|
-
type: import("@mappedin/mvf-v2").FeatureType;
|
|
150
|
-
geometry: import("@mappedin/mvf-v2").LineString;
|
|
151
|
-
};
|
|
152
|
-
readonly focusTarget: Coordinate;
|
|
153
|
-
readonly anchorTarget: Coordinate;
|
|
154
|
-
toJSON(): {
|
|
155
|
-
__type: string;
|
|
156
|
-
id: string;
|
|
157
|
-
name: string;
|
|
158
|
-
floor: string;
|
|
159
|
-
center: {
|
|
160
|
-
__type: string;
|
|
161
|
-
latitude: number;
|
|
162
|
-
longitude: number;
|
|
163
|
-
floorId: string | undefined;
|
|
164
|
-
verticalOffset: number;
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
|
-
destroy(): void;
|
|
168
|
-
"__#61@#private": any;
|
|
169
|
-
readonly externalId: string;
|
|
170
|
-
readonly name: string;
|
|
171
|
-
readonly description: string;
|
|
172
|
-
readonly images: {
|
|
173
|
-
"__#25@#private": any;
|
|
174
|
-
readonly __type: "image";
|
|
175
|
-
readonly url: string | undefined;
|
|
176
|
-
readonly name: string | undefined;
|
|
177
|
-
readonly altText: string | undefined;
|
|
178
|
-
toJSON(): {
|
|
179
|
-
__type: string;
|
|
180
|
-
id: string;
|
|
181
|
-
url: string | undefined;
|
|
182
|
-
name: string | undefined;
|
|
183
|
-
};
|
|
184
|
-
destroy(): void;
|
|
185
|
-
readonly id: string;
|
|
186
|
-
}[];
|
|
187
|
-
readonly links: {
|
|
188
|
-
"__#24@#private": any;
|
|
189
|
-
readonly __type: "hyperlink";
|
|
190
|
-
readonly url: string;
|
|
191
|
-
readonly name: string | undefined;
|
|
192
|
-
toJSON(): {
|
|
193
|
-
__type: string;
|
|
194
|
-
id: string;
|
|
195
|
-
url: string;
|
|
196
|
-
name: string | undefined;
|
|
197
|
-
};
|
|
198
|
-
destroy(): void;
|
|
199
|
-
readonly id: string;
|
|
200
|
-
}[];
|
|
201
|
-
readonly locationProfiles: LocationProfile[];
|
|
202
|
-
"__#62@#private": any;
|
|
203
|
-
readonly id: string;
|
|
204
|
-
readonly geoJSONBoundingBox: import("geojson").BBox | undefined;
|
|
205
|
-
}[];
|
|
142
|
+
get exteriorDoors(): import("@mappedin/mappedin-js").Door[];
|
|
206
143
|
get nonEmptyFloors(): Floor[];
|
|
207
144
|
get nonEmptyFloorStacks(): FloorStack[];
|
|
208
145
|
get currentFloorStack(): FloorStack | undefined;
|
|
@@ -33,104 +33,104 @@ declare class UIStore {
|
|
|
33
33
|
private syncDepartureSearchQueryWithDepartureLocation;
|
|
34
34
|
private syncDroppedPinNotification;
|
|
35
35
|
get rootClassNames(): string;
|
|
36
|
-
get theme(): TTheme &
|
|
37
|
-
name
|
|
38
|
-
isDark
|
|
39
|
-
colors
|
|
40
|
-
accent
|
|
41
|
-
primary
|
|
42
|
-
secondary
|
|
43
|
-
neutral
|
|
44
|
-
neutral2
|
|
45
|
-
success
|
|
46
|
-
error
|
|
47
|
-
}
|
|
48
|
-
background
|
|
49
|
-
primary
|
|
50
|
-
secondary
|
|
51
|
-
tertiary
|
|
52
|
-
inverted
|
|
53
|
-
}
|
|
54
|
-
text
|
|
55
|
-
primary
|
|
56
|
-
secondary
|
|
57
|
-
tertiary
|
|
58
|
-
quaternary
|
|
59
|
-
highlight
|
|
60
|
-
placeholder
|
|
61
|
-
inverted
|
|
62
|
-
link
|
|
63
|
-
error
|
|
64
|
-
error2
|
|
65
|
-
}
|
|
66
|
-
map
|
|
67
|
-
labels
|
|
68
|
-
background
|
|
69
|
-
default
|
|
70
|
-
connection
|
|
71
|
-
washroom
|
|
72
|
-
parking
|
|
73
|
-
point
|
|
74
|
-
door
|
|
75
|
-
}
|
|
76
|
-
markers
|
|
77
|
-
text
|
|
78
|
-
icon
|
|
79
|
-
background
|
|
80
|
-
default
|
|
81
|
-
parachute
|
|
82
|
-
highlight
|
|
83
|
-
departure
|
|
84
|
-
destination
|
|
85
|
-
youAreHere
|
|
86
|
-
}
|
|
87
|
-
geometry
|
|
88
|
-
wallTops
|
|
89
|
-
departure
|
|
90
|
-
hover
|
|
91
|
-
highlight
|
|
92
|
-
}
|
|
93
|
-
path
|
|
94
|
-
background
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
font
|
|
98
|
-
borderRadius
|
|
99
|
-
primary
|
|
100
|
-
large
|
|
101
|
-
small
|
|
102
|
-
}
|
|
103
|
-
fontSize
|
|
104
|
-
xsmall
|
|
105
|
-
small
|
|
106
|
-
normal
|
|
107
|
-
large
|
|
108
|
-
xlarge
|
|
109
|
-
title
|
|
110
|
-
}
|
|
111
|
-
fontWeight
|
|
112
|
-
light
|
|
113
|
-
normal
|
|
114
|
-
medium
|
|
115
|
-
semiBold
|
|
116
|
-
bold
|
|
117
|
-
}
|
|
118
|
-
map
|
|
119
|
-
tiles
|
|
120
|
-
initialPitch
|
|
121
|
-
initialBearing
|
|
122
|
-
minZoom
|
|
123
|
-
maxZoom
|
|
124
|
-
pathSize
|
|
125
|
-
streetMapVisible
|
|
126
|
-
watermarkVisible
|
|
127
|
-
mvfOverrides
|
|
128
|
-
[x: string]:
|
|
129
|
-
color
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
36
|
+
get theme(): TTheme & {
|
|
37
|
+
name?: string | undefined;
|
|
38
|
+
isDark?: boolean | undefined;
|
|
39
|
+
colors?: {
|
|
40
|
+
accent?: {
|
|
41
|
+
primary?: string | undefined;
|
|
42
|
+
secondary?: string | undefined;
|
|
43
|
+
neutral?: string | undefined;
|
|
44
|
+
neutral2?: string | undefined;
|
|
45
|
+
success?: string | undefined;
|
|
46
|
+
error?: string | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
background?: {
|
|
49
|
+
primary?: string | undefined;
|
|
50
|
+
secondary?: string | undefined;
|
|
51
|
+
tertiary?: string | undefined;
|
|
52
|
+
inverted?: string | undefined;
|
|
53
|
+
} | undefined;
|
|
54
|
+
text?: {
|
|
55
|
+
primary?: string | undefined;
|
|
56
|
+
secondary?: string | undefined;
|
|
57
|
+
tertiary?: string | undefined;
|
|
58
|
+
quaternary?: string | undefined;
|
|
59
|
+
highlight?: string | undefined;
|
|
60
|
+
placeholder?: string | undefined;
|
|
61
|
+
inverted?: string | undefined;
|
|
62
|
+
link?: string | undefined;
|
|
63
|
+
error?: string | undefined;
|
|
64
|
+
error2?: string | undefined;
|
|
65
|
+
} | undefined;
|
|
66
|
+
map?: {
|
|
67
|
+
labels?: {
|
|
68
|
+
background?: string | undefined;
|
|
69
|
+
default?: string | undefined;
|
|
70
|
+
connection?: string | undefined;
|
|
71
|
+
washroom?: string | undefined;
|
|
72
|
+
parking?: string | undefined;
|
|
73
|
+
point?: string | undefined;
|
|
74
|
+
door?: string | undefined;
|
|
75
|
+
} | undefined;
|
|
76
|
+
markers?: {
|
|
77
|
+
text?: string | undefined;
|
|
78
|
+
icon?: string | undefined;
|
|
79
|
+
background?: string | undefined;
|
|
80
|
+
default?: string | undefined;
|
|
81
|
+
parachute?: string | undefined;
|
|
82
|
+
highlight?: string | undefined;
|
|
83
|
+
departure?: string | undefined;
|
|
84
|
+
destination?: string | undefined;
|
|
85
|
+
youAreHere?: string | undefined;
|
|
86
|
+
} | undefined;
|
|
87
|
+
geometry?: {
|
|
88
|
+
wallTops?: string | undefined;
|
|
89
|
+
departure?: string | undefined;
|
|
90
|
+
hover?: string | undefined;
|
|
91
|
+
highlight?: string | undefined;
|
|
92
|
+
} | undefined;
|
|
93
|
+
path?: string | undefined;
|
|
94
|
+
background?: string | undefined;
|
|
95
|
+
} | undefined;
|
|
96
|
+
} | undefined;
|
|
97
|
+
font?: string | undefined;
|
|
98
|
+
borderRadius?: {
|
|
99
|
+
primary?: number | undefined;
|
|
100
|
+
large?: number | undefined;
|
|
101
|
+
small?: number | undefined;
|
|
102
|
+
} | undefined;
|
|
103
|
+
fontSize?: {
|
|
104
|
+
xsmall?: number | undefined;
|
|
105
|
+
small?: number | undefined;
|
|
106
|
+
normal?: number | undefined;
|
|
107
|
+
large?: number | undefined;
|
|
108
|
+
xlarge?: number | undefined;
|
|
109
|
+
title?: number | undefined;
|
|
110
|
+
} | undefined;
|
|
111
|
+
fontWeight?: {
|
|
112
|
+
light?: number | undefined;
|
|
113
|
+
normal?: number | undefined;
|
|
114
|
+
medium?: number | undefined;
|
|
115
|
+
semiBold?: number | undefined;
|
|
116
|
+
bold?: number | undefined;
|
|
117
|
+
} | undefined;
|
|
118
|
+
map?: {
|
|
119
|
+
tiles?: string | undefined;
|
|
120
|
+
initialPitch?: number | undefined;
|
|
121
|
+
initialBearing?: number | undefined;
|
|
122
|
+
minZoom?: number | undefined;
|
|
123
|
+
maxZoom?: number | undefined;
|
|
124
|
+
pathSize?: number | undefined;
|
|
125
|
+
streetMapVisible?: boolean | undefined;
|
|
126
|
+
watermarkVisible?: boolean | undefined;
|
|
127
|
+
mvfOverrides?: {
|
|
128
|
+
[x: string]: {
|
|
129
|
+
color?: string | undefined;
|
|
130
|
+
} | undefined;
|
|
131
|
+
} | undefined;
|
|
132
|
+
} | undefined;
|
|
133
|
+
};
|
|
134
134
|
get themeId(): string;
|
|
135
135
|
get defaultSearchResults(): TSearchResult[];
|
|
136
136
|
get searchResults(): TSearchResult[];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { DynamicFocus, DynamicFocusEventPayload, DynamicFocusEvents } from '@mappedin/dynamic-focus';
|
|
2
2
|
import { type MapView } from '../lib/sdk';
|
|
3
|
-
import * as SDK from '../lib/sdk';
|
|
4
|
-
import { CameraTransform } from '../lib/sdk/types';
|
|
5
|
-
|
|
3
|
+
import * as SDK from '../lib/sdk/mappedin-js';
|
|
4
|
+
import type { CameraTransform } from '../lib/sdk/types';
|
|
5
|
+
import { BlueDot, BlueDotEventPayloads } from '@mappedin/blue-dot';
|
|
6
|
+
type TPublishFn = <E extends keyof SDK.TEvents>(event: E, payload?: SDK.TEventPayload<E> extends SDK.CameraTransform ? CameraTransform : SDK.TEventPayload<E>) => void;
|
|
6
7
|
export type TMapViewWithTestUtilities = MapView & {
|
|
7
8
|
__test: {
|
|
8
9
|
subscribers: Record<string, ((...args: any[]) => void)[]>;
|
|
@@ -21,4 +22,11 @@ export type TDynamicFocusWithTestUtilities = DynamicFocus & {
|
|
|
21
22
|
};
|
|
22
23
|
publish: <E extends keyof DynamicFocusEvents>(event: E, payload?: DynamicFocusEventPayload<E>) => void;
|
|
23
24
|
};
|
|
25
|
+
export type TBlueDotWithTestUtilities = BlueDot & {
|
|
26
|
+
__test: {
|
|
27
|
+
subscribers: Record<string, ((...args: any[]) => void)[]>;
|
|
28
|
+
state: Map<any, any>;
|
|
29
|
+
};
|
|
30
|
+
publish: <E extends keyof BlueDotEventPayloads>(event: E, payload?: BlueDotEventPayloads[E]) => void;
|
|
31
|
+
};
|
|
24
32
|
export {};
|
|
@@ -3,7 +3,7 @@ import RouterStore from '../stores/router-store';
|
|
|
3
3
|
import { ParsedMVF } from '@mappedin/mvf';
|
|
4
4
|
import { MapData } from '../lib/sdk';
|
|
5
5
|
import { TStartViewerOptions, TStartViewerWithLocalDataOptions } from '../lib/types/options';
|
|
6
|
-
import { TDynamicFocusWithTestUtilities, TMapViewWithTestUtilities } from './test-mocks';
|
|
6
|
+
import { TBlueDotWithTestUtilities, TDynamicFocusWithTestUtilities, TMapViewWithTestUtilities } from './test-mocks';
|
|
7
7
|
export declare const loadTestVenueData: (venueFileName?: string) => Promise<ParsedMVF>;
|
|
8
8
|
export declare const hydrateTestData: (mvf: ParsedMVF) => Promise<MapData>;
|
|
9
9
|
export type TTestWithMapOptions = {
|
|
@@ -17,6 +17,7 @@ type TTestWithMapResult<MV = TMapViewWithTestUtilities> = {
|
|
|
17
17
|
history: RouterStore['history'];
|
|
18
18
|
mapView: MV;
|
|
19
19
|
dynamicFocus: TDynamicFocusWithTestUtilities;
|
|
20
|
+
blueDot: TBlueDotWithTestUtilities;
|
|
20
21
|
mapViewTestUtilities: MV extends TMapViewWithTestUtilities ? MV['__test'] : undefined;
|
|
21
22
|
mapEl: HTMLDivElement;
|
|
22
23
|
data: MapData;
|
|
@@ -27,6 +28,7 @@ type TTestWithMapResult<MV = TMapViewWithTestUtilities> = {
|
|
|
27
28
|
waitForCameraSettled: () => Promise<void>;
|
|
28
29
|
setNextCameraState: TMapViewWithTestUtilities['__test']['setNextCameraState'];
|
|
29
30
|
waitForPinDrop: () => Promise<void>;
|
|
31
|
+
waitForDirectionsReady: () => Promise<void>;
|
|
30
32
|
};
|
|
31
33
|
export declare const testWithMap: <MV = TMapViewWithTestUtilities>(venueFileName?: string, options?: TTestWithMapOptions) => Promise<TTestWithMapResult<MV>>;
|
|
32
34
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mappedin/viewer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.53.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"browser": "./dist/index.js",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -18,8 +18,9 @@
|
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@ladle/react": "^2.17.2",
|
|
21
|
-
"@mappedin/dynamic-focus": "6.0.1-canary-v6-
|
|
22
|
-
"@mappedin/mappedin-js": "6.0.1-canary-v6-
|
|
21
|
+
"@mappedin/dynamic-focus": "6.0.1-canary-v6-beeafaee.0",
|
|
22
|
+
"@mappedin/mappedin-js": "6.0.1-canary-v6-beeafaee.0",
|
|
23
|
+
"@mappedin/blue-dot": "6.0.1-canary-v6-899786eb.871",
|
|
23
24
|
"@mappedin/mvf": "3.0.0-69b7308.0",
|
|
24
25
|
"@mappedin/self-serve-icons": "1.105.0-alpha.SRV-2719-add-bleed-kit-annotation.1754600609",
|
|
25
26
|
"@testing-library/jest-dom": "^6.6.2",
|