bruce-models 3.1.5 → 3.1.6

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.
Files changed (35) hide show
  1. package/dist/bruce-models.es5.js +47 -25
  2. package/dist/bruce-models.es5.js.map +1 -1
  3. package/dist/bruce-models.umd.js +44 -24
  4. package/dist/bruce-models.umd.js.map +1 -1
  5. package/dist/lib/bruce-models.js +3 -1
  6. package/dist/lib/bruce-models.js.map +1 -1
  7. package/dist/lib/client-file/client-file.js.map +1 -1
  8. package/dist/lib/custom-form/custom-form.js.map +1 -1
  9. package/dist/lib/project/project-view-bookmark.js +0 -8
  10. package/dist/lib/project/project-view-bookmark.js.map +1 -1
  11. package/dist/lib/project/project-view-legacy-bookmark.js +12 -0
  12. package/dist/lib/project/project-view-legacy-bookmark.js.map +1 -0
  13. package/dist/lib/project/project-view-legacy-tile.js.map +1 -1
  14. package/dist/lib/project/project-view-legacy.js +12 -0
  15. package/dist/lib/project/project-view-legacy.js.map +1 -0
  16. package/dist/lib/project/project-view.js +1 -9
  17. package/dist/lib/project/project-view.js.map +1 -1
  18. package/dist/lib/user/permission.js +1 -0
  19. package/dist/lib/user/permission.js.map +1 -1
  20. package/dist/lib/util/object-utils.js +25 -6
  21. package/dist/lib/util/object-utils.js.map +1 -1
  22. package/dist/types/bruce-models.d.ts +3 -1
  23. package/dist/types/client-file/client-file.d.ts +5 -5
  24. package/dist/types/entity/entity-attachment.d.ts +1 -1
  25. package/dist/types/entity/entity-lod.d.ts +1 -1
  26. package/dist/types/entity/entity-type.d.ts +5 -5
  27. package/dist/types/entity/entity.d.ts +1 -1
  28. package/dist/types/import/imported-file.d.ts +1 -1
  29. package/dist/types/project/project-view-bookmark.d.ts +56 -113
  30. package/dist/types/project/project-view-legacy-bookmark.d.ts +62 -0
  31. package/dist/types/project/project-view-legacy.d.ts +49 -0
  32. package/dist/types/project/project-view.d.ts +30 -82
  33. package/dist/types/user/permission.d.ts +1 -0
  34. package/dist/types/util/object-utils.d.ts +2 -2
  35. package/package.json +1 -1
@@ -1934,15 +1934,34 @@
1934
1934
  })(exports.Color || (exports.Color = {}));
1935
1935
 
1936
1936
  (function (ObjectUtils) {
1937
+ const DEFAULT_LENGTH = 36;
1937
1938
  /**
1938
- * Generates a Bruce compatible UID.
1939
+ * Generates a Nextspace compatible UID.
1939
1940
  * @returns
1940
1941
  */
1941
- function UId() {
1942
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
1943
- const r = Math.random() * 16 | 0, v = c == "x" ? r : (r & 0x3 | 0x8);
1944
- return v.toString(16);
1945
- });
1942
+ function UId(length = DEFAULT_LENGTH) {
1943
+ if (!length) {
1944
+ length = DEFAULT_LENGTH;
1945
+ }
1946
+ if (length <= 0) {
1947
+ return "";
1948
+ }
1949
+ // Our default spec.
1950
+ if (length === DEFAULT_LENGTH) {
1951
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
1952
+ const r = Math.random() * 16 | 0, v = c === "x" ? r : (r & 0x3 | 0x8);
1953
+ return v.toString(16);
1954
+ });
1955
+ }
1956
+ // Arbitrary random hex string.
1957
+ else {
1958
+ let result = "";
1959
+ for (let i = 0; i < length; i++) {
1960
+ const randomHex = Math.random() * 16 | 0;
1961
+ result += randomHex.toString(16);
1962
+ }
1963
+ return result;
1964
+ }
1946
1965
  }
1947
1966
  ObjectUtils.UId = UId;
1948
1967
  })(exports.ObjectUtils || (exports.ObjectUtils = {}));
