@itwin/presentation-frontend 5.0.0-dev.10 → 5.0.0-dev.102

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 (159) hide show
  1. package/CHANGELOG.md +58 -1
  2. package/lib/cjs/package.json +1 -0
  3. package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.d.ts +3 -3
  4. package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.d.ts.map +1 -1
  5. package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.js +11 -9
  6. package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.js.map +1 -1
  7. package/lib/cjs/presentation-frontend/IModelConnectionInitialization.d.ts +13 -0
  8. package/lib/cjs/presentation-frontend/IModelConnectionInitialization.d.ts.map +1 -0
  9. package/lib/cjs/presentation-frontend/IModelConnectionInitialization.js +22 -0
  10. package/lib/cjs/presentation-frontend/IModelConnectionInitialization.js.map +1 -0
  11. package/lib/cjs/presentation-frontend/InternalSymbols.d.ts +6 -0
  12. package/lib/cjs/presentation-frontend/InternalSymbols.d.ts.map +1 -0
  13. package/lib/cjs/presentation-frontend/InternalSymbols.js +17 -0
  14. package/lib/cjs/presentation-frontend/InternalSymbols.js.map +1 -0
  15. package/lib/cjs/presentation-frontend/IpcRequestsHandler.d.ts +12 -3
  16. package/lib/cjs/presentation-frontend/IpcRequestsHandler.d.ts.map +1 -1
  17. package/lib/cjs/presentation-frontend/IpcRequestsHandler.js +7 -7
  18. package/lib/cjs/presentation-frontend/IpcRequestsHandler.js.map +1 -1
  19. package/lib/cjs/presentation-frontend/LocalizationHelper.d.ts +1 -1
  20. package/lib/cjs/presentation-frontend/LocalizationHelper.d.ts.map +1 -1
  21. package/lib/cjs/presentation-frontend/LocalizationHelper.js +7 -6
  22. package/lib/cjs/presentation-frontend/LocalizationHelper.js.map +1 -1
  23. package/lib/cjs/presentation-frontend/Presentation.d.ts +15 -14
  24. package/lib/cjs/presentation-frontend/Presentation.d.ts.map +1 -1
  25. package/lib/cjs/presentation-frontend/Presentation.js +31 -45
  26. package/lib/cjs/presentation-frontend/Presentation.js.map +1 -1
  27. package/lib/cjs/presentation-frontend/PresentationManager.d.ts +12 -23
  28. package/lib/cjs/presentation-frontend/PresentationManager.d.ts.map +1 -1
  29. package/lib/cjs/presentation-frontend/PresentationManager.js +77 -74
  30. package/lib/cjs/presentation-frontend/PresentationManager.js.map +1 -1
  31. package/lib/cjs/presentation-frontend/RulesetManager.js +2 -4
  32. package/lib/cjs/presentation-frontend/RulesetManager.js.map +1 -1
  33. package/lib/cjs/presentation-frontend/RulesetVariablesManager.d.ts +2 -4
  34. package/lib/cjs/presentation-frontend/RulesetVariablesManager.d.ts.map +1 -1
  35. package/lib/cjs/presentation-frontend/RulesetVariablesManager.js +6 -4
  36. package/lib/cjs/presentation-frontend/RulesetVariablesManager.js.map +1 -1
  37. package/lib/cjs/presentation-frontend/StreamedResponseGenerator.d.ts +1 -1
  38. package/lib/cjs/presentation-frontend/StreamedResponseGenerator.d.ts.map +1 -1
  39. package/lib/cjs/presentation-frontend/StreamedResponseGenerator.js +1 -0
  40. package/lib/cjs/presentation-frontend/StreamedResponseGenerator.js.map +1 -1
  41. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts +9 -19
  42. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts.map +1 -1
  43. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +163 -153
  44. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
  45. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts +4 -5
  46. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts.map +1 -1
  47. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js +27 -29
  48. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js.map +1 -1
  49. package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.d.ts +3 -0
  50. package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.d.ts.map +1 -1
  51. package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js +8 -2
  52. package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
  53. package/lib/cjs/presentation-frontend/selection/ISelectionProvider.d.ts +2 -1
  54. package/lib/cjs/presentation-frontend/selection/ISelectionProvider.d.ts.map +1 -1
  55. package/lib/cjs/presentation-frontend/selection/ISelectionProvider.js +1 -0
  56. package/lib/cjs/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
  57. package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.d.ts +5 -1
  58. package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.d.ts.map +1 -1
  59. package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js +3 -0
  60. package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
  61. package/lib/cjs/presentation-frontend/selection/SelectionHandler.d.ts +8 -5
  62. package/lib/cjs/presentation-frontend/selection/SelectionHandler.d.ts.map +1 -1
  63. package/lib/cjs/presentation-frontend/selection/SelectionHandler.js +35 -13
  64. package/lib/cjs/presentation-frontend/selection/SelectionHandler.js.map +1 -1
  65. package/lib/cjs/presentation-frontend/selection/SelectionHelper.d.ts +2 -0
  66. package/lib/cjs/presentation-frontend/selection/SelectionHelper.d.ts.map +1 -1
  67. package/lib/cjs/presentation-frontend/selection/SelectionHelper.js +3 -1
  68. package/lib/cjs/presentation-frontend/selection/SelectionHelper.js.map +1 -1
  69. package/lib/cjs/presentation-frontend/selection/SelectionManager.d.ts +31 -13
  70. package/lib/cjs/presentation-frontend/selection/SelectionManager.d.ts.map +1 -1
  71. package/lib/cjs/presentation-frontend/selection/SelectionManager.js +216 -116
  72. package/lib/cjs/presentation-frontend/selection/SelectionManager.js.map +1 -1
  73. package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.d.ts +11 -9
  74. package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.d.ts.map +1 -1
  75. package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js +6 -11
  76. package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
  77. package/lib/cjs/presentation-frontend.d.ts +15 -15
  78. package/lib/cjs/presentation-frontend.d.ts.map +1 -1
  79. package/lib/cjs/presentation-frontend.js +30 -29
  80. package/lib/cjs/presentation-frontend.js.map +1 -1
  81. package/lib/esm/presentation-frontend/ConnectivityInformationProvider.d.ts +3 -3
  82. package/lib/esm/presentation-frontend/ConnectivityInformationProvider.d.ts.map +1 -1
  83. package/lib/esm/presentation-frontend/ConnectivityInformationProvider.js +11 -9
  84. package/lib/esm/presentation-frontend/ConnectivityInformationProvider.js.map +1 -1
  85. package/lib/esm/presentation-frontend/IModelConnectionInitialization.d.ts +13 -0
  86. package/lib/esm/presentation-frontend/IModelConnectionInitialization.d.ts.map +1 -0
  87. package/lib/esm/presentation-frontend/IModelConnectionInitialization.js +17 -0
  88. package/lib/esm/presentation-frontend/IModelConnectionInitialization.js.map +1 -0
  89. package/lib/esm/presentation-frontend/InternalSymbols.d.ts +6 -0
  90. package/lib/esm/presentation-frontend/InternalSymbols.d.ts.map +1 -0
  91. package/lib/esm/presentation-frontend/InternalSymbols.js +14 -0
  92. package/lib/esm/presentation-frontend/InternalSymbols.js.map +1 -0
  93. package/lib/esm/presentation-frontend/IpcRequestsHandler.d.ts +12 -3
  94. package/lib/esm/presentation-frontend/IpcRequestsHandler.d.ts.map +1 -1
  95. package/lib/esm/presentation-frontend/IpcRequestsHandler.js +8 -8
  96. package/lib/esm/presentation-frontend/IpcRequestsHandler.js.map +1 -1
  97. package/lib/esm/presentation-frontend/LocalizationHelper.d.ts +1 -1
  98. package/lib/esm/presentation-frontend/LocalizationHelper.d.ts.map +1 -1
  99. package/lib/esm/presentation-frontend/LocalizationHelper.js +3 -2
  100. package/lib/esm/presentation-frontend/LocalizationHelper.js.map +1 -1
  101. package/lib/esm/presentation-frontend/Presentation.d.ts +15 -14
  102. package/lib/esm/presentation-frontend/Presentation.d.ts.map +1 -1
  103. package/lib/esm/presentation-frontend/Presentation.js +24 -38
  104. package/lib/esm/presentation-frontend/Presentation.js.map +1 -1
  105. package/lib/esm/presentation-frontend/PresentationManager.d.ts +12 -23
  106. package/lib/esm/presentation-frontend/PresentationManager.d.ts.map +1 -1
  107. package/lib/esm/presentation-frontend/PresentationManager.js +66 -63
  108. package/lib/esm/presentation-frontend/PresentationManager.js.map +1 -1
  109. package/lib/esm/presentation-frontend/RulesetManager.js +2 -4
  110. package/lib/esm/presentation-frontend/RulesetManager.js.map +1 -1
  111. package/lib/esm/presentation-frontend/RulesetVariablesManager.d.ts +2 -4
  112. package/lib/esm/presentation-frontend/RulesetVariablesManager.d.ts.map +1 -1
  113. package/lib/esm/presentation-frontend/RulesetVariablesManager.js +6 -4
  114. package/lib/esm/presentation-frontend/RulesetVariablesManager.js.map +1 -1
  115. package/lib/esm/presentation-frontend/StreamedResponseGenerator.d.ts +1 -1
  116. package/lib/esm/presentation-frontend/StreamedResponseGenerator.d.ts.map +1 -1
  117. package/lib/esm/presentation-frontend/StreamedResponseGenerator.js +1 -0
  118. package/lib/esm/presentation-frontend/StreamedResponseGenerator.js.map +1 -1
  119. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts +9 -19
  120. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts.map +1 -1
  121. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +164 -154
  122. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
  123. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts +4 -5
  124. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts.map +1 -1
  125. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js +27 -29
  126. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js.map +1 -1
  127. package/lib/esm/presentation-frontend/selection/HiliteSetProvider.d.ts +3 -0
  128. package/lib/esm/presentation-frontend/selection/HiliteSetProvider.d.ts.map +1 -1
  129. package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js +8 -2
  130. package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
  131. package/lib/esm/presentation-frontend/selection/ISelectionProvider.d.ts +2 -1
  132. package/lib/esm/presentation-frontend/selection/ISelectionProvider.d.ts.map +1 -1
  133. package/lib/esm/presentation-frontend/selection/ISelectionProvider.js +1 -0
  134. package/lib/esm/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
  135. package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.d.ts +5 -1
  136. package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.d.ts.map +1 -1
  137. package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js +3 -0
  138. package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
  139. package/lib/esm/presentation-frontend/selection/SelectionHandler.d.ts +8 -5
  140. package/lib/esm/presentation-frontend/selection/SelectionHandler.d.ts.map +1 -1
  141. package/lib/esm/presentation-frontend/selection/SelectionHandler.js +35 -13
  142. package/lib/esm/presentation-frontend/selection/SelectionHandler.js.map +1 -1
  143. package/lib/esm/presentation-frontend/selection/SelectionHelper.d.ts +2 -0
  144. package/lib/esm/presentation-frontend/selection/SelectionHelper.d.ts.map +1 -1
  145. package/lib/esm/presentation-frontend/selection/SelectionHelper.js +3 -1
  146. package/lib/esm/presentation-frontend/selection/SelectionHelper.js.map +1 -1
  147. package/lib/esm/presentation-frontend/selection/SelectionManager.d.ts +31 -13
  148. package/lib/esm/presentation-frontend/selection/SelectionManager.d.ts.map +1 -1
  149. package/lib/esm/presentation-frontend/selection/SelectionManager.js +202 -102
  150. package/lib/esm/presentation-frontend/selection/SelectionManager.js.map +1 -1
  151. package/lib/esm/presentation-frontend/selection/SelectionScopesManager.d.ts +11 -9
  152. package/lib/esm/presentation-frontend/selection/SelectionScopesManager.d.ts.map +1 -1
  153. package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js +7 -11
  154. package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
  155. package/lib/esm/presentation-frontend.d.ts +15 -15
  156. package/lib/esm/presentation-frontend.d.ts.map +1 -1
  157. package/lib/esm/presentation-frontend.js +12 -15
  158. package/lib/esm/presentation-frontend.js.map +1 -1
  159. package/package.json +42 -42
