@itwin/presentation-backend 5.1.0-dev.9 → 5.2.0-dev.1

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 (51) hide show
  1. package/CHANGELOG.md +69 -1
  2. package/lib/cjs/presentation-backend/BackendLoggerCategory.d.ts +9 -9
  3. package/lib/cjs/presentation-backend/BackendLoggerCategory.d.ts.map +1 -1
  4. package/lib/cjs/presentation-backend/BackendLoggerCategory.js +9 -9
  5. package/lib/cjs/presentation-backend/BackendLoggerCategory.js.map +1 -1
  6. package/lib/cjs/presentation-backend/Presentation.d.ts +3 -3
  7. package/lib/cjs/presentation-backend/Presentation.js.map +1 -1
  8. package/lib/cjs/presentation-backend/PresentationManager.d.ts +19 -8
  9. package/lib/cjs/presentation-backend/PresentationManager.d.ts.map +1 -1
  10. package/lib/cjs/presentation-backend/PresentationManager.js +27 -18
  11. package/lib/cjs/presentation-backend/PresentationManager.js.map +1 -1
  12. package/lib/cjs/presentation-backend/PresentationManagerDetail.d.ts.map +1 -1
  13. package/lib/cjs/presentation-backend/PresentationManagerDetail.js +14 -8
  14. package/lib/cjs/presentation-backend/PresentationManagerDetail.js.map +1 -1
  15. package/lib/cjs/presentation-backend/PresentationRpcImpl.d.ts.map +1 -1
  16. package/lib/cjs/presentation-backend/PresentationRpcImpl.js +3 -16
  17. package/lib/cjs/presentation-backend/PresentationRpcImpl.js.map +1 -1
  18. package/lib/cjs/presentation-backend/RulesetEmbedder.d.ts.map +1 -1
  19. package/lib/cjs/presentation-backend/RulesetEmbedder.js +13 -7
  20. package/lib/cjs/presentation-backend/RulesetEmbedder.js.map +1 -1
  21. package/lib/cjs/presentation-backend/SelectionScopesHelper.js.map +1 -1
  22. package/lib/cjs/presentation-backend/Utils.d.ts.map +1 -1
  23. package/lib/cjs/presentation-backend/Utils.js.map +1 -1
  24. package/lib/cjs/presentation-backend.js +20 -0
  25. package/lib/cjs/presentation-backend.js.map +1 -1
  26. package/lib/esm/presentation-backend/BackendLoggerCategory.d.ts +9 -9
  27. package/lib/esm/presentation-backend/BackendLoggerCategory.d.ts.map +1 -1
  28. package/lib/esm/presentation-backend/BackendLoggerCategory.js +9 -9
  29. package/lib/esm/presentation-backend/BackendLoggerCategory.js.map +1 -1
  30. package/lib/esm/presentation-backend/Presentation.d.ts +3 -3
  31. package/lib/esm/presentation-backend/Presentation.js.map +1 -1
  32. package/lib/esm/presentation-backend/PresentationManager.d.ts +19 -8
  33. package/lib/esm/presentation-backend/PresentationManager.d.ts.map +1 -1
  34. package/lib/esm/presentation-backend/PresentationManager.js +27 -18
  35. package/lib/esm/presentation-backend/PresentationManager.js.map +1 -1
  36. package/lib/esm/presentation-backend/PresentationManagerDetail.d.ts.map +1 -1
  37. package/lib/esm/presentation-backend/PresentationManagerDetail.js +9 -3
  38. package/lib/esm/presentation-backend/PresentationManagerDetail.js.map +1 -1
  39. package/lib/esm/presentation-backend/PresentationRpcImpl.d.ts.map +1 -1
  40. package/lib/esm/presentation-backend/PresentationRpcImpl.js +5 -18
  41. package/lib/esm/presentation-backend/PresentationRpcImpl.js.map +1 -1
  42. package/lib/esm/presentation-backend/RulesetEmbedder.d.ts.map +1 -1
  43. package/lib/esm/presentation-backend/RulesetEmbedder.js +13 -7
  44. package/lib/esm/presentation-backend/RulesetEmbedder.js.map +1 -1
  45. package/lib/esm/presentation-backend/SelectionScopesHelper.js.map +1 -1
  46. package/lib/esm/presentation-backend/Utils.d.ts.map +1 -1
  47. package/lib/esm/presentation-backend/Utils.js +2 -2
  48. package/lib/esm/presentation-backend/Utils.js.map +1 -1
  49. package/lib/esm/presentation-backend.js +20 -0
  50. package/lib/esm/presentation-backend.js.map +1 -1
  51. package/package.json +20 -18
