@mapvx/web-js 1.0.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/LICENSE.md +19 -0
- package/README.md +257 -0
- package/dist/cjs/assets/icons.js +87 -0
- package/dist/cjs/assets/icons.js.map +1 -0
- package/dist/cjs/assets/route_animation_icon.svg +15 -0
- package/dist/cjs/assets/user-dot-icon.svg +3 -0
- package/dist/cjs/config/sdkConfig.js +3 -0
- package/dist/cjs/config/sdkConfig.js.map +1 -0
- package/dist/cjs/controllers/routeController.js +1054 -0
- package/dist/cjs/controllers/routeController.js.map +1 -0
- package/dist/cjs/domain/models/_internal.js +15 -0
- package/dist/cjs/domain/models/_internal.js.map +1 -0
- package/dist/cjs/domain/models/_rtl.js +10 -0
- package/dist/cjs/domain/models/_rtl.js.map +1 -0
- package/dist/cjs/domain/models/animation.js +63 -0
- package/dist/cjs/domain/models/animation.js.map +1 -0
- package/dist/cjs/domain/models/banner.js +24 -0
- package/dist/cjs/domain/models/banner.js.map +1 -0
- package/dist/cjs/domain/models/categories.js +25 -0
- package/dist/cjs/domain/models/categories.js.map +1 -0
- package/dist/cjs/domain/models/cityFilterOption.js +3 -0
- package/dist/cjs/domain/models/cityFilterOption.js.map +1 -0
- package/dist/cjs/domain/models/configuration.js +3 -0
- package/dist/cjs/domain/models/configuration.js.map +1 -0
- package/dist/cjs/domain/models/cssCustomization.js +3 -0
- package/dist/cjs/domain/models/cssCustomization.js.map +1 -0
- package/dist/cjs/domain/models/fitOptions.js +3 -0
- package/dist/cjs/domain/models/fitOptions.js.map +1 -0
- package/dist/cjs/domain/models/innerFloors.js +3 -0
- package/dist/cjs/domain/models/innerFloors.js.map +1 -0
- package/dist/cjs/domain/models/institution.js +44 -0
- package/dist/cjs/domain/models/institution.js.map +1 -0
- package/dist/cjs/domain/models/latLng.js +3 -0
- package/dist/cjs/domain/models/latLng.js.map +1 -0
- package/dist/cjs/domain/models/location.js +3 -0
- package/dist/cjs/domain/models/location.js.map +1 -0
- package/dist/cjs/domain/models/loggeable.js +52 -0
- package/dist/cjs/domain/models/loggeable.js.map +1 -0
- package/dist/cjs/domain/models/mapCamera.js +3 -0
- package/dist/cjs/domain/models/mapCamera.js.map +1 -0
- package/dist/cjs/domain/models/mapConfig.js +15 -0
- package/dist/cjs/domain/models/mapConfig.js.map +1 -0
- package/dist/cjs/domain/models/marker.js +400 -0
- package/dist/cjs/domain/models/marker.js.map +1 -0
- package/dist/cjs/domain/models/multilanguage.js +18 -0
- package/dist/cjs/domain/models/multilanguage.js.map +1 -0
- package/dist/cjs/domain/models/openingHours.js +3 -0
- package/dist/cjs/domain/models/openingHours.js.map +1 -0
- package/dist/cjs/domain/models/place.js +101 -0
- package/dist/cjs/domain/models/place.js.map +1 -0
- package/dist/cjs/domain/models/platform.js +3 -0
- package/dist/cjs/domain/models/platform.js.map +1 -0
- package/dist/cjs/domain/models/popover.js +3 -0
- package/dist/cjs/domain/models/popover.js.map +1 -0
- package/dist/cjs/domain/models/product.js +3 -0
- package/dist/cjs/domain/models/product.js.map +1 -0
- package/dist/cjs/domain/models/property.js +104 -0
- package/dist/cjs/domain/models/property.js.map +1 -0
- package/dist/cjs/domain/models/route.js +166 -0
- package/dist/cjs/domain/models/route.js.map +1 -0
- package/dist/cjs/domain/models/routeConfiguration.js +80 -0
- package/dist/cjs/domain/models/routeConfiguration.js.map +1 -0
- package/dist/cjs/domain/models/routeInstance.js +30 -0
- package/dist/cjs/domain/models/routeInstance.js.map +1 -0
- package/dist/cjs/domain/models/routeStyle.js +3 -0
- package/dist/cjs/domain/models/routeStyle.js.map +1 -0
- package/dist/cjs/domain/models/transport.js +22 -0
- package/dist/cjs/domain/models/transport.js.map +1 -0
- package/dist/cjs/domain/ports/ICache.js +3 -0
- package/dist/cjs/domain/ports/ICache.js.map +1 -0
- package/dist/cjs/domain/ports/IHttpClient.js +3 -0
- package/dist/cjs/domain/ports/IHttpClient.js.map +1 -0
- package/dist/cjs/domain/ports/ILogger.js +23 -0
- package/dist/cjs/domain/ports/ILogger.js.map +1 -0
- package/dist/cjs/domain/ports/index.js +10 -0
- package/dist/cjs/domain/ports/index.js.map +1 -0
- package/dist/cjs/index.js +76 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/infrastructure/cache/CacheManager.js +236 -0
- package/dist/cjs/infrastructure/cache/CacheManager.js.map +1 -0
- package/dist/cjs/infrastructure/cache/LRUCache.js +153 -0
- package/dist/cjs/infrastructure/cache/LRUCache.js.map +1 -0
- package/dist/cjs/infrastructure/cache/PersistentCache.js +160 -0
- package/dist/cjs/infrastructure/cache/PersistentCache.js.map +1 -0
- package/dist/cjs/infrastructure/cache/cacheConfig.js +70 -0
- package/dist/cjs/infrastructure/cache/cacheConfig.js.map +1 -0
- package/dist/cjs/infrastructure/http/FetchHttpClient.js +75 -0
- package/dist/cjs/infrastructure/http/FetchHttpClient.js.map +1 -0
- package/dist/cjs/infrastructure/logging/CountlyLogger.js +78 -0
- package/dist/cjs/infrastructure/logging/CountlyLogger.js.map +1 -0
- package/dist/cjs/interfaces/cache.js +3 -0
- package/dist/cjs/interfaces/cache.js.map +1 -0
- package/dist/cjs/interfaces/healthResponse.js +3 -0
- package/dist/cjs/interfaces/healthResponse.js.map +1 -0
- package/dist/cjs/interfaces/institutionResponse.js +3 -0
- package/dist/cjs/interfaces/institutionResponse.js.map +1 -0
- package/dist/cjs/interfaces/metadata.js +3 -0
- package/dist/cjs/interfaces/metadata.js.map +1 -0
- package/dist/cjs/interfaces/placeResponse.js +3 -0
- package/dist/cjs/interfaces/placeResponse.js.map +1 -0
- package/dist/cjs/interfaces/routeCacheResponse.js +3 -0
- package/dist/cjs/interfaces/routeCacheResponse.js.map +1 -0
- package/dist/cjs/interfaces/routeResponse.js +3 -0
- package/dist/cjs/interfaces/routeResponse.js.map +1 -0
- package/dist/cjs/interfaces/styleResponse.js +3 -0
- package/dist/cjs/interfaces/styleResponse.js.map +1 -0
- package/dist/cjs/logger/logger.js +91 -0
- package/dist/cjs/logger/logger.js.map +1 -0
- package/dist/cjs/logger/rollbar.js +24 -0
- package/dist/cjs/logger/rollbar.js.map +1 -0
- package/dist/cjs/map/map.js +1457 -0
- package/dist/cjs/map/map.js.map +1 -0
- package/dist/cjs/repository/repository.js +574 -0
- package/dist/cjs/repository/repository.js.map +1 -0
- package/dist/cjs/repository/requester.js +590 -0
- package/dist/cjs/repository/requester.js.map +1 -0
- package/dist/cjs/sdk.js +351 -0
- package/dist/cjs/sdk.js.map +1 -0
- package/dist/cjs/utils/error.js +20 -0
- package/dist/cjs/utils/error.js.map +1 -0
- package/dist/cjs/utils/images.js +26 -0
- package/dist/cjs/utils/images.js.map +1 -0
- package/dist/cjs/utils/nav-functions.js +150 -0
- package/dist/cjs/utils/nav-functions.js.map +1 -0
- package/dist/cjs/utils/opening-hours-helper.js +911 -0
- package/dist/cjs/utils/opening-hours-helper.js.map +1 -0
- package/dist/cjs/utils/route-utils.js +58 -0
- package/dist/cjs/utils/route-utils.js.map +1 -0
- package/dist/cjs/utils/update-css.js +77 -0
- package/dist/cjs/utils/update-css.js.map +1 -0
- package/dist/cjs/utils/utils.js +105 -0
- package/dist/cjs/utils/utils.js.map +1 -0
- package/dist/es/assets/icons.d.ts +86 -0
- package/dist/es/assets/icons.d.ts.map +1 -0
- package/dist/es/assets/icons.js +83 -0
- package/dist/es/assets/icons.js.map +1 -0
- package/dist/es/assets/route_animation_icon.svg +15 -0
- package/dist/es/assets/user-dot-icon.svg +3 -0
- package/dist/es/config/sdkConfig.d.ts +105 -0
- package/dist/es/config/sdkConfig.d.ts.map +1 -0
- package/dist/es/config/sdkConfig.js +2 -0
- package/dist/es/config/sdkConfig.js.map +1 -0
- package/dist/es/controllers/routeController.d.ts +161 -0
- package/dist/es/controllers/routeController.d.ts.map +1 -0
- package/dist/es/controllers/routeController.js +1050 -0
- package/dist/es/controllers/routeController.js.map +1 -0
- package/dist/es/domain/models/_internal.d.ts +21 -0
- package/dist/es/domain/models/_internal.d.ts.map +1 -0
- package/dist/es/domain/models/_internal.js +11 -0
- package/dist/es/domain/models/_internal.js.map +1 -0
- package/dist/es/domain/models/_rtl.d.ts +7 -0
- package/dist/es/domain/models/_rtl.d.ts.map +1 -0
- package/dist/es/domain/models/_rtl.js +7 -0
- package/dist/es/domain/models/_rtl.js.map +1 -0
- package/dist/es/domain/models/animation.d.ts +161 -0
- package/dist/es/domain/models/animation.d.ts.map +1 -0
- package/dist/es/domain/models/animation.js +58 -0
- package/dist/es/domain/models/animation.js.map +1 -0
- package/dist/es/domain/models/banner.d.ts +64 -0
- package/dist/es/domain/models/banner.d.ts.map +1 -0
- package/dist/es/domain/models/banner.js +20 -0
- package/dist/es/domain/models/banner.js.map +1 -0
- package/dist/es/domain/models/categories.d.ts +157 -0
- package/dist/es/domain/models/categories.d.ts.map +1 -0
- package/dist/es/domain/models/categories.js +20 -0
- package/dist/es/domain/models/categories.js.map +1 -0
- package/dist/es/domain/models/cityFilterOption.d.ts +15 -0
- package/dist/es/domain/models/cityFilterOption.d.ts.map +1 -0
- package/dist/es/domain/models/cityFilterOption.js +2 -0
- package/dist/es/domain/models/cityFilterOption.js.map +1 -0
- package/dist/es/domain/models/configuration.d.ts +523 -0
- package/dist/es/domain/models/configuration.d.ts.map +1 -0
- package/dist/es/domain/models/configuration.js +2 -0
- package/dist/es/domain/models/configuration.js.map +1 -0
- package/dist/es/domain/models/cssCustomization.d.ts +63 -0
- package/dist/es/domain/models/cssCustomization.d.ts.map +1 -0
- package/dist/es/domain/models/cssCustomization.js +2 -0
- package/dist/es/domain/models/cssCustomization.js.map +1 -0
- package/dist/es/domain/models/fitOptions.d.ts +175 -0
- package/dist/es/domain/models/fitOptions.d.ts.map +1 -0
- package/dist/es/domain/models/fitOptions.js +2 -0
- package/dist/es/domain/models/fitOptions.js.map +1 -0
- package/dist/es/domain/models/innerFloors.d.ts +42 -0
- package/dist/es/domain/models/innerFloors.d.ts.map +1 -0
- package/dist/es/domain/models/innerFloors.js +2 -0
- package/dist/es/domain/models/innerFloors.js.map +1 -0
- package/dist/es/domain/models/institution.d.ts +64 -0
- package/dist/es/domain/models/institution.d.ts.map +1 -0
- package/dist/es/domain/models/institution.js +40 -0
- package/dist/es/domain/models/institution.js.map +1 -0
- package/dist/es/domain/models/latLng.d.ts +14 -0
- package/dist/es/domain/models/latLng.d.ts.map +1 -0
- package/dist/es/domain/models/latLng.js +2 -0
- package/dist/es/domain/models/latLng.js.map +1 -0
- package/dist/es/domain/models/location.d.ts +10 -0
- package/dist/es/domain/models/location.d.ts.map +1 -0
- package/dist/es/domain/models/location.js +2 -0
- package/dist/es/domain/models/location.js.map +1 -0
- package/dist/es/domain/models/loggeable.d.ts +43 -0
- package/dist/es/domain/models/loggeable.d.ts.map +1 -0
- package/dist/es/domain/models/loggeable.js +48 -0
- package/dist/es/domain/models/loggeable.js.map +1 -0
- package/dist/es/domain/models/mapCamera.d.ts +109 -0
- package/dist/es/domain/models/mapCamera.d.ts.map +1 -0
- package/dist/es/domain/models/mapCamera.js +2 -0
- package/dist/es/domain/models/mapCamera.js.map +1 -0
- package/dist/es/domain/models/mapConfig.d.ts +238 -0
- package/dist/es/domain/models/mapConfig.d.ts.map +1 -0
- package/dist/es/domain/models/mapConfig.js +12 -0
- package/dist/es/domain/models/mapConfig.js.map +1 -0
- package/dist/es/domain/models/marker.d.ts +301 -0
- package/dist/es/domain/models/marker.d.ts.map +1 -0
- package/dist/es/domain/models/marker.js +396 -0
- package/dist/es/domain/models/marker.js.map +1 -0
- package/dist/es/domain/models/multilanguage.d.ts +27 -0
- package/dist/es/domain/models/multilanguage.d.ts.map +1 -0
- package/dist/es/domain/models/multilanguage.js +14 -0
- package/dist/es/domain/models/multilanguage.js.map +1 -0
- package/dist/es/domain/models/openingHours.d.ts +30 -0
- package/dist/es/domain/models/openingHours.d.ts.map +1 -0
- package/dist/es/domain/models/openingHours.js +2 -0
- package/dist/es/domain/models/openingHours.js.map +1 -0
- package/dist/es/domain/models/place.d.ts +167 -0
- package/dist/es/domain/models/place.d.ts.map +1 -0
- package/dist/es/domain/models/place.js +97 -0
- package/dist/es/domain/models/place.js.map +1 -0
- package/dist/es/domain/models/platform.d.ts +6 -0
- package/dist/es/domain/models/platform.d.ts.map +1 -0
- package/dist/es/domain/models/platform.js +2 -0
- package/dist/es/domain/models/platform.js.map +1 -0
- package/dist/es/domain/models/popover.d.ts +14 -0
- package/dist/es/domain/models/popover.d.ts.map +1 -0
- package/dist/es/domain/models/popover.js +2 -0
- package/dist/es/domain/models/popover.js.map +1 -0
- package/dist/es/domain/models/product.d.ts +36 -0
- package/dist/es/domain/models/product.d.ts.map +1 -0
- package/dist/es/domain/models/product.js +2 -0
- package/dist/es/domain/models/product.js.map +1 -0
- package/dist/es/domain/models/property.d.ts +172 -0
- package/dist/es/domain/models/property.d.ts.map +1 -0
- package/dist/es/domain/models/property.js +100 -0
- package/dist/es/domain/models/property.js.map +1 -0
- package/dist/es/domain/models/route.d.ts +199 -0
- package/dist/es/domain/models/route.d.ts.map +1 -0
- package/dist/es/domain/models/route.js +160 -0
- package/dist/es/domain/models/route.js.map +1 -0
- package/dist/es/domain/models/routeConfiguration.d.ts +140 -0
- package/dist/es/domain/models/routeConfiguration.d.ts.map +1 -0
- package/dist/es/domain/models/routeConfiguration.js +75 -0
- package/dist/es/domain/models/routeConfiguration.js.map +1 -0
- package/dist/es/domain/models/routeInstance.d.ts +52 -0
- package/dist/es/domain/models/routeInstance.d.ts.map +1 -0
- package/dist/es/domain/models/routeInstance.js +26 -0
- package/dist/es/domain/models/routeInstance.js.map +1 -0
- package/dist/es/domain/models/routeStyle.d.ts +47 -0
- package/dist/es/domain/models/routeStyle.d.ts.map +1 -0
- package/dist/es/domain/models/routeStyle.js +2 -0
- package/dist/es/domain/models/routeStyle.js.map +1 -0
- package/dist/es/domain/models/transport.d.ts +176 -0
- package/dist/es/domain/models/transport.d.ts.map +1 -0
- package/dist/es/domain/models/transport.js +18 -0
- package/dist/es/domain/models/transport.js.map +1 -0
- package/dist/es/domain/ports/ICache.d.ts +70 -0
- package/dist/es/domain/ports/ICache.d.ts.map +1 -0
- package/dist/es/domain/ports/ICache.js +2 -0
- package/dist/es/domain/ports/ICache.js.map +1 -0
- package/dist/es/domain/ports/IHttpClient.d.ts +77 -0
- package/dist/es/domain/ports/IHttpClient.d.ts.map +1 -0
- package/dist/es/domain/ports/IHttpClient.js +2 -0
- package/dist/es/domain/ports/IHttpClient.js.map +1 -0
- package/dist/es/domain/ports/ILogger.d.ts +61 -0
- package/dist/es/domain/ports/ILogger.d.ts.map +1 -0
- package/dist/es/domain/ports/ILogger.js +19 -0
- package/dist/es/domain/ports/ILogger.js.map +1 -0
- package/dist/es/domain/ports/index.d.ts +9 -0
- package/dist/es/domain/ports/index.d.ts.map +1 -0
- package/dist/es/domain/ports/index.js +6 -0
- package/dist/es/domain/ports/index.js.map +1 -0
- package/dist/es/index.d.ts +58 -0
- package/dist/es/index.d.ts.map +1 -0
- package/dist/es/index.js +48 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/infrastructure/cache/CacheManager.d.ts +106 -0
- package/dist/es/infrastructure/cache/CacheManager.d.ts.map +1 -0
- package/dist/es/infrastructure/cache/CacheManager.js +232 -0
- package/dist/es/infrastructure/cache/CacheManager.js.map +1 -0
- package/dist/es/infrastructure/cache/LRUCache.d.ts +70 -0
- package/dist/es/infrastructure/cache/LRUCache.d.ts.map +1 -0
- package/dist/es/infrastructure/cache/LRUCache.js +149 -0
- package/dist/es/infrastructure/cache/LRUCache.js.map +1 -0
- package/dist/es/infrastructure/cache/PersistentCache.d.ts +58 -0
- package/dist/es/infrastructure/cache/PersistentCache.d.ts.map +1 -0
- package/dist/es/infrastructure/cache/PersistentCache.js +156 -0
- package/dist/es/infrastructure/cache/PersistentCache.js.map +1 -0
- package/dist/es/infrastructure/cache/cacheConfig.d.ts +51 -0
- package/dist/es/infrastructure/cache/cacheConfig.d.ts.map +1 -0
- package/dist/es/infrastructure/cache/cacheConfig.js +66 -0
- package/dist/es/infrastructure/cache/cacheConfig.js.map +1 -0
- package/dist/es/infrastructure/http/FetchHttpClient.d.ts +41 -0
- package/dist/es/infrastructure/http/FetchHttpClient.d.ts.map +1 -0
- package/dist/es/infrastructure/http/FetchHttpClient.js +71 -0
- package/dist/es/infrastructure/http/FetchHttpClient.js.map +1 -0
- package/dist/es/infrastructure/logging/CountlyLogger.d.ts +47 -0
- package/dist/es/infrastructure/logging/CountlyLogger.d.ts.map +1 -0
- package/dist/es/infrastructure/logging/CountlyLogger.js +74 -0
- package/dist/es/infrastructure/logging/CountlyLogger.js.map +1 -0
- package/dist/es/interfaces/cache.d.ts +5 -0
- package/dist/es/interfaces/cache.d.ts.map +1 -0
- package/dist/es/interfaces/cache.js +2 -0
- package/dist/es/interfaces/cache.js.map +1 -0
- package/dist/es/interfaces/healthResponse.d.ts +17 -0
- package/dist/es/interfaces/healthResponse.d.ts.map +1 -0
- package/dist/es/interfaces/healthResponse.js +2 -0
- package/dist/es/interfaces/healthResponse.js.map +1 -0
- package/dist/es/interfaces/institutionResponse.d.ts +12 -0
- package/dist/es/interfaces/institutionResponse.d.ts.map +1 -0
- package/dist/es/interfaces/institutionResponse.js +2 -0
- package/dist/es/interfaces/institutionResponse.js.map +1 -0
- package/dist/es/interfaces/metadata.d.ts +7 -0
- package/dist/es/interfaces/metadata.d.ts.map +1 -0
- package/dist/es/interfaces/metadata.js +2 -0
- package/dist/es/interfaces/metadata.js.map +1 -0
- package/dist/es/interfaces/placeResponse.d.ts +50 -0
- package/dist/es/interfaces/placeResponse.d.ts.map +1 -0
- package/dist/es/interfaces/placeResponse.js +2 -0
- package/dist/es/interfaces/placeResponse.js.map +1 -0
- package/dist/es/interfaces/routeCacheResponse.d.ts +13 -0
- package/dist/es/interfaces/routeCacheResponse.d.ts.map +1 -0
- package/dist/es/interfaces/routeCacheResponse.js +2 -0
- package/dist/es/interfaces/routeCacheResponse.js.map +1 -0
- package/dist/es/interfaces/routeResponse.d.ts +42 -0
- package/dist/es/interfaces/routeResponse.d.ts.map +1 -0
- package/dist/es/interfaces/routeResponse.js +2 -0
- package/dist/es/interfaces/routeResponse.js.map +1 -0
- package/dist/es/interfaces/styleResponse.d.ts +5 -0
- package/dist/es/interfaces/styleResponse.d.ts.map +1 -0
- package/dist/es/interfaces/styleResponse.js +2 -0
- package/dist/es/interfaces/styleResponse.js.map +1 -0
- package/dist/es/logger/logger.d.ts +14 -0
- package/dist/es/logger/logger.d.ts.map +1 -0
- package/dist/es/logger/logger.js +84 -0
- package/dist/es/logger/logger.js.map +1 -0
- package/dist/es/logger/rollbar.d.ts +4 -0
- package/dist/es/logger/rollbar.d.ts.map +1 -0
- package/dist/es/logger/rollbar.js +20 -0
- package/dist/es/logger/rollbar.js.map +1 -0
- package/dist/es/map/map.d.ts +598 -0
- package/dist/es/map/map.d.ts.map +1 -0
- package/dist/es/map/map.js +1430 -0
- package/dist/es/map/map.js.map +1 -0
- package/dist/es/repository/repository.d.ts +65 -0
- package/dist/es/repository/repository.d.ts.map +1 -0
- package/dist/es/repository/repository.js +570 -0
- package/dist/es/repository/repository.js.map +1 -0
- package/dist/es/repository/requester.d.ts +169 -0
- package/dist/es/repository/requester.d.ts.map +1 -0
- package/dist/es/repository/requester.js +586 -0
- package/dist/es/repository/requester.js.map +1 -0
- package/dist/es/sdk.d.ts +279 -0
- package/dist/es/sdk.d.ts.map +1 -0
- package/dist/es/sdk.js +346 -0
- package/dist/es/sdk.js.map +1 -0
- package/dist/es/utils/error.d.ts +8 -0
- package/dist/es/utils/error.d.ts.map +1 -0
- package/dist/es/utils/error.js +16 -0
- package/dist/es/utils/error.js.map +1 -0
- package/dist/es/utils/images.d.ts +8 -0
- package/dist/es/utils/images.d.ts.map +1 -0
- package/dist/es/utils/images.js +22 -0
- package/dist/es/utils/images.js.map +1 -0
- package/dist/es/utils/nav-functions.d.ts +85 -0
- package/dist/es/utils/nav-functions.d.ts.map +1 -0
- package/dist/es/utils/nav-functions.js +143 -0
- package/dist/es/utils/nav-functions.js.map +1 -0
- package/dist/es/utils/opening-hours-helper.d.ts +395 -0
- package/dist/es/utils/opening-hours-helper.d.ts.map +1 -0
- package/dist/es/utils/opening-hours-helper.js +906 -0
- package/dist/es/utils/opening-hours-helper.js.map +1 -0
- package/dist/es/utils/route-utils.d.ts +28 -0
- package/dist/es/utils/route-utils.d.ts.map +1 -0
- package/dist/es/utils/route-utils.js +54 -0
- package/dist/es/utils/route-utils.js.map +1 -0
- package/dist/es/utils/update-css.d.ts +12 -0
- package/dist/es/utils/update-css.d.ts.map +1 -0
- package/dist/es/utils/update-css.js +73 -0
- package/dist/es/utils/update-css.js.map +1 -0
- package/dist/es/utils/utils.d.ts +39 -0
- package/dist/es/utils/utils.d.ts.map +1 -0
- package/dist/es/utils/utils.js +97 -0
- package/dist/es/utils/utils.js.map +1 -0
- package/dist/umd/index.js +16874 -0
- package/dist/umd/index.js.map +1 -0
- package/dist/umd/styles.css +107 -0
- package/dist/umd/styles.css.map +1 -0
- package/dist/umd/styles.js +37 -0
- package/dist/umd/styles.js.map +1 -0
- package/package.json +198 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { type Position } from "geojson";
|
|
2
|
+
import { type RouteLegResponse, type RoutePolylineResponse, type RouteResponse, type RouteStepResponse } from "../../interfaces/routeResponse";
|
|
3
|
+
import { type LatLng } from "./latLng";
|
|
4
|
+
/**
|
|
5
|
+
* Represents a complete route in MapVX that can contain multiple legs.
|
|
6
|
+
* Each route is composed of a series of legs that connect different points.
|
|
7
|
+
* @group Routes
|
|
8
|
+
*/
|
|
9
|
+
export declare class MVXRoute {
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier for the route generated automatically
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
/**
|
|
15
|
+
* List of legs that compose the complete route
|
|
16
|
+
*/
|
|
17
|
+
legs: MVXRouteLeg[];
|
|
18
|
+
/**
|
|
19
|
+
* Creates a new route instance from API response data
|
|
20
|
+
* @hidden
|
|
21
|
+
* @param data API response data containing route information
|
|
22
|
+
*/
|
|
23
|
+
constructor(data: RouteResponse);
|
|
24
|
+
/**
|
|
25
|
+
* Gets all steps of the route by combining steps from all legs
|
|
26
|
+
* @returns Array with all route steps
|
|
27
|
+
*/
|
|
28
|
+
get steps(): MVXRouteStep[];
|
|
29
|
+
/**
|
|
30
|
+
* Gets the total duration of the route.
|
|
31
|
+
* This property calculates the sum of the duration of all legs in the route.
|
|
32
|
+
*
|
|
33
|
+
* @returns {number} The total duration of the route, in seconds.
|
|
34
|
+
*/
|
|
35
|
+
get duration(): number;
|
|
36
|
+
/**
|
|
37
|
+
* Gets the total length of the route.
|
|
38
|
+
* This property calculates the sum of the length of all legs in the route.
|
|
39
|
+
*
|
|
40
|
+
* @returns {number} The total length of the route, in meters.
|
|
41
|
+
*/
|
|
42
|
+
get length(): number;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Represents a route leg that connects two specific points.
|
|
46
|
+
* Each leg contains information about distance, duration, and detailed steps.
|
|
47
|
+
* @group Routes
|
|
48
|
+
*/
|
|
49
|
+
export declare class MVXRouteLeg {
|
|
50
|
+
/**
|
|
51
|
+
* Total distance of the leg in meters
|
|
52
|
+
*/
|
|
53
|
+
distance: number;
|
|
54
|
+
/**
|
|
55
|
+
* Estimated duration of the leg in seconds
|
|
56
|
+
*/
|
|
57
|
+
duration: number;
|
|
58
|
+
/**
|
|
59
|
+
* Starting location of the leg
|
|
60
|
+
*/
|
|
61
|
+
startLocation: LatLng;
|
|
62
|
+
/**
|
|
63
|
+
* Ending location of the leg
|
|
64
|
+
*/
|
|
65
|
+
endLocation: LatLng;
|
|
66
|
+
/**
|
|
67
|
+
* List of detailed steps that compose this leg
|
|
68
|
+
*/
|
|
69
|
+
steps: MVXRouteStep[];
|
|
70
|
+
/**
|
|
71
|
+
* Creates a new route leg instance from response data
|
|
72
|
+
* @hidden
|
|
73
|
+
* @param data API response data containing leg information
|
|
74
|
+
*/
|
|
75
|
+
constructor(data: RouteLegResponse);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Represents an individual step within a route leg.
|
|
79
|
+
* Each step contains specific instructions and coordinates for navigation.
|
|
80
|
+
* @group Routes
|
|
81
|
+
*/
|
|
82
|
+
export declare class MVXRouteStep {
|
|
83
|
+
/**
|
|
84
|
+
* Distance of the step in meters
|
|
85
|
+
*/
|
|
86
|
+
distance: number;
|
|
87
|
+
/**
|
|
88
|
+
* Estimated duration of the step in seconds
|
|
89
|
+
*/
|
|
90
|
+
duration: number;
|
|
91
|
+
/**
|
|
92
|
+
* Starting location of the step
|
|
93
|
+
*/
|
|
94
|
+
startLocation: LatLng;
|
|
95
|
+
/**
|
|
96
|
+
* Identifier of the floor where the step begins (if applicable)
|
|
97
|
+
*/
|
|
98
|
+
startInsideFloor?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Identifier of the place where the step begins (if applicable)
|
|
101
|
+
*/
|
|
102
|
+
startInsidePlace?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Ending location of the step
|
|
105
|
+
*/
|
|
106
|
+
endLocation: LatLng;
|
|
107
|
+
/**
|
|
108
|
+
* Identifier of the floor where the step ends (if applicable)
|
|
109
|
+
*/
|
|
110
|
+
endInsideFloor?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Identifier of the place where the step ends (if applicable)
|
|
113
|
+
*/
|
|
114
|
+
endInsidePlace?: string;
|
|
115
|
+
/**
|
|
116
|
+
* HTML formatted instructions to display to the user
|
|
117
|
+
*/
|
|
118
|
+
htmlInstruction: string;
|
|
119
|
+
/**
|
|
120
|
+
* Plain text instructions to display to the user
|
|
121
|
+
*/
|
|
122
|
+
plainInstruction: string;
|
|
123
|
+
/**
|
|
124
|
+
* Type of maneuver the user should perform (e.g., "turn-left", "straight")
|
|
125
|
+
*/
|
|
126
|
+
maneuver: string;
|
|
127
|
+
/**
|
|
128
|
+
* Indicates if a popup with additional information should be shown
|
|
129
|
+
*/
|
|
130
|
+
showPopup?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Icon prefix to display for this step
|
|
133
|
+
*/
|
|
134
|
+
iconPrefix?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Indicates if this step involves using an elevator
|
|
137
|
+
*/
|
|
138
|
+
elevatorStep: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Object containing the polyline information for the step
|
|
141
|
+
* @hidden
|
|
142
|
+
*/
|
|
143
|
+
polyline: Polyline;
|
|
144
|
+
/**
|
|
145
|
+
* Creates a new route step instance from response data
|
|
146
|
+
* @hidden
|
|
147
|
+
* @param data API response data containing step information
|
|
148
|
+
*/
|
|
149
|
+
constructor(data: RouteStepResponse);
|
|
150
|
+
/**
|
|
151
|
+
* Gets the polyline coordinates in GeoJSON format
|
|
152
|
+
* @returns Array of coordinates in [longitude, latitude] format
|
|
153
|
+
*/
|
|
154
|
+
get geoJsonCoordinates(): Position[];
|
|
155
|
+
/**
|
|
156
|
+
* Gets the polyline coordinates in LatLng format
|
|
157
|
+
* @returns Array of LatLng coordinates
|
|
158
|
+
*/
|
|
159
|
+
get coordinates(): LatLng[];
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Internal class that handles polyline decoding and management.
|
|
163
|
+
* A polyline is an encoded representation of a series of coordinates.
|
|
164
|
+
*/
|
|
165
|
+
declare class Polyline {
|
|
166
|
+
/**
|
|
167
|
+
* Encoded string of polyline points
|
|
168
|
+
*/
|
|
169
|
+
points: string;
|
|
170
|
+
/**
|
|
171
|
+
* Polyline points in LatLng format (optional)
|
|
172
|
+
*/
|
|
173
|
+
pointsLatLng?: LatLng[];
|
|
174
|
+
/**
|
|
175
|
+
* Overview points of the polyline (optional)
|
|
176
|
+
*/
|
|
177
|
+
overviewPoints?: LatLng[];
|
|
178
|
+
/**
|
|
179
|
+
* Decoded points of the polyline
|
|
180
|
+
*/
|
|
181
|
+
private decodedPoints;
|
|
182
|
+
/**
|
|
183
|
+
* Creates a new polyline instance from response data
|
|
184
|
+
* @param data Response data containing polyline information
|
|
185
|
+
*/
|
|
186
|
+
constructor(data: RoutePolylineResponse);
|
|
187
|
+
/**
|
|
188
|
+
* Gets coordinates in GeoJSON format
|
|
189
|
+
* @returns Array of coordinates in [longitude, latitude] format
|
|
190
|
+
*/
|
|
191
|
+
get geoJsonCoordinates(): Position[];
|
|
192
|
+
/**
|
|
193
|
+
* Gets coordinates in LatLng format
|
|
194
|
+
* @returns Array of LatLng coordinates
|
|
195
|
+
*/
|
|
196
|
+
get coordinates(): LatLng[];
|
|
197
|
+
}
|
|
198
|
+
export {};
|
|
199
|
+
//# sourceMappingURL=route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../src/domain/models/route.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACvB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAA;AAEtC;;;;GAIG;AACH,qBAAa,QAAQ;IACnB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,IAAI,EAAE,WAAW,EAAE,CAAA;IAEnB;;;;OAIG;gBACS,IAAI,EAAE,aAAa;IAS/B;;;OAGG;IACH,IAAI,KAAK,IAAI,YAAY,EAAE,CAE1B;IAED;;;;;OAKG;IACH,IAAI,QAAQ,IAAI,MAAM,CAIrB;IAED;;;;;OAKG;IACH,IAAI,MAAM,IAAI,MAAM,CAInB;CACF;AAED;;;;GAIG;AACH,qBAAa,WAAW;IACtB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAA;IAErB;;OAEG;IACH,WAAW,EAAE,MAA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;;;OAGG;gBACS,IAAI,EAAE,qBAAqB;IASvC;;;OAGG;IACH,IAAI,kBAAkB,IAAI,QAAQ,EAAE,CAMnC;IAED;;;OAGG;IACH,IAAI,WAAW,IAAI,MAAM,EAAE,CAM1B;CACF"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { decode } from "@googlemaps/polyline-codec";
|
|
2
|
+
import { v4 as uuid } from "uuid";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a complete route in MapVX that can contain multiple legs.
|
|
5
|
+
* Each route is composed of a series of legs that connect different points.
|
|
6
|
+
* @group Routes
|
|
7
|
+
*/
|
|
8
|
+
export class MVXRoute {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new route instance from API response data
|
|
11
|
+
* @hidden
|
|
12
|
+
* @param data API response data containing route information
|
|
13
|
+
*/
|
|
14
|
+
constructor(data) {
|
|
15
|
+
this.id = uuid();
|
|
16
|
+
this.legs = [];
|
|
17
|
+
data.legs.forEach((legData) => {
|
|
18
|
+
const leg = new MVXRouteLeg(legData);
|
|
19
|
+
this.legs.push(leg);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Gets all steps of the route by combining steps from all legs
|
|
24
|
+
* @returns Array with all route steps
|
|
25
|
+
*/
|
|
26
|
+
get steps() {
|
|
27
|
+
return this.legs.flatMap((leg) => leg.steps);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Gets the total duration of the route.
|
|
31
|
+
* This property calculates the sum of the duration of all legs in the route.
|
|
32
|
+
*
|
|
33
|
+
* @returns {number} The total duration of the route, in seconds.
|
|
34
|
+
*/
|
|
35
|
+
get duration() {
|
|
36
|
+
return this.legs
|
|
37
|
+
.map((leg) => leg.duration)
|
|
38
|
+
.reduce((accumulator, currentValue) => accumulator + currentValue, 0);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Gets the total length of the route.
|
|
42
|
+
* This property calculates the sum of the length of all legs in the route.
|
|
43
|
+
*
|
|
44
|
+
* @returns {number} The total length of the route, in meters.
|
|
45
|
+
*/
|
|
46
|
+
get length() {
|
|
47
|
+
return this.legs
|
|
48
|
+
.map((leg) => leg.distance)
|
|
49
|
+
.reduce((accumulator, currentValue) => accumulator + currentValue, 0);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Represents a route leg that connects two specific points.
|
|
54
|
+
* Each leg contains information about distance, duration, and detailed steps.
|
|
55
|
+
* @group Routes
|
|
56
|
+
*/
|
|
57
|
+
export class MVXRouteLeg {
|
|
58
|
+
/**
|
|
59
|
+
* Creates a new route leg instance from response data
|
|
60
|
+
* @hidden
|
|
61
|
+
* @param data API response data containing leg information
|
|
62
|
+
*/
|
|
63
|
+
constructor(data) {
|
|
64
|
+
this.distance = data.distance.value;
|
|
65
|
+
this.duration = data.duration.value;
|
|
66
|
+
this.startLocation = data.start_location;
|
|
67
|
+
this.endLocation = data.end_location;
|
|
68
|
+
this.steps = [];
|
|
69
|
+
data.steps.forEach((stepData) => {
|
|
70
|
+
const step = new MVXRouteStep(stepData);
|
|
71
|
+
this.steps.push(step);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Represents an individual step within a route leg.
|
|
77
|
+
* Each step contains specific instructions and coordinates for navigation.
|
|
78
|
+
* @group Routes
|
|
79
|
+
*/
|
|
80
|
+
export class MVXRouteStep {
|
|
81
|
+
/**
|
|
82
|
+
* Creates a new route step instance from response data
|
|
83
|
+
* @hidden
|
|
84
|
+
* @param data API response data containing step information
|
|
85
|
+
*/
|
|
86
|
+
constructor(data) {
|
|
87
|
+
this.distance = data.distance.value;
|
|
88
|
+
this.duration = data.duration.value;
|
|
89
|
+
this.startLocation = data.start_location;
|
|
90
|
+
this.startInsideFloor = data.start_inside_floor;
|
|
91
|
+
this.startInsidePlace = data.start_inside_place;
|
|
92
|
+
this.endLocation = data.end_location;
|
|
93
|
+
this.endInsideFloor = data.end_inside_floor;
|
|
94
|
+
this.endInsidePlace = data.end_inside_place;
|
|
95
|
+
this.htmlInstruction = data.html_instructions;
|
|
96
|
+
this.plainInstruction = data.plain_instructions;
|
|
97
|
+
this.maneuver = data.maneuver;
|
|
98
|
+
this.elevatorStep = data.elevator_step;
|
|
99
|
+
this.showPopup = data.show_popup;
|
|
100
|
+
this.iconPrefix = data.icon_prefix;
|
|
101
|
+
this.polyline = new Polyline(data.polyline);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Gets the polyline coordinates in GeoJSON format
|
|
105
|
+
* @returns Array of coordinates in [longitude, latitude] format
|
|
106
|
+
*/
|
|
107
|
+
get geoJsonCoordinates() {
|
|
108
|
+
return this.polyline.geoJsonCoordinates;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Gets the polyline coordinates in LatLng format
|
|
112
|
+
* @returns Array of LatLng coordinates
|
|
113
|
+
*/
|
|
114
|
+
get coordinates() {
|
|
115
|
+
return this.polyline.coordinates;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Internal class that handles polyline decoding and management.
|
|
120
|
+
* A polyline is an encoded representation of a series of coordinates.
|
|
121
|
+
*/
|
|
122
|
+
class Polyline {
|
|
123
|
+
/**
|
|
124
|
+
* Creates a new polyline instance from response data
|
|
125
|
+
* @param data Response data containing polyline information
|
|
126
|
+
*/
|
|
127
|
+
constructor(data) {
|
|
128
|
+
this.points = data.points;
|
|
129
|
+
this.pointsLatLng = data.points_lat_lng;
|
|
130
|
+
this.overviewPoints = data.overview_points;
|
|
131
|
+
this.decodedPoints = decode(data.points).map((point) => {
|
|
132
|
+
return { lat: point[0], lng: point[1] };
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Gets coordinates in GeoJSON format
|
|
137
|
+
* @returns Array of coordinates in [longitude, latitude] format
|
|
138
|
+
*/
|
|
139
|
+
get geoJsonCoordinates() {
|
|
140
|
+
if (this.overviewPoints != null) {
|
|
141
|
+
return this.overviewPoints.map((point) => [point.lng, point.lat]);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
return this.decodedPoints.map((point) => [point.lng, point.lat]);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Gets coordinates in LatLng format
|
|
149
|
+
* @returns Array of LatLng coordinates
|
|
150
|
+
*/
|
|
151
|
+
get coordinates() {
|
|
152
|
+
if (this.overviewPoints != null) {
|
|
153
|
+
return this.overviewPoints;
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
return this.decodedPoints;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=route.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../../../src/domain/models/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEnD,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAA;AASjC;;;;GAIG;AACH,MAAM,OAAO,QAAQ;IAWnB;;;;OAIG;IACH,YAAY,IAAmB;QAC7B,IAAI,CAAC,EAAE,GAAG,IAAI,EAAE,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,EAAE,CAAA;QACd,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC5B,MAAM,GAAG,GAAG,IAAI,WAAW,CAAC,OAAO,CAAC,CAAA;YACpC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACrB,CAAC,CAAC,CAAA;IACJ,CAAC;IAED;;;OAGG;IACH,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IAC9C,CAAC;IAED;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Ac,GAAG,IAAI,CAAC,eAAe,CAAA;QAC1C,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YACrD,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;QACzC,CAAC,CAAC,CAAA;IACJ,CAAC;IAED;;;OAGG;IACH,IAAI,kBAAkB;QACpB,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,EAAE;YAC/B,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAA;SAClE;aAAM;YACL,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAA;SACjE;IACH,CAAC;IAED;;;OAGG;IACH,IAAI,WAAW;QACb,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,EAAE;YAC/B,OAAO,IAAI,CAAC,cAAc,CAAA;SAC3B;aAAM;YACL,OAAO,IAAI,CAAC,aAAa,CAAA;SAC1B;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import type { MVXLocation } from "./location";
|
|
2
|
+
import type { RouteStyle } from "./routeStyle";
|
|
3
|
+
/**
|
|
4
|
+
* Represents the announce format for the route.
|
|
5
|
+
* @group Routes
|
|
6
|
+
*/
|
|
7
|
+
export declare enum AnnounceFormat {
|
|
8
|
+
cardinal = "CARDINAL",
|
|
9
|
+
clock = "CLOCK",
|
|
10
|
+
relative = "RELATIVE"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Represents the unit system for the route.
|
|
14
|
+
* @group Routes
|
|
15
|
+
*/
|
|
16
|
+
export declare enum UnitSystem {
|
|
17
|
+
metric = "METRIC",
|
|
18
|
+
imperial = "IMPERIAL",
|
|
19
|
+
steps = "STEPS"
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Represents the transportation mode for the route.
|
|
23
|
+
* @group Routes
|
|
24
|
+
*/
|
|
25
|
+
export declare enum TransportationMode {
|
|
26
|
+
walking = "WALKING",
|
|
27
|
+
driving = "DRIVING",
|
|
28
|
+
bicycling = "BICYCLING",
|
|
29
|
+
transit = "TRANSIT"
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The parameters to get a route.
|
|
33
|
+
* @group Routes
|
|
34
|
+
*/
|
|
35
|
+
export interface GetRouteConfiguration {
|
|
36
|
+
/**
|
|
37
|
+
* The initial location for the route.
|
|
38
|
+
*/
|
|
39
|
+
initialLocation: RouteLocation;
|
|
40
|
+
/**
|
|
41
|
+
* The final location for the route.
|
|
42
|
+
*/
|
|
43
|
+
finalLocation: RouteLocation;
|
|
44
|
+
/**
|
|
45
|
+
* The option to generate a route (if available) for people with mobility disabilities.
|
|
46
|
+
* @defaultValue `false`.
|
|
47
|
+
*/
|
|
48
|
+
preferAccessibleRoute?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* The language for the instructions.
|
|
51
|
+
* Default to `en`.
|
|
52
|
+
*/
|
|
53
|
+
language?: string;
|
|
54
|
+
/**
|
|
55
|
+
* The unit system used for the distance.
|
|
56
|
+
* Default to `METRIC`.
|
|
57
|
+
*/
|
|
58
|
+
unitSystem?: UnitSystem;
|
|
59
|
+
/**
|
|
60
|
+
* The format used to announce directions in the instructions.
|
|
61
|
+
* Default to `RELATIVE`.
|
|
62
|
+
*/
|
|
63
|
+
announceFormat?: AnnounceFormat;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Class representing the configuration of a route.
|
|
67
|
+
* @hidden
|
|
68
|
+
*/
|
|
69
|
+
export declare class InternalGetRouteConfiguration implements GetRouteConfiguration {
|
|
70
|
+
initialLocation: RouteLocation;
|
|
71
|
+
finalLocation: RouteLocation;
|
|
72
|
+
preferAccessibleRoute: boolean;
|
|
73
|
+
language: string;
|
|
74
|
+
unitSystem: UnitSystem;
|
|
75
|
+
announceFormat: AnnounceFormat;
|
|
76
|
+
/**
|
|
77
|
+
* Create a new route configuration.
|
|
78
|
+
* @param initialLocation The initial location for the route.
|
|
79
|
+
* @param finalLocation The final location for the route.
|
|
80
|
+
* @param preferAccessibleRoute The option to generate a route (if available) for people with mobility disabilities.
|
|
81
|
+
* @param language The language for the instructions.
|
|
82
|
+
* @param unitSystem The unit system used for the distance.
|
|
83
|
+
* @param announceFormat The format used to announce directions in the instructions.
|
|
84
|
+
*/
|
|
85
|
+
constructor(config: GetRouteConfiguration);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Parameters to configure how to draw the route on the map.
|
|
89
|
+
* @group Routes
|
|
90
|
+
*/
|
|
91
|
+
export interface DrawRouteConfiguration {
|
|
92
|
+
/**
|
|
93
|
+
* The width in pixels of the route line on the map.
|
|
94
|
+
* @defaultValue `10`
|
|
95
|
+
*/
|
|
96
|
+
polylineWidth?: number;
|
|
97
|
+
/**
|
|
98
|
+
* The style for the steps ahead of the user.
|
|
99
|
+
* If omitted, default to `{ type: "Solid", color: "#1257ED", }`.
|
|
100
|
+
* @defaultValue `{ type: "Solid", color: "#1257ED" }`
|
|
101
|
+
*/
|
|
102
|
+
routeStyle?: RouteStyle;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Internal class for the configuration to draw the route on a map.
|
|
106
|
+
* @hidden
|
|
107
|
+
*/
|
|
108
|
+
export declare class InternalDrawRouteConfiguration implements DrawRouteConfiguration {
|
|
109
|
+
polylineWidth: number;
|
|
110
|
+
routeStyle: RouteStyle;
|
|
111
|
+
/**
|
|
112
|
+
* Create a new configuration to draw a route in the map.
|
|
113
|
+
* @param polylineWidth The width of the route line in the map. If omitted, default to `10`.
|
|
114
|
+
* @param routeStyle The style for the steps on the route. If omitted, default to `{ color: "#33B5E5" }`.
|
|
115
|
+
*/
|
|
116
|
+
constructor(config: DrawRouteConfiguration);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Interface that represent a place with their id.
|
|
120
|
+
* @group Routes
|
|
121
|
+
*/
|
|
122
|
+
export interface IdLocation {
|
|
123
|
+
/**
|
|
124
|
+
* The ID of the place.
|
|
125
|
+
*/
|
|
126
|
+
id: string;
|
|
127
|
+
/**
|
|
128
|
+
* The level of the floor in the parent place where the place is found.
|
|
129
|
+
* This is only necessary if the place represented by the ID exists on multiple floors.
|
|
130
|
+
* If omitted and the place ID represents a place found on multiple floors,
|
|
131
|
+
* the first floor where this place is present will be used.
|
|
132
|
+
*/
|
|
133
|
+
level?: number;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Type that represent a location to be used in the generation of a route.
|
|
137
|
+
* @group Routes
|
|
138
|
+
*/
|
|
139
|
+
export type RouteLocation = IdLocation | MVXLocation;
|
|
140
|
+
//# sourceMappingURL=routeConfiguration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routeConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/domain/models/routeConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C;;;GAGG;AACH,oBAAY,cAAc;IACxB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,QAAQ,aAAa;CACtB;AAED;;;GAGG;AACH,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,KAAK,UAAU;CAChB;AAED;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB;AAED;;;GA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|
|
5
|
+
export var AnnounceFormat;
|
|
6
|
+
(function (AnnounceFormat) {
|
|
7
|
+
AnnounceFormat["cardinal"] = "CARDINAL";
|
|
8
|
+
AnnounceFormat["clock"] = "CLOCK";
|
|
9
|
+
AnnounceFormat["relative"] = "RELATIVE";
|
|
10
|
+
})(AnnounceFormat || (AnnounceFormat = {}));
|
|
11
|
+
/**
|
|
12
|
+
* Represents the unit system for the route.
|
|
13
|
+
* @group Routes
|
|
14
|
+
*/
|
|
15
|
+
export var UnitSystem;
|
|
16
|
+
(function (UnitSystem) {
|
|
17
|
+
UnitSystem["metric"] = "METRIC";
|
|
18
|
+
UnitSystem["imperial"] = "IMPERIAL";
|
|
19
|
+
UnitSystem["steps"] = "STEPS";
|
|
20
|
+
})(UnitSystem || (UnitSystem = {}));
|
|
21
|
+
/**
|
|
22
|
+
* Represents the transportation mode for the route.
|
|
23
|
+
* @group Routes
|
|
24
|
+
*/
|
|
25
|
+
export var TransportationMode;
|
|
26
|
+
(function (TransportationMode) {
|
|
27
|
+
TransportationMode["walking"] = "WALKING";
|
|
28
|
+
TransportationMode["driving"] = "DRIVING";
|
|
29
|
+
TransportationMode["bicycling"] = "BICYCLING";
|
|
30
|
+
TransportationMode["transit"] = "TRANSIT";
|
|
31
|
+
})(TransportationMode || (TransportationMode = {}));
|
|
32
|
+
/**
|
|
33
|
+
* Class representing the configuration of a route.
|
|
34
|
+
* @hidden
|
|
35
|
+
*/
|
|
36
|
+
export class InternalGetRouteConfiguration {
|
|
37
|
+
/**
|
|
38
|
+
* Create a new route configuration.
|
|
39
|
+
* @param initialLocation The initial location for the route.
|
|
40
|
+
* @param finalLocation The final location for the route.
|
|
41
|
+
* @param preferAccessibleRoute The option to generate a route (if available) for people with mobility disabilities.
|
|
42
|
+
* @param language The language for the instructions.
|
|
43
|
+
* @param unitSystem The unit system used for the distance.
|
|
44
|
+
* @param announceFormat The format used to announce directions in the instructions.
|
|
45
|
+
*/
|
|
46
|
+
constructor(config) {
|
|
47
|
+
var _a, _b, _c, _d;
|
|
48
|
+
this.initialLocation = config.initialLocation;
|
|
49
|
+
this.finalLocation = config.finalLocation;
|
|
50
|
+
this.preferAccessibleRoute = (_a = config.preferAccessibleRoute) !== null && _a !== void 0 ? _a : false;
|
|
51
|
+
this.language = (_b = config.language) !== null && _b !== void 0 ? _b : "en";
|
|
52
|
+
this.unitSystem = (_c = config.unitSystem) !== null && _c !== void 0 ? _c : UnitSystem.metric;
|
|
53
|
+
this.announceFormat = (_d = config.announceFormat) !== null && _d !== void 0 ? _d : AnnounceFormat.relative;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Internal class for the configuration to draw the route on a map.
|
|
58
|
+
* @hidden
|
|
59
|
+
*/
|
|
60
|
+
export class InternalDrawRouteConfiguration {
|
|
61
|
+
/**
|
|
62
|
+
* Create a new configuration to draw a route in the map.
|
|
63
|
+
* @param polylineWidth The width of the route line in the map. If omitted, default to `10`.
|
|
64
|
+
* @param routeStyle The style for the steps on the route. If omitted, default to `{ color: "#33B5E5" }`.
|
|
65
|
+
*/
|
|
66
|
+
constructor(config) {
|
|
67
|
+
var _a, _b;
|
|
68
|
+
this.polylineWidth = (_a = config.polylineWidth) !== null && _a !== void 0 ? _a : 10;
|
|
69
|
+
this.routeStyle = (_b = config.routeStyle) !== null && _b !== void 0 ? _b : {
|
|
70
|
+
type: "Solid",
|
|
71
|
+
color: "#1257ED",
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=routeConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routeConfiguration.js","sourceRoot":"","sources":["../../../../src/domain/models/routeConfiguration.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,uCAAqB,CAAA;IACrB,iCAAe,CAAA;IACf,uCAAqB,CAAA;AACvB,CAAC,EAJW,cAAc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
1
|
+
import { type Feature, type FeatureCollection, type LineString } from "geojson";
|
|
2
|
+
import { type InternalAnimationConfig } from "./animation";
|
|
3
|
+
import { type MarkerAttribute } from "./marker";
|
|
4
|
+
import { type MVXRoute } from "./route";
|
|
5
|
+
/**
|
|
6
|
+
* Represents the conditions for the step animation.
|
|
7
|
+
* @group Routes
|
|
8
|
+
*/
|
|
9
|
+
export interface StepAnimationConditions {
|
|
10
|
+
index: number;
|
|
11
|
+
coordinatesIndex: number;
|
|
12
|
+
iconRotation: number;
|
|
13
|
+
rotatingIcon: boolean;
|
|
14
|
+
startTime: number | undefined;
|
|
15
|
+
progress: number;
|
|
16
|
+
resetTime: boolean;
|
|
17
|
+
waitStartTime: number | undefined;
|
|
18
|
+
animationId: number;
|
|
19
|
+
onFinish?: (timestamp: number) => void;
|
|
20
|
+
isStepByStep?: boolean;
|
|
21
|
+
nextFloorFirstStepIndex?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Represents a single route instance on the map with its own
|
|
25
|
+
* MapLibre sources/layers, GeoJSON data, animation state, and marker.
|
|
26
|
+
* @group Routes
|
|
27
|
+
*/
|
|
28
|
+
export interface RouteInstance {
|
|
29
|
+
readonly id: string;
|
|
30
|
+
route: MVXRoute;
|
|
31
|
+
readonly aheadId: string;
|
|
32
|
+
readonly behindId: string;
|
|
33
|
+
readonly currentId: string;
|
|
34
|
+
aheadSourceData: FeatureCollection;
|
|
35
|
+
behindSourceData: FeatureCollection;
|
|
36
|
+
currentSourceData: Feature<LineString>;
|
|
37
|
+
animationStatus: "STARTED" | "PAUSED" | "FINISHED" | "NO_ROUTE";
|
|
38
|
+
stepAnimationStatus: "NO_ROUTE" | "ANIMATING" | "WAITING";
|
|
39
|
+
conditions?: StepAnimationConditions;
|
|
40
|
+
animationConfig?: InternalAnimationConfig;
|
|
41
|
+
routeMarker?: MarkerAttribute;
|
|
42
|
+
currentPlaceId?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Creates a new RouteInstance from a route.
|
|
46
|
+
* Each instance gets unique MapLibre source/layer IDs based on the route's UUID.
|
|
47
|
+
* @param route The route to create an instance for.
|
|
48
|
+
* @returns A new RouteInstance with initialized GeoJSON data structures.
|
|
49
|
+
* @group Routes
|
|
50
|
+
*/
|
|
51
|
+
export declare function createRouteInstance(route: MVXRoute): RouteInstance;
|
|
52
|
+
//# sourceMappingURL=routeInstance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routeInstance.d.ts","sourceRoot":"","sources":["../../../../src/domain/models/routeInstance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAC/E,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAA;IACb,gBAAgB,EAAE,MAAM,CAAA;IACxB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,OAAO,CAAA;IACrB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,OAAO,CAAA;IAClB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,uBAAuB,CAAC,EAAE,MAAM,CAAA;CACjC;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,QAAQ,CAAA;IACf,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,eAAe,EAAE,iBAAiB,CAAA;IAClC,gBAAgB,EAAE,iBAAiB,CAAA;IACnC,iBAAiB,EAAE,OAAO,CAAC,UAAU,CAAC,CAAA;IACtC,eAAe,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAA;IAC/D,mBAAmB,EAAE,UAAU,GAAG,WAAW,GAAG,SAAS,CAAA;IACzD,UAAU,CAAC,EAAE,uBAAuB,CAAA;IACpC,eAAe,CAAC,EAAE,uBAAuB,CAAA;IACzC,WAAW,CAAC,EAAE,eAAe,CAAA;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,QAAQ,GAAG,aAAa,CAiBlE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a new RouteInstance from a route.
|
|
3
|
+
* Each instance gets unique MapLibre source/layer IDs based on the route's UUID.
|
|
4
|
+
* @param route The route to create an instance for.
|
|
5
|
+
* @returns A new RouteInstance with initialized GeoJSON data structures.
|
|
6
|
+
* @group Routes
|
|
7
|
+
*/
|
|
8
|
+
export function createRouteInstance(route) {
|
|
9
|
+
return {
|
|
10
|
+
id: route.id,
|
|
11
|
+
route,
|
|
12
|
+
aheadId: `AHEAD_${route.id}`,
|
|
13
|
+
behindId: `BEHIND_${route.id}`,
|
|
14
|
+
currentId: `CURRENT_${route.id}`,
|
|
15
|
+
aheadSourceData: { type: "FeatureCollection", features: [] },
|
|
16
|
+
behindSourceData: { type: "FeatureCollection", features: [] },
|
|
17
|
+
currentSourceData: {
|
|
18
|
+
type: "Feature",
|
|
19
|
+
properties: {},
|
|
20
|
+
geometry: { type: "LineString", coordinates: [] },
|
|
21
|
+
},
|
|
22
|
+
animationStatus: "NO_ROUTE",
|
|
23
|
+
stepAnimationStatus: "NO_ROUTE",
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=routeInstance.js.map
|