@nextgis/ngw-leaflet 3.0.0-alpha.20 → 3.0.0-alpha.22

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.
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.20; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.21; author: NextGIS */
2
2
  var domain;
3
3
 
4
4
  // This constructor is used to store event handlers. Instantiating this is
@@ -29,7 +29,7 @@ EventEmitter.init = function() {
29
29
  this.domain = null;
30
30
  if (EventEmitter.usingDomains) {
31
31
  // if there is an active domain, then attach to it.
32
- if (domain.active) ;
32
+ if (domain.active ) ;
33
33
  }
34
34
 
35
35
  if (!this._events || this._events === Object.getPrototypeOf(this)._events) {
@@ -14851,7 +14851,7 @@ function isLngLatBoundsArray(array) {
14851
14851
  }
14852
14852
 
14853
14853
  function round(val, toFixed) {
14854
- const n = 1;
14854
+ const n = toFixed ? Number("1e+" + toFixed) : 1;
14855
14855
  return Math.round((val + Number.EPSILON) * n) / n;
14856
14856
  }
14857
14857
 
@@ -16166,7 +16166,7 @@ var __objRest$8 = (source, exclude) => {
16166
16166
  }
16167
16167
  return target;
16168
16168
  };
16169
- var __publicField$H = (obj, key, value) => __defNormalProp$Y(obj, key + "" , value);
16169
+ var __publicField$H = (obj, key, value) => __defNormalProp$Y(obj, typeof key !== "symbol" ? key + "" : key, value);
16170
16170
  class GeoJsonPaint {
16171
16171
  constructor(layer) {
16172
16172
  __publicField$H(this, "layer");
@@ -17000,7 +17000,7 @@ const imageQueue = new Queue({ concurrency: 6, delay: 200 });
17000
17000
 
17001
17001
  var __defProp$V = Object.defineProperty;
17002
17002
  var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17003
- var __publicField$E = (obj, key, value) => __defNormalProp$V(obj, key + "" , value);
17003
+ var __publicField$E = (obj, key, value) => __defNormalProp$V(obj, typeof key !== "symbol" ? key + "" : key, value);
17004
17004
  class ImageOverlay extends leafletSrcExports.ImageOverlay {
17005
17005
  constructor(imageUrl, bounds, options) {
17006
17006
  super(imageUrl, bounds, options);
@@ -17040,13 +17040,7 @@ class ImageLayer extends leafletSrcExports.Layer {
17040
17040
  constructor(url, options) {
17041
17041
  super(options);
17042
17042
  __publicField$D(this, "defaultWmsParams", {
17043
- service: "WMS",
17044
- request: "GetMap",
17045
- version: "1.1.1",
17046
- layers: "",
17047
- styles: "",
17048
- format: "image/jpeg",
17049
- transparent: false
17043
+ request: "GetMap"
17050
17044
  });
17051
17045
  __publicField$D(this, "options", {
17052
17046
  crs: null,
@@ -17211,9 +17205,7 @@ class ImageLayer extends leafletSrcExports.Layer {
17211
17205
  size.x = Math.ceil(size.x * factor);
17212
17206
  size.y = Math.ceil(size.y * factor);
17213
17207
  }
17214
- const wmsVersion = parseFloat(this.wmsParams.version);
17215
17208
  const crs = this.options.crs || map.options.crs;
17216
- const projectionKey = wmsVersion >= 1.3 ? "crs" : "srs";
17217
17209
  if (crs) {
17218
17210
  const nw = crs.project(bounds.getNorthWest());
17219
17211
  const se = crs.project(bounds.getSouthEast());
@@ -17221,8 +17213,7 @@ class ImageLayer extends leafletSrcExports.Layer {
17221
17213
  width: size.x,
17222
17214
  height: size.y
17223
17215
  };
17224
- params[projectionKey] = crs.code;
17225
- params.bbox = (wmsVersion >= 1.3 && crs === leafletSrcExports.CRS.EPSG4326 ? [se.y, nw.x, nw.y, se.x] : [nw.x, se.y, se.x, nw.y]).join(",");
17216
+ params.bbox = [nw.x, se.y, se.x, nw.y];
17226
17217
  leafletSrcExports.Util.extend(this.wmsParams, params);
17227
17218
  }
17228
17219
  }
@@ -18199,15 +18190,15 @@ var pkg = {
18199
18190
  jsdelivr: "lib/ngw-connector.global.prod.js",
18200
18191
  types: "lib/index.d.ts",
18201
18192
  dependencies: {
18202
- "@nextgis/cache": "^3.0.0-alpha.17",
18203
- "@nextgis/cancelable-promise": "^3.0.0-alpha.17",
18204
- "@nextgis/utils": "^3.0.0-alpha.17",
18193
+ "@nextgis/cache": "3.0.0-alpha.17",
18194
+ "@nextgis/cancelable-promise": "3.0.0-alpha.17",
18195
+ "@nextgis/utils": "3.0.0-alpha.17",
18205
18196
  "@types/events": "^3.0.0",
18206
18197
  events: "*",
18207
18198
  "form-data": "^4.0.0"
18208
18199
  },
18209
18200
  devDependencies: {
18210
- "@nextgis/build-tools": "^3.0.0-alpha.17"
18201
+ "@nextgis/build-tools": "3.0.0-alpha.17"
18211
18202
  },
18212
18203
  scripts: {
18213
18204
  clean: "rimraf ./lib",
@@ -18332,7 +18323,7 @@ function isError(error) {
18332
18323
 
18333
18324
  var __defProp$J = Object.defineProperty;
18334
18325
  var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18335
- var __publicField$w = (obj, key, value) => __defNormalProp$J(obj, key + "" , value);
18326
+ var __publicField$w = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
18336
18327
  class NetworkError extends Error {
18337
18328
  constructor(url) {
18338
18329
  super();
@@ -19588,7 +19579,7 @@ class ResourcesControl {
19588
19579
 
19589
19580
  var __defProp$C = Object.defineProperty;
19590
19581
  var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19591
- var __publicField$r = (obj, key, value) => __defNormalProp$C(obj, key + "" , value);
19582
+ var __publicField$r = (obj, key, value) => __defNormalProp$C(obj, typeof key !== "symbol" ? key + "" : key, value);
19592
19583
  class NgwConnectorExtended extends NgwConnector {
19593
19584
  constructor(options) {
19594
19585
  super(options);
@@ -20843,7 +20834,7 @@ var __spreadValues$k = (a, b) => {
20843
20834
  }
20844
20835
  return a;
20845
20836
  };
20846
- var __publicField$m = (obj, key, value) => __defNormalProp$t(obj, key + "" , value);
20837
+ var __publicField$m = (obj, key, value) => __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
20847
20838
  const _CheckProperty = class _CheckProperty extends BaseProperty {
20848
20839
  constructor(name, item, options) {
20849
20840
  super(name, item, __spreadValues$k(__spreadValues$k({}, _CheckProperty.options), options));
@@ -21053,20 +21044,22 @@ __publicField$l(_ItemProperties, "handlers", {
21053
21044
  let ItemProperties = _ItemProperties;
21054
21045
 
21055
21046
  function treeEvery(item, filter, relation, itemPrepare) {
21056
- return !!treeWrapper(item, filter, relation, treeEvery_);
21047
+ return !!treeWrapper(item, filter, relation, treeEvery_, itemPrepare);
21057
21048
  }
21058
21049
  function treeSome(item, filter, relation, itemPrepare) {
21059
- return !!treeWrapper(item, filter, relation, treeFind_);
21050
+ return !!treeWrapper(item, filter, relation, treeFind_, itemPrepare);
21060
21051
  }
21061
21052
  function treeFind(item, filter, relation, itemPrepare) {
21062
- return treeWrapper(item, filter, relation, treeFind_);
21053
+ return treeWrapper(item, filter, relation, treeFind_, itemPrepare);
21063
21054
  }
21064
21055
  function treeFilter(item, filter, relation, itemPrepare) {
21065
21056
  return treeWrapper(
21066
21057
  item,
21067
21058
  filter,
21068
21059
  relation,
21069
- treeFilter_);
21060
+ treeFilter_,
21061
+ itemPrepare
21062
+ );
21070
21063
  }
21071
21064
  function getChildren(item, relation = "children") {
21072
21065
  let children = [];
@@ -21083,6 +21076,13 @@ function getChildren(item, relation = "children") {
21083
21076
  }
21084
21077
  function treeWrapper(item, filter = (x) => !!x, relation = "children", treeFunction, itemPrepare) {
21085
21078
  const filterFunction = typeof filter === "function" ? filter : (i) => propertiesFilter(i, filter);
21079
+ if (itemPrepare) {
21080
+ return treeFunction(
21081
+ item,
21082
+ (i) => filterFunction(itemPrepare(i)),
21083
+ relation
21084
+ );
21085
+ }
21086
21086
  return treeFunction(item, filterFunction, relation);
21087
21087
  }
21088
21088
  function treeFind_(item, filterFunc = (x) => !!x, relation, _filtered = []) {