@itwin/presentation-hierarchies 1.1.0 → 1.2.0

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 (248) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/lib/cjs/hierarchies/HierarchyErrors.d.ts +1 -1
  3. package/lib/cjs/hierarchies/HierarchyErrors.js +1 -1
  4. package/lib/cjs/hierarchies/HierarchyErrors.js.map +1 -1
  5. package/lib/cjs/hierarchies/HierarchyFiltering.d.ts +12 -11
  6. package/lib/cjs/hierarchies/HierarchyFiltering.d.ts.map +1 -1
  7. package/lib/cjs/hierarchies/HierarchyFiltering.js +16 -21
  8. package/lib/cjs/hierarchies/HierarchyFiltering.js.map +1 -1
  9. package/lib/cjs/hierarchies/HierarchyNode.d.ts +10 -10
  10. package/lib/cjs/hierarchies/HierarchyNode.d.ts.map +1 -1
  11. package/lib/cjs/hierarchies/HierarchyNode.js +13 -13
  12. package/lib/cjs/hierarchies/HierarchyNode.js.map +1 -1
  13. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.d.ts +4 -4
  14. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -1
  15. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js +1 -1
  16. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js.map +1 -1
  17. package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts +13 -13
  18. package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts.map +1 -1
  19. package/lib/cjs/hierarchies/HierarchyNodeKey.js +1 -1
  20. package/lib/cjs/hierarchies/HierarchyNodeKey.js.map +1 -1
  21. package/lib/cjs/hierarchies/HierarchyProvider.d.ts +6 -6
  22. package/lib/cjs/hierarchies/HierarchyProvider.d.ts.map +1 -1
  23. package/lib/cjs/hierarchies/HierarchyProvider.js +6 -6
  24. package/lib/cjs/hierarchies/HierarchyProvider.js.map +1 -1
  25. package/lib/cjs/hierarchies/Logging.d.ts +2 -2
  26. package/lib/cjs/hierarchies/Logging.js +3 -3
  27. package/lib/cjs/hierarchies/Logging.js.map +1 -1
  28. package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.d.ts +5 -17
  29. package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.d.ts.map +1 -1
  30. package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.js +66 -54
  31. package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.js.map +1 -1
  32. package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts +1 -1
  33. package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts.map +1 -1
  34. package/lib/cjs/hierarchies/imodel/HierarchyCache.js +2 -2
  35. package/lib/cjs/hierarchies/imodel/HierarchyCache.js.map +1 -1
  36. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts +13 -13
  37. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -1
  38. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js +1 -1
  39. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -1
  40. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts +23 -23
  41. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -1
  42. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js +5 -5
  43. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js.map +1 -1
  44. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts +8 -8
  45. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -1
  46. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js +88 -87
  47. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -1
  48. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts +2 -2
  49. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js +17 -14
  50. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -1
  51. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts +16 -16
  52. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -1
  53. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js +2 -2
  54. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -1
  55. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts +10 -10
  56. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -1
  57. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js +5 -10
  58. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -1
  59. package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts +4 -4
  60. package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -1
  61. package/lib/cjs/hierarchies/imodel/TreeNodesReader.js +1 -2
  62. package/lib/cjs/hierarchies/imodel/TreeNodesReader.js.map +1 -1
  63. package/lib/cjs/hierarchies/imodel/Utils.d.ts +1 -1
  64. package/lib/cjs/hierarchies/imodel/Utils.d.ts.map +1 -1
  65. package/lib/cjs/hierarchies/imodel/Utils.js +2 -2
  66. package/lib/cjs/hierarchies/imodel/Utils.js.map +1 -1
  67. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.d.ts +1 -1
  68. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -1
  69. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js +8 -8
  70. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js.map +1 -1
  71. package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts +3 -3
  72. package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts.map +1 -1
  73. package/lib/cjs/hierarchies/imodel/operators/Grouping.js +42 -42
  74. package/lib/cjs/hierarchies/imodel/operators/Grouping.js.map +1 -1
  75. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.d.ts +1 -1
  76. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -1
  77. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js +16 -16
  78. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -1
  79. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts +1 -1
  80. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -1
  81. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js +25 -25
  82. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -1
  83. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.d.ts +1 -1
  84. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +1 -1
  85. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.js +2 -2
  86. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.js.map +1 -1
  87. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts +3 -3
  88. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -1
  89. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js +3 -3
  90. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -1
  91. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts +3 -3
  92. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -1
  93. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js +2 -2
  94. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -1
  95. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts +1 -1
  96. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -1
  97. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js +2 -2
  98. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -1
  99. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts +2 -2
  100. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -1
  101. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js +2 -2
  102. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -1
  103. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts +3 -3
  104. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -1
  105. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js +13 -18
  106. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -1
  107. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts +2 -2
  108. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -1
  109. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js.map +1 -1
  110. package/lib/cjs/hierarchies/internal/Common.d.ts +1 -1
  111. package/lib/cjs/hierarchies/internal/Common.d.ts.map +1 -1
  112. package/lib/cjs/hierarchies/internal/Common.js +2 -1
  113. package/lib/cjs/hierarchies/internal/Common.js.map +1 -1
  114. package/lib/cjs/hierarchies/internal/EachValueFrom.d.ts.map +1 -1
  115. package/lib/cjs/hierarchies/internal/EachValueFrom.js +3 -0
  116. package/lib/cjs/hierarchies/internal/EachValueFrom.js.map +1 -1
  117. package/lib/cjs/hierarchies/internal/LoggingUtils.js +2 -2
  118. package/lib/cjs/hierarchies/internal/LoggingUtils.js.map +1 -1
  119. package/lib/cjs/hierarchies/internal/operators/Sorting.js +2 -2
  120. package/lib/cjs/hierarchies/internal/operators/Sorting.js.map +1 -1
  121. package/lib/cjs/presentation-hierarchies.d.ts +13 -13
  122. package/lib/cjs/presentation-hierarchies.d.ts.map +1 -1
  123. package/lib/cjs/presentation-hierarchies.js +29 -29
  124. package/lib/cjs/presentation-hierarchies.js.map +1 -1
  125. package/lib/esm/hierarchies/HierarchyErrors.d.ts +1 -1
  126. package/lib/esm/hierarchies/HierarchyErrors.js +1 -1
  127. package/lib/esm/hierarchies/HierarchyErrors.js.map +1 -1
  128. package/lib/esm/hierarchies/HierarchyFiltering.d.ts +12 -11
  129. package/lib/esm/hierarchies/HierarchyFiltering.d.ts.map +1 -1
  130. package/lib/esm/hierarchies/HierarchyFiltering.js +16 -21
  131. package/lib/esm/hierarchies/HierarchyFiltering.js.map +1 -1
  132. package/lib/esm/hierarchies/HierarchyNode.d.ts +10 -10
  133. package/lib/esm/hierarchies/HierarchyNode.d.ts.map +1 -1
  134. package/lib/esm/hierarchies/HierarchyNode.js +3 -3
  135. package/lib/esm/hierarchies/HierarchyNode.js.map +1 -1
  136. package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts +4 -4
  137. package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -1
  138. package/lib/esm/hierarchies/HierarchyNodeIdentifier.js +1 -1
  139. package/lib/esm/hierarchies/HierarchyNodeIdentifier.js.map +1 -1
  140. package/lib/esm/hierarchies/HierarchyNodeKey.d.ts +13 -13
  141. package/lib/esm/hierarchies/HierarchyNodeKey.d.ts.map +1 -1
  142. package/lib/esm/hierarchies/HierarchyNodeKey.js +1 -1
  143. package/lib/esm/hierarchies/HierarchyNodeKey.js.map +1 -1
  144. package/lib/esm/hierarchies/HierarchyProvider.d.ts +6 -6
  145. package/lib/esm/hierarchies/HierarchyProvider.d.ts.map +1 -1
  146. package/lib/esm/hierarchies/HierarchyProvider.js +3 -3
  147. package/lib/esm/hierarchies/HierarchyProvider.js.map +1 -1
  148. package/lib/esm/hierarchies/Logging.d.ts +2 -2
  149. package/lib/esm/hierarchies/Logging.js +3 -3
  150. package/lib/esm/hierarchies/Logging.js.map +1 -1
  151. package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.d.ts +5 -17
  152. package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.d.ts.map +1 -1
  153. package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.js +52 -40
  154. package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.js.map +1 -1
  155. package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts +1 -1
  156. package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts.map +1 -1
  157. package/lib/esm/hierarchies/imodel/HierarchyCache.js +1 -1
  158. package/lib/esm/hierarchies/imodel/HierarchyCache.js.map +1 -1
  159. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts +13 -13
  160. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -1
  161. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.js +1 -1
  162. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -1
  163. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts +23 -23
  164. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -1
  165. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.js +2 -2
  166. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.js.map +1 -1
  167. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts +8 -8
  168. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -1
  169. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js +41 -40
  170. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -1
  171. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts +2 -2
  172. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js +11 -8
  173. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -1
  174. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.d.ts +16 -16
  175. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -1
  176. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js +2 -2
  177. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -1
  178. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts +10 -10
  179. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -1
  180. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js +5 -10
  181. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -1
  182. package/lib/esm/hierarchies/imodel/TreeNodesReader.d.ts +4 -4
  183. package/lib/esm/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -1
  184. package/lib/esm/hierarchies/imodel/TreeNodesReader.js +1 -2
  185. package/lib/esm/hierarchies/imodel/TreeNodesReader.js.map +1 -1
  186. package/lib/esm/hierarchies/imodel/Utils.d.ts +1 -1
  187. package/lib/esm/hierarchies/imodel/Utils.d.ts.map +1 -1
  188. package/lib/esm/hierarchies/imodel/Utils.js +1 -1
  189. package/lib/esm/hierarchies/imodel/Utils.js.map +1 -1
  190. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts +1 -1
  191. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -1
  192. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.js +6 -6
  193. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.js.map +1 -1
  194. package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts +3 -3
  195. package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts.map +1 -1
  196. package/lib/esm/hierarchies/imodel/operators/Grouping.js +22 -22
  197. package/lib/esm/hierarchies/imodel/operators/Grouping.js.map +1 -1
  198. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts +1 -1
  199. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -1
  200. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js +10 -10
  201. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -1
  202. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts +1 -1
  203. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -1
  204. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.js +14 -14
  205. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -1
  206. package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.d.ts +1 -1
  207. package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +1 -1
  208. package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.js +1 -1
  209. package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.js.map +1 -1
  210. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts +3 -3
  211. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -1
  212. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js +2 -2
  213. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -1
  214. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts +3 -3
  215. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -1
  216. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js +1 -1
  217. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -1
  218. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.d.ts +1 -1
  219. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -1
  220. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.js +1 -1
  221. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -1
  222. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts +2 -2
  223. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -1
  224. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.js +1 -1
  225. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -1
  226. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts +3 -3
  227. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -1
  228. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js +9 -14
  229. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -1
  230. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts +2 -2
  231. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -1
  232. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.js.map +1 -1
  233. package/lib/esm/hierarchies/internal/Common.d.ts +1 -1
  234. package/lib/esm/hierarchies/internal/Common.d.ts.map +1 -1
  235. package/lib/esm/hierarchies/internal/Common.js +2 -1
  236. package/lib/esm/hierarchies/internal/Common.js.map +1 -1
  237. package/lib/esm/hierarchies/internal/EachValueFrom.d.ts.map +1 -1
  238. package/lib/esm/hierarchies/internal/EachValueFrom.js +3 -0
  239. package/lib/esm/hierarchies/internal/EachValueFrom.js.map +1 -1
  240. package/lib/esm/hierarchies/internal/LoggingUtils.js +1 -1
  241. package/lib/esm/hierarchies/internal/LoggingUtils.js.map +1 -1
  242. package/lib/esm/hierarchies/internal/operators/Sorting.js +1 -1
  243. package/lib/esm/hierarchies/internal/operators/Sorting.js.map +1 -1
  244. package/lib/esm/presentation-hierarchies.d.ts +13 -13
  245. package/lib/esm/presentation-hierarchies.d.ts.map +1 -1
  246. package/lib/esm/presentation-hierarchies.js +13 -13
  247. package/lib/esm/presentation-hierarchies.js.map +1 -1
  248. package/package.json +21 -13
