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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (368) hide show
  1. package/CHANGELOG.md +26 -1
  2. package/LICENSE.md +1 -1
  3. package/Ruleset.schema.json +236 -309
  4. package/lib/cjs/presentation-common/EC.d.ts +52 -17
  5. package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
  6. package/lib/cjs/presentation-common/EC.js +74 -54
  7. package/lib/cjs/presentation-common/EC.js.map +1 -1
  8. package/lib/cjs/presentation-common/ElementProperties.d.ts +14 -14
  9. package/lib/cjs/presentation-common/ElementProperties.js.map +1 -1
  10. package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts +43 -9
  11. package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
  12. package/lib/cjs/presentation-common/InstanceFilterDefinition.js.map +1 -1
  13. package/lib/cjs/presentation-common/KeySet.d.ts.map +1 -1
  14. package/lib/cjs/presentation-common/KeySet.js +5 -0
  15. package/lib/cjs/presentation-common/KeySet.js.map +1 -1
  16. package/lib/cjs/presentation-common/LabelDefinition.d.ts +24 -16
  17. package/lib/cjs/presentation-common/LabelDefinition.d.ts.map +1 -1
  18. package/lib/cjs/presentation-common/LabelDefinition.js +26 -29
  19. package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
  20. package/lib/cjs/presentation-common/PresentationIpcInterface.d.ts +7 -4
  21. package/lib/cjs/presentation-common/PresentationIpcInterface.d.ts.map +1 -1
  22. package/lib/cjs/presentation-common/PresentationIpcInterface.js.map +1 -1
  23. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts +30 -11
  24. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  25. package/lib/cjs/presentation-common/PresentationManagerOptions.js +1 -1
  26. package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
  27. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts +24 -19
  28. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  29. package/lib/cjs/presentation-common/PresentationRpcInterface.js +7 -5
  30. package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
  31. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts +9 -8
  32. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  33. package/lib/cjs/presentation-common/RpcRequestsHandler.js +17 -1
  34. package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
  35. package/lib/cjs/presentation-common/RulesetVariables.d.ts +5 -0
  36. package/lib/cjs/presentation-common/RulesetVariables.d.ts.map +1 -1
  37. package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
  38. package/lib/cjs/presentation-common/Update.d.ts +23 -4
  39. package/lib/cjs/presentation-common/Update.d.ts.map +1 -1
  40. package/lib/cjs/presentation-common/Update.js +34 -4
  41. package/lib/cjs/presentation-common/Update.js.map +1 -1
  42. package/lib/cjs/presentation-common/content/Category.d.ts.map +1 -1
  43. package/lib/cjs/presentation-common/content/Category.js +1 -2
  44. package/lib/cjs/presentation-common/content/Category.js.map +1 -1
  45. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts +194 -24
  46. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  47. package/lib/cjs/presentation-common/content/ContentTraverser.js +63 -44
  48. package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
  49. package/lib/cjs/presentation-common/content/Descriptor.d.ts +76 -23
  50. package/lib/cjs/presentation-common/content/Descriptor.d.ts.map +1 -1
  51. package/lib/cjs/presentation-common/content/Descriptor.js +5 -7
  52. package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
  53. package/lib/cjs/presentation-common/content/Fields.d.ts +24 -5
  54. package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
  55. package/lib/cjs/presentation-common/content/Fields.js +10 -7
  56. package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
  57. package/lib/cjs/presentation-common/content/Item.d.ts +8 -10
  58. package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
  59. package/lib/cjs/presentation-common/content/Item.js +6 -8
  60. package/lib/cjs/presentation-common/content/Item.js.map +1 -1
  61. package/lib/cjs/presentation-common/content/Property.d.ts +8 -2
  62. package/lib/cjs/presentation-common/content/Property.d.ts.map +1 -1
  63. package/lib/cjs/presentation-common/content/Property.js +12 -8
  64. package/lib/cjs/presentation-common/content/Property.js.map +1 -1
  65. package/lib/cjs/presentation-common/content/Value.d.ts +43 -11
  66. package/lib/cjs/presentation-common/content/Value.d.ts.map +1 -1
  67. package/lib/cjs/presentation-common/content/Value.js +72 -16
  68. package/lib/cjs/presentation-common/content/Value.js.map +1 -1
  69. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts +38 -0
  70. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -0
  71. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js +32 -0
  72. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -0
  73. package/lib/cjs/presentation-common/hierarchy/Key.d.ts +75 -14
  74. package/lib/cjs/presentation-common/hierarchy/Key.d.ts.map +1 -1
  75. package/lib/cjs/presentation-common/hierarchy/Key.js +15 -6
  76. package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
  77. package/lib/cjs/presentation-common/hierarchy/Node.d.ts +32 -19
  78. package/lib/cjs/presentation-common/hierarchy/Node.d.ts.map +1 -1
  79. package/lib/cjs/presentation-common/hierarchy/Node.js +23 -14
  80. package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
  81. package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts +18 -7
  82. package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
  83. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js +33 -9
  84. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  85. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts +5 -2
  86. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts.map +1 -1
  87. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  88. package/lib/cjs/presentation-common/rules/Rule.d.ts +6 -4
  89. package/lib/cjs/presentation-common/rules/Rule.d.ts.map +1 -1
  90. package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
  91. package/lib/cjs/presentation-common/rules/Ruleset.d.ts +0 -1
  92. package/lib/cjs/presentation-common/rules/Ruleset.d.ts.map +1 -1
  93. package/lib/cjs/presentation-common/rules/Ruleset.js.map +1 -1
  94. package/lib/cjs/presentation-common/rules/SchemasSpecification.d.ts +1 -1
  95. package/lib/cjs/presentation-common/rules/SchemasSpecification.js.map +1 -1
  96. package/lib/cjs/presentation-common/rules/Variables.d.ts +5 -2
  97. package/lib/cjs/presentation-common/rules/Variables.d.ts.map +1 -1
  98. package/lib/cjs/presentation-common/rules/Variables.js.map +1 -1
  99. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +3 -3
  100. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts.map +1 -1
  101. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  102. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +2 -2
  103. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts.map +1 -1
  104. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  105. package/lib/cjs/presentation-common/rules/content/ContentRule.d.ts +2 -2
  106. package/lib/cjs/presentation-common/rules/content/ContentRule.d.ts.map +1 -1
  107. package/lib/cjs/presentation-common/rules/content/ContentRule.js.map +1 -1
  108. package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts +6 -3
  109. package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
  110. package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  111. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +2 -2
  112. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts.map +1 -1
  113. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  114. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +2 -2
  115. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts.map +1 -1
  116. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  117. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.d.ts +2 -2
  118. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.d.ts.map +1 -1
  119. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  120. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +9 -6
  121. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts.map +1 -1
  122. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  123. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +6 -3
  124. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts.map +1 -1
  125. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  126. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts +3 -3
  127. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts.map +1 -1
  128. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
  129. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.d.ts +2 -2
  130. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.d.ts.map +1 -1
  131. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  132. package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts +20 -13
  133. package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
  134. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js +1 -1
  135. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  136. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts +3 -3
  137. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts.map +1 -1
  138. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
  139. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts +17 -15
  140. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
  141. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  142. package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts +3 -3
  143. package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts.map +1 -1
  144. package/lib/cjs/presentation-common/rules/customization/LabelOverride.js.map +1 -1
  145. package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts +3 -3
  146. package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts.map +1 -1
  147. package/lib/cjs/presentation-common/rules/customization/SortingRule.js.map +1 -1
  148. package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts +3 -3
  149. package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts.map +1 -1
  150. package/lib/cjs/presentation-common/rules/customization/StyleOverride.js.map +1 -1
  151. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +1 -2
  152. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.d.ts.map +1 -1
  153. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  154. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +5 -4
  155. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
  156. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js +0 -1
  157. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  158. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +2 -2
  159. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
  160. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  161. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +9 -6
  162. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts.map +1 -1
  163. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  164. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +3 -3
  165. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
  166. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  167. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +2 -2
  168. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts.map +1 -1
  169. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  170. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +2 -2
  171. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts.map +1 -1
  172. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  173. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.d.ts +1 -2
  174. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.d.ts.map +1 -1
  175. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  176. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.d.ts +0 -1
  177. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.d.ts.map +1 -1
  178. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  179. package/lib/cjs/presentation-common/selection/SelectionScope.d.ts +17 -4
  180. package/lib/cjs/presentation-common/selection/SelectionScope.d.ts.map +1 -1
  181. package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
  182. package/lib/cjs/presentation-common.d.ts +1 -0
  183. package/lib/cjs/presentation-common.d.ts.map +1 -1
  184. package/lib/cjs/presentation-common.js +1 -0
  185. package/lib/cjs/presentation-common.js.map +1 -1
  186. package/lib/esm/presentation-common/EC.d.ts +52 -17
  187. package/lib/esm/presentation-common/EC.d.ts.map +1 -1
  188. package/lib/esm/presentation-common/EC.js +75 -55
  189. package/lib/esm/presentation-common/EC.js.map +1 -1
  190. package/lib/esm/presentation-common/ElementProperties.d.ts +14 -14
  191. package/lib/esm/presentation-common/ElementProperties.js.map +1 -1
  192. package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts +43 -9
  193. package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
  194. package/lib/esm/presentation-common/InstanceFilterDefinition.js.map +1 -1
  195. package/lib/esm/presentation-common/KeySet.d.ts.map +1 -1
  196. package/lib/esm/presentation-common/KeySet.js +5 -0
  197. package/lib/esm/presentation-common/KeySet.js.map +1 -1
  198. package/lib/esm/presentation-common/LabelDefinition.d.ts +24 -16
  199. package/lib/esm/presentation-common/LabelDefinition.d.ts.map +1 -1
  200. package/lib/esm/presentation-common/LabelDefinition.js +26 -29
  201. package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
  202. package/lib/esm/presentation-common/PresentationIpcInterface.d.ts +7 -4
  203. package/lib/esm/presentation-common/PresentationIpcInterface.d.ts.map +1 -1
  204. package/lib/esm/presentation-common/PresentationIpcInterface.js.map +1 -1
  205. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts +30 -11
  206. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  207. package/lib/esm/presentation-common/PresentationManagerOptions.js +1 -1
  208. package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
  209. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts +24 -19
  210. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  211. package/lib/esm/presentation-common/PresentationRpcInterface.js +7 -5
  212. package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
  213. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts +9 -8
  214. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  215. package/lib/esm/presentation-common/RpcRequestsHandler.js +17 -1
  216. package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
  217. package/lib/esm/presentation-common/RulesetVariables.d.ts +5 -0
  218. package/lib/esm/presentation-common/RulesetVariables.d.ts.map +1 -1
  219. package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
  220. package/lib/esm/presentation-common/Update.d.ts +23 -4
  221. package/lib/esm/presentation-common/Update.d.ts.map +1 -1
  222. package/lib/esm/presentation-common/Update.js +34 -4
  223. package/lib/esm/presentation-common/Update.js.map +1 -1
  224. package/lib/esm/presentation-common/content/Category.d.ts.map +1 -1
  225. package/lib/esm/presentation-common/content/Category.js +1 -2
  226. package/lib/esm/presentation-common/content/Category.js.map +1 -1
  227. package/lib/esm/presentation-common/content/ContentTraverser.d.ts +194 -24
  228. package/lib/esm/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  229. package/lib/esm/presentation-common/content/ContentTraverser.js +60 -42
  230. package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
  231. package/lib/esm/presentation-common/content/Descriptor.d.ts +76 -23
  232. package/lib/esm/presentation-common/content/Descriptor.d.ts.map +1 -1
  233. package/lib/esm/presentation-common/content/Descriptor.js +5 -7
  234. package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
  235. package/lib/esm/presentation-common/content/Fields.d.ts +24 -5
  236. package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
  237. package/lib/esm/presentation-common/content/Fields.js +11 -8
  238. package/lib/esm/presentation-common/content/Fields.js.map +1 -1
  239. package/lib/esm/presentation-common/content/Item.d.ts +8 -10
  240. package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
  241. package/lib/esm/presentation-common/content/Item.js +6 -8
  242. package/lib/esm/presentation-common/content/Item.js.map +1 -1
  243. package/lib/esm/presentation-common/content/Property.d.ts +8 -2
  244. package/lib/esm/presentation-common/content/Property.d.ts.map +1 -1
  245. package/lib/esm/presentation-common/content/Property.js +12 -8
  246. package/lib/esm/presentation-common/content/Property.js.map +1 -1
  247. package/lib/esm/presentation-common/content/Value.d.ts +43 -11
  248. package/lib/esm/presentation-common/content/Value.d.ts.map +1 -1
  249. package/lib/esm/presentation-common/content/Value.js +72 -16
  250. package/lib/esm/presentation-common/content/Value.js.map +1 -1
  251. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts +38 -0
  252. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -0
  253. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js +29 -0
  254. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -0
  255. package/lib/esm/presentation-common/hierarchy/Key.d.ts +75 -14
  256. package/lib/esm/presentation-common/hierarchy/Key.d.ts.map +1 -1
  257. package/lib/esm/presentation-common/hierarchy/Key.js +15 -6
  258. package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
  259. package/lib/esm/presentation-common/hierarchy/Node.d.ts +32 -19
  260. package/lib/esm/presentation-common/hierarchy/Node.d.ts.map +1 -1
  261. package/lib/esm/presentation-common/hierarchy/Node.js +23 -14
  262. package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
  263. package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts +18 -7
  264. package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
  265. package/lib/esm/presentation-common/hierarchy/NodePathElement.js +33 -9
  266. package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  267. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts +5 -2
  268. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts.map +1 -1
  269. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  270. package/lib/esm/presentation-common/rules/Rule.d.ts +6 -4
  271. package/lib/esm/presentation-common/rules/Rule.d.ts.map +1 -1
  272. package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
  273. package/lib/esm/presentation-common/rules/Ruleset.d.ts +0 -1
  274. package/lib/esm/presentation-common/rules/Ruleset.d.ts.map +1 -1
  275. package/lib/esm/presentation-common/rules/Ruleset.js.map +1 -1
  276. package/lib/esm/presentation-common/rules/SchemasSpecification.d.ts +1 -1
  277. package/lib/esm/presentation-common/rules/SchemasSpecification.js.map +1 -1
  278. package/lib/esm/presentation-common/rules/Variables.d.ts +5 -2
  279. package/lib/esm/presentation-common/rules/Variables.d.ts.map +1 -1
  280. package/lib/esm/presentation-common/rules/Variables.js.map +1 -1
  281. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +3 -3
  282. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts.map +1 -1
  283. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  284. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +2 -2
  285. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts.map +1 -1
  286. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  287. package/lib/esm/presentation-common/rules/content/ContentRule.d.ts +2 -2
  288. package/lib/esm/presentation-common/rules/content/ContentRule.d.ts.map +1 -1
  289. package/lib/esm/presentation-common/rules/content/ContentRule.js.map +1 -1
  290. package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts +6 -3
  291. package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
  292. package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  293. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +2 -2
  294. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts.map +1 -1
  295. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  296. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +2 -2
  297. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts.map +1 -1
  298. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  299. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.d.ts +2 -2
  300. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.d.ts.map +1 -1
  301. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  302. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +9 -6
  303. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts.map +1 -1
  304. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  305. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +6 -3
  306. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts.map +1 -1
  307. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  308. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts +3 -3
  309. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts.map +1 -1
  310. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
  311. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.d.ts +2 -2
  312. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.d.ts.map +1 -1
  313. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  314. package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts +20 -13
  315. package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
  316. package/lib/esm/presentation-common/rules/customization/GroupingRule.js +1 -1
  317. package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  318. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts +3 -3
  319. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts.map +1 -1
  320. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
  321. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts +17 -15
  322. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
  323. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  324. package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts +3 -3
  325. package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts.map +1 -1
  326. package/lib/esm/presentation-common/rules/customization/LabelOverride.js.map +1 -1
  327. package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts +3 -3
  328. package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts.map +1 -1
  329. package/lib/esm/presentation-common/rules/customization/SortingRule.js.map +1 -1
  330. package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts +3 -3
  331. package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts.map +1 -1
  332. package/lib/esm/presentation-common/rules/customization/StyleOverride.js.map +1 -1
  333. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +1 -2
  334. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.d.ts.map +1 -1
  335. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  336. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +5 -4
  337. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
  338. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js +0 -1
  339. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  340. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +2 -2
  341. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
  342. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  343. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +9 -6
  344. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts.map +1 -1
  345. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  346. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +3 -3
  347. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
  348. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  349. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +2 -2
  350. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts.map +1 -1
  351. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  352. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +2 -2
  353. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts.map +1 -1
  354. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  355. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.d.ts +1 -2
  356. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.d.ts.map +1 -1
  357. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  358. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.d.ts +0 -1
  359. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.d.ts.map +1 -1
  360. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  361. package/lib/esm/presentation-common/selection/SelectionScope.d.ts +17 -4
  362. package/lib/esm/presentation-common/selection/SelectionScope.d.ts.map +1 -1
  363. package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
  364. package/lib/esm/presentation-common.d.ts +1 -0
  365. package/lib/esm/presentation-common.d.ts.map +1 -1
  366. package/lib/esm/presentation-common.js +1 -0
  367. package/lib/esm/presentation-common.js.map +1 -1
  368. package/package.json +10 -10
