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

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 (578) hide show
  1. package/CHANGELOG.md +39 -1
  2. package/LICENSE.md +1 -1
  3. package/Ruleset.schema.json +236 -309
  4. package/lib/cjs/assets/locales/en/BisCore.json +18 -18
  5. package/lib/cjs/assets/locales/en/ECPresentation.json +9 -9
  6. package/lib/cjs/assets/locales/en/RulesEngine.json +5 -5
  7. package/lib/cjs/presentation-common/AsyncTasks.d.ts +22 -22
  8. package/lib/cjs/presentation-common/AsyncTasks.js +38 -38
  9. package/lib/cjs/presentation-common/AsyncTasks.js.map +1 -1
  10. package/lib/cjs/presentation-common/CommonLoggerCategory.d.ts +12 -12
  11. package/lib/cjs/presentation-common/CommonLoggerCategory.js +20 -20
  12. package/lib/cjs/presentation-common/CommonLoggerCategory.js.map +1 -1
  13. package/lib/cjs/presentation-common/Diagnostics.d.ts +125 -125
  14. package/lib/cjs/presentation-common/Diagnostics.js +72 -72
  15. package/lib/cjs/presentation-common/Diagnostics.js.map +1 -1
  16. package/lib/cjs/presentation-common/EC.d.ts +350 -315
  17. package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
  18. package/lib/cjs/presentation-common/EC.js +290 -270
  19. package/lib/cjs/presentation-common/EC.js.map +1 -1
  20. package/lib/cjs/presentation-common/ElementProperties.d.ts +123 -123
  21. package/lib/cjs/presentation-common/ElementProperties.js +9 -9
  22. package/lib/cjs/presentation-common/ElementProperties.js.map +1 -1
  23. package/lib/cjs/presentation-common/Error.d.ts +45 -45
  24. package/lib/cjs/presentation-common/Error.js +62 -62
  25. package/lib/cjs/presentation-common/Error.js.map +1 -1
  26. package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts +93 -59
  27. package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
  28. package/lib/cjs/presentation-common/InstanceFilterDefinition.js +9 -9
  29. package/lib/cjs/presentation-common/InstanceFilterDefinition.js.map +1 -1
  30. package/lib/cjs/presentation-common/KeySet.d.ts +146 -146
  31. package/lib/cjs/presentation-common/KeySet.d.ts.map +1 -1
  32. package/lib/cjs/presentation-common/KeySet.js +428 -423
  33. package/lib/cjs/presentation-common/KeySet.js.map +1 -1
  34. package/lib/cjs/presentation-common/LabelDefinition.d.ts +87 -79
  35. package/lib/cjs/presentation-common/LabelDefinition.d.ts.map +1 -1
  36. package/lib/cjs/presentation-common/LabelDefinition.js +73 -76
  37. package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
  38. package/lib/cjs/presentation-common/LocalizationHelper.d.ts +29 -29
  39. package/lib/cjs/presentation-common/LocalizationHelper.js +110 -110
  40. package/lib/cjs/presentation-common/LocalizationHelper.js.map +1 -1
  41. package/lib/cjs/presentation-common/PresentationIpcInterface.d.ts +40 -37
  42. package/lib/cjs/presentation-common/PresentationIpcInterface.d.ts.map +1 -1
  43. package/lib/cjs/presentation-common/PresentationIpcInterface.js +12 -12
  44. package/lib/cjs/presentation-common/PresentationIpcInterface.js.map +1 -1
  45. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts +261 -242
  46. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  47. package/lib/cjs/presentation-common/PresentationManagerOptions.js +23 -23
  48. package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
  49. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts +186 -181
  50. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  51. package/lib/cjs/presentation-common/PresentationRpcInterface.js +104 -102
  52. package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
  53. package/lib/cjs/presentation-common/RegisteredRuleset.d.ts +26 -26
  54. package/lib/cjs/presentation-common/RegisteredRuleset.js +33 -33
  55. package/lib/cjs/presentation-common/RegisteredRuleset.js.map +1 -1
  56. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts +83 -82
  57. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  58. package/lib/cjs/presentation-common/RpcRequestsHandler.js +171 -155
  59. package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
  60. package/lib/cjs/presentation-common/RulesetVariables.d.ts +171 -166
  61. package/lib/cjs/presentation-common/RulesetVariables.d.ts.map +1 -1
  62. package/lib/cjs/presentation-common/RulesetVariables.js +55 -55
  63. package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
  64. package/lib/cjs/presentation-common/RulesetsFactory.d.ts +44 -44
  65. package/lib/cjs/presentation-common/RulesetsFactory.js +223 -223
  66. package/lib/cjs/presentation-common/RulesetsFactory.js.map +1 -1
  67. package/lib/cjs/presentation-common/Update.d.ts +213 -194
  68. package/lib/cjs/presentation-common/Update.d.ts.map +1 -1
  69. package/lib/cjs/presentation-common/Update.js +226 -196
  70. package/lib/cjs/presentation-common/Update.js.map +1 -1
  71. package/lib/cjs/presentation-common/Utils.d.ts +62 -62
  72. package/lib/cjs/presentation-common/Utils.js +43 -43
  73. package/lib/cjs/presentation-common/Utils.js.map +1 -1
  74. package/lib/cjs/presentation-common/content/Category.d.ts +49 -49
  75. package/lib/cjs/presentation-common/content/Category.d.ts.map +1 -1
  76. package/lib/cjs/presentation-common/content/Category.js +48 -49
  77. package/lib/cjs/presentation-common/content/Category.js.map +1 -1
  78. package/lib/cjs/presentation-common/content/Content.d.ts +38 -38
  79. package/lib/cjs/presentation-common/content/Content.js +56 -56
  80. package/lib/cjs/presentation-common/content/Content.js.map +1 -1
  81. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts +271 -101
  82. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  83. package/lib/cjs/presentation-common/content/ContentTraverser.js +439 -420
  84. package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
  85. package/lib/cjs/presentation-common/content/Descriptor.d.ts +328 -275
  86. package/lib/cjs/presentation-common/content/Descriptor.d.ts.map +1 -1
  87. package/lib/cjs/presentation-common/content/Descriptor.js +193 -195
  88. package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
  89. package/lib/cjs/presentation-common/content/DisplayTypes.d.ts +21 -21
  90. package/lib/cjs/presentation-common/content/DisplayTypes.js +29 -29
  91. package/lib/cjs/presentation-common/content/DisplayTypes.js.map +1 -1
  92. package/lib/cjs/presentation-common/content/Editor.d.ts +15 -15
  93. package/lib/cjs/presentation-common/content/Editor.js +9 -9
  94. package/lib/cjs/presentation-common/content/Editor.js.map +1 -1
  95. package/lib/cjs/presentation-common/content/Fields.d.ts +301 -282
  96. package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
  97. package/lib/cjs/presentation-common/content/Fields.js +397 -394
  98. package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
  99. package/lib/cjs/presentation-common/content/Item.d.ts +85 -87
  100. package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
  101. package/lib/cjs/presentation-common/content/Item.js +84 -86
  102. package/lib/cjs/presentation-common/content/Item.js.map +1 -1
  103. package/lib/cjs/presentation-common/content/Property.d.ts +57 -51
  104. package/lib/cjs/presentation-common/content/Property.d.ts.map +1 -1
  105. package/lib/cjs/presentation-common/content/Property.js +40 -36
  106. package/lib/cjs/presentation-common/content/Property.js.map +1 -1
  107. package/lib/cjs/presentation-common/content/Renderer.d.ts +11 -11
  108. package/lib/cjs/presentation-common/content/Renderer.js +9 -9
  109. package/lib/cjs/presentation-common/content/Renderer.js.map +1 -1
  110. package/lib/cjs/presentation-common/content/TypeDescription.d.ts +72 -72
  111. package/lib/cjs/presentation-common/content/TypeDescription.js +23 -23
  112. package/lib/cjs/presentation-common/content/TypeDescription.js.map +1 -1
  113. package/lib/cjs/presentation-common/content/Value.d.ts +189 -157
  114. package/lib/cjs/presentation-common/content/Value.d.ts.map +1 -1
  115. package/lib/cjs/presentation-common/content/Value.js +273 -217
  116. package/lib/cjs/presentation-common/content/Value.js.map +1 -1
  117. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts +38 -0
  118. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -0
  119. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js +32 -0
  120. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -0
  121. package/lib/cjs/presentation-common/hierarchy/Key.d.ts +246 -185
  122. package/lib/cjs/presentation-common/hierarchy/Key.d.ts.map +1 -1
  123. package/lib/cjs/presentation-common/hierarchy/Key.js +121 -112
  124. package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
  125. package/lib/cjs/presentation-common/hierarchy/Node.d.ts +154 -141
  126. package/lib/cjs/presentation-common/hierarchy/Node.d.ts.map +1 -1
  127. package/lib/cjs/presentation-common/hierarchy/Node.js +106 -97
  128. package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
  129. package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts +96 -85
  130. package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
  131. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js +122 -98
  132. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  133. package/lib/cjs/presentation-common/rules/ClassSpecifications.d.ts +45 -45
  134. package/lib/cjs/presentation-common/rules/ClassSpecifications.js +9 -9
  135. package/lib/cjs/presentation-common/rules/ClassSpecifications.js.map +1 -1
  136. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.d.ts +31 -31
  137. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js +9 -9
  138. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
  139. package/lib/cjs/presentation-common/rules/RelationshipDirection.d.ts +13 -13
  140. package/lib/cjs/presentation-common/rules/RelationshipDirection.js +21 -21
  141. package/lib/cjs/presentation-common/rules/RelationshipDirection.js.map +1 -1
  142. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts +56 -53
  143. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts.map +1 -1
  144. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js +9 -9
  145. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  146. package/lib/cjs/presentation-common/rules/Rule.d.ts +76 -74
  147. package/lib/cjs/presentation-common/rules/Rule.d.ts.map +1 -1
  148. package/lib/cjs/presentation-common/rules/Rule.js +35 -35
  149. package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
  150. package/lib/cjs/presentation-common/rules/Ruleset.d.ts +65 -66
  151. package/lib/cjs/presentation-common/rules/Ruleset.d.ts.map +1 -1
  152. package/lib/cjs/presentation-common/rules/Ruleset.js +9 -9
  153. package/lib/cjs/presentation-common/rules/Ruleset.js.map +1 -1
  154. package/lib/cjs/presentation-common/rules/SchemasSpecification.d.ts +41 -41
  155. package/lib/cjs/presentation-common/rules/SchemasSpecification.js +9 -9
  156. package/lib/cjs/presentation-common/rules/SchemasSpecification.js.map +1 -1
  157. package/lib/cjs/presentation-common/rules/Variables.d.ts +58 -55
  158. package/lib/cjs/presentation-common/rules/Variables.d.ts.map +1 -1
  159. package/lib/cjs/presentation-common/rules/Variables.js +25 -25
  160. package/lib/cjs/presentation-common/rules/Variables.js.map +1 -1
  161. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +41 -41
  162. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts.map +1 -1
  163. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js +9 -9
  164. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  165. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +25 -25
  166. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts.map +1 -1
  167. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js +9 -9
  168. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  169. package/lib/cjs/presentation-common/rules/content/ContentRule.d.ts +30 -30
  170. package/lib/cjs/presentation-common/rules/content/ContentRule.d.ts.map +1 -1
  171. package/lib/cjs/presentation-common/rules/content/ContentRule.js +9 -9
  172. package/lib/cjs/presentation-common/rules/content/ContentRule.js.map +1 -1
  173. package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts +58 -55
  174. package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
  175. package/lib/cjs/presentation-common/rules/content/ContentSpecification.js +20 -20
  176. package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  177. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +19 -19
  178. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts.map +1 -1
  179. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js +9 -9
  180. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  181. package/lib/cjs/presentation-common/rules/content/PropertySpecification.d.ts +86 -86
  182. package/lib/cjs/presentation-common/rules/content/PropertySpecification.js +9 -9
  183. package/lib/cjs/presentation-common/rules/content/PropertySpecification.js.map +1 -1
  184. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +28 -28
  185. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts.map +1 -1
  186. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js +9 -9
  187. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  188. package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts +25 -25
  189. package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js +9 -9
  190. package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
  191. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.d.ts +57 -57
  192. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.d.ts.map +1 -1
  193. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js +9 -9
  194. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  195. package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.d.ts +17 -17
  196. package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js +9 -9
  197. package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
  198. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts +107 -107
  199. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js +9 -9
  200. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
  201. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +108 -105
  202. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts.map +1 -1
  203. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js +21 -21
  204. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  205. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +96 -93
  206. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts.map +1 -1
  207. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js +43 -43
  208. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  209. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts +44 -44
  210. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts.map +1 -1
  211. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js +9 -9
  212. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
  213. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts +36 -36
  214. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js +9 -9
  215. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  216. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.d.ts +27 -27
  217. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.d.ts.map +1 -1
  218. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js +9 -9
  219. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  220. package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts +207 -200
  221. package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
  222. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js +51 -51
  223. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  224. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts +29 -29
  225. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts.map +1 -1
  226. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js +9 -9
  227. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
  228. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts +158 -156
  229. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
  230. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js +25 -25
  231. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  232. package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts +40 -40
  233. package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts.map +1 -1
  234. package/lib/cjs/presentation-common/rules/customization/LabelOverride.js +9 -9
  235. package/lib/cjs/presentation-common/rules/customization/LabelOverride.js.map +1 -1
  236. package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts +58 -58
  237. package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts.map +1 -1
  238. package/lib/cjs/presentation-common/rules/customization/SortingRule.js +9 -9
  239. package/lib/cjs/presentation-common/rules/customization/SortingRule.js.map +1 -1
  240. package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts +48 -48
  241. package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts.map +1 -1
  242. package/lib/cjs/presentation-common/rules/customization/StyleOverride.js +9 -9
  243. package/lib/cjs/presentation-common/rules/customization/StyleOverride.js.map +1 -1
  244. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +14 -15
  245. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.d.ts.map +1 -1
  246. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js +9 -9
  247. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  248. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +98 -97
  249. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
  250. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js +21 -22
  251. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  252. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +31 -31
  253. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
  254. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js +9 -9
  255. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  256. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +79 -76
  257. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts.map +1 -1
  258. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js +19 -19
  259. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  260. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +39 -39
  261. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
  262. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js +9 -9
  263. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  264. package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.d.ts +50 -50
  265. package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js +9 -9
  266. package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
  267. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +27 -27
  268. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts.map +1 -1
  269. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js +9 -9
  270. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  271. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +27 -27
  272. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts.map +1 -1
  273. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js +9 -9
  274. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  275. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.d.ts +16 -17
  276. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.d.ts.map +1 -1
  277. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js +9 -9
  278. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  279. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.d.ts +35 -36
  280. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.d.ts.map +1 -1
  281. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js +9 -9
  282. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  283. package/lib/cjs/presentation-common/selection/SelectionScope.d.ts +38 -25
  284. package/lib/cjs/presentation-common/selection/SelectionScope.d.ts.map +1 -1
  285. package/lib/cjs/presentation-common/selection/SelectionScope.js +9 -9
  286. package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
  287. package/lib/cjs/presentation-common.d.ts +112 -111
  288. package/lib/cjs/presentation-common.d.ts.map +1 -1
  289. package/lib/cjs/presentation-common.js +128 -127
  290. package/lib/cjs/presentation-common.js.map +1 -1
  291. package/lib/esm/presentation-common/AsyncTasks.d.ts +22 -22
  292. package/lib/esm/presentation-common/AsyncTasks.js +34 -34
  293. package/lib/esm/presentation-common/AsyncTasks.js.map +1 -1
  294. package/lib/esm/presentation-common/CommonLoggerCategory.d.ts +12 -12
  295. package/lib/esm/presentation-common/CommonLoggerCategory.js +17 -17
  296. package/lib/esm/presentation-common/CommonLoggerCategory.js.map +1 -1
  297. package/lib/esm/presentation-common/Diagnostics.d.ts +125 -125
  298. package/lib/esm/presentation-common/Diagnostics.js +67 -67
  299. package/lib/esm/presentation-common/Diagnostics.js.map +1 -1
  300. package/lib/esm/presentation-common/EC.d.ts +350 -315
  301. package/lib/esm/presentation-common/EC.d.ts.map +1 -1
  302. package/lib/esm/presentation-common/EC.js +287 -267
  303. package/lib/esm/presentation-common/EC.js.map +1 -1
  304. package/lib/esm/presentation-common/ElementProperties.d.ts +123 -123
  305. package/lib/esm/presentation-common/ElementProperties.js +8 -8
  306. package/lib/esm/presentation-common/ElementProperties.js.map +1 -1
  307. package/lib/esm/presentation-common/Error.d.ts +45 -45
  308. package/lib/esm/presentation-common/Error.js +58 -58
  309. package/lib/esm/presentation-common/Error.js.map +1 -1
  310. package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts +93 -59
  311. package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
  312. package/lib/esm/presentation-common/InstanceFilterDefinition.js +8 -8
  313. package/lib/esm/presentation-common/InstanceFilterDefinition.js.map +1 -1
  314. package/lib/esm/presentation-common/KeySet.d.ts +146 -146
  315. package/lib/esm/presentation-common/KeySet.d.ts.map +1 -1
  316. package/lib/esm/presentation-common/KeySet.js +424 -419
  317. package/lib/esm/presentation-common/KeySet.js.map +1 -1
  318. package/lib/esm/presentation-common/LabelDefinition.d.ts +87 -79
  319. package/lib/esm/presentation-common/LabelDefinition.d.ts.map +1 -1
  320. package/lib/esm/presentation-common/LabelDefinition.js +70 -73
  321. package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
  322. package/lib/esm/presentation-common/LocalizationHelper.d.ts +29 -29
  323. package/lib/esm/presentation-common/LocalizationHelper.js +106 -106
  324. package/lib/esm/presentation-common/LocalizationHelper.js.map +1 -1
  325. package/lib/esm/presentation-common/PresentationIpcInterface.d.ts +40 -37
  326. package/lib/esm/presentation-common/PresentationIpcInterface.d.ts.map +1 -1
  327. package/lib/esm/presentation-common/PresentationIpcInterface.js +9 -9
  328. package/lib/esm/presentation-common/PresentationIpcInterface.js.map +1 -1
  329. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts +261 -242
  330. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  331. package/lib/esm/presentation-common/PresentationManagerOptions.js +18 -18
  332. package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
  333. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts +186 -181
  334. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  335. package/lib/esm/presentation-common/PresentationRpcInterface.js +100 -98
  336. package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
  337. package/lib/esm/presentation-common/RegisteredRuleset.d.ts +26 -26
  338. package/lib/esm/presentation-common/RegisteredRuleset.js +29 -29
  339. package/lib/esm/presentation-common/RegisteredRuleset.js.map +1 -1
  340. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts +83 -82
  341. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  342. package/lib/esm/presentation-common/RpcRequestsHandler.js +167 -151
  343. package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
  344. package/lib/esm/presentation-common/RulesetVariables.d.ts +171 -166
  345. package/lib/esm/presentation-common/RulesetVariables.d.ts.map +1 -1
  346. package/lib/esm/presentation-common/RulesetVariables.js +52 -52
  347. package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
  348. package/lib/esm/presentation-common/RulesetsFactory.d.ts +44 -44
  349. package/lib/esm/presentation-common/RulesetsFactory.js +219 -219
  350. package/lib/esm/presentation-common/RulesetsFactory.js.map +1 -1
  351. package/lib/esm/presentation-common/Update.d.ts +213 -194
  352. package/lib/esm/presentation-common/Update.d.ts.map +1 -1
  353. package/lib/esm/presentation-common/Update.js +223 -193
  354. package/lib/esm/presentation-common/Update.js.map +1 -1
  355. package/lib/esm/presentation-common/Utils.d.ts +62 -62
  356. package/lib/esm/presentation-common/Utils.js +39 -39
  357. package/lib/esm/presentation-common/Utils.js.map +1 -1
  358. package/lib/esm/presentation-common/content/Category.d.ts +49 -49
  359. package/lib/esm/presentation-common/content/Category.d.ts.map +1 -1
  360. package/lib/esm/presentation-common/content/Category.js +45 -46
  361. package/lib/esm/presentation-common/content/Category.js.map +1 -1
  362. package/lib/esm/presentation-common/content/Content.d.ts +38 -38
  363. package/lib/esm/presentation-common/content/Content.js +52 -52
  364. package/lib/esm/presentation-common/content/Content.js.map +1 -1
  365. package/lib/esm/presentation-common/content/ContentTraverser.d.ts +271 -101
  366. package/lib/esm/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  367. package/lib/esm/presentation-common/content/ContentTraverser.js +429 -411
  368. package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
  369. package/lib/esm/presentation-common/content/Descriptor.d.ts +328 -275
  370. package/lib/esm/presentation-common/content/Descriptor.d.ts.map +1 -1
  371. package/lib/esm/presentation-common/content/Descriptor.js +189 -191
  372. package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
  373. package/lib/esm/presentation-common/content/DisplayTypes.d.ts +21 -21
  374. package/lib/esm/presentation-common/content/DisplayTypes.js +26 -26
  375. package/lib/esm/presentation-common/content/DisplayTypes.js.map +1 -1
  376. package/lib/esm/presentation-common/content/Editor.d.ts +15 -15
  377. package/lib/esm/presentation-common/content/Editor.js +8 -8
  378. package/lib/esm/presentation-common/content/Editor.js.map +1 -1
  379. package/lib/esm/presentation-common/content/Fields.d.ts +301 -282
  380. package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
  381. package/lib/esm/presentation-common/content/Fields.js +390 -387
  382. package/lib/esm/presentation-common/content/Fields.js.map +1 -1
  383. package/lib/esm/presentation-common/content/Item.d.ts +85 -87
  384. package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
  385. package/lib/esm/presentation-common/content/Item.js +80 -82
  386. package/lib/esm/presentation-common/content/Item.js.map +1 -1
  387. package/lib/esm/presentation-common/content/Property.d.ts +57 -51
  388. package/lib/esm/presentation-common/content/Property.d.ts.map +1 -1
  389. package/lib/esm/presentation-common/content/Property.js +37 -33
  390. package/lib/esm/presentation-common/content/Property.js.map +1 -1
  391. package/lib/esm/presentation-common/content/Renderer.d.ts +11 -11
  392. package/lib/esm/presentation-common/content/Renderer.js +8 -8
  393. package/lib/esm/presentation-common/content/Renderer.js.map +1 -1
  394. package/lib/esm/presentation-common/content/TypeDescription.d.ts +72 -72
  395. package/lib/esm/presentation-common/content/TypeDescription.js +20 -20
  396. package/lib/esm/presentation-common/content/TypeDescription.js.map +1 -1
  397. package/lib/esm/presentation-common/content/Value.d.ts +189 -157
  398. package/lib/esm/presentation-common/content/Value.d.ts.map +1 -1
  399. package/lib/esm/presentation-common/content/Value.js +270 -214
  400. package/lib/esm/presentation-common/content/Value.js.map +1 -1
  401. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts +38 -0
  402. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -0
  403. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js +29 -0
  404. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -0
  405. package/lib/esm/presentation-common/hierarchy/Key.d.ts +246 -185
  406. package/lib/esm/presentation-common/hierarchy/Key.d.ts.map +1 -1
  407. package/lib/esm/presentation-common/hierarchy/Key.js +118 -109
  408. package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
  409. package/lib/esm/presentation-common/hierarchy/Node.d.ts +154 -141
  410. package/lib/esm/presentation-common/hierarchy/Node.d.ts.map +1 -1
  411. package/lib/esm/presentation-common/hierarchy/Node.js +103 -94
  412. package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
  413. package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts +96 -85
  414. package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
  415. package/lib/esm/presentation-common/hierarchy/NodePathElement.js +119 -95
  416. package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  417. package/lib/esm/presentation-common/rules/ClassSpecifications.d.ts +45 -45
  418. package/lib/esm/presentation-common/rules/ClassSpecifications.js +8 -8
  419. package/lib/esm/presentation-common/rules/ClassSpecifications.js.map +1 -1
  420. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.d.ts +31 -31
  421. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js +8 -8
  422. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
  423. package/lib/esm/presentation-common/rules/RelationshipDirection.d.ts +13 -13
  424. package/lib/esm/presentation-common/rules/RelationshipDirection.js +18 -18
  425. package/lib/esm/presentation-common/rules/RelationshipDirection.js.map +1 -1
  426. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts +56 -53
  427. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts.map +1 -1
  428. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js +8 -8
  429. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  430. package/lib/esm/presentation-common/rules/Rule.d.ts +76 -74
  431. package/lib/esm/presentation-common/rules/Rule.d.ts.map +1 -1
  432. package/lib/esm/presentation-common/rules/Rule.js +32 -32
  433. package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
  434. package/lib/esm/presentation-common/rules/Ruleset.d.ts +65 -66
  435. package/lib/esm/presentation-common/rules/Ruleset.d.ts.map +1 -1
  436. package/lib/esm/presentation-common/rules/Ruleset.js +8 -8
  437. package/lib/esm/presentation-common/rules/Ruleset.js.map +1 -1
  438. package/lib/esm/presentation-common/rules/SchemasSpecification.d.ts +41 -41
  439. package/lib/esm/presentation-common/rules/SchemasSpecification.js +8 -8
  440. package/lib/esm/presentation-common/rules/SchemasSpecification.js.map +1 -1
  441. package/lib/esm/presentation-common/rules/Variables.d.ts +58 -55
  442. package/lib/esm/presentation-common/rules/Variables.d.ts.map +1 -1
  443. package/lib/esm/presentation-common/rules/Variables.js +22 -22
  444. package/lib/esm/presentation-common/rules/Variables.js.map +1 -1
  445. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +41 -41
  446. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts.map +1 -1
  447. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js +8 -8
  448. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  449. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +25 -25
  450. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts.map +1 -1
  451. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js +8 -8
  452. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  453. package/lib/esm/presentation-common/rules/content/ContentRule.d.ts +30 -30
  454. package/lib/esm/presentation-common/rules/content/ContentRule.d.ts.map +1 -1
  455. package/lib/esm/presentation-common/rules/content/ContentRule.js +8 -8
  456. package/lib/esm/presentation-common/rules/content/ContentRule.js.map +1 -1
  457. package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts +58 -55
  458. package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
  459. package/lib/esm/presentation-common/rules/content/ContentSpecification.js +17 -17
  460. package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  461. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +19 -19
  462. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts.map +1 -1
  463. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js +8 -8
  464. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  465. package/lib/esm/presentation-common/rules/content/PropertySpecification.d.ts +86 -86
  466. package/lib/esm/presentation-common/rules/content/PropertySpecification.js +8 -8
  467. package/lib/esm/presentation-common/rules/content/PropertySpecification.js.map +1 -1
  468. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +28 -28
  469. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts.map +1 -1
  470. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js +8 -8
  471. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  472. package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts +25 -25
  473. package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js +8 -8
  474. package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
  475. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.d.ts +57 -57
  476. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.d.ts.map +1 -1
  477. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js +8 -8
  478. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  479. package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.d.ts +17 -17
  480. package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js +8 -8
  481. package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
  482. package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts +107 -107
  483. package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js +8 -8
  484. package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
  485. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +108 -105
  486. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts.map +1 -1
  487. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js +18 -18
  488. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  489. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +96 -93
  490. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts.map +1 -1
  491. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js +40 -40
  492. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  493. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts +44 -44
  494. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts.map +1 -1
  495. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js +8 -8
  496. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
  497. package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts +36 -36
  498. package/lib/esm/presentation-common/rules/customization/CustomizationRule.js +8 -8
  499. package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  500. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.d.ts +27 -27
  501. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.d.ts.map +1 -1
  502. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js +8 -8
  503. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  504. package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts +207 -200
  505. package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
  506. package/lib/esm/presentation-common/rules/customization/GroupingRule.js +48 -48
  507. package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  508. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts +29 -29
  509. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts.map +1 -1
  510. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js +8 -8
  511. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
  512. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts +158 -156
  513. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
  514. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js +22 -22
  515. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  516. package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts +40 -40
  517. package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts.map +1 -1
  518. package/lib/esm/presentation-common/rules/customization/LabelOverride.js +8 -8
  519. package/lib/esm/presentation-common/rules/customization/LabelOverride.js.map +1 -1
  520. package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts +58 -58
  521. package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts.map +1 -1
  522. package/lib/esm/presentation-common/rules/customization/SortingRule.js +8 -8
  523. package/lib/esm/presentation-common/rules/customization/SortingRule.js.map +1 -1
  524. package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts +48 -48
  525. package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts.map +1 -1
  526. package/lib/esm/presentation-common/rules/customization/StyleOverride.js +8 -8
  527. package/lib/esm/presentation-common/rules/customization/StyleOverride.js.map +1 -1
  528. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +14 -15
  529. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.d.ts.map +1 -1
  530. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js +8 -8
  531. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  532. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +98 -97
  533. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
  534. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js +18 -19
  535. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  536. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +31 -31
  537. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
  538. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js +8 -8
  539. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  540. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +79 -76
  541. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts.map +1 -1
  542. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js +16 -16
  543. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  544. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +39 -39
  545. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
  546. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js +8 -8
  547. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  548. package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.d.ts +50 -50
  549. package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js +8 -8
  550. package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
  551. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +27 -27
  552. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts.map +1 -1
  553. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js +8 -8
  554. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  555. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +27 -27
  556. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts.map +1 -1
  557. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js +8 -8
  558. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  559. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.d.ts +16 -17
  560. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.d.ts.map +1 -1
  561. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js +8 -8
  562. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  563. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.d.ts +35 -36
  564. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.d.ts.map +1 -1
  565. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js +8 -8
  566. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  567. package/lib/esm/presentation-common/selection/SelectionScope.d.ts +38 -25
  568. package/lib/esm/presentation-common/selection/SelectionScope.d.ts.map +1 -1
  569. package/lib/esm/presentation-common/selection/SelectionScope.js +8 -8
  570. package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
  571. package/lib/esm/presentation-common.d.ts +112 -111
  572. package/lib/esm/presentation-common.d.ts.map +1 -1
  573. package/lib/esm/presentation-common.js +116 -115
  574. package/lib/esm/presentation-common.js.map +1 -1
  575. package/lib/public/locales/en/BisCore.json +18 -18
  576. package/lib/public/locales/en/ECPresentation.json +9 -9
  577. package/lib/public/locales/en/RulesEngine.json +5 -5
  578. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"file":"ContentTraverser.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/ContentTraverser.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAe,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAIjE,OAAO,EAAE,KAAK,EAAsB,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,mBAAmB,EAAmB,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,YAAY,EAA4D,KAAK,EAA0B,MAAM,SAAS,CAAC;AA6FhI,gBAAgB;AAChB,MAAM,UAAU,sBAAsB,CAAC,SAAyB,EAAE,EAAkC;IAClG,IAAI,EAAE,CAAC,SAAS,CAAC;QACf,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,sBAAsB,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,CAAC;AAClG,CAAC;AAED,aAAa;AACb,MAAM,UAAU,eAAe,CAAC,OAAwB,EAAE,OAAgB;IACxE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC;QAC3D,OAAO;IAET,IAAI;QACF,MAAM,gBAAgB,GAAG,sBAAsB,CAAC,OAAO,CA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AAW,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC,gBAAgB,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,8CAA8C;IAC7P,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;AACnD,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 { assert, IDisposable, using } from \"@itwin/core-bentley\";\r\nimport { CategoryDescription } from \"./Category\";\r\nimport { Content } from \"./Content\";\r\nimport { Descriptor } from \"./Descriptor\";\r\nimport { Field, NestedContentField } from \"./Fields\";\r\nimport { Item } from \"./Item\";\r\nimport { PropertyValueFormat, TypeDescription } from \"./TypeDescription\";\r\nimport { DisplayValue, DisplayValuesArray, DisplayValuesMap, NestedContentValue, Value, ValuesArray, ValuesMap } from \"./Value\";\r\n\r\n/** @alpha */\r\nexport interface FieldHierarchy {\r\n field: Field;\r\n childFields: FieldHierarchy[];\r\n}\r\n\r\n/** @alpha */\r\nexport interface StartContentProps {\r\n descriptor: Descriptor;\r\n}\r\n\r\n/** @alpha */\r\nexport interface ProcessFieldHierarchiesProps {\r\n hierarchies: FieldHierarchy[];\r\n}\r\n\r\n/** @alpha */\r\nexport interface StartItemProps {\r\n item: Item;\r\n}\r\n\r\n/** @alpha */\r\nexport interface StartCategoryProps {\r\n category: CategoryDescription;\r\n}\r\n\r\n/** @alpha */\r\nexport interface StartFieldProps {\r\n hierarchy: FieldHierarchy;\r\n}\r\n\r\n/** @alpha */\r\nexport interface StartStructProps {\r\n hierarchy: FieldHierarchy;\r\n valueType: TypeDescription;\r\n namePrefix?: string;\r\n rawValues: ValuesMap;\r\n displayValues: DisplayValuesMap;\r\n}\r\n\r\n/** @alpha */\r\nexport interface StartArrayProps {\r\n hierarchy: FieldHierarchy;\r\n valueType: TypeDescription;\r\n namePrefix?: string;\r\n rawValues: ValuesArray;\r\n displayValues: DisplayValuesArray;\r\n}\r\n\r\n/** @alpha */\r\nexport interface ProcessMergedValueProps {\r\n mergedField: Field;\r\n requestedField: Field;\r\n namePrefix?: string;\r\n}\r\n\r\n/** @alpha */\r\nexport interface ProcessPrimitiveValueProps {\r\n field: Field;\r\n valueType: TypeDescription;\r\n namePrefix?: string;\r\n rawValue: Value;\r\n displayValue: DisplayValue;\r\n}\r\n\r\n/** @alpha */\r\nexport interface IContentVisitor {\r\n startContent(props: StartContentProps): boolean;\r\n finishContent(): void;\r\n\r\n processFieldHierarchies(props: ProcessFieldHierarchiesProps): void;\r\n\r\n startItem(props: StartItemProps): boolean;\r\n finishItem(): void;\r\n\r\n startCategory(props: StartCategoryProps): boolean;\r\n finishCategory(): void;\r\n\r\n startField(props: StartFieldProps): boolean;\r\n finishField(): void;\r\n\r\n startStruct(props: StartStructProps): boolean;\r\n finishStruct(): void;\r\n\r\n startArray(props: StartArrayProps): boolean;\r\n finishArray(): void;\r\n\r\n processMergedValue(props: ProcessMergedValueProps): void;\r\n processPrimitiveValue(props: ProcessPrimitiveValueProps): void;\r\n}\r\n\r\n/** @internal */\r\nexport function traverseFieldHierarchy(hierarchy: FieldHierarchy, cb: (h: FieldHierarchy) => boolean) {\r\n if (cb(hierarchy))\r\n hierarchy.childFields.forEach((childHierarchy) => traverseFieldHierarchy(childHierarchy, cb));\r\n}\r\n\r\n/** @alpha */\r\nexport function traverseContent(visitor: IContentVisitor, content: Content) {\r\n if (!visitor.startContent({ descriptor: content.descriptor }))\r\n return;\r\n\r\n try {\r\n const fieldHierarchies = createFieldHierarchies(content.descriptor.fields);\r\n visitor.processFieldHierarchies({ hierarchies: fieldHierarchies });\r\n content.contentSet.forEach((item) => {\r\n traverseContentItemFields(visitor, fieldHierarchies, item);\r\n });\r\n } finally {\r\n visitor.finishContent();\r\n }\r\n}\r\n\r\n/** @alpha */\r\nexport function traverseContentItem(visitor: IContentVisitor, descriptor: Descriptor, item: Item) {\r\n if (!visitor.startContent({ descriptor }))\r\n return;\r\n\r\n try {\r\n const fieldHierarchies = createFieldHierarchies(descriptor.fields);\r\n visitor.processFieldHierarchies({ hierarchies: fieldHierarchies });\r\n traverseContentItemFields(visitor, fieldHierarchies, item);\r\n } finally {\r\n visitor.finishContent();\r\n }\r\n}\r\n\r\nclass VisitedCategories implements IDisposable {\r\n private _visitedCategories: CategoryDescription[];\r\n private _didVisitAllHierarchy: boolean;\r\n constructor(private _visitor: IContentVisitor, category: CategoryDescription) {\r\n const stack: CategoryDescription[] = [];\r\n let curr: CategoryDescription | undefined = category;\r\n while (curr) {\r\n stack.push(curr);\r\n curr = curr.parent;\r\n }\r\n stack.reverse();\r\n\r\n this._didVisitAllHierarchy = true;\r\n this._visitedCategories = [];\r\n for (curr of stack) {\r\n if (this._visitor.startCategory({ category: curr })) {\r\n this._visitedCategories.push(curr);\r\n } else {\r\n this._didVisitAllHierarchy = false;\r\n break;\r\n }\r\n }\r\n }\r\n public dispose() {\r\n while (this._visitedCategories.pop())\r\n this._visitor.finishCategory();\r\n }\r\n public get shouldContinue(): boolean { return this._didVisitAllHierarchy; }\r\n}\r\n\r\nfunction traverseContentItemFields(visitor: IContentVisitor, fieldHierarchies: FieldHierarchy[], item: Item) {\r\n if (!visitor.startItem({ item }))\r\n return;\r\n\r\n try {\r\n fieldHierarchies.forEach((fieldHierarchy) => {\r\n using(new VisitedCategories(visitor, fieldHierarchy.field.category), (res) => {\r\n if (res.shouldContinue)\r\n traverseContentItemField(visitor, fieldHierarchy, item);\r\n });\r\n });\r\n } finally {\r\n visitor.finishItem();\r\n }\r\n}\r\n\r\nfunction traverseContentItemField(visitor: IContentVisitor, fieldHierarchy: FieldHierarchy, item: Item) {\r\n if (!visitor.startField({ hierarchy: fieldHierarchy }))\r\n return;\r\n\r\n try {\r\n const rootToThisField = createFieldPath(fieldHierarchy.field);\r\n let namePrefix: string | undefined;\r\n const pathUpToField = rootToThisField.slice(undefined, -1);\r\n for (let i = 0; i < pathUpToField.length; ++i) {\r\n const parentField = pathUpToField[i] as NestedContentField;\r\n const nextField = rootToThisField[i + 1];\r\n\r\n if (item.isFieldMerged(parentField.name)) {\r\n visitor.processMergedValue({ requestedField: fieldHierarchy.field, mergedField: parentField, namePrefix });\r\n return;\r\n }\r\n\r\n const { emptyNestedItem, convertedItem } = convertNestedContentItemToStructArrayItem(item, parentField, nextField);\r\n if (emptyNestedItem)\r\n return;\r\n\r\n item = convertedItem;\r\n namePrefix = applyOptionalPrefix(parentField.name, namePrefix);\r\n }\r\n\r\n if (item.isFieldMerged(fieldHierarchy.field.name)) {\r\n visitor.processMergedValue({ requestedField: fieldHierarchy.field, mergedField: fieldHierarchy.field, namePrefix });\r\n return;\r\n }\r\n\r\n if (fieldHierarchy.field.isNestedContentField()) {\r\n fieldHierarchy = convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy, namePrefix);\r\n const { emptyNestedItem, convertedItem } = convertNestedContentFieldHierarchyItemToStructArrayItem(item, fieldHierarchy);\r\n if (emptyNestedItem)\r\n return;\r\n item = convertedItem;\r\n } else if (pathUpToField.length > 0) {\r\n fieldHierarchy = {\r\n ...fieldHierarchy,\r\n field: Object.assign(fieldHierarchy.field.clone(), {\r\n type: {\r\n valueFormat: PropertyValueFormat.Array,\r\n typeName: `${fieldHierarchy.field.type.typeName}[]`,\r\n memberType: fieldHierarchy.field.type,\r\n },\r\n }),\r\n };\r\n }\r\n\r\n traverseContentItemFieldValue(visitor, fieldHierarchy, item.mergedFieldNames, fieldHierarchy.field.type, namePrefix, item.values[fieldHierarchy.field.name], item.displayValues[fieldHierarchy.field.name]);\r\n\r\n } finally {\r\n visitor.finishField();\r\n }\r\n}\r\n\r\nfunction traverseContentItemFieldValue(visitor: IContentVisitor, fieldHierarchy: FieldHierarchy, mergedFieldNames: string[], valueType: TypeDescription, namePrefix: string | undefined, rawValue: Value, displayValue: DisplayValue) {\r\n if (rawValue !== undefined) {\r\n if (valueType.valueFormat === PropertyValueFormat.Array) {\r\n assert(Value.isArray(rawValue));\r\n assert(DisplayValue.isArray(displayValue));\r\n return traverseContentItemArrayFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, namePrefix, rawValue, displayValue);\r\n }\r\n if (valueType.valueFormat === PropertyValueFormat.Struct) {\r\n assert(Value.isMap(rawValue));\r\n assert(DisplayValue.isMap(displayValue));\r\n return traverseContentItemStructFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, namePrefix, rawValue, displayValue);\r\n }\r\n }\r\n traverseContentItemPrimitiveFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, namePrefix, rawValue, displayValue);\r\n}\r\n\r\nfunction traverseContentItemArrayFieldValue(visitor: IContentVisitor, fieldHierarchy: FieldHierarchy, mergedFieldNames: string[], valueType: TypeDescription, namePrefix: string | undefined, rawValues: ValuesArray, displayValues: DisplayValuesArray) {\r\n assert(rawValues.length === displayValues.length);\r\n assert(valueType.valueFormat === PropertyValueFormat.Array);\r\n if (!visitor.startArray({ hierarchy: fieldHierarchy, valueType, namePrefix, rawValues, displayValues }))\r\n return;\r\n\r\n try {\r\n const itemType = valueType.memberType;\r\n rawValues.forEach((_, i) => {\r\n traverseContentItemFieldValue(visitor, fieldHierarchy, mergedFieldNames, itemType, namePrefix, rawValues[i], displayValues[i]);\r\n });\r\n } finally {\r\n visitor.finishArray();\r\n }\r\n}\r\n\r\nfunction traverseContentItemStructFieldValue(visitor: IContentVisitor, fieldHierarchy: FieldHierarchy, mergedFieldNames: string[], valueType: TypeDescription, namePrefix: string | undefined, rawValues: ValuesMap, displayValues: DisplayValuesMap) {\r\n assert(valueType.valueFormat === PropertyValueFormat.Struct);\r\n if (!visitor.startStruct({ hierarchy: fieldHierarchy, valueType, namePrefix, rawValues, displayValues }))\r\n return;\r\n\r\n try {\r\n if (fieldHierarchy.field.isNestedContentField())\r\n namePrefix = applyOptionalPrefix(fieldHierarchy.field.name, namePrefix);\r\n\r\n valueType.members.forEach((memberDescription) => {\r\n let memberField = fieldHierarchy.childFields.find((f) => f.field.name === memberDescription.name);\r\n if (!memberField) {\r\n // Not finding a member field means we're traversing an ECStruct. We still need to carry member information, so we\r\n // create a fake field to represent the member\r\n memberField = {\r\n field: new Field(fieldHierarchy.field.category, memberDescription.name, memberDescription.label, memberDescription.type, fieldHierarchy.field.isReadonly, 0),\r\n childFields: [],\r\n };\r\n }\r\n traverseContentItemFieldValue(visitor, memberField, mergedFieldNames, memberDescription.type, namePrefix, rawValues[memberDescription.name], displayValues[memberDescription.name]);\r\n });\r\n } finally {\r\n visitor.finishStruct();\r\n }\r\n}\r\n\r\nfunction traverseContentItemPrimitiveFieldValue(visitor: IContentVisitor, fieldHierarchy: FieldHierarchy, mergedFieldNames: string[], valueType: TypeDescription, namePrefix: string | undefined, rawValue: Value, displayValue: DisplayValue) {\r\n if (-1 !== mergedFieldNames.indexOf(fieldHierarchy.field.name)) {\r\n visitor.processMergedValue({ mergedField: fieldHierarchy.field, requestedField: fieldHierarchy.field, namePrefix });\r\n return;\r\n }\r\n\r\n visitor.processPrimitiveValue({ field: fieldHierarchy.field, valueType, namePrefix, rawValue, displayValue });\r\n}\r\n\r\n/**\r\n * `ignoreCategories` parameter enables adding all of the `nestedFields` to parent field's `childFields`\r\n * without considering categories.\r\n * @internal\r\n */\r\nexport function createFieldHierarchies(fields: Field[], ignoreCategories?: Boolean) {\r\n const hierarchies = new Array<FieldHierarchy>();\r\n const visitField = (category: CategoryDescription, field: Field, parentField: Field | undefined): FieldHierarchy | undefined => {\r\n let childFields: FieldHierarchy[] = [];\r\n if (field.isNestedContentField()) {\r\n // visit all nested fields\r\n childFields = visitFields(field.nestedFields, field);\r\n if (0 === childFields.length)\r\n return undefined;\r\n }\r\n const fieldHierarchy = { field, childFields };\r\n if (category === parentField?.category || ignoreCategories && parentField) {\r\n // if categories of this field and its parent field match - return the field hierarchy without\r\n // including it as a top level field\r\n return fieldHierarchy;\r\n }\r\n addFieldHierarchy(hierarchies, fieldHierarchy);\r\n return undefined;\r\n };\r\n const visitFields = (visitedFields: Field[], parentField: NestedContentField | undefined) => {\r\n const includedFields: FieldHierarchy[] = [];\r\n visitedFields.forEach((field) => {\r\n const visitedField = visitField(field.category, field, parentField);\r\n if (visitedField)\r\n includedFields.push(visitedField);\r\n });\r\n return includedFields;\r\n };\r\n visitFields(fields, undefined);\r\n return hierarchies;\r\n}\r\n\r\nfunction findRelatedFields(rootFields: FieldHierarchy[], hierarchy: FieldHierarchy) {\r\n // build a list of parent fields in hierarchy\r\n const fields: Field[] = [];\r\n let currField: Field | undefined = hierarchy.field;\r\n while (currField) {\r\n fields.push(currField);\r\n currField = currField.parent;\r\n }\r\n\r\n for (let rootIndex = 0; rootIndex < rootFields.length; ++rootIndex) {\r\n const rootFieldHierarchy = rootFields[rootIndex];\r\n if (rootFieldHierarchy.field.category !== hierarchy.field.category) {\r\n // only interested in fields with the same category\r\n continue;\r\n }\r\n\r\n let first = true;\r\n currField = rootFieldHierarchy.field;\r\n while (currField) {\r\n const index = fields.findIndex((f) => f.name === currField!.name);\r\n if (-1 !== index) {\r\n return {\r\n existing: {\r\n field: currField,\r\n hierarchy: first ? rootFieldHierarchy : undefined,\r\n index: rootIndex,\r\n },\r\n matchingField: fields[index]!,\r\n };\r\n }\r\n currField = currField.parent;\r\n first = false;\r\n }\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\nfunction buildParentHierarchy(hierarchy: FieldHierarchy, parentField: Field) {\r\n // note: parentField is found by walking up the parentship relationship\r\n // from hierarchy.field, so we expect to always find it here\r\n while (hierarchy.field !== parentField) {\r\n const hierarchyParent = hierarchy.field.parent;\r\n assert(hierarchyParent !== undefined);\r\n hierarchy = { field: hierarchyParent, childFields: [hierarchy] };\r\n }\r\n return hierarchy;\r\n}\r\n\r\nfunction mergeHierarchies(lhs: FieldHierarchy, rhs: FieldHierarchy) {\r\n assert(lhs.field.name === rhs.field.name);\r\n const result: FieldHierarchy = {\r\n field: lhs.field.clone(),\r\n childFields: [...lhs.childFields],\r\n };\r\n rhs.childFields.forEach((rhsChildHierarchy) => {\r\n const indexInResult = result.childFields.findIndex((resultHierarchy) => resultHierarchy.field.name === rhsChildHierarchy.field.name);\r\n if (indexInResult !== -1)\r\n result.childFields[indexInResult] = mergeHierarchies(result.childFields[indexInResult], rhsChildHierarchy);\r\n else\r\n result.childFields.push(rhsChildHierarchy);\r\n });\r\n return result;\r\n}\r\n\r\n/** @alpha */\r\nexport function addFieldHierarchy(rootHierarchies: FieldHierarchy[], hierarchy: FieldHierarchy): void {\r\n const match = findRelatedFields(rootHierarchies, hierarchy);\r\n if (!match) {\r\n rootHierarchies.push(hierarchy);\r\n return;\r\n }\r\n\r\n const targetHierarchy = rootHierarchies[match.existing.index];\r\n const existingHierarchy = match.existing.hierarchy ?? buildParentHierarchy(targetHierarchy, match.existing.field);\r\n const insertHierarchy = buildParentHierarchy(hierarchy, match.matchingField);\r\n const mergedHierarchy = mergeHierarchies(existingHierarchy, insertHierarchy);\r\n mergedHierarchy.field.category = hierarchy.field.category;\r\n rootHierarchies[match.existing.index] = mergedHierarchy;\r\n}\r\n\r\nfunction createFieldPath(field: Field): Field[] {\r\n const path = [field];\r\n let currField = field;\r\n while (currField.parent) {\r\n currField = currField.parent;\r\n path.push(currField);\r\n }\r\n path.reverse();\r\n return path;\r\n}\r\n\r\n/** @internal */\r\nexport const FIELD_NAMES_SEPARATOR = \"$\";\r\n/** @internal */\r\nexport function applyOptionalPrefix(str: string, prefix?: string) {\r\n return prefix ? `${prefix}${FIELD_NAMES_SEPARATOR}${str}` : str;\r\n}\r\n\r\ninterface NestedItemConversionResult {\r\n emptyNestedItem: boolean;\r\n convertedItem: Item;\r\n}\r\n\r\nfunction convertNestedContentItemToStructArrayItem(item: Readonly<Item>, field: Field, nextField: Field): NestedItemConversionResult {\r\n const value = item.values[field.name] ?? [];\r\n assert(Value.isNestedContent(value));\r\n if (value.length === 0)\r\n return { emptyNestedItem: true, convertedItem: item };\r\n\r\n const nextFieldValues: { raw: ValuesArray, display: DisplayValuesArray } = { raw: [], display: [] };\r\n value.forEach((ncv) => {\r\n const nextRawValue = ncv.values[nextField.name];\r\n const nextDisplayValue = ncv.displayValues[nextField.name];\r\n if (nextField.isNestedContentField()) {\r\n if (nextRawValue) {\r\n assert(Value.isNestedContent(nextRawValue));\r\n nextFieldValues.raw.push(...nextRawValue);\r\n }\r\n } else {\r\n nextFieldValues.raw.push(nextRawValue);\r\n nextFieldValues.display.push(nextDisplayValue);\r\n }\r\n });\r\n const convertedItem = new Item(item.primaryKeys, item.label, item.imageId, item.classInfo, { [nextField.name]: nextFieldValues.raw }, { [nextField.name]: nextFieldValues.display }, item.mergedFieldNames, item.extendedData); // eslint-disable-line deprecation/deprecation\r\n return { emptyNestedItem: false, convertedItem };\r\n}\r\n\r\nfunction convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy: FieldHierarchy, namePrefix: string | undefined) {\r\n const fieldName = fieldHierarchy.field.name;\r\n const convertedChildFieldHierarchies = fieldHierarchy.childFields.map((child) => {\r\n if (child.field.isNestedContentField())\r\n return convertNestedContentFieldHierarchyToStructArrayHierarchy(child, applyOptionalPrefix(fieldName, namePrefix));\r\n return child;\r\n });\r\n const convertedFieldHierarchy: FieldHierarchy = {\r\n field: Object.assign(fieldHierarchy.field.clone(), {\r\n type: {\r\n valueFormat: PropertyValueFormat.Array,\r\n typeName: `${fieldHierarchy.field.type.typeName}[]`,\r\n memberType: {\r\n valueFormat: PropertyValueFormat.Struct,\r\n typeName: fieldHierarchy.field.type.typeName,\r\n members: convertedChildFieldHierarchies.map((member) => ({\r\n name: member.field.name,\r\n label: member.field.label,\r\n type: member.field.type,\r\n })),\r\n },\r\n } as TypeDescription,\r\n }),\r\n childFields: convertedChildFieldHierarchies,\r\n };\r\n return convertedFieldHierarchy;\r\n}\r\n\r\nfunction convertNestedContentValuesToStructArrayValuesRecursive(fieldHierarchy: FieldHierarchy, ncvs: ReadonlyArray<NestedContentValue>) {\r\n const result: { raw: ValuesArray, display: DisplayValuesArray, mergedFieldNames: string[] } = { raw: [], display: [], mergedFieldNames: [] };\r\n ncvs.forEach((ncv) => {\r\n const values: ValuesMap = { ...ncv.values };\r\n const displayValues: DisplayValuesMap = { ...ncv.displayValues };\r\n const mergedFieldNames: string[] = [...ncv.mergedFieldNames];\r\n fieldHierarchy.childFields.forEach((childFieldHierarchy) => {\r\n const childFieldName = childFieldHierarchy.field.name;\r\n if (-1 !== ncv.mergedFieldNames.indexOf(childFieldName)) {\r\n return;\r\n }\r\n if (childFieldHierarchy.field.isNestedContentField()) {\r\n const value = values[childFieldName];\r\n assert(Value.isNestedContent(value));\r\n const convertedValues = convertNestedContentValuesToStructArrayValuesRecursive(childFieldHierarchy, value);\r\n values[childFieldName] = convertedValues.raw;\r\n displayValues[childFieldName] = convertedValues.display;\r\n mergedFieldNames.push(...convertedValues.mergedFieldNames);\r\n }\r\n });\r\n result.raw.push(values);\r\n result.display.push(displayValues);\r\n result.mergedFieldNames.push(...mergedFieldNames);\r\n });\r\n return result;\r\n}\r\n\r\nfunction convertNestedContentFieldHierarchyItemToStructArrayItem(item: Readonly<Item>, fieldHierarchy: FieldHierarchy): NestedItemConversionResult {\r\n const fieldName = fieldHierarchy.field.name;\r\n const rawValue = item.values[fieldName];\r\n assert(Value.isNestedContent(rawValue));\r\n if (rawValue.length === 0)\r\n return { emptyNestedItem: true, convertedItem: item };\r\n\r\n const converted = convertNestedContentValuesToStructArrayValuesRecursive(fieldHierarchy, rawValue);\r\n const convertedItem = new Item(item.primaryKeys, item.label, item.imageId, item.classInfo, { [fieldName]: converted.raw }, { [fieldName]: converted.display }, converted.mergedFieldNames, item.extendedData); // eslint-disable-line deprecation/deprecation\r\n return { emptyNestedItem: false, convertedItem };\r\n}\r\n"]}
