@opengeoweb/webmap 20.0.0 → 20.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.
Files changed (2) hide show
  1. package/dist/index.esm.js +9 -15
  2. package/package.json +3 -3
package/dist/index.esm.js CHANGED
@@ -714,9 +714,7 @@ var addBoundingBoxForLayer = function addBoundingBoxForLayer(layerObjectFromWMS)
714
714
  * @returns Sorted array.
715
715
  */
716
716
  function sortArrayOfObjectsByKey(array, key) {
717
- var spreadArray = [].concat(array);
718
- // eslint-disable-next-line no-restricted-syntax
719
- return spreadArray.sort(function (arrayA, arrayB) {
717
+ return [].concat(array).sort(function (arrayA, arrayB) {
720
718
  var x = arrayA[key];
721
719
  var y = arrayB[key];
722
720
  if (x < y) {
@@ -747,13 +745,13 @@ var makeNodeLayerFromWMSGetCapabilityLayer = function makeNodeLayerFromWMSGetCap
747
745
  if (nestedLayerPath === void 0) {
748
746
  nestedLayerPath = [];
749
747
  }
750
- var geographicBoundingBox =
751
- // eslint-disable-next-line no-restricted-syntax
752
- nestedLayerPath.reverse().reduce(function (npath, lprops) {
748
+ // geographicBoundingBox and styles resolve nearest-parent-first, so reduce over
749
+ // a reversed copy of nestedLayerPath without mutating the original parameter
750
+ var reversedLayerPath = nestedLayerPath.slice().reverse();
751
+ var geographicBoundingBox = reversedLayerPath.reduce(function (npath, lprops) {
753
752
  return npath || lprops.geographicBoundingBox;
754
753
  }, addBoundingBoxForLayer(layer));
755
- // eslint-disable-next-line no-restricted-syntax
756
- var dimensions = nestedLayerPath.reverse().reduce(function (dims, props) {
754
+ var dimensions = nestedLayerPath.reduce(function (dims, props) {
757
755
  var parentDims = (props.dimensions || []).filter(function (dim) {
758
756
  return !dims.some(function (dimit) {
759
757
  return dimit.name === dim.name;
@@ -761,8 +759,7 @@ var makeNodeLayerFromWMSGetCapabilityLayer = function makeNodeLayerFromWMSGetCap
761
759
  });
762
760
  return [].concat(parentDims, dims);
763
761
  }, addDimensionsForLayer(layer));
764
- // eslint-disable-next-line no-restricted-syntax
765
- var styles = nestedLayerPath.reverse().reduce(function (npath, lprops) {
762
+ var styles = reversedLayerPath.reduce(function (npath, lprops) {
766
763
  if (lprops.styles && Array.isArray(lprops.styles) && lprops.styles.length) {
767
764
  return lprops.styles.concat(npath);
768
765
  }
@@ -1268,8 +1265,7 @@ var WMImageStore = /*#__PURE__*/function () {
1268
1265
  return [];
1269
1266
  }
1270
1267
  // Clean the set, only keep the most recent images
1271
- // eslint-disable-next-line no-restricted-syntax
1272
- var imagesbyGeoRefArraySortByImageLife = imagesbyGeoRefArray.sort(function (imageA, imageB) {
1268
+ var imagesbyGeoRefArraySortByImageLife = imagesbyGeoRefArray.slice().sort(function (imageA, imageB) {
1273
1269
  if (imageA.imageLife > imageB.imageLife) {
1274
1270
  return -1;
1275
1271
  }
@@ -1336,9 +1332,7 @@ var WMImageStore = /*#__PURE__*/function () {
1336
1332
  // We have to reuse an image
1337
1333
  var imagesAsList = Array.from(this.imagesbysrc.values()).filter(function (imageBySrc) {
1338
1334
  return !imageBySrc || !imageBySrc.isLoading() || imageBySrc.hasError();
1339
- });
1340
- // eslint-disable-next-line no-restricted-syntax
1341
- imagesAsList.sort(function (imageA, imageB) {
1335
+ }).sort(function (imageA, imageB) {
1342
1336
  if (imageA.imageLife < imageB.imageLife) {
1343
1337
  return -1;
1344
1338
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/webmap",
3
- "version": "20.0.0",
3
+ "version": "20.0.1",
4
4
  "description": "GeoWeb webmap library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -20,8 +20,8 @@
20
20
  }
21
21
  },
22
22
  "dependencies": {
23
- "@opengeoweb/shared": "20.0.0",
24
- "@opengeoweb/authentication": "20.0.0",
23
+ "@opengeoweb/shared": "20.0.1",
24
+ "@opengeoweb/authentication": "20.0.1",
25
25
  "@tanstack/query-core": "^5.69.2",
26
26
  "lodash": "^4.18.1",
27
27
  "i18next": "^25.0.1",