@itwin/presentation-hierarchies 2.0.0-alpha.2 → 2.0.0-alpha.20

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 (427) hide show
  1. package/CHANGELOG.md +929 -12
  2. package/README.md +20 -50
  3. package/lib/hierarchies/HierarchyErrors.d.ts.map +1 -0
  4. package/lib/hierarchies/HierarchyErrors.js.map +1 -0
  5. package/lib/hierarchies/HierarchyMerge.d.ts +19 -0
  6. package/lib/hierarchies/HierarchyMerge.d.ts.map +1 -0
  7. package/lib/{esm/hierarchies/HierarchyProvider.js → hierarchies/HierarchyMerge.js} +5 -6
  8. package/lib/hierarchies/HierarchyMerge.js.map +1 -0
  9. package/lib/{esm/hierarchies → hierarchies}/HierarchyNode.d.ts +21 -28
  10. package/lib/hierarchies/HierarchyNode.d.ts.map +1 -0
  11. package/lib/{esm/hierarchies → hierarchies}/HierarchyNode.js +19 -21
  12. package/lib/hierarchies/HierarchyNode.js.map +1 -0
  13. package/lib/{cjs/hierarchies → hierarchies}/HierarchyNodeIdentifier.d.ts +3 -1
  14. package/lib/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -0
  15. package/lib/{esm/hierarchies → hierarchies}/HierarchyNodeIdentifier.js +23 -6
  16. package/lib/hierarchies/HierarchyNodeIdentifier.js.map +1 -0
  17. package/lib/{esm/hierarchies → hierarchies}/HierarchyNodeKey.d.ts +5 -4
  18. package/lib/hierarchies/HierarchyNodeKey.d.ts.map +1 -0
  19. package/lib/{esm/hierarchies → hierarchies}/HierarchyNodeKey.js +1 -1
  20. package/lib/hierarchies/HierarchyNodeKey.js.map +1 -0
  21. package/lib/{esm/hierarchies → hierarchies}/HierarchyProvider.d.ts +59 -34
  22. package/lib/hierarchies/HierarchyProvider.d.ts.map +1 -0
  23. package/lib/hierarchies/HierarchyProvider.js +61 -0
  24. package/lib/hierarchies/HierarchyProvider.js.map +1 -0
  25. package/lib/hierarchies/HierarchySearch.d.ts +297 -0
  26. package/lib/hierarchies/HierarchySearch.d.ts.map +1 -0
  27. package/lib/hierarchies/HierarchySearch.js +464 -0
  28. package/lib/hierarchies/HierarchySearch.js.map +1 -0
  29. package/lib/{cjs/hierarchies → hierarchies}/Logging.d.ts +1 -1
  30. package/lib/hierarchies/Logging.d.ts.map +1 -0
  31. package/lib/{esm/hierarchies → hierarchies}/Logging.js +1 -1
  32. package/lib/hierarchies/Logging.js.map +1 -0
  33. package/lib/{cjs/hierarchies → hierarchies}/imodel/HierarchyCache.d.ts +1 -1
  34. package/lib/hierarchies/imodel/HierarchyCache.d.ts.map +1 -0
  35. package/lib/{esm/hierarchies → hierarchies}/imodel/HierarchyCache.js +4 -7
  36. package/lib/hierarchies/imodel/HierarchyCache.js.map +1 -0
  37. package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyDefinition.d.ts +34 -11
  38. package/lib/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -0
  39. package/lib/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -0
  40. package/lib/{cjs/hierarchies → hierarchies}/imodel/IModelHierarchyNode.d.ts +5 -5
  41. package/lib/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -0
  42. package/lib/hierarchies/imodel/IModelHierarchyNode.js.map +1 -0
  43. package/lib/hierarchies/imodel/IModelHierarchyProvider.d.ts +136 -0
  44. package/lib/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -0
  45. package/lib/hierarchies/imodel/IModelHierarchyProvider.js +656 -0
  46. package/lib/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -0
  47. package/lib/{esm/hierarchies → hierarchies}/imodel/LimitingECSqlQueryExecutor.d.ts +1 -1
  48. package/lib/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -0
  49. package/lib/{esm/hierarchies → hierarchies}/imodel/LimitingECSqlQueryExecutor.js +14 -11
  50. package/lib/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -0
  51. package/lib/{esm/hierarchies → hierarchies}/imodel/NodeSelectQueryFactory.d.ts +17 -12
  52. package/lib/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -0
  53. package/lib/{esm/hierarchies → hierarchies}/imodel/NodeSelectQueryFactory.js +214 -139
  54. package/lib/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -0
  55. package/lib/{cjs/hierarchies → hierarchies}/imodel/PredicateBasedHierarchyDefinition.d.ts +7 -7
  56. package/lib/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -0
  57. package/lib/{esm/hierarchies → hierarchies}/imodel/PredicateBasedHierarchyDefinition.js +3 -2
  58. package/lib/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -0
  59. package/lib/hierarchies/imodel/SearchHierarchyDefinition.d.ts +35 -0
  60. package/lib/hierarchies/imodel/SearchHierarchyDefinition.d.ts.map +1 -0
  61. package/lib/hierarchies/imodel/SearchHierarchyDefinition.js +261 -0
  62. package/lib/hierarchies/imodel/SearchHierarchyDefinition.js.map +1 -0
  63. package/lib/{esm/hierarchies → hierarchies}/imodel/TreeNodesReader.d.ts +10 -12
  64. package/lib/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -0
  65. package/lib/{esm/hierarchies → hierarchies}/imodel/TreeNodesReader.js +12 -9
  66. package/lib/hierarchies/imodel/TreeNodesReader.js.map +1 -0
  67. package/lib/{cjs/hierarchies → hierarchies}/imodel/Utils.d.ts +2 -1
  68. package/lib/hierarchies/imodel/Utils.d.ts.map +1 -0
  69. package/lib/{esm/hierarchies → hierarchies}/imodel/Utils.js +20 -7
  70. package/lib/hierarchies/imodel/Utils.js.map +1 -0
  71. package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/DetermineChildren.d.ts +2 -2
  72. package/lib/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -0
  73. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/DetermineChildren.js +11 -5
  74. package/lib/hierarchies/imodel/operators/DetermineChildren.js.map +1 -0
  75. package/lib/hierarchies/imodel/operators/Grouping.d.ts +26 -0
  76. package/lib/hierarchies/imodel/operators/Grouping.d.ts.map +1 -0
  77. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/Grouping.js +33 -19
  78. package/lib/hierarchies/imodel/operators/Grouping.js.map +1 -0
  79. package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/HideIfNoChildren.d.ts +1 -1
  80. package/lib/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -0
  81. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/HideIfNoChildren.js +33 -10
  82. package/lib/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -0
  83. package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/HideNodesInHierarchy.d.ts +1 -1
  84. package/lib/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -0
  85. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/HideNodesInHierarchy.js +31 -15
  86. package/lib/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -0
  87. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/AutoExpand.d.ts +1 -1
  88. package/lib/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +1 -0
  89. package/lib/hierarchies/imodel/operators/grouping/AutoExpand.js.map +1 -0
  90. package/lib/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts +11 -0
  91. package/lib/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -0
  92. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/BaseClassGrouping.js +10 -12
  93. package/lib/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -0
  94. package/lib/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts +7 -0
  95. package/lib/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -0
  96. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/ClassGrouping.js +8 -11
  97. package/lib/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -0
  98. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/GroupHiding.d.ts +1 -1
  99. package/lib/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -0
  100. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/GroupHiding.js +1 -5
  101. package/lib/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -0
  102. package/lib/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts +5 -0
  103. package/lib/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -0
  104. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/LabelGrouping.js +2 -10
  105. package/lib/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -0
  106. package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/PropertiesGrouping.d.ts +7 -7
  107. package/lib/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -0
  108. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/PropertiesGrouping.js +46 -37
  109. package/lib/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -0
  110. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/Shared.d.ts +2 -2
  111. package/lib/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -0
  112. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/Shared.js +3 -1
  113. package/lib/hierarchies/imodel/operators/grouping/Shared.js.map +1 -0
  114. package/lib/{esm/hierarchies → hierarchies}/internal/Common.d.ts +5 -2
  115. package/lib/hierarchies/internal/Common.d.ts.map +1 -0
  116. package/lib/{esm/hierarchies → hierarchies}/internal/Common.js +13 -3
  117. package/lib/hierarchies/internal/Common.js.map +1 -0
  118. package/lib/hierarchies/internal/DisposePolyfill.d.ts.map +1 -0
  119. package/lib/hierarchies/internal/DisposePolyfill.js.map +1 -0
  120. package/lib/{esm/hierarchies → hierarchies}/internal/LoggingUtils.d.ts +1 -1
  121. package/lib/hierarchies/internal/LoggingUtils.d.ts.map +1 -0
  122. package/lib/hierarchies/internal/LoggingUtils.js.map +1 -0
  123. package/lib/{esm/hierarchies → hierarchies}/internal/RxjsHierarchyDefinition.d.ts +19 -8
  124. package/lib/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +1 -0
  125. package/lib/{esm/hierarchies → hierarchies}/internal/RxjsHierarchyDefinition.js +9 -6
  126. package/lib/hierarchies/internal/RxjsHierarchyDefinition.js.map +1 -0
  127. package/lib/{cjs/hierarchies → hierarchies}/internal/SubscriptionScheduler.d.ts +1 -1
  128. package/lib/hierarchies/internal/SubscriptionScheduler.d.ts.map +1 -0
  129. package/lib/{esm/hierarchies → hierarchies}/internal/SubscriptionScheduler.js +1 -4
  130. package/lib/hierarchies/internal/SubscriptionScheduler.js.map +1 -0
  131. package/lib/{cjs/hierarchies → hierarchies}/internal/operators/Partition.d.ts +2 -1
  132. package/lib/hierarchies/internal/operators/Partition.d.ts.map +1 -0
  133. package/lib/hierarchies/internal/operators/Partition.js.map +1 -0
  134. package/lib/{esm/hierarchies → hierarchies}/internal/operators/ReduceToMergeMap.d.ts +3 -3
  135. package/lib/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +1 -0
  136. package/lib/hierarchies/internal/operators/ReduceToMergeMap.js.map +1 -0
  137. package/lib/{cjs/hierarchies → hierarchies}/internal/operators/ReleaseMainThread.d.ts +1 -1
  138. package/lib/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +1 -0
  139. package/lib/hierarchies/internal/operators/ReleaseMainThread.js.map +1 -0
  140. package/lib/{cjs/hierarchies → hierarchies}/internal/operators/ShareReplayWithErrors.d.ts +1 -1
  141. package/lib/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +1 -0
  142. package/lib/hierarchies/internal/operators/ShareReplayWithErrors.js.map +1 -0
  143. package/lib/{cjs/hierarchies → hierarchies}/internal/operators/Sorting.d.ts +1 -1
  144. package/lib/hierarchies/internal/operators/Sorting.d.ts.map +1 -0
  145. package/lib/hierarchies/internal/operators/Sorting.js.map +1 -0
  146. package/lib/{esm/hierarchies → hierarchies}/internal/operators/TapOnce.d.ts +1 -1
  147. package/lib/hierarchies/internal/operators/TapOnce.d.ts.map +1 -0
  148. package/lib/hierarchies/internal/operators/TapOnce.js.map +1 -0
  149. package/lib/presentation-hierarchies.d.ts +24 -0
  150. package/lib/presentation-hierarchies.d.ts.map +1 -0
  151. package/lib/{esm/presentation-hierarchies.js → presentation-hierarchies.js} +7 -7
  152. package/lib/presentation-hierarchies.js.map +1 -0
  153. package/package.json +29 -39
  154. package/lib/cjs/hierarchies/HierarchyErrors.d.ts.map +0 -1
  155. package/lib/cjs/hierarchies/HierarchyErrors.js +0 -20
  156. package/lib/cjs/hierarchies/HierarchyErrors.js.map +0 -1
  157. package/lib/cjs/hierarchies/HierarchyFiltering.d.ts +0 -133
  158. package/lib/cjs/hierarchies/HierarchyFiltering.d.ts.map +0 -1
  159. package/lib/cjs/hierarchies/HierarchyFiltering.js +0 -232
  160. package/lib/cjs/hierarchies/HierarchyFiltering.js.map +0 -1
  161. package/lib/cjs/hierarchies/HierarchyNode.d.ts +0 -156
  162. package/lib/cjs/hierarchies/HierarchyNode.d.ts.map +0 -1
  163. package/lib/cjs/hierarchies/HierarchyNode.js +0 -84
  164. package/lib/cjs/hierarchies/HierarchyNode.js.map +0 -1
  165. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.d.ts.map +0 -1
  166. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js +0 -35
  167. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js.map +0 -1
  168. package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts +0 -161
  169. package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts.map +0 -1
  170. package/lib/cjs/hierarchies/HierarchyNodeKey.js +0 -166
  171. package/lib/cjs/hierarchies/HierarchyNodeKey.js.map +0 -1
  172. package/lib/cjs/hierarchies/HierarchyProvider.d.ts +0 -109
  173. package/lib/cjs/hierarchies/HierarchyProvider.d.ts.map +0 -1
  174. package/lib/cjs/hierarchies/HierarchyProvider.js +0 -44
  175. package/lib/cjs/hierarchies/HierarchyProvider.js.map +0 -1
  176. package/lib/cjs/hierarchies/Logging.d.ts.map +0 -1
  177. package/lib/cjs/hierarchies/Logging.js +0 -27
  178. package/lib/cjs/hierarchies/Logging.js.map +0 -1
  179. package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.d.ts +0 -36
  180. package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.d.ts.map +0 -1
  181. package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.js +0 -283
  182. package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.js.map +0 -1
  183. package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts.map +0 -1
  184. package/lib/cjs/hierarchies/imodel/HierarchyCache.js +0 -84
  185. package/lib/cjs/hierarchies/imodel/HierarchyCache.js.map +0 -1
  186. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts +0 -121
  187. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +0 -1
  188. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js +0 -21
  189. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js.map +0 -1
  190. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts.map +0 -1
  191. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js +0 -29
  192. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js.map +0 -1
  193. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts +0 -80
  194. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +0 -1
  195. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js +0 -449
  196. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js.map +0 -1
  197. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts +0 -21
  198. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +0 -1
  199. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js +0 -123
  200. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +0 -1
  201. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts +0 -230
  202. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +0 -1
  203. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js +0 -591
  204. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js.map +0 -1
  205. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +0 -1
  206. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js +0 -93
  207. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +0 -1
  208. package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts +0 -37
  209. package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts.map +0 -1
  210. package/lib/cjs/hierarchies/imodel/TreeNodesReader.js +0 -44
  211. package/lib/cjs/hierarchies/imodel/TreeNodesReader.js.map +0 -1
  212. package/lib/cjs/hierarchies/imodel/Utils.d.ts.map +0 -1
  213. package/lib/cjs/hierarchies/imodel/Utils.js +0 -59
  214. package/lib/cjs/hierarchies/imodel/Utils.js.map +0 -1
  215. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.d.ts.map +0 -1
  216. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js +0 -34
  217. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js.map +0 -1
  218. package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts +0 -26
  219. package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts.map +0 -1
  220. package/lib/cjs/hierarchies/imodel/operators/Grouping.js +0 -162
  221. package/lib/cjs/hierarchies/imodel/operators/Grouping.js.map +0 -1
  222. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +0 -1
  223. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js +0 -52
  224. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js.map +0 -1
  225. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +0 -1
  226. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js +0 -68
  227. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +0 -1
  228. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.d.ts +0 -4
  229. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +0 -1
  230. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.js +0 -26
  231. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.js.map +0 -1
  232. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts +0 -11
  233. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +0 -1
  234. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js +0 -114
  235. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +0 -1
  236. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts +0 -7
  237. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +0 -1
  238. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js +0 -55
  239. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +0 -1
  240. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts +0 -4
  241. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +0 -1
  242. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js +0 -53
  243. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js.map +0 -1
  244. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts +0 -5
  245. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +0 -1
  246. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js +0 -60
  247. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +0 -1
  248. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +0 -1
  249. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js +0 -309
  250. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +0 -1
  251. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts +0 -5
  252. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts.map +0 -1
  253. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js +0 -29
  254. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js.map +0 -1
  255. package/lib/cjs/hierarchies/internal/Common.d.ts +0 -58
  256. package/lib/cjs/hierarchies/internal/Common.d.ts.map +0 -1
  257. package/lib/cjs/hierarchies/internal/Common.js +0 -80
  258. package/lib/cjs/hierarchies/internal/Common.js.map +0 -1
  259. package/lib/cjs/hierarchies/internal/DisposePolyfill.d.ts +0 -1
  260. package/lib/cjs/hierarchies/internal/DisposePolyfill.d.ts.map +0 -1
  261. package/lib/cjs/hierarchies/internal/DisposePolyfill.js +0 -11
  262. package/lib/cjs/hierarchies/internal/DisposePolyfill.js.map +0 -1
  263. package/lib/cjs/hierarchies/internal/EachValueFrom.d.ts +0 -12
  264. package/lib/cjs/hierarchies/internal/EachValueFrom.d.ts.map +0 -1
  265. package/lib/cjs/hierarchies/internal/EachValueFrom.js +0 -110
  266. package/lib/cjs/hierarchies/internal/EachValueFrom.js.map +0 -1
  267. package/lib/cjs/hierarchies/internal/LoggingUtils.d.ts +0 -12
  268. package/lib/cjs/hierarchies/internal/LoggingUtils.d.ts.map +0 -1
  269. package/lib/cjs/hierarchies/internal/LoggingUtils.js +0 -37
  270. package/lib/cjs/hierarchies/internal/LoggingUtils.js.map +0 -1
  271. package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.d.ts +0 -64
  272. package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +0 -1
  273. package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js +0 -25
  274. package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js.map +0 -1
  275. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.d.ts.map +0 -1
  276. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.js +0 -57
  277. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.js.map +0 -1
  278. package/lib/cjs/hierarchies/internal/operators/Partition.d.ts.map +0 -1
  279. package/lib/cjs/hierarchies/internal/operators/Partition.js +0 -60
  280. package/lib/cjs/hierarchies/internal/operators/Partition.js.map +0 -1
  281. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.d.ts +0 -22
  282. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +0 -1
  283. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.js +0 -50
  284. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.js.map +0 -1
  285. package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +0 -1
  286. package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.js +0 -24
  287. package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.js.map +0 -1
  288. package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +0 -1
  289. package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.js +0 -23
  290. package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.js.map +0 -1
  291. package/lib/cjs/hierarchies/internal/operators/Sorting.d.ts.map +0 -1
  292. package/lib/cjs/hierarchies/internal/operators/Sorting.js +0 -25
  293. package/lib/cjs/hierarchies/internal/operators/Sorting.js.map +0 -1
  294. package/lib/cjs/hierarchies/internal/operators/TapOnce.d.ts +0 -4
  295. package/lib/cjs/hierarchies/internal/operators/TapOnce.d.ts.map +0 -1
  296. package/lib/cjs/hierarchies/internal/operators/TapOnce.js +0 -19
  297. package/lib/cjs/hierarchies/internal/operators/TapOnce.js.map +0 -1
  298. package/lib/cjs/package.json +0 -1
  299. package/lib/cjs/presentation-hierarchies.d.ts +0 -15
  300. package/lib/cjs/presentation-hierarchies.d.ts.map +0 -1
  301. package/lib/cjs/presentation-hierarchies.js +0 -40
  302. package/lib/cjs/presentation-hierarchies.js.map +0 -1
  303. package/lib/esm/hierarchies/HierarchyErrors.d.ts +0 -9
  304. package/lib/esm/hierarchies/HierarchyErrors.d.ts.map +0 -1
  305. package/lib/esm/hierarchies/HierarchyErrors.js.map +0 -1
  306. package/lib/esm/hierarchies/HierarchyFiltering.d.ts +0 -133
  307. package/lib/esm/hierarchies/HierarchyFiltering.d.ts.map +0 -1
  308. package/lib/esm/hierarchies/HierarchyFiltering.js +0 -227
  309. package/lib/esm/hierarchies/HierarchyFiltering.js.map +0 -1
  310. package/lib/esm/hierarchies/HierarchyNode.d.ts.map +0 -1
  311. package/lib/esm/hierarchies/HierarchyNode.js.map +0 -1
  312. package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts +0 -29
  313. package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts.map +0 -1
  314. package/lib/esm/hierarchies/HierarchyNodeIdentifier.js.map +0 -1
  315. package/lib/esm/hierarchies/HierarchyNodeKey.d.ts.map +0 -1
  316. package/lib/esm/hierarchies/HierarchyNodeKey.js.map +0 -1
  317. package/lib/esm/hierarchies/HierarchyProvider.d.ts.map +0 -1
  318. package/lib/esm/hierarchies/HierarchyProvider.js.map +0 -1
  319. package/lib/esm/hierarchies/Logging.d.ts +0 -13
  320. package/lib/esm/hierarchies/Logging.d.ts.map +0 -1
  321. package/lib/esm/hierarchies/Logging.js.map +0 -1
  322. package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.d.ts +0 -36
  323. package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.d.ts.map +0 -1
  324. package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.js +0 -277
  325. package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.js.map +0 -1
  326. package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts +0 -18
  327. package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts.map +0 -1
  328. package/lib/esm/hierarchies/imodel/HierarchyCache.js.map +0 -1
  329. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +0 -1
  330. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.js.map +0 -1
  331. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts +0 -234
  332. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts.map +0 -1
  333. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.js.map +0 -1
  334. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts +0 -80
  335. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +0 -1
  336. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js +0 -446
  337. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js.map +0 -1
  338. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +0 -1
  339. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +0 -1
  340. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +0 -1
  341. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js.map +0 -1
  342. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts +0 -140
  343. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +0 -1
  344. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +0 -1
  345. package/lib/esm/hierarchies/imodel/TreeNodesReader.d.ts.map +0 -1
  346. package/lib/esm/hierarchies/imodel/TreeNodesReader.js.map +0 -1
  347. package/lib/esm/hierarchies/imodel/Utils.d.ts +0 -4
  348. package/lib/esm/hierarchies/imodel/Utils.d.ts.map +0 -1
  349. package/lib/esm/hierarchies/imodel/Utils.js.map +0 -1
  350. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts +0 -11
  351. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts.map +0 -1
  352. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.js.map +0 -1
  353. package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts +0 -26
  354. package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts.map +0 -1
  355. package/lib/esm/hierarchies/imodel/operators/Grouping.js.map +0 -1
  356. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts +0 -11
  357. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +0 -1
  358. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js.map +0 -1
  359. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts +0 -11
  360. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +0 -1
  361. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +0 -1
  362. package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +0 -1
  363. package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.js.map +0 -1
  364. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts +0 -11
  365. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +0 -1
  366. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +0 -1
  367. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts +0 -7
  368. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +0 -1
  369. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +0 -1
  370. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +0 -1
  371. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.js.map +0 -1
  372. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts +0 -5
  373. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +0 -1
  374. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +0 -1
  375. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts +0 -32
  376. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +0 -1
  377. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +0 -1
  378. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts.map +0 -1
  379. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.js.map +0 -1
  380. package/lib/esm/hierarchies/internal/Common.d.ts.map +0 -1
  381. package/lib/esm/hierarchies/internal/Common.js.map +0 -1
  382. package/lib/esm/hierarchies/internal/DisposePolyfill.d.ts.map +0 -1
  383. package/lib/esm/hierarchies/internal/DisposePolyfill.js.map +0 -1
  384. package/lib/esm/hierarchies/internal/EachValueFrom.d.ts +0 -12
  385. package/lib/esm/hierarchies/internal/EachValueFrom.d.ts.map +0 -1
  386. package/lib/esm/hierarchies/internal/EachValueFrom.js +0 -107
  387. package/lib/esm/hierarchies/internal/EachValueFrom.js.map +0 -1
  388. package/lib/esm/hierarchies/internal/LoggingUtils.d.ts.map +0 -1
  389. package/lib/esm/hierarchies/internal/LoggingUtils.js.map +0 -1
  390. package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +0 -1
  391. package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.js.map +0 -1
  392. package/lib/esm/hierarchies/internal/SubscriptionScheduler.d.ts +0 -17
  393. package/lib/esm/hierarchies/internal/SubscriptionScheduler.d.ts.map +0 -1
  394. package/lib/esm/hierarchies/internal/SubscriptionScheduler.js.map +0 -1
  395. package/lib/esm/hierarchies/internal/operators/Partition.d.ts +0 -6
  396. package/lib/esm/hierarchies/internal/operators/Partition.d.ts.map +0 -1
  397. package/lib/esm/hierarchies/internal/operators/Partition.js.map +0 -1
  398. package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +0 -1
  399. package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.js.map +0 -1
  400. package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.d.ts +0 -7
  401. package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +0 -1
  402. package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.js.map +0 -1
  403. package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.d.ts +0 -9
  404. package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +0 -1
  405. package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.js.map +0 -1
  406. package/lib/esm/hierarchies/internal/operators/Sorting.d.ts +0 -13
  407. package/lib/esm/hierarchies/internal/operators/Sorting.d.ts.map +0 -1
  408. package/lib/esm/hierarchies/internal/operators/Sorting.js.map +0 -1
  409. package/lib/esm/hierarchies/internal/operators/TapOnce.d.ts.map +0 -1
  410. package/lib/esm/hierarchies/internal/operators/TapOnce.js.map +0 -1
  411. package/lib/esm/presentation-hierarchies.d.ts +0 -15
  412. package/lib/esm/presentation-hierarchies.d.ts.map +0 -1
  413. package/lib/esm/presentation-hierarchies.js.map +0 -1
  414. /package/lib/{cjs/hierarchies → hierarchies}/HierarchyErrors.d.ts +0 -0
  415. /package/lib/{esm/hierarchies → hierarchies}/HierarchyErrors.js +0 -0
  416. /package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyDefinition.js +0 -0
  417. /package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyNode.js +0 -0
  418. /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/AutoExpand.js +0 -0
  419. /package/lib/{esm/hierarchies → hierarchies}/internal/DisposePolyfill.d.ts +0 -0
  420. /package/lib/{esm/hierarchies → hierarchies}/internal/DisposePolyfill.js +0 -0
  421. /package/lib/{esm/hierarchies → hierarchies}/internal/LoggingUtils.js +0 -0
  422. /package/lib/{esm/hierarchies → hierarchies}/internal/operators/Partition.js +0 -0
  423. /package/lib/{esm/hierarchies → hierarchies}/internal/operators/ReduceToMergeMap.js +0 -0
  424. /package/lib/{esm/hierarchies → hierarchies}/internal/operators/ReleaseMainThread.js +0 -0
  425. /package/lib/{esm/hierarchies → hierarchies}/internal/operators/ShareReplayWithErrors.js +0 -0
  426. /package/lib/{esm/hierarchies → hierarchies}/internal/operators/Sorting.js +0 -0
  427. /package/lib/{esm/hierarchies → hierarchies}/internal/operators/TapOnce.js +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"IModelHierarchyProvider.js","sourceRoot":"","sources":["../../../../src/hierarchies/imodel/IModelHierarchyProvider.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAwJhG,sEAMC;AA5JD,0CAAwC;AACxC,+BAoBc;AACd,sDAAuE;AACvE,oEAaoC;AACpC,8DAA+D;AAE/D,0DAAmG;AACnG,gEAA+G;AAE/G,qDAM+B;AAC/B,mEAA6D;AAC7D,iEAAyD;AACzD,qEAA+D;AAC/D,mFAAiF;AACjF,6FAAuF;AACvF,iEAA4E;AAC5E,uFAA6G;AAC7G,mFAA6E;AAC7E,uFAAiF;AACjF,2DAAqD;AACrD,iFAA0H;AAG1H,2EAA0E;AAC1E,2EAAmF;AACnF,yDAAiE;AACjE,yEAAiF;AACjF,iFAAyF;AACzF,6DAAiD;AAEjD,MAAM,iBAAiB,GAAG,GAAG,6BAAsB,0BAA0B,CAAC;AAC9E,MAAM,0BAA0B,GAAG,GAAG,sCAA+B,0BAA0B,CAAC;AAChG,MAAM,6BAA6B,GAAG,GAAG,yCAAkC,0BAA0B,CAAC;AAEt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,CAAC,KAAK;mCACQ,oBAAoB,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;OACzE;YACD,QAAQ,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAgB,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;SACvH,CAAC;IACJ,CAAC;IACD,qBAAqB;IACrB,OAAO;QACL,GAAG,KAAK;QACR,KAAK,EAAE;;cAEG,KAAK,CAAC,KAAK;;KAEpB;QACD,QAAQ,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;KACvG,CAAC;IACF,mBAAmB;AACrB,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\nimport \"../internal/DisposePolyfill.js\";\nimport {\n catchError,\n concat,\n defaultIfEmpty,\n EMPTY,\n filter,\n finalize,\n from,\n identity,\n map,\n merge,\n mergeAll,\n mergeMap,\n Observable,\n ObservableInput,\n of,\n Subject,\n take,\n takeUntil,\n tap,\n} from \"rxjs\";\nimport { assert, BeEvent, Guid, StopWatch } from \"@itwin/core-bentley\";\nimport {\n ConcatenatedValue,\n createDefaultValueFormatter,\n ECClassHierarchyInspector,\n ECSchemaProvider,\n ECSqlBinding,\n ECSqlQueryDef,\n Event,\n EventArgs,\n formatConcatenatedValue,\n InstanceKey,\n IPrimitiveValueFormatter,\n normalizeFullClassName,\n} from \"@itwin/presentation-shared\";\nimport { RowsLimitExceededError } from \"../HierarchyErrors.js\";\nimport { HierarchyFilteringPath } from \"../HierarchyFiltering.js\";\nimport { HierarchyNode, NonGroupingHierarchyNode, ParentHierarchyNode } from \"../HierarchyNode.js\";\nimport { GenericNodeKey, HierarchyNodeKey, IModelInstanceKey, InstancesNodeKey } from \"../HierarchyNodeKey.js\";\nimport { GetHierarchyNodesProps, HierarchyProvider } from \"../HierarchyProvider.js\";\nimport {\n LOGGING_NAMESPACE as BASE_LOGGING_NAMESPACE,\n LOGGING_NAMESPACE_INTERNAL as BASE_LOGGING_NAMESPACE_INTERNAL,\n LOGGING_NAMESPACE_PERFORMANCE as BASE_LOGGING_NAMESPACE_PERFORMANCE,\n createNodeIdentifierForLogging,\n hasChildren,\n} from \"../internal/Common.js\";\nimport { eachValueFrom } from \"../internal/EachValueFrom.js\";\nimport { doLog, log } from \"../internal/LoggingUtils.js\";\nimport { partition } from \"../internal/operators/Partition.js\";\nimport { reduceToMergeMapList } from \"../internal/operators/ReduceToMergeMap.js\";\nimport { shareReplayWithErrors } from \"../internal/operators/ShareReplayWithErrors.js\";\nimport { sortNodesByLabelOperator } from \"../internal/operators/Sorting.js\";\nimport { getRxjsHierarchyDefinition, RxjsHierarchyDefinition } from \"../internal/RxjsHierarchyDefinition.js\";\nimport { SubscriptionScheduler } from \"../internal/SubscriptionScheduler.js\";\nimport { FilteringHierarchyDefinition } from \"./FilteringHierarchyDefinition.js\";\nimport { HierarchyCache } from \"./HierarchyCache.js\";\nimport { DefineHierarchyLevelProps, HierarchyDefinition, HierarchyNodesDefinition } from \"./IModelHierarchyDefinition.js\";\nimport { ProcessedGroupingHierarchyNode, ProcessedHierarchyNode, SourceGenericHierarchyNode, SourceInstanceHierarchyNode } from \"./IModelHierarchyNode.js\";\nimport { LimitingECSqlQueryExecutor } from \"./LimitingECSqlQueryExecutor.js\";\nimport { NodeSelectClauseColumnNames } from \"./NodeSelectQueryFactory.js\";\nimport { createDetermineChildrenOperator } from \"./operators/DetermineChildren.js\";\nimport { createGroupingOperator } from \"./operators/Grouping.js\";\nimport { createHideIfNoChildrenOperator } from \"./operators/HideIfNoChildren.js\";\nimport { createHideNodesInHierarchyOperator } from \"./operators/HideNodesInHierarchy.js\";\nimport { readNodes } from \"./TreeNodesReader.js\";\n\nconst LOGGING_NAMESPACE = `${BASE_LOGGING_NAMESPACE}.IModelHierarchyProvider`;\nconst LOGGING_NAMESPACE_INTERNAL = `${BASE_LOGGING_NAMESPACE_INTERNAL}.IModelHierarchyProvider`;\nconst LOGGING_NAMESPACE_PERFORMANCE = `${BASE_LOGGING_NAMESPACE_PERFORMANCE}.IModelHierarchyProvider`;\n\nconst DEFAULT_QUERY_CONCURRENCY = 10;\nconst DEFAULT_QUERY_CACHE_SIZE = 1;\n\n/**\n * Defines the strings used by hierarchy provider.\n * @public\n */\ninterface IModelHierarchyProviderLocalizedStrings {\n /**\n * A string for \"Unspecified\". Used for labels of property grouping nodes\n * that group by an empty value.\n */\n unspecified: string;\n\n /**\n * A string for \"Other\". Used for label of a range property grouping node that\n * groups values which don't fit into any other range.\n */\n other: string;\n}\n\n/** @public */\ntype IModelAccess = ECSchemaProvider & LimitingECSqlQueryExecutor & ECClassHierarchyInspector & { imodelKey: string };\n\n/**\n * Props for `createIModelHierarchyProvider`.\n * @public\n */\ninterface IModelHierarchyProviderProps {\n /**\n * An object that provides access to iModel's data and metadata.\n *\n * @see `ECSchemaProvider`\n * @see `LimitingECSqlQueryExecutor`\n * @see `ECClassHierarchyInspector`\n */\n imodelAccess: IModelAccess;\n\n /** An event that is raised when iModel data, that may affect the hierarchy, changes. */\n imodelChanged?: Event<() => void>;\n\n /**\n * A function that returns a hierarchy definition, describing how the hierarchy that the provider should be create. The\n * function is called once during the provider's construction.\n */\n hierarchyDefinition: HierarchyDefinition;\n\n /** Maximum number of queries that the provider attempts to execute in parallel. Defaults to `10`. */\n queryConcurrency?: number;\n /**\n * The amount of queries whose results are stored in-memory for quick retrieval. Defaults to `1`,\n * which means only results of the last run query are cached.\n */\n queryCacheSize?: number;\n\n /** A set of localized strings to use. Defaults to English strings. */\n localizedStrings?: Partial<IModelHierarchyProviderLocalizedStrings>;\n\n /**\n * A values formatter for formatting node labels. Defaults to the\n * result of `createDefaultValueFormatter` called with default parameters. May be overridden\n * by calling `setFormatter` on the provider instance.\n */\n formatter?: IPrimitiveValueFormatter;\n /** Props for filtering the hierarchy. */\n filtering?: {\n /** A list of node identifiers from root to target node. */\n paths: HierarchyFilteringPath[];\n };\n}\n\n/**\n * Creates an instance of `HierarchyProvider` that creates a hierarchy based on given iModel and\n * a hierarchy definition, which defines each hierarchy level through ECSQL queries.\n *\n * @public\n */\nexport function createIModelHierarchyProvider(props: IModelHierarchyProviderProps): HierarchyProvider & {\n /** @deprecated in 1.4. Use `[Symbol.dispose]` instead. */\n dispose: () => void;\n [Symbol.dispose]: () => void;\n} {\n return new IModelHierarchyProviderImpl(props);\n}\n\ninterface RequestContextProp {\n requestContext: {\n requestId: string;\n };\n}\n\nclass IModelHierarchyProviderImpl implements HierarchyProvider {\n private _imodelAccess: IModelAccess;\n private _hierarchyChanged: BeEvent<(args?: EventArgs<HierarchyProvider[\"hierarchyChanged\"]>) => void>;\n private _valuesFormatter: IPrimitiveValueFormatter;\n private _sourceHierarchyDefinition: RxjsHierarchyDefinition;\n private _activeHierarchyDefinition: RxjsHierarchyDefinition;\n private _localizedStrings: IModelHierarchyProviderLocalizedStrings;\n private _queryScheduler: SubscriptionScheduler;\n private _nodesCache?: HierarchyCache<HierarchyCacheEntry>;\n private _unsubscribe?: () => void;\n private _dispose = new Subject<void>();\n\n public constructor(props: IModelHierarchyProviderProps) {\n this._imodelAccess = props.imodelAccess;\n this._hierarchyChanged = new BeEvent();\n this._activeHierarchyDefinition = this._sourceHierarchyDefinition = getRxjsHierarchyDefinition(props.hierarchyDefinition);\n this._valuesFormatter = props?.formatter ?? createDefaultValueFormatter();\n this._localizedStrings = { other: \"Other\", unspecified: \"Not specified\", ...props?.localizedStrings };\n this._queryScheduler = new SubscriptionScheduler(props.queryConcurrency ?? DEFAULT_QUERY_CONCURRENCY);\n this.setHierarchyFilter(props.filtering);\n\n const queryCacheSize = props.queryCacheSize ?? DEFAULT_QUERY_CACHE_SIZE;\n if (queryCacheSize !== 0) {\n this._nodesCache = new HierarchyCache({\n // we divide the size by 2, because each variation also counts as a query that we cache\n size: Math.ceil(queryCacheSize / 2),\n variationsCount: 1,\n });\n }\n\n this._unsubscribe = props.imodelChanged?.addListener(() => {\n this.invalidateHierarchyCache(\"Data source changed\");\n this._dispose.next();\n this._hierarchyChanged.raiseEvent();\n });\n }\n\n public [Symbol.dispose]() {\n this._dispose.next();\n this._unsubscribe?.();\n }\n\n /* c8 ignore next 3 */\n public dispose() {\n this[Symbol.dispose]();\n }\n\n public get hierarchyChanged() {\n return this._hierarchyChanged;\n }\n\n private invalidateHierarchyCache(reason?: string) {\n doLog({\n category: `${LOGGING_NAMESPACE}.Events`,\n message: /* c8 ignore next */ () => (reason ? `${reason}: clear hierarchy cache` : `Clear hierarchy cache`),\n });\n this._nodesCache?.clear();\n }\n\n /**\n * Sets `HierarchyProvider` values formatter that formats nodes' labels. If provided `undefined`, then defaults to the\n * result of `createDefaultValueFormatter` called with default parameters.\n */\n public setFormatter(formatter: IPrimitiveValueFormatter | undefined) {\n this._valuesFormatter = formatter ?? createDefaultValueFormatter();\n this._hierarchyChanged.raiseEvent({ formatterChange: { newFormatter: this._valuesFormatter } });\n }\n\n public setHierarchyFilter(props: IModelHierarchyProviderProps[\"filtering\"]) {\n if (!props) {\n if (this._sourceHierarchyDefinition !== this._activeHierarchyDefinition) {\n this._activeHierarchyDefinition = this._sourceHierarchyDefinition;\n this.invalidateHierarchyCache(\"Hierarchy filter reset\");\n }\n this._hierarchyChanged.raiseEvent({ filterChange: { newFilter: undefined } });\n return;\n }\n this._activeHierarchyDefinition = new FilteringHierarchyDefinition({\n imodelAccess: this._imodelAccess,\n source: this._sourceHierarchyDefinition,\n nodeIdentifierPaths: props.paths,\n });\n this.invalidateHierarchyCache(\"Hierarchy filter set\");\n this._dispose.next();\n this._hierarchyChanged.raiseEvent({ filterChange: { newFilter: props } });\n }\n\n private onGroupingNodeCreated(groupingNode: ProcessedGroupingHierarchyNode, props: GetHierarchyNodesProps) {\n this._nodesCache?.set({ ...props, parentNode: groupingNode }, { observable: from(groupingNode.children), processingStatus: \"pre-processed\" });\n }\n\n private createHierarchyLevelDefinitionsObservable(props: DefineHierarchyLevelProps & RequestContextProp): Observable<HierarchyNodesDefinition> {\n const { requestContext, ...defineHierarchyLevelProps } = props;\n doLog({\n category: LOGGING_NAMESPACE_PERFORMANCE,\n message: /* c8 ignore next */ () =>\n `[${requestContext.requestId}] Requesting hierarchy level definitions for ${createNodeIdentifierForLogging(props.parentNode)}`,\n });\n let parentNode = props.parentNode;\n if (parentNode && HierarchyNode.isGeneric(parentNode) && parentNode.key.source && parentNode.key.source !== this._imodelAccess.imodelKey) {\n return EMPTY;\n }\n if (parentNode && HierarchyNode.isInstancesNode(parentNode)) {\n parentNode = {\n ...parentNode,\n key: {\n ...parentNode.key,\n instanceKeys: parentNode.key.instanceKeys.filter((ik) => !ik.imodelKey || ik.imodelKey === this._imodelAccess.imodelKey),\n },\n };\n assert(HierarchyNodeKey.isInstances(parentNode.key));\n if (parentNode.key.instanceKeys.length === 0) {\n return EMPTY;\n }\n }\n return this._activeHierarchyDefinition.defineHierarchyLevel({ ...defineHierarchyLevelProps, parentNode }).pipe(\n mergeAll(),\n finalize(() =>\n doLog({\n category: LOGGING_NAMESPACE_PERFORMANCE,\n message: /* c8 ignore next */ () =>\n `[${requestContext.requestId}] Received all hierarchy level definitions for ${createNodeIdentifierForLogging(props.parentNode)}`,\n }),\n ),\n );\n }\n\n private createSourceNodesObservable(\n props: DefineHierarchyLevelProps & { hierarchyLevelSizeLimit?: number | \"unbounded\"; filteredInstanceKeys?: InstanceKey[] } & RequestContextProp,\n ): SourceNodesObservable {\n // pipe definitions to nodes and put \"share replay\" on it\n return this.createHierarchyLevelDefinitionsObservable(props).pipe(\n mergeMap((def): ObservableInput<SourceHierarchyNode> => {\n if (HierarchyNodesDefinition.isGenericNode(def)) {\n return of({ ...def.node, key: { type: \"generic\", id: def.node.key, source: this._imodelAccess.imodelKey } });\n }\n return this._queryScheduler.scheduleSubscription(\n of(def.query).pipe(\n map((query) => filterQueryByInstanceKeys(query, props.filteredInstanceKeys)),\n mergeMap((query) =>\n readNodes({\n queryExecutor: this._imodelAccess,\n query,\n limit: props.hierarchyLevelSizeLimit,\n parser: this._activeHierarchyDefinition.parseNode ? (row) => this._activeHierarchyDefinition.parseNode!(row, props.parentNode) : undefined,\n }),\n ),\n map((node) => ({\n ...node,\n key: { ...node.key, instanceKeys: node.key.instanceKeys.map((key) => ({ ...key, imodelKey: this._imodelAccess.imodelKey })) },\n })),\n ),\n );\n }),\n finalize(() =>\n doLog({\n category: LOGGING_NAMESPACE_PERFORMANCE,\n message: /* c8 ignore next */ () => `[${props.requestContext.requestId}] Read all child nodes ${createNodeIdentifierForLogging(props.parentNode)}`,\n }),\n ),\n shareReplayWithErrors(),\n );\n }\n\n private createPreProcessedNodesObservable(\n queryNodesObservable: SourceNodesObservable,\n props: GetHierarchyNodesProps & RequestContextProp,\n ): Observable<ProcessedHierarchyNode> {\n return queryNodesObservable.pipe(\n // we're going to be mutating the nodes, but don't want to mutate the original one, so just clone it here once\n map((node) => ({ ...node })),\n // set parent node keys on the source node\n map((node) => Object.assign(node, { parentKeys: createParentNodeKeysList(props.parentNode) })),\n // format `ConcatenatedValue` labels into string labels\n mergeMap((node) => applyLabelsFormatting(node, this._valuesFormatter)),\n // we have `ProcessedHierarchyNode` from here\n preProcessNodes(this._activeHierarchyDefinition),\n // process hiding\n createHideIfNoChildrenOperator((n) => this.getChildNodesObservables({ parentNode: n, requestContext: props.requestContext }).hasNodes),\n createHideNodesInHierarchyOperator(\n // note: for child nodes created because of hidden parent, we want to use parent's request props (instance filter, limit)\n (n) => this.getChildNodesObservables({ ...props, parentNode: n }).processedNodes,\n false,\n ),\n finalize(() =>\n doLog({\n category: LOGGING_NAMESPACE_PERFORMANCE,\n message: /* c8 ignore next */ () =>\n `[${props.requestContext.requestId}] Finished pre-processing child nodes for ${createNodeIdentifierForLogging(props.parentNode)}`,\n }),\n ),\n );\n }\n\n private createProcessedNodesObservable(\n preprocessedNodesObservable: Observable<ProcessedHierarchyNode>,\n props: GetHierarchyNodesProps & RequestContextProp,\n ): Observable<ProcessedHierarchyNode> {\n return preprocessedNodesObservable.pipe(\n createGroupingOperator(this._imodelAccess, props.parentNode, this._valuesFormatter, this._localizedStrings, undefined, (gn) =>\n this.onGroupingNodeCreated(gn, props),\n ),\n finalize(() =>\n doLog({\n category: LOGGING_NAMESPACE_PERFORMANCE,\n message: /* c8 ignore next */ () =>\n `[${props.requestContext.requestId}] Finished grouping child nodes for ${createNodeIdentifierForLogging(props.parentNode)}`,\n }),\n ),\n );\n }\n\n private createFinalizedNodesObservable(\n processedNodesObservable: Observable<ProcessedHierarchyNode>,\n props: GetHierarchyNodesProps & RequestContextProp,\n ): Observable<HierarchyNode> {\n return processedNodesObservable.pipe(\n createDetermineChildrenOperator((n) => this.getChildNodesObservables({ parentNode: n, requestContext: props.requestContext }).hasNodes),\n postProcessNodes(this._activeHierarchyDefinition),\n sortNodesByLabelOperator,\n map((n): HierarchyNode => {\n if (\"processingParams\" in n) {\n delete n.processingParams;\n }\n return Object.assign(n, {\n children: hasChildren(n),\n });\n }),\n takeUntil(this._dispose),\n finalize(() =>\n doLog({\n category: LOGGING_NAMESPACE_PERFORMANCE,\n message: /* c8 ignore next */ () =>\n `[${props.requestContext.requestId}] Finished finalizing child nodes for ${createNodeIdentifierForLogging(props.parentNode)}`,\n }),\n ),\n );\n }\n\n private createHasNodesObservable(\n preprocessedNodesObservable: Observable<ProcessedHierarchyNode>,\n possiblyKnownChildrenObservable: SourceNodesObservable | undefined,\n props: RequestContextProp,\n ): Observable<boolean> {\n const loggingCategory = `${LOGGING_NAMESPACE_INTERNAL}.HasNodes`;\n return concat((possiblyKnownChildrenObservable ?? EMPTY).pipe(filter((n) => hasChildren(n))), preprocessedNodesObservable).pipe(\n log({\n category: loggingCategory,\n message: /* c8 ignore next */ (n) => `[${props.requestContext.requestId}] Node before mapping to 'true': ${createNodeIdentifierForLogging(n)}`,\n }),\n take(1),\n map(() => true),\n defaultIfEmpty(false),\n catchError((e: Error) => {\n doLog({\n category: loggingCategory,\n message: /* c8 ignore next */ () => `[${props.requestContext.requestId}] Error while determining children: ${e.message}`,\n });\n if (e instanceof RowsLimitExceededError) {\n return of(true);\n }\n throw e;\n }),\n log({ category: loggingCategory, message: /* c8 ignore next */ (r) => `[${props.requestContext.requestId}] Result: ${r}` }),\n );\n }\n\n private getCachedObservableEntry(props: GetHierarchyNodesProps & RequestContextProp): HierarchyCacheEntry {\n const loggingCategory = `${LOGGING_NAMESPACE}.QueryResultsCache`;\n const { parentNode, ...restProps } = props;\n const cached = props.ignoreCache || !this._nodesCache ? undefined : this._nodesCache.get(props);\n if (cached) {\n doLog({\n category: loggingCategory,\n message: /* c8 ignore next */ () =>\n `[${props.requestContext.requestId}] Found query nodes observable for ${createNodeIdentifierForLogging(parentNode)}`,\n });\n return cached;\n }\n\n // if we don't find an entry for a grouping node, we load its instances by getting a query and applying\n // a filter based on grouped instance keys\n let filteredInstanceKeys: InstanceKey[] | undefined;\n let parentNonGroupingNode: ParentHierarchyNode<NonGroupingHierarchyNode> | undefined;\n if (parentNode) {\n if (HierarchyNode.isGroupingNode(parentNode)) {\n parentNonGroupingNode = parentNode.nonGroupingAncestor;\n filteredInstanceKeys = parentNode.groupedInstanceKeys;\n } else {\n // not sure why type checker doesn't pick this up\n assert(HierarchyNode.isGeneric(parentNode) || HierarchyNode.isInstancesNode(parentNode));\n parentNonGroupingNode = parentNode;\n }\n }\n\n const nonGroupingNodeChildrenRequestProps = {\n ...restProps,\n parentNode: parentNonGroupingNode,\n ...(filteredInstanceKeys ? { filteredInstanceKeys } : undefined),\n };\n const value = { observable: this.createSourceNodesObservable(nonGroupingNodeChildrenRequestProps), processingStatus: \"none\" as const };\n this._nodesCache?.set(nonGroupingNodeChildrenRequestProps, value);\n doLog({\n category: loggingCategory,\n message: /* c8 ignore next */ () => `[${props.requestContext.requestId}] Saved query nodes observable for ${createNodeIdentifierForLogging(parentNode)}`,\n });\n return value;\n }\n\n private getChildNodesObservables(props: GetHierarchyNodesProps & { hierarchyLevelSizeLimit?: number | \"unbounded\" } & RequestContextProp) {\n const entry = this.getCachedObservableEntry(props);\n switch (entry.processingStatus) {\n case \"none\": {\n const pre = this.createPreProcessedNodesObservable(entry.observable, props);\n const post = this.createProcessedNodesObservable(pre, props);\n return {\n processedNodes: post,\n hasNodes: this.createHasNodesObservable(pre, entry.observable, props),\n finalizedNodes: this.createFinalizedNodesObservable(post, props),\n };\n }\n case \"pre-processed\": {\n const post = this.createProcessedNodesObservable(entry.observable, props);\n return {\n processedNodes: post,\n hasNodes: this.createHasNodesObservable(entry.observable, undefined, props),\n finalizedNodes: this.createFinalizedNodesObservable(post, props),\n };\n }\n }\n }\n\n /**\n * Creates and runs a query based on provided props, then processes retrieved nodes and returns them.\n */\n public getNodes(props: GetHierarchyNodesProps): AsyncIterableIterator<HierarchyNode> {\n const requestContext = { requestId: Guid.createValue() };\n const loggingCategory = `${LOGGING_NAMESPACE}.GetNodes`;\n const timer = new StopWatch(undefined, true);\n let error: any;\n let nodesCount = 0;\n doLog({\n category: loggingCategory,\n message: /* c8 ignore next */ () => `[${requestContext.requestId}] Requesting child nodes for ${createNodeIdentifierForLogging(props.parentNode)}`,\n });\n return eachValueFrom(\n this.getChildNodesObservables({ ...props, requestContext }).finalizedNodes.pipe(\n tap(() => ++nodesCount),\n catchError((e) => {\n error = e;\n throw e;\n }),\n finalize(() => {\n doLog({\n category: loggingCategory,\n message: /* c8 ignore next */ () =>\n /* c8 ignore next 3 */ error\n ? `[${requestContext.requestId}] Error creating child nodes for ${createNodeIdentifierForLogging(props.parentNode)}: ${error instanceof Error ? error.message : error.toString()}`\n : `[${requestContext.requestId}] Returned ${nodesCount} child nodes for ${createNodeIdentifierForLogging(props.parentNode)} in ${timer.currentSeconds.toFixed(2)} s.`,\n });\n }),\n ),\n );\n }\n\n private getNodeInstanceKeysObs(props: Omit<GetHierarchyNodesProps, \"ignoreCache\"> & RequestContextProp): Observable<InstanceKey> {\n const { parentNode, instanceFilter, hierarchyLevelSizeLimit = \"unbounded\", requestContext } = props;\n if (parentNode && HierarchyNode.isGroupingNode(parentNode)) {\n return from(parentNode.groupedInstanceKeys);\n }\n assert(!parentNode || HierarchyNode.isGeneric(parentNode) || HierarchyNode.isInstancesNode(parentNode));\n\n const hierarchyLevelDefinitions = this.createHierarchyLevelDefinitionsObservable({ parentNode, instanceFilter, requestContext });\n\n // split the definitions based on whether they're for generic nodes or for instance nodes\n const [genericDefs, instanceDefs] = partition(hierarchyLevelDefinitions, HierarchyNodesDefinition.isGenericNode);\n\n // query instance keys and a flag whether they should be hidden\n const instanceKeys = instanceDefs.pipe(\n mergeMap((def) =>\n this._queryScheduler.scheduleSubscription(\n of(def.query).pipe(\n mergeMap(async (query) => {\n const ecsql = `\n SELECT\n ${NodeSelectClauseColumnNames.FullClassName},\n ${NodeSelectClauseColumnNames.ECInstanceId},\n ${NodeSelectClauseColumnNames.HideNodeInHierarchy}\n FROM (\n ${query.ecsql}\n )\n `;\n const reader = this._imodelAccess.createQueryReader({ ...query, ecsql }, { rowFormat: \"Indexes\", limit: hierarchyLevelSizeLimit });\n return from(reader).pipe(\n map((row) => ({\n key: {\n className: normalizeFullClassName(row[0]),\n id: row[1],\n imodelKey: this._imodelAccess.imodelKey,\n } satisfies IModelInstanceKey,\n hide: !!row[2],\n })),\n );\n }),\n mergeAll(),\n ),\n ),\n ),\n );\n // split the instance keys observable based on whether they should be hidden or not\n const [visibleNodeInstanceKeys, hiddenNodeInstanceKeys] = partition(instanceKeys, ({ hide }) => !hide);\n\n // hidden items' handling:\n // - if a generic node is hidden, we'll want to retrieve instance keys of its children, otherwise we don't care about it,\n // - if an instance key is hidden, we want to create a merged node similar to what we do in `createHideNodesInHierarchyOperator`\n const hiddenParentNodes = merge(\n genericDefs.pipe(\n filter((def) => !!def.node.processingParams?.hideInHierarchy),\n map(\n (def): GenericNodeKey => ({\n type: \"generic\",\n id: def.node.key,\n source: this._imodelAccess.imodelKey,\n }),\n ),\n ),\n hiddenNodeInstanceKeys.pipe(\n // first merge all keys by class\n reduceToMergeMapList(\n ({ key }) => key.className,\n ({ key }) => key.id,\n ),\n // then, for each class, create an instance key\n mergeMap((mergedMap): InstancesNodeKey[] =>\n [...mergedMap.entries()].map(([className, ids]) => ({\n type: \"instances\",\n instanceKeys: ids.map((id) => ({ className, id, imodelKey: this._imodelAccess.imodelKey })),\n })),\n ),\n ),\n ).pipe(\n map((key) => ({\n key,\n parentKeys: [],\n label: \"\",\n })),\n );\n\n // merge visible instance keys from this level & the ones we get recursively requesting from deeper levels\n return merge(\n visibleNodeInstanceKeys.pipe(map(({ key }) => key)),\n hiddenParentNodes.pipe(mergeMap((hiddenNode) => this.getNodeInstanceKeysObs({ parentNode: hiddenNode, requestContext }))),\n ).pipe(takeUntil(this._dispose));\n }\n\n /**\n * Creates an iterator for all child hierarchy level instance keys, taking into account any hidden hierarchy levels\n * that there may be under the given parent node.\n */\n public getNodeInstanceKeys(props: Omit<GetHierarchyNodesProps, \"ignoreCache\">): AsyncIterableIterator<InstanceKey> {\n const requestContext = { requestId: Guid.createValue() };\n const loggingCategory = `${LOGGING_NAMESPACE}.GetNodeInstanceKeys`;\n const timer = new StopWatch(undefined, true);\n doLog({\n category: loggingCategory,\n message: /* c8 ignore next */ () => `[${requestContext.requestId}] Requesting keys for ${createNodeIdentifierForLogging(props.parentNode)}`,\n });\n let error: any;\n let keysCount = 0;\n return eachValueFrom(\n this.getNodeInstanceKeysObs({ ...props, requestContext }).pipe(\n tap(() => ++keysCount),\n catchError((e) => {\n error = e;\n throw e;\n }),\n finalize(() => {\n doLog({\n category: loggingCategory,\n message: /* c8 ignore next */ () =>\n /* c8 ignore next 3 */ error\n ? `[${requestContext.requestId}] Error creating node instance keys for ${createNodeIdentifierForLogging(props.parentNode)}: ${error instanceof Error ? error.message : error.toString()}`\n : `[${requestContext.requestId}] Returned ${keysCount} instance keys for ${createNodeIdentifierForLogging(props.parentNode)} in ${timer.currentSeconds.toFixed(2)} s.`,\n });\n }),\n ),\n );\n }\n}\n\ntype SourceHierarchyNode = SourceInstanceHierarchyNode | (Omit<SourceGenericHierarchyNode, \"key\"> & { key: GenericNodeKey });\ntype SourceNodesObservable = Observable<SourceHierarchyNode>;\ntype ProcessedNodesObservable = Observable<ProcessedHierarchyNode>;\ntype HierarchyCacheEntry =\n | { observable: SourceNodesObservable; processingStatus: \"none\" }\n | { observable: ProcessedNodesObservable; processingStatus: \"pre-processed\" };\n\nfunction preProcessNodes(hierarchyFactory: RxjsHierarchyDefinition) {\n return hierarchyFactory.preProcessNode ? processNodes(hierarchyFactory.preProcessNode) : identity;\n}\n\nfunction postProcessNodes(hierarchyFactory: RxjsHierarchyDefinition) {\n return hierarchyFactory.postProcessNode ? processNodes(hierarchyFactory.postProcessNode) : identity;\n}\n\nfunction processNodes<TNode>(processor: (node: TNode) => Observable<TNode>) {\n return (nodes: Observable<TNode>) => nodes.pipe(mergeMap(processor));\n}\n\nfunction applyLabelsFormatting<TNode extends { label: string | ConcatenatedValue }>(\n node: TNode,\n valueFormatter: IPrimitiveValueFormatter,\n): Observable<TNode & { label: string }> {\n return from(\n formatConcatenatedValue({\n value: node.label,\n valueFormatter,\n }),\n ).pipe(\n map((label) => ({\n ...node,\n label,\n })),\n );\n}\n\nfunction createParentNodeKeysList(parentNode: ParentHierarchyNode | undefined) {\n if (!parentNode) {\n return [];\n }\n return [...parentNode.parentKeys, parentNode.key];\n}\n\nfunction filterQueryByInstanceKeys(query: ECSqlQueryDef, filteredInstanceKeys: InstanceKey[] | undefined): ECSqlQueryDef {\n if (!filteredInstanceKeys || !filteredInstanceKeys.length) {\n return query;\n }\n const MAX_ALLOWED_BINDINGS = 1000;\n if (filteredInstanceKeys.length < MAX_ALLOWED_BINDINGS) {\n return {\n ...query,\n ecsql: `\n SELECT *\n FROM (${query.ecsql}) q\n WHERE q.ECInstanceId IN (${filteredInstanceKeys.map(() => \"?\").join(\",\")})\n `,\n bindings: [...(query.bindings ?? []), ...filteredInstanceKeys.map((k): ECSqlBinding => ({ type: \"id\", value: k.id }))],\n };\n }\n /* c8 ignore start */\n return {\n ...query,\n ecsql: `\n SELECT *\n FROM (${query.ecsql}) q\n WHERE InVirtualSet(?, q.ECInstanceId)\n `,\n bindings: [...(query.bindings ?? []), { type: \"idset\", value: filteredInstanceKeys.map((k) => k.id) }],\n };\n /* c8 ignore end */\n}\n"]}