@@ -1 +1 @@
1
- {"version":3,"file":"Presentation.js","sourceRoot":"","sources":["../../../src/presentation-frontend/Presentation.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,wDAAiD;AAEjD,oEAAmF;AACnF,+FAA4H;AAC5H,+FAAyI;AACzI,6DAAkE;AAClE,+DAAsF;AACtF,mEAAuF;AACvF,+EAA4E;AAE5E,IAAI,YAAsC,CAAC;AAC3C,IAAI,mBAAoD,CAAC;AACzD,IAAI,gBAA8C,CAAC;AACnD,IAAI,yBAAgE,CAAC;AACrE,MAAM,sBAAsB,GAA8C,EAAE,CAAC;AAC7E,MAAM,mBAAmB,GAAsB,EAAE,CAAC;AAiBlD;;;;;;;;GAQG;AACH,MAAa,YAAY;IACvB,0BAA0B;IAC1B,gBAAuB,CAAC;IAExB;;;;;;;;;OASG;IACI,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,KAAyB;QACtD,IAAI,CAAC,yBAAS,CAAC,WAAW,EAAE,CAAC;YAC3B,MAAM,IAAI,uCAAiB,CAAC,wCAAkB,CAAC,cAAc,EAAE,yEAAyE,CAAC,CAAC;QAC5I,CAAC;QACD,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,YAAY,GAAG,yBAAS,CAAC,YAAY,CAAC;QACxC,CAAC;QACD,IAAI,CAAC,mBAAmB,EAAE,CAAC;YACzB,MAAM,YAAY,GAAG,KAAK,EAAE,YAAY,IAAI,EAAE,CAAC;YAC/C,IA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E,CAAC;QAChC,CAAC;QACD,mBAAmB,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,yCAAyC;IAClC,MAAM,KAAK,SAAS;QACzB,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC,CAAC;QAC/F,CAAC;QACD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,mBAAmB,CAAC,KAAuB;QACvD,gBAAgB,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACI,MAAM,KAAK,kBAAkB;QAClC,IAAI,CAAC,yBAAyB,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,kFAAkF,CAAC,CAAC;QACtG,CAAC;QACD,OAAO,yBAAyB,CAAC;IACnC,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,4BAA4B,CAAC,KAAgC;QACzE,IAAI,yBAAyB,EAAE,CAAC;YAC9B,yBAAyB,CAAC,OAAO,EAAE,CAAC;QACtC,CAAC;QACD,yBAAyB,GAAG,KAAK,CAAC;IACpC,CAAC;IAED;;OAEG;IACI,MAAM,KAAK,YAAY;QAC5B,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC,CAAC;QAC/F,CAAC;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,eAAe,CAAC,KAAmB;QAC/C,YAAY,GAAG,KAAK,CAAC;IACvB,CAAC;CACF;AA7JD,oCA6JC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Core\r\n */\r\n\r\nimport { IModelApp } from \"@itwin/core-frontend\";\r\nimport { Localization } from \"@itwin/core-common\";\r\nimport { PresentationError, PresentationStatus } from \"@itwin/presentation-common\";\r\nimport { FavoritePropertiesManager, FavoritePropertiesManagerProps } from \"./favorite-properties/FavoritePropertiesManager\";\r\nimport { createFavoritePropertiesStorage, DefaultFavoritePropertiesStorageTypes } from \"./favorite-properties/FavoritePropertiesStorage\";\r\nimport { FrontendLocalizationHelper } from \"./LocalizationHelper\";\r\nimport { PresentationManager, PresentationManagerProps } from \"./PresentationManager\";\r\nimport { SelectionManager, SelectionManagerProps } from \"./selection/SelectionManager\";\r\nimport { SelectionScopesManager } from \"./selection/SelectionScopesManager\";\r\n\r\nlet localization: Localization | undefined;\r\nlet presentationManager: PresentationManager | undefined;\r\nlet selectionManager: SelectionManager | undefined;\r\nlet favoritePropertiesManager: FavoritePropertiesManager | undefined;\r\nconst initializationHandlers: Array<() => Promise<(() => void) | void>> = [];\r\nconst terminationHandlers: Array<() => void> = [];\r\n\r\n/**\r\n * Props for initializing [[Presentation]].\r\n * @public\r\n */\r\nexport interface PresentationProps {\r\n /** Props for [[PresentationManager]]. */\r\n presentation?: PresentationManagerProps;\r\n\r\n /** Props for [[SelectionManager]]. */\r\n selection?: Partial<SelectionManagerProps>;\r\n\r\n /** Props for [[FavoritePropertiesManager]]. */\r\n favorites?: FavoritePropertiesManagerProps;\r\n}\r\n\r\n/**\r\n * Static class used to statically set up Presentation library for the frontend.\r\n * Basically what it does is:\r\n * - Create a singleton [[PresentationManager]] instance\r\n * - Create a singleton [[SelectionManager]] instance\r\n * - Create a singleton [[FavoritePropertiesManager]]] instance\r\n *\r\n * @public\r\n */\r\nexport class Presentation {\r\n /* istanbul ignore next */\r\n private constructor() {}\r\n\r\n /**\r\n * Initializes Presentation library for the frontend.\r\n *\r\n * Example:\r\n * ``` ts\r\n * [[include:Presentation.Frontend.Initialization]]\r\n * ```\r\n *\r\n * The method should be called after a call to [IModelApp.startup]($core-frontend).\r\n */\r\n public static async initialize(props?: PresentationProps): Promise<void> {\r\n if (!IModelApp.initialized) {\r\n throw new PresentationError(PresentationStatus.NotInitialized, \"IModelApp.startup must be called before calling Presentation.initialize\");\r\n }\r\n if (!localization) {\r\n localization = IModelApp.localization;\r\n }\r\n if (!presentationManager) {\r\n const managerProps = props?.presentation ?? {};\r\n if (!managerProps.activeLocale) {\r\n const languages = Presentation.localization.getLanguageList();\r\n managerProps.activeLocale = languages.length ? languages[0] : undefined;\r\n }\r\n presentationManager = PresentationManager.create(managerProps);\r\n }\r\n if (!selectionManager) {\r\n selectionManager = new SelectionManager({\r\n ...props?.selection,\r\n scopes:\r\n props?.selection?.scopes ??\r\n new SelectionScopesManager({\r\n rpcRequestsHandler: presentationManager.rpcRequestsHandler,\r\n localeProvider: () => this.presentation.activeLocale,\r\n }),\r\n });\r\n }\r\n if (!favoritePropertiesManager) {\r\n favoritePropertiesManager = new FavoritePropertiesManager({\r\n storage: props?.favorites ? props.favorites.storage : createFavoritePropertiesStorage(DefaultFavoritePropertiesStorageTypes.Noop),\r\n });\r\n }\r\n\r\n presentationManager.startIModelInitialization = (imodel) => favoritePropertiesManager?.startConnectionInitialization(imodel);\r\n presentationManager.ensureIModelInitialized = async (imodel) => favoritePropertiesManager?.ensureInitialized(imodel);\r\n\r\n await FrontendLocalizationHelper.registerNamespaces();\r\n for (const handler of initializationHandlers) {\r\n const cleanup = await handler();\r\n if (cleanup) {\r\n terminationHandlers.push(cleanup);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Terminates Presentation library frontend. This method should be called\r\n * before a call to [IModelApp.shutdown]($core-frontend)\r\n */\r\n public static terminate(): void {\r\n terminationHandlers.forEach((handler) => handler());\r\n terminationHandlers.length = 0;\r\n\r\n if (localization) {\r\n FrontendLocalizationHelper.unregisterNamespaces();\r\n }\r\n\r\n if (presentationManager) {\r\n presentationManager.dispose();\r\n }\r\n presentationManager = undefined;\r\n\r\n if (favoritePropertiesManager) {\r\n favoritePropertiesManager.dispose();\r\n }\r\n favoritePropertiesManager = undefined;\r\n\r\n if (selectionManager) {\r\n selectionManager.dispose();\r\n }\r\n selectionManager = undefined;\r\n localization = undefined;\r\n }\r\n\r\n /**\r\n * Registers an additional handler which will be invoked during Presentation library frontend\r\n * initialization.\r\n */\r\n public static registerInitializationHandler(handler: () => Promise<() => void>): void {\r\n initializationHandlers.push(handler);\r\n }\r\n\r\n /** The singleton [[PresentationManager]] */\r\n public static get presentation(): PresentationManager {\r\n if (!presentationManager) {\r\n throw new Error(\"Presentation must be first initialized by calling Presentation.initialize\");\r\n }\r\n return presentationManager;\r\n }\r\n\r\n /** @internal */\r\n public static setPresentationManager(value: PresentationManager) {\r\n if (presentationManager) {\r\n presentationManager.dispose();\r\n }\r\n presentationManager = value;\r\n }\r\n\r\n /** The singleton [[SelectionManager]] */\r\n public static get selection(): SelectionManager {\r\n if (!selectionManager) {\r\n throw new Error(\"Presentation must be first initialized by calling Presentation.initialize\");\r\n }\r\n return selectionManager;\r\n }\r\n\r\n /** @internal */\r\n public static setSelectionManager(value: SelectionManager) {\r\n selectionManager = value;\r\n }\r\n\r\n /**\r\n * The singleton [[FavoritePropertiesManager]]\r\n * @public\r\n */\r\n public static get favoriteProperties(): FavoritePropertiesManager {\r\n if (!favoritePropertiesManager) {\r\n throw new Error(\"Favorite Properties must be first initialized by calling Presentation.initialize\");\r\n }\r\n return favoritePropertiesManager;\r\n }\r\n\r\n /** @internal */\r\n public static setFavoritePropertiesManager(value: FavoritePropertiesManager) {\r\n if (favoritePropertiesManager) {\r\n favoritePropertiesManager.dispose();\r\n }\r\n favoritePropertiesManager = value;\r\n }\r\n\r\n /**\r\n * The localization manager used by Presentation frontend. Returns the result of `IModelApp.i18n`.\r\n */\r\n public static get localization(): Localization {\r\n if (!localization) {\r\n throw new Error(\"Presentation must be first initialized by calling Presentation.initialize\");\r\n }\r\n return localization;\r\n }\r\n\r\n /** @internal */\r\n public static setLocalization(value: Localization) {\r\n localization = value;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Presentation.js","sourceRoot":"","sources":["../../../src/presentation-frontend/Presentation.ts"],"names":[],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------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Core\r\n */\r\n\r\nimport { IModelApp } from \"@itwin/core-frontend\";\r\nimport { Localization } from \"@itwin/core-common\";\r\nimport { PresentationError, PresentationStatus } from \"@itwin/presentation-common\";\r\nimport { FavoritePropertiesManager, FavoritePropertiesManagerProps } from \"./favorite-properties/FavoritePropertiesManager.js\";\r\nimport { createFavoritePropertiesStorage, DefaultFavoritePropertiesStorageTypes } from \"./favorite-properties/FavoritePropertiesStorage.js\";\r\nimport { FrontendLocalizationHelper } from \"./LocalizationHelper.js\";\r\nimport { PresentationManager, PresentationManagerProps } from \"./PresentationManager.js\";\r\nimport { SelectionManager, SelectionManagerProps } from \"./selection/SelectionManager.js\";\r\nimport { SelectionScopesManager } from \"./selection/SelectionScopesManager.js\";\r\nimport { imodelInitializationHandlers } from \"./IModelConnectionInitialization.js\";\r\nimport { _presentation_manager_rpcRequestsHandler } from \"./InternalSymbols.js\";\r\n\r\nlet localization: Localization | undefined;\r\nlet presentationManager: PresentationManager | undefined;\r\nlet selectionManager: SelectionManager | undefined; // eslint-disable-line @typescript-eslint/no-deprecated\r\nlet favoritePropertiesManager: FavoritePropertiesManager | undefined;\r\nconst initializationHandlers: Array<() => Promise<(() => void) | void>> = [];\r\nconst terminationHandlers: Array<() => void> = [];\r\n\r\n/**\r\n * Props for initializing [[Presentation]].\r\n * @public\r\n */\r\nexport interface PresentationProps {\r\n /** Props for [[PresentationManager]]. */\r\n presentation?: PresentationManagerProps;\r\n\r\n /**\r\n * Props for [[SelectionManager]].\r\n *\r\n * @deprecated in 5.0. The whole unified selection system in this package is deprecated in favor of the new\r\n * [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n selection?: Partial<SelectionManagerProps>;\r\n\r\n /** Props for [[FavoritePropertiesManager]]. */\r\n favorites?: FavoritePropertiesManagerProps;\r\n}\r\n\r\n/**\r\n * Static class used to statically set up Presentation library for the frontend.\r\n * Basically what it does is:\r\n * - Create a singleton [[PresentationManager]] instance\r\n * - Create a singleton [[SelectionManager]] instance\r\n * - Create a singleton [[FavoritePropertiesManager]]] instance\r\n *\r\n * @public\r\n */\r\nexport class Presentation {\r\n /* c8 ignore next */\r\n private constructor() {}\r\n\r\n /**\r\n * Initializes Presentation library for the frontend.\r\n *\r\n * Example:\r\n * ``` ts\r\n * [[include:Presentation.Frontend.Initialization]]\r\n * ```\r\n *\r\n * The method should be called after a call to [IModelApp.startup]($core-frontend).\r\n */\r\n public static async initialize(props?: PresentationProps): Promise<void> {\r\n if (!IModelApp.initialized) {\r\n throw new PresentationError(PresentationStatus.NotInitialized, \"IModelApp.startup must be called before calling Presentation.initialize\");\r\n }\r\n if (!localization) {\r\n localization = IModelApp.localization;\r\n }\r\n if (!presentationManager) {\r\n const managerProps = props?.presentation ?? {};\r\n if (!managerProps.activeLocale) {\r\n const languages = Presentation.localization.getLanguageList();\r\n managerProps.activeLocale = languages.length ? languages[0] : undefined;\r\n }\r\n presentationManager = PresentationManager.create(managerProps);\r\n }\r\n if (!selectionManager) {\r\n /* eslint-disable @typescript-eslint/no-deprecated */\r\n selectionManager = new SelectionManager({\r\n ...props?.selection,\r\n scopes:\r\n props?.selection?.scopes ??\r\n new SelectionScopesManager({\r\n rpcRequestsHandler: presentationManager[_presentation_manager_rpcRequestsHandler],\r\n localeProvider: () => this.presentation.activeLocale,\r\n }),\r\n });\r\n /* eslint-enable @typescript-eslint/no-deprecated */\r\n }\r\n if (!favoritePropertiesManager) {\r\n favoritePropertiesManager = new FavoritePropertiesManager({\r\n storage: props?.favorites ? props.favorites.storage : createFavoritePropertiesStorage(DefaultFavoritePropertiesStorageTypes.Noop),\r\n });\r\n }\r\n\r\n await FrontendLocalizationHelper.registerNamespaces();\r\n for (const handler of initializationHandlers) {\r\n const cleanup = await handler();\r\n if (cleanup) {\r\n terminationHandlers.push(cleanup);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Terminates Presentation library frontend. This method should be called\r\n * before a call to [IModelApp.shutdown]($core-frontend)\r\n */\r\n public static terminate(): void {\r\n terminationHandlers.forEach((handler) => handler());\r\n terminationHandlers.length = 0;\r\n\r\n imodelInitializationHandlers.clear();\r\n\r\n if (localization) {\r\n FrontendLocalizationHelper.unregisterNamespaces();\r\n }\r\n\r\n if (presentationManager) {\r\n presentationManager[Symbol.dispose]();\r\n }\r\n presentationManager = undefined;\r\n\r\n if (favoritePropertiesManager) {\r\n favoritePropertiesManager[Symbol.dispose]();\r\n }\r\n favoritePropertiesManager = undefined;\r\n\r\n if (selectionManager) {\r\n selectionManager[Symbol.dispose]();\r\n }\r\n selectionManager = undefined;\r\n localization = undefined;\r\n }\r\n\r\n /**\r\n * Registers an additional handler which will be invoked during Presentation library frontend\r\n * initialization.\r\n */\r\n public static registerInitializationHandler(handler: () => Promise<() => void>): void {\r\n initializationHandlers.push(handler);\r\n }\r\n\r\n /** The singleton [[PresentationManager]] */\r\n public static get presentation(): PresentationManager {\r\n if (!presentationManager) {\r\n throw new Error(\"Presentation must be first initialized by calling Presentation.initialize\");\r\n }\r\n return presentationManager;\r\n }\r\n\r\n /**\r\n * The singleton [[SelectionManager]].\r\n *\r\n * @deprecated in 5.0. The whole unified selection system in this package is deprecated in favor of the new\r\n * [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public static get selection(): SelectionManager {\r\n if (!selectionManager) {\r\n throw new Error(\"Presentation must be first initialized by calling Presentation.initialize\");\r\n }\r\n return selectionManager;\r\n }\r\n\r\n /**\r\n * The singleton [[FavoritePropertiesManager]]\r\n */\r\n public static get favoriteProperties(): FavoritePropertiesManager {\r\n if (!favoritePropertiesManager) {\r\n throw new Error(\"Favorite Properties must be first initialized by calling Presentation.initialize\");\r\n }\r\n return favoritePropertiesManager;\r\n }\r\n\r\n /**\r\n * The localization manager used by Presentation frontend. Returns the result of `IModelApp.i18n`.\r\n */\r\n public static get localization(): Localization {\r\n if (!localization) {\r\n throw new Error(\"Presentation must be first initialized by calling Presentation.initialize\");\r\n }\r\n return localization;\r\n }\r\n}\r\n"]}
@@ -1,14 +1,16 @@
1
1
  /** @packageDocumentation
2
2
  * @module Core
3
3
  */
