@itwin/presentation-backend 5.1.0-dev.7 → 5.1.0-dev.71
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/CHANGELOG.md +69 -1
- package/lib/cjs/presentation-backend/BackendLoggerCategory.d.ts +9 -9
- package/lib/cjs/presentation-backend/BackendLoggerCategory.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/BackendLoggerCategory.js +9 -9
- package/lib/cjs/presentation-backend/BackendLoggerCategory.js.map +1 -1
- package/lib/cjs/presentation-backend/Presentation.d.ts +3 -3
- package/lib/cjs/presentation-backend/Presentation.js.map +1 -1
- package/lib/cjs/presentation-backend/PresentationManager.d.ts +19 -8
- package/lib/cjs/presentation-backend/PresentationManager.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/PresentationManager.js +27 -18
- package/lib/cjs/presentation-backend/PresentationManager.js.map +1 -1
- package/lib/cjs/presentation-backend/PresentationManagerDetail.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/PresentationManagerDetail.js +14 -8
- package/lib/cjs/presentation-backend/PresentationManagerDetail.js.map +1 -1
- package/lib/cjs/presentation-backend/PresentationRpcImpl.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/PresentationRpcImpl.js +3 -16
- package/lib/cjs/presentation-backend/PresentationRpcImpl.js.map +1 -1
- package/lib/cjs/presentation-backend/RulesetEmbedder.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/RulesetEmbedder.js +13 -7
- package/lib/cjs/presentation-backend/RulesetEmbedder.js.map +1 -1
- package/lib/cjs/presentation-backend/SelectionScopesHelper.js.map +1 -1
- package/lib/cjs/presentation-backend/Utils.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/Utils.js.map +1 -1
- package/lib/cjs/presentation-backend.js +20 -0
- package/lib/cjs/presentation-backend.js.map +1 -1
- package/lib/esm/presentation-backend/BackendLoggerCategory.d.ts +9 -9
- package/lib/esm/presentation-backend/BackendLoggerCategory.d.ts.map +1 -1
- package/lib/esm/presentation-backend/BackendLoggerCategory.js +9 -9
- package/lib/esm/presentation-backend/BackendLoggerCategory.js.map +1 -1
- package/lib/esm/presentation-backend/Presentation.d.ts +3 -3
- package/lib/esm/presentation-backend/Presentation.js.map +1 -1
- package/lib/esm/presentation-backend/PresentationManager.d.ts +19 -8
- package/lib/esm/presentation-backend/PresentationManager.d.ts.map +1 -1
- package/lib/esm/presentation-backend/PresentationManager.js +27 -18
- package/lib/esm/presentation-backend/PresentationManager.js.map +1 -1
- package/lib/esm/presentation-backend/PresentationManagerDetail.d.ts.map +1 -1
- package/lib/esm/presentation-backend/PresentationManagerDetail.js +9 -3
- package/lib/esm/presentation-backend/PresentationManagerDetail.js.map +1 -1
- package/lib/esm/presentation-backend/PresentationRpcImpl.d.ts.map +1 -1
- package/lib/esm/presentation-backend/PresentationRpcImpl.js +5 -18
- package/lib/esm/presentation-backend/PresentationRpcImpl.js.map +1 -1
- package/lib/esm/presentation-backend/RulesetEmbedder.d.ts.map +1 -1
- package/lib/esm/presentation-backend/RulesetEmbedder.js +13 -7
- package/lib/esm/presentation-backend/RulesetEmbedder.js.map +1 -1
- package/lib/esm/presentation-backend/SelectionScopesHelper.js.map +1 -1
- package/lib/esm/presentation-backend/Utils.d.ts.map +1 -1
- package/lib/esm/presentation-backend/Utils.js +2 -2
- package/lib/esm/presentation-backend/Utils.js.map +1 -1
- package/lib/esm/presentation-backend.js +20 -0
- package/lib/esm/presentation-backend.js.map +1 -1
- package/package.json +19 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,74 @@
|
|
|
1
1
|
# Change Log - @itwin/presentation-backend
|
|
2
2
|
|
|
3
|
-
This log was last generated on Wed,
|
|
3
|
+
This log was last generated on Wed, 16 Jul 2025 15:01:35 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 5.0.4
|
|
6
|
+
Wed, 16 Jul 2025 14:59:59 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 5.0.3
|
|
11
|
+
Fri, 11 Jul 2025 00:56:56 GMT
|
|
12
|
+
|
|
13
|
+
_Version update only_
|
|
14
|
+
|
|
15
|
+
## 5.0.2
|
|
16
|
+
Thu, 26 Jun 2025 22:16:01 GMT
|
|
17
|
+
|
|
18
|
+
_Version update only_
|
|
19
|
+
|
|
20
|
+
## 5.0.1
|
|
21
|
+
Tue, 17 Jun 2025 18:33:52 GMT
|
|
22
|
+
|
|
23
|
+
_Version update only_
|
|
24
|
+
|
|
25
|
+
## 5.0.0
|
|
26
|
+
Fri, 13 Jun 2025 20:25:38 GMT
|
|
27
|
+
|
|
28
|
+
### Updates
|
|
29
|
+
|
|
30
|
+
- Add Symbols to prevent duplicate instances of package
|
|
31
|
+
- Depreciate ECSqlStatement API
|
|
32
|
+
- Dropped support for Node 18
|
|
33
|
+
- Fix `getDisplayLabelDefinitions` implementation not taking into account different formats and casings of full class name.
|
|
34
|
+
- Added ESM support
|
|
35
|
+
- Add `type: "module"` to `package.json` to tell Node.js to load this package as ESM by default.
|
|
36
|
+
- Deprecate unified selection related APIs.
|
|
37
|
+
- Log ruleset ID rather than the whole ruleset in INFO level logs
|
|
38
|
+
- Fix Presentation RPC returning details contained within thrown errors. Instead of doing that, we now re-throw the error and let RPC system handle it (by re-throwing a generic error instead).
|
|
39
|
+
- Add `PresentationManager.getElementProperties` overload for specifying elements by id rather than class name.
|
|
40
|
+
- Remove `@internal` APIs from public barrel exports file.
|
|
41
|
+
- Clean up APIs deprecated in 3.x
|
|
42
|
+
- Clean up APIs deprecated in 3.x
|
|
43
|
+
- Return errors in a way native to our RPC system. For web cases that also means proper HTTP response status codes.
|
|
44
|
+
- Change core peer dependencies to strict version.
|
|
45
|
+
|
|
46
|
+
## 4.11.6
|
|
47
|
+
Mon, 16 Jun 2025 15:00:15 GMT
|
|
48
|
+
|
|
49
|
+
_Version update only_
|
|
50
|
+
|
|
51
|
+
## 4.11.5
|
|
52
|
+
Fri, 06 Jun 2025 13:41:18 GMT
|
|
53
|
+
|
|
54
|
+
### Updates
|
|
55
|
+
|
|
56
|
+
- Fix `getDisplayLabelDefinitions` implementation not taking into account different formats and casings of full class name.
|
|
57
|
+
|
|
58
|
+
## 4.11.4
|
|
59
|
+
Tue, 03 Jun 2025 16:15:19 GMT
|
|
60
|
+
|
|
61
|
+
_Version update only_
|
|
62
|
+
|
|
63
|
+
## 4.11.3
|
|
64
|
+
Wed, 28 May 2025 13:56:23 GMT
|
|
65
|
+
|
|
66
|
+
_Version update only_
|
|
67
|
+
|
|
68
|
+
## 4.11.2
|
|
69
|
+
Tue, 20 May 2025 20:14:46 GMT
|
|
70
|
+
|
|
71
|
+
_Version update only_
|
|
4
72
|
|
|
5
73
|
## 4.11.1
|
|
6
74
|
Wed, 30 Apr 2025 13:13:21 GMT
|
|
@@ -40,23 +40,23 @@ export declare enum PresentationBackendNativeLoggerCategory {
|
|
|
40
40
|
ECPresentation_RulesetVariables = "ECPresentation.RulesetVariables",
|
|
41
41
|
ECPresentation_ECExpressions = "ECPresentation.ECExpressions",
|
|
42
42
|
ECPresentation_Serialization = "ECPresentation.Serialization",
|
|
43
|
-
/** @deprecated in 4.0. The logging namespace is not used anymore. */
|
|
43
|
+
/** @deprecated in 4.0 - will not be removed until after 2026-06-13. The logging namespace is not used anymore. */
|
|
44
44
|
ECPresentation_Localization = "ECPresentation.Localization",
|
|
45
|
-
/** @deprecated in 4.0. Use [[ECPresentation]] */
|
|
45
|
+
/** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation]] */
|
|
46
46
|
ECPresentation_RulesEngine = "ECPresentation.RulesEngine",
|
|
47
|
-
/** @deprecated in 4.0. Use [[ECPresentation_Content]] */
|
|
47
|
+
/** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Content]] */
|
|
48
48
|
ECPresentation_RulesEngine_Content = "ECPresentation.Content",
|
|
49
|
-
/** @deprecated in 4.0. The logging namespace is not used anymore. */
|
|
49
|
+
/** @deprecated in 4.0 - will not be removed until after 2026-06-13. The logging namespace is not used anymore. */
|
|
50
50
|
ECPresentation_RulesEngine_Localization = "ECPresentation.Localization",
|
|
51
|
-
/** @deprecated in 4.0. Use [[ECPresentation_Hierarchies]] */
|
|
51
|
+
/** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Hierarchies]] */
|
|
52
52
|
ECPresentation_RulesEngine_Navigation = "ECPresentation.Navigation",
|
|
53
|
-
/** @deprecated in 4.0. Use [[ECPresentation_Hierarchies_Cache]] */
|
|
53
|
+
/** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Hierarchies_Cache]] */
|
|
54
54
|
ECPresentation_RulesEngine_Navigation_Cache = "ECPresentation.Navigation.Cache",
|
|
55
|
-
/** @deprecated in 4.0. Use [[ECPresentation_Tasks]] */
|
|
55
|
+
/** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Tasks]] */
|
|
56
56
|
ECPresentation_RulesEngine_Threads = "ECPresentation.Tasks",
|
|
57
|
-
/** @deprecated in 4.0. Use [[ECPresentation_Update]] */
|
|
57
|
+
/** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Update]] */
|
|
58
58
|
ECPresentation_RulesEngine_Update = "ECPresentation.Update",
|
|
59
|
-
/** @deprecated in 4.0. Use [[ECPresentation_RulesetVariables]] */
|
|
59
|
+
/** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_RulesetVariables]] */
|
|
60
60
|
ECPresentation_RulesEngine_RulesetVariables = "ECPresentation.RulesetVariables"
|
|
61
61
|
}
|
|
62
62
|
//# sourceMappingURL=BackendLoggerCategory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackendLoggerCategory.d.ts","sourceRoot":"","sources":["../../../src/presentation-backend/BackendLoggerCategory.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;;;GAKG;AACH,oBAAY,iCAAiC;IAC3C,OAAO,yBAAyB;IAEhC,+FAA+F;IAC/F,mBAAmB,6CAA6C;IAEhE,mEAAmE;IACnE,GAAG,6BAA6B;IAEhC,mEAAmE;IACnE,GAAG,6BAA6B;CACjC;AAED;;;;;GAKG;AACH,oBAAY,uCAAuC;IACjD,SAAS,cAAc;IACvB,uBAAuB,4BAA4B;IACnD,6BAA6B,kCAAkC;IAC/D,gCAAgC,qCAAqC;IAErE,cAAc,mBAAmB;IACjC,0BAA0B,+BAA+B;IACzD,oBAAoB,yBAAyB;IAC7C,0BAA0B,8BAA8B;IACxD,gCAAgC,oCAAoC;IACpE,sBAAsB,2BAA2B;IACjD,qBAAqB,0BAA0B;IAC/C,iCAAiC,sCAAsC;IACvE,6BAA6B,kCAAkC;IAC/D,oBAAoB,yBAAyB;IAC7C,+BAA+B,oCAAoC;IACnE,4BAA4B,iCAAiC;IAC7D,4BAA4B,iCAAiC;IAG7D,
|
|
1
|
+
{"version":3,"file":"BackendLoggerCategory.d.ts","sourceRoot":"","sources":["../../../src/presentation-backend/BackendLoggerCategory.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;;;GAKG;AACH,oBAAY,iCAAiC;IAC3C,OAAO,yBAAyB;IAEhC,+FAA+F;IAC/F,mBAAmB,6CAA6C;IAEhE,mEAAmE;IACnE,GAAG,6BAA6B;IAEhC,mEAAmE;IACnE,GAAG,6BAA6B;CACjC;AAED;;;;;GAKG;AACH,oBAAY,uCAAuC;IACjD,SAAS,cAAc;IACvB,uBAAuB,4BAA4B;IACnD,6BAA6B,kCAAkC;IAC/D,gCAAgC,qCAAqC;IAErE,cAAc,mBAAmB;IACjC,0BAA0B,+BAA+B;IACzD,oBAAoB,yBAAyB;IAC7C,0BAA0B,8BAA8B;IACxD,gCAAgC,oCAAoC;IACpE,sBAAsB,2BAA2B;IACjD,qBAAqB,0BAA0B;IAC/C,iCAAiC,sCAAsC;IACvE,6BAA6B,kCAAkC;IAC/D,oBAAoB,yBAAyB;IAC7C,+BAA+B,oCAAoC;IACnE,4BAA4B,iCAAiC;IAC7D,4BAA4B,iCAAiC;IAG7D,kHAAkH;IAClH,2BAA2B,gCAAgC;IAC3D,8FAA8F;IAC9F,0BAA0B,+BAA+B;IACzD,sGAAsG;IACtG,kCAAkC,2BAA2B;IAC7D,kHAAkH;IAClH,uCAAuC,gCAAgC;IACvE,0GAA0G;IAC1G,qCAAqC,8BAA8B;IACnE,gHAAgH;IAChH,2CAA2C,oCAAoC;IAC/E,oGAAoG;IACpG,kCAAkC,yBAAyB;IAC3D,qGAAqG;IACrG,iCAAiC,0BAA0B;IAC3D,+GAA+G;IAC/G,2CAA2C,oCAAoC;CAChF"}
|
|
@@ -50,23 +50,23 @@ var PresentationBackendNativeLoggerCategory;
|
|
|
50
50
|
PresentationBackendNativeLoggerCategory["ECPresentation_ECExpressions"] = "ECPresentation.ECExpressions";
|
|
51
51
|
PresentationBackendNativeLoggerCategory["ECPresentation_Serialization"] = "ECPresentation.Serialization";
|
|
52
52
|
/* eslint-disable @typescript-eslint/no-duplicate-enum-values */
|
|
53
|
-
/** @deprecated in 4.0. The logging namespace is not used anymore. */
|
|
53
|
+
/** @deprecated in 4.0 - will not be removed until after 2026-06-13. The logging namespace is not used anymore. */
|
|
54
54
|
PresentationBackendNativeLoggerCategory["ECPresentation_Localization"] = "ECPresentation.Localization";
|
|
55
|
-
/** @deprecated in 4.0. Use [[ECPresentation]] */
|
|
55
|
+
/** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation]] */
|
|
56
56
|
PresentationBackendNativeLoggerCategory["ECPresentation_RulesEngine"] = "ECPresentation.RulesEngine";
|
|
57
|
-
/** @deprecated in 4.0. Use [[ECPresentation_Content]] */
|
|
57
|
+
/** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Content]] */
|
|
58
58
|
PresentationBackendNativeLoggerCategory["ECPresentation_RulesEngine_Content"] = "ECPresentation.Content";
|
|
59
|
-
/** @deprecated in 4.0. The logging namespace is not used anymore. */
|
|
59
|
+
/** @deprecated in 4.0 - will not be removed until after 2026-06-13. The logging namespace is not used anymore. */
|
|
60
60
|
PresentationBackendNativeLoggerCategory["ECPresentation_RulesEngine_Localization"] = "ECPresentation.Localization";
|
|
61
|
-
/** @deprecated in 4.0. Use [[ECPresentation_Hierarchies]] */
|
|
61
|
+
/** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Hierarchies]] */
|
|
62
62
|
PresentationBackendNativeLoggerCategory["ECPresentation_RulesEngine_Navigation"] = "ECPresentation.Navigation";
|
|
63
|
-
/** @deprecated in 4.0. Use [[ECPresentation_Hierarchies_Cache]] */
|
|
63
|
+
/** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Hierarchies_Cache]] */
|
|
64
64
|
PresentationBackendNativeLoggerCategory["ECPresentation_RulesEngine_Navigation_Cache"] = "ECPresentation.Navigation.Cache";
|
|
65
|
-
/** @deprecated in 4.0. Use [[ECPresentation_Tasks]] */
|
|
65
|
+
/** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Tasks]] */
|
|
66
66
|
PresentationBackendNativeLoggerCategory["ECPresentation_RulesEngine_Threads"] = "ECPresentation.Tasks";
|
|
67
|
-
/** @deprecated in 4.0. Use [[ECPresentation_Update]] */
|
|
67
|
+
/** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Update]] */
|
|
68
68
|
PresentationBackendNativeLoggerCategory["ECPresentation_RulesEngine_Update"] = "ECPresentation.Update";
|
|
69
|
-
/** @deprecated in 4.0. Use [[ECPresentation_RulesetVariables]] */
|
|
69
|
+
/** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_RulesetVariables]] */
|
|
70
70
|
PresentationBackendNativeLoggerCategory["ECPresentation_RulesEngine_RulesetVariables"] = "ECPresentation.RulesetVariables";
|
|
71
71
|
})(PresentationBackendNativeLoggerCategory || (exports.PresentationBackendNativeLoggerCategory = PresentationBackendNativeLoggerCategory = {}));
|
|
72
72
|
//# sourceMappingURL=BackendLoggerCategory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackendLoggerCategory.js","sourceRoot":"","sources":["../../../src/presentation-backend/BackendLoggerCategory.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH;;;;;GAKG;AACH,IAAY,iCAWX;AAXD,WAAY,iCAAiC;IAC3C,qEAAgC,CAAA;IAEhC,+FAA+F;IAC/F,qGAAgE,CAAA;IAEhE,mEAAmE;IACnE,qEAAgC,CAAA;IAEhC,mEAAmE;IACnE,qEAAgC,CAAA;AAClC,CAAC,EAXW,iCAAiC,iDAAjC,iCAAiC,QAW5C;AAED;;;;;GAKG;AACH,IAAY,uCAuCX;AAvCD,WAAY,uCAAuC;IACjD,kEAAuB,CAAA;IACvB,8FAAmD,CAAA;IACnD,0GAA+D,CAAA;IAC/D,gHAAqE,CAAA;IAErE,4EAAiC,CAAA;IACjC,oGAAyD,CAAA;IACzD,wFAA6C,CAAA;IAC7C,mGAAwD,CAAA;IACxD,+GAAoE,CAAA;IACpE,4FAAiD,CAAA;IACjD,0FAA+C,CAAA;IAC/C,kHAAuE,CAAA;IACvE,0GAA+D,CAAA;IAC/D,wFAA6C,CAAA;IAC7C,8GAAmE,CAAA;IACnE,wGAA6D,CAAA;IAC7D,wGAA6D,CAAA;IAE7D,gEAAgE;IAChE,
|
|
1
|
+
{"version":3,"file":"BackendLoggerCategory.js","sourceRoot":"","sources":["../../../src/presentation-backend/BackendLoggerCategory.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH;;;;;GAKG;AACH,IAAY,iCAWX;AAXD,WAAY,iCAAiC;IAC3C,qEAAgC,CAAA;IAEhC,+FAA+F;IAC/F,qGAAgE,CAAA;IAEhE,mEAAmE;IACnE,qEAAgC,CAAA;IAEhC,mEAAmE;IACnE,qEAAgC,CAAA;AAClC,CAAC,EAXW,iCAAiC,iDAAjC,iCAAiC,QAW5C;AAED;;;;;GAKG;AACH,IAAY,uCAuCX;AAvCD,WAAY,uCAAuC;IACjD,kEAAuB,CAAA;IACvB,8FAAmD,CAAA;IACnD,0GAA+D,CAAA;IAC/D,gHAAqE,CAAA;IAErE,4EAAiC,CAAA;IACjC,oGAAyD,CAAA;IACzD,wFAA6C,CAAA;IAC7C,mGAAwD,CAAA;IACxD,+GAAoE,CAAA;IACpE,4FAAiD,CAAA;IACjD,0FAA+C,CAAA;IAC/C,kHAAuE,CAAA;IACvE,0GAA+D,CAAA;IAC/D,wFAA6C,CAAA;IAC7C,8GAAmE,CAAA;IACnE,wGAA6D,CAAA;IAC7D,wGAA6D,CAAA;IAE7D,gEAAgE;IAChE,kHAAkH;IAClH,sGAA2D,CAAA;IAC3D,8FAA8F;IAC9F,oGAAyD,CAAA;IACzD,sGAAsG;IACtG,wGAA6D,CAAA;IAC7D,kHAAkH;IAClH,kHAAuE,CAAA;IACvE,0GAA0G;IAC1G,8GAAmE,CAAA;IACnE,gHAAgH;IAChH,0HAA+E,CAAA;IAC/E,oGAAoG;IACpG,sGAA2D,CAAA;IAC3D,qGAAqG;IACrG,sGAA2D,CAAA;IAC3D,+GAA+G;IAC/G,0HAA+E,CAAA;AACjF,CAAC,EAvCW,uCAAuC,uDAAvC,uCAAuC,QAuClD","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Logging\n */\n\n/**\n * Logger categories used by this package\n * @note All logger categories in this package start with the `presentation-backend` prefix.\n * @see [Logger]($bentley)\n * @public\n */\nexport enum PresentationBackendLoggerCategory {\n Package = \"presentation-backend\",\n\n /** The logger category used by the [[PresentationManager]] class and other related classes. */\n PresentationManager = \"presentation-backend.PresentationManager\",\n\n /** The logger category used by Presentation RPC implementation. */\n Rpc = \"presentation-backend.Rpc\",\n\n /** The logger category used by Presentation IPC implementation. */\n Ipc = \"presentation-backend.Ipc\",\n}\n\n/**\n * Logger categories used by this package\n * @note Logger categories used by the [[PresentationManager]] native addon.\n * @see [Logger]($bentley)\n * @public\n */\nexport enum PresentationBackendNativeLoggerCategory {\n ECObjects = \"ECObjects\",\n ECObjects_ECExpressions = \"ECObjects.ECExpressions\",\n ECObjects_ECExpressions_Parse = \"ECObjects.ECExpressions.Parse\",\n ECObjects_ECExpressions_Evaluate = \"ECObjects.ECExpressions.Evaluate\",\n\n ECPresentation = \"ECPresentation\",\n ECPresentation_Connections = \"ECPresentation.Connections\",\n ECPresentation_Tasks = \"ECPresentation.Tasks\",\n ECPresentation_Hierarchies = \"ECPresentation.Navigation\",\n ECPresentation_Hierarchies_Cache = \"ECPresentation.Navigation.Cache\",\n ECPresentation_Content = \"ECPresentation.Content\",\n ECPresentation_Update = \"ECPresentation.Update\",\n ECPresentation_Update_Hierarchies = \"ECPresentation.Update.Hierarchies\",\n ECPresentation_Update_Content = \"ECPresentation.Update.Content\",\n ECPresentation_Rules = \"ECPresentation.Rules\",\n ECPresentation_RulesetVariables = \"ECPresentation.RulesetVariables\",\n ECPresentation_ECExpressions = \"ECPresentation.ECExpressions\",\n ECPresentation_Serialization = \"ECPresentation.Serialization\",\n\n /* eslint-disable @typescript-eslint/no-duplicate-enum-values */\n /** @deprecated in 4.0 - will not be removed until after 2026-06-13. The logging namespace is not used anymore. */\n ECPresentation_Localization = \"ECPresentation.Localization\",\n /** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation]] */\n ECPresentation_RulesEngine = \"ECPresentation.RulesEngine\",\n /** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Content]] */\n ECPresentation_RulesEngine_Content = \"ECPresentation.Content\",\n /** @deprecated in 4.0 - will not be removed until after 2026-06-13. The logging namespace is not used anymore. */\n ECPresentation_RulesEngine_Localization = \"ECPresentation.Localization\",\n /** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Hierarchies]] */\n ECPresentation_RulesEngine_Navigation = \"ECPresentation.Navigation\",\n /** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Hierarchies_Cache]] */\n ECPresentation_RulesEngine_Navigation_Cache = \"ECPresentation.Navigation.Cache\",\n /** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Tasks]] */\n ECPresentation_RulesEngine_Threads = \"ECPresentation.Tasks\",\n /** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Update]] */\n ECPresentation_RulesEngine_Update = \"ECPresentation.Update\",\n /** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_RulesetVariables]] */\n ECPresentation_RulesEngine_RulesetVariables = \"ECPresentation.RulesetVariables\",\n}\n"]}
|
|
@@ -27,14 +27,14 @@ export interface PresentationProps extends Omit<PresentationManagerProps, "enabl
|
|
|
27
27
|
* instances, one for each frontend.
|
|
28
28
|
*
|
|
29
29
|
* @public
|
|
30
|
-
* @deprecated in 4.8 -
|
|
30
|
+
* @deprecated in 4.8 - will not be removed until after 2026-06-13. Use [[PresentationProps]] instead.
|
|
31
31
|
*/
|
|
32
32
|
export type MultiManagerPresentationProps = PresentationProps;
|
|
33
33
|
/**
|
|
34
34
|
* Base props for initializing the [[Presentation]] library.
|
|
35
35
|
*
|
|
36
36
|
* @public
|
|
37
|
-
* @deprecated in 4.8 -
|
|
37
|
+
* @deprecated in 4.8 - will not be removed until after 2026-06-13. Use [[PresentationProps]] instead.
|
|
38
38
|
*/
|
|
39
39
|
export type PresentationPropsBase = PresentationProps;
|
|
40
40
|
/**
|
|
@@ -42,7 +42,7 @@ export type PresentationPropsBase = PresentationProps;
|
|
|
42
42
|
* [[PresentationManager]] instance for handling all requests.
|
|
43
43
|
*
|
|
44
44
|
* @public
|
|
45
|
-
* @deprecated in 4.8 -
|
|
45
|
+
* @deprecated in 4.8 - will not be removed until after 2026-06-13. Use [[PresentationProps]] instead.
|
|
46
46
|
*/
|
|
47
47
|
export type SingleManagerPresentationProps = Omit<PresentationProps, "unusedClientLifetime">;
|
|
48
48
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Presentation.js","sourceRoot":"","sources":["../../../src/presentation-backend/Presentation.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAuE;AACvE,sDAA0D;AAC1D,oDAAgD;AAChD,oEAA6G;AAC7G,yEAA+E;AAC/E,2EAAqE;AACrE,qEAAyF;AACzF,qEAA+D;AAC/D,+DAAqE;AACrE,6DAAoE;AA8DpE;;;;;;;;;GASG;AACH,MAAa,YAAY;IACf,MAAM,CAAC,UAAU,CAA8D;IAC/E,MAAM,CAAC,eAAe,CAA4D;IAClF,MAAM,CAAC,kBAAkB,CAA0B;IACnD,MAAM,CAAC,iBAAiB,CAA0B;IAClD,MAAM,CAAC,4BAA4B,CAA0B;IAC7D,MAAM,CAAC,QAAQ,CAAkC;IAEzD,oBAAoB;IACpB,gBAAuB,CAAC;IAExB,+DAA+D;IACxD,MAAM,KAAK,SAAS;QACzB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,UAAU,CAAC,KAAyB;QAChD,IAAI,CAAC,UAAU,GAAG,KAAK,IAAI,EAAE,CAAC;QAC9B,IAAI,CAAC,iBAAiB,GAAG,yBAAU,CAAC,gBAAgB,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,CAAC;QAEjG,IAAI,CAAC,QAAQ,GAAG,IAAI,4CAAmB,CAAC;YACtC,cAAc,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc;SAC/C,CAAC,CAAC;QACH,wBAAU,CAAC,YAAY,CAAC,8CAAwB,EAAE,4CAAmB,CAAC,CAAC;QACvE,wBAAU,CAAC,kBAAkB,CAAC,8CAAwB,EAAE,IAAI,CAAC,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H,CAAC;QACF,OAAO,EAAE,OAAO,EAAE,CAAC;IACrB,CAAC;IAEO,MAAM,CAAC,oBAAoB,CAAC,GAAW,EAAE,SAA0B;QACzE,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;IACtC,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,UAAU,CAAC,QAAiB;QACxC,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACzB,OAAO,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC;QAC/D,CAAC;QACD,MAAM,IAAI,uCAAiB,CAAC,wCAAkB,CAAC,cAAc,EAAE,2EAA2E,CAAC,CAAC;IAC9I,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,iBAAiB;QAC7B,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,IAAI,uCAAiB,CAAC,wCAAkB,CAAC,cAAc,EAAE,2EAA2E,CAAC,CAAC;QAC9I,CAAC;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;IACtC,CAAC;IAEO,MAAM,CAAC,cAAc,GAAG,CAAC,MAAmB,EAAE,EAAE;QACtD,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAClC,MAAM,WAAW,GAAG,OAAO,CAAC,iDAA4B,CAAC,CAAC,iBAAiB,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QACrG,mEAAmE;QACnE,OAAO,CAAC,iDAA4B,CAAC,CAAC,iBAAiB,EAAE,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC1F,CAAC,CAAC;;AA1IJ,oCA2IC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Core\n */\n\nimport { BriefcaseDb, IModelHost, IpcHost } from \"@itwin/core-backend\";\nimport { DisposeFunc, Logger } from \"@itwin/core-bentley\";\nimport { RpcManager } from \"@itwin/core-common\";\nimport { PresentationError, PresentationRpcInterface, PresentationStatus } from \"@itwin/presentation-common\";\nimport { PresentationBackendLoggerCategory } from \"./BackendLoggerCategory.js\";\nimport { PresentationIpcHandler } from \"./PresentationIpcHandler.js\";\nimport { PresentationManager, PresentationManagerProps } from \"./PresentationManager.js\";\nimport { PresentationRpcImpl } from \"./PresentationRpcImpl.js\";\nimport { FactoryBasedTemporaryStorage } from \"./TemporaryStorage.js\";\nimport { _presentation_manager_detail } from \"./InternalSymbols.js\";\n\n/**\n * Properties that can be used to configure [[Presentation]] API.\n * @public\n */\nexport interface PresentationProps extends Omit<PresentationManagerProps, \"enableSchemasPreload\"> {\n /**\n * Time in milliseconds after which the request will timeout.\n */\n requestTimeout?: number;\n\n /**\n * Should schemas preloading be enabled. If true, [[Presentation]] library listens\n * for `BriefcaseDb.onOpened` event and force pre-loads all ECSchemas.\n */\n enableSchemasPreload?: boolean;\n\n /**\n * How much time should an unused client manager be stored in memory\n * before it's disposed.\n */\n unusedClientLifetime?: number;\n}\n\ninterface PresentationInternalProps {\n /**\n * Factory method for creating separate managers for each client\n */\n clientManagerFactory?: (clientId: string, props: PresentationManagerProps) => PresentationManager;\n}\n\n/**\n * Props for initializing the [[Presentation]] library for using multiple [[PresentationManager]]\n * instances, one for each frontend.\n *\n * @public\n * @deprecated in 4.8 - use [[PresentationProps]] instead.\n */\nexport type MultiManagerPresentationProps = PresentationProps;\n\n/**\n * Base props for initializing the [[Presentation]] library.\n *\n * @public\n * @deprecated in 4.8 - use [[PresentationProps]] instead.\n */\nexport type PresentationPropsBase = PresentationProps;\n\n/**\n * Props for initializing the [[Presentation]] library with ability to use a single\n * [[PresentationManager]] instance for handling all requests.\n *\n * @public\n * @deprecated in 4.8 - use [[PresentationProps]] instead.\n */\nexport type SingleManagerPresentationProps = Omit<PresentationProps, \"unusedClientLifetime\">;\n\ninterface ClientStoreItem {\n manager: PresentationManager;\n}\n\n/**\n * Static class used to statically set up Presentation library for the backend.\n * Basically what it does is:\n * - Register a RPC implementation\n * - Create a singleton [[PresentationManager]] instance\n * - Subscribe for [IModelHost.onBeforeShutdown]($core-backend) event and terminate\n * the presentation manager when that happens.\n *\n * @public\n */\nexport class Presentation {\n private static _initProps: (PresentationProps & PresentationInternalProps) | undefined;\n private static _clientsStorage: FactoryBasedTemporaryStorage<ClientStoreItem> | undefined;\n private static _disposeIpcHandler: DisposeFunc | undefined;\n private static _shutdownListener: DisposeFunc | undefined;\n private static _disposeIModelOpenedListener: DisposeFunc | undefined;\n private static _rpcImpl: PresentationRpcImpl | undefined;\n\n /* c8 ignore next */\n private constructor() {}\n\n /** Properties used to initialize the presentation framework */\n public static get initProps(): PresentationProps | undefined {\n return this._initProps;\n }\n\n /**\n * Initializes Presentation library for the backend.\n *\n * See [Setting up iTwin.js Presentation library documentation page]($docs/presentation/setup/index.md#backend) for an example.\n *\n * **Important:** The method should be called after a call to [IModelHost.startup]($core-backend)\n *\n * @param props Optional properties for [[PresentationManager]]\n */\n public static initialize(props?: PresentationProps): void {\n this._initProps = props || {};\n this._shutdownListener = IModelHost.onBeforeShutdown.addListener(() => Presentation.terminate());\n\n this._rpcImpl = new PresentationRpcImpl({\n requestTimeout: this._initProps.requestTimeout,\n });\n RpcManager.registerImpl(PresentationRpcInterface, PresentationRpcImpl);\n RpcManager.supplyImplInstance(PresentationRpcInterface, this._rpcImpl);\n\n if (IpcHost.isValid) {\n this._disposeIpcHandler = PresentationIpcHandler.register();\n }\n\n this._clientsStorage = new FactoryBasedTemporaryStorage<ClientStoreItem>({\n factory: this.createClientManager.bind(this),\n cleanupHandler: (_id, storeItem) => this.disposeClientManager(_id, storeItem),\n // cleanup unused managers every minute\n cleanupInterval: 60 * 1000,\n // by default, manager is disposed after 1 hour of being unused\n unusedValueLifetime: this._initProps.unusedClientLifetime ?? 60 * 60 * 1000,\n // add some logging\n /* c8 ignore next 5 */\n onDisposedSingle: (id: string) =>\n Logger.logInfo(\n PresentationBackendLoggerCategory.PresentationManager,\n `Disposed PresentationManager instance with ID: ${id}. Total instances: ${this._clientsStorage!.values.length}.`,\n ),\n /* c8 ignore next */\n onDisposedAll: () => Logger.logInfo(PresentationBackendLoggerCategory.PresentationManager, `Disposed all PresentationManager instances.`),\n });\n\n if (this._initProps.enableSchemasPreload) {\n this._disposeIModelOpenedListener = BriefcaseDb.onOpened.addListener(this.onIModelOpened);\n }\n }\n\n /**\n * Terminates Presentation. Consumers don't need to call this as it's automatically\n * called on [IModelHost.onBeforeShutdown]($core-backend) event.\n */\n public static terminate(): void {\n if (this._clientsStorage) {\n this._clientsStorage[Symbol.dispose]();\n this._clientsStorage = undefined;\n }\n if (this._disposeIModelOpenedListener) {\n this._disposeIModelOpenedListener();\n this._disposeIModelOpenedListener = undefined;\n }\n if (this._shutdownListener) {\n this._shutdownListener();\n this._shutdownListener = undefined;\n }\n RpcManager.unregisterImpl(PresentationRpcInterface);\n if (this._rpcImpl) {\n this._rpcImpl[Symbol.dispose]();\n this._rpcImpl = undefined;\n }\n if (this._disposeIpcHandler) {\n this._disposeIpcHandler();\n }\n this._initProps = undefined;\n }\n\n private static createClientManager(clientId: string, onManagerUsed: () => void): ClientStoreItem {\n const manager =\n Presentation._initProps && Presentation._initProps.clientManagerFactory\n ? Presentation._initProps.clientManagerFactory(clientId, Presentation._initProps)\n : new PresentationManager({\n ...Presentation._initProps,\n // @ts-expect-error internal prop\n id: clientId,\n });\n manager.onUsed.addListener(onManagerUsed);\n Logger.logInfo(\n PresentationBackendLoggerCategory.PresentationManager,\n `Created a PresentationManager instance with ID: ${clientId}. Total instances: ${this._clientsStorage!.values.length}.`,\n );\n return { manager };\n }\n\n private static disposeClientManager(_id: string, storeItem: ClientStoreItem) {\n storeItem.manager[Symbol.dispose]();\n }\n\n /**\n * Get an instance of [[PresentationManager]] for specific client\n * @param clientId ID of the client requesting presentation data. If no\n * ID is provided, the default [[PresentationManager]] is returned.\n */\n public static getManager(clientId?: string): PresentationManager {\n if (this._clientsStorage) {\n return this._clientsStorage.getValue(clientId || \"\").manager;\n }\n throw new PresentationError(PresentationStatus.NotInitialized, \"Presentation must be first initialized by calling Presentation.initialize\");\n }\n\n /**\n * Get the time in milliseconds that backend should respond in .\n */\n public static getRequestTimeout(): number {\n if (this._rpcImpl === undefined) {\n throw new PresentationError(PresentationStatus.NotInitialized, \"Presentation must be first initialized by calling Presentation.initialize\");\n }\n return this._rpcImpl.requestTimeout;\n }\n\n private static onIModelOpened = (imodel: BriefcaseDb) => {\n const manager = this.getManager();\n const imodelAddon = manager[_presentation_manager_detail].getNativePlatform().getImodelAddon(imodel);\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n manager[_presentation_manager_detail].getNativePlatform().forceLoadSchemas(imodelAddon);\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Presentation.js","sourceRoot":"","sources":["../../../src/presentation-backend/Presentation.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAuE;AACvE,sDAA0D;AAC1D,oDAAgD;AAChD,oEAA6G;AAC7G,yEAA+E;AAC/E,2EAAqE;AACrE,qEAAyF;AACzF,qEAA+D;AAC/D,+DAAqE;AACrE,6DAAoE;AA8DpE;;;;;;;;;GASG;AACH,MAAa,YAAY;IACf,MAAM,CAAC,UAAU,CAA8D;IAC/E,MAAM,CAAC,eAAe,CAA4D;IAClF,MAAM,CAAC,kBAAkB,CAA0B;IACnD,MAAM,CAAC,iBAAiB,CAA0B;IAClD,MAAM,CAAC,4BAA4B,CAA0B;IAC7D,MAAM,CAAC,QAAQ,CAAkC;IAEzD,oBAAoB;IACpB,gBAAuB,CAAC;IAExB,+DAA+D;IACxD,MAAM,KAAK,SAAS;QACzB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,UAAU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AAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAClC,MAAM,WAAW,GAAG,OAAO,CAAC,iDAA4B,CAAC,CAAC,iBAAiB,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QACrG,mEAAmE;QACnE,OAAO,CAAC,iDAA4B,CAAC,CAAC,iBAAiB,EAAE,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC1F,CAAC,CAAC;;AA1IJ,oCA2IC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Core\n */\n\nimport { BriefcaseDb, IModelHost, IpcHost } from \"@itwin/core-backend\";\nimport { DisposeFunc, Logger } from \"@itwin/core-bentley\";\nimport { RpcManager } from \"@itwin/core-common\";\nimport { PresentationError, PresentationRpcInterface, PresentationStatus } from \"@itwin/presentation-common\";\nimport { PresentationBackendLoggerCategory } from \"./BackendLoggerCategory.js\";\nimport { PresentationIpcHandler } from \"./PresentationIpcHandler.js\";\nimport { PresentationManager, PresentationManagerProps } from \"./PresentationManager.js\";\nimport { PresentationRpcImpl } from \"./PresentationRpcImpl.js\";\nimport { FactoryBasedTemporaryStorage } from \"./TemporaryStorage.js\";\nimport { _presentation_manager_detail } from \"./InternalSymbols.js\";\n\n/**\n * Properties that can be used to configure [[Presentation]] API.\n * @public\n */\nexport interface PresentationProps extends Omit<PresentationManagerProps, \"enableSchemasPreload\"> {\n /**\n * Time in milliseconds after which the request will timeout.\n */\n requestTimeout?: number;\n\n /**\n * Should schemas preloading be enabled. If true, [[Presentation]] library listens\n * for `BriefcaseDb.onOpened` event and force pre-loads all ECSchemas.\n */\n enableSchemasPreload?: boolean;\n\n /**\n * How much time should an unused client manager be stored in memory\n * before it's disposed.\n */\n unusedClientLifetime?: number;\n}\n\ninterface PresentationInternalProps {\n /**\n * Factory method for creating separate managers for each client\n */\n clientManagerFactory?: (clientId: string, props: PresentationManagerProps) => PresentationManager;\n}\n\n/**\n * Props for initializing the [[Presentation]] library for using multiple [[PresentationManager]]\n * instances, one for each frontend.\n *\n * @public\n * @deprecated in 4.8 - will not be removed until after 2026-06-13. Use [[PresentationProps]] instead.\n */\nexport type MultiManagerPresentationProps = PresentationProps;\n\n/**\n * Base props for initializing the [[Presentation]] library.\n *\n * @public\n * @deprecated in 4.8 - will not be removed until after 2026-06-13. Use [[PresentationProps]] instead.\n */\nexport type PresentationPropsBase = PresentationProps;\n\n/**\n * Props for initializing the [[Presentation]] library with ability to use a single\n * [[PresentationManager]] instance for handling all requests.\n *\n * @public\n * @deprecated in 4.8 - will not be removed until after 2026-06-13. Use [[PresentationProps]] instead.\n */\nexport type SingleManagerPresentationProps = Omit<PresentationProps, \"unusedClientLifetime\">;\n\ninterface ClientStoreItem {\n manager: PresentationManager;\n}\n\n/**\n * Static class used to statically set up Presentation library for the backend.\n * Basically what it does is:\n * - Register a RPC implementation\n * - Create a singleton [[PresentationManager]] instance\n * - Subscribe for [IModelHost.onBeforeShutdown]($core-backend) event and terminate\n * the presentation manager when that happens.\n *\n * @public\n */\nexport class Presentation {\n private static _initProps: (PresentationProps & PresentationInternalProps) | undefined;\n private static _clientsStorage: FactoryBasedTemporaryStorage<ClientStoreItem> | undefined;\n private static _disposeIpcHandler: DisposeFunc | undefined;\n private static _shutdownListener: DisposeFunc | undefined;\n private static _disposeIModelOpenedListener: DisposeFunc | undefined;\n private static _rpcImpl: PresentationRpcImpl | undefined;\n\n /* c8 ignore next */\n private constructor() {}\n\n /** Properties used to initialize the presentation framework */\n public static get initProps(): PresentationProps | undefined {\n return this._initProps;\n }\n\n /**\n * Initializes Presentation library for the backend.\n *\n * See [Setting up iTwin.js Presentation library documentation page]($docs/presentation/setup/index.md#backend) for an example.\n *\n * **Important:** The method should be called after a call to [IModelHost.startup]($core-backend)\n *\n * @param props Optional properties for [[PresentationManager]]\n */\n public static initialize(props?: PresentationProps): void {\n this._initProps = props || {};\n this._shutdownListener = IModelHost.onBeforeShutdown.addListener(() => Presentation.terminate());\n\n this._rpcImpl = new PresentationRpcImpl({\n requestTimeout: this._initProps.requestTimeout,\n });\n RpcManager.registerImpl(PresentationRpcInterface, PresentationRpcImpl);\n RpcManager.supplyImplInstance(PresentationRpcInterface, this._rpcImpl);\n\n if (IpcHost.isValid) {\n this._disposeIpcHandler = PresentationIpcHandler.register();\n }\n\n this._clientsStorage = new FactoryBasedTemporaryStorage<ClientStoreItem>({\n factory: this.createClientManager.bind(this),\n cleanupHandler: (_id, storeItem) => this.disposeClientManager(_id, storeItem),\n // cleanup unused managers every minute\n cleanupInterval: 60 * 1000,\n // by default, manager is disposed after 1 hour of being unused\n unusedValueLifetime: this._initProps.unusedClientLifetime ?? 60 * 60 * 1000,\n // add some logging\n /* c8 ignore next 5 */\n onDisposedSingle: (id: string) =>\n Logger.logInfo(\n PresentationBackendLoggerCategory.PresentationManager,\n `Disposed PresentationManager instance with ID: ${id}. Total instances: ${this._clientsStorage!.values.length}.`,\n ),\n /* c8 ignore next */\n onDisposedAll: () => Logger.logInfo(PresentationBackendLoggerCategory.PresentationManager, `Disposed all PresentationManager instances.`),\n });\n\n if (this._initProps.enableSchemasPreload) {\n this._disposeIModelOpenedListener = BriefcaseDb.onOpened.addListener(this.onIModelOpened);\n }\n }\n\n /**\n * Terminates Presentation. Consumers don't need to call this as it's automatically\n * called on [IModelHost.onBeforeShutdown]($core-backend) event.\n */\n public static terminate(): void {\n if (this._clientsStorage) {\n this._clientsStorage[Symbol.dispose]();\n this._clientsStorage = undefined;\n }\n if (this._disposeIModelOpenedListener) {\n this._disposeIModelOpenedListener();\n this._disposeIModelOpenedListener = undefined;\n }\n if (this._shutdownListener) {\n this._shutdownListener();\n this._shutdownListener = undefined;\n }\n RpcManager.unregisterImpl(PresentationRpcInterface);\n if (this._rpcImpl) {\n this._rpcImpl[Symbol.dispose]();\n this._rpcImpl = undefined;\n }\n if (this._disposeIpcHandler) {\n this._disposeIpcHandler();\n }\n this._initProps = undefined;\n }\n\n private static createClientManager(clientId: string, onManagerUsed: () => void): ClientStoreItem {\n const manager =\n Presentation._initProps && Presentation._initProps.clientManagerFactory\n ? Presentation._initProps.clientManagerFactory(clientId, Presentation._initProps)\n : new PresentationManager({\n ...Presentation._initProps,\n // @ts-expect-error internal prop\n id: clientId,\n });\n manager.onUsed.addListener(onManagerUsed);\n Logger.logInfo(\n PresentationBackendLoggerCategory.PresentationManager,\n `Created a PresentationManager instance with ID: ${clientId}. Total instances: ${this._clientsStorage!.values.length}.`,\n );\n return { manager };\n }\n\n private static disposeClientManager(_id: string, storeItem: ClientStoreItem) {\n storeItem.manager[Symbol.dispose]();\n }\n\n /**\n * Get an instance of [[PresentationManager]] for specific client\n * @param clientId ID of the client requesting presentation data. If no\n * ID is provided, the default [[PresentationManager]] is returned.\n */\n public static getManager(clientId?: string): PresentationManager {\n if (this._clientsStorage) {\n return this._clientsStorage.getValue(clientId || \"\").manager;\n }\n throw new PresentationError(PresentationStatus.NotInitialized, \"Presentation must be first initialized by calling Presentation.initialize\");\n }\n\n /**\n * Get the time in milliseconds that backend should respond in .\n */\n public static getRequestTimeout(): number {\n if (this._rpcImpl === undefined) {\n throw new PresentationError(PresentationStatus.NotInitialized, \"Presentation must be first initialized by calling Presentation.initialize\");\n }\n return this._rpcImpl.requestTimeout;\n }\n\n private static onIModelOpened = (imodel: BriefcaseDb) => {\n const manager = this.getManager();\n const imodelAddon = manager[_presentation_manager_detail].getNativePlatform().getImodelAddon(imodel);\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n manager[_presentation_manager_detail].getNativePlatform().forceLoadSchemas(imodelAddon);\n };\n}\n"]}
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { IModelDb } from "@itwin/core-backend";
|
|
5
5
|
import { BeEvent } from "@itwin/core-bentley";
|
|
6
|
-
import { UnitSystemKey } from "@itwin/core-quantity";
|
|
6
|
+
import { FormatsProvider, UnitSystemKey } from "@itwin/core-quantity";
|
|
7
7
|
import { SchemaContext } from "@itwin/ecschema-metadata";
|
|
8
8
|
import { UnitSystemFormat as CommonUnitSystemFormat, ComputeSelectionRequestOptions, Content, ContentDescriptorRequestOptions, ContentRequestOptions, ContentSourcesRequestOptions, Descriptor, DescriptorOverrides, DisplayLabelRequestOptions, DisplayLabelsRequestOptions, DisplayValueGroup, DistinctValuesRequestOptions, ElementProperties, FilterByInstancePathsHierarchyRequestOptions, FilterByTextHierarchyRequestOptions, FormatsMap, HierarchyCompareInfo, HierarchyCompareOptions, HierarchyLevelDescriptorRequestOptions, HierarchyRequestOptions, InstanceKey, Item, KeySet, LabelDefinition, MultiElementPropertiesRequestOptions, Node, NodeKey, NodePathElement, Paged, PagedResponse, Prioritized, Ruleset, RulesetVariable, SelectClassInfo, SelectionScope, SelectionScopeRequestOptions, SingleElementPropertiesRequestOptions, WithCancelEvent } from "@itwin/presentation-common";
|
|
9
|
+
import { _presentation_manager_detail } from "./InternalSymbols.js";
|
|
9
10
|
import { PresentationManagerDetail } from "./PresentationManagerDetail.js";
|
|
10
11
|
import { RulesetManager } from "./RulesetManager.js";
|
|
11
12
|
import { RulesetVariablesManager } from "./RulesetVariablesManager.js";
|
|
12
13
|
import { BackendDiagnosticsAttribute, BackendDiagnosticsOptions } from "./Utils.js";
|
|
13
|
-
import { _presentation_manager_detail } from "./InternalSymbols.js";
|
|
14
14
|
/**
|
|
15
15
|
* Presentation hierarchy cache mode.
|
|
16
16
|
* @public
|
|
@@ -134,7 +134,7 @@ export interface PresentationManagerCachingConfig {
|
|
|
134
134
|
* assigning default unit formats for specific phenomenons (see [[PresentationManagerProps.defaultFormats]]).
|
|
135
135
|
*
|
|
136
136
|
* @public
|
|
137
|
-
* @deprecated in 4.3. The type has been moved to `@itwin/presentation-common` package.
|
|
137
|
+
* @deprecated in 4.3 - will not be removed until after 2026-06-13. The type has been moved to `@itwin/presentation-common` package.
|
|
138
138
|
*/
|
|
139
139
|
export type UnitSystemFormat = CommonUnitSystemFormat;
|
|
140
140
|
/**
|
|
@@ -177,7 +177,7 @@ export interface PresentationManagerProps {
|
|
|
177
177
|
*
|
|
178
178
|
* which means the assets can be found through a relative path `./assets/` from the `{source file being executed}`.
|
|
179
179
|
*
|
|
180
|
-
* @deprecated in 4.2. This attribute is not used anymore - the package is not using private assets anymore.
|
|
180
|
+
* @deprecated in 4.2 - will not be removed until after 2026-06-13. This attribute is not used anymore - the package is not using private assets anymore.
|
|
181
181
|
*/
|
|
182
182
|
presentationAssetsRoot?: string | PresentationAssetsRootConfig;
|
|
183
183
|
/**
|
|
@@ -204,8 +204,15 @@ export interface PresentationManagerProps {
|
|
|
204
204
|
/**
|
|
205
205
|
* A map of default unit formats to use for formatting properties that don't have a presentation format
|
|
206
206
|
* in requested unit system.
|
|
207
|
+
*
|
|
208
|
+
* @deprecated in 5.1. Use `formatsProvider` instead. Still used as a fallback if `formatsProvider` is not supplied.
|
|
207
209
|
*/
|
|
208
210
|
defaultFormats?: FormatsMap;
|
|
211
|
+
/**
|
|
212
|
+
* A custom formats provider to use for formatting property values with units. Defaults to [SchemaFormatsProvider]($ecschema-metadata) if
|
|
213
|
+
* not supplied.
|
|
214
|
+
*/
|
|
215
|
+
formatsProvider?: FormatsProvider;
|
|
209
216
|
/**
|
|
210
217
|
* A number of worker threads to use for handling presentation requests. Defaults to `2`.
|
|
211
218
|
*/
|
|
@@ -215,7 +222,7 @@ export interface PresentationManagerProps {
|
|
|
215
222
|
* data changes are not tracked at all.
|
|
216
223
|
*
|
|
217
224
|
* @beta
|
|
218
|
-
* @deprecated in 4.4. The manager now always tracks for iModel data changes without polling.
|
|
225
|
+
* @deprecated in 4.4 - will not be removed until after 2026-06-13. The manager now always tracks for iModel data changes without polling.
|
|
219
226
|
*/
|
|
220
227
|
updatesPollInterval?: number;
|
|
221
228
|
/** Options for caching. */
|
|
@@ -237,6 +244,8 @@ export interface PresentationManagerProps {
|
|
|
237
244
|
/**
|
|
238
245
|
* Callback that provides [SchemaContext]($ecschema-metadata) for supplied [IModelDb]($core-backend).
|
|
239
246
|
* [SchemaContext]($ecschema-metadata) is used for getting metadata required for values formatting.
|
|
247
|
+
*
|
|
248
|
+
* @deprecated in 5.1. By default [IModelDb.schemaContext]($core-backend) is now used instead.
|
|
240
249
|
*/
|
|
241
250
|
schemaContextProvider?: (imodel: IModelDb) => SchemaContext;
|
|
242
251
|
/**
|
|
@@ -257,6 +266,7 @@ export declare class PresentationManager {
|
|
|
257
266
|
private _props;
|
|
258
267
|
private _detail;
|
|
259
268
|
private _localizationHelper;
|
|
269
|
+
private _schemaContextProvider;
|
|
260
270
|
/**
|
|
261
271
|
* Creates an instance of PresentationManager.
|
|
262
272
|
* @param props Optional configuration properties.
|
|
@@ -267,7 +277,7 @@ export declare class PresentationManager {
|
|
|
267
277
|
set activeUnitSystem(value: UnitSystemKey | undefined);
|
|
268
278
|
/** Dispose the presentation manager. Must be called to clean up native resources. */
|
|
269
279
|
[Symbol.dispose](): void;
|
|
270
|
-
/** @deprecated in 5.0 Use [Symbol.dispose] instead. */
|
|
280
|
+
/** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [Symbol.dispose] instead. */
|
|
271
281
|
dispose(): void;
|
|
272
282
|
/** An event, that this manager raises whenever any request is made on it. */
|
|
273
283
|
get onUsed(): BeEvent<() => void>;
|
|
@@ -326,6 +336,7 @@ export declare class PresentationManager {
|
|
|
326
336
|
* @public
|
|
327
337
|
*/
|
|
328
338
|
getContentSetSize(requestOptions: WithCancelEvent<Prioritized<ContentRequestOptions<IModelDb, Descriptor | DescriptorOverrides, KeySet, RulesetVariable>>> & BackendDiagnosticsAttribute): Promise<number>;
|
|
339
|
+
private createContentFormatter;
|
|
329
340
|
/**
|
|
330
341
|
* Retrieves the content set based on the supplied content descriptor.
|
|
331
342
|
* @public
|
|
@@ -369,13 +380,13 @@ export declare class PresentationManager {
|
|
|
369
380
|
/**
|
|
370
381
|
* Retrieves available selection scopes.
|
|
371
382
|
* @public
|
|
372
|
-
* @deprecated in 5.0. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
383
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
373
384
|
*/
|
|
374
385
|
getSelectionScopes(_requestOptions: SelectionScopeRequestOptions<IModelDb> & BackendDiagnosticsAttribute): Promise<SelectionScope[]>;
|
|
375
386
|
/**
|
|
376
387
|
* Computes selection based on provided element IDs and selection scope.
|
|
377
388
|
* @public
|
|
378
|
-
* @deprecated in 5.0. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
389
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
379
390
|
*/
|
|
380
391
|
computeSelection(requestOptions: ComputeSelectionRequestOptions<IModelDb> & BackendDiagnosticsAttribute): Promise<KeySet>;
|
|
381
392
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresentationManager.d.ts","sourceRoot":"","sources":["../../../src/presentation-backend/PresentationManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAa,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"PresentationManager.d.ts","sourceRoot":"","sources":["../../../src/presentation-backend/PresentationManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OA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,CAAC,oBAAoB,CAAC;CA4B3H"}
|
|
@@ -10,15 +10,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.PresentationManager = exports.HierarchyCacheMode = void 0;
|
|
11
11
|
const rxjs_1 = require("rxjs");
|
|
12
12
|
const rxjs_for_await_1 = require("rxjs-for-await");
|
|
13
|
+
const ecschema_metadata_1 = require("@itwin/ecschema-metadata");
|
|
13
14
|
const presentation_common_1 = require("@itwin/presentation-common");
|
|
14
15
|
const internal_1 = require("@itwin/presentation-common/internal");
|
|
15
16
|
const ElementPropertiesHelper_js_1 = require("./ElementPropertiesHelper.js");
|
|
17
|
+
const InternalSymbols_js_1 = require("./InternalSymbols.js");
|
|
16
18
|
const NativePlatform_js_1 = require("./NativePlatform.js");
|
|
17
19
|
const PresentationManagerDetail_js_1 = require("./PresentationManagerDetail.js");
|
|
18
20
|
const RulesetVariablesManager_js_1 = require("./RulesetVariablesManager.js");
|
|
19
21
|
const SelectionScopesHelper_js_1 = require("./SelectionScopesHelper.js");
|
|
20
22
|
const Utils_js_1 = require("./Utils.js");
|
|
21
|
-
const InternalSymbols_js_1 = require("./InternalSymbols.js");
|
|
22
23
|
/**
|
|
23
24
|
* Presentation hierarchy cache mode.
|
|
24
25
|
* @public
|
|
@@ -52,6 +53,7 @@ class PresentationManager {
|
|
|
52
53
|
_props;
|
|
53
54
|
_detail;
|
|
54
55
|
_localizationHelper;
|
|
56
|
+
_schemaContextProvider;
|
|
55
57
|
/**
|
|
56
58
|
* Creates an instance of PresentationManager.
|
|
57
59
|
* @param props Optional configuration properties.
|
|
@@ -60,6 +62,8 @@ class PresentationManager {
|
|
|
60
62
|
this._props = props ?? {};
|
|
61
63
|
this._detail = new PresentationManagerDetail_js_1.PresentationManagerDetail(this._props);
|
|
62
64
|
this._localizationHelper = new internal_1.LocalizationHelper({ getLocalizedString: props?.getLocalizedString ?? Utils_js_1.getLocalizedStringEN });
|
|
65
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
66
|
+
this._schemaContextProvider = props?.schemaContextProvider ?? ((imodel) => imodel.schemaContext);
|
|
63
67
|
}
|
|
64
68
|
/** Get / set active unit system used to format property values with units */
|
|
65
69
|
get activeUnitSystem() {
|
|
@@ -73,7 +77,7 @@ class PresentationManager {
|
|
|
73
77
|
[Symbol.dispose]() {
|
|
74
78
|
this._detail[Symbol.dispose]();
|
|
75
79
|
}
|
|
76
|
-
/** @deprecated in 5.0 Use [Symbol.dispose] instead. */
|
|
80
|
+
/** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [Symbol.dispose] instead. */
|
|
77
81
|
/* c8 ignore next 3 */
|
|
78
82
|
dispose() {
|
|
79
83
|
this[Symbol.dispose]();
|
|
@@ -172,18 +176,27 @@ class PresentationManager {
|
|
|
172
176
|
async getContentSetSize(requestOptions) {
|
|
173
177
|
return this._detail.getContentSetSize(requestOptions);
|
|
174
178
|
}
|
|
179
|
+
createContentFormatter({ imodel, unitSystem }) {
|
|
180
|
+
if (!unitSystem) {
|
|
181
|
+
unitSystem = this.props.defaultUnitSystem ?? "metric";
|
|
182
|
+
}
|
|
183
|
+
const schemaContext = this._schemaContextProvider(imodel);
|
|
184
|
+
const koqPropertyFormatter = new presentation_common_1.KoqPropertyValueFormatter({
|
|
185
|
+
schemaContext,
|
|
186
|
+
formatsProvider: this.props.formatsProvider ?? new ecschema_metadata_1.SchemaFormatsProvider(schemaContext, unitSystem),
|
|
187
|
+
});
|
|
188
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
189
|
+
koqPropertyFormatter.defaultFormats = this.props.defaultFormats;
|
|
190
|
+
return new internal_1.ContentFormatter(new internal_1.ContentPropertyValueFormatter(koqPropertyFormatter), unitSystem);
|
|
191
|
+
}
|
|
175
192
|
/**
|
|
176
193
|
* Retrieves the content set based on the supplied content descriptor.
|
|
177
194
|
* @public
|
|
178
195
|
*/
|
|
179
196
|
async getContentSet(requestOptions) {
|
|
180
|
-
let items = await this._detail.getContentSet({
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
});
|
|
184
|
-
if (!requestOptions.omitFormattedValues && this.props.schemaContextProvider !== undefined) {
|
|
185
|
-
const koqPropertyFormatter = new presentation_common_1.KoqPropertyValueFormatter(this.props.schemaContextProvider(requestOptions.imodel), this.props.defaultFormats);
|
|
186
|
-
const formatter = new internal_1.ContentFormatter(new internal_1.ContentPropertyValueFormatter(koqPropertyFormatter), requestOptions.unitSystem ?? this.props.defaultUnitSystem);
|
|
197
|
+
let items = await this._detail.getContentSet({ ...requestOptions, omitFormattedValues: true });
|
|
198
|
+
if (!requestOptions.omitFormattedValues) {
|
|
199
|
+
const formatter = this.createContentFormatter(requestOptions);
|
|
187
200
|
items = await formatter.formatContentItems(items, requestOptions.descriptor);
|
|
188
201
|
}
|
|
189
202
|
return this._localizationHelper.getLocalizedContentItems(items);
|
|
@@ -193,16 +206,12 @@ class PresentationManager {
|
|
|
193
206
|
* @public
|
|
194
207
|
*/
|
|
195
208
|
async getContent(requestOptions) {
|
|
196
|
-
const content = await this._detail.getContent({
|
|
197
|
-
...requestOptions,
|
|
198
|
-
...(!requestOptions.omitFormattedValues && this.props.schemaContextProvider !== undefined ? { omitFormattedValues: true } : undefined),
|
|
199
|
-
});
|
|
209
|
+
const content = await this._detail.getContent({ ...requestOptions, omitFormattedValues: true });
|
|
200
210
|
if (!content) {
|
|
201
211
|
return undefined;
|
|
202
212
|
}
|
|
203
|
-
if (!requestOptions.omitFormattedValues
|
|
204
|
-
const
|
|
205
|
-
const formatter = new internal_1.ContentFormatter(new internal_1.ContentPropertyValueFormatter(koqPropertyFormatter), requestOptions.unitSystem ?? this.props.defaultUnitSystem);
|
|
213
|
+
if (!requestOptions.omitFormattedValues) {
|
|
214
|
+
const formatter = this.createContentFormatter(requestOptions);
|
|
206
215
|
await formatter.formatContent(content);
|
|
207
216
|
}
|
|
208
217
|
return this._localizationHelper.getLocalizedContent(content);
|
|
@@ -308,7 +317,7 @@ class PresentationManager {
|
|
|
308
317
|
/**
|
|
309
318
|
* Retrieves available selection scopes.
|
|
310
319
|
* @public
|
|
311
|
-
* @deprecated in 5.0. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
320
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
312
321
|
*/
|
|
313
322
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
314
323
|
async getSelectionScopes(_requestOptions) {
|
|
@@ -317,7 +326,7 @@ class PresentationManager {
|
|
|
317
326
|
/**
|
|
318
327
|
* Computes selection based on provided element IDs and selection scope.
|
|
319
328
|
* @public
|
|
320
|
-
* @deprecated in 5.0. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
329
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
321
330
|
*/
|
|
322
331
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
323
332
|
async computeSelection(requestOptions) {
|