@@ -47,23 +47,23 @@ export var PresentationBackendNativeLoggerCategory;
47
47
  PresentationBackendNativeLoggerCategory["ECPresentation_ECExpressions"] = "ECPresentation.ECExpressions";
48
48
  PresentationBackendNativeLoggerCategory["ECPresentation_Serialization"] = "ECPresentation.Serialization";
49
49
  /* eslint-disable @typescript-eslint/no-duplicate-enum-values */
50
- /** @deprecated in 4.0. The logging namespace is not used anymore. */
50
+ /** @deprecated in 4.0 - will not be removed until after 2026-06-13. The logging namespace is not used anymore. */
51
51
  PresentationBackendNativeLoggerCategory["ECPresentation_Localization"] = "ECPresentation.Localization";
52
- /** @deprecated in 4.0. Use [[ECPresentation]] */
52
+ /** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation]] */
53
53
  PresentationBackendNativeLoggerCategory["ECPresentation_RulesEngine"] = "ECPresentation.RulesEngine";
54
- /** @deprecated in 4.0. Use [[ECPresentation_Content]] */
54
+ /** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Content]] */
55
55
  PresentationBackendNativeLoggerCategory["ECPresentation_RulesEngine_Content"] = "ECPresentation.Content";
56
- /** @deprecated in 4.0. The logging namespace is not used anymore. */
56
+ /** @deprecated in 4.0 - will not be removed until after 2026-06-13. The logging namespace is not used anymore. */
57
57
  PresentationBackendNativeLoggerCategory["ECPresentation_RulesEngine_Localization"] = "ECPresentation.Localization";
58
- /** @deprecated in 4.0. Use [[ECPresentation_Hierarchies]] */
58
+ /** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Hierarchies]] */
59
59
  PresentationBackendNativeLoggerCategory["ECPresentation_RulesEngine_Navigation"] = "ECPresentation.Navigation";
60
- /** @deprecated in 4.0. Use [[ECPresentation_Hierarchies_Cache]] */
60
+ /** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Hierarchies_Cache]] */
61
61
  PresentationBackendNativeLoggerCategory["ECPresentation_RulesEngine_Navigation_Cache"] = "ECPresentation.Navigation.Cache";
62
- /** @deprecated in 4.0. Use [[ECPresentation_Tasks]] */
62
+ /** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Tasks]] */
63
63
  PresentationBackendNativeLoggerCategory["ECPresentation_RulesEngine_Threads"] = "ECPresentation.Tasks";
64
- /** @deprecated in 4.0. Use [[ECPresentation_Update]] */
64
+ /** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_Update]] */
65
65
  PresentationBackendNativeLoggerCategory["ECPresentation_RulesEngine_Update"] = "ECPresentation.Update";
66
- /** @deprecated in 4.0. Use [[ECPresentation_RulesetVariables]] */
66
+ /** @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ECPresentation_RulesetVariables]] */
67
67
  PresentationBackendNativeLoggerCategory["ECPresentation_RulesEngine_RulesetVariables"] = "ECPresentation.RulesetVariables";
68
68
  })(PresentationBackendNativeLoggerCategory || (PresentationBackendNativeLoggerCategory = {}));
69
69
  //# 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,MAAM,CAAN,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,KAAjC,iCAAiC,QAW5C;AAED;;;;;GAKG;AACH,MAAM,CAAN,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,qEAAqE;IACrE,sGAA2D,CAAA;IAC3D,iDAAiD;IACjD,oGAAyD,CAAA;IACzD,yDAAyD;IACzD,wGAA6D,CAAA;IAC7D,qEAAqE;IACrE,kHAAuE,CAAA;IACvE,6DAA6D;IAC7D,8GAAmE,CAAA;IACnE,mEAAmE;IACnE,0HAA+E,CAAA;IAC/E,uDAAuD;IACvD,sGAA2D,CAAA;IAC3D,wDAAwD;IACxD,sGAA2D,CAAA;IAC3D,kEAAkE;IAClE,0HAA+E,CAAA;AACjF,CAAC,EAvCW,uCAAuC,KAAvC,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. The logging namespace is not used anymore. */\n ECPresentation_Localization = \"ECPresentation.Localization\",\n /** @deprecated in 4.0. Use [[ECPresentation]] */\n ECPresentation_RulesEngine = \"ECPresentation.RulesEngine\",\n /** @deprecated in 4.0. Use [[ECPresentation_Content]] */\n ECPresentation_RulesEngine_Content = \"ECPresentation.Content\",\n /** @deprecated in 4.0. The logging namespace is not used anymore. */\n ECPresentation_RulesEngine_Localization = \"ECPresentation.Localization\",\n /** @deprecated in 4.0. Use [[ECPresentation_Hierarchies]] */\n ECPresentation_RulesEngine_Navigation = \"ECPresentation.Navigation\",\n /** @deprecated in 4.0. Use [[ECPresentation_Hierarchies_Cache]] */\n ECPresentation_RulesEngine_Navigation_Cache = \"ECPresentation.Navigation.Cache\",\n /** @deprecated in 4.0. Use [[ECPresentation_Tasks]] */\n ECPresentation_RulesEngine_Threads = \"ECPresentation.Tasks\",\n /** @deprecated in 4.0. Use [[ECPresentation_Update]] */\n ECPresentation_RulesEngine_Update = \"ECPresentation.Update\",\n /** @deprecated in 4.0. Use [[ECPresentation_RulesetVariables]] */\n ECPresentation_RulesEngine_RulesetVariables = \"ECPresentation.RulesetVariables\",\n}\n"]}