@@ -6017,14 +6036,6 @@
6017
6036
  // This is the expected default version for the DataVersion value.
6018
6037
  // This value should NOT be changed without looking at our API and seeing what the default value is.
6019
6038
  ProjectViewBookmark.DEFAULT_DATA_VERSION = 1;
6020
- let LegacyNavigator;
6021
- (function (LegacyNavigator) {
6022
- LegacyNavigator.DATA_VERSION = 1;
6023
- })(LegacyNavigator = ProjectViewBookmark.LegacyNavigator || (ProjectViewBookmark.LegacyNavigator = {}));
6024
- let Navigator;
6025
- (function (Navigator) {
6026
- Navigator.DATA_VERSION = 2;
6027
- })(Navigator = ProjectViewBookmark.Navigator || (ProjectViewBookmark.Navigator = {}));
6028
6039
  function Get(params) {
6029
6040
  return __awaiter(this, void 0, void 0, function* () {
6030
6041
  let { api, viewId, bookmarkId, req: reqParams } = params;
@@ -6170,15 +6181,7 @@
6170
6181
  ProjectView.GetListCacheKey = GetListCacheKey;
6171
6182
  // This is the expected default version for the DataVersion value.
6172
6183
  // This value should NOT be changed without looking at our API and seeing what the default value is.
6173
- ProjectView.DEFAULT_DATA_VERSION = 1;
6174
- let LegacyNavigator;
6175
- (function (LegacyNavigator) {
6176
- LegacyNavigator.DATA_VERSION = 1;
6177
- })(LegacyNavigator = ProjectView.LegacyNavigator || (ProjectView.LegacyNavigator = {}));
6178
- let Navigator;
6179
- (function (Navigator) {
6180
- Navigator.DATA_VERSION = 2;
6181
- })(Navigator = ProjectView.Navigator || (ProjectView.Navigator = {}));
6184
+ ProjectView.DEFAULT_DATA_VERSION = 2;
6182
6185
  function Get(params) {
6183
6186
  return __awaiter(this, void 0, void 0, function* () {
6184
6187
  let { api, viewId, req: reqParams } = params;
@@ -6479,6 +6482,22 @@
6479
6482
  ];
6480
6483
  })(exports.ProjectViewTile || (exports.ProjectViewTile = {}));
6481
6484
 
6485
+ /**
6486
+ * Deprecated Project View record.
6487
+ * This was used in the legacy web Navigator.
6488
+ */
6489
+ (function (ProjectViewLegacy) {
6490
+ ProjectViewLegacy.DATA_VERSION = 1;
6491
+ })(exports.ProjectViewLegacy || (exports.ProjectViewLegacy = {}));
6492
+
6493
+ /**
6494
+ * Deprecated Project View Bookmark record.
6495
+ * This was used in the legacy web Navigator.
6496
+ */
6497
+ (function (ProjectViewLegacyBookmark) {
6498
+ ProjectViewLegacyBookmark.DATA_VERSION = 1;
6499
+ })(exports.ProjectViewLegacyBookmark || (exports.ProjectViewLegacyBookmark = {}));
6500
+
6482
6501
  (function (PendingAction) {
6483
6502
  let EStatus;
6484
6503
  (function (EStatus) {
@@ -6678,6 +6697,7 @@
6678
6697
  let EPerm;
6679
6698
  (function (EPerm) {
6680
6699
  EPerm["ADMIN"] = "ADMIN";
6700
+ EPerm["ADMIN_VIEW"] = "ADMIN_VIEW";
6681
6701
  EPerm["LOGIN"] = "LOGIN";
6682
6702
  EPerm["DELETE_ENTITY_TYPE"] = "DELETE_ENTITY_TYPE";
6683
6703
  EPerm["CREATE_ENTITY_TYPE"] = "CREATE_ENTITY_TYPE";
@@ -8391,7 +8411,7 @@
8391
8411
  DataSource.GetList = GetList;
8392
8412
  })(exports.DataSource || (exports.DataSource = {}));
8393
8413
 
8394
- const VERSION = "3.1.5";
8414
+ const VERSION = "3.1.6";
8395
8415
 
8396
8416
  exports.VERSION = VERSION;
8397
8417
  exports.AbstractApi = AbstractApi;