@nextgis/ngw-leaflet 3.0.0-alpha.1 → 3.0.0-alpha.3
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.
- package/lib/ngw-leaflet.esm-browser.js +62 -5
- package/lib/ngw-leaflet.esm-browser.js.map +1 -1
- package/lib/ngw-leaflet.esm-browser.prod.js +1 -1
- package/lib/ngw-leaflet.esm-browser.prod.js.map +1 -1
- package/lib/ngw-leaflet.esm-bundler.js +1 -1
- package/lib/ngw-leaflet.global.js +62 -5
- package/lib/ngw-leaflet.global.js.map +1 -1
- package/lib/ngw-leaflet.global.prod.js +1 -1
- package/lib/ngw-leaflet.global.prod.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.3; author: NextGIS */
|
|
2
2
|
function styleInject(css, ref) {
|
|
3
3
|
if ( ref === void 0 ) ref = {};
|
|
4
4
|
var insertAt = ref.insertAt;
|
|
@@ -18059,6 +18059,62 @@ const _Cache = class _Cache {
|
|
|
18059
18059
|
__publicField$v(_Cache, "instance", {});
|
|
18060
18060
|
let Cache = _Cache;
|
|
18061
18061
|
|
|
18062
|
+
var pkg = {
|
|
18063
|
+
name: "@nextgis/ngw-connector",
|
|
18064
|
+
version: "3.0.0-alpha.3",
|
|
18065
|
+
_priority: 12,
|
|
18066
|
+
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
18067
|
+
main: "index.js",
|
|
18068
|
+
module: "lib/ngw-connector.esm-bundler.js",
|
|
18069
|
+
unpkg: "lib/ngw-connector.global.prod.js",
|
|
18070
|
+
jsdelivr: "lib/ngw-connector.global.prod.js",
|
|
18071
|
+
types: "lib/index.d.ts",
|
|
18072
|
+
dependencies: {
|
|
18073
|
+
"@nextgis/cache": "^3.0.0-alpha.3",
|
|
18074
|
+
"@nextgis/cancelable-promise": "^3.0.0-alpha.3",
|
|
18075
|
+
"@nextgis/utils": "^3.0.0-alpha.3",
|
|
18076
|
+
"@types/events": "^3.0.0",
|
|
18077
|
+
events: "*",
|
|
18078
|
+
"form-data": "^4.0.0"
|
|
18079
|
+
},
|
|
18080
|
+
devDependencies: {
|
|
18081
|
+
"@nextgis/build-tools": "^3.0.0-alpha.3"
|
|
18082
|
+
},
|
|
18083
|
+
scripts: {
|
|
18084
|
+
clean: "rimraf ./lib",
|
|
18085
|
+
dev: "node ../build-tools/lib/build.js",
|
|
18086
|
+
prod: "npm run dev -- --release",
|
|
18087
|
+
lint: "eslint ./src/**/*.ts --fix --c ../../.eslintrc",
|
|
18088
|
+
watch: "npm run dev -- --watch",
|
|
18089
|
+
"gen:types": "node ./scripts/generator"
|
|
18090
|
+
},
|
|
18091
|
+
buildOptions: {
|
|
18092
|
+
name: "NgwConnector",
|
|
18093
|
+
formats: [
|
|
18094
|
+
"esm-bundler",
|
|
18095
|
+
"esm-browser",
|
|
18096
|
+
"cjs",
|
|
18097
|
+
"global"
|
|
18098
|
+
]
|
|
18099
|
+
},
|
|
18100
|
+
keywords: [
|
|
18101
|
+
"NextGIS",
|
|
18102
|
+
"MAP"
|
|
18103
|
+
],
|
|
18104
|
+
author: "NextGIS",
|
|
18105
|
+
files: [
|
|
18106
|
+
"index.js",
|
|
18107
|
+
"lib"
|
|
18108
|
+
],
|
|
18109
|
+
license: "MIT",
|
|
18110
|
+
homepage: "https://github.com/nextgis/nextgis_frontend/tree/master/packages/ngw-connector#readme",
|
|
18111
|
+
repository: {
|
|
18112
|
+
type: "git",
|
|
18113
|
+
url: "git://github.com/nextgis/nextgis_frontend.git"
|
|
18114
|
+
},
|
|
18115
|
+
gitHead: "edc68033f914f6c95c4125b9738bba6d36e990b4"
|
|
18116
|
+
};
|
|
18117
|
+
|
|
18062
18118
|
var __defProp$G = Object.defineProperty;
|
|
18063
18119
|
var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18064
18120
|
var __publicField$u = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -18685,6 +18741,7 @@ class NgwConnector {
|
|
|
18685
18741
|
__publicField$p(this, "resources");
|
|
18686
18742
|
__publicField$p(this, "cache");
|
|
18687
18743
|
__publicField$p(this, "withCredentials");
|
|
18744
|
+
__publicField$p(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
|
|
18688
18745
|
__publicField$p(this, "routeStr", "/api/component/pyramid/route");
|
|
18689
18746
|
__publicField$p(this, "activeRequests", {});
|
|
18690
18747
|
__publicField$p(this, "requestTransform");
|
|
@@ -18755,8 +18812,9 @@ class NgwConnector {
|
|
|
18755
18812
|
yield this._login({ login, password });
|
|
18756
18813
|
}
|
|
18757
18814
|
}
|
|
18815
|
+
const routeUrl = `${this.routeStr}?client=${this.client}`;
|
|
18758
18816
|
return yield this.makeQuery(
|
|
18759
|
-
|
|
18817
|
+
routeUrl,
|
|
18760
18818
|
{},
|
|
18761
18819
|
{
|
|
18762
18820
|
cacheName: "route",
|
|
@@ -18823,8 +18881,7 @@ class NgwConnector {
|
|
|
18823
18881
|
credentials = credentials || this.options.auth;
|
|
18824
18882
|
if (credentials) {
|
|
18825
18883
|
const { login, password } = credentials;
|
|
18826
|
-
const
|
|
18827
|
-
const encodedStr = encodeURIComponent(str);
|
|
18884
|
+
const encodedStr = [login, password].map(encodeURIComponent).join(":");
|
|
18828
18885
|
{
|
|
18829
18886
|
return window.btoa(encodedStr);
|
|
18830
18887
|
}
|
|
@@ -19233,7 +19290,7 @@ function updateItemRequestParam(params, options) {
|
|
|
19233
19290
|
if (extensionsStr !== "*") {
|
|
19234
19291
|
params.extensions = extensionsStr;
|
|
19235
19292
|
}
|
|
19236
|
-
if (fields !== void 0) {
|
|
19293
|
+
if (fields !== void 0 && fields !== null) {
|
|
19237
19294
|
params.fields = Array.isArray(fields) ? fields.join(",") : "";
|
|
19238
19295
|
}
|
|
19239
19296
|
if (geom !== void 0) {
|