@mapvx/web-js 1.2.3-dev.3 → 1.2.3
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/assets/icons.js +6 -8
- package/dist/cjs/assets/icons.js.map +1 -1
- package/dist/cjs/domain/models/animation.js +2 -2
- package/dist/cjs/domain/models/categories.js +23 -10
- package/dist/cjs/domain/models/categories.js.map +1 -1
- package/dist/cjs/domain/models/marker.js +86 -80
- package/dist/cjs/domain/models/marker.js.map +1 -1
- package/dist/cjs/index.js +13 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/logger/logger.js +1 -1
- package/dist/cjs/logger/rollbar.js +1 -1
- package/dist/cjs/map/map.js +1 -1
- package/dist/cjs/repository/requester.js +47 -64
- package/dist/cjs/repository/requester.js.map +1 -1
- package/dist/es/assets/icons.d.ts +4 -4
- package/dist/es/assets/icons.d.ts.map +1 -1
- package/dist/es/assets/icons.js +6 -8
- package/dist/es/assets/icons.js.map +1 -1
- package/dist/es/domain/models/animation.d.ts +3 -3
- package/dist/es/domain/models/animation.js +2 -2
- package/dist/es/domain/models/categories.d.ts +34 -10
- package/dist/es/domain/models/categories.d.ts.map +1 -1
- package/dist/es/domain/models/categories.js +21 -9
- package/dist/es/domain/models/categories.js.map +1 -1
- package/dist/es/domain/models/marker.d.ts +8 -0
- package/dist/es/domain/models/marker.d.ts.map +1 -1
- package/dist/es/domain/models/marker.js +86 -80
- package/dist/es/domain/models/marker.js.map +1 -1
- package/dist/es/domain/models/routeConfiguration.d.ts +38 -0
- package/dist/es/domain/models/routeConfiguration.d.ts.map +1 -1
- package/dist/es/index.d.ts +12 -12
- package/dist/es/index.d.ts.map +1 -1
- package/dist/es/index.js +6 -6
- package/dist/es/index.js.map +1 -1
- package/dist/es/logger/logger.js +1 -1
- package/dist/es/logger/rollbar.js +1 -1
- package/dist/es/map/map.js +1 -1
- package/dist/es/repository/requester.d.ts +12 -0
- package/dist/es/repository/requester.d.ts.map +1 -1
- package/dist/es/repository/requester.js +47 -64
- package/dist/es/repository/requester.js.map +1 -1
- package/dist/umd/index.js +492 -409
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/styles.css +32 -14
- package/dist/umd/styles.css.map +1 -1
- package/package.json +2 -3
- package/dist/cjs/assets/route_animation_icon.svg +0 -15
- package/dist/cjs/assets/user-dot-icon.svg +0 -3
- package/dist/es/assets/route_animation_icon.svg +0 -15
- package/dist/es/assets/user-dot-icon.svg +0 -3
package/dist/umd/index.js
CHANGED
|
@@ -5748,6 +5748,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
5748
5748
|
initializeSDK: () => (/* reexport */ initializeSDK),
|
|
5749
5749
|
injectPreconnects: () => (/* reexport */ injectPreconnects),
|
|
5750
5750
|
isBasicWithIcon: () => (/* reexport */ isBasicWithIcon),
|
|
5751
|
+
isBasicWithImageUrl: () => (/* reexport */ isBasicWithImageUrl),
|
|
5751
5752
|
isBasicWithLogo: () => (/* reexport */ isBasicWithLogo),
|
|
5752
5753
|
isMapVxRequestHostname: () => (/* reexport */ isMapVxRequestHostname),
|
|
5753
5754
|
isValidCircleConfig: () => (/* reexport */ isValidCircleConfig),
|
|
@@ -5755,8 +5756,106 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
5755
5756
|
loadStyles: () => (/* binding */ loadStyles)
|
|
5756
5757
|
});
|
|
5757
5758
|
|
|
5758
|
-
;// ./src/infrastructure/cache/
|
|
5759
|
+
;// ./src/infrastructure/cache/cacheConfig.ts
|
|
5759
5760
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5761
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5762
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5763
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5764
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
5765
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5766
|
+
/**
|
|
5767
|
+
* Cache configuration types and defaults
|
|
5768
|
+
* Defines the configuration options for the caching system
|
|
5769
|
+
* @module cacheConfig
|
|
5770
|
+
*/
|
|
5771
|
+
|
|
5772
|
+
/**
|
|
5773
|
+
* Cache types available in the SDK
|
|
5774
|
+
* @group Configuration
|
|
5775
|
+
*/
|
|
5776
|
+
|
|
5777
|
+
/**
|
|
5778
|
+
* Configuration for a single cache instance
|
|
5779
|
+
* @group Configuration
|
|
5780
|
+
*/
|
|
5781
|
+
|
|
5782
|
+
/**
|
|
5783
|
+
* Configuration for the CacheManager
|
|
5784
|
+
* @group Configuration
|
|
5785
|
+
*/
|
|
5786
|
+
|
|
5787
|
+
/**
|
|
5788
|
+
* Default maximum storage size: 5MB
|
|
5789
|
+
*/
|
|
5790
|
+
var DEFAULT_MAX_STORAGE_BYTES = 5 * 1024 * 1024;
|
|
5791
|
+
|
|
5792
|
+
/**
|
|
5793
|
+
* Default cache configurations per type
|
|
5794
|
+
* These values balance memory usage with performance
|
|
5795
|
+
*/
|
|
5796
|
+
var DEFAULT_CACHE_CONFIGS = {
|
|
5797
|
+
places: {
|
|
5798
|
+
maxItems: 500,
|
|
5799
|
+
ttlMs: 30 * 60 * 1000,
|
|
5800
|
+
// 30 minutes
|
|
5801
|
+
persistenceKey: "mvx_places"
|
|
5802
|
+
},
|
|
5803
|
+
routes: {
|
|
5804
|
+
maxItems: 100,
|
|
5805
|
+
ttlMs: 5 * 60 * 1000,
|
|
5806
|
+
// 5 minutes
|
|
5807
|
+
persistenceKey: "mvx_routes"
|
|
5808
|
+
},
|
|
5809
|
+
accessibleRoutes: {
|
|
5810
|
+
maxItems: 100,
|
|
5811
|
+
ttlMs: 5 * 60 * 1000,
|
|
5812
|
+
// 5 minutes
|
|
5813
|
+
persistenceKey: "mvx_accessible_routes"
|
|
5814
|
+
},
|
|
5815
|
+
configurations: {
|
|
5816
|
+
maxItems: 10,
|
|
5817
|
+
ttlMs: 60 * 60 * 1000,
|
|
5818
|
+
// 1 hour
|
|
5819
|
+
persistenceKey: "mvx_configurations"
|
|
5820
|
+
},
|
|
5821
|
+
categories: {
|
|
5822
|
+
maxItems: 20,
|
|
5823
|
+
ttlMs: 60 * 60 * 1000,
|
|
5824
|
+
// 1 hour
|
|
5825
|
+
persistenceKey: "mvx_categories"
|
|
5826
|
+
},
|
|
5827
|
+
vehicles: {
|
|
5828
|
+
maxItems: 50,
|
|
5829
|
+
ttlMs: 60 * 1000,
|
|
5830
|
+
// 1 minute
|
|
5831
|
+
persistenceKey: "mvx_vehicles"
|
|
5832
|
+
},
|
|
5833
|
+
stops: {
|
|
5834
|
+
maxItems: 100,
|
|
5835
|
+
ttlMs: 60 * 1000,
|
|
5836
|
+
// 1 minute
|
|
5837
|
+
persistenceKey: "mvx_stops"
|
|
5838
|
+
},
|
|
5839
|
+
subPlaces: {
|
|
5840
|
+
maxItems: 200,
|
|
5841
|
+
ttlMs: 15 * 60 * 1000,
|
|
5842
|
+
// 15 minutes
|
|
5843
|
+
persistenceKey: "mvx_subplaces"
|
|
5844
|
+
}
|
|
5845
|
+
};
|
|
5846
|
+
|
|
5847
|
+
/**
|
|
5848
|
+
* Merges user config with defaults for a specific cache type
|
|
5849
|
+
* @param cacheType - The type of cache
|
|
5850
|
+
* @param userConfig - Optional user-provided configuration
|
|
5851
|
+
* @returns Complete cache configuration
|
|
5852
|
+
*/
|
|
5853
|
+
function getCacheConfig(cacheType, userConfig) {
|
|
5854
|
+
var defaultConfig = DEFAULT_CACHE_CONFIGS[cacheType];
|
|
5855
|
+
return _objectSpread(_objectSpread({}, defaultConfig), userConfig);
|
|
5856
|
+
}
|
|
5857
|
+
;// ./src/infrastructure/cache/LRUCache.ts
|
|
5858
|
+
function LRUCache_typeof(o) { "@babel/helpers - typeof"; return LRUCache_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, LRUCache_typeof(o); }
|
|
5760
5859
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
5761
5860
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5762
5861
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
@@ -5765,11 +5864,11 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol
|
|
|
5765
5864
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
5766
5865
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5767
5866
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
5768
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e,
|
|
5867
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, LRUCache_toPropertyKey(o.key), o); } }
|
|
5769
5868
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5770
|
-
function
|
|
5771
|
-
function
|
|
5772
|
-
function
|
|
5869
|
+
function LRUCache_defineProperty(e, r, t) { return (r = LRUCache_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5870
|
+
function LRUCache_toPropertyKey(t) { var i = LRUCache_toPrimitive(t, "string"); return "symbol" == LRUCache_typeof(i) ? i : i + ""; }
|
|
5871
|
+
function LRUCache_toPrimitive(t, r) { if ("object" != LRUCache_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != LRUCache_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5773
5872
|
/**
|
|
5774
5873
|
* Internal cache entry structure
|
|
5775
5874
|
*/
|
|
@@ -5796,10 +5895,10 @@ var LRUCache = /*#__PURE__*/function () {
|
|
|
5796
5895
|
function LRUCache(config) {
|
|
5797
5896
|
_classCallCheck(this, LRUCache);
|
|
5798
5897
|
// Hit rate tracking
|
|
5799
|
-
|
|
5800
|
-
|
|
5898
|
+
LRUCache_defineProperty(this, "hits", 0);
|
|
5899
|
+
LRUCache_defineProperty(this, "misses", 0);
|
|
5801
5900
|
// Monotonic counter for LRU ordering (avoids issues with same-millisecond operations)
|
|
5802
|
-
|
|
5901
|
+
LRUCache_defineProperty(this, "accessCounter", 0);
|
|
5803
5902
|
this.cache = new Map();
|
|
5804
5903
|
this.maxItems = config.maxItems;
|
|
5805
5904
|
this.ttlMs = config.ttlMs;
|
|
@@ -5967,104 +6066,6 @@ var LRUCache = /*#__PURE__*/function () {
|
|
|
5967
6066
|
}
|
|
5968
6067
|
}]);
|
|
5969
6068
|
}();
|
|
5970
|
-
;// ./src/infrastructure/cache/cacheConfig.ts
|
|
5971
|
-
function cacheConfig_typeof(o) { "@babel/helpers - typeof"; return cacheConfig_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, cacheConfig_typeof(o); }
|
|
5972
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5973
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { cacheConfig_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5974
|
-
function cacheConfig_defineProperty(e, r, t) { return (r = cacheConfig_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5975
|
-
function cacheConfig_toPropertyKey(t) { var i = cacheConfig_toPrimitive(t, "string"); return "symbol" == cacheConfig_typeof(i) ? i : i + ""; }
|
|
5976
|
-
function cacheConfig_toPrimitive(t, r) { if ("object" != cacheConfig_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != cacheConfig_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5977
|
-
/**
|
|
5978
|
-
* Cache configuration types and defaults
|
|
5979
|
-
* Defines the configuration options for the caching system
|
|
5980
|
-
* @module cacheConfig
|
|
5981
|
-
*/
|
|
5982
|
-
|
|
5983
|
-
/**
|
|
5984
|
-
* Cache types available in the SDK
|
|
5985
|
-
* @group Configuration
|
|
5986
|
-
*/
|
|
5987
|
-
|
|
5988
|
-
/**
|
|
5989
|
-
* Configuration for a single cache instance
|
|
5990
|
-
* @group Configuration
|
|
5991
|
-
*/
|
|
5992
|
-
|
|
5993
|
-
/**
|
|
5994
|
-
* Configuration for the CacheManager
|
|
5995
|
-
* @group Configuration
|
|
5996
|
-
*/
|
|
5997
|
-
|
|
5998
|
-
/**
|
|
5999
|
-
* Default maximum storage size: 5MB
|
|
6000
|
-
*/
|
|
6001
|
-
var DEFAULT_MAX_STORAGE_BYTES = 5 * 1024 * 1024;
|
|
6002
|
-
|
|
6003
|
-
/**
|
|
6004
|
-
* Default cache configurations per type
|
|
6005
|
-
* These values balance memory usage with performance
|
|
6006
|
-
*/
|
|
6007
|
-
var DEFAULT_CACHE_CONFIGS = {
|
|
6008
|
-
places: {
|
|
6009
|
-
maxItems: 500,
|
|
6010
|
-
ttlMs: 30 * 60 * 1000,
|
|
6011
|
-
// 30 minutes
|
|
6012
|
-
persistenceKey: "mvx_places"
|
|
6013
|
-
},
|
|
6014
|
-
routes: {
|
|
6015
|
-
maxItems: 100,
|
|
6016
|
-
ttlMs: 5 * 60 * 1000,
|
|
6017
|
-
// 5 minutes
|
|
6018
|
-
persistenceKey: "mvx_routes"
|
|
6019
|
-
},
|
|
6020
|
-
accessibleRoutes: {
|
|
6021
|
-
maxItems: 100,
|
|
6022
|
-
ttlMs: 5 * 60 * 1000,
|
|
6023
|
-
// 5 minutes
|
|
6024
|
-
persistenceKey: "mvx_accessible_routes"
|
|
6025
|
-
},
|
|
6026
|
-
configurations: {
|
|
6027
|
-
maxItems: 10,
|
|
6028
|
-
ttlMs: 60 * 60 * 1000,
|
|
6029
|
-
// 1 hour
|
|
6030
|
-
persistenceKey: "mvx_configurations"
|
|
6031
|
-
},
|
|
6032
|
-
categories: {
|
|
6033
|
-
maxItems: 20,
|
|
6034
|
-
ttlMs: 60 * 60 * 1000,
|
|
6035
|
-
// 1 hour
|
|
6036
|
-
persistenceKey: "mvx_categories"
|
|
6037
|
-
},
|
|
6038
|
-
vehicles: {
|
|
6039
|
-
maxItems: 50,
|
|
6040
|
-
ttlMs: 60 * 1000,
|
|
6041
|
-
// 1 minute
|
|
6042
|
-
persistenceKey: "mvx_vehicles"
|
|
6043
|
-
},
|
|
6044
|
-
stops: {
|
|
6045
|
-
maxItems: 100,
|
|
6046
|
-
ttlMs: 60 * 1000,
|
|
6047
|
-
// 1 minute
|
|
6048
|
-
persistenceKey: "mvx_stops"
|
|
6049
|
-
},
|
|
6050
|
-
subPlaces: {
|
|
6051
|
-
maxItems: 200,
|
|
6052
|
-
ttlMs: 15 * 60 * 1000,
|
|
6053
|
-
// 15 minutes
|
|
6054
|
-
persistenceKey: "mvx_subplaces"
|
|
6055
|
-
}
|
|
6056
|
-
};
|
|
6057
|
-
|
|
6058
|
-
/**
|
|
6059
|
-
* Merges user config with defaults for a specific cache type
|
|
6060
|
-
* @param cacheType - The type of cache
|
|
6061
|
-
* @param userConfig - Optional user-provided configuration
|
|
6062
|
-
* @returns Complete cache configuration
|
|
6063
|
-
*/
|
|
6064
|
-
function getCacheConfig(cacheType, userConfig) {
|
|
6065
|
-
var defaultConfig = DEFAULT_CACHE_CONFIGS[cacheType];
|
|
6066
|
-
return _objectSpread(_objectSpread({}, defaultConfig), userConfig);
|
|
6067
|
-
}
|
|
6068
6069
|
;// ./src/infrastructure/cache/PersistentCache.ts
|
|
6069
6070
|
function PersistentCache_typeof(o) { "@babel/helpers - typeof"; return PersistentCache_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, PersistentCache_typeof(o); }
|
|
6070
6071
|
function PersistentCache_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = PersistentCache_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
@@ -6798,7 +6799,7 @@ var rollbar_umd_min_default = /*#__PURE__*/__webpack_require__.n(rollbar_umd_min
|
|
|
6798
6799
|
// version placeholder is replaced with the package version by
|
|
6799
6800
|
// scripts/inject-build-defines.js. The access token falls back to the MapVX
|
|
6800
6801
|
// SDK-web Rollbar project token when none is injected at build time.
|
|
6801
|
-
var SDK_VERSION = true ? "1.2.3
|
|
6802
|
+
var SDK_VERSION = true ? "1.2.3" : 0;
|
|
6802
6803
|
var ACCESS_TOKEN = false ? 0 : "28279d52df43411ebd138c2bee0ab1df";
|
|
6803
6804
|
var _rollbarConfig = {
|
|
6804
6805
|
accessToken: ACCESS_TOKEN,
|
|
@@ -6845,7 +6846,7 @@ function logger_toPrimitive(t, r) { if ("object" != logger_typeof(t) || !t) retu
|
|
|
6845
6846
|
// by scripts/inject-build-defines.js. The Countly key falls back to the
|
|
6846
6847
|
// MapVX key when none is injected at build time.
|
|
6847
6848
|
var IS_DEBUG = true ? false : 0;
|
|
6848
|
-
var logger_SDK_VERSION = true ? "1.2.3
|
|
6849
|
+
var logger_SDK_VERSION = true ? "1.2.3" : 0;
|
|
6849
6850
|
var COUNTLY_API_KEY = false ? 0 : "f0c8d3b96d336e857a8628f49dd1baf7d7add0e9";
|
|
6850
6851
|
var logger_countly = {
|
|
6851
6852
|
apiKey: COUNTLY_API_KEY,
|
|
@@ -7222,7 +7223,7 @@ var userLocationDataUrl = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w
|
|
|
7222
7223
|
* Generates a data URL for the route animation icon SVG with customizable appearance.
|
|
7223
7224
|
*
|
|
7224
7225
|
* @param config - Optional configuration for the icon appearance.
|
|
7225
|
-
* @param config.backgroundColor - The background color of the circle (default: "#
|
|
7226
|
+
* @param config.backgroundColor - The background color of the circle (default: "#276EF1").
|
|
7226
7227
|
* @param config.arrowColor - The color of the arrow (default: "#FFFFFF").
|
|
7227
7228
|
* @param config.arrowWidth - The stroke width of the arrow path in pixels (default: 0).
|
|
7228
7229
|
* @param config.borderWidth - The border width of the circle in pixels (default: 0).
|
|
@@ -7254,7 +7255,7 @@ var userLocationDataUrl = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w
|
|
|
7254
7255
|
*/
|
|
7255
7256
|
function createRouteAnimationIconDataUrl(config) {
|
|
7256
7257
|
var _config$backgroundCol, _config$arrowColor, _config$arrowWidth, _config$borderWidth, _config$borderColor, _config$blur;
|
|
7257
|
-
var backgroundColor = (_config$backgroundCol = config === null || config === void 0 ? void 0 : config.backgroundColor) !== null && _config$backgroundCol !== void 0 ? _config$backgroundCol : "#
|
|
7258
|
+
var backgroundColor = (_config$backgroundCol = config === null || config === void 0 ? void 0 : config.backgroundColor) !== null && _config$backgroundCol !== void 0 ? _config$backgroundCol : "#276EF1";
|
|
7258
7259
|
var arrowColor = (_config$arrowColor = config === null || config === void 0 ? void 0 : config.arrowColor) !== null && _config$arrowColor !== void 0 ? _config$arrowColor : "#FFFFFF";
|
|
7259
7260
|
var arrowWidth = (_config$arrowWidth = config === null || config === void 0 ? void 0 : config.arrowWidth) !== null && _config$arrowWidth !== void 0 ? _config$arrowWidth : 0;
|
|
7260
7261
|
var borderWidth = (_config$borderWidth = config === null || config === void 0 ? void 0 : config.borderWidth) !== null && _config$borderWidth !== void 0 ? _config$borderWidth : 0;
|
|
@@ -7273,7 +7274,7 @@ function createRouteAnimationIconDataUrl(config) {
|
|
|
7273
7274
|
var filterId = blur > 0 ? "blurFilter" : "";
|
|
7274
7275
|
var filterDef = blur > 0 ? "<defs><filter id=\"".concat(filterId, "\"><feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"").concat(blur, "\"/></filter></defs>") : "";
|
|
7275
7276
|
var filterAttr = blur > 0 ? "filter=\"url(#".concat(filterId, ")\"") : "";
|
|
7276
|
-
var svg = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg version=\"1.1\" id=\"Capa_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0
|
|
7277
|
+
var svg = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg version=\"1.1\" id=\"Capa_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 30 30\" style=\"enable-background:new 0 0 30 30;\" xml:space=\"preserve\">\n".concat(filterDef, "\n<g ").concat(filterAttr, ">\n\t<circle cx=\"15\" cy=\"15\" r=\"15\" style=\"").concat(circleStyle).concat(circleStroke, "\"/>\n\t<path style=\"").concat(arrowStyle).concat(arrowStroke, "\" d=\"M16.4471 7.26386C16.2568 6.80696 15.808 6.51052 15.3131 6.51052C14.8181 6.51052 14.3693 6.80696 14.179 7.26386L8.52211 20.7533C8.29366 21.2972 8.48404 21.9227 8.97085 22.2518C9.45767 22.5809 10.1104 22.5156 10.5265 22.0995L15.3131 17.3129L20.0996 22.0995C20.5157 22.5156 21.1657 22.5782 21.6553 22.2518C22.1448 21.9254 22.3325 21.2972 22.104 20.7533L16.4471 7.26386Z\"/>\n</g>\n</svg>");
|
|
7277
7278
|
|
|
7278
7279
|
// Encode the SVG as a data URL
|
|
7279
7280
|
var encodedSvg = encodeURIComponent(svg);
|
|
@@ -7281,7 +7282,7 @@ function createRouteAnimationIconDataUrl(config) {
|
|
|
7281
7282
|
}
|
|
7282
7283
|
|
|
7283
7284
|
/**
|
|
7284
|
-
* Default route animation icon data URL with blue background (#
|
|
7285
|
+
* Default route animation icon data URL with blue background (#276EF1) and white arrow (#FFFFFF).
|
|
7285
7286
|
* This constant is maintained for backward compatibility.
|
|
7286
7287
|
*
|
|
7287
7288
|
* @example
|
|
@@ -7403,6 +7404,10 @@ function getBoundingBox(points) {
|
|
|
7403
7404
|
return [southwest, northeast];
|
|
7404
7405
|
}
|
|
7405
7406
|
;// ./src/domain/models/marker.ts
|
|
7407
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || marker_unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
7408
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7409
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
7410
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return marker_arrayLikeToArray(r); }
|
|
7406
7411
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7407
7412
|
function _possibleConstructorReturn(t, e) { if (e && ("object" == marker_typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
7408
7413
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
@@ -7411,6 +7416,9 @@ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? O
|
|
|
7411
7416
|
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
7412
7417
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
7413
7418
|
function marker_typeof(o) { "@babel/helpers - typeof"; return marker_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, marker_typeof(o); }
|
|
7419
|
+
function marker_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = marker_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
7420
|
+
function marker_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return marker_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? marker_arrayLikeToArray(r, a) : void 0; } }
|
|
7421
|
+
function marker_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
7414
7422
|
function marker_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
7415
7423
|
function marker_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, marker_toPropertyKey(o.key), o); } }
|
|
7416
7424
|
function marker_createClass(e, r, t) { return r && marker_defineProperties(e.prototype, r), t && marker_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
@@ -7514,82 +7522,104 @@ var MarkerUtils = /*#__PURE__*/function () {
|
|
|
7514
7522
|
* ```
|
|
7515
7523
|
*/
|
|
7516
7524
|
function createMarkerElement(marker) {
|
|
7517
|
-
var _marker$iconPropertie, _marker$iconPropertie2, _marker$iconPropertie3, _marker$iconPropertie4;
|
|
7518
7525
|
var markerContainer = document.createElement("div");
|
|
7519
|
-
|
|
7520
|
-
// Configure specific marker dimensions
|
|
7521
|
-
var iconWidth = (_marker$iconPropertie = (_marker$iconPropertie2 = marker.iconProperties) === null || _marker$iconPropertie2 === void 0 ? void 0 : _marker$iconPropertie2.width) !== null && _marker$iconPropertie !== void 0 ? _marker$iconPropertie : 40;
|
|
7522
|
-
var iconHeight = (_marker$iconPropertie3 = (_marker$iconPropertie4 = marker.iconProperties) === null || _marker$iconPropertie4 === void 0 ? void 0 : _marker$iconPropertie4.height) !== null && _marker$iconPropertie3 !== void 0 ? _marker$iconPropertie3 : 40;
|
|
7523
|
-
|
|
7524
|
-
// Apply base class
|
|
7525
7526
|
markerContainer.className = "mapvx-marker";
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7531
|
-
|
|
7532
|
-
|
|
7533
|
-
markerContainer.classList.add("text-column");
|
|
7534
|
-
markerContainer.style.width = "".concat(Math.max(iconWidth, 200), "px");
|
|
7535
|
-
markerContainer.style.height = "auto";
|
|
7536
|
-
break;
|
|
7537
|
-
case TextPosition.left:
|
|
7538
|
-
case TextPosition.right:
|
|
7539
|
-
default:
|
|
7540
|
-
markerContainer.classList.add("text-row");
|
|
7541
|
-
markerContainer.style.width = "auto";
|
|
7542
|
-
markerContainer.style.height = "".concat(iconHeight, "px");
|
|
7543
|
-
break;
|
|
7527
|
+
this.applyContainerLayout(markerContainer, marker);
|
|
7528
|
+
var _iterator = marker_createForOfIteratorHelper(this.createMarkerChildren(marker)),
|
|
7529
|
+
_step;
|
|
7530
|
+
try {
|
|
7531
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
7532
|
+
var child = _step.value;
|
|
7533
|
+
markerContainer.appendChild(child);
|
|
7544
7534
|
}
|
|
7545
|
-
}
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
markerContainer.style.height = "".concat(iconHeight, "px");
|
|
7550
|
-
}
|
|
7551
|
-
markerContainer.addEventListener("click", function () {
|
|
7552
|
-
var _marker$onClick;
|
|
7553
|
-
(_marker$onClick = marker.onClick) === null || _marker$onClick === void 0 || _marker$onClick.call(marker);
|
|
7554
|
-
});
|
|
7555
|
-
if (marker.element) {
|
|
7556
|
-
markerContainer.appendChild(marker.element);
|
|
7557
|
-
return this.setAndCreateText(marker, markerContainer, "".concat(iconHeight, "px"), "".concat(iconWidth, "px"));
|
|
7535
|
+
} catch (err) {
|
|
7536
|
+
_iterator.e(err);
|
|
7537
|
+
} finally {
|
|
7538
|
+
_iterator.f();
|
|
7558
7539
|
}
|
|
7540
|
+
return markerContainer;
|
|
7541
|
+
}
|
|
7559
7542
|
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7543
|
+
/**
|
|
7544
|
+
* Applies the marker container's own classes and box size from a config.
|
|
7545
|
+
* Shared by {@link createMarkerElement} and {@link MarkerAttribute.updateIcon}
|
|
7546
|
+
* so create and update stay in sync (single source of truth for which state
|
|
7547
|
+
* classes exist and how the anchored box is sized). It is idempotent, so it
|
|
7548
|
+
* also resets stale state when reused to update an existing element.
|
|
7549
|
+
*
|
|
7550
|
+
* @param container - The `.mapvx-marker` element to configure
|
|
7551
|
+
* @param marker - Marker configuration
|
|
7552
|
+
*/
|
|
7553
|
+
}, {
|
|
7554
|
+
key: "applyContainerLayout",
|
|
7555
|
+
value: function applyContainerLayout(container, marker) {
|
|
7556
|
+
// Reset the state classes we own (no-op on a fresh element).
|
|
7557
|
+
container.classList.remove("no-text", "interactive");
|
|
7563
7558
|
|
|
7564
|
-
//
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7559
|
+
// The container box equals the icon box so the out-of-flow label never
|
|
7560
|
+
// displaces the icon from the coordinate MapLibre anchors. A caller-
|
|
7561
|
+
// provided `element` owns its own size, so we let the box size to it.
|
|
7562
|
+
if (marker.element) {
|
|
7563
|
+
container.style.width = "";
|
|
7564
|
+
container.style.height = "";
|
|
7568
7565
|
} else {
|
|
7569
|
-
|
|
7570
|
-
|
|
7566
|
+
var _marker$iconPropertie, _marker$iconPropertie2, _marker$iconPropertie3, _marker$iconPropertie4;
|
|
7567
|
+
var iconWidth = (_marker$iconPropertie = (_marker$iconPropertie2 = marker.iconProperties) === null || _marker$iconPropertie2 === void 0 ? void 0 : _marker$iconPropertie2.width) !== null && _marker$iconPropertie !== void 0 ? _marker$iconPropertie : 40;
|
|
7568
|
+
var iconHeight = (_marker$iconPropertie3 = (_marker$iconPropertie4 = marker.iconProperties) === null || _marker$iconPropertie4 === void 0 ? void 0 : _marker$iconPropertie4.height) !== null && _marker$iconPropertie3 !== void 0 ? _marker$iconPropertie3 : 40;
|
|
7569
|
+
container.style.width = "".concat(iconWidth, "px");
|
|
7570
|
+
container.style.height = "".concat(iconHeight, "px");
|
|
7571
|
+
}
|
|
7572
|
+
if (!marker.text) {
|
|
7573
|
+
container.classList.add("no-text");
|
|
7574
|
+
}
|
|
7575
|
+
|
|
7576
|
+
// Only flag the marker interactive when it actually handles clicks: this
|
|
7577
|
+
// flips the out-of-flow label's pointer-events to auto (see styles.css)
|
|
7578
|
+
// so the label is hit-testable, while non-clickable labels stay
|
|
7579
|
+
// click-through and never block the map.
|
|
7580
|
+
if (marker.onClick) {
|
|
7581
|
+
container.classList.add("interactive");
|
|
7571
7582
|
}
|
|
7572
|
-
return markerContainer;
|
|
7573
7583
|
}
|
|
7574
7584
|
|
|
7575
7585
|
/**
|
|
7576
|
-
*
|
|
7586
|
+
* Builds the in-order children for a marker container: the icon (or the
|
|
7587
|
+
* caller-provided element) followed by the optional out-of-flow label. DOM
|
|
7588
|
+
* order is irrelevant for placement — the .text-container position classes
|
|
7589
|
+
* (top/bottom/left/right) lay the label out around the icon.
|
|
7577
7590
|
*
|
|
7578
|
-
* @param
|
|
7579
|
-
* @
|
|
7580
|
-
* @param iconHeight - Height of the icon for positioning calculations
|
|
7581
|
-
* @param iconWidth - Width of the icon for positioning calculations
|
|
7582
|
-
* @returns Container element with properly positioned text
|
|
7591
|
+
* @param marker - Marker configuration
|
|
7592
|
+
* @returns The child elements to append to the container
|
|
7583
7593
|
*/
|
|
7584
7594
|
}, {
|
|
7585
|
-
key: "
|
|
7586
|
-
value: function
|
|
7587
|
-
|
|
7588
|
-
|
|
7589
|
-
|
|
7590
|
-
|
|
7595
|
+
key: "createMarkerChildren",
|
|
7596
|
+
value: function createMarkerChildren(marker) {
|
|
7597
|
+
var children = [];
|
|
7598
|
+
if (marker.element) {
|
|
7599
|
+
children.push(marker.element);
|
|
7600
|
+
} else {
|
|
7601
|
+
var _marker$iconPropertie5, _marker$iconPropertie6, _marker$iconPropertie7, _marker$iconPropertie8;
|
|
7602
|
+
var iconWidth = (_marker$iconPropertie5 = (_marker$iconPropertie6 = marker.iconProperties) === null || _marker$iconPropertie6 === void 0 ? void 0 : _marker$iconPropertie6.width) !== null && _marker$iconPropertie5 !== void 0 ? _marker$iconPropertie5 : 40;
|
|
7603
|
+
var iconHeight = (_marker$iconPropertie7 = (_marker$iconPropertie8 = marker.iconProperties) === null || _marker$iconPropertie8 === void 0 ? void 0 : _marker$iconPropertie8.height) !== null && _marker$iconPropertie7 !== void 0 ? _marker$iconPropertie7 : 40;
|
|
7604
|
+
children.push(this.createIconElement(marker, iconWidth, iconHeight));
|
|
7591
7605
|
}
|
|
7592
|
-
|
|
7606
|
+
if (marker.text) {
|
|
7607
|
+
children.push(this.buildTextContainer(marker));
|
|
7608
|
+
}
|
|
7609
|
+
return children;
|
|
7610
|
+
}
|
|
7611
|
+
|
|
7612
|
+
/**
|
|
7613
|
+
* Builds the positioned label container for a marker.
|
|
7614
|
+
*
|
|
7615
|
+
* @param marker - Marker configuration; `text` is assumed to be set
|
|
7616
|
+
* @returns The `.text-container` element ready to append
|
|
7617
|
+
*/
|
|
7618
|
+
}, {
|
|
7619
|
+
key: "buildTextContainer",
|
|
7620
|
+
value: function buildTextContainer(marker) {
|
|
7621
|
+
var textElement = typeof marker.text === "string" ? this.createTextElement(marker.text, marker.textProperties) : marker.text;
|
|
7622
|
+
return this.createTextContainer(textElement, marker.textPosition);
|
|
7593
7623
|
}
|
|
7594
7624
|
|
|
7595
7625
|
/**
|
|
@@ -7623,7 +7653,8 @@ var MarkerUtils = /*#__PURE__*/function () {
|
|
|
7623
7653
|
|
|
7624
7654
|
/**
|
|
7625
7655
|
* Creates a text container with proper positioning using CSS classes.
|
|
7626
|
-
*
|
|
7656
|
+
* The container is absolutely positioned (out of flow) so the label
|
|
7657
|
+
* never grows the marker's anchored box.
|
|
7627
7658
|
*
|
|
7628
7659
|
* @param textElement - The text element to contain
|
|
7629
7660
|
* @param textPosition - Desired position relative to the icon
|
|
@@ -7675,11 +7706,11 @@ var MarkerUtils = /*#__PURE__*/function () {
|
|
|
7675
7706
|
}, {
|
|
7676
7707
|
key: "createIcon",
|
|
7677
7708
|
value: function createIcon(marker) {
|
|
7678
|
-
var _marker$
|
|
7709
|
+
var _marker$iconPropertie9, _marker$iconPropertie0, _marker$iconPropertie1, _marker$iconPropertie10;
|
|
7679
7710
|
var image = document.createElement("img");
|
|
7680
7711
|
image.src = typeof marker.icon == "string" ? marker.icon : "";
|
|
7681
|
-
image.width = (_marker$
|
|
7682
|
-
image.height = (_marker$
|
|
7712
|
+
image.width = (_marker$iconPropertie9 = (_marker$iconPropertie0 = marker.iconProperties) === null || _marker$iconPropertie0 === void 0 ? void 0 : _marker$iconPropertie0.width) !== null && _marker$iconPropertie9 !== void 0 ? _marker$iconPropertie9 : 40;
|
|
7713
|
+
image.height = (_marker$iconPropertie1 = (_marker$iconPropertie10 = marker.iconProperties) === null || _marker$iconPropertie10 === void 0 ? void 0 : _marker$iconPropertie10.height) !== null && _marker$iconPropertie1 !== void 0 ? _marker$iconPropertie1 : 40;
|
|
7683
7714
|
image.style.objectFit = "contain";
|
|
7684
7715
|
image.style.filter = "drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25))";
|
|
7685
7716
|
return image;
|
|
@@ -7748,6 +7779,12 @@ var MarkerAttribute = /*#__PURE__*/function (_Marker) {
|
|
|
7748
7779
|
* Used for indoor navigation and floor-specific marker management.
|
|
7749
7780
|
*/
|
|
7750
7781
|
|
|
7782
|
+
/**
|
|
7783
|
+
* Current click handler for the marker. Stored on the instance (rather than
|
|
7784
|
+
* captured in the DOM listener's closure) so {@link updateIcon} can swap it
|
|
7785
|
+
* without leaving the original handler attached to MapLibre's element.
|
|
7786
|
+
*/
|
|
7787
|
+
|
|
7751
7788
|
/**
|
|
7752
7789
|
* Constructs a new `MarkerAttribute` object with the specified properties.
|
|
7753
7790
|
*
|
|
@@ -7773,6 +7810,14 @@ var MarkerAttribute = /*#__PURE__*/function (_Marker) {
|
|
|
7773
7810
|
anchor: (_markerConfig$anchor = markerConfig.anchor) !== null && _markerConfig$anchor !== void 0 ? _markerConfig$anchor : "center",
|
|
7774
7811
|
offset: [0, 0]
|
|
7775
7812
|
}]);
|
|
7813
|
+
|
|
7814
|
+
// Route clicks through an instance-level handler so the latest onClick is
|
|
7815
|
+
// always invoked, even after updateIcon replaces the marker content.
|
|
7816
|
+
_this._userOnClick = markerConfig.onClick;
|
|
7817
|
+
_this._element.addEventListener("click", function () {
|
|
7818
|
+
var _this$_userOnClick, _this2;
|
|
7819
|
+
return (_this$_userOnClick = (_this2 = _this)._userOnClick) === null || _this$_userOnClick === void 0 ? void 0 : _this$_userOnClick.call(_this2);
|
|
7820
|
+
});
|
|
7776
7821
|
_this.setLngLat([markerConfig.coordinate.lng, markerConfig.coordinate.lat]);
|
|
7777
7822
|
_this.setRotationAlignment((_markerConfig$rotatio = markerConfig.rotationAlignment) !== null && _markerConfig$rotatio !== void 0 ? _markerConfig$rotatio : "viewport");
|
|
7778
7823
|
_this.setPitchAlignment("viewport");
|
|
@@ -7820,19 +7865,16 @@ var MarkerAttribute = /*#__PURE__*/function (_Marker) {
|
|
|
7820
7865
|
}, {
|
|
7821
7866
|
key: "updateIcon",
|
|
7822
7867
|
value: function updateIcon(marker) {
|
|
7823
|
-
var _marker$rotationAlign;
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
oldMarkerContent === null || oldMarkerContent === void 0 || (_oldMarkerContent$par = oldMarkerContent.parentElement) === null || _oldMarkerContent$par === void 0 || _oldMarkerContent$par.replaceChild(newMarkerContent, oldMarkerContent);
|
|
7834
|
-
}
|
|
7835
|
-
}
|
|
7868
|
+
var _this$_element, _marker$rotationAlign;
|
|
7869
|
+
// Reconfigure the element MapLibre already holds in place, rather than
|
|
7870
|
+
// building a throwaway element and grafting pieces of it. MapLibre owns the
|
|
7871
|
+
// element's other classes and inline styles (transform, position), which
|
|
7872
|
+
// must survive the update; we only reset our own classes/size and swap the
|
|
7873
|
+
// children. Both create and update go through the same MarkerUtils helpers,
|
|
7874
|
+
// so they cannot drift apart.
|
|
7875
|
+
MarkerUtils.applyContainerLayout(this._element, marker);
|
|
7876
|
+
(_this$_element = this._element).replaceChildren.apply(_this$_element, _toConsumableArray(MarkerUtils.createMarkerChildren(marker)));
|
|
7877
|
+
this._userOnClick = marker.onClick;
|
|
7836
7878
|
this.setRotationAlignment((_marker$rotationAlign = marker.rotationAlignment) !== null && _marker$rotationAlign !== void 0 ? _marker$rotationAlign : "viewport");
|
|
7837
7879
|
this.setPitchAlignment("viewport");
|
|
7838
7880
|
if (typeof marker.rotation === "number") {
|
|
@@ -8143,10 +8185,10 @@ nav_functions_defineProperty(NavFunctions, "EARTH_RADIUS", 6378000);
|
|
|
8143
8185
|
function routeController_typeof(o) { "@babel/helpers - typeof"; return routeController_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, routeController_typeof(o); }
|
|
8144
8186
|
function routeController_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8145
8187
|
function routeController_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? routeController_ownKeys(Object(t), !0).forEach(function (r) { routeController_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : routeController_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8146
|
-
function
|
|
8147
|
-
function
|
|
8148
|
-
function
|
|
8149
|
-
function
|
|
8188
|
+
function routeController_toConsumableArray(r) { return routeController_arrayWithoutHoles(r) || routeController_iterableToArray(r) || routeController_unsupportedIterableToArray(r) || routeController_nonIterableSpread(); }
|
|
8189
|
+
function routeController_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8190
|
+
function routeController_iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
8191
|
+
function routeController_arrayWithoutHoles(r) { if (Array.isArray(r)) return routeController_arrayLikeToArray(r); }
|
|
8150
8192
|
function routeController_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = routeController_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
8151
8193
|
function routeController_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return routeController_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? routeController_arrayLikeToArray(r, a) : void 0; } }
|
|
8152
8194
|
function routeController_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -8521,7 +8563,7 @@ var RouteController = /*#__PURE__*/function () {
|
|
|
8521
8563
|
throw new Error("Error: position array has different length than colors array");
|
|
8522
8564
|
}
|
|
8523
8565
|
var stops = createStops(positionsToUse, colors);
|
|
8524
|
-
var gradient = ["interpolate", ["linear"], ["line-progress"]].concat(
|
|
8566
|
+
var gradient = ["interpolate", ["linear"], ["line-progress"]].concat(routeController_toConsumableArray(stops));
|
|
8525
8567
|
return {
|
|
8526
8568
|
"line-color": null,
|
|
8527
8569
|
"line-gradient": gradient,
|
|
@@ -8768,7 +8810,7 @@ var RouteController = /*#__PURE__*/function () {
|
|
|
8768
8810
|
this.removeSourcesAndLayersForRoute(instance);
|
|
8769
8811
|
this.routes["delete"](instance.id);
|
|
8770
8812
|
if (this.lastAddedRouteId === instance.id) {
|
|
8771
|
-
var remaining =
|
|
8813
|
+
var remaining = routeController_toConsumableArray(this.routes.keys());
|
|
8772
8814
|
this.lastAddedRouteId = remaining.length > 0 ? remaining[remaining.length - 1] : undefined;
|
|
8773
8815
|
}
|
|
8774
8816
|
}
|
|
@@ -8803,7 +8845,7 @@ var RouteController = /*#__PURE__*/function () {
|
|
|
8803
8845
|
}, {
|
|
8804
8846
|
key: "getRouteIds",
|
|
8805
8847
|
value: function getRouteIds() {
|
|
8806
|
-
return
|
|
8848
|
+
return routeController_toConsumableArray(this.routes.keys());
|
|
8807
8849
|
}
|
|
8808
8850
|
}, {
|
|
8809
8851
|
key: "internalPause",
|
|
@@ -9533,6 +9575,16 @@ function InternalDrawRouteConfiguration(config) {
|
|
|
9533
9575
|
/**
|
|
9534
9576
|
* Interface that represent a place with their id.
|
|
9535
9577
|
* @group Routes
|
|
9578
|
+
* @example
|
|
9579
|
+
* ```typescript
|
|
9580
|
+
* // Resolve an internal alias that is reused across several malls by
|
|
9581
|
+
* // pinning the building (and, optionally, the floor) it belongs to.
|
|
9582
|
+
* const origin: IdLocation = {
|
|
9583
|
+
* id: "store-204", // integrator alias, may repeat across buildings
|
|
9584
|
+
* buildingId: "mall-santiago",
|
|
9585
|
+
* floorId: "level-2", // takes precedence over `level`
|
|
9586
|
+
* }
|
|
9587
|
+
* ```
|
|
9536
9588
|
*/
|
|
9537
9589
|
|
|
9538
9590
|
/**
|
|
@@ -9587,11 +9639,11 @@ var InternalAnimationDrawingConfig = /*#__PURE__*/function () {
|
|
|
9587
9639
|
animation_classCallCheck(this, InternalAnimationDrawingConfig);
|
|
9588
9640
|
this.aheadPathStyle = (_data$aheadPathStyle = data.aheadPathStyle) !== null && _data$aheadPathStyle !== void 0 ? _data$aheadPathStyle : {
|
|
9589
9641
|
type: "Solid",
|
|
9590
|
-
color: "#
|
|
9642
|
+
color: "#0C0C0C"
|
|
9591
9643
|
};
|
|
9592
9644
|
this.behindPathStyle = (_data$behindPathStyle = data.behindPathStyle) !== null && _data$behindPathStyle !== void 0 ? _data$behindPathStyle : {
|
|
9593
9645
|
type: "Solid",
|
|
9594
|
-
color: "#
|
|
9646
|
+
color: "#276EF1"
|
|
9595
9647
|
};
|
|
9596
9648
|
this.polylineWidth = (_data$polylineWidth = data.polylineWidth) !== null && _data$polylineWidth !== void 0 ? _data$polylineWidth : 10;
|
|
9597
9649
|
if (data.routeIcon != null) {
|
|
@@ -11749,19 +11801,109 @@ var Requester = /*#__PURE__*/function () {
|
|
|
11749
11801
|
function fetchAnySubPlaces(_x20, _x21) {
|
|
11750
11802
|
return _fetchAnySubPlaces.apply(this, arguments);
|
|
11751
11803
|
}
|
|
11752
|
-
return fetchAnySubPlaces;
|
|
11753
|
-
}()
|
|
11804
|
+
return fetchAnySubPlaces;
|
|
11805
|
+
}()
|
|
11806
|
+
/**
|
|
11807
|
+
* Build the cleaned query parameters for a route request.
|
|
11808
|
+
*
|
|
11809
|
+
* Resolves both the origin (`from*`) and destination (`to*`) sides of the route
|
|
11810
|
+
* from the provided configuration. For {@link IdLocation} endpoints this also
|
|
11811
|
+
* forwards the building (`fromBuilding`/`toBuilding`) and floor
|
|
11812
|
+
* (`fromFloor`/`toFloor`) so internal aliases that are reused across buildings
|
|
11813
|
+
* can be disambiguated. Parameters that resolve to `null`/`undefined` are dropped.
|
|
11814
|
+
* @param routeConfig The route configuration to translate into query params.
|
|
11815
|
+
* @returns The cleaned query parameters ready to be appended to the request URL.
|
|
11816
|
+
*/
|
|
11817
|
+
)
|
|
11818
|
+
}, {
|
|
11819
|
+
key: "buildRouteParams",
|
|
11820
|
+
value: function buildRouteParams(routeConfig) {
|
|
11821
|
+
var params = {
|
|
11822
|
+
fromLatLng: undefined,
|
|
11823
|
+
fromBuilding: undefined,
|
|
11824
|
+
fromFloor: undefined,
|
|
11825
|
+
toLatLng: undefined,
|
|
11826
|
+
toBuilding: undefined,
|
|
11827
|
+
toFloor: undefined,
|
|
11828
|
+
fromPlaceId: undefined,
|
|
11829
|
+
toPlaceId: undefined,
|
|
11830
|
+
travelMode: TransportationMode.walking,
|
|
11831
|
+
reducedMobility: routeConfig.preferAccessibleRoute ? 1 : 0,
|
|
11832
|
+
announceFormat: routeConfig.announceFormat,
|
|
11833
|
+
userBearing: routeConfig.userBearing,
|
|
11834
|
+
lang: this.lang,
|
|
11835
|
+
unitSystem: routeConfig.unitSystem
|
|
11836
|
+
};
|
|
11837
|
+
if ("id" in routeConfig.initialLocation) {
|
|
11838
|
+
var _routeConfig$initialL = routeConfig.initialLocation,
|
|
11839
|
+
id = _routeConfig$initialL.id,
|
|
11840
|
+
buildingId = _routeConfig$initialL.buildingId,
|
|
11841
|
+
floorId = _routeConfig$initialL.floorId,
|
|
11842
|
+
level = _routeConfig$initialL.level;
|
|
11843
|
+
params.fromPlaceId = id;
|
|
11844
|
+
if (buildingId !== undefined) {
|
|
11845
|
+
params.fromBuilding = buildingId;
|
|
11846
|
+
}
|
|
11847
|
+
if (floorId !== undefined) {
|
|
11848
|
+
params.fromFloor = floorId;
|
|
11849
|
+
} else if (level !== undefined) {
|
|
11850
|
+
params.fromFloor = level;
|
|
11851
|
+
}
|
|
11852
|
+
} else {
|
|
11853
|
+
var _routeConfig$initialL2 = routeConfig.initialLocation,
|
|
11854
|
+
lat = _routeConfig$initialL2.lat,
|
|
11855
|
+
lng = _routeConfig$initialL2.lng,
|
|
11856
|
+
_floorId = _routeConfig$initialL2.floorId,
|
|
11857
|
+
placeId = _routeConfig$initialL2.placeId;
|
|
11858
|
+
params.fromLatLng = "".concat(lat, ",").concat(lng);
|
|
11859
|
+
params.fromFloor = _floorId;
|
|
11860
|
+
params.fromBuilding = placeId;
|
|
11861
|
+
}
|
|
11862
|
+
if ("id" in routeConfig.finalLocation) {
|
|
11863
|
+
var _routeConfig$finalLoc = routeConfig.finalLocation,
|
|
11864
|
+
_id = _routeConfig$finalLoc.id,
|
|
11865
|
+
_buildingId = _routeConfig$finalLoc.buildingId,
|
|
11866
|
+
_floorId2 = _routeConfig$finalLoc.floorId,
|
|
11867
|
+
_level = _routeConfig$finalLoc.level;
|
|
11868
|
+
params.toPlaceId = _id;
|
|
11869
|
+
if (_buildingId !== undefined) {
|
|
11870
|
+
params.toBuilding = _buildingId;
|
|
11871
|
+
}
|
|
11872
|
+
if (_floorId2 !== undefined) {
|
|
11873
|
+
params.toFloor = _floorId2;
|
|
11874
|
+
} else if (_level !== undefined) {
|
|
11875
|
+
params.toFloor = _level;
|
|
11876
|
+
}
|
|
11877
|
+
} else {
|
|
11878
|
+
var _routeConfig$finalLoc2 = routeConfig.finalLocation,
|
|
11879
|
+
_lat = _routeConfig$finalLoc2.lat,
|
|
11880
|
+
_lng = _routeConfig$finalLoc2.lng,
|
|
11881
|
+
_floorId3 = _routeConfig$finalLoc2.floorId,
|
|
11882
|
+
_placeId = _routeConfig$finalLoc2.placeId;
|
|
11883
|
+
params.toLatLng = "".concat(_lat, ",").concat(_lng);
|
|
11884
|
+
params.toFloor = _floorId3;
|
|
11885
|
+
params.toBuilding = _placeId;
|
|
11886
|
+
}
|
|
11887
|
+
var cleanParams = {};
|
|
11888
|
+
for (var key in params) {
|
|
11889
|
+
var value = params[key];
|
|
11890
|
+
if (value != null) {
|
|
11891
|
+
cleanParams[key] = value;
|
|
11892
|
+
}
|
|
11893
|
+
}
|
|
11894
|
+
return cleanParams;
|
|
11895
|
+
}
|
|
11896
|
+
|
|
11754
11897
|
/**
|
|
11755
11898
|
* To obtain the route
|
|
11756
11899
|
* @param routeConfig
|
|
11757
11900
|
* @returns
|
|
11758
11901
|
*/
|
|
11759
|
-
)
|
|
11760
11902
|
}, {
|
|
11761
11903
|
key: "fetchRoute",
|
|
11762
11904
|
value: (function () {
|
|
11763
11905
|
var _fetchRoute = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee10(routeConfig, token) {
|
|
11764
|
-
var options,
|
|
11906
|
+
var options, cleanParams;
|
|
11765
11907
|
return requester_regenerator().w(function (_context10) {
|
|
11766
11908
|
while (1) switch (_context10.n) {
|
|
11767
11909
|
case 0:
|
|
@@ -11772,51 +11914,7 @@ var Requester = /*#__PURE__*/function () {
|
|
|
11772
11914
|
Authorization: "Bearer ".concat(token)
|
|
11773
11915
|
}
|
|
11774
11916
|
};
|
|
11775
|
-
|
|
11776
|
-
fromLatLng: undefined,
|
|
11777
|
-
fromBuilding: undefined,
|
|
11778
|
-
fromFloor: undefined,
|
|
11779
|
-
toLatLng: undefined,
|
|
11780
|
-
toBuilding: undefined,
|
|
11781
|
-
toFloor: undefined,
|
|
11782
|
-
fromPlaceId: undefined,
|
|
11783
|
-
toPlaceId: undefined,
|
|
11784
|
-
travelMode: TransportationMode.walking,
|
|
11785
|
-
reducedMobility: routeConfig.preferAccessibleRoute ? 1 : 0,
|
|
11786
|
-
announceFormat: routeConfig.announceFormat,
|
|
11787
|
-
userBearing: routeConfig.userBearing,
|
|
11788
|
-
lang: this.lang,
|
|
11789
|
-
unitSystem: routeConfig.unitSystem
|
|
11790
|
-
};
|
|
11791
|
-
if ("id" in routeConfig.initialLocation) {
|
|
11792
|
-
params.fromPlaceId = routeConfig.initialLocation.id;
|
|
11793
|
-
if (routeConfig.initialLocation.level !== undefined) {
|
|
11794
|
-
params.fromFloor = routeConfig.initialLocation.level;
|
|
11795
|
-
}
|
|
11796
|
-
} else {
|
|
11797
|
-
_routeConfig$initialL = routeConfig.initialLocation, lat = _routeConfig$initialL.lat, lng = _routeConfig$initialL.lng, floorId = _routeConfig$initialL.floorId, placeId = _routeConfig$initialL.placeId;
|
|
11798
|
-
params.fromLatLng = "".concat(lat, ",").concat(lng);
|
|
11799
|
-
params.fromFloor = floorId;
|
|
11800
|
-
params.fromBuilding = placeId;
|
|
11801
|
-
}
|
|
11802
|
-
if ("id" in routeConfig.finalLocation) {
|
|
11803
|
-
params.toPlaceId = routeConfig.finalLocation.id;
|
|
11804
|
-
if (routeConfig.finalLocation.level !== undefined) {
|
|
11805
|
-
params.toFloor = routeConfig.finalLocation.level;
|
|
11806
|
-
}
|
|
11807
|
-
} else {
|
|
11808
|
-
_routeConfig$finalLoc = routeConfig.finalLocation, _lat = _routeConfig$finalLoc.lat, _lng = _routeConfig$finalLoc.lng, _floorId = _routeConfig$finalLoc.floorId, _placeId = _routeConfig$finalLoc.placeId;
|
|
11809
|
-
params.toLatLng = "".concat(_lat, ",").concat(_lng);
|
|
11810
|
-
params.toFloor = _floorId;
|
|
11811
|
-
params.toBuilding = _placeId;
|
|
11812
|
-
}
|
|
11813
|
-
cleanParams = {};
|
|
11814
|
-
for (key in params) {
|
|
11815
|
-
value = params[key];
|
|
11816
|
-
if (value != null) {
|
|
11817
|
-
cleanParams[key] = value;
|
|
11818
|
-
}
|
|
11819
|
-
}
|
|
11917
|
+
cleanParams = this.buildRouteParams(routeConfig);
|
|
11820
11918
|
return _context10.a(2, this.fetchFromUrl(this.routeBaseUrl + "route", cleanParams, options));
|
|
11821
11919
|
}
|
|
11822
11920
|
}, _callee10, this);
|
|
@@ -11836,7 +11934,7 @@ var Requester = /*#__PURE__*/function () {
|
|
|
11836
11934
|
key: "fetchRouteV2",
|
|
11837
11935
|
value: (function () {
|
|
11838
11936
|
var _fetchRouteV = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee11(routeConfig, token) {
|
|
11839
|
-
var options,
|
|
11937
|
+
var options, cleanParams;
|
|
11840
11938
|
return requester_regenerator().w(function (_context11) {
|
|
11841
11939
|
while (1) switch (_context11.n) {
|
|
11842
11940
|
case 0:
|
|
@@ -11847,51 +11945,7 @@ var Requester = /*#__PURE__*/function () {
|
|
|
11847
11945
|
Authorization: "Bearer ".concat(token)
|
|
11848
11946
|
}
|
|
11849
11947
|
};
|
|
11850
|
-
|
|
11851
|
-
fromLatLng: undefined,
|
|
11852
|
-
fromBuilding: undefined,
|
|
11853
|
-
fromFloor: undefined,
|
|
11854
|
-
toLatLng: undefined,
|
|
11855
|
-
toBuilding: undefined,
|
|
11856
|
-
toFloor: undefined,
|
|
11857
|
-
fromPlaceId: undefined,
|
|
11858
|
-
toPlaceId: undefined,
|
|
11859
|
-
travelMode: TransportationMode.walking,
|
|
11860
|
-
reducedMobility: routeConfig.preferAccessibleRoute ? 1 : 0,
|
|
11861
|
-
announceFormat: routeConfig.announceFormat,
|
|
11862
|
-
userBearing: routeConfig.userBearing,
|
|
11863
|
-
lang: this.lang,
|
|
11864
|
-
unitSystem: routeConfig.unitSystem
|
|
11865
|
-
};
|
|
11866
|
-
if ("id" in routeConfig.initialLocation) {
|
|
11867
|
-
params.fromPlaceId = routeConfig.initialLocation.id;
|
|
11868
|
-
if (routeConfig.initialLocation.level !== undefined) {
|
|
11869
|
-
params.fromFloor = routeConfig.initialLocation.level;
|
|
11870
|
-
}
|
|
11871
|
-
} else {
|
|
11872
|
-
_routeConfig$initialL2 = routeConfig.initialLocation, lat = _routeConfig$initialL2.lat, lng = _routeConfig$initialL2.lng, floorId = _routeConfig$initialL2.floorId, placeId = _routeConfig$initialL2.placeId;
|
|
11873
|
-
params.fromLatLng = "".concat(lat, ",").concat(lng);
|
|
11874
|
-
params.fromFloor = floorId;
|
|
11875
|
-
params.fromBuilding = placeId;
|
|
11876
|
-
}
|
|
11877
|
-
if ("id" in routeConfig.finalLocation) {
|
|
11878
|
-
params.toPlaceId = routeConfig.finalLocation.id;
|
|
11879
|
-
if (routeConfig.finalLocation.level !== undefined) {
|
|
11880
|
-
params.toFloor = routeConfig.finalLocation.level;
|
|
11881
|
-
}
|
|
11882
|
-
} else {
|
|
11883
|
-
_routeConfig$finalLoc2 = routeConfig.finalLocation, _lat2 = _routeConfig$finalLoc2.lat, _lng2 = _routeConfig$finalLoc2.lng, _floorId2 = _routeConfig$finalLoc2.floorId, _placeId2 = _routeConfig$finalLoc2.placeId;
|
|
11884
|
-
params.toLatLng = "".concat(_lat2, ",").concat(_lng2);
|
|
11885
|
-
params.toFloor = _floorId2;
|
|
11886
|
-
params.toBuilding = _placeId2;
|
|
11887
|
-
}
|
|
11888
|
-
cleanParams = {};
|
|
11889
|
-
for (key in params) {
|
|
11890
|
-
value = params[key];
|
|
11891
|
-
if (value != null) {
|
|
11892
|
-
cleanParams[key] = value;
|
|
11893
|
-
}
|
|
11894
|
-
}
|
|
11948
|
+
cleanParams = this.buildRouteParams(routeConfig);
|
|
11895
11949
|
return _context11.a(2, this.fetchFromUrl(this.routeBaseUrl + "v2/route", cleanParams, options));
|
|
11896
11950
|
}
|
|
11897
11951
|
}, _callee11, this);
|
|
@@ -15226,7 +15280,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
15226
15280
|
value: function updateRouteProgress(routeId, position) {
|
|
15227
15281
|
var behindStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
15228
15282
|
type: "Solid",
|
|
15229
|
-
color: "#
|
|
15283
|
+
color: "#276EF1"
|
|
15230
15284
|
};
|
|
15231
15285
|
try {
|
|
15232
15286
|
var behindConfig = new InternalDrawRouteConfiguration({
|
|
@@ -16940,13 +16994,29 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
16940
16994
|
* @group Utils
|
|
16941
16995
|
*/
|
|
16942
16996
|
|
|
16997
|
+
/**
|
|
16998
|
+
* Represents a category containing a image url.
|
|
16999
|
+
* @group Utils
|
|
17000
|
+
*/
|
|
17001
|
+
|
|
16943
17002
|
/**
|
|
16944
17003
|
* Represents a category containing an icon.
|
|
16945
17004
|
* @group Utils
|
|
16946
17005
|
*/
|
|
16947
17006
|
|
|
16948
17007
|
/**
|
|
16949
|
-
*
|
|
17008
|
+
* Holds the basic information of a category: its `id`, `name` and an optional `description`.
|
|
17009
|
+
*
|
|
17010
|
+
* A category may optionally carry a graphical representation, but it is not required.
|
|
17011
|
+
* Depending on the available asset, a `BasicCategory` can be one of:
|
|
17012
|
+
*
|
|
17013
|
+
* - {@link BasicWithLogo} — the category provides a logo image (URL).
|
|
17014
|
+
* - {@link BasicWithIcon} — the category provides a Font Awesome icon name (and optional style).
|
|
17015
|
+
* - {@link BasicWithImageUrl} — the category provides an image URL for its icon.
|
|
17016
|
+
* - {@link Basic} — the category carries no graphical information at all.
|
|
17017
|
+
*
|
|
17018
|
+
* Use the {@link isBasicWithLogo}, {@link isBasicWithIcon} and {@link isBasicWithImageUrl}
|
|
17019
|
+
* type guards to narrow a `BasicCategory` and safely access its graphical asset.
|
|
16950
17020
|
* @group Utils
|
|
16951
17021
|
*/
|
|
16952
17022
|
|
|
@@ -17000,132 +17070,36 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
17000
17070
|
*/
|
|
17001
17071
|
|
|
17002
17072
|
/**
|
|
17003
|
-
* Checks if the category
|
|
17004
|
-
*
|
|
17005
|
-
* @param category
|
|
17006
|
-
* @returns
|
|
17073
|
+
* Checks if the category carries a logo image.
|
|
17074
|
+
* @group Utils
|
|
17075
|
+
* @param category - The category to inspect.
|
|
17076
|
+
* @returns `true` if the category exposes a non-empty `logo` URL, narrowing it to {@link BasicWithLogo}.
|
|
17007
17077
|
*/
|
|
17008
17078
|
function isBasicWithLogo(category) {
|
|
17009
|
-
|
|
17079
|
+
var input = category;
|
|
17080
|
+
return input.logo != null && input.logo !== "";
|
|
17010
17081
|
}
|
|
17011
17082
|
|
|
17012
17083
|
/**
|
|
17013
|
-
* Checks if the category
|
|
17084
|
+
* Checks if the category carries a Font Awesome icon.
|
|
17014
17085
|
* @group Utils
|
|
17015
|
-
* @param category
|
|
17016
|
-
* @returns
|
|
17086
|
+
* @param category - The category to inspect.
|
|
17087
|
+
* @returns `true` if the category exposes a non-empty `icon` name, narrowing it to {@link BasicWithIcon}.
|
|
17017
17088
|
*/
|
|
17018
17089
|
function isBasicWithIcon(category) {
|
|
17019
|
-
|
|
17020
|
-
|
|
17021
|
-
;// ./src/utils/update-css.ts
|
|
17022
|
-
function update_css_slicedToArray(r, e) { return update_css_arrayWithHoles(r) || update_css_iterableToArrayLimit(r, e) || update_css_unsupportedIterableToArray(r, e) || update_css_nonIterableRest(); }
|
|
17023
|
-
function update_css_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17024
|
-
function update_css_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return update_css_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? update_css_arrayLikeToArray(r, a) : void 0; } }
|
|
17025
|
-
function update_css_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
17026
|
-
function update_css_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
17027
|
-
function update_css_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
17028
|
-
/**
|
|
17029
|
-
* Load a CSS customization of a project.
|
|
17030
|
-
*
|
|
17031
|
-
* This function create a new HTML Style Element and add it to the current document.
|
|
17032
|
-
* Also activate the customization adding the first theme name to the body of the document.
|
|
17033
|
-
*
|
|
17034
|
-
* @group Utils
|
|
17035
|
-
* @param data The CSS customization data.
|
|
17036
|
-
*/
|
|
17037
|
-
function loadCustomization(data) {
|
|
17038
|
-
var style = document.createElement("style");
|
|
17039
|
-
style.textContent = "";
|
|
17040
|
-
for (var _i = 0, _Object$entries = Object.entries(data); _i < _Object$entries.length; _i++) {
|
|
17041
|
-
var _Object$entries$_i = update_css_slicedToArray(_Object$entries[_i], 2),
|
|
17042
|
-
themeName = _Object$entries$_i[0],
|
|
17043
|
-
themeData = _Object$entries$_i[1];
|
|
17044
|
-
var cssClass = loadTheme(themeName, themeData);
|
|
17045
|
-
style.textContent += cssClass;
|
|
17046
|
-
}
|
|
17047
|
-
document.head.appendChild(style);
|
|
17048
|
-
var firstThemeName = Object.keys(data).at(0);
|
|
17049
|
-
if (firstThemeName != null) {
|
|
17050
|
-
document.body.classList.add(firstThemeName);
|
|
17051
|
-
}
|
|
17090
|
+
var input = category;
|
|
17091
|
+
return input.icon != null && input.icon !== "";
|
|
17052
17092
|
}
|
|
17053
17093
|
|
|
17054
17094
|
/**
|
|
17055
|
-
*
|
|
17056
|
-
*
|
|
17057
|
-
* @group Utils
|
|
17058
|
-
* @param themeName The name of the Theme.
|
|
17059
|
-
* @param themeData The data of the Theme.
|
|
17060
|
-
* @returns A string with the processed theme to use on a CSS file.
|
|
17061
|
-
*/
|
|
17062
|
-
function loadTheme(themeName, themeData) {
|
|
17063
|
-
var cssClass = ".".concat(themeName, " {\n");
|
|
17064
|
-
var definitions = themeData.definitions;
|
|
17065
|
-
if (definitions != null) {
|
|
17066
|
-
cssClass = loadDefinitions(definitions, cssClass);
|
|
17067
|
-
}
|
|
17068
|
-
for (var _i2 = 0, _Object$entries2 = Object.entries((_themeData$screens = themeData.screens) !== null && _themeData$screens !== void 0 ? _themeData$screens : {}); _i2 < _Object$entries2.length; _i2++) {
|
|
17069
|
-
var _themeData$screens;
|
|
17070
|
-
var _Object$entries2$_i = update_css_slicedToArray(_Object$entries2[_i2], 2),
|
|
17071
|
-
screenName = _Object$entries2$_i[0],
|
|
17072
|
-
screenData = _Object$entries2$_i[1];
|
|
17073
|
-
for (var _i3 = 0, _Object$entries3 = Object.entries(screenData); _i3 < _Object$entries3.length; _i3++) {
|
|
17074
|
-
var _Object$entries3$_i = update_css_slicedToArray(_Object$entries3[_i3], 2),
|
|
17075
|
-
componentName = _Object$entries3$_i[0],
|
|
17076
|
-
componentData = _Object$entries3$_i[1];
|
|
17077
|
-
for (var _i4 = 0, _Object$entries4 = Object.entries(componentData); _i4 < _Object$entries4.length; _i4++) {
|
|
17078
|
-
var _Object$entries4$_i = update_css_slicedToArray(_Object$entries4[_i4], 2),
|
|
17079
|
-
elementName = _Object$entries4$_i[0],
|
|
17080
|
-
elementData = _Object$entries4$_i[1];
|
|
17081
|
-
for (var _i5 = 0, _Object$entries5 = Object.entries(elementData); _i5 < _Object$entries5.length; _i5++) {
|
|
17082
|
-
var _Object$entries5$_i = update_css_slicedToArray(_Object$entries5[_i5], 2),
|
|
17083
|
-
propertyName = _Object$entries5$_i[0],
|
|
17084
|
-
propertyValue = _Object$entries5$_i[1];
|
|
17085
|
-
cssClass += " --".concat(screenName, "-").concat(componentName, "-").concat(elementName, "-").concat(propertyName, ": ").concat(propertyValue, ";\n");
|
|
17086
|
-
}
|
|
17087
|
-
}
|
|
17088
|
-
}
|
|
17089
|
-
}
|
|
17090
|
-
cssClass += "}\n";
|
|
17091
|
-
return cssClass;
|
|
17092
|
-
}
|
|
17093
|
-
/**
|
|
17094
|
-
* Process the definitions of a theme.
|
|
17095
|
-
*
|
|
17095
|
+
* Checks if the category carries an image URL.
|
|
17096
17096
|
* @group Utils
|
|
17097
|
-
* @param
|
|
17098
|
-
* @
|
|
17099
|
-
* @returns The cssClass string mutated with the processed definitions.
|
|
17097
|
+
* @param category - The category to inspect.
|
|
17098
|
+
* @returns `true` if the category exposes a non-empty `imageUrl`, narrowing it to {@link BasicWithImageUrl}.
|
|
17100
17099
|
*/
|
|
17101
|
-
function
|
|
17102
|
-
|
|
17103
|
-
|
|
17104
|
-
var _Object$entries6$_i = update_css_slicedToArray(_Object$entries6[_i6], 2),
|
|
17105
|
-
colorName = _Object$entries6$_i[0],
|
|
17106
|
-
colorData = _Object$entries6$_i[1];
|
|
17107
|
-
for (var _i7 = 0, _Object$entries7 = Object.entries(colorData); _i7 < _Object$entries7.length; _i7++) {
|
|
17108
|
-
var _Object$entries7$_i = update_css_slicedToArray(_Object$entries7[_i7], 2),
|
|
17109
|
-
colorIntensity = _Object$entries7$_i[0],
|
|
17110
|
-
colorValue = _Object$entries7$_i[1];
|
|
17111
|
-
cssClass += " --definitions-colors-".concat(colorName, "-").concat(colorIntensity, ": ").concat(colorValue, ";\n");
|
|
17112
|
-
}
|
|
17113
|
-
}
|
|
17114
|
-
for (var _i8 = 0, _Object$entries8 = Object.entries((_definitions$shadows = definitions.shadows) !== null && _definitions$shadows !== void 0 ? _definitions$shadows : {}); _i8 < _Object$entries8.length; _i8++) {
|
|
17115
|
-
var _definitions$shadows;
|
|
17116
|
-
var _Object$entries8$_i = update_css_slicedToArray(_Object$entries8[_i8], 2),
|
|
17117
|
-
shadowName = _Object$entries8$_i[0],
|
|
17118
|
-
shadowValue = _Object$entries8$_i[1];
|
|
17119
|
-
cssClass += " --definitions-shadows-".concat(shadowName, ": ").concat(shadowValue, ";\n");
|
|
17120
|
-
}
|
|
17121
|
-
for (var _i9 = 0, _Object$entries9 = Object.entries((_definitions$textFont = definitions.textFonts) !== null && _definitions$textFont !== void 0 ? _definitions$textFont : {}); _i9 < _Object$entries9.length; _i9++) {
|
|
17122
|
-
var _definitions$textFont;
|
|
17123
|
-
var _Object$entries9$_i = update_css_slicedToArray(_Object$entries9[_i9], 2),
|
|
17124
|
-
fontName = _Object$entries9$_i[0],
|
|
17125
|
-
fontValue = _Object$entries9$_i[1];
|
|
17126
|
-
cssClass += " --definitions-textFonts-".concat(fontName, ": ").concat(fontValue, ";\n");
|
|
17127
|
-
}
|
|
17128
|
-
return cssClass;
|
|
17100
|
+
function isBasicWithImageUrl(category) {
|
|
17101
|
+
var input = category;
|
|
17102
|
+
return input.imageUrl != null && input.imageUrl !== "";
|
|
17129
17103
|
}
|
|
17130
17104
|
;// ./src/utils/opening-hours-helper.ts
|
|
17131
17105
|
function opening_hours_helper_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = opening_hours_helper_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
@@ -18267,6 +18241,115 @@ function normalizeOrigin(raw) {
|
|
|
18267
18241
|
return null;
|
|
18268
18242
|
}
|
|
18269
18243
|
}
|
|
18244
|
+
;// ./src/utils/update-css.ts
|
|
18245
|
+
function update_css_slicedToArray(r, e) { return update_css_arrayWithHoles(r) || update_css_iterableToArrayLimit(r, e) || update_css_unsupportedIterableToArray(r, e) || update_css_nonIterableRest(); }
|
|
18246
|
+
function update_css_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
18247
|
+
function update_css_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return update_css_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? update_css_arrayLikeToArray(r, a) : void 0; } }
|
|
18248
|
+
function update_css_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
18249
|
+
function update_css_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
18250
|
+
function update_css_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
18251
|
+
/**
|
|
18252
|
+
* Load a CSS customization of a project.
|
|
18253
|
+
*
|
|
18254
|
+
* This function create a new HTML Style Element and add it to the current document.
|
|
18255
|
+
* Also activate the customization adding the first theme name to the body of the document.
|
|
18256
|
+
*
|
|
18257
|
+
* @group Utils
|
|
18258
|
+
* @param data The CSS customization data.
|
|
18259
|
+
*/
|
|
18260
|
+
function loadCustomization(data) {
|
|
18261
|
+
var style = document.createElement("style");
|
|
18262
|
+
style.textContent = "";
|
|
18263
|
+
for (var _i = 0, _Object$entries = Object.entries(data); _i < _Object$entries.length; _i++) {
|
|
18264
|
+
var _Object$entries$_i = update_css_slicedToArray(_Object$entries[_i], 2),
|
|
18265
|
+
themeName = _Object$entries$_i[0],
|
|
18266
|
+
themeData = _Object$entries$_i[1];
|
|
18267
|
+
var cssClass = loadTheme(themeName, themeData);
|
|
18268
|
+
style.textContent += cssClass;
|
|
18269
|
+
}
|
|
18270
|
+
document.head.appendChild(style);
|
|
18271
|
+
var firstThemeName = Object.keys(data).at(0);
|
|
18272
|
+
if (firstThemeName != null) {
|
|
18273
|
+
document.body.classList.add(firstThemeName);
|
|
18274
|
+
}
|
|
18275
|
+
}
|
|
18276
|
+
|
|
18277
|
+
/**
|
|
18278
|
+
* Process a theme.
|
|
18279
|
+
*
|
|
18280
|
+
* @group Utils
|
|
18281
|
+
* @param themeName The name of the Theme.
|
|
18282
|
+
* @param themeData The data of the Theme.
|
|
18283
|
+
* @returns A string with the processed theme to use on a CSS file.
|
|
18284
|
+
*/
|
|
18285
|
+
function loadTheme(themeName, themeData) {
|
|
18286
|
+
var cssClass = ".".concat(themeName, " {\n");
|
|
18287
|
+
var definitions = themeData.definitions;
|
|
18288
|
+
if (definitions != null) {
|
|
18289
|
+
cssClass = loadDefinitions(definitions, cssClass);
|
|
18290
|
+
}
|
|
18291
|
+
for (var _i2 = 0, _Object$entries2 = Object.entries((_themeData$screens = themeData.screens) !== null && _themeData$screens !== void 0 ? _themeData$screens : {}); _i2 < _Object$entries2.length; _i2++) {
|
|
18292
|
+
var _themeData$screens;
|
|
18293
|
+
var _Object$entries2$_i = update_css_slicedToArray(_Object$entries2[_i2], 2),
|
|
18294
|
+
screenName = _Object$entries2$_i[0],
|
|
18295
|
+
screenData = _Object$entries2$_i[1];
|
|
18296
|
+
for (var _i3 = 0, _Object$entries3 = Object.entries(screenData); _i3 < _Object$entries3.length; _i3++) {
|
|
18297
|
+
var _Object$entries3$_i = update_css_slicedToArray(_Object$entries3[_i3], 2),
|
|
18298
|
+
componentName = _Object$entries3$_i[0],
|
|
18299
|
+
componentData = _Object$entries3$_i[1];
|
|
18300
|
+
for (var _i4 = 0, _Object$entries4 = Object.entries(componentData); _i4 < _Object$entries4.length; _i4++) {
|
|
18301
|
+
var _Object$entries4$_i = update_css_slicedToArray(_Object$entries4[_i4], 2),
|
|
18302
|
+
elementName = _Object$entries4$_i[0],
|
|
18303
|
+
elementData = _Object$entries4$_i[1];
|
|
18304
|
+
for (var _i5 = 0, _Object$entries5 = Object.entries(elementData); _i5 < _Object$entries5.length; _i5++) {
|
|
18305
|
+
var _Object$entries5$_i = update_css_slicedToArray(_Object$entries5[_i5], 2),
|
|
18306
|
+
propertyName = _Object$entries5$_i[0],
|
|
18307
|
+
propertyValue = _Object$entries5$_i[1];
|
|
18308
|
+
cssClass += " --".concat(screenName, "-").concat(componentName, "-").concat(elementName, "-").concat(propertyName, ": ").concat(propertyValue, ";\n");
|
|
18309
|
+
}
|
|
18310
|
+
}
|
|
18311
|
+
}
|
|
18312
|
+
}
|
|
18313
|
+
cssClass += "}\n";
|
|
18314
|
+
return cssClass;
|
|
18315
|
+
}
|
|
18316
|
+
/**
|
|
18317
|
+
* Process the definitions of a theme.
|
|
18318
|
+
*
|
|
18319
|
+
* @group Utils
|
|
18320
|
+
* @param definitions The definitions of the theme.
|
|
18321
|
+
* @param cssClass The string object that will contain the processed theme
|
|
18322
|
+
* @returns The cssClass string mutated with the processed definitions.
|
|
18323
|
+
*/
|
|
18324
|
+
function loadDefinitions(definitions, cssClass) {
|
|
18325
|
+
for (var _i6 = 0, _Object$entries6 = Object.entries((_definitions$colors = definitions.colors) !== null && _definitions$colors !== void 0 ? _definitions$colors : {}); _i6 < _Object$entries6.length; _i6++) {
|
|
18326
|
+
var _definitions$colors;
|
|
18327
|
+
var _Object$entries6$_i = update_css_slicedToArray(_Object$entries6[_i6], 2),
|
|
18328
|
+
colorName = _Object$entries6$_i[0],
|
|
18329
|
+
colorData = _Object$entries6$_i[1];
|
|
18330
|
+
for (var _i7 = 0, _Object$entries7 = Object.entries(colorData); _i7 < _Object$entries7.length; _i7++) {
|
|
18331
|
+
var _Object$entries7$_i = update_css_slicedToArray(_Object$entries7[_i7], 2),
|
|
18332
|
+
colorIntensity = _Object$entries7$_i[0],
|
|
18333
|
+
colorValue = _Object$entries7$_i[1];
|
|
18334
|
+
cssClass += " --definitions-colors-".concat(colorName, "-").concat(colorIntensity, ": ").concat(colorValue, ";\n");
|
|
18335
|
+
}
|
|
18336
|
+
}
|
|
18337
|
+
for (var _i8 = 0, _Object$entries8 = Object.entries((_definitions$shadows = definitions.shadows) !== null && _definitions$shadows !== void 0 ? _definitions$shadows : {}); _i8 < _Object$entries8.length; _i8++) {
|
|
18338
|
+
var _definitions$shadows;
|
|
18339
|
+
var _Object$entries8$_i = update_css_slicedToArray(_Object$entries8[_i8], 2),
|
|
18340
|
+
shadowName = _Object$entries8$_i[0],
|
|
18341
|
+
shadowValue = _Object$entries8$_i[1];
|
|
18342
|
+
cssClass += " --definitions-shadows-".concat(shadowName, ": ").concat(shadowValue, ";\n");
|
|
18343
|
+
}
|
|
18344
|
+
for (var _i9 = 0, _Object$entries9 = Object.entries((_definitions$textFont = definitions.textFonts) !== null && _definitions$textFont !== void 0 ? _definitions$textFont : {}); _i9 < _Object$entries9.length; _i9++) {
|
|
18345
|
+
var _definitions$textFont;
|
|
18346
|
+
var _Object$entries9$_i = update_css_slicedToArray(_Object$entries9[_i9], 2),
|
|
18347
|
+
fontName = _Object$entries9$_i[0],
|
|
18348
|
+
fontValue = _Object$entries9$_i[1];
|
|
18349
|
+
cssClass += " --definitions-textFonts-".concat(fontName, ": ").concat(fontValue, ";\n");
|
|
18350
|
+
}
|
|
18351
|
+
return cssClass;
|
|
18352
|
+
}
|
|
18270
18353
|
;// ./src/index.ts
|
|
18271
18354
|
// ─── Domain Ports (interfaces) ───────────────────────────────────────────────
|
|
18272
18355
|
|