@nextgis/ngw-leaflet 2.5.0 → 2.5.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.
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-leaflet; version: 2.5.0; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-leaflet; version: 2.5.1; author: NextGIS */
2
2
  import 'leaflet/dist/leaflet.css';
3
3
  import LeafletMapAdapter from '@nextgis/leaflet-map-adapter';
4
4
  import { NgwMap } from '@nextgis/ngw-map';
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-leaflet; version: 2.5.0; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-leaflet; version: 2.5.1; author: NextGIS */
2
2
  var NgwLeaflet = (function () {
3
3
  'use strict';
4
4
 
@@ -18377,6 +18377,62 @@ var NgwLeaflet = (function () {
18377
18377
  __publicField$v(_Cache, "instance", {});
18378
18378
  let Cache = _Cache;
18379
18379
 
18380
+ var pkg = {
18381
+ name: "@nextgis/ngw-connector",
18382
+ version: "2.5.1",
18383
+ _priority: 12,
18384
+ description: "A lightweight HTTP client optimized for use with NextGIS Web API",
18385
+ main: "index.js",
18386
+ module: "lib/ngw-connector.esm-bundler.js",
18387
+ unpkg: "lib/ngw-connector.global.prod.js",
18388
+ jsdelivr: "lib/ngw-connector.global.prod.js",
18389
+ types: "lib/index.d.ts",
18390
+ dependencies: {
18391
+ "@nextgis/cache": "^2.5.0",
18392
+ "@nextgis/cancelable-promise": "^2.5.0",
18393
+ "@nextgis/utils": "^2.5.0",
18394
+ "@types/events": "^3.0.0",
18395
+ events: "*",
18396
+ "form-data": "^4.0.0"
18397
+ },
18398
+ devDependencies: {
18399
+ "@nextgis/build-tools": "^2.5.0"
18400
+ },
18401
+ scripts: {
18402
+ clean: "rimraf ./lib",
18403
+ dev: "node ../build-tools/lib/build.js",
18404
+ prod: "npm run dev -- --release",
18405
+ lint: "eslint ./src/**/*.ts --fix --c ../../.eslintrc",
18406
+ watch: "npm run dev -- --watch",
18407
+ "gen:types": "node ./scripts/generator"
18408
+ },
18409
+ buildOptions: {
18410
+ name: "NgwConnector",
18411
+ formats: [
18412
+ "esm-bundler",
18413
+ "esm-browser",
18414
+ "cjs",
18415
+ "global"
18416
+ ]
18417
+ },
18418
+ keywords: [
18419
+ "NextGIS",
18420
+ "MAP"
18421
+ ],
18422
+ author: "NextGIS",
18423
+ files: [
18424
+ "index.js",
18425
+ "lib"
18426
+ ],
18427
+ license: "MIT",
18428
+ homepage: "https://github.com/nextgis/nextgis_frontend/tree/master/packages/ngw-connector#readme",
18429
+ repository: {
18430
+ type: "git",
18431
+ url: "git://github.com/nextgis/nextgis_frontend.git"
18432
+ },
18433
+ gitHead: "edc68033f914f6c95c4125b9738bba6d36e990b4"
18434
+ };
18435
+
18380
18436
  var __defProp$F = Object.defineProperty;
18381
18437
  var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18382
18438
  var __publicField$u = (obj, key, value) => __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -18955,6 +19011,7 @@ var NgwLeaflet = (function () {
18955
19011
  __publicField$p(this, "resources");
18956
19012
  __publicField$p(this, "cache");
18957
19013
  __publicField$p(this, "withCredentials");
19014
+ __publicField$p(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
18958
19015
  __publicField$p(this, "routeStr", "/api/component/pyramid/route");
18959
19016
  __publicField$p(this, "activeRequests", []);
18960
19017
  __publicField$p(this, "requestTransform");
@@ -19020,7 +19077,8 @@ var NgwLeaflet = (function () {
19020
19077
  const auth = this.options.auth;
19021
19078
  const makeConnect = () => new CancelablePromise((resolve, reject) => {
19022
19079
  const makeQuery = () => {
19023
- return this.makeQuery(this.routeStr, {}, {}).then((route) => {
19080
+ const routeUrl = `${this.routeStr}?client=${this.client}`;
19081
+ return this.makeQuery(routeUrl.toString(), {}, {}).then((route) => {
19024
19082
  resolve(route);
19025
19083
  }).catch((er) => {
19026
19084
  reject(er);
@@ -19451,7 +19509,7 @@ var NgwLeaflet = (function () {
19451
19509
  if (extensionsStr !== "*") {
19452
19510
  params.extensions = extensionsStr;
19453
19511
  }
19454
- if (fields !== void 0) {
19512
+ if (fields !== void 0 && fields !== null) {
19455
19513
  params.fields = Array.isArray(fields) ? fields.join(",") : "";
19456
19514
  }
19457
19515
  if (geom !== void 0) {