@@ -1 +1 @@
1
- {"version":3,"file":"IModelHierarchyNode.js","sourceRoot":"","sources":["../../../../src/hierarchies/imodel/IModelHierarchyNode.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAIhG,0DAAyF;AAuNzF,YAAY;AACZ,2DAA2D;AAC3D,IAAiB,sBAAsB,CAatC;AAbD,WAAiB,sBAAsB;IACrC,sDAAsD;IACtD,SAAgB,SAAS,CAAC,IAA4B;QACpD,OAAO,mCAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9C,CAAC;IAFe,gCAAS,YAExB,CAAA;IACD,iEAAiE;IACjE,SAAgB,eAAe,CAAC,IAA4B;QAC1D,OAAO,mCAAgB,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC;IAFe,sCAAe,kBAE9B,CAAA;IACD,uDAAuD;IACvD,SAAgB,cAAc,CAAC,IAA4B;QACzD,OAAO,mCAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/C,CAAC;IAFe,qCAAc,iBAE7B,CAAA;AACH,CAAC,EAbgB,sBAAsB,sCAAtB,sBAAsB,QAatC","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 { ConcatenatedValue, InstanceKey, OmitOverUnion, PrimitiveValue } from \"@itwin/presentation-shared\";\nimport { GroupingHierarchyNode, NonGroupingHierarchyNode } from \"../HierarchyNode\";\nimport { GenericNodeKey, HierarchyNodeKey, InstancesNodeKey } from \"../HierarchyNodeKey\";\n\n/**\n * Base processing parameters that apply to every node.\n * @beta\n */\ninterface HierarchyNodeProcessingParamsBase {\n /** Indicates if this node should be hidden if it has no child nodes. */\n hideIfNoChildren?: boolean;\n /** Indicates that this node should always be hidden and its children should be loaded in its place. */\n hideInHierarchy?: boolean;\n}\n\n/**\n * A data structure for defining nodes' grouping requirements.\n * @beta\n */\ninterface HierarchyNodeGroupingParams {\n byLabel?: HierarchyNodeLabelGroupingParams;\n byClass?: boolean | HierarchyNodeGroupingParamsBase;\n byBaseClasses?: HierarchyNodeBaseClassGroupingParams;\n byProperties?: HierarchyNodePropertiesGroupingParams;\n}\n\n/**\n * A data structure for defining params specifically used for label grouping.\n * @beta\n */\ninterface HierarchyNodeLabelGroupingBaseParams {\n /** Label grouping option that determines whether to group nodes or to merge them. Defaults to \"group\".*/\n action?: \"group\" | \"merge\";\n /** Value that needs to match in order for nodes to be grouped or merged.*/\n groupId?: string;\n}\n\n/**\n * A data structure for defining label merging.\n * @beta\n */\ninterface HierarchyNodeLabelGroupingMergeParams extends HierarchyNodeLabelGroupingBaseParams {\n action: \"merge\";\n}\n\n/**\n * A data structure for defining label grouping with additional parameters.\n * @beta\n */\ninterface HierarchyNodeLabelGroupingGroupParams extends HierarchyNodeLabelGroupingBaseParams, HierarchyNodeGroupingParamsBase {\n action?: \"group\";\n}\n\n/**\n * A data structure for defining possible label grouping types.\n * @beta\n */\nexport type HierarchyNodeLabelGroupingParams = boolean | HierarchyNodeLabelGroupingMergeParams | HierarchyNodeLabelGroupingGroupParams;\n\n/**\n * Grouping parameters that are shared across all types of groupings.\n * @beta\n */\nexport interface HierarchyNodeGroupingParamsBase {\n /** Hiding option that determines whether to hide group nodes which have no siblings at the same hierarchy level. */\n hideIfNoSiblings?: boolean;\n /** Hiding option that determines whether to hide group nodes which have only one node as its children. */\n hideIfOneGroupedNode?: boolean;\n /** Option which auto expands grouping nodes' children when it has single child or always. */\n autoExpand?: HierarchyNodeAutoExpandProp;\n}\n\n/**\n * Defines possible values for `BaseGroupingParams.autoExpand` attribute:\n * - `single-child` - set the grouping node to auto-expand if it groups a single node.\n * - `always` - always set the grouping node to auto-expand.\n * @beta\n */\nexport type HierarchyNodeAutoExpandProp = \"single-child\" | \"always\";\n\n/**\n * A data structure that represents base class grouping.\n * @beta\n */\ninterface HierarchyNodeBaseClassGroupingParams extends HierarchyNodeGroupingParamsBase {\n /**\n * Full names of classes, which should be used to group the node. Only has effect if the node\n * represents an instance of that class.\n *\n * Full class name format: `SchemaName.ClassName`.\n */\n fullClassNames: string[];\n}\n\n/**\n * A data structure that represents properties grouping.\n * @beta\n */\nexport interface HierarchyNodePropertiesGroupingParams extends HierarchyNodeGroupingParamsBase {\n /**\n * Full name of a class whose properties are used to group the node. Only has effect if the node\n * represents an instance of that class.\n *\n * Full class name format: `SchemaName.ClassName`.\n */\n propertiesClassName: string;\n /**\n * Property grouping option that determines whether to group nodes whose grouping value is not set or is set to an empty string.\n *\n * Label of the created grouping node will be `Not Specified`.\n */\n createGroupForUnspecifiedValues?: boolean;\n /**\n * Property grouping option that determines whether to group nodes whose grouping value doesn't fit within any of the provided\n * ranges, or is not a numeric value.\n *\n * Label of the created grouping node will be `Other`.\n */\n createGroupForOutOfRangeValues?: boolean;\n /**\n * Properties of the specified class, by which the nodes should be grouped. Each provided group definition results in a\n * grouping hierarchy level.\n *\n * Example usage:\n * ```ts\n * propertyGroups: [\n * {\n * propertyName: \"type\",\n * propertyValue: \"Wall\"\n * },\n * {\n * propertyName: \"length\",\n * propertyValue: 15,\n * ranges: [\n * { fromValue: 1, toValue: 10, rangeLabel: \"Small\" },\n * { fromValue: 11, toValue: 20, rangeLabel: \"Medium\" }\n * ]\n * },\n * ]\n * ```\n */\n propertyGroups: HierarchyNodePropertyGroup[];\n}\n\n/**\n * A data structure that represents specific properties' grouping params.\n * @beta\n */\nexport interface HierarchyNodePropertyGroup {\n /** A string indicating the name of the property to group by. */\n propertyName: string;\n /** Value of the property, which will be used to group the node. */\n propertyValue?: PrimitiveValue | ConcatenatedValue;\n /** Ranges are used to group nodes by numeric properties which are within specified bounds. */\n ranges?: HierarchyNodePropertyValueRange[];\n}\n\n/**\n * A data structure that represents boundaries for a value.\n * @beta\n */\nexport interface HierarchyNodePropertyValueRange {\n /** Defines the lower bound of the range. */\n fromValue: number;\n /** Defines the upper bound of the range. */\n toValue: number;\n /** Defines the range label. Will be used as `PropertyValueRangeGroupingNode` node's display label. */\n rangeLabel?: string;\n}\n\n/**\n * Processing parameters that apply to instance nodes.\n * @beta\n */\nexport interface InstanceHierarchyNodeProcessingParams extends HierarchyNodeProcessingParamsBase {\n grouping?: HierarchyNodeGroupingParams;\n}\n\n/**\n * A generic (not based on data in an iModel) node that has processing parameters.\n * @beta\n */\nexport type ProcessedGenericHierarchyNode = Omit<NonGroupingHierarchyNode, \"key\" | \"children\"> & {\n key: GenericNodeKey;\n children?: boolean;\n processingParams?: HierarchyNodeProcessingParamsBase;\n};\n\n/**\n * An instances' (based on data in an iModel) node that has processing parameters.\n * @beta\n */\nexport type ProcessedInstanceHierarchyNode = Omit<NonGroupingHierarchyNode, \"key\" | \"children\"> & {\n key: InstancesNodeKey;\n children?: boolean;\n processingParams?: InstanceHierarchyNodeProcessingParams;\n};\n\n/**\n * A grouping node that groups either instance nodes or other grouping nodes.\n * @beta\n */\nexport type ProcessedGroupingHierarchyNode = Omit<GroupingHierarchyNode, \"children\"> & {\n children: Array<ProcessedGroupingHierarchyNode | ProcessedInstanceHierarchyNode>;\n};\n\n/**\n * A `HierarchyNode` that may have processing parameters defining whether it should be hidden under some conditions,\n * how it should be grouped, sorted, etc.\n *\n * Type guards under `HierarchyNode` namespace can be used to differentiate between different sub-types of\n * `ProcessedHierarchyNode`.\n *\n * @beta\n */\nexport type ProcessedHierarchyNode = ProcessedGenericHierarchyNode | ProcessedInstanceHierarchyNode | ProcessedGroupingHierarchyNode;\n\n/** @beta */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace ProcessedHierarchyNode {\n /** Checks whether the given node is a generic node */\n export function isGeneric(node: ProcessedHierarchyNode): node is ProcessedGenericHierarchyNode {\n return HierarchyNodeKey.isGeneric(node.key);\n }\n /** Checks whether the given node is an ECInstances-based node */\n export function isInstancesNode(node: ProcessedHierarchyNode): node is ProcessedInstanceHierarchyNode {\n return HierarchyNodeKey.isInstances(node.key);\n }\n /** Checks whether the given node is a grouping node */\n export function isGroupingNode(node: ProcessedHierarchyNode): node is ProcessedGroupingHierarchyNode {\n return HierarchyNodeKey.isGrouping(node.key);\n }\n}\n\n/**\n * A `ProcessedHierarchyNode` that has an unformatted label in a form of `ConcatenatedValue`. Generally this is\n * returned by hierarchy definitions as a generic node or when the node is just parsed from query results.\n * @beta\n */\nexport type SourceHierarchyNode<TBase = SourceGenericHierarchyNode | SourceInstanceHierarchyNode> = OmitOverUnion<TBase, \"label\" | \"parentKeys\"> & {\n label: string | ConcatenatedValue;\n};\n\n/**\n * A kind of `ProcessedGenericHierarchyNode` that has unformatted label and doesn't know about its ancestors.\n * @beta\n */\nexport type SourceGenericHierarchyNode = SourceHierarchyNode<Omit<ProcessedGenericHierarchyNode, \"key\"> & { key: string }>;\n\n/**\n * A kind of `ProcessedInstanceHierarchyNode` that has unformatted label and doesn't know about its ancestors.\n * @beta\n */\nexport type SourceInstanceHierarchyNode = SourceHierarchyNode<\n Omit<ProcessedInstanceHierarchyNode, \"key\"> & {\n key: Omit<InstancesNodeKey, \"instanceKeys\"> & { instanceKeys: InstanceKey[] };\n }\n>;\n"]}
1
+ {"version":3,"file":"IModelHierarchyNode.js","sourceRoot":"","sources":["../../../../src/hierarchies/imodel/IModelHierarchyNode.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAIhG,gEAA4F;AAuN5F,cAAc;AACd,2DAA2D;AAC3D,IAAiB,sBAAsB,CAatC;AAbD,WAAiB,sBAAsB;IACrC,sDAAsD;IACtD,SAAgB,SAAS,CAAC,IAA4B;QACpD,OAAO,sCAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9C,CAAC;IAFe,gCAAS,YAExB,CAAA;IACD,iEAAiE;IACjE,SAAgB,eAAe,CAAC,IAA4B;QAC1D,OAAO,sCAAgB,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC;IAFe,sCAAe,kBAE9B,CAAA;IACD,uDAAuD;IACvD,SAAgB,cAAc,CAAC,IAA4B;QACzD,OAAO,sCAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/C,CAAC;IAFe,qCAAc,iBAE7B,CAAA;AACH,CAAC,EAbgB,sBAAsB,sCAAtB,sBAAsB,QAatC","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 { ConcatenatedValue, InstanceKey, OmitOverUnion, PrimitiveValue } from \"@itwin/presentation-shared\";\nimport { GroupingHierarchyNode, NonGroupingHierarchyNode } from \"../HierarchyNode.js\";\nimport { GenericNodeKey, HierarchyNodeKey, InstancesNodeKey } from \"../HierarchyNodeKey.js\";\n\n/**\n * Base processing parameters that apply to every node.\n * @public\n */\ninterface HierarchyNodeProcessingParamsBase {\n /** Indicates if this node should be hidden if it has no child nodes. */\n hideIfNoChildren?: boolean;\n /** Indicates that this node should always be hidden and its children should be loaded in its place. */\n hideInHierarchy?: boolean;\n}\n\n/**\n * A data structure for defining nodes' grouping requirements.\n * @public\n */\ninterface HierarchyNodeGroupingParams {\n byLabel?: HierarchyNodeLabelGroupingParams;\n byClass?: boolean | HierarchyNodeGroupingParamsBase;\n byBaseClasses?: HierarchyNodeBaseClassGroupingParams;\n byProperties?: HierarchyNodePropertiesGroupingParams;\n}\n\n/**\n * A data structure for defining params specifically used for label grouping.\n * @public\n */\ninterface HierarchyNodeLabelGroupingBaseParams {\n /** Label grouping option that determines whether to group nodes or to merge them. Defaults to \"group\".*/\n action?: \"group\" | \"merge\";\n /** Value that needs to match in order for nodes to be grouped or merged.*/\n groupId?: string;\n}\n\n/**\n * A data structure for defining label merging.\n * @public\n */\ninterface HierarchyNodeLabelGroupingMergeParams extends HierarchyNodeLabelGroupingBaseParams {\n action: \"merge\";\n}\n\n/**\n * A data structure for defining label grouping with additional parameters.\n * @public\n */\ninterface HierarchyNodeLabelGroupingGroupParams extends HierarchyNodeLabelGroupingBaseParams, HierarchyNodeGroupingParamsBase {\n action?: \"group\";\n}\n\n/**\n * A data structure for defining possible label grouping types.\n * @public\n */\nexport type HierarchyNodeLabelGroupingParams = boolean | HierarchyNodeLabelGroupingMergeParams | HierarchyNodeLabelGroupingGroupParams;\n\n/**\n * Grouping parameters that are shared across all types of groupings.\n * @public\n */\nexport interface HierarchyNodeGroupingParamsBase {\n /** Hiding option that determines whether to hide group nodes which have no siblings at the same hierarchy level. */\n hideIfNoSiblings?: boolean;\n /** Hiding option that determines whether to hide group nodes which have only one node as its children. */\n hideIfOneGroupedNode?: boolean;\n /** Option which auto expands grouping nodes' children when it has single child or always. */\n autoExpand?: HierarchyNodeAutoExpandProp;\n}\n\n/**\n * Defines possible values for `BaseGroupingParams.autoExpand` attribute:\n * - `single-child` - set the grouping node to auto-expand if it groups a single node.\n * - `always` - always set the grouping node to auto-expand.\n * @public\n */\nexport type HierarchyNodeAutoExpandProp = \"single-child\" | \"always\";\n\n/**\n * A data structure that represents base class grouping.\n * @public\n */\ninterface HierarchyNodeBaseClassGroupingParams extends HierarchyNodeGroupingParamsBase {\n /**\n * Full names of classes, which should be used to group the node. Only has effect if the node\n * represents an instance of that class.\n *\n * Full class name format: `SchemaName.ClassName`.\n */\n fullClassNames: string[];\n}\n\n/**\n * A data structure that represents properties grouping.\n * @public\n */\nexport interface HierarchyNodePropertiesGroupingParams extends HierarchyNodeGroupingParamsBase {\n /**\n * Full name of a class whose properties are used to group the node. Only has effect if the node\n * represents an instance of that class.\n *\n * Full class name format: `SchemaName.ClassName`.\n */\n propertiesClassName: string;\n /**\n * Property grouping option that determines whether to group nodes whose grouping value is not set or is set to an empty string.\n *\n * Label of the created grouping node will be `Not Specified`.\n */\n createGroupForUnspecifiedValues?: boolean;\n /**\n * Property grouping option that determines whether to group nodes whose grouping value doesn't fit within any of the provided\n * ranges, or is not a numeric value.\n *\n * Label of the created grouping node will be `Other`.\n */\n createGroupForOutOfRangeValues?: boolean;\n /**\n * Properties of the specified class, by which the nodes should be grouped. Each provided group definition results in a\n * grouping hierarchy level.\n *\n * Example usage:\n * ```ts\n * propertyGroups: [\n * {\n * propertyName: \"type\",\n * propertyValue: \"Wall\"\n * },\n * {\n * propertyName: \"length\",\n * propertyValue: 15,\n * ranges: [\n * { fromValue: 1, toValue: 10, rangeLabel: \"Small\" },\n * { fromValue: 11, toValue: 20, rangeLabel: \"Medium\" }\n * ]\n * },\n * ]\n * ```\n */\n propertyGroups: HierarchyNodePropertyGroup[];\n}\n\n/**\n * A data structure that represents specific properties' grouping params.\n * @public\n */\nexport interface HierarchyNodePropertyGroup {\n /** A string indicating the name of the property to group by. */\n propertyName: string;\n /** Value of the property, which will be used to group the node. */\n propertyValue?: PrimitiveValue | ConcatenatedValue;\n /** Ranges are used to group nodes by numeric properties which are within specified bounds. */\n ranges?: HierarchyNodePropertyValueRange[];\n}\n\n/**\n * A data structure that represents boundaries for a value.\n * @public\n */\nexport interface HierarchyNodePropertyValueRange {\n /** Defines the lower bound of the range. */\n fromValue: number;\n /** Defines the upper bound of the range. */\n toValue: number;\n /** Defines the range label. Will be used as `PropertyValueRangeGroupingNode` node's display label. */\n rangeLabel?: string;\n}\n\n/**\n * Processing parameters that apply to instance nodes.\n * @public\n */\nexport interface InstanceHierarchyNodeProcessingParams extends HierarchyNodeProcessingParamsBase {\n grouping?: HierarchyNodeGroupingParams;\n}\n\n/**\n * A generic (not based on data in an iModel) node that has processing parameters.\n * @public\n */\nexport type ProcessedGenericHierarchyNode = Omit<NonGroupingHierarchyNode, \"key\" | \"children\"> & {\n key: GenericNodeKey;\n children?: boolean;\n processingParams?: HierarchyNodeProcessingParamsBase;\n};\n\n/**\n * An instances' (based on data in an iModel) node that has processing parameters.\n * @public\n */\nexport type ProcessedInstanceHierarchyNode = Omit<NonGroupingHierarchyNode, \"key\" | \"children\"> & {\n key: InstancesNodeKey;\n children?: boolean;\n processingParams?: InstanceHierarchyNodeProcessingParams;\n};\n\n/**\n * A grouping node that groups either instance nodes or other grouping nodes.\n * @public\n */\nexport type ProcessedGroupingHierarchyNode = Omit<GroupingHierarchyNode, \"children\"> & {\n children: Array<ProcessedGroupingHierarchyNode | ProcessedInstanceHierarchyNode>;\n};\n\n/**\n * A `HierarchyNode` that may have processing parameters defining whether it should be hidden under some conditions,\n * how it should be grouped, sorted, etc.\n *\n * Type guards under `HierarchyNode` namespace can be used to differentiate between different sub-types of\n * `ProcessedHierarchyNode`.\n *\n * @public\n */\nexport type ProcessedHierarchyNode = ProcessedGenericHierarchyNode | ProcessedInstanceHierarchyNode | ProcessedGroupingHierarchyNode;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace ProcessedHierarchyNode {\n /** Checks whether the given node is a generic node */\n export function isGeneric(node: ProcessedHierarchyNode): node is ProcessedGenericHierarchyNode {\n return HierarchyNodeKey.isGeneric(node.key);\n }\n /** Checks whether the given node is an ECInstances-based node */\n export function isInstancesNode(node: ProcessedHierarchyNode): node is ProcessedInstanceHierarchyNode {\n return HierarchyNodeKey.isInstances(node.key);\n }\n /** Checks whether the given node is a grouping node */\n export function isGroupingNode(node: ProcessedHierarchyNode): node is ProcessedGroupingHierarchyNode {\n return HierarchyNodeKey.isGrouping(node.key);\n }\n}\n\n/**\n * A `ProcessedHierarchyNode` that has an unformatted label in a form of `ConcatenatedValue`. Generally this is\n * returned by hierarchy definitions as a generic node or when the node is just parsed from query results.\n * @public\n */\nexport type SourceHierarchyNode<TBase = SourceGenericHierarchyNode | SourceInstanceHierarchyNode> = OmitOverUnion<TBase, \"label\" | \"parentKeys\"> & {\n label: string | ConcatenatedValue;\n};\n\n/**\n * A kind of `ProcessedGenericHierarchyNode` that has unformatted label and doesn't know about its ancestors.\n * @public\n */\nexport type SourceGenericHierarchyNode = SourceHierarchyNode<Omit<ProcessedGenericHierarchyNode, \"key\"> & { key: string }>;\n\n/**\n * A kind of `ProcessedInstanceHierarchyNode` that has unformatted label and doesn't know about its ancestors.\n * @public\n */\nexport type SourceInstanceHierarchyNode = SourceHierarchyNode<\n Omit<ProcessedInstanceHierarchyNode, \"key\"> & {\n key: Omit<InstancesNodeKey, \"instanceKeys\"> & { instanceKeys: InstanceKey[] };\n }\n>;\n"]}
@@ -1,11 +1,11 @@
1
1
  import { ECClassHierarchyInspector, ECSchemaProvider, Event, IPrimitiveValueFormatter } from "@itwin/presentation-shared";
