@nextgis/ngw-leaflet 3.0.0-alpha.1 → 3.0.0-alpha.2

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.1; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.2; 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: 3.0.0-alpha.1; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.2; author: NextGIS */
2
2
  var NgwLeaflet = (function () {
3
3
  'use strict';
4
4
 
@@ -18062,6 +18062,62 @@ var NgwLeaflet = (function () {
18062
18062
  __publicField$v(_Cache, "instance", {});
18063
18063
  let Cache = _Cache;
18064
18064
 
18065
+ var pkg = {
18066
+ name: "@nextgis/ngw-connector",
18067
+ version: "3.0.0-alpha.2",
18068
+ _priority: 12,
18069
+ description: "A lightweight HTTP client optimized for use with NextGIS Web API",
18070
+ main: "index.js",
18071
+ module: "lib/ngw-connector.esm-bundler.js",
18072
+ unpkg: "lib/ngw-connector.global.prod.js",
18073
+ jsdelivr: "lib/ngw-connector.global.prod.js",
18074
+ types: "lib/index.d.ts",
18075
+ dependencies: {
18076
+ "@nextgis/cache": "^3.0.0-alpha.1",
18077
+ "@nextgis/cancelable-promise": "^3.0.0-alpha.1",
18078
+ "@nextgis/utils": "^3.0.0-alpha.1",
18079
+ "@types/events": "^3.0.0",
18080
+ events: "*",
18081
+ "form-data": "^4.0.0"
18082
+ },
18083
+ devDependencies: {
18084
+ "@nextgis/build-tools": "^3.0.0-alpha.1"
18085
+ },
18086
+ scripts: {
18087
+ clean: "rimraf ./lib",
18088
+ dev: "node ../build-tools/lib/build.js",
18089
+ prod: "npm run dev -- --release",
18090
+ lint: "eslint ./src/**/*.ts --fix --c ../../.eslintrc",
18091
+ watch: "npm run dev -- --watch",
18092
+ "gen:types": "node ./scripts/generator"
18093
+ },
18094
+ buildOptions: {
18095
+ name: "NgwConnector",
18096
+ formats: [
18097
+ "esm-bundler",
18098
+ "esm-browser",
18099
+ "cjs",
18100
+ "global"
18101
+ ]
18102
+ },
18103
+ keywords: [
18104
+ "NextGIS",
18105
+ "MAP"
18106
+ ],
18107
+ author: "NextGIS",
18108
+ files: [
18109
+ "index.js",
18110
+ "lib"
18111
+ ],
18112
+ license: "MIT",
18113
+ homepage: "https://github.com/nextgis/nextgis_frontend/tree/master/packages/ngw-connector#readme",
18114
+ repository: {
18115
+ type: "git",
18116
+ url: "git://github.com/nextgis/nextgis_frontend.git"
18117
+ },
18118
+ gitHead: "edc68033f914f6c95c4125b9738bba6d36e990b4"
18119
+ };
18120
+
18065
18121
  var __defProp$G = Object.defineProperty;
18066
18122
  var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18067
18123
  var __publicField$u = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -18688,6 +18744,7 @@ var NgwLeaflet = (function () {
18688
18744
  __publicField$p(this, "resources");
18689
18745
  __publicField$p(this, "cache");
18690
18746
  __publicField$p(this, "withCredentials");
18747
+ __publicField$p(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
18691
18748
  __publicField$p(this, "routeStr", "/api/component/pyramid/route");
18692
18749
  __publicField$p(this, "activeRequests", {});
18693
18750
  __publicField$p(this, "requestTransform");
@@ -18758,8 +18815,9 @@ var NgwLeaflet = (function () {
18758
18815
  yield this._login({ login, password });
18759
18816
  }
18760
18817
  }
18818
+ const routeUrl = `${this.routeStr}?client=${this.client}`;
18761
18819
  return yield this.makeQuery(
18762
- this.routeStr,
18820
+ routeUrl,
18763
18821
  {},
18764
18822
  {
18765
18823
  cacheName: "route",
@@ -19236,7 +19294,7 @@ var NgwLeaflet = (function () {
19236
19294
  if (extensionsStr !== "*") {
19237
19295
  params.extensions = extensionsStr;
19238
19296
  }
19239
- if (fields !== void 0) {
19297
+ if (fields !== void 0 && fields !== null) {
19240
19298
  params.fields = Array.isArray(fields) ? fields.join(",") : "";
19241
19299
  }
19242
19300
  if (geom !== void 0) {