@itwin/presentation-common 3.6.0-dev.55 → 3.6.0-dev.60

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 +75 -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 +75 -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
@@ -21,36 +21,45 @@ export var StandardNodeTypes;
21
21
  /** @public */
22
22
  export var NodeKey;
23
23
  (function (NodeKey) {
24
- /** Serialize given [[NodeKey]] to JSON */
24
+ /**
25
+ * Serialize given [[NodeKey]] to JSON
26
+ * @deprecated in 3.x. Use [[NodeKey]].
27
+ */
28
+ // eslint-disable-next-line deprecation/deprecation
25
29
  function toJSON(key) {
26
- if (isInstancesNodeKey(key))
27
- return { ...key, instanceKeys: key.instanceKeys.map(InstanceKey.toJSON) };
28
30
  return { ...key };
29
31
  }
30
32
  NodeKey.toJSON = toJSON;
31
- /** Deserialize node key from JSON */
33
+ /**
34
+ * Deserialize node key from JSON
35
+ * @deprecated in 3.x. Use [[NodeKey]].
36
+ */
37
+ // eslint-disable-next-line deprecation/deprecation
32
38
  function fromJSON(json) {
33
- if (isInstancesNodeKey(json))
34
- return { version: 1, ...json, instanceKeys: json.instanceKeys.map(InstanceKey.fromJSON) };
35
39
  return { version: 1, ...json };
36
40
  }
37
41
  NodeKey.fromJSON = fromJSON;
42
+ // eslint-disable-next-line deprecation/deprecation
38
43
  function isInstancesNodeKey(key) {
39
44
  return key.type === StandardNodeTypes.ECInstancesNode;
40
45
  }
41
46
  NodeKey.isInstancesNodeKey = isInstancesNodeKey;
47
+ // eslint-disable-next-line deprecation/deprecation
42
48
  function isClassGroupingNodeKey(key) {
43
49
  return key.type === StandardNodeTypes.ECClassGroupingNode;
44
50
  }
45
51
  NodeKey.isClassGroupingNodeKey = isClassGroupingNodeKey;
52
+ // eslint-disable-next-line deprecation/deprecation
46
53
  function isPropertyGroupingNodeKey(key) {
47
54
  return key.type === StandardNodeTypes.ECPropertyGroupingNode;
48
55
  }
49
56
  NodeKey.isPropertyGroupingNodeKey = isPropertyGroupingNodeKey;
57
+ // eslint-disable-next-line deprecation/deprecation
50
58
  function isLabelGroupingNodeKey(key) {
51
59
  return key.type === StandardNodeTypes.DisplayLabelGroupingNode;
52
60
  }
53
61
  NodeKey.isLabelGroupingNodeKey = isLabelGroupingNodeKey;
62
+ // eslint-disable-next-line deprecation/deprecation
54
63
  function isGroupingNodeKey(key) {
55
64
  return isClassGroupingNodeKey(key) || isPropertyGroupingNodeKey(key) || isLabelGroupingNodeKey(key);
56
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Key.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Key.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAmB,MAAM,OAAO,CAAC;AAErD;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,wDAAmC,CAAA;IACnC,gEAA2C,CAAA;IAC3C,sEAAiD,CAAA;IACjD,0EAAqD,CAAA;AACvD,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAOD,cAAc;AACd,MAAM,KAAW,OAAO,CA4GvB;AA5GD,WAAiB,OAAO;IACtB,0CAA0C;IAC1C,SAAgB,MAAM,CAAC,GAAY;QACjC,IAAI,kBAAkB,CAAC,GAAG,CAAC;YACzB,OAAO,EAAE,GAAG,GAAG,EAAE,YAAY,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5E,OAAO,EAAE,GAAG,GAAG,EAAE,CAAC;IACpB,CAAC;IAJe,cAAM,SAIrB,CAAA;IAED,qCAAqC;IACrC,SAAgB,QAAQ,CAAC,IAAiB;QACxC,IAAI,kBAAkB,CAAC,IAAI,CAAC;YAC1B,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,IAAI,E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AC;SACjF;QACD,IAAI,sBAAsB,CAAC,GAAG,CAAC,EAAE;YAC/B,MAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC;YACpC,OAAO,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC;SAChC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IA3Ce,cAAM,SA2CrB,CAAA;AACH,CAAC,EA5GgB,OAAO,KAAP,OAAO,QA4GvB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Hierarchies\r\n */\r\n\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { InstanceKey, InstanceKeyJSON } from \"../EC\";\r\n\r\n/**\r\n * Standard node types\r\n * @public\r\n */\r\nexport enum StandardNodeTypes {\r\n ECInstancesNode = \"ECInstancesNode\",\r\n ECClassGroupingNode = \"ECClassGroupingNode\",\r\n ECPropertyGroupingNode = \"ECPropertyGroupingNode\",\r\n DisplayLabelGroupingNode = \"DisplayLabelGroupingNode\",\r\n}\r\n\r\n/**\r\n * One of the node key types\r\n * @public\r\n */\r\nexport type NodeKey = BaseNodeKey | ECInstancesNodeKey | ECClassGroupingNodeKey | ECPropertyGroupingNodeKey | LabelGroupingNodeKey;\r\n/** @public */\r\nexport namespace NodeKey { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** Serialize given [[NodeKey]] to JSON */\r\n export function toJSON(key: NodeKey): NodeKeyJSON {\r\n if (isInstancesNodeKey(key))\r\n return { ...key, instanceKeys: key.instanceKeys.map(InstanceKey.toJSON) };\r\n return { ...key };\r\n }\r\n\r\n /** Deserialize node key from JSON */\r\n export function fromJSON(json: NodeKeyJSON): NodeKey {\r\n if (isInstancesNodeKey(json))\r\n return { version: 1, ...json, instanceKeys: json.instanceKeys.map(InstanceKey.fromJSON) };\r\n return { version: 1, ...json };\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECInstancesNodeKey]] */\r\n export function isInstancesNodeKey(key: NodeKey): key is ECInstancesNodeKey;\r\n /** Checks if the supplied key is an [[ECInstancesNodeKey]] */\r\n export function isInstancesNodeKey(key: NodeKeyJSON): key is ECInstancesNodeKeyJSON;\r\n export function isInstancesNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECInstancesNode;\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECClassGroupingNodeKey]] */\r\n export function isClassGroupingNodeKey(key: NodeKey): key is ECClassGroupingNodeKey;\r\n /** Checks if the supplied key is an [[ECClassGroupingNodeKey]] */\r\n export function isClassGroupingNodeKey(key: NodeKeyJSON): key is ECClassGroupingNodeKeyJSON;\r\n export function isClassGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECClassGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]] */\r\n export function isPropertyGroupingNodeKey(key: NodeKey): key is ECPropertyGroupingNodeKey;\r\n /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]] */\r\n export function isPropertyGroupingNodeKey(key: NodeKeyJSON): key is ECPropertyGroupingNodeKeyJSON;\r\n export function isPropertyGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECPropertyGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is a [[LabelGroupingNodeKey]] */\r\n export function isLabelGroupingNodeKey(key: NodeKey): key is LabelGroupingNodeKey;\r\n /** Checks if the supplied key is a [[LabelGroupingNodeKey]] */\r\n export function isLabelGroupingNodeKey(key: NodeKeyJSON): key is LabelGroupingNodeKeyJSON;\r\n export function isLabelGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.DisplayLabelGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is a grouping node key */\r\n export function isGroupingNodeKey(key: NodeKey): key is GroupingNodeKey;\r\n /** Checks if the supplied key is a grouping node key */\r\n export function isGroupingNodeKey(key: NodeKeyJSON): key is GroupingNodeKeyJSON;\r\n export function isGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return isClassGroupingNodeKey(key) || isPropertyGroupingNodeKey(key) || isLabelGroupingNodeKey(key);\r\n }\r\n\r\n /**\r\n * Checks if two given node keys are equal, taking their versions into account.\r\n *\r\n * When comparing two keys of the same version, the algorithm uses [[NodeKey.pathFromRoot]] array\r\n * which is the most accurate way of checking equality. However, when version are different,\r\n * [[NodeKey.pathFromRoot]] array may contain different strings even though keys represent the same node.\r\n * In that case equality is checked using other key attributes, depending on the type of the node (type,\r\n * label, grouping class, property name, etc.).\r\n */\r\n export function equals(lhs: NodeKey, rhs: NodeKey): boolean {\r\n // types must always be equal\r\n if (lhs.type !== rhs.type)\r\n return false;\r\n\r\n // `pathFromRoot` lengths must always be equal\r\n if (lhs.pathFromRoot.length !== rhs.pathFromRoot.length)\r\n return false;\r\n\r\n // when versions are equal, compare using contents of `pathFromRoot` array\r\n if (lhs.version === rhs.version) {\r\n for (let i = 0; i < lhs.pathFromRoot.length; ++i) {\r\n if (lhs.pathFromRoot[i] !== rhs.pathFromRoot[i])\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n // when versions aren't equal, compare using other key information, because key hashes\r\n // of different key versions can't be compared\r\n if (isInstancesNodeKey(lhs)) {\r\n assert(isInstancesNodeKey(rhs));\r\n if (lhs.instanceKeys.length !== rhs.instanceKeys.length)\r\n return false;\r\n for (let i = 0; i < lhs.instanceKeys.length; ++i) {\r\n if (0 !== InstanceKey.compare(lhs.instanceKeys[i], rhs.instanceKeys[i]))\r\n return false;\r\n }\r\n return true;\r\n }\r\n if (isClassGroupingNodeKey(lhs)) {\r\n assert(isClassGroupingNodeKey(rhs));\r\n return lhs.className === rhs.className;\r\n }\r\n if (isPropertyGroupingNodeKey(lhs)) {\r\n assert(isPropertyGroupingNodeKey(rhs));\r\n return lhs.className === rhs.className && lhs.propertyName === rhs.propertyName;\r\n }\r\n if (isLabelGroupingNodeKey(lhs)) {\r\n assert(isLabelGroupingNodeKey(rhs));\r\n return lhs.label === rhs.label;\r\n }\r\n return true;\r\n }\r\n}\r\n\r\n/**\r\n * Node key path. Can be used to define path from one node to another.\r\n * @public\r\n */\r\nexport type NodeKeyPath = NodeKey[];\r\n\r\n/**\r\n * Data structure that describes a basic node key\r\n * @public\r\n */\r\nexport interface BaseNodeKey {\r\n /** Node type */\r\n type: string;\r\n\r\n /**\r\n * Version of the key. Different versions suggest that node keys were created by two different\r\n * versions of the library. In that case, keys representing the same node may be different.\r\n */\r\n version: number;\r\n\r\n /** Node hash path from root to the node whose key this is */\r\n pathFromRoot: string[];\r\n}\r\n/**\r\n * Serialized [[BaseNodeKey]] JSON representation.\r\n * @public\r\n */\r\nexport interface BaseNodeKeyJSON {\r\n type: string;\r\n version?: number;\r\n pathFromRoot: string[];\r\n}\r\n\r\n/**\r\n * Data structure that describes a node ECInstance node key\r\n * @public\r\n */\r\nexport interface ECInstancesNodeKey extends BaseNodeKey {\r\n type: StandardNodeTypes.ECInstancesNode;\r\n /** List of [[InstanceKey]] objects of ECInstances represented by the node */\r\n instanceKeys: InstanceKey[];\r\n}\r\n/**\r\n * Serialized [[ECInstancesNodeKey]] JSON representation.\r\n * @public\r\n */\r\nexport interface ECInstancesNodeKeyJSON extends BaseNodeKeyJSON {\r\n type: StandardNodeTypes.ECInstancesNode;\r\n instanceKeys: InstanceKeyJSON[];\r\n}\r\n\r\n/**\r\n * Data structure that describes a grouping node key\r\n * @public\r\n */\r\nexport interface GroupingNodeKey extends BaseNodeKey {\r\n /**\r\n * Get the number of instances grouped by the node represented\r\n * by this key.\r\n *\r\n * **Note:** this property is just a helper and is not involved\r\n * in identifying a node.\r\n */\r\n groupedInstancesCount: number;\r\n}\r\n/**\r\n * Serialized [[GroupingNodeKey]] JSON representation.\r\n * @public\r\n */\r\nexport interface GroupingNodeKeyJSON extends BaseNodeKeyJSON {\r\n groupedInstancesCount: number;\r\n}\r\n\r\n/**\r\n * Data structure that describes an ECClass grouping node key\r\n * @public\r\n */\r\nexport interface ECClassGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECClassGroupingNode;\r\n /** Full name of the grouping ECClass */\r\n className: string;\r\n}\r\n/**\r\n * Serialized [[ECClassGroupingNodeKey]] JSON representation.\r\n * @public\r\n */\r\nexport interface ECClassGroupingNodeKeyJSON extends GroupingNodeKeyJSON {\r\n type: StandardNodeTypes.ECClassGroupingNode;\r\n className: string;\r\n}\r\n\r\n/**\r\n * Data structure that describes an ECProperty grouping node key\r\n * @public\r\n */\r\nexport interface ECPropertyGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECPropertyGroupingNode;\r\n /** Full name of the grouping ECProperty class */\r\n className: string;\r\n /** Name of the ECProperty */\r\n propertyName: string;\r\n /** Raw grouping values */\r\n groupingValues: any[];\r\n}\r\n/**\r\n * Serialized [[ECPropertyGroupingNodeKey]] JSON representation.\r\n * @public\r\n */\r\nexport interface ECPropertyGroupingNodeKeyJSON extends GroupingNodeKeyJSON {\r\n type: StandardNodeTypes.ECPropertyGroupingNode;\r\n className: string;\r\n propertyName: string;\r\n groupingValues: any[];\r\n}\r\n\r\n/**\r\n * Data structure that describes a display label grouping node key\r\n * @public\r\n */\r\nexport interface LabelGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.DisplayLabelGroupingNode;\r\n /** Grouping display label */\r\n label: string;\r\n}\r\n/**\r\n * Serialized [[LabelGroupingNodeKey]] JSON representation.\r\n * @public\r\n */\r\nexport interface LabelGroupingNodeKeyJSON extends GroupingNodeKeyJSON {\r\n type: StandardNodeTypes.DisplayLabelGroupingNode;\r\n label: string;\r\n}\r\n\r\n/**\r\n * One of the serialized node key types\r\n * @public\r\n */\r\nexport type NodeKeyJSON = BaseNodeKeyJSON | ECInstancesNodeKeyJSON | ECClassGroupingNodeKeyJSON | ECPropertyGroupingNodeKeyJSON | LabelGroupingNodeKeyJSON;\r\n"]}
1
+ {"version":3,"file":"Key.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Key.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,wDAAmC,CAAA;IACnC,gEAA2C,CAAA;IAC3C,sEAAiD,CAAA;IACjD,0EAAqD,CAAA;AACvD,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAOD,cAAc;AACd,MAAM,KAAW,OAAO,CA0HvB;AA1HD,WAAiB,OAAO;IACtB;;;OAGG;IACH,mDAAmD;IACnD,SAAgB,MAAM,CAAC,GAAY;QACjC,OAAO,EAAE,GAAG,GAAG,EAAE,CAAC;IACpB,CAAC;IAFe,cAAM,SAErB,CAAA;IAED;;;OAGG;IACH,mDAAmD;IACnD,SAAgB,QAAQ,CAAC,IAAiB;QACxC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC;IACjC,CAAC;IAFe,gBAAQ,WAEvB,CAAA;IAOD,mDAAmD;IACnD,SAAgB,kBAAkB,CAAC,GAA0B;QAC3D,OAAO,GAAG,CAAC,IAAI,KAAK,iBAAiB,CAAC,eAAe,CAAC;IACxD,CAAC;IAFe,0BAAkB,qBAEjC,CAAA;IAOD,mDAAmD;IACnD,SAAgB,sBAAsB,CAAC,GAA0B;QAC/D,OAAO,GAAG,CAAC,IAAI,KAAK,iBAAiB,CAAC,mBAAmB,CAAC;IAC5D,CAAC;IAFe,8BAAsB,yBAErC,CAAA;IAOD,mDAAmD;IACnD,SAAgB,yBAAyB,CAAC,GAA0B;QAClE,OAAO,GAAG,CAAC,IAAI,KA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YAAY,CAAC,MAAM;gBACrD,OAAO,KAAK,CAAC;YACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;gBAChD,IAAI,CAAC,KAAK,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;oBACrE,OAAO,KAAK,CAAC;aAChB;YACD,OAAO,IAAI,CAAC;SACb;QACD,IAAI,sBAAsB,CAAC,GAAG,CAAC,EAAE;YAC/B,MAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC;YACpC,OAAO,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,CAAC;SACxC;QACD,IAAI,yBAAyB,CAAC,GAAG,CAAC,EAAE;YAClC,MAAM,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,CAAC;YACvC,OAAO,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,YAAY,CAAC;SACjF;QACD,IAAI,sBAAsB,CAAC,GAAG,CAAC,EAAE;YAC/B,MAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC;YACpC,OAAO,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC;SAChC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IA3Ce,cAAM,SA2CrB,CAAA;AACH,CAAC,EA1HgB,OAAO,KAAP,OAAO,QA0HvB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Hierarchies\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport { InstanceKey } from \"../EC\";\r\n\r\n/**\r\n * Standard node types\r\n * @public\r\n */\r\nexport enum StandardNodeTypes {\r\n ECInstancesNode = \"ECInstancesNode\",\r\n ECClassGroupingNode = \"ECClassGroupingNode\",\r\n ECPropertyGroupingNode = \"ECPropertyGroupingNode\",\r\n DisplayLabelGroupingNode = \"DisplayLabelGroupingNode\",\r\n}\r\n\r\n/**\r\n * One of the node key types\r\n * @public\r\n */\r\nexport type NodeKey = BaseNodeKey | ECInstancesNodeKey | ECClassGroupingNodeKey | ECPropertyGroupingNodeKey | LabelGroupingNodeKey;\r\n/** @public */\r\nexport namespace NodeKey { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /**\r\n * Serialize given [[NodeKey]] to JSON\r\n * @deprecated in 3.x. Use [[NodeKey]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(key: NodeKey): NodeKeyJSON {\r\n return { ...key };\r\n }\r\n\r\n /**\r\n * Deserialize node key from JSON\r\n * @deprecated in 3.x. Use [[NodeKey]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: NodeKeyJSON): NodeKey {\r\n return { version: 1, ...json };\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECInstancesNodeKey]] */\r\n export function isInstancesNodeKey(key: NodeKey): key is ECInstancesNodeKey;\r\n /** Checks if the supplied key is an [[ECInstancesNodeKey]]. @deprecated in 3.x */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isInstancesNodeKey(key: NodeKeyJSON): key is ECInstancesNodeKeyJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isInstancesNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECInstancesNode;\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECClassGroupingNodeKey]] */\r\n export function isClassGroupingNodeKey(key: NodeKey): key is ECClassGroupingNodeKey;\r\n /** Checks if the supplied key is an [[ECClassGroupingNodeKey]]. @deprecated in 3.x */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isClassGroupingNodeKey(key: NodeKeyJSON): key is ECClassGroupingNodeKeyJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isClassGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECClassGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]] */\r\n export function isPropertyGroupingNodeKey(key: NodeKey): key is ECPropertyGroupingNodeKey;\r\n /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]]. @deprecated in 3.x */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isPropertyGroupingNodeKey(key: NodeKeyJSON): key is ECPropertyGroupingNodeKeyJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isPropertyGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECPropertyGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is a [[LabelGroupingNodeKey]] */\r\n export function isLabelGroupingNodeKey(key: NodeKey): key is LabelGroupingNodeKey;\r\n /** Checks if the supplied key is a [[LabelGroupingNodeKey]]. @deprecated in 3.x */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isLabelGroupingNodeKey(key: NodeKeyJSON): key is LabelGroupingNodeKeyJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isLabelGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.DisplayLabelGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is a grouping node key */\r\n export function isGroupingNodeKey(key: NodeKey): key is GroupingNodeKey;\r\n /** Checks if the supplied key is a grouping node key. @deprecated in 3.x */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isGroupingNodeKey(key: NodeKeyJSON): key is GroupingNodeKeyJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return isClassGroupingNodeKey(key) || isPropertyGroupingNodeKey(key) || isLabelGroupingNodeKey(key);\r\n }\r\n\r\n /**\r\n * Checks if two given node keys are equal, taking their versions into account.\r\n *\r\n * When comparing two keys of the same version, the algorithm uses [[NodeKey.pathFromRoot]] array\r\n * which is the most accurate way of checking equality. However, when version are different,\r\n * [[NodeKey.pathFromRoot]] array may contain different strings even though keys represent the same node.\r\n * In that case equality is checked using other key attributes, depending on the type of the node (type,\r\n * label, grouping class, property name, etc.).\r\n */\r\n export function equals(lhs: NodeKey, rhs: NodeKey): boolean {\r\n // types must always be equal\r\n if (lhs.type !== rhs.type)\r\n return false;\r\n\r\n // `pathFromRoot` lengths must always be equal\r\n if (lhs.pathFromRoot.length !== rhs.pathFromRoot.length)\r\n return false;\r\n\r\n // when versions are equal, compare using contents of `pathFromRoot` array\r\n if (lhs.version === rhs.version) {\r\n for (let i = 0; i < lhs.pathFromRoot.length; ++i) {\r\n if (lhs.pathFromRoot[i] !== rhs.pathFromRoot[i])\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n // when versions aren't equal, compare using other key information, because key hashes\r\n // of different key versions can't be compared\r\n if (isInstancesNodeKey(lhs)) {\r\n assert(isInstancesNodeKey(rhs));\r\n if (lhs.instanceKeys.length !== rhs.instanceKeys.length)\r\n return false;\r\n for (let i = 0; i < lhs.instanceKeys.length; ++i) {\r\n if (0 !== InstanceKey.compare(lhs.instanceKeys[i], rhs.instanceKeys[i]))\r\n return false;\r\n }\r\n return true;\r\n }\r\n if (isClassGroupingNodeKey(lhs)) {\r\n assert(isClassGroupingNodeKey(rhs));\r\n return lhs.className === rhs.className;\r\n }\r\n if (isPropertyGroupingNodeKey(lhs)) {\r\n assert(isPropertyGroupingNodeKey(rhs));\r\n return lhs.className === rhs.className && lhs.propertyName === rhs.propertyName;\r\n }\r\n if (isLabelGroupingNodeKey(lhs)) {\r\n assert(isLabelGroupingNodeKey(rhs));\r\n return lhs.label === rhs.label;\r\n }\r\n return true;\r\n }\r\n}\r\n\r\n/**\r\n * Node key path. Can be used to define path from one node to another.\r\n * @public\r\n */\r\nexport type NodeKeyPath = NodeKey[];\r\n\r\n/**\r\n * Data structure that describes a basic node key\r\n * @public\r\n */\r\nexport interface BaseNodeKey {\r\n /** Node type */\r\n type: string;\r\n\r\n /**\r\n * Version of the key. Different versions suggest that node keys were created by two different\r\n * versions of the library. In that case, keys representing the same node may be different.\r\n */\r\n version: number;\r\n\r\n /** Node hash path from root to the node whose key this is */\r\n pathFromRoot: string[];\r\n\r\n /** Query that returns all selected instance keys\r\n * @alpha\r\n */\r\n instanceKeysSelectQuery?: PresentationQuery;\r\n}\r\n/**\r\n * Serialized [[BaseNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[BaseNodeKey]].\r\n */\r\nexport interface BaseNodeKeyJSON {\r\n type: string;\r\n // TODO: make this required\r\n version?: number;\r\n pathFromRoot: string[];\r\n /** @alpha */\r\n instanceKeysSelectQuery?: PresentationQuery;\r\n}\r\n\r\n/**\r\n * Data structure that describes a node ECInstance node key\r\n * @public\r\n */\r\nexport interface ECInstancesNodeKey extends BaseNodeKey {\r\n type: StandardNodeTypes.ECInstancesNode;\r\n /** List of [[InstanceKey]] objects of ECInstances represented by the node */\r\n instanceKeys: InstanceKey[];\r\n}\r\n/**\r\n * Serialized [[ECInstancesNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[ECInstancesNodeKey]].\r\n */\r\nexport interface ECInstancesNodeKeyJSON extends BaseNodeKey {\r\n type: StandardNodeTypes.ECInstancesNode;\r\n instanceKeys: InstanceKey[];\r\n}\r\n\r\n/**\r\n * Data structure that describes a grouping node key\r\n * @public\r\n */\r\nexport interface GroupingNodeKey extends BaseNodeKey {\r\n /**\r\n * Get the number of instances grouped by the node represented\r\n * by this key.\r\n *\r\n * **Note:** this property is just a helper and is not involved\r\n * in identifying a node.\r\n */\r\n groupedInstancesCount: number;\r\n}\r\n/**\r\n * Serialized [[GroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[GroupingNodeKey]].\r\n */\r\nexport interface GroupingNodeKeyJSON extends BaseNodeKey {\r\n groupedInstancesCount: number;\r\n}\r\n\r\n/**\r\n * Data structure that describes an ECClass grouping node key\r\n * @public\r\n */\r\nexport interface ECClassGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECClassGroupingNode;\r\n /** Full name of the grouping ECClass */\r\n className: string;\r\n}\r\n/**\r\n * Serialized [[ECClassGroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[ECClassGroupingNodeKey]].\r\n */\r\nexport interface ECClassGroupingNodeKeyJSON extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECClassGroupingNode;\r\n className: string;\r\n}\r\n\r\n/**\r\n * Data structure that describes an ECProperty grouping node key\r\n * @public\r\n */\r\nexport interface ECPropertyGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECPropertyGroupingNode;\r\n /** Full name of the grouping ECProperty class */\r\n className: string;\r\n /** Name of the ECProperty */\r\n propertyName: string;\r\n /** Raw grouping values */\r\n groupingValues: any[];\r\n}\r\n/**\r\n * Serialized [[ECPropertyGroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[ECPropertyGroupingNodeKey]].\r\n */\r\nexport interface ECPropertyGroupingNodeKeyJSON extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECPropertyGroupingNode;\r\n className: string;\r\n propertyName: string;\r\n groupingValues: any[];\r\n}\r\n\r\n/**\r\n * Data structure that describes a display label grouping node key\r\n * @public\r\n */\r\nexport interface LabelGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.DisplayLabelGroupingNode;\r\n /** Grouping display label */\r\n label: string;\r\n}\r\n/**\r\n * Serialized [[LabelGroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[LabelGroupingNodeKey]].\r\n */\r\nexport interface LabelGroupingNodeKeyJSON extends GroupingNodeKey {\r\n type: StandardNodeTypes.DisplayLabelGroupingNode;\r\n label: string;\r\n}\r\n\r\n/**\r\n * One of the serialized node key types\r\n * @public\r\n * @deprecated in 3.x. Use [[NodeKey]].\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport type NodeKeyJSON = BaseNodeKeyJSON | ECInstancesNodeKeyJSON | ECClassGroupingNodeKeyJSON | ECPropertyGroupingNodeKeyJSON | LabelGroupingNodeKeyJSON;\r\n\r\n/**\r\n * Data structure that describes a presentation query\r\n * @alpha\r\n */\r\nexport interface PresentationQuery {\r\n /** ECSQL query */\r\n query: string;\r\n /** The query bindings */\r\n bindings?: PresentationQueryBinding[];\r\n}\r\n\r\n/** @alpha */\r\nexport interface BasePresentationQueryBinding {\r\n type: \"Id\" | \"IdSet\" | \"ECValue\" | \"ValueSet\";\r\n}\r\n\r\n/** @alpha */\r\nexport interface IdBinding extends BasePresentationQueryBinding {\r\n type: \"Id\";\r\n value: Id64String;\r\n}\r\n\r\n/** @alpha */\r\nexport interface IdSetBinding extends BasePresentationQueryBinding {\r\n type: \"IdSet\";\r\n value: Id64String[];\r\n}\r\n\r\n/** @alpha */\r\nexport interface ECValueBinding extends BasePresentationQueryBinding {\r\n type: \"ECValue\";\r\n valueType: string;\r\n value: any;\r\n}\r\n\r\n/** @alpha */\r\nexport interface ECValueSetBinding extends BasePresentationQueryBinding {\r\n type: \"ValueSet\";\r\n valueType: string;\r\n value: any[];\r\n}\r\n\r\n/**\r\n * One of the presentation query binding types\r\n * @alpha\r\n */\r\nexport type PresentationQueryBinding = IdBinding | IdSetBinding | ECValueBinding | ECValueSetBinding;\r\n"]}
@@ -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,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;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AAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAGpD;IAED;;;;;OAKG;IAEH,SAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,MAAM,GAAG,IAAI,EAAE,CAK9D;IAED;;;;OAIG;IACH,SAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAExD;CACF"}
@@ -5,47 +5,55 @@
5
5
  /** @packageDocumentation
6
6
  * @module Hierarchies
7
7
  */