4
- import { BeEvent, IDisposable } from "@itwin/core-bentley";
4
+ import { BeEvent } from "@itwin/core-bentley";
5
5
  import { IModelConnection } from "@itwin/core-frontend";
6
6
  import { UnitSystemKey } from "@itwin/core-quantity";
7
7
  import { SchemaContext } from "@itwin/ecschema-metadata";
8
- import { ClientDiagnosticsAttribute, Content, ContentDescriptorRequestOptions, ContentInstanceKeysRequestOptions, ContentRequestOptions, ContentSourcesRequestOptions, ContentUpdateInfo, Descriptor, DescriptorOverrides, DisplayLabelRequestOptions, DisplayLabelsRequestOptions, DisplayValueGroup, DistinctValuesRequestOptions, ElementProperties, FilterByInstancePathsHierarchyRequestOptions, FilterByTextHierarchyRequestOptions, FormatsMap, HierarchyLevelDescriptorRequestOptions, HierarchyRequestOptions, HierarchyUpdateInfo, InstanceKey, Item, KeySet, LabelDefinition, Node, NodeKey, NodePathElement, Paged, PagedResponse, RpcRequestsHandler, RulesetVariable, SelectClassInfo, SingleElementPropertiesRequestOptions } from "@itwin/presentation-common";
9
- import { IpcRequestsHandler } from "./IpcRequestsHandler";
10
- import { RulesetManager } from "./RulesetManager";
11
- import { RulesetVariablesManager } from "./RulesetVariablesManager";
8
+ import { ClientDiagnosticsAttribute, Content, ContentDescriptorRequestOptions, ContentInstanceKeysRequestOptions, ContentRequestOptions, ContentSourcesRequestOptions, ContentUpdateInfo, Descriptor, DescriptorOverrides, DisplayLabelRequestOptions, DisplayLabelsRequestOptions, DisplayValueGroup, DistinctValuesRequestOptions, ElementProperties, FilterByInstancePathsHierarchyRequestOptions, FilterByTextHierarchyRequestOptions, FormatsMap, HierarchyLevelDescriptorRequestOptions, HierarchyRequestOptions, HierarchyUpdateInfo, InstanceKey, Item, KeySet, LabelDefinition, Node, NodeKey, NodePathElement, Paged, PagedResponse, RulesetVariable, SelectClassInfo, SingleElementPropertiesRequestOptions } from "@itwin/presentation-common";
9
+ import { RpcRequestsHandler } from "@itwin/presentation-common/internal";
10
+ import { IpcRequestsHandler } from "./IpcRequestsHandler.js";
11
+ import { RulesetManager } from "./RulesetManager.js";
12
+ import { RulesetVariablesManager } from "./RulesetVariablesManager.js";
13
+ import { _presentation_manager_ipcRequestsHandler, _presentation_manager_rpcRequestsHandler } from "./InternalSymbols.js";
12
14
  /**
13
15
  * Data structure that describes IModel hierarchy change event arguments.
14
16
  * @public
@@ -111,10 +113,6 @@ export interface PresentationManagerProps {
111
113
  * @note Only has effect when frontend value formatting is enabled by supplying the `schemaContextProvider` prop.
112
114
  */
