bruce-models 6.9.8 → 6.9.9

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.
@@ -2190,14 +2190,14 @@ var AnnDocument;
2190
2190
  */
2191
2191
  function GetList(params) {
2192
2192
  return __awaiter(this, void 0, void 0, function* () {
2193
- let { api, docType: type, req: reqParams, entityId, expandSettings } = params;
2193
+ let { api, docType: type, req: reqParams, entityId, expandSettings, pageIndex, pageSize } = params;
2194
2194
  if (!api) {
2195
2195
  api = ENVIRONMENT.Api().GetBruceApi();
2196
2196
  }
2197
2197
  if (!type) {
2198
2198
  type = "";
2199
2199
  }
2200
- const cache = api.GetCacheItem(GetListCacheKey(type, entityId, expandSettings), reqParams);
2200
+ const cache = api.GetCacheItem(GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize), reqParams);
2201
2201
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
2202
2202
  return cache.data;
2203
2203
  }
@@ -2213,6 +2213,10 @@ var AnnDocument;
2213
2213
  if (expandSettings) {
2214
2214
  urlParams.append("expandSettings", "true");
2215
2215
  }
2216
+ if (pageIndex !== undefined || pageSize !== undefined) {
2217
+ urlParams.append("PageIndex", String(pageIndex || 0));
2218
+ urlParams.append("PageSize", String(pageSize || 0));
2219
+ }
2216
2220
  const url = "documentViews" + `?${urlParams.toString()}`;
2217
2221
  const data = yield api.GET(url, Api.PrepReqParams(reqParams));
2218
2222
  res({
@@ -2224,7 +2228,7 @@ var AnnDocument;
2224
2228
  }
2225
2229
  }));
2226
2230
  api.SetCacheItem({
2227
- key: GetListCacheKey(type, entityId, expandSettings),
2231
+ key: GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize),
2228
2232
  value: req,
2229
2233
  req: reqParams
2230
2234
  });
@@ -2256,16 +2260,24 @@ var AnnDocument;
2256
2260
  * @param type
2257
2261
  * @param entityId
2258
2262
  * @param expandSettings
2263
+ * @param pageIndex
2264
+ * @param pageSize
2259
2265
  * @returns
2260
2266
  */
2261
- function GetListCacheKey(type, entityId, expandSettings) {
2267
+ function GetListCacheKey(type, entityId, expandSettings, pageIndex, pageSize) {
2262
2268
  if (!expandSettings) {
2263
2269
  expandSettings = false;
2264
2270
  }
2265
2271
  if (!entityId) {
2266
2272
  entityId = "";
2267
2273
  }
2268
- return Api.ECacheKey.AnnDocument + type + entityId + expandSettings;
2274
+ if (!pageIndex) {
2275
+ pageIndex = 0;
2276
+ }
2277
+ if (!pageSize) {
2278
+ pageSize = 0;
2279
+ }
2280
+ return Api.ECacheKey.AnnDocument + type + entityId + expandSettings + pageIndex + "_" + pageSize;
2269
2281
  }
2270
2282
  AnnDocument.GetListCacheKey = GetListCacheKey;
2271
2283
  })(AnnDocument || (AnnDocument = {}));
@@ -8578,17 +8590,23 @@ var Style;
8578
8590
  */
8579
8591
  function GetList(params) {
8580
8592
  return __awaiter(this, void 0, void 0, function* () {
8581
- let { api, req: reqParams } = params;
8593
+ let { api, req: reqParams, pageIndex, pageSize } = params;
8582
8594
  if (!api) {
8583
8595
  api = ENVIRONMENT.Api().GetBruceApi();
8584
8596
  }
8585
- const cache = api.GetCacheItem(GetListCacheKey(), reqParams);
8597
+ const cache = api.GetCacheItem(GetListCacheKey(pageIndex, pageSize), reqParams);
8586
8598
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
8587
8599
  return cache.data;
8588
8600
  }
8589
8601
  const res = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
8590
8602
  try {
8591
- const data = yield api.GET("ui.entityDisplaySettings", Api.PrepReqParams(reqParams));
8603
+ const urlParams = new URLSearchParams();
8604
+ if (pageIndex !== undefined || pageSize !== undefined) {
8605
+ urlParams.append("PageIndex", String(pageIndex || 0));
8606
+ urlParams.append("PageSize", String(pageSize || 0));
8607
+ }
8608
+ const url = "ui.entityDisplaySettings" + `?${urlParams.toString()}`;
8609
+ const data = yield api.GET(url, Api.PrepReqParams(reqParams));
8592
8610
  res({
8593
8611
  styles: data.Items
8594
8612
  });
@@ -8598,7 +8616,7 @@ var Style;
8598
8616
  }
8599
8617
  }));
8600
8618
  api.SetCacheItem({
8601
- key: GetListCacheKey(),
8619
+ key: GetListCacheKey(pageIndex, pageSize),
8602
8620
  value: res,
8603
8621
  req: reqParams
8604
8622
  });
@@ -8712,8 +8730,8 @@ var Style;
8712
8730
  * }
8713
8731
  * @returns
8714
8732
  */
8715
- function GetListCacheKey() {
8716
- return Api.ECacheKey.Style;
8733
+ function GetListCacheKey(pageSize, pageIndex) {
8734
+ return Api.ECacheKey.Style + (pageIndex || 0) + "_" + (pageSize || 0);
8717
8735
  }
8718
8736
  Style.GetListCacheKey = GetListCacheKey;
8719
8737
  })(Style || (Style = {}));
@@ -16987,7 +17005,7 @@ class NavigatorMcpWebSocketClient {
16987
17005
  }
16988
17006
 
16989
17007
  // This is updated with the package.json version on build.
16990
- const VERSION = "6.9.8";
17008
+ const VERSION = "6.9.9";
16991
17009
 
16992
17010
  export { VERSION, Assembly, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, GeoJson, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityCoords, EntityAttribute, EntityHistoricData, EntityTableView, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewBookmarkGroup, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, UserMfaMethod, Account, AccountInvite, AccountFeatures, AccountLimits, AccountTemplate, AccountType, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, DataLabGroup, ImportAssembly, ImportCad, ImportCsv, ImportJson, ImportGeoJson, ImportKml, ImportedFile, ExportBrz, ExportUsd, Markup, Uploader, Plugin, ENVIRONMENT, DataSource, Scenario, Tracking, NavigatorChatClient, NavigatorMcpWebSocketClient };
16993
17011
  //# sourceMappingURL=bruce-models.es5.js.map