@itwin/presentation-common 3.6.0-dev.8 → 4.0.0-dev.2

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 (368) hide show
  1. package/CHANGELOG.md +26 -1
  2. package/LICENSE.md +1 -1
  3. package/Ruleset.schema.json +236 -309
  4. package/lib/cjs/presentation-common/EC.d.ts +52 -17
  5. package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
  6. package/lib/cjs/presentation-common/EC.js +74 -54
  7. package/lib/cjs/presentation-common/EC.js.map +1 -1
  8. package/lib/cjs/presentation-common/ElementProperties.d.ts +14 -14
  9. package/lib/cjs/presentation-common/ElementProperties.js.map +1 -1
  10. package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts +43 -9
  11. package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
  12. package/lib/cjs/presentation-common/InstanceFilterDefinition.js.map +1 -1
  13. package/lib/cjs/presentation-common/KeySet.d.ts.map +1 -1
  14. package/lib/cjs/presentation-common/KeySet.js +5 -0
  15. package/lib/cjs/presentation-common/KeySet.js.map +1 -1
  16. package/lib/cjs/presentation-common/LabelDefinition.d.ts +24 -16
  17. package/lib/cjs/presentation-common/LabelDefinition.d.ts.map +1 -1
  18. package/lib/cjs/presentation-common/LabelDefinition.js +26 -29
  19. package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
  20. package/lib/cjs/presentation-common/PresentationIpcInterface.d.ts +7 -4
  21. package/lib/cjs/presentation-common/PresentationIpcInterface.d.ts.map +1 -1
  22. package/lib/cjs/presentation-common/PresentationIpcInterface.js.map +1 -1
  23. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts +30 -11
  24. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  25. package/lib/cjs/presentation-common/PresentationManagerOptions.js +1 -1
  26. package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
  27. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts +24 -19
  28. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  29. package/lib/cjs/presentation-common/PresentationRpcInterface.js +7 -5
  30. package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
  31. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts +9 -8
  32. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  33. package/lib/cjs/presentation-common/RpcRequestsHandler.js +17 -1
  34. package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
  35. package/lib/cjs/presentation-common/RulesetVariables.d.ts +5 -0
  36. package/lib/cjs/presentation-common/RulesetVariables.d.ts.map +1 -1
  37. package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
  38. package/lib/cjs/presentation-common/Update.d.ts +23 -4
  39. package/lib/cjs/presentation-common/Update.d.ts.map +1 -1
  40. package/lib/cjs/presentation-common/Update.js +34 -4
  41. package/lib/cjs/presentation-common/Update.js.map +1 -1
  42. package/lib/cjs/presentation-common/content/Category.d.ts.map +1 -1
  43. package/lib/cjs/presentation-common/content/Category.js +1 -2
  44. package/lib/cjs/presentation-common/content/Category.js.map +1 -1
  45. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts +194 -24
  46. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  47. package/lib/cjs/presentation-common/content/ContentTraverser.js +63 -44
  48. package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
  49. package/lib/cjs/presentation-common/content/Descriptor.d.ts +76 -23
  50. package/lib/cjs/presentation-common/content/Descriptor.d.ts.map +1 -1
  51. package/lib/cjs/presentation-common/content/Descriptor.js +5 -7
  52. package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
  53. package/lib/cjs/presentation-common/content/Fields.d.ts +24 -5
  54. package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
  55. package/lib/cjs/presentation-common/content/Fields.js +10 -7
  56. package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
  57. package/lib/cjs/presentation-common/content/Item.d.ts +8 -10
  58. package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
  59. package/lib/cjs/presentation-common/content/Item.js +6 -8
  60. package/lib/cjs/presentation-common/content/Item.js.map +1 -1
  61. package/lib/cjs/presentation-common/content/Property.d.ts +8 -2
  62. package/lib/cjs/presentation-common/content/Property.d.ts.map +1 -1
  63. package/lib/cjs/presentation-common/content/Property.js +12 -8
  64. package/lib/cjs/presentation-common/content/Property.js.map +1 -1
  65. package/lib/cjs/presentation-common/content/Value.d.ts +43 -11
  66. package/lib/cjs/presentation-common/content/Value.d.ts.map +1 -1
  67. package/lib/cjs/presentation-common/content/Value.js +72 -16
  68. package/lib/cjs/presentation-common/content/Value.js.map +1 -1
  69. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts +38 -0
  70. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -0
  71. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js +32 -0
  72. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -0
  73. package/lib/cjs/presentation-common/hierarchy/Key.d.ts +75 -14
  74. package/lib/cjs/presentation-common/hierarchy/Key.d.ts.map +1 -1
  75. package/lib/cjs/presentation-common/hierarchy/Key.js +15 -6
  76. package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
  77. package/lib/cjs/presentation-common/hierarchy/Node.d.ts +32 -19
  78. package/lib/cjs/presentation-common/hierarchy/Node.d.ts.map +1 -1
  79. package/lib/cjs/presentation-common/hierarchy/Node.js +23 -14
  80. package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
  81. package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts +18 -7
  82. package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
  83. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js +33 -9
  84. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  85. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts +5 -2
  86. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts.map +1 -1
  87. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  88. package/lib/cjs/presentation-common/rules/Rule.d.ts +6 -4
  89. package/lib/cjs/presentation-common/rules/Rule.d.ts.map +1 -1
  90. package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
  91. package/lib/cjs/presentation-common/rules/Ruleset.d.ts +0 -1
  92. package/lib/cjs/presentation-common/rules/Ruleset.d.ts.map +1 -1
  93. package/lib/cjs/presentation-common/rules/Ruleset.js.map +1 -1
  94. package/lib/cjs/presentation-common/rules/SchemasSpecification.d.ts +1 -1
  95. package/lib/cjs/presentation-common/rules/SchemasSpecification.js.map +1 -1
  96. package/lib/cjs/presentation-common/rules/Variables.d.ts +5 -2
  97. package/lib/cjs/presentation-common/rules/Variables.d.ts.map +1 -1
  98. package/lib/cjs/presentation-common/rules/Variables.js.map +1 -1
  99. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +3 -3
  100. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts.map +1 -1
  101. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  102. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +2 -2
  103. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts.map +1 -1
  104. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  105. package/lib/cjs/presentation-common/rules/content/ContentRule.d.ts +2 -2
  106. package/lib/cjs/presentation-common/rules/content/ContentRule.d.ts.map +1 -1
  107. package/lib/cjs/presentation-common/rules/content/ContentRule.js.map +1 -1
  108. package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts +6 -3
  109. package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
  110. package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  111. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +2 -2
  112. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts.map +1 -1
  113. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  114. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +2 -2
  115. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts.map +1 -1
  116. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  117. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.d.ts +2 -2
  118. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.d.ts.map +1 -1
  119. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  120. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +9 -6
  121. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts.map +1 -1
  122. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  123. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +6 -3
  124. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts.map +1 -1
  125. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  126. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts +3 -3
  127. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts.map +1 -1
  128. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
  129. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.d.ts +2 -2
  130. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.d.ts.map +1 -1
  131. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  132. package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts +20 -13
  133. package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
  134. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js +1 -1
  135. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  136. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts +3 -3
  137. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts.map +1 -1
  138. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
  139. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts +17 -15
  140. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
  141. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  142. package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts +3 -3
  143. package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts.map +1 -1
  144. package/lib/cjs/presentation-common/rules/customization/LabelOverride.js.map +1 -1
  145. package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts +3 -3
  146. package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts.map +1 -1
  147. package/lib/cjs/presentation-common/rules/customization/SortingRule.js.map +1 -1
  148. package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts +3 -3
  149. package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts.map +1 -1
  150. package/lib/cjs/presentation-common/rules/customization/StyleOverride.js.map +1 -1
  151. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +1 -2
  152. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.d.ts.map +1 -1
  153. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  154. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +5 -4
  155. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
  156. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js +0 -1
  157. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  158. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +2 -2
  159. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
  160. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  161. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +9 -6
  162. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts.map +1 -1
  163. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  164. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +3 -3
  165. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
  166. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  167. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +2 -2
  168. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts.map +1 -1
  169. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  170. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +2 -2
  171. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts.map +1 -1
  172. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  173. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.d.ts +1 -2
  174. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.d.ts.map +1 -1
  175. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  176. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.d.ts +0 -1
  177. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.d.ts.map +1 -1
  178. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  179. package/lib/cjs/presentation-common/selection/SelectionScope.d.ts +17 -4
  180. package/lib/cjs/presentation-common/selection/SelectionScope.d.ts.map +1 -1
  181. package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
  182. package/lib/cjs/presentation-common.d.ts +1 -0
  183. package/lib/cjs/presentation-common.d.ts.map +1 -1
  184. package/lib/cjs/presentation-common.js +1 -0
  185. package/lib/cjs/presentation-common.js.map +1 -1
  186. package/lib/esm/presentation-common/EC.d.ts +52 -17
  187. package/lib/esm/presentation-common/EC.d.ts.map +1 -1
  188. package/lib/esm/presentation-common/EC.js +75 -55
  189. package/lib/esm/presentation-common/EC.js.map +1 -1
  190. package/lib/esm/presentation-common/ElementProperties.d.ts +14 -14
  191. package/lib/esm/presentation-common/ElementProperties.js.map +1 -1
  192. package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts +43 -9
  193. package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
  194. package/lib/esm/presentation-common/InstanceFilterDefinition.js.map +1 -1
  195. package/lib/esm/presentation-common/KeySet.d.ts.map +1 -1
  196. package/lib/esm/presentation-common/KeySet.js +5 -0
  197. package/lib/esm/presentation-common/KeySet.js.map +1 -1
  198. package/lib/esm/presentation-common/LabelDefinition.d.ts +24 -16
  199. package/lib/esm/presentation-common/LabelDefinition.d.ts.map +1 -1
  200. package/lib/esm/presentation-common/LabelDefinition.js +26 -29
  201. package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
  202. package/lib/esm/presentation-common/PresentationIpcInterface.d.ts +7 -4
  203. package/lib/esm/presentation-common/PresentationIpcInterface.d.ts.map +1 -1
  204. package/lib/esm/presentation-common/PresentationIpcInterface.js.map +1 -1
  205. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts +30 -11
  206. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  207. package/lib/esm/presentation-common/PresentationManagerOptions.js +1 -1
  208. package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
  209. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts +24 -19
  210. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  211. package/lib/esm/presentation-common/PresentationRpcInterface.js +7 -5
  212. package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
  213. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts +9 -8
  214. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  215. package/lib/esm/presentation-common/RpcRequestsHandler.js +17 -1
  216. package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
  217. package/lib/esm/presentation-common/RulesetVariables.d.ts +5 -0
  218. package/lib/esm/presentation-common/RulesetVariables.d.ts.map +1 -1
  219. package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
  220. package/lib/esm/presentation-common/Update.d.ts +23 -4
  221. package/lib/esm/presentation-common/Update.d.ts.map +1 -1
  222. package/lib/esm/presentation-common/Update.js +34 -4
  223. package/lib/esm/presentation-common/Update.js.map +1 -1
  224. package/lib/esm/presentation-common/content/Category.d.ts.map +1 -1
  225. package/lib/esm/presentation-common/content/Category.js +1 -2
  226. package/lib/esm/presentation-common/content/Category.js.map +1 -1
  227. package/lib/esm/presentation-common/content/ContentTraverser.d.ts +194 -24
  228. package/lib/esm/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  229. package/lib/esm/presentation-common/content/ContentTraverser.js +60 -42
  230. package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
  231. package/lib/esm/presentation-common/content/Descriptor.d.ts +76 -23
  232. package/lib/esm/presentation-common/content/Descriptor.d.ts.map +1 -1
  233. package/lib/esm/presentation-common/content/Descriptor.js +5 -7
  234. package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
  235. package/lib/esm/presentation-common/content/Fields.d.ts +24 -5
  236. package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
  237. package/lib/esm/presentation-common/content/Fields.js +11 -8
  238. package/lib/esm/presentation-common/content/Fields.js.map +1 -1
  239. package/lib/esm/presentation-common/content/Item.d.ts +8 -10
  240. package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
  241. package/lib/esm/presentation-common/content/Item.js +6 -8
  242. package/lib/esm/presentation-common/content/Item.js.map +1 -1
  243. package/lib/esm/presentation-common/content/Property.d.ts +8 -2
  244. package/lib/esm/presentation-common/content/Property.d.ts.map +1 -1
  245. package/lib/esm/presentation-common/content/Property.js +12 -8
  246. package/lib/esm/presentation-common/content/Property.js.map +1 -1
  247. package/lib/esm/presentation-common/content/Value.d.ts +43 -11
  248. package/lib/esm/presentation-common/content/Value.d.ts.map +1 -1
  249. package/lib/esm/presentation-common/content/Value.js +72 -16
  250. package/lib/esm/presentation-common/content/Value.js.map +1 -1
  251. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts +38 -0
  252. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -0
  253. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js +29 -0
  254. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -0
  255. package/lib/esm/presentation-common/hierarchy/Key.d.ts +75 -14
  256. package/lib/esm/presentation-common/hierarchy/Key.d.ts.map +1 -1
  257. package/lib/esm/presentation-common/hierarchy/Key.js +15 -6
  258. package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
  259. package/lib/esm/presentation-common/hierarchy/Node.d.ts +32 -19
  260. package/lib/esm/presentation-common/hierarchy/Node.d.ts.map +1 -1
  261. package/lib/esm/presentation-common/hierarchy/Node.js +23 -14
  262. package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
  263. package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts +18 -7
  264. package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
  265. package/lib/esm/presentation-common/hierarchy/NodePathElement.js +33 -9
  266. package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  267. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts +5 -2
  268. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts.map +1 -1
  269. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  270. package/lib/esm/presentation-common/rules/Rule.d.ts +6 -4
  271. package/lib/esm/presentation-common/rules/Rule.d.ts.map +1 -1
  272. package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
  273. package/lib/esm/presentation-common/rules/Ruleset.d.ts +0 -1
  274. package/lib/esm/presentation-common/rules/Ruleset.d.ts.map +1 -1
  275. package/lib/esm/presentation-common/rules/Ruleset.js.map +1 -1
  276. package/lib/esm/presentation-common/rules/SchemasSpecification.d.ts +1 -1
  277. package/lib/esm/presentation-common/rules/SchemasSpecification.js.map +1 -1
  278. package/lib/esm/presentation-common/rules/Variables.d.ts +5 -2
  279. package/lib/esm/presentation-common/rules/Variables.d.ts.map +1 -1
  280. package/lib/esm/presentation-common/rules/Variables.js.map +1 -1
  281. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +3 -3
  282. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts.map +1 -1
  283. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  284. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +2 -2
  285. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts.map +1 -1
  286. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  287. package/lib/esm/presentation-common/rules/content/ContentRule.d.ts +2 -2
  288. package/lib/esm/presentation-common/rules/content/ContentRule.d.ts.map +1 -1
  289. package/lib/esm/presentation-common/rules/content/ContentRule.js.map +1 -1
  290. package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts +6 -3
  291. package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
  292. package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  293. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +2 -2
  294. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts.map +1 -1
  295. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  296. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +2 -2
  297. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts.map +1 -1
  298. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  299. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.d.ts +2 -2
  300. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.d.ts.map +1 -1
  301. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  302. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +9 -6
  303. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts.map +1 -1
  304. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  305. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +6 -3
  306. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts.map +1 -1
  307. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  308. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts +3 -3
  309. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts.map +1 -1
  310. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
  311. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.d.ts +2 -2
  312. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.d.ts.map +1 -1
  313. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  314. package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts +20 -13
  315. package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
  316. package/lib/esm/presentation-common/rules/customization/GroupingRule.js +1 -1
  317. package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  318. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts +3 -3
  319. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts.map +1 -1
  320. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
  321. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts +17 -15
  322. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
  323. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  324. package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts +3 -3
  325. package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts.map +1 -1
  326. package/lib/esm/presentation-common/rules/customization/LabelOverride.js.map +1 -1
  327. package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts +3 -3
  328. package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts.map +1 -1
  329. package/lib/esm/presentation-common/rules/customization/SortingRule.js.map +1 -1
  330. package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts +3 -3
  331. package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts.map +1 -1
  332. package/lib/esm/presentation-common/rules/customization/StyleOverride.js.map +1 -1
  333. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +1 -2
  334. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.d.ts.map +1 -1
  335. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  336. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +5 -4
  337. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
  338. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js +0 -1
  339. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  340. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +2 -2
  341. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
  342. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  343. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +9 -6
  344. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts.map +1 -1
  345. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  346. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +3 -3
  347. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
  348. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  349. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +2 -2
  350. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts.map +1 -1
  351. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  352. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +2 -2
  353. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts.map +1 -1
  354. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  355. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.d.ts +1 -2
  356. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.d.ts.map +1 -1
  357. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  358. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.d.ts +0 -1
  359. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.d.ts.map +1 -1
  360. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  361. package/lib/esm/presentation-common/selection/SelectionScope.d.ts +17 -4
  362. package/lib/esm/presentation-common/selection/SelectionScope.d.ts.map +1 -1
  363. package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
  364. package/lib/esm/presentation-common.d.ts +1 -0
  365. package/lib/esm/presentation-common.d.ts.map +1 -1
  366. package/lib/esm/presentation-common.js +1 -0
  367. package/lib/esm/presentation-common.js.map +1 -1
  368. package/package.json +10 -10