@@ -1,7 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module Content
3
3
  */
4
- import { InstanceKey, InstanceKeyJSON } from "../EC";
4
+ import { InstanceKey } from "../EC";
5
5
  import { ValuesDictionary } from "../Utils";
6
6
  /**
7
7
  * Raw value type
@@ -18,9 +18,15 @@ export declare namespace Value {
18
18
  function isMap(value: Value): value is ValuesMap;
19
19
  /** Is the value a nested content value */
20
20
  function isNestedContent(value: Value): value is NestedContentValue[];
21
- /** Serialize [[Value]] to JSON */
21
+ /**
22
+ * Serialize [[Value]] to JSON
23
+ * @deprecated in 3.x. Use [[Value]]
24
+ */
22
25
  function fromJSON(json: ValueJSON): Value;
23
- /** Deserialize [[Value]] from JSON */
26
+ /**
27
+ * Deserialize [[Value]] from JSON
28
+ * @deprecated in 3.x. Use [[Value]]
29
+ */
24
30
  function toJSON(value: Value): ValueJSON;
25
31
  }
26
32
  /**
@@ -48,9 +54,15 @@ export declare namespace DisplayValue {
48
54
  function isArray(value: DisplayValue): value is DisplayValuesArray;
49
55
  /** Is the value a map / struct */