113
115
  defaultFormats?: FormatsMap;
114
- /** @internal */
115
- rpcRequestsHandler?: RpcRequestsHandler;
116
- /** @internal */
117
- ipcRequestsHandler?: IpcRequestsHandler;
118
116
  }
119
117
  /**
120
118
  * Frontend Presentation manager which basically just forwards all calls to
@@ -122,7 +120,7 @@ export interface PresentationManagerProps {
122
120
  *
123
121
  * @public
124
122
  */
125
- export declare class PresentationManager implements IDisposable {
123
+ export declare class PresentationManager implements Disposable {
126
124
  private _requestsHandler;
127
125
  private _rulesets;
128
126
  private _localizationHelper;
@@ -153,30 +151,21 @@ export declare class PresentationManager implements IDisposable {
153
151
  /** Get / set active locale used for localizing presentation data */
154
152
  get activeLocale(): string | undefined;
155
153
  set activeLocale(locale: string | undefined);
154
+ [Symbol.dispose](): void;
155
+ /** @deprecated in 5.0 Use [Symbol.dispose] instead. */
156
156
  dispose(): void;
157
157
  private onUpdate;
158
158
  /** @note This is only called in native apps after changes in iModels */
159
159
  private handleUpdateAsync;
160
- /**
161
- * Function that is called when a new IModelConnection is used to retrieve data.
162
- * @internal
163
- */
164
- startIModelInitialization(_: IModelConnection): void;
165
- /**
166
- * Function that should be called to finish initialization that was started at [[PresentationManager.startIModelInitialization]].
167
- * Can be removed when [[FavoritePropertiesManager.has]] and [[FavoritePropertiesManager.sortFields]] are removed.
168
- * @internal
169
- */
170
- ensureIModelInitialized(_: IModelConnection): Promise<void>;
171
160
  /**
172
161
  * Create a new PresentationManager instance
173
162
  * @param props Optional properties used to configure the manager
174
163
  */
175
164
  static create(props?: PresentationManagerProps): PresentationManager;
176
165
  /** @internal */
177
- get rpcRequestsHandler(): RpcRequestsHandler;
166
+ get [_presentation_manager_rpcRequestsHandler](): RpcRequestsHandler;
178
167
  /** @internal */
179
- get ipcRequestsHandler(): IpcRequestsHandler | undefined;
168
+ get [_presentation_manager_ipcRequestsHandler](): IpcRequestsHandler | undefined;
180
169
  /**
181
170
  * Get rulesets manager
182
171
  */
@@ -1 +1 @@
1
- {"version":3,"file":"PresentationManager.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/PresentationManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAqB,WAAW,EAAuB,MAAM,qBAAqB,CAAC;AACnG,OAAO,EAAa,gBAAgB,EAAU,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAEL,0BAA0B,EAC1B,OAAO,EACP,+BAA+B,EAG/B,iCAAiC,EAEjC,qBAAqB,EACrB,4BAA4B,EAC5B,iBAAiB,EAEjB,UAAU,EACV,mBAAmB,EACnB,0BAA0B,EAC1B,2BAA2B,EAC3B,iBAAiB,EACjB,4BAA4B,EAC5B,iBAAiB,EACjB,4CAA4C,EAC5C,mCAAmC,EACnC,UAAU,EACV,sCAAsC,EACtC,uBAAuB,EACvB,mBAAmB,EACnB,WAAW,EACX,IAAI,EAGJ,M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iCvE,2DAA2D;IAC9C,yBAAyB,CACpC,cAAc,EAAE,0BAA0B,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,0BAA0B,GACrG,OAAO,CAAC,eAAe,CAAC;IAO3B,4DAA4D;IAC/C,kCAAkC,CAC7C,cAAc,EAAE,2BAA2B,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,0BAA0B,GAAG,4BAA4B,GACrI,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,qBAAqB,CAAC,eAAe,CAAC,CAAA;KAAE,CAAC;IAgB5E;;;OAGG;IACU,0BAA0B,CACrC,cAAc,EAAE,2BAA2B,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,0BAA0B,GAAG,4BAA4B,GACrI,OAAO,CAAC,eAAe,EAAE,CAAC;CAI9B"}
@@ -11,12 +11,15 @@ exports.PresentationManager = void 0;
11
11
  const core_bentley_1 = require("@itwin/core-bentley");
12
12
  const core_frontend_1 = require("@itwin/core-frontend");
13
13
  const presentation_common_1 = require("@itwin/presentation-common");
14
- const IpcRequestsHandler_1 = require("./IpcRequestsHandler");
15
- const LocalizationHelper_1 = require("./LocalizationHelper");
16
- const RulesetManager_1 = require("./RulesetManager");
17
- const RulesetVariablesManager_1 = require("./RulesetVariablesManager");
18
- const StreamedResponseGenerator_1 = require("./StreamedResponseGenerator");
14
+ const internal_1 = require("@itwin/presentation-common/internal");
19
15
  const unified_selection_1 = require("@itwin/unified-selection");
16
+ const IpcRequestsHandler_js_1 = require("./IpcRequestsHandler.js");
17
+ const LocalizationHelper_js_1 = require("./LocalizationHelper.js");
18
+ const RulesetManager_js_1 = require("./RulesetManager.js");
19
+ const RulesetVariablesManager_js_1 = require("./RulesetVariablesManager.js");
20
+ const StreamedResponseGenerator_js_1 = require("./StreamedResponseGenerator.js");
21
+ const IModelConnectionInitialization_js_1 = require("./IModelConnectionInitialization.js");
22
+ const InternalSymbols_js_1 = require("./InternalSymbols.js");
20
23
  /**
21
24
  * Frontend Presentation manager which basically just forwards all calls to
22
25
  * the backend implementation.
@@ -24,6 +27,23 @@ const unified_selection_1 = require("@itwin/unified-selection");
24
27
  * @public
25
28
  */
26
29
  class PresentationManager {
30
+ _requestsHandler;
31
+ _rulesets;
32
+ _localizationHelper;
33
+ _explicitActiveUnitSystem;
34
+ _rulesetVars;
35
+ _clearEventListener;
36
+ _schemaContextProvider;
37
+ _defaultFormats;
38
+ _ipcRequestsHandler;
39
+ /**
40
+ * An event raised when hierarchies created using specific ruleset change
41
+ */
42
+ onIModelHierarchyChanged = new core_bentley_1.BeEvent();
43
+ /**
44
+ * An event raised when content created using specific ruleset changes
45
+ */
46
+ onIModelContentChanged = new core_bentley_1.BeEvent();
27
47
  /**
28
48
  * Get / set active unit system used to format property values with units.
29
49
  *
@@ -38,33 +58,22 @@ class PresentationManager {
38
58
  this._explicitActiveUnitSystem = value;
39
59
  }
40
60
  constructor(props) {
41
- /**
42
- * An event raised when hierarchies created using specific ruleset change
43
- */
44
- this.onIModelHierarchyChanged = new core_bentley_1.BeEvent();
45
- /**
46
- * An event raised when content created using specific ruleset changes
47
- */
48
- this.onIModelContentChanged = new core_bentley_1.BeEvent();
49
- this.onUpdate = (_evt, report) => {
50
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
51
- this.handleUpdateAsync(report);
52
- };
53
61
  if (props) {
54
62
  // eslint-disable-next-line @typescript-eslint/no-deprecated
55
63
  this._explicitActiveUnitSystem = props.activeUnitSystem;
56
64
  }
57
65
  this._requestsHandler =
58
- props?.rpcRequestsHandler ?? new presentation_common_1.RpcRequestsHandler(props ? { clientId: props.clientId, timeout: props.requestTimeout } : undefined);
66
+ props?.rpcRequestsHandler ??
67
+ new internal_1.RpcRequestsHandler(props ? { clientId: props.clientId, timeout: props.requestTimeout } : undefined);
59
68
  this._rulesetVars = new Map();
60
- this._rulesets = RulesetManager_1.RulesetManagerImpl.create();
61
- this._localizationHelper = new LocalizationHelper_1.FrontendLocalizationHelper(props?.activeLocale);
69
+ this._rulesets = RulesetManager_js_1.RulesetManagerImpl.create();
70
+ this._localizationHelper = new LocalizationHelper_js_1.FrontendLocalizationHelper(props?.activeLocale);
62
71
  this._schemaContextProvider = props?.schemaContextProvider;
63
72
  this._defaultFormats = props?.defaultFormats;
64
73
  if (core_frontend_1.IpcApp.isValid) {
65
74
  // Ipc only works in ipc apps, so the `onUpdate` callback will only be called there.
66
- this._clearEventListener = core_frontend_1.IpcApp.addListener(presentation_common_1.PresentationIpcEvents.Update, this.onUpdate);
67
- this._ipcRequestsHandler = props?.ipcRequestsHandler ?? new IpcRequestsHandler_1.IpcRequestsHandler(this._requestsHandler.clientId);
75
+ this._clearEventListener = core_frontend_1.IpcApp.addListener(internal_1.PresentationIpcEvents.Update, this.onUpdate);
76
+ this._ipcRequestsHandler = props?.ipcRequestsHandler ?? new IpcRequestsHandler_js_1.IpcRequestsHandler(this._requestsHandler.clientId);
68
77
  }
69
78
  }
70
79
  /** Get / set active locale used for localizing presentation data */
@@ -74,22 +83,31 @@ class PresentationManager {
74
83
  set activeLocale(locale) {
75
84
  this._localizationHelper.locale = locale;
76
85
  }
77
- dispose() {
86
+ [Symbol.dispose]() {
78
87
  if (this._clearEventListener) {
79
88
  this._clearEventListener();
80
89
  this._clearEventListener = undefined;
81
90
  }
82
91
  }
92
+ /** @deprecated in 5.0 Use [Symbol.dispose] instead. */
93
+ /* c8 ignore next 3 */
94
+ dispose() {
95
+ this[Symbol.dispose]();
96
+ }
97
+ onUpdate = (_evt, report) => {
98
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
99
+ this.handleUpdateAsync(report);
100
+ };
83
101
  /** @note This is only called in native apps after changes in iModels */
84
102
  async handleUpdateAsync(report) {
85
103
  for (const imodelKey in report) {
86
- // istanbul ignore if
104
+ /* c8 ignore next 3 */
87
105
  if (!report.hasOwnProperty(imodelKey)) {
88
106
  continue;
89
107
  }
90
108
  const imodelReport = report[imodelKey];
91
109
  for (const rulesetId in imodelReport) {
92
- // istanbul ignore if
110
+ /* c8 ignore next 3 */
93
111
  if (!imodelReport.hasOwnProperty(rulesetId)) {
94
112
  continue;
95
113
  }
@@ -103,17 +121,6 @@ class PresentationManager {
103
121
  }
104
122
  }
105
123
  }
106
- /**
107
- * Function that is called when a new IModelConnection is used to retrieve data.
108
- * @internal
109
- */
110
- startIModelInitialization(_) { }
111
- /**
112
- * Function that should be called to finish initialization that was started at [[PresentationManager.startIModelInitialization]].
113
- * Can be removed when [[FavoritePropertiesManager.has]] and [[FavoritePropertiesManager.sortFields]] are removed.
114
- * @internal
115
- */
116
- async ensureIModelInitialized(_) { }
117
124
  /**
118
125
  * Create a new PresentationManager instance
119
126
  * @param props Optional properties used to configure the manager
@@ -122,11 +129,11 @@ class PresentationManager {
122
129
  return new PresentationManager(props);
123
130
  }
124
131
  /** @internal */
125
- get rpcRequestsHandler() {
132
+ get [InternalSymbols_js_1._presentation_manager_rpcRequestsHandler]() {
126
133
  return this._requestsHandler;
127
134
  }
128
135
  /** @internal */
129
- get ipcRequestsHandler() {
136
+ get [InternalSymbols_js_1._presentation_manager_ipcRequestsHandler]() {
130
137
  return this._ipcRequestsHandler;
131
138
  }
132
139
  /**
@@ -141,7 +148,7 @@ class PresentationManager {
141
148
  */
142
149
  vars(rulesetId) {
143
150
  if (!this._rulesetVars.has(rulesetId)) {
144
- const varsManager = new RulesetVariablesManager_1.RulesetVariablesManagerImpl(rulesetId, this._ipcRequestsHandler);
151
+ const varsManager = new RulesetVariablesManager_js_1.RulesetVariablesManagerImpl(rulesetId, this._ipcRequestsHandler);
145
152
  this._rulesetVars.set(rulesetId, varsManager);
146
153
  }
147
154
  return this._rulesetVars.get(rulesetId);
@@ -192,17 +199,16 @@ class PresentationManager {
192
199
  }
193
200
  /** Returns an iterator that polls nodes asynchronously. */
194
201
  async getNodesIterator(requestOptions) {
195
- this.startIModelInitialization(requestOptions.imodel);
202
+ (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
196
203
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
197
204
  const rpcOptions = this.toRpcTokenOptions({ ...options });
198
- const generator = new StreamedResponseGenerator_1.StreamedResponseGenerator({
205
+ const generator = new StreamedResponseGenerator_js_1.StreamedResponseGenerator({
199
206
  ...requestOptions,
200
207
  getBatch: async (paging) => {
201
208
  const result = await this._requestsHandler.getPagedNodes({ ...rpcOptions, paging });
202
209
  return {
203
210
  total: result.total,
204
- // eslint-disable-next-line @typescript-eslint/no-deprecated
205
- items: this._localizationHelper.getLocalizedNodes(result.items.map(presentation_common_1.Node.fromJSON)),
211
+ items: this._localizationHelper.getLocalizedNodes(result.items),
206
212
  };
207
213
  },
208
214
  });
@@ -218,7 +224,7 @@ class PresentationManager {
218
224
  }
219
225
  /** Retrieves nodes count. */
220
226
  async getNodesCount(requestOptions) {
221
- this.startIModelInitialization(requestOptions.imodel);
227
+ (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
222
228
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
223
229
  const rpcOptions = this.toRpcTokenOptions({ ...options });
224
230
  return this._requestsHandler.getNodesCount(rpcOptions);
@@ -239,7 +245,7 @@ class PresentationManager {
239
245
  * @public
240
246
  */
241
247
  async getNodesDescriptor(requestOptions) {
242
- this.startIModelInitialization(requestOptions.imodel);
248
+ (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
243
249
  try {
244
250
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
245
251
  const rpcOptions = this.toRpcTokenOptions({ ...options });
@@ -248,25 +254,23 @@ class PresentationManager {
248
254
  return descriptor ? this._localizationHelper.getLocalizedContentDescriptor(descriptor) : undefined;
249
255
  }
250
256
  finally {
251
- await this.ensureIModelInitialized(requestOptions.imodel);
257
+ await (0, IModelConnectionInitialization_js_1.ensureIModelInitialized)(requestOptions.imodel);
252
258
  }
253
259
  }
254
260
  /** Retrieves paths from root nodes to children nodes according to specified keys. Intersecting paths will be merged. */
255
261
  async getNodePaths(requestOptions) {
256
- this.startIModelInitialization(requestOptions.imodel);
262
+ (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
257
263
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
258
264
  const rpcOptions = this.toRpcTokenOptions({ ...options });
259
265
  const result = await this._requestsHandler.getNodePaths(rpcOptions);
260
- // eslint-disable-next-line @typescript-eslint/no-deprecated
261
- return result.map(presentation_common_1.NodePathElement.fromJSON).map((npe) => this._localizationHelper.getLocalizedNodePathElement(npe));
266
+ return result.map((npe) => this._localizationHelper.getLocalizedNodePathElement(npe));
262
267
  }
263
268
  /** Retrieves paths from root nodes to nodes containing filter text in their label. */
264
269
  async getFilteredNodePaths(requestOptions) {
265
- this.startIModelInitialization(requestOptions.imodel);
270
+ (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
266
271
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
267
272
  const result = await this._requestsHandler.getFilteredNodePaths(this.toRpcTokenOptions(options));
268
- // eslint-disable-next-line @typescript-eslint/no-deprecated
269
- return result.map(presentation_common_1.NodePathElement.fromJSON).map((npe) => this._localizationHelper.getLocalizedNodePathElement(npe));
273
+ return result.map((npe) => this._localizationHelper.getLocalizedNodePathElement(npe));
270
274
  }
271
275
  /**
272
276
  * Get information about the sources of content when building it for specific ECClasses. Sources involve classes of the primary select instance,
@@ -274,14 +278,14 @@ class PresentationManager {
274
278
  * @public
275
279
  */
276
280
  async getContentSources(requestOptions) {
277
- this.startIModelInitialization(requestOptions.imodel);
281
+ (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
278
282
  const rpcOptions = this.toRpcTokenOptions(requestOptions);
279
283
  const result = await this._requestsHandler.getContentSources(rpcOptions);
280
- return presentation_common_1.SelectClassInfo.listFromCompressedJSON(result.sources, result.classesMap);
284
+ return result.sources.map((sourceJson) => presentation_common_1.SelectClassInfo.fromCompressedJSON(sourceJson, result.classesMap));
281
285
  }
282
286
  /** Retrieves the content descriptor which describes the content and can be used to customize it. */
283
287
  async getContentDescriptor(requestOptions) {
284
- this.startIModelInitialization(requestOptions.imodel);
288
+ (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
285
289
  try {
286
290
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
287
291
  const rpcOptions = this.toRpcTokenOptions({
@@ -293,12 +297,12 @@ class PresentationManager {
293
297
  return descriptor ? this._localizationHelper.getLocalizedContentDescriptor(descriptor) : undefined;
294
298
  }
295
299
  finally {
296
- await this.ensureIModelInitialized(requestOptions.imodel);
300
+ await (0, IModelConnectionInitialization_js_1.ensureIModelInitialized)(requestOptions.imodel);
297
301
  }
298
302
  }
299
303
  /** Retrieves overall content set size. */
300
304
  async getContentSetSize(requestOptions) {
301
- this.startIModelInitialization(requestOptions.imodel);
305
+ (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
302
306
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
303
307
  const rpcOptions = this.toRpcTokenOptions({
304
308
  ...options,
@@ -320,7 +324,7 @@ class PresentationManager {
320
324
  let contentFormatter;
321
325
  if (!requestOptions.omitFormattedValues && this._schemaContextProvider) {
322
326
  const koqPropertyFormatter = new presentation_common_1.KoqPropertyValueFormatter(this._schemaContextProvider(requestOptions.imodel), this._defaultFormats);
323
- contentFormatter = new presentation_common_1.ContentFormatter(new presentation_common_1.ContentPropertyValueFormatter(koqPropertyFormatter), requestOptions.unitSystem ?? this._explicitActiveUnitSystem ?? core_frontend_1.IModelApp.quantityFormatter.activeUnitSystem);
327
+ contentFormatter = new internal_1.ContentFormatter(new internal_1.ContentPropertyValueFormatter(koqPropertyFormatter), requestOptions.unitSystem ?? this._explicitActiveUnitSystem ?? core_frontend_1.IModelApp.quantityFormatter.activeUnitSystem);
324
328
  }
325
329
  let descriptor = requestOptions.descriptor instanceof presentation_common_1.Descriptor ? requestOptions.descriptor : undefined;
326
330
  let firstPage;
@@ -332,7 +336,7 @@ class PresentationManager {
332
336
  descriptor = presentation_common_1.Descriptor.fromJSON(firstPageResponse?.descriptor);
333
337
  firstPage = firstPageResponse?.contentSet;
334
338
  }
335
- // istanbul ignore if
339
+ /* c8 ignore next 3 */
336
340
  if (!descriptor) {
337
341
  return undefined;
338
342
  }
@@ -350,7 +354,7 @@ class PresentationManager {
350
354
  items,
351
355
  };
352
356
  };
353
- const generator = new StreamedResponseGenerator_1.StreamedResponseGenerator({
357
+ const generator = new StreamedResponseGenerator_js_1.StreamedResponseGenerator({
354
358
  ...requestOptions,
355
359
  getBatch: getPage,
356
360
  });
@@ -361,12 +365,12 @@ class PresentationManager {
361
365
  }
362
366
  /** Retrieves a content descriptor, item count and async generator for the items themselves. */
363
367
  async getContentIterator(requestOptions) {
364
- this.startIModelInitialization(requestOptions.imodel);
368
+ (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
365
369
  const response = await this.getContentIteratorInternal(requestOptions);
366
370
  if (!response) {
367
371
  return undefined;
368
372
  }
369
- await this.ensureIModelInitialized(requestOptions.imodel);
373
+ await (0, IModelConnectionInitialization_js_1.ensureIModelInitialized)(requestOptions.imodel);
370
374
  return response;
371
375
  }
372
376
  /**
@@ -395,21 +399,20 @@ class PresentationManager {
395
399
  }
396
400
  /** Returns an iterator that asynchronously polls distinct values of specific field from the content. */
397
401
  async getDistinctValuesIterator(requestOptions) {
398
- this.startIModelInitialization(requestOptions.imodel);
402
+ (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
399
403
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
400
404
  const rpcOptions = {
401
405
  ...this.toRpcTokenOptions(options),
402
406
  descriptor: getDescriptorOverrides(options.descriptor),
403
407
  keys: stripTransientElementKeys(options.keys).toJSON(),
404
408
  };
405
- const generator = new StreamedResponseGenerator_1.StreamedResponseGenerator({
409
+ const generator = new StreamedResponseGenerator_js_1.StreamedResponseGenerator({
406
410
  ...requestOptions,
407
411
  getBatch: async (paging) => {
408
412
  const response = await this._requestsHandler.getPagedDistinctValues({ ...rpcOptions, paging });
409
413
  return {
410
414
  total: response.total,
411
- // eslint-disable-next-line @typescript-eslint/no-deprecated
412
- items: response.items.map((x) => this._localizationHelper.getLocalizedDisplayValueGroup(presentation_common_1.DisplayValueGroup.fromJSON(x))),
415
+ items: response.items.map((x) => this._localizationHelper.getLocalizedDisplayValueGroup(x)),
413
416
  };
414
417
  },
415
418
  });
@@ -431,9 +434,9 @@ class PresentationManager {
431
434
  * @public
432
435
  */
433
436
  async getElementProperties(requestOptions) {
434
- this.startIModelInitialization(requestOptions.imodel);
437
+ (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
435
438
  const { elementId, contentParser, ...optionsNoElementId } = requestOptions;
436
- const parser = contentParser ?? presentation_common_1.buildElementProperties;
439
+ const parser = contentParser ?? internal_1.buildElementProperties;
437
440
  const iter = await this.getContentIterator({
438
441
  ...optionsNoElementId,
439
442
  descriptor: {
@@ -453,13 +456,13 @@ class PresentationManager {
453
456
  * @public
454
457
  */
455
458
  async getContentInstanceKeys(requestOptions) {
456
- this.startIModelInitialization(requestOptions.imodel);
459
+ (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
457
460
  const options = await this.addRulesetAndVariablesToOptions(requestOptions);
458
461
  const rpcOptions = {
459
462
  ...this.toRpcTokenOptions(options),
460
463
  keys: stripTransientElementKeys(options.keys).toJSON(),
461
464
  };
462
- const generator = new StreamedResponseGenerator_1.StreamedResponseGenerator({
465
+ const generator = new StreamedResponseGenerator_js_1.StreamedResponseGenerator({
463
466
  ...requestOptions,
464
467
  getBatch: async (page) => {
465
468
  const keys = await this._requestsHandler.getContentInstanceKeys({ ...rpcOptions, paging: page });
@@ -484,16 +487,16 @@ class PresentationManager {
484
487
  }
485
488
  /** Retrieves display label definition of specific item. */
486
489
  async getDisplayLabelDefinition(requestOptions) {
487
- this.startIModelInitialization(requestOptions.imodel);
490
+ (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
488
491
  const rpcOptions = this.toRpcTokenOptions({ ...requestOptions });
489
492
  const result = await this._requestsHandler.getDisplayLabelDefinition(rpcOptions);
490
493
  return this._localizationHelper.getLocalizedLabelDefinition(result);
491
494
  }
492
495
  /** Retrieves display label definition of specific items. */
493
496
  async getDisplayLabelDefinitionsIterator(requestOptions) {
494
- this.startIModelInitialization(requestOptions.imodel);
497
+ (0, IModelConnectionInitialization_js_1.startIModelInitialization)(requestOptions.imodel);
495
498
  const rpcOptions = this.toRpcTokenOptions({ ...requestOptions });
496
- const generator = new StreamedResponseGenerator_1.StreamedResponseGenerator({
499
+ const generator = new StreamedResponseGenerator_js_1.StreamedResponseGenerator({
497
500
  ...requestOptions,
498
501
  getBatch: async (page) => {
499
502
  const partialKeys = !page.start ? rpcOptions.keys : rpcOptions.keys.slice(page.start);
@@ -528,7 +531,7 @@ const stripTransientElementKeys = (keys) => {
528
531
  copy.add(keys, (key) => {
529
532
  // the callback is not going to be called with EntityProps as KeySet converts them
530
533
  // to InstanceKeys, but we want to keep the EntityProps case for correctness
531
- // istanbul ignore next
534
+ /* c8 ignore next 3 */
532
535
  const isTransient = (presentation_common_1.Key.isInstanceKey(key) && key.className === unified_selection_1.TRANSIENT_ELEMENT_CLASSNAME) ||
533
536
  (presentation_common_1.Key.isEntityProps(key) && key.classFullName === unified_selection_1.TRANSIENT_ELEMENT_CLASSNAME);
534
537
  return !isTransient;