bruce-models 7.1.65 → 7.1.67
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 +66 -1
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +66 -1
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/client-file/client-file.js +65 -0
- package/dist/lib/client-file/client-file.js.map +1 -1
- package/dist/lib/style/style.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/client-file/client-file.d.ts +10 -0
- package/dist/types/style/style.d.ts +8 -1
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -8753,6 +8753,71 @@
|
|
|
8753
8753
|
});
|
|
8754
8754
|
}
|
|
8755
8755
|
ClientFile.GetList = GetList;
|
|
8756
|
+
function GetFindGeneratedTextureCacheKey(entityTypeSourceId, attribute) {
|
|
8757
|
+
return `client-file-find-generated-texture-${entityTypeSourceId}-${attribute}`;
|
|
8758
|
+
}
|
|
8759
|
+
/**
|
|
8760
|
+
* Returns a generated texture file for given source ID + attribute combination.
|
|
8761
|
+
*/
|
|
8762
|
+
function FindGeneratedTexture(params) {
|
|
8763
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
8764
|
+
let { api, entityTypeSourceId, attribute, req: reqParams } = params;
|
|
8765
|
+
if (!api) {
|
|
8766
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
8767
|
+
}
|
|
8768
|
+
const key = GetFindGeneratedTextureCacheKey(entityTypeSourceId, attribute);
|
|
8769
|
+
const cache = api.GetCacheItem(key, reqParams);
|
|
8770
|
+
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
8771
|
+
return cache.data;
|
|
8772
|
+
}
|
|
8773
|
+
// Hack: API isn't returning the right file so we're adding to page size and filtering again on client. Patch ASAP.
|
|
8774
|
+
const prom = (() => __awaiter(this, void 0, void 0, function* () {
|
|
8775
|
+
const res = yield GetList({
|
|
8776
|
+
api,
|
|
8777
|
+
filter: {
|
|
8778
|
+
PageSize: 300,
|
|
8779
|
+
PageIndex: 0,
|
|
8780
|
+
Purpose: "Polygon Texture",
|
|
8781
|
+
FilterRows: [
|
|
8782
|
+
{
|
|
8783
|
+
column: Filter.EColumn.Data,
|
|
8784
|
+
path: "generation/EntityType.Source.ID",
|
|
8785
|
+
rowOperator: Filter.ERowOperator.AND,
|
|
8786
|
+
value: String(entityTypeSourceId),
|
|
8787
|
+
includes: true,
|
|
8788
|
+
valueOperator: "equals",
|
|
8789
|
+
rows: []
|
|
8790
|
+
},
|
|
8791
|
+
{
|
|
8792
|
+
column: Filter.EColumn.Data,
|
|
8793
|
+
path: "generation/Attribute",
|
|
8794
|
+
rowOperator: Filter.ERowOperator.AND,
|
|
8795
|
+
value: attribute,
|
|
8796
|
+
includes: true,
|
|
8797
|
+
valueOperator: "equals",
|
|
8798
|
+
rows: []
|
|
8799
|
+
}
|
|
8800
|
+
]
|
|
8801
|
+
},
|
|
8802
|
+
req: reqParams
|
|
8803
|
+
});
|
|
8804
|
+
const match = (res.clientFiles || []).find((file) => {
|
|
8805
|
+
var _a;
|
|
8806
|
+
const generation = (_a = file === null || file === void 0 ? void 0 : file.Data) === null || _a === void 0 ? void 0 : _a.generation;
|
|
8807
|
+
return ((generation === null || generation === void 0 ? void 0 : generation["EntityType.Source.ID"]) === entityTypeSourceId &&
|
|
8808
|
+
(generation === null || generation === void 0 ? void 0 : generation.Attribute) === attribute);
|
|
8809
|
+
});
|
|
8810
|
+
return match || null;
|
|
8811
|
+
}))();
|
|
8812
|
+
api.SetCacheItem({
|
|
8813
|
+
key,
|
|
8814
|
+
value: prom,
|
|
8815
|
+
req: reqParams
|
|
8816
|
+
});
|
|
8817
|
+
return prom;
|
|
8818
|
+
});
|
|
8819
|
+
}
|
|
8820
|
+
ClientFile.FindGeneratedTexture = FindGeneratedTexture;
|
|
8756
8821
|
/**
|
|
8757
8822
|
* Deletes a list of client files matching the filter.
|
|
8758
8823
|
* @param params
|
|
@@ -19169,7 +19234,7 @@
|
|
|
19169
19234
|
})(exports.UrlUtils || (exports.UrlUtils = {}));
|
|
19170
19235
|
|
|
19171
19236
|
// This is updated with the package.json version on build.
|
|
19172
|
-
const VERSION = "7.1.
|
|
19237
|
+
const VERSION = "7.1.67";
|
|
19173
19238
|
|
|
19174
19239
|
exports.VERSION = VERSION;
|
|
19175
19240
|
exports.AbstractApi = AbstractApi;
|