@mappedin/viewer 0.24.11-8cc83e5.0 → 0.24.11-e020d79.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 +12278 -12192
- package/dist/types/src/components/directions/directions-labels.d.ts +7 -0
- package/dist/types/src/components/directions/swap-button.d.ts +8 -0
- package/dist/types/src/components/main/index.d.ts +1 -0
- package/dist/types/src/lib/types/utils.d.ts +1 -0
- package/dist/types/src/lib/utils/function-utils.d.ts +5 -0
- package/dist/types/src/lib/utils/function-utils.test.d.ts +1 -0
- package/dist/types/src/stores/map-store/controllers/camera.d.ts +3 -2
- package/dist/types/src/stores/root-store/index.d.ts +14 -2
- package/dist/types/src/stores/search-store/index.d.ts +0 -2
- package/dist/types/src/stores/ui-store/index.d.ts +1 -0
- package/dist/types/src/test-utils/test-with-map.d.ts +1 -0
- package/package.json +1 -1
|
@@ -4,3 +4,4 @@ export type DeepPartial<T> = T extends object ? {
|
|
|
4
4
|
export type KeysOf<T, U> = Exclude<{
|
|
5
5
|
[K in keyof T]: Required<T>[K] extends U ? K : never;
|
|
6
6
|
}[keyof T], undefined>;
|
|
7
|
+
export type Promisify<T> = T extends (...args: infer Args) => infer ReturnType ? ReturnType extends Promise<unknown> ? (...args: Args) => ReturnType : (...args: Args) => Promise<ReturnType> : never;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type RootStore from '../../root-store';
|
|
2
2
|
import type MapStore from '..';
|
|
3
|
-
import {
|
|
3
|
+
import { Place, TCameraAnimationOptions, TEvents, TFocusOnOptions } from '../../../lib/sdk';
|
|
4
4
|
export declare const ZOOM_FACTOR = 1.025;
|
|
5
5
|
export declare const TILT_FACTOR = 1.05;
|
|
6
6
|
export declare const CAMERA_ANIMATION_OPTIONS: TCameraAnimationOptions;
|
|
7
|
+
export declare const FOCUS_ON_DEBOUNCE_MS = 250;
|
|
7
8
|
type TPadding = {
|
|
8
9
|
top: number;
|
|
9
10
|
right: number;
|
|
@@ -38,7 +39,7 @@ declare class CameraController {
|
|
|
38
39
|
handleCameraChange(payload?: TEvents['camera-change']): void;
|
|
39
40
|
handleUserInteractionStart(): void;
|
|
40
41
|
handleUserInteractionEnd(): void;
|
|
41
|
-
focusOn(targets: Place | Place[], options?:
|
|
42
|
+
focusOn: (targets: Place | Place[], options?: TFocusOnOptions | undefined) => Promise<void>;
|
|
42
43
|
zoomIn(): Promise<void>;
|
|
43
44
|
zoomOut(): Promise<void>;
|
|
44
45
|
resetZoom(): Promise<void>;
|
|
@@ -65,7 +65,12 @@ declare class RootStore {
|
|
|
65
65
|
isMobile: boolean;
|
|
66
66
|
theme: TTheme;
|
|
67
67
|
});
|
|
68
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Compute what the new departure mode should be based on the current URL parameters. This can be
|
|
70
|
+
* used to determine a departure mode before the `syncDeparture` reaction runs, which will clear
|
|
71
|
+
* out departure places that do not match the current departure mode.
|
|
72
|
+
*/
|
|
73
|
+
private inferDepartureMode;
|
|
69
74
|
private syncState;
|
|
70
75
|
private syncCurrentFloor;
|
|
71
76
|
private syncDeparture;
|
|
@@ -135,7 +140,14 @@ declare class RootStore {
|
|
|
135
140
|
* Only use this from within the editor preview.
|
|
136
141
|
*/
|
|
137
142
|
setSelectedPlacesByMVFIds(ids: string[]): void;
|
|
138
|
-
|
|
143
|
+
/**
|
|
144
|
+
* Update the current departure places. By default, this will clear out departures that do not match
|
|
145
|
+
* the current departure mode. Alternatively, you can pass in `updateDepartureMode: true` to force the
|
|
146
|
+
* departure mode to be updated based on the new departures.
|
|
147
|
+
*/
|
|
148
|
+
setDepartures(departures: Place[] | undefined, options?: Partial<{
|
|
149
|
+
updateDepartureMode: boolean;
|
|
150
|
+
}>): void;
|
|
139
151
|
setCurrentFloor(floor: Floor | undefined): void;
|
|
140
152
|
setDepartureMode(mode: E_DEPARTURE_MODE): void;
|
|
141
153
|
setIsAppMobile(isMobile: boolean): void;
|
|
@@ -5,7 +5,6 @@ declare class SearchStore {
|
|
|
5
5
|
private rootStore;
|
|
6
6
|
private reactionDisposers;
|
|
7
7
|
private index?;
|
|
8
|
-
private debounceSearch;
|
|
9
8
|
private internalResults;
|
|
10
9
|
private queryString;
|
|
11
10
|
initialized: boolean;
|
|
@@ -17,7 +16,6 @@ declare class SearchStore {
|
|
|
17
16
|
private extractField;
|
|
18
17
|
private fallbackSearch;
|
|
19
18
|
private search;
|
|
20
|
-
private updateResultsImmediately;
|
|
21
19
|
private updateResultsDebounced;
|
|
22
20
|
private getResultId;
|
|
23
21
|
private getSearchResult;
|
|
@@ -57,6 +57,7 @@ declare class UIStore {
|
|
|
57
57
|
handleDirectionsButtonClick(): void;
|
|
58
58
|
handleDepartureModeSelected(mode: E_DEPARTURE_MODE): void;
|
|
59
59
|
handleResetDepartureClick(): void;
|
|
60
|
+
handleSwapDirectionsClick(): void;
|
|
60
61
|
handleMetadataCardClose(): void;
|
|
61
62
|
hideDroppedPinNotification(): void;
|
|
62
63
|
/**
|
|
@@ -20,6 +20,7 @@ type TTestWithMapResult<MV = TMapViewWithTestUtilities> = {
|
|
|
20
20
|
mvf: ParsedMVF;
|
|
21
21
|
waitForSearchResults: () => Promise<void>;
|
|
22
22
|
waitForSearchIndexing: () => Promise<void>;
|
|
23
|
+
waitForCameraSettled: () => Promise<void>;
|
|
23
24
|
};
|
|
24
25
|
export declare const testWithMap: <MV = TMapViewWithTestUtilities>(venueFileName?: string, options?: TTestWithMapOptions) => Promise<TTestWithMapResult<MV>>;
|
|
25
26
|
export {};
|