@@ -1,7 +1,8 @@
1
1
  /** @packageDocumentation
2
2
  * @module Hierarchies
3
3
  */
4
- import { InstanceKey, InstanceKeyJSON } from "../EC";
4
+ import { Id64String } from "@itwin/core-bentley";
5
+ import { InstanceKey } from "../EC";
5
6
  /**
6
7
  * Standard node types
7
8
  * @public
@@ -19,29 +20,35 @@ export declare enum StandardNodeTypes {
19
20
  export declare type NodeKey = BaseNodeKey | ECInstancesNodeKey | ECClassGroupingNodeKey | ECPropertyGroupingNodeKey | LabelGroupingNodeKey;
20
21
  /** @public */
21
22
  export declare namespace NodeKey {
22
- /** Serialize given [[NodeKey]] to JSON */
23
+ /**
24
+ * Serialize given [[NodeKey]] to JSON
25
+ * @deprecated in 3.x. Use [[NodeKey]].
26
+ */
23
27
  function toJSON(key: NodeKey): NodeKeyJSON;
24
- /** Deserialize node key from JSON */
28
+ /**
29
+ * Deserialize node key from JSON
30
+ * @deprecated in 3.x. Use [[NodeKey]].
31
+ */
25
32
  function fromJSON(json: NodeKeyJSON): NodeKey;
26
33
  /** Checks if the supplied key is an [[ECInstancesNodeKey]] */
27
34
  function isInstancesNodeKey(key: NodeKey): key is ECInstancesNodeKey;
28
- /** Checks if the supplied key is an [[ECInstancesNodeKey]] */
35
+ /** Checks if the supplied key is an [[ECInstancesNodeKey]]. @deprecated in 3.x */
29
36
  function isInstancesNodeKey(key: NodeKeyJSON): key is ECInstancesNodeKeyJSON;
30
37
  /** Checks if the supplied key is an [[ECClassGroupingNodeKey]] */
31
38
  function isClassGroupingNodeKey(key: NodeKey): key is ECClassGroupingNodeKey;
32
- /** Checks if the supplied key is an [[ECClassGroupingNodeKey]] */
39
+ /** Checks if the supplied key is an [[ECClassGroupingNodeKey]]. @deprecated in 3.x */
33
40
  function isClassGroupingNodeKey(key: NodeKeyJSON): key is ECClassGroupingNodeKeyJSON;
34
41
  /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]] */
35
42
  function isPropertyGroupingNodeKey(key: NodeKey): key is ECPropertyGroupingNodeKey;
36
- /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]] */
43
+ /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]]. @deprecated in 3.x */
37
44
  function isPropertyGroupingNodeKey(key: NodeKeyJSON): key is ECPropertyGroupingNodeKeyJSON;
38
45
  /** Checks if the supplied key is a [[LabelGroupingNodeKey]] */
39
46
  function isLabelGroupingNodeKey(key: NodeKey): key is LabelGroupingNodeKey;
40
- /** Checks if the supplied key is a [[LabelGroupingNodeKey]] */
47
+ /** Checks if the supplied key is a [[LabelGroupingNodeKey]]. @deprecated in 3.x */
41
48
  function isLabelGroupingNodeKey(key: NodeKeyJSON): key is LabelGroupingNodeKeyJSON;
42
49
  /** Checks if the supplied key is a grouping node key */
43
50
  function isGroupingNodeKey(key: NodeKey): key is GroupingNodeKey;
44
- /** Checks if the supplied key is a grouping node key */
51
+ /** Checks if the supplied key is a grouping node key. @deprecated in 3.x */
45
52
  function isGroupingNodeKey(key: NodeKeyJSON): key is GroupingNodeKeyJSON;
46
53
  /**
47
54
  * Checks if two given node keys are equal, taking their versions into account.
@@ -73,15 +80,22 @@ export interface BaseNodeKey {
73
80
  version: number;
74
81
  /** Node hash path from root to the node whose key this is */
75
82
  pathFromRoot: string[];
83
+ /** Query that returns all selected instance keys
84
+ * @alpha
85
+ */
86
+ instanceKeysSelectQuery?: PresentationQuery;
76
87
  }
77
88
  /**
78
89
  * Serialized [[BaseNodeKey]] JSON representation.
79
90
  * @public
91
+ * @deprecated in 3.x. Use [[BaseNodeKey]].
80
92
  */
81
93
  export interface BaseNodeKeyJSON {
82
94
  type: string;
83
95
  version?: number;
84
96
  pathFromRoot: string[];
97
+ /** @alpha */
98
+ instanceKeysSelectQuery?: PresentationQuery;
85
99
  }
86
100
  /**
87
101
  * Data structure that describes a node ECInstance node key
@@ -95,10 +109,11 @@ export interface ECInstancesNodeKey extends BaseNodeKey {
95
109
  /**
96
110
  * Serialized [[ECInstancesNodeKey]] JSON representation.
97
111
  * @public
112
+ * @deprecated in 3.x. Use [[ECInstancesNodeKey]].
98
113
  */
99
- export interface ECInstancesNodeKeyJSON extends BaseNodeKeyJSON {
114
+ export interface ECInstancesNodeKeyJSON extends BaseNodeKey {
100
115
  type: StandardNodeTypes.ECInstancesNode;
101
- instanceKeys: InstanceKeyJSON[];
116
+ instanceKeys: InstanceKey[];
102
117
  }
103
118
  /**
104
119
  * Data structure that describes a grouping node key
@@ -117,8 +132,9 @@ export interface GroupingNodeKey extends BaseNodeKey {
117
132
  /**
118
133
  * Serialized [[GroupingNodeKey]] JSON representation.
119
134
  * @public
135
+ * @deprecated in 3.x. Use [[GroupingNodeKey]].
120
136
  */
121
- export interface GroupingNodeKeyJSON extends BaseNodeKeyJSON {
137
+ export interface GroupingNodeKeyJSON extends BaseNodeKey {
122
138
  groupedInstancesCount: number;
123
139
  }
124
140
  /**
@@ -133,8 +149,9 @@ export interface ECClassGroupingNodeKey extends GroupingNodeKey {
133
149
  /**
134
150
  * Serialized [[ECClassGroupingNodeKey]] JSON representation.
135
151
  * @public
152
+ * @deprecated in 3.x. Use [[ECClassGroupingNodeKey]].
136
153
  */
137
- export interface ECClassGroupingNodeKeyJSON extends GroupingNodeKeyJSON {
154
+ export interface ECClassGroupingNodeKeyJSON extends GroupingNodeKey {
138
155
  type: StandardNodeTypes.ECClassGroupingNode;
139
156
  className: string;
140
157
  }
@@ -154,8 +171,9 @@ export interface ECPropertyGroupingNodeKey extends GroupingNodeKey {
154
171
  /**
155
172
  * Serialized [[ECPropertyGroupingNodeKey]] JSON representation.
156
173
  * @public
174
+ * @deprecated in 3.x. Use [[ECPropertyGroupingNodeKey]].
157
175
  */
158
- export interface ECPropertyGroupingNodeKeyJSON extends GroupingNodeKeyJSON {
176
+ export interface ECPropertyGroupingNodeKeyJSON extends GroupingNodeKey {
159
177
  type: StandardNodeTypes.ECPropertyGroupingNode;
160
178
  className: string;
161
179
  propertyName: string;
@@ -173,14 +191,57 @@ export interface LabelGroupingNodeKey extends GroupingNodeKey {
173
191
  /**
174
192
  * Serialized [[LabelGroupingNodeKey]] JSON representation.
175
193
  * @public
194
+ * @deprecated in 3.x. Use [[LabelGroupingNodeKey]].
176
195
  */
177
- export interface LabelGroupingNodeKeyJSON extends GroupingNodeKeyJSON {
196
+ export interface LabelGroupingNodeKeyJSON extends GroupingNodeKey {
178
197
  type: StandardNodeTypes.DisplayLabelGroupingNode;
179
198
  label: string;
180
199
  }
181
200
  /**
182
201
  * One of the serialized node key types
183
202
  * @public
203
+ * @deprecated in 3.x. Use [[NodeKey]].
184
204
  */
185
205
  export declare type NodeKeyJSON = BaseNodeKeyJSON | ECInstancesNodeKeyJSON | ECClassGroupingNodeKeyJSON | ECPropertyGroupingNodeKeyJSON | LabelGroupingNodeKeyJSON;
206
+ /**
207
+ * Data structure that describes a presentation query
208
+ * @alpha
209
+ */
210
+ export interface PresentationQuery {
211
+ /** ECSQL query */
212
+ query: string;
213
+ /** The query bindings */
214
+ bindings?: PresentationQueryBinding[];
215
+ }
216
+ /** @alpha */
217
+ export interface BasePresentationQueryBinding {
218
+ type: "Id" | "IdSet" | "ECValue" | "ValueSet";
219
+ }
220
+ /** @alpha */
221
+ export interface IdBinding extends BasePresentationQueryBinding {
222
+ type: "Id";
223
+ value: Id64String;
224
+ }
225
+ /** @alpha */
226
+ export interface IdSetBinding extends BasePresentationQueryBinding {
227
+ type: "IdSet";
228
+ value: Id64String[];
229
+ }
230
+ /** @alpha */
231
+ export interface ECValueBinding extends BasePresentationQueryBinding {
232
+ type: "ECValue";
233
+ valueType: string;
234
+ value: any;
235
+ }
236
+ /** @alpha */
237
+ export interface ECValueSetBinding extends BasePresentationQueryBinding {
238
+ type: "ValueSet";
239
+ valueType: string;
240
+ value: any[];
241
+ }
242
+ /**
243
+ * One of the presentation query binding types
244
+ * @alpha
245
+ */
246
+ export declare type PresentationQueryBinding = IdBinding | IdSetBinding | ECValueBinding | ECValueSetBinding;
186
247
  //# sourceMappingURL=Key.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Key.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Key.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAErD;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B,eAAe,oBAAoB;IACnC,mBAAmB,wBAAwB;IAC3C,sBAAsB,2BAA2B;IACjD,wBAAwB,6BAA6B;CACtD;AAED;;;GAGG;AACH,oBAAY,OAAO,GAAG,WAAW,GAAG,kBAAkB,GAAG,sBAAsB,GAAG,yBAAyB,GAAG,oBAAoB,CAAC;AACnI,cAAc;AACd,yBAAiB,OAAO,CAAC;IACvB,0CAA0C;IAC1C,SAAgB,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,WAAW,CAIhD;IAED,qCAAqC;IACrC,SAAgB,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAInD;IAED,8DAA8D;IAC9D,SAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,kBA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,CAAC;IAClB,KAAK,EAAE,GAAG,CAAC;CACZ;AAED,aAAa;AACb,MAAM,WAAW,iBAAkB,SAAQ,4BAA4B;IACrE,IAAI,EAAE,UAAU,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,GAAG,EAAE,CAAC;CACd;AAED;;;GAGG;AACH,oBAAY,wBAAwB,GAAG,SAAS,GAAG,YAAY,GAAG,cAAc,GAAG,iBAAiB,CAAC"}
@@ -21,36 +21,45 @@ export var StandardNodeTypes;
21
21
  /** @public */
22
22
  export var NodeKey;
23
23
  (function (NodeKey) {
24
- /** Serialize given [[NodeKey]] to JSON */
24
+ /**
25
+ * Serialize given [[NodeKey]] to JSON
26
+ * @deprecated in 3.x. Use [[NodeKey]].
27
+ */
28
+ // eslint-disable-next-line deprecation/deprecation
25
29
  function toJSON(key) {
26
- if (isInstancesNodeKey(key))
27
- return { ...key, instanceKeys: key.instanceKeys.map(InstanceKey.toJSON) };
28
30
  return { ...key };
29
31
  }
30
32
  NodeKey.toJSON = toJSON;
31
- /** Deserialize node key from JSON */
33
+ /**
34
+ * Deserialize node key from JSON
35
+ * @deprecated in 3.x. Use [[NodeKey]].
36
+ */
37
+ // eslint-disable-next-line deprecation/deprecation
32
38
  function fromJSON(json) {
33
- if (isInstancesNodeKey(json))
34
- return { version: 1, ...json, instanceKeys: json.instanceKeys.map(InstanceKey.fromJSON) };
35
39
  return { version: 1, ...json };
36
40
  }
37
41
  NodeKey.fromJSON = fromJSON;
42
+ // eslint-disable-next-line deprecation/deprecation
38
43
  function isInstancesNodeKey(key) {
39
44
  return key.type === StandardNodeTypes.ECInstancesNode;
40
45
  }
41
46
  NodeKey.isInstancesNodeKey = isInstancesNodeKey;
47
+ // eslint-disable-next-line deprecation/deprecation
42
48
  function isClassGroupingNodeKey(key) {
43
49
  return key.type === StandardNodeTypes.ECClassGroupingNode;
44
50
  }
45
51
  NodeKey.isClassGroupingNodeKey = isClassGroupingNodeKey;
52
+ // eslint-disable-next-line deprecation/deprecation
46
53
  function isPropertyGroupingNodeKey(key) {
47
54
  return key.type === StandardNodeTypes.ECPropertyGroupingNode;
48
55
  }
49
56
  NodeKey.isPropertyGroupingNodeKey = isPropertyGroupingNodeKey;
57
+ // eslint-disable-next-line deprecation/deprecation
50
58
  function isLabelGroupingNodeKey(key) {
51
59
  return key.type === StandardNodeTypes.DisplayLabelGroupingNode;
52
60
  }
53
61
  NodeKey.isLabelGroupingNodeKey = isLabelGroupingNodeKey;
62
+ // eslint-disable-next-line deprecation/deprecation
54
63
  function isGroupingNodeKey(key) {
55
64
  return isClassGroupingNodeKey(key) || isPropertyGroupingNodeKey(key) || isLabelGroupingNodeKey(key);
56
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Key.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Key.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAmB,MAAM,OAAO,CAAC;AAErD;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,wDAAmC,CAAA;IACnC,gEAA2C,CAAA;IAC3C,sEAAiD,CAAA;IACjD,0EAAqD,CAAA;AACvD,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAOD,cAAc;AACd,MAAM,KAAW,OAAO,CA4GvB;AA5GD,WAAiB,OAAO;IACtB,0CAA0C;IAC1C,SAAgB,MAAM,CAAC,GAAY;QACjC,IAAI,kBAAkB,CAAC,GAAG,CAAC;YACzB,OAAO,EAAE,GAAG,GAAG,EAAE,YAAY,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5E,OAAO,EAAE,GAAG,GAAG,EAAE,CAAC;IACpB,CAAC;IAJe,cAAM,SAIrB,CAAA;IAED,qCAAqC;IACrC,S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AAC,CAAC,CAAC;YACvC,OAAO,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,YAAY,CAAC;SACjF;QACD,IAAI,sBAAsB,CAAC,GAAG,CAAC,EAAE;YAC/B,MAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC;YACpC,OAAO,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC;SAChC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IA3Ce,cAAM,SA2CrB,CAAA;AACH,CAAC,EA5GgB,OAAO,KAAP,OAAO,QA4GvB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Hierarchies\r\n */\r\n\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { InstanceKey, InstanceKeyJSON } from \"../EC\";\r\n\r\n/**\r\n * Standard node types\r\n * @public\r\n */\r\nexport enum StandardNodeTypes {\r\n ECInstancesNode = \"ECInstancesNode\",\r\n ECClassGroupingNode = \"ECClassGroupingNode\",\r\n ECPropertyGroupingNode = \"ECPropertyGroupingNode\",\r\n DisplayLabelGroupingNode = \"DisplayLabelGroupingNode\",\r\n}\r\n\r\n/**\r\n * One of the node key types\r\n * @public\r\n */\r\nexport type NodeKey = BaseNodeKey | ECInstancesNodeKey | ECClassGroupingNodeKey | ECPropertyGroupingNodeKey | LabelGroupingNodeKey;\r\n/** @public */\r\nexport namespace NodeKey { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** Serialize given [[NodeKey]] to JSON */\r\n export function toJSON(key: NodeKey): NodeKeyJSON {\r\n if (isInstancesNodeKey(key))\r\n return { ...key, instanceKeys: key.instanceKeys.map(InstanceKey.toJSON) };\r\n return { ...key };\r\n }\r\n\r\n /** Deserialize node key from JSON */\r\n export function fromJSON(json: NodeKeyJSON): NodeKey {\r\n if (isInstancesNodeKey(json))\r\n return { version: 1, ...json, instanceKeys: json.instanceKeys.map(InstanceKey.fromJSON) };\r\n return { version: 1, ...json };\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECInstancesNodeKey]] */\r\n export function isInstancesNodeKey(key: NodeKey): key is ECInstancesNodeKey;\r\n /** Checks if the supplied key is an [[ECInstancesNodeKey]] */\r\n export function isInstancesNodeKey(key: NodeKeyJSON): key is ECInstancesNodeKeyJSON;\r\n export function isInstancesNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECInstancesNode;\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECClassGroupingNodeKey]] */\r\n export function isClassGroupingNodeKey(key: NodeKey): key is ECClassGroupingNodeKey;\r\n /** Checks if the supplied key is an [[ECClassGroupingNodeKey]] */\r\n export function isClassGroupingNodeKey(key: NodeKeyJSON): key is ECClassGroupingNodeKeyJSON;\r\n export function isClassGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECClassGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]] */\r\n export function isPropertyGroupingNodeKey(key: NodeKey): key is ECPropertyGroupingNodeKey;\r\n /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]] */\r\n export function isPropertyGroupingNodeKey(key: NodeKeyJSON): key is ECPropertyGroupingNodeKeyJSON;\r\n export function isPropertyGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECPropertyGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is a [[LabelGroupingNodeKey]] */\r\n export function isLabelGroupingNodeKey(key: NodeKey): key is LabelGroupingNodeKey;\r\n /** Checks if the supplied key is a [[LabelGroupingNodeKey]] */\r\n export function isLabelGroupingNodeKey(key: NodeKeyJSON): key is LabelGroupingNodeKeyJSON;\r\n export function isLabelGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.DisplayLabelGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is a grouping node key */\r\n export function isGroupingNodeKey(key: NodeKey): key is GroupingNodeKey;\r\n /** Checks if the supplied key is a grouping node key */\r\n export function isGroupingNodeKey(key: NodeKeyJSON): key is GroupingNodeKeyJSON;\r\n export function isGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return isClassGroupingNodeKey(key) || isPropertyGroupingNodeKey(key) || isLabelGroupingNodeKey(key);\r\n }\r\n\r\n /**\r\n * Checks if two given node keys are equal, taking their versions into account.\r\n *\r\n * When comparing two keys of the same version, the algorithm uses [[NodeKey.pathFromRoot]] array\r\n * which is the most accurate way of checking equality. However, when version are different,\r\n * [[NodeKey.pathFromRoot]] array may contain different strings even though keys represent the same node.\r\n * In that case equality is checked using other key attributes, depending on the type of the node (type,\r\n * label, grouping class, property name, etc.).\r\n */\r\n export function equals(lhs: NodeKey, rhs: NodeKey): boolean {\r\n // types must always be equal\r\n if (lhs.type !== rhs.type)\r\n return false;\r\n\r\n // `pathFromRoot` lengths must always be equal\r\n if (lhs.pathFromRoot.length !== rhs.pathFromRoot.length)\r\n return false;\r\n\r\n // when versions are equal, compare using contents of `pathFromRoot` array\r\n if (lhs.version === rhs.version) {\r\n for (let i = 0; i < lhs.pathFromRoot.length; ++i) {\r\n if (lhs.pathFromRoot[i] !== rhs.pathFromRoot[i])\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n // when versions aren't equal, compare using other key information, because key hashes\r\n // of different key versions can't be compared\r\n if (isInstancesNodeKey(lhs)) {\r\n assert(isInstancesNodeKey(rhs));\r\n if (lhs.instanceKeys.length !== rhs.instanceKeys.length)\r\n return false;\r\n for (let i = 0; i < lhs.instanceKeys.length; ++i) {\r\n if (0 !== InstanceKey.compare(lhs.instanceKeys[i], rhs.instanceKeys[i]))\r\n return false;\r\n }\r\n return true;\r\n }\r\n if (isClassGroupingNodeKey(lhs)) {\r\n assert(isClassGroupingNodeKey(rhs));\r\n return lhs.className === rhs.className;\r\n }\r\n if (isPropertyGroupingNodeKey(lhs)) {\r\n assert(isPropertyGroupingNodeKey(rhs));\r\n return lhs.className === rhs.className && lhs.propertyName === rhs.propertyName;\r\n }\r\n if (isLabelGroupingNodeKey(lhs)) {\r\n assert(isLabelGroupingNodeKey(rhs));\r\n return lhs.label === rhs.label;\r\n }\r\n return true;\r\n }\r\n}\r\n\r\n/**\r\n * Node key path. Can be used to define path from one node to another.\r\n * @public\r\n */\r\nexport type NodeKeyPath = NodeKey[];\r\n\r\n/**\r\n * Data structure that describes a basic node key\r\n * @public\r\n */\r\nexport interface BaseNodeKey {\r\n /** Node type */\r\n type: string;\r\n\r\n /**\r\n * Version of the key. Different versions suggest that node keys were created by two different\r\n * versions of the library. In that case, keys representing the same node may be different.\r\n */\r\n version: number;\r\n\r\n /** Node hash path from root to the node whose key this is */\r\n pathFromRoot: string[];\r\n}\r\n/**\r\n * Serialized [[BaseNodeKey]] JSON representation.\r\n * @public\r\n */\r\nexport interface BaseNodeKeyJSON {\r\n type: string;\r\n version?: number;\r\n pathFromRoot: string[];\r\n}\r\n\r\n/**\r\n * Data structure that describes a node ECInstance node key\r\n * @public\r\n */\r\nexport interface ECInstancesNodeKey extends BaseNodeKey {\r\n type: StandardNodeTypes.ECInstancesNode;\r\n /** List of [[InstanceKey]] objects of ECInstances represented by the node */\r\n instanceKeys: InstanceKey[];\r\n}\r\n/**\r\n * Serialized [[ECInstancesNodeKey]] JSON representation.\r\n * @public\r\n */\r\nexport interface ECInstancesNodeKeyJSON extends BaseNodeKeyJSON {\r\n type: StandardNodeTypes.ECInstancesNode;\r\n instanceKeys: InstanceKeyJSON[];\r\n}\r\n\r\n/**\r\n * Data structure that describes a grouping node key\r\n * @public\r\n */\r\nexport interface GroupingNodeKey extends BaseNodeKey {\r\n /**\r\n * Get the number of instances grouped by the node represented\r\n * by this key.\r\n *\r\n * **Note:** this property is just a helper and is not involved\r\n * in identifying a node.\r\n */\r\n groupedInstancesCount: number;\r\n}\r\n/**\r\n * Serialized [[GroupingNodeKey]] JSON representation.\r\n * @public\r\n */\r\nexport interface GroupingNodeKeyJSON extends BaseNodeKeyJSON {\r\n groupedInstancesCount: number;\r\n}\r\n\r\n/**\r\n * Data structure that describes an ECClass grouping node key\r\n * @public\r\n */\r\nexport interface ECClassGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECClassGroupingNode;\r\n /** Full name of the grouping ECClass */\r\n className: string;\r\n}\r\n/**\r\n * Serialized [[ECClassGroupingNodeKey]] JSON representation.\r\n * @public\r\n */\r\nexport interface ECClassGroupingNodeKeyJSON extends GroupingNodeKeyJSON {\r\n type: StandardNodeTypes.ECClassGroupingNode;\r\n className: string;\r\n}\r\n\r\n/**\r\n * Data structure that describes an ECProperty grouping node key\r\n * @public\r\n */\r\nexport interface ECPropertyGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECPropertyGroupingNode;\r\n /** Full name of the grouping ECProperty class */\r\n className: string;\r\n /** Name of the ECProperty */\r\n propertyName: string;\r\n /** Raw grouping values */\r\n groupingValues: any[];\r\n}\r\n/**\r\n * Serialized [[ECPropertyGroupingNodeKey]] JSON representation.\r\n * @public\r\n */\r\nexport interface ECPropertyGroupingNodeKeyJSON extends GroupingNodeKeyJSON {\r\n type: StandardNodeTypes.ECPropertyGroupingNode;\r\n className: string;\r\n propertyName: string;\r\n groupingValues: any[];\r\n}\r\n\r\n/**\r\n * Data structure that describes a display label grouping node key\r\n * @public\r\n */\r\nexport interface LabelGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.DisplayLabelGroupingNode;\r\n /** Grouping display label */\r\n label: string;\r\n}\r\n/**\r\n * Serialized [[LabelGroupingNodeKey]] JSON representation.\r\n * @public\r\n */\r\nexport interface LabelGroupingNodeKeyJSON extends GroupingNodeKeyJSON {\r\n type: StandardNodeTypes.DisplayLabelGroupingNode;\r\n label: string;\r\n}\r\n\r\n/**\r\n * One of the serialized node key types\r\n * @public\r\n */\r\nexport type NodeKeyJSON = BaseNodeKeyJSON | ECInstancesNodeKeyJSON | ECClassGroupingNodeKeyJSON | ECPropertyGroupingNodeKeyJSON | LabelGroupingNodeKeyJSON;\r\n"]}
1
+ {"version":3,"file":"Key.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Key.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,wDAAmC,CAAA;IACnC,gEAA2C,CAAA;IAC3C,sEAAiD,CAAA;IACjD,0EAAqD,CAAA;AACvD,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAOD,cAAc;AACd,MAAM,KAAW,OAAO,CA0HvB;AA1HD,WAAiB,OAAO;IACtB;;;OAGG;IACH,mDAAmD;IACnD,SAAgB,MAAM,CAAC,GAAY;QACjC,OAAO,EAAE,GAAG,GAAG,EAAE,CAAC;IACpB,CAAC;IAFe,cAAM,SAErB,CAAA;IAED;;;OAGG;IACH,mDAAmD;IACnD,SAAgB,QAAQ,CAAC,IAAiB;QACxC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC;IACjC,CAAC;IAFe,gBAAQ,WAEvB,CAAA;IAOD,mDAAmD;IACnD,SAAgB,kBAAkB,CAAC,GAA0B;QAC3D,OAAO,GAAG,CAAC,IAAI,KAAK,iBAAiB,CAAC,eAAe,CAAC;IACxD,CAAC;IAFe,0BAAkB,qBAEjC,CAAA;IAOD,mDAAmD;IACnD,SAAgB,sBAAsB,CAAC,GAA0B;QAC/D,OAAO,GAAG,CAAC,IAAI,KAAK,iBAAiB,CAAC,mBAAmB,CAAC;I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AE;YAC3B,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC;YAChC,IAAI,GAAG,CAAC,YAAY,CAAC,MAAM,KAAK,GAAG,CAAC,YAAY,CAAC,MAAM;gBACrD,OAAO,KAAK,CAAC;YACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;gBAChD,IAAI,CAAC,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;oBACrE,OAAO,KAAK,CAAC;aAChB;YACD,OAAO,IAAI,CAAC;SACb;QACD,IAAI,sBAAsB,CAAC,GAAG,CAAC,EAAE;YAC/B,MAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC;YACpC,OAAO,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,CAAC;SACxC;QACD,IAAI,yBAAyB,CAAC,GAAG,CAAC,EAAE;YAClC,MAAM,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,CAAC;YACvC,OAAO,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,YAAY,CAAC;SACjF;QACD,IAAI,sBAAsB,CAAC,GAAG,CAAC,EAAE;YAC/B,MAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC;YACpC,OAAO,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC;SAChC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IA3Ce,cAAM,SA2CrB,CAAA;AACH,CAAC,EA1HgB,OAAO,KAAP,OAAO,QA0HvB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Hierarchies\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport { InstanceKey } from \"../EC\";\r\n\r\n/**\r\n * Standard node types\r\n * @public\r\n */\r\nexport enum StandardNodeTypes {\r\n ECInstancesNode = \"ECInstancesNode\",\r\n ECClassGroupingNode = \"ECClassGroupingNode\",\r\n ECPropertyGroupingNode = \"ECPropertyGroupingNode\",\r\n DisplayLabelGroupingNode = \"DisplayLabelGroupingNode\",\r\n}\r\n\r\n/**\r\n * One of the node key types\r\n * @public\r\n */\r\nexport type NodeKey = BaseNodeKey | ECInstancesNodeKey | ECClassGroupingNodeKey | ECPropertyGroupingNodeKey | LabelGroupingNodeKey;\r\n/** @public */\r\nexport namespace NodeKey { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /**\r\n * Serialize given [[NodeKey]] to JSON\r\n * @deprecated in 3.x. Use [[NodeKey]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(key: NodeKey): NodeKeyJSON {\r\n return { ...key };\r\n }\r\n\r\n /**\r\n * Deserialize node key from JSON\r\n * @deprecated in 3.x. Use [[NodeKey]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: NodeKeyJSON): NodeKey {\r\n return { version: 1, ...json };\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECInstancesNodeKey]] */\r\n export function isInstancesNodeKey(key: NodeKey): key is ECInstancesNodeKey;\r\n /** Checks if the supplied key is an [[ECInstancesNodeKey]]. @deprecated in 3.x */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isInstancesNodeKey(key: NodeKeyJSON): key is ECInstancesNodeKeyJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isInstancesNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECInstancesNode;\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECClassGroupingNodeKey]] */\r\n export function isClassGroupingNodeKey(key: NodeKey): key is ECClassGroupingNodeKey;\r\n /** Checks if the supplied key is an [[ECClassGroupingNodeKey]]. @deprecated in 3.x */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isClassGroupingNodeKey(key: NodeKeyJSON): key is ECClassGroupingNodeKeyJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isClassGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECClassGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]] */\r\n export function isPropertyGroupingNodeKey(key: NodeKey): key is ECPropertyGroupingNodeKey;\r\n /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]]. @deprecated in 3.x */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isPropertyGroupingNodeKey(key: NodeKeyJSON): key is ECPropertyGroupingNodeKeyJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isPropertyGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECPropertyGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is a [[LabelGroupingNodeKey]] */\r\n export function isLabelGroupingNodeKey(key: NodeKey): key is LabelGroupingNodeKey;\r\n /** Checks if the supplied key is a [[LabelGroupingNodeKey]]. @deprecated in 3.x */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isLabelGroupingNodeKey(key: NodeKeyJSON): key is LabelGroupingNodeKeyJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isLabelGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.DisplayLabelGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is a grouping node key */\r\n export function isGroupingNodeKey(key: NodeKey): key is GroupingNodeKey;\r\n /** Checks if the supplied key is a grouping node key. @deprecated in 3.x */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isGroupingNodeKey(key: NodeKeyJSON): key is GroupingNodeKeyJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return isClassGroupingNodeKey(key) || isPropertyGroupingNodeKey(key) || isLabelGroupingNodeKey(key);\r\n }\r\n\r\n /**\r\n * Checks if two given node keys are equal, taking their versions into account.\r\n *\r\n * When comparing two keys of the same version, the algorithm uses [[NodeKey.pathFromRoot]] array\r\n * which is the most accurate way of checking equality. However, when version are different,\r\n * [[NodeKey.pathFromRoot]] array may contain different strings even though keys represent the same node.\r\n * In that case equality is checked using other key attributes, depending on the type of the node (type,\r\n * label, grouping class, property name, etc.).\r\n */\r\n export function equals(lhs: NodeKey, rhs: NodeKey): boolean {\r\n // types must always be equal\r\n if (lhs.type !== rhs.type)\r\n return false;\r\n\r\n // `pathFromRoot` lengths must always be equal\r\n if (lhs.pathFromRoot.length !== rhs.pathFromRoot.length)\r\n return false;\r\n\r\n // when versions are equal, compare using contents of `pathFromRoot` array\r\n if (lhs.version === rhs.version) {\r\n for (let i = 0; i < lhs.pathFromRoot.length; ++i) {\r\n if (lhs.pathFromRoot[i] !== rhs.pathFromRoot[i])\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n // when versions aren't equal, compare using other key information, because key hashes\r\n // of different key versions can't be compared\r\n if (isInstancesNodeKey(lhs)) {\r\n assert(isInstancesNodeKey(rhs));\r\n if (lhs.instanceKeys.length !== rhs.instanceKeys.length)\r\n return false;\r\n for (let i = 0; i < lhs.instanceKeys.length; ++i) {\r\n if (0 !== InstanceKey.compare(lhs.instanceKeys[i], rhs.instanceKeys[i]))\r\n return false;\r\n }\r\n return true;\r\n }\r\n if (isClassGroupingNodeKey(lhs)) {\r\n assert(isClassGroupingNodeKey(rhs));\r\n return lhs.className === rhs.className;\r\n }\r\n if (isPropertyGroupingNodeKey(lhs)) {\r\n assert(isPropertyGroupingNodeKey(rhs));\r\n return lhs.className === rhs.className && lhs.propertyName === rhs.propertyName;\r\n }\r\n if (isLabelGroupingNodeKey(lhs)) {\r\n assert(isLabelGroupingNodeKey(rhs));\r\n return lhs.label === rhs.label;\r\n }\r\n return true;\r\n }\r\n}\r\n\r\n/**\r\n * Node key path. Can be used to define path from one node to another.\r\n * @public\r\n */\r\nexport type NodeKeyPath = NodeKey[];\r\n\r\n/**\r\n * Data structure that describes a basic node key\r\n * @public\r\n */\r\nexport interface BaseNodeKey {\r\n /** Node type */\r\n type: string;\r\n\r\n /**\r\n * Version of the key. Different versions suggest that node keys were created by two different\r\n * versions of the library. In that case, keys representing the same node may be different.\r\n */\r\n version: number;\r\n\r\n /** Node hash path from root to the node whose key this is */\r\n pathFromRoot: string[];\r\n\r\n /** Query that returns all selected instance keys\r\n * @alpha\r\n */\r\n instanceKeysSelectQuery?: PresentationQuery;\r\n}\r\n/**\r\n * Serialized [[BaseNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[BaseNodeKey]].\r\n */\r\nexport interface BaseNodeKeyJSON {\r\n type: string;\r\n // TODO: make this required\r\n version?: number;\r\n pathFromRoot: string[];\r\n /** @alpha */\r\n instanceKeysSelectQuery?: PresentationQuery;\r\n}\r\n\r\n/**\r\n * Data structure that describes a node ECInstance node key\r\n * @public\r\n */\r\nexport interface ECInstancesNodeKey extends BaseNodeKey {\r\n type: StandardNodeTypes.ECInstancesNode;\r\n /** List of [[InstanceKey]] objects of ECInstances represented by the node */\r\n instanceKeys: InstanceKey[];\r\n}\r\n/**\r\n * Serialized [[ECInstancesNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[ECInstancesNodeKey]].\r\n */\r\nexport interface ECInstancesNodeKeyJSON extends BaseNodeKey {\r\n type: StandardNodeTypes.ECInstancesNode;\r\n instanceKeys: InstanceKey[];\r\n}\r\n\r\n/**\r\n * Data structure that describes a grouping node key\r\n * @public\r\n */\r\nexport interface GroupingNodeKey extends BaseNodeKey {\r\n /**\r\n * Get the number of instances grouped by the node represented\r\n * by this key.\r\n *\r\n * **Note:** this property is just a helper and is not involved\r\n * in identifying a node.\r\n */\r\n groupedInstancesCount: number;\r\n}\r\n/**\r\n * Serialized [[GroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[GroupingNodeKey]].\r\n */\r\nexport interface GroupingNodeKeyJSON extends BaseNodeKey {\r\n groupedInstancesCount: number;\r\n}\r\n\r\n/**\r\n * Data structure that describes an ECClass grouping node key\r\n * @public\r\n */\r\nexport interface ECClassGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECClassGroupingNode;\r\n /** Full name of the grouping ECClass */\r\n className: string;\r\n}\r\n/**\r\n * Serialized [[ECClassGroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[ECClassGroupingNodeKey]].\r\n */\r\nexport interface ECClassGroupingNodeKeyJSON extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECClassGroupingNode;\r\n className: string;\r\n}\r\n\r\n/**\r\n * Data structure that describes an ECProperty grouping node key\r\n * @public\r\n */\r\nexport interface ECPropertyGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECPropertyGroupingNode;\r\n /** Full name of the grouping ECProperty class */\r\n className: string;\r\n /** Name of the ECProperty */\r\n propertyName: string;\r\n /** Raw grouping values */\r\n groupingValues: any[];\r\n}\r\n/**\r\n * Serialized [[ECPropertyGroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[ECPropertyGroupingNodeKey]].\r\n */\r\nexport interface ECPropertyGroupingNodeKeyJSON extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECPropertyGroupingNode;\r\n className: string;\r\n propertyName: string;\r\n groupingValues: any[];\r\n}\r\n\r\n/**\r\n * Data structure that describes a display label grouping node key\r\n * @public\r\n */\r\nexport interface LabelGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.DisplayLabelGroupingNode;\r\n /** Grouping display label */\r\n label: string;\r\n}\r\n/**\r\n * Serialized [[LabelGroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[LabelGroupingNodeKey]].\r\n */\r\nexport interface LabelGroupingNodeKeyJSON extends GroupingNodeKey {\r\n type: StandardNodeTypes.DisplayLabelGroupingNode;\r\n label: string;\r\n}\r\n\r\n/**\r\n * One of the serialized node key types\r\n * @public\r\n * @deprecated in 3.x. Use [[NodeKey]].\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport type NodeKeyJSON = BaseNodeKeyJSON | ECInstancesNodeKeyJSON | ECClassGroupingNodeKeyJSON | ECPropertyGroupingNodeKeyJSON | LabelGroupingNodeKeyJSON;\r\n\r\n/**\r\n * Data structure that describes a presentation query\r\n * @alpha\r\n */\r\nexport interface PresentationQuery {\r\n /** ECSQL query */\r\n query: string;\r\n /** The query bindings */\r\n bindings?: PresentationQueryBinding[];\r\n}\r\n\r\n/** @alpha */\r\nexport interface BasePresentationQueryBinding {\r\n type: \"Id\" | \"IdSet\" | \"ECValue\" | \"ValueSet\";\r\n}\r\n\r\n/** @alpha */\r\nexport interface IdBinding extends BasePresentationQueryBinding {\r\n type: \"Id\";\r\n value: Id64String;\r\n}\r\n\r\n/** @alpha */\r\nexport interface IdSetBinding extends BasePresentationQueryBinding {\r\n type: \"IdSet\";\r\n value: Id64String[];\r\n}\r\n\r\n/** @alpha */\r\nexport interface ECValueBinding extends BasePresentationQueryBinding {\r\n type: \"ECValue\";\r\n valueType: string;\r\n value: any;\r\n}\r\n\r\n/** @alpha */\r\nexport interface ECValueSetBinding extends BasePresentationQueryBinding {\r\n type: \"ValueSet\";\r\n valueType: string;\r\n value: any[];\r\n}\r\n\r\n/**\r\n * One of the presentation query binding types\r\n * @alpha\r\n */\r\nexport type PresentationQueryBinding = IdBinding | IdSetBinding | ECValueBinding | ECValueSetBinding;\r\n"]}
@@ -16,22 +16,22 @@ export interface Node {
16
16
  description?: string;
17
17
  /**
18
18
  * Image ID
19
- * @deprecated Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
19
+ * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
20
20
  */
21
21
  imageId?: string;
22
22
  /**
23
23
  * Foreground color
24
- * @deprecated Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
24
+ * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
25
25
  */
26
26
  foreColor?: string;
27
27
  /**
28
28
  * Background color
29
- * @deprecated Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
29
+ * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
30
30
  */
31
31
  backColor?: string;
32
32
  /**
33
33
  * Font style
34
- * @deprecated Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
34
+ * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
35
35
  */
36
36
  fontStyle?: string;
37
37
  /** Does this node have child nodes */
@@ -44,19 +44,25 @@ export interface Node {
44
44
  isExpanded?: boolean;
45
45
  /**
46
46
  * Is checkbox visible for this node
47
- * @deprecated Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
47
+ * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
48
48
  */
49
49
  isCheckboxVisible?: boolean;
50
50
  /**
51
51
  * Is this node's checkbox checked
52
- * @deprecated Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
52
+ * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
53
53
  */
54
54
  isChecked?: boolean;
55
55
  /**
56
56
  * Is this node's checkbox enabled
57
- * @deprecated Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
57
+ * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
58
58
  */
59
59
  isCheckboxEnabled?: boolean;
60
+ /**
61
+ * Identifies whether the hierarchy level below this node supports filtering. If not, requesting either a hierarchy level descriptor or
62
+ * a hierarchy level with [[HierarchyRequestOptions.instanceFilter]] will throw an error with [[PresentationStatus.InvalidArgument]] status.
63
+ * @beta
64
+ */
65
+ supportsFiltering?: boolean;
60
66
  /** Extended data injected into this node */
61
67
  extendedData?: {
62
68
  [key: string]: any;
@@ -65,29 +71,32 @@ export interface Node {
65
71
  /**
66
72
  * Serialized [[Node]] JSON representation.
67
73
  * @public
74
+ * @deprecated in 3.x. Use [[Node]].
68
75
  */
69
76
  export interface NodeJSON {
70
77
  key: NodeKeyJSON;
71
78
  labelDefinition: LabelDefinitionJSON;
72
79
  description?: string;
73
- /** @deprecated */
80
+ /** @deprecated in 3.x. */
74
81
  imageId?: string;
75
- /** @deprecated */
82
+ /** @deprecated in 3.x. */
76
83
  foreColor?: string;
77
- /** @deprecated */
84
+ /** @deprecated in 3.x. */
78
85
  backColor?: string;
79
- /** @deprecated */
86
+ /** @deprecated in 3.x. */
80
87
  fontStyle?: string;
81
88
  hasChildren?: boolean;
82
89
  isSelectionDisabled?: boolean;
83
90
  isEditable?: boolean;
84
91
  isExpanded?: boolean;
85
- /** @deprecated */
92
+ /** @deprecated in 3.x. */
86
93
  isCheckboxVisible?: boolean;
87
- /** @deprecated */
94
+ /** @deprecated in 3.x. */
88
95
  isChecked?: boolean;
89
- /** @deprecated */
96
+ /** @deprecated in 3.x. */
90
97
  isCheckboxEnabled?: boolean;
98
+ /** @beta */
99
+ supportsFiltering?: boolean;
91
100
  extendedData?: {
92
101
  [key: string]: any;
93
102
  };
@@ -100,6 +109,7 @@ export declare type PartialNode = AllOrNone<Partial<Node>, "key" | "label">;
100
109
  /**
101
110
  * Serialized [[PartialNode]] JSON representation.
102
111
  * @public
112
+ * @deprecated in 3.x. Use [[PartialNode]].
103
113
  */
104
114
  export declare type PartialNodeJSON = AllOrNone<Partial<NodeJSON>, "key" | "labelDefinition">;
105
115
  declare type AllOrNone<T, P extends keyof T> = Omit<T, P> & ({
@@ -107,18 +117,23 @@ declare type AllOrNone<T, P extends keyof T> = Omit<T, P> & ({
107
117
  } | Required<Pick<T, P>>);
108
118
  /** @public */
109
119
  export declare namespace Node {
110
- /** Serialize given [[Node]] to JSON */
120
+ /**
121
+ * Serialize given [[Node]] to JSON
122
+ * @deprecated in 3.x. Use [[Node]].
123
+ */
111
124
  function toJSON(node: Node): NodeJSON;
112
125
  /** @internal */
113
126
  function toPartialJSON(node: PartialNode): PartialNodeJSON;
114
- /** Deserialize [[Node]] from JSON */
127
+ /**
128
+ * Deserialize [[Node]] from JSON
129
+ * @deprecated in 3.x. Use [[Node]].
130
+ */
115
131
  function fromJSON(json: NodeJSON | string): Node;
116
132
  /** @internal */
117
133
  function fromPartialJSON(json: PartialNodeJSON): PartialNode;
118
134
  /**
119
135
  * Reviver function that can be used as a second argument for
120
136
  * `JSON.parse` method when parsing [[Node]] objects.
121
- *
122
137
  * @internal
123
138
  */
124
139
  function reviver(key: string, value: any): any;
@@ -126,14 +141,12 @@ export declare namespace Node {
126
141
  * Deserialize nodes list from JSON
127
142
  * @param json JSON or JSON serialized to string to deserialize from
128
143
  * @returns Deserialized nodes list
129
- *
130
144
  * @internal
131
145
  */
132
146
  function listFromJSON(json: NodeJSON[] | string): Node[];
133
147
  /**
134
148
  * Reviver function that can be used as a second argument for
135
149
  * `JSON.parse` method when parsing [[Node]][] objects.
136
- *
137
150
  * @internal
138
151
  */
139
152
  function listReviver(key: string, value: any): any;
@@ -1 +1 @@
1
- {"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common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;AAEH,oBAAY,eAAe,GAAG,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,KAAK,GAAG,iBAAiB,CAAC,CAAC;AAEtF,aAAK,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC;KAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK;CAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAElG,cAAc;AACd,yBAAiB,IAAI,CAAC;IACpB;;;OAGG;IAEH,SAAgB,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,QAAQ,CAM3C;IAED,gBAAgB;IAEhB,SAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,eAAe,CAUhE;IAED;;;OAGG;IAEH,SAAgB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAUtD;IAED,gBAAgB;IAEhB,SAAgB,eAAe,CAAC,IAAI,EAAE,eAAe,GAAG,WAAW,CAYlE;IAED;;;;OAIG;IACH,SAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAGpD;IAED;;;;;OAKG;IAEH,SAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,MAAM,GAAG,IAAI,EAAE,CAK9D;IAED;;;;OAIG;IACH,SAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAExD;CACF"}
@@ -5,47 +5,55 @@
5
5
  /** @packageDocumentation
6
6
  * @module Hierarchies
7
7
  */
8
- import { LabelDefinition } from "../LabelDefinition";
9
8
  import { NodeKey } from "./Key";
10
9
  /** @public */
11
10
  export var Node;
12
11
  (function (Node) {
13
- /** Serialize given [[Node]] to JSON */
12
+ /**
13
+ * Serialize given [[Node]] to JSON
14
+ * @deprecated in 3.x. Use [[Node]].
15
+ */
16
+ // eslint-disable-next-line deprecation/deprecation
14
17
  function toJSON(node) {
15
- const { key, label, ...baseNode } = node;
18
+ const { label, ...baseNode } = node;
16
19
  return {
17
20
  ...baseNode,
18
- key: NodeKey.toJSON(key),
19
- labelDefinition: LabelDefinition.toJSON(label),
21
+ labelDefinition: label,
20
22
  };
21
23
  }
22
24
  Node.toJSON = toJSON;
23
25
  /** @internal */
26
+ // eslint-disable-next-line deprecation/deprecation
24
27
  function toPartialJSON(node) {
25
28
  if (node.key === undefined) {
26
29
  return node;
27
30
  }
28
- const { key, label, ...baseNode } = node;
31
+ const { label, ...baseNode } = node;
29
32
  return {
30
33
  ...baseNode,
31
- key: NodeKey.toJSON(key),
32
- labelDefinition: LabelDefinition.toJSON(label),
34
+ labelDefinition: label,
33
35
  };
34
36
  }
35
37
  Node.toPartialJSON = toPartialJSON;
36
- /** Deserialize [[Node]] from JSON */
38
+ /**
39
+ * Deserialize [[Node]] from JSON
40
+ * @deprecated in 3.x. Use [[Node]].
41
+ */
42
+ // eslint-disable-next-line deprecation/deprecation
37
43
  function fromJSON(json) {
38
44
  if (typeof json === "string")
39
45
  return JSON.parse(json, reviver);
40
46
  const { labelDefinition, ...baseJson } = json;
41
47
  return {
42
48
  ...baseJson,
49
+ // eslint-disable-next-line deprecation/deprecation
43
50
  key: NodeKey.fromJSON(json.key),
44
- label: LabelDefinition.fromJSON(labelDefinition),
51
+ label: labelDefinition,
45
52
  };
46
53
  }
47
54
  Node.fromJSON = fromJSON;
48
55
  /** @internal */
56
+ // eslint-disable-next-line deprecation/deprecation
49
57
  function fromPartialJSON(json) {
50
58
  if (json.key === undefined) {
51
59
  return json;
@@ -53,18 +61,19 @@ export var Node;
53
61
  const { key, labelDefinition, ...baseJson } = json;
54
62
  return {
55
63
  ...baseJson,
64
+ // eslint-disable-next-line deprecation/deprecation
56
65
  key: NodeKey.fromJSON(key),
57
- label: LabelDefinition.fromJSON(labelDefinition),
66
+ label: labelDefinition,
58
67
  };
59
68
  }
60
69
  Node.fromPartialJSON = fromPartialJSON;
61
70
  /**
62
71
  * Reviver function that can be used as a second argument for
63
72
  * `JSON.parse` method when parsing [[Node]] objects.
64
- *
65
73
  * @internal
66
74
  */
67
75
  function reviver(key, value) {
76
+ // eslint-disable-next-line deprecation/deprecation
68
77
  return key === "" ? fromJSON(value) : value;
69
78
  }
70
79
  Node.reviver = reviver;
@@ -72,19 +81,19 @@ export var Node;
72
81
  * Deserialize nodes list from JSON
73
82
  * @param json JSON or JSON serialized to string to deserialize from
74
83
  * @returns Deserialized nodes list
75
- *
76
84
  * @internal
77
85
  */
86
+ // eslint-disable-next-line deprecation/deprecation
78
87
  function listFromJSON(json) {
79
88
  if (typeof json === "string")
80
89
  return JSON.parse(json, listReviver);
90
+ // eslint-disable-next-line deprecation/deprecation
81
91
  return json.map((m) => fromJSON(m));
82
92
  }
83
93
  Node.listFromJSON = listFromJSON;
84
94
  /**
85
95
  * Reviver function that can be used as a second argument for
86
96
  * `JSON.parse` method when parsing [[Node]][] objects.
87
- *
88
97
  * @internal
89
98
  */
90
99
  function listReviver(key, value) {