8
- import { LabelDefinition } from "../LabelDefinition";
9
8
  import { NodeKey } from "./Key";
10
9
  /** @public */
11
10
  export var Node;
12
11
  (function (Node) {
13
- /** Serialize given [[Node]] to JSON */
12
+ /**
13
+ * Serialize given [[Node]] to JSON
14
+ * @deprecated in 3.x. Use [[Node]].
15
+ */
16
+ // eslint-disable-next-line deprecation/deprecation
14
17
  function toJSON(node) {
15
- const { key, label, ...baseNode } = node;
18
+ const { label, ...baseNode } = node;
16
19
  return {
17
20
  ...baseNode,
18
- key: NodeKey.toJSON(key),
19
- labelDefinition: LabelDefinition.toJSON(label),
21
+ labelDefinition: label,
20
22
  };
21
23
  }
22
24
  Node.toJSON = toJSON;
23
25
  /** @internal */
26
+ // eslint-disable-next-line deprecation/deprecation
24
27
  function toPartialJSON(node) {
25
28
  if (node.key === undefined) {
26
29
  return node;
27
30
  }
28
- const { key, label, ...baseNode } = node;
31
+ const { label, ...baseNode } = node;
29
32
  return {
30
33
  ...baseNode,
31
- key: NodeKey.toJSON(key),
32
- labelDefinition: LabelDefinition.toJSON(label),
34
+ labelDefinition: label,
33
35
  };
34
36
  }
35
37
  Node.toPartialJSON = toPartialJSON;
36
- /** Deserialize [[Node]] from JSON */
38
+ /**
39
+ * Deserialize [[Node]] from JSON
40
+ * @deprecated in 3.x. Use [[Node]].
41
+ */
42
+ // eslint-disable-next-line deprecation/deprecation
37
43
  function fromJSON(json) {
38
44
  if (typeof json === "string")
39
45
  return JSON.parse(json, reviver);
40
46
  const { labelDefinition, ...baseJson } = json;
41
47
  return {
42
48
  ...baseJson,
49
+ // eslint-disable-next-line deprecation/deprecation
43
50
  key: NodeKey.fromJSON(json.key),
44
- label: LabelDefinition.fromJSON(labelDefinition),
51
+ label: labelDefinition,
45
52
  };
46
53
  }
47
54
  Node.fromJSON = fromJSON;
48
55
  /** @internal */
56
+ // eslint-disable-next-line deprecation/deprecation
49
57
  function fromPartialJSON(json) {
50
58
  if (json.key === undefined) {
51
59
  return json;
@@ -53,18 +61,19 @@ export var Node;
53
61
  const { key, labelDefinition, ...baseJson } = json;
54
62
  return {
55
63
  ...baseJson,
64
+ // eslint-disable-next-line deprecation/deprecation
56
65
  key: NodeKey.fromJSON(key),
57
- label: LabelDefinition.fromJSON(labelDefinition),
66
+ label: labelDefinition,
58
67
  };
59
68
  }
60
69
  Node.fromPartialJSON = fromPartialJSON;
61
70
  /**
62
71
  * Reviver function that can be used as a second argument for
63
72
  * `JSON.parse` method when parsing [[Node]] objects.
64
- *
65
73
  * @internal
66
74
  */
67
75
  function reviver(key, value) {
76
+ // eslint-disable-next-line deprecation/deprecation
68
77
  return key === "" ? fromJSON(value) : value;
69
78
  }
70
79
  Node.reviver = reviver;
@@ -72,19 +81,19 @@ export var Node;
72
81
  * Deserialize nodes list from JSON
73
82
  * @param json JSON or JSON serialized to string to deserialize from
74
83
  * @returns Deserialized nodes list
75
- *
76
84
  * @internal
77
85
  */
86
+ // eslint-disable-next-line deprecation/deprecation
78
87
  function listFromJSON(json) {
79
88
  if (typeof json === "string")
80
89
  return JSON.parse(json, listReviver);
90
+ // eslint-disable-next-line deprecation/deprecation
81
91
  return json.map((m) => fromJSON(m));
82
92
  }
83
93
  Node.listFromJSON = listFromJSON;
84
94
  /**
85
95
  * Reviver function that can be used as a second argument for
86
96
  * `JSON.parse` method when parsing [[Node]][] objects.
87
- *
88
97
  * @internal
89
98
  */
90
99
  function listReviver(key, value) {
@@ -1 +1 @@
1
- {"version":3,"file":"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AAW,cAE1B,CAAA;AACH,CAAC,EAnFgB,IAAI,KAAJ,IAAI,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,OAAO,EAAE,OAAO,EAAe,MAAM,OAAO,CAAC;AAyH7C,cAAc;AACd,MAAM,KAAW,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,CAAC,IAAuB;QAC9C,IAAI,OAAO,IAAI,KAAK,QAAQ;YAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACnC,MAAM,EAAE,eAAe,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,C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AAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAClD,CAAC;IAFe,gBAAW,cAE1B,CAAA;AACH,CAAC,EA7FgB,IAAI,KAAJ,IAAI,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;;G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AAW,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"}
@@ -9,43 +9,59 @@ import { Node } from "./Node";
9
9
  /** @public */
10
10
  export var NodePathElement;
11
11
  (function (NodePathElement) {
12
- /** Serialize given [[NodePathElement]] to JSON */
12
+ /**
13
+ * Serialize given [[NodePathElement]] to JSON
14
+ * @deprecated in 3.x. Use [[NodePathElement]].
15
+ */
16
+ // eslint-disable-next-line deprecation/deprecation
13
17
  function toJSON(npe) {
18
+ // eslint-disable-next-line deprecation/deprecation
14
19
  const result = {
20
+ // eslint-disable-next-line deprecation/deprecation
15
21
  node: Node.toJSON(npe.node),
16
22
  index: npe.index,
23
+ // eslint-disable-next-line deprecation/deprecation
17
24
  children: npe.children.map(NodePathElement.toJSON),
18
25
  };
19
26
  if (undefined !== npe.isMarked)
20
27
  result.isMarked = npe.isMarked;
21
- if (undefined !== npe.filteringData)
28
+ if (undefined !== npe.filteringData) {
29
+ // eslint-disable-next-line deprecation/deprecation
22
30
  result.filteringData = NodePathFilteringData.toJSON(npe.filteringData);
31
+ }
23
32
  return result;
24
33
  }
25
34
  NodePathElement.toJSON = toJSON;
26
- /** Deserialize [[NodePathElement]] from JSON */
35
+ /**
36
+ * Deserialize [[NodePathElement]] from JSON
37
+ * @deprecated in 3.x. Use [[NodePathElement]].
38
+ */
39
+ // eslint-disable-next-line deprecation/deprecation
27
40
  function fromJSON(json) {
28
41
  if (typeof json === "string")
29
42
  return JSON.parse(json, reviver);
30
43
  const result = {
31
44
  index: json.index,
45
+ // eslint-disable-next-line deprecation/deprecation
32
46
  node: Node.fromJSON(json.node),
33
47
  children: listFromJSON(json.children),
34
48
  };
35
49
  if (undefined !== json.isMarked)
36
50
  result.isMarked = json.isMarked;
37
- if (undefined !== json.filteringData)
51
+ if (undefined !== json.filteringData) {
52
+ // eslint-disable-next-line deprecation/deprecation
38
53
  result.filteringData = NodePathFilteringData.fromJSON(json.filteringData);
54
+ }
39
55
  return result;
40
56
  }
41
57
  NodePathElement.fromJSON = fromJSON;
42
58
  /**
43
59
  * Reviver function that can be used as a second argument for
44
60
  * `JSON.parse` method when parsing [[NodePathElement]] objects.
45
- *
46
61
  * @internal
47
62
  */
48
63
  function reviver(key, value) {
64
+ // eslint-disable-next-line deprecation/deprecation
49
65
  return key === "" ? fromJSON(value) : value;
50
66
  }
51
67
  NodePathElement.reviver = reviver;
@@ -53,19 +69,19 @@ export var NodePathElement;
53
69
  * Deserialize [[NodePathElement]] list from JSON
54
70
  * @param json JSON or JSON serialized to string to deserialize from
55
71
  * @returns Deserialized [[NodePathElement]] list
56
- *
57
72
  * @internal
58
73
  */
74
+ // eslint-disable-next-line deprecation/deprecation
59
75
  function listFromJSON(json) {
60
76
  if (typeof json === "string")
61
77
  return JSON.parse(json, listReviver);
78
+ // eslint-disable-next-line deprecation/deprecation
62
79
  return json.map((m) => fromJSON(m));
63
80
  }
64
81
  NodePathElement.listFromJSON = listFromJSON;
65
82
  /**
66
83
  * Reviver function that can be used as a second argument for
67
84
  * `JSON.parse` method when parsing [[NodePathElement]][] objects.
68
- *
69
85
  * @internal
70
86
  */
71
87
  function listReviver(key, value) {
@@ -76,7 +92,11 @@ export var NodePathElement;
76
92
  /** @public */
77
93
  export var NodePathFilteringData;
78
94
  (function (NodePathFilteringData) {
79
- /** Serialize given [[NodePathFilteringData]] to JSON */
95
+ /**
96
+ * Serialize given [[NodePathFilteringData]] to JSON
97
+ * @deprecated in 3.x. Use [[NodePathFilteringData]].
98
+ */
99
+ // eslint-disable-next-line deprecation/deprecation
80
100
  function toJSON(npfd) {
81
101
  return {
82
102
  occurances: npfd.matchesCount,
@@ -84,7 +104,11 @@ export var NodePathFilteringData;
84
104
  };
85
105
  }
86
106
  NodePathFilteringData.toJSON = toJSON;
87
- /** Deserialize [[NodePathFilteringData]] from JSON */
107
+ /**
108
+ * Deserialize [[NodePathFilteringData]] from JSON
109
+ * @deprecated in 3.x. Use [[NodePathFilteringData]].
110
+ */
111
+ // eslint-disable-next-line deprecation/deprecation
88
112
  function fromJSON(json) {
89
113
  return {
90
114
  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,OAAO,EAAE,IAAI,EAAY,MAAM,QAAQ,CAAC;AA+BxC,cAAc;AACd,MAAM,KAAW,eAAe,CA+D/B;AA/DD,WAAiB,eAAe;IAC9B,kDAAkD;IAClD,SAAgB,MAAM,CAAC,GAAoB;QACzC,MAAM,MAAM,GAAwB;YAClC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;YAC3B,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,GA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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,KAAf,eAAe,QA+D/B;AAsBD,cAAc;AACd,MAAM,KAAW,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,KAArB,qBAAqB,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"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAY,MAAM,QAAQ,CAAC;AAmCxC,cAAc;AACd,MAAM,KAAW,eAAe,CA+E/B;AA/ED,WAAiB,eAAe;IAC9B;;;OAGG;IACH,mDAA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I,CAAC,UAAU;YAC7B,iBAAiB,EAAE,IAAI,CAAC,kBAAkB;SAC3C,CAAC;IACJ,CAAC;IALe,8BAAQ,WAKvB,CAAA;AACH,CAAC,EAxBgB,qBAAqB,KAArB,qBAAqB,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"}