bruce-models 2.9.6 → 2.9.8
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/dist/bruce-models.es5.js +62 -62
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +62 -62
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/api/abstract-api.js +24 -28
- package/dist/lib/api/abstract-api.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity.js +3 -1
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/entity/getters/entity-filter-getter.js +2 -0
- package/dist/lib/entity/getters/entity-filter-getter.js.map +1 -1
- package/dist/lib/plugin/plugin.js +32 -32
- package/dist/types/api/abstract-api.d.ts +3 -3
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/entity/entity.d.ts +1 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -270,36 +270,32 @@
|
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
272
|
GetCacheItem(key, reqParams) {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
return this.Cache.Get(key);
|
|
282
|
-
});
|
|
273
|
+
let noCache = reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache;
|
|
274
|
+
if (noCache == null) {
|
|
275
|
+
noCache = exports.Api.DEFAULT_NO_CACHE;
|
|
276
|
+
}
|
|
277
|
+
if (noCache) {
|
|
278
|
+
return null;
|
|
279
|
+
}
|
|
280
|
+
return this.Cache.Get(key);
|
|
283
281
|
}
|
|
284
282
|
SetCacheItem(params) {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
persistence: "memory"
|
|
302
|
-
});
|
|
283
|
+
let { key, value, duration, req } = params;
|
|
284
|
+
let noCache = req === null || req === void 0 ? void 0 : req.noCache;
|
|
285
|
+
if (noCache == null) {
|
|
286
|
+
noCache = exports.Api.DEFAULT_NO_CACHE;
|
|
287
|
+
}
|
|
288
|
+
if (noCache) {
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
if (isNaN(duration)) {
|
|
292
|
+
duration = exports.Api.DEFAULT_CACHE_DURATION;
|
|
293
|
+
}
|
|
294
|
+
this.Cache.Set({
|
|
295
|
+
id: key,
|
|
296
|
+
data: value,
|
|
297
|
+
duration,
|
|
298
|
+
persistence: "memory"
|
|
303
299
|
});
|
|
304
300
|
}
|
|
305
301
|
GetSessionId() {
|
|
@@ -2275,6 +2271,7 @@
|
|
|
2275
2271
|
}
|
|
2276
2272
|
Entity.CalculateName = CalculateName;
|
|
2277
2273
|
function GetList(params) {
|
|
2274
|
+
var _a;
|
|
2278
2275
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2279
2276
|
let { api, filter, req: reqParams, viaCdn, viaCdnCacheToken } = params;
|
|
2280
2277
|
if (!api) {
|
|
@@ -2285,8 +2282,9 @@
|
|
|
2285
2282
|
requestFilter = Object.assign({}, filter.entityTypeConditions);
|
|
2286
2283
|
}
|
|
2287
2284
|
if (filter.layerIds != null && filter.layerIds.length > 0) {
|
|
2285
|
+
const operator = (_a = filter.layerIdsOperator) !== null && _a !== void 0 ? _a : "equals";
|
|
2288
2286
|
requestFilter["Bruce.Layer.ID"] = {
|
|
2289
|
-
|
|
2287
|
+
[operator]: filter.layerIds
|
|
2290
2288
|
};
|
|
2291
2289
|
}
|
|
2292
2290
|
if (filter.bounds) {
|
|
@@ -5015,6 +5013,8 @@
|
|
|
5015
5013
|
pageIndex: curCell.FetchPageIndex,
|
|
5016
5014
|
entityTypeId: this.typeId,
|
|
5017
5015
|
layerIds: this.tagIds,
|
|
5016
|
+
// Any tag specified will be allowed.
|
|
5017
|
+
layerIdsOperator: "in",
|
|
5018
5018
|
bounds: curCell.GetBounds(),
|
|
5019
5019
|
sortOrder: exports.Api.ESortOrder.Asc,
|
|
5020
5020
|
entityTypeConditions: this.attrFilter
|
|
@@ -8703,40 +8703,40 @@
|
|
|
8703
8703
|
window[paramsId] = pluginParams ? pluginParams : {};
|
|
8704
8704
|
const disposeId = exports.ObjectUtils.UId();
|
|
8705
8705
|
const elementId = exports.ObjectUtils.UId();
|
|
8706
|
-
let script = `
|
|
8707
|
-
function run() {
|
|
8708
|
-
${fileContent}
|
|
8709
|
-
|
|
8710
|
-
const paramsId = "${paramsId}";
|
|
8711
|
-
const containerId = "${containerId}";
|
|
8712
|
-
let container;
|
|
8713
|
-
if (containerId) {
|
|
8714
|
-
container = document.getElementById("${containerId}");
|
|
8715
|
-
}
|
|
8716
|
-
|
|
8717
|
-
let pluginHTML = null;
|
|
8718
|
-
if (container) {
|
|
8719
|
-
pluginHTML = document.createElement("div");
|
|
8720
|
-
pluginHTML.id = "${elementId}";
|
|
8721
|
-
container.appendChild(pluginHTML);
|
|
8722
|
-
}
|
|
8723
|
-
|
|
8724
|
-
{TEMPLATE_CODE}
|
|
8725
|
-
const params = window["${paramsId}"];
|
|
8726
|
-
|
|
8727
|
-
window["${disposeId}"] = Run({
|
|
8728
|
-
element: pluginHTML,
|
|
8729
|
-
container: container,
|
|
8730
|
-
pluginParams: params
|
|
8731
|
-
});
|
|
8732
|
-
}
|
|
8733
|
-
run();
|
|
8706
|
+
let script = `
|
|
8707
|
+
function run() {
|
|
8708
|
+
${fileContent}
|
|
8709
|
+
|
|
8710
|
+
const paramsId = "${paramsId}";
|
|
8711
|
+
const containerId = "${containerId}";
|
|
8712
|
+
let container;
|
|
8713
|
+
if (containerId) {
|
|
8714
|
+
container = document.getElementById("${containerId}");
|
|
8715
|
+
}
|
|
8716
|
+
|
|
8717
|
+
let pluginHTML = null;
|
|
8718
|
+
if (container) {
|
|
8719
|
+
pluginHTML = document.createElement("div");
|
|
8720
|
+
pluginHTML.id = "${elementId}";
|
|
8721
|
+
container.appendChild(pluginHTML);
|
|
8722
|
+
}
|
|
8723
|
+
|
|
8724
|
+
{TEMPLATE_CODE}
|
|
8725
|
+
const params = window["${paramsId}"];
|
|
8726
|
+
|
|
8727
|
+
window["${disposeId}"] = Run({
|
|
8728
|
+
element: pluginHTML,
|
|
8729
|
+
container: container,
|
|
8730
|
+
pluginParams: params
|
|
8731
|
+
});
|
|
8732
|
+
}
|
|
8733
|
+
run();
|
|
8734
8734
|
`;
|
|
8735
8735
|
if (script.includes("var template")) {
|
|
8736
|
-
script = script.replace("{TEMPLATE_CODE}", `
|
|
8737
|
-
if (pluginHTML && template) {
|
|
8738
|
-
pluginHTML.innerHTML = template;
|
|
8739
|
-
}
|
|
8736
|
+
script = script.replace("{TEMPLATE_CODE}", `
|
|
8737
|
+
if (pluginHTML && template) {
|
|
8738
|
+
pluginHTML.innerHTML = template;
|
|
8739
|
+
}
|
|
8740
8740
|
`);
|
|
8741
8741
|
}
|
|
8742
8742
|
else {
|
|
@@ -8874,7 +8874,7 @@
|
|
|
8874
8874
|
DataSource.GetList = GetList;
|
|
8875
8875
|
})(exports.DataSource || (exports.DataSource = {}));
|
|
8876
8876
|
|
|
8877
|
-
const VERSION = "2.9.
|
|
8877
|
+
const VERSION = "2.9.8";
|
|
8878
8878
|
|
|
8879
8879
|
exports.VERSION = VERSION;
|
|
8880
8880
|
exports.AbstractApi = AbstractApi;
|