@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
|
function styleInject(css, ref) {
|
|
3
3
|
if ( ref === void 0 ) ref = {};
|
|
4
4
|
var insertAt = ref.insertAt;
|
|
@@ -18507,7 +18507,10 @@ class ResourcesControl {
|
|
|
18507
18507
|
}
|
|
18508
18508
|
return CancelablePromise.resolve(void 0);
|
|
18509
18509
|
};
|
|
18510
|
-
|
|
18510
|
+
if (requestOptions == null ? void 0 : requestOptions.cache) {
|
|
18511
|
+
return cache.addFull("resource", makeRequest, forCache);
|
|
18512
|
+
}
|
|
18513
|
+
return makeRequest();
|
|
18511
18514
|
}
|
|
18512
18515
|
getOneOrFail(resource, requestOptions) {
|
|
18513
18516
|
return this.getOne(resource, requestOptions).then((res) => {
|
|
@@ -18668,14 +18671,17 @@ class ResourcesControl {
|
|
|
18668
18671
|
}
|
|
18669
18672
|
_fetchResourceById(id, requestOptions) {
|
|
18670
18673
|
const promise = () => this.connector.get("resource.item", requestOptions, { id });
|
|
18671
|
-
|
|
18672
|
-
|
|
18673
|
-
|
|
18674
|
-
|
|
18675
|
-
|
|
18676
|
-
|
|
18677
|
-
|
|
18678
|
-
|
|
18674
|
+
if (requestOptions == null ? void 0 : requestOptions.cache) {
|
|
18675
|
+
return this.cache.add("resource.item", promise, {
|
|
18676
|
+
id
|
|
18677
|
+
}).catch((er) => {
|
|
18678
|
+
if (!(er instanceof ResourceNotFoundError)) {
|
|
18679
|
+
throw er;
|
|
18680
|
+
}
|
|
18681
|
+
return void 0;
|
|
18682
|
+
});
|
|
18683
|
+
}
|
|
18684
|
+
return promise();
|
|
18679
18685
|
}
|
|
18680
18686
|
_fetchResourceBy(resource, requestOptions) {
|
|
18681
18687
|
return this.getMany(resource, requestOptions).then((resources) => {
|
|
@@ -18755,7 +18761,7 @@ function template(str, data) {
|
|
|
18755
18761
|
function apiRequest(opt) {
|
|
18756
18762
|
const params = opt.params;
|
|
18757
18763
|
return new CancelablePromise((resolve, reject) => {
|
|
18758
|
-
opt.connector.connect().then((apiItems) => {
|
|
18764
|
+
return opt.connector.connect().then((apiItems) => {
|
|
18759
18765
|
let apiItem = apiItems && apiItems[opt.name];
|
|
18760
18766
|
if (apiItem) {
|
|
18761
18767
|
apiItem = [...apiItem];
|
|
@@ -19473,7 +19479,9 @@ function createParam(pf) {
|
|
|
19473
19479
|
return [`${isFldStr}${field_}__${operation}`, v];
|
|
19474
19480
|
}
|
|
19475
19481
|
function getQueries(opt, _queries = [], _parentAllParams = []) {
|
|
19482
|
+
var _a;
|
|
19476
19483
|
const { filters } = opt;
|
|
19484
|
+
const paramList = (_a = opt.paramList) != null ? _a : [];
|
|
19477
19485
|
const logic = typeof filters[0] === "string" ? filters[0] : "all";
|
|
19478
19486
|
const filters_ = filters.filter((x) => Array.isArray(x));
|
|
19479
19487
|
if (logic === "any") {
|
|
@@ -19481,7 +19489,7 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
|
|
|
19481
19489
|
if (isPropertyFilter(f)) {
|
|
19482
19490
|
_queries.push(
|
|
19483
19491
|
fetchNgwLayerItemsRequest(__spreadProps$d(__spreadValues$o({}, opt), {
|
|
19484
|
-
paramList: [..._parentAllParams, createParam(f)]
|
|
19492
|
+
paramList: [..._parentAllParams, ...paramList, createParam(f)]
|
|
19485
19493
|
}))
|
|
19486
19494
|
);
|
|
19487
19495
|
} else {
|
|
@@ -19517,7 +19525,7 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
|
|
|
19517
19525
|
} else {
|
|
19518
19526
|
_queries.push(
|
|
19519
19527
|
fetchNgwLayerItemsRequest(__spreadProps$d(__spreadValues$o({}, opt), {
|
|
19520
|
-
paramList: [..._parentAllParams, ...filters2]
|
|
19528
|
+
paramList: [..._parentAllParams, ...paramList, ...filters2]
|
|
19521
19529
|
}))
|
|
19522
19530
|
);
|
|
19523
19531
|
}
|