2
- import { HierarchyFilteringPath } from "../HierarchyFiltering";
3
- import { HierarchyProvider } from "../HierarchyProvider";
4
- import { HierarchyDefinition } from "./IModelHierarchyDefinition";
5
- import { LimitingECSqlQueryExecutor } from "./LimitingECSqlQueryExecutor";
2
+ import { HierarchyFilteringPath } from "../HierarchyFiltering.js";
3
+ import { HierarchyProvider } from "../HierarchyProvider.js";
4
+ import { HierarchyDefinition } from "./IModelHierarchyDefinition.js";
5
+ import { LimitingECSqlQueryExecutor } from "./LimitingECSqlQueryExecutor.js";
6
6
  /**
7
7
  * Defines the strings used by hierarchy provider.
8
- * @beta
8
+ * @public
9
9
  */
10
10
  interface IModelHierarchyProviderLocalizedStrings {
11
11
  /**
@@ -19,13 +19,13 @@ interface IModelHierarchyProviderLocalizedStrings {
19
19
  */
20
20
  other: string;
21
21
  }
22
- /** @beta */
22
+ /** @public */
23
23
  type IModelAccess = ECSchemaProvider & LimitingECSqlQueryExecutor & ECClassHierarchyInspector & {
24
24
  imodelKey: string;
25
25
  };
