@mappedin/mappedin-js 5.2.1 → 5.2.2
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/lib/esm/get-venue/index.d.ts +146 -115
- package/lib/esm/get-venue/index.js +1 -1
- package/lib/esm/navigator/index.js +1 -1
- package/lib/esm/renderer/{browser-HOF5XMWN.js → browser-PV7BMKYF.js} +1 -1
- package/lib/esm/renderer/chunk-YMYTDW5Q.js +1 -0
- package/lib/esm/renderer/index.d.ts +173 -130
- package/lib/esm/renderer/index.js +1 -1
- package/lib/mappedin.js +1 -1
- package/lib/node/index.js +1 -1
- package/package.json +2 -2
- package/lib/esm/renderer/chunk-5UCNSGBD.js +0 -1
|
@@ -35,6 +35,13 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue' {
|
|
|
35
35
|
export { MappedinRankings } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinRankings';
|
|
36
36
|
export { MappedinDestinationSet } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinDestinationSet';
|
|
37
37
|
export { MappedinNavigatable } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNavigatable';
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
* @hidden
|
|
41
|
+
*
|
|
42
|
+
* Export this only so our internal pre-built products can use it. We don't want to document it for external developers.
|
|
43
|
+
*/
|
|
44
|
+
export { default as CustomerAnalytics } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.CustomerAnalytics';
|
|
38
45
|
export type { TTHINGS } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
|
|
39
46
|
export type { TMappedinDirective } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinDirections';
|
|
40
47
|
export type { IDirectionsResult } from '@mappedin/mappedin-js/lib/esm/get-venue/navigator';
|
|
@@ -137,6 +144,13 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue' {
|
|
|
137
144
|
* and may be determental to smaller ones, hence it is off by default
|
|
138
145
|
*/
|
|
139
146
|
useWorker?: boolean): Promise<unknown>;
|
|
147
|
+
/**
|
|
148
|
+
* Returns a {@link Mappedin} object hydrated with JSON data.
|
|
149
|
+
* @param {string|Object} mappedinSerializableData A JSON string or object representing a venue.
|
|
150
|
+
* @param {boolean} shouldPopulateBundledImagesAsBlobs
|
|
151
|
+
* @returns {Mappedin} A new Mappedin object with data from the mappedinSerializableData parameter.
|
|
152
|
+
*/
|
|
153
|
+
export function hydrateVenue(mappedinSerializableData: any, shouldPopulateBundledImagesAsBlobs?: boolean): Promise<Mappedin>;
|
|
140
154
|
}
|
|
141
155
|
|
|
142
156
|
declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.types' {
|
|
@@ -445,6 +459,9 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin' {
|
|
|
445
459
|
imageBinaries?: Map<string, Uint8Array>;
|
|
446
460
|
scenes: any;
|
|
447
461
|
fetch(): Promise<void>;
|
|
462
|
+
/**
|
|
463
|
+
* @deprecated Use {@link hydrateVenue} instead
|
|
464
|
+
*/
|
|
448
465
|
constructor(options: TGetVenueOptionsInternal & TGetVenueOptions);
|
|
449
466
|
analytics: IAnalytics;
|
|
450
467
|
/**
|
|
@@ -1289,6 +1306,121 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNaviga
|
|
|
1289
1306
|
}
|
|
1290
1307
|
}
|
|
1291
1308
|
|
|
1309
|
+
declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.CustomerAnalytics' {
|
|
1310
|
+
import { MappedinCategory, MappedinLocation } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue';
|
|
1311
|
+
type AnalyticsOptions = {
|
|
1312
|
+
clientId?: string;
|
|
1313
|
+
clientSecret?: string;
|
|
1314
|
+
accessToken?: string;
|
|
1315
|
+
noAuth?: boolean;
|
|
1316
|
+
venue: string;
|
|
1317
|
+
testMode?: boolean | string;
|
|
1318
|
+
context?: string;
|
|
1319
|
+
platformString?: string;
|
|
1320
|
+
};
|
|
1321
|
+
interface IAnalytics {
|
|
1322
|
+
locationSelected(location: MappedinLocation): void;
|
|
1323
|
+
categorySelected(category: MappedinCategory): void;
|
|
1324
|
+
getDirections(start: MappedinLocation, end: MappedinLocation): void;
|
|
1325
|
+
}
|
|
1326
|
+
interface IInternalAnalytics extends IAnalytics {
|
|
1327
|
+
track(target: string, query: any): void;
|
|
1328
|
+
mapViewLoaded(type: '2d' | '3d', forced: boolean, benchmark: number, reason: string): void;
|
|
1329
|
+
getSessionID(): string;
|
|
1330
|
+
getDeviceID(): string;
|
|
1331
|
+
setGeolocationMode(mode: boolean): void;
|
|
1332
|
+
trackBlueDotEvent(blueDotEvent: Record<string, unknown>): void;
|
|
1333
|
+
trackSearch(searchAnalyticsObject: Record<string, unknown>): void;
|
|
1334
|
+
trackSearchSuggest(searchAnalyticsObject: Record<string, unknown>): void;
|
|
1335
|
+
}
|
|
1336
|
+
/**
|
|
1337
|
+
* A class to access the Mappedin Analytics platform. Correct usage will improve Smart Search results, and lead to more accurate insights.
|
|
1338
|
+
* This will be created for you as part of Mappedin.{{#crossLink "Mappedin/initialize:method"}}{{/crossLink}}, but you can also create one manually. You are mostly going to use `locationSelected`.
|
|
1339
|
+
*
|
|
1340
|
+
* @type {any}
|
|
1341
|
+
*
|
|
1342
|
+
* @class Analytics
|
|
1343
|
+
* @param options {Object} A list of configuration options for the Analytics API.
|
|
1344
|
+
* @param [options.clientId] {String} The same key you are using for getVenue. Handled automatically in Mapview.initialize()
|
|
1345
|
+
* @param [options.clientSecret] {String} The same secret you are using for getVenue. Handled automatically in Mapview.initialize()
|
|
1346
|
+
* @param [options.venue] {String} The same venue slug you are using for getVenue. Handled automatically in MapView.initialize()
|
|
1347
|
+
* @param [options.context] {String} The context to pass with the analytics request. Defaults to "websdk".
|
|
1348
|
+
* @param [options.noAuth] {Boolean} Whether authentication should not be sent with analytics requests.
|
|
1349
|
+
* @param [options.testMode] {Boolean} Whether analytics events should be dropped because this is running in a test environment.
|
|
1350
|
+
*/
|
|
1351
|
+
class Analytics implements IInternalAnalytics {
|
|
1352
|
+
#private;
|
|
1353
|
+
constructor(options: AnalyticsOptions);
|
|
1354
|
+
track(target: any, query: any): void;
|
|
1355
|
+
/**
|
|
1356
|
+
* Whenever a location is selected, you should fire this event. What "selected" means can vary by venue,
|
|
1357
|
+
* but a good rule of thumb is that you fire the event whenever you would show the location's details.
|
|
1358
|
+
* Typically this is when the user taps it's polygon on the map, picks it from search results or a category list.
|
|
1359
|
+
* or deep links directly into the map.
|
|
1360
|
+
* @method locationSelected
|
|
1361
|
+
* @param location {MappedinLocation} The location the user selected.
|
|
1362
|
+
*/
|
|
1363
|
+
locationSelected(location: any): void;
|
|
1364
|
+
/**
|
|
1365
|
+
* Whenever a category is selected, you should fire this event.
|
|
1366
|
+
* @method categorySelected
|
|
1367
|
+
* @param category {MappedinCategory} The category the user selected.
|
|
1368
|
+
*/
|
|
1369
|
+
categorySelected(category: any): void;
|
|
1370
|
+
mapViewLoaded(type: any, forced: any, benchmark: any, reason: any): void;
|
|
1371
|
+
/**
|
|
1372
|
+
* Whenever a user requests directions, you should fire this event.
|
|
1373
|
+
* @method getDirections
|
|
1374
|
+
* @param start {MappedinLocation} The start location for wayfinding.
|
|
1375
|
+
* @param end {MappedinLocation} The end location for wayfinding.
|
|
1376
|
+
*/
|
|
1377
|
+
getDirections(start: any, end: any): void;
|
|
1378
|
+
getSessionID(): string;
|
|
1379
|
+
getDeviceID(): string;
|
|
1380
|
+
/**
|
|
1381
|
+
* @param mode {Boolean} Indicates whether the user's geolocation is enabled.
|
|
1382
|
+
*/
|
|
1383
|
+
setGeolocationMode(mode: any): void;
|
|
1384
|
+
/**
|
|
1385
|
+
* Track an event.
|
|
1386
|
+
* @method trackBlueDotEvent
|
|
1387
|
+
* @param event {String}
|
|
1388
|
+
* event param should be a property of the {{#crossLink "Analytics/BLUEDOT_EVENT:property"}}{{/crossLink}} property.
|
|
1389
|
+
*/
|
|
1390
|
+
trackBlueDotEvent(blueDotEvent: any): void;
|
|
1391
|
+
trackSearch(searchAnalyticsObject: any): void;
|
|
1392
|
+
trackSearchSuggest(searchAnalyticsObject: any): void;
|
|
1393
|
+
/**
|
|
1394
|
+
* Sets the current global context of the Analytics class.
|
|
1395
|
+
* @method setContext
|
|
1396
|
+
* @param context {String} The Analytics context to be set.
|
|
1397
|
+
* @hidden
|
|
1398
|
+
*/
|
|
1399
|
+
static setContext(context: any): void;
|
|
1400
|
+
/**
|
|
1401
|
+
* Sets the current global context of the Analytics class to undefined.
|
|
1402
|
+
* @method clearContext
|
|
1403
|
+
* @hidden
|
|
1404
|
+
*/
|
|
1405
|
+
static clearContext(): void;
|
|
1406
|
+
/**
|
|
1407
|
+
* Enum of valid bluedot events.
|
|
1408
|
+
* Pass a property of this into the {{#crossLink "Analytics/trackBlueDotEvent:method"}}{{/crossLink}} method.
|
|
1409
|
+
* Valid properties are: ATTEMPT_BLUEDOT, FOUND_POSITION, FOUND_FLOOR.
|
|
1410
|
+
* @property BLUEDOT_EVENT {Object}
|
|
1411
|
+
* @example
|
|
1412
|
+
* Analytics.trackBlueDotEvent(Analytics.BLUEDOT_EVENT.ATTEMPT_BLUEDOT)
|
|
1413
|
+
*/
|
|
1414
|
+
static BLUEDOT_EVENT: {
|
|
1415
|
+
ATTEMPT_BLUEDOT: string;
|
|
1416
|
+
FOUND_POSITION: string;
|
|
1417
|
+
FOUND_FLOOR: string;
|
|
1418
|
+
};
|
|
1419
|
+
}
|
|
1420
|
+
export type { IAnalytics };
|
|
1421
|
+
export default Analytics;
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1292
1424
|
declare module '@mappedin/mappedin-js/lib/esm/get-venue/navigator' {
|
|
1293
1425
|
import NavigationGraph from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/NavigationGraph';
|
|
1294
1426
|
import Navigator from '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Navigator';
|
|
@@ -2004,121 +2136,6 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinTheme'
|
|
|
2004
2136
|
}
|
|
2005
2137
|
}
|
|
2006
2138
|
|
|
2007
|
-
declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.CustomerAnalytics' {
|
|
2008
|
-
import { MappedinCategory, MappedinLocation } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue';
|
|
2009
|
-
type AnalyticsOptions = {
|
|
2010
|
-
clientId?: string;
|
|
2011
|
-
clientSecret?: string;
|
|
2012
|
-
accessToken?: string;
|
|
2013
|
-
noAuth?: boolean;
|
|
2014
|
-
venue: string;
|
|
2015
|
-
testMode?: boolean | string;
|
|
2016
|
-
context?: string;
|
|
2017
|
-
platformString?: string;
|
|
2018
|
-
};
|
|
2019
|
-
interface IAnalytics {
|
|
2020
|
-
locationSelected(location: MappedinLocation): void;
|
|
2021
|
-
categorySelected(category: MappedinCategory): void;
|
|
2022
|
-
getDirections(start: MappedinLocation, end: MappedinLocation): void;
|
|
2023
|
-
}
|
|
2024
|
-
interface IInternalAnalytics extends IAnalytics {
|
|
2025
|
-
track(target: string, query: any): void;
|
|
2026
|
-
mapViewLoaded(type: '2d' | '3d', forced: boolean, benchmark: number, reason: string): void;
|
|
2027
|
-
getSessionID(): string;
|
|
2028
|
-
getDeviceID(): string;
|
|
2029
|
-
setGeolocationMode(mode: boolean): void;
|
|
2030
|
-
trackBlueDotEvent(blueDotEvent: Record<string, unknown>): void;
|
|
2031
|
-
trackSearch(searchAnalyticsObject: Record<string, unknown>): void;
|
|
2032
|
-
trackSearchSuggest(searchAnalyticsObject: Record<string, unknown>): void;
|
|
2033
|
-
}
|
|
2034
|
-
/**
|
|
2035
|
-
* A class to access the Mappedin Analytics platform. Correct usage will improve Smart Search results, and lead to more accurate insights.
|
|
2036
|
-
* This will be created for you as part of Mappedin.{{#crossLink "Mappedin/initialize:method"}}{{/crossLink}}, but you can also create one manually. You are mostly going to use `locationSelected`.
|
|
2037
|
-
*
|
|
2038
|
-
* @type {any}
|
|
2039
|
-
*
|
|
2040
|
-
* @class Analytics
|
|
2041
|
-
* @param options {Object} A list of configuration options for the Analytics API.
|
|
2042
|
-
* @param [options.clientId] {String} The same key you are using for getVenue. Handled automatically in Mapview.initialize()
|
|
2043
|
-
* @param [options.clientSecret] {String} The same secret you are using for getVenue. Handled automatically in Mapview.initialize()
|
|
2044
|
-
* @param [options.venue] {String} The same venue slug you are using for getVenue. Handled automatically in MapView.initialize()
|
|
2045
|
-
* @param [options.context] {String} The context to pass with the analytics request. Defaults to "websdk".
|
|
2046
|
-
* @param [options.noAuth] {Boolean} Whether authentication should not be sent with analytics requests.
|
|
2047
|
-
* @param [options.testMode] {Boolean} Whether analytics events should be dropped because this is running in a test environment.
|
|
2048
|
-
*/
|
|
2049
|
-
class Analytics implements IInternalAnalytics {
|
|
2050
|
-
#private;
|
|
2051
|
-
constructor(options: AnalyticsOptions);
|
|
2052
|
-
track(target: any, query: any): void;
|
|
2053
|
-
/**
|
|
2054
|
-
* Whenever a location is selected, you should fire this event. What "selected" means can vary by venue,
|
|
2055
|
-
* but a good rule of thumb is that you fire the event whenever you would show the location's details.
|
|
2056
|
-
* Typically this is when the user taps it's polygon on the map, picks it from search results or a category list.
|
|
2057
|
-
* or deep links directly into the map.
|
|
2058
|
-
* @method locationSelected
|
|
2059
|
-
* @param location {MappedinLocation} The location the user selected.
|
|
2060
|
-
*/
|
|
2061
|
-
locationSelected(location: any): void;
|
|
2062
|
-
/**
|
|
2063
|
-
* Whenever a category is selected, you should fire this event.
|
|
2064
|
-
* @method categorySelected
|
|
2065
|
-
* @param category {MappedinCategory} The category the user selected.
|
|
2066
|
-
*/
|
|
2067
|
-
categorySelected(category: any): void;
|
|
2068
|
-
mapViewLoaded(type: any, forced: any, benchmark: any, reason: any): void;
|
|
2069
|
-
/**
|
|
2070
|
-
* Whenever a user requests directions, you should fire this event.
|
|
2071
|
-
* @method getDirections
|
|
2072
|
-
* @param start {MappedinLocation} The start location for wayfinding.
|
|
2073
|
-
* @param end {MappedinLocation} The end location for wayfinding.
|
|
2074
|
-
*/
|
|
2075
|
-
getDirections(start: any, end: any): void;
|
|
2076
|
-
getSessionID(): string;
|
|
2077
|
-
getDeviceID(): string;
|
|
2078
|
-
/**
|
|
2079
|
-
* @param mode {Boolean} Indicates whether the user's geolocation is enabled.
|
|
2080
|
-
*/
|
|
2081
|
-
setGeolocationMode(mode: any): void;
|
|
2082
|
-
/**
|
|
2083
|
-
* Track an event.
|
|
2084
|
-
* @method trackBlueDotEvent
|
|
2085
|
-
* @param event {String}
|
|
2086
|
-
* event param should be a property of the {{#crossLink "Analytics/BLUEDOT_EVENT:property"}}{{/crossLink}} property.
|
|
2087
|
-
*/
|
|
2088
|
-
trackBlueDotEvent(blueDotEvent: any): void;
|
|
2089
|
-
trackSearch(searchAnalyticsObject: any): void;
|
|
2090
|
-
trackSearchSuggest(searchAnalyticsObject: any): void;
|
|
2091
|
-
/**
|
|
2092
|
-
* Sets the current global context of the Analytics class.
|
|
2093
|
-
* @method setContext
|
|
2094
|
-
* @param context {String} The Analytics context to be set.
|
|
2095
|
-
* @hidden
|
|
2096
|
-
*/
|
|
2097
|
-
static setContext(context: any): void;
|
|
2098
|
-
/**
|
|
2099
|
-
* Sets the current global context of the Analytics class to undefined.
|
|
2100
|
-
* @method clearContext
|
|
2101
|
-
* @hidden
|
|
2102
|
-
*/
|
|
2103
|
-
static clearContext(): void;
|
|
2104
|
-
/**
|
|
2105
|
-
* Enum of valid bluedot events.
|
|
2106
|
-
* Pass a property of this into the {{#crossLink "Analytics/trackBlueDotEvent:method"}}{{/crossLink}} method.
|
|
2107
|
-
* Valid properties are: ATTEMPT_BLUEDOT, FOUND_POSITION, FOUND_FLOOR.
|
|
2108
|
-
* @property BLUEDOT_EVENT {Object}
|
|
2109
|
-
* @example
|
|
2110
|
-
* Analytics.trackBlueDotEvent(Analytics.BLUEDOT_EVENT.ATTEMPT_BLUEDOT)
|
|
2111
|
-
*/
|
|
2112
|
-
static BLUEDOT_EVENT: {
|
|
2113
|
-
ATTEMPT_BLUEDOT: string;
|
|
2114
|
-
FOUND_POSITION: string;
|
|
2115
|
-
FOUND_FLOOR: string;
|
|
2116
|
-
};
|
|
2117
|
-
}
|
|
2118
|
-
export type { IAnalytics };
|
|
2119
|
-
export default Analytics;
|
|
2120
|
-
}
|
|
2121
|
-
|
|
2122
2139
|
declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue' {
|
|
2123
2140
|
import type { TGetVenueOptions } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.types';
|
|
2124
2141
|
import { Mappedin } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
|
|
@@ -2151,6 +2168,13 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue' {
|
|
|
2151
2168
|
export { MappedinRankings } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinRankings';
|
|
2152
2169
|
export { MappedinDestinationSet } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinDestinationSet';
|
|
2153
2170
|
export { MappedinNavigatable } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinNavigatable';
|
|
2171
|
+
/**
|
|
2172
|
+
* @internal
|
|
2173
|
+
* @hidden
|
|
2174
|
+
*
|
|
2175
|
+
* Export this only so our internal pre-built products can use it. We don't want to document it for external developers.
|
|
2176
|
+
*/
|
|
2177
|
+
export { default as CustomerAnalytics } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin.CustomerAnalytics';
|
|
2154
2178
|
export type { TTHINGS } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/Mappedin';
|
|
2155
2179
|
export type { TMappedinDirective } from '@mappedin/mappedin-js/lib/esm/get-venue/get-venue/MappedinDirections';
|
|
2156
2180
|
export type { IDirectionsResult } from '@mappedin/mappedin-js/lib/esm/get-venue/navigator';
|
|
@@ -2253,6 +2277,13 @@ declare module '@mappedin/mappedin-js/lib/esm/get-venue/get-venue' {
|
|
|
2253
2277
|
* and may be determental to smaller ones, hence it is off by default
|
|
2254
2278
|
*/
|
|
2255
2279
|
useWorker?: boolean): Promise<unknown>;
|
|
2280
|
+
/**
|
|
2281
|
+
* Returns a {@link Mappedin} object hydrated with JSON data.
|
|
2282
|
+
* @param {string|Object} mappedinSerializableData A JSON string or object representing a venue.
|
|
2283
|
+
* @param {boolean} shouldPopulateBundledImagesAsBlobs
|
|
2284
|
+
* @returns {Mappedin} A new Mappedin object with data from the mappedinSerializableData parameter.
|
|
2285
|
+
*/
|
|
2286
|
+
export function hydrateVenue(mappedinSerializableData: any, shouldPopulateBundledImagesAsBlobs?: boolean): Promise<Mappedin>;
|
|
2256
2287
|
}
|
|
2257
2288
|
|
|
2258
2289
|
declare module '@mappedin/mappedin-js/lib/esm/get-venue/navigator/Directive' {
|