@nextgis/ngw-map 1.19.1 → 1.19.6

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-map; version: 1.19.1; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-map; version: 1.19.6; author: NextGIS */
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-map; version: 1.19.1; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-map; version: 1.19.6; author: NextGIS */
2
2
  var events = {exports: {}};
3
3
 
4
4
  var R = typeof Reflect === 'object' ? Reflect : null;
@@ -4296,6 +4296,62 @@ Cache$1.instance = {};
4296
4296
  */
4297
4297
  var Cache = Cache$1;
4298
4298
 
4299
+ var pkg = {
4300
+ name: "@nextgis/ngw-connector",
4301
+ version: "1.19.6",
4302
+ _priority: 12,
4303
+ description: "A lightweight HTTP client optimized for use with NextGIS Web API",
4304
+ main: "index.js",
4305
+ module: "lib/ngw-connector.esm-bundler.js",
4306
+ unpkg: "lib/ngw-connector.global.prod.js",
4307
+ jsdelivr: "lib/ngw-connector.global.prod.js",
4308
+ types: "lib/index.d.ts",
4309
+ dependencies: {
4310
+ "@nextgis/cache": "^1.19.0",
4311
+ "@nextgis/cancelable-promise": "^1.19.0",
4312
+ "@nextgis/utils": "^1.19.0",
4313
+ "@types/events": "^3.0.0",
4314
+ events: "^3.3.0",
4315
+ "form-data": "^4.0.0"
4316
+ },
4317
+ devDependencies: {
4318
+ "@nextgis/build-tools": "^1.19.0"
4319
+ },
4320
+ scripts: {
4321
+ clean: "rimraf ./lib",
4322
+ dev: "node ../build-tools/lib/build.js",
4323
+ prod: "npm run dev -- --release",
4324
+ lint: "eslint ./src/**/*.ts --fix --c ../../.eslintrc",
4325
+ watch: "npm run dev -- --watch",
4326
+ "gen:types": "node ./scripts/generator"
4327
+ },
4328
+ buildOptions: {
4329
+ name: "NgwConnector",
4330
+ formats: [
4331
+ "esm-bundler",
4332
+ "esm-browser",
4333
+ "cjs",
4334
+ "global"
4335
+ ]
4336
+ },
4337
+ keywords: [
4338
+ "NextGIS",
4339
+ "MAP"
4340
+ ],
4341
+ author: "NextGIS",
4342
+ files: [
4343
+ "index.js",
4344
+ "lib"
4345
+ ],
4346
+ license: "MIT",
4347
+ homepage: "https://github.com/nextgis/nextgis_frontend/tree/master/packages/ngw-connector#readme",
4348
+ repository: {
4349
+ type: "git",
4350
+ url: "git://github.com/nextgis/nextgis_frontend.git"
4351
+ },
4352
+ gitHead: "edc68033f914f6c95c4125b9738bba6d36e990b4"
4353
+ };
4354
+
4299
4355
  /**
4300
4356
  * Thrown when...
4301
4357
  */
@@ -4841,6 +4897,7 @@ class NgwConnector$1 {
4841
4897
  this.options = options;
4842
4898
  this.id = ID$1++;
4843
4899
  this.emitter = new events.exports.EventEmitter();
4900
+ this.client = `NextGIS-NGW-Connector/${pkg.version}`;
4844
4901
  this.routeStr = '/api/component/pyramid/route';
4845
4902
  this.activeRequests = [];
4846
4903
  const exist = findConnector(options);
@@ -4892,7 +4949,8 @@ class NgwConnector$1 {
4892
4949
  const auth = this.options.auth;
4893
4950
  const makeConnect = () => new CancelablePromise((resolve, reject) => {
4894
4951
  const makeQuery = () => {
4895
- return this.makeQuery(this.routeStr, {}, {})
4952
+ const routeUrl = `${this.routeStr}?client=${this.client}`;
4953
+ return this.makeQuery(routeUrl.toString(), {}, {})
4896
4954
  .then((route) => {
4897
4955
  resolve(route);
4898
4956
  })
@@ -6214,7 +6272,7 @@ function updateItemRequestParam(params, options) {
6214
6272
  if (extensionsStr !== '*') {
6215
6273
  params.extensions = extensionsStr;
6216
6274
  }
6217
- if (fields !== undefined) {
6275
+ if (fields !== undefined && fields !== null) {
6218
6276
  params.fields = Array.isArray(fields) ? fields.join(',') : '';
6219
6277
  }
6220
6278
  if (geom !== undefined) {