50
56
  function isMap(value: DisplayValue): value is DisplayValuesMap;
51
- /** Serialize [[DisplayValue]] to JSON */
57
+ /**
58
+ * Serialize [[DisplayValue]] to JSON
59
+ * @deprecated in 3.x. Use [[DisplayValue]]
60
+ */
52
61
  function fromJSON(json: DisplayValueJSON): DisplayValue;
53
- /** Deserialize [[DisplayValue]] from JSON */
62
+ /**
63
+ * Deserialize [[DisplayValue]] from JSON
64
+ * @deprecated in 3.x. Use [[DisplayValue]]
65
+ */
54
66
  function toJSON(value: DisplayValue): DisplayValueJSON;
55
67
  }
56
68
  /**
@@ -81,51 +93,64 @@ export interface NestedContentValue {
81
93
  }
82
94
  /** @public */
83
95
  export declare namespace NestedContentValue {
84
- /** Serialize [[NestedContentValue]] to JSON */
85
- function toJSON(json: NestedContentValue): NestedContentValueJSON;
86
- /** Deserialize [[NestedContentValue]] from JSON */
96
+ /**
97
+ * Serialize [[NestedContentValue]] to JSON
98
+ * @deprecated in 3.x. Use [[NestedContentValue]]
99
+ */
100
+ function toJSON(value: NestedContentValue): NestedContentValueJSON;
101
+ /**
102
+ * Deserialize [[NestedContentValue]] from JSON
103
+ * @deprecated in 3.x. Use [[NestedContentValue]]
104
+ */
87
105
  function fromJSON(json: NestedContentValueJSON): NestedContentValue;
88
106
  }
89
107
  /**
90
108
  * JSON representation of [[Value]]
91
109
  * @public
110
+ * @deprecated in 3.x. Use [[Value]]
92
111
  */
93
112
  export declare type ValueJSON = string | number | boolean | null | ValuesMapJSON | ValuesArrayJSON | NestedContentValueJSON[];
94
113
  /**
95
114
  * JSON representation of [[ValuesMap]]
96
115
  * @public
116
+ * @deprecated in 3.x. Use [[ValuesMap]]
97
117
  */
98
118
  export interface ValuesMapJSON extends ValuesDictionary<ValueJSON> {
99
119
  }
100
120
  /**
101
121
  * JSON representation of [[ValuesArray]]
102
122
  * @public
123
+ * @deprecated in 3.x. Use [[ValuesArray]]
103
124
  */
104
125
  export interface ValuesArrayJSON extends Array<ValueJSON> {
105
126
  }
106
127
  /**
107
128
  * JSON representation of [[DisplayValue]]
108
129
  * @public
130
+ * @deprecated in 3.x. Use [[DisplayValue]]
109
131
  */
110
132
  export declare type DisplayValueJSON = string | null | DisplayValuesMapJSON | DisplayValuesArrayJSON;
111
133
  /**
112
134
  * JSON representation of [[DisplayValuesMap]]
113
135
  * @public
136
+ * @deprecated in 3.x. Use [[DisplayValuesMap]]
114
137
  */
115
138
  export interface DisplayValuesMapJSON extends ValuesDictionary<DisplayValueJSON> {
116
139
  }
117
140
  /**
118
141
  * JSON representation of [[DisplayValuesArray]]
119
142
  * @public
143
+ * @deprecated in 3.x. Use [[DisplayValuesArray]]
120
144
  */
121
145
  export interface DisplayValuesArrayJSON extends Array<DisplayValueJSON> {
122
146
  }
123
147
  /**
124
148
  * JSON representation of [[NestedContentValue]]
125
149
  * @public
150
+ * @deprecated in 3.x. Use [[NestedContentValue]]
126
151
  */