26
26
  /**
27
27
  * Props for `createIModelHierarchyProvider`.
28
- * @beta
28
+ * @public
29
29
  */
30
30
  interface IModelHierarchyProviderProps {
31
31
  /**
@@ -68,7 +68,7 @@ interface IModelHierarchyProviderProps {
68
68
  * Creates an instance of `HierarchyProvider` that creates a hierarchy based on given iModel and
69
69
  * a hierarchy definition, which defines each hierarchy level through ECSQL queries.
70
70
  *
71
- * @beta
71
+ * @public
72
72
  */
73
73
  export declare function createIModelHierarchyProvider(props: IModelHierarchyProviderProps): HierarchyProvider & {
74
74
  dispose: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"IModelHierarchyProvider.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/imodel/IModelHierarchyProvider.ts"],"names":[],"mappings":"AA2BA,OAAO,EAGL,yBAAyB,EACzB,gBAAgB,EAGhB,KAAK,EAGL,wBAAwB,EAEzB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAG/D,OAAO,EAA0B,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAiBjF,OAAO,EAA6B,mBAAmB,EAA4B,MAAM,6BAA6B,CAAC;AASvH,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAe1E;;;GAGG;AACH,UAAU,uCAAuC;IAC/C;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,YAAY;AACZ,KAAK,YAAY,GAAG,gBAAgB,GAAG,0BAA0B,GAAG,yBAAyB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtH;;;GAGG;AACH,UAAU,4BAA4B;IACpC;;;;;;OAMG;IACH,YAAY,EAAE,YAAY,CAAC;IAE3B,wFAAwF;IACxF,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC;IAElC;;;OAGG;IACH,mBAAmB,EAAE,mBAAmB,CAAC;IAEzC,qGAAqG;IACrG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,OAAO,CAAC,uCAAuC,CAAC,CAAC;IAEpE;;;;OAIG;IACH,SAAS,CAAC,EAAE,wBAAwB,CAAC;IACrC,yCAAyC;IACzC,SAAS,CAAC,EAAE;QACV,2DAA2D;QAC3D,KAAK,EAAE,sBAAsB,EAAE,CAAC;KACjC,CAAC;CACH;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,4BAA4B,GAAG,iBAAiB,GAAG;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAE9H"}
