@itwin/presentation-common 3.5.0-dev.4 → 3.5.0-dev.43

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 (468) hide show
  1. package/CHANGELOG.md +41 -1
  2. package/lib/cjs/assets/locales/en/BisCore.json +18 -18
  3. package/lib/cjs/assets/locales/en/ECPresentation.json +9 -9
  4. package/lib/cjs/assets/locales/en/RulesEngine.json +5 -5
  5. package/lib/cjs/presentation-common/AsyncTasks.d.ts +22 -22
  6. package/lib/cjs/presentation-common/AsyncTasks.js +38 -38
  7. package/lib/cjs/presentation-common/AsyncTasks.js.map +1 -1
  8. package/lib/cjs/presentation-common/CommonLoggerCategory.d.ts +12 -12
  9. package/lib/cjs/presentation-common/CommonLoggerCategory.js +20 -20
  10. package/lib/cjs/presentation-common/CommonLoggerCategory.js.map +1 -1
  11. package/lib/cjs/presentation-common/Diagnostics.d.ts +125 -125
  12. package/lib/cjs/presentation-common/Diagnostics.js +72 -72
  13. package/lib/cjs/presentation-common/Diagnostics.js.map +1 -1
  14. package/lib/cjs/presentation-common/EC.d.ts +315 -315
  15. package/lib/cjs/presentation-common/EC.js +270 -270
  16. package/lib/cjs/presentation-common/EC.js.map +1 -1
  17. package/lib/cjs/presentation-common/ElementProperties.d.ts +123 -123
  18. package/lib/cjs/presentation-common/ElementProperties.js +9 -9
  19. package/lib/cjs/presentation-common/ElementProperties.js.map +1 -1
  20. package/lib/cjs/presentation-common/Error.d.ts +45 -45
  21. package/lib/cjs/presentation-common/Error.js +62 -62
  22. package/lib/cjs/presentation-common/Error.js.map +1 -1
  23. package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts +61 -0
  24. package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts.map +1 -0
  25. package/lib/cjs/presentation-common/InstanceFilterDefinition.js +10 -0
  26. package/lib/cjs/presentation-common/InstanceFilterDefinition.js.map +1 -0
  27. package/lib/cjs/presentation-common/KeySet.d.ts +146 -146
  28. package/lib/cjs/presentation-common/KeySet.js +418 -418
  29. package/lib/cjs/presentation-common/KeySet.js.map +1 -1
  30. package/lib/cjs/presentation-common/LabelDefinition.d.ts +79 -79
  31. package/lib/cjs/presentation-common/LabelDefinition.js +76 -76
  32. package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
  33. package/lib/cjs/presentation-common/LocalizationHelper.d.ts +29 -29
  34. package/lib/cjs/presentation-common/LocalizationHelper.js +110 -110
  35. package/lib/cjs/presentation-common/LocalizationHelper.js.map +1 -1
  36. package/lib/cjs/presentation-common/PresentationIpcInterface.d.ts +37 -37
  37. package/lib/cjs/presentation-common/PresentationIpcInterface.js +12 -12
  38. package/lib/cjs/presentation-common/PresentationIpcInterface.js.map +1 -1
  39. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts +242 -242
  40. package/lib/cjs/presentation-common/PresentationManagerOptions.js +23 -23
  41. package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
  42. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts +181 -181
  43. package/lib/cjs/presentation-common/PresentationRpcInterface.js +102 -102
  44. package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
  45. package/lib/cjs/presentation-common/RegisteredRuleset.d.ts +26 -26
  46. package/lib/cjs/presentation-common/RegisteredRuleset.js +33 -33
  47. package/lib/cjs/presentation-common/RegisteredRuleset.js.map +1 -1
  48. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts +82 -82
  49. package/lib/cjs/presentation-common/RpcRequestsHandler.js +155 -155
  50. package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
  51. package/lib/cjs/presentation-common/RulesetVariables.d.ts +166 -166
  52. package/lib/cjs/presentation-common/RulesetVariables.js +55 -55
  53. package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
  54. package/lib/cjs/presentation-common/RulesetsFactory.d.ts +44 -44
  55. package/lib/cjs/presentation-common/RulesetsFactory.js +223 -223
  56. package/lib/cjs/presentation-common/RulesetsFactory.js.map +1 -1
  57. package/lib/cjs/presentation-common/Update.d.ts +194 -194
  58. package/lib/cjs/presentation-common/Update.js +196 -196
  59. package/lib/cjs/presentation-common/Update.js.map +1 -1
  60. package/lib/cjs/presentation-common/Utils.d.ts +64 -64
  61. package/lib/cjs/presentation-common/Utils.js +45 -45
  62. package/lib/cjs/presentation-common/Utils.js.map +1 -1
  63. package/lib/cjs/presentation-common/content/Category.d.ts +49 -49
  64. package/lib/cjs/presentation-common/content/Category.js +49 -49
  65. package/lib/cjs/presentation-common/content/Category.js.map +1 -1
  66. package/lib/cjs/presentation-common/content/Content.d.ts +38 -38
  67. package/lib/cjs/presentation-common/content/Content.js +56 -56
  68. package/lib/cjs/presentation-common/content/Content.js.map +1 -1
  69. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts +101 -101
  70. package/lib/cjs/presentation-common/content/ContentTraverser.js +420 -420
  71. package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
  72. package/lib/cjs/presentation-common/content/Descriptor.d.ts +240 -240
  73. package/lib/cjs/presentation-common/content/Descriptor.js +189 -189
  74. package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
  75. package/lib/cjs/presentation-common/content/DisplayTypes.d.ts +21 -21
  76. package/lib/cjs/presentation-common/content/DisplayTypes.js +29 -29
  77. package/lib/cjs/presentation-common/content/DisplayTypes.js.map +1 -1
  78. package/lib/cjs/presentation-common/content/Editor.d.ts +15 -15
  79. package/lib/cjs/presentation-common/content/Editor.js +9 -9
  80. package/lib/cjs/presentation-common/content/Editor.js.map +1 -1
  81. package/lib/cjs/presentation-common/content/Fields.d.ts +282 -282
  82. package/lib/cjs/presentation-common/content/Fields.js +394 -394
  83. package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
  84. package/lib/cjs/presentation-common/content/Item.d.ts +87 -87
  85. package/lib/cjs/presentation-common/content/Item.js +86 -86
  86. package/lib/cjs/presentation-common/content/Item.js.map +1 -1
  87. package/lib/cjs/presentation-common/content/Property.d.ts +51 -51
  88. package/lib/cjs/presentation-common/content/Property.js +36 -36
  89. package/lib/cjs/presentation-common/content/Property.js.map +1 -1
  90. package/lib/cjs/presentation-common/content/Renderer.d.ts +11 -11
  91. package/lib/cjs/presentation-common/content/Renderer.js +9 -9
  92. package/lib/cjs/presentation-common/content/Renderer.js.map +1 -1
  93. package/lib/cjs/presentation-common/content/TypeDescription.d.ts +72 -72
  94. package/lib/cjs/presentation-common/content/TypeDescription.js +23 -23
  95. package/lib/cjs/presentation-common/content/TypeDescription.js.map +1 -1
  96. package/lib/cjs/presentation-common/content/Value.d.ts +157 -157
  97. package/lib/cjs/presentation-common/content/Value.js +217 -217
  98. package/lib/cjs/presentation-common/content/Value.js.map +1 -1
  99. package/lib/cjs/presentation-common/hierarchy/Key.d.ts +185 -185
  100. package/lib/cjs/presentation-common/hierarchy/Key.js +112 -112
  101. package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
  102. package/lib/cjs/presentation-common/hierarchy/Node.d.ts +141 -141
  103. package/lib/cjs/presentation-common/hierarchy/Node.js +97 -97
  104. package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
  105. package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts +85 -85
  106. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js +98 -98
  107. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  108. package/lib/cjs/presentation-common/rules/ClassSpecifications.d.ts +45 -45
  109. package/lib/cjs/presentation-common/rules/ClassSpecifications.js +9 -9
  110. package/lib/cjs/presentation-common/rules/ClassSpecifications.js.map +1 -1
  111. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.d.ts +31 -31
  112. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js +9 -9
  113. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
  114. package/lib/cjs/presentation-common/rules/RelationshipDirection.d.ts +13 -13
  115. package/lib/cjs/presentation-common/rules/RelationshipDirection.js +21 -21
  116. package/lib/cjs/presentation-common/rules/RelationshipDirection.js.map +1 -1
  117. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts +53 -53
  118. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js +9 -9
  119. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  120. package/lib/cjs/presentation-common/rules/Rule.d.ts +74 -74
  121. package/lib/cjs/presentation-common/rules/Rule.js +35 -35
  122. package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
  123. package/lib/cjs/presentation-common/rules/Ruleset.d.ts +66 -66
  124. package/lib/cjs/presentation-common/rules/Ruleset.js +9 -9
  125. package/lib/cjs/presentation-common/rules/Ruleset.js.map +1 -1
  126. package/lib/cjs/presentation-common/rules/SchemasSpecification.d.ts +41 -41
  127. package/lib/cjs/presentation-common/rules/SchemasSpecification.js +9 -9
  128. package/lib/cjs/presentation-common/rules/SchemasSpecification.js.map +1 -1
  129. package/lib/cjs/presentation-common/rules/Variables.d.ts +55 -55
  130. package/lib/cjs/presentation-common/rules/Variables.js +25 -25
  131. package/lib/cjs/presentation-common/rules/Variables.js.map +1 -1
  132. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +41 -41
  133. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js +9 -9
  134. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  135. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +25 -25
  136. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js +9 -9
  137. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  138. package/lib/cjs/presentation-common/rules/content/ContentRule.d.ts +30 -30
  139. package/lib/cjs/presentation-common/rules/content/ContentRule.js +9 -9
  140. package/lib/cjs/presentation-common/rules/content/ContentRule.js.map +1 -1
  141. package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts +55 -55
  142. package/lib/cjs/presentation-common/rules/content/ContentSpecification.js +20 -20
  143. package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  144. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +19 -19
  145. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js +9 -9
  146. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  147. package/lib/cjs/presentation-common/rules/content/PropertySpecification.d.ts +86 -86
  148. package/lib/cjs/presentation-common/rules/content/PropertySpecification.js +9 -9
  149. package/lib/cjs/presentation-common/rules/content/PropertySpecification.js.map +1 -1
  150. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +28 -28
  151. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js +9 -9
  152. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  153. package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts +25 -25
  154. package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js +9 -9
  155. package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
  156. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.d.ts +57 -57
  157. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js +9 -9
  158. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  159. package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.d.ts +17 -17
  160. package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js +9 -9
  161. package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
  162. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts +107 -107
  163. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js +9 -9
  164. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
  165. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +105 -105
  166. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js +21 -21
  167. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  168. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +93 -93
  169. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js +43 -43
  170. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  171. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts +44 -44
  172. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js +9 -9
  173. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
  174. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts +36 -36
  175. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js +9 -9
  176. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  177. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.d.ts +27 -27
  178. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js +9 -9
  179. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  180. package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts +200 -200
  181. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js +51 -51
  182. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  183. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts +29 -29
  184. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js +9 -9
  185. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
  186. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts +156 -156
  187. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js +25 -25
  188. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  189. package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts +40 -40
  190. package/lib/cjs/presentation-common/rules/customization/LabelOverride.js +9 -9
  191. package/lib/cjs/presentation-common/rules/customization/LabelOverride.js.map +1 -1
  192. package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts +58 -58
  193. package/lib/cjs/presentation-common/rules/customization/SortingRule.js +9 -9
  194. package/lib/cjs/presentation-common/rules/customization/SortingRule.js.map +1 -1
  195. package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts +48 -48
  196. package/lib/cjs/presentation-common/rules/customization/StyleOverride.js +9 -9
  197. package/lib/cjs/presentation-common/rules/customization/StyleOverride.js.map +1 -1
  198. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +15 -15
  199. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js +9 -9
  200. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  201. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +97 -97
  202. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js +22 -22
  203. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  204. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +31 -31
  205. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js +9 -9
  206. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  207. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +76 -76
  208. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js +19 -19
  209. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  210. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +39 -39
  211. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js +9 -9
  212. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  213. package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.d.ts +50 -50
  214. package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js +9 -9
  215. package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
  216. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +27 -27
  217. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js +9 -9
  218. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  219. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +27 -27
  220. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js +9 -9
  221. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  222. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.d.ts +17 -17
  223. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js +9 -9
  224. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  225. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.d.ts +36 -36
  226. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js +9 -9
  227. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  228. package/lib/cjs/presentation-common/selection/SelectionScope.d.ts +25 -25
  229. package/lib/cjs/presentation-common/selection/SelectionScope.js +9 -9
  230. package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
  231. package/lib/cjs/presentation-common.d.ts +111 -110
  232. package/lib/cjs/presentation-common.d.ts.map +1 -1
  233. package/lib/cjs/presentation-common.js +127 -126
  234. package/lib/cjs/presentation-common.js.map +1 -1
  235. package/lib/esm/presentation-common/AsyncTasks.d.ts +22 -22
  236. package/lib/esm/presentation-common/AsyncTasks.js +34 -34
  237. package/lib/esm/presentation-common/AsyncTasks.js.map +1 -1
  238. package/lib/esm/presentation-common/CommonLoggerCategory.d.ts +12 -12
  239. package/lib/esm/presentation-common/CommonLoggerCategory.js +17 -17
  240. package/lib/esm/presentation-common/CommonLoggerCategory.js.map +1 -1
  241. package/lib/esm/presentation-common/Diagnostics.d.ts +125 -125
  242. package/lib/esm/presentation-common/Diagnostics.js +67 -67
  243. package/lib/esm/presentation-common/Diagnostics.js.map +1 -1
  244. package/lib/esm/presentation-common/EC.d.ts +315 -315
  245. package/lib/esm/presentation-common/EC.js +267 -267
  246. package/lib/esm/presentation-common/EC.js.map +1 -1
  247. package/lib/esm/presentation-common/ElementProperties.d.ts +123 -123
  248. package/lib/esm/presentation-common/ElementProperties.js +8 -8
  249. package/lib/esm/presentation-common/ElementProperties.js.map +1 -1
  250. package/lib/esm/presentation-common/Error.d.ts +45 -45
  251. package/lib/esm/presentation-common/Error.js +58 -58
  252. package/lib/esm/presentation-common/Error.js.map +1 -1
  253. package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts +61 -0
  254. package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts.map +1 -0
  255. package/lib/esm/presentation-common/InstanceFilterDefinition.js +9 -0
  256. package/lib/esm/presentation-common/InstanceFilterDefinition.js.map +1 -0
  257. package/lib/esm/presentation-common/KeySet.d.ts +146 -146
  258. package/lib/esm/presentation-common/KeySet.js +414 -414
  259. package/lib/esm/presentation-common/KeySet.js.map +1 -1
  260. package/lib/esm/presentation-common/LabelDefinition.d.ts +79 -79
  261. package/lib/esm/presentation-common/LabelDefinition.js +73 -73
  262. package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
  263. package/lib/esm/presentation-common/LocalizationHelper.d.ts +29 -29
  264. package/lib/esm/presentation-common/LocalizationHelper.js +106 -106
  265. package/lib/esm/presentation-common/LocalizationHelper.js.map +1 -1
  266. package/lib/esm/presentation-common/PresentationIpcInterface.d.ts +37 -37
  267. package/lib/esm/presentation-common/PresentationIpcInterface.js +9 -9
  268. package/lib/esm/presentation-common/PresentationIpcInterface.js.map +1 -1
  269. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts +242 -242
  270. package/lib/esm/presentation-common/PresentationManagerOptions.js +18 -18
  271. package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
  272. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts +181 -181
  273. package/lib/esm/presentation-common/PresentationRpcInterface.js +98 -98
  274. package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
  275. package/lib/esm/presentation-common/RegisteredRuleset.d.ts +26 -26
  276. package/lib/esm/presentation-common/RegisteredRuleset.js +29 -29
  277. package/lib/esm/presentation-common/RegisteredRuleset.js.map +1 -1
  278. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts +82 -82
  279. package/lib/esm/presentation-common/RpcRequestsHandler.js +151 -151
  280. package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
  281. package/lib/esm/presentation-common/RulesetVariables.d.ts +166 -166
  282. package/lib/esm/presentation-common/RulesetVariables.js +52 -52
  283. package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
  284. package/lib/esm/presentation-common/RulesetsFactory.d.ts +44 -44
  285. package/lib/esm/presentation-common/RulesetsFactory.js +219 -219
  286. package/lib/esm/presentation-common/RulesetsFactory.js.map +1 -1
  287. package/lib/esm/presentation-common/Update.d.ts +194 -194
  288. package/lib/esm/presentation-common/Update.js +193 -193
  289. package/lib/esm/presentation-common/Update.js.map +1 -1
  290. package/lib/esm/presentation-common/Utils.d.ts +64 -64
  291. package/lib/esm/presentation-common/Utils.js +41 -41
  292. package/lib/esm/presentation-common/Utils.js.map +1 -1
  293. package/lib/esm/presentation-common/content/Category.d.ts +49 -49
  294. package/lib/esm/presentation-common/content/Category.js +46 -46
  295. package/lib/esm/presentation-common/content/Category.js.map +1 -1
  296. package/lib/esm/presentation-common/content/Content.d.ts +38 -38
  297. package/lib/esm/presentation-common/content/Content.js +52 -52
  298. package/lib/esm/presentation-common/content/Content.js.map +1 -1
  299. package/lib/esm/presentation-common/content/ContentTraverser.d.ts +101 -101
  300. package/lib/esm/presentation-common/content/ContentTraverser.js +411 -411
  301. package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
  302. package/lib/esm/presentation-common/content/Descriptor.d.ts +240 -240
  303. package/lib/esm/presentation-common/content/Descriptor.js +185 -185
  304. package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
  305. package/lib/esm/presentation-common/content/DisplayTypes.d.ts +21 -21
  306. package/lib/esm/presentation-common/content/DisplayTypes.js +26 -26
  307. package/lib/esm/presentation-common/content/DisplayTypes.js.map +1 -1
  308. package/lib/esm/presentation-common/content/Editor.d.ts +15 -15
  309. package/lib/esm/presentation-common/content/Editor.js +8 -8
  310. package/lib/esm/presentation-common/content/Editor.js.map +1 -1
  311. package/lib/esm/presentation-common/content/Fields.d.ts +282 -282
  312. package/lib/esm/presentation-common/content/Fields.js +387 -387
  313. package/lib/esm/presentation-common/content/Fields.js.map +1 -1
  314. package/lib/esm/presentation-common/content/Item.d.ts +87 -87
  315. package/lib/esm/presentation-common/content/Item.js +82 -82
  316. package/lib/esm/presentation-common/content/Item.js.map +1 -1
  317. package/lib/esm/presentation-common/content/Property.d.ts +51 -51
  318. package/lib/esm/presentation-common/content/Property.js +33 -33
  319. package/lib/esm/presentation-common/content/Property.js.map +1 -1
  320. package/lib/esm/presentation-common/content/Renderer.d.ts +11 -11
  321. package/lib/esm/presentation-common/content/Renderer.js +8 -8
  322. package/lib/esm/presentation-common/content/Renderer.js.map +1 -1
  323. package/lib/esm/presentation-common/content/TypeDescription.d.ts +72 -72
  324. package/lib/esm/presentation-common/content/TypeDescription.js +20 -20
  325. package/lib/esm/presentation-common/content/TypeDescription.js.map +1 -1
  326. package/lib/esm/presentation-common/content/Value.d.ts +157 -157
  327. package/lib/esm/presentation-common/content/Value.js +214 -214
  328. package/lib/esm/presentation-common/content/Value.js.map +1 -1
  329. package/lib/esm/presentation-common/hierarchy/Key.d.ts +185 -185
  330. package/lib/esm/presentation-common/hierarchy/Key.js +109 -109
  331. package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
  332. package/lib/esm/presentation-common/hierarchy/Node.d.ts +141 -141
  333. package/lib/esm/presentation-common/hierarchy/Node.js +94 -94
  334. package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
  335. package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts +85 -85
  336. package/lib/esm/presentation-common/hierarchy/NodePathElement.js +95 -95
  337. package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  338. package/lib/esm/presentation-common/rules/ClassSpecifications.d.ts +45 -45
  339. package/lib/esm/presentation-common/rules/ClassSpecifications.js +8 -8
  340. package/lib/esm/presentation-common/rules/ClassSpecifications.js.map +1 -1
  341. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.d.ts +31 -31
  342. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js +8 -8
  343. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
  344. package/lib/esm/presentation-common/rules/RelationshipDirection.d.ts +13 -13
  345. package/lib/esm/presentation-common/rules/RelationshipDirection.js +18 -18
  346. package/lib/esm/presentation-common/rules/RelationshipDirection.js.map +1 -1
  347. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts +53 -53
  348. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js +8 -8
  349. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  350. package/lib/esm/presentation-common/rules/Rule.d.ts +74 -74
  351. package/lib/esm/presentation-common/rules/Rule.js +32 -32
  352. package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
  353. package/lib/esm/presentation-common/rules/Ruleset.d.ts +66 -66
  354. package/lib/esm/presentation-common/rules/Ruleset.js +8 -8
  355. package/lib/esm/presentation-common/rules/Ruleset.js.map +1 -1
  356. package/lib/esm/presentation-common/rules/SchemasSpecification.d.ts +41 -41
  357. package/lib/esm/presentation-common/rules/SchemasSpecification.js +8 -8
  358. package/lib/esm/presentation-common/rules/SchemasSpecification.js.map +1 -1
  359. package/lib/esm/presentation-common/rules/Variables.d.ts +55 -55
  360. package/lib/esm/presentation-common/rules/Variables.js +22 -22
  361. package/lib/esm/presentation-common/rules/Variables.js.map +1 -1
  362. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +41 -41
  363. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js +8 -8
  364. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  365. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +25 -25
  366. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js +8 -8
  367. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  368. package/lib/esm/presentation-common/rules/content/ContentRule.d.ts +30 -30
  369. package/lib/esm/presentation-common/rules/content/ContentRule.js +8 -8
  370. package/lib/esm/presentation-common/rules/content/ContentRule.js.map +1 -1
  371. package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts +55 -55
  372. package/lib/esm/presentation-common/rules/content/ContentSpecification.js +17 -17
  373. package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  374. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +19 -19
  375. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js +8 -8
  376. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  377. package/lib/esm/presentation-common/rules/content/PropertySpecification.d.ts +86 -86
  378. package/lib/esm/presentation-common/rules/content/PropertySpecification.js +8 -8
  379. package/lib/esm/presentation-common/rules/content/PropertySpecification.js.map +1 -1
  380. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +28 -28
  381. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js +8 -8
  382. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  383. package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts +25 -25
  384. package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js +8 -8
  385. package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
  386. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.d.ts +57 -57
  387. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js +8 -8
  388. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  389. package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.d.ts +17 -17
  390. package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js +8 -8
  391. package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
  392. package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts +107 -107
  393. package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js +8 -8
  394. package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
  395. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +105 -105
  396. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js +18 -18
  397. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  398. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +93 -93
  399. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js +40 -40
  400. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  401. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts +44 -44
  402. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js +8 -8
  403. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
  404. package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts +36 -36
  405. package/lib/esm/presentation-common/rules/customization/CustomizationRule.js +8 -8
  406. package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  407. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.d.ts +27 -27
  408. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js +8 -8
  409. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  410. package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts +200 -200
  411. package/lib/esm/presentation-common/rules/customization/GroupingRule.js +48 -48
  412. package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  413. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts +29 -29
  414. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js +8 -8
  415. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
  416. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts +156 -156
  417. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js +22 -22
  418. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  419. package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts +40 -40
  420. package/lib/esm/presentation-common/rules/customization/LabelOverride.js +8 -8
  421. package/lib/esm/presentation-common/rules/customization/LabelOverride.js.map +1 -1
  422. package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts +58 -58
  423. package/lib/esm/presentation-common/rules/customization/SortingRule.js +8 -8
  424. package/lib/esm/presentation-common/rules/customization/SortingRule.js.map +1 -1
  425. package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts +48 -48
  426. package/lib/esm/presentation-common/rules/customization/StyleOverride.js +8 -8
  427. package/lib/esm/presentation-common/rules/customization/StyleOverride.js.map +1 -1
  428. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +15 -15
  429. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js +8 -8
  430. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  431. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +97 -97
  432. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js +19 -19
  433. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  434. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +31 -31
  435. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js +8 -8
  436. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  437. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +76 -76
  438. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js +16 -16
  439. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  440. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +39 -39
  441. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js +8 -8
  442. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  443. package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.d.ts +50 -50
  444. package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js +8 -8
  445. package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
  446. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +27 -27
  447. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js +8 -8
  448. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  449. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +27 -27
  450. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js +8 -8
  451. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  452. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.d.ts +17 -17
  453. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js +8 -8
  454. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  455. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.d.ts +36 -36
  456. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js +8 -8
  457. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  458. package/lib/esm/presentation-common/selection/SelectionScope.d.ts +25 -25
  459. package/lib/esm/presentation-common/selection/SelectionScope.js +8 -8
  460. package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
  461. package/lib/esm/presentation-common.d.ts +111 -110
  462. package/lib/esm/presentation-common.d.ts.map +1 -1
  463. package/lib/esm/presentation-common.js +115 -114
  464. package/lib/esm/presentation-common.js.map +1 -1
  465. package/lib/public/locales/en/BisCore.json +18 -18
  466. package/lib/public/locales/en/ECPresentation.json +9 -9
  467. package/lib/public/locales/en/RulesEngine.json +5 -5
  468. package/package.json +9 -9
