@itwin/presentation-common 4.5.0-dev.4 → 4.5.0-dev.40

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 (403) hide show
  1. package/CHANGELOG.md +58 -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.d.ts +1 -1
  35. package/lib/cjs/presentation-common/LocalizationHelper.d.ts.map +1 -1
  36. package/lib/cjs/presentation-common/LocalizationHelper.js +18 -1
  37. package/lib/cjs/presentation-common/LocalizationHelper.js.map +1 -1
  38. package/lib/cjs/presentation-common/PresentationIpcInterface.js +3 -3
  39. package/lib/cjs/presentation-common/PresentationIpcInterface.js.map +1 -1
  40. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  41. package/lib/cjs/presentation-common/PresentationManagerOptions.js +3 -3
  42. package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
  43. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  44. package/lib/cjs/presentation-common/PresentationRpcInterface.js +53 -21
  45. package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
  46. package/lib/cjs/presentation-common/RegisteredRuleset.d.ts.map +1 -1
  47. package/lib/cjs/presentation-common/RegisteredRuleset.js +21 -9
  48. package/lib/cjs/presentation-common/RegisteredRuleset.js.map +1 -1
  49. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts +1 -1
  50. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  51. package/lib/cjs/presentation-common/RpcRequestsHandler.js +19 -15
  52. package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
  53. package/lib/cjs/presentation-common/RulesetVariables.d.ts.map +1 -1
  54. package/lib/cjs/presentation-common/RulesetVariables.js +7 -5
  55. package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
  56. package/lib/cjs/presentation-common/RulesetsFactory.d.ts.map +1 -1
  57. package/lib/cjs/presentation-common/RulesetsFactory.js +42 -26
  58. package/lib/cjs/presentation-common/RulesetsFactory.js.map +1 -1
  59. package/lib/cjs/presentation-common/Update.d.ts.map +1 -1
  60. package/lib/cjs/presentation-common/Update.js +4 -3
  61. package/lib/cjs/presentation-common/Update.js.map +1 -1
  62. package/lib/cjs/presentation-common/Utils.js +3 -3
  63. package/lib/cjs/presentation-common/Utils.js.map +1 -1
  64. package/lib/cjs/presentation-common/content/Category.js +3 -3
  65. package/lib/cjs/presentation-common/content/Category.js.map +1 -1
  66. package/lib/cjs/presentation-common/content/Content.d.ts.map +1 -1
  67. package/lib/cjs/presentation-common/content/Content.js +10 -9
  68. package/lib/cjs/presentation-common/content/Content.js.map +1 -1
  69. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  70. package/lib/cjs/presentation-common/content/ContentTraverser.js +47 -25
  71. package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
  72. package/lib/cjs/presentation-common/content/Descriptor.d.ts.map +1 -1
  73. package/lib/cjs/presentation-common/content/Descriptor.js +56 -21
  74. package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
  75. package/lib/cjs/presentation-common/content/DisplayTypes.js +3 -3
  76. package/lib/cjs/presentation-common/content/DisplayTypes.js.map +1 -1
  77. package/lib/cjs/presentation-common/content/Editor.js +3 -3
  78. package/lib/cjs/presentation-common/content/Editor.js.map +1 -1
  79. package/lib/cjs/presentation-common/content/Fields.d.ts +78 -2
  80. package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
  81. package/lib/cjs/presentation-common/content/Fields.js +201 -45
  82. package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
  83. package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
  84. package/lib/cjs/presentation-common/content/Item.js +8 -6
  85. package/lib/cjs/presentation-common/content/Item.js.map +1 -1
  86. package/lib/cjs/presentation-common/content/Property.d.ts +1 -1
  87. package/lib/cjs/presentation-common/content/Property.d.ts.map +1 -1
  88. package/lib/cjs/presentation-common/content/Property.js +4 -4
  89. package/lib/cjs/presentation-common/content/Property.js.map +1 -1
  90. package/lib/cjs/presentation-common/content/PropertyValueFormatter.d.ts +6 -1
  91. package/lib/cjs/presentation-common/content/PropertyValueFormatter.d.ts.map +1 -1
  92. package/lib/cjs/presentation-common/content/PropertyValueFormatter.js +39 -11
  93. package/lib/cjs/presentation-common/content/PropertyValueFormatter.js.map +1 -1
  94. package/lib/cjs/presentation-common/content/Renderer.js +3 -3
  95. package/lib/cjs/presentation-common/content/Renderer.js.map +1 -1
  96. package/lib/cjs/presentation-common/content/TypeDescription.js +3 -3
  97. package/lib/cjs/presentation-common/content/TypeDescription.js.map +1 -1
  98. package/lib/cjs/presentation-common/content/Value.d.ts.map +1 -1
  99. package/lib/cjs/presentation-common/content/Value.js +46 -30
  100. package/lib/cjs/presentation-common/content/Value.js.map +1 -1
  101. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js +3 -3
  102. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
  103. package/lib/cjs/presentation-common/hierarchy/Key.d.ts.map +1 -1
  104. package/lib/cjs/presentation-common/hierarchy/Key.js +14 -8
  105. package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
  106. package/lib/cjs/presentation-common/hierarchy/Node.d.ts.map +1 -1
  107. package/lib/cjs/presentation-common/hierarchy/Node.js +7 -5
  108. package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
  109. package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
  110. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js +11 -7
  111. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  112. package/lib/cjs/presentation-common/rules/ClassSpecifications.js +3 -3
  113. package/lib/cjs/presentation-common/rules/ClassSpecifications.js.map +1 -1
  114. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.d.ts +39 -11
  115. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.d.ts.map +1 -1
  116. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js +3 -3
  117. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
  118. package/lib/cjs/presentation-common/rules/RelationshipDirection.js +3 -3
  119. package/lib/cjs/presentation-common/rules/RelationshipDirection.js.map +1 -1
  120. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js +3 -3
  121. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  122. package/lib/cjs/presentation-common/rules/Rule.js +3 -3
  123. package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
  124. package/lib/cjs/presentation-common/rules/Ruleset.js +3 -3
  125. package/lib/cjs/presentation-common/rules/Ruleset.js.map +1 -1
  126. package/lib/cjs/presentation-common/rules/SchemasSpecification.js +3 -3
  127. package/lib/cjs/presentation-common/rules/SchemasSpecification.js.map +1 -1
  128. package/lib/cjs/presentation-common/rules/Variables.js +3 -3
  129. package/lib/cjs/presentation-common/rules/Variables.js.map +1 -1
  130. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js +3 -3
  131. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  132. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js +3 -3
  133. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  134. package/lib/cjs/presentation-common/rules/content/ContentRule.js +3 -3
  135. package/lib/cjs/presentation-common/rules/content/ContentRule.js.map +1 -1
  136. package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
  137. package/lib/cjs/presentation-common/rules/content/ContentSpecification.js +3 -3
  138. package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  139. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js +3 -3
  140. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  141. package/lib/cjs/presentation-common/rules/content/PropertySpecification.js +3 -3
  142. package/lib/cjs/presentation-common/rules/content/PropertySpecification.js.map +1 -1
  143. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js +3 -3
  144. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  145. package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js +3 -3
  146. package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
  147. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js +3 -3
  148. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  149. package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js +3 -3
  150. package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
  151. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js +3 -3
  152. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
  153. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts.map +1 -1
  154. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js +3 -3
  155. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  156. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js +3 -3
  157. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  158. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js +3 -3
  159. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
  160. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts +1 -5
  161. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts.map +1 -1
  162. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js +3 -3
  163. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  164. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js +3 -3
  165. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  166. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js +3 -3
  167. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  168. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js +3 -3
  169. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
  170. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
  171. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js +3 -3
  172. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  173. package/lib/cjs/presentation-common/rules/customization/LabelOverride.js +3 -3
  174. package/lib/cjs/presentation-common/rules/customization/LabelOverride.js.map +1 -1
  175. package/lib/cjs/presentation-common/rules/customization/SortingRule.js +3 -3
  176. package/lib/cjs/presentation-common/rules/customization/SortingRule.js.map +1 -1
  177. package/lib/cjs/presentation-common/rules/customization/StyleOverride.js +3 -3
  178. package/lib/cjs/presentation-common/rules/customization/StyleOverride.js.map +1 -1
  179. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js +3 -3
  180. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  181. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
  182. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js +3 -3
  183. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  184. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js +3 -3
  185. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  186. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js +3 -3
  187. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  188. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js +3 -3
  189. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  190. package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js +3 -3
  191. package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
  192. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js +3 -3
  193. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  194. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js +3 -3
  195. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  196. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js +3 -3
  197. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  198. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js +3 -3
  199. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  200. package/lib/cjs/presentation-common/selection/SelectionScope.js +3 -3
  201. package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
  202. package/lib/cjs/presentation-common.js +3 -3
  203. package/lib/cjs/presentation-common.js.map +1 -1
  204. package/lib/esm/presentation-common/AsyncTasks.d.ts.map +1 -1
  205. package/lib/esm/presentation-common/AsyncTasks.js +6 -4
  206. package/lib/esm/presentation-common/AsyncTasks.js.map +1 -1
  207. package/lib/esm/presentation-common/CommonLoggerCategory.js +3 -3
  208. package/lib/esm/presentation-common/CommonLoggerCategory.js.map +1 -1
  209. package/lib/esm/presentation-common/Diagnostics.d.ts.map +1 -1
  210. package/lib/esm/presentation-common/Diagnostics.js +27 -15
  211. package/lib/esm/presentation-common/Diagnostics.js.map +1 -1
  212. package/lib/esm/presentation-common/EC.d.ts +7 -4
  213. package/lib/esm/presentation-common/EC.d.ts.map +1 -1
  214. package/lib/esm/presentation-common/EC.js +22 -17
  215. package/lib/esm/presentation-common/EC.js.map +1 -1
  216. package/lib/esm/presentation-common/ElementProperties.js +3 -3
  217. package/lib/esm/presentation-common/ElementProperties.js.map +1 -1
  218. package/lib/esm/presentation-common/Error.d.ts.map +1 -1
  219. package/lib/esm/presentation-common/Error.js +5 -4
  220. package/lib/esm/presentation-common/Error.js.map +1 -1
  221. package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
  222. package/lib/esm/presentation-common/InstanceFilterDefinition.js +3 -3
  223. package/lib/esm/presentation-common/InstanceFilterDefinition.js.map +1 -1
  224. package/lib/esm/presentation-common/KeySet.d.ts.map +1 -1
  225. package/lib/esm/presentation-common/KeySet.js +80 -46
  226. package/lib/esm/presentation-common/KeySet.js.map +1 -1
  227. package/lib/esm/presentation-common/KoqPropertyValueFormatter.d.ts.map +1 -1
  228. package/lib/esm/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
  229. package/lib/esm/presentation-common/LabelDefinition.d.ts.map +1 -1
  230. package/lib/esm/presentation-common/LabelDefinition.js +5 -4
  231. package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
  232. package/lib/esm/presentation-common/LocalizationHelper.d.ts +1 -1
  233. package/lib/esm/presentation-common/LocalizationHelper.d.ts.map +1 -1
  234. package/lib/esm/presentation-common/LocalizationHelper.js +19 -2
  235. package/lib/esm/presentation-common/LocalizationHelper.js.map +1 -1
  236. package/lib/esm/presentation-common/PresentationIpcInterface.js +3 -3
  237. package/lib/esm/presentation-common/PresentationIpcInterface.js.map +1 -1
  238. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  239. package/lib/esm/presentation-common/PresentationManagerOptions.js +3 -3
  240. package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
  241. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  242. package/lib/esm/presentation-common/PresentationRpcInterface.js +53 -21
  243. package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
  244. package/lib/esm/presentation-common/RegisteredRuleset.d.ts.map +1 -1
  245. package/lib/esm/presentation-common/RegisteredRuleset.js +21 -9
  246. package/lib/esm/presentation-common/RegisteredRuleset.js.map +1 -1
  247. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts +1 -1
  248. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  249. package/lib/esm/presentation-common/RpcRequestsHandler.js +20 -16
  250. package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
  251. package/lib/esm/presentation-common/RulesetVariables.d.ts.map +1 -1
  252. package/lib/esm/presentation-common/RulesetVariables.js +7 -5
  253. package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
  254. package/lib/esm/presentation-common/RulesetsFactory.d.ts.map +1 -1
  255. package/lib/esm/presentation-common/RulesetsFactory.js +42 -26
  256. package/lib/esm/presentation-common/RulesetsFactory.js.map +1 -1
  257. package/lib/esm/presentation-common/Update.d.ts.map +1 -1
  258. package/lib/esm/presentation-common/Update.js +4 -3
  259. package/lib/esm/presentation-common/Update.js.map +1 -1
  260. package/lib/esm/presentation-common/Utils.js +3 -3
  261. package/lib/esm/presentation-common/Utils.js.map +1 -1
  262. package/lib/esm/presentation-common/content/Category.js +3 -3
  263. package/lib/esm/presentation-common/content/Category.js.map +1 -1
  264. package/lib/esm/presentation-common/content/Content.d.ts.map +1 -1
  265. package/lib/esm/presentation-common/content/Content.js +10 -9
  266. package/lib/esm/presentation-common/content/Content.js.map +1 -1
  267. package/lib/esm/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  268. package/lib/esm/presentation-common/content/ContentTraverser.js +47 -25
  269. package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
  270. package/lib/esm/presentation-common/content/Descriptor.d.ts.map +1 -1
  271. package/lib/esm/presentation-common/content/Descriptor.js +56 -21
  272. package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
  273. package/lib/esm/presentation-common/content/DisplayTypes.js +3 -3
  274. package/lib/esm/presentation-common/content/DisplayTypes.js.map +1 -1
  275. package/lib/esm/presentation-common/content/Editor.js +3 -3
  276. package/lib/esm/presentation-common/content/Editor.js.map +1 -1
  277. package/lib/esm/presentation-common/content/Fields.d.ts +78 -2
  278. package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
  279. package/lib/esm/presentation-common/content/Fields.js +198 -44
  280. package/lib/esm/presentation-common/content/Fields.js.map +1 -1
  281. package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
  282. package/lib/esm/presentation-common/content/Item.js +8 -6
  283. package/lib/esm/presentation-common/content/Item.js.map +1 -1
  284. package/lib/esm/presentation-common/content/Property.d.ts +1 -1
  285. package/lib/esm/presentation-common/content/Property.d.ts.map +1 -1
  286. package/lib/esm/presentation-common/content/Property.js +4 -4
  287. package/lib/esm/presentation-common/content/Property.js.map +1 -1
  288. package/lib/esm/presentation-common/content/PropertyValueFormatter.d.ts +6 -1
  289. package/lib/esm/presentation-common/content/PropertyValueFormatter.d.ts.map +1 -1
  290. package/lib/esm/presentation-common/content/PropertyValueFormatter.js +39 -11
  291. package/lib/esm/presentation-common/content/PropertyValueFormatter.js.map +1 -1
  292. package/lib/esm/presentation-common/content/Renderer.js +3 -3
  293. package/lib/esm/presentation-common/content/Renderer.js.map +1 -1
  294. package/lib/esm/presentation-common/content/TypeDescription.js +3 -3
  295. package/lib/esm/presentation-common/content/TypeDescription.js.map +1 -1
  296. package/lib/esm/presentation-common/content/Value.d.ts.map +1 -1
  297. package/lib/esm/presentation-common/content/Value.js +46 -30
  298. package/lib/esm/presentation-common/content/Value.js.map +1 -1
  299. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js +3 -3
  300. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
  301. package/lib/esm/presentation-common/hierarchy/Key.d.ts.map +1 -1
  302. package/lib/esm/presentation-common/hierarchy/Key.js +14 -8
  303. package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
  304. package/lib/esm/presentation-common/hierarchy/Node.d.ts.map +1 -1
  305. package/lib/esm/presentation-common/hierarchy/Node.js +7 -5
  306. package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
  307. package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
  308. package/lib/esm/presentation-common/hierarchy/NodePathElement.js +11 -7
  309. package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  310. package/lib/esm/presentation-common/rules/ClassSpecifications.js +3 -3
  311. package/lib/esm/presentation-common/rules/ClassSpecifications.js.map +1 -1
  312. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.d.ts +39 -11
  313. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.d.ts.map +1 -1
  314. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js +3 -3
  315. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
  316. package/lib/esm/presentation-common/rules/RelationshipDirection.js +3 -3
  317. package/lib/esm/presentation-common/rules/RelationshipDirection.js.map +1 -1
  318. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js +3 -3
  319. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  320. package/lib/esm/presentation-common/rules/Rule.js +3 -3
  321. package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
  322. package/lib/esm/presentation-common/rules/Ruleset.js +3 -3
  323. package/lib/esm/presentation-common/rules/Ruleset.js.map +1 -1
  324. package/lib/esm/presentation-common/rules/SchemasSpecification.js +3 -3
  325. package/lib/esm/presentation-common/rules/SchemasSpecification.js.map +1 -1
  326. package/lib/esm/presentation-common/rules/Variables.js +3 -3
  327. package/lib/esm/presentation-common/rules/Variables.js.map +1 -1
  328. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js +3 -3
  329. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  330. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js +3 -3
  331. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  332. package/lib/esm/presentation-common/rules/content/ContentRule.js +3 -3
  333. package/lib/esm/presentation-common/rules/content/ContentRule.js.map +1 -1
  334. package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
  335. package/lib/esm/presentation-common/rules/content/ContentSpecification.js +3 -3
  336. package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  337. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js +3 -3
  338. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  339. package/lib/esm/presentation-common/rules/content/PropertySpecification.js +3 -3
  340. package/lib/esm/presentation-common/rules/content/PropertySpecification.js.map +1 -1
  341. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js +3 -3
  342. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  343. package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js +3 -3
  344. package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
  345. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js +3 -3
  346. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  347. package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js +3 -3
  348. package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
  349. package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js +3 -3
  350. package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
  351. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts.map +1 -1
  352. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js +3 -3
  353. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  354. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js +3 -3
  355. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  356. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js +3 -3
  357. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
  358. package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts +1 -5
  359. package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts.map +1 -1
  360. package/lib/esm/presentation-common/rules/customization/CustomizationRule.js +3 -3
  361. package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  362. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js +3 -3
  363. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  364. package/lib/esm/presentation-common/rules/customization/GroupingRule.js +3 -3
  365. package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  366. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js +3 -3
  367. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
  368. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
  369. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js +3 -3
  370. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  371. package/lib/esm/presentation-common/rules/customization/LabelOverride.js +3 -3
  372. package/lib/esm/presentation-common/rules/customization/LabelOverride.js.map +1 -1
  373. package/lib/esm/presentation-common/rules/customization/SortingRule.js +3 -3
  374. package/lib/esm/presentation-common/rules/customization/SortingRule.js.map +1 -1
  375. package/lib/esm/presentation-common/rules/customization/StyleOverride.js +3 -3
  376. package/lib/esm/presentation-common/rules/customization/StyleOverride.js.map +1 -1
  377. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js +3 -3
  378. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  379. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
  380. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js +3 -3
  381. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  382. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js +3 -3
  383. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  384. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js +3 -3
  385. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  386. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js +3 -3
  387. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  388. package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js +3 -3
  389. package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
  390. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js +3 -3
  391. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  392. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js +3 -3
  393. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  394. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js +3 -3
  395. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  396. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js +3 -3
  397. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  398. package/lib/esm/presentation-common/selection/SelectionScope.js +3 -3
  399. package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
  400. package/lib/esm/presentation-common.js +3 -3
  401. package/lib/esm/presentation-common.js.map +1 -1
  402. package/lib/public/locales/en/Presentation.json +19 -19
  403. package/package.json +14 -11
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module Core
8
8
  */
