@itwin/presentation-hierarchies 2.0.0-alpha.16 → 2.0.0-alpha.17

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 (422) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/lib/hierarchies/HierarchyErrors.d.ts.map +1 -0
  3. package/lib/hierarchies/HierarchyErrors.js.map +1 -0
  4. package/lib/hierarchies/HierarchyMerge.d.ts.map +1 -0
  5. package/lib/hierarchies/HierarchyMerge.js.map +1 -0
  6. package/lib/hierarchies/HierarchyNode.d.ts.map +1 -0
  7. package/lib/hierarchies/HierarchyNode.js.map +1 -0
  8. package/lib/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -0
  9. package/lib/hierarchies/HierarchyNodeIdentifier.js.map +1 -0
  10. package/lib/{esm/hierarchies → hierarchies}/HierarchyNodeKey.d.ts +4 -4
  11. package/lib/hierarchies/HierarchyNodeKey.d.ts.map +1 -0
  12. package/lib/{esm/hierarchies → hierarchies}/HierarchyNodeKey.js +5 -5
  13. package/lib/hierarchies/HierarchyNodeKey.js.map +1 -0
  14. package/lib/hierarchies/HierarchyProvider.d.ts.map +1 -0
  15. package/lib/hierarchies/HierarchyProvider.js.map +1 -0
  16. package/lib/hierarchies/HierarchySearch.d.ts.map +1 -0
  17. package/lib/hierarchies/HierarchySearch.js.map +1 -0
  18. package/lib/hierarchies/Logging.d.ts.map +1 -0
  19. package/lib/hierarchies/Logging.js.map +1 -0
  20. package/lib/hierarchies/imodel/HierarchyCache.d.ts.map +1 -0
  21. package/lib/hierarchies/imodel/HierarchyCache.js.map +1 -0
  22. package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyDefinition.d.ts +1 -1
  23. package/lib/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -0
  24. package/lib/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -0
  25. package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyNode.d.ts +2 -2
  26. package/lib/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -0
  27. package/lib/hierarchies/imodel/IModelHierarchyNode.js.map +1 -0
  28. package/lib/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -0
  29. package/lib/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -0
  30. package/lib/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -0
  31. package/lib/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -0
  32. package/lib/{esm/hierarchies → hierarchies}/imodel/NodeSelectQueryFactory.d.ts +4 -4
  33. package/lib/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -0
  34. package/lib/{esm/hierarchies → hierarchies}/imodel/NodeSelectQueryFactory.js +5 -5
  35. package/lib/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -0
  36. package/lib/{esm/hierarchies → hierarchies}/imodel/PredicateBasedHierarchyDefinition.d.ts +2 -2
  37. package/lib/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -0
  38. package/lib/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -0
  39. package/lib/hierarchies/imodel/SearchHierarchyDefinition.d.ts.map +1 -0
  40. package/lib/{esm/hierarchies → hierarchies}/imodel/SearchHierarchyDefinition.js +3 -4
  41. package/lib/hierarchies/imodel/SearchHierarchyDefinition.js.map +1 -0
  42. package/lib/{esm/hierarchies → hierarchies}/imodel/TreeNodesReader.d.ts +1 -1
  43. package/lib/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -0
  44. package/lib/{esm/hierarchies → hierarchies}/imodel/TreeNodesReader.js +2 -5
  45. package/lib/hierarchies/imodel/TreeNodesReader.js.map +1 -0
  46. package/lib/hierarchies/imodel/Utils.d.ts.map +1 -0
  47. package/lib/hierarchies/imodel/Utils.js.map +1 -0
  48. package/lib/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -0
  49. package/lib/hierarchies/imodel/operators/DetermineChildren.js.map +1 -0
  50. package/lib/hierarchies/imodel/operators/Grouping.d.ts.map +1 -0
  51. package/lib/hierarchies/imodel/operators/Grouping.js.map +1 -0
  52. package/lib/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -0
  53. package/lib/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -0
  54. package/lib/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -0
  55. package/lib/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -0
  56. package/lib/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +1 -0
  57. package/lib/hierarchies/imodel/operators/grouping/AutoExpand.js.map +1 -0
  58. package/lib/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -0
  59. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/BaseClassGrouping.js +4 -4
  60. package/lib/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -0
  61. package/lib/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -0
  62. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/ClassGrouping.js +3 -3
  63. package/lib/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -0
  64. package/lib/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -0
  65. package/lib/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -0
  66. package/lib/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -0
  67. package/lib/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -0
  68. package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/PropertiesGrouping.d.ts +1 -1
  69. package/lib/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -0
  70. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/PropertiesGrouping.js +10 -9
  71. package/lib/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -0
  72. package/lib/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -0
  73. package/lib/hierarchies/imodel/operators/grouping/Shared.js.map +1 -0
  74. package/lib/hierarchies/internal/Common.d.ts.map +1 -0
  75. package/lib/hierarchies/internal/Common.js.map +1 -0
  76. package/lib/hierarchies/internal/DisposePolyfill.d.ts.map +1 -0
  77. package/lib/hierarchies/internal/DisposePolyfill.js.map +1 -0
  78. package/lib/hierarchies/internal/EachValueFrom.d.ts.map +1 -0
  79. package/lib/hierarchies/internal/EachValueFrom.js.map +1 -0
  80. package/lib/hierarchies/internal/LoggingUtils.d.ts.map +1 -0
  81. package/lib/hierarchies/internal/LoggingUtils.js.map +1 -0
  82. package/lib/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +1 -0
  83. package/lib/hierarchies/internal/RxjsHierarchyDefinition.js.map +1 -0
  84. package/lib/hierarchies/internal/SubscriptionScheduler.d.ts.map +1 -0
  85. package/lib/hierarchies/internal/SubscriptionScheduler.js.map +1 -0
  86. package/lib/hierarchies/internal/operators/Partition.d.ts.map +1 -0
  87. package/lib/hierarchies/internal/operators/Partition.js.map +1 -0
  88. package/lib/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +1 -0
  89. package/lib/hierarchies/internal/operators/ReduceToMergeMap.js.map +1 -0
  90. package/lib/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +1 -0
  91. package/lib/hierarchies/internal/operators/ReleaseMainThread.js.map +1 -0
  92. package/lib/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +1 -0
  93. package/lib/hierarchies/internal/operators/ShareReplayWithErrors.js.map +1 -0
  94. package/lib/hierarchies/internal/operators/Sorting.d.ts.map +1 -0
  95. package/lib/hierarchies/internal/operators/Sorting.js.map +1 -0
  96. package/lib/hierarchies/internal/operators/TapOnce.d.ts.map +1 -0
  97. package/lib/hierarchies/internal/operators/TapOnce.js.map +1 -0
  98. package/lib/presentation-hierarchies.d.ts.map +1 -0
  99. package/lib/{cjs/presentation-hierarchies.js.map → presentation-hierarchies.js.map} +1 -1
  100. package/package.json +18 -20
  101. package/lib/cjs/hierarchies/HierarchyErrors.d.ts.map +0 -1
  102. package/lib/cjs/hierarchies/HierarchyErrors.js +0 -20
  103. package/lib/cjs/hierarchies/HierarchyErrors.js.map +0 -1
  104. package/lib/cjs/hierarchies/HierarchyMerge.d.ts.map +0 -1
  105. package/lib/cjs/hierarchies/HierarchyMerge.js +0 -43
  106. package/lib/cjs/hierarchies/HierarchyMerge.js.map +0 -1
  107. package/lib/cjs/hierarchies/HierarchyNode.d.ts.map +0 -1
  108. package/lib/cjs/hierarchies/HierarchyNode.js +0 -82
  109. package/lib/cjs/hierarchies/HierarchyNode.js.map +0 -1
  110. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.d.ts.map +0 -1
  111. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js +0 -52
  112. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js.map +0 -1
  113. package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts +0 -162
  114. package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts.map +0 -1
  115. package/lib/cjs/hierarchies/HierarchyNodeKey.js +0 -166
  116. package/lib/cjs/hierarchies/HierarchyNodeKey.js.map +0 -1
  117. package/lib/cjs/hierarchies/HierarchyProvider.d.ts.map +0 -1
  118. package/lib/cjs/hierarchies/HierarchyProvider.js +0 -64
  119. package/lib/cjs/hierarchies/HierarchyProvider.js.map +0 -1
  120. package/lib/cjs/hierarchies/HierarchySearch.d.ts.map +0 -1
  121. package/lib/cjs/hierarchies/HierarchySearch.js +0 -468
  122. package/lib/cjs/hierarchies/HierarchySearch.js.map +0 -1
  123. package/lib/cjs/hierarchies/Logging.d.ts.map +0 -1
  124. package/lib/cjs/hierarchies/Logging.js +0 -27
  125. package/lib/cjs/hierarchies/Logging.js.map +0 -1
  126. package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts.map +0 -1
  127. package/lib/cjs/hierarchies/imodel/HierarchyCache.js +0 -81
  128. package/lib/cjs/hierarchies/imodel/HierarchyCache.js.map +0 -1
  129. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts +0 -144
  130. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +0 -1
  131. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js +0 -21
  132. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js.map +0 -1
  133. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts +0 -234
  134. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts.map +0 -1
  135. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js +0 -29
  136. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js.map +0 -1
  137. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +0 -1
  138. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js +0 -657
  139. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js.map +0 -1
  140. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +0 -1
  141. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js +0 -126
  142. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +0 -1
  143. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts +0 -231
  144. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +0 -1
  145. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js +0 -629
  146. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js.map +0 -1
  147. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts +0 -140
  148. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +0 -1
  149. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js +0 -94
  150. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +0 -1
  151. package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.d.ts.map +0 -1
  152. package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.js +0 -268
  153. package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.js.map +0 -1
  154. package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts +0 -35
  155. package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts.map +0 -1
  156. package/lib/cjs/hierarchies/imodel/TreeNodesReader.js +0 -51
  157. package/lib/cjs/hierarchies/imodel/TreeNodesReader.js.map +0 -1
  158. package/lib/cjs/hierarchies/imodel/Utils.d.ts.map +0 -1
  159. package/lib/cjs/hierarchies/imodel/Utils.js +0 -73
  160. package/lib/cjs/hierarchies/imodel/Utils.js.map +0 -1
  161. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.d.ts.map +0 -1
  162. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js +0 -40
  163. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js.map +0 -1
  164. package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts.map +0 -1
  165. package/lib/cjs/hierarchies/imodel/operators/Grouping.js +0 -176
  166. package/lib/cjs/hierarchies/imodel/operators/Grouping.js.map +0 -1
  167. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +0 -1
  168. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js +0 -75
  169. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js.map +0 -1
  170. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +0 -1
  171. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js +0 -84
  172. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +0 -1
  173. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +0 -1
  174. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.js +0 -26
  175. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.js.map +0 -1
  176. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +0 -1
  177. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js +0 -113
  178. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +0 -1
  179. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +0 -1
  180. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js +0 -54
  181. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +0 -1
  182. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +0 -1
  183. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js +0 -49
  184. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js.map +0 -1
  185. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +0 -1
  186. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js +0 -52
  187. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +0 -1
  188. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +0 -1
  189. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js +0 -310
  190. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +0 -1
  191. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts.map +0 -1
  192. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js +0 -31
  193. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js.map +0 -1
  194. package/lib/cjs/hierarchies/internal/Common.d.ts.map +0 -1
  195. package/lib/cjs/hierarchies/internal/Common.js +0 -91
  196. package/lib/cjs/hierarchies/internal/Common.js.map +0 -1
  197. package/lib/cjs/hierarchies/internal/DisposePolyfill.d.ts +0 -1
  198. package/lib/cjs/hierarchies/internal/DisposePolyfill.d.ts.map +0 -1
  199. package/lib/cjs/hierarchies/internal/DisposePolyfill.js +0 -11
  200. package/lib/cjs/hierarchies/internal/DisposePolyfill.js.map +0 -1
  201. package/lib/cjs/hierarchies/internal/EachValueFrom.d.ts.map +0 -1
  202. package/lib/cjs/hierarchies/internal/EachValueFrom.js +0 -111
  203. package/lib/cjs/hierarchies/internal/EachValueFrom.js.map +0 -1
  204. package/lib/cjs/hierarchies/internal/LoggingUtils.d.ts.map +0 -1
  205. package/lib/cjs/hierarchies/internal/LoggingUtils.js +0 -37
  206. package/lib/cjs/hierarchies/internal/LoggingUtils.js.map +0 -1
  207. package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +0 -1
  208. package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js +0 -28
  209. package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js.map +0 -1
  210. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.d.ts.map +0 -1
  211. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.js +0 -54
  212. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.js.map +0 -1
  213. package/lib/cjs/hierarchies/internal/operators/Partition.d.ts.map +0 -1
  214. package/lib/cjs/hierarchies/internal/operators/Partition.js +0 -60
  215. package/lib/cjs/hierarchies/internal/operators/Partition.js.map +0 -1
  216. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +0 -1
  217. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.js +0 -50
  218. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.js.map +0 -1
  219. package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +0 -1
  220. package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.js +0 -24
  221. package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.js.map +0 -1
  222. package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +0 -1
  223. package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.js +0 -23
  224. package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.js.map +0 -1
  225. package/lib/cjs/hierarchies/internal/operators/Sorting.d.ts.map +0 -1
  226. package/lib/cjs/hierarchies/internal/operators/Sorting.js +0 -25
  227. package/lib/cjs/hierarchies/internal/operators/Sorting.js.map +0 -1
  228. package/lib/cjs/hierarchies/internal/operators/TapOnce.d.ts.map +0 -1
  229. package/lib/cjs/hierarchies/internal/operators/TapOnce.js +0 -19
  230. package/lib/cjs/hierarchies/internal/operators/TapOnce.js.map +0 -1
  231. package/lib/cjs/package.json +0 -1
  232. package/lib/cjs/presentation-hierarchies.d.ts.map +0 -1
  233. package/lib/cjs/presentation-hierarchies.js +0 -40
  234. package/lib/esm/hierarchies/HierarchyErrors.d.ts +0 -9
  235. package/lib/esm/hierarchies/HierarchyErrors.d.ts.map +0 -1
  236. package/lib/esm/hierarchies/HierarchyErrors.js.map +0 -1
  237. package/lib/esm/hierarchies/HierarchyMerge.d.ts +0 -19
  238. package/lib/esm/hierarchies/HierarchyMerge.d.ts.map +0 -1
  239. package/lib/esm/hierarchies/HierarchyMerge.js.map +0 -1
  240. package/lib/esm/hierarchies/HierarchyNode.d.ts +0 -149
  241. package/lib/esm/hierarchies/HierarchyNode.d.ts.map +0 -1
  242. package/lib/esm/hierarchies/HierarchyNode.js.map +0 -1
  243. package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts +0 -31
  244. package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts.map +0 -1
  245. package/lib/esm/hierarchies/HierarchyNodeIdentifier.js.map +0 -1
  246. package/lib/esm/hierarchies/HierarchyNodeKey.d.ts.map +0 -1
  247. package/lib/esm/hierarchies/HierarchyNodeKey.js.map +0 -1
  248. package/lib/esm/hierarchies/HierarchyProvider.d.ts +0 -134
  249. package/lib/esm/hierarchies/HierarchyProvider.d.ts.map +0 -1
  250. package/lib/esm/hierarchies/HierarchyProvider.js.map +0 -1
  251. package/lib/esm/hierarchies/HierarchySearch.d.ts +0 -297
  252. package/lib/esm/hierarchies/HierarchySearch.d.ts.map +0 -1
  253. package/lib/esm/hierarchies/HierarchySearch.js.map +0 -1
  254. package/lib/esm/hierarchies/Logging.d.ts +0 -13
  255. package/lib/esm/hierarchies/Logging.d.ts.map +0 -1
  256. package/lib/esm/hierarchies/Logging.js.map +0 -1
  257. package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts +0 -18
  258. package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts.map +0 -1
  259. package/lib/esm/hierarchies/imodel/HierarchyCache.js.map +0 -1
  260. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +0 -1
  261. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.js.map +0 -1
  262. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts.map +0 -1
  263. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.js.map +0 -1
  264. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts +0 -138
  265. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +0 -1
  266. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js.map +0 -1
  267. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts +0 -21
  268. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +0 -1
  269. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +0 -1
  270. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +0 -1
  271. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js.map +0 -1
  272. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +0 -1
  273. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +0 -1
  274. package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.d.ts +0 -35
  275. package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.d.ts.map +0 -1
  276. package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.js.map +0 -1
  277. package/lib/esm/hierarchies/imodel/TreeNodesReader.d.ts.map +0 -1
  278. package/lib/esm/hierarchies/imodel/TreeNodesReader.js.map +0 -1
  279. package/lib/esm/hierarchies/imodel/Utils.d.ts +0 -5
  280. package/lib/esm/hierarchies/imodel/Utils.d.ts.map +0 -1
  281. package/lib/esm/hierarchies/imodel/Utils.js.map +0 -1
  282. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts +0 -11
  283. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts.map +0 -1
  284. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.js.map +0 -1
  285. package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts +0 -26
  286. package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts.map +0 -1
  287. package/lib/esm/hierarchies/imodel/operators/Grouping.js.map +0 -1
  288. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts +0 -11
  289. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +0 -1
  290. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js.map +0 -1
  291. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts +0 -11
  292. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +0 -1
  293. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +0 -1
  294. package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.d.ts +0 -4
  295. package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +0 -1
  296. package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.js.map +0 -1
  297. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts +0 -11
  298. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +0 -1
  299. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +0 -1
  300. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts +0 -7
  301. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +0 -1
  302. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +0 -1
  303. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.d.ts +0 -4
  304. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +0 -1
  305. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.js.map +0 -1
  306. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts +0 -5
  307. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +0 -1
  308. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +0 -1
  309. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts +0 -32
  310. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +0 -1
  311. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +0 -1
  312. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts +0 -5
  313. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts.map +0 -1
  314. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.js.map +0 -1
  315. package/lib/esm/hierarchies/internal/Common.d.ts +0 -61
  316. package/lib/esm/hierarchies/internal/Common.d.ts.map +0 -1
  317. package/lib/esm/hierarchies/internal/Common.js.map +0 -1
  318. package/lib/esm/hierarchies/internal/DisposePolyfill.d.ts.map +0 -1
  319. package/lib/esm/hierarchies/internal/DisposePolyfill.js.map +0 -1
  320. package/lib/esm/hierarchies/internal/EachValueFrom.d.ts +0 -12
  321. package/lib/esm/hierarchies/internal/EachValueFrom.d.ts.map +0 -1
  322. package/lib/esm/hierarchies/internal/EachValueFrom.js.map +0 -1
  323. package/lib/esm/hierarchies/internal/LoggingUtils.d.ts +0 -12
  324. package/lib/esm/hierarchies/internal/LoggingUtils.d.ts.map +0 -1
  325. package/lib/esm/hierarchies/internal/LoggingUtils.js.map +0 -1
  326. package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.d.ts +0 -75
  327. package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +0 -1
  328. package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.js.map +0 -1
  329. package/lib/esm/hierarchies/internal/SubscriptionScheduler.d.ts +0 -17
  330. package/lib/esm/hierarchies/internal/SubscriptionScheduler.d.ts.map +0 -1
  331. package/lib/esm/hierarchies/internal/SubscriptionScheduler.js.map +0 -1
  332. package/lib/esm/hierarchies/internal/operators/Partition.d.ts +0 -7
  333. package/lib/esm/hierarchies/internal/operators/Partition.d.ts.map +0 -1
  334. package/lib/esm/hierarchies/internal/operators/Partition.js.map +0 -1
  335. package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.d.ts +0 -22
  336. package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +0 -1
  337. package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.js.map +0 -1
  338. package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.d.ts +0 -7
  339. package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +0 -1
  340. package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.js.map +0 -1
  341. package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.d.ts +0 -9
  342. package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +0 -1
  343. package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.js.map +0 -1
  344. package/lib/esm/hierarchies/internal/operators/Sorting.d.ts +0 -13
  345. package/lib/esm/hierarchies/internal/operators/Sorting.d.ts.map +0 -1
  346. package/lib/esm/hierarchies/internal/operators/Sorting.js.map +0 -1
  347. package/lib/esm/hierarchies/internal/operators/TapOnce.d.ts +0 -4
  348. package/lib/esm/hierarchies/internal/operators/TapOnce.d.ts.map +0 -1
  349. package/lib/esm/hierarchies/internal/operators/TapOnce.js.map +0 -1
  350. package/lib/esm/presentation-hierarchies.d.ts +0 -24
  351. package/lib/esm/presentation-hierarchies.d.ts.map +0 -1
  352. package/lib/esm/presentation-hierarchies.js.map +0 -1
  353. /package/lib/{cjs/hierarchies → hierarchies}/HierarchyErrors.d.ts +0 -0
  354. /package/lib/{esm/hierarchies → hierarchies}/HierarchyErrors.js +0 -0
  355. /package/lib/{cjs/hierarchies → hierarchies}/HierarchyMerge.d.ts +0 -0
  356. /package/lib/{esm/hierarchies → hierarchies}/HierarchyMerge.js +0 -0
  357. /package/lib/{cjs/hierarchies → hierarchies}/HierarchyNode.d.ts +0 -0
  358. /package/lib/{esm/hierarchies → hierarchies}/HierarchyNode.js +0 -0
  359. /package/lib/{cjs/hierarchies → hierarchies}/HierarchyNodeIdentifier.d.ts +0 -0
  360. /package/lib/{esm/hierarchies → hierarchies}/HierarchyNodeIdentifier.js +0 -0
  361. /package/lib/{cjs/hierarchies → hierarchies}/HierarchyProvider.d.ts +0 -0
  362. /package/lib/{esm/hierarchies → hierarchies}/HierarchyProvider.js +0 -0
  363. /package/lib/{cjs/hierarchies → hierarchies}/HierarchySearch.d.ts +0 -0
  364. /package/lib/{esm/hierarchies → hierarchies}/HierarchySearch.js +0 -0
  365. /package/lib/{cjs/hierarchies → hierarchies}/Logging.d.ts +0 -0
  366. /package/lib/{esm/hierarchies → hierarchies}/Logging.js +0 -0
  367. /package/lib/{cjs/hierarchies → hierarchies}/imodel/HierarchyCache.d.ts +0 -0
  368. /package/lib/{esm/hierarchies → hierarchies}/imodel/HierarchyCache.js +0 -0
  369. /package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyDefinition.js +0 -0
  370. /package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyNode.js +0 -0
  371. /package/lib/{cjs/hierarchies → hierarchies}/imodel/IModelHierarchyProvider.d.ts +0 -0
  372. /package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyProvider.js +0 -0
  373. /package/lib/{cjs/hierarchies → hierarchies}/imodel/LimitingECSqlQueryExecutor.d.ts +0 -0
  374. /package/lib/{esm/hierarchies → hierarchies}/imodel/LimitingECSqlQueryExecutor.js +0 -0
  375. /package/lib/{esm/hierarchies → hierarchies}/imodel/PredicateBasedHierarchyDefinition.js +0 -0
  376. /package/lib/{cjs/hierarchies → hierarchies}/imodel/SearchHierarchyDefinition.d.ts +0 -0
  377. /package/lib/{cjs/hierarchies → hierarchies}/imodel/Utils.d.ts +0 -0
  378. /package/lib/{esm/hierarchies → hierarchies}/imodel/Utils.js +0 -0
  379. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/DetermineChildren.d.ts +0 -0
  380. /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/DetermineChildren.js +0 -0
  381. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/Grouping.d.ts +0 -0
  382. /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/Grouping.js +0 -0
  383. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/HideIfNoChildren.d.ts +0 -0
  384. /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/HideIfNoChildren.js +0 -0
  385. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/HideNodesInHierarchy.d.ts +0 -0
  386. /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/HideNodesInHierarchy.js +0 -0
  387. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/AutoExpand.d.ts +0 -0
  388. /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/AutoExpand.js +0 -0
  389. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/BaseClassGrouping.d.ts +0 -0
  390. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/ClassGrouping.d.ts +0 -0
  391. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/GroupHiding.d.ts +0 -0
  392. /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/GroupHiding.js +0 -0
  393. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/LabelGrouping.d.ts +0 -0
  394. /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/LabelGrouping.js +0 -0
  395. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/Shared.d.ts +0 -0
  396. /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/Shared.js +0 -0
  397. /package/lib/{cjs/hierarchies → hierarchies}/internal/Common.d.ts +0 -0
  398. /package/lib/{esm/hierarchies → hierarchies}/internal/Common.js +0 -0
  399. /package/lib/{esm/hierarchies → hierarchies}/internal/DisposePolyfill.d.ts +0 -0
  400. /package/lib/{esm/hierarchies → hierarchies}/internal/DisposePolyfill.js +0 -0
  401. /package/lib/{cjs/hierarchies → hierarchies}/internal/EachValueFrom.d.ts +0 -0
  402. /package/lib/{esm/hierarchies → hierarchies}/internal/EachValueFrom.js +0 -0
  403. /package/lib/{cjs/hierarchies → hierarchies}/internal/LoggingUtils.d.ts +0 -0
  404. /package/lib/{esm/hierarchies → hierarchies}/internal/LoggingUtils.js +0 -0
  405. /package/lib/{cjs/hierarchies → hierarchies}/internal/RxjsHierarchyDefinition.d.ts +0 -0
  406. /package/lib/{esm/hierarchies → hierarchies}/internal/RxjsHierarchyDefinition.js +0 -0
  407. /package/lib/{cjs/hierarchies → hierarchies}/internal/SubscriptionScheduler.d.ts +0 -0
  408. /package/lib/{esm/hierarchies → hierarchies}/internal/SubscriptionScheduler.js +0 -0
  409. /package/lib/{cjs/hierarchies → hierarchies}/internal/operators/Partition.d.ts +0 -0
  410. /package/lib/{esm/hierarchies → hierarchies}/internal/operators/Partition.js +0 -0
  411. /package/lib/{cjs/hierarchies → hierarchies}/internal/operators/ReduceToMergeMap.d.ts +0 -0
  412. /package/lib/{esm/hierarchies → hierarchies}/internal/operators/ReduceToMergeMap.js +0 -0
  413. /package/lib/{cjs/hierarchies → hierarchies}/internal/operators/ReleaseMainThread.d.ts +0 -0
  414. /package/lib/{esm/hierarchies → hierarchies}/internal/operators/ReleaseMainThread.js +0 -0
  415. /package/lib/{cjs/hierarchies → hierarchies}/internal/operators/ShareReplayWithErrors.d.ts +0 -0
  416. /package/lib/{esm/hierarchies → hierarchies}/internal/operators/ShareReplayWithErrors.js +0 -0
  417. /package/lib/{cjs/hierarchies → hierarchies}/internal/operators/Sorting.d.ts +0 -0
  418. /package/lib/{esm/hierarchies → hierarchies}/internal/operators/Sorting.js +0 -0
  419. /package/lib/{cjs/hierarchies → hierarchies}/internal/operators/TapOnce.d.ts +0 -0
  420. /package/lib/{esm/hierarchies → hierarchies}/internal/operators/TapOnce.js +0 -0
  421. /package/lib/{cjs/presentation-hierarchies.d.ts → presentation-hierarchies.d.ts} +0 -0
  422. /package/lib/{esm/presentation-hierarchies.js → presentation-hierarchies.js} +0 -0