1
+ {"version":3,"file":"IModelHierarchyProvider.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/imodel/IModelHierarchyProvider.ts"],"names":[],"mappings":"AA2BA,OAAO,EAGL,yBAAyB,EACzB,gBAAgB,EAGhB,KAAK,EAGL,wBAAwB,EAEzB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAA0B,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAiBpF,OAAO,EAA6B,mBAAmB,EAA4B,MAAM,gCAAgC,CAAC;AAS1H,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAe7E;;;GAGG;AACH,UAAU,uCAAuC;IAC/C;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,cAAc;AACd,KAAK,YAAY,GAAG,gBAAgB,GAAG,0BAA0B,GAAG,yBAAyB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtH;;;GAGG;AACH,UAAU,4BAA4B;IACpC;;;;;;OAMG;IACH,YAAY,EAAE,YAAY,CAAC;IAE3B,wFAAwF;IACxF,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC;IAElC;;;OAGG;IACH,mBAAmB,EAAE,mBAAmB,CAAC;IAEzC,qGAAqG;IACrG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,OAAO,CAAC,uCAAuC,CAAC,CAAC;IAEpE;;;;OAIG;IACH,SAAS,CAAC,EAAE,wBAAwB,CAAC;IACrC,yCAAyC;IACzC,SAAS,CAAC,EAAE;QACV,2DAA2D;QAC3D,KAAK,EAAE,sBAAsB,EAAE,CAAC;KACjC,CAAC;CACH;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,4BAA4B,GAAG,iBAAiB,GAAG;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAE9H"}
@@ -8,36 +8,36 @@ exports.createIModelHierarchyProvider = createIModelHierarchyProvider;
8
8
  const rxjs_1 = require("rxjs");
9
9
  const core_bentley_1 = require("@itwin/core-bentley");
10
10
  const presentation_shared_1 = require("@itwin/presentation-shared");
11
- const HierarchyErrors_1 = require("../HierarchyErrors");
12
- const HierarchyNode_1 = require("../HierarchyNode");
13
- const HierarchyNodeKey_1 = require("../HierarchyNodeKey");
14
- const Common_1 = require("../internal/Common");
15
- const EachValueFrom_1 = require("../internal/EachValueFrom");
16
- const LoggingUtils_1 = require("../internal/LoggingUtils");
17
- const Partition_1 = require("../internal/operators/Partition");
18
- const ReduceToMergeMap_1 = require("../internal/operators/ReduceToMergeMap");
19
- const ShareReplayWithErrors_1 = require("../internal/operators/ShareReplayWithErrors");
20
- const Sorting_1 = require("../internal/operators/Sorting");
21
- const SubscriptionScheduler_1 = require("../internal/SubscriptionScheduler");
22
- const FilteringHierarchyDefinition_1 = require("./FilteringHierarchyDefinition");
23
- const HierarchyCache_1 = require("./HierarchyCache");
24
- const IModelHierarchyDefinition_1 = require("./IModelHierarchyDefinition");
25
- const NodeSelectQueryFactory_1 = require("./NodeSelectQueryFactory");
26
- const DetermineChildren_1 = require("./operators/DetermineChildren");
27
- const Grouping_1 = require("./operators/Grouping");
28
- const HideIfNoChildren_1 = require("./operators/HideIfNoChildren");
29
- const HideNodesInHierarchy_1 = require("./operators/HideNodesInHierarchy");
30
- const TreeNodesReader_1 = require("./TreeNodesReader");
31
- const LOGGING_NAMESPACE = `${Common_1.LOGGING_NAMESPACE}.IModelHierarchyProvider`;
32
- const LOGGING_NAMESPACE_INTERNAL = `${Common_1.LOGGING_NAMESPACE_INTERNAL}.IModelHierarchyProvider`;
33
- const LOGGING_NAMESPACE_PERFORMANCE = `${Common_1.LOGGING_NAMESPACE_PERFORMANCE}.IModelHierarchyProvider`;
11
+ const HierarchyErrors_js_1 = require("../HierarchyErrors.js");
12
+ const HierarchyNode_js_1 = require("../HierarchyNode.js");
13
+ const HierarchyNodeKey_js_1 = require("../HierarchyNodeKey.js");
14
+ const Common_js_1 = require("../internal/Common.js");
15
+ const EachValueFrom_js_1 = require("../internal/EachValueFrom.js");
16
+ const LoggingUtils_js_1 = require("../internal/LoggingUtils.js");
17
+ const Partition_js_1 = require("../internal/operators/Partition.js");
18
+ const ReduceToMergeMap_js_1 = require("../internal/operators/ReduceToMergeMap.js");
19
+ const ShareReplayWithErrors_js_1 = require("../internal/operators/ShareReplayWithErrors.js");
20
+ const Sorting_js_1 = require("../internal/operators/Sorting.js");
21
+ const SubscriptionScheduler_js_1 = require("../internal/SubscriptionScheduler.js");
22
+ const FilteringHierarchyDefinition_js_1 = require("./FilteringHierarchyDefinition.js");
23
+ const HierarchyCache_js_1 = require("./HierarchyCache.js");
24
+ const IModelHierarchyDefinition_js_1 = require("./IModelHierarchyDefinition.js");
25
+ const NodeSelectQueryFactory_js_1 = require("./NodeSelectQueryFactory.js");
26
+ const DetermineChildren_js_1 = require("./operators/DetermineChildren.js");
27
+ const Grouping_js_1 = require("./operators/Grouping.js");
28
+ const HideIfNoChildren_js_1 = require("./operators/HideIfNoChildren.js");
29
+ const HideNodesInHierarchy_js_1 = require("./operators/HideNodesInHierarchy.js");
30
+ const TreeNodesReader_js_1 = require("./TreeNodesReader.js");
31
+ const LOGGING_NAMESPACE = `${Common_js_1.LOGGING_NAMESPACE}.IModelHierarchyProvider`;
32
+ const LOGGING_NAMESPACE_INTERNAL = `${Common_js_1.LOGGING_NAMESPACE_INTERNAL}.IModelHierarchyProvider`;
33
+ const LOGGING_NAMESPACE_PERFORMANCE = `${Common_js_1.LOGGING_NAMESPACE_PERFORMANCE}.IModelHierarchyProvider`;
34
34
  const DEFAULT_QUERY_CONCURRENCY = 10;
35
35
  const DEFAULT_QUERY_CACHE_SIZE = 1;
36
36
  /**
37
37
  * Creates an instance of `HierarchyProvider` that creates a hierarchy based on given iModel and
38
38
  * a hierarchy definition, which defines each hierarchy level through ECSQL queries.
39
39
  *
40
- * @beta
40
+ * @public
41
41
  */