@@ -13,6 +13,7 @@ const Node_1 = require("./hierarchy/Node");
13
13
  /** @alpha */
14
14
  exports.UPDATE_FULL = "FULL";
15
15
  /** @public */
16
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
16
17
  var PartialHierarchyModification;
17
18
  (function (PartialHierarchyModification) {
18
19
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Update.js","sourceRoot":"","sources":["../../../src/presentation-common/Update.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yCAAuD;AACvD,2CAAgF;AAEhF,aAAa;AACA,QAAA,WAAW,GAAG,MAAM,CAAC;AAgClC,cAAc;AACd,IAAiB,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,aAAO,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;oBACzE,QAAQ,EAAE,GAAG,CAAC,QAAQ;oBACtB,mDAAmD;oBACnD,IAAI,EAAE,WAA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C,OAAO,CAAC;iBAC5C,CAAC;YAEJ,KAAK,QAAQ;gBACX,OAAO;oBACL,IAAI,EAAE,QAAQ;oBACd,mDAAmD;oBACnD,MAAM,EAAE,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAO,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,GAA5B,oCAA4B,KAA5B,oCAA4B,QAsE5C;AA6GD,cAAc;AACd,IAAiB,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,GAApB,4BAAoB,KAApB,4BAAoB,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\nexport namespace PartialHierarchyModification { // eslint-disable-line @typescript-eslint/no-redeclare\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
+ {"version":3,"file":"Update.js","sourceRoot":"","sources":["../../../src/presentation-common/Update.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,yCAAuD;AACvD,2CAAgF;AAEhF,aAAa;AACA,QAAA,WAAW,GAAG,MAAM,CAAC;AAgClC,cAAc;AACd,2DAA2D;AAC3D,IAAiB,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,aAAO,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;oBACzE,QAAQ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,MAAM,CAAC;oBACrC,OAAO,EAAE,WAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC;iBAC5C,CAAC;YAEJ,KAAK,QAAQ;gBACX,OAAO;oBACL,IAAI,EAAE,QAAQ;oBACd,mDAAmD;oBACnD,MAAM,EAAE,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAO,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,GAA5B,oCAA4B,KAA5B,oCAA4B,QAsE5C;AA6GD,cAAc;AACd,IAAiB,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,GAApB,4BAAoB,KAApB,4BAAoB,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 */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace PartialHierarchyModification {\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,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module Core
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../src/presentation-common/Utils.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yCAA0C;AA8C1C;;;;;;;;;;;GAWG;AACI,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,aAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE;YACnC,KAAK,IAAI,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC;SAClC;aAAM,IAAI,aAAO,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;AAVW,QAAA,iBAAiB,qBAU5B;AAEF;;;;;GAKG;AACU,QAAA,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
+ {"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../src/presentation-common/Utils.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,yCAA0C;AA8C1C;;;;;;;;;;;GAWG;AACI,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,aAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE;YACnC,KAAK,IAAI,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC;SAClC;aAAM,IAAI,aAAO,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;AAVW,QAAA,iBAAiB,qBAU5B;AAEF;;;;;GAKG;AACU,QAAA,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,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module Content
8
8
  */
@@ -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,IAAiB,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,GAAnB,2BAAmB,KAAnB,2BAAmB,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
+ {"version":3,"file":"Category.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Category.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAwBH,cAAc;AACd,IAAiB,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,GAAnB,2BAAmB,KAAnB,2BAAmB,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 +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,CA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AG,GAAG,GAAG;CAGpD"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module Content
8
8
  */
@@ -31,16 +31,17 @@ class Content {
31
31
  }
32
32
  /** Deserialize [[Content]] from JSON */
33
33
  static fromJSON(json) {
34
- if (!json)
34
+ if (!json) {
35
35
  return undefined;
36
- if (typeof json === "string")
36
+ }
37
+ if (typeof json === "string") {
37
38
  return JSON.parse(json, (key, value) => Content.reviver(key, value));
39
+ }
38
40
  const descriptor = Descriptor_1.Descriptor.fromJSON(json.descriptor);
39
- if (!descriptor)
41
+ if (!descriptor) {
40
42
  return undefined;
41
- const contentSet = json.contentSet
42
- .map((itemJson) => Item_1.Item.fromJSON(itemJson))
43
- .filter((item) => (item !== undefined));
43
+ }
44
+ const contentSet = json.contentSet.map((itemJson) => Item_1.Item.fromJSON(itemJson)).filter((item) => item !== undefined);
44
45
  return new Content(descriptor, contentSet);
45
46
  }
46
47
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Content.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,6CAA0D;AAC1D,iCAAwC;AAWxC;;;;;GAKG;AACH,MAAa,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;YACP,OAAO,SAAS,CAAC;QAEnB,IAAI,OAAO,IAAI,KAAK,QAAQ;YAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;QAEvE,MAAM,UAAU,GAAG,uBAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxD,IAAI,CAAC,UAAU;YACb,OAAO,SAAS,CAAC;QAEnB,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU;aAC/B,GAAG,CAAC,CAAC,QAAkB,EAAE,EAAE,CAAC,WAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;aACpD,MAAM,CAAO,CAAC,IAAI,EAAgB,EAAE,CAAC,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;AA/CD,0BA+CC","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 if (typeof json === \"string\")\r\n return JSON.parse(json, (key, value) => Content.reviver(key, value));\r\n\r\n const descriptor = Descriptor.fromJSON(json.descriptor);\r\n if (!descriptor)\r\n return undefined;\r\n\r\n const contentSet = json.contentSet\r\n .map((itemJson: ItemJSON) => Item.fromJSON(itemJson))\r\n .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
+ {"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Content.ts"],"names":[],"mappings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ACI,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;AAhDD,0BAgDC","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\n if (typeof json === \"string\") {\n return JSON.parse(json, (key, value) => Content.reviver(key, value));\n }\n\n const descriptor = Descriptor.fromJSON(json.descriptor);\n if (!descriptor) {\n return undefined;\n }\n\n const contentSet = json.contentSet.map((itemJson: ItemJSON) => Item.fromJSON(itemJson)).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 +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,EAAE,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,UAAU,EAAE,UAAU,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;OAGG;IACH,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,mDAAmD;IACnD,IAAI,EAAE,IAAI,CAAC;CACZ;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,uDAAuD;IACvD,QAAQ,EAAE,mBAAmB,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,4CAA4C;IAC5C,SAAS,EAAE,cAAc,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,W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,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,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,EAAE,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,UAAU,EAAE,UAAU,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;OAGG;IACH,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,mDAAmD;IACnD,IAAI,EAAE,IAAI,C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BAAmB,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,8 +1,8 @@
1
1
  "use strict";
2
2
  /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
6
  /** @packageDocumentation
7
7
  * @module Content
8
8
  */
@@ -19,8 +19,9 @@ const Value_1 = require("./Value");
19
19
  * @public
20
20
  */
21
21
  function traverseFieldHierarchy(hierarchy, cb) {
22
- if (cb(hierarchy))
22
+ if (cb(hierarchy)) {
23
23
  hierarchy.childFields.forEach((childHierarchy) => traverseFieldHierarchy(childHierarchy, cb));
24
+ }
24
25
  }
25
26
  exports.traverseFieldHierarchy = traverseFieldHierarchy;
26
27
  /**
@@ -29,8 +30,9 @@ exports.traverseFieldHierarchy = traverseFieldHierarchy;
29
30
  * @public
30
31
  */
31
32
  function traverseContent(visitor, content) {
32
- if (!visitor.startContent({ descriptor: content.descriptor }))
33
+ if (!visitor.startContent({ descriptor: content.descriptor })) {
33
34
  return;
35
+ }
34
36
  try {
35
37
  const fieldHierarchies = createFieldHierarchies(content.descriptor.fields);
36
38
  visitor.processFieldHierarchies({ hierarchies: fieldHierarchies });
@@ -74,19 +76,24 @@ class VisitedCategories {
74
76
  }
75
77
  }
76
78
  dispose() {
77
- while (this._visitedCategories.pop())
79
+ while (this._visitedCategories.pop()) {
78
80
  this._visitor.finishCategory();
81
+ }
82
+ }
83
+ get shouldContinue() {
84
+ return this._didVisitAllHierarchy;
79
85
  }
80
- get shouldContinue() { return this._didVisitAllHierarchy; }
81
86
  }
82
87
  function traverseContentItemFields(visitor, fieldHierarchies, item) {
83
- if (!visitor.startItem({ item }))
88
+ if (!visitor.startItem({ item })) {
84
89
  return;
90
+ }
85
91
  try {
86
92
  fieldHierarchies.forEach((fieldHierarchy) => {
87
93
  (0, core_bentley_1.using)(new VisitedCategories(visitor, fieldHierarchy.field.category), (res) => {
88
- if (res.shouldContinue)
94
+ if (res.shouldContinue) {
89
95
  traverseContentItemField(visitor, fieldHierarchy, item);
96
+ }
90
97
  });
91
98
  });
92
99
  }
@@ -95,8 +102,9 @@ function traverseContentItemFields(visitor, fieldHierarchies, item) {
95
102
  }
96
103
  }
97
104
  function traverseContentItemField(visitor, fieldHierarchy, item) {
98
- if (!visitor.startField({ hierarchy: fieldHierarchy }))
105
+ if (!visitor.startField({ hierarchy: fieldHierarchy })) {
99
106
  return;
107
+ }
100
108
  try {
101
109
  const rootToThisField = createFieldPath(fieldHierarchy.field);
102
110
  let parentFieldName;
@@ -109,8 +117,9 @@ function traverseContentItemField(visitor, fieldHierarchy, item) {
109
117
  return;
110
118
  }
111
119
  const { emptyNestedItem, convertedItem } = convertNestedContentItemToStructArrayItem(item, parentField, nextField);
112
- if (emptyNestedItem)
120
+ if (emptyNestedItem) {
113
121
  return;
122
+ }
114
123
  item = convertedItem;
115
124
  parentFieldName = combineFieldNames(parentField.name, parentFieldName);
116
125
  }
@@ -121,8 +130,9 @@ function traverseContentItemField(visitor, fieldHierarchy, item) {
121
130
  if (fieldHierarchy.field.isNestedContentField()) {
122
131
  fieldHierarchy = convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy, parentFieldName);
123
132
  const { emptyNestedItem, convertedItem } = convertNestedContentFieldHierarchyItemToStructArrayItem(item, fieldHierarchy);
124
- if (emptyNestedItem)
133
+ if (emptyNestedItem) {
125
134
  return;
135
+ }
126
136
  item = convertedItem;
127
137
  }
128
138
  else if (pathUpToField.length > 0) {
@@ -161,8 +171,9 @@ function traverseContentItemFieldValue(visitor, fieldHierarchy, mergedFieldNames
161
171
  function traverseContentItemArrayFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValues, displayValues) {
162
172
  (0, core_bentley_1.assert)(rawValues.length === displayValues.length);
163
173
  (0, core_bentley_1.assert)(valueType.valueFormat === TypeDescription_1.PropertyValueFormat.Array);
164
- if (!visitor.startArray({ hierarchy: fieldHierarchy, valueType, parentFieldName, rawValues, displayValues }))
174
+ if (!visitor.startArray({ hierarchy: fieldHierarchy, valueType, parentFieldName, rawValues, displayValues })) {
165
175
  return;
176
+ }
166
177
  try {
167
178
  const itemType = valueType.memberType;
168
179
  rawValues.forEach((_, i) => {
@@ -175,11 +186,13 @@ function traverseContentItemArrayFieldValue(visitor, fieldHierarchy, mergedField
175
186
  }
176
187
  function traverseContentItemStructFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValues, displayValues) {
177
188
  (0, core_bentley_1.assert)(valueType.valueFormat === TypeDescription_1.PropertyValueFormat.Struct);
178
- if (!visitor.startStruct({ hierarchy: fieldHierarchy, valueType, parentFieldName, rawValues, displayValues }))
189
+ if (!visitor.startStruct({ hierarchy: fieldHierarchy, valueType, parentFieldName, rawValues, displayValues })) {
179
190
  return;
191
+ }
180
192
  try {
181
- if (fieldHierarchy.field.isNestedContentField())
193
+ if (fieldHierarchy.field.isNestedContentField()) {
182
194
  parentFieldName = combineFieldNames(fieldHierarchy.field.name, parentFieldName);
195
+ }
183
196
  valueType.members.forEach((memberDescription) => {
184
197
  let memberField = fieldHierarchy.childFields.find((f) => f.field.name === memberDescription.name);
185
198
  if (!memberField) {
@@ -219,11 +232,12 @@ function createFieldHierarchies(fields, ignoreCategories) {
219
232
  if (field.isNestedContentField()) {
220
233
  // visit all nested fields
221
234
  childFields = visitFields(field.nestedFields, field);
222
- if (0 === childFields.length)
235
+ if (0 === childFields.length) {
223
236
  return undefined;
237
+ }
224
238
  }
225
239
  const fieldHierarchy = { field, childFields };
226
- if (category === parentField?.category || ignoreCategories && parentField) {
240
+ if (category === parentField?.category || (ignoreCategories && parentField)) {
227
241
  // if categories of this field and its parent field match - return the field hierarchy without
228
242
  // including it as a top level field
229
243
  return fieldHierarchy;
@@ -235,8 +249,9 @@ function createFieldHierarchies(fields, ignoreCategories) {
235
249
  const includedFields = [];
236
250
  visitedFields.forEach((field) => {
237
251
  const visitedField = visitField(field.category, field, parentField);
238
- if (visitedField)
252
+ if (visitedField) {
239
253
  includedFields.push(visitedField);
254
+ }
240
255
  });
241
256
  return includedFields;
242
257
  };
@@ -296,10 +311,12 @@ function mergeHierarchies(lhs, rhs) {
296
311
  };
297
312
  rhs.childFields.forEach((rhsChildHierarchy) => {
298
313
  const indexInResult = result.childFields.findIndex((resultHierarchy) => resultHierarchy.field.name === rhsChildHierarchy.field.name);
299
- if (indexInResult !== -1)
314
+ if (indexInResult !== -1) {
300
315
  result.childFields[indexInResult] = mergeHierarchies(result.childFields[indexInResult], rhsChildHierarchy);
301
- else
316
+ }
317
+ else {
302
318
  result.childFields.push(rhsChildHierarchy);
319
+ }
303
320
  });
304
321
  return result;
305
322
  }
@@ -352,8 +369,9 @@ exports.parseCombinedFieldNames = parseCombinedFieldNames;
352
369
  function convertNestedContentItemToStructArrayItem(item, field, nextField) {
353
370
  const value = item.values[field.name] ?? [];
354
371
  (0, core_bentley_1.assert)(Value_1.Value.isNestedContent(value));
355
- if (value.length === 0)
372
+ if (value.length === 0) {
356
373
  return { emptyNestedItem: true, convertedItem: item };
374
+ }
357
375
  const nextFieldValues = { raw: [], display: [] };
358
376
  value.forEach((ncv) => {
359
377
  const nextRawValue = ncv.values[nextField.name];
@@ -369,14 +387,16 @@ function convertNestedContentItemToStructArrayItem(item, field, nextField) {
369
387
  nextFieldValues.display.push(nextDisplayValue);
370
388
  }
371
389
  });
372
- const convertedItem = new Item_1.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
390
+ const convertedItem = new Item_1.Item(item.primaryKeys, item.label, item.imageId, // eslint-disable-line deprecation/deprecation
391
+ item.classInfo, { [nextField.name]: nextFieldValues.raw }, { [nextField.name]: nextFieldValues.display }, item.mergedFieldNames, item.extendedData);
373
392
  return { emptyNestedItem: false, convertedItem };
374
393
  }
375
394
  function convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy, parentFieldName) {
376
395
  const fieldName = fieldHierarchy.field.name;
377
396
  const convertedChildFieldHierarchies = fieldHierarchy.childFields.map((child) => {
378
- if (child.field.isNestedContentField())
397
+ if (child.field.isNestedContentField()) {
379
398
  return convertNestedContentFieldHierarchyToStructArrayHierarchy(child, combineFieldNames(fieldName, parentFieldName));
399
+ }
380
400
  return child;
381
401
  });
382
402
  const convertedFieldHierarchy = {
@@ -429,10 +449,12 @@ function convertNestedContentFieldHierarchyItemToStructArrayItem(item, fieldHier
429
449
  const fieldName = fieldHierarchy.field.name;
430
450
  const rawValue = item.values[fieldName];
431
451
  (0, core_bentley_1.assert)(Value_1.Value.isNestedContent(rawValue));
432
- if (rawValue.length === 0)
452
+ if (rawValue.length === 0) {
433
453
  return { emptyNestedItem: true, convertedItem: item };
454
+ }
434
455
  const converted = convertNestedContentValuesToStructArrayValuesRecursive(fieldHierarchy, rawValue);
435
- const convertedItem = new Item_1.Item(item.primaryKeys, item.label, item.imageId, item.classInfo, { [fieldName]: converted.raw }, { [fieldName]: converted.display }, converted.mergedFieldNames, item.extendedData); // eslint-disable-line deprecation/deprecation
456
+ const convertedItem = new Item_1.Item(item.primaryKeys, item.label, item.imageId, // eslint-disable-line deprecation/deprecation
457
+ item.classInfo, { [fieldName]: converted.raw }, { [fieldName]: converted.display }, converted.mergedFieldNames, item.extendedData);
436
458
  return { emptyNestedItem: false, convertedItem };
437
459
  }
438
460
  //# sourceMappingURL=ContentTraverser.js.map