bruce-models 6.6.8 → 6.7.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.
@@ -11216,26 +11216,41 @@ var ProjectView;
11216
11216
  if (!api) {
11217
11217
  api = ENVIRONMENT.Api().GetBruceApi();
11218
11218
  }
11219
- const cache = api.GetCacheItem(GetListCacheKey(type), reqParams);
11220
- if (cache === null || cache === void 0 ? void 0 : cache.found) {
11221
- return cache.data;
11222
- }
11223
11219
  const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
11224
11220
  try {
11225
- const data = yield api.GET("ui.view/list", Api.PrepReqParams(reqParams));
11221
+ const queryParams = new URLSearchParams();
11222
+ if (params.search) {
11223
+ queryParams.set("Search", params.search);
11224
+ }
11225
+ if (params.pageSize) {
11226
+ queryParams.set("PageSize", params.pageSize.toString());
11227
+ }
11228
+ if (params.pageIndex) {
11229
+ queryParams.set("PageIndex", params.pageIndex.toString());
11230
+ }
11231
+ if (params.orderBy) {
11232
+ queryParams.set("OrderBy", params.orderBy);
11233
+ }
11234
+ if (params.sortOrder) {
11235
+ queryParams.set("SortOrder", params.sortOrder);
11236
+ }
11237
+ if (type) {
11238
+ queryParams.set("type", type);
11239
+ }
11240
+ if (params.expand) {
11241
+ queryParams.set("expand", "true");
11242
+ }
11243
+ const url = `ui.view/list?${queryParams.toString()}`;
11244
+ const data = yield api.GET(url, Api.PrepReqParams(reqParams));
11226
11245
  res({
11227
- views: data.Items
11246
+ views: data.Items,
11247
+ totalCount: data.TotalCount
11228
11248
  });
11229
11249
  }
11230
11250
  catch (e) {
11231
11251
  rej(e);
11232
11252
  }
11233
11253
  }));
11234
- api.SetCacheItem({
11235
- key: GetListCacheKey(type),
11236
- value: prom,
11237
- req: reqParams
11238
- });
11239
11254
  return prom;
11240
11255
  });
11241
11256
  }
@@ -11255,7 +11270,6 @@ var ProjectView;
11255
11270
  }
11256
11271
  yield api.DELETE(`ui.view/${viewId}`, Api.PrepReqParams(reqParams));
11257
11272
  api.Cache.Remove(GetCacheKey(viewId));
11258
- api.Cache.RemoveByStartsWith(GetListCacheKey());
11259
11273
  });
11260
11274
  }
11261
11275
  ProjectView.Delete = Delete;
@@ -11292,7 +11306,6 @@ var ProjectView;
11292
11306
  data = yield api.PUT(`ui.view/${data.ID}`, data, Api.PrepReqParams(reqParams));
11293
11307
  }
11294
11308
  api.Cache.Remove(GetCacheKey(data.ID));
11295
- api.Cache.RemoveByStartsWith(GetListCacheKey());
11296
11309
  return {
11297
11310
  view: data
11298
11311
  };
@@ -11313,23 +11326,6 @@ var ProjectView;
11313
11326
  return `${Api.ECacheKey.ProjectView}${Api.ECacheKey.Id}${viewId}`;
11314
11327
  }
11315
11328
  ProjectView.GetCacheKey = GetCacheKey;
11316
- /**
11317
- * Returns cache identifier for a list of project views.
11318
- * Example: {
11319
- * const api: BruceApi.Api = ...;
11320
- * const key = GetListCacheKey();
11321
- * api.Cache.Remove(key);
11322
- * }
11323
- * @param type optional filter for the type of project view.
11324
- * @returns
11325
- */
11326
- function GetListCacheKey(type) {
11327
- if (type) {
11328
- return `${Api.ECacheKey.ProjectView}${Api.ECacheKey.ListId}${type}`;
11329
- }
11330
- return `${Api.ECacheKey.ProjectView}${Api.ECacheKey.ListId}`;
11331
- }
11332
- ProjectView.GetListCacheKey = GetListCacheKey;
11333
11329
  })(ProjectView || (ProjectView = {}));
11334
11330
 
11335
11331
  function getTemplateSettings(apiGetter, reqParams) {
@@ -16442,7 +16438,7 @@ var Tracking;
16442
16438
  })(Tracking || (Tracking = {}));
16443
16439
 
16444
16440
  // This is updated with the package.json version on build.
16445
- const VERSION = "6.6.8";
16441
+ const VERSION = "6.7.0";
16446
16442
 
16447
16443
  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 };
16448
16444
  //# sourceMappingURL=bruce-models.es5.js.map