azure-maps-control 3.7.1 → 3.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -51797,7 +51797,7 @@ uniform ${precision} ${type} u_${name};
51797
51797
  * Contains real information about the available/supported locales.
51798
51798
  */
51799
51799
  var localeIndex = {
51800
- localizationsPath: "locs/mapcontrol/2019-3-12",
51800
+ localizationsPath: "locs/mapcontrol/2025-11-05",
51801
51801
  sensitiveUserRegions: ["il", "kr", "pk", "in", "cn", "ar", "bh", "eg", "jo", "sa", "kw", "om", "qa", "ma", "ae"],
51802
51802
  locales: {
51803
51803
  defaultLanguage: {
@@ -51813,37 +51813,49 @@ uniform ${precision} ${type} u_${name};
51813
51813
  ar: {
51814
51814
  defaultRegion: {
51815
51815
  code: "ar",
51816
- strings: "ar-sa/resource.json"
51816
+ strings: "ar-SA/resource.json"
51817
51817
  }
51818
51818
  },
51819
51819
  bg: {
51820
51820
  defaultRegion: {
51821
51821
  code: "bg-BG",
51822
- strings: "bg-bg/resource.json"
51822
+ strings: "bg-BG/resource.json"
51823
+ }
51824
+ },
51825
+ ca: {
51826
+ defaultRegion: {
51827
+ code: "ca-ES",
51828
+ strings: "ca-ES/resource.json"
51823
51829
  }
51824
51830
  },
51825
51831
  cs: {
51826
51832
  defaultRegion: {
51827
51833
  code: "cs-CZ",
51828
- strings: "cs-cz/resource.json"
51834
+ strings: "cs-CZ/resource.json"
51829
51835
  }
51830
51836
  },
51831
51837
  da: {
51832
51838
  defaultRegion: {
51833
51839
  code: "da-DK",
51834
- strings: "da-dk/resource.json"
51840
+ strings: "da-DK/resource.json"
51835
51841
  }
51836
51842
  },
51837
51843
  de: {
51838
51844
  defaultRegion: {
51839
51845
  code: "de-DE",
51840
- strings: "de-de/resource.json"
51846
+ strings: "de-DE/resource.json"
51847
+ }
51848
+ },
51849
+ et: {
51850
+ defaultRegion: {
51851
+ code: "et-EE",
51852
+ strings: "et-EE/resource.json"
51841
51853
  }
51842
51854
  },
51843
51855
  el: {
51844
51856
  defaultRegion: {
51845
51857
  code: "el-GR",
51846
- strings: "el-gr/resource.json"
51858
+ strings: "el-GR/resource.json"
51847
51859
  }
51848
51860
  },
51849
51861
  en: {
@@ -51871,123 +51883,199 @@ uniform ${precision} ${type} u_${name};
51871
51883
  es: {
51872
51884
  defaultRegion: {
51873
51885
  code: "es-ES",
51874
- strings: "es-es/resource.json"
51886
+ strings: "es-ES/resource.json"
51875
51887
  },
51876
51888
  mx: {
51877
51889
  code: "es-MX",
51878
- strings: "es-mx/resource.json"
51890
+ strings: "es-MX/resource.json"
51891
+ }
51892
+ },
51893
+ eu: {
51894
+ defaultRegion: {
51895
+ code: "eu-ES",
51896
+ strings: "eu-ES/resource.json"
51879
51897
  }
51880
51898
  },
51881
51899
  fi: {
51882
51900
  defaultRegion: {
51883
51901
  code: "fi-FI",
51884
- strings: "fi-fi/resource.json"
51902
+ strings: "fi-FI/resource.json"
51885
51903
  }
51886
51904
  },
51887
51905
  fr: {
51888
51906
  defaultRegion: {
51889
51907
  code: "fr-FR",
51890
- strings: "fr-fr/resource.json"
51908
+ strings: "fr-FR/resource.json"
51909
+ }
51910
+ },
51911
+ gl: {
51912
+ defaultRegion: {
51913
+ code: "gl-ES",
51914
+ strings: "gl-ES/resource.json"
51915
+ }
51916
+ },
51917
+ he: {
51918
+ defaultRegion: {
51919
+ code: "he-IL",
51920
+ strings: "he-IL/resource.json"
51921
+ }
51922
+ },
51923
+ hi: {
51924
+ defaultRegion: {
51925
+ code: "hi-IN",
51926
+ strings: "hi-IN/resource.json"
51927
+ }
51928
+ },
51929
+ hr: {
51930
+ defaultRegion: {
51931
+ code: "hr-HR",
51932
+ strings: "hr-HR/resource.json"
51891
51933
  }
51892
51934
  },
51893
51935
  hu: {
51894
51936
  defaultRegion: {
51895
51937
  code: "hu-HU",
51896
- strings: "hu-hu/resource.json"
51938
+ strings: "hu-HU/resource.json"
51897
51939
  }
51898
51940
  },
51899
51941
  id: {
51900
51942
  defaultRegion: {
51901
51943
  code: "id-ID",
51902
- strings: "id-id/resource.json"
51944
+ strings: "id-ID/resource.json"
51903
51945
  }
51904
51946
  },
51905
51947
  it: {
51906
51948
  defaultRegion: {
51907
51949
  code: "it-IT",
51908
- strings: "it-it/resource.json"
51950
+ strings: "it-IT/resource.json"
51951
+ }
51952
+ },
51953
+ ja: {
51954
+ defaultRegion: {
51955
+ code: "ja-JP",
51956
+ strings: "ja-JP/resource.json"
51957
+ }
51958
+ },
51959
+ kk: {
51960
+ defaultRegion: {
51961
+ code: "kk-KZ",
51962
+ strings: "kk-KZ/resource.json"
51909
51963
  }
51910
51964
  },
51911
51965
  ko: {
51912
51966
  defaultRegion: {
51913
51967
  code: "ko-KR",
51914
- strings: "ko-kr/resource.json"
51968
+ strings: "ko-KR/resource.json"
51915
51969
  }
51916
51970
  },
51917
51971
  lt: {
51918
51972
  defaultRegion: {
51919
51973
  code: "lt-LT",
51920
- strings: "lt-lt/resource.json"
51974
+ strings: "lt-LT/resource.json"
51975
+ }
51976
+ },
51977
+ lv: {
51978
+ defaultRegion: {
51979
+ code: "lv-LV",
51980
+ strings: "lv-LV/resource.json"
51921
51981
  }
51922
51982
  },
51923
51983
  ms: {
51924
51984
  defaultRegion: {
51925
51985
  code: "ms-MY",
51926
- strings: "ms-my/resource.json"
51986
+ strings: "ms-MY/resource.json"
51927
51987
  }
51928
51988
  },
51929
51989
  nb: {
51930
51990
  defaultRegion: {
51931
51991
  code: "nb-NO",
51932
- strings: "nb-no/resource.json"
51992
+ strings: "nb-NO/resource.json"
51933
51993
  }
51934
51994
  },
51935
51995
  nl: {
51936
51996
  defaultRegion: {
51937
51997
  code: "nl-NL",
51938
- strings: "nl-nl/resource.json"
51998
+ strings: "nl-NL/resource.json"
51939
51999
  }
51940
52000
  },
51941
52001
  pl: {
51942
52002
  defaultRegion: {
51943
52003
  code: "pl-PL",
51944
- strings: "pl-pl/resource.json"
52004
+ strings: "pl-PL/resource.json"
51945
52005
  }
51946
52006
  },
51947
52007
  pt: {
51948
52008
  defaultRegion: {
51949
52009
  code: "pt-PT",
51950
- strings: "pt-pt/resource.json"
52010
+ strings: "pt-PT/resource.json"
51951
52011
  },
51952
52012
  br: {
51953
52013
  code: "pt-BR",
51954
- strings: "pt-br/resource.json"
52014
+ strings: "pt-BR/resource.json"
52015
+ }
52016
+ },
52017
+ ro: {
52018
+ defaultRegion: {
52019
+ code: "ro-RO",
52020
+ strings: "ro-RO/resource.json"
51955
52021
  }
51956
52022
  },
51957
52023
  ru: {
51958
52024
  defaultRegion: {
51959
52025
  code: "ru-RU",
51960
- strings: "ru-ru/resource.json"
52026
+ strings: "ru-RU/resource.json"
51961
52027
  }
51962
52028
  },
51963
52029
  sk: {
51964
52030
  defaultRegion: {
51965
52031
  code: "sk-SK",
51966
- strings: "sk-sk/resource.json"
52032
+ strings: "sk-SK/resource.json"
51967
52033
  }
51968
52034
  },
51969
52035
  sl: {
51970
52036
  defaultRegion: {
51971
52037
  code: "sl-SL",
51972
- strings: "sl-sl/resource.json"
52038
+ strings: "sl/resource.json"
52039
+ }
52040
+ },
52041
+ sr: {
52042
+ defaultRegion: {
52043
+ code: "sr-CYRL-RS",
52044
+ strings: "sr-CYRL-RS/resource.json"
52045
+ },
52046
+ latn: {
52047
+ code: "sr-LATN-RS",
52048
+ strings: "sr-LATN-RS/resource.json"
51973
52049
  }
51974
52050
  },
51975
52051
  sv: {
51976
52052
  defaultRegion: {
51977
52053
  code: "sv-SE",
51978
- strings: "sv-se/resource.json"
52054
+ strings: "sv-SE/resource.json"
51979
52055
  }
51980
52056
  },
51981
52057
  th: {
51982
52058
  defaultRegion: {
51983
52059
  code: "th-TH",
51984
- strings: "th-th/resource.json"
52060
+ strings: "th-TH/resource.json"
51985
52061
  }
51986
52062
  },
51987
52063
  tr: {
51988
52064
  defaultRegion: {
51989
52065
  code: "tr-TR",
51990
- strings: "tr-tr/resource.json"
52066
+ strings: "tr-TR/resource.json"
52067
+ }
52068
+ },
52069
+ uk: {
52070
+ defaultRegion: {
52071
+ code: "uk-UA",
52072
+ strings: "uk-UA/resource.json"
52073
+ }
52074
+ },
52075
+ vi: {
52076
+ defaultRegion: {
52077
+ code: "vi-VN",
52078
+ strings: "vi-VN/resource.json"
51991
52079
  }
51992
52080
  },
51993
52081
  zh: {
@@ -52016,7 +52104,7 @@ uniform ${precision} ${type} u_${name};
52016
52104
  },
52017
52105
  tw: {
52018
52106
  code: "zh-Hant-TW",
52019
- strings: "zh-tw/resource.json"
52107
+ strings: "zh-TW/resource.json"
52020
52108
  }
52021
52109
  }
52022
52110
  }
@@ -52079,10 +52167,6 @@ uniform ${precision} ${type} u_${name};
52079
52167
  * A localized version of `"Detour"`.
52080
52168
  */
52081
52169
  this.Detour = "Detour";
52082
- /**
52083
- * A localized version of `"Dummy"`.
52084
- */
52085
- this.Dummy = "Dummy";
52086
52170
  }
52087
52171
  return LocalizedStrings;
52088
52172
  }());
