@itwin/presentation-common 4.5.0-dev.2 → 4.5.0-dev.21

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 (393) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/LICENSE.md +1 -1
  3. package/README.md +1 -1
  4. package/Ruleset.schema.json +72 -19
  5. package/lib/cjs/assets/locales/en/Presentation.json +19 -19
  6. package/lib/cjs/presentation-common/AsyncTasks.d.ts.map +1 -1
  7. package/lib/cjs/presentation-common/AsyncTasks.js +6 -4
  8. package/lib/cjs/presentation-common/AsyncTasks.js.map +1 -1
  9. package/lib/cjs/presentation-common/CommonLoggerCategory.js +3 -3
  10. package/lib/cjs/presentation-common/CommonLoggerCategory.js.map +1 -1
  11. package/lib/cjs/presentation-common/Diagnostics.d.ts.map +1 -1
  12. package/lib/cjs/presentation-common/Diagnostics.js +27 -15
  13. package/lib/cjs/presentation-common/Diagnostics.js.map +1 -1
  14. package/lib/cjs/presentation-common/EC.d.ts +7 -4
  15. package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
  16. package/lib/cjs/presentation-common/EC.js +22 -17
  17. package/lib/cjs/presentation-common/EC.js.map +1 -1
  18. package/lib/cjs/presentation-common/ElementProperties.js +3 -3
  19. package/lib/cjs/presentation-common/ElementProperties.js.map +1 -1
  20. package/lib/cjs/presentation-common/Error.d.ts.map +1 -1
  21. package/lib/cjs/presentation-common/Error.js +5 -4
  22. package/lib/cjs/presentation-common/Error.js.map +1 -1
  23. package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
  24. package/lib/cjs/presentation-common/InstanceFilterDefinition.js +3 -3
  25. package/lib/cjs/presentation-common/InstanceFilterDefinition.js.map +1 -1
  26. package/lib/cjs/presentation-common/KeySet.d.ts.map +1 -1
  27. package/lib/cjs/presentation-common/KeySet.js +80 -46
  28. package/lib/cjs/presentation-common/KeySet.js.map +1 -1
  29. package/lib/cjs/presentation-common/KoqPropertyValueFormatter.d.ts.map +1 -1
  30. package/lib/cjs/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
  31. package/lib/cjs/presentation-common/LabelDefinition.d.ts.map +1 -1
  32. package/lib/cjs/presentation-common/LabelDefinition.js +5 -4
  33. package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
  34. package/lib/cjs/presentation-common/LocalizationHelper.js.map +1 -1
  35. package/lib/cjs/presentation-common/PresentationIpcInterface.js +3 -3
  36. package/lib/cjs/presentation-common/PresentationIpcInterface.js.map +1 -1
  37. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  38. package/lib/cjs/presentation-common/PresentationManagerOptions.js +3 -3
  39. package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
  40. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  41. package/lib/cjs/presentation-common/PresentationRpcInterface.js +52 -20
  42. package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
  43. package/lib/cjs/presentation-common/RegisteredRuleset.d.ts.map +1 -1
  44. package/lib/cjs/presentation-common/RegisteredRuleset.js +21 -9
  45. package/lib/cjs/presentation-common/RegisteredRuleset.js.map +1 -1
  46. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts +1 -1
  47. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  48. package/lib/cjs/presentation-common/RpcRequestsHandler.js +19 -15
  49. package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
  50. package/lib/cjs/presentation-common/RulesetVariables.d.ts.map +1 -1
  51. package/lib/cjs/presentation-common/RulesetVariables.js +7 -5
  52. package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
  53. package/lib/cjs/presentation-common/RulesetsFactory.d.ts.map +1 -1
  54. package/lib/cjs/presentation-common/RulesetsFactory.js +42 -26
  55. package/lib/cjs/presentation-common/RulesetsFactory.js.map +1 -1
  56. package/lib/cjs/presentation-common/Update.d.ts.map +1 -1
  57. package/lib/cjs/presentation-common/Update.js +4 -3
  58. package/lib/cjs/presentation-common/Update.js.map +1 -1
  59. package/lib/cjs/presentation-common/Utils.js +3 -3
  60. package/lib/cjs/presentation-common/Utils.js.map +1 -1
  61. package/lib/cjs/presentation-common/content/Category.js +3 -3
  62. package/lib/cjs/presentation-common/content/Category.js.map +1 -1
  63. package/lib/cjs/presentation-common/content/Content.d.ts.map +1 -1
  64. package/lib/cjs/presentation-common/content/Content.js +10 -9
  65. package/lib/cjs/presentation-common/content/Content.js.map +1 -1
  66. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  67. package/lib/cjs/presentation-common/content/ContentTraverser.js +47 -25
  68. package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
  69. package/lib/cjs/presentation-common/content/Descriptor.d.ts.map +1 -1
  70. package/lib/cjs/presentation-common/content/Descriptor.js +56 -21
  71. package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
  72. package/lib/cjs/presentation-common/content/DisplayTypes.js +3 -3
  73. package/lib/cjs/presentation-common/content/DisplayTypes.js.map +1 -1
  74. package/lib/cjs/presentation-common/content/Editor.js +3 -3
  75. package/lib/cjs/presentation-common/content/Editor.js.map +1 -1
  76. package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
  77. package/lib/cjs/presentation-common/content/Fields.js +47 -23
  78. package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
  79. package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
  80. package/lib/cjs/presentation-common/content/Item.js +8 -6
  81. package/lib/cjs/presentation-common/content/Item.js.map +1 -1
  82. package/lib/cjs/presentation-common/content/Property.d.ts +1 -1
  83. package/lib/cjs/presentation-common/content/Property.d.ts.map +1 -1
  84. package/lib/cjs/presentation-common/content/Property.js +4 -4
  85. package/lib/cjs/presentation-common/content/Property.js.map +1 -1
  86. package/lib/cjs/presentation-common/content/PropertyValueFormatter.d.ts.map +1 -1
  87. package/lib/cjs/presentation-common/content/PropertyValueFormatter.js +13 -11
  88. package/lib/cjs/presentation-common/content/PropertyValueFormatter.js.map +1 -1
  89. package/lib/cjs/presentation-common/content/Renderer.js +3 -3
  90. package/lib/cjs/presentation-common/content/Renderer.js.map +1 -1
  91. package/lib/cjs/presentation-common/content/TypeDescription.js +3 -3
  92. package/lib/cjs/presentation-common/content/TypeDescription.js.map +1 -1
  93. package/lib/cjs/presentation-common/content/Value.d.ts.map +1 -1
  94. package/lib/cjs/presentation-common/content/Value.js +46 -30
  95. package/lib/cjs/presentation-common/content/Value.js.map +1 -1
  96. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js +3 -3
  97. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
  98. package/lib/cjs/presentation-common/hierarchy/Key.d.ts.map +1 -1
  99. package/lib/cjs/presentation-common/hierarchy/Key.js +14 -8
  100. package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
  101. package/lib/cjs/presentation-common/hierarchy/Node.d.ts.map +1 -1
  102. package/lib/cjs/presentation-common/hierarchy/Node.js +7 -5
  103. package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
  104. package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
  105. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js +11 -7
  106. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  107. package/lib/cjs/presentation-common/rules/ClassSpecifications.js +3 -3
  108. package/lib/cjs/presentation-common/rules/ClassSpecifications.js.map +1 -1
  109. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.d.ts +39 -11
  110. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.d.ts.map +1 -1
  111. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js +3 -3
  112. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
  113. package/lib/cjs/presentation-common/rules/RelationshipDirection.js +3 -3
  114. package/lib/cjs/presentation-common/rules/RelationshipDirection.js.map +1 -1
  115. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js +3 -3
  116. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  117. package/lib/cjs/presentation-common/rules/Rule.js +3 -3
  118. package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
  119. package/lib/cjs/presentation-common/rules/Ruleset.js +3 -3
  120. package/lib/cjs/presentation-common/rules/Ruleset.js.map +1 -1
  121. package/lib/cjs/presentation-common/rules/SchemasSpecification.js +3 -3
  122. package/lib/cjs/presentation-common/rules/SchemasSpecification.js.map +1 -1
  123. package/lib/cjs/presentation-common/rules/Variables.js +3 -3
  124. package/lib/cjs/presentation-common/rules/Variables.js.map +1 -1
  125. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js +3 -3
  126. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  127. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js +3 -3
  128. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  129. package/lib/cjs/presentation-common/rules/content/ContentRule.js +3 -3
  130. package/lib/cjs/presentation-common/rules/content/ContentRule.js.map +1 -1
  131. package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
  132. package/lib/cjs/presentation-common/rules/content/ContentSpecification.js +3 -3
  133. package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  134. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js +3 -3
  135. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  136. package/lib/cjs/presentation-common/rules/content/PropertySpecification.js +3 -3
  137. package/lib/cjs/presentation-common/rules/content/PropertySpecification.js.map +1 -1
  138. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js +3 -3
  139. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  140. package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js +3 -3
  141. package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
  142. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js +3 -3
  143. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  144. package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js +3 -3
  145. package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
  146. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js +3 -3
  147. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
  148. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts.map +1 -1
  149. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js +3 -3
  150. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  151. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js +3 -3
  152. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  153. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js +3 -3
  154. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
  155. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts +1 -5
  156. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts.map +1 -1
  157. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js +3 -3
  158. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  159. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js +3 -3
  160. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  161. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js +3 -3
  162. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  163. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js +3 -3
  164. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
  165. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
  166. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js +3 -3
  167. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  168. package/lib/cjs/presentation-common/rules/customization/LabelOverride.js +3 -3
  169. package/lib/cjs/presentation-common/rules/customization/LabelOverride.js.map +1 -1
  170. package/lib/cjs/presentation-common/rules/customization/SortingRule.js +3 -3
  171. package/lib/cjs/presentation-common/rules/customization/SortingRule.js.map +1 -1
  172. package/lib/cjs/presentation-common/rules/customization/StyleOverride.js +3 -3
  173. package/lib/cjs/presentation-common/rules/customization/StyleOverride.js.map +1 -1
  174. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js +3 -3
  175. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  176. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
  177. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js +3 -3
  178. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  179. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js +3 -3
  180. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  181. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js +3 -3
  182. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  183. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js +3 -3
  184. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  185. package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js +3 -3
  186. package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
  187. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js +3 -3
  188. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  189. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js +3 -3
  190. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  191. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js +3 -3
  192. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  193. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js +3 -3
  194. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  195. package/lib/cjs/presentation-common/selection/SelectionScope.js +3 -3
  196. package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
  197. package/lib/cjs/presentation-common.js +3 -3
  198. package/lib/cjs/presentation-common.js.map +1 -1
  199. package/lib/esm/presentation-common/AsyncTasks.d.ts.map +1 -1
  200. package/lib/esm/presentation-common/AsyncTasks.js +6 -4
  201. package/lib/esm/presentation-common/AsyncTasks.js.map +1 -1
  202. package/lib/esm/presentation-common/CommonLoggerCategory.js +3 -3
  203. package/lib/esm/presentation-common/CommonLoggerCategory.js.map +1 -1
  204. package/lib/esm/presentation-common/Diagnostics.d.ts.map +1 -1
  205. package/lib/esm/presentation-common/Diagnostics.js +27 -15
  206. package/lib/esm/presentation-common/Diagnostics.js.map +1 -1
  207. package/lib/esm/presentation-common/EC.d.ts +7 -4
  208. package/lib/esm/presentation-common/EC.d.ts.map +1 -1
  209. package/lib/esm/presentation-common/EC.js +22 -17
  210. package/lib/esm/presentation-common/EC.js.map +1 -1
  211. package/lib/esm/presentation-common/ElementProperties.js +3 -3
  212. package/lib/esm/presentation-common/ElementProperties.js.map +1 -1
  213. package/lib/esm/presentation-common/Error.d.ts.map +1 -1
  214. package/lib/esm/presentation-common/Error.js +5 -4
  215. package/lib/esm/presentation-common/Error.js.map +1 -1
  216. package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
  217. package/lib/esm/presentation-common/InstanceFilterDefinition.js +3 -3
  218. package/lib/esm/presentation-common/InstanceFilterDefinition.js.map +1 -1
  219. package/lib/esm/presentation-common/KeySet.d.ts.map +1 -1
  220. package/lib/esm/presentation-common/KeySet.js +80 -46
  221. package/lib/esm/presentation-common/KeySet.js.map +1 -1
  222. package/lib/esm/presentation-common/KoqPropertyValueFormatter.d.ts.map +1 -1
  223. package/lib/esm/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
  224. package/lib/esm/presentation-common/LabelDefinition.d.ts.map +1 -1
  225. package/lib/esm/presentation-common/LabelDefinition.js +5 -4
  226. package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
  227. package/lib/esm/presentation-common/LocalizationHelper.js.map +1 -1
  228. package/lib/esm/presentation-common/PresentationIpcInterface.js +3 -3
  229. package/lib/esm/presentation-common/PresentationIpcInterface.js.map +1 -1
  230. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  231. package/lib/esm/presentation-common/PresentationManagerOptions.js +3 -3
  232. package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
  233. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  234. package/lib/esm/presentation-common/PresentationRpcInterface.js +52 -20
  235. package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
  236. package/lib/esm/presentation-common/RegisteredRuleset.d.ts.map +1 -1
  237. package/lib/esm/presentation-common/RegisteredRuleset.js +21 -9
  238. package/lib/esm/presentation-common/RegisteredRuleset.js.map +1 -1
  239. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts +1 -1
  240. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  241. package/lib/esm/presentation-common/RpcRequestsHandler.js +20 -16
  242. package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
  243. package/lib/esm/presentation-common/RulesetVariables.d.ts.map +1 -1
  244. package/lib/esm/presentation-common/RulesetVariables.js +7 -5
  245. package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
  246. package/lib/esm/presentation-common/RulesetsFactory.d.ts.map +1 -1
  247. package/lib/esm/presentation-common/RulesetsFactory.js +42 -26
  248. package/lib/esm/presentation-common/RulesetsFactory.js.map +1 -1
  249. package/lib/esm/presentation-common/Update.d.ts.map +1 -1
  250. package/lib/esm/presentation-common/Update.js +4 -3
  251. package/lib/esm/presentation-common/Update.js.map +1 -1
  252. package/lib/esm/presentation-common/Utils.js +3 -3
  253. package/lib/esm/presentation-common/Utils.js.map +1 -1
  254. package/lib/esm/presentation-common/content/Category.js +3 -3
  255. package/lib/esm/presentation-common/content/Category.js.map +1 -1
  256. package/lib/esm/presentation-common/content/Content.d.ts.map +1 -1
  257. package/lib/esm/presentation-common/content/Content.js +10 -9
  258. package/lib/esm/presentation-common/content/Content.js.map +1 -1
  259. package/lib/esm/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  260. package/lib/esm/presentation-common/content/ContentTraverser.js +47 -25
  261. package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
  262. package/lib/esm/presentation-common/content/Descriptor.d.ts.map +1 -1
  263. package/lib/esm/presentation-common/content/Descriptor.js +56 -21
  264. package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
  265. package/lib/esm/presentation-common/content/DisplayTypes.js +3 -3
  266. package/lib/esm/presentation-common/content/DisplayTypes.js.map +1 -1
  267. package/lib/esm/presentation-common/content/Editor.js +3 -3
  268. package/lib/esm/presentation-common/content/Editor.js.map +1 -1
  269. package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
  270. package/lib/esm/presentation-common/content/Fields.js +47 -23
  271. package/lib/esm/presentation-common/content/Fields.js.map +1 -1
  272. package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
  273. package/lib/esm/presentation-common/content/Item.js +8 -6
  274. package/lib/esm/presentation-common/content/Item.js.map +1 -1
  275. package/lib/esm/presentation-common/content/Property.d.ts +1 -1
  276. package/lib/esm/presentation-common/content/Property.d.ts.map +1 -1
  277. package/lib/esm/presentation-common/content/Property.js +4 -4
  278. package/lib/esm/presentation-common/content/Property.js.map +1 -1
  279. package/lib/esm/presentation-common/content/PropertyValueFormatter.d.ts.map +1 -1
  280. package/lib/esm/presentation-common/content/PropertyValueFormatter.js +13 -11
  281. package/lib/esm/presentation-common/content/PropertyValueFormatter.js.map +1 -1
  282. package/lib/esm/presentation-common/content/Renderer.js +3 -3
  283. package/lib/esm/presentation-common/content/Renderer.js.map +1 -1
  284. package/lib/esm/presentation-common/content/TypeDescription.js +3 -3
  285. package/lib/esm/presentation-common/content/TypeDescription.js.map +1 -1
  286. package/lib/esm/presentation-common/content/Value.d.ts.map +1 -1
  287. package/lib/esm/presentation-common/content/Value.js +46 -30
  288. package/lib/esm/presentation-common/content/Value.js.map +1 -1
  289. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js +3 -3
  290. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
  291. package/lib/esm/presentation-common/hierarchy/Key.d.ts.map +1 -1
  292. package/lib/esm/presentation-common/hierarchy/Key.js +14 -8
  293. package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
  294. package/lib/esm/presentation-common/hierarchy/Node.d.ts.map +1 -1
  295. package/lib/esm/presentation-common/hierarchy/Node.js +7 -5
  296. package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
  297. package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
  298. package/lib/esm/presentation-common/hierarchy/NodePathElement.js +11 -7
  299. package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  300. package/lib/esm/presentation-common/rules/ClassSpecifications.js +3 -3
  301. package/lib/esm/presentation-common/rules/ClassSpecifications.js.map +1 -1
  302. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.d.ts +39 -11
  303. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.d.ts.map +1 -1
  304. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js +3 -3
  305. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
  306. package/lib/esm/presentation-common/rules/RelationshipDirection.js +3 -3
  307. package/lib/esm/presentation-common/rules/RelationshipDirection.js.map +1 -1
  308. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js +3 -3
  309. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  310. package/lib/esm/presentation-common/rules/Rule.js +3 -3
  311. package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
  312. package/lib/esm/presentation-common/rules/Ruleset.js +3 -3
  313. package/lib/esm/presentation-common/rules/Ruleset.js.map +1 -1
  314. package/lib/esm/presentation-common/rules/SchemasSpecification.js +3 -3
  315. package/lib/esm/presentation-common/rules/SchemasSpecification.js.map +1 -1
  316. package/lib/esm/presentation-common/rules/Variables.js +3 -3
  317. package/lib/esm/presentation-common/rules/Variables.js.map +1 -1
  318. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js +3 -3
  319. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  320. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js +3 -3
  321. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  322. package/lib/esm/presentation-common/rules/content/ContentRule.js +3 -3
  323. package/lib/esm/presentation-common/rules/content/ContentRule.js.map +1 -1
  324. package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
  325. package/lib/esm/presentation-common/rules/content/ContentSpecification.js +3 -3
  326. package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  327. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js +3 -3
  328. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  329. package/lib/esm/presentation-common/rules/content/PropertySpecification.js +3 -3
  330. package/lib/esm/presentation-common/rules/content/PropertySpecification.js.map +1 -1
  331. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js +3 -3
  332. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  333. package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js +3 -3
  334. package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
  335. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js +3 -3
  336. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  337. package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js +3 -3
  338. package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
  339. package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js +3 -3
  340. package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
  341. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts.map +1 -1
  342. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js +3 -3
  343. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  344. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js +3 -3
  345. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  346. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js +3 -3
  347. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
  348. package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts +1 -5
  349. package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts.map +1 -1
  350. package/lib/esm/presentation-common/rules/customization/CustomizationRule.js +3 -3
  351. package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  352. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js +3 -3
  353. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  354. package/lib/esm/presentation-common/rules/customization/GroupingRule.js +3 -3
  355. package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  356. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js +3 -3
  357. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
  358. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
  359. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js +3 -3
  360. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  361. package/lib/esm/presentation-common/rules/customization/LabelOverride.js +3 -3
  362. package/lib/esm/presentation-common/rules/customization/LabelOverride.js.map +1 -1
  363. package/lib/esm/presentation-common/rules/customization/SortingRule.js +3 -3
  364. package/lib/esm/presentation-common/rules/customization/SortingRule.js.map +1 -1
  365. package/lib/esm/presentation-common/rules/customization/StyleOverride.js +3 -3
  366. package/lib/esm/presentation-common/rules/customization/StyleOverride.js.map +1 -1
  367. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js +3 -3
  368. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  369. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
  370. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js +3 -3
  371. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  372. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js +3 -3
  373. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  374. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js +3 -3
  375. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  376. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js +3 -3
  377. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  378. package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js +3 -3
  379. package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
  380. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js +3 -3
  381. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  382. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js +3 -3
  383. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  384. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js +3 -3
  385. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  386. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js +3 -3
  387. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  388. package/lib/esm/presentation-common/selection/SelectionScope.js +3 -3
  389. package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
  390. package/lib/esm/presentation-common.js +3 -3
  391. package/lib/esm/presentation-common.js.map +1 -1
  392. package/lib/public/locales/en/Presentation.json +19 -19
  393. package/package.json +14 -11
