@mappedin/react-native-sdk 4.0.10 → 4.0.13
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.d.ts +54 -3
- package/dist/index.js +196 -196
- package/package.json +6 -2
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ declare module '@mappedin/react-native-sdk' {
|
|
|
27
27
|
export type TLabelAllLocationCommonOptions = Omit<TLabelAllLocationCommonOptionsBase, 'sortFunction' | 'translationMap'>;
|
|
28
28
|
export type { IDirectionsResult, MappedinDirections, TMappedinDirective } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
|
|
29
29
|
export type { TShowVenueOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
|
|
30
|
+
export { ERROR, ERROR_MESSAGES } from '@mappedin/react-native-sdk/wrappers/common/errors';
|
|
30
31
|
export { E_GET_DIRECTIONS_MESSAGES, BEARING_TYPE, ACTION_TYPE, MappedinLocation, Mappedin, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinRankings, MappedinDestinationSet } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -36,6 +37,7 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
|
|
|
36
37
|
import { STATE } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src';
|
|
37
38
|
import { MapViewStore } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView.store';
|
|
38
39
|
import type { TBlueDotPositionUpdate, TBlueDotStateChange, MappedinPolygon, MappedinMap, Mappedin } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
|
|
40
|
+
import { ERROR, ERROR_MESSAGES } from '@mappedin/react-native-sdk/wrappers/common/errors';
|
|
39
41
|
export type TMiMapViewProps = {
|
|
40
42
|
/**
|
|
41
43
|
* The MapViewStore instance will be returned here
|
|
@@ -100,6 +102,16 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
|
|
|
100
102
|
onStateChanged?: (prop: {
|
|
101
103
|
state: STATE;
|
|
102
104
|
}) => void;
|
|
105
|
+
/**
|
|
106
|
+
* Called if an error occurs loading the venue map
|
|
107
|
+
*/
|
|
108
|
+
onVenueLoadError?: (prop: {
|
|
109
|
+
error: {
|
|
110
|
+
name: ERROR;
|
|
111
|
+
message: ERROR_MESSAGES;
|
|
112
|
+
stack?: string;
|
|
113
|
+
};
|
|
114
|
+
}) => void;
|
|
103
115
|
};
|
|
104
116
|
/**
|
|
105
117
|
* Mappedin MapView component
|
|
@@ -108,7 +120,7 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
|
|
|
108
120
|
/**
|
|
109
121
|
* @category Component
|
|
110
122
|
*/
|
|
111
|
-
export const MiMapView: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<TMiMapViewProps, "
|
|
123
|
+
export const MiMapView: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<TMiMapViewProps, "onFirstMapLoaded" | "onDataLoaded" | "venueData" | "options" | "style" | "onPolygonClicked" | "onBlueDotStateChanged" | "onBlueDotPositionUpdated" | "onNothingClicked" | "onMapChanged" | "onStateChanged" | "onVenueLoadError"> & React.RefAttributes<MapViewStore>>>;
|
|
112
124
|
}
|
|
113
125
|
|
|
114
126
|
declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniMap' {
|
|
@@ -116,6 +128,7 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniM
|
|
|
116
128
|
import { TMiMapViewOptions } from '@mappedin/react-native-sdk/wrappers/common';
|
|
117
129
|
import { TFocusOnOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
|
|
118
130
|
import type { MappedinLocation, Mappedin } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
|
|
131
|
+
import { ERROR, ERROR_MESSAGES } from '@mappedin/react-native-sdk/wrappers/common/errors';
|
|
119
132
|
export type TMiMiniMapProps = {
|
|
120
133
|
/**
|
|
121
134
|
* Options to initialze MiMapView with
|
|
@@ -133,6 +146,16 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMiniM
|
|
|
133
146
|
venueData?: Mappedin;
|
|
134
147
|
location: MappedinLocation['id'] | MappedinLocation;
|
|
135
148
|
focusOptions?: TFocusOnOptions;
|
|
149
|
+
/**
|
|
150
|
+
* Called if there's an error loading the minimap
|
|
151
|
+
*/
|
|
152
|
+
onMiniMapLoadError?: (prop: {
|
|
153
|
+
error: {
|
|
154
|
+
name: ERROR;
|
|
155
|
+
message: ERROR_MESSAGES;
|
|
156
|
+
stack?: string;
|
|
157
|
+
};
|
|
158
|
+
}) => void;
|
|
136
159
|
};
|
|
137
160
|
/**
|
|
138
161
|
* Mappedin MiniMap component
|
|
@@ -170,12 +193,12 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapVi
|
|
|
170
193
|
/**
|
|
171
194
|
* @hidden
|
|
172
195
|
*/
|
|
173
|
-
loadVenue(options: TGetVenueOptions, showVenueOptions: TShowVenueOptions): Promise<
|
|
196
|
+
loadVenue(options: TGetVenueOptions, showVenueOptions: TShowVenueOptions): Promise<unknown>;
|
|
174
197
|
/**
|
|
175
198
|
*
|
|
176
199
|
* @hidden
|
|
177
200
|
*/
|
|
178
|
-
showVenue(venueData: Mappedin, showVenueOptions: TShowVenueOptions): Promise<
|
|
201
|
+
showVenue(venueData: Mappedin, showVenueOptions: TShowVenueOptions): Promise<unknown>;
|
|
179
202
|
/**
|
|
180
203
|
* Clear any cached venue bundles that were downloaded as part of LOAD_VENUE with useBundle: true
|
|
181
204
|
* This ensure that the next time keys are passed in, we get a fresh bundle
|
|
@@ -393,6 +416,20 @@ declare module '@mappedin/react-native-sdk/wrappers/common' {
|
|
|
393
416
|
export { PubSub } from '@mappedin/react-native-sdk/wrappers/common/pub-sub';
|
|
394
417
|
}
|
|
395
418
|
|
|
419
|
+
declare module '@mappedin/react-native-sdk/wrappers/common/errors' {
|
|
420
|
+
export enum ERROR {
|
|
421
|
+
LOAD_VENUE_FAILED = "LOAD_VENUE_FAILED",
|
|
422
|
+
SHOW_VENUE_FAILED = "SHOW_VENUE_FAILED",
|
|
423
|
+
SET_MAP_FAILED = "SET_MAP_FAILED",
|
|
424
|
+
SHOW_MINIMAP_ERROR = "SHOW_MINIMAP_ERROR",
|
|
425
|
+
LOAD_MINIMAP_ERROR = "LOAD_MINIMAP_ERROR"
|
|
426
|
+
}
|
|
427
|
+
export enum ERROR_MESSAGES {
|
|
428
|
+
GENERIC_LOAD_VENUE_ERROR = "Unable to load Venue. Please check your keys",
|
|
429
|
+
GENERIC_SET_MAP_ERROR = "Unable to set map, check that you're passing a valid map"
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
396
433
|
declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src' {
|
|
397
434
|
export { MiMapView } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView';
|
|
398
435
|
export type { TMiMapViewProps } from '@mappedin/react-native-sdk/wrappers/react-native-sdk/src/MiMapView';
|
|
@@ -411,6 +448,7 @@ declare module '@mappedin/react-native-sdk/wrappers/react-native-sdk/src' {
|
|
|
411
448
|
export type TLabelAllLocationCommonOptions = Omit<TLabelAllLocationCommonOptionsBase, 'sortFunction' | 'translationMap'>;
|
|
412
449
|
export type { IDirectionsResult, MappedinDirections, TMappedinDirective } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
|
|
413
450
|
export type { TShowVenueOptions } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
|
|
451
|
+
export { ERROR, ERROR_MESSAGES } from '@mappedin/react-native-sdk/wrappers/common/errors';
|
|
414
452
|
export { E_GET_DIRECTIONS_MESSAGES, BEARING_TYPE, ACTION_TYPE, MappedinLocation, Mappedin, MappedinPolygon, MappedinNode, MappedinCategory, MappedinMap, MappedinEvent, MappedinMapGroup, MappedinVenue, MappedinVortex, MappedinRankings, MappedinDestinationSet } from '@mappedin/react-native-sdk/core/packages/renderer/index.rn';
|
|
415
453
|
}
|
|
416
454
|
|
|
@@ -4680,6 +4718,19 @@ declare module '@mappedin/react-native-sdk/core/packages/renderer/MapView' {
|
|
|
4680
4718
|
* @param polygon The Polygon you want the primary Location of.
|
|
4681
4719
|
*/
|
|
4682
4720
|
getPrimaryLocationForPolygon(polygon: MappedinPolygon): MappedinLocation;
|
|
4721
|
+
/**
|
|
4722
|
+
* Finds all polygons that contain the specified MappedinCoordinate. If multiple
|
|
4723
|
+
* polygons are stacked on top of each other, the array of polygons returned will be
|
|
4724
|
+
* in the order of top to bottom.
|
|
4725
|
+
*
|
|
4726
|
+
* By default, this only considers interactive polygons.
|
|
4727
|
+
*
|
|
4728
|
+
* @param coordinate The MappedinCoordinate to check
|
|
4729
|
+
* @param includeNonInteractive Specifies if all polygons should be included rather
|
|
4730
|
+
* than just interactive polygons.
|
|
4731
|
+
* @returns MappedinPolygon[]
|
|
4732
|
+
*/
|
|
4733
|
+
getPolygonsAtCoordinate(coordinate: MappedinCoordinate, includeNonInteractive?: boolean): MappedinPolygon[];
|
|
4683
4734
|
/**
|
|
4684
4735
|
* Destroy instance and clean up memory
|
|
4685
4736
|
*/
|