@@ -52225,7 +52309,7 @@ uniform ${precision} ${type} u_${name};
52225
52309
  return UserAgent;
52226
52310
  }());
52227
52311
 
52228
- var version = "3.7.1";
52312
+ var version = "3.7.4";
52229
52313
 
52230
52314
  /**
52231
52315
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -53182,6 +53266,7 @@ uniform ${precision} ${type} u_${name};
53182
53266
  }
53183
53267
  };
53184
53268
  eventTarget.addEventListener("mouseover", positionTooltip);
53269
+ eventTarget.addEventListener("touchend", positionTooltip);
53185
53270
  eventTarget.addEventListener("focusin", positionTooltip);
53186
53271
  eventTarget.addEventListener("keydown", dismissTooltip);
53187
53272
  };
@@ -57772,12 +57857,43 @@ uniform ${precision} ${type} u_${name};
57772
57857
  if (expanded) {
57773
57858
  container.classList.add(StyleControl.Css.inUse);
57774
57859
  styleOpsGrid.classList.remove("hidden-accessible-element");
57860
+ // Dynamically cap max-height to fit within the map container
57861
+ if (_this.options.layout === "list") {
57862
+ var mapContainer = _this.map.getMapContainer();
57863
+ var mapRect = mapContainer.getBoundingClientRect();
57864
+ var btnRect = currStyleButton.getBoundingClientRect();
57865
+ var btnOffsetTop = Math.max(0, btnRect.top - mapRect.top);
57866
+ var btnHeight = currStyleButton.offsetHeight ||
57867
+ btnRect.height ||
57868
+ 0;
57869
+ var mapHeight = mapContainer.clientHeight;
57870
+ var padding = 8;
57871
+ var isBottomPosition = (options === null || options === void 0 ? void 0 : options.position) === exports.ControlPosition.BottomLeft ||
57872
+ (options === null || options === void 0 ? void 0 : options.position) === exports.ControlPosition.BottomRight;
57873
+ var availableHeight = isBottomPosition
57874
+ ? Math.max(0, btnOffsetTop - padding) // space above button
57875
+ : Math.max(0, mapHeight - (btnOffsetTop + btnHeight + padding)); // space below button
57876
+ var maxHeight = Math.max(100, Math.floor(availableHeight));
57877
+ styleOpsGrid.style.maxHeight = "".concat(maxHeight, "px");
57878
+ }
57775
57879
  }
57776
57880
  else {
57777
57881
  container.classList.remove(StyleControl.Css.inUse);
57778
57882
  styleOpsGrid.classList.add("hidden-accessible-element");
57779
57883
  }
57780
57884
  };
57885
+ var onStyleButtonClick = function () {
57886
+ if (container.classList.contains(StyleControl.Css.inUse)) {
57887
+ expandGrid(false);
57888
+ }
57889
+ else {
57890
+ expandGrid(true);
57891
+ // clicking on a reveal button should move the focus to the first styleOpsGrid button
57892
+ if (styleOpsGrid.firstElementChild) {
57893
+ styleOpsGrid.firstElementChild.focus();
57894
+ }
57895
+ }
57896
+ };
57781
57897
  styleOpsGrid.classList.add(options ? options.position || 'top-right' : 'top-right');
57782
57898
  container.addEventListener("mouseover", function () {
57783
57899
  _this.hasMouse = true;
@@ -57817,17 +57933,12 @@ uniform ${precision} ${type} u_${name};
57817
57933
  }
57818
57934
  }
57819
57935
  });
57936
+ currStyleButton.addEventListener("touchend", function (event) {
57937
+ event.preventDefault();
57938
+ onStyleButtonClick();
57939
+ });
57820
57940
  currStyleButton.addEventListener("click", function (event) {
57821
- if (container.classList.contains(StyleControl.Css.inUse)) {
57822
- expandGrid(false);
57823
- }
57824
- else {
57825
- expandGrid(true);
57826
- // clicking on a reveal button should move the focus to the first styleOpsGrid button
57827
- if (styleOpsGrid.firstElementChild) {
57828
- styleOpsGrid.firstElementChild.focus();
57829
- }
57830
- }
57941
+ onStyleButtonClick();
57831
57942
  });
57832
57943
  if (options && StyleControl.InvertOrderPositions.includes(options.position)) {
57833
57944
  container.appendChild(styleOpsGrid);
@@ -57918,7 +58029,7 @@ uniform ${precision} ${type} u_${name};
57918
58029
  return _this.thumbnailCache.blob.get(response.url);
57919
58030
  }
57920
58031
  else {
57921
- // we need the response.clone() to allow reading over body multiple times since response objects are cached
58032
+ // we need the response.clone() to allow reading over body multiple times since response objects are cached
57922
58033
  // and can be reused across multiple invocations
57923
58034
  var blobPromise = response.clone().blob();
57924
58035
  _this.thumbnailCache.blob.set(response.url, blobPromise);
@@ -57972,7 +58083,7 @@ uniform ${precision} ${type} u_${name};
57972
58083
  };
57973
58084
  StyleControl.prototype.buildCurrStyleBtn = function () {
57974
58085
  var selectCurrButton = document.createElement("button");
57975
- if (this.options.layout == 'icons') {
58086
+ if (this.options.layout === "icons") {
57976
58087
  selectCurrButton.classList.add(StyleControl.Css.button);
57977
58088
  }
57978
58089
  else {
@@ -57991,11 +58102,9 @@ uniform ${precision} ${type} u_${name};
57991
58102
  StyleControl.prototype.buildStyleOpsGrid = function () {
57992
58103
  var _this = this;
57993
58104
  var styleOpsGrid = document.createElement("div");
57994
- styleOpsGrid.classList.add(StyleControl.Css.styleOptions);
57995
- if (this.options.layout === 'icons') {
57996
- styleOpsGrid.classList.add(this.options.layout);
57997
- }
57998
- else {
58105
+ var layoutClass = this.options.layout === "icons" ? "icons" : "list";
58106
+ styleOpsGrid.classList.add(StyleControl.Css.styleOptions, layoutClass);
58107
+ if (layoutClass === "list") {
57999
58108
  styleOpsGrid.classList.add(StyleControl.Css.dropdown);
58000
58109
  }
58001
58110
  styleOpsGrid.setAttribute("aria-label", "Style Options");
@@ -74075,8 +74184,12 @@ uniform ${precision} ${type} u_${name};
74075
74184
  */
