@mapvx/web-js 4.0.3 → 4.0.4
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/cjs/index.js +4 -2
- package/dist/es/assets/icons.d.ts +0 -1
- package/dist/es/assets/icons.js +0 -50
- package/dist/es/config/draco.d.ts +0 -1
- package/dist/es/config/draco.js +0 -10
- package/dist/es/config/sdkConfig.d.ts +0 -1
- package/dist/es/config/sdkConfig.js +0 -1
- package/dist/es/controllers/markerLayoutController.d.ts +0 -1
- package/dist/es/controllers/markerLayoutController.js +0 -103
- package/dist/es/controllers/routeController.d.ts +0 -1
- package/dist/es/controllers/routeController.js +1 -473
- package/dist/es/domain/models/_internal.d.ts +0 -1
- package/dist/es/domain/models/_internal.js +0 -8
- package/dist/es/domain/models/animation.d.ts +0 -1
- package/dist/es/domain/models/animation.js +0 -6
- package/dist/es/domain/models/banner.d.ts +0 -1
- package/dist/es/domain/models/banner.js +0 -10
- package/dist/es/domain/models/campaign.d.ts +0 -1
- package/dist/es/domain/models/campaign.js +0 -29
- package/dist/es/domain/models/categories.d.ts +0 -1
- package/dist/es/domain/models/categories.js +0 -20
- package/dist/es/domain/models/circle.d.ts +0 -1
- package/dist/es/domain/models/circle.js +0 -118
- package/dist/es/domain/models/cityFilterOption.d.ts +0 -1
- package/dist/es/domain/models/cityFilterOption.js +0 -1
- package/dist/es/domain/models/configuration.d.ts +0 -1
- package/dist/es/domain/models/configuration.js +0 -1
- package/dist/es/domain/models/cssCustomization.d.ts +0 -1
- package/dist/es/domain/models/cssCustomization.js +0 -1
- package/dist/es/domain/models/fitOptions.d.ts +0 -1
- package/dist/es/domain/models/fitOptions.js +0 -1
- package/dist/es/domain/models/innerFloors.d.ts +0 -1
- package/dist/es/domain/models/innerFloors.js +0 -1
- package/dist/es/domain/models/institution.d.ts +0 -1
- package/dist/es/domain/models/institution.js +0 -26
- package/dist/es/domain/models/latLng.d.ts +0 -1
- package/dist/es/domain/models/latLng.js +0 -1
- package/dist/es/domain/models/location.d.ts +0 -1
- package/dist/es/domain/models/location.js +0 -1
- package/dist/es/domain/models/loggeable.d.ts +0 -1
- package/dist/es/domain/models/loggeable.js +0 -24
- package/dist/es/domain/models/mapCamera.d.ts +0 -1
- package/dist/es/domain/models/mapCamera.js +0 -1
- package/dist/es/domain/models/mapConfig.d.ts +0 -1
- package/dist/es/domain/models/mapConfig.js +1 -17
- package/dist/es/domain/models/marker.d.ts +0 -1
- package/dist/es/domain/models/marker.js +0 -292
- package/dist/es/domain/models/multilanguage.d.ts +0 -1
- package/dist/es/domain/models/multilanguage.js +0 -10
- package/dist/es/domain/models/openingHours.d.ts +0 -1
- package/dist/es/domain/models/openingHours.js +0 -1
- package/dist/es/domain/models/place.d.ts +0 -1
- package/dist/es/domain/models/place.js +0 -68
- package/dist/es/domain/models/platform.d.ts +0 -1
- package/dist/es/domain/models/platform.js +0 -1
- package/dist/es/domain/models/popover.d.ts +0 -1
- package/dist/es/domain/models/popover.js +0 -1
- package/dist/es/domain/models/product.d.ts +0 -1
- package/dist/es/domain/models/product.js +0 -1
- package/dist/es/domain/models/property.d.ts +0 -1
- package/dist/es/domain/models/property.js +0 -16
- package/dist/es/domain/models/route.d.ts +0 -1
- package/dist/es/domain/models/route.js +0 -71
- package/dist/es/domain/models/routeConfiguration.d.ts +0 -1
- package/dist/es/domain/models/routeConfiguration.js +0 -36
- package/dist/es/domain/models/routeInstance.d.ts +0 -1
- package/dist/es/domain/models/routeInstance.js +0 -8
- package/dist/es/domain/models/routeStyle.d.ts +0 -1
- package/dist/es/domain/models/routeStyle.js +0 -1
- package/dist/es/domain/models/scene3D.d.ts +0 -1
- package/dist/es/domain/models/scene3D.js +0 -1
- package/dist/es/domain/models/transport.d.ts +0 -1
- package/dist/es/domain/models/transport.js +0 -12
- package/dist/es/domain/ports/ICache.d.ts +0 -1
- package/dist/es/domain/ports/ICache.js +0 -1
- package/dist/es/domain/ports/IHttpClient.d.ts +0 -1
- package/dist/es/domain/ports/IHttpClient.js +0 -1
- package/dist/es/domain/ports/ILogger.d.ts +0 -1
- package/dist/es/domain/ports/ILogger.js +0 -9
- package/dist/es/domain/ports/index.d.ts +0 -1
- package/dist/es/domain/ports/index.js +0 -5
- package/dist/es/index.d.ts +0 -1
- package/dist/es/index.js +1 -28
- package/dist/es/infrastructure/cache/CacheManager.d.ts +0 -1
- package/dist/es/infrastructure/cache/CacheManager.js +0 -94
- package/dist/es/infrastructure/cache/LRUCache.d.ts +0 -1
- package/dist/es/infrastructure/cache/LRUCache.js +0 -57
- package/dist/es/infrastructure/cache/PersistentCache.d.ts +0 -1
- package/dist/es/infrastructure/cache/PersistentCache.js +0 -51
- package/dist/es/infrastructure/cache/cacheConfig.d.ts +0 -1
- package/dist/es/infrastructure/cache/cacheConfig.js +8 -27
- package/dist/es/infrastructure/http/FetchHttpClient.d.ts +0 -1
- package/dist/es/infrastructure/http/FetchHttpClient.js +0 -36
- package/dist/es/infrastructure/logging/MVXLogger.d.ts +0 -1
- package/dist/es/infrastructure/logging/MVXLogger.js +0 -37
- package/dist/es/interfaces/cache.d.ts +0 -1
- package/dist/es/interfaces/cache.js +0 -1
- package/dist/es/interfaces/healthResponse.d.ts +0 -1
- package/dist/es/interfaces/healthResponse.js +0 -1
- package/dist/es/interfaces/institutionResponse.d.ts +0 -1
- package/dist/es/interfaces/institutionResponse.js +0 -1
- package/dist/es/interfaces/metadata.d.ts +0 -1
- package/dist/es/interfaces/metadata.js +0 -1
- package/dist/es/interfaces/placeResponse.d.ts +0 -1
- package/dist/es/interfaces/placeResponse.js +0 -1
- package/dist/es/interfaces/routeCacheResponse.d.ts +0 -1
- package/dist/es/interfaces/routeCacheResponse.js +0 -1
- package/dist/es/interfaces/routeResponse.d.ts +0 -1
- package/dist/es/interfaces/routeResponse.js +0 -1
- package/dist/es/interfaces/styleResponse.d.ts +0 -1
- package/dist/es/interfaces/styleResponse.js +0 -1
- package/dist/es/logger/logger.d.ts +0 -1
- package/dist/es/logger/logger.js +0 -10
- package/dist/es/logger/sentry.d.ts +0 -1
- package/dist/es/logger/sentry.js +1 -39
- package/dist/es/map/fitCamera.d.ts +0 -1
- package/dist/es/map/fitCamera.js +0 -44
- package/dist/es/map/generated/maplibreWorkerSource.d.ts +0 -1
- package/dist/es/map/generated/maplibreWorkerSource.js +0 -12
- package/dist/es/map/installMapLibreWorker.d.ts +0 -1
- package/dist/es/map/installMapLibreWorker.js +0 -100
- package/dist/es/map/liveMapFitTransform.d.ts +0 -1
- package/dist/es/map/liveMapFitTransform.js +0 -82
- package/dist/es/map/map.d.ts +0 -1
- package/dist/es/map/map.js +4 -681
- package/dist/es/map/mapInteractionOptions.d.ts +0 -1
- package/dist/es/map/mapInteractionOptions.js +0 -35
- package/dist/es/map/scene3DController.d.ts +0 -1
- package/dist/es/map/scene3DController.js +0 -221
- package/dist/es/repository/repository.d.ts +0 -1
- package/dist/es/repository/repository.js +0 -56
- package/dist/es/repository/requester.d.ts +0 -1
- package/dist/es/repository/requester.js +0 -233
- package/dist/es/sdk.d.ts +0 -1
- package/dist/es/sdk.js +0 -35
- package/dist/es/utils/3d.d.ts +0 -1
- package/dist/es/utils/3d.js +0 -79
- package/dist/es/utils/deckLayers.d.ts +0 -1
- package/dist/es/utils/deckLayers.js +1 -27
- package/dist/es/utils/error.d.ts +0 -1
- package/dist/es/utils/error.js +0 -7
- package/dist/es/utils/images.d.ts +0 -1
- package/dist/es/utils/images.js +0 -7
- package/dist/es/utils/loadGlb.d.ts +0 -1
- package/dist/es/utils/loadGlb.js +2 -96
- package/dist/es/utils/mapvxHostname.d.ts +0 -1
- package/dist/es/utils/mapvxHostname.js +0 -11
- package/dist/es/utils/nav-functions.d.ts +0 -1
- package/dist/es/utils/nav-functions.js +0 -82
- package/dist/es/utils/opening-hours-helper.d.ts +0 -1
- package/dist/es/utils/opening-hours-helper.js +6 -382
- package/dist/es/utils/preconnect.d.ts +0 -1
- package/dist/es/utils/preconnect.js +0 -61
- package/dist/es/utils/route-utils.d.ts +0 -1
- package/dist/es/utils/route-utils.js +0 -25
- package/dist/es/utils/semaphore.d.ts +0 -1
- package/dist/es/utils/semaphore.js +0 -78
- package/dist/es/utils/three.d.ts +0 -1
- package/dist/es/utils/three.js +0 -43
- package/dist/es/utils/threeScene.d.ts +0 -1
- package/dist/es/utils/threeScene.js +0 -38
- package/dist/es/utils/update-css.d.ts +0 -1
- package/dist/es/utils/update-css.js +0 -26
- package/dist/es/utils/utils.d.ts +0 -1
- package/dist/es/utils/utils.js +0 -53
- package/dist/umd/index.js +4 -29240
- package/dist/umd/index.js.LICENSE.txt +1 -0
- package/dist/umd/styles.css +0 -1
- package/dist/umd/styles.js +3 -32
- package/package.json +11 -5
- package/dist/cjs/index.js.map +0 -1
- package/dist/es/assets/icons.d.ts.map +0 -1
- package/dist/es/assets/icons.js.map +0 -1
- package/dist/es/config/draco.d.ts.map +0 -1
- package/dist/es/config/draco.js.map +0 -1
- package/dist/es/config/sdkConfig.d.ts.map +0 -1
- package/dist/es/config/sdkConfig.js.map +0 -1
- package/dist/es/controllers/markerLayoutController.d.ts.map +0 -1
- package/dist/es/controllers/markerLayoutController.js.map +0 -1
- package/dist/es/controllers/routeController.d.ts.map +0 -1
- package/dist/es/controllers/routeController.js.map +0 -1
- package/dist/es/domain/models/_internal.d.ts.map +0 -1
- package/dist/es/domain/models/_internal.js.map +0 -1
- package/dist/es/domain/models/animation.d.ts.map +0 -1
- package/dist/es/domain/models/animation.js.map +0 -1
- package/dist/es/domain/models/banner.d.ts.map +0 -1
- package/dist/es/domain/models/banner.js.map +0 -1
- package/dist/es/domain/models/campaign.d.ts.map +0 -1
- package/dist/es/domain/models/campaign.js.map +0 -1
- package/dist/es/domain/models/categories.d.ts.map +0 -1
- package/dist/es/domain/models/categories.js.map +0 -1
- package/dist/es/domain/models/circle.d.ts.map +0 -1
- package/dist/es/domain/models/circle.js.map +0 -1
- package/dist/es/domain/models/cityFilterOption.d.ts.map +0 -1
- package/dist/es/domain/models/cityFilterOption.js.map +0 -1
- package/dist/es/domain/models/configuration.d.ts.map +0 -1
- package/dist/es/domain/models/configuration.js.map +0 -1
- package/dist/es/domain/models/cssCustomization.d.ts.map +0 -1
- package/dist/es/domain/models/cssCustomization.js.map +0 -1
- package/dist/es/domain/models/fitOptions.d.ts.map +0 -1
- package/dist/es/domain/models/fitOptions.js.map +0 -1
- package/dist/es/domain/models/innerFloors.d.ts.map +0 -1
- package/dist/es/domain/models/innerFloors.js.map +0 -1
- package/dist/es/domain/models/institution.d.ts.map +0 -1
- package/dist/es/domain/models/institution.js.map +0 -1
- package/dist/es/domain/models/latLng.d.ts.map +0 -1
- package/dist/es/domain/models/latLng.js.map +0 -1
- package/dist/es/domain/models/location.d.ts.map +0 -1
- package/dist/es/domain/models/location.js.map +0 -1
- package/dist/es/domain/models/loggeable.d.ts.map +0 -1
- package/dist/es/domain/models/loggeable.js.map +0 -1
- package/dist/es/domain/models/mapCamera.d.ts.map +0 -1
- package/dist/es/domain/models/mapCamera.js.map +0 -1
- package/dist/es/domain/models/mapConfig.d.ts.map +0 -1
- package/dist/es/domain/models/mapConfig.js.map +0 -1
- package/dist/es/domain/models/marker.d.ts.map +0 -1
- package/dist/es/domain/models/marker.js.map +0 -1
- package/dist/es/domain/models/multilanguage.d.ts.map +0 -1
- package/dist/es/domain/models/multilanguage.js.map +0 -1
- package/dist/es/domain/models/openingHours.d.ts.map +0 -1
- package/dist/es/domain/models/openingHours.js.map +0 -1
- package/dist/es/domain/models/place.d.ts.map +0 -1
- package/dist/es/domain/models/place.js.map +0 -1
- package/dist/es/domain/models/platform.d.ts.map +0 -1
- package/dist/es/domain/models/platform.js.map +0 -1
- package/dist/es/domain/models/popover.d.ts.map +0 -1
- package/dist/es/domain/models/popover.js.map +0 -1
- package/dist/es/domain/models/product.d.ts.map +0 -1
- package/dist/es/domain/models/product.js.map +0 -1
- package/dist/es/domain/models/property.d.ts.map +0 -1
- package/dist/es/domain/models/property.js.map +0 -1
- package/dist/es/domain/models/route.d.ts.map +0 -1
- package/dist/es/domain/models/route.js.map +0 -1
- package/dist/es/domain/models/routeConfiguration.d.ts.map +0 -1
- package/dist/es/domain/models/routeConfiguration.js.map +0 -1
- package/dist/es/domain/models/routeInstance.d.ts.map +0 -1
- package/dist/es/domain/models/routeInstance.js.map +0 -1
- package/dist/es/domain/models/routeStyle.d.ts.map +0 -1
- package/dist/es/domain/models/routeStyle.js.map +0 -1
- package/dist/es/domain/models/scene3D.d.ts.map +0 -1
- package/dist/es/domain/models/scene3D.js.map +0 -1
- package/dist/es/domain/models/transport.d.ts.map +0 -1
- package/dist/es/domain/models/transport.js.map +0 -1
- package/dist/es/domain/ports/ICache.d.ts.map +0 -1
- package/dist/es/domain/ports/ICache.js.map +0 -1
- package/dist/es/domain/ports/IHttpClient.d.ts.map +0 -1
- package/dist/es/domain/ports/IHttpClient.js.map +0 -1
- package/dist/es/domain/ports/ILogger.d.ts.map +0 -1
- package/dist/es/domain/ports/ILogger.js.map +0 -1
- package/dist/es/domain/ports/index.d.ts.map +0 -1
- package/dist/es/domain/ports/index.js.map +0 -1
- package/dist/es/index.d.ts.map +0 -1
- package/dist/es/index.js.map +0 -1
- package/dist/es/infrastructure/cache/CacheManager.d.ts.map +0 -1
- package/dist/es/infrastructure/cache/CacheManager.js.map +0 -1
- package/dist/es/infrastructure/cache/LRUCache.d.ts.map +0 -1
- package/dist/es/infrastructure/cache/LRUCache.js.map +0 -1
- package/dist/es/infrastructure/cache/PersistentCache.d.ts.map +0 -1
- package/dist/es/infrastructure/cache/PersistentCache.js.map +0 -1
- package/dist/es/infrastructure/cache/cacheConfig.d.ts.map +0 -1
- package/dist/es/infrastructure/cache/cacheConfig.js.map +0 -1
- package/dist/es/infrastructure/http/FetchHttpClient.d.ts.map +0 -1
- package/dist/es/infrastructure/http/FetchHttpClient.js.map +0 -1
- package/dist/es/infrastructure/logging/MVXLogger.d.ts.map +0 -1
- package/dist/es/infrastructure/logging/MVXLogger.js.map +0 -1
- package/dist/es/interfaces/cache.d.ts.map +0 -1
- package/dist/es/interfaces/cache.js.map +0 -1
- package/dist/es/interfaces/healthResponse.d.ts.map +0 -1
- package/dist/es/interfaces/healthResponse.js.map +0 -1
- package/dist/es/interfaces/institutionResponse.d.ts.map +0 -1
- package/dist/es/interfaces/institutionResponse.js.map +0 -1
- package/dist/es/interfaces/metadata.d.ts.map +0 -1
- package/dist/es/interfaces/metadata.js.map +0 -1
- package/dist/es/interfaces/placeResponse.d.ts.map +0 -1
- package/dist/es/interfaces/placeResponse.js.map +0 -1
- package/dist/es/interfaces/routeCacheResponse.d.ts.map +0 -1
- package/dist/es/interfaces/routeCacheResponse.js.map +0 -1
- package/dist/es/interfaces/routeResponse.d.ts.map +0 -1
- package/dist/es/interfaces/routeResponse.js.map +0 -1
- package/dist/es/interfaces/styleResponse.d.ts.map +0 -1
- package/dist/es/interfaces/styleResponse.js.map +0 -1
- package/dist/es/logger/logger.d.ts.map +0 -1
- package/dist/es/logger/logger.js.map +0 -1
- package/dist/es/logger/sentry.d.ts.map +0 -1
- package/dist/es/logger/sentry.js.map +0 -1
- package/dist/es/map/fitCamera.d.ts.map +0 -1
- package/dist/es/map/fitCamera.js.map +0 -1
- package/dist/es/map/generated/maplibreWorkerSource.d.ts.map +0 -1
- package/dist/es/map/generated/maplibreWorkerSource.js.map +0 -1
- package/dist/es/map/installMapLibreWorker.d.ts.map +0 -1
- package/dist/es/map/installMapLibreWorker.js.map +0 -1
- package/dist/es/map/liveMapFitTransform.d.ts.map +0 -1
- package/dist/es/map/liveMapFitTransform.js.map +0 -1
- package/dist/es/map/map.d.ts.map +0 -1
- package/dist/es/map/map.js.map +0 -1
- package/dist/es/map/mapInteractionOptions.d.ts.map +0 -1
- package/dist/es/map/mapInteractionOptions.js.map +0 -1
- package/dist/es/map/scene3DController.d.ts.map +0 -1
- package/dist/es/map/scene3DController.js.map +0 -1
- package/dist/es/repository/repository.d.ts.map +0 -1
- package/dist/es/repository/repository.js.map +0 -1
- package/dist/es/repository/requester.d.ts.map +0 -1
- package/dist/es/repository/requester.js.map +0 -1
- package/dist/es/sdk.d.ts.map +0 -1
- package/dist/es/sdk.js.map +0 -1
- package/dist/es/utils/3d.d.ts.map +0 -1
- package/dist/es/utils/3d.js.map +0 -1
- package/dist/es/utils/deckLayers.d.ts.map +0 -1
- package/dist/es/utils/deckLayers.js.map +0 -1
- package/dist/es/utils/error.d.ts.map +0 -1
- package/dist/es/utils/error.js.map +0 -1
- package/dist/es/utils/images.d.ts.map +0 -1
- package/dist/es/utils/images.js.map +0 -1
- package/dist/es/utils/loadGlb.d.ts.map +0 -1
- package/dist/es/utils/loadGlb.js.map +0 -1
- package/dist/es/utils/mapvxHostname.d.ts.map +0 -1
- package/dist/es/utils/mapvxHostname.js.map +0 -1
- package/dist/es/utils/nav-functions.d.ts.map +0 -1
- package/dist/es/utils/nav-functions.js.map +0 -1
- package/dist/es/utils/opening-hours-helper.d.ts.map +0 -1
- package/dist/es/utils/opening-hours-helper.js.map +0 -1
- package/dist/es/utils/preconnect.d.ts.map +0 -1
- package/dist/es/utils/preconnect.js.map +0 -1
- package/dist/es/utils/route-utils.d.ts.map +0 -1
- package/dist/es/utils/route-utils.js.map +0 -1
- package/dist/es/utils/semaphore.d.ts.map +0 -1
- package/dist/es/utils/semaphore.js.map +0 -1
- package/dist/es/utils/three.d.ts.map +0 -1
- package/dist/es/utils/three.js.map +0 -1
- package/dist/es/utils/threeScene.d.ts.map +0 -1
- package/dist/es/utils/threeScene.js.map +0 -1
- package/dist/es/utils/update-css.d.ts.map +0 -1
- package/dist/es/utils/update-css.js.map +0 -1
- package/dist/es/utils/utils.d.ts.map +0 -1
- package/dist/es/utils/utils.js.map +0 -1
- package/dist/umd/index.js.map +0 -1
- package/dist/umd/styles.css.map +0 -1
- package/dist/umd/styles.js.map +0 -1
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type guard function to check if an event is a DeviceOrientationEventExtended
|
|
3
|
-
*
|
|
4
|
-
* @param event The event to check
|
|
5
|
-
* @returns True if the event is a DeviceOrientationEventExtended, false otherwise
|
|
6
|
-
* @group Utils
|
|
7
|
-
*/
|
|
8
1
|
export function isDeviceOrientationEventExtended(event) {
|
|
9
2
|
return event instanceof DeviceOrientationEvent;
|
|
10
3
|
}
|
|
11
|
-
//# sourceMappingURL=_internal.js.map
|
|
@@ -12,11 +12,6 @@ export class InternalAnimationConfig {
|
|
|
12
12
|
this.autoFitByPlace = config.autoFitByPlace;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Represents the drawing configuration for the animation.
|
|
17
|
-
* @group Routes
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
15
|
export class InternalAnimationDrawingConfig {
|
|
21
16
|
constructor(data) {
|
|
22
17
|
var _a, _b, _c;
|
|
@@ -56,4 +51,3 @@ export class InternalAnimationDrawingConfig {
|
|
|
56
51
|
});
|
|
57
52
|
}
|
|
58
53
|
}
|
|
59
|
-
//# sourceMappingURL=animation.js.map
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Class that represents a banner in MapVX.
|
|
3
|
-
* Contains information about the image, tags, and banner behavior.
|
|
4
|
-
* @group Places & Locations
|
|
5
|
-
*/
|
|
6
1
|
export class Banner {
|
|
7
|
-
/**
|
|
8
|
-
* Creates a new banner instance from API response data
|
|
9
|
-
* @param rawBanner API response data containing banner information
|
|
10
|
-
*/
|
|
11
2
|
constructor(rawBanner) {
|
|
12
3
|
var _a;
|
|
13
4
|
this.url = rawBanner.url;
|
|
@@ -17,4 +8,3 @@ export class Banner {
|
|
|
17
8
|
this.description = rawBanner.description;
|
|
18
9
|
}
|
|
19
10
|
}
|
|
20
|
-
//# sourceMappingURL=banner.js.map
|
|
@@ -1,40 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolves a campaign image's media kind, tolerating the casing and spelling variations a
|
|
3
|
-
* backend can return.
|
|
4
|
-
*
|
|
5
|
-
* A strict `mediaType === "video"` check silently classifies `"VIDEO"`, `"Video"` and
|
|
6
|
-
* `"video/mp4"` as images, which puts an mp4 URL in an `<img>` slot — the screensaver
|
|
7
|
-
* then holds a blank frame with no warning anywhere. The MIME-ish `type` field is
|
|
8
|
-
* consulted as a fallback because it carries the same information (`"video/mp4"`) when
|
|
9
|
-
* `mediaType` is missing or unrecognized.
|
|
10
|
-
*
|
|
11
|
-
* @param mediaType Raw `mediaType` from the API response, if any.
|
|
12
|
-
* @param type Raw MIME `type` from the API response, used as the fallback signal.
|
|
13
|
-
* @returns `"video"` when either field identifies video, otherwise `"image"`.
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
1
|
function resolveMediaType(mediaType, type) {
|
|
17
2
|
const declared = mediaType === null || mediaType === void 0 ? void 0 : mediaType.trim().toLowerCase();
|
|
18
3
|
if (declared === "video" || (declared === null || declared === void 0 ? void 0 : declared.startsWith("video/")))
|
|
19
4
|
return "video";
|
|
20
5
|
if (declared === "image" || (declared === null || declared === void 0 ? void 0 : declared.startsWith("image/")))
|
|
21
6
|
return "image";
|
|
22
|
-
// `mediaType` absent or unrecognized: fall back to the MIME type.
|
|
23
7
|
return (type === null || type === void 0 ? void 0 : type.trim().toLowerCase().startsWith("video/")) ? "video" : "image";
|
|
24
8
|
}
|
|
25
|
-
/**
|
|
26
|
-
* A campaign shown by a totem screensaver. Its media items and weekly schedules
|
|
27
|
-
* drive the playlist; the SDK returns campaigns for a maps-group verbatim (it does
|
|
28
|
-
* NOT filter by status/date/schedule — the consumer decides which are active).
|
|
29
|
-
* @group Campaigns
|
|
30
|
-
*/
|
|
31
9
|
export class Campaign {
|
|
32
|
-
/**
|
|
33
|
-
* Creates a campaign from API response data, applying the same normalization the
|
|
34
|
-
* backend uses: an unrecognized `mediaType` falls back to the MIME `type` and then to
|
|
35
|
-
* `"image"`, `endDate` defaults to `null`, and `order` mirrors `sortOrder`.
|
|
36
|
-
* @param rawCampaign API response data for a campaign.
|
|
37
|
-
*/
|
|
38
10
|
constructor(rawCampaign) {
|
|
39
11
|
var _a, _b, _c, _d, _e, _f;
|
|
40
12
|
this.id = rawCampaign.id;
|
|
@@ -66,4 +38,3 @@ export class Campaign {
|
|
|
66
38
|
}));
|
|
67
39
|
}
|
|
68
40
|
}
|
|
69
|
-
//# sourceMappingURL=campaign.js.map
|
|
@@ -1,32 +1,12 @@
|
|
|
1
|
-
// Category.ts
|
|
2
|
-
/**
|
|
3
|
-
* Checks if the category carries a logo image.
|
|
4
|
-
* @group Utils
|
|
5
|
-
* @param category - The category to inspect.
|
|
6
|
-
* @returns `true` if the category exposes a non-empty `logo` URL, narrowing it to {@link BasicWithLogo}.
|
|
7
|
-
*/
|
|
8
1
|
export function isBasicWithLogo(category) {
|
|
9
2
|
const input = category;
|
|
10
3
|
return input.logo != null && input.logo !== "";
|
|
11
4
|
}
|
|
12
|
-
/**
|
|
13
|
-
* Checks if the category carries a Font Awesome icon.
|
|
14
|
-
* @group Utils
|
|
15
|
-
* @param category - The category to inspect.
|
|
16
|
-
* @returns `true` if the category exposes a non-empty `icon` name, narrowing it to {@link BasicWithIcon}.
|
|
17
|
-
*/
|
|
18
5
|
export function isBasicWithIcon(category) {
|
|
19
6
|
const input = category;
|
|
20
7
|
return input.icon != null && input.icon !== "";
|
|
21
8
|
}
|
|
22
|
-
/**
|
|
23
|
-
* Checks if the category carries an image URL.
|
|
24
|
-
* @group Utils
|
|
25
|
-
* @param category - The category to inspect.
|
|
26
|
-
* @returns `true` if the category exposes a non-empty `imageUrl`, narrowing it to {@link BasicWithImageUrl}.
|
|
27
|
-
*/
|
|
28
9
|
export function isBasicWithImageUrl(category) {
|
|
29
10
|
const input = category;
|
|
30
11
|
return input.imageUrl != null && input.imageUrl !== "";
|
|
31
12
|
}
|
|
32
|
-
//# sourceMappingURL=categories.js.map
|
|
@@ -219,4 +219,3 @@ export declare function resolveCircleConfig(config: CircleConfig, hidden?: boole
|
|
|
219
219
|
* @group Circles
|
|
220
220
|
*/
|
|
221
221
|
export declare function circleRing(lng: number, lat: number, radiusMeters: number, points?: number): [number, number][];
|
|
222
|
-
//# sourceMappingURL=circle.d.ts.map
|
|
@@ -1,26 +1,10 @@
|
|
|
1
1
|
import { generateHexadecimalKey } from "../../utils/utils";
|
|
2
|
-
/**
|
|
3
|
-
* MapVX brand color used as the default for circle styling and other
|
|
4
|
-
* SDK-drawn overlays (colored places, borders).
|
|
5
|
-
*
|
|
6
|
-
* @group Circles
|
|
7
|
-
*/
|
|
8
2
|
export const MAPVX_BRAND_COLOR = "#276EF1";
|
|
9
|
-
/**
|
|
10
|
-
* Valid values for {@link CircleRenderOrder}, in rendering order.
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
3
|
export const CIRCLE_RENDER_ORDERS = [
|
|
14
4
|
"belowLabels",
|
|
15
5
|
"aboveBasemap",
|
|
16
6
|
"top",
|
|
17
7
|
];
|
|
18
|
-
/**
|
|
19
|
-
* Default styling values applied to a circle when the corresponding
|
|
20
|
-
* {@link CircleConfig} fields are omitted.
|
|
21
|
-
*
|
|
22
|
-
* @group Circles
|
|
23
|
-
*/
|
|
24
8
|
export const CIRCLE_DEFAULTS = {
|
|
25
9
|
fillColor: MAPVX_BRAND_COLOR,
|
|
26
10
|
fillOpacity: 0.14,
|
|
@@ -29,36 +13,14 @@ export const CIRCLE_DEFAULTS = {
|
|
|
29
13
|
strokeOpacity: 0.65,
|
|
30
14
|
renderOrder: "aboveBasemap",
|
|
31
15
|
};
|
|
32
|
-
/**
|
|
33
|
-
* Returns a deep copy of a {@link CircleRecord}, including the nested
|
|
34
|
-
* coordinate. Used by the map accessors so callers can't mutate internal
|
|
35
|
-
* circle state by writing to a returned record.
|
|
36
|
-
*
|
|
37
|
-
* @param record The circle record to clone.
|
|
38
|
-
* @returns An independent copy of the record.
|
|
39
|
-
*
|
|
40
|
-
* @group Circles
|
|
41
|
-
*/
|
|
42
16
|
export function cloneCircleRecord(record) {
|
|
43
17
|
return Object.assign(Object.assign({}, record), { coordinate: Object.assign({}, record.coordinate) });
|
|
44
18
|
}
|
|
45
|
-
/**
|
|
46
|
-
* Validates that a radius in meters is positive and finite.
|
|
47
|
-
* @param radius The radius value to validate.
|
|
48
|
-
* @throws {Error} If radius is ≤ 0 or not finite (NaN/Infinity).
|
|
49
|
-
* @internal
|
|
50
|
-
*/
|
|
51
19
|
function validateRadiusMeters(radius) {
|
|
52
20
|
if (!Number.isFinite(radius) || radius <= 0) {
|
|
53
21
|
throw new Error(`Invalid radiusMeters: ${radius}. Must be a positive finite number.`);
|
|
54
22
|
}
|
|
55
23
|
}
|
|
56
|
-
/**
|
|
57
|
-
* Validates that a coordinate is within valid geographic bounds.
|
|
58
|
-
* @param coord The coordinate to validate.
|
|
59
|
-
* @throws {Error} If latitude is outside [-90, 90] or longitude outside [-180, 180], or not finite.
|
|
60
|
-
* @internal
|
|
61
|
-
*/
|
|
62
24
|
function validateCoordinate(coord) {
|
|
63
25
|
if (coord == null || typeof coord !== "object") {
|
|
64
26
|
throw new Error("Invalid coordinate: expected an object with lat and lng properties.");
|
|
@@ -73,36 +35,11 @@ function validateCoordinate(coord) {
|
|
|
73
35
|
`latitude must be in [-90, 90], longitude in [-180, 180], and both finite.`);
|
|
74
36
|
}
|
|
75
37
|
}
|
|
76
|
-
/**
|
|
77
|
-
* Clamps an opacity value to the valid range [0, 1].
|
|
78
|
-
* @param opacity The opacity value to clamp.
|
|
79
|
-
* @param defaultValue Value to use if opacity is not a finite number.
|
|
80
|
-
* @returns The clamped opacity value.
|
|
81
|
-
* @internal
|
|
82
|
-
*/
|
|
83
38
|
function clampOpacity(opacity, defaultValue) {
|
|
84
39
|
if (!Number.isFinite(opacity))
|
|
85
40
|
return defaultValue;
|
|
86
41
|
return Math.max(0, Math.min(1, opacity));
|
|
87
42
|
}
|
|
88
|
-
/**
|
|
89
|
-
* Type guard for validating circle configurations without throwing.
|
|
90
|
-
* Returns true if the configuration is valid and can be added to the map.
|
|
91
|
-
*
|
|
92
|
-
* @param config Configuration to validate.
|
|
93
|
-
* @returns True if config is a valid CircleConfig, false otherwise.
|
|
94
|
-
*
|
|
95
|
-
* @example
|
|
96
|
-
* ```typescript
|
|
97
|
-
* if (isValidCircleConfig(userInput)) {
|
|
98
|
-
* map.addCircle(userInput);
|
|
99
|
-
* } else {
|
|
100
|
-
* console.error('Invalid circle configuration');
|
|
101
|
-
* }
|
|
102
|
-
* ```
|
|
103
|
-
*
|
|
104
|
-
* @group Circles
|
|
105
|
-
*/
|
|
106
43
|
export function isValidCircleConfig(config) {
|
|
107
44
|
if (config === null || config === undefined || typeof config !== "object") {
|
|
108
45
|
return false;
|
|
@@ -152,17 +89,6 @@ export function isValidCircleConfig(config) {
|
|
|
152
89
|
}
|
|
153
90
|
return true;
|
|
154
91
|
}
|
|
155
|
-
/**
|
|
156
|
-
* Resolves a {@link CircleConfig} into a {@link CircleRecord}, applying
|
|
157
|
-
* default styling, generating an id when one is not provided, and validating inputs.
|
|
158
|
-
*
|
|
159
|
-
* @param config Circle configuration provided by the SDK consumer.
|
|
160
|
-
* @param hidden Initial hidden state, defaults to visible.
|
|
161
|
-
* @returns The resolved circle record ready to be stored and rendered.
|
|
162
|
-
* @throws {Error} If radiusMeters is ≤ 0, not finite, or coordinates are invalid.
|
|
163
|
-
*
|
|
164
|
-
* @group Circles
|
|
165
|
-
*/
|
|
166
92
|
export function resolveCircleConfig(config, hidden = false) {
|
|
167
93
|
var _a, _b, _c, _d, _e;
|
|
168
94
|
validateRadiusMeters(config.radiusMeters);
|
|
@@ -173,8 +99,6 @@ export function resolveCircleConfig(config, hidden = false) {
|
|
|
173
99
|
}
|
|
174
100
|
return {
|
|
175
101
|
id: (_a = config.id) !== null && _a !== void 0 ? _a : generateHexadecimalKey(),
|
|
176
|
-
// Copy the coordinate so later mutations of the caller's object
|
|
177
|
-
// can't change internal circle state
|
|
178
102
|
coordinate: { lat: config.coordinate.lat, lng: config.coordinate.lng },
|
|
179
103
|
radiusMeters: config.radiusMeters,
|
|
180
104
|
fillColor: (_b = config.fillColor) !== null && _b !== void 0 ? _b : CIRCLE_DEFAULTS.fillColor,
|
|
@@ -187,47 +111,7 @@ export function resolveCircleConfig(config, hidden = false) {
|
|
|
187
111
|
hidden,
|
|
188
112
|
};
|
|
189
113
|
}
|
|
190
|
-
/**
|
|
191
|
-
* Builds a closed GeoJSON polygon ring approximating a geographic circle.
|
|
192
|
-
*
|
|
193
|
-
* The ring is computed with an equirectangular approximation: meters are
|
|
194
|
-
* converted to degrees independently per axis, with the longitude scale
|
|
195
|
-
* corrected by the cosine of the latitude. For the radii the SDK works with
|
|
196
|
-
* (tens to hundreds of meters) the metric error is negligible (≤1%) at any latitude
|
|
197
|
-
* where the projection is defined. At extreme polar latitudes, the approximation
|
|
198
|
-
* breaks down, so circles near poles (|lat| > 85°) should be used with caution.
|
|
199
|
-
*
|
|
200
|
-
* @param lng Longitude of the circle center in degrees.
|
|
201
|
-
* @param lat Latitude of the circle center in degrees.
|
|
202
|
-
* @param radiusMeters Radius of the circle in meters. Must be positive and finite.
|
|
203
|
-
* @param points Number of segments in the ring. Defaults to 64. Non-integer
|
|
204
|
-
* values are floored and the count is clamped to a minimum of 3,
|
|
205
|
-
* the smallest valid GeoJSON linear ring; non-finite values fall
|
|
206
|
-
* back to the default.
|
|
207
|
-
* @returns A closed ring of `[lng, lat]` positions (first equals last).
|
|
208
|
-
*
|
|
209
|
-
* @example
|
|
210
|
-
* ```typescript
|
|
211
|
-
* import { circleRing } from '@mapvx/web-js';
|
|
212
|
-
*
|
|
213
|
-
* // Create a 150-meter radius circle ring
|
|
214
|
-
* const ring = circleRing(-74.0060, 40.7128, 150);
|
|
215
|
-
* const polygon = { type: "Polygon", coordinates: [ring] };
|
|
216
|
-
*
|
|
217
|
-
* // Custom segments (32 instead of 64) for lower resolution
|
|
218
|
-
* const coarseRing = circleRing(-74.0060, 40.7128, 150, 32);
|
|
219
|
-
* ```
|
|
220
|
-
*
|
|
221
|
-
* @note Equirectangular approximation is accurate for radii up to ~500 km and
|
|
222
|
-
* latitudes between approximately ±80°. Beyond these limits, visual
|
|
223
|
-
* distortion may occur near the poles.
|
|
224
|
-
* @note Generated rings do not account for geographic obstacles, walls, or
|
|
225
|
-
* buildings. For complex geofencing, consider server-side validation.
|
|
226
|
-
*
|
|
227
|
-
* @group Circles
|
|
228
|
-
*/
|
|
229
114
|
export function circleRing(lng, lat, radiusMeters, points = 64) {
|
|
230
|
-
// A linear ring needs at least 3 distinct positions to be valid GeoJSON
|
|
231
115
|
const segments = Number.isFinite(points) ? Math.max(3, Math.floor(points)) : 64;
|
|
232
116
|
const ring = [];
|
|
233
117
|
const latRad = (lat * Math.PI) / 180;
|
|
@@ -239,8 +123,6 @@ export function circleRing(lng, lat, radiusMeters, points = 64) {
|
|
|
239
123
|
const a = (i / segments) * Math.PI * 2;
|
|
240
124
|
ring.push([lng + lngR * Math.cos(a), lat + latR * Math.sin(a)]);
|
|
241
125
|
}
|
|
242
|
-
// Close the ring with an exact copy of the first position, as GeoJSON requires
|
|
243
126
|
ring.push([ring[0][0], ring[0][1]]);
|
|
244
127
|
return ring;
|
|
245
128
|
}
|
|
246
|
-
//# sourceMappingURL=circle.js.map
|
|
@@ -1,30 +1,5 @@
|
|
|
1
1
|
import { PropertyUtils } from "./property";
|
|
2
|
-
/**
|
|
3
|
-
* MapVX Institution object, is a custom object containing data of conglomerate of places (enterprise or subdivision).
|
|
4
|
-
* Represents a collection of related places that form a larger organizational unit.
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```typescript
|
|
8
|
-
* const institution = new Institution(institutionResponse);
|
|
9
|
-
* console.log(institution.title); // "Shopping Mall"
|
|
10
|
-
* console.log(institution.hasPlaces); // true
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @group Places & Locations
|
|
14
|
-
*/
|
|
15
2
|
export class Institution {
|
|
16
|
-
/**
|
|
17
|
-
* Creates a new instance of an Institution object with the rawInstitution arguments.
|
|
18
|
-
*
|
|
19
|
-
* @param rawInstitution - JSON configuration parameters for the institution from API response
|
|
20
|
-
* @returns A new instance of Institution
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```typescript
|
|
24
|
-
* const institutionResponse = await fetchInstitutionData(institutionId);
|
|
25
|
-
* const institution = new Institution(institutionResponse);
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
3
|
constructor(rawInstitution) {
|
|
29
4
|
var _a;
|
|
30
5
|
this.mapvxId = rawInstitution.id;
|
|
@@ -38,4 +13,3 @@ export class Institution {
|
|
|
38
13
|
this.properties = PropertyUtils.parseProperties((_a = rawInstitution.properties) !== null && _a !== void 0 ? _a : []);
|
|
39
14
|
}
|
|
40
15
|
}
|
|
41
|
-
//# sourceMappingURL=institution.js.map
|
|
@@ -1,35 +1,16 @@
|
|
|
1
1
|
import { Logger } from "../../logger/logger";
|
|
2
2
|
import { convertToError } from "../../utils/error";
|
|
3
|
-
/**
|
|
4
|
-
* Represents the abstract class for the loggeable.
|
|
5
|
-
* @hidden
|
|
6
|
-
*/
|
|
7
3
|
export class Loggeable {
|
|
8
4
|
constructor() {
|
|
9
5
|
this.logger = Logger.getInstance();
|
|
10
6
|
}
|
|
11
|
-
/**
|
|
12
|
-
* To log a event in this class.
|
|
13
|
-
* @param eventName The event name.
|
|
14
|
-
* @param eventSegmentation The pair key, value to segment this event count.
|
|
15
|
-
*/
|
|
16
7
|
logEvent(eventName, eventSegmentation = {}) {
|
|
17
8
|
this.logger.logEvent(eventName, this.prepareSegmentation(eventSegmentation));
|
|
18
9
|
}
|
|
19
|
-
/**
|
|
20
|
-
* To log a captured error in this class.
|
|
21
|
-
* @param error The captured error
|
|
22
|
-
* @param args The rest of the arguments.
|
|
23
|
-
*/
|
|
24
10
|
logError(error, ...args) {
|
|
25
11
|
const errorTyped = convertToError(error);
|
|
26
12
|
this.logger.logError(errorTyped, ...args);
|
|
27
13
|
}
|
|
28
|
-
/**
|
|
29
|
-
* To log a captured error as a warning.
|
|
30
|
-
* @param error The captured error
|
|
31
|
-
* @param args The rest of the arguments.
|
|
32
|
-
*/
|
|
33
14
|
logWarning(error, ...args) {
|
|
34
15
|
const errorTyped = convertToError(error);
|
|
35
16
|
this.logger.logWarning(errorTyped, ...args);
|
|
@@ -37,12 +18,7 @@ export class Loggeable {
|
|
|
37
18
|
logDebug(...args) {
|
|
38
19
|
this.logger.logDebug(...args);
|
|
39
20
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Prints in console any number of given arguments, if and only if, app is running in debug mode.
|
|
42
|
-
* @param args An array of arguments to log
|
|
43
|
-
*/
|
|
44
21
|
debugLog(...args) {
|
|
45
22
|
this.logger.debugLog(args);
|
|
46
23
|
}
|
|
47
24
|
}
|
|
48
|
-
//# sourceMappingURL=loggeable.js.map
|
|
@@ -1,28 +1,13 @@
|
|
|
1
1
|
import { DEFAULT_MAX_LABEL_WIDTH_PX } from "./marker";
|
|
2
|
-
/**
|
|
3
|
-
* Default values for tile cache configuration
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
2
|
export const DEFAULT_TILE_CACHE_CONFIG = {
|
|
7
3
|
enabled: true,
|
|
8
4
|
maxTiles: 400,
|
|
9
|
-
ttlMs: 30 * 60 * 1000,
|
|
5
|
+
ttlMs: 30 * 60 * 1000,
|
|
10
6
|
persistToServiceWorker: true,
|
|
11
7
|
preloadAdjacentZooms: false,
|
|
12
8
|
maxConcurrentTileFetches: 6,
|
|
13
9
|
};
|
|
14
|
-
/**
|
|
15
|
-
* Hard cap for {@link MapTileCacheConfig.maxTiles}.
|
|
16
|
-
* Configurations above this (e.g. millions) are clamped to avoid memory pressure
|
|
17
|
-
* and excessive interaction with the tile CDN / service worker.
|
|
18
|
-
*
|
|
19
|
-
* @internal
|
|
20
|
-
*/
|
|
21
10
|
export const MAPLIBRE_MAX_TILE_CACHE_HARD_CAP = 100000;
|
|
22
|
-
/**
|
|
23
|
-
* Default values for marker layout configuration
|
|
24
|
-
* @internal
|
|
25
|
-
*/
|
|
26
11
|
export const DEFAULT_MARKER_LAYOUT_CONFIG = {
|
|
27
12
|
enabled: true,
|
|
28
13
|
minZoomForLabels: Number.NEGATIVE_INFINITY,
|
|
@@ -31,4 +16,3 @@ export const DEFAULT_MARKER_LAYOUT_CONFIG = {
|
|
|
31
16
|
paddingPx: 4,
|
|
32
17
|
maxLabelWidthPx: DEFAULT_MAX_LABEL_WIDTH_PX,
|
|
33
18
|
};
|
|
34
|
-
//# sourceMappingURL=mapConfig.js.map
|