127
152
  export interface NestedContentValueJSON {
128
- primaryKeys: InstanceKeyJSON[];
153
+ primaryKeys: InstanceKey[];
129
154
  values: ValuesDictionary<ValueJSON>;
130
155
  displayValues: ValuesDictionary<DisplayValueJSON>;
131
156
  mergedFieldNames: string[];
@@ -143,6 +168,7 @@ export interface DisplayValueGroup {
143
168
  /**
144
169
  * JSON representation of [[DisplayValueGroup]].
145
170
  * @public
171
+ * @deprecated in 3.x. Use [[DisplayValueGroup]]
146
172
  */
147
173
  export interface DisplayValueGroupJSON {
148
174
  displayValue: DisplayValueJSON;
@@ -150,9 +176,15 @@ export interface DisplayValueGroupJSON {
150
176
  }
151
177
  /** @public */
152
178
  export declare namespace DisplayValueGroup {
153
- /** Serialize [[DisplayValueGroup]] to JSON */
179
+ /**
180
+ * Serialize [[DisplayValueGroup]] to JSON
181
+ * @deprecated in 3.x. Use [[DisplayValueGroup]]
182
+ */
154
183
  function toJSON(group: DisplayValueGroup): DisplayValueGroupJSON;
155
- /** Deserialize [[DisplayValueGroup]] from JSON */
184
+ /**
185
+ * Deserialize [[DisplayValueGroup]] from JSON
186
+ * @deprecated in 3.x. Use [[DisplayValueGroup]]
187
+ */
156
188
  function fromJSON(json: DisplayValueGroupJSON): DisplayValueGroup;
157
189
  }
158
190
  //# sourceMappingURL=Value.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Value.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Value.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C;;;GAGG;AACH,oBAAY,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,kBAAkB,EAAE,CAAC;AAE3G,cAAc;AACd,yBAAiB,KAAK,CAAC;IACrB,+BAA+B;IAC/B,SAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAExF;IAED,4BAA4B;IAC5B,SAAgB,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,WAAW,CAE1D;IAED,kCAAkC;IAClC,SAAgB,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,SAAS,CAEtD;IAED,0CAA0C;IAC1C,SAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,kBAAkB,EAAE,CAE3E;IAED,kCAAkC;IAClC,SAAgB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,KAAK,CAU/C;IAED,sCAAsC;IACtC,SAAgB,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,CAU9C;CACF;AAED;;;GAGG;AACH,MAAM,WAAW,SAAU,SAAQ,gBAAgB,CAAC,KAAK,CAAC;CAAI;AAE9D;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,KAAK,CAAC;CAAI;AAErD;;;GAGG;A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,SAAQ,gBAAgB,CAAC,SAAS,CAAC;CAAI;AAEtE;;;;GAIG;AAEH,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,SAAS,CAAC;CAAI;AAE7D;;;;GAIG;AAEH,oBAAY,gBAAgB,GAAG,MAAM,GAAG,IAAI,GAAG,oBAAoB,GAAG,sBAAsB,CAAC;AAE7F;;;;GAIG;AAEH,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB,CAAC,gBAAgB,CAAC;CAAI;AAEpF;;;;GAIG;AAEH,MAAM,WAAW,sBAAuB,SAAQ,KAAK,CAAC,gBAAgB,CAAC;CAAI;AAE3E;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,WAAW,EAAE,CAAC;IAE3B,MAAM,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAEpC,aAAa,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAClD,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,sDAAsD;IACtD,YAAY,EAAE,YAAY,CAAC;IAC3B,mCAAmC;IACnC,gBAAgB,EAAE,KAAK,EAAE,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IAEpC,YAAY,EAAE,gBAAgB,CAAC;IAE/B,gBAAgB,EAAE,SAAS,EAAE,CAAC;CAC/B;AAED,cAAc;AACd,yBAAiB,iBAAiB,CAAC;IACjC;;;OAGG;IAEH,SAAgB,MAAM,CAAC,KAAK,EAAE,iBAAiB,GAAG,qBAAqB,CAOtE;IAED;;;OAGG;IAEH,SAAgB,QAAQ,CAAC,IAAI,EAAE,qBAAqB,GAAG,iBAAiB,CAOvE;CACF"}
@@ -5,7 +5,6 @@
5
5
  /** @packageDocumentation
6
6
  * @module Content
7
7
  */
8
- import { InstanceKey } from "../EC";
9
8
  /** @public */
10
9
  export var Value;
11
10
  (function (Value) {
@@ -29,11 +28,16 @@ export var Value;
29
28
  return isNestedContentValue(value);
30
29
  }
31
30
  Value.isNestedContent = isNestedContent;
32
- /** Serialize [[Value]] to JSON */
31
+ /**
32
+ * Serialize [[Value]] to JSON
33
+ * @deprecated in 3.x. Use [[Value]]
34
+ */
35
+ // eslint-disable-next-line deprecation/deprecation
33
36
  function fromJSON(json) {
34
37
  if (json === null)
35
38
  return undefined;
36
39
  if (isNestedContentValue(json))
40
+ // eslint-disable-next-line deprecation/deprecation
37
41
  return json.map(NestedContentValue.fromJSON);
38
42
  if (isArrayValue(json))
39
43
  return valuesArrayFromJSON(json);
@@ -42,11 +46,16 @@ export var Value;
42
46
  return json;
43
47
  }
44
48
  Value.fromJSON = fromJSON;
45
- /** Deserialize [[Value]] from JSON */
49
+ /**
50
+ * Deserialize [[Value]] from JSON
51
+ * @deprecated in 3.x. Use [[Value]]
52
+ */
53
+ // eslint-disable-next-line deprecation/deprecation
46
54
  function toJSON(value) {
47
55
  if (undefined === value)
48
56
  return null;
49
57
  if (isNestedContentValue(value))
58
+ // eslint-disable-next-line deprecation/deprecation
50
59
  return value.map(NestedContentValue.toJSON);
51
60
  if (isArrayValue(value))
52
61
  return valuesArrayToJSON(value);
@@ -74,7 +83,11 @@ export var DisplayValue;
74
83
  return isMapValue(value);
75
84
  }
76
85
  DisplayValue.isMap = isMap;
77
- /** Serialize [[DisplayValue]] to JSON */
86
+ /**
87
+ * Serialize [[DisplayValue]] to JSON
88
+ * @deprecated in 3.x. Use [[DisplayValue]]
89
+ */
90
+ // eslint-disable-next-line deprecation/deprecation
78
91
  function fromJSON(json) {
79
92
  if (json === null)
80
93
  return undefined;
@@ -85,7 +98,11 @@ export var DisplayValue;
85
98
  return json;
86
99
  }
87
100
  DisplayValue.fromJSON = fromJSON;
88
- /** Deserialize [[DisplayValue]] from JSON */
101
+ /**
102
+ * Deserialize [[DisplayValue]] from JSON
103
+ * @deprecated in 3.x. Use [[DisplayValue]]
104
+ */
105
+ // eslint-disable-next-line deprecation/deprecation
89
106
  function toJSON(value) {
90
107
  if (undefined === value)
91
108
  return null;
@@ -100,23 +117,29 @@ export var DisplayValue;
100
117
  /** @public */
101
118
  export var NestedContentValue;
102
119
  (function (NestedContentValue) {
103
- /** Serialize [[NestedContentValue]] to JSON */
104
- function toJSON(json) {
120
+ /**
121
+ * Serialize [[NestedContentValue]] to JSON
122
+ * @deprecated in 3.x. Use [[NestedContentValue]]
123
+ */
124
+ // eslint-disable-next-line deprecation/deprecation
125
+ function toJSON(value) {
105
126
  return {
106
- primaryKeys: json.primaryKeys.map(InstanceKey.toJSON),
107
- values: valuesMapToJSON(json.values),
108
- displayValues: displayValuesMapToJSON(json.displayValues),
109
- mergedFieldNames: json.mergedFieldNames,
127
+ ...value,
128
+ values: valuesMapToJSON(value.values),
129
+ displayValues: displayValuesMapToJSON(value.displayValues),
110
130
  };
111
131
  }
112
132
  NestedContentValue.toJSON = toJSON;
113
- /** Deserialize [[NestedContentValue]] from JSON */
133
+ /**
134
+ * Deserialize [[NestedContentValue]] from JSON
135
+ * @deprecated in 3.x. Use [[NestedContentValue]]
136
+ */
137
+ // eslint-disable-next-line deprecation/deprecation
114
138
  function fromJSON(json) {
115
139
  return {
116
- primaryKeys: json.primaryKeys.map(InstanceKey.fromJSON),
140
+ ...json,
117
141
  values: valuesMapFromJSON(json.values),
118
142
  displayValues: displayValuesMapFromJSON(json.displayValues),
119
- mergedFieldNames: json.mergedFieldNames,
120
143
  };
121
144
  }
122
145
  NestedContentValue.fromJSON = fromJSON;
@@ -124,23 +147,36 @@ export var NestedContentValue;
124
147
  /** @public */
125
148
  export var DisplayValueGroup;
126
149
  (function (DisplayValueGroup) {
127
- /** Serialize [[DisplayValueGroup]] to JSON */
150
+ /**
151
+ * Serialize [[DisplayValueGroup]] to JSON
152
+ * @deprecated in 3.x. Use [[DisplayValueGroup]]
153
+ */
154
+ // eslint-disable-next-line deprecation/deprecation
128
155
  function toJSON(group) {
129
156
  return {
157
+ // eslint-disable-next-line deprecation/deprecation
130
158
  displayValue: DisplayValue.toJSON(group.displayValue),
159
+ // eslint-disable-next-line deprecation/deprecation
131
160
  groupedRawValues: group.groupedRawValues.map(Value.toJSON),
132
161
  };
133
162
  }
134
163
  DisplayValueGroup.toJSON = toJSON;
135
- /** Deserialize [[DisplayValueGroup]] from JSON */
164
+ /**
165
+ * Deserialize [[DisplayValueGroup]] from JSON
166
+ * @deprecated in 3.x. Use [[DisplayValueGroup]]
167
+ */
168
+ // eslint-disable-next-line deprecation/deprecation
136
169
  function fromJSON(json) {
137
170
  return {
171
+ // eslint-disable-next-line deprecation/deprecation
138
172
  displayValue: DisplayValue.fromJSON(json.displayValue),
173
+ // eslint-disable-next-line deprecation/deprecation
139
174
  groupedRawValues: json.groupedRawValues.map(Value.fromJSON),
140
175
  };
141
176
  }
142
177
  DisplayValueGroup.fromJSON = fromJSON;
143
178
  })(DisplayValueGroup || (DisplayValueGroup = {}));
179
+ // eslint-disable-next-line deprecation/deprecation
144
180
  function isNestedContentValue(v) {
145
181
  return (v !== undefined) && Array.isArray(v)
146
182
  && ((v.length === 0)
@@ -149,64 +185,84 @@ function isNestedContentValue(v) {
149
185
  && v[0].displayValues !== undefined
150
186
  && v[0].mergedFieldNames !== undefined);
151
187
  }
188
+ // eslint-disable-next-line deprecation/deprecation
152
189
  function isArrayValue(v) {
153
190
  // note: we don't guarantee by 100% that v is ValuesArray | DisplayValuesArray, but merely make compiler happy.
154
191
  // we have other means to determine the type of value.
155
192
  return (v !== undefined) && Array.isArray(v);
156
193
  }
194
+ // eslint-disable-next-line deprecation/deprecation
157
195
  function isMapValue(v) {
158
196
  return (v !== undefined) && (typeof v === "object") && !Array.isArray(v);
159
197
  }
160
198
  function isPrimitiveValue(v) {
161
199
  return !isArrayValue(v) && !isMapValue(v);
162
200
  }
201
+ // eslint-disable-next-line deprecation/deprecation
163
202
  function valuesArrayFromJSON(json) {
203
+ // eslint-disable-next-line deprecation/deprecation
164
204
  return json.map(Value.fromJSON);
165
205
  }
206
+ // eslint-disable-next-line deprecation/deprecation
166
207
  function valuesArrayToJSON(values) {
208
+ // eslint-disable-next-line deprecation/deprecation
167
209
  return values.map(Value.toJSON);
168
210
  }
211
+ // eslint-disable-next-line deprecation/deprecation
169
212
  function valuesMapFromJSON(json) {
170
213
  const map = {};
171
214
  for (const key in json) {
172
215
  /* istanbul ignore else */
173
216
  if (json.hasOwnProperty(key)) {
217
+ // eslint-disable-next-line deprecation/deprecation
174
218
  map[key] = Value.fromJSON(json[key]);
175
219
  }
176
220
  }
177
221
  return map;
178
222
  }
223
+ // eslint-disable-next-line deprecation/deprecation
179
224
  function valuesMapToJSON(values) {
225
+ // eslint-disable-next-line deprecation/deprecation
180
226
  const map = {};
181
227
  for (const key in values) {
182
228
  /* istanbul ignore else */
183
229
  if (values.hasOwnProperty(key)) {
230
+ // eslint-disable-next-line deprecation/deprecation
184
231
  map[key] = Value.toJSON(values[key]);
185
232
  }
186
233
  }
187
234
  return map;
188
235
  }
236
+ // eslint-disable-next-line deprecation/deprecation
189
237
  function displayValuesArrayFromJSON(json) {
238
+ // eslint-disable-next-line deprecation/deprecation
190
239
  return json.map(DisplayValue.fromJSON);
191
240
  }
241
+ // eslint-disable-next-line deprecation/deprecation
192
242
  function displayValuesArrayToJSON(values) {
243
+ // eslint-disable-next-line deprecation/deprecation
193
244
  return values.map(DisplayValue.toJSON);
194
245
  }
246
+ // eslint-disable-next-line deprecation/deprecation
195
247
  function displayValuesMapFromJSON(json) {
196
248
  const map = {};
197
249
  for (const key in json) {
198
250
  /* istanbul ignore else */
199
251
  if (json.hasOwnProperty(key)) {
252
+ // eslint-disable-next-line deprecation/deprecation
200
253
  map[key] = DisplayValue.fromJSON(json[key]);
201
254
  }
202
255
  }
203
256
  return map;
204
257
  }
258
+ // eslint-disable-next-line deprecation/deprecation
205
259
  function displayValuesMapToJSON(values) {
260
+ // eslint-disable-next-line deprecation/deprecation
206
261
  const map = {};
207
262
  for (const key in values) {
208
263
  /* istanbul ignore else */
209
264
  if (values.hasOwnProperty(key)) {
265
+ // eslint-disable-next-line deprecation/deprecation
210
266
  map[key] = DisplayValue.toJSON(values[key]);
211
267
  }
212
268
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Value.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Value.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAmB,MAAM,OAAO,CAAC;AASrD,cAAc;AACd,MAAM,KAAW,KAAK,CA8CrB;AA9CD,WAAiB,KAAK;IACpB,+BAA+B;IAC/B,SAAgB,WAAW,CAAC,KAAY;QACtC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAFe,iBAAW,cAE1B,CAAA;IAED,4BAA4B;IAC5B,SAAgB,OAAO,CAAC,KAAY;QAClC,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAFe,aAAO,UAEtB,CAAA;IAED,kCAAkC;IAClC,SAAgB,KAAK,CAAC,KAAY;QAChC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAFe,WAAK,QAEpB,CAAA;IAED,0CAA0C;IAC1C,SAAgB,eAAe,CAAC,KAAY;QAC1C,OAAO,oBAAoB,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAFe,qBAAe,kBAE9B,CAAA;IAED,kCAAkC;IAClC,SAAgB,QAAQ,CAAC,IAAe;QACtC,IAAI,IAAI,KAAK,IAAI;YACf,OAAO,SAAS,CAAC;QACnB,IAAI,oBAAoB,CAAC,IAAI,CAAC;YAC5B,OAAO,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QAC/C,IAAI,YAAY,CAAC,IAAI,CAAC;YACpB,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,UAAU,CAAC,IAAI,CAAC;YAClB,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACjC,OAAO,IAAI,CAA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AC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;AACzC,CAAC;AACD,SAAS,wBAAwB,CAAC,MAA0B;IAC1D,OAAO,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC;AACD,SAAS,wBAAwB,CAAC,IAA0B;IAC1D,MAAM,GAAG,GAAqB,EAAE,CAAC;IACjC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACtB,0BAA0B;QAC1B,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC5B,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;SAC7C;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AACD,SAAS,sBAAsB,CAAC,MAAwB;IACtD,MAAM,GAAG,GAAyB,EAAE,CAAC;IACrC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,0BAA0B;QAC1B,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC9B,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;SAC7C;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC","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 Content\r\n */\r\n\r\nimport { InstanceKey, InstanceKeyJSON } from \"../EC\";\r\nimport { ValuesDictionary } from \"../Utils\";\r\n\r\n/**\r\n * Raw value type\r\n * @public\r\n */\r\nexport type Value = string | number | boolean | undefined | ValuesMap | ValuesArray | NestedContentValue[];\r\n\r\n/** @public */\r\nexport namespace Value { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** Is the value a primitive */\r\n export function isPrimitive(value: Value): value is string | number | boolean | undefined {\r\n return isPrimitiveValue(value);\r\n }\r\n\r\n /** Is the value an array */\r\n export function isArray(value: Value): value is ValuesArray {\r\n return isArrayValue(value);\r\n }\r\n\r\n /** Is the value a map / struct */\r\n export function isMap(value: Value): value is ValuesMap {\r\n return isMapValue(value);\r\n }\r\n\r\n /** Is the value a nested content value */\r\n export function isNestedContent(value: Value): value is NestedContentValue[] {\r\n return isNestedContentValue(value);\r\n }\r\n\r\n /** Serialize [[Value]] to JSON */\r\n export function fromJSON(json: ValueJSON): Value {\r\n if (json === null)\r\n return undefined;\r\n if (isNestedContentValue(json))\r\n return json.map(NestedContentValue.fromJSON);\r\n if (isArrayValue(json))\r\n return valuesArrayFromJSON(json);\r\n if (isMapValue(json))\r\n return valuesMapFromJSON(json);\r\n return json;\r\n }\r\n\r\n /** Deserialize [[Value]] from JSON */\r\n export function toJSON(value: Value): ValueJSON {\r\n if (undefined === value)\r\n return null;\r\n if (isNestedContentValue(value))\r\n return value.map(NestedContentValue.toJSON);\r\n if (isArrayValue(value))\r\n return valuesArrayToJSON(value);\r\n if (isMapValue(value))\r\n return valuesMapToJSON(value);\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * A map of raw values\r\n * @public\r\n */\r\nexport interface ValuesMap extends ValuesDictionary<Value> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * An array of raw values\r\n * @public\r\n */\r\nexport interface ValuesArray extends Array<Value> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * Display value type.\r\n * @public\r\n */\r\nexport type DisplayValue = string | undefined | DisplayValuesMap | DisplayValuesArray;\r\n\r\n/** @public */\r\nexport namespace DisplayValue { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** Is the value a primitive */\r\n export function isPrimitive(value: DisplayValue): value is string | undefined {\r\n return isPrimitiveValue(value);\r\n }\r\n\r\n /** Is the value an array */\r\n export function isArray(value: DisplayValue): value is DisplayValuesArray {\r\n return isArrayValue(value);\r\n }\r\n\r\n /** Is the value a map / struct */\r\n export function isMap(value: DisplayValue): value is DisplayValuesMap {\r\n return isMapValue(value);\r\n }\r\n\r\n /** Serialize [[DisplayValue]] to JSON */\r\n export function fromJSON(json: DisplayValueJSON): DisplayValue {\r\n if (json === null)\r\n return undefined;\r\n if (isArrayValue(json))\r\n return displayValuesArrayFromJSON(json);\r\n if (isMapValue(json))\r\n return displayValuesMapFromJSON(json);\r\n return json;\r\n }\r\n\r\n /** Deserialize [[DisplayValue]] from JSON */\r\n export function toJSON(value: DisplayValue): DisplayValueJSON {\r\n if (undefined === value)\r\n return null;\r\n if (isArrayValue(value))\r\n return displayValuesArrayToJSON(value);\r\n if (isMapValue(value))\r\n return displayValuesMapToJSON(value);\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * A map of display values\r\n * @public\r\n */\r\nexport interface DisplayValuesMap extends ValuesDictionary<DisplayValue> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * An array of display values\r\n * @public\r\n */\r\nexport interface DisplayValuesArray extends Array<DisplayValue> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * Data structure that describes nested content value.\r\n * @public\r\n */\r\nexport interface NestedContentValue {\r\n /** Keys of instances whose content is contained in this value */\r\n primaryKeys: InstanceKey[];\r\n /** Content values map */\r\n values: ValuesDictionary<Value>;\r\n /** Content display values map */\r\n displayValues: ValuesDictionary<DisplayValue>;\r\n /** Names of fields whose values are merged */\r\n mergedFieldNames: string[];\r\n}\r\n\r\n/** @public */\r\nexport namespace NestedContentValue {\r\n /** Serialize [[NestedContentValue]] to JSON */\r\n export function toJSON(json: NestedContentValue): NestedContentValueJSON {\r\n return {\r\n primaryKeys: json.primaryKeys.map(InstanceKey.toJSON),\r\n values: valuesMapToJSON(json.values),\r\n displayValues: displayValuesMapToJSON(json.displayValues),\r\n mergedFieldNames: json.mergedFieldNames,\r\n };\r\n }\r\n\r\n /** Deserialize [[NestedContentValue]] from JSON */\r\n export function fromJSON(json: NestedContentValueJSON): NestedContentValue {\r\n return {\r\n primaryKeys: json.primaryKeys.map(InstanceKey.fromJSON),\r\n values: valuesMapFromJSON(json.values),\r\n displayValues: displayValuesMapFromJSON(json.displayValues),\r\n mergedFieldNames: json.mergedFieldNames,\r\n };\r\n }\r\n}\r\n\r\n/**\r\n * JSON representation of [[Value]]\r\n * @public\r\n */\r\nexport type ValueJSON = string | number | boolean | null | ValuesMapJSON | ValuesArrayJSON | NestedContentValueJSON[];\r\n\r\n/**\r\n * JSON representation of [[ValuesMap]]\r\n * @public\r\n */\r\nexport interface ValuesMapJSON extends ValuesDictionary<ValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[ValuesArray]]\r\n * @public\r\n */\r\nexport interface ValuesArrayJSON extends Array<ValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[DisplayValue]]\r\n * @public\r\n */\r\nexport type DisplayValueJSON = string | null | DisplayValuesMapJSON | DisplayValuesArrayJSON;\r\n\r\n/**\r\n * JSON representation of [[DisplayValuesMap]]\r\n * @public\r\n */\r\nexport interface DisplayValuesMapJSON extends ValuesDictionary<DisplayValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[DisplayValuesArray]]\r\n * @public\r\n */\r\nexport interface DisplayValuesArrayJSON extends Array<DisplayValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[NestedContentValue]]\r\n * @public\r\n */\r\nexport interface NestedContentValueJSON {\r\n primaryKeys: InstanceKeyJSON[];\r\n values: ValuesDictionary<ValueJSON>;\r\n displayValues: ValuesDictionary<DisplayValueJSON>;\r\n mergedFieldNames: string[];\r\n}\r\n\r\n/**\r\n * A group of raw values and their common display value.\r\n * @public\r\n */\r\nexport interface DisplayValueGroup {\r\n /** Common display value for all grouped raw values */\r\n displayValue: DisplayValue;\r\n /** A list of grouped raw values */\r\n groupedRawValues: Value[];\r\n}\r\n\r\n/**\r\n * JSON representation of [[DisplayValueGroup]].\r\n * @public\r\n */\r\nexport interface DisplayValueGroupJSON {\r\n displayValue: DisplayValueJSON;\r\n groupedRawValues: ValueJSON[];\r\n}\r\n\r\n/** @public */\r\nexport namespace DisplayValueGroup {\r\n /** Serialize [[DisplayValueGroup]] to JSON */\r\n export function toJSON(group: DisplayValueGroup): DisplayValueGroupJSON {\r\n return {\r\n displayValue: DisplayValue.toJSON(group.displayValue),\r\n groupedRawValues: group.groupedRawValues.map(Value.toJSON),\r\n };\r\n }\r\n\r\n /** Deserialize [[DisplayValueGroup]] from JSON */\r\n export function fromJSON(json: DisplayValueGroupJSON): DisplayValueGroup {\r\n return {\r\n displayValue: DisplayValue.fromJSON(json.displayValue),\r\n groupedRawValues: json.groupedRawValues.map(Value.fromJSON),\r\n };\r\n }\r\n}\r\n\r\nfunction isNestedContentValue(v: Value | ValueJSON): v is NestedContentValue[] | NestedContentValueJSON[] {\r\n return (v !== undefined) && Array.isArray(v)\r\n && ((v.length === 0)\r\n || (v[0] as NestedContentValue).primaryKeys !== undefined\r\n && (v[0] as NestedContentValue).values !== undefined\r\n && (v[0] as NestedContentValue).displayValues !== undefined\r\n && (v[0] as NestedContentValue).mergedFieldNames !== undefined);\r\n}\r\nfunction isArrayValue(v: Value | ValueJSON | DisplayValue | DisplayValueJSON): v is ValuesArray | ValuesArrayJSON | DisplayValuesArray | DisplayValuesArrayJSON {\r\n // note: we don't guarantee by 100% that v is ValuesArray | DisplayValuesArray, but merely make compiler happy.\r\n // we have other means to determine the type of value.\r\n return (v !== undefined) && Array.isArray(v);\r\n}\r\nfunction isMapValue(v: Value | ValueJSON | DisplayValue | DisplayValueJSON): v is ValuesMap | ValuesMapJSON | DisplayValuesMap | DisplayValuesMapJSON {\r\n return (v !== undefined) && (typeof v === \"object\") && !Array.isArray(v);\r\n}\r\nfunction isPrimitiveValue(v: Value | DisplayValue): v is string | number | boolean | undefined {\r\n return !isArrayValue(v) && !isMapValue(v);\r\n}\r\n\r\nfunction valuesArrayFromJSON(json: ValuesArrayJSON): ValuesArray {\r\n return json.map(Value.fromJSON);\r\n}\r\nfunction valuesArrayToJSON(values: ValuesArray): ValuesArrayJSON {\r\n return values.map(Value.toJSON);\r\n}\r\nfunction valuesMapFromJSON(json: ValuesMapJSON): ValuesMap {\r\n const map: ValuesMap = {};\r\n for (const key in json) {\r\n /* istanbul ignore else */\r\n if (json.hasOwnProperty(key)) {\r\n map[key] = Value.fromJSON(json[key]);\r\n }\r\n }\r\n return map;\r\n}\r\nfunction valuesMapToJSON(values: ValuesMap): ValuesMapJSON {\r\n const map: ValuesMapJSON = {};\r\n for (const key in values) {\r\n /* istanbul ignore else */\r\n if (values.hasOwnProperty(key)) {\r\n map[key] = Value.toJSON(values[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n\r\nfunction displayValuesArrayFromJSON(json: DisplayValuesArrayJSON): DisplayValuesArray {\r\n return json.map(DisplayValue.fromJSON);\r\n}\r\nfunction displayValuesArrayToJSON(values: DisplayValuesArray): DisplayValuesArrayJSON {\r\n return values.map(DisplayValue.toJSON);\r\n}\r\nfunction displayValuesMapFromJSON(json: DisplayValuesMapJSON): DisplayValuesMap {\r\n const map: DisplayValuesMap = {};\r\n for (const key in json) {\r\n /* istanbul ignore else */\r\n if (json.hasOwnProperty(key)) {\r\n map[key] = DisplayValue.fromJSON(json[key]);\r\n }\r\n }\r\n return map;\r\n}\r\nfunction displayValuesMapToJSON(values: DisplayValuesMap): DisplayValuesMapJSON {\r\n const map: DisplayValuesMapJSON = {};\r\n for (const key in values) {\r\n /* istanbul ignore else */\r\n if (values.hasOwnProperty(key)) {\r\n map[key] = DisplayValue.toJSON(values[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n"]}
1
+ {"version":3,"file":"Value.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Value.ts"],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,QAAQ,CAAC,CAAC;AACzC,CAAC;AACD,mDAAmD;AACnD,SAAS,wBAAwB,CAAC,MAA0B;IAC1D,mDAAmD;IACnD,OAAO,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC;AACD,mDAAmD;AACnD,SAAS,wBAAwB,CAAC,IAA0B;IAC1D,MAAM,GAAG,GAAqB,EAAE,CAAC;IACjC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACtB,0BAA0B;QAC1B,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC5B,mDAAmD;YACnD,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;SAC7C;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AACD,mDAAmD;AACnD,SAAS,sBAAsB,CAAC,MAAwB;IACtD,mDAAmD;IACnD,MAAM,GAAG,GAAyB,EAAE,CAAC;IACrC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,0BAA0B;QAC1B,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC9B,mDAAmD;YACnD,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;SAC7C;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC","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 Content\r\n */\r\n\r\nimport { InstanceKey } from \"../EC\";\r\nimport { ValuesDictionary } from \"../Utils\";\r\n\r\n/**\r\n * Raw value type\r\n * @public\r\n */\r\nexport type Value = string | number | boolean | undefined | ValuesMap | ValuesArray | NestedContentValue[];\r\n\r\n/** @public */\r\nexport namespace Value { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** Is the value a primitive */\r\n export function isPrimitive(value: Value): value is string | number | boolean | undefined {\r\n return isPrimitiveValue(value);\r\n }\r\n\r\n /** Is the value an array */\r\n export function isArray(value: Value): value is ValuesArray {\r\n return isArrayValue(value);\r\n }\r\n\r\n /** Is the value a map / struct */\r\n export function isMap(value: Value): value is ValuesMap {\r\n return isMapValue(value);\r\n }\r\n\r\n /** Is the value a nested content value */\r\n export function isNestedContent(value: Value): value is NestedContentValue[] {\r\n return isNestedContentValue(value);\r\n }\r\n\r\n /**\r\n * Serialize [[Value]] to JSON\r\n * @deprecated in 3.x. Use [[Value]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: ValueJSON): Value {\r\n if (json === null)\r\n return undefined;\r\n if (isNestedContentValue(json))\r\n // eslint-disable-next-line deprecation/deprecation\r\n return json.map(NestedContentValue.fromJSON);\r\n if (isArrayValue(json))\r\n return valuesArrayFromJSON(json);\r\n if (isMapValue(json))\r\n return valuesMapFromJSON(json);\r\n return json;\r\n }\r\n\r\n /**\r\n * Deserialize [[Value]] from JSON\r\n * @deprecated in 3.x. Use [[Value]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(value: Value): ValueJSON {\r\n if (undefined === value)\r\n return null;\r\n if (isNestedContentValue(value))\r\n // eslint-disable-next-line deprecation/deprecation\r\n return value.map(NestedContentValue.toJSON);\r\n if (isArrayValue(value))\r\n return valuesArrayToJSON(value);\r\n if (isMapValue(value))\r\n return valuesMapToJSON(value);\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * A map of raw values\r\n * @public\r\n */\r\nexport interface ValuesMap extends ValuesDictionary<Value> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * An array of raw values\r\n * @public\r\n */\r\nexport interface ValuesArray extends Array<Value> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * Display value type.\r\n * @public\r\n */\r\nexport type DisplayValue = string | undefined | DisplayValuesMap | DisplayValuesArray;\r\n\r\n/** @public */\r\nexport namespace DisplayValue { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** Is the value a primitive */\r\n export function isPrimitive(value: DisplayValue): value is string | undefined {\r\n return isPrimitiveValue(value);\r\n }\r\n\r\n /** Is the value an array */\r\n export function isArray(value: DisplayValue): value is DisplayValuesArray {\r\n return isArrayValue(value);\r\n }\r\n\r\n /** Is the value a map / struct */\r\n export function isMap(value: DisplayValue): value is DisplayValuesMap {\r\n return isMapValue(value);\r\n }\r\n\r\n /**\r\n * Serialize [[DisplayValue]] to JSON\r\n * @deprecated in 3.x. Use [[DisplayValue]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: DisplayValueJSON): DisplayValue {\r\n if (json === null)\r\n return undefined;\r\n if (isArrayValue(json))\r\n return displayValuesArrayFromJSON(json);\r\n if (isMapValue(json))\r\n return displayValuesMapFromJSON(json);\r\n return json;\r\n }\r\n\r\n /**\r\n * Deserialize [[DisplayValue]] from JSON\r\n * @deprecated in 3.x. Use [[DisplayValue]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(value: DisplayValue): DisplayValueJSON {\r\n if (undefined === value)\r\n return null;\r\n if (isArrayValue(value))\r\n return displayValuesArrayToJSON(value);\r\n if (isMapValue(value))\r\n return displayValuesMapToJSON(value);\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * A map of display values\r\n * @public\r\n */\r\nexport interface DisplayValuesMap extends ValuesDictionary<DisplayValue> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * An array of display values\r\n * @public\r\n */\r\nexport interface DisplayValuesArray extends Array<DisplayValue> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * Data structure that describes nested content value.\r\n * @public\r\n */\r\nexport interface NestedContentValue {\r\n /** Keys of instances whose content is contained in this value */\r\n primaryKeys: InstanceKey[];\r\n /** Content values map */\r\n values: ValuesDictionary<Value>;\r\n /** Content display values map */\r\n displayValues: ValuesDictionary<DisplayValue>;\r\n /** Names of fields whose values are merged */\r\n mergedFieldNames: string[];\r\n}\r\n\r\n/** @public */\r\nexport namespace NestedContentValue {\r\n /**\r\n * Serialize [[NestedContentValue]] to JSON\r\n * @deprecated in 3.x. Use [[NestedContentValue]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(value: NestedContentValue): NestedContentValueJSON {\r\n return {\r\n ...value,\r\n values: valuesMapToJSON(value.values),\r\n displayValues: displayValuesMapToJSON(value.displayValues),\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[NestedContentValue]] from JSON\r\n * @deprecated in 3.x. Use [[NestedContentValue]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: NestedContentValueJSON): NestedContentValue {\r\n return {\r\n ...json,\r\n values: valuesMapFromJSON(json.values),\r\n displayValues: displayValuesMapFromJSON(json.displayValues),\r\n };\r\n }\r\n}\r\n\r\n/**\r\n * JSON representation of [[Value]]\r\n * @public\r\n * @deprecated in 3.x. Use [[Value]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport type ValueJSON = string | number | boolean | null | ValuesMapJSON | ValuesArrayJSON | NestedContentValueJSON[];\r\n/**\r\n * JSON representation of [[ValuesMap]]\r\n * @public\r\n * @deprecated in 3.x. Use [[ValuesMap]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport interface ValuesMapJSON extends ValuesDictionary<ValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[ValuesArray]]\r\n * @public\r\n * @deprecated in 3.x. Use [[ValuesArray]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport interface ValuesArrayJSON extends Array<ValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[DisplayValue]]\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValue]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport type DisplayValueJSON = string | null | DisplayValuesMapJSON | DisplayValuesArrayJSON;\r\n\r\n/**\r\n * JSON representation of [[DisplayValuesMap]]\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValuesMap]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport interface DisplayValuesMapJSON extends ValuesDictionary<DisplayValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[DisplayValuesArray]]\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValuesArray]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport interface DisplayValuesArrayJSON extends Array<DisplayValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[NestedContentValue]]\r\n * @public\r\n * @deprecated in 3.x. Use [[NestedContentValue]]\r\n */\r\nexport interface NestedContentValueJSON {\r\n primaryKeys: InstanceKey[];\r\n // eslint-disable-next-line deprecation/deprecation\r\n values: ValuesDictionary<ValueJSON>;\r\n // eslint-disable-next-line deprecation/deprecation\r\n displayValues: ValuesDictionary<DisplayValueJSON>;\r\n mergedFieldNames: string[];\r\n}\r\n\r\n/**\r\n * A group of raw values and their common display value.\r\n * @public\r\n */\r\nexport interface DisplayValueGroup {\r\n /** Common display value for all grouped raw values */\r\n displayValue: DisplayValue;\r\n /** A list of grouped raw values */\r\n groupedRawValues: Value[];\r\n}\r\n\r\n/**\r\n * JSON representation of [[DisplayValueGroup]].\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\r\n */\r\nexport interface DisplayValueGroupJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n displayValue: DisplayValueJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n groupedRawValues: ValueJSON[];\r\n}\r\n\r\n/** @public */\r\nexport namespace DisplayValueGroup {\r\n /**\r\n * Serialize [[DisplayValueGroup]] to JSON\r\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(group: DisplayValueGroup): DisplayValueGroupJSON {\r\n return {\r\n // eslint-disable-next-line deprecation/deprecation\r\n displayValue: DisplayValue.toJSON(group.displayValue),\r\n // eslint-disable-next-line deprecation/deprecation\r\n groupedRawValues: group.groupedRawValues.map(Value.toJSON),\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[DisplayValueGroup]] from JSON\r\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: DisplayValueGroupJSON): DisplayValueGroup {\r\n return {\r\n // eslint-disable-next-line deprecation/deprecation\r\n displayValue: DisplayValue.fromJSON(json.displayValue),\r\n // eslint-disable-next-line deprecation/deprecation\r\n groupedRawValues: json.groupedRawValues.map(Value.fromJSON),\r\n };\r\n }\r\n}\r\n\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction isNestedContentValue(v: Value | ValueJSON): v is NestedContentValue[] | NestedContentValueJSON[] {\r\n return (v !== undefined) && Array.isArray(v)\r\n && ((v.length === 0)\r\n || (v[0] as NestedContentValue).primaryKeys !== undefined\r\n && (v[0] as NestedContentValue).values !== undefined\r\n && (v[0] as NestedContentValue).displayValues !== undefined\r\n && (v[0] as NestedContentValue).mergedFieldNames !== undefined);\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction isArrayValue(v: Value | ValueJSON | DisplayValue | DisplayValueJSON): v is ValuesArray | ValuesArrayJSON | DisplayValuesArray | DisplayValuesArrayJSON {\r\n // note: we don't guarantee by 100% that v is ValuesArray | DisplayValuesArray, but merely make compiler happy.\r\n // we have other means to determine the type of value.\r\n return (v !== undefined) && Array.isArray(v);\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction isMapValue(v: Value | ValueJSON | DisplayValue | DisplayValueJSON): v is ValuesMap | ValuesMapJSON | DisplayValuesMap | DisplayValuesMapJSON {\r\n return (v !== undefined) && (typeof v === \"object\") && !Array.isArray(v);\r\n}\r\nfunction isPrimitiveValue(v: Value | DisplayValue): v is string | number | boolean | undefined {\r\n return !isArrayValue(v) && !isMapValue(v);\r\n}\r\n\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction valuesArrayFromJSON(json: ValuesArrayJSON): ValuesArray {\r\n // eslint-disable-next-line deprecation/deprecation\r\n return json.map(Value.fromJSON);\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction valuesArrayToJSON(values: ValuesArray): ValuesArrayJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n return values.map(Value.toJSON);\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction valuesMapFromJSON(json: ValuesMapJSON): ValuesMap {\r\n const map: ValuesMap = {};\r\n for (const key in json) {\r\n /* istanbul ignore else */\r\n if (json.hasOwnProperty(key)) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n map[key] = Value.fromJSON(json[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction valuesMapToJSON(values: ValuesMap): ValuesMapJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n const map: ValuesMapJSON = {};\r\n for (const key in values) {\r\n /* istanbul ignore else */\r\n if (values.hasOwnProperty(key)) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n map[key] = Value.toJSON(values[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction displayValuesArrayFromJSON(json: DisplayValuesArrayJSON): DisplayValuesArray {\r\n // eslint-disable-next-line deprecation/deprecation\r\n return json.map(DisplayValue.fromJSON);\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction displayValuesArrayToJSON(values: DisplayValuesArray): DisplayValuesArrayJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n return values.map(DisplayValue.toJSON);\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction displayValuesMapFromJSON(json: DisplayValuesMapJSON): DisplayValuesMap {\r\n const map: DisplayValuesMap = {};\r\n for (const key in json) {\r\n /* istanbul ignore else */\r\n if (json.hasOwnProperty(key)) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n map[key] = DisplayValue.fromJSON(json[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction displayValuesMapToJSON(values: DisplayValuesMap): DisplayValuesMapJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n const map: DisplayValuesMapJSON = {};\r\n for (const key in values) {\r\n /* istanbul ignore else */\r\n if (values.hasOwnProperty(key)) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n map[key] = DisplayValue.toJSON(values[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n"]}
@@ -0,0 +1,38 @@
1
+ /** @packageDocumentation
2
+ * @module Hierarchies
3
+ */
4
+ import { Node, NodeJSON } from "./Node";
5
+ /**
6
+ * Defines a hierarchy level that consists of an array of nodes and possibly other information.
7
+ * @beta
8
+ */
9
+ export interface HierarchyLevel {
10
+ /** A list of nodes in a hierarchy level. */
11
+ nodes: Node[];
12
+ /**
13
+ * Identifies whether the hierarchy level supports filtering. If not, requesting either a hierarchy level descriptor or
14
+ * a hierarchy level with [[HierarchyRequestOptions.instanceFilter]] will throw an error with [[PresentationStatus.InvalidArgument]] status.
15
+ */
16
+ supportsFiltering?: boolean;
17
+ }
18
+ /**
19
+ * JSON representation of [[HierarchyLevel]].
20
+ * @beta
21
+ * @deprecated in 3.x. Use [[HierarchyLevel]]
22
+ */
23
+ export interface HierarchyLevelJSON {
24
+ nodes: NodeJSON[];
25
+ supportsFiltering?: boolean;
26
+ }
27
+ /**
28
+ * Contains helper functions for working with objects of [[HierarchyLevel]] type.
29
+ * @beta
30
+ */
31
+ export declare namespace HierarchyLevel {
32
+ /**
33
+ * Deserialize [[HierarchyLevel]] from JSON
34
+ * @deprecated in 3.x. Use [[HierarchyLevel]].
35
+ */
36
+ function fromJSON(json: HierarchyLevelJSON): HierarchyLevel;
37
+ }
38
+ //# sourceMappingURL=HierarchyLevel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HierarchyLevel.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/HierarchyLevel.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAExC;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,4CAA4C;IAC5C,KAAK,EAAE,IAAI,EAAE,CAAC;IACd;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAEjC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;GAGG;AACH,yBAAiB,cAAc,CAAC;IAC9B;;;OAGG;IAEH,SAAgB,QAAQ,CAAC,IAAI,EAAE,kBAAkB,GAAG,cAAc,CAMjE;CACF"}
@@ -0,0 +1,29 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module Hierarchies
7
+ */
8
+ import { Node } from "./Node";
9
+ /**
10
+ * Contains helper functions for working with objects of [[HierarchyLevel]] type.
11
+ * @beta
12
+ */
13
+ export var HierarchyLevel;
14
+ (function (HierarchyLevel) {
15
+ /**
16
+ * Deserialize [[HierarchyLevel]] from JSON
17
+ * @deprecated in 3.x. Use [[HierarchyLevel]].
18
+ */
19
+ // eslint-disable-next-line deprecation/deprecation
20
+ function fromJSON(json) {
21
+ return {
22
+ ...json,
23
+ // eslint-disable-next-line deprecation/deprecation
24
+ nodes: json.nodes.map(Node.fromJSON),
25
+ };
26
+ }
27
+ HierarchyLevel.fromJSON = fromJSON;
28
+ })(HierarchyLevel || (HierarchyLevel = {}));
29
+ //# sourceMappingURL=HierarchyLevel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HierarchyLevel.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/HierarchyLevel.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAY,MAAM,QAAQ,CAAC;AA2BxC;;;GAGG;AACH,MAAM,KAAW,cAAc,CAa9B;AAbD,WAAiB,cAAc;IAC7B;;;OAGG;IACH,mDAAmD;IACnD,SAAgB,QAAQ,CAAC,IAAwB;QAC/C,OAAO;YACL,GAAG,IAAI;YACP,mDAAmD;YACnD,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;SACrC,CAAC;IACJ,CAAC;IANe,uBAAQ,WAMvB,CAAA;AACH,CAAC,EAbgB,cAAc,KAAd,cAAc,QAa9B","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 * Defines a hierarchy level that consists of an array of nodes and possibly other information.\r\n * @beta\r\n */\r\nexport interface HierarchyLevel {\r\n /** A list of nodes in a hierarchy level. */\r\n nodes: Node[];\r\n /**\r\n * Identifies whether the hierarchy level 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 */\r\n supportsFiltering?: boolean;\r\n}\r\n\r\n/**\r\n * JSON representation of [[HierarchyLevel]].\r\n * @beta\r\n * @deprecated in 3.x. Use [[HierarchyLevel]]\r\n */\r\nexport interface HierarchyLevelJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n nodes: NodeJSON[];\r\n supportsFiltering?: boolean;\r\n}\r\n\r\n/**\r\n * Contains helper functions for working with objects of [[HierarchyLevel]] type.\r\n * @beta\r\n */\r\nexport namespace HierarchyLevel {\r\n /**\r\n * Deserialize [[HierarchyLevel]] from JSON\r\n * @deprecated in 3.x. Use [[HierarchyLevel]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: HierarchyLevelJSON): HierarchyLevel {\r\n return {\r\n ...json,\r\n // eslint-disable-next-line deprecation/deprecation\r\n nodes: json.nodes.map(Node.fromJSON),\r\n };\r\n }\r\n}\r\n"]}