@itwin/presentation-common 3.6.0-dev.54 → 3.6.0-dev.59

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 (356) hide show
  1. package/Ruleset.schema.json +236 -309
  2. package/lib/cjs/presentation-common/EC.d.ts +52 -17
  3. package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
  4. package/lib/cjs/presentation-common/EC.js +74 -54
  5. package/lib/cjs/presentation-common/EC.js.map +1 -1
  6. package/lib/cjs/presentation-common/ElementProperties.d.ts +14 -14
  7. package/lib/cjs/presentation-common/ElementProperties.js.map +1 -1
  8. package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts +43 -9
  9. package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
  10. package/lib/cjs/presentation-common/InstanceFilterDefinition.js.map +1 -1
  11. package/lib/cjs/presentation-common/KeySet.d.ts.map +1 -1
  12. package/lib/cjs/presentation-common/KeySet.js +5 -0
  13. package/lib/cjs/presentation-common/KeySet.js.map +1 -1
  14. package/lib/cjs/presentation-common/LabelDefinition.d.ts +24 -16
  15. package/lib/cjs/presentation-common/LabelDefinition.d.ts.map +1 -1
  16. package/lib/cjs/presentation-common/LabelDefinition.js +26 -29
  17. package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
  18. package/lib/cjs/presentation-common/PresentationIpcInterface.d.ts +2 -2
  19. package/lib/cjs/presentation-common/PresentationIpcInterface.d.ts.map +1 -1
  20. package/lib/cjs/presentation-common/PresentationIpcInterface.js.map +1 -1
  21. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts +19 -14
  22. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  23. package/lib/cjs/presentation-common/PresentationManagerOptions.js +1 -1
  24. package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
  25. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts +19 -21
  26. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  27. package/lib/cjs/presentation-common/PresentationRpcInterface.js +2 -5
  28. package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
  29. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts +8 -8
  30. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  31. package/lib/cjs/presentation-common/RpcRequestsHandler.js +11 -1
  32. package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
  33. package/lib/cjs/presentation-common/RulesetVariables.d.ts +5 -0
  34. package/lib/cjs/presentation-common/RulesetVariables.d.ts.map +1 -1
  35. package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
  36. package/lib/cjs/presentation-common/Update.d.ts +21 -4
  37. package/lib/cjs/presentation-common/Update.d.ts.map +1 -1
  38. package/lib/cjs/presentation-common/Update.js +34 -4
  39. package/lib/cjs/presentation-common/Update.js.map +1 -1
  40. package/lib/cjs/presentation-common/content/Category.d.ts.map +1 -1
  41. package/lib/cjs/presentation-common/content/Category.js +1 -2
  42. package/lib/cjs/presentation-common/content/Category.js.map +1 -1
  43. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts +194 -24
  44. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  45. package/lib/cjs/presentation-common/content/ContentTraverser.js +63 -44
  46. package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
  47. package/lib/cjs/presentation-common/content/Descriptor.d.ts +67 -18
  48. package/lib/cjs/presentation-common/content/Descriptor.d.ts.map +1 -1
  49. package/lib/cjs/presentation-common/content/Descriptor.js +0 -2
  50. package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
  51. package/lib/cjs/presentation-common/content/Fields.d.ts +24 -5
  52. package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
  53. package/lib/cjs/presentation-common/content/Fields.js +10 -7
  54. package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
  55. package/lib/cjs/presentation-common/content/Item.d.ts +6 -8
  56. package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
  57. package/lib/cjs/presentation-common/content/Item.js +6 -8
  58. package/lib/cjs/presentation-common/content/Item.js.map +1 -1
  59. package/lib/cjs/presentation-common/content/Property.d.ts +8 -2
  60. package/lib/cjs/presentation-common/content/Property.d.ts.map +1 -1
  61. package/lib/cjs/presentation-common/content/Property.js +12 -8
  62. package/lib/cjs/presentation-common/content/Property.js.map +1 -1
  63. package/lib/cjs/presentation-common/content/Value.d.ts +43 -11
  64. package/lib/cjs/presentation-common/content/Value.d.ts.map +1 -1
  65. package/lib/cjs/presentation-common/content/Value.js +72 -16
  66. package/lib/cjs/presentation-common/content/Value.js.map +1 -1
  67. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts +11 -4
  68. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -1
  69. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js +10 -2
  70. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
  71. package/lib/cjs/presentation-common/hierarchy/Key.d.ts +27 -14
  72. package/lib/cjs/presentation-common/hierarchy/Key.d.ts.map +1 -1
  73. package/lib/cjs/presentation-common/hierarchy/Key.js +15 -6
  74. package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
  75. package/lib/cjs/presentation-common/hierarchy/Node.d.ts +12 -7
  76. package/lib/cjs/presentation-common/hierarchy/Node.d.ts.map +1 -1
  77. package/lib/cjs/presentation-common/hierarchy/Node.js +23 -14
  78. package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
  79. package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts +18 -7
  80. package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
  81. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js +33 -9
  82. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  83. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts +5 -2
  84. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts.map +1 -1
  85. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  86. package/lib/cjs/presentation-common/rules/Rule.d.ts +5 -3
  87. package/lib/cjs/presentation-common/rules/Rule.d.ts.map +1 -1
  88. package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
  89. package/lib/cjs/presentation-common/rules/Ruleset.d.ts +0 -1
  90. package/lib/cjs/presentation-common/rules/Ruleset.d.ts.map +1 -1
  91. package/lib/cjs/presentation-common/rules/Ruleset.js.map +1 -1
  92. package/lib/cjs/presentation-common/rules/SchemasSpecification.d.ts +1 -1
  93. package/lib/cjs/presentation-common/rules/SchemasSpecification.js.map +1 -1
  94. package/lib/cjs/presentation-common/rules/Variables.d.ts +5 -2
  95. package/lib/cjs/presentation-common/rules/Variables.d.ts.map +1 -1
  96. package/lib/cjs/presentation-common/rules/Variables.js.map +1 -1
  97. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +2 -2
  98. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts.map +1 -1
  99. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  100. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +2 -2
  101. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts.map +1 -1
  102. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  103. package/lib/cjs/presentation-common/rules/content/ContentRule.d.ts +2 -2
  104. package/lib/cjs/presentation-common/rules/content/ContentRule.d.ts.map +1 -1
  105. package/lib/cjs/presentation-common/rules/content/ContentRule.js.map +1 -1
  106. package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts +5 -2
  107. package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
  108. package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  109. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +2 -2
  110. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts.map +1 -1
  111. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  112. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +2 -2
  113. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts.map +1 -1
  114. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  115. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.d.ts +2 -2
  116. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.d.ts.map +1 -1
  117. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  118. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +9 -6
  119. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts.map +1 -1
  120. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  121. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +6 -3
  122. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts.map +1 -1
  123. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  124. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts +2 -2
  125. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts.map +1 -1
  126. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
  127. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.d.ts +2 -2
  128. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.d.ts.map +1 -1
  129. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  130. package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts +17 -10
  131. package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
  132. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  133. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts +2 -2
  134. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts.map +1 -1
  135. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
  136. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts +17 -15
  137. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
  138. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  139. package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts +2 -2
  140. package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts.map +1 -1
  141. package/lib/cjs/presentation-common/rules/customization/LabelOverride.js.map +1 -1
  142. package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts +3 -3
  143. package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts.map +1 -1
  144. package/lib/cjs/presentation-common/rules/customization/SortingRule.js.map +1 -1
  145. package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts +2 -2
  146. package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts.map +1 -1
  147. package/lib/cjs/presentation-common/rules/customization/StyleOverride.js.map +1 -1
  148. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +1 -2
  149. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.d.ts.map +1 -1
  150. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  151. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +5 -4
  152. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
  153. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js +0 -1
  154. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  155. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +2 -2
  156. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
  157. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  158. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +9 -6
  159. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts.map +1 -1
  160. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  161. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +2 -2
  162. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
  163. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  164. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +2 -2
  165. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts.map +1 -1
  166. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  167. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +2 -2
  168. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts.map +1 -1
  169. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  170. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.d.ts +1 -2
  171. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.d.ts.map +1 -1
  172. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  173. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.d.ts +0 -1
  174. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.d.ts.map +1 -1
  175. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  176. package/lib/cjs/presentation-common/selection/SelectionScope.d.ts +17 -4
  177. package/lib/cjs/presentation-common/selection/SelectionScope.d.ts.map +1 -1
  178. package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
  179. package/lib/esm/presentation-common/EC.d.ts +52 -17
  180. package/lib/esm/presentation-common/EC.d.ts.map +1 -1
  181. package/lib/esm/presentation-common/EC.js +75 -55
  182. package/lib/esm/presentation-common/EC.js.map +1 -1
  183. package/lib/esm/presentation-common/ElementProperties.d.ts +14 -14
  184. package/lib/esm/presentation-common/ElementProperties.js.map +1 -1
  185. package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts +43 -9
  186. package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
  187. package/lib/esm/presentation-common/InstanceFilterDefinition.js.map +1 -1
  188. package/lib/esm/presentation-common/KeySet.d.ts.map +1 -1
  189. package/lib/esm/presentation-common/KeySet.js +5 -0
  190. package/lib/esm/presentation-common/KeySet.js.map +1 -1
  191. package/lib/esm/presentation-common/LabelDefinition.d.ts +24 -16
  192. package/lib/esm/presentation-common/LabelDefinition.d.ts.map +1 -1
  193. package/lib/esm/presentation-common/LabelDefinition.js +26 -29
  194. package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
  195. package/lib/esm/presentation-common/PresentationIpcInterface.d.ts +2 -2
  196. package/lib/esm/presentation-common/PresentationIpcInterface.d.ts.map +1 -1
  197. package/lib/esm/presentation-common/PresentationIpcInterface.js.map +1 -1
  198. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts +19 -14
  199. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  200. package/lib/esm/presentation-common/PresentationManagerOptions.js +1 -1
  201. package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
  202. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts +19 -21
  203. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  204. package/lib/esm/presentation-common/PresentationRpcInterface.js +2 -5
  205. package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
  206. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts +8 -8
  207. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  208. package/lib/esm/presentation-common/RpcRequestsHandler.js +11 -1
  209. package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
  210. package/lib/esm/presentation-common/RulesetVariables.d.ts +5 -0
  211. package/lib/esm/presentation-common/RulesetVariables.d.ts.map +1 -1
  212. package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
  213. package/lib/esm/presentation-common/Update.d.ts +21 -4
  214. package/lib/esm/presentation-common/Update.d.ts.map +1 -1
  215. package/lib/esm/presentation-common/Update.js +34 -4
  216. package/lib/esm/presentation-common/Update.js.map +1 -1
  217. package/lib/esm/presentation-common/content/Category.d.ts.map +1 -1
  218. package/lib/esm/presentation-common/content/Category.js +1 -2
  219. package/lib/esm/presentation-common/content/Category.js.map +1 -1
  220. package/lib/esm/presentation-common/content/ContentTraverser.d.ts +194 -24
  221. package/lib/esm/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  222. package/lib/esm/presentation-common/content/ContentTraverser.js +60 -42
  223. package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
  224. package/lib/esm/presentation-common/content/Descriptor.d.ts +67 -18
  225. package/lib/esm/presentation-common/content/Descriptor.d.ts.map +1 -1
  226. package/lib/esm/presentation-common/content/Descriptor.js +0 -2
  227. package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
  228. package/lib/esm/presentation-common/content/Fields.d.ts +24 -5
  229. package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
  230. package/lib/esm/presentation-common/content/Fields.js +11 -8
  231. package/lib/esm/presentation-common/content/Fields.js.map +1 -1
  232. package/lib/esm/presentation-common/content/Item.d.ts +6 -8
  233. package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
  234. package/lib/esm/presentation-common/content/Item.js +6 -8
  235. package/lib/esm/presentation-common/content/Item.js.map +1 -1
  236. package/lib/esm/presentation-common/content/Property.d.ts +8 -2
  237. package/lib/esm/presentation-common/content/Property.d.ts.map +1 -1
  238. package/lib/esm/presentation-common/content/Property.js +12 -8
  239. package/lib/esm/presentation-common/content/Property.js.map +1 -1
  240. package/lib/esm/presentation-common/content/Value.d.ts +43 -11
  241. package/lib/esm/presentation-common/content/Value.d.ts.map +1 -1
  242. package/lib/esm/presentation-common/content/Value.js +72 -16
  243. package/lib/esm/presentation-common/content/Value.js.map +1 -1
  244. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts +11 -4
  245. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -1
  246. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js +10 -2
  247. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
  248. package/lib/esm/presentation-common/hierarchy/Key.d.ts +27 -14
  249. package/lib/esm/presentation-common/hierarchy/Key.d.ts.map +1 -1
  250. package/lib/esm/presentation-common/hierarchy/Key.js +15 -6
  251. package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
  252. package/lib/esm/presentation-common/hierarchy/Node.d.ts +12 -7
  253. package/lib/esm/presentation-common/hierarchy/Node.d.ts.map +1 -1
  254. package/lib/esm/presentation-common/hierarchy/Node.js +23 -14
  255. package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
  256. package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts +18 -7
  257. package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
  258. package/lib/esm/presentation-common/hierarchy/NodePathElement.js +33 -9
  259. package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  260. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts +5 -2
  261. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts.map +1 -1
  262. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  263. package/lib/esm/presentation-common/rules/Rule.d.ts +5 -3
  264. package/lib/esm/presentation-common/rules/Rule.d.ts.map +1 -1
  265. package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
  266. package/lib/esm/presentation-common/rules/Ruleset.d.ts +0 -1
  267. package/lib/esm/presentation-common/rules/Ruleset.d.ts.map +1 -1
  268. package/lib/esm/presentation-common/rules/Ruleset.js.map +1 -1
  269. package/lib/esm/presentation-common/rules/SchemasSpecification.d.ts +1 -1
  270. package/lib/esm/presentation-common/rules/SchemasSpecification.js.map +1 -1
  271. package/lib/esm/presentation-common/rules/Variables.d.ts +5 -2
  272. package/lib/esm/presentation-common/rules/Variables.d.ts.map +1 -1
  273. package/lib/esm/presentation-common/rules/Variables.js.map +1 -1
  274. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +2 -2
  275. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts.map +1 -1
  276. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  277. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +2 -2
  278. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts.map +1 -1
  279. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  280. package/lib/esm/presentation-common/rules/content/ContentRule.d.ts +2 -2
  281. package/lib/esm/presentation-common/rules/content/ContentRule.d.ts.map +1 -1
  282. package/lib/esm/presentation-common/rules/content/ContentRule.js.map +1 -1
  283. package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts +5 -2
  284. package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
  285. package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  286. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +2 -2
  287. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts.map +1 -1
  288. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  289. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +2 -2
  290. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts.map +1 -1
  291. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  292. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.d.ts +2 -2
  293. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.d.ts.map +1 -1
  294. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  295. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +9 -6
  296. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts.map +1 -1
  297. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  298. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +6 -3
  299. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts.map +1 -1
  300. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  301. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts +2 -2
  302. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts.map +1 -1
  303. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
  304. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.d.ts +2 -2
  305. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.d.ts.map +1 -1
  306. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  307. package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts +17 -10
  308. package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
  309. package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  310. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts +2 -2
  311. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts.map +1 -1
  312. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
  313. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts +17 -15
  314. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
  315. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  316. package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts +2 -2
  317. package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts.map +1 -1
  318. package/lib/esm/presentation-common/rules/customization/LabelOverride.js.map +1 -1
  319. package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts +3 -3
  320. package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts.map +1 -1
  321. package/lib/esm/presentation-common/rules/customization/SortingRule.js.map +1 -1
  322. package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts +2 -2
  323. package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts.map +1 -1
  324. package/lib/esm/presentation-common/rules/customization/StyleOverride.js.map +1 -1
  325. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +1 -2
  326. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.d.ts.map +1 -1
  327. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  328. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +5 -4
  329. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
  330. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js +0 -1
  331. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  332. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +2 -2
  333. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
  334. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  335. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +9 -6
  336. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts.map +1 -1
  337. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  338. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +2 -2
  339. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
  340. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  341. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +2 -2
  342. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts.map +1 -1
  343. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  344. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +2 -2
  345. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts.map +1 -1
  346. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  347. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.d.ts +1 -2
  348. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.d.ts.map +1 -1
  349. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  350. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.d.ts +0 -1
  351. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.d.ts.map +1 -1
  352. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  353. package/lib/esm/presentation-common/selection/SelectionScope.d.ts +17 -4
  354. package/lib/esm/presentation-common/selection/SelectionScope.d.ts.map +1 -1
  355. package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
  356. package/package.json +10 -10