@@ -1,194 +1,194 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- /** @packageDocumentation
6
- * @module Core
7
- */
8
- import { NodeKey } from "./hierarchy/Key";
9
- import { Node } from "./hierarchy/Node";
10
- /** @alpha */
11
- export const UPDATE_FULL = "FULL";
12
- /** @alpha */
13
- export var UpdateInfo;
14
- (function (UpdateInfo) {
15
- /** Serialize given object to JSON. */
16
- function toJSON(obj) {
17
- const json = {};
18
- for (const imodel in obj) {
19
- // istanbul ignore if
20
- if (!obj.hasOwnProperty(imodel))
21
- continue;
22
- json[imodel] = {};
23
- const rulesetObj = obj[imodel];
24
- for (const rulesetId in rulesetObj) {
25
- // istanbul ignore if
26
- if (!rulesetObj.hasOwnProperty(rulesetId))
27
- continue;
28
- json[imodel][rulesetId] = {
29
- hierarchy: rulesetObj[rulesetId].hierarchy ? HierarchyUpdateInfo.toJSON(rulesetObj[rulesetId].hierarchy) : undefined,
30
- content: rulesetObj[rulesetId].content,
31
- };
32
- }
33
- }
34
- return json;
35
- }
36
- UpdateInfo.toJSON = toJSON;
37
- /** Deserialize given object from JSON */
38
- function fromJSON(json) {
39
- const obj = {};
40
- for (const imodel in json) {
41
- // istanbul ignore if
42
- if (!json.hasOwnProperty(imodel))
43
- continue;
44
- obj[imodel] = {};
45
- const rulesetJson = json[imodel];
46
- for (const rulesetId in rulesetJson) {
47
- // istanbul ignore if
48
- if (!rulesetJson.hasOwnProperty(rulesetId))
49
- continue;
50
- obj[imodel][rulesetId] = {
51
- hierarchy: rulesetJson[rulesetId].hierarchy ? HierarchyUpdateInfo.fromJSON(rulesetJson[rulesetId].hierarchy) : undefined,
52
- content: rulesetJson[rulesetId].content,
53
- };
54
- }
55
- }
56
- return obj;
57
- }
58
- UpdateInfo.fromJSON = fromJSON;
59
- })(UpdateInfo || (UpdateInfo = {}));
60
- /** @alpha */
61
- export var ExpandedNodeUpdateRecord;
62
- (function (ExpandedNodeUpdateRecord) {
63
- /** Serialize given object to JSON. */
64
- function toJSON(obj) {
65
- return {
66
- ...obj,
67
- node: Node.toJSON(obj.node),
68
- };
69
- }
70
- ExpandedNodeUpdateRecord.toJSON = toJSON;
71
- /** Deserialize given object from JSON */
72
- function fromJSON(json) {
73
- return {
74
- ...json,
75
- node: Node.fromJSON(json.node),
76
- };
77
- }
78
- ExpandedNodeUpdateRecord.fromJSON = fromJSON;
79
- })(ExpandedNodeUpdateRecord || (ExpandedNodeUpdateRecord = {}));
80
- /** @alpha */
81
- export var HierarchyUpdateRecord;
82
- (function (HierarchyUpdateRecord) {
83
- /** Serialize given object to JSON. */
84
- function toJSON(obj) {
85
- return {
86
- ...obj,
87
- parent: obj.parent ? NodeKey.toJSON(obj.parent) : undefined,
88
- expandedNodes: obj.expandedNodes ? obj.expandedNodes.map(ExpandedNodeUpdateRecord.toJSON) : undefined,
89
- };
90
- }
91
- HierarchyUpdateRecord.toJSON = toJSON;
92
- /** Deserialize given object from JSON */
93
- function fromJSON(json) {
94
- return {
95
- ...json,
96
- parent: json.parent ? NodeKey.fromJSON(json.parent) : undefined,
97
- expandedNodes: json.expandedNodes ? json.expandedNodes.map(ExpandedNodeUpdateRecord.fromJSON) : undefined,
98
- };
99
- }
100
- HierarchyUpdateRecord.fromJSON = fromJSON;
101
- })(HierarchyUpdateRecord || (HierarchyUpdateRecord = {}));
102
- /** @alpha */
103
- export var HierarchyUpdateInfo;
104
- (function (HierarchyUpdateInfo) {
105
- /** Serialize given object to JSON. */
106
- function toJSON(obj) {
107
- if (typeof obj === "string")
108
- return obj;
109
- return obj.map(HierarchyUpdateRecord.toJSON);
110
- }
111
- HierarchyUpdateInfo.toJSON = toJSON;
112
- /** Deserialize given object from JSON */
113
- function fromJSON(json) {
114
- if (typeof json === "string")
115
- return json;
116
- return json.map(HierarchyUpdateRecord.fromJSON);
117
- }
118
- HierarchyUpdateInfo.fromJSON = fromJSON;
119
- })(HierarchyUpdateInfo || (HierarchyUpdateInfo = {}));
120
- /** @public */
121
- export var PartialHierarchyModification;
122
- (function (PartialHierarchyModification) {
123
- /** Serialize given object to JSON. */
124
- function toJSON(obj) {
125
- switch (obj.type) {
126
- case "Insert":
127
- return {
128
- type: "Insert",
129
- parent: obj.parent === undefined ? undefined : NodeKey.toJSON(obj.parent),
130
- position: obj.position,
131
- node: Node.toJSON(obj.node),
132
- };
133
- case "Update":
134
- return {
135
- type: "Update",
136
- target: NodeKey.toJSON(obj.target),
137
- changes: Node.toPartialJSON(obj.changes),
138
- };
139
- case "Delete":
140
- return {
141
- type: "Delete",
142
- parent: obj.parent === undefined ? undefined : NodeKey.toJSON(obj.parent),
143
- position: obj.position,
144
- };
145
- }
146
- }
147
- PartialHierarchyModification.toJSON = toJSON;
148
- /** Deserialize given object from JSON */
149
- function fromJSON(json) {
150
- switch (json.type) {
151
- case "Insert":
152
- return {
153
- type: "Insert",
154
- parent: json.parent === undefined ? undefined : NodeKey.fromJSON(json.parent),
155
- position: json.position,
156
- node: Node.fromJSON(json.node),
157
- };
158
- case "Update":
159
- return {
160
- type: "Update",
161
- target: NodeKey.fromJSON(json.target),
162
- changes: Node.fromPartialJSON(json.changes),
163
- };
164
- case "Delete":
165
- return {
166
- type: "Delete",
167
- parent: json.parent === undefined ? undefined : NodeKey.fromJSON(json.parent),
168
- position: json.position,
169
- };
170
- }
171
- }
172
- PartialHierarchyModification.fromJSON = fromJSON;
173
- })(PartialHierarchyModification || (PartialHierarchyModification = {}));
174
- /** @public */
175
- export var HierarchyCompareInfo;
176
- (function (HierarchyCompareInfo) {
177
- /** Serialize given object to JSON. */
178
- function toJSON(obj) {
179
- return {
180
- ...obj,
181
- changes: obj.changes.map((change) => PartialHierarchyModification.toJSON(change)),
182
- };
183
- }
184
- HierarchyCompareInfo.toJSON = toJSON;
185
- /** Deserialize given object from JSON */
186
- function fromJSON(json) {
187
- return {
188
- ...json,
189
- changes: json.changes.map((change) => PartialHierarchyModification.fromJSON(change)),
190
- };
191
- }
192
- HierarchyCompareInfo.fromJSON = fromJSON;
193
- })(HierarchyCompareInfo || (HierarchyCompareInfo = {}));
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module Core
7
+ */
8
+ import { NodeKey } from "./hierarchy/Key";
9
+ import { Node } from "./hierarchy/Node";
10
+ /** @alpha */
11
+ export const UPDATE_FULL = "FULL";
12
+ /** @alpha */
13
+ export var UpdateInfo;
14
+ (function (UpdateInfo) {
15
+ /** Serialize given object to JSON. */
16
+ function toJSON(obj) {
17
+ const json = {};
18
+ for (const imodel in obj) {
19
+ // istanbul ignore if
20
+ if (!obj.hasOwnProperty(imodel))
21
+ continue;
22
+ json[imodel] = {};
23
+ const rulesetObj = obj[imodel];
24
+ for (const rulesetId in rulesetObj) {
25
+ // istanbul ignore if
26
+ if (!rulesetObj.hasOwnProperty(rulesetId))
27
+ continue;
28
+ json[imodel][rulesetId] = {
29
+ hierarchy: rulesetObj[rulesetId].hierarchy ? HierarchyUpdateInfo.toJSON(rulesetObj[rulesetId].hierarchy) : undefined,
30
+ content: rulesetObj[rulesetId].content,
31
+ };
32
+ }
33
+ }
34
+ return json;
35
+ }
36
+ UpdateInfo.toJSON = toJSON;
37
+ /** Deserialize given object from JSON */
38
+ function fromJSON(json) {
39
+ const obj = {};
40
+ for (const imodel in json) {
41
+ // istanbul ignore if
42
+ if (!json.hasOwnProperty(imodel))
43
+ continue;
44
+ obj[imodel] = {};
45
+ const rulesetJson = json[imodel];
46
+ for (const rulesetId in rulesetJson) {
47
+ // istanbul ignore if
48
+ if (!rulesetJson.hasOwnProperty(rulesetId))
49
+ continue;
50
+ obj[imodel][rulesetId] = {
51
+ hierarchy: rulesetJson[rulesetId].hierarchy ? HierarchyUpdateInfo.fromJSON(rulesetJson[rulesetId].hierarchy) : undefined,
52
+ content: rulesetJson[rulesetId].content,
53
+ };
54
+ }
55
+ }
56
+ return obj;
57
+ }
58
+ UpdateInfo.fromJSON = fromJSON;
59
+ })(UpdateInfo || (UpdateInfo = {}));
60
+ /** @alpha */
61
+ export var ExpandedNodeUpdateRecord;
62
+ (function (ExpandedNodeUpdateRecord) {
63
+ /** Serialize given object to JSON. */
64
+ function toJSON(obj) {
65
+ return {
66
+ ...obj,
67
+ node: Node.toJSON(obj.node),
68
+ };
69
+ }
70
+ ExpandedNodeUpdateRecord.toJSON = toJSON;
71
+ /** Deserialize given object from JSON */
72
+ function fromJSON(json) {
73
+ return {
74
+ ...json,
75
+ node: Node.fromJSON(json.node),
76
+ };
77
+ }
78
+ ExpandedNodeUpdateRecord.fromJSON = fromJSON;
79
+ })(ExpandedNodeUpdateRecord || (ExpandedNodeUpdateRecord = {}));
80
+ /** @alpha */
81
+ export var HierarchyUpdateRecord;
82
+ (function (HierarchyUpdateRecord) {
83
+ /** Serialize given object to JSON. */
84
+ function toJSON(obj) {
85
+ return {
86
+ ...obj,
87
+ parent: obj.parent ? NodeKey.toJSON(obj.parent) : undefined,
88
+ expandedNodes: obj.expandedNodes ? obj.expandedNodes.map(ExpandedNodeUpdateRecord.toJSON) : undefined,
89
+ };
90
+ }
91
+ HierarchyUpdateRecord.toJSON = toJSON;
92
+ /** Deserialize given object from JSON */
93
+ function fromJSON(json) {
94
+ return {
95
+ ...json,
96
+ parent: json.parent ? NodeKey.fromJSON(json.parent) : undefined,
97
+ expandedNodes: json.expandedNodes ? json.expandedNodes.map(ExpandedNodeUpdateRecord.fromJSON) : undefined,
98
+ };
99
+ }
100
+ HierarchyUpdateRecord.fromJSON = fromJSON;
101
+ })(HierarchyUpdateRecord || (HierarchyUpdateRecord = {}));
102
+ /** @alpha */
103
+ export var HierarchyUpdateInfo;
104
+ (function (HierarchyUpdateInfo) {
105
+ /** Serialize given object to JSON. */
106
+ function toJSON(obj) {
107
+ if (typeof obj === "string")
108
+ return obj;
109
+ return obj.map(HierarchyUpdateRecord.toJSON);
110
+ }
111
+ HierarchyUpdateInfo.toJSON = toJSON;
112
+ /** Deserialize given object from JSON */
113
+ function fromJSON(json) {
114
+ if (typeof json === "string")
115
+ return json;
116
+ return json.map(HierarchyUpdateRecord.fromJSON);
117
+ }
118
+ HierarchyUpdateInfo.fromJSON = fromJSON;
119
+ })(HierarchyUpdateInfo || (HierarchyUpdateInfo = {}));
120
+ /** @public */
121
+ export var PartialHierarchyModification;
122
+ (function (PartialHierarchyModification) {
123
+ /** Serialize given object to JSON. */
124
+ function toJSON(obj) {
125
+ switch (obj.type) {
126
+ case "Insert":
127
+ return {
128
+ type: "Insert",
129
+ parent: obj.parent === undefined ? undefined : NodeKey.toJSON(obj.parent),
130
+ position: obj.position,
131
+ node: Node.toJSON(obj.node),
132
+ };
133
+ case "Update":
134
+ return {
135
+ type: "Update",
136
+ target: NodeKey.toJSON(obj.target),
137
+ changes: Node.toPartialJSON(obj.changes),
138
+ };
139
+ case "Delete":
140
+ return {
141
+ type: "Delete",
142
+ parent: obj.parent === undefined ? undefined : NodeKey.toJSON(obj.parent),
143
+ position: obj.position,
144
+ };
145
+ }
146
+ }
147
+ PartialHierarchyModification.toJSON = toJSON;
148
+ /** Deserialize given object from JSON */
149
+ function fromJSON(json) {
150
+ switch (json.type) {
151
+ case "Insert":
152
+ return {
153
+ type: "Insert",
154
+ parent: json.parent === undefined ? undefined : NodeKey.fromJSON(json.parent),
155
+ position: json.position,
156
+ node: Node.fromJSON(json.node),
157
+ };
158
+ case "Update":
159
+ return {
160
+ type: "Update",
161
+ target: NodeKey.fromJSON(json.target),
162
+ changes: Node.fromPartialJSON(json.changes),
163
+ };
164
+ case "Delete":
165
+ return {
166
+ type: "Delete",
167
+ parent: json.parent === undefined ? undefined : NodeKey.fromJSON(json.parent),
168
+ position: json.position,
169
+ };
170
+ }
171
+ }
172
+ PartialHierarchyModification.fromJSON = fromJSON;
173
+ })(PartialHierarchyModification || (PartialHierarchyModification = {}));
174
+ /** @public */
175
+ export var HierarchyCompareInfo;
176
+ (function (HierarchyCompareInfo) {
177
+ /** Serialize given object to JSON. */
178
+ function toJSON(obj) {
179
+ return {
180
+ ...obj,
181
+ changes: obj.changes.map((change) => PartialHierarchyModification.toJSON(change)),
182
+ };
183
+ }
184
+ HierarchyCompareInfo.toJSON = toJSON;
185
+ /** Deserialize given object from JSON */
186
+ function fromJSON(json) {
187
+ return {
188
+ ...json,
189
+ changes: json.changes.map((change) => PartialHierarchyModification.fromJSON(change)),
190
+ };
191
+ }
192
+ HierarchyCompareInfo.fromJSON = fromJSON;
193
+ })(HierarchyCompareInfo || (HierarchyCompareInfo = {}));
194
194
  //# sourceMappingURL=Update.js.map