@@ -1,21 +0,0 @@
1
- import { ECSqlQueryDef, ECSqlQueryExecutor, ECSqlQueryReaderOptions } from "@itwin/presentation-shared";
2
- /**
3
- * An interface for something that knows how to create a limiting ECSQL query reader.
4
- * @public
5
- */
6
- export interface LimitingECSqlQueryExecutor {
7
- /**
8
- * Creates a query reader for given query, but makes sure it doesn't return more than the configured
9
- * limit of rows.
10
- * @throws `RowsLimitExceededError` when the query returns more than configured limit of rows.
11
- */
12
- createQueryReader(query: ECSqlQueryDef, config?: ECSqlQueryReaderOptions & {
13
- limit?: number | "unbounded";
14
- }): ReturnType<ECSqlQueryExecutor["createQueryReader"]>;
15
- }
16
- /**
17
- * Creates an `LimitingECSqlQueryExecutor` that throws `RowsLimitExceededError` if the query exceeds given amount of rows.
18
- * @public
19
- */
20
- export declare function createLimitingECSqlQueryExecutor(baseExecutor: ECSqlQueryExecutor, defaultLimit: number | "unbounded"): LimitingECSqlQueryExecutor;
21
- //# sourceMappingURL=LimitingECSqlQueryExecutor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LimitingECSqlQueryExecutor.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/imodel/LimitingECSqlQueryExecutor.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,aAAa,EACb,kBAAkB,EAClB,uBAAuB,EAGxB,MAAM,4BAA4B,CAAC;AAKpC;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,iBAAiB,CACf,KAAK,EAAE,aAAa,EACpB,MAAM,CAAC,EAAE,uBAAuB,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;KAAE,GAClE,UAAU,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC,CAAC;CACxD;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAAC,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,GAAG,WAAW,GAAG,0BAA0B,CA4CjJ"}
@@ -1,123 +0,0 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.createLimitingECSqlQueryExecutor = createLimitingECSqlQueryExecutor;
8
- const core_bentley_1 = require("@itwin/core-bentley");
9
- const presentation_shared_1 = require("@itwin/presentation-shared");
10
- const HierarchyErrors_js_1 = require("../HierarchyErrors.js");
11
- const Common_js_1 = require("../internal/Common.js");
12
- const LoggingUtils_js_1 = require("../internal/LoggingUtils.js");
13
- /**
14
- * Creates an `LimitingECSqlQueryExecutor` that throws `RowsLimitExceededError` if the query exceeds given amount of rows.
15
- * @public
16
- */
17
- function createLimitingECSqlQueryExecutor(baseExecutor, defaultLimit) {
18
- return {
19
- async *createQueryReader(query, config) {
20
- const { limit: configLimit, ...restConfig } = config ?? {};
21
- const limit = configLimit ?? defaultLimit;
22
- const queryLogger = createQueryLogger(query);
23
- const releaseMainThread = (0, presentation_shared_1.createMainThreadReleaseOnTimePassedHandler)();
24
- // handle "unbounded" case without a buffer
25
- const reader = baseExecutor.createQueryReader({ ...query, ecsql: addLimit(query.ecsql, limit) }, restConfig);
26
- if (limit === "unbounded") {
27
- try {
28
- for await (const row of reader) {
29
- await releaseMainThread();
30
- queryLogger.onStep();
31
- yield row;
32
- }
33
- }
34
- finally {
35
- queryLogger.onComplete();
36
- }
37
- return;
38
- }
39
- // avoid streaming until we know the number of rows is okay
40
- const buffer = [];
41
- try {
42
- for await (const row of reader) {
43
- await releaseMainThread();
44
- queryLogger.onStep();
45
- buffer.push(row);
46
- if (buffer.length > limit) {
47
- throw new HierarchyErrors_js_1.RowsLimitExceededError(limit);
48
- }
49
- }
50
- }
51
- finally {
52
- queryLogger.onComplete();
53
- }
54
- for (const row of buffer) {
55
- await releaseMainThread();
56
- yield row;
57
- }
58
- },
59
- };
60
- }
61
- function addLimit(ecsql, limit) {
62
- if (limit === "unbounded") {
63
- return ecsql;
64
- }
65
- return `
66
- SELECT *
67
- FROM (${ecsql})
68
- LIMIT ${limit + 1}
69
- `;
70
- }
71
- const LOGGING_NAMESPACE = `${Common_js_1.LOGGING_NAMESPACE}.Queries`;
72
- const LOGGING_NAMESPACE_PERFORMANCE = `${Common_js_1.LOGGING_NAMESPACE_PERFORMANCE}.Queries`;
73
- function createQueryLogger(query, firstStepWarningThreshold = 3000, allRowsWarningThreshold = 5000) {
74
- const queryId = core_bentley_1.Guid.createValue();
75
- (0, LoggingUtils_js_1.doLog)({
76
- category: LOGGING_NAMESPACE,
77
- message: /* c8 ignore next */ () => `Executing query [${queryId}]: ${createQueryLogMessage(query)}`,
78
- });
79
- let firstStep = true;
80
- let rowsCount = 0;
81
- const timer = new core_bentley_1.StopWatch(undefined, true);
82
- return {
83
- onStep() {
84
- if (firstStep) {
85
- /* c8 ignore start */
86
- (0, LoggingUtils_js_1.doLog)({
87
- category: LOGGING_NAMESPACE_PERFORMANCE,
88
- severity: timer.current.milliseconds >= firstStepWarningThreshold ? "warning" : "trace",
89
- message: () => `[${queryId}] First step took ${timer.currentSeconds} s.`,
90
- });
91
- /* c8 ignore end */
92
- firstStep = false;
93
- }
94
- ++rowsCount;
95
- },
96
- onComplete() {
97
- /* c8 ignore start */
98
- (0, LoggingUtils_js_1.doLog)({
99
- category: LOGGING_NAMESPACE_PERFORMANCE,
100
- severity: timer.current.milliseconds >= allRowsWarningThreshold ? "warning" : "trace",
101
- message: () => `[${queryId}] Query took ${timer.currentSeconds} s. for ${rowsCount} rows.`,
102
- });
103
- /* c8 ignore end */
104
- },
105
- };
106
- }
107
- /* c8 ignore start */
108
- function createQueryLogMessage(query) {
109
- const ctes = query.ctes?.map((cte) => ` ${(0, presentation_shared_1.trimWhitespace)(cte)}`).join(", \n");
110
- const bindings = query.bindings?.map((b) => JSON.stringify(b.value)).join(", ");
111
- let output = "{\n";
112
- if (ctes) {
113
- output += ` ctes: [ \n${ctes} \n], \n`;
114
- }
115
- output += ` ecsql: ${(0, presentation_shared_1.trimWhitespace)(query.ecsql)}, \n`;
116
- if (bindings) {
117
- output += ` bindings: [${bindings}], \n`;
118
- }
119
- output += "}";
120
- return output;
121
- }
122
- /* c8 ignore end */
123
- //# sourceMappingURL=LimitingECSqlQueryExecutor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LimitingECSqlQueryExecutor.js","sourceRoot":"","sources":["../../../../src/hierarchies/imodel/LimitingECSqlQueryExecutor.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAmChG,4EA4CC;AA7ED,sDAAsD;AACtD,oEAOoC;AACpC,8DAA+D;AAC/D,qDAAyJ;AACzJ,iEAAoD;AAkBpD;;;GAGG;AACH,SAAgB,gCAAgC,CAAC,YAAgC,EAAE,YAAkC;IACnH,OAAO;QACL,KAAK,CAAC,CAAC,iBAAiB,CAAC,KAAoB,EAAE,MAAmE;YAChH,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,UAAU,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;YAC3D,MAAM,KAAK,GAAG,WAAW,IAAI,YAAY,CAAC;YA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IAAA,uBAAK,EAAC;gBACJ,QAAQ,EAAE,6BAA6B;gBACvC,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY,IAAI,uBAAuB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;gBACrF,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,OAAO,gBAAgB,KAAK,CAAC,cAAc,WAAW,SAAS,QAAQ;aAC3F,CAAC,CAAC;YACH,mBAAmB;QACrB,CAAC;KACF,CAAC;AACJ,CAAC;AAED,qBAAqB;AACrB,SAAS,qBAAqB,CAAC,KAAoB;IACjD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,IAAA,oCAAc,EAAC,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjF,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChF,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,IAAI,IAAI,EAAE,CAAC;QACT,MAAM,IAAI,eAAe,IAAI,UAAU,CAAC;IAC1C,CAAC;IACD,MAAM,IAAI,YAAY,IAAA,oCAAc,EAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;IACxD,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,IAAI,gBAAgB,QAAQ,OAAO,CAAC;IAC5C,CAAC;IACD,MAAM,IAAI,GAAG,CAAC;IACd,OAAO,MAAM,CAAC;AAChB,CAAC;AACD,mBAAmB","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\nimport { Guid, StopWatch } from \"@itwin/core-bentley\";\nimport {\n createMainThreadReleaseOnTimePassedHandler,\n ECSqlQueryDef,\n ECSqlQueryExecutor,\n ECSqlQueryReaderOptions,\n ECSqlQueryRow,\n trimWhitespace,\n} from \"@itwin/presentation-shared\";\nimport { RowsLimitExceededError } from \"../HierarchyErrors.js\";\nimport { LOGGING_NAMESPACE as BASE_LOGGING_NAMESPACE, LOGGING_NAMESPACE_PERFORMANCE as BASE_LOGGING_NAMESPACE_PERFORMANCE } from \"../internal/Common.js\";\nimport { doLog } from \"../internal/LoggingUtils.js\";\n\n/**\n * An interface for something that knows how to create a limiting ECSQL query reader.\n * @public\n */\nexport interface LimitingECSqlQueryExecutor {\n /**\n * Creates a query reader for given query, but makes sure it doesn't return more than the configured\n * limit of rows.\n * @throws `RowsLimitExceededError` when the query returns more than configured limit of rows.\n */\n createQueryReader(\n query: ECSqlQueryDef,\n config?: ECSqlQueryReaderOptions & { limit?: number | \"unbounded\" },\n ): ReturnType<ECSqlQueryExecutor[\"createQueryReader\"]>;\n}\n\n/**\n * Creates an `LimitingECSqlQueryExecutor` that throws `RowsLimitExceededError` if the query exceeds given amount of rows.\n * @public\n */\nexport function createLimitingECSqlQueryExecutor(baseExecutor: ECSqlQueryExecutor, defaultLimit: number | \"unbounded\"): LimitingECSqlQueryExecutor {\n return {\n async *createQueryReader(query: ECSqlQueryDef, config?: ECSqlQueryReaderOptions & { limit?: number | \"unbounded\" }) {\n const { limit: configLimit, ...restConfig } = config ?? {};\n const limit = configLimit ?? defaultLimit;\n const queryLogger = createQueryLogger(query);\n const releaseMainThread = createMainThreadReleaseOnTimePassedHandler();\n\n // handle \"unbounded\" case without a buffer\n const reader = baseExecutor.createQueryReader({ ...query, ecsql: addLimit(query.ecsql, limit) }, restConfig);\n if (limit === \"unbounded\") {\n try {\n for await (const row of reader) {\n await releaseMainThread();\n queryLogger.onStep();\n yield row;\n }\n } finally {\n queryLogger.onComplete();\n }\n return;\n }\n\n // avoid streaming until we know the number of rows is okay\n const buffer: ECSqlQueryRow[] = [];\n try {\n for await (const row of reader) {\n await releaseMainThread();\n queryLogger.onStep();\n buffer.push(row);\n if (buffer.length > limit) {\n throw new RowsLimitExceededError(limit);\n }\n }\n } finally {\n queryLogger.onComplete();\n }\n\n for (const row of buffer) {\n await releaseMainThread();\n yield row;\n }\n },\n };\n}\n\nfunction addLimit(ecsql: string, limit: number | \"unbounded\") {\n if (limit === \"unbounded\") {\n return ecsql;\n }\n return `\n SELECT *\n FROM (${ecsql})\n LIMIT ${limit + 1}\n `;\n}\n\nconst LOGGING_NAMESPACE = `${BASE_LOGGING_NAMESPACE}.Queries`;\nconst LOGGING_NAMESPACE_PERFORMANCE = `${BASE_LOGGING_NAMESPACE_PERFORMANCE}.Queries`;\nfunction createQueryLogger(query: ECSqlQueryDef, firstStepWarningThreshold = 3000, allRowsWarningThreshold = 5000) {\n const queryId = Guid.createValue();\n doLog({\n category: LOGGING_NAMESPACE,\n message: /* c8 ignore next */ () => `Executing query [${queryId}]: ${createQueryLogMessage(query)}`,\n });\n\n let firstStep = true;\n let rowsCount = 0;\n const timer = new StopWatch(undefined, true);\n return {\n onStep() {\n if (firstStep) {\n /* c8 ignore start */\n doLog({\n category: LOGGING_NAMESPACE_PERFORMANCE,\n severity: timer.current.milliseconds >= firstStepWarningThreshold ? \"warning\" : \"trace\",\n message: () => `[${queryId}] First step took ${timer.currentSeconds} s.`,\n });\n /* c8 ignore end */\n firstStep = false;\n }\n ++rowsCount;\n },\n onComplete() {\n /* c8 ignore start */\n doLog({\n category: LOGGING_NAMESPACE_PERFORMANCE,\n severity: timer.current.milliseconds >= allRowsWarningThreshold ? \"warning\" : \"trace\",\n message: () => `[${queryId}] Query took ${timer.currentSeconds} s. for ${rowsCount} rows.`,\n });\n /* c8 ignore end */\n },\n };\n}\n\n/* c8 ignore start */\nfunction createQueryLogMessage(query: ECSqlQueryDef): string {\n const ctes = query.ctes?.map((cte) => ` ${trimWhitespace(cte)}`).join(\", \\n\");\n const bindings = query.bindings?.map((b) => JSON.stringify(b.value)).join(\", \");\n let output = \"{\\n\";\n if (ctes) {\n output += ` ctes: [ \\n${ctes} \\n], \\n`;\n }\n output += ` ecsql: ${trimWhitespace(query.ecsql)}, \\n`;\n if (bindings) {\n output += ` bindings: [${bindings}], \\n`;\n }\n output += \"}\";\n return output;\n}\n/* c8 ignore end */\n"]}
@@ -1,230 +0,0 @@
1
- import { Id64String } from "@itwin/core-bentley";
2
- import { GenericInstanceFilter } from "@itwin/core-common";
3
- import { ECClassHierarchyInspector, ECSchemaProvider, IInstanceLabelSelectClauseFactory } from "@itwin/presentation-shared";
4
- import { HierarchyNodeAutoExpandProp } from "./IModelHierarchyNode.js";
5
- /**
6
- * Column names of the SELECT clause created by `NodeSelectClauseFactory`. Order of the names matches the order of columns
7
- * created by the factory.
8
- *
9
- * @public
10
- */
11
- export declare enum NodeSelectClauseColumnNames {
12
- /** Full class name of the instance the node represents. Type: `string` in format `{schema name}:{class name}`. */
13
- FullClassName = "FullClassName",
14
- /** ECInstance ID of the instance the node represents. Type: `Id64String`. */
15
- ECInstanceId = "ECInstanceId",
16
- /** Display label. Type: `string`. */
17
- DisplayLabel = "DisplayLabel",
18
- /**
19
- * A flag indicating if the node has children. Type: `boolean`. Values:
20
- * - `false` - node never has children.
21
- * - `true` - node always has children.
22
- * - NULL - unknown, needs to be determined by requesting children for the node.
23
- */
24
- HasChildren = "HasChildren",
25
- /** A flag indicating that a node should be hidden if it has no children. Type: `boolean`. */
26
- HideIfNoChildren = "HideIfNoChildren",
27
- /** A flag indicating that a node should be hidden and its children should be displayed instead. Type: `boolean`. */
28
- HideNodeInHierarchy = "HideNodeInHierarchy",
29
- /** A serialized JSON object for providing grouping information. */
30
- Grouping = "Grouping",
31
- /** A serialized JSON object for associating a node with additional data. */
32
- ExtendedData = "ExtendedData",
33
- /** A flag indicating the node should be auto-expanded when it's loaded. */
34
- AutoExpand = "AutoExpand",
35
- /** A flag indicating the node supports child hierarchy level filtering. */
36
- SupportsFiltering = "SupportsFiltering"
37
- }
38
- /**
39
- * A data structure for defining an ECSQL value selector.
40
- * @public
41
- */
42
- interface ECSqlValueSelector {
43
- selector: string;
44
- }
45
- /**
46
- * Props for `NodeSelectClauseFactory.createSelectClause`.
47
- * @public
48
- */
49
- interface NodeSelectClauseProps {
50
- ecClassId: ECSqlValueSelector;
51
- ecInstanceId: ECSqlValueSelector;
52
- nodeLabel: string | ECSqlValueSelector;
53
- extendedData?: {
54
- [key: string]: Id64String | string | number | boolean | ECSqlValueSelector;
55
- };
56
- autoExpand?: boolean | ECSqlValueSelector;
57
- supportsFiltering?: boolean | ECSqlValueSelector;
58
- hasChildren?: boolean | ECSqlValueSelector;
59
- hideNodeInHierarchy?: boolean | ECSqlValueSelector;
60
- hideIfNoChildren?: boolean | ECSqlValueSelector;
61
- grouping?: ECSqlSelectClauseGroupingParams;
62
- }
63
- /**
64
- * A data structure for defining nodes' grouping requirements.
65
- * @public
66
- */
67
- interface ECSqlSelectClauseGroupingParams {
68
- byLabel?: ECSqlSelectClauseLabelGroupingParams;
69
- byClass?: boolean | ECSqlSelectClauseGroupingParamsBase | ECSqlValueSelector;
70
- byBaseClasses?: ECSqlSelectClauseBaseClassGroupingParams;
71
- byProperties?: ECSqlSelectClausePropertiesGroupingParams;
72
- }
73
- /**
74
- * A data structure for defining label grouping params.
75
- * @public
76
- */
77
- interface ECSqlSelectClauseLabelGroupingBaseParams {
78
- /** Label grouping option that determines whether to group nodes or to merge them. Defaults to "group".*/
79
- action?: "group" | "merge";
80
- /** Id that needs to match for nodes to be grouped or merged.*/
81
- groupId?: string | ECSqlValueSelector;
82
- }
83
- /**
84
- * A data structure for defining label merging.
85
- * @public
86
- */
87
- interface ECSqlSelectClauseLabelGroupingMergeParams extends ECSqlSelectClauseLabelGroupingBaseParams {
88
- action: "merge";
89
- }
90
- /**
91
- * A data structure for defining label grouping.
92
- * @public
93
- */
94
- interface ECSqlSelectClauseLabelGroupingGroupParams extends ECSqlSelectClauseLabelGroupingBaseParams, ECSqlSelectClauseGroupingParamsBase {
95
- action?: "group";
96
- }
97
- /**
98
- * A data structure for defining possible label grouping types.
99
- * @public
100
- */
101
- type ECSqlSelectClauseLabelGroupingParams = boolean | ECSqlValueSelector | ECSqlSelectClauseLabelGroupingMergeParams | ECSqlSelectClauseLabelGroupingGroupParams;
102
- /**
103
- * A data structure for defining base grouping parameters shared across all types of grouping.
104
- * @public
105
- */
106
- interface ECSqlSelectClauseGroupingParamsBase {
107
- hideIfNoSiblings?: boolean | ECSqlValueSelector;
108
- hideIfOneGroupedNode?: boolean | ECSqlValueSelector;
109
- autoExpand?: HierarchyNodeAutoExpandProp | ECSqlValueSelector;
110
- }
111
- /**
112
- * A data structure for defining properties grouping.
113
- * @public
114
- */
115
- interface ECSqlSelectClausePropertiesGroupingParams extends ECSqlSelectClauseGroupingParamsBase {
116
- /**
117
- * Full name of a class whose properties are used to group the node. Only has effect if the node
118
- * represents an instance of that class.
119
- *
120
- * Full class name format: `SchemaName.ClassName`.
121
- */
122
- propertiesClassName: string;
123
- /**
124
- * Property grouping option that determines whether to group nodes whose grouping value is not set or is set to an empty string.
125
- *
126
- * Label of the created grouping node will be `Not Specified`.
127
- */
128
- createGroupForUnspecifiedValues?: boolean | ECSqlValueSelector;
129
- /**
130
- * Property grouping option that determines whether to group nodes whose grouping value doesn't fit within any of the provided
131
- * ranges, or is not a numeric value.
132
- *
133
- * Label of the created grouping node will be `Other`.
134
- */
135
- createGroupForOutOfRangeValues?: boolean | ECSqlValueSelector;
136
- /**
137
- * Properties of the specified class, by which the nodes should be grouped.
138
- *
139
- * Example usage:
140
- * ```ts
141
- * propertyGroups: [
142
- * {
143
- * propertyName: "type",
144
- * propertyClassAlias: "this"
145
- * },
146
- * {
147
- * propertyName: "length",
148
- * propertyClassAlias: "x",
149
- * ranges: [
150
- * { fromValue: 1, toValue: 10, rangeLabel: "Small" },
151
- * { fromValue: 11, toValue: 20, rangeLabel: "Medium" }
152
- * ]
153
- * },
154
- * ]
155
- * ```
156
- */
157
- propertyGroups: ECSqlSelectClausePropertyGroup[];
158
- }
159
- /**
160
- * A data structure for defining specific properties' grouping params.
161
- * @public
162
- */
163
- interface ECSqlSelectClausePropertyGroup {
164
- /** A string indicating the name of the property to group by. */
165
- propertyName: string;
166
- /** Alias to of the class containing the property. Used to select the property value. */
167
- propertyClassAlias: string;
168
- /** Ranges are used to group nodes by numeric properties which are within specified bounds. */
169
- ranges?: ECSqlSelectClausePropertyValueRange[];
170
- }
171
- /**
172
- * A data structure for defining boundaries for a value.
173
- * @public
174
- */
175
- interface ECSqlSelectClausePropertyValueRange {
176
- /** Defines the lower bound of the range. */
177
- fromValue: number | ECSqlValueSelector;
178
- /** Defines the upper bound of the range. */
179
- toValue: number | ECSqlValueSelector;
180
- /** Defines the range label. Will be used as grouping node's display label. */
181
- rangeLabel?: string | ECSqlValueSelector;
182
- }
183
- /**
184
- * A data structure for defining base class grouping.
185
- * @public
186
- */
187
- interface ECSqlSelectClauseBaseClassGroupingParams extends ECSqlSelectClauseGroupingParamsBase {
188
- fullClassNames: string[] | ECSqlValueSelector[];
189
- }
190
- /**
191
- * An interface of a factory that knows how to create nodes' select ECSQL query.
192
- * @public
193
- */
194
- export interface NodesQueryClauseFactory {
195
- /** Create a SELECT clause in a format understood by nodes query parser used by `HierarchyProvider`. */
196
- createSelectClause(props: NodeSelectClauseProps): Promise<string>;
197
- /**
198
- * Creates the necessary ECSQL snippets to create an instance filter described by the given `GenericInstanceFilter` argument.
199
- * - `from` is set to either the `contentClass.fullName` or one of `filter.propertyClassNames`, depending on which is more specific.
200
- * - `joins` is set to a number of `JOIN` clauses required to join all relationships described by `filter.relatedInstances`.
201
- * - `where` is set to a `WHERE` clause (without the `WHERE` keyword) that filters instances by classes on
202
- * `filter.filterClassNames` and by properties as described by `filter.rules`.
203
- *
204
- * Special cases:
205
- * - If `filter` is `undefined`, `joins` and `where` are set to empty strings and `from` is set to `contentClass.fullName`.
206
- * - If the provided content class doesn't intersect with the property class in provided filter, a special result
207
- * is returned to make sure the resulting query is valid and doesn't return anything.
208
- */
209
- createFilterClauses(props: {
210
- contentClass: {
211
- fullName: string;
212
- alias: string;
213
- };
214
- filter?: GenericInstanceFilter;
215
- }): Promise<{
216
- from: string;
217
- where: string;
218
- joins: string;
219
- }>;
220
- }
221
- /**
222
- * Creates an instance of `NodeSelectQueryFactory`.
223
- * @public
224
- */
225
- export declare function createNodesQueryClauseFactory(props: {
226
- imodelAccess: ECSchemaProvider & ECClassHierarchyInspector;
227
- instanceLabelSelectClauseFactory: IInstanceLabelSelectClauseFactory;
228
- }): NodesQueryClauseFactory;
229
- export {};
230
- //# sourceMappingURL=NodeSelectQueryFactory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NodeSelectQueryFactory.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/imodel/NodeSelectQueryFactory.ts"],"names":[],"mappings":"AAKA,OAAO,EAAU,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EACL,qBAAqB,EAOtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,yBAAyB,EACzB,gBAAgB,EAGhB,iCAAiC,EAIlC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAEvE;;;;;GAKG;AACH,oBAAY,2BAA2B;IACrC,kHAAkH;IAClH,aAAa,kBAAkB;IAC/B,6EAA6E;IAC7E,YAAY,iBAAiB;IAC7B,qCAAqC;IACrC,YAAY,iBAAiB;IAC7B;;;;;OAKG;IACH,WAAW,gBAAgB;IAC3B,6FAA6F;IAC7F,gBAAgB,qBAAqB;IACrC,oHAAoH;IACpH,mBAAmB,wBAAwB;IAC3C,mEAAmE;IACnE,QAAQ,aAAa;IACrB,4EAA4E;IAC5E,YAAY,iBAAiB;IAC7B,2EAA2E;IAC3E,UAAU,eAAe;IACzB,2EAA2E;IAC3E,iBAAiB,sBAAsB;CACxC;AAED;;;GAGG;AACH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