1
+ {"version":3,"file":"BackendLoggerCategory.js","sourceRoot":"","sources":["../../../src/presentation-backend/BackendLoggerCategory.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH;;;;;GAKG;AACH,MAAM,CAAN,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,KAAjC,iCAAiC,QAW5C;AAED;;;;;GAKG;AACH,MAAM,CAAN,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,KAAvC,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 - use [[PresentationProps]] instead.
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 - use [[PresentationProps]] instead.
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 - use [[PresentationProps]] instead.
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,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAe,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAC7G,OAAO,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAA4B,MAAM,0BAA0B,CAAC;AACzF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AA8DpE;;;;;;;;;GASG;AACH,MAAM,OAAO,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,oBA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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,4BAA4B,CAAC,CAAC,iBAAiB,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QACrG,mEAAmE;QACnE,OAAO,CAAC,4BAA4B,CAAC,CAAC,iBAAiB,EAAE,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC1F,CAAC,CAAC","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;;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AAC;IAC1F,CAAC,CAAC","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;A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OAAO,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC;CA4B3H"}
@@ -7,15 +7,16 @@
7
7
  */
8
8
  import { firstValueFrom } from "rxjs";
9
9
  import { eachValueFrom } from "rxjs-for-await";
10
+ import { SchemaFormatsProvider } from "@itwin/ecschema-metadata";
10
11
  import { ContentFlags, DefaultContentDisplayTypes, Descriptor, KeySet, KoqPropertyValueFormatter, PresentationError, PresentationStatus, } from "@itwin/presentation-common";
11
12
  import { buildElementProperties, ContentFormatter, ContentPropertyValueFormatter, deepReplaceNullsToUndefined, isSingleElementPropertiesRequestOptions, LocalizationHelper, } from "@itwin/presentation-common/internal";
12
13
  import { getContentItemsObservableFromClassNames, getContentItemsObservableFromElementIds } from "./ElementPropertiesHelper.js";
14
+ import { _presentation_manager_detail } from "./InternalSymbols.js";
13
15
  import { NativePlatformRequestTypes } from "./NativePlatform.js";
14
16
  import { getRulesetIdObject, PresentationManagerDetail } from "./PresentationManagerDetail.js";
15
17
  import { RulesetVariablesManagerImpl } from "./RulesetVariablesManager.js";
16
18
  import { SelectionScopesHelper } from "./SelectionScopesHelper.js";
17
19
  import { getLocalizedStringEN } from "./Utils.js";
18
- import { _presentation_manager_detail } from "./InternalSymbols.js";
19
20
  /**
20
21
  * Presentation hierarchy cache mode.
21
22
  * @public
@@ -49,6 +50,7 @@ export class PresentationManager {
49
50
  _props;
50
51
  _detail;
51
52
  _localizationHelper;
53
+ _schemaContextProvider;
52
54
  /**
53
55
  * Creates an instance of PresentationManager.
54
56
  * @param props Optional configuration properties.
@@ -57,6 +59,8 @@ export class PresentationManager {
57
59
  this._props = props ?? {};
58
60
  this._detail = new PresentationManagerDetail(this._props);
59
61
  this._localizationHelper = new LocalizationHelper({ getLocalizedString: props?.getLocalizedString ?? getLocalizedStringEN });
62
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
63
+ this._schemaContextProvider = props?.schemaContextProvider ?? ((imodel) => imodel.schemaContext);
60
64
  }
61
65
  /** Get / set active unit system used to format property values with units */
62
66
  get activeUnitSystem() {
@@ -70,7 +74,7 @@ export class PresentationManager {
70
74
  [Symbol.dispose]() {
71
75
  this._detail[Symbol.dispose]();
72
76
  }
73
- /** @deprecated in 5.0 Use [Symbol.dispose] instead. */
77
+ /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [Symbol.dispose] instead. */
74
78
  /* c8 ignore next 3 */
75
79
  dispose() {
76
80
  this[Symbol.dispose]();
@@ -169,18 +173,27 @@ export class PresentationManager {
169
173
  async getContentSetSize(requestOptions) {
170
174
  return this._detail.getContentSetSize(requestOptions);
171
175
  }
176
+ createContentFormatter({ imodel, unitSystem }) {
177
+ if (!unitSystem) {
178
+ unitSystem = this.props.defaultUnitSystem ?? "metric";
179
+ }
180
+ const schemaContext = this._schemaContextProvider(imodel);
181
+ const koqPropertyFormatter = new KoqPropertyValueFormatter({
182
+ schemaContext,
183
+ formatsProvider: this.props.formatsProvider ?? new SchemaFormatsProvider(schemaContext, unitSystem),
184
+ });
185
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
186
+ koqPropertyFormatter.defaultFormats = this.props.defaultFormats;
187
+ return new ContentFormatter(new ContentPropertyValueFormatter(koqPropertyFormatter), unitSystem);
188
+ }
172
189
  /**
173
190
  * Retrieves the content set based on the supplied content descriptor.
174
191
  * @public
175
192
  */
176
193
  async getContentSet(requestOptions) {
177
- let items = await this._detail.getContentSet({
178
- ...requestOptions,
179
- ...(!requestOptions.omitFormattedValues && this.props.schemaContextProvider !== undefined ? { omitFormattedValues: true } : undefined),
180
- });
181
- if (!requestOptions.omitFormattedValues && this.props.schemaContextProvider !== undefined) {
182
- const koqPropertyFormatter = new KoqPropertyValueFormatter(this.props.schemaContextProvider(requestOptions.imodel), this.props.defaultFormats);
183
- const formatter = new ContentFormatter(new ContentPropertyValueFormatter(koqPropertyFormatter), requestOptions.unitSystem ?? this.props.defaultUnitSystem);
194
+ let items = await this._detail.getContentSet({ ...requestOptions, omitFormattedValues: true });
195
+ if (!requestOptions.omitFormattedValues) {
196
+ const formatter = this.createContentFormatter(requestOptions);
184
197
  items = await formatter.formatContentItems(items, requestOptions.descriptor);
185
198
  }
186
199
  return this._localizationHelper.getLocalizedContentItems(items);
@@ -190,16 +203,12 @@ export class PresentationManager {
190
203
  * @public
191
204
  */
192
205
  async getContent(requestOptions) {
193
- const content = await this._detail.getContent({
194
- ...requestOptions,
195
- ...(!requestOptions.omitFormattedValues && this.props.schemaContextProvider !== undefined ? { omitFormattedValues: true } : undefined),
196
- });
206
+ const content = await this._detail.getContent({ ...requestOptions, omitFormattedValues: true });
197
207
  if (!content) {
198
208
  return undefined;
199
209
  }
200
- if (!requestOptions.omitFormattedValues && this.props.schemaContextProvider !== undefined) {
201
- const koqPropertyFormatter = new KoqPropertyValueFormatter(this.props.schemaContextProvider(requestOptions.imodel), this.props.defaultFormats);
202
- const formatter = new ContentFormatter(new ContentPropertyValueFormatter(koqPropertyFormatter), requestOptions.unitSystem ?? this.props.defaultUnitSystem);
210
+ if (!requestOptions.omitFormattedValues) {
211
+ const formatter = this.createContentFormatter(requestOptions);
203
212
  await formatter.formatContent(content);
204
213
  }
205
214
  return this._localizationHelper.getLocalizedContent(content);
@@ -305,7 +314,7 @@ export class PresentationManager {
305
314
  /**
306
315
  * Retrieves available selection scopes.
307
316
  * @public
308
- * @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.
317
+ * @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.
309
318
  */
310
319
  // eslint-disable-next-line @typescript-eslint/no-deprecated
311
320
  async getSelectionScopes(_requestOptions) {
@@ -314,7 +323,7 @@ export class PresentationManager {
314
323
  /**
315
324
  * Computes selection based on provided element IDs and selection scope.
316
325
  * @public
317
- * @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.
326
+ * @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.
318
327
  */
319
328
  // eslint-disable-next-line @typescript-eslint/no-deprecated
320
329
  async computeSelection(requestOptions) {