@mappedin/viewer 0.6.1-5fddc7b.0 → 0.7.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.
@@ -10,7 +10,7 @@ type TDirectionsProps = {
10
10
  departureSearchResults: ComponentProps<typeof DirectionsSearchBar>['results'];
11
11
  onDepartureResultSelected?: ComponentProps<typeof DirectionsSearchBar>['onResultSelected'];
12
12
  visible?: boolean;
13
- warningVisible?: boolean;
13
+ warningTranslationKey?: string;
14
14
  maxHeight?: number;
15
15
  };
16
16
  declare const Directions: React.FC<TDirectionsProps>;
@@ -19,7 +19,7 @@ type TMainUIProps = {
19
19
  onDepartureResultSelected?: ComponentProps<typeof Directions>['onDepartureResultSelected'];
20
20
  departureSearchResults?: ComponentProps<typeof Directions>['departureSearchResults'];
21
21
  directionsVisible?: boolean;
22
- directionsWarningVisible?: boolean;
22
+ directionsWarningTranslationKey?: string;
23
23
  directionsButtonVisible?: boolean;
24
24
  directionsButtonDisabled?: boolean;
25
25
  onDirectionsButtonClick?: () => void;
@@ -1,4 +1,9 @@
1
- declare const useMobile: () => {
1
+ type TUseMobileProps = {
2
+ onResize?: ({ isMobile }: {
3
+ isMobile: boolean;
4
+ }) => void;
5
+ };
6
+ declare const useMobile: ({ onResize }?: TUseMobileProps) => {
2
7
  width: number;
3
8
  isMobile: boolean;
4
9
  };
@@ -25,8 +25,10 @@ declare class MapStore {
25
25
  });
26
26
  private handlePolygonsClicked;
27
27
  private getAOSettings;
28
+ private showWatermark;
28
29
  get interactionMode(): E_MAP_INTERACTION_MODE;
29
30
  init(container: HTMLElement): Promise<void>;
31
+ handleResize(): void;
30
32
  handleMapClick({ polygons }: E_SDK_EVENT_PAYLOAD[E_SDK_EVENT.CLICK]): void;
31
33
  cleanup(): void;
32
34
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { Mappedin, MappedinCoordinate, MappedinLocation, MappedinMap, MappedinPolygon } from '@mappedin/mappedin-js';
2
+ import { Mappedin, MappedinCoordinate, MappedinLocation, MappedinMap, MappedinNode, MappedinPolygon } from '@mappedin/mappedin-js';
3
3
  import UIStore from '../ui-store';
4
4
  import MapStore from '../map-store';
5
5
  import { E_DEPARTURE_MODE } from '../../lib/types/directions';
@@ -47,6 +47,7 @@ declare class RootStore {
47
47
  get departure(): MappedinLocation | MappedinCoordinate | undefined;
48
48
  get currentMap(): MappedinMap | undefined;
49
49
  get interactivePolygons(): MappedinPolygon[];
50
+ get departureAndSelectedLocationSharedNodes(): MappedinNode[];
50
51
  private syncDeparture;
51
52
  get isAppEmbedded(): boolean;
52
53
  get state(): E_APP_STATE;
@@ -2,6 +2,7 @@ import { History } from 'history';
2
2
  export declare const EMBED_ROUTER_PARAM = "embedded";
3
3
  type TRouterGoOptions = {
4
4
  clearExistingParams?: boolean;
5
+ replace?: boolean;
5
6
  };
6
7
  declare class RouterStore {
7
8
  private base;
@@ -26,15 +26,15 @@ declare class UIStore {
26
26
  get directionsButtonVisible(): boolean;
27
27
  get directionsButtonDisabled(): boolean;
28
28
  get directionsUIVisible(): boolean;
29
- get directionsWarningVisible(): boolean;
29
+ get directionsWarning(): "directions.adjacent" | "directions.not-found" | undefined;
30
30
  get openAppLink(): string;
31
31
  get openAppButtonVisible(): boolean;
32
32
  get tiltControlsVisible(): boolean;
33
33
  get zoomControlsVisible(): boolean;
34
34
  get shareButtonVisible(): boolean;
35
35
  get mainUIVisible(): boolean;
36
- get namePosition(): "top-left" | "bottom-left" | "bottom-center";
37
- get logoPosition(): "top-left" | "bottom-left";
36
+ get namePosition(): "bottom-left" | "top-left" | "bottom-center";
37
+ get logoPosition(): "bottom-left" | "top-left";
38
38
  get appPadding(): 0 | 12 | 20;
39
39
  setTheme(theme: TTheme): void;
40
40
  setOverrideShareButtonHandler(handler?: () => void): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mappedin/viewer",
3
- "version": "0.6.1-5fddc7b.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "browser": "./dist/index.js",
6
6
  "license": "UNLICENSED",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "devDependencies": {
23
23
  "@ladle/react": "^2.17.2",
24
- "@mappedin/mappedin-js": "5.17.1-viewer-internal-release.8.69568d0.0",
24
+ "@mappedin/mappedin-js": "5.17.1-viewer-internal-release.10.9d06fbe.0",
25
25
  "@mappedin/mvf": "2.0.1-1bfe7ea.0",
26
26
  "@testing-library/react-hooks": "^8.0.1",
27
27
  "@types/react": "^18.2.15",