bruce-models 6.9.8 → 7.0.0
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 +33 -12
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +33 -12
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/ann-document/ann-document.js +17 -5
- package/dist/lib/ann-document/ann-document.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/style/style.js +15 -6
- package/dist/lib/style/style.js.map +1 -1
- package/dist/types/ann-document/ann-document.d.ts +5 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/style/style.d.ts +4 -1
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -2163,14 +2163,14 @@
|
|
|
2163
2163
|
*/
|
|
2164
2164
|
function GetList(params) {
|
|
2165
2165
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2166
|
-
let { api, docType: type, req: reqParams, entityId, expandSettings } = params;
|
|
2166
|
+
let { api, docType: type, req: reqParams, entityId, expandSettings, pageIndex, pageSize } = params;
|
|
2167
2167
|
if (!api) {
|
|
2168
2168
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
2169
2169
|
}
|
|
2170
2170
|
if (!type) {
|
|
2171
2171
|
type = "";
|
|
2172
2172
|
}
|
|
2173
|
-
const cache = api.GetCacheItem(GetListCacheKey(type, entityId, expandSettings), reqParams);
|
|
2173
|
+
const cache = api.GetCacheItem(GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize), reqParams);
|
|
2174
2174
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
2175
2175
|
return cache.data;
|
|
2176
2176
|
}
|
|
@@ -2186,6 +2186,10 @@
|
|
|
2186
2186
|
if (expandSettings) {
|
|
2187
2187
|
urlParams.append("expandSettings", "true");
|
|
2188
2188
|
}
|
|
2189
|
+
if (pageIndex !== undefined || pageSize !== undefined) {
|
|
2190
|
+
urlParams.append("PageIndex", String(pageIndex || 0));
|
|
2191
|
+
urlParams.append("PageSize", String(pageSize || 0));
|
|
2192
|
+
}
|
|
2189
2193
|
const url = "documentViews" + `?${urlParams.toString()}`;
|
|
2190
2194
|
const data = yield api.GET(url, exports.Api.PrepReqParams(reqParams));
|
|
2191
2195
|
res({
|
|
@@ -2197,7 +2201,7 @@
|
|
|
2197
2201
|
}
|
|
2198
2202
|
}));
|
|
2199
2203
|
api.SetCacheItem({
|
|
2200
|
-
key: GetListCacheKey(type, entityId, expandSettings),
|
|
2204
|
+
key: GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize),
|
|
2201
2205
|
value: req,
|
|
2202
2206
|
req: reqParams
|
|
2203
2207
|
});
|
|
@@ -2229,16 +2233,24 @@
|
|
|
2229
2233
|
* @param type
|
|
2230
2234
|
* @param entityId
|
|
2231
2235
|
* @param expandSettings
|
|
2236
|
+
* @param pageIndex
|
|
2237
|
+
* @param pageSize
|
|
2232
2238
|
* @returns
|
|
2233
2239
|
*/
|
|
2234
|
-
function GetListCacheKey(type, entityId, expandSettings) {
|
|
2240
|
+
function GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize) {
|
|
2235
2241
|
if (!expandSettings) {
|
|
2236
2242
|
expandSettings = false;
|
|
2237
2243
|
}
|
|
2238
2244
|
if (!entityId) {
|
|
2239
2245
|
entityId = "";
|
|
2240
2246
|
}
|
|
2241
|
-
|
|
2247
|
+
if (!pageIndex) {
|
|
2248
|
+
pageIndex = 0;
|
|
2249
|
+
}
|
|
2250
|
+
if (!pageSize) {
|
|
2251
|
+
pageSize = 0;
|
|
2252
|
+
}
|
|
2253
|
+
return exports.Api.ECacheKey.AnnDocument + type + entityId + expandSettings + pageIndex + "_" + pageSize;
|
|
2242
2254
|
}
|
|
2243
2255
|
AnnDocument.GetListCacheKey = GetListCacheKey;
|
|
2244
2256
|
})(exports.AnnDocument || (exports.AnnDocument = {}));
|
|
@@ -8429,17 +8441,26 @@
|
|
|
8429
8441
|
*/
|
|
8430
8442
|
function GetList(params) {
|
|
8431
8443
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8432
|
-
let { api, req: reqParams } = params;
|
|
8444
|
+
let { api, req: reqParams, pageIndex, pageSize, expandSettings } = params;
|
|
8433
8445
|
if (!api) {
|
|
8434
8446
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
8435
8447
|
}
|
|
8436
|
-
const cache = api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
8448
|
+
const cache = api.GetCacheItem(GetListCacheKey(pageIndex, pageSize, expandSettings), reqParams);
|
|
8437
8449
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
8438
8450
|
return cache.data;
|
|
8439
8451
|
}
|
|
8440
8452
|
const res = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
8441
8453
|
try {
|
|
8442
|
-
const
|
|
8454
|
+
const urlParams = new URLSearchParams();
|
|
8455
|
+
if (pageIndex !== undefined || pageSize !== undefined) {
|
|
8456
|
+
urlParams.append("PageIndex", String(pageIndex || 0));
|
|
8457
|
+
urlParams.append("PageSize", String(pageSize || 0));
|
|
8458
|
+
}
|
|
8459
|
+
if (expandSettings) {
|
|
8460
|
+
urlParams.append("settings", "true");
|
|
8461
|
+
}
|
|
8462
|
+
const url = "ui.entityDisplaySettings" + `?${urlParams.toString()}`;
|
|
8463
|
+
const data = yield api.GET(url, exports.Api.PrepReqParams(reqParams));
|
|
8443
8464
|
res({
|
|
8444
8465
|
styles: data.Items
|
|
8445
8466
|
});
|
|
@@ -8449,7 +8470,7 @@
|
|
|
8449
8470
|
}
|
|
8450
8471
|
}));
|
|
8451
8472
|
api.SetCacheItem({
|
|
8452
|
-
key: GetListCacheKey(),
|
|
8473
|
+
key: GetListCacheKey(pageIndex, pageSize, expandSettings),
|
|
8453
8474
|
value: res,
|
|
8454
8475
|
req: reqParams
|
|
8455
8476
|
});
|
|
@@ -8563,8 +8584,8 @@
|
|
|
8563
8584
|
* }
|
|
8564
8585
|
* @returns
|
|
8565
8586
|
*/
|
|
8566
|
-
function GetListCacheKey() {
|
|
8567
|
-
return exports.Api.ECacheKey.Style;
|
|
8587
|
+
function GetListCacheKey(pageSize, pageIndex, expandSettings) {
|
|
8588
|
+
return exports.Api.ECacheKey.Style + (pageIndex || 0) + "_" + (pageSize || 0) + "_" + (expandSettings ? 1 : 0);
|
|
8568
8589
|
}
|
|
8569
8590
|
Style.GetListCacheKey = GetListCacheKey;
|
|
8570
8591
|
})(exports.Style || (exports.Style = {}));
|
|
@@ -16672,7 +16693,7 @@
|
|
|
16672
16693
|
}
|
|
16673
16694
|
|
|
16674
16695
|
// This is updated with the package.json version on build.
|
|
16675
|
-
const VERSION = "
|
|
16696
|
+
const VERSION = "7.0.0";
|
|
16676
16697
|
|
|
16677
16698
|
exports.VERSION = VERSION;
|
|
16678
16699
|
exports.AbstractApi = AbstractApi;
|