@@ -1,81 +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.HierarchyCache = void 0;
8
- const core_bentley_1 = require("@itwin/core-bentley");
9
- const HierarchyNodeKey_js_1 = require("../HierarchyNodeKey.js");
10
- /** @internal */
11
- class HierarchyCache {
12
- _map;
13
- _props;
14
- constructor(props) {
15
- this._props = props;
16
- this._map = new core_bentley_1.LRUDictionary(props.size, compareHierarchyNodeKeys);
17
- }
18
- createCacheKeys(props) {
19
- function createVariationKey() {
20
- const { instanceFilter, hierarchyLevelSizeLimit, targetInstanceKeys } = props;
21
- if (instanceFilter === undefined && hierarchyLevelSizeLimit === undefined && targetInstanceKeys === undefined) {
22
- return undefined;
23
- }
24
- return JSON.stringify({ instanceFilter, hierarchyLevelSizeLimit, targetInstanceKeys });
25
- }
26
- if (!props.parentNode) {
27
- return { primaryKey: [], variationKey: createVariationKey() };
28
- }
29
- const parentKeys = props.parentNode.parentKeys;
30
- return { primaryKey: [...parentKeys, props.parentNode.key], variationKey: createVariationKey() };
31
- }
32
- getCacheAccessors(primaryKey, variationKey) {
33
- const getMapEntry = (create) => {
34
- let entry = this._map.get(primaryKey);
35
- if (!entry && create) {
36
- entry = { primary: undefined, variations: new core_bentley_1.LRUMap(this._props.variationsCount ?? 1) };
37
- this._map.set(primaryKey, entry);
38
- }
39
- return entry;
40
- };
41
- if (variationKey) {
42
- return {
43
- get: () => getMapEntry(false)?.variations.get(variationKey),
44
- set: (value) => {
45
- getMapEntry(true).variations.set(variationKey, value);
46
- },
47
- };
48
- }
49
- return {
50
- get: () => getMapEntry(false)?.primary,
51
- set: (value) => {
52
- getMapEntry(true).primary = value;
53
- },
54
- };
55
- }
56
- set(requestProps, value) {
57
- const { primaryKey, variationKey } = this.createCacheKeys(requestProps);
58
- this.getCacheAccessors(primaryKey, variationKey).set(value);
59
- }
60
- get(requestProps) {
61
- const { primaryKey, variationKey } = this.createCacheKeys(requestProps);
62
- return this.getCacheAccessors(primaryKey, variationKey).get();
63
- }
64
- clear() {
65
- this._map.clear();
66
- }
67
- }
68
- exports.HierarchyCache = HierarchyCache;
69
- function compareHierarchyNodeKeys(lhs, rhs) {
70
- if (lhs.length !== rhs.length) {
71
- return lhs.length - rhs.length;
72
- }
73
- for (let i = 0; i < lhs.length; ++i) {
74
- const keysCompareResult = HierarchyNodeKey_js_1.HierarchyNodeKey.compare(lhs[i], rhs[i]);
75
- if (keysCompareResult !== 0) {
76
- return keysCompareResult;
77
- }
78
- }
79
- return 0;
80
- }
81
- //# sourceMappingURL=HierarchyCache.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HierarchyCache.js","sourceRoot":"","sources":["../../../../src/hierarchies/imodel/HierarchyCache.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,sDAA4D;AAC5D,gEAA0D;AAkB1D,gBAAgB;AAChB,MAAa,cAAc;IACjB,IAA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EC;AAED,SAAS,wBAAwB,CAAC,GAAuB,EAAE,GAAuB;IAChF,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,CAAC;QAC9B,OAAO,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IACjC,CAAC;IACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;QACpC,MAAM,iBAAiB,GAAG,sCAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACnE,IAAI,iBAAiB,KAAK,CAAC,EAAE,CAAC;YAC5B,OAAO,iBAAiB,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,OAAO,CAAC,CAAC;AACX,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 { LRUDictionary, LRUMap } from \"@itwin/core-bentley\";\nimport { HierarchyNodeKey } from \"../HierarchyNodeKey.js\";\n\nimport type { LRUCache } from \"@itwin/core-bentley\";\nimport type { InstanceKey } from \"@itwin/presentation-shared\";\nimport type { GetHierarchyNodesProps } from \"../HierarchyProvider.js\";\n\ninterface HierarchyCacheEntry<T> {\n /** Stores observables for the default case - no instance filter or custom limit for the hierarchy level. */\n primary: T | undefined;\n /** Stores a limited number of variations with custom instance filter and/or custom limit for the hierarchy level. */\n variations: LRUCache<string, T>;\n}\n\ninterface ChildNodeObservablesCacheProps {\n size: number;\n variationsCount?: number;\n}\n\n/** @internal */\nexport class HierarchyCache<T> {\n private _map: LRUDictionary<HierarchyNodeKey[], HierarchyCacheEntry<T>>;\n private _props: ChildNodeObservablesCacheProps;\n\n public constructor(props: ChildNodeObservablesCacheProps) {\n this._props = props;\n this._map = new LRUDictionary<HierarchyNodeKey[], HierarchyCacheEntry<T>>(props.size, compareHierarchyNodeKeys);\n }\n\n private createCacheKeys(\n props: Omit<GetHierarchyNodesProps, \"parentNode\"> & {\n parentNode: { key: HierarchyNodeKey; parentKeys: HierarchyNodeKey[] } | undefined;\n targetInstanceKeys?: InstanceKey[];\n },\n ) {\n function createVariationKey() {\n const { instanceFilter, hierarchyLevelSizeLimit, targetInstanceKeys } = props;\n if (instanceFilter === undefined && hierarchyLevelSizeLimit === undefined && targetInstanceKeys === undefined) {\n return undefined;\n }\n return JSON.stringify({ instanceFilter, hierarchyLevelSizeLimit, targetInstanceKeys });\n }\n\n if (!props.parentNode) {\n return { primaryKey: [], variationKey: createVariationKey() };\n }\n\n const parentKeys = props.parentNode.parentKeys;\n\n return { primaryKey: [...parentKeys, props.parentNode.key], variationKey: createVariationKey() };\n }\n\n private getCacheAccessors(primaryKey: HierarchyNodeKey[], variationKey?: string) {\n const getMapEntry = (create: boolean) => {\n let entry = this._map.get(primaryKey);\n if (!entry && create) {\n entry = { primary: undefined, variations: new LRUMap(this._props.variationsCount ?? 1) };\n this._map.set(primaryKey, entry);\n }\n return entry;\n };\n if (variationKey) {\n return {\n get: () => getMapEntry(false)?.variations.get(variationKey),\n set: (value: T) => {\n getMapEntry(true)!.variations.set(variationKey, value);\n },\n };\n }\n return {\n get: () => getMapEntry(false)?.primary,\n set: (value: T) => {\n getMapEntry(true)!.primary = value;\n },\n };\n }\n\n public set(requestProps: GetHierarchyNodesProps, value: T) {\n const { primaryKey, variationKey } = this.createCacheKeys(requestProps);\n this.getCacheAccessors(primaryKey, variationKey).set(value);\n }\n\n public get(requestProps: GetHierarchyNodesProps): T | undefined {\n const { primaryKey, variationKey } = this.createCacheKeys(requestProps);\n return this.getCacheAccessors(primaryKey, variationKey).get();\n }\n\n public clear() {\n this._map.clear();\n }\n}\n\nfunction compareHierarchyNodeKeys(lhs: HierarchyNodeKey[], rhs: HierarchyNodeKey[]) {\n if (lhs.length !== rhs.length) {\n return lhs.length - rhs.length;\n }\n for (let i = 0; i < lhs.length; ++i) {\n const keysCompareResult = HierarchyNodeKey.compare(lhs[i], rhs[i]);\n if (keysCompareResult !== 0) {\n return keysCompareResult;\n }\n }\n return 0;\n}\n"]}
@@ -1,144 +0,0 @@
1
- import type { GenericInstanceFilter } from "@itwin/core-common";
2
- import type { EC, ECClassHierarchyInspector, ECSchemaProvider, ECSqlQueryDef } from "@itwin/presentation-shared";
3
- import type { NonGroupingHierarchyNode, ParentHierarchyNode } from "../HierarchyNode.js";
4
- import type { ProcessedGenericHierarchyNode, ProcessedHierarchyNode, ProcessedInstanceHierarchyNode, SourceGenericHierarchyNode, SourceInstanceHierarchyNode } from "./IModelHierarchyNode.js";
5
- import type { LimitingECSqlQueryExecutor } from "./LimitingECSqlQueryExecutor.js";
6
- import type { NodesQueryClauseFactory } from "./NodeSelectQueryFactory.js";
7
- /**
8
- * A nodes definition that returns a single generic node.
9
- * @public
10
- */
11
- export interface GenericHierarchyNodeDefinition {
12
- /** The node to be created in the hierarchy level */
13
- node: SourceGenericHierarchyNode;
14
- }
15
- /**
16
- * A nodes definition that returns an ECSQL query for selecting nodes from an iModel.
17
- * @public
18
- */
19
- export interface InstanceNodesQueryDefinition {
20
- /**
21
- * Full name of the class whose instances are going to be returned. It's okay if the attribute
22
- * points to a base class of multiple different classes of instances returned by the query, however
23
- * the more specific this class is, the more efficient hierarchy building process is.
24
- */
25
- fullClassName: EC.FullClassName;
26
- /**
27
- * An ECSQL query that selects nodes from an iModel. `SELECT` clause of the query is expected
28
- * to be built using `NodeSelectQueryFactory.createSelectClause`.
29
- */
30
- query: ECSqlQueryDef;
31
- }
32
- /**
33
- * A definition of nodes included in a hierarchy level.
34
- * @public
35
- */
36
- export type HierarchyNodesDefinition = GenericHierarchyNodeDefinition | InstanceNodesQueryDefinition;
37
- /** @public */
38
- export declare namespace HierarchyNodesDefinition {
39
- function isGenericNode(def: HierarchyNodesDefinition): def is GenericHierarchyNodeDefinition;
40
- function isInstanceNodesQuery(def: HierarchyNodesDefinition): def is InstanceNodesQueryDefinition;
41
- }
42
- /**
43
- * A definition of a hierarchy level, which may consist of multiple node definitions.
44
- * @public
45
- */
46
- export type HierarchyLevelDefinition = HierarchyNodesDefinition[];
47
- /**
48
- * A type for a function that parses a `SourceInstanceHierarchyNode` from provided ECSQL `row` object.
49
- * @public
50
- */
51
- export type NodeParser = (props: {
52
- /** The ECSQL row object to parse. Keys & value types depend on the executed query. */
53
- row: {
54
- [columnName: string]: any;
55
- };
56
- /** The parent node whose child node is being parsed. */
57
- parentNode?: HierarchyDefinitionParentNode;
58
- /** The key of iModel which is used to run the query. */
59
- imodelKey: string;
60
- }) => SourceInstanceHierarchyNode | Promise<SourceInstanceHierarchyNode>;
61
- /**
62
- * A type for a function that pre-processes given node. Unless the function decides not to make any modifications,
63
- * it should return a new - modified - node, rather than modifying the given one. Returning `undefined` omits the node
64
- * from the hierarchy.
65
- *
66
- * @public
67
- */
68
- export type NodePreProcessor = <TNode extends ProcessedGenericHierarchyNode | ProcessedInstanceHierarchyNode>(props: {
69
- /** Node to be pre-processed. */
70
- node: TNode;
71
- /** The parent node whose child node is being pre-processed. */
72
- parentNode?: ParentHierarchyNode;
73
- }) => Promise<TNode | undefined>;
74
- /**
75
- * A type for a function that post-processes given node. Unless the function decides not to make any modifications,
76
- * it should return a new - modified - node, rather than modifying the given one.
77
- *
78
- * @public
79
- */
80
- export type NodePostProcessor = (props: {
81
- /** Node to be post-processed. */
82
- node: ProcessedHierarchyNode;
83
- /** The parent node whose child node is being post-processed. */
84
- parentNode?: ParentHierarchyNode;
85
- }) => Promise<ProcessedHierarchyNode>;
86
- /**
87
- * A type of node that can be passed to `HierarchyDefinition.defineHierarchyLevel`. This basically means
88
- * a `HierarchyNode` that:
89
- * - knows nothing about its children,
90
- * - is either an instances node (key is of `InstancesNodeKey` type) or a generic node (key is of `GenericNodeKey` type).
91
- * @public
92
- */
93
- export type HierarchyDefinitionParentNode = Omit<NonGroupingHierarchyNode, "children">;
94
- /**
95
- * Props for `HierarchyDefinition.defineHierarchyLevel`.
96
- * @public
97
- */
98
- export interface DefineHierarchyLevelProps extends Pick<NodesQueryClauseFactory, "createSelectClause" | "createFilterClauses"> {
99
- /** The iModel for which the hierarchy definition is being requested for. */
100
- imodelAccess: LimitingECSqlQueryExecutor & ECSchemaProvider & ECClassHierarchyInspector & {
101
- imodelKey: string;
102
- };
103
- /** Parent node to get children for. Pass `undefined` to get root nodes. */
104
- parentNode: HierarchyDefinitionParentNode | undefined;
105
- /** Optional hierarchy level filter. */
106
- instanceFilter?: GenericInstanceFilter;
107
- }
108
- /**
109
- * An interface for a factory that knows how define a hierarchy based on a given parent node.
110
- * @public
111
- */
112
- export interface HierarchyDefinition {
113
- /**
114
- * An optional function for parsing ECInstance node from ECSQL row.
115
- *
116
- * Should be used in situations when the `HierarchyDefinition` implementation
117
- * introduces additional ECSQL columns into the select clause and wants to assign additional
118
- * data to the nodes it produces.
119
- *
120
- * Defaults to a function that parses all `HierarchyNode` attributes from a query, whose SELECT
121
- * clause is created using `NodeSelectQueryFactory.createSelectClause`.
122
- */
123
- parseNode?: NodeParser;
124
- /**
125
- * An optional function for pre-processing nodes.
126
- *
127
- * Pre-processing happens immediately after the nodes are loaded based on `HierarchyLevelDefinition`
128
- * returned by this `HierarchyDefinition` and before their processing (hiding, grouping, sorting, etc.) starts.
129
- * The step allows assigning nodes additional data or excluding them from the hierarchy based on some attributes.
130
- */
131
- preProcessNode?: NodePreProcessor;
132
- /**
133
- * An optional function for post-processing nodes.
134
- *
135
- * Post-processing happens after the loaded nodes go through all the merging, hiding and grouping
136
- * steps, but before sorting them. This step allows `HierarchyDefinition` implementations to assign additional data
137
- * to nodes after they're processed. This is especially true for grouping nodes as they're only created during
138
- * processing.
139
- */
140
- postProcessNode?: NodePostProcessor;
141
- /** A function to create a hierarchy level definition for given parent node. */
142
- defineHierarchyLevel(props: DefineHierarchyLevelProps): Promise<HierarchyLevelDefinition>;
143
- }
144
- //# sourceMappingURL=IModelHierarchyDefinition.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IModelHierarchyDefinition.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/imodel/IModelHierarchyDefinition.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAE,EAAE,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACjH,OAAO,KAAK,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,KAAK,EACV,6BAA6B,EAC7B,sBAAsB,EACtB,8BAA8B,EAC9B,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C,oDAAoD;IACpD,IAAI,EAAE,0BAA0B,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,aAAa,EAAE,EAAE,CAAC,aAAa,CAAC;IAChC;;;OAGG;IACH,KAAK,EAAE,aAAa,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,8BAA8B,GAAG,4BAA4B,CAAC;AACrG,cAAc;AAEd,yBAAiB,wBAAwB,CAAC;IACxC,SAAgB,aAAa,CAAC,GAAG,EAAE,wBAAwB,GAAG,GAAG,IAAI,8BAA8B,CAElG;IACD,SAAgB,oBAAoB,CAAC,GAAG,EAAE,wBAAwB,GAAG,GAAG,IAAI,4BAA4B,CAEvG;CACF;AAED;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,wBAAwB,EAAE,CAAC;AAElE;;;GAGG;AACH,MAAM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AW,mBAAmB;IAClC;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC;IAEvB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAElC;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,iBAAiB,CAAC;IAEpC,+EAA+E;IAC/E,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;CAC3F"}
@@ -1,21 +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.HierarchyNodesDefinition = void 0;
8
- /** @public */
9
- // eslint-disable-next-line @typescript-eslint/no-redeclare
10
- var HierarchyNodesDefinition;
11
- (function (HierarchyNodesDefinition) {
12
- function isGenericNode(def) {
13
- return !!def.node;
14
- }
15
- HierarchyNodesDefinition.isGenericNode = isGenericNode;
16
- function isInstanceNodesQuery(def) {
17
- return !!def.query;
18
- }
19
- HierarchyNodesDefinition.isInstanceNodesQuery = isInstanceNodesQuery;
20
- })(HierarchyNodesDefinition || (exports.HierarchyNodesDefinition = HierarchyNodesDefinition = {}));
21
- //# sourceMappingURL=IModelHierarchyDefinition.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IModelHierarchyDefinition.js","sourceRoot":"","sources":["../../../../src/hierarchies/imodel/IModelHierarchyDefinition.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AA+ChG,cAAc;AACd,2DAA2D;AAC3D,IAAiB,wBAAwB,CAOxC;AAPD,WAAiB,wBAAwB;IACvC,SAAgB,aAAa,CAAC,GAA6B;QACzD,OAAO,CAAC,CAAE,GAAsC,CAAC,IAAI,CAAC;IACxD,CAAC;IAFe,sCAAa,gBAE5B,CAAA;IACD,SAAgB,oBAAoB,CAAC,GAA6B;QAChE,OAAO,CAAC,CAAE,GAAoC,CAAC,KAAK,CAAC;IACvD,CAAC;IAFe,6CAAoB,uBAEnC,CAAA;AACH,CAAC,EAPgB,wBAAwB,wCAAxB,wBAAwB,QAOxC","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 type { GenericInstanceFilter } from \"@itwin/core-common\";\nimport type { EC, ECClassHierarchyInspector, ECSchemaProvider, ECSqlQueryDef } from \"@itwin/presentation-shared\";\nimport type { NonGroupingHierarchyNode, ParentHierarchyNode } from \"../HierarchyNode.js\";\nimport type {\n ProcessedGenericHierarchyNode,\n ProcessedHierarchyNode,\n ProcessedInstanceHierarchyNode,\n SourceGenericHierarchyNode,\n SourceInstanceHierarchyNode,\n} from \"./IModelHierarchyNode.js\";\nimport type { LimitingECSqlQueryExecutor } from \"./LimitingECSqlQueryExecutor.js\";\nimport type { NodesQueryClauseFactory } from \"./NodeSelectQueryFactory.js\";\n\n/**\n * A nodes definition that returns a single generic node.\n * @public\n */\nexport interface GenericHierarchyNodeDefinition {\n /** The node to be created in the hierarchy level */\n node: SourceGenericHierarchyNode;\n}\n\n/**\n * A nodes definition that returns an ECSQL query for selecting nodes from an iModel.\n * @public\n */\nexport interface InstanceNodesQueryDefinition {\n /**\n * Full name of the class whose instances are going to be returned. It's okay if the attribute\n * points to a base class of multiple different classes of instances returned by the query, however\n * the more specific this class is, the more efficient hierarchy building process is.\n */\n fullClassName: EC.FullClassName;\n /**\n * An ECSQL query that selects nodes from an iModel. `SELECT` clause of the query is expected\n * to be built using `NodeSelectQueryFactory.createSelectClause`.\n */\n query: ECSqlQueryDef;\n}\n\n/**\n * A definition of nodes included in a hierarchy level.\n * @public\n */\nexport type HierarchyNodesDefinition = GenericHierarchyNodeDefinition | InstanceNodesQueryDefinition;\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyNodesDefinition {\n export function isGenericNode(def: HierarchyNodesDefinition): def is GenericHierarchyNodeDefinition {\n return !!(def as GenericHierarchyNodeDefinition).node;\n }\n export function isInstanceNodesQuery(def: HierarchyNodesDefinition): def is InstanceNodesQueryDefinition {\n return !!(def as InstanceNodesQueryDefinition).query;\n }\n}\n\n/**\n * A definition of a hierarchy level, which may consist of multiple node definitions.\n * @public\n */\nexport type HierarchyLevelDefinition = HierarchyNodesDefinition[];\n\n/**\n * A type for a function that parses a `SourceInstanceHierarchyNode` from provided ECSQL `row` object.\n * @public\n */\nexport type NodeParser = (props: {\n /** The ECSQL row object to parse. Keys & value types depend on the executed query. */\n row: { [columnName: string]: any };\n\n /** The parent node whose child node is being parsed. */\n parentNode?: HierarchyDefinitionParentNode;\n\n /** The key of iModel which is used to run the query. */\n imodelKey: string;\n}) => SourceInstanceHierarchyNode | Promise<SourceInstanceHierarchyNode>;\n\n/**\n * A type for a function that pre-processes given node. Unless the function decides not to make any modifications,\n * it should return a new - modified - node, rather than modifying the given one. Returning `undefined` omits the node\n * from the hierarchy.\n *\n * @public\n */\nexport type NodePreProcessor = <TNode extends ProcessedGenericHierarchyNode | ProcessedInstanceHierarchyNode>(props: {\n /** Node to be pre-processed. */\n node: TNode;\n\n /** The parent node whose child node is being pre-processed. */\n parentNode?: ParentHierarchyNode;\n}) => Promise<TNode | undefined>;\n\n/**\n * A type for a function that post-processes given node. Unless the function decides not to make any modifications,\n * it should return a new - modified - node, rather than modifying the given one.\n *\n * @public\n */\nexport type NodePostProcessor = (props: {\n /** Node to be post-processed. */\n node: ProcessedHierarchyNode;\n\n /** The parent node whose child node is being post-processed. */\n parentNode?: ParentHierarchyNode;\n}) => Promise<ProcessedHierarchyNode>;\n\n/**\n * A type of node that can be passed to `HierarchyDefinition.defineHierarchyLevel`. This basically means\n * a `HierarchyNode` that:\n * - knows nothing about its children,\n * - is either an instances node (key is of `InstancesNodeKey` type) or a generic node (key is of `GenericNodeKey` type).\n * @public\n */\nexport type HierarchyDefinitionParentNode = Omit<NonGroupingHierarchyNode, \"children\">;\n\n/**\n * Props for `HierarchyDefinition.defineHierarchyLevel`.\n * @public\n */\nexport interface DefineHierarchyLevelProps extends Pick<\n NodesQueryClauseFactory,\n \"createSelectClause\" | \"createFilterClauses\"\n> {\n /** The iModel for which the hierarchy definition is being requested for. */\n imodelAccess: LimitingECSqlQueryExecutor & ECSchemaProvider & ECClassHierarchyInspector & { imodelKey: string };\n\n /** Parent node to get children for. Pass `undefined` to get root nodes. */\n parentNode: HierarchyDefinitionParentNode | undefined;\n\n /** Optional hierarchy level filter. */\n instanceFilter?: GenericInstanceFilter;\n}\n\n/**\n * An interface for a factory that knows how define a hierarchy based on a given parent node.\n * @public\n */\nexport interface HierarchyDefinition {\n /**\n * An optional function for parsing ECInstance node from ECSQL row.\n *\n * Should be used in situations when the `HierarchyDefinition` implementation\n * introduces additional ECSQL columns into the select clause and wants to assign additional\n * data to the nodes it produces.\n *\n * Defaults to a function that parses all `HierarchyNode` attributes from a query, whose SELECT\n * clause is created using `NodeSelectQueryFactory.createSelectClause`.\n */\n parseNode?: NodeParser;\n\n /**\n * An optional function for pre-processing nodes.\n *\n * Pre-processing happens immediately after the nodes are loaded based on `HierarchyLevelDefinition`\n * returned by this `HierarchyDefinition` and before their processing (hiding, grouping, sorting, etc.) starts.\n * The step allows assigning nodes additional data or excluding them from the hierarchy based on some attributes.\n */\n preProcessNode?: NodePreProcessor;\n\n /**\n * An optional function for post-processing nodes.\n *\n * Post-processing happens after the loaded nodes go through all the merging, hiding and grouping\n * steps, but before sorting them. This step allows `HierarchyDefinition` implementations to assign additional data\n * to nodes after they're processed. This is especially true for grouping nodes as they're only created during\n * processing.\n */\n postProcessNode?: NodePostProcessor;\n\n /** A function to create a hierarchy level definition for given parent node. */\n defineHierarchyLevel(props: DefineHierarchyLevelProps): Promise<HierarchyLevelDefinition>;\n}\n"]}
@@ -1,234 +0,0 @@
1
- import type { ConcatenatedValue, EC, InstanceKey, OmitOverUnion, PrimitiveValue } from "@itwin/presentation-shared";
2
- import type { GroupingHierarchyNode, NonGroupingHierarchyNode } from "../HierarchyNode.js";
3
- import type { GenericNodeKey, InstancesNodeKey } from "../HierarchyNodeKey.js";
4
- /**
5
- * Base processing parameters that apply to every node.
6
- * @public
7
- */
8
- interface HierarchyNodeProcessingParamsBase {
9
- /** Indicates if this node should be hidden if it has no child nodes. */
10
- hideIfNoChildren?: boolean;
11
- /** Indicates that this node should always be hidden and its children should be loaded in its place. */
12
- hideInHierarchy?: boolean;
13
- }
14
- /**
15
- * A data structure for defining nodes' grouping requirements.
16
- * @public
17
- */
18
- interface HierarchyNodeGroupingParams {
19
- byLabel?: HierarchyNodeLabelGroupingParams;
20
- byClass?: boolean | HierarchyNodeGroupingParamsBase;
21
- byBaseClasses?: HierarchyNodeBaseClassGroupingParams;
22
- byProperties?: HierarchyNodePropertiesGroupingParams;
23
- }
24
- /**
25
- * A data structure for defining params specifically used for label grouping.
26
- * @public
27
- */
28
- interface HierarchyNodeLabelGroupingBaseParams {
29
- /** Label grouping option that determines whether to group nodes or to merge them. Defaults to "group".*/
30
- action?: "group" | "merge";
31
- /** Value that needs to match in order for nodes to be grouped or merged.*/
32
- groupId?: string;
33
- }
34
- /**
35
- * A data structure for defining label merging.
36
- * @public
37
- */
38
- interface HierarchyNodeLabelGroupingMergeParams extends HierarchyNodeLabelGroupingBaseParams {
39
- action: "merge";
40
- }
41
- /**
42
- * A data structure for defining label grouping with additional parameters.
43
- * @public
44
- */
45
- interface HierarchyNodeLabelGroupingGroupParams extends HierarchyNodeLabelGroupingBaseParams, HierarchyNodeGroupingParamsBase {
46
- action?: "group";
47
- }
48
- /**
49
- * A data structure for defining possible label grouping types.
50
- * @public
51
- */
52
- export type HierarchyNodeLabelGroupingParams = boolean | HierarchyNodeLabelGroupingMergeParams | HierarchyNodeLabelGroupingGroupParams;
53
- /**
54
- * Grouping parameters that are shared across all types of groupings.
55
- * @public
56
- */
57
- export interface HierarchyNodeGroupingParamsBase {
58
- /** Hiding option that determines whether to hide group nodes which have no siblings at the same hierarchy level. */
59
- hideIfNoSiblings?: boolean;
60
- /** Hiding option that determines whether to hide group nodes which have only one node as its children. */
61
- hideIfOneGroupedNode?: boolean;
62
- /** Option which auto expands grouping nodes' children when it has single child or always. */
63
- autoExpand?: HierarchyNodeAutoExpandProp;
64
- }
65
- /**
66
- * Defines possible values for `BaseGroupingParams.autoExpand` attribute:
67
- * - `single-child` - set the grouping node to auto-expand if it groups a single node.
68
- * - `always` - always set the grouping node to auto-expand.
69
- * @public
70
- */
71
- export type HierarchyNodeAutoExpandProp = "single-child" | "always";
72
- /**
73
- * A data structure that represents base class grouping.
74
- * @public
75
- */
76
- interface HierarchyNodeBaseClassGroupingParams extends HierarchyNodeGroupingParamsBase {
77
- /**
78
- * Full names of classes, which should be used to group the node. Only has effect if the node
79
- * represents an instance of that class.
80
- *
81
- * Full class name format: `SchemaName.ClassName`.
82
- */
83
- fullClassNames: EC.FullClassName[];
84
- }
85
- /**
86
- * A data structure that represents properties grouping.
87
- * @public
88
- */
89
- export interface HierarchyNodePropertiesGroupingParams extends HierarchyNodeGroupingParamsBase {
90
- /**
91
- * Full name of a class whose properties are used to group the node. Only has effect if the node
92
- * represents an instance of that class.
93
- *
94
- * Full class name format: `SchemaName.ClassName`.
95
- */
96
- propertiesClassName: EC.FullClassName;
97
- /**
98
- * Property grouping option that determines whether to group nodes whose grouping value is not set or is set to an empty string.
99
- *
100
- * Label of the created grouping node will be `Not Specified`.
101
- */
102
- createGroupForUnspecifiedValues?: boolean;
103
- /**
104
- * Property grouping option that determines whether to group nodes whose grouping value doesn't fit within any of the provided
105
- * ranges, or is not a numeric value.
106
- *
107
- * Label of the created grouping node will be `Other`.
108
- */
109
- createGroupForOutOfRangeValues?: boolean;
110
- /**
111
- * Properties of the specified class, by which the nodes should be grouped. Each provided group definition results in a
112
- * grouping hierarchy level.
113
- *
114
- * Example usage:
115
- * ```ts
116
- * propertyGroups: [
117
- * {
118
- * propertyName: "type",
119
- * propertyValue: "Wall"
120
- * },
121
- * {
122
- * propertyName: "length",
123
- * propertyValue: 15,
124
- * ranges: [
125
- * { fromValue: 1, toValue: 10, rangeLabel: "Small" },
126
- * { fromValue: 11, toValue: 20, rangeLabel: "Medium" }
127
- * ]
128
- * },
129
- * ]
130
- * ```
131
- */
132
- propertyGroups: HierarchyNodePropertyGroup[];
133
- }
134
- /**
135
- * A data structure that represents specific properties' grouping params.
136
- * @public
137
- */
138
- export interface HierarchyNodePropertyGroup {
139
- /** A string indicating the name of the property to group by. */
140
- propertyName: string;
141
- /** Value of the property, which will be used to group the node. */
142
- propertyValue?: PrimitiveValue | ConcatenatedValue;
143
- /** Ranges are used to group nodes by numeric properties which are within specified bounds. */
144
- ranges?: HierarchyNodePropertyValueRange[];
145
- }
146
- /**
147
- * A data structure that represents boundaries for a value.
148
- * @public
149
- */
150
- export interface HierarchyNodePropertyValueRange {
151
- /** Defines the lower bound of the range. */
152
- fromValue: number;
153
- /** Defines the upper bound of the range. */
154
- toValue: number;
155
- /** Defines the range label. Will be used as `PropertyValueRangeGroupingNode` node's display label. */
156
- rangeLabel?: string;
157
- }
158
- /**
159
- * Processing parameters that apply to instance nodes.
160
- * @public
161
- */
162
- export interface InstanceHierarchyNodeProcessingParams extends HierarchyNodeProcessingParamsBase {
163
- grouping?: HierarchyNodeGroupingParams;
164
- }
165
- /**
166
- * A generic (not based on data in an iModel) node that has processing parameters.
167
- * @public
168
- */
169
- export type ProcessedGenericHierarchyNode = Omit<NonGroupingHierarchyNode, "key" | "children"> & {
170
- key: GenericNodeKey;
171
- children?: boolean;
172
- processingParams?: HierarchyNodeProcessingParamsBase;
173
- };
174
- /**
175
- * An instances' (based on data in an iModel) node that has processing parameters.
176
- * @public
177
- */
178
- export type ProcessedInstanceHierarchyNode = Omit<NonGroupingHierarchyNode, "key" | "children"> & {
179
- key: InstancesNodeKey;
180
- children?: boolean;
181
- processingParams?: InstanceHierarchyNodeProcessingParams;
182
- };
183
- /**
184
- * A grouping node that groups either instance nodes or other grouping nodes.
185
- * @public
186
- */
187
- export type ProcessedGroupingHierarchyNode = Omit<GroupingHierarchyNode, "children"> & {
188
- children: Array<ProcessedGroupingHierarchyNode | ProcessedInstanceHierarchyNode>;
189
- };
190
- /**
191
- * A `HierarchyNode` that may have processing parameters defining whether it should be hidden under some conditions,
192
- * how it should be grouped, sorted, etc.
193
- *
194
- * Type guards under `HierarchyNode` namespace can be used to differentiate between different sub-types of
195
- * `ProcessedHierarchyNode`.
196
- *
197
- * @public
198
- */
199
- export type ProcessedHierarchyNode = ProcessedGenericHierarchyNode | ProcessedInstanceHierarchyNode | ProcessedGroupingHierarchyNode;
200
- /** @public */
201
- export declare namespace ProcessedHierarchyNode {
202
- /** Checks whether the given node is a generic node */
203
- function isGeneric(node: ProcessedHierarchyNode): node is ProcessedGenericHierarchyNode;
204
- /** Checks whether the given node is an ECInstances-based node */
205
- function isInstancesNode(node: ProcessedHierarchyNode): node is ProcessedInstanceHierarchyNode;
206
- /** Checks whether the given node is a grouping node */
207
- function isGroupingNode(node: ProcessedHierarchyNode): node is ProcessedGroupingHierarchyNode;
208
- }
209
- /**
210
- * A `ProcessedHierarchyNode` that has an unformatted label in a form of `ConcatenatedValue`. Generally this is
211
- * returned by hierarchy definitions as a generic node or when the node is just parsed from query results.
212
- * @public
213
- */
214
- export type SourceHierarchyNode<TBase = SourceGenericHierarchyNode | SourceInstanceHierarchyNode> = OmitOverUnion<TBase, "label" | "parentKeys"> & {
215
- label: string | ConcatenatedValue;
216
- };
217
- /**
218
- * A kind of `ProcessedGenericHierarchyNode` that has unformatted label and doesn't know about its ancestors.
219
- * @public
220
- */
221
- export type SourceGenericHierarchyNode = SourceHierarchyNode<Omit<ProcessedGenericHierarchyNode, "key"> & {
222
- key: string;
223
- }>;
224
- /**
225
- * A kind of `ProcessedInstanceHierarchyNode` that has unformatted label and doesn't know about its ancestors.
226
- * @public
227
- */
228
- export type SourceInstanceHierarchyNode = SourceHierarchyNode<Omit<ProcessedInstanceHierarchyNode, "key"> & {
229
- key: Omit<InstancesNodeKey, "instanceKeys"> & {
230
- instanceKeys: InstanceKey[];
231
- };
232
- }>;
233
- export {};
234
- //# sourceMappingURL=IModelHierarchyNode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IModelHierarchyNode.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/imodel/IModelHierarchyNode.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACpH,OAAO,KAAK,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/E;;;GAGG;AACH,UAAU,iCAAiC;IACzC,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,uGAAuG;IACvG,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;GAGG;AACH,UAAU,2BAA2B;IACnC,OAAO,CAAC,EAAE,gCAAgC,CAAC;IAC3C,OAAO,CAAC,EAAE,OAAO,GAAG,+BAA+B,CAAC;IACpD,aAAa,CAAC,EAAE,oCAAoC,CAAC;IACrD,YAAY,CAAC,EAAE,qCAAqC,CAAC;CACtD;AAED;;;GAGG;AACH,UAAU,oCAAoC;IAC5C,yGAAyG;IACzG,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC3B,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,UAAU,qCAAsC,SAAQ,oCAAoC;IAC1F,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;GAGG;AACH,UAAU,qCACR,SAAQ,oCAAoC,EAAE,+BAA+B;IAC7E,MAAM,CAAC,EAAE,OAAO,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OAAO,GAAG,YAAY,CACvB,GAAG;IAAE,KAAK,EAAE,MAAM,GAAG,iBAAiB,CAAA;CAAE,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG,mBAAmB,CAC1D,IAAI,CAAC,6BAA6B,EAAE,KAAK,CAAC,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAC7D,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG,mBAAmB,CAC3D,IAAI,CAAC,8BAA8B,EAAE,KAAK,CAAC,GAAG;IAC5C,GAAG,EAAE,IAAI,CAAC,gBAAgB,EAAE,cAAc,CAAC,GAAG;QAAE,YAAY,EAAE,WAAW,EAAE,CAAA;KAAE,CAAC;CAC/E,CACF,CAAC"}
@@ -1,29 +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.ProcessedHierarchyNode = void 0;
8
- const HierarchyNodeKey_js_1 = require("../HierarchyNodeKey.js");
9
- /** @public */
10
- // eslint-disable-next-line @typescript-eslint/no-redeclare
11
- var ProcessedHierarchyNode;
12
- (function (ProcessedHierarchyNode) {
13
- /** Checks whether the given node is a generic node */
14
- function isGeneric(node) {
15
- return HierarchyNodeKey_js_1.HierarchyNodeKey.isGeneric(node.key);
16
- }
17
- ProcessedHierarchyNode.isGeneric = isGeneric;
18
- /** Checks whether the given node is an ECInstances-based node */
19
- function isInstancesNode(node) {
20
- return HierarchyNodeKey_js_1.HierarchyNodeKey.isInstances(node.key);
21
- }
22
- ProcessedHierarchyNode.isInstancesNode = isInstancesNode;
23
- /** Checks whether the given node is a grouping node */
24
- function isGroupingNode(node) {
25
- return HierarchyNodeKey_js_1.HierarchyNodeKey.isGrouping(node.key);
26
- }
27
- ProcessedHierarchyNode.isGroupingNode = isGroupingNode;
28
- })(ProcessedHierarchyNode || (exports.ProcessedHierarchyNode = ProcessedHierarchyNode = {}));
29
- //# sourceMappingURL=IModelHierarchyNode.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IModelHierarchyNode.js","sourceRoot":"","sources":["../../../../src/hierarchies/imodel/IModelHierarchyNode.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,gEAA0D;AAkO1D,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 { HierarchyNodeKey } from \"../HierarchyNodeKey.js\";\n\nimport type { ConcatenatedValue, EC, InstanceKey, OmitOverUnion, PrimitiveValue } from \"@itwin/presentation-shared\";\nimport type { GroupingHierarchyNode, NonGroupingHierarchyNode } from \"../HierarchyNode.js\";\nimport type { GenericNodeKey, 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\n 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 =\n | boolean\n | HierarchyNodeLabelGroupingMergeParams\n | 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: EC.FullClassName[];\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: EC.FullClassName;\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 =\n | ProcessedGenericHierarchyNode\n | ProcessedInstanceHierarchyNode\n | 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<\n TBase,\n \"label\" | \"parentKeys\"\n> & { label: string | ConcatenatedValue };\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<\n Omit<ProcessedGenericHierarchyNode, \"key\"> & { key: string }\n>;\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 +0,0 @@
1
- {"version":3,"file":"IModelHierarchyProvider.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/imodel/IModelHierarchyProvider.ts"],"names":[],"mappings":"AAKA,OAAO,gCAAgC,CAAC;AAkCxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA6B5D,OAAO,KAAK,EAEV,yBAAyB,EACzB,gBAAgB,EAEhB,KAAK,EAEL,iCAAiC,EACjC,wBAAwB,EACzB,MAAM,4BAA4B,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