azure-maps-control 2.1.13 → 2.1.16

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/atlas.js CHANGED
@@ -43487,7 +43487,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43487
43487
  return Url;
43488
43488
  }());
43489
43489
 
43490
- var version = "2.1.13";
43490
+ var version = "2.1.16";
43491
43491
 
43492
43492
  /**
43493
43493
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -47909,6 +47909,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
47909
47909
  return this.container;
47910
47910
  };
47911
47911
  TrafficControl.prototype.onRemove = function () {
47912
+ _super.prototype.onRemove.call(this);
47912
47913
  this.map = null;
47913
47914
  };
47914
47915
  /**
@@ -78594,6 +78595,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
78594
78595
  var HijackablePromise = /** @class */ (function () {
78595
78596
  function HijackablePromise(origin) {
78596
78597
  var _this = this;
78598
+ this.isHijacked = function () { return _this._hijackedToResolve !== undefined || _this._hijackedToReject !== undefined; };
78597
78599
  this.isResolved = function () { return _this._hijackedToResolve !== undefined || _this._toResolve !== undefined; };
78598
78600
  this.isRejected = function () { return _this._hijackedToReject !== undefined || _this._toReject !== undefined; };
78599
78601
  this.resultIfResolved = function () { return _this._hijackedToResolve || _this._toResolve; };
@@ -78607,39 +78609,28 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
78607
78609
  }
78608
78610
  else {
78609
78611
  // we retain the origin, and check if stays the same as resolved
78610
- // to make sure we do nothing if the promise was switched
78611
78612
  var retainedInvocator_1 = _this.origin;
78612
78613
  _this.origin.then(function (result) {
78613
- // origin was switched
78614
- if (retainedInvocator_1 !== _this.origin) {
78614
+ if (_this.isHijacked()) {
78615
78615
  return;
78616
78616
  }
78617
- if (!_this._hijackedToResolve) {
78617
+ // origin was switched during invocation, discard the result and follow the chain
78618
+ if (retainedInvocator_1 !== _this.origin) {
78619
+ _this._thenResolver(resolve, reject);
78620
+ }
78621
+ else {
78618
78622
  _this._toResolve = result;
78619
78623
  resolve(result);
78620
78624
  }
78621
78625
  }).catch(function (error) {
78622
- if (!_this._hijackedToReject) {
78623
- _this._toReject = error;
78624
- reject(error);
78625
- }
78626
- });
78627
- }
78628
- };
78629
- this._catchResolver = function (reject) {
78630
- if (_this._hijackedToReject) {
78631
- reject(_this._hijackedToReject);
78632
- }
78633
- else {
78634
- // we retain the origin, and check if stays the same as resolved
78635
- // to make sure we do nothing if the promise was switched
78636
- var retainedInvocator_2 = _this.origin;
78637
- _this.origin.catch(function (error) {
78638
- // origin was switched
78639
- if (retainedInvocator_2 !== _this.origin) {
78626
+ if (_this.isHijacked()) {
78640
78627
  return;
78641
78628
  }
78642
- if (!_this._hijackedToReject) {
78629
+ // origin was switched during invocation, discard the result and follow the chain
78630
+ if (retainedInvocator_1 !== _this.origin) {
78631
+ _this._thenResolver(resolve, reject);
78632
+ }
78633
+ else {
78643
78634
  _this._toReject = error;
78644
78635
  reject(error);
78645
78636
  }
@@ -78666,14 +78657,20 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
78666
78657
  // tslint:disable-next-line: no-reserved-keywords
78667
78658
  HijackablePromise.prototype.catch = function (onrejected) {
78668
78659
  var _this = this;
78669
- return new Promise(function (_, reject) {
78660
+ return new Promise(function (resolve, reject) {
78661
+ _this._resolve = resolve;
78670
78662
  _this._reject = reject;
78671
- _this._catchResolver(reject);
78672
- }).then(onrejected);
78663
+ _this._thenResolver(resolve, reject);
78664
+ }).catch(onrejected);
78673
78665
  };
78674
78666
  // tslint:disable-next-line: no-reserved-keywords
78675
78667
  HijackablePromise.prototype.finally = function (onfinally) {
78676
- return this.origin.finally(onfinally);
78668
+ var _this = this;
78669
+ return new Promise(function (resolve, reject) {
78670
+ _this._resolve = resolve;
78671
+ _this._reject = reject;
78672
+ _this._thenResolver(resolve, reject);
78673
+ }).finally(onfinally);
78677
78674
  };
78678
78675
  HijackablePromise.prototype.hijackAndResolve = function (value) {
78679
78676
  this._hijackedToResolve = value;
@@ -78688,16 +78685,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
78688
78685
  }
78689
78686
  };
78690
78687
  HijackablePromise.prototype.switchWith = function (promise) {
78691
- // switching the origin will discard the original in-progress promise result
78688
+ // switching the origin will discard the original in-progress promise result, as well any resolved non-hijacked state
78692
78689
  this.origin = promise;
78693
- // then has been invoked on this promise
78694
- if (this._resolve && this._reject) {
78695
- this._thenResolver(this._resolve, this._reject);
78696
- // catch has been invoked on this promise
78697
- }
78698
- else if (this._reject) {
78699
- this._catchResolver(this._reject);
78700
- }
78690
+ this._toResolve = undefined;
78691
+ this._toReject = undefined;
78701
78692
  };
78702
78693
  return HijackablePromise;
78703
78694
  }());
@@ -80342,7 +80333,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
80342
80333
  requestParams.url = requestParams.url.replace(constants.domainPlaceHolder, this.serviceOptions.domain);
80343
80334
  }
80344
80335
  }
80345
- (_a = this.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(requestParams);
80336
+ if (requestParams.url.toLocaleLowerCase().includes(this.serviceOptions.domain.toLocaleLowerCase()) ||
80337
+ requestParams.url.toLocaleLowerCase().includes(this.serviceOptions.staticAssetsDomain.toLocaleLowerCase())) {
80338
+ (_a = this.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(requestParams);
80339
+ }
80346
80340
  if (url.includes(constants.languagePlaceHolder)) {
80347
80341
  requestParams.url = requestParams.url.replace(constants.languagePlaceHolder, this.styleOptions.language);
80348
80342
  }