@opengeoweb/webmap 19.6.1 → 20.0.0-nightly-20260918

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 +11 -20
  2. package/package.json +35 -34
package/dist/index.esm.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { authFetch } from '@opengeoweb/authentication';
1
2
  import { compact } from 'lodash';
2
3
  import { PROJECTION, dateUtils } from '@opengeoweb/shared';
3
4
  import { QueryClient } from '@tanstack/query-core';
@@ -714,6 +715,7 @@ var addBoundingBoxForLayer = function addBoundingBoxForLayer(layerObjectFromWMS)
714
715
  */
715
716
  function sortArrayOfObjectsByKey(array, key) {
716
717
  var spreadArray = [].concat(array);
718
+ // eslint-disable-next-line no-restricted-syntax
717
719
  return spreadArray.sort(function (arrayA, arrayB) {
718
720
  var x = arrayA[key];
719
721
  var y = arrayB[key];
@@ -745,9 +747,12 @@ var makeNodeLayerFromWMSGetCapabilityLayer = function makeNodeLayerFromWMSGetCap
745
747
  if (nestedLayerPath === void 0) {
746
748
  nestedLayerPath = [];
747
749
  }
748
- var geographicBoundingBox = nestedLayerPath.reverse().reduce(function (npath, lprops) {
750
+ var geographicBoundingBox =
751
+ // eslint-disable-next-line no-restricted-syntax
752
+ nestedLayerPath.reverse().reduce(function (npath, lprops) {
749
753
  return npath || lprops.geographicBoundingBox;
750
754
  }, addBoundingBoxForLayer(layer));
755
+ // eslint-disable-next-line no-restricted-syntax
751
756
  var dimensions = nestedLayerPath.reverse().reduce(function (dims, props) {
752
757
  var parentDims = (props.dimensions || []).filter(function (dim) {
753
758
  return !dims.some(function (dimit) {
@@ -756,6 +761,7 @@ var makeNodeLayerFromWMSGetCapabilityLayer = function makeNodeLayerFromWMSGetCap
756
761
  });
757
762
  return [].concat(parentDims, dims);
758
763
  }, addDimensionsForLayer(layer));
764
+ // eslint-disable-next-line no-restricted-syntax
759
765
  var styles = nestedLayerPath.reverse().reduce(function (npath, lprops) {
760
766
  if (lprops.styles && Array.isArray(lprops.styles) && lprops.styles.length) {
761
767
  return lprops.styles.concat(npath);
@@ -1061,7 +1067,7 @@ var WMImage = /*#__PURE__*/function () {
1061
1067
  cache: 'default'
1062
1068
  };
1063
1069
  var request = new Request(url);
1064
- fetch(request, options).then(function (response) {
1070
+ authFetch(request, options).then(function (response) {
1065
1071
  _this3._setMaxAgeFromResponseHeaders(response);
1066
1072
  response.blob().then(function (imageBlob) {
1067
1073
  _this3.el.src = URL.createObjectURL(imageBlob);
@@ -1262,6 +1268,7 @@ var WMImageStore = /*#__PURE__*/function () {
1262
1268
  return [];
1263
1269
  }
1264
1270
  // Clean the set, only keep the most recent images
1271
+ // eslint-disable-next-line no-restricted-syntax
1265
1272
  var imagesbyGeoRefArraySortByImageLife = imagesbyGeoRefArray.sort(function (imageA, imageB) {
1266
1273
  if (imageA.imageLife > imageB.imageLife) {
1267
1274
  return -1;
@@ -1330,6 +1337,7 @@ var WMImageStore = /*#__PURE__*/function () {
1330
1337
  var imagesAsList = Array.from(this.imagesbysrc.values()).filter(function (imageBySrc) {
1331
1338
  return !imageBySrc || !imageBySrc.isLoading() || imageBySrc.hasError();
1332
1339
  });
1340
+ // eslint-disable-next-line no-restricted-syntax
1333
1341
  imagesAsList.sort(function (imageA, imageB) {
1334
1342
  if (imageA.imageLife < imageB.imageLife) {
1335
1343
  return -1;
@@ -2388,23 +2396,6 @@ function init(){
2388
2396
  }
2389
2397
  */
2390
2398
 
2391
- /* *
2392
- * Licensed under the Apache License, Version 2.0 (the "License");
2393
- * you may not use this file except in compliance with the License.
2394
- * You may obtain a copy of the License at
2395
- *
2396
- * http://www.apache.org/licenses/LICENSE-2.0
2397
- *
2398
- * Unless required by applicable law or agreed to in writing, software
2399
- * distributed under the License is distributed on an "AS IS" BASIS,
2400
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2401
- * See the License for the specific language governing permissions and
2402
- * limitations under the License.
2403
- *
2404
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2405
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
2406
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2407
- * */
2408
2399
  var WMXMLStringToXMLDocument = function WMXMLStringToXMLDocument(xmlString) {
2409
2400
  var xmlData = new DOMParser().parseFromString(xmlString, 'text/xml');
2410
2401
  if (xmlData.documentElement.nodeName === 'parsererror') {
@@ -2477,7 +2468,7 @@ var WMXMLParser = function WMXMLParser(url, headers) {
2477
2468
  fetchHeaders.append(header.name, header.value);
2478
2469
  }
2479
2470
  }
2480
- fetch(url, {
2471
+ authFetch(url, {
2481
2472
  method: 'GET',
2482
2473
  mode: 'cors',
2483
2474
  cache: 'no-cache',
package/package.json CHANGED
@@ -1,35 +1,36 @@
1
1
  {
2
- "name": "@opengeoweb/webmap",
3
- "version": "19.6.1",
4
- "description": "GeoWeb webmap library for the opengeoweb project",
5
- "license": "Apache-2.0",
6
- "repository": {
7
- "type": "git",
8
- "url": "git@gitlab.com:opengeoweb/opengeoweb.git"
9
- },
10
- "main": "./dist/index.esm.js",
11
- "module": "./dist/index.esm.js",
12
- "types": "./dist/index.d.ts",
13
- "exports": {
14
- "./package.json": "./package.json",
15
- ".": {
16
- "@opengeoweb/source": "./src/index.ts",
17
- "types": "./dist/index.d.ts",
18
- "import": "./dist/index.esm.js",
19
- "default": "./dist/index.esm.js"
20
- }
21
- },
22
- "dependencies": {
23
- "@opengeoweb/shared": "*",
24
- "@tanstack/query-core": "^5.69.2",
25
- "lodash": "^4.18.1",
26
- "i18next": "^25.0.1",
27
- "@types/geojson": "^7946.0.14"
28
- },
29
- "files": [
30
- "dist",
31
- "!dist/package.json",
32
- "README.md",
33
- "package.json"
34
- ]
35
- }
2
+ "name": "@opengeoweb/webmap",
3
+ "version": "20.0.0-nightly-20260918",
4
+ "description": "GeoWeb webmap library for the opengeoweb project",
5
+ "license": "Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git@gitlab.com:opengeoweb/opengeoweb.git"
9
+ },
10
+ "main": "./dist/index.esm.js",
11
+ "module": "./dist/index.esm.js",
12
+ "types": "./dist/index.d.ts",
13
+ "exports": {
14
+ "./package.json": "./package.json",
15
+ ".": {
16
+ "@opengeoweb/source": "./src/index.ts",
17
+ "types": "./dist/index.d.ts",
18
+ "import": "./dist/index.esm.js",
19
+ "default": "./dist/index.esm.js"
20
+ }
21
+ },
22
+ "dependencies": {
23
+ "@opengeoweb/shared": "20.0.0-nightly-20260918",
24
+ "@opengeoweb/authentication": "20.0.0-nightly-20260918",
25
+ "@tanstack/query-core": "^5.69.2",
26
+ "lodash": "^4.18.1",
27
+ "i18next": "^25.0.1",
28
+ "@types/geojson": "^7946.0.14"
29
+ },
30
+ "files": [
31
+ "dist",
32
+ "!dist/package.json",
33
+ "README.md",
34
+ "package.json"
35
+ ]
36
+ }