42
42
  function createIModelHierarchyProvider(props) {
43
43
  return new IModelHierarchyProviderImpl(props);
@@ -59,11 +59,11 @@ class IModelHierarchyProviderImpl {
59
59
  this._activeHierarchyDefinition = this._sourceHierarchyDefinition = props.hierarchyDefinition;
60
60
  this._valuesFormatter = props?.formatter ?? (0, presentation_shared_1.createDefaultValueFormatter)();
61
61
  this._localizedStrings = { other: "Other", unspecified: "Not specified", ...props?.localizedStrings };
62
- this._queryScheduler = new SubscriptionScheduler_1.SubscriptionScheduler(props.queryConcurrency ?? DEFAULT_QUERY_CONCURRENCY);
62
+ this._queryScheduler = new SubscriptionScheduler_js_1.SubscriptionScheduler(props.queryConcurrency ?? DEFAULT_QUERY_CONCURRENCY);
63
63
  this.setHierarchyFilter(props.filtering);
64
64
  const queryCacheSize = props.queryCacheSize ?? DEFAULT_QUERY_CACHE_SIZE;
65
65
  if (queryCacheSize !== 0) {
66
- this._nodesCache = new HierarchyCache_1.HierarchyCache({
66
+ this._nodesCache = new HierarchyCache_js_1.HierarchyCache({
67
67
  // we divide the size by 2, because each variation also counts as a query that we cache
68
68
  size: Math.ceil(queryCacheSize / 2),
69
69
  variationsCount: 1,
@@ -82,9 +82,9 @@ class IModelHierarchyProviderImpl {
82
82
  return this._imodelChanged;
83
83
  }
84
84
  invalidateHierarchyCache(reason) {
85
- (0, LoggingUtils_1.doLog)({
85
+ (0, LoggingUtils_js_1.doLog)({
86
86
  category: `${LOGGING_NAMESPACE}.Events`,
87
- message: /* istanbul ignore next */ () => (reason ? `${reason}: clear hierarchy cache` : `Clear hierarchy cache`),
87
+ message: /* c8 ignore next */ () => (reason ? `${reason}: clear hierarchy cache` : `Clear hierarchy cache`),
88
88
  });
89
89
  this._nodesCache?.clear();
90
90
  }
@@ -103,7 +103,7 @@ class IModelHierarchyProviderImpl {
103
103
  }
104
104
  return;
105
105
  }
106
- this._activeHierarchyDefinition = new FilteringHierarchyDefinition_1.FilteringHierarchyDefinition({
106
+ this._activeHierarchyDefinition = new FilteringHierarchyDefinition_js_1.FilteringHierarchyDefinition({
107
107
  imodelAccess: this._imodelAccess,
108
108
  source: this._sourceHierarchyDefinition,
109
109
  nodeIdentifierPaths: props.paths,
@@ -116,16 +116,16 @@ class IModelHierarchyProviderImpl {
116
116
  }
117
117
  createHierarchyLevelDefinitionsObservable(props) {
118
118
  const { requestContext, ...defineHierarchyLevelProps } = props;
119
- (0, LoggingUtils_1.doLog)({
119
+ (0, LoggingUtils_js_1.doLog)({
120
120
  category: LOGGING_NAMESPACE_PERFORMANCE,
121
- message: /* istanbul ignore next */ () => `[${requestContext.requestId}] Requesting hierarchy level definitions for ${(0, Common_1.createNodeIdentifierForLogging)(props.parentNode)}`,
121
+ message: /* c8 ignore next */ () => `[${requestContext.requestId}] Requesting hierarchy level definitions for ${(0, Common_js_1.createNodeIdentifierForLogging)(props.parentNode)}`,
122
122
  });
123
123
  return (0, rxjs_1.from)((0, rxjs_1.defer)(async () => {
124
124
  let parentNode = props.parentNode;
125
- if (parentNode && HierarchyNode_1.HierarchyNode.isGeneric(parentNode) && parentNode.key.source && parentNode.key.source !== this._imodelAccess.imodelKey) {
125
+ if (parentNode && HierarchyNode_js_1.HierarchyNode.isGeneric(parentNode) && parentNode.key.source && parentNode.key.source !== this._imodelAccess.imodelKey) {
126
126
  return [];
127
127
  }
128
- if (parentNode && HierarchyNode_1.HierarchyNode.isInstancesNode(parentNode)) {
128
+ if (parentNode && HierarchyNode_js_1.HierarchyNode.isInstancesNode(parentNode)) {
129
129
  parentNode = {
130
130
  ...parentNode,
131
131
  key: {
@@ -133,24 +133,24 @@ class IModelHierarchyProviderImpl {
133
133
  instanceKeys: parentNode.key.instanceKeys.filter((ik) => !ik.imodelKey || ik.imodelKey === this._imodelAccess.imodelKey),
134
134
  },
135
135
  };
136
- (0, core_bentley_1.assert)(HierarchyNodeKey_1.HierarchyNodeKey.isInstances(parentNode.key));
136
+ (0, core_bentley_1.assert)(HierarchyNodeKey_js_1.HierarchyNodeKey.isInstances(parentNode.key));
137
137
  if (parentNode.key.instanceKeys.length === 0) {
138
138
  return [];
139
139
  }
140
140
  }
141
141
  return this._activeHierarchyDefinition.defineHierarchyLevel({ ...defineHierarchyLevelProps, parentNode });
142
- })).pipe((0, rxjs_1.mergeAll)(), (0, rxjs_1.finalize)(() => (0, LoggingUtils_1.doLog)({
142
+ })).pipe((0, rxjs_1.mergeAll)(), (0, rxjs_1.finalize)(() => (0, LoggingUtils_js_1.doLog)({
143
143
  category: LOGGING_NAMESPACE_PERFORMANCE,
144
- message: /* istanbul ignore next */ () => `[${requestContext.requestId}] Received all hierarchy level definitions for ${(0, Common_1.createNodeIdentifierForLogging)(props.parentNode)}`,
144
+ message: /* c8 ignore next */ () => `[${requestContext.requestId}] Received all hierarchy level definitions for ${(0, Common_js_1.createNodeIdentifierForLogging)(props.parentNode)}`,
145
145
  })));
146
146
  }
147
147
  createSourceNodesObservable(props) {
148
148
  // pipe definitions to nodes and put "share replay" on it
149
149
  return this.createHierarchyLevelDefinitionsObservable(props).pipe((0, rxjs_1.mergeMap)((def) => {
150
- if (IModelHierarchyDefinition_1.HierarchyNodesDefinition.isGenericNode(def)) {
150
+ if (IModelHierarchyDefinition_js_1.HierarchyNodesDefinition.isGenericNode(def)) {
151
151
  return (0, rxjs_1.of)({ ...def.node, key: { type: "generic", id: def.node.key, source: this._imodelAccess.imodelKey } });
152
152
  }
153
- return this._queryScheduler.scheduleSubscription((0, rxjs_1.of)(def.query).pipe((0, rxjs_1.map)((query) => filterQueryByInstanceKeys(query, props.filteredInstanceKeys)), (0, rxjs_1.mergeMap)((query) => (0, TreeNodesReader_1.readNodes)({
153
+ return this._queryScheduler.scheduleSubscription((0, rxjs_1.of)(def.query).pipe((0, rxjs_1.map)((query) => filterQueryByInstanceKeys(query, props.filteredInstanceKeys)), (0, rxjs_1.mergeMap)((query) => (0, TreeNodesReader_js_1.readNodes)({
154
154
  queryExecutor: this._imodelAccess,
155
155
  query,
156
156
  limit: props.hierarchyLevelSizeLimit,
@@ -161,10 +161,10 @@ class IModelHierarchyProviderImpl {
161
161
  ...node,
162
162
  key: { ...node.key, instanceKeys: node.key.instanceKeys.map((key) => ({ ...key, imodelKey: this._imodelAccess.imodelKey })) },
163
163
  }))));
164
- }), (0, rxjs_1.finalize)(() => (0, LoggingUtils_1.doLog)({
164
+ }), (0, rxjs_1.finalize)(() => (0, LoggingUtils_js_1.doLog)({
165
165
  category: LOGGING_NAMESPACE_PERFORMANCE,
166
- message: /* istanbul ignore next */ () => `[${props.requestContext.requestId}] Read all child nodes ${(0, Common_1.createNodeIdentifierForLogging)(props.parentNode)}`,
167
- })), (0, ShareReplayWithErrors_1.shareReplayWithErrors)());
166
+ message: /* c8 ignore next */ () => `[${props.requestContext.requestId}] Read all child nodes ${(0, Common_js_1.createNodeIdentifierForLogging)(props.parentNode)}`,
167
+ })), (0, ShareReplayWithErrors_js_1.shareReplayWithErrors)());
168
168
  }
169
169
  createPreProcessedNodesObservable(queryNodesObservable, props) {
170
170
  return queryNodesObservable.pipe(
@@ -177,57 +177,56 @@ class IModelHierarchyProviderImpl {
177
177
  // we have `ProcessedHierarchyNode` from here
178
178
  preProcessNodes(this._activeHierarchyDefinition),
179
179
  // process hiding
180
- (0, HideIfNoChildren_1.createHideIfNoChildrenOperator)((n) => this.getChildNodesObservables({ parentNode: n, requestContext: props.requestContext }).hasNodes), (0, HideNodesInHierarchy_1.createHideNodesInHierarchyOperator)(
180
+ (0, HideIfNoChildren_js_1.createHideIfNoChildrenOperator)((n) => this.getChildNodesObservables({ parentNode: n, requestContext: props.requestContext }).hasNodes), (0, HideNodesInHierarchy_js_1.createHideNodesInHierarchyOperator)(
181
181
  // note: for child nodes created because of hidden parent, we want to use parent's request props (instance filter, limit)
182
- (n) => this.getChildNodesObservables({ ...props, parentNode: n }).processedNodes, false), (0, rxjs_1.finalize)(() => (0, LoggingUtils_1.doLog)({
182
+ (n) => this.getChildNodesObservables({ ...props, parentNode: n }).processedNodes, false), (0, rxjs_1.finalize)(() => (0, LoggingUtils_js_1.doLog)({
183
183
  category: LOGGING_NAMESPACE_PERFORMANCE,
184
- message: /* istanbul ignore next */ () => `[${props.requestContext.requestId}] Finished pre-processing child nodes for ${(0, Common_1.createNodeIdentifierForLogging)(props.parentNode)}`,
184
+ message: /* c8 ignore next */ () => `[${props.requestContext.requestId}] Finished pre-processing child nodes for ${(0, Common_js_1.createNodeIdentifierForLogging)(props.parentNode)}`,
185
185
  })));
186
186
  }
187
187
  createProcessedNodesObservable(preprocessedNodesObservable, props) {
188
- return preprocessedNodesObservable.pipe((0, Grouping_1.createGroupingOperator)(this._imodelAccess, props.parentNode, this._valuesFormatter, this._localizedStrings, (gn) => this.onGroupingNodeCreated(gn, props)), (0, rxjs_1.finalize)(() => (0, LoggingUtils_1.doLog)({
188
+ return preprocessedNodesObservable.pipe((0, Grouping_js_1.createGroupingOperator)(this._imodelAccess, props.parentNode, this._valuesFormatter, this._localizedStrings, (gn) => this.onGroupingNodeCreated(gn, props)), (0, rxjs_1.finalize)(() => (0, LoggingUtils_js_1.doLog)({
189
189
  category: LOGGING_NAMESPACE_PERFORMANCE,
190
- message: /* istanbul ignore next */ () => `[${props.requestContext.requestId}] Finished grouping child nodes for ${(0, Common_1.createNodeIdentifierForLogging)(props.parentNode)}`,
190
+ message: /* c8 ignore next */ () => `[${props.requestContext.requestId}] Finished grouping child nodes for ${(0, Common_js_1.createNodeIdentifierForLogging)(props.parentNode)}`,
191
191
  })));
192
192
  }
193
193
  createFinalizedNodesObservable(processedNodesObservable, props) {
194
- return processedNodesObservable.pipe((0, DetermineChildren_1.createDetermineChildrenOperator)((n) => this.getChildNodesObservables({ parentNode: n, requestContext: props.requestContext }).hasNodes), postProcessNodes(this._activeHierarchyDefinition), Sorting_1.sortNodesByLabelOperator, (0, rxjs_1.map)((n) => {
194
+ return processedNodesObservable.pipe((0, DetermineChildren_js_1.createDetermineChildrenOperator)((n) => this.getChildNodesObservables({ parentNode: n, requestContext: props.requestContext }).hasNodes), postProcessNodes(this._activeHierarchyDefinition), Sorting_js_1.sortNodesByLabelOperator, (0, rxjs_1.map)((n) => {
195
195
  if ("processingParams" in n) {
196
196
  delete n.processingParams;
197
197
  }
198
198
  return Object.assign(n, {
199
- children: (0, Common_1.hasChildren)(n),
199
+ children: (0, Common_js_1.hasChildren)(n),
200
200
  });
201
- }), (0, rxjs_1.takeUntil)(this._dispose), (0, rxjs_1.finalize)(() => (0, LoggingUtils_1.doLog)({
201
+ }), (0, rxjs_1.takeUntil)(this._dispose), (0, rxjs_1.finalize)(() => (0, LoggingUtils_js_1.doLog)({
202
202
  category: LOGGING_NAMESPACE_PERFORMANCE,
203
- message: /* istanbul ignore next */ () => `[${props.requestContext.requestId}] Finished finalizing child nodes for ${(0, Common_1.createNodeIdentifierForLogging)(props.parentNode)}`,
203
+ message: /* c8 ignore next */ () => `[${props.requestContext.requestId}] Finished finalizing child nodes for ${(0, Common_js_1.createNodeIdentifierForLogging)(props.parentNode)}`,
204
204
  })));
205
205
  }
206
206
  createHasNodesObservable(preprocessedNodesObservable, possiblyKnownChildrenObservable, props) {
207
207
  const loggingCategory = `${LOGGING_NAMESPACE_INTERNAL}.HasNodes`;
208
- return (0, rxjs_1.concat)((possiblyKnownChildrenObservable ?? rxjs_1.EMPTY).pipe((0, rxjs_1.filter)((n) => (0, Common_1.hasChildren)(n))), preprocessedNodesObservable).pipe((0, LoggingUtils_1.log)({
208
+ return (0, rxjs_1.concat)((possiblyKnownChildrenObservable ?? rxjs_1.EMPTY).pipe((0, rxjs_1.filter)((n) => (0, Common_js_1.hasChildren)(n))), preprocessedNodesObservable).pipe((0, LoggingUtils_js_1.log)({
209
209
  category: loggingCategory,
210
- message: /* istanbul ignore next */ (n) => `[${props.requestContext.requestId}] Node before mapping to 'true': ${(0, Common_1.createNodeIdentifierForLogging)(n)}`,
210
+ message: /* c8 ignore next */ (n) => `[${props.requestContext.requestId}] Node before mapping to 'true': ${(0, Common_js_1.createNodeIdentifierForLogging)(n)}`,
211
211
  }), (0, rxjs_1.take)(1), (0, rxjs_1.map)(() => true), (0, rxjs_1.defaultIfEmpty)(false), (0, rxjs_1.catchError)((e) => {
212
- (0, LoggingUtils_1.doLog)({
212
+ (0, LoggingUtils_js_1.doLog)({
213
213
  category: loggingCategory,
214
- message: /* istanbul ignore next */ () => `[${props.requestContext.requestId}] Error while determining children: ${e.message}`,
214
+ message: /* c8 ignore next */ () => `[${props.requestContext.requestId}] Error while determining children: ${e.message}`,
215
215
  });
216
- if (e instanceof HierarchyErrors_1.RowsLimitExceededError) {
216
+ if (e instanceof HierarchyErrors_js_1.RowsLimitExceededError) {
217
217
  return (0, rxjs_1.of)(true);
218
218
  }
219
219
  throw e;
220
- }), (0, LoggingUtils_1.log)({ category: loggingCategory, message: /* istanbul ignore next */ (r) => `[${props.requestContext.requestId}] Result: ${r}` }));
220
+ }), (0, LoggingUtils_js_1.log)({ category: loggingCategory, message: /* c8 ignore next */ (r) => `[${props.requestContext.requestId}] Result: ${r}` }));
221
221
  }
222
222
  getCachedObservableEntry(props) {
223
223
  const loggingCategory = `${LOGGING_NAMESPACE}.QueryResultsCache`;
224
224
  const { parentNode, ...restProps } = props;
225
225
  const cached = props.ignoreCache || !this._nodesCache ? undefined : this._nodesCache.get(props);
226
226
  if (cached) {
227
- // istanbul ignore next
228
- (0, LoggingUtils_1.doLog)({
227
+ (0, LoggingUtils_js_1.doLog)({
229
228
  category: loggingCategory,
230
- message: /* istanbul ignore next */ () => `[${props.requestContext.requestId}] Found query nodes observable for ${(0, Common_1.createNodeIdentifierForLogging)(parentNode)}`,
229
+ message: /* c8 ignore next */ () => `[${props.requestContext.requestId}] Found query nodes observable for ${(0, Common_js_1.createNodeIdentifierForLogging)(parentNode)}`,
231
230
  });
232
231
  return cached;
233
232
  }
@@ -236,13 +235,13 @@ class IModelHierarchyProviderImpl {
236
235
  let filteredInstanceKeys;
237
236
  let parentNonGroupingNode;
238
237
  if (parentNode) {
239
- if (HierarchyNode_1.HierarchyNode.isGroupingNode(parentNode)) {
238
+ if (HierarchyNode_js_1.HierarchyNode.isGroupingNode(parentNode)) {
240
239
  parentNonGroupingNode = parentNode.nonGroupingAncestor;
241
240
  filteredInstanceKeys = parentNode.groupedInstanceKeys;
242
241
  }
243
242
  else {
244
243
  // not sure why type checker doesn't pick this up
245
- (0, core_bentley_1.assert)(HierarchyNode_1.HierarchyNode.isGeneric(parentNode) || HierarchyNode_1.HierarchyNode.isInstancesNode(parentNode));
244
+ (0, core_bentley_1.assert)(HierarchyNode_js_1.HierarchyNode.isGeneric(parentNode) || HierarchyNode_js_1.HierarchyNode.isInstancesNode(parentNode));
246
245
  parentNonGroupingNode = parentNode;
247
246
  }
248
247
  }
@@ -253,9 +252,9 @@ class IModelHierarchyProviderImpl {
253
252
  };
254
253
  const value = { observable: this.createSourceNodesObservable(nonGroupingNodeChildrenRequestProps), processingStatus: "none" };
255
254
  this._nodesCache?.set(nonGroupingNodeChildrenRequestProps, value);
256
- (0, LoggingUtils_1.doLog)({
255
+ (0, LoggingUtils_js_1.doLog)({
257
256
  category: loggingCategory,
258
- message: /* istanbul ignore next */ () => `[${props.requestContext.requestId}] Saved query nodes observable for ${(0, Common_1.createNodeIdentifierForLogging)(parentNode)}`,
257
+ message: /* c8 ignore next */ () => `[${props.requestContext.requestId}] Saved query nodes observable for ${(0, Common_js_1.createNodeIdentifierForLogging)(parentNode)}`,
259
258
  });
260
259
  return value;
261
260
  }
@@ -290,38 +289,39 @@ class IModelHierarchyProviderImpl {
290
289
  const timer = new core_bentley_1.StopWatch(undefined, true);
291
290
  let error;
292
291
  let nodesCount = 0;
293
- (0, LoggingUtils_1.doLog)({
292
+ (0, LoggingUtils_js_1.doLog)({
294
293
  category: loggingCategory,
295
- message: /* istanbul ignore next */ () => `[${requestContext.requestId}] Requesting child nodes for ${(0, Common_1.createNodeIdentifierForLogging)(props.parentNode)}`,
294
+ message: /* c8 ignore next */ () => `[${requestContext.requestId}] Requesting child nodes for ${(0, Common_js_1.createNodeIdentifierForLogging)(props.parentNode)}`,
296
295
  });
297
- return (0, EachValueFrom_1.eachValueFrom)(this.getChildNodesObservables({ ...props, requestContext }).finalizedNodes.pipe((0, rxjs_1.tap)(() => ++nodesCount), (0, rxjs_1.catchError)((e) => {
296
+ return (0, EachValueFrom_js_1.eachValueFrom)(this.getChildNodesObservables({ ...props, requestContext }).finalizedNodes.pipe((0, rxjs_1.tap)(() => ++nodesCount), (0, rxjs_1.catchError)((e) => {
298
297
  error = e;
299
298
  throw e;
300
299
  }), (0, rxjs_1.finalize)(() => {
301
- (0, LoggingUtils_1.doLog)({
300
+ (0, LoggingUtils_js_1.doLog)({
302
301
  category: loggingCategory,
303
- message: /* istanbul ignore next */ () => error
304
- ? `[${requestContext.requestId}] Error creating child nodes for ${(0, Common_1.createNodeIdentifierForLogging)(props.parentNode)}: ${error instanceof Error ? error.message : error.toString()}`
305
- : `[${requestContext.requestId}] Returned ${nodesCount} child nodes for ${(0, Common_1.createNodeIdentifierForLogging)(props.parentNode)} in ${timer.currentSeconds.toFixed(2)} s.`,
302
+ message: /* c8 ignore next */ () =>
303
+ /* c8 ignore next 3 */ error
304
+ ? `[${requestContext.requestId}] Error creating child nodes for ${(0, Common_js_1.createNodeIdentifierForLogging)(props.parentNode)}: ${error instanceof Error ? error.message : error.toString()}`
305
+ : `[${requestContext.requestId}] Returned ${nodesCount} child nodes for ${(0, Common_js_1.createNodeIdentifierForLogging)(props.parentNode)} in ${timer.currentSeconds.toFixed(2)} s.`,
306
306
  });
307
307
  })));
308
308
  }
309
309
  getNodeInstanceKeysObs(props) {
310
310
  const { parentNode, instanceFilter, hierarchyLevelSizeLimit = "unbounded", requestContext } = props;
311
- if (parentNode && HierarchyNode_1.HierarchyNode.isGroupingNode(parentNode)) {
311
+ if (parentNode && HierarchyNode_js_1.HierarchyNode.isGroupingNode(parentNode)) {
312
312
  return (0, rxjs_1.from)(parentNode.groupedInstanceKeys);
313
313
  }
314
- (0, core_bentley_1.assert)(!parentNode || HierarchyNode_1.HierarchyNode.isGeneric(parentNode) || HierarchyNode_1.HierarchyNode.isInstancesNode(parentNode));
314
+ (0, core_bentley_1.assert)(!parentNode || HierarchyNode_js_1.HierarchyNode.isGeneric(parentNode) || HierarchyNode_js_1.HierarchyNode.isInstancesNode(parentNode));
315
315
  const hierarchyLevelDefinitions = this.createHierarchyLevelDefinitionsObservable({ parentNode, instanceFilter, requestContext });
316
316
  // split the definitions based on whether they're for generic nodes or for instance nodes
317
- const [genericDefs, instanceDefs] = (0, Partition_1.partition)(hierarchyLevelDefinitions, IModelHierarchyDefinition_1.HierarchyNodesDefinition.isGenericNode);
317
+ const [genericDefs, instanceDefs] = (0, Partition_js_1.partition)(hierarchyLevelDefinitions, IModelHierarchyDefinition_js_1.HierarchyNodesDefinition.isGenericNode);
318
318
  // query instance keys and a flag whether they should be hidden
319
319
  const instanceKeys = instanceDefs.pipe((0, rxjs_1.mergeMap)((def) => this._queryScheduler.scheduleSubscription((0, rxjs_1.of)(def.query).pipe((0, rxjs_1.mergeMap)(async (query) => {
320
320
  const ecsql = `
321
321
  SELECT
322
- ${NodeSelectQueryFactory_1.NodeSelectClauseColumnNames.FullClassName},
323
- ${NodeSelectQueryFactory_1.NodeSelectClauseColumnNames.ECInstanceId},
324
- ${NodeSelectQueryFactory_1.NodeSelectClauseColumnNames.HideNodeInHierarchy}
322
+ ${NodeSelectQueryFactory_js_1.NodeSelectClauseColumnNames.FullClassName},
323
+ ${NodeSelectQueryFactory_js_1.NodeSelectClauseColumnNames.ECInstanceId},
324
+ ${NodeSelectQueryFactory_js_1.NodeSelectClauseColumnNames.HideNodeInHierarchy}
325
325
  FROM (
326
326
  ${query.ecsql}
327
327
  )
@@ -337,7 +337,7 @@ class IModelHierarchyProviderImpl {
337
337
  })));
338
338
  }), (0, rxjs_1.mergeAll)()))));
339
339
  // split the instance keys observable based on whether they should be hidden or not
340
- const [visibleNodeInstanceKeys, hiddenNodeInstanceKeys] = (0, Partition_1.partition)(instanceKeys, ({ hide }) => !hide);
340
+ const [visibleNodeInstanceKeys, hiddenNodeInstanceKeys] = (0, Partition_js_1.partition)(instanceKeys, ({ hide }) => !hide);
341
341
  // hidden items' handling:
342
342
  // - if a generic node is hidden, we'll want to retrieve instance keys of its children, otherwise we don't care about it,
343
343
  // - if an instance key is hidden, we want to create a merged node similar to what we do in `createHideNodesInHierarchyOperator`
@@ -347,7 +347,7 @@ class IModelHierarchyProviderImpl {
347
347
  source: this._imodelAccess.imodelKey,
348
348
  }))), hiddenNodeInstanceKeys.pipe(
349
349
  // first merge all keys by class
350
- (0, ReduceToMergeMap_1.reduceToMergeMapList)(({ key }) => key.className, ({ key }) => key.id),
350
+ (0, ReduceToMergeMap_js_1.reduceToMergeMapList)(({ key }) => key.className, ({ key }) => key.id),
351
351
  // then, for each class, create an instance key
352
352
  (0, rxjs_1.mergeMap)((mergedMap) => [...mergedMap.entries()].map(([className, ids]) => ({
353
353
  type: "instances",
@@ -368,21 +368,22 @@ class IModelHierarchyProviderImpl {
368
368
  const requestContext = { requestId: core_bentley_1.Guid.createValue() };
369
369
  const loggingCategory = `${LOGGING_NAMESPACE}.GetNodeInstanceKeys`;
370
370
  const timer = new core_bentley_1.StopWatch(undefined, true);
371
- (0, LoggingUtils_1.doLog)({
371
+ (0, LoggingUtils_js_1.doLog)({
372
372
  category: loggingCategory,
373
- message: /* istanbul ignore next */ () => `[${requestContext.requestId}] Requesting keys for ${(0, Common_1.createNodeIdentifierForLogging)(props.parentNode)}`,
373
+ message: /* c8 ignore next */ () => `[${requestContext.requestId}] Requesting keys for ${(0, Common_js_1.createNodeIdentifierForLogging)(props.parentNode)}`,
374
374
  });
375
375
  let error;
376
376
  let keysCount = 0;
377
- return (0, EachValueFrom_1.eachValueFrom)(this.getNodeInstanceKeysObs({ ...props, requestContext }).pipe((0, rxjs_1.tap)(() => ++keysCount), (0, rxjs_1.catchError)((e) => {
377
+ return (0, EachValueFrom_js_1.eachValueFrom)(this.getNodeInstanceKeysObs({ ...props, requestContext }).pipe((0, rxjs_1.tap)(() => ++keysCount), (0, rxjs_1.catchError)((e) => {
378
378
  error = e;
379
379
  throw e;
380
380
  }), (0, rxjs_1.finalize)(() => {
381
- (0, LoggingUtils_1.doLog)({
381
+ (0, LoggingUtils_js_1.doLog)({
382
382
  category: loggingCategory,
383
- message: /* istanbul ignore next */ () => error
384
- ? `[${requestContext.requestId}] Error creating node instance keys for ${(0, Common_1.createNodeIdentifierForLogging)(props.parentNode)}: ${error instanceof Error ? error.message : error.toString()}`
385
- : `[${requestContext.requestId}] Returned ${keysCount} instance keys for ${(0, Common_1.createNodeIdentifierForLogging)(props.parentNode)} in ${timer.currentSeconds.toFixed(2)} s.`,
383
+ message: /* c8 ignore next */ () =>
384
+ /* c8 ignore next 3 */ error
385
+ ? `[${requestContext.requestId}] Error creating node instance keys for ${(0, Common_js_1.createNodeIdentifierForLogging)(props.parentNode)}: ${error instanceof Error ? error.message : error.toString()}`
386
+ : `[${requestContext.requestId}] Returned ${keysCount} instance keys for ${(0, Common_js_1.createNodeIdentifierForLogging)(props.parentNode)} in ${timer.currentSeconds.toFixed(2)} s.`,
386
387
  });
387
388
  })));
388
389
  }
@@ -420,7 +421,6 @@ function filterQueryByInstanceKeys(query, filteredInstanceKeys) {
420
421
  return query;
421
422
  }
422
423
  const MAX_ALLOWED_BINDINGS = 1000;
423
- // istanbul ignore else
424
424
  if (filteredInstanceKeys.length < MAX_ALLOWED_BINDINGS) {
425
425
  return {
426
426
  ...query,
@@ -432,7 +432,7 @@ function filterQueryByInstanceKeys(query, filteredInstanceKeys) {
432
432
  bindings: [...(query.bindings ?? []), ...filteredInstanceKeys.map((k) => ({ type: "id", value: k.id }))],
433
433
  };
434
434
  }
435
- // istanbul ignore next
435
+ /* c8 ignore start */
436
436
  return {
437
437
  ...query,
438
438
  ecsql: `
@@ -442,5 +442,6 @@ function filterQueryByInstanceKeys(query, filteredInstanceKeys) {
442
442
  `,
443
443
  bindings: [...(query.bindings ?? []), { type: "idset", value: filteredInstanceKeys.map((k) => k.id) }],
444
444
  };
445
+ /* c8 ignore end */
445
446
  }
446
447
  //# sourceMappingURL=IModelHierarchyProvider.js.map