74076
74185
  StyleManager.prototype._transformStyleRequest = function (url, params) {
74077
74186
  var _a;
74187
+ var domain = (Url.protoRegEx.test(this.serviceOptions.domain) ?
74188
+ this.serviceOptions.domain.slice(this.serviceOptions.domain.indexOf("\/\/") + 2) :
74189
+ this.serviceOptions.domain)
74190
+ .replace(/\/+$/, "");
74078
74191
  if (url.includes(constants.domainPlaceHolder)) {
74079
- params.url = params.url.replace(constants.domainPlaceHolder, this.serviceOptions.domain);
74192
+ params.url = params.url.replace(constants.domainPlaceHolder, domain);
74080
74193
  }
74081
74194
  if (url.includes(constants.stylePathHolder)) {
74082
74195
  params.url = params.url.replace(constants.stylePathHolder, constants.stylePath);
@@ -74084,7 +74197,7 @@ uniform ${precision} ${type} u_${name};
74084
74197
  if (url.includes(constants.styleResourcePlaceholder)) {
74085
74198
  params.url = params.url.replace(constants.styleResourcePlaceholder, constants.styleResourcePath);
74086
74199
  }
74087
- if (params.url.toLocaleLowerCase().includes(this.serviceOptions.domain.toLocaleLowerCase()) ||
74200
+ if (params.url.toLocaleLowerCase().includes(domain.toLocaleLowerCase()) ||
74088
74201
  params.url.toLocaleLowerCase().includes(this.serviceOptions.staticAssetsDomain.toLocaleLowerCase())) {
74089
74202
  // Only add API version param for Azure maps domain requests
74090
74203
  var targetUrl = new URL(params.url);
@@ -75520,9 +75633,10 @@ uniform ${precision} ${type} u_${name};
75520
75633
  Map.prototype._rebuildStyle = function (diff) {
75521
75634
  if (diff === void 0) { diff = true; }
75522
75635
  return __awaiter(this, void 0, void 0, function () {
75636
+ var _this = this;
75523
75637
  return __generator(this, function (_a) {
75524
75638
  this.styles.setStyle(this.styleOptions, diff);
75525
- this.imageSprite._restoreImages();
75639
+ this.events.addOnce("stylechanged", function () { return _this.imageSprite._restoreImages(); });
75526
75640
  return [2 /*return*/];
75527
75641
  });
75528
75642
  });