@@ -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;AAsBlC,aAAa;AACb,MAAM,KAAW,UAAU,CAgD1B;AAhDD,WAAiB,UAAU;IACzB,sCAAsC;IACtC,SAAgB,MAAM,CAAC,GAAe;QACpC,MAAM,IAAI,GAAmB,EAAE,CAAC;QAChC,KAAK,MAAM,MAAM,IAAI,GAAG,EAAE;YACxB,qBAAqB;YACrB,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC;gBAC7B,SAAS;YAEX,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;YAClB,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;YAC/B,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;gBAClC,qBAAqB;gBACrB,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,SAAS,CAAC;oBACvC,SAAS;gBAEX,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,GAAG;oBACxB,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,mBAAmB,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,SAAU,CAAC,CAAC,CAAC,CAAC,SAAS;oBACrH,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,OAAO;iBACvC,CAAC;aACH;SACF;QACD,OAAO,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,GAAG,GAAG;YACN,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,4BAA4B,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;SAClF,CAAC;IACJ,CAAC;IALe,2BAAM,SAKrB,CAAA;IAED,yCAAyC;IACzC,SAAgB,QAAQ,CAAC,IAA8B;QACrD,OAAO;YACL,GAAG,IAAI;YACP,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,4BAA4B,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SACrF,CAAC;IACJ,CAAC;IALe,6BAAQ,WAKvB,CAAA;AACH,CAAC,EAhBgB,oBAAoB,KAApB,oBAAoB,QAgBpC","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 UpdateInfoJSON {\n [imodel: string]: {\n [rulesetId: string]: {\n hierarchy?: HierarchyUpdateInfoJSON;\n content?: ContentUpdateInfo;\n };\n };\n}\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 namespace UpdateInfo {\n /** Serialize given object to JSON. */\n export function toJSON(obj: UpdateInfo): UpdateInfoJSON {\n const json: UpdateInfoJSON = {};\n for (const imodel in obj) {\n // istanbul ignore if\n if (!obj.hasOwnProperty(imodel))\n continue;\n\n json[imodel] = {};\n const rulesetObj = obj[imodel];\n for (const rulesetId in rulesetObj) {\n // istanbul ignore if\n if (!rulesetObj.hasOwnProperty(rulesetId))\n continue;\n\n json[imodel][rulesetId] = {\n hierarchy: rulesetObj[rulesetId].hierarchy ? HierarchyUpdateInfo.toJSON(rulesetObj[rulesetId].hierarchy!) : undefined,\n content: rulesetObj[rulesetId].content,\n };\n }\n }\n return json;\n }\n\n /** Deserialize given object from JSON */\n export function fromJSON(json: UpdateInfoJSON): UpdateInfo {\n const obj: UpdateInfo = {};\n for (const imodel in json) {\n // istanbul ignore if\n if (!json.hasOwnProperty(imodel))\n continue;\n\n obj[imodel] = {};\n const rulesetJson = json[imodel];\n for (const rulesetId in rulesetJson) {\n // istanbul ignore if\n if (!rulesetJson.hasOwnProperty(rulesetId))\n continue;\n\n obj[imodel][rulesetId] = {\n hierarchy: rulesetJson[rulesetId].hierarchy ? HierarchyUpdateInfo.fromJSON(rulesetJson[rulesetId].hierarchy!) : undefined,\n content: rulesetJson[rulesetId].content,\n };\n }\n }\n return obj;\n }\n}\n\n/** @alpha */\nexport interface ExpandedNodeUpdateRecordJSON {\n node: NodeJSON;\n position: number;\n}\n\n/** @alpha */\nexport interface HierarchyUpdateRecordJSON {\n parent?: NodeKeyJSON;\n nodesCount: number;\n expandedNodes?: ExpandedNodeUpdateRecordJSON[];\n}\n\n/** @alpha */\nexport interface ExpandedNodeUpdateRecord {\n node: Node;\n position: number;\n}\n\n/** @alpha */\nexport interface HierarchyUpdateRecord {\n parent?: NodeKey;\n nodesCount: number;\n expandedNodes?: ExpandedNodeUpdateRecord[];\n}\n\n/** @alpha */\nexport namespace ExpandedNodeUpdateRecord { // eslint-disable-line @typescript-eslint/no-redeclare\n /** Serialize given object to JSON. */\n export function toJSON(obj: ExpandedNodeUpdateRecord): ExpandedNodeUpdateRecordJSON {\n return {\n ...obj,\n node: Node.toJSON(obj.node),\n };\n }\n\n /** Deserialize given object from JSON */\n export function fromJSON(json: ExpandedNodeUpdateRecordJSON): ExpandedNodeUpdateRecord {\n return {\n ...json,\n node: Node.fromJSON(json.node),\n };\n }\n}\n\n/** @alpha */\nexport namespace HierarchyUpdateRecord { // eslint-disable-line @typescript-eslint/no-redeclare\n /** Serialize given object to JSON. */\n export function toJSON(obj: HierarchyUpdateRecord): HierarchyUpdateRecordJSON {\n return {\n ...obj,\n parent: obj.parent ? NodeKey.toJSON(obj.parent) : undefined,\n expandedNodes: obj.expandedNodes ? obj.expandedNodes.map(ExpandedNodeUpdateRecord.toJSON) : undefined,\n };\n }\n\n /** Deserialize given object from JSON */\n export function fromJSON(json: HierarchyUpdateRecordJSON): HierarchyUpdateRecord {\n return {\n ...json,\n parent: json.parent ? NodeKey.fromJSON(json.parent) : undefined,\n expandedNodes: json.expandedNodes ? json.expandedNodes.map(ExpandedNodeUpdateRecord.fromJSON) : undefined,\n };\n }\n}\n\n/** @alpha */\nexport type HierarchyUpdateInfoJSON = typeof UPDATE_FULL | HierarchyUpdateRecordJSON[];\n\n/** @alpha */\nexport type HierarchyUpdateInfo = typeof UPDATE_FULL | HierarchyUpdateRecord[];\n\n/** @alpha */\nexport namespace HierarchyUpdateInfo { // eslint-disable-line @typescript-eslint/no-redeclare\n /** Serialize given object to JSON. */\n export function toJSON(obj: HierarchyUpdateInfo): HierarchyUpdateInfoJSON {\n if (typeof obj === \"string\")\n return obj;\n return obj.map(HierarchyUpdateRecord.toJSON);\n }\n\n /** Deserialize given object from JSON */\n export function fromJSON(json: HierarchyUpdateInfoJSON): HierarchyUpdateInfo {\n if (typeof json === \"string\")\n return json;\n return json.map(HierarchyUpdateRecord.fromJSON);\n }\n}\n\n/** @alpha */\nexport type ContentUpdateInfo = typeof UPDATE_FULL;\n\n/**\n * JSON representation of [[PartialHierarchyModification]].\n * @public\n */\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 /** Serialize given object to JSON. */\n export function toJSON(obj: PartialHierarchyModification): PartialHierarchyModificationJSON {\n switch (obj.type) {\n case \"Insert\":\n return {\n type: \"Insert\",\n parent: obj.parent === undefined ? undefined : NodeKey.toJSON(obj.parent),\n position: obj.position,\n node: Node.toJSON(obj.node),\n };\n\n case \"Update\":\n return {\n type: \"Update\",\n target: NodeKey.toJSON(obj.target),\n changes: Node.toPartialJSON(obj.changes),\n };\n\n case \"Delete\":\n return {\n type: \"Delete\",\n parent: obj.parent === undefined ? undefined : NodeKey.toJSON(obj.parent),\n position: obj.position,\n };\n }\n }\n\n /** Deserialize given object from JSON */\n export function fromJSON(json: PartialHierarchyModificationJSON): PartialHierarchyModification {\n switch (json.type) {\n case \"Insert\":\n return {\n type: \"Insert\",\n parent: json.parent === undefined ? undefined : NodeKey.fromJSON(json.parent),\n position: json.position,\n node: Node.fromJSON(json.node),\n };\n\n case \"Update\":\n return {\n type: \"Update\",\n target: NodeKey.fromJSON(json.target),\n changes: Node.fromPartialJSON(json.changes),\n };\n\n case \"Delete\":\n return {\n type: \"Delete\",\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 */\nexport interface NodeInsertionInfoJSON {\n type: \"Insert\";\n parent?: NodeKeyJSON;\n position: number;\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 */\nexport interface NodeDeletionInfoJSON {\n type: \"Delete\";\n /** Parent of the deleted node */\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 */\nexport interface NodeUpdateInfoJSON {\n type: \"Update\";\n target: NodeKeyJSON;\n changes: PartialNodeJSON;\n}\n\n/**\n * JSON representation of [[HierarchyCompareInfo]].\n * @public\n */\nexport interface HierarchyCompareInfoJSON {\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 /** Serialize given object to JSON. */\n export function toJSON(obj: HierarchyCompareInfo): HierarchyCompareInfoJSON {\n return {\n ...obj,\n changes: obj.changes.map((change) => PartialHierarchyModification.toJSON(change)),\n };\n }\n\n /** Deserialize given object from JSON */\n export function fromJSON(json: HierarchyCompareInfoJSON): HierarchyCompareInfo {\n return {\n ...json,\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;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAe,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,IAAI,EAA0C,MAAM,kBAAkB,CAAC;AAEhF,aAA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,CAAC,MAAM,CAAC,CAAC;SACrF,CAAC;IACJ,CAAC;IALe,6BAAQ,WAKvB,CAAA;AACH,CAAC,EAhBgB,oBAAoB,KAApB,oBAAoB,QAgBpC","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 UpdateInfoJSON {\r\n [imodel: string]: {\r\n [rulesetId: string]: {\r\n hierarchy?: HierarchyUpdateInfoJSON;\r\n content?: ContentUpdateInfo;\r\n };\r\n };\r\n}\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 namespace UpdateInfo {\r\n /** Serialize given object to JSON. */\r\n export function toJSON(obj: UpdateInfo): UpdateInfoJSON {\r\n const json: UpdateInfoJSON = {};\r\n for (const imodel in obj) {\r\n // istanbul ignore if\r\n if (!obj.hasOwnProperty(imodel))\r\n continue;\r\n\r\n json[imodel] = {};\r\n const rulesetObj = obj[imodel];\r\n for (const rulesetId in rulesetObj) {\r\n // istanbul ignore if\r\n if (!rulesetObj.hasOwnProperty(rulesetId))\r\n continue;\r\n\r\n json[imodel][rulesetId] = {\r\n hierarchy: rulesetObj[rulesetId].hierarchy ? HierarchyUpdateInfo.toJSON(rulesetObj[rulesetId].hierarchy!) : undefined,\r\n content: rulesetObj[rulesetId].content,\r\n };\r\n }\r\n }\r\n return json;\r\n }\r\n\r\n /** Deserialize given object from JSON */\r\n export function fromJSON(json: UpdateInfoJSON): UpdateInfo {\r\n const obj: UpdateInfo = {};\r\n for (const imodel in json) {\r\n // istanbul ignore if\r\n if (!json.hasOwnProperty(imodel))\r\n continue;\r\n\r\n obj[imodel] = {};\r\n const rulesetJson = json[imodel];\r\n for (const rulesetId in rulesetJson) {\r\n // istanbul ignore if\r\n if (!rulesetJson.hasOwnProperty(rulesetId))\r\n continue;\r\n\r\n obj[imodel][rulesetId] = {\r\n hierarchy: rulesetJson[rulesetId].hierarchy ? HierarchyUpdateInfo.fromJSON(rulesetJson[rulesetId].hierarchy!) : undefined,\r\n content: rulesetJson[rulesetId].content,\r\n };\r\n }\r\n }\r\n return obj;\r\n }\r\n}\r\n\r\n/** @alpha */\r\nexport interface ExpandedNodeUpdateRecordJSON {\r\n node: NodeJSON;\r\n position: number;\r\n}\r\n\r\n/** @alpha */\r\nexport interface HierarchyUpdateRecordJSON {\r\n parent?: NodeKeyJSON;\r\n nodesCount: number;\r\n expandedNodes?: ExpandedNodeUpdateRecordJSON[];\r\n}\r\n\r\n/** @alpha */\r\nexport interface ExpandedNodeUpdateRecord {\r\n node: Node;\r\n position: number;\r\n}\r\n\r\n/** @alpha */\r\nexport interface HierarchyUpdateRecord {\r\n parent?: NodeKey;\r\n nodesCount: number;\r\n expandedNodes?: ExpandedNodeUpdateRecord[];\r\n}\r\n\r\n/** @alpha */\r\nexport namespace ExpandedNodeUpdateRecord { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** Serialize given object to JSON. */\r\n export function toJSON(obj: ExpandedNodeUpdateRecord): ExpandedNodeUpdateRecordJSON {\r\n return {\r\n ...obj,\r\n node: Node.toJSON(obj.node),\r\n };\r\n }\r\n\r\n /** Deserialize given object from JSON */\r\n export function fromJSON(json: ExpandedNodeUpdateRecordJSON): ExpandedNodeUpdateRecord {\r\n return {\r\n ...json,\r\n node: Node.fromJSON(json.node),\r\n };\r\n }\r\n}\r\n\r\n/** @alpha */\r\nexport namespace HierarchyUpdateRecord { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** Serialize given object to JSON. */\r\n export function toJSON(obj: HierarchyUpdateRecord): HierarchyUpdateRecordJSON {\r\n return {\r\n ...obj,\r\n parent: obj.parent ? NodeKey.toJSON(obj.parent) : undefined,\r\n expandedNodes: obj.expandedNodes ? obj.expandedNodes.map(ExpandedNodeUpdateRecord.toJSON) : undefined,\r\n };\r\n }\r\n\r\n /** Deserialize given object from JSON */\r\n export function fromJSON(json: HierarchyUpdateRecordJSON): HierarchyUpdateRecord {\r\n return {\r\n ...json,\r\n parent: json.parent ? NodeKey.fromJSON(json.parent) : undefined,\r\n expandedNodes: json.expandedNodes ? json.expandedNodes.map(ExpandedNodeUpdateRecord.fromJSON) : undefined,\r\n };\r\n }\r\n}\r\n\r\n/** @alpha */\r\nexport type HierarchyUpdateInfoJSON = typeof UPDATE_FULL | HierarchyUpdateRecordJSON[];\r\n\r\n/** @alpha */\r\nexport type HierarchyUpdateInfo = typeof UPDATE_FULL | HierarchyUpdateRecord[];\r\n\r\n/** @alpha */\r\nexport namespace HierarchyUpdateInfo { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** Serialize given object to JSON. */\r\n export function toJSON(obj: HierarchyUpdateInfo): HierarchyUpdateInfoJSON {\r\n if (typeof obj === \"string\")\r\n return obj;\r\n return obj.map(HierarchyUpdateRecord.toJSON);\r\n }\r\n\r\n /** Deserialize given object from JSON */\r\n export function fromJSON(json: HierarchyUpdateInfoJSON): HierarchyUpdateInfo {\r\n if (typeof json === \"string\")\r\n return json;\r\n return json.map(HierarchyUpdateRecord.fromJSON);\r\n }\r\n}\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 */\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 /** Serialize given object to JSON. */\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 parent: obj.parent === undefined ? undefined : NodeKey.toJSON(obj.parent),\r\n position: obj.position,\r\n node: Node.toJSON(obj.node),\r\n };\r\n\r\n case \"Update\":\r\n return {\r\n type: \"Update\",\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 parent: obj.parent === undefined ? undefined : NodeKey.toJSON(obj.parent),\r\n position: obj.position,\r\n };\r\n }\r\n }\r\n\r\n /** Deserialize given object from JSON */\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 parent: json.parent === undefined ? undefined : NodeKey.fromJSON(json.parent),\r\n position: json.position,\r\n node: Node.fromJSON(json.node),\r\n };\r\n\r\n case \"Update\":\r\n return {\r\n type: \"Update\",\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 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 */\r\nexport interface NodeInsertionInfoJSON {\r\n type: \"Insert\";\r\n parent?: NodeKeyJSON;\r\n position: number;\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 */\r\nexport interface NodeDeletionInfoJSON {\r\n type: \"Delete\";\r\n /** Parent of the deleted node */\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 */\r\nexport interface NodeUpdateInfoJSON {\r\n type: \"Update\";\r\n target: NodeKeyJSON;\r\n changes: PartialNodeJSON;\r\n}\r\n\r\n/**\r\n * JSON representation of [[HierarchyCompareInfo]].\r\n * @public\r\n */\r\nexport interface HierarchyCompareInfoJSON {\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 /** Serialize given object to JSON. */\r\n export function toJSON(obj: HierarchyCompareInfo): HierarchyCompareInfoJSON {\r\n return {\r\n ...obj,\r\n changes: obj.changes.map((change) => PartialHierarchyModification.toJSON(change)),\r\n };\r\n }\r\n\r\n /** Deserialize given object from JSON */\r\n export function fromJSON(json: HierarchyCompareInfoJSON): HierarchyCompareInfo {\r\n return {\r\n ...json,\r\n changes: json.changes.map((change) => PartialHierarchyModification.fromJSON(change)),\r\n };\r\n }\r\n}\r\n"]}
@@ -1,65 +1,65 @@
1
- /** @packageDocumentation
2
- * @module Core
3
- */
4
- import { KeySet } from "./KeySet";
5
- /**
6
- * Create a type with `T` properties excluding properties listed in `K`.
7
- *
8
- * Usage example: `Omit<SomeType, "exclude_prop1" | "exclude_prop2">`
9
- *
10
- * @public
11
- */
12
- export declare type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
13
- /**
14
- * Create a type with `T` properties excluding all properties in type `K`.
15
- *
16
- * Usage example: `Subtract<SomeType, ExcludePropertiesInThisType>`
17
- *
18
- * @public
19
- */
20
- export declare type Subtract<T, K> = Omit<T, keyof K>;
21
- /**
22
- * Create a type from given type `T` and make specified properties optional.
23
- * @public
24
- */
25
- export declare type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
26
- /**
27
- * A dictionary data structure.
28
- * @public
29
- */
30
- export interface ValuesDictionary<T> {
31
- [key: string]: T;
32
- }
33
- /**
34
- * A structure for paged responses
35
- * @public
36
- */
37
- export interface PagedResponse<T> {
38
- /** Total number of items */
39
- total: number;
40
- /** Items for the requested page */
41
- items: T[];
42
- }
43
- /**
44
- * Get total number of instances included in the supplied key set. The
45
- * count is calculated by adding all of the following:
46
- * - `keys.instanceKeysCount`
47
- * - number of `keys.nodeKeys` which are *ECInstance* keys
48
- * - for every grouping node key in `keys.nodeKeys`, number of grouped instances
49
- *
50
- * E.g. if `keys` contains one instance key, one *ECInstance* node key
51
- * and one grouping node key which groups 3 instances, the result is 5.
52
- *
53
- * @public
54
- */
55
- export declare const getInstancesCount: (keys: Readonly<KeySet>) => number;
56
- /**
57
- * Default (recommended) keyset batch size for cases when it needs to be sent
58
- * over HTTP. Sending keys in batches helps avoid HTTP413 error.
59
- *
60
- * @public
61
- */
62
- export declare const DEFAULT_KEYS_BATCH_SIZE = 5000;
63
- /** @internal */
64
- export declare const PRESENTATION_COMMON_ROOT: string;
1
+ /** @packageDocumentation
2
+ * @module Core
3
+ */
4
+ import { KeySet } from "./KeySet";
5
+ /**
6
+ * Create a type with `T` properties excluding properties listed in `K`.
7
+ *
8
+ * Usage example: `Omit<SomeType, "exclude_prop1" | "exclude_prop2">`
9
+ *
10
+ * @public
11
+ */
12
+ export declare type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
13
+ /**
14
+ * Create a type with `T` properties excluding all properties in type `K`.
15
+ *
16
+ * Usage example: `Subtract<SomeType, ExcludePropertiesInThisType>`
17
+ *
18
+ * @public
19
+ */
20
+ export declare type Subtract<T, K> = Omit<T, keyof K>;
21
+ /**
22
+ * Create a type from given type `T` and make specified properties optional.
23
+ * @public
24
+ */
25
+ export declare type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
26
+ /**
27
+ * A dictionary data structure.
28
+ * @public
29
+ */
30
+ export interface ValuesDictionary<T> {
31
+ [key: string]: T;
32
+ }
33
+ /**
34
+ * A structure for paged responses
35
+ * @public
36
+ */
37
+ export interface PagedResponse<T> {
38
+ /** Total number of items */
39
+ total: number;
40
+ /** Items for the requested page */
41
+ items: T[];
42
+ }
43
+ /**
44
+ * Get total number of instances included in the supplied key set. The
45
+ * count is calculated by adding all of the following:
46
+ * - `keys.instanceKeysCount`
47
+ * - number of `keys.nodeKeys` which are *ECInstance* keys
48
+ * - for every grouping node key in `keys.nodeKeys`, number of grouped instances
49
+ *
50
+ * E.g. if `keys` contains one instance key, one *ECInstance* node key
51
+ * and one grouping node key which groups 3 instances, the result is 5.
52
+ *
53
+ * @public
54
+ */
55
+ export declare const getInstancesCount: (keys: Readonly<KeySet>) => number;
56
+ /**
57
+ * Default (recommended) keyset batch size for cases when it needs to be sent
58
+ * over HTTP. Sending keys in batches helps avoid HTTP413 error.
59
+ *
60
+ * @public
61
+ */
62
+ export declare const DEFAULT_KEYS_BATCH_SIZE = 5000;
63
+ /** @internal */
64
+ export declare const PRESENTATION_COMMON_ROOT: string;
65
65
  //# sourceMappingURL=Utils.d.ts.map