bruce-models 7.1.69 → 7.1.71
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 +51 -11
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +51 -11
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity-source.js +10 -2
- package/dist/lib/entity/entity-source.js.map +1 -1
- package/dist/lib/entity/entity-tag.js +10 -2
- package/dist/lib/entity/entity-tag.js.map +1 -1
- package/dist/lib/entity/entity-type.js +8 -3
- package/dist/lib/entity/entity-type.js.map +1 -1
- package/dist/lib/entity/entity.js +11 -2
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/style/style.js +9 -0
- package/dist/lib/style/style.js.map +1 -1
- package/dist/lib/tileset/tileset.js +2 -1
- package/dist/lib/tileset/tileset.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/style/style.d.ts +11 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -5295,13 +5295,18 @@
|
|
|
5295
5295
|
}
|
|
5296
5296
|
const data = yield Promise.all(reqs);
|
|
5297
5297
|
// Populate array, while checking for already added types.
|
|
5298
|
+
// Batched ID requests can overlap.
|
|
5298
5299
|
const types = [];
|
|
5300
|
+
const seenIds = new Set();
|
|
5299
5301
|
for (const item of data) {
|
|
5300
5302
|
for (const type of item.Items) {
|
|
5301
|
-
|
|
5302
|
-
if (
|
|
5303
|
-
|
|
5303
|
+
const key = String(type.ID);
|
|
5304
|
+
if (seenIds.has(key)) {
|
|
5305
|
+
continue;
|
|
5304
5306
|
}
|
|
5307
|
+
seenIds.add(key);
|
|
5308
|
+
appendInternalAttrSchema(type);
|
|
5309
|
+
types.push(type);
|
|
5305
5310
|
}
|
|
5306
5311
|
}
|
|
5307
5312
|
res({
|
|
@@ -6292,13 +6297,22 @@
|
|
|
6292
6297
|
const reqs = [];
|
|
6293
6298
|
if (reqIds.length > 0) {
|
|
6294
6299
|
const req = api.POST(url, reqData, exports.Api.PrepReqParams(reqParams));
|
|
6300
|
+
const itemsById = req.then(data => {
|
|
6301
|
+
const map = new Map();
|
|
6302
|
+
for (const item of data.Items) {
|
|
6303
|
+
const id = String(item.Bruce.ID);
|
|
6304
|
+
if (!map.has(id)) {
|
|
6305
|
+
map.set(id, item);
|
|
6306
|
+
}
|
|
6307
|
+
}
|
|
6308
|
+
return map;
|
|
6309
|
+
});
|
|
6295
6310
|
for (let i = 0; i < reqIds.length; i++) {
|
|
6296
6311
|
const entityId = reqIds[i];
|
|
6297
6312
|
const key = GetCacheKey(Object.assign(Object.assign({}, cacheKeyData), { entityId }));
|
|
6298
6313
|
const prom = new Promise((res) => __awaiter(this, void 0, void 0, function* () {
|
|
6299
6314
|
try {
|
|
6300
|
-
const
|
|
6301
|
-
const item = data.Items.find(x => x.Bruce.ID == entityId);
|
|
6315
|
+
const item = (yield itemsById).get(String(entityId));
|
|
6302
6316
|
res({
|
|
6303
6317
|
entity: item
|
|
6304
6318
|
});
|
|
@@ -11042,6 +11056,15 @@
|
|
|
11042
11056
|
(function (ETextureColorMaskType) {
|
|
11043
11057
|
ETextureColorMaskType["BlackWhite"] = "BLACK_WHITE";
|
|
11044
11058
|
})(ETextureColorMaskType = Style.ETextureColorMaskType || (Style.ETextureColorMaskType = {}));
|
|
11059
|
+
/**
|
|
11060
|
+
* Dictates where a polygon's extrusion height comes from.
|
|
11061
|
+
* Default is "PATH".
|
|
11062
|
+
*/
|
|
11063
|
+
let EPolygonExtrusionType;
|
|
11064
|
+
(function (EPolygonExtrusionType) {
|
|
11065
|
+
EPolygonExtrusionType["Path"] = "PATH";
|
|
11066
|
+
EPolygonExtrusionType["Texture"] = "TEXTURE";
|
|
11067
|
+
})(EPolygonExtrusionType = Style.EPolygonExtrusionType || (Style.EPolygonExtrusionType = {}));
|
|
11045
11068
|
/**
|
|
11046
11069
|
* Returns a list of styles.
|
|
11047
11070
|
* @param params
|
|
@@ -13188,11 +13211,19 @@
|
|
|
13188
13211
|
rej(e);
|
|
13189
13212
|
}
|
|
13190
13213
|
}));
|
|
13214
|
+
const sourcesByKey = prom.then((sources) => {
|
|
13215
|
+
const map = new Map();
|
|
13216
|
+
for (const s of sources) {
|
|
13217
|
+
if (!map.has(s["SourceRecord.Key"])) {
|
|
13218
|
+
map.set(s["SourceRecord.Key"], s);
|
|
13219
|
+
}
|
|
13220
|
+
}
|
|
13221
|
+
return map;
|
|
13222
|
+
});
|
|
13191
13223
|
for (let i = 0; i < reqKeys.length; i++) {
|
|
13192
13224
|
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
13193
13225
|
try {
|
|
13194
|
-
|
|
13195
|
-
res(sources.find((s) => s["SourceRecord.Key"] === reqKeys[i]));
|
|
13226
|
+
res((yield sourcesByKey).get(reqKeys[i]));
|
|
13196
13227
|
}
|
|
13197
13228
|
catch (e) {
|
|
13198
13229
|
rej(e);
|
|
@@ -13452,12 +13483,20 @@
|
|
|
13452
13483
|
rej(e);
|
|
13453
13484
|
}
|
|
13454
13485
|
}));
|
|
13486
|
+
const tagsById = prom.then((tags) => {
|
|
13487
|
+
const map = new Map();
|
|
13488
|
+
for (const t of tags) {
|
|
13489
|
+
if (!map.has(t.ID)) {
|
|
13490
|
+
map.set(t.ID, t);
|
|
13491
|
+
}
|
|
13492
|
+
}
|
|
13493
|
+
return map;
|
|
13494
|
+
});
|
|
13455
13495
|
for (let i = 0; i < reqIds.length; i++) {
|
|
13456
13496
|
const id = reqIds[i];
|
|
13457
13497
|
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
13458
13498
|
try {
|
|
13459
|
-
const
|
|
13460
|
-
const tag = tags.find((t) => t.ID === id);
|
|
13499
|
+
const tag = (yield tagsById).get(id);
|
|
13461
13500
|
res({
|
|
13462
13501
|
tag: tag
|
|
13463
13502
|
});
|
|
@@ -15772,8 +15811,9 @@
|
|
|
15772
15811
|
}
|
|
15773
15812
|
else if (tilesetIds.length > 1) {
|
|
15774
15813
|
const tilesets = yield api.GET("ui.tilesets", exports.Api.PrepReqParams(reqParams));
|
|
15814
|
+
const tilesetIdsSet = new Set(tilesetIds);
|
|
15775
15815
|
for (const tileset of tilesets) {
|
|
15776
|
-
if (
|
|
15816
|
+
if (tilesetIdsSet.has(tileset.ID)) {
|
|
15777
15817
|
mapping[tileset.ID] = tileset.Type;
|
|
15778
15818
|
}
|
|
15779
15819
|
}
|
|
@@ -19405,7 +19445,7 @@
|
|
|
19405
19445
|
})(exports.UrlUtils || (exports.UrlUtils = {}));
|
|
19406
19446
|
|
|
19407
19447
|
// This is updated with the package.json version on build.
|
|
19408
|
-
const VERSION = "7.1.
|
|
19448
|
+
const VERSION = "7.1.71";
|
|
19409
19449
|
|
|
19410
19450
|
exports.VERSION = VERSION;
|
|
19411
19451
|
exports.AbstractApi = AbstractApi;
|