@@ -1 +1 @@
1
- {"version":3,"file":"Update.js","sourceRoot":"","sources":["../../../src/presentation-common/Update.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAe,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,IAAI,EAA0C,MAAM,kBAAkB,CAAC;AAEhF,aAAa;AACb,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC;AAgClC,cAAc;AACd,MAAM,KAAW,4BAA4B,CAsE5C;AAtED,WAAiB,4BAA4B;IAC3C;;;OA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O,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,4BAA4B,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SACrF,CAAC;IACJ,CAAC;IANe,6BAAQ,WAMvB,CAAA;AACH,CAAC,EA1BgB,oBAAoB,KAApB,oBAAoB,QA0BpC","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 Core\n */\n\nimport { NodeKey, NodeKeyJSON } from \"./hierarchy/Key\";\nimport { Node, NodeJSON, PartialNode, PartialNodeJSON } from \"./hierarchy/Node\";\n\n/** @alpha */\nexport const UPDATE_FULL = \"FULL\";\n\n/** @alpha */\nexport interface UpdateInfo {\n [imodel: string]: {\n [rulesetId: string]: {\n hierarchy?: HierarchyUpdateInfo;\n content?: ContentUpdateInfo;\n };\n };\n}\n\n/** @alpha */\nexport type HierarchyUpdateInfo = typeof UPDATE_FULL;\n\n/** @alpha */\nexport type ContentUpdateInfo = typeof UPDATE_FULL;\n\n/**\n * JSON representation of [[PartialHierarchyModification]].\n * @public\n * @deprecated in 3.x. Use [[PartialHierarchyModification]]\n */\n// eslint-disable-next-line deprecation/deprecation\nexport type PartialHierarchyModificationJSON = NodeInsertionInfoJSON | NodeDeletionInfoJSON | NodeUpdateInfoJSON;\n\n/**\n * Information about a hierarchy change: insertion, deletion or node update.\n * @public\n */\nexport type PartialHierarchyModification = NodeInsertionInfo | NodeDeletionInfo | NodeUpdateInfo;\n\n/** @public */\nexport namespace PartialHierarchyModification { // eslint-disable-line @typescript-eslint/no-redeclare\n /**\n * Serialize given object to JSON.\n * @deprecated in 3.x. Use [[PartialHierarchyModification]]\n */\n // eslint-disable-next-line deprecation/deprecation\n export function toJSON(obj: PartialHierarchyModification): PartialHierarchyModificationJSON {\n switch (obj.type) {\n case \"Insert\":\n return {\n type: \"Insert\",\n // eslint-disable-next-line deprecation/deprecation\n parent: obj.parent === undefined ? undefined : NodeKey.toJSON(obj.parent),\n position: obj.position,\n // eslint-disable-next-line deprecation/deprecation\n node: Node.toJSON(obj.node),\n };\n\n case \"Update\":\n return {\n type: \"Update\",\n // eslint-disable-next-line deprecation/deprecation\n target: NodeKey.toJSON(obj.target),\n changes: Node.toPartialJSON(obj.changes),\n };\n\n case \"Delete\":\n return {\n type: \"Delete\",\n // eslint-disable-next-line deprecation/deprecation\n parent: obj.parent === undefined ? undefined : NodeKey.toJSON(obj.parent),\n position: obj.position,\n };\n }\n }\n\n /**\n * Deserialize given object from JSON\n * @deprecated in 3.x. Use [[PartialHierarchyModification]]\n */\n // eslint-disable-next-line deprecation/deprecation\n export function fromJSON(json: PartialHierarchyModificationJSON): PartialHierarchyModification {\n switch (json.type) {\n case \"Insert\":\n return {\n type: \"Insert\",\n // eslint-disable-next-line deprecation/deprecation\n parent: json.parent === undefined ? undefined : NodeKey.fromJSON(json.parent),\n position: json.position,\n // eslint-disable-next-line deprecation/deprecation\n node: Node.fromJSON(json.node),\n };\n\n case \"Update\":\n return {\n type: \"Update\",\n // eslint-disable-next-line deprecation/deprecation\n target: NodeKey.fromJSON(json.target),\n changes: Node.fromPartialJSON(json.changes),\n };\n\n case \"Delete\":\n return {\n type: \"Delete\",\n // eslint-disable-next-line deprecation/deprecation\n parent: json.parent === undefined ? undefined : NodeKey.fromJSON(json.parent),\n position: json.position,\n };\n }\n }\n}\n\n/**\n * Information about node insertion.\n * @public\n */\nexport interface NodeInsertionInfo {\n type: \"Insert\";\n /** Parent node key */\n parent?: NodeKey;\n /** Index of the new node under its parent */\n position: number;\n /** Inserted node */\n node: Node;\n}\n\n/**\n * JSON representation of [[NodeInsertionInfo]].\n * @public\n * @deprecated in 3.x. Use [[NodeInsertionInfo]]\n */\nexport interface NodeInsertionInfoJSON {\n type: \"Insert\";\n // eslint-disable-next-line deprecation/deprecation\n parent?: NodeKeyJSON;\n position: number;\n // eslint-disable-next-line deprecation/deprecation\n node: NodeJSON;\n}\n\n/**\n * Information about node deletion.\n * @public\n */\nexport interface NodeDeletionInfo {\n type: \"Delete\";\n /** Parent of the deleted node */\n parent?: NodeKey;\n /** Position of the deleted node among its siblings in the initial, not updated tree */\n position: number;\n}\n\n/**\n * JSON representation of [[NodeDeletionInfo]].\n * @public\n * @deprecated in 3.x. Use [[NodeDeletionInfo]]\n */\nexport interface NodeDeletionInfoJSON {\n type: \"Delete\";\n /** Parent of the deleted node */\n // eslint-disable-next-line deprecation/deprecation\n parent?: NodeKeyJSON;\n /** Position of the deleted node among its siblings in the initial, not updated tree */\n position: number;\n}\n\n/**\n * Information about node update.\n * @public\n */\nexport interface NodeUpdateInfo {\n type: \"Update\";\n /** Key of the updated node */\n target: NodeKey;\n /** Updated node attributes */\n changes: PartialNode;\n}\n\n/**\n * JSON representation of [[NodeUpdateInfo]].\n * @public\n * @deprecated in 3.x. Use [[NodeUpdateInfo]]\n */\nexport interface NodeUpdateInfoJSON {\n type: \"Update\";\n // eslint-disable-next-line deprecation/deprecation\n target: NodeKeyJSON;\n // eslint-disable-next-line deprecation/deprecation\n changes: PartialNodeJSON;\n}\n\n/**\n * JSON representation of [[HierarchyCompareInfo]].\n * @public\n * @deprecated in 3.x. Use [[HierarchyCompareInfo]].\n */\nexport interface HierarchyCompareInfoJSON {\n // eslint-disable-next-line deprecation/deprecation\n changes: PartialHierarchyModificationJSON[];\n continuationToken?: {\n prevHierarchyNode: string;\n currHierarchyNode: string;\n };\n}\n\n/**\n * Information about hierarchy modification / differences.\n * @public\n */\nexport interface HierarchyCompareInfo {\n /** A list of hierarchy changes */\n changes: PartialHierarchyModification[];\n /** Continuation token for requesting more changes. */\n continuationToken?: {\n prevHierarchyNode: string;\n currHierarchyNode: string;\n };\n}\n\n/** @public */\nexport namespace HierarchyCompareInfo {\n /**\n * Serialize given object to JSON.\n * @deprecated in 3.x. Use [[HierarchyCompareInfo]]\n */\n // eslint-disable-next-line deprecation/deprecation\n export function toJSON(obj: HierarchyCompareInfo): HierarchyCompareInfoJSON {\n return {\n ...obj,\n // eslint-disable-next-line deprecation/deprecation\n changes: obj.changes.map((change) => PartialHierarchyModification.toJSON(change)),\n };\n }\n\n /**\n * Deserialize given object from JSON\n * @deprecated in 3.x. Use [[HierarchyCompareInfo]]\n */\n // eslint-disable-next-line deprecation/deprecation\n export function fromJSON(json: HierarchyCompareInfoJSON): HierarchyCompareInfo {\n return {\n ...json,\n // eslint-disable-next-line deprecation/deprecation\n changes: json.changes.map((change) => PartialHierarchyModification.fromJSON(change)),\n };\n }\n}\n"]}
1
+ {"version":3,"file":"Update.js","sourceRoot":"","sources":["../../../src/presentation-common/Update.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAe,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,IAAI,EAA0C,MAAM,kBAAkB,CAAC;AAEhF,aAAa;AACb,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC;AAgClC,cAAc;AACd,2DAA2D;AAC3D,MAAM,KAAW,4BAA4B,CAsE5C;AAtED,WAAiB,4BAA4B;IAC3C;;;OAGG;IACH,mDAAmD;IACnD,SAAgB,MAAM,CAAC,GAAiC;QACtD,QAAQ,GAAG,CAAC,IAAI,EAAE;YAChB,KAAK,QAAQ;gBACX,OAAO;oBACL,IAAI,EAAE,QAAQ;oBACd,mDAAmD;oBACnD,MAAM,EAAE,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;oBACzE,QAAQ,EAAE,GAAG,CAAC,QAAQ;oBACtB,mDAAmD;oBACnD,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;iBAC5B,CAAC;YAEJ,KAAK,QAAQ;gBACX,OAAO;oBACL,IAAI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BACnD,MAAM,EAAE,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;oBAC7E,QAAQ,EAAE,IAAI,CAAC,QAAQ;iBACxB,CAAC;SACL;IACH,CAAC;IA5Be,qCAAQ,WA4BvB,CAAA;AACH,CAAC,EAtEgB,4BAA4B,KAA5B,4BAA4B,QAsE5C;AA6GD,cAAc;AACd,MAAM,KAAW,oBAAoB,CA0BpC;AA1BD,WAAiB,oBAAoB;IACnC;;;OAGG;IACH,mDAAmD;IACnD,SAAgB,MAAM,CAAC,GAAyB;QAC9C,OAAO;YACL,GAAG,GAAG;YACN,mDAAmD;YACnD,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,4BAA4B,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;SAClF,CAAC;IACJ,CAAC;IANe,2BAAM,SAMrB,CAAA;IAED;;;OAGG;IACH,mDAAmD;IACnD,SAAgB,QAAQ,CAAC,IAA8B;QACrD,OAAO;YACL,GAAG,IAAI;YACP,mDAAmD;YACnD,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,4BAA4B,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SACrF,CAAC;IACJ,CAAC;IANe,6BAAQ,WAMvB,CAAA;AACH,CAAC,EA1BgB,oBAAoB,KAApB,oBAAoB,QA0BpC","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 Core\r\n */\r\n\r\nimport { NodeKey, NodeKeyJSON } from \"./hierarchy/Key\";\r\nimport { Node, NodeJSON, PartialNode, PartialNodeJSON } from \"./hierarchy/Node\";\r\n\r\n/** @alpha */\r\nexport const UPDATE_FULL = \"FULL\";\r\n\r\n/** @alpha */\r\nexport interface UpdateInfo {\r\n [imodel: string]: {\r\n [rulesetId: string]: {\r\n hierarchy?: HierarchyUpdateInfo;\r\n content?: ContentUpdateInfo;\r\n };\r\n };\r\n}\r\n\r\n/** @alpha */\r\nexport type HierarchyUpdateInfo = typeof UPDATE_FULL;\r\n\r\n/** @alpha */\r\nexport type ContentUpdateInfo = typeof UPDATE_FULL;\r\n\r\n/**\r\n * JSON representation of [[PartialHierarchyModification]].\r\n * @public\r\n * @deprecated in 3.x. Use [[PartialHierarchyModification]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport type PartialHierarchyModificationJSON = NodeInsertionInfoJSON | NodeDeletionInfoJSON | NodeUpdateInfoJSON;\r\n\r\n/**\r\n * Information about a hierarchy change: insertion, deletion or node update.\r\n * @public\r\n */\r\nexport type PartialHierarchyModification = NodeInsertionInfo | NodeDeletionInfo | NodeUpdateInfo;\r\n\r\n/** @public */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace PartialHierarchyModification {\r\n /**\r\n * Serialize given object to JSON.\r\n * @deprecated in 3.x. Use [[PartialHierarchyModification]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(obj: PartialHierarchyModification): PartialHierarchyModificationJSON {\r\n switch (obj.type) {\r\n case \"Insert\":\r\n return {\r\n type: \"Insert\",\r\n // eslint-disable-next-line deprecation/deprecation\r\n parent: obj.parent === undefined ? undefined : NodeKey.toJSON(obj.parent),\r\n position: obj.position,\r\n // eslint-disable-next-line deprecation/deprecation\r\n node: Node.toJSON(obj.node),\r\n };\r\n\r\n case \"Update\":\r\n return {\r\n type: \"Update\",\r\n // eslint-disable-next-line deprecation/deprecation\r\n target: NodeKey.toJSON(obj.target),\r\n changes: Node.toPartialJSON(obj.changes),\r\n };\r\n\r\n case \"Delete\":\r\n return {\r\n type: \"Delete\",\r\n // eslint-disable-next-line deprecation/deprecation\r\n parent: obj.parent === undefined ? undefined : NodeKey.toJSON(obj.parent),\r\n position: obj.position,\r\n };\r\n }\r\n }\r\n\r\n /**\r\n * Deserialize given object from JSON\r\n * @deprecated in 3.x. Use [[PartialHierarchyModification]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: PartialHierarchyModificationJSON): PartialHierarchyModification {\r\n switch (json.type) {\r\n case \"Insert\":\r\n return {\r\n type: \"Insert\",\r\n // eslint-disable-next-line deprecation/deprecation\r\n parent: json.parent === undefined ? undefined : NodeKey.fromJSON(json.parent),\r\n position: json.position,\r\n // eslint-disable-next-line deprecation/deprecation\r\n node: Node.fromJSON(json.node),\r\n };\r\n\r\n case \"Update\":\r\n return {\r\n type: \"Update\",\r\n // eslint-disable-next-line deprecation/deprecation\r\n target: NodeKey.fromJSON(json.target),\r\n changes: Node.fromPartialJSON(json.changes),\r\n };\r\n\r\n case \"Delete\":\r\n return {\r\n type: \"Delete\",\r\n // eslint-disable-next-line deprecation/deprecation\r\n parent: json.parent === undefined ? undefined : NodeKey.fromJSON(json.parent),\r\n position: json.position,\r\n };\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Information about node insertion.\r\n * @public\r\n */\r\nexport interface NodeInsertionInfo {\r\n type: \"Insert\";\r\n /** Parent node key */\r\n parent?: NodeKey;\r\n /** Index of the new node under its parent */\r\n position: number;\r\n /** Inserted node */\r\n node: Node;\r\n}\r\n\r\n/**\r\n * JSON representation of [[NodeInsertionInfo]].\r\n * @public\r\n * @deprecated in 3.x. Use [[NodeInsertionInfo]]\r\n */\r\nexport interface NodeInsertionInfoJSON {\r\n type: \"Insert\";\r\n // eslint-disable-next-line deprecation/deprecation\r\n parent?: NodeKeyJSON;\r\n position: number;\r\n // eslint-disable-next-line deprecation/deprecation\r\n node: NodeJSON;\r\n}\r\n\r\n/**\r\n * Information about node deletion.\r\n * @public\r\n */\r\nexport interface NodeDeletionInfo {\r\n type: \"Delete\";\r\n /** Parent of the deleted node */\r\n parent?: NodeKey;\r\n /** Position of the deleted node among its siblings in the initial, not updated tree */\r\n position: number;\r\n}\r\n\r\n/**\r\n * JSON representation of [[NodeDeletionInfo]].\r\n * @public\r\n * @deprecated in 3.x. Use [[NodeDeletionInfo]]\r\n */\r\nexport interface NodeDeletionInfoJSON {\r\n type: \"Delete\";\r\n /** Parent of the deleted node */\r\n // eslint-disable-next-line deprecation/deprecation\r\n parent?: NodeKeyJSON;\r\n /** Position of the deleted node among its siblings in the initial, not updated tree */\r\n position: number;\r\n}\r\n\r\n/**\r\n * Information about node update.\r\n * @public\r\n */\r\nexport interface NodeUpdateInfo {\r\n type: \"Update\";\r\n /** Key of the updated node */\r\n target: NodeKey;\r\n /** Updated node attributes */\r\n changes: PartialNode;\r\n}\r\n\r\n/**\r\n * JSON representation of [[NodeUpdateInfo]].\r\n * @public\r\n * @deprecated in 3.x. Use [[NodeUpdateInfo]]\r\n */\r\nexport interface NodeUpdateInfoJSON {\r\n type: \"Update\";\r\n // eslint-disable-next-line deprecation/deprecation\r\n target: NodeKeyJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n changes: PartialNodeJSON;\r\n}\r\n\r\n/**\r\n * JSON representation of [[HierarchyCompareInfo]].\r\n * @public\r\n * @deprecated in 3.x. Use [[HierarchyCompareInfo]].\r\n */\r\nexport interface HierarchyCompareInfoJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n changes: PartialHierarchyModificationJSON[];\r\n continuationToken?: {\r\n prevHierarchyNode: string;\r\n currHierarchyNode: string;\r\n };\r\n}\r\n\r\n/**\r\n * Information about hierarchy modification / differences.\r\n * @public\r\n */\r\nexport interface HierarchyCompareInfo {\r\n /** A list of hierarchy changes */\r\n changes: PartialHierarchyModification[];\r\n /** Continuation token for requesting more changes. */\r\n continuationToken?: {\r\n prevHierarchyNode: string;\r\n currHierarchyNode: string;\r\n };\r\n}\r\n\r\n/** @public */\r\nexport namespace HierarchyCompareInfo {\r\n /**\r\n * Serialize given object to JSON.\r\n * @deprecated in 3.x. Use [[HierarchyCompareInfo]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(obj: HierarchyCompareInfo): HierarchyCompareInfoJSON {\r\n return {\r\n ...obj,\r\n // eslint-disable-next-line deprecation/deprecation\r\n changes: obj.changes.map((change) => PartialHierarchyModification.toJSON(change)),\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize given object from JSON\r\n * @deprecated in 3.x. Use [[HierarchyCompareInfo]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: HierarchyCompareInfoJSON): HierarchyCompareInfo {\r\n return {\r\n ...json,\r\n // eslint-disable-next-line deprecation/deprecation\r\n changes: json.changes.map((change) => PartialHierarchyModification.fromJSON(change)),\r\n };\r\n }\r\n}\r\n"]}
@@ -1,7 +1,7 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
  /** @packageDocumentation
6
6
  * @module Core
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../src/presentation-common/Utils.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AA8C1C;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAsB,EAAU,EAAE;IAClE,IAAI,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAC;IACnC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,GAAY,EAAE,EAAE;QACrC,IAAI,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE;YACnC,KAAK,IAAI,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC;SAClC;aAAM,IAAI,OAAO,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE;YACzC,KAAK,IAAI,GAAG,CAAC,qBAAqB,CAAC;SACpC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,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 Core\n */\n\nimport { NodeKey } from \"./hierarchy/Key\";\nimport { KeySet } from \"./KeySet\";\n\n/**\n * Create a type with `T` properties excluding properties listed in `K`.\n *\n * Usage example: `Omit<SomeType, \"exclude_prop1\" | \"exclude_prop2\">`\n *\n * @public\n */\nexport type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;\n\n/**\n * Create a type with `T` properties excluding all properties in type `K`.\n *\n * Usage example: `Subtract<SomeType, ExcludePropertiesInThisType>`\n *\n * @public\n */\nexport type Subtract<T, K> = Omit<T, keyof K>;\n\n/**\n * Create a type from given type `T` and make specified properties optional.\n * @public\n */\nexport type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\n\n/**\n * A dictionary data structure.\n * @public\n */\nexport interface ValuesDictionary<T> {\n [key: string]: T;\n}\n\n/**\n * A structure for paged responses\n * @public\n */\nexport interface PagedResponse<T> {\n /** Total number of items */\n total: number;\n /** Items for the requested page */\n items: T[];\n}\n\n/**\n * Get total number of instances included in the supplied key set. The\n * count is calculated by adding all of the following:\n * - `keys.instanceKeysCount`\n * - number of `keys.nodeKeys` which are *ECInstance* keys\n * - for every grouping node key in `keys.nodeKeys`, number of grouped instances\n *\n * E.g. if `keys` contains one instance key, one *ECInstance* node key\n * and one grouping node key which groups 3 instances, the result is 5.\n *\n * @public\n */\nexport const getInstancesCount = (keys: Readonly<KeySet>): number => {\n let count = keys.instanceKeysCount;\n keys.nodeKeys.forEach((key: NodeKey) => {\n if (NodeKey.isInstancesNodeKey(key)) {\n count += key.instanceKeys.length;\n } else if (NodeKey.isGroupingNodeKey(key)) {\n count += key.groupedInstancesCount;\n }\n });\n return count;\n};\n\n/**\n * Default (recommended) keyset batch size for cases when it needs to be sent\n * over HTTP. Sending keys in batches helps avoid HTTP413 error.\n *\n * @public\n */\nexport const DEFAULT_KEYS_BATCH_SIZE = 5000;\n"]}
1
+ {"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../src/presentation-common/Utils.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AA8C1C;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAsB,EAAU,EAAE;IAClE,IAAI,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAC;IACnC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,GAAY,EAAE,EAAE;QACrC,IAAI,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE;YACnC,KAAK,IAAI,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC;SAClC;aAAM,IAAI,OAAO,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE;YACzC,KAAK,IAAI,GAAG,CAAC,qBAAqB,CAAC;SACpC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,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 Core\r\n */\r\n\r\nimport { NodeKey } from \"./hierarchy/Key\";\r\nimport { KeySet } from \"./KeySet\";\r\n\r\n/**\r\n * Create a type with `T` properties excluding properties listed in `K`.\r\n *\r\n * Usage example: `Omit<SomeType, \"exclude_prop1\" | \"exclude_prop2\">`\r\n *\r\n * @public\r\n */\r\nexport type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;\r\n\r\n/**\r\n * Create a type with `T` properties excluding all properties in type `K`.\r\n *\r\n * Usage example: `Subtract<SomeType, ExcludePropertiesInThisType>`\r\n *\r\n * @public\r\n */\r\nexport type Subtract<T, K> = Omit<T, keyof K>;\r\n\r\n/**\r\n * Create a type from given type `T` and make specified properties optional.\r\n * @public\r\n */\r\nexport type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\r\n\r\n/**\r\n * A dictionary data structure.\r\n * @public\r\n */\r\nexport interface ValuesDictionary<T> {\r\n [key: string]: T;\r\n}\r\n\r\n/**\r\n * A structure for paged responses\r\n * @public\r\n */\r\nexport interface PagedResponse<T> {\r\n /** Total number of items */\r\n total: number;\r\n /** Items for the requested page */\r\n items: T[];\r\n}\r\n\r\n/**\r\n * Get total number of instances included in the supplied key set. The\r\n * count is calculated by adding all of the following:\r\n * - `keys.instanceKeysCount`\r\n * - number of `keys.nodeKeys` which are *ECInstance* keys\r\n * - for every grouping node key in `keys.nodeKeys`, number of grouped instances\r\n *\r\n * E.g. if `keys` contains one instance key, one *ECInstance* node key\r\n * and one grouping node key which groups 3 instances, the result is 5.\r\n *\r\n * @public\r\n */\r\nexport const getInstancesCount = (keys: Readonly<KeySet>): number => {\r\n let count = keys.instanceKeysCount;\r\n keys.nodeKeys.forEach((key: NodeKey) => {\r\n if (NodeKey.isInstancesNodeKey(key)) {\r\n count += key.instanceKeys.length;\r\n } else if (NodeKey.isGroupingNodeKey(key)) {\r\n count += key.groupedInstancesCount;\r\n }\r\n });\r\n return count;\r\n};\r\n\r\n/**\r\n * Default (recommended) keyset batch size for cases when it needs to be sent\r\n * over HTTP. Sending keys in batches helps avoid HTTP413 error.\r\n *\r\n * @public\r\n */\r\nexport const DEFAULT_KEYS_BATCH_SIZE = 5000;\r\n"]}
@@ -1,7 +1,7 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
  /** @packageDocumentation
6
6
  * @module Content
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Category.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Category.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAwBH,cAAc;AACd,MAAM,KAAW,mBAAmB,CAmCnC;AAnCD,WAAiB,mBAAmB;IAClC,uCAAuC;IACvC,SAAgB,MAAM,CAAC,QAA6B;QAClD,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,QAAQ,CAAC;QACrC,OAAO;YACL,GAAG,IAAI;YACP,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;SAClD,CAAC;IACJ,CAAC;IANe,0BAAM,SAMrB,CAAA;IAED;;;OAGG;IACH,SAAgB,QAAQ,CAAC,IAA6B;QACpD,6DAA6D;QAC7D,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IAJe,4BAAQ,WAIvB,CAAA;IAED,SAAS,yBAAyB,CAAC,IAA6B,EAAE,aAA+C;QAC/G,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAE,CAAC;QAC/C,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,mDAAmD;YACnD,QAAQ,CAAC,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAClD;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,+DAA+D;IAC/D,SAAgB,YAAY,CAAC,IAA+B;QAC1D,MAAM,aAAa,GAAG,IAAI,GAAG,EAA+B,CAAC;QAC7D,IAAI,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,mBAAmB,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QACjH,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,yBAAyB,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC;IAC5F,CAAC;IAJe,gCAAY,eAI3B,CAAA;AACH,CAAC,EAnCgB,mBAAmB,KAAnB,mBAAmB,QAmCnC","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 { RendererDescription } from \"./Renderer\";\n\n/**\n * A data structure that describes a [[Field]] category.\n * @public\n */\nexport interface CategoryDescription {\n /** Unique name */\n name: string;\n /** Display label */\n label: string;\n /** Extensive description */\n description: string;\n /** Priority. Categories with higher priority should appear higher in the UI */\n priority: number;\n /** Should this category be auto-expanded when it's displayed in the UI */\n expand: boolean;\n /** Parent category description */\n parent?: CategoryDescription;\n /** Custom renderer description */\n renderer?: RendererDescription;\n}\n/** @public */\nexport namespace CategoryDescription {\n /** Serialize given category to JSON */\n export function toJSON(category: CategoryDescription): CategoryDescriptionJSON {\n const { parent, ...rest } = category;\n return {\n ...rest,\n ...(parent ? { parent: parent.name } : undefined),\n };\n }\n\n /**\n * Deserialize [[CategoryDescription]] from JSON. The `parent` is not assigned - use [[CategoryDescription.listFromJSON]]\n * to deserialize the whole categories list and set parents.\n */\n export function fromJSON(json: CategoryDescriptionJSON): CategoryDescription {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { parent, ...rest } = json;\n return rest;\n }\n\n function createCategoriesHierarchy(json: CategoryDescriptionJSON, categoriesMap: Map<string, CategoryDescription>): CategoryDescription {\n const category = categoriesMap.get(json.name)!;\n if (json.parent) {\n // note: mutating categories in the `categoriesMap`\n category.parent = categoriesMap.get(json.parent);\n }\n return category;\n }\n\n /** Deserialize a list of [[CategoryDescription]] from JSON. */\n export function listFromJSON(json: CategoryDescriptionJSON[]): CategoryDescription[] {\n const categoriesMap = new Map<string, CategoryDescription>();\n json.forEach((categoryJson) => categoriesMap.set(categoryJson.name, CategoryDescription.fromJSON(categoryJson)));\n return json.map((categoryJson) => createCategoriesHierarchy(categoryJson, categoriesMap));\n }\n}\n\n/**\n * Serialized [[CategoryDescription]] JSON representation.\n * @public\n */\nexport interface CategoryDescriptionJSON {\n name: string;\n label: string;\n description: string;\n priority: number;\n expand: boolean;\n parent?: string;\n renderer?: RendererDescription;\n}\n"]}
1
+ {"version":3,"file":"Category.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Category.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAwBH,cAAc;AACd,MAAM,KAAW,mBAAmB,CAmCnC;AAnCD,WAAiB,mBAAmB;IAClC,uCAAuC;IACvC,SAAgB,MAAM,CAAC,QAA6B;QAClD,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,QAAQ,CAAC;QACrC,OAAO;YACL,GAAG,IAAI;YACP,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;SAClD,CAAC;IACJ,CAAC;IANe,0BAAM,SAMrB,CAAA;IAED;;;OAGG;IACH,SAAgB,QAAQ,CAAC,IAA6B;QACpD,6DAA6D;QAC7D,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IAJe,4BAAQ,WAIvB,CAAA;IAED,SAAS,yBAAyB,CAAC,IAA6B,EAAE,aAA+C;QAC/G,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAE,CAAC;QAC/C,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,mDAAmD;YACnD,QAAQ,CAAC,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAClD;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,+DAA+D;IAC/D,SAAgB,YAAY,CAAC,IAA+B;QAC1D,MAAM,aAAa,GAAG,IAAI,GAAG,EAA+B,CAAC;QAC7D,IAAI,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,mBAAmB,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QACjH,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,yBAAyB,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC;IAC5F,CAAC;IAJe,gCAAY,eAI3B,CAAA;AACH,CAAC,EAnCgB,mBAAmB,KAAnB,mBAAmB,QAmCnC","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 { RendererDescription } from \"./Renderer\";\r\n\r\n/**\r\n * A data structure that describes a [[Field]] category.\r\n * @public\r\n */\r\nexport interface CategoryDescription {\r\n /** Unique name */\r\n name: string;\r\n /** Display label */\r\n label: string;\r\n /** Extensive description */\r\n description: string;\r\n /** Priority. Categories with higher priority should appear higher in the UI */\r\n priority: number;\r\n /** Should this category be auto-expanded when it's displayed in the UI */\r\n expand: boolean;\r\n /** Parent category description */\r\n parent?: CategoryDescription;\r\n /** Custom renderer description */\r\n renderer?: RendererDescription;\r\n}\r\n/** @public */\r\nexport namespace CategoryDescription {\r\n /** Serialize given category to JSON */\r\n export function toJSON(category: CategoryDescription): CategoryDescriptionJSON {\r\n const { parent, ...rest } = category;\r\n return {\r\n ...rest,\r\n ...(parent ? { parent: parent.name } : undefined),\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[CategoryDescription]] from JSON. The `parent` is not assigned - use [[CategoryDescription.listFromJSON]]\r\n * to deserialize the whole categories list and set parents.\r\n */\r\n export function fromJSON(json: CategoryDescriptionJSON): CategoryDescription {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { parent, ...rest } = json;\r\n return rest;\r\n }\r\n\r\n function createCategoriesHierarchy(json: CategoryDescriptionJSON, categoriesMap: Map<string, CategoryDescription>): CategoryDescription {\r\n const category = categoriesMap.get(json.name)!;\r\n if (json.parent) {\r\n // note: mutating categories in the `categoriesMap`\r\n category.parent = categoriesMap.get(json.parent);\r\n }\r\n return category;\r\n }\r\n\r\n /** Deserialize a list of [[CategoryDescription]] from JSON. */\r\n export function listFromJSON(json: CategoryDescriptionJSON[]): CategoryDescription[] {\r\n const categoriesMap = new Map<string, CategoryDescription>();\r\n json.forEach((categoryJson) => categoriesMap.set(categoryJson.name, CategoryDescription.fromJSON(categoryJson)));\r\n return json.map((categoryJson) => createCategoriesHierarchy(categoryJson, categoriesMap));\r\n }\r\n}\r\n\r\n/**\r\n * Serialized [[CategoryDescription]] JSON representation.\r\n * @public\r\n */\r\nexport interface CategoryDescriptionJSON {\r\n name: string;\r\n label: string;\r\n description: string;\r\n priority: number;\r\n expand: boolean;\r\n parent?: string;\r\n renderer?: RendererDescription;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Content.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAExC;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,cAAc,CAAC;IAC3B,UAAU,EAAE,QAAQ,EAAE,CAAC;CACxB;AAED;;;;;GAKG;AACH,qBAAa,OAAO;IAClB,4CAA4C;IAC5C,SAAgB,UAAU,EAAE,UAAU,CAAC;IACvC,oBAAoB;IACpB,SAAgB,UAAU,EAAE,IAAI,EAAE,CAAC;IAEnC,wCAAwC;gBACrB,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE;IAKxD,oCAAoC;IAC7B,MAAM,IAAI,WAAW;IAO5B,wCAAwC;WAC1B,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS;IAiBnF;;;;;OAKG;WACW,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG;CAGpD"}
1
+ {"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Content.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAExC;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,cAAc,CAAC;IAC3B,UAAU,EAAE,QAAQ,EAAE,CAAC;CACxB;AAED;;;;;GAKG;AACH,qBAAa,OAAO;IAClB,4CAA4C;IAC5C,SAAgB,UAAU,EAAE,UAAU,CAAC;IACvC,oBAAoB;IACpB,SAAgB,UAAU,EAAE,IAAI,EAAE,CAAC;IAEnC,wCAAwC;gBACrB,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE;IAKxD,oCAAoC;IAC7B,MAAM,IAAI,WAAW;IAO5B,wCAAwC;WAC1B,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS;IAkBnF;;;;;OAKG;WACW,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG;CAGpD"}
@@ -1,7 +1,7 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
  /** @packageDocumentation
6
6
  * @module Content
7
7
  */
@@ -28,16 +28,17 @@ export class Content {
28
28
  }
29
29
  /** Deserialize [[Content]] from JSON */
30
30
  static fromJSON(json) {
31
- if (!json)
31
+ if (!json) {
32
32
  return undefined;
33
- if (typeof json === "string")
33
+ }
34
+ if (typeof json === "string") {
34
35
  return JSON.parse(json, (key, value) => Content.reviver(key, value));
36
+ }
35
37
  const descriptor = Descriptor.fromJSON(json.descriptor);
36
- if (!descriptor)
38
+ if (!descriptor) {
37
39
  return undefined;
38
- const contentSet = json.contentSet
39
- .map((itemJson) => Item.fromJSON(itemJson))
40
- .filter((item) => (item !== undefined));
40
+ }
41
+ const contentSet = json.contentSet.map((itemJson) => Item.fromJSON(itemJson)).filter((item) => item !== undefined);
41
42
  return new Content(descriptor, contentSet);
42
43
  }
43
44
  /**
@@ -1 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AAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC;QAC9D,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAC7C,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,OAAO,CAAC,GAAW,EAAE,KAAU;QAC3C,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACtD,CAAC;CACF","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 { Descriptor, DescriptorJSON } from \"./Descriptor\";\nimport { Item, ItemJSON } from \"./Item\";\n\n/**\n * Serialized [[Content]] JSON representation.\n * @public\n */\nexport interface ContentJSON {\n descriptor: DescriptorJSON;\n contentSet: ItemJSON[];\n}\n\n/**\n * A data structure that contains the [[Descriptor]] and a list of [[Item]]\n * objects which are based on that descriptor.\n *\n * @public\n */\nexport class Content {\n /** Descriptor used to create the content */\n public readonly descriptor: Descriptor;\n /** Content items */\n public readonly contentSet: Item[];\n\n /** Create a new [[Content]] instance */\n public constructor(descriptor: Descriptor, items: Item[]) {\n this.descriptor = descriptor;\n this.contentSet = items;\n }\n\n /** Serialize this object to JSON */\n public toJSON(): ContentJSON {\n return {\n descriptor: this.descriptor.toJSON(),\n contentSet: this.contentSet.map((item: Item) => item.toJSON()),\n };\n }\n\n /** Deserialize [[Content]] from JSON */\n public static fromJSON(json: ContentJSON | string | undefined): Content | undefined {\n if (!json)\n return undefined;\n\n if (typeof json === \"string\")\n return JSON.parse(json, (key, value) => Content.reviver(key, value));\n\n const descriptor = Descriptor.fromJSON(json.descriptor);\n if (!descriptor)\n return undefined;\n\n const contentSet = json.contentSet\n .map((itemJson: ItemJSON) => Item.fromJSON(itemJson))\n .filter<Item>((item): item is Item => (item !== undefined));\n return new Content(descriptor, contentSet);\n }\n\n /**\n * Reviver function that can be used as a second argument for\n * `JSON.parse` method when parsing Content objects.\n *\n * @internal\n */\n public static reviver(key: string, value: any): any {\n return key === \"\" ? Content.fromJSON(value) : value;\n }\n}\n"]}
1
+ {"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Content.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAY,MAAM,QAAQ,CAAC;AAWxC;;;;;GAKG;AACH,MAAM,OAAO,OAAO;IAMlB,wCAAwC;IACxC,YAAmB,UAAsB,EAAE,KAAa;QACtD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC1B,CAAC;IAED,oCAAoC;IAC7B,MAAM;QACX,OAAO;YACL,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACpC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAU,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;SAC/D,CAAC;IACJ,CAAC;IAED,wCAAwC;IACjC,MAAM,CAAC,QAAQ,CAAC,IAAsC;QAC3D,IAAI,CAAC,IAAI,EAAE;YACT,OAAO,SAAS,CAAC;SAClB;QAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;SACtE;QAED,MAAM,UAAU,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxD,IAAI,CAAC,UAAU,EAAE;YACf,OAAO,SAAS,CAAC;SAClB;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,QAAkB,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAO,CAAC,IAAI,EAAgB,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;QACjJ,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAC7C,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,OAAO,CAAC,GAAW,EAAE,KAAU;QAC3C,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACtD,CAAC;CACF","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 { Descriptor, DescriptorJSON } from \"./Descriptor\";\r\nimport { Item, ItemJSON } from \"./Item\";\r\n\r\n/**\r\n * Serialized [[Content]] JSON representation.\r\n * @public\r\n */\r\nexport interface ContentJSON {\r\n descriptor: DescriptorJSON;\r\n contentSet: ItemJSON[];\r\n}\r\n\r\n/**\r\n * A data structure that contains the [[Descriptor]] and a list of [[Item]]\r\n * objects which are based on that descriptor.\r\n *\r\n * @public\r\n */\r\nexport class Content {\r\n /** Descriptor used to create the content */\r\n public readonly descriptor: Descriptor;\r\n /** Content items */\r\n public readonly contentSet: Item[];\r\n\r\n /** Create a new [[Content]] instance */\r\n public constructor(descriptor: Descriptor, items: Item[]) {\r\n this.descriptor = descriptor;\r\n this.contentSet = items;\r\n }\r\n\r\n /** Serialize this object to JSON */\r\n public toJSON(): ContentJSON {\r\n return {\r\n descriptor: this.descriptor.toJSON(),\r\n contentSet: this.contentSet.map((item: Item) => item.toJSON()),\r\n };\r\n }\r\n\r\n /** Deserialize [[Content]] from JSON */\r\n public static fromJSON(json: ContentJSON | string | undefined): Content | undefined {\r\n if (!json) {\r\n return undefined;\r\n }\r\n\r\n if (typeof json === \"string\") {\r\n return JSON.parse(json, (key, value) => Content.reviver(key, value));\r\n }\r\n\r\n const descriptor = Descriptor.fromJSON(json.descriptor);\r\n if (!descriptor) {\r\n return undefined;\r\n }\r\n\r\n const contentSet = json.contentSet.map((itemJson: ItemJSON) => Item.fromJSON(itemJson)).filter<Item>((item): item is Item => item !== undefined);\r\n return new Content(descriptor, contentSet);\r\n }\r\n\r\n /**\r\n * Reviver function that can be used as a second argument for\r\n * `JSON.parse` method when parsing Content objects.\r\n *\r\n * @internal\r\n */\r\n public static reviver(key: string, value: any): any {\r\n return key === \"\" ? Content.fromJSON(value) : value;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentTraverser.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/ContentTraverser.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAsB,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAuB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAsB,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEhI;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,oBAAoB;IACpB,KAAK,EAAE,KAAK,CAAC;IACb,qBAAqB;IACrB,WAAW,EAAE,cAAc,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C,KAAK,EAAE,0BAA0B,GAAG,IAAI,CAAC;CAChE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,OAAO,QAGnG;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,OAAO,QAazE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,QAE/F;AA2KD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,gBAAgB,CAAC,EAAE,OAAO,oBA8BjF;AAmED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,eAAe,EAAE,cAAc,EAAE,EAAE,SAAS,EAAE,cAAc,GAAG,IAAI,CAapG;AAaD,gBAAgB;AAChB,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,UAE5E;AACD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,YAE3D"}
1
+ {"version":3,"file":"ContentTraverser.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/ContentTraverser.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAsB,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAuB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAA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;;;;;OAKG;IACH,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC;IAC5C,0DAA0D;IAC1D,WAAW,IAAI,IAAI,CAAC;IAEpB,mGAAmG;IACnG,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACzD,2CAA2C;IAC3C,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,IAAI,CAAC;CAChE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,OAAO,QAInG;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,OAAO,QAczE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,QAE/F;AA+OD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,gBAAgB,CAAC,EAAE,OAAO,oBAgCjF;AAoED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,eAAe,EAAE,cAAc,EAAE,EAAE,SAAS,EAAE,cAAc,GAAG,IAAI,CAapG;AAaD,gBAAgB;AAChB,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,UAE5E;AACD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,YAE3D"}
@@ -1,7 +1,7 @@
1
1
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
5
  /** @packageDocumentation
6
6
  * @module Content
7
7
  */
@@ -16,8 +16,9 @@ import { DisplayValue, Value } from "./Value";
16
16
  * @public
17
17
  */
18
18
  export function traverseFieldHierarchy(hierarchy, cb) {
19
- if (cb(hierarchy))
19
+ if (cb(hierarchy)) {
20
20
  hierarchy.childFields.forEach((childHierarchy) => traverseFieldHierarchy(childHierarchy, cb));
21
+ }
21
22
  }
22
23
  /**
23
24
  * An utility to traverse content using provided visitor. Provides means to parse content into different formats,
@@ -25,8 +26,9 @@ export function traverseFieldHierarchy(hierarchy, cb) {
25
26
  * @public
26
27
  */
27
28
  export function traverseContent(visitor, content) {
28
- if (!visitor.startContent({ descriptor: content.descriptor }))
29
+ if (!visitor.startContent({ descriptor: content.descriptor })) {
29
30
  return;
31
+ }
30
32
  try {
31
33
  const fieldHierarchies = createFieldHierarchies(content.descriptor.fields);
32
34
  visitor.processFieldHierarchies({ hierarchies: fieldHierarchies });
@@ -68,19 +70,24 @@ class VisitedCategories {
68
70
  }
69
71
  }
70
72
  dispose() {
71
- while (this._visitedCategories.pop())
73
+ while (this._visitedCategories.pop()) {
72
74
  this._visitor.finishCategory();
75
+ }
76
+ }
77
+ get shouldContinue() {
78
+ return this._didVisitAllHierarchy;
73
79
  }
74
- get shouldContinue() { return this._didVisitAllHierarchy; }
75
80
  }
76
81
  function traverseContentItemFields(visitor, fieldHierarchies, item) {
77
- if (!visitor.startItem({ item }))
82
+ if (!visitor.startItem({ item })) {
78
83
  return;
84
+ }
79
85
  try {
80
86
  fieldHierarchies.forEach((fieldHierarchy) => {
81
87
  using(new VisitedCategories(visitor, fieldHierarchy.field.category), (res) => {
82
- if (res.shouldContinue)
88
+ if (res.shouldContinue) {
83
89
  traverseContentItemField(visitor, fieldHierarchy, item);
90
+ }
84
91
  });
85
92
  });
86
93
  }
@@ -89,8 +96,9 @@ function traverseContentItemFields(visitor, fieldHierarchies, item) {
89
96
  }
90
97
  }
91
98
  function traverseContentItemField(visitor, fieldHierarchy, item) {
92
- if (!visitor.startField({ hierarchy: fieldHierarchy }))
99
+ if (!visitor.startField({ hierarchy: fieldHierarchy })) {
93
100
  return;
101
+ }
94
102
  try {
95
103
  const rootToThisField = createFieldPath(fieldHierarchy.field);
96
104
  let parentFieldName;
@@ -103,8 +111,9 @@ function traverseContentItemField(visitor, fieldHierarchy, item) {
103
111
  return;
104
112
  }
105
113
  const { emptyNestedItem, convertedItem } = convertNestedContentItemToStructArrayItem(item, parentField, nextField);
106
- if (emptyNestedItem)
114
+ if (emptyNestedItem) {
107
115
  return;
116
+ }
108
117
  item = convertedItem;
109
118
  parentFieldName = combineFieldNames(parentField.name, parentFieldName);
110
119
  }
@@ -115,8 +124,9 @@ function traverseContentItemField(visitor, fieldHierarchy, item) {
115
124
  if (fieldHierarchy.field.isNestedContentField()) {
116
125
  fieldHierarchy = convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy, parentFieldName);
117
126
  const { emptyNestedItem, convertedItem } = convertNestedContentFieldHierarchyItemToStructArrayItem(item, fieldHierarchy);
118
- if (emptyNestedItem)
127
+ if (emptyNestedItem) {
119
128
  return;
129
+ }
120
130
  item = convertedItem;
121
131
  }
122
132
  else if (pathUpToField.length > 0) {
@@ -155,8 +165,9 @@ function traverseContentItemFieldValue(visitor, fieldHierarchy, mergedFieldNames
155
165
  function traverseContentItemArrayFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValues, displayValues) {
156
166
  assert(rawValues.length === displayValues.length);
157
167
  assert(valueType.valueFormat === PropertyValueFormat.Array);
158
- if (!visitor.startArray({ hierarchy: fieldHierarchy, valueType, parentFieldName, rawValues, displayValues }))
168
+ if (!visitor.startArray({ hierarchy: fieldHierarchy, valueType, parentFieldName, rawValues, displayValues })) {
159
169
  return;
170
+ }
160
171
  try {
161
172
  const itemType = valueType.memberType;
162
173
  rawValues.forEach((_, i) => {
@@ -169,11 +180,13 @@ function traverseContentItemArrayFieldValue(visitor, fieldHierarchy, mergedField
169
180
  }
170
181
  function traverseContentItemStructFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValues, displayValues) {
171
182
  assert(valueType.valueFormat === PropertyValueFormat.Struct);
172
- if (!visitor.startStruct({ hierarchy: fieldHierarchy, valueType, parentFieldName, rawValues, displayValues }))
183
+ if (!visitor.startStruct({ hierarchy: fieldHierarchy, valueType, parentFieldName, rawValues, displayValues })) {
173
184
  return;
185
+ }
174
186
  try {
175
- if (fieldHierarchy.field.isNestedContentField())
187
+ if (fieldHierarchy.field.isNestedContentField()) {
176
188
  parentFieldName = combineFieldNames(fieldHierarchy.field.name, parentFieldName);
189
+ }
177
190
  valueType.members.forEach((memberDescription) => {
178
191
  let memberField = fieldHierarchy.childFields.find((f) => f.field.name === memberDescription.name);
179
192
  if (!memberField) {
@@ -213,11 +226,12 @@ export function createFieldHierarchies(fields, ignoreCategories) {
213
226
  if (field.isNestedContentField()) {
214
227
  // visit all nested fields
215
228
  childFields = visitFields(field.nestedFields, field);
216
- if (0 === childFields.length)
229
+ if (0 === childFields.length) {
217
230
  return undefined;
231
+ }
218
232
  }
219
233
  const fieldHierarchy = { field, childFields };
220
- if (category === parentField?.category || ignoreCategories && parentField) {
234
+ if (category === parentField?.category || (ignoreCategories && parentField)) {
221
235
  // if categories of this field and its parent field match - return the field hierarchy without
222
236
  // including it as a top level field
223
237
  return fieldHierarchy;
@@ -229,8 +243,9 @@ export function createFieldHierarchies(fields, ignoreCategories) {
229
243
  const includedFields = [];
230
244
  visitedFields.forEach((field) => {
231
245
  const visitedField = visitField(field.category, field, parentField);
232
- if (visitedField)
246
+ if (visitedField) {
233
247
  includedFields.push(visitedField);
248
+ }
234
249
  });
235
250
  return includedFields;
236
251
  };
@@ -289,10 +304,12 @@ function mergeHierarchies(lhs, rhs) {
289
304
  };
290
305
  rhs.childFields.forEach((rhsChildHierarchy) => {
291
306
  const indexInResult = result.childFields.findIndex((resultHierarchy) => resultHierarchy.field.name === rhsChildHierarchy.field.name);
292
- if (indexInResult !== -1)
307
+ if (indexInResult !== -1) {
293
308
  result.childFields[indexInResult] = mergeHierarchies(result.childFields[indexInResult], rhsChildHierarchy);
294
- else
309
+ }
310
+ else {
295
311
  result.childFields.push(rhsChildHierarchy);
312
+ }
296
313
  });
297
314
  return result;
298
315
  }
@@ -342,8 +359,9 @@ export function parseCombinedFieldNames(combinedName) {
342
359
  function convertNestedContentItemToStructArrayItem(item, field, nextField) {
343
360
  const value = item.values[field.name] ?? [];
344
361
  assert(Value.isNestedContent(value));
345
- if (value.length === 0)
362
+ if (value.length === 0) {
346
363
  return { emptyNestedItem: true, convertedItem: item };
364
+ }
347
365
  const nextFieldValues = { raw: [], display: [] };
348
366
  value.forEach((ncv) => {
349
367
  const nextRawValue = ncv.values[nextField.name];
@@ -359,14 +377,16 @@ function convertNestedContentItemToStructArrayItem(item, field, nextField) {
359
377
  nextFieldValues.display.push(nextDisplayValue);
360
378
  }
361
379
  });
362
- 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
380
+ const convertedItem = new Item(item.primaryKeys, item.label, item.imageId, // eslint-disable-line deprecation/deprecation
381
+ item.classInfo, { [nextField.name]: nextFieldValues.raw }, { [nextField.name]: nextFieldValues.display }, item.mergedFieldNames, item.extendedData);
363
382
  return { emptyNestedItem: false, convertedItem };
364
383
  }
365
384
  function convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy, parentFieldName) {
366
385
  const fieldName = fieldHierarchy.field.name;
367
386
  const convertedChildFieldHierarchies = fieldHierarchy.childFields.map((child) => {
368
- if (child.field.isNestedContentField())
387
+ if (child.field.isNestedContentField()) {
369
388
  return convertNestedContentFieldHierarchyToStructArrayHierarchy(child, combineFieldNames(fieldName, parentFieldName));
389
+ }
370
390
  return child;
371
391
  });
372
392
  const convertedFieldHierarchy = {
@@ -419,10 +439,12 @@ function convertNestedContentFieldHierarchyItemToStructArrayItem(item, fieldHier
419
439
  const fieldName = fieldHierarchy.field.name;
420
440
  const rawValue = item.values[fieldName];
421
441
  assert(Value.isNestedContent(rawValue));
422
- if (rawValue.length === 0)
442
+ if (rawValue.length === 0) {
423
443
  return { emptyNestedItem: true, convertedItem: item };
444
+ }
424
445
  const converted = convertNestedContentValuesToStructArrayValuesRecursive(fieldHierarchy, rawValue);
425
- 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
446
+ const convertedItem = new Item(item.primaryKeys, item.label, item.imageId, // eslint-disable-line deprecation/deprecation
447
+ item.classInfo, { [fieldName]: converted.raw }, { [fieldName]: converted.display }, converted.mergedFieldNames, item.extendedData);
426
448
  return { emptyNestedItem: false, convertedItem };
427
449
  }
428
450
  //# sourceMappingURL=ContentTraverser.js.map