1
+ {"version":3,"file":"ContentTraverser.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/ContentTraverser.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAe,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,KAAK,EAAsB,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,mBAAmB,EAAmB,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,YAAY,EAA4D,KAAK,EAA0B,MAAM,SAAS,CAAC;AA+OhI;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,SAAyB,EAAE,EAAkC;IAClG,IAAI,EAAE,CAAC,SAAS,CAAC;QACf,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,sBAAsB,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,CAAC;AAClG,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,OAAwB,EAAE,OAAgB;IACxE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC;QAC3D,OAAO;IAET,IAAI;QACF,MAAM,gBAAgB,GAAG,sBAAsB,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC3E,OAAO,CAAC,uBAAuB,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC,CAAC;QACnE,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YAClC,yBAAyB,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,CAAC,CAAC;QAC7D,CAAC,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AAC;AACnD,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\nimport { assert, IDisposable, using } from \"@itwin/core-bentley\";\nimport { CategoryDescription } from \"./Category\";\nimport { Content } from \"./Content\";\nimport { Descriptor } from \"./Descriptor\";\nimport { Field, NestedContentField } from \"./Fields\";\nimport { Item } from \"./Item\";\nimport { PropertyValueFormat, TypeDescription } from \"./TypeDescription\";\nimport { DisplayValue, DisplayValuesArray, DisplayValuesMap, NestedContentValue, Value, ValuesArray, ValuesMap } from \"./Value\";\n\n/**\n * A data structure to define a hierarchy of [[Field]] objects.\n * @public\n */\nexport interface FieldHierarchy {\n /** Parent field. */\n field: Field;\n /** Nested fields. */\n childFields: FieldHierarchy[];\n}\n\n/**\n * Props for the [[IContentVisitor.startContent]] call.\n * @public\n */\nexport interface StartContentProps {\n /** Descriptor of the visited content. */\n descriptor: Descriptor;\n}\n\n/**\n * Props for the [[IContentVisitor.processFieldHierarchies]] call.\n * @public\n */\nexport interface ProcessFieldHierarchiesProps {\n /**\n * The root list of fields, which may be mutated by the visitor to change order or the fields,\n * add new fields, etc.\n */\n hierarchies: FieldHierarchy[];\n}\n\n/**\n * Props for the [[IContentVisitor.startItem]] call.\n * @public\n */\nexport interface StartItemProps {\n /** The content item that's about to be visited. */\n item: Item;\n}\n\n/**\n * Props for the [[IContentVisitor.startCategory]] call.\n * @public\n */\nexport interface StartCategoryProps {\n /** The content category that's about to be visited. */\n category: CategoryDescription;\n}\n\n/**\n * Props for the [[IContentVisitor.startField]] call.\n * @public\n */\nexport interface StartFieldProps {\n /** The field that's about to be visited. */\n hierarchy: FieldHierarchy;\n}\n\n/**\n * Props for the [[IContentVisitor.startStruct]] call.\n * @public\n */\nexport interface StartStructProps {\n /** Field that describes the struct. */\n hierarchy: FieldHierarchy;\n /** Type of the struct. */\n valueType: TypeDescription;\n /** Name of the parent field (if there is one). */\n parentFieldName?: string;\n /** Member raw values. */\n rawValues: ValuesMap;\n /** Member display values. */\n displayValues: DisplayValuesMap;\n}\n\n/**\n * Props for the [[IContentVisitor.startArray]] call.\n * @public\n */\nexport interface StartArrayProps {\n /** Field that describes the array. */\n hierarchy: FieldHierarchy;\n /** Type of the array. */\n valueType: TypeDescription;\n /** Name of the parent field (if there is one). */\n parentFieldName?: string;\n /** Item raw values. */\n rawValues: ValuesArray;\n /** Item display values. */\n displayValues: DisplayValuesArray;\n}\n\n/**\n * Props for the [[IContentVisitor.processMergedValue]] call.\n * @public\n */\nexport interface ProcessMergedValueProps {\n /** The field whose values are merged. */\n mergedField: Field;\n /**\n * Generally this matches the [[mergedField]], but there are situations when a nested field is propagated\n * up to display it as if it wasn't nested its parent fields. In those cases, if one of the parent fields\n * is merged, the merged parent is going to be represented by [[mergedField]] and the field we wanted to\n * process is going to be represented by [[requestedField]].\n */\n requestedField: Field;\n /** Name of the parent field (if there is one). */\n parentFieldName?: string;\n}\n\n/**\n * Props for the [[IContentVisitor.processPrimitiveValue]] call.\n * @public\n */\nexport interface ProcessPrimitiveValueProps {\n /** Field whose value is being processed. */\n field: Field;\n /** Type of the value. */\n valueType: TypeDescription;\n /** Name of the parent field (if there is one). */\n parentFieldName?: string;\n /** Raw value. */\n rawValue: Value;\n /** Display value. */\n displayValue: DisplayValue;\n}\n\n/**\n * An interface for a visitor that can be passed to the [[traverseContent]] function\n * to be called on each piece of content.\n *\n * The order of calls when using the visitor with [[traverseContent]] or [[traverseContentItem]]:\n *\n * ```\n * startContent\n * processFieldHierarchies\n * for each content item:\n * startItem\n * for each field in root level:\n * for each category in field's category stack from root to field's category:\n * startCategory\n * startField\n * valueProcessing:\n * if item's value for this field is merged:\n * processMergedValue\n * else if the field is struct:\n * startStruct\n * for each struct member:\n * recurse into the valueProcessing step\n * finishStruct\n * else if the field is array:\n * startArray\n * for each array item:\n * recurse into the valueProcessing step\n * finishArray\n * else if the field is primitive:\n * processPrimitiveValue\n * finishField\n * finishItem\n * finishContent\n * ```\n * @public\n */\nexport interface IContentVisitor {\n /**\n * Called before starting [[Content]] processing. This is a good place to initialize various caches and prepare\n * for parsing content.\n *\n * Processing is skipped if the function returns `false` and [[finishContent]] is not called in that case.\n */\n startContent(props: StartContentProps): boolean;\n /** Called after processing of [[Content]] is complete. */\n finishContent(): void;\n\n /** Called to post-process field hierarchies after they're extracted from [[Descriptor]] in processed [[Content]]. */\n processFieldHierarchies(props: ProcessFieldHierarchiesProps): void;\n\n /**\n * Called before starting each [[Item]] processing. This is a good place to initialize for a new content item, e.g.\n * set up a new row in table.\n *\n * Processing is skipped if the function returns `false` and [[finishItem]] is not called in that case.\n */\n startItem(props: StartItemProps): boolean;\n /**\n * Called after processing of [[Item]] is complete. May be used to do any kind of post-processing after all\n * values for one content item have been processed.\n */\n finishItem(): void;\n\n /**\n * Called before processing a content item field ([[startField]] call) for each category in the field's\n * category stack, starting from the root and finishing with the field's category.\n *\n * Processing is skipped if the function returns `false` and [[finishCategory]] is not called in that case.\n */\n startCategory(props: StartCategoryProps): boolean;\n /** Called after processing of field is complete for every category in the field's category stack. */\n finishCategory(): void;\n\n /**\n * Called before starting [[Field]] processing for each individual [[Item]]. This is a good callback\n * to skip a field if it doesn't need to be handled.\n *\n * Processing is skipped if the function returns `false` and [[finishField]] is not called in that case.\n */\n startField(props: StartFieldProps): boolean;\n /** Called after processing of [[Field]] for individual [[Item]] is complete. */\n finishField(): void;\n\n /**\n * Called before processing a struct value. This is a good callback to skip handling the value or set up\n * for struct member values handling.\n *\n * Processing is skipped if the function returns `false` and [[finishStruct]] is not called in that case.\n */\n startStruct(props: StartStructProps): boolean;\n /** Called after processing of struct value is complete. */\n finishStruct(): void;\n\n /**\n * Called before processing an array value. This is a good callback to skip handling the value or set up\n * for array items handling.\n *\n * Processing is skipped if the function returns `false` and [[finishArray]] is not called in that case.\n */\n startArray(props: StartArrayProps): boolean;\n /** Called after processing of array value is complete. */\n finishArray(): void;\n\n /** Called to process a [merged value]($docs/presentation/content/Terminology.md#value-merging). */\n processMergedValue(props: ProcessMergedValueProps): void;\n /** Called to process a primitive value. */\n processPrimitiveValue(props: ProcessPrimitiveValueProps): void;\n}\n\n/**\n * An utility for traversing field hierarchy. Stops traversal as soon as `cb` returns `false`.\n * @public\n */\nexport function traverseFieldHierarchy(hierarchy: FieldHierarchy, cb: (h: FieldHierarchy) => boolean) {\n if (cb(hierarchy))\n hierarchy.childFields.forEach((childHierarchy) => traverseFieldHierarchy(childHierarchy, cb));\n}\n\n/**\n * An utility to traverse content using provided visitor. Provides means to parse content into different formats,\n * for different components.\n * @public\n */\nexport function traverseContent(visitor: IContentVisitor, content: Content) {\n if (!visitor.startContent({ descriptor: content.descriptor }))\n return;\n\n try {\n const fieldHierarchies = createFieldHierarchies(content.descriptor.fields);\n visitor.processFieldHierarchies({ hierarchies: fieldHierarchies });\n content.contentSet.forEach((item) => {\n traverseContentItemFields(visitor, fieldHierarchies, item);\n });\n } finally {\n visitor.finishContent();\n }\n}\n\n/**\n * An utility for calling [[traverseContent]] when there's only one content item.\n * @public\n */\nexport function traverseContentItem(visitor: IContentVisitor, descriptor: Descriptor, item: Item) {\n traverseContent(visitor, new Content(descriptor, [item]));\n}\n\nclass VisitedCategories implements IDisposable {\n private _visitedCategories: CategoryDescription[];\n private _didVisitAllHierarchy: boolean;\n constructor(private _visitor: IContentVisitor, category: CategoryDescription) {\n const stack: CategoryDescription[] = [];\n let curr: CategoryDescription | undefined = category;\n while (curr) {\n stack.push(curr);\n curr = curr.parent;\n }\n stack.reverse();\n\n this._didVisitAllHierarchy = true;\n this._visitedCategories = [];\n for (curr of stack) {\n if (this._visitor.startCategory({ category: curr })) {\n this._visitedCategories.push(curr);\n } else {\n this._didVisitAllHierarchy = false;\n break;\n }\n }\n }\n public dispose() {\n while (this._visitedCategories.pop())\n this._visitor.finishCategory();\n }\n public get shouldContinue(): boolean { return this._didVisitAllHierarchy; }\n}\n\nfunction traverseContentItemFields(visitor: IContentVisitor, fieldHierarchies: FieldHierarchy[], item: Item) {\n if (!visitor.startItem({ item }))\n return;\n\n try {\n fieldHierarchies.forEach((fieldHierarchy) => {\n using(new VisitedCategories(visitor, fieldHierarchy.field.category), (res) => {\n if (res.shouldContinue)\n traverseContentItemField(visitor, fieldHierarchy, item);\n });\n });\n } finally {\n visitor.finishItem();\n }\n}\n\nfunction traverseContentItemField(visitor: IContentVisitor, fieldHierarchy: FieldHierarchy, item: Item) {\n if (!visitor.startField({ hierarchy: fieldHierarchy }))\n return;\n\n try {\n const rootToThisField = createFieldPath(fieldHierarchy.field);\n let parentFieldName: string | undefined;\n const pathUpToField = rootToThisField.slice(undefined, -1);\n for (let i = 0; i < pathUpToField.length; ++i) {\n const parentField = pathUpToField[i] as NestedContentField;\n const nextField = rootToThisField[i + 1];\n\n if (item.isFieldMerged(parentField.name)) {\n visitor.processMergedValue({ requestedField: fieldHierarchy.field, mergedField: parentField, parentFieldName });\n return;\n }\n\n const { emptyNestedItem, convertedItem } = convertNestedContentItemToStructArrayItem(item, parentField, nextField);\n if (emptyNestedItem)\n return;\n\n item = convertedItem;\n parentFieldName = combineFieldNames(parentField.name, parentFieldName);\n }\n\n if (item.isFieldMerged(fieldHierarchy.field.name)) {\n visitor.processMergedValue({ requestedField: fieldHierarchy.field, mergedField: fieldHierarchy.field, parentFieldName });\n return;\n }\n\n if (fieldHierarchy.field.isNestedContentField()) {\n fieldHierarchy = convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy, parentFieldName);\n const { emptyNestedItem, convertedItem } = convertNestedContentFieldHierarchyItemToStructArrayItem(item, fieldHierarchy);\n if (emptyNestedItem)\n return;\n item = convertedItem;\n } else if (pathUpToField.length > 0) {\n fieldHierarchy = {\n ...fieldHierarchy,\n field: Object.assign(fieldHierarchy.field.clone(), {\n type: {\n valueFormat: PropertyValueFormat.Array,\n typeName: `${fieldHierarchy.field.type.typeName}[]`,\n memberType: fieldHierarchy.field.type,\n },\n }),\n };\n }\n\n traverseContentItemFieldValue(visitor, fieldHierarchy, item.mergedFieldNames, fieldHierarchy.field.type, parentFieldName, item.values[fieldHierarchy.field.name], item.displayValues[fieldHierarchy.field.name]);\n\n } finally {\n visitor.finishField();\n }\n}\n\nfunction traverseContentItemFieldValue(visitor: IContentVisitor, fieldHierarchy: FieldHierarchy, mergedFieldNames: string[], valueType: TypeDescription, parentFieldName: string | undefined, rawValue: Value, displayValue: DisplayValue) {\n if (rawValue !== undefined) {\n if (valueType.valueFormat === PropertyValueFormat.Array) {\n assert(Value.isArray(rawValue));\n assert(DisplayValue.isArray(displayValue));\n return traverseContentItemArrayFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValue, displayValue);\n }\n if (valueType.valueFormat === PropertyValueFormat.Struct) {\n assert(Value.isMap(rawValue));\n assert(DisplayValue.isMap(displayValue));\n return traverseContentItemStructFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValue, displayValue);\n }\n }\n traverseContentItemPrimitiveFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValue, displayValue);\n}\n\nfunction traverseContentItemArrayFieldValue(visitor: IContentVisitor, fieldHierarchy: FieldHierarchy, mergedFieldNames: string[], valueType: TypeDescription, parentFieldName: string | undefined, rawValues: ValuesArray, displayValues: DisplayValuesArray) {\n assert(rawValues.length === displayValues.length);\n assert(valueType.valueFormat === PropertyValueFormat.Array);\n if (!visitor.startArray({ hierarchy: fieldHierarchy, valueType, parentFieldName, rawValues, displayValues }))\n return;\n\n try {\n const itemType = valueType.memberType;\n rawValues.forEach((_, i) => {\n traverseContentItemFieldValue(visitor, fieldHierarchy, mergedFieldNames, itemType, parentFieldName, rawValues[i], displayValues[i]);\n });\n } finally {\n visitor.finishArray();\n }\n}\n\nfunction traverseContentItemStructFieldValue(visitor: IContentVisitor, fieldHierarchy: FieldHierarchy, mergedFieldNames: string[], valueType: TypeDescription, parentFieldName: string | undefined, rawValues: ValuesMap, displayValues: DisplayValuesMap) {\n assert(valueType.valueFormat === PropertyValueFormat.Struct);\n if (!visitor.startStruct({ hierarchy: fieldHierarchy, valueType, parentFieldName, rawValues, displayValues }))\n return;\n\n try {\n if (fieldHierarchy.field.isNestedContentField())\n parentFieldName = combineFieldNames(fieldHierarchy.field.name, parentFieldName);\n\n valueType.members.forEach((memberDescription) => {\n let memberField = fieldHierarchy.childFields.find((f) => f.field.name === memberDescription.name);\n if (!memberField) {\n // Not finding a member field means we're traversing an ECStruct. We still need to carry member information, so we\n // create a fake field to represent the member\n memberField = {\n field: new Field(fieldHierarchy.field.category, memberDescription.name, memberDescription.label, memberDescription.type, fieldHierarchy.field.isReadonly, 0),\n childFields: [],\n };\n }\n traverseContentItemFieldValue(visitor, memberField, mergedFieldNames, memberDescription.type, parentFieldName, rawValues[memberDescription.name], displayValues[memberDescription.name]);\n });\n } finally {\n visitor.finishStruct();\n }\n}\n\nfunction traverseContentItemPrimitiveFieldValue(visitor: IContentVisitor, fieldHierarchy: FieldHierarchy, mergedFieldNames: string[], valueType: TypeDescription, parentFieldName: string | undefined, rawValue: Value, displayValue: DisplayValue) {\n if (-1 !== mergedFieldNames.indexOf(fieldHierarchy.field.name)) {\n visitor.processMergedValue({ mergedField: fieldHierarchy.field, requestedField: fieldHierarchy.field, parentFieldName });\n return;\n }\n\n visitor.processPrimitiveValue({ field: fieldHierarchy.field, valueType, parentFieldName, rawValue, displayValue });\n}\n\n/**\n * Parses a list of [[Field]] objects into a list of [[FieldHierarchy]].\n *\n * @param ignoreCategories Enables adding all of the `nestedFields` to parent field's `childFields`\n * without considering categories.\n *\n * @public\n */\nexport function createFieldHierarchies(fields: Field[], ignoreCategories?: Boolean) {\n const hierarchies = new Array<FieldHierarchy>();\n const visitField = (category: CategoryDescription, field: Field, parentField: Field | undefined): FieldHierarchy | undefined => {\n let childFields: FieldHierarchy[] = [];\n if (field.isNestedContentField()) {\n // visit all nested fields\n childFields = visitFields(field.nestedFields, field);\n if (0 === childFields.length)\n return undefined;\n }\n const fieldHierarchy = { field, childFields };\n if (category === parentField?.category || ignoreCategories && parentField) {\n // if categories of this field and its parent field match - return the field hierarchy without\n // including it as a top level field\n return fieldHierarchy;\n }\n addFieldHierarchy(hierarchies, fieldHierarchy);\n return undefined;\n };\n const visitFields = (visitedFields: Field[], parentField: NestedContentField | undefined) => {\n const includedFields: FieldHierarchy[] = [];\n visitedFields.forEach((field) => {\n const visitedField = visitField(field.category, field, parentField);\n if (visitedField)\n includedFields.push(visitedField);\n });\n return includedFields;\n };\n visitFields(fields, undefined);\n return hierarchies;\n}\n\nfunction findRelatedFields(rootFields: FieldHierarchy[], hierarchy: FieldHierarchy) {\n // build a list of parent fields in hierarchy\n const fields: Field[] = [];\n let currField: Field | undefined = hierarchy.field;\n while (currField) {\n fields.push(currField);\n currField = currField.parent;\n }\n\n for (let rootIndex = 0; rootIndex < rootFields.length; ++rootIndex) {\n const rootFieldHierarchy = rootFields[rootIndex];\n if (rootFieldHierarchy.field.category !== hierarchy.field.category) {\n // only interested in fields with the same category\n continue;\n }\n\n let first = true;\n currField = rootFieldHierarchy.field;\n while (currField) {\n const index = fields.findIndex((f) => f.name === currField!.name);\n if (-1 !== index) {\n return {\n existing: {\n field: currField,\n hierarchy: first ? rootFieldHierarchy : undefined,\n index: rootIndex,\n },\n matchingField: fields[index]!,\n };\n }\n currField = currField.parent;\n first = false;\n }\n }\n\n return undefined;\n}\n\nfunction buildParentHierarchy(hierarchy: FieldHierarchy, parentField: Field) {\n // note: parentField is found by walking up the parentship relationship\n // from hierarchy.field, so we expect to always find it here\n while (hierarchy.field !== parentField) {\n const hierarchyParent = hierarchy.field.parent;\n assert(hierarchyParent !== undefined);\n hierarchy = { field: hierarchyParent, childFields: [hierarchy] };\n }\n return hierarchy;\n}\n\nfunction mergeHierarchies(lhs: FieldHierarchy, rhs: FieldHierarchy) {\n assert(lhs.field.name === rhs.field.name);\n const result: FieldHierarchy = {\n field: lhs.field.clone(),\n childFields: [...lhs.childFields],\n };\n rhs.childFields.forEach((rhsChildHierarchy) => {\n const indexInResult = result.childFields.findIndex((resultHierarchy) => resultHierarchy.field.name === rhsChildHierarchy.field.name);\n if (indexInResult !== -1)\n result.childFields[indexInResult] = mergeHierarchies(result.childFields[indexInResult], rhsChildHierarchy);\n else\n result.childFields.push(rhsChildHierarchy);\n });\n return result;\n}\n\n/**\n * Adds a field hierarchy into root field hierarchies list. *\n * @public\n */\nexport function addFieldHierarchy(rootHierarchies: FieldHierarchy[], hierarchy: FieldHierarchy): void {\n const match = findRelatedFields(rootHierarchies, hierarchy);\n if (!match) {\n rootHierarchies.push(hierarchy);\n return;\n }\n\n const targetHierarchy = rootHierarchies[match.existing.index];\n const existingHierarchy = match.existing.hierarchy ?? buildParentHierarchy(targetHierarchy, match.existing.field);\n const insertHierarchy = buildParentHierarchy(hierarchy, match.matchingField);\n const mergedHierarchy = mergeHierarchies(existingHierarchy, insertHierarchy);\n mergedHierarchy.field.category = hierarchy.field.category;\n rootHierarchies[match.existing.index] = mergedHierarchy;\n}\n\nfunction createFieldPath(field: Field): Field[] {\n const path = [field];\n let currField = field;\n while (currField.parent) {\n currField = currField.parent;\n path.push(currField);\n }\n path.reverse();\n return path;\n}\n\n/** @internal */\nexport const FIELD_NAMES_SEPARATOR = \"$\";\n/**\n * Combines given field names in a way that allows them to be parsed back into a list of individual names using the [[parseCombinedFieldNames]] function.\n * @public\n */\nexport function combineFieldNames(fieldName: string, parentFieldName?: string) {\n return parentFieldName ? `${parentFieldName}${FIELD_NAMES_SEPARATOR}${fieldName}` : fieldName;\n}\n/**\n * Parses given combined field names string, constructed using [[combineFieldNames]], into a list of individual field names.\n * @public\n */\nexport function parseCombinedFieldNames(combinedName: string) {\n return combinedName ? combinedName.split(FIELD_NAMES_SEPARATOR) : [];\n}\n\ninterface NestedItemConversionResult {\n emptyNestedItem: boolean;\n convertedItem: Item;\n}\n\nfunction convertNestedContentItemToStructArrayItem(item: Readonly<Item>, field: Field, nextField: Field): NestedItemConversionResult {\n const value = item.values[field.name] ?? [];\n assert(Value.isNestedContent(value));\n if (value.length === 0)\n return { emptyNestedItem: true, convertedItem: item };\n\n const nextFieldValues: { raw: ValuesArray, display: DisplayValuesArray } = { raw: [], display: [] };\n value.forEach((ncv) => {\n const nextRawValue = ncv.values[nextField.name];\n const nextDisplayValue = ncv.displayValues[nextField.name];\n if (nextField.isNestedContentField()) {\n if (nextRawValue) {\n assert(Value.isNestedContent(nextRawValue));\n nextFieldValues.raw.push(...nextRawValue);\n }\n } else {\n nextFieldValues.raw.push(nextRawValue);\n nextFieldValues.display.push(nextDisplayValue);\n }\n });\n const convertedItem = new Item(item.primaryKeys, item.label, item.imageId, item.classInfo, { [nextField.name]: nextFieldValues.raw }, { [nextField.name]: nextFieldValues.display }, item.mergedFieldNames, item.extendedData); // eslint-disable-line deprecation/deprecation\n return { emptyNestedItem: false, convertedItem };\n}\n\nfunction convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy: FieldHierarchy, parentFieldName: string | undefined) {\n const fieldName = fieldHierarchy.field.name;\n const convertedChildFieldHierarchies = fieldHierarchy.childFields.map((child) => {\n if (child.field.isNestedContentField())\n return convertNestedContentFieldHierarchyToStructArrayHierarchy(child, combineFieldNames(fieldName, parentFieldName));\n return child;\n });\n const convertedFieldHierarchy: FieldHierarchy = {\n field: Object.assign(fieldHierarchy.field.clone(), {\n type: {\n valueFormat: PropertyValueFormat.Array,\n typeName: `${fieldHierarchy.field.type.typeName}[]`,\n memberType: {\n valueFormat: PropertyValueFormat.Struct,\n typeName: fieldHierarchy.field.type.typeName,\n members: convertedChildFieldHierarchies.map((member) => ({\n name: member.field.name,\n label: member.field.label,\n type: member.field.type,\n })),\n },\n } as TypeDescription,\n }),\n childFields: convertedChildFieldHierarchies,\n };\n return convertedFieldHierarchy;\n}\n\nfunction convertNestedContentValuesToStructArrayValuesRecursive(fieldHierarchy: FieldHierarchy, ncvs: ReadonlyArray<NestedContentValue>) {\n const result: { raw: ValuesArray, display: DisplayValuesArray, mergedFieldNames: string[] } = { raw: [], display: [], mergedFieldNames: [] };\n ncvs.forEach((ncv) => {\n const values: ValuesMap = { ...ncv.values };\n const displayValues: DisplayValuesMap = { ...ncv.displayValues };\n const mergedFieldNames: string[] = [...ncv.mergedFieldNames];\n fieldHierarchy.childFields.forEach((childFieldHierarchy) => {\n const childFieldName = childFieldHierarchy.field.name;\n if (-1 !== ncv.mergedFieldNames.indexOf(childFieldName)) {\n return;\n }\n if (childFieldHierarchy.field.isNestedContentField()) {\n const value = values[childFieldName];\n assert(Value.isNestedContent(value));\n const convertedValues = convertNestedContentValuesToStructArrayValuesRecursive(childFieldHierarchy, value);\n values[childFieldName] = convertedValues.raw;\n displayValues[childFieldName] = convertedValues.display;\n mergedFieldNames.push(...convertedValues.mergedFieldNames);\n }\n });\n result.raw.push(values);\n result.display.push(displayValues);\n result.mergedFieldNames.push(...mergedFieldNames);\n });\n return result;\n}\n\nfunction convertNestedContentFieldHierarchyItemToStructArrayItem(item: Readonly<Item>, fieldHierarchy: FieldHierarchy): NestedItemConversionResult {\n const fieldName = fieldHierarchy.field.name;\n const rawValue = item.values[fieldName];\n assert(Value.isNestedContent(rawValue));\n if (rawValue.length === 0)\n return { emptyNestedItem: true, convertedItem: item };\n\n const converted = convertNestedContentValuesToStructArrayValuesRecursive(fieldHierarchy, rawValue);\n const convertedItem = new Item(item.primaryKeys, item.label, item.imageId, item.classInfo, { [fieldName]: converted.raw }, { [fieldName]: converted.display }, converted.mergedFieldNames, item.extendedData); // eslint-disable-line deprecation/deprecation\n return { emptyNestedItem: false, convertedItem };\n}\n"]}