@@ -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,sDAA6C;AAC7C,8BAAqD;AAErD;;;GAGG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,wDAAmC,CAAA;IACnC,gEAA2C,CAAA;IAC3C,sEAAiD,CAAA;IACjD,0EAAqD,CAAA;AACvD,CAAC,EALW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAK5B;AAOD,cAAc;AACd,IAAiB,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,gBAAW,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5E,OAAO,EAAE,GAAG,GAAG,EAAE,CAAC;IACpB,CAAC;IAJe,cAAM,SAIrB,CAAA;IAED,qCAAqC;IACrC,SAAgB,QAAQ,CAAC,IAAiB;QACxC,IAAI,kBAAkB,CAAC,IAAI,CAAC;YAC1B,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,gBAAW,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5F,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC;IACjC,CAAC;IAJe,gBAAQ,WAIvB,CAAA;IAMD,SAAgB,kBAAk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,IAAI,CAAC;IACd,CAAC;IA3Ce,cAAM,SA2CrB,CAAA;AACH,CAAC,EA5GgB,OAAO,GAAP,eAAO,KAAP,eAAO,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;;GAE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C,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,IAAA,qBAAM,EAAC,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,IAAA,qBAAM,EAAC,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,IAAA,qBAAM,EAAC,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,GAAP,eAAO,KAAP,eAAO,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 } 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/**\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}\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"]}
@@ -60,7 +60,7 @@ export interface Node {
60
60
  /**
61
61
  * Identifies whether the hierarchy level below this node supports filtering. If not, requesting either a hierarchy level descriptor or
62
62
  * a hierarchy level with [[HierarchyRequestOptions.instanceFilter]] will throw an error with [[PresentationStatus.InvalidArgument]] status.
63
- * @alpha
63
+ * @beta
64
64
  */
65
65
  supportsFiltering?: boolean;
66
66
  /** Extended data injected into this node */
@@ -71,6 +71,7 @@ export interface Node {
71
71
  /**
72
72
  * Serialized [[Node]] JSON representation.
73
73
  * @public
74
+ * @deprecated in 3.x. Use [[Node]].
74
75
  */
75
76
  export interface NodeJSON {
76
77
  key: NodeKeyJSON;
@@ -94,7 +95,7 @@ export interface NodeJSON {
94
95
  isChecked?: boolean;
95
96
  /** @deprecated in 3.x. */
96
97
  isCheckboxEnabled?: boolean;
97
- /** @alpha */
98
+ /** @beta */
98
99
  supportsFiltering?: boolean;
99
100
  extendedData?: {
100
101
  [key: string]: any;
@@ -108,6 +109,7 @@ export declare type PartialNode = AllOrNone<Partial<Node>, "key" | "label">;
108
109
  /**
109
110
  * Serialized [[PartialNode]] JSON representation.
110
111
  * @public
112
+ * @deprecated in 3.x. Use [[PartialNode]].
111
113
  */
112
114
  export declare type PartialNodeJSON = AllOrNone<Partial<NodeJSON>, "key" | "labelDefinition">;
113
115
  declare type AllOrNone<T, P extends keyof T> = Omit<T, P> & ({
@@ -115,18 +117,23 @@ declare type AllOrNone<T, P extends keyof T> = Omit<T, P> & ({
115
117
  } | Required<Pick<T, P>>);
116
118
  /** @public */
117
119
  export declare namespace Node {
118
- /** Serialize given [[Node]] to JSON */
120
+ /**
121
+ * Serialize given [[Node]] to JSON
122
+ * @deprecated in 3.x. Use [[Node]].
123
+ */
119
124
  function toJSON(node: Node): NodeJSON;
120
125
  /** @internal */
121
126
  function toPartialJSON(node: PartialNode): PartialNodeJSON;
122
- /** Deserialize [[Node]] from JSON */
127
+ /**
128
+ * Deserialize [[Node]] from JSON
129
+ * @deprecated in 3.x. Use [[Node]].
130
+ */
123
131
  function fromJSON(json: NodeJSON | string): Node;
124
132
  /** @internal */
125
133
  function fromPartialJSON(json: PartialNodeJSON): PartialNode;
126
134
  /**
127
135
  * Reviver function that can be used as a second argument for
128
136
  * `JSON.parse` method when parsing [[Node]] objects.
129
- *
130
137
  * @internal
131
138
  */
132
139
  function reviver(key: string, value: any): any;
@@ -134,14 +141,12 @@ export declare namespace Node {
134
141
  * Deserialize nodes list from JSON
135
142
  * @param json JSON or JSON serialized to string to deserialize from
136
143
  * @returns Deserialized nodes list
137
- *
138
144
  * @internal
139
145
  */
140
146
  function listFromJSON(json: NodeJSON[] | string): Node[];
141
147
  /**
142
148
  * Reviver function that can be used as a second argument for
143
149
  * `JSON.parse` method when parsing [[Node]][] objects.
144
- *
145
150
  * @internal
146
151
  */
147
152
  function listReviver(key: string, value: any): any;
@@ -1 +1 @@
1
- {"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Node.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,IAAI;IACnB,6CAA6C;IAC7C,GAAG,EAAE,OAAO,CAAC;IACb,uCAAuC;IACvC,KAAK,EAAE,eAAe,CAAC;IACvB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,4BAA4B;IAC5B,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gB,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"}
@@ -8,47 +8,55 @@
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.Node = void 0;
11
- const LabelDefinition_1 = require("../LabelDefinition");
12
11
  const Key_1 = require("./Key");
13
12
  /** @public */
14
13
  var Node;
15
14
  (function (Node) {
16
- /** Serialize given [[Node]] to JSON */
15
+ /**
16
+ * Serialize given [[Node]] to JSON
17
+ * @deprecated in 3.x. Use [[Node]].
18
+ */
19
+ // eslint-disable-next-line deprecation/deprecation
17
20
  function toJSON(node) {
18
- const { key, label, ...baseNode } = node;
21
+ const { label, ...baseNode } = node;
19
22
  return {
20
23
  ...baseNode,
21
- key: Key_1.NodeKey.toJSON(key),
22
- labelDefinition: LabelDefinition_1.LabelDefinition.toJSON(label),
24
+ labelDefinition: label,
23
25
  };
24
26
  }
25
27
  Node.toJSON = toJSON;
26
28
  /** @internal */
29
+ // eslint-disable-next-line deprecation/deprecation
27
30
  function toPartialJSON(node) {
28
31
  if (node.key === undefined) {
29
32
  return node;
30
33
  }
31
- const { key, label, ...baseNode } = node;
34
+ const { label, ...baseNode } = node;
32
35
  return {
33
36
  ...baseNode,
34
- key: Key_1.NodeKey.toJSON(key),
35
- labelDefinition: LabelDefinition_1.LabelDefinition.toJSON(label),
37
+ labelDefinition: label,
36
38
  };
37
39
  }
38
40
  Node.toPartialJSON = toPartialJSON;
39
- /** Deserialize [[Node]] from JSON */
41
+ /**
42
+ * Deserialize [[Node]] from JSON
43
+ * @deprecated in 3.x. Use [[Node]].
44
+ */
45
+ // eslint-disable-next-line deprecation/deprecation
40
46
  function fromJSON(json) {
41
47
  if (typeof json === "string")
42
48
  return JSON.parse(json, reviver);
43
49
  const { labelDefinition, ...baseJson } = json;
44
50
  return {
45
51
  ...baseJson,
52
+ // eslint-disable-next-line deprecation/deprecation
46
53
  key: Key_1.NodeKey.fromJSON(json.key),
47
- label: LabelDefinition_1.LabelDefinition.fromJSON(labelDefinition),
54
+ label: labelDefinition,
48
55
  };
49
56
  }
50
57
  Node.fromJSON = fromJSON;
51
58
  /** @internal */
59
+ // eslint-disable-next-line deprecation/deprecation
52
60
  function fromPartialJSON(json) {
53
61
  if (json.key === undefined) {
54
62
  return json;
@@ -56,18 +64,19 @@ var Node;
56
64
  const { key, labelDefinition, ...baseJson } = json;
57
65
  return {
58
66
  ...baseJson,
67
+ // eslint-disable-next-line deprecation/deprecation
59
68
  key: Key_1.NodeKey.fromJSON(key),
60
- label: LabelDefinition_1.LabelDefinition.fromJSON(labelDefinition),
69
+ label: labelDefinition,
61
70
  };
62
71
  }
63
72
  Node.fromPartialJSON = fromPartialJSON;
64
73
  /**
65
74
  * Reviver function that can be used as a second argument for
66
75
  * `JSON.parse` method when parsing [[Node]] objects.
67
- *
68
76
  * @internal
69
77
  */
70
78
  function reviver(key, value) {
79
+ // eslint-disable-next-line deprecation/deprecation
71
80
  return key === "" ? fromJSON(value) : value;
72
81
  }
73
82
  Node.reviver = reviver;
@@ -75,19 +84,19 @@ var Node;
75
84
  * Deserialize nodes list from JSON
76
85
  * @param json JSON or JSON serialized to string to deserialize from
77
86
  * @returns Deserialized nodes list
78
- *
79
87
  * @internal
80
88
  */
89
+ // eslint-disable-next-line deprecation/deprecation
81
90
  function listFromJSON(json) {
82
91
  if (typeof json === "string")
83
92
  return JSON.parse(json, listReviver);
93
+ // eslint-disable-next-line deprecation/deprecation
84
94
  return json.map((m) => fromJSON(m));
85
95
  }
86
96
  Node.listFromJSON = listFromJSON;
87
97
  /**
88
98
  * Reviver function that can be used as a second argument for
89
99
  * `JSON.parse` method when parsing [[Node]][] objects.
90
- *
91
100
  * @internal
92
101
  */
93
102
  function listReviver(key, value) {
@@ -1 +1 @@
1
- {"version":3,"file":"Node.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Node.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAA0E;AAC1E,+BAA6C;AAmH7C,cAAc;AACd,IAAiB,IAAI,CAmFpB;AAnFD,WAAiB,IAAI;IACnB,uCAAuC;IACvC,SAAgB,MAAM,CAAC,IAAU;QAC/B,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;QACzC,OAAO;YACL,GAAG,QAAQ;YACX,GAAG,EAAE,aAAO,CAAC,MAAM,CAAC,GAAG,CAAC;YACxB,eAAe,EAAE,iCAAe,CAAC,MAAM,CAAC,KAAK,CAAC;SAC/C,CAAC;IACJ,CAAC;IAPe,WAAM,SAOrB,CAAA;IAED,gBAAgB;IAChB,SAAgB,aAAa,CAAC,IAAiB;QAC7C,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,EAAE;YAC1B,OAAO,IAAI,CAAC;SACb;QAED,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;QACzC,OAAO;YACL,GAAG,QAAQ;YACX,GAAG,EAAE,aAAO,CAAC,MAAM,CAAC,GAAG,CAAC;YACxB,eAAe,EAAE,iCAAe,CAAC,MAAM,CAAC,KAAK,CAAC;SAC/C,CAAC;IACJ,CAAC;IAXe,kBAAa,gBAW5B,CAAA;IAED,qCAAqC;IACrC,SAAgB,QAAQ,CAAC,IAAuB;QAC9C,IAAI,O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,iBAAY,eAI3B,CAAA;IAED;;;;;OAKG;IACH,SAAgB,WAAW,CAAC,GAAW,EAAE,KAAU;QACjD,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAClD,CAAC;IAFe,gBAAW,cAE1B,CAAA;AACH,CAAC,EAnFgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAmFpB","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 { LabelDefinition, LabelDefinitionJSON } from \"../LabelDefinition\";\r\nimport { NodeKey, NodeKeyJSON } from \"./Key\";\r\n\r\n/**\r\n * Data structure that describes a tree node.\r\n * @public\r\n */\r\nexport interface Node {\r\n /** A key that uniquely identifies a node. */\r\n key: NodeKey;\r\n /** Definition of node display label */\r\n label: LabelDefinition;\r\n /** Extensive description */\r\n description?: string;\r\n /**\r\n * Image ID\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n imageId?: string;\r\n /**\r\n * Foreground color\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n foreColor?: string;\r\n /**\r\n * Background color\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n backColor?: string;\r\n /**\r\n * Font style\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n fontStyle?: string;\r\n /** Does this node have child nodes */\r\n hasChildren?: boolean;\r\n /** Is this node selectable */\r\n isSelectionDisabled?: boolean;\r\n /** Is this node editable */\r\n isEditable?: boolean;\r\n /** Is this node expanded */\r\n isExpanded?: boolean;\r\n /**\r\n * Is checkbox visible for this node\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n isCheckboxVisible?: boolean;\r\n /**\r\n * Is this node's checkbox checked\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n isChecked?: boolean;\r\n /**\r\n * Is this node's checkbox enabled\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n isCheckboxEnabled?: boolean;\r\n /**\r\n * Identifies whether the hierarchy level below this node supports filtering. If not, requesting either a hierarchy level descriptor or\r\n * a hierarchy level with [[HierarchyRequestOptions.instanceFilter]] will throw an error with [[PresentationStatus.InvalidArgument]] status.\r\n * @alpha\r\n */\r\n supportsFiltering?: boolean;\r\n /** Extended data injected into this node */\r\n extendedData?: {\r\n [key: string]: any;\r\n };\r\n}\r\n\r\n/**\r\n * Serialized [[Node]] JSON representation.\r\n * @public\r\n */\r\nexport interface NodeJSON {\r\n key: NodeKeyJSON;\r\n labelDefinition: LabelDefinitionJSON;\r\n description?: string;\r\n /** @deprecated in 3.x. */\r\n imageId?: string;\r\n /** @deprecated in 3.x. */\r\n foreColor?: string;\r\n /** @deprecated in 3.x. */\r\n backColor?: string;\r\n /** @deprecated in 3.x. */\r\n fontStyle?: string;\r\n hasChildren?: boolean;\r\n isSelectionDisabled?: boolean;\r\n isEditable?: boolean;\r\n isExpanded?: boolean;\r\n /** @deprecated in 3.x. */\r\n isCheckboxVisible?: boolean;\r\n /** @deprecated in 3.x. */\r\n isChecked?: boolean;\r\n /** @deprecated in 3.x. */\r\n isCheckboxEnabled?: boolean;\r\n /** @alpha */\r\n supportsFiltering?: boolean;\r\n extendedData?: {\r\n [key: string]: any;\r\n };\r\n}\r\n\r\n/**\r\n * Partial node definition.\r\n * @public\r\n */\r\nexport type PartialNode = AllOrNone<Partial<Node>, \"key\" | \"label\">;\r\n\r\n/**\r\n * Serialized [[PartialNode]] JSON representation.\r\n * @public\r\n */\r\nexport type PartialNodeJSON = AllOrNone<Partial<NodeJSON>, \"key\" | \"labelDefinition\">;\r\n\r\ntype AllOrNone<T, P extends keyof T> = Omit<T, P> & ({ [K in P]?: never } | Required<Pick<T, P>>);\r\n\r\n/** @public */\r\nexport namespace Node {\r\n /** Serialize given [[Node]] to JSON */\r\n export function toJSON(node: Node): NodeJSON {\r\n const { key, label, ...baseNode } = node;\r\n return {\r\n ...baseNode,\r\n key: NodeKey.toJSON(key),\r\n labelDefinition: LabelDefinition.toJSON(label),\r\n };\r\n }\r\n\r\n /** @internal */\r\n export function toPartialJSON(node: PartialNode): PartialNodeJSON {\r\n if (node.key === undefined) {\r\n return node;\r\n }\r\n\r\n const { key, label, ...baseNode } = node;\r\n return {\r\n ...baseNode,\r\n key: NodeKey.toJSON(key),\r\n labelDefinition: LabelDefinition.toJSON(label),\r\n };\r\n }\r\n\r\n /** Deserialize [[Node]] from JSON */\r\n export function fromJSON(json: NodeJSON | string): Node {\r\n if (typeof json === \"string\")\r\n return JSON.parse(json, reviver);\r\n const { labelDefinition, ...baseJson } = json;\r\n return {\r\n ...baseJson,\r\n key: NodeKey.fromJSON(json.key),\r\n label: LabelDefinition.fromJSON(labelDefinition),\r\n };\r\n }\r\n\r\n /** @internal */\r\n export function fromPartialJSON(json: PartialNodeJSON): PartialNode {\r\n if (json.key === undefined) {\r\n return json;\r\n }\r\n\r\n const { key, labelDefinition, ...baseJson } = json;\r\n return {\r\n ...baseJson,\r\n key: NodeKey.fromJSON(key),\r\n label: LabelDefinition.fromJSON(labelDefinition),\r\n };\r\n }\r\n\r\n /**\r\n * Reviver function that can be used as a second argument for\r\n * `JSON.parse` method when parsing [[Node]] objects.\r\n *\r\n * @internal\r\n */\r\n export function reviver(key: string, value: any): any {\r\n return key === \"\" ? fromJSON(value) : value;\r\n }\r\n\r\n /**\r\n * Deserialize nodes list from JSON\r\n * @param json JSON or JSON serialized to string to deserialize from\r\n * @returns Deserialized nodes list\r\n *\r\n * @internal\r\n */\r\n export function listFromJSON(json: NodeJSON[] | string): Node[] {\r\n if (typeof json === \"string\")\r\n return JSON.parse(json, listReviver);\r\n return json.map((m) => fromJSON(m));\r\n }\r\n\r\n /**\r\n * Reviver function that can be used as a second argument for\r\n * `JSON.parse` method when parsing [[Node]][] objects.\r\n *\r\n * @internal\r\n */\r\n export function listReviver(key: string, value: any): any {\r\n return key === \"\" ? listFromJSON(value) : value;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Node.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Node.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,+BAA6C;AAyH7C,cAAc;AACd,IAAiB,IAAI,CA6FpB;AA7FD,WAAiB,IAAI;IACnB;;;OAGG;IACH,mDAAmD;IACnD,SAAgB,MAAM,CAAC,IAAU;QAC/B,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;QACpC,OAAO;YACL,GAAG,QAAQ;YACX,eAAe,EAAE,KAAK;SACvB,CAAC;IACJ,CAAC;IANe,WAAM,SAMrB,CAAA;IAED,gBAAgB;IAChB,mDAAmD;IACnD,SAAgB,aAAa,CAAC,IAAiB;QAC7C,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,EAAE;YAC1B,OAAO,IAAI,CAAC;SACb;QAED,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;QACpC,OAAO;YACL,GAAG,QAAQ;YACX,eAAe,EAAE,KAAK;SACvB,CAAC;IACJ,CAAC;IAVe,kBAAa,gBAU5B,CAAA;IAED;;;OAGG;IACH,mDAAmD;IACnD,SAAgB,QAAQ,CA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CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;IALe,iBAAY,eAK3B,CAAA;IAED;;;;OAIG;IACH,SAAgB,WAAW,CAAC,GAAW,EAAE,KAAU;QACjD,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAClD,CAAC;IAFe,gBAAW,cAE1B,CAAA;AACH,CAAC,EA7FgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QA6FpB","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 { LabelDefinition, LabelDefinitionJSON } from \"../LabelDefinition\";\r\nimport { NodeKey, NodeKeyJSON } from \"./Key\";\r\n\r\n/**\r\n * Data structure that describes a tree node.\r\n * @public\r\n */\r\nexport interface Node {\r\n /** A key that uniquely identifies a node. */\r\n key: NodeKey;\r\n /** Definition of node display label */\r\n label: LabelDefinition;\r\n /** Extensive description */\r\n description?: string;\r\n /**\r\n * Image ID\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n imageId?: string;\r\n /**\r\n * Foreground color\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n foreColor?: string;\r\n /**\r\n * Background color\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n backColor?: string;\r\n /**\r\n * Font style\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n fontStyle?: string;\r\n /** Does this node have child nodes */\r\n hasChildren?: boolean;\r\n /** Is this node selectable */\r\n isSelectionDisabled?: boolean;\r\n /** Is this node editable */\r\n isEditable?: boolean;\r\n /** Is this node expanded */\r\n isExpanded?: boolean;\r\n /**\r\n * Is checkbox visible for this node\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n isCheckboxVisible?: boolean;\r\n /**\r\n * Is this node's checkbox checked\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n isChecked?: boolean;\r\n /**\r\n * Is this node's checkbox enabled\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n isCheckboxEnabled?: boolean;\r\n /**\r\n * Identifies whether the hierarchy level below this node supports filtering. If not, requesting either a hierarchy level descriptor or\r\n * a hierarchy level with [[HierarchyRequestOptions.instanceFilter]] will throw an error with [[PresentationStatus.InvalidArgument]] status.\r\n * @beta\r\n */\r\n supportsFiltering?: boolean;\r\n /** Extended data injected into this node */\r\n extendedData?: {\r\n [key: string]: any;\r\n };\r\n}\r\n\r\n/**\r\n * Serialized [[Node]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[Node]].\r\n */\r\nexport interface NodeJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n key: NodeKeyJSON;\r\n // TODO: rename to `label`\r\n // eslint-disable-next-line deprecation/deprecation\r\n labelDefinition: LabelDefinitionJSON;\r\n description?: string;\r\n /** @deprecated in 3.x. */\r\n imageId?: string;\r\n /** @deprecated in 3.x. */\r\n foreColor?: string;\r\n /** @deprecated in 3.x. */\r\n backColor?: string;\r\n /** @deprecated in 3.x. */\r\n fontStyle?: string;\r\n hasChildren?: boolean;\r\n isSelectionDisabled?: boolean;\r\n isEditable?: boolean;\r\n isExpanded?: boolean;\r\n /** @deprecated in 3.x. */\r\n isCheckboxVisible?: boolean;\r\n /** @deprecated in 3.x. */\r\n isChecked?: boolean;\r\n /** @deprecated in 3.x. */\r\n isCheckboxEnabled?: boolean;\r\n /** @beta */\r\n supportsFiltering?: boolean;\r\n extendedData?: {\r\n [key: string]: any;\r\n };\r\n}\r\n\r\n/**\r\n * Partial node definition.\r\n * @public\r\n */\r\nexport type PartialNode = AllOrNone<Partial<Node>, \"key\" | \"label\">;\r\n\r\n/**\r\n * Serialized [[PartialNode]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[PartialNode]].\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport type PartialNodeJSON = AllOrNone<Partial<NodeJSON>, \"key\" | \"labelDefinition\">;\r\n\r\ntype AllOrNone<T, P extends keyof T> = Omit<T, P> & ({ [K in P]?: never } | Required<Pick<T, P>>);\r\n\r\n/** @public */\r\nexport namespace Node {\r\n /**\r\n * Serialize given [[Node]] to JSON\r\n * @deprecated in 3.x. Use [[Node]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(node: Node): NodeJSON {\r\n const { label, ...baseNode } = node;\r\n return {\r\n ...baseNode,\r\n labelDefinition: label,\r\n };\r\n }\r\n\r\n /** @internal */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toPartialJSON(node: PartialNode): PartialNodeJSON {\r\n if (node.key === undefined) {\r\n return node;\r\n }\r\n\r\n const { label, ...baseNode } = node;\r\n return {\r\n ...baseNode,\r\n labelDefinition: label,\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[Node]] from JSON\r\n * @deprecated in 3.x. Use [[Node]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: NodeJSON | string): Node {\r\n if (typeof json === \"string\")\r\n return JSON.parse(json, reviver);\r\n const { labelDefinition, ...baseJson } = json;\r\n return {\r\n ...baseJson,\r\n // eslint-disable-next-line deprecation/deprecation\r\n key: NodeKey.fromJSON(json.key),\r\n label: labelDefinition,\r\n };\r\n }\r\n\r\n /** @internal */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromPartialJSON(json: PartialNodeJSON): PartialNode {\r\n if (json.key === undefined) {\r\n return json;\r\n }\r\n\r\n const { key, labelDefinition, ...baseJson } = json;\r\n return {\r\n ...baseJson,\r\n // eslint-disable-next-line deprecation/deprecation\r\n key: NodeKey.fromJSON(key),\r\n label: labelDefinition,\r\n };\r\n }\r\n\r\n /**\r\n * Reviver function that can be used as a second argument for\r\n * `JSON.parse` method when parsing [[Node]] objects.\r\n * @internal\r\n */\r\n export function reviver(key: string, value: any): any {\r\n // eslint-disable-next-line deprecation/deprecation\r\n return key === \"\" ? fromJSON(value) : value;\r\n }\r\n\r\n /**\r\n * Deserialize nodes list from JSON\r\n * @param json JSON or JSON serialized to string to deserialize from\r\n * @returns Deserialized nodes list\r\n * @internal\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function listFromJSON(json: NodeJSON[] | string): Node[] {\r\n if (typeof json === \"string\")\r\n return JSON.parse(json, listReviver);\r\n // eslint-disable-next-line deprecation/deprecation\r\n return json.map((m) => fromJSON(m));\r\n }\r\n\r\n /**\r\n * Reviver function that can be used as a second argument for\r\n * `JSON.parse` method when parsing [[Node]][] objects.\r\n * @internal\r\n */\r\n export function listReviver(key: string, value: any): any {\r\n return key === \"\" ? listFromJSON(value) : value;\r\n }\r\n}\r\n"]}
@@ -5,6 +5,7 @@ import { Node, NodeJSON } from "./Node";
5
5
  /**
6
6
  * Serialized [[NodePathElement]] JSON representation.
7
7
  * @public
8
+ * @deprecated in 3.x. Use [[NodePathElement]].
8
9
  */
9
10
  export interface NodePathElementJSON {
10
11
  node: NodeJSON;
@@ -31,14 +32,19 @@ export interface NodePathElement {
31
32
  }
32
33
  /** @public */
33
34
  export declare namespace NodePathElement {
34
- /** Serialize given [[NodePathElement]] to JSON */
35
+ /**
36
+ * Serialize given [[NodePathElement]] to JSON
37
+ * @deprecated in 3.x. Use [[NodePathElement]].
38
+ */
35
39
  function toJSON(npe: NodePathElement): NodePathElementJSON;
36
- /** Deserialize [[NodePathElement]] from JSON */
40
+ /**
41
+ * Deserialize [[NodePathElement]] from JSON
42
+ * @deprecated in 3.x. Use [[NodePathElement]].
43
+ */
37
44
  function fromJSON(json: NodePathElementJSON | string): NodePathElement;
38
45
  /**
39
46
  * Reviver function that can be used as a second argument for
40
47
  * `JSON.parse` method when parsing [[NodePathElement]] objects.
41
- *
42
48
  * @internal
43
49
  */
44
50
  function reviver(key: string, value: any): any;
@@ -46,14 +52,12 @@ export declare namespace NodePathElement {
46
52
  * Deserialize [[NodePathElement]] list from JSON
47
53
  * @param json JSON or JSON serialized to string to deserialize from
48
54
  * @returns Deserialized [[NodePathElement]] list
49
- *
50
55
  * @internal
51
56
  */
52
57
  function listFromJSON(json: NodePathElementJSON[] | string): NodePathElement[];
53
58
  /**
54
59
  * Reviver function that can be used as a second argument for
55
60
  * `JSON.parse` method when parsing [[NodePathElement]][] objects.
56
- *
57
61
  * @internal
58
62
  */
59
63
  function listReviver(key: string, value: any): any;
@@ -61,6 +65,7 @@ export declare namespace NodePathElement {
61
65
  /**
62
66
  * Serialized [[NodePathFilteringData]] JSON representation.
63
67
  * @public
68
+ * @deprecated in 3.x. Use [[NodePathFilteringData]].
64
69
  */
65
70
  export interface NodePathFilteringDataJSON {
66
71
  occurances: number;
@@ -78,9 +83,15 @@ export interface NodePathFilteringData {
78
83
  }
79
84
  /** @public */
80
85
  export declare namespace NodePathFilteringData {
81
- /** Serialize given [[NodePathFilteringData]] to JSON */
86
+ /**
87
+ * Serialize given [[NodePathFilteringData]] to JSON
88
+ * @deprecated in 3.x. Use [[NodePathFilteringData]].
89
+ */
82
90
  function toJSON(npfd: NodePathFilteringData): NodePathFilteringDataJSON;
83
- /** Deserialize [[NodePathFilteringData]] from JSON */
91
+ /**
92
+ * Deserialize [[NodePathFilteringData]] from JSON
93
+ * @deprecated in 3.x. Use [[NodePathFilteringData]].
94
+ */
84
95
  function fromJSON(json: NodePathFilteringDataJSON): NodePathFilteringData;
85
96
  }
86
97
  //# sourceMappingURL=NodePathElement.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NodePathElement.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/NodePathElement.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAExC;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,aAAa,CAAC,EAAE,yBAAyB,CAAC;CAC3C;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,IAAI,EAAE,IAAI,CAAC;IACX,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0BAA0B;IAC1B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,+CAA+C;IAC/C,aAAa,CAAC,EAAE,qBAAqB,CAAC;CACvC;AAED,cAAc;AACd,yBAAiB,eAAe,CAAC;IAC/B,kDAAkD;IAClD,SAAgB,MAAM,CAAC,GAAG,EAAE,eAAe,GAAG,mBAAmB,CAWhE;IAED,gDAAgD;IAChD,SAAgB,QAAQ,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,GAAG,eAAe,CAa5E;IAED;;;;;OAKG;IACH,SAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAEpD;IAED;;;;;;OAMG;IACH,SAAgB,YAAY,CAAC,IAAI,EAAE,mBAAmB,EAAE,GAAG,MAAM,GAAG,eAAe,EAAE,CAIpF;IAED;;;;;OAKG;IACH,SAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAExD;CACF;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,sDAAsD;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB,+EAA+E;IAC/E,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,cAAc;AACd,yBAAiB,qBAAqB,CAAC;IACrC,wDAAwD;IACxD,SAAgB,MAAM,CAAC,IAAI,EAAE,qBAAqB,GAAG,yBAAyB,CAK7E;IAED,sDAAsD;IACtD,SAAgB,QAAQ,CAAC,IAAI,EAAE,yBAAyB,GAAG,qBAAqB,CAK/E;CACF"}
1
+ {"version":3,"file":"NodePathElement.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/NodePathElement.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAExC;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAElC,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAEhC,aAAa,CAAC,EAAE,yBAAyB,CAAC;CAC3C;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,IAAI,EAAE,IAAI,CAAC;IACX,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0BAA0B;IAC1B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,+CAA+C;IAC/C,aAAa,CAAC,EAAE,qBAAqB,CAAC;CACvC;AAED,cAAc;AACd,yBAAiB,eAAe,CAAC;IAC/B;;;OAGG;IAEH,SAAgB,MAAM,CAAC,GAAG,EAAE,eAAe,GAAG,mBAAmB,CAgBhE;IAED;;;OAGG;IAEH,SAAgB,QAAQ,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,GAAG,eAAe,CAgB5E;IAED;;;;OAIG;IACH,SAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAGpD;IAED;;;;;OAKG;IAEH,SAAgB,YAAY,CAAC,IAAI,EAAE,mBAAmB,EAAE,GAAG,MAAM,GAAG,eAAe,EAAE,CAKpF;IAED;;;;OAIG;IACH,SAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAExD;CACF;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,sDAAsD;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB,+EAA+E;IAC/E,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,cAAc;AACd,yBAAiB,qBAAqB,CAAC;IACrC;;;OAGG;IAEH,SAAgB,MAAM,CAAC,IAAI,EAAE,qBAAqB,GAAG,yBAAyB,CAK7E;IAED;;;OAGG;IAEH,SAAgB,QAAQ,CAAC,IAAI,EAAE,yBAAyB,GAAG,qBAAqB,CAK/E;CACF"}
@@ -12,43 +12,59 @@ const Node_1 = require("./Node");
12
12
  /** @public */
13
13
  var NodePathElement;
14
14
  (function (NodePathElement) {
15
- /** Serialize given [[NodePathElement]] to JSON */
15
+ /**
16
+ * Serialize given [[NodePathElement]] to JSON
17
+ * @deprecated in 3.x. Use [[NodePathElement]].
18
+ */
19
+ // eslint-disable-next-line deprecation/deprecation
16
20
  function toJSON(npe) {
21
+ // eslint-disable-next-line deprecation/deprecation
17
22
  const result = {
23
+ // eslint-disable-next-line deprecation/deprecation
18
24
  node: Node_1.Node.toJSON(npe.node),
19
25
  index: npe.index,
26
+ // eslint-disable-next-line deprecation/deprecation
20
27
  children: npe.children.map(NodePathElement.toJSON),
21
28
  };
22
29
  if (undefined !== npe.isMarked)
23
30
  result.isMarked = npe.isMarked;
24
- if (undefined !== npe.filteringData)
31
+ if (undefined !== npe.filteringData) {
32
+ // eslint-disable-next-line deprecation/deprecation
25
33
  result.filteringData = NodePathFilteringData.toJSON(npe.filteringData);
34
+ }
26
35
  return result;
27
36
  }
28
37
  NodePathElement.toJSON = toJSON;
29
- /** Deserialize [[NodePathElement]] from JSON */
38
+ /**
39
+ * Deserialize [[NodePathElement]] from JSON
40
+ * @deprecated in 3.x. Use [[NodePathElement]].
41
+ */
42
+ // eslint-disable-next-line deprecation/deprecation
30
43
  function fromJSON(json) {
31
44
  if (typeof json === "string")
32
45
  return JSON.parse(json, reviver);
33
46
  const result = {
34
47
  index: json.index,
48
+ // eslint-disable-next-line deprecation/deprecation
35
49
  node: Node_1.Node.fromJSON(json.node),
36
50
  children: listFromJSON(json.children),
37
51
  };
38
52
  if (undefined !== json.isMarked)
39
53
  result.isMarked = json.isMarked;
40
- if (undefined !== json.filteringData)
54
+ if (undefined !== json.filteringData) {
55
+ // eslint-disable-next-line deprecation/deprecation
41
56
  result.filteringData = NodePathFilteringData.fromJSON(json.filteringData);
57
+ }
42
58
  return result;
43
59
  }
44
60
  NodePathElement.fromJSON = fromJSON;
45
61
  /**
46
62
  * Reviver function that can be used as a second argument for
47
63
  * `JSON.parse` method when parsing [[NodePathElement]] objects.
48
- *
49
64
  * @internal
50
65
  */
51
66
  function reviver(key, value) {
67
+ // eslint-disable-next-line deprecation/deprecation
52
68
  return key === "" ? fromJSON(value) : value;
53
69
  }
54
70
  NodePathElement.reviver = reviver;
@@ -56,19 +72,19 @@ var NodePathElement;
56
72
  * Deserialize [[NodePathElement]] list from JSON
57
73
  * @param json JSON or JSON serialized to string to deserialize from
58
74
  * @returns Deserialized [[NodePathElement]] list
59
- *
60
75
  * @internal
61
76
  */
77
+ // eslint-disable-next-line deprecation/deprecation
62
78
  function listFromJSON(json) {
63
79
  if (typeof json === "string")
64
80
  return JSON.parse(json, listReviver);
81
+ // eslint-disable-next-line deprecation/deprecation
65
82
  return json.map((m) => fromJSON(m));
66
83
  }
67
84
  NodePathElement.listFromJSON = listFromJSON;
68
85
  /**
69
86
  * Reviver function that can be used as a second argument for
70
87
  * `JSON.parse` method when parsing [[NodePathElement]][] objects.
71
- *
72
88
  * @internal
73
89
  */
74
90
  function listReviver(key, value) {
@@ -79,7 +95,11 @@ var NodePathElement;
79
95
  /** @public */
80
96
  var NodePathFilteringData;
81
97
  (function (NodePathFilteringData) {
82
- /** Serialize given [[NodePathFilteringData]] to JSON */
98
+ /**
99
+ * Serialize given [[NodePathFilteringData]] to JSON
100
+ * @deprecated in 3.x. Use [[NodePathFilteringData]].
101
+ */
102
+ // eslint-disable-next-line deprecation/deprecation
83
103
  function toJSON(npfd) {
84
104
  return {
85
105
  occurances: npfd.matchesCount,
@@ -87,7 +107,11 @@ var NodePathFilteringData;
87
107
  };
88
108
  }
89
109
  NodePathFilteringData.toJSON = toJSON;
90
- /** Deserialize [[NodePathFilteringData]] from JSON */
110
+ /**
111
+ * Deserialize [[NodePathFilteringData]] from JSON
112
+ * @deprecated in 3.x. Use [[NodePathFilteringData]].
113
+ */
114
+ // eslint-disable-next-line deprecation/deprecation
91
115
  function fromJSON(json) {
92
116
  return {
93
117
  matchesCount: json.occurances,
@@ -1 +1 @@
1
- {"version":3,"file":"NodePathElement.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/NodePathElement.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,iCAAwC;AA+BxC,cAAc;AACd,IAAiB,eAAe,CA+D/B;AA/DD,WAAiB,eAAe;IAC9B,kDAAkD;IAClD,SAAgB,MAAM,CAAC,GAAoB;QACzC,MAAM,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E,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC9C,CAAC;IAFe,uBAAO,UAEtB,CAAA;IAED;;;;;;OAMG;IACH,SAAgB,YAAY,CAAC,IAAoC;QAC/D,IAAI,OAAO,IAAI,KAAK,QAAQ;YAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;IAJe,4BAAY,eAI3B,CAAA;IAED;;;;;OAKG;IACH,SAAgB,WAAW,CAAC,GAAW,EAAE,KAAU;QACjD,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAClD,CAAC;IAFe,2BAAW,cAE1B,CAAA;AACH,CAAC,EA/DgB,eAAe,GAAf,uBAAe,KAAf,uBAAe,QA+D/B;AAsBD,cAAc;AACd,IAAiB,qBAAqB,CAgBrC;AAhBD,WAAiB,qBAAqB;IACpC,wDAAwD;IACxD,SAAgB,MAAM,CAAC,IAA2B;QAChD,OAAO;YACL,UAAU,EAAE,IAAI,CAAC,YAAY;YAC7B,kBAAkB,EAAE,IAAI,CAAC,iBAAiB;SAC3C,CAAC;IACJ,CAAC;IALe,4BAAM,SAKrB,CAAA;IAED,sDAAsD;IACtD,SAAgB,QAAQ,CAAC,IAA+B;QACtD,OAAO;YACL,YAAY,EAAE,IAAI,CAAC,UAAU;YAC7B,iBAAiB,EAAE,IAAI,CAAC,kBAAkB;SAC3C,CAAC;IACJ,CAAC;IALe,8BAAQ,WAKvB,CAAA;AACH,CAAC,EAhBgB,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAgBrC","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 { Node, NodeJSON } from \"./Node\";\r\n\r\n/**\r\n * Serialized [[NodePathElement]] JSON representation.\r\n * @public\r\n */\r\nexport interface NodePathElementJSON {\r\n node: NodeJSON;\r\n index: number;\r\n isMarked?: boolean;\r\n children: NodePathElementJSON[];\r\n filteringData?: NodePathFilteringDataJSON;\r\n}\r\n\r\n/**\r\n * Describes a single step in the nodes path.\r\n * @public\r\n */\r\nexport interface NodePathElement {\r\n /** Node instance */\r\n node: Node;\r\n /** Node index */\r\n index: number;\r\n /** Is this element part of the marked path */\r\n isMarked?: boolean;\r\n /** Child path elements */\r\n children: NodePathElement[];\r\n /** Additional filtering-related information */\r\n filteringData?: NodePathFilteringData;\r\n}\r\n\r\n/** @public */\r\nexport namespace NodePathElement {\r\n /** Serialize given [[NodePathElement]] to JSON */\r\n export function toJSON(npe: NodePathElement): NodePathElementJSON {\r\n const result: NodePathElementJSON = {\r\n node: Node.toJSON(npe.node),\r\n index: npe.index,\r\n children: npe.children.map(NodePathElement.toJSON),\r\n };\r\n if (undefined !== npe.isMarked)\r\n result.isMarked = npe.isMarked;\r\n if (undefined !== npe.filteringData)\r\n result.filteringData = NodePathFilteringData.toJSON(npe.filteringData);\r\n return result;\r\n }\r\n\r\n /** Deserialize [[NodePathElement]] from JSON */\r\n export function fromJSON(json: NodePathElementJSON | string): NodePathElement {\r\n if (typeof json === \"string\")\r\n return JSON.parse(json, reviver);\r\n const result: NodePathElement = {\r\n index: json.index,\r\n node: Node.fromJSON(json.node),\r\n children: listFromJSON(json.children),\r\n };\r\n if (undefined !== json.isMarked)\r\n result.isMarked = json.isMarked;\r\n if (undefined !== json.filteringData)\r\n result.filteringData = NodePathFilteringData.fromJSON(json.filteringData);\r\n return result;\r\n }\r\n\r\n /**\r\n * Reviver function that can be used as a second argument for\r\n * `JSON.parse` method when parsing [[NodePathElement]] objects.\r\n *\r\n * @internal\r\n */\r\n export function reviver(key: string, value: any): any {\r\n return key === \"\" ? fromJSON(value) : value;\r\n }\r\n\r\n /**\r\n * Deserialize [[NodePathElement]] list from JSON\r\n * @param json JSON or JSON serialized to string to deserialize from\r\n * @returns Deserialized [[NodePathElement]] list\r\n *\r\n * @internal\r\n */\r\n export function listFromJSON(json: NodePathElementJSON[] | string): NodePathElement[] {\r\n if (typeof json === \"string\")\r\n return JSON.parse(json, listReviver);\r\n return json.map((m) => fromJSON(m));\r\n }\r\n\r\n /**\r\n * Reviver function that can be used as a second argument for\r\n * `JSON.parse` method when parsing [[NodePathElement]][] objects.\r\n *\r\n * @internal\r\n */\r\n export function listReviver(key: string, value: any): any {\r\n return key === \"\" ? listFromJSON(value) : value;\r\n }\r\n}\r\n\r\n/**\r\n * Serialized [[NodePathFilteringData]] JSON representation.\r\n * @public\r\n */\r\nexport interface NodePathFilteringDataJSON {\r\n occurances: number;\r\n childrenOccurances: number;\r\n}\r\n\r\n/**\r\n * Data related to node hierarchy filtering\r\n * @public\r\n */\r\nexport interface NodePathFilteringData {\r\n /** Number of filter matches in the current element */\r\n matchesCount: number;\r\n /** Number of filter matches in the current element's children (recursively) */\r\n childMatchesCount: number;\r\n}\r\n\r\n/** @public */\r\nexport namespace NodePathFilteringData {\r\n /** Serialize given [[NodePathFilteringData]] to JSON */\r\n export function toJSON(npfd: NodePathFilteringData): NodePathFilteringDataJSON {\r\n return {\r\n occurances: npfd.matchesCount,\r\n childrenOccurances: npfd.childMatchesCount,\r\n };\r\n }\r\n\r\n /** Deserialize [[NodePathFilteringData]] from JSON */\r\n export function fromJSON(json: NodePathFilteringDataJSON): NodePathFilteringData {\r\n return {\r\n matchesCount: json.occurances,\r\n childMatchesCount: json.childrenOccurances,\r\n };\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"NodePathElement.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/NodePathElement.ts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I,CAAC,iBAAiB;SAC3C,CAAC;IACJ,CAAC;IALe,4BAAM,SAKrB,CAAA;IAED;;;OAGG;IACH,mDAAmD;IACnD,SAAgB,QAAQ,CAAC,IAA+B;QACtD,OAAO;YACL,YAAY,EAAE,IAAI,CAAC,UAAU;YAC7B,iBAAiB,EAAE,IAAI,CAAC,kBAAkB;SAC3C,CAAC;IACJ,CAAC;IALe,8BAAQ,WAKvB,CAAA;AACH,CAAC,EAxBgB,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAwBrC","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 { Node, NodeJSON } from \"./Node\";\r\n\r\n/**\r\n * Serialized [[NodePathElement]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[NodePathElement]].\r\n */\r\nexport interface NodePathElementJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n node: NodeJSON;\r\n index: number;\r\n isMarked?: boolean;\r\n // eslint-disable-next-line deprecation/deprecation\r\n children: NodePathElementJSON[];\r\n // eslint-disable-next-line deprecation/deprecation\r\n filteringData?: NodePathFilteringDataJSON;\r\n}\r\n\r\n/**\r\n * Describes a single step in the nodes path.\r\n * @public\r\n */\r\nexport interface NodePathElement {\r\n /** Node instance */\r\n node: Node;\r\n /** Node index */\r\n index: number;\r\n /** Is this element part of the marked path */\r\n isMarked?: boolean;\r\n /** Child path elements */\r\n children: NodePathElement[];\r\n /** Additional filtering-related information */\r\n filteringData?: NodePathFilteringData;\r\n}\r\n\r\n/** @public */\r\nexport namespace NodePathElement {\r\n /**\r\n * Serialize given [[NodePathElement]] to JSON\r\n * @deprecated in 3.x. Use [[NodePathElement]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(npe: NodePathElement): NodePathElementJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n const result: NodePathElementJSON = {\r\n // eslint-disable-next-line deprecation/deprecation\r\n node: Node.toJSON(npe.node),\r\n index: npe.index,\r\n // eslint-disable-next-line deprecation/deprecation\r\n children: npe.children.map(NodePathElement.toJSON),\r\n };\r\n if (undefined !== npe.isMarked)\r\n result.isMarked = npe.isMarked;\r\n if (undefined !== npe.filteringData) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n result.filteringData = NodePathFilteringData.toJSON(npe.filteringData);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Deserialize [[NodePathElement]] from JSON\r\n * @deprecated in 3.x. Use [[NodePathElement]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: NodePathElementJSON | string): NodePathElement {\r\n if (typeof json === \"string\")\r\n return JSON.parse(json, reviver);\r\n const result: NodePathElement = {\r\n index: json.index,\r\n // eslint-disable-next-line deprecation/deprecation\r\n node: Node.fromJSON(json.node),\r\n children: listFromJSON(json.children),\r\n };\r\n if (undefined !== json.isMarked)\r\n result.isMarked = json.isMarked;\r\n if (undefined !== json.filteringData) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n result.filteringData = NodePathFilteringData.fromJSON(json.filteringData);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Reviver function that can be used as a second argument for\r\n * `JSON.parse` method when parsing [[NodePathElement]] objects.\r\n * @internal\r\n */\r\n export function reviver(key: string, value: any): any {\r\n // eslint-disable-next-line deprecation/deprecation\r\n return key === \"\" ? fromJSON(value) : value;\r\n }\r\n\r\n /**\r\n * Deserialize [[NodePathElement]] list from JSON\r\n * @param json JSON or JSON serialized to string to deserialize from\r\n * @returns Deserialized [[NodePathElement]] list\r\n * @internal\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function listFromJSON(json: NodePathElementJSON[] | string): NodePathElement[] {\r\n if (typeof json === \"string\")\r\n return JSON.parse(json, listReviver);\r\n // eslint-disable-next-line deprecation/deprecation\r\n return json.map((m) => fromJSON(m));\r\n }\r\n\r\n /**\r\n * Reviver function that can be used as a second argument for\r\n * `JSON.parse` method when parsing [[NodePathElement]][] objects.\r\n * @internal\r\n */\r\n export function listReviver(key: string, value: any): any {\r\n return key === \"\" ? listFromJSON(value) : value;\r\n }\r\n}\r\n\r\n/**\r\n * Serialized [[NodePathFilteringData]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[NodePathFilteringData]].\r\n */\r\nexport interface NodePathFilteringDataJSON {\r\n occurances: number;\r\n childrenOccurances: number;\r\n}\r\n\r\n/**\r\n * Data related to node hierarchy filtering\r\n * @public\r\n */\r\nexport interface NodePathFilteringData {\r\n /** Number of filter matches in the current element */\r\n matchesCount: number;\r\n /** Number of filter matches in the current element's children (recursively) */\r\n childMatchesCount: number;\r\n}\r\n\r\n/** @public */\r\nexport namespace NodePathFilteringData {\r\n /**\r\n * Serialize given [[NodePathFilteringData]] to JSON\r\n * @deprecated in 3.x. Use [[NodePathFilteringData]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(npfd: NodePathFilteringData): NodePathFilteringDataJSON {\r\n return {\r\n occurances: npfd.matchesCount,\r\n childrenOccurances: npfd.childMatchesCount,\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[NodePathFilteringData]] from JSON\r\n * @deprecated in 3.x. Use [[NodePathFilteringData]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: NodePathFilteringDataJSON): NodePathFilteringData {\r\n return {\r\n matchesCount: json.occurances,\r\n childMatchesCount: json.childrenOccurances,\r\n };\r\n }\r\n}\r\n"]}
@@ -12,8 +12,11 @@ import { RelationshipDirection } from "./RelationshipDirection";
12
12
  export interface RelationshipStepSpecification {
13
13
  /** This attribute specifies the ECRelationship that should be used to traverse to target class. */
14
14
  relationship: SingleSchemaClassSpecification;
15
- /** This attribute specifies the direction in which the [[relationship]] should be followed. */
16
- direction: RelationshipDirection.Forward | RelationshipDirection.Backward;
15
+ /**
16
+ * This attribute specifies the direction in which the [[relationship]] should be followed.
17
+ * @see RelationshipDirection
18
+ */
19
+ direction: `${RelationshipDirection}`;
17
20
  /**
18
21
  * This attribute may be used to specialize the target of the relationship.
19
22
  */
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipPathSpecification.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/rules/RelationshipPathSpecification.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,WAAW,6BAA6B;IAC5C,mGAAmG;IACnG,YAAY,EAAE,8BAA8B,CAAC;IAE7C,+FAA+F;IAC/F,SAAS,EAAE,qBAAqB,CAAC,OAAO,GAAG,qBAAqB,CAAC,QAAQ,CAAC;IAE1E;;OAEG;IACH,WAAW,CAAC,EAAE,8BAA8B,CAAC;CAC9C;AAED;;;;;GAKG;AACH,MAAM,WAAW,uCAAwC,SAAQ,6BAA6B;IAC5F;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED;;;;;GAKG;AACH,oBAAY,6BAA6B,GAAG,6BAA6B,GAAG,6BAA6B,EAAE,CAAC;AAE5G;;;;;;;GAOG;AACH,oBAAY,uCAAuC,GAAG,uCAAuC,GAAG,uCAAuC,EAAE,CAAC"}
1
+ {"version":3,"file":"RelationshipPathSpecification.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/rules/RelationshipPathSpecification.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,WAAW,6BAA6B;IAC5C,mGAAmG;IACnG,YAAY,EAAE,8BAA8B,CAAC;IAE7C;;;OAGG;IACH,SAAS,EAAE,GAAG,qBAAqB,EAAE,CAAC;IAEtC;;OAEG;IACH,WAAW,CAAC,EAAE,8BAA8B,CAAC;CAC9C;AAED;;;;;GAKG;AACH,MAAM,WAAW,uCAAwC,SAAQ,6BAA6B;IAC5F;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED;;;;;GAKG;AACH,oBAAY,6BAA6B,GAAG,6BAA6B,GAAG,6BAA6B,EAAE,CAAC;AAE5G;;;;;;;GAOG;AACH,oBAAY,uCAAuC,GAAG,uCAAuC,GAAG,uCAAuC,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipPathSpecification.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/RelationshipPathSpecification.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 PresentationRules\r\n */\r\n\r\nimport { SingleSchemaClassSpecification } from \"./ClassSpecifications\";\r\nimport { RelationshipDirection } from \"./RelationshipDirection\";\r\n\r\n/**\r\n * Specification of a single step in [[RelationshipPathSpecification]].\r\n *\r\n * @see [Relationship path specification reference documentation page]($docs/presentation/RelationshipPathSpecification.md)\r\n * @public\r\n */\r\nexport interface RelationshipStepSpecification {\r\n /** This attribute specifies the ECRelationship that should be used to traverse to target class. */\r\n relationship: SingleSchemaClassSpecification;\r\n\r\n /** This attribute specifies the direction in which the [[relationship]] should be followed. */\r\n direction: RelationshipDirection.Forward | RelationshipDirection.Backward;\r\n\r\n /**\r\n * This attribute may be used to specialize the target of the relationship.\r\n */\r\n targetClass?: SingleSchemaClassSpecification;\r\n}\r\n\r\n/**\r\n * Specification of a single step in [[RepeatableRelationshipPathSpecification]].\r\n *\r\n * @see [Repeatable relationship path specification reference documentation page]($docs/presentation/RepeatableRelationshipPathSpecification.md)\r\n * @public\r\n */\r\nexport interface RepeatableRelationshipStepSpecification extends RelationshipStepSpecification {\r\n /**\r\n * When a number is specified, the relationship is traversed recursively the specified number of times.\r\n *\r\n * When it is set to a special value `\"*\"`, the same relationship is traversed recursively unbounded number\r\n * of times, starting from zero (the relationship is not followed). On each traversal iteration, Presentation\r\n * rules engine accumulates all indirectly related ECInstances as defined by the remaining relationship path.\r\n */\r\n count?: number | \"*\";\r\n}\r\n\r\n/**\r\n * Relationship path specification is used to define a relationship path to an ECClass.\r\n *\r\n * @see [Relationship path specification reference documentation page]($docs/presentation/RelationshipPathSpecification.md)\r\n * @public\r\n */\r\nexport type RelationshipPathSpecification = RelationshipStepSpecification | RelationshipStepSpecification[];\r\n\r\n/**\r\n * This specification declares a step in a relationship path between a source and target ECInstances. A step\r\n * can optionally be repeated a number of times to traverse the same relationship recursively. Multiple\r\n * specifications of this type can be chained together to express complex indirect relationships.\r\n *\r\n * @see [Repeatable relationship path specification reference documentation page]($docs/presentation/RepeatableRelationshipPathSpecification.md)\r\n * @public\r\n */\r\nexport type RepeatableRelationshipPathSpecification = RepeatableRelationshipStepSpecification | RepeatableRelationshipStepSpecification[];\r\n"]}
1
+ {"version":3,"file":"RelationshipPathSpecification.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/RelationshipPathSpecification.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 PresentationRules\r\n */\r\n\r\nimport { SingleSchemaClassSpecification } from \"./ClassSpecifications\";\r\nimport { RelationshipDirection } from \"./RelationshipDirection\";\r\n\r\n/**\r\n * Specification of a single step in [[RelationshipPathSpecification]].\r\n *\r\n * @see [Relationship path specification reference documentation page]($docs/presentation/RelationshipPathSpecification.md)\r\n * @public\r\n */\r\nexport interface RelationshipStepSpecification {\r\n /** This attribute specifies the ECRelationship that should be used to traverse to target class. */\r\n relationship: SingleSchemaClassSpecification;\r\n\r\n /**\r\n * This attribute specifies the direction in which the [[relationship]] should be followed.\r\n * @see RelationshipDirection\r\n */\r\n direction: `${RelationshipDirection}`;\r\n\r\n /**\r\n * This attribute may be used to specialize the target of the relationship.\r\n */\r\n targetClass?: SingleSchemaClassSpecification;\r\n}\r\n\r\n/**\r\n * Specification of a single step in [[RepeatableRelationshipPathSpecification]].\r\n *\r\n * @see [Repeatable relationship path specification reference documentation page]($docs/presentation/RepeatableRelationshipPathSpecification.md)\r\n * @public\r\n */\r\nexport interface RepeatableRelationshipStepSpecification extends RelationshipStepSpecification {\r\n /**\r\n * When a number is specified, the relationship is traversed recursively the specified number of times.\r\n *\r\n * When it is set to a special value `\"*\"`, the same relationship is traversed recursively unbounded number\r\n * of times, starting from zero (the relationship is not followed). On each traversal iteration, Presentation\r\n * rules engine accumulates all indirectly related ECInstances as defined by the remaining relationship path.\r\n */\r\n count?: number | \"*\";\r\n}\r\n\r\n/**\r\n * Relationship path specification is used to define a relationship path to an ECClass.\r\n *\r\n * @see [Relationship path specification reference documentation page]($docs/presentation/RelationshipPathSpecification.md)\r\n * @public\r\n */\r\nexport type RelationshipPathSpecification = RelationshipStepSpecification | RelationshipStepSpecification[];\r\n\r\n/**\r\n * This specification declares a step in a relationship path between a source and target ECInstances. A step\r\n * can optionally be repeated a number of times to traverse the same relationship recursively. Multiple\r\n * specifications of this type can be chained together to express complex indirect relationships.\r\n *\r\n * @see [Repeatable relationship path specification reference documentation page]($docs/presentation/RepeatableRelationshipPathSpecification.md)\r\n * @public\r\n */\r\nexport type RepeatableRelationshipPathSpecification = RepeatableRelationshipStepSpecification | RepeatableRelationshipStepSpecification[];\r\n"]}
@@ -12,8 +12,11 @@ import { RequiredSchemaSpecification } from "./SchemasSpecification";
12
12
  * @public
13
13
  */
14
14
  export interface RuleBase {
15
- /** Used for serializing to JSON. */
16
- ruleType: RuleTypes;
15
+ /**
16
+ * Used for serializing to JSON.
17
+ * @see RuleTypes
18
+ */
19
+ ruleType: `${RuleTypes}`;
17
20
  /**
18
21
  * Defines the order in which rules are handled, higher number means the rule is handled first. If priorities are
19
22
  * equal, the rules are handled in the order they're defined.
@@ -28,7 +31,6 @@ export interface RuleBase {
28
31
  onlyIfNotHandled?: boolean;
29
32
  /**
30
33
  * A list of [ECSchema requirements]($docs/presentation/RequiredSchemaSpecification.md) that need to be met for the rule to be used.
31
- * @beta
32
34
  */
33
35
  requiredSchemas?: RequiredSchemaSpecification[];
34
36
  }