azure-maps-control 3.0.0 → 3.0.1

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.
@@ -263,7 +263,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
263
263
  return Url;
264
264
  }());
265
265
 
266
- var version = "3.0.0";
266
+ var version = "3.0.1";
267
267
 
268
268
  /**
269
269
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -359,9 +359,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
359
359
  top = top - parentRect.y;
360
360
  }
361
361
  tooltip.style.transform = "translate(".concat(left, "px, ").concat(top, "px)");
362
+ tooltip.style.display = "block";
363
+ };
364
+ // Accessibility: tooltip should be dismissible with the escape key
365
+ var dismissTooltip = function (event) {
366
+ if ((event.key === "Escape" || event.key === "Esc") && tooltip.style.display === "block") {
367
+ event.stopPropagation();
368
+ tooltip.style.display = "none";
369
+ }
362
370
  };
363
371
  eventTarget.addEventListener("mouseover", positionTooltip);
364
372
  eventTarget.addEventListener("focusin", positionTooltip);
373
+ eventTarget.addEventListener("keydown", dismissTooltip);
365
374
  };
366
375
 
367
376
  var __extends$1e = (window && window.__extends) || (function () {
@@ -5380,9 +5389,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
5380
5389
  if (this.trafficButton) {
5381
5390
  if (this.isActive) {
5382
5391
  this.container.classList.add("in-use");
5392
+ this.trafficButton.setAttribute("aria-description", "Traffic is displayed");
5383
5393
  }
5384
5394
  else {
5385
5395
  this.container.classList.remove("in-use");
5396
+ this.trafficButton.removeAttribute("aria-description");
5386
5397
  }
5387
5398
  this.trafficButton.setAttribute("aria-pressed", this.isActive ? "true" : "false");
5388
5399
  }
@@ -21241,10 +21252,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21241
21252
  /**
21242
21253
  * Disable telemetry collection
21243
21254
  * This option may only be set when initializing the map.
21244
- * default: false
21255
+ * default: false (true for the Azure Government cloud)
21245
21256
  * @default false
21246
21257
  */
21247
- _this.disableTelemetry = false;
21258
+ _this.disableTelemetry = getDomain() === "atlas.azure.us";
21248
21259
  /**
21249
21260
  * Disable telemetry collection
21250
21261
  * This option may only be set when initializing the map.
@@ -21830,6 +21841,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21830
21841
  });
21831
21842
  // Make the deferred layers visible once the map instance is fully loaded.
21832
21843
  _this._progressiveLoadingState.pendingVisibilityChange = function () {
21844
+ var _a;
21833
21845
  // Release the callback.
21834
21846
  _this._progressiveLoadingState.pendingVisibilityChange = null;
21835
21847
  // Bail out the callback once map style has changed.
@@ -21843,6 +21855,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21843
21855
  layer.layout.visibility = 'visible';
21844
21856
  map.setLayoutProperty(layer.id, 'visibility', 'visible');
21845
21857
  });
21858
+ // Reload attribution after the deferred layers are visible.
21859
+ (_a = _this.map.copyrightDelegate) === null || _a === void 0 ? void 0 : _a.reloadAttribution();
21846
21860
  };
21847
21861
  _this.map.events.addOnce('load', _this._progressiveLoadingState.pendingVisibilityChange);
21848
21862
  };
@@ -22347,30 +22361,27 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
22347
22361
  * Fetches a json resource at the specified domain and path.
22348
22362
  */
22349
22363
  StyleManager.prototype._request = function (domain, path, resourceType, customQueryParams) {
22350
- var _a, _b;
22364
+ var _a;
22351
22365
  if (customQueryParams === void 0) { customQueryParams = {}; }
22352
22366
  return __awaiter$1(this, void 0, void 0, function () {
22353
22367
  var requestParams, fetchOptions;
22354
- var _c;
22355
- return __generator$1(this, function (_d) {
22356
- switch (_d.label) {
22368
+ var _b;
22369
+ return __generator$1(this, function (_c) {
22370
+ switch (_c.label) {
22357
22371
  case 0:
22358
22372
  requestParams = {
22359
22373
  url: new Url({
22360
22374
  protocol: "https",
22361
22375
  domain: domain,
22362
22376
  path: path,
22363
- queryParams: __assign$1((_c = {}, _c[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion,
22364
- // Generate a hash code to avoid cache conflict
22365
- // TODO: Remove this once style version 2023-01-01 is publicly available
22366
- _c.hash = StyleManager._hashCode((_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.getToken()), _c), customQueryParams)
22377
+ queryParams: __assign$1((_b = {}, _b[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion, _b), customQueryParams)
22367
22378
  }).toString()
22368
22379
  };
22369
22380
  if (typeof this.serviceOptions.transformRequest === "function" && resourceType) {
22370
22381
  // If a transformRequest(...) was specified use it.
22371
22382
  requestParams = this.serviceOptions.transformRequest(requestParams.url, resourceType);
22372
22383
  }
22373
- (_b = this.map.authentication) === null || _b === void 0 ? void 0 : _b.signRequest(requestParams);
22384
+ (_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(requestParams);
22374
22385
  fetchOptions = {
22375
22386
  method: "GET",
22376
22387
  mode: "cors",
@@ -22387,7 +22398,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
22387
22398
  throw new Error("HTTP ".concat(response.status, ": ").concat(response.statusText, " "));
22388
22399
  }
22389
22400
  })];
22390
- case 1: return [2 /*return*/, _d.sent()];
22401
+ case 1: return [2 /*return*/, _c.sent()];
22391
22402
  }
22392
22403
  });
22393
22404
  });