@nextgis/ngw-leaflet 2.3.0 → 2.4.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.
- package/lib/ngw-leaflet.esm-browser.js +21 -13
- 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 +21 -13
- 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 +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 2.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 2.4.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.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 2.4.1; author: NextGIS */
|
|
2
2
|
var NgwLeaflet = (function () {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -18510,7 +18510,10 @@ var NgwLeaflet = (function () {
|
|
|
18510
18510
|
}
|
|
18511
18511
|
return CancelablePromise.resolve(void 0);
|
|
18512
18512
|
};
|
|
18513
|
-
|
|
18513
|
+
if (requestOptions == null ? void 0 : requestOptions.cache) {
|
|
18514
|
+
return cache.addFull("resource", makeRequest, forCache);
|
|
18515
|
+
}
|
|
18516
|
+
return makeRequest();
|
|
18514
18517
|
}
|
|
18515
18518
|
getOneOrFail(resource, requestOptions) {
|
|
18516
18519
|
return this.getOne(resource, requestOptions).then((res) => {
|
|
@@ -18671,14 +18674,17 @@ var NgwLeaflet = (function () {
|
|
|
18671
18674
|
}
|
|
18672
18675
|
_fetchResourceById(id, requestOptions) {
|
|
18673
18676
|
const promise = () => this.connector.get("resource.item", requestOptions, { id });
|
|
18674
|
-
|
|
18675
|
-
|
|
18676
|
-
|
|
18677
|
-
|
|
18678
|
-
|
|
18679
|
-
|
|
18680
|
-
|
|
18681
|
-
|
|
18677
|
+
if (requestOptions == null ? void 0 : requestOptions.cache) {
|
|
18678
|
+
return this.cache.add("resource.item", promise, {
|
|
18679
|
+
id
|
|
18680
|
+
}).catch((er) => {
|
|
18681
|
+
if (!(er instanceof ResourceNotFoundError)) {
|
|
18682
|
+
throw er;
|
|
18683
|
+
}
|
|
18684
|
+
return void 0;
|
|
18685
|
+
});
|
|
18686
|
+
}
|
|
18687
|
+
return promise();
|
|
18682
18688
|
}
|
|
18683
18689
|
_fetchResourceBy(resource, requestOptions) {
|
|
18684
18690
|
return this.getMany(resource, requestOptions).then((resources) => {
|
|
@@ -18758,7 +18764,7 @@ var NgwLeaflet = (function () {
|
|
|
18758
18764
|
function apiRequest(opt) {
|
|
18759
18765
|
const params = opt.params;
|
|
18760
18766
|
return new CancelablePromise((resolve, reject) => {
|
|
18761
|
-
opt.connector.connect().then((apiItems) => {
|
|
18767
|
+
return opt.connector.connect().then((apiItems) => {
|
|
18762
18768
|
let apiItem = apiItems && apiItems[opt.name];
|
|
18763
18769
|
if (apiItem) {
|
|
18764
18770
|
apiItem = [...apiItem];
|
|
@@ -19476,7 +19482,9 @@ var NgwLeaflet = (function () {
|
|
|
19476
19482
|
return [`${isFldStr}${field_}__${operation}`, v];
|
|
19477
19483
|
}
|
|
19478
19484
|
function getQueries(opt, _queries = [], _parentAllParams = []) {
|
|
19485
|
+
var _a;
|
|
19479
19486
|
const { filters } = opt;
|
|
19487
|
+
const paramList = (_a = opt.paramList) != null ? _a : [];
|
|
19480
19488
|
const logic = typeof filters[0] === "string" ? filters[0] : "all";
|
|
19481
19489
|
const filters_ = filters.filter((x) => Array.isArray(x));
|
|
19482
19490
|
if (logic === "any") {
|
|
@@ -19484,7 +19492,7 @@ var NgwLeaflet = (function () {
|
|
|
19484
19492
|
if (isPropertyFilter(f)) {
|
|
19485
19493
|
_queries.push(
|
|
19486
19494
|
fetchNgwLayerItemsRequest(__spreadProps$d(__spreadValues$o({}, opt), {
|
|
19487
|
-
paramList: [..._parentAllParams, createParam(f)]
|
|
19495
|
+
paramList: [..._parentAllParams, ...paramList, createParam(f)]
|
|
19488
19496
|
}))
|
|
19489
19497
|
);
|
|
19490
19498
|
} else {
|
|
@@ -19520,7 +19528,7 @@ var NgwLeaflet = (function () {
|
|
|
19520
19528
|
} else {
|
|
19521
19529
|
_queries.push(
|
|
19522
19530
|
fetchNgwLayerItemsRequest(__spreadProps$d(__spreadValues$o({}, opt), {
|
|
19523
|
-
paramList: [..._parentAllParams, ...filters2]
|
|
19531
|
+
paramList: [..._parentAllParams, ...paramList, ...filters2]
|
|
19524
19532
|
}))
|
|
19525
19533
|
);
|
|
19526
19534
|
}
|