@mappedin/viewer 0.12.2 → 0.12.3-270e1ca.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 +20969 -20581
- package/dist/types/src/components/button/index.d.ts +7 -7
- package/dist/types/src/components/location-marker/index.d.ts +8 -0
- package/dist/types/src/components/location-marker/location-marker.stories.d.ts +2 -0
- package/dist/types/src/components/positioner/index.d.ts +2 -2
- package/dist/types/src/lib/types/options.d.ts +2 -0
- package/dist/types/src/lib/types/theme.d.ts +2 -0
- package/dist/types/src/lib/utils/location-utils.d.ts +3 -0
- package/dist/types/src/lib/utils/location-utils.test.d.ts +1 -0
- package/dist/types/src/lib/utils/posthog-utils.d.ts +15 -0
- package/dist/types/src/lib/utils/posthog-utils.test.d.ts +1 -0
- package/dist/types/src/stores/map-store/controllers/camera.d.ts +3 -0
- package/dist/types/src/stores/map-store/controllers/label.test.d.ts +1 -0
- package/dist/types/src/stores/map-store/controllers/labels.d.ts +1 -1
- package/dist/types/src/stores/map-store/controllers/markers.d.ts +2 -0
- package/dist/types/src/stores/map-store/index.d.ts +3 -1
- package/dist/types/src/stores/root-store/index.d.ts +6 -4
- package/dist/types/src/stores/ui-store/index.d.ts +6 -0
- package/package.json +3 -3
|
@@ -13,31 +13,31 @@ declare const Button: import("styled-components").IStyledComponent<"web", import
|
|
|
13
13
|
style?: import("react").CSSProperties | undefined;
|
|
14
14
|
title?: string | undefined;
|
|
15
15
|
key?: import("react").Key | null | undefined;
|
|
16
|
+
className?: string | undefined;
|
|
16
17
|
id?: string | undefined;
|
|
18
|
+
prefix?: string | undefined;
|
|
19
|
+
role?: import("react").AriaRole | undefined;
|
|
20
|
+
nonce?: string | undefined;
|
|
21
|
+
tabIndex?: number | undefined;
|
|
17
22
|
defaultChecked?: boolean | undefined;
|
|
18
23
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
19
24
|
suppressContentEditableWarning?: boolean | undefined;
|
|
20
25
|
suppressHydrationWarning?: boolean | undefined;
|
|
21
26
|
accessKey?: string | undefined;
|
|
22
27
|
autoFocus?: boolean | undefined;
|
|
23
|
-
className?: string | undefined;
|
|
24
28
|
contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
|
|
25
29
|
contextMenu?: string | undefined;
|
|
26
30
|
dir?: string | undefined;
|
|
27
31
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
28
32
|
lang?: string | undefined;
|
|
29
|
-
nonce?: string | undefined;
|
|
30
33
|
placeholder?: string | undefined;
|
|
31
34
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
32
|
-
tabIndex?: number | undefined;
|
|
33
35
|
translate?: "yes" | "no" | undefined;
|
|
34
36
|
radioGroup?: string | undefined;
|
|
35
|
-
role?: import("react").AriaRole | undefined;
|
|
36
37
|
about?: string | undefined;
|
|
37
38
|
content?: string | undefined;
|
|
38
39
|
datatype?: string | undefined;
|
|
39
40
|
inlist?: any;
|
|
40
|
-
prefix?: string | undefined;
|
|
41
41
|
property?: string | undefined;
|
|
42
42
|
rel?: string | undefined;
|
|
43
43
|
resource?: string | undefined;
|
|
@@ -60,7 +60,7 @@ declare const Button: import("styled-components").IStyledComponent<"web", import
|
|
|
60
60
|
is?: string | undefined;
|
|
61
61
|
'aria-activedescendant'?: string | undefined;
|
|
62
62
|
'aria-atomic'?: (boolean | "true" | "false") | undefined;
|
|
63
|
-
'aria-autocomplete'?: "none" | "
|
|
63
|
+
'aria-autocomplete'?: "none" | "both" | "list" | "inline" | undefined;
|
|
64
64
|
'aria-braillelabel'?: string | undefined;
|
|
65
65
|
'aria-brailleroledescription'?: string | undefined;
|
|
66
66
|
'aria-busy'?: (boolean | "true" | "false") | undefined;
|
|
@@ -80,7 +80,7 @@ declare const Button: import("styled-components").IStyledComponent<"web", import
|
|
|
80
80
|
'aria-expanded'?: (boolean | "true" | "false") | undefined;
|
|
81
81
|
'aria-flowto'?: string | undefined;
|
|
82
82
|
'aria-grabbed'?: (boolean | "true" | "false") | undefined;
|
|
83
|
-
'aria-haspopup'?: boolean | "dialog" | "menu" | "
|
|
83
|
+
'aria-haspopup'?: boolean | "dialog" | "menu" | "listbox" | "grid" | "tree" | "true" | "false" | undefined;
|
|
84
84
|
'aria-hidden'?: (boolean | "true" | "false") | undefined;
|
|
85
85
|
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
86
86
|
'aria-keyshortcuts'?: string | undefined;
|
|
@@ -54,7 +54,7 @@ declare const Positioner: import("styled-components").IStyledComponent<"web", {
|
|
|
54
54
|
children?: import("react").ReactNode;
|
|
55
55
|
'aria-activedescendant'?: string | undefined;
|
|
56
56
|
'aria-atomic'?: (boolean | "true" | "false") | undefined;
|
|
57
|
-
'aria-autocomplete'?: "none" | "
|
|
57
|
+
'aria-autocomplete'?: "none" | "both" | "list" | "inline" | undefined;
|
|
58
58
|
'aria-braillelabel'?: string | undefined;
|
|
59
59
|
'aria-brailleroledescription'?: string | undefined;
|
|
60
60
|
'aria-busy'?: (boolean | "true" | "false") | undefined;
|
|
@@ -74,7 +74,7 @@ declare const Positioner: import("styled-components").IStyledComponent<"web", {
|
|
|
74
74
|
'aria-expanded'?: (boolean | "true" | "false") | undefined;
|
|
75
75
|
'aria-flowto'?: string | undefined;
|
|
76
76
|
'aria-grabbed'?: (boolean | "true" | "false") | undefined;
|
|
77
|
-
'aria-haspopup'?: boolean | "dialog" | "menu" | "
|
|
77
|
+
'aria-haspopup'?: boolean | "dialog" | "menu" | "listbox" | "grid" | "tree" | "true" | "false" | undefined;
|
|
78
78
|
'aria-hidden'?: (boolean | "true" | "false") | undefined;
|
|
79
79
|
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
80
80
|
'aria-keyshortcuts'?: string | undefined;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { TTheme } from 'lib/types/theme';
|
|
3
3
|
import { DeepPartial } from './utils';
|
|
4
4
|
import type { hydrateVenueMVF } from '@mappedin/mappedin-js/get-venue';
|
|
5
|
+
import type { PostHog } from 'posthog-js';
|
|
5
6
|
type ParsedMVF = Parameters<typeof hydrateVenueMVF>[0];
|
|
6
7
|
export type TStartViewerCommonOptions = {
|
|
7
8
|
root?: HTMLElement;
|
|
@@ -19,5 +20,6 @@ export type TStartViewerOptions = {
|
|
|
19
20
|
export type TStartViewerWithLocalDataOptions = {
|
|
20
21
|
data: ParsedMVF | Record<string, unknown>;
|
|
21
22
|
format?: 'mvf' | 'json';
|
|
23
|
+
posthog?: PostHog;
|
|
22
24
|
} & TStartViewerCommonOptions;
|
|
23
25
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type PostHog } from 'posthog-js';
|
|
2
|
+
/**
|
|
3
|
+
* We allow setting an external posthog instance to be used by the viewer. This is mostly
|
|
4
|
+
* to support Maker, which has its own posthog instance.
|
|
5
|
+
*/
|
|
6
|
+
export declare const setPosthog: (posthog: PostHog) => void;
|
|
7
|
+
/**
|
|
8
|
+
* Get the current posthog instance. This should be used over importing the posthog-js, since
|
|
9
|
+
* an external posthog instance may have been set.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getPosthog: () => PostHog;
|
|
12
|
+
/**
|
|
13
|
+
* Check if the current posthog instance is the default instance.
|
|
14
|
+
*/
|
|
15
|
+
export declare const isDefaultPosthogInstance: () => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -10,6 +10,7 @@ declare class CameraController {
|
|
|
10
10
|
private reactionDisposers;
|
|
11
11
|
private firstLoad;
|
|
12
12
|
zoom: number;
|
|
13
|
+
isUserInteracting: boolean;
|
|
13
14
|
constructor({ rootStore, mapStore }: {
|
|
14
15
|
rootStore: RootStore;
|
|
15
16
|
mapStore: MapStore;
|
|
@@ -17,6 +18,8 @@ declare class CameraController {
|
|
|
17
18
|
private getPadding;
|
|
18
19
|
private updatePadding;
|
|
19
20
|
handleCameraChange({ zoom }: CAMERA_EVENT_PAYLOAD[E_CAMERA_EVENT.CHANGED]): void;
|
|
21
|
+
handleUserInteractionStart(): void;
|
|
22
|
+
handleUserInteractionEnd(): void;
|
|
20
23
|
focusOn(targets: Parameters<MapView['Camera']['focusOn']>[0], options?: Parameters<MapView['Camera']['focusOn']>[1]): Promise<void>;
|
|
21
24
|
zoomIn(): Promise<void>;
|
|
22
25
|
zoomOut(): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -9,11 +9,11 @@ declare class LabelsController {
|
|
|
9
9
|
rootStore: RootStore;
|
|
10
10
|
mapStore: MapStore;
|
|
11
11
|
});
|
|
12
|
-
private attemptIconForConnection;
|
|
13
12
|
private labelPolygon;
|
|
14
13
|
private labelLocationsOfCategory;
|
|
15
14
|
private labelConnections;
|
|
16
15
|
private updateLabelPriorityForPolygon;
|
|
16
|
+
private resetLabelPriorities;
|
|
17
17
|
private handleZoomChange;
|
|
18
18
|
private updateVenueNameLabel;
|
|
19
19
|
private updateLocationLabels;
|
|
@@ -5,6 +5,7 @@ declare class MarkersController {
|
|
|
5
5
|
private mapStore;
|
|
6
6
|
private reactionDisposers;
|
|
7
7
|
markersVisible: boolean;
|
|
8
|
+
private sdkMarkersByKey;
|
|
8
9
|
constructor({ rootStore, mapStore }: {
|
|
9
10
|
rootStore: RootStore;
|
|
10
11
|
mapStore: MapStore;
|
|
@@ -13,6 +14,7 @@ declare class MarkersController {
|
|
|
13
14
|
private getActionDirection;
|
|
14
15
|
private get directionsConnectionMarkers();
|
|
15
16
|
private get annotationMarkers();
|
|
17
|
+
private get selectedLocationMarkers();
|
|
16
18
|
private get markers();
|
|
17
19
|
private handleZoomChange;
|
|
18
20
|
private attemptUpdatingMarkerDimensions;
|
|
@@ -23,13 +23,15 @@ declare class MapStore {
|
|
|
23
23
|
constructor({ rootStore }: {
|
|
24
24
|
rootStore: RootStore;
|
|
25
25
|
});
|
|
26
|
+
private handleClickEventForLocation;
|
|
26
27
|
private handlePolygonsClicked;
|
|
28
|
+
private handleLabelsClicked;
|
|
27
29
|
private getAOSettings;
|
|
28
30
|
private showWatermark;
|
|
29
31
|
get interactionMode(): E_MAP_INTERACTION_MODE;
|
|
30
32
|
init(container: HTMLElement): Promise<void>;
|
|
31
33
|
handleResize(): void;
|
|
32
|
-
handleMapClick({ polygons }: E_SDK_EVENT_PAYLOAD[E_SDK_EVENT.CLICK]): void;
|
|
34
|
+
handleMapClick({ polygons, floatingLabels }: E_SDK_EVENT_PAYLOAD[E_SDK_EVENT.CLICK]): void;
|
|
33
35
|
cleanup(): void;
|
|
34
36
|
}
|
|
35
37
|
export default MapStore;
|
|
@@ -36,23 +36,23 @@ declare class RootStore {
|
|
|
36
36
|
startupOptions: TStartViewerOptions | TStartViewerWithLocalDataOptions;
|
|
37
37
|
});
|
|
38
38
|
private getInitialDepartureMode;
|
|
39
|
-
private getCoordinateForUrl;
|
|
40
|
-
private getCoordinateFromUrl;
|
|
41
39
|
private syncState;
|
|
42
40
|
private syncCurrentMap;
|
|
41
|
+
get locationsByName(): Record<string, MappedinLocation>;
|
|
43
42
|
get mvfFeaturesByExternalId(): Record<string, import("@mappedin/mvf").Feature<import("@mappedin/mvf").Polygon | import("@mappedin/mvf").LineString | import("@mappedin/mvf").Point, import("@mappedin/mvf").SpaceProperties> | import("@mappedin/mvf").Feature<import("@mappedin/mvf").Polygon | import("@mappedin/mvf").LineString, import("@mappedin/mvf").ObstructionProperties>>;
|
|
44
43
|
get isMakerPreview(): boolean;
|
|
45
44
|
get mapClosestToGroundLevel(): MappedinMap;
|
|
46
45
|
get mapsSortedByElevation(): MappedinMap[];
|
|
47
46
|
get areNodesAvailable(): boolean;
|
|
48
|
-
get exteriorEntrancesLocation(): MappedinLocation |
|
|
47
|
+
get exteriorEntrancesLocation(): MappedinLocation | null;
|
|
49
48
|
get selectedLocation(): MappedinLocation | undefined;
|
|
50
|
-
get departure(): MappedinLocation | MappedinCoordinate | undefined;
|
|
49
|
+
get departure(): MappedinLocation | MappedinCoordinate | null | undefined;
|
|
51
50
|
get me(): MappedinCoordinate | undefined;
|
|
52
51
|
get currentMapName(): string | undefined;
|
|
53
52
|
get currentMap(): MappedinMap | undefined;
|
|
54
53
|
get interactivePolygons(): MappedinPolygon[];
|
|
55
54
|
get departureAndSelectedLocationSharedNodes(): MappedinNode[];
|
|
55
|
+
get poiLocations(): MappedinLocation[];
|
|
56
56
|
get annotationsById(): never[] | {
|
|
57
57
|
[id: string]: MappedinAnnotation;
|
|
58
58
|
};
|
|
@@ -60,6 +60,8 @@ declare class RootStore {
|
|
|
60
60
|
private syncDeparture;
|
|
61
61
|
get isAppEmbedded(): boolean;
|
|
62
62
|
get state(): E_APP_STATE;
|
|
63
|
+
serializeCoordinate(coordinate: MappedinCoordinate): string[];
|
|
64
|
+
deserializeCoordinate(urlCoordinate: string[]): MappedinCoordinate | undefined;
|
|
63
65
|
setMe(coordinate: MappedinCoordinate | undefined): void;
|
|
64
66
|
setState(state: E_APP_STATE): void;
|
|
65
67
|
isLocationOnMap(location: MappedinLocation, map: MappedinMap): boolean;
|
|
@@ -3,6 +3,7 @@ import { TCategory, TSearchResult } from 'lib/types/search';
|
|
|
3
3
|
import { TLevelSelectorLevel } from '../../components/level-selector/utils';
|
|
4
4
|
import { TTheme } from 'lib/types/theme';
|
|
5
5
|
import { E_DEPARTURE_MODE } from '../../lib/types/directions';
|
|
6
|
+
import { MappedinLocation, MappedinVortex } from '@mappedin/mappedin-js';
|
|
6
7
|
declare class UIStore {
|
|
7
8
|
private rootStore;
|
|
8
9
|
private reactionDisposers;
|
|
@@ -40,6 +41,11 @@ declare class UIStore {
|
|
|
40
41
|
get logoPosition(): "bottom-left" | "top-left";
|
|
41
42
|
get appPadding(): 0 | 12 | 20;
|
|
42
43
|
get makerPopUpVisible(): boolean;
|
|
44
|
+
attemptIconNameForConnection(connection: MappedinVortex): string;
|
|
45
|
+
attemptIconForConnection(connection: MappedinVortex): string | undefined;
|
|
46
|
+
attemptIconNameForLocation(location: MappedinLocation): "" | "washroom-14x14" | "point-of-interest-12x12";
|
|
47
|
+
attemptIconForLocation(location: MappedinLocation): string | undefined;
|
|
48
|
+
getLabelColor(target: MappedinVortex | MappedinLocation): string;
|
|
43
49
|
dismissMakerPopUp(): void;
|
|
44
50
|
setTheme(theme: TTheme): void;
|
|
45
51
|
setOverrideShareButtonHandler(handler?: () => void): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mappedin/viewer",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3-270e1ca.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"browser": "./dist/index.js",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@ladle/react": "^2.17.2",
|
|
21
21
|
"@mappedin/maker-icons": "1.0.0-fe4ca2f",
|
|
22
|
-
"@mappedin/mappedin-js": "5.23.1-viewer-internal-release.
|
|
23
|
-
"@mappedin/mvf": "2.0.1-
|
|
22
|
+
"@mappedin/mappedin-js": "5.23.1-viewer-internal-release.27.ad1e646.0",
|
|
23
|
+
"@mappedin/mvf": "2.0.1-c7526c3.0",
|
|
24
24
|
"@testing-library/react-hooks": "^8.0.1",
|
|
25
25
|
"@types/react": "^18.2.15",
|
|
26
26
|
"@types/react-dom": "^18.2.7",
|