@itwin/presentation-common 4.5.0-dev.8 → 4.6.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +1 -1
  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 +1 -1
  403. package/package.json +14 -11
@@ -1 +1 @@
1
- {"version":3,"file":"EC.js","sourceRoot":"","sources":["../../../src/presentation-common/EC.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyD;AA2BzD,cAAc;AACd,IAAiB,WAAW,CA4B3B;AA5BD,WAAiB,WAAW;IAC1B,8BAA8B;IAC9B,SAAgB,OAAO,CAAC,GAAgB,EAAE,GAAgB;QACxD,MAAM,gBAAgB,GAAG,GAAG,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACpE,IAAI,gBAAgB,KAAK,CAAC;YACxB,OAAO,gBAAgB,CAAC;QAC1B,OAAO,GAAG,CAAC,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACtC,CAAC;IALe,mBAAO,UAKtB,CAAA;IAED;;;OAGG;IACH,uBAAuB;IACvB,mDAAmD;IACnD,SAAgB,MAAM,CAAC,GAAgB;QACrC,OAAO,EAAE,GAAG,GAAG,EAAE,CAAC;IACpB,CAAC;IAFe,kBAAM,SAErB,CAAA;IAED;;;OAGG;IACH,uBAAuB;IACvB,mDAAmD;IACnD,SAAgB,QAAQ,CAAC,IAAqB;QAC5C,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;IACrB,CAAC;IAFe,oBAAQ,WAEvB,CAAA;AACH,CAAC,EA5BgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QA4B3B;AAyBD,cAAc;AACd,IAAiB,SAAS,CAoBzB;AApBD,WAAiB,SAAS;IACxB;;;MAGE;IACF,uBAAuB;IACvB,mDAAmD;IACnD,SAAgB,MAAM,CAAC,IAAe;QACpC,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;IACrB,CAAC;IAFe,gBAAM,SAErB,CAAA;IAED;;;OAGG;IACH,uBAAuB;IACvB,mDAAmD;IACn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Ze,2DAAkB,qBAYjC,CAAA;AACH,CAAC,EArCgB,wCAAwC,GAAxC,gDAAwC,KAAxC,gDAAwC,QAqCxD;AAeD,cAAc;AACd,IAAiB,gBAAgB,CAqBhC;AArBD,WAAiB,gBAAgB;IAC/B,0DAA0D;IAC1D,SAAgB,OAAO,CAAC,IAAsB;QAC5C,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACxC,GAAG,IAAI;YACP,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,qBAAqB,EAAE,CAAC,IAAI,CAAC,qBAAqB;SACnD,CAAC,CAAC,CAAC;IACN,CAAC;IAPe,wBAAO,UAOtB,CAAA;IAED,kFAAkF;IAClF,SAAgB,MAAM,CAAC,GAAuD,EAAE,GAAuD;QACrI,OAAO,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM;eAC3B,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3E,CAAC;IAHe,uBAAM,SAGrB,CAAA;IAED,uEAAuE;IACvE,SAAgB,KAAK,CAAC,IAAsB;QAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAFe,sBAAK,QAEpB,CAAA;AACH,CAAC,EArBgB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAqBhC","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 { assert, Id64String } from \"@itwin/core-bentley\";\nimport { FormatProps } from \"@itwin/core-quantity\";\nimport { PartialBy } from \"./Utils\";\n\n/**\n * Type of an ECClass ID.\n * @public\n */\nexport type ClassId = Id64String;\n\n/**\n * Type of an ECInstance ID.\n * @public\n */\nexport type InstanceId = Id64String;\n\n/**\n * A key that uniquely identifies an instance in an iModel\n * @public\n */\nexport interface InstanceKey {\n /** Full class name in format `SchemaName:ClassName` */\n className: string;\n /** ECInstance ID */\n id: InstanceId;\n}\n\n/** @public */\nexport namespace InstanceKey {\n /** Compare 2 instance keys */\n export function compare(lhs: InstanceKey, rhs: InstanceKey): number {\n const classNameCompare = lhs.className.localeCompare(rhs.className);\n if (classNameCompare !== 0)\n return classNameCompare;\n return lhs.id.localeCompare(rhs.id);\n }\n\n /**\n * Serialize [[InstanceKey]] to JSON\n * @deprecated in 3.x. Use [[InstanceKey]].\n */\n // istanbul ignore next\n // eslint-disable-next-line deprecation/deprecation\n export function toJSON(key: InstanceKey): InstanceKeyJSON {\n return { ...key };\n }\n\n /**\n * Deserialize [[InstanceKey]] from JSON\n * @deprecated in 3.x. Use [[InstanceKey]].\n */\n // istanbul ignore next\n // eslint-disable-next-line deprecation/deprecation\n export function fromJSON(json: InstanceKeyJSON) {\n return { ...json };\n }\n}\n\n/**\n * A serialized version of [[InstanceKey]]\n * @public\n * @deprecated in 3.x. Use [[InstanceKey]].\n */\nexport interface InstanceKeyJSON {\n className: string;\n id: string;\n}\n\n/**\n * Information about an ECClass\n * @public\n */\nexport interface ClassInfo {\n /** ECClass ID */\n id: ClassId;\n /** Full class name in format `SchemaName:ClassName` */\n name: string;\n /** ECClass label */\n label: string;\n}\n\n/** @public */\nexport namespace ClassInfo {\n /**\n * Serialize [[ClassInfo]] to JSON\n * @deprecated in 3.x. Use [[ClassInfo]].\n */\n // istanbul ignore next\n // eslint-disable-next-line deprecation/deprecation\n export function toJSON(info: ClassInfo): ClassInfoJSON {\n return { ...info };\n }\n\n /**\n * Deserialize [[ClassInfo]] from JSON\n * @deprecated in 3.x. Use [[ClassInfo]].\n */\n // istanbul ignore next\n // eslint-disable-next-line deprecation/deprecation\n export function fromJSON(json: ClassInfoJSON): ClassInfo {\n return { ...json };\n }\n}\n\n/**\n * A serialized version of [[ClassInfo]]\n * @public\n * @deprecated in 3.x. Use [[ClassInfo]].\n */\nexport interface ClassInfoJSON {\n id: string;\n name: string;\n label: string;\n}\n\n/**\n * A serialized and compressed version of [[ClassInfo]]\n * @public\n */\nexport interface CompressedClassInfoJSON {\n name: string;\n label: string;\n}\n\n/**\n * A single choice in enumeration\n * @public\n */\nexport interface EnumerationChoice {\n /** Label of the choice */\n label: string;\n /** Value of the choice */\n value: string | number;\n}\n\n/**\n * Enumeration information\n * @public\n */\nexport interface EnumerationInfo {\n /** Available enumeration choices */\n choices: EnumerationChoice[];\n /** Is the enumeration strict (values only allowed from `choices` list) */\n isStrict: boolean;\n}\n\n/**\n * Kind of quantity information\n * @public\n */\nexport interface KindOfQuantityInfo {\n /** Full name of KindOfQuantity in format `SchemaName:KindOfQuantityName` */\n name: string;\n /** Label of KindOfQuantity */\n label: string;\n /**\n * Persistence unit identifier.\n * @alpha Still not entirely clear how kind of quantities will be handled and what data we'll need\n */\n persistenceUnit: string;\n /**\n * Active format that was used to format property value.\n * @alpha Still not entirely clear how kind of quantities will be handled and what data we'll need\n */\n activeFormat?: FormatProps;\n}\n\n/**\n * A data structure for storing navigation property information.\n * @beta\n */\nexport interface NavigationPropertyInfo {\n /** Information about ECProperty's relationship class */\n classInfo: ClassInfo;\n /** Is the direction of the relationship forward */\n isForwardRelationship: boolean;\n /** Information about ECProperty's target class */\n targetClassInfo: ClassInfo;\n /** Is ECProperty's target class polymorphic */\n isTargetPolymorphic: boolean;\n}\n\n/**\n * Contains utilities for working with objects of [[NavigationPropertyInfo]] type.\n * @beta\n */\nexport namespace NavigationPropertyInfo {\n /**\n * Serialize [[NavigationPropertyInfo]] to JSON\n * @deprecated in 3.x. Use [[toCompressedJSON]].\n */\n // istanbul ignore next\n export function toJSON(info: NavigationPropertyInfo): NavigationPropertyInfoJSON {\n return { ...info };\n }\n\n /** Serialize [[NavigationPropertyInfo]] to compressed JSON */\n export function toCompressedJSON(navigationPropertyInfo: NavigationPropertyInfo, classesMap: { [id: string]: CompressedClassInfoJSON }): NavigationPropertyInfoJSON<string> {\n const { id: relationshipId, ...relationshipLeftOverInfo } = navigationPropertyInfo.classInfo;\n const { id: targetId, ...targetLeftOverInfo } = navigationPropertyInfo.targetClassInfo;\n classesMap[relationshipId] = relationshipLeftOverInfo;\n classesMap[targetId] = targetLeftOverInfo;\n\n return {\n ...navigationPropertyInfo,\n classInfo: relationshipId,\n targetClassInfo: targetId,\n };\n }\n\n /**\n * Deserialize [[NavigationPropertyInfo]] from JSON\n * @deprecated in 3.x. Use [[fromCompressedJSON]].\n */\n // istanbul ignore next\n export function fromJSON(json: NavigationPropertyInfoJSON): NavigationPropertyInfo {\n return { ...json };\n }\n\n /** Deserialize [[NavigationPropertyInfo]] from compressed JSON */\n export function fromCompressedJSON(compressedNavigationPropertyInfoJSON: NavigationPropertyInfoJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): NavigationPropertyInfo {\n return {\n ...compressedNavigationPropertyInfoJSON,\n classInfo: { id: compressedNavigationPropertyInfoJSON.classInfo, ...classesMap[compressedNavigationPropertyInfoJSON.classInfo] },\n targetClassInfo: { id: compressedNavigationPropertyInfoJSON.targetClassInfo, ...classesMap[compressedNavigationPropertyInfoJSON.targetClassInfo] },\n };\n }\n}\n\n/**\n * A serialized version of [[NavigationPropertyInfo]]\n * @beta\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface NavigationPropertyInfoJSON<TClassInfoJSON = ClassInfoJSON> {\n classInfo: TClassInfoJSON;\n isForwardRelationship: boolean;\n targetClassInfo: TClassInfoJSON;\n isTargetPolymorphic: boolean;\n}\n\n/**\n * A structure that describes an ECProperty\n * @public\n */\nexport interface PropertyInfo {\n /** Information about ECProperty class */\n classInfo: ClassInfo;\n /** Name of the ECProperty */\n name: string;\n /** Type name of the ECProperty */\n type: string;\n /** Enumeration info if the property is enumerable */\n enumerationInfo?: EnumerationInfo;\n /** Kind of quantity information, if any. */\n kindOfQuantity?: KindOfQuantityInfo;\n /** Extended type name of the ECProperty if it has one */\n extendedType?: string;\n /**\n * Navigation property info if the field is navigation type\n * @beta\n */\n navigationPropertyInfo?: NavigationPropertyInfo;\n}\n\n/** @public */\nexport namespace PropertyInfo {\n /**\n * Serialize [[PropertyInfo]] to JSON\n * @deprecated in 3.x. Use [[PropertyInfo]].\n */\n // istanbul ignore next\n export function toJSON(info: PropertyInfo): PropertyInfoJSON {\n return { ...info };\n }\n\n /** Serialize [[PropertyInfo]] to compressed JSON */\n export function toCompressedJSON(propertyInfo: PropertyInfo, classesMap: { [id: string]: CompressedClassInfoJSON }): PropertyInfoJSON<string> {\n const { navigationPropertyInfo, ...leftOverPropertyInfo } = propertyInfo;\n const { id, ...leftOverInfo } = propertyInfo.classInfo;\n classesMap[id] = leftOverInfo;\n\n return {\n ...leftOverPropertyInfo,\n classInfo: propertyInfo.classInfo.id,\n ...(navigationPropertyInfo ? { navigationPropertyInfo: NavigationPropertyInfo.toCompressedJSON(navigationPropertyInfo, classesMap) } : undefined),\n };\n }\n\n /**\n * Deserialize [[PropertyInfo]] from JSON\n * @deprecated in 3.x. Use [[PropertyInfo]].\n */\n // istanbul ignore next\n export function fromJSON(json: PropertyInfoJSON): PropertyInfo {\n return { ...json };\n }\n}\n\n/**\n * A serialized version of [[PropertyInfo]]\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface PropertyInfoJSON<TClassInfoJSON = ClassInfoJSON> {\n classInfo: TClassInfoJSON;\n name: string;\n type: string;\n enumerationInfo?: EnumerationInfo;\n kindOfQuantity?: KindOfQuantityInfo;\n /** @beta */\n navigationPropertyInfo?: NavigationPropertyInfoJSON<TClassInfoJSON>;\n}\n\n/**\n * A structure that describes a related class and the properties of that relationship.\n * @public\n */\nexport interface RelatedClassInfo {\n /** Information about the source ECClass */\n sourceClassInfo: ClassInfo;\n\n /** Information about the target ECClass */\n targetClassInfo: ClassInfo;\n\n /** Is target class handled polymorphically */\n isPolymorphicTargetClass?: boolean;\n\n /** Information about the ECRelationship */\n relationshipInfo: ClassInfo;\n\n /** Should relationship be followed in a forward direction to access the related class. */\n isForwardRelationship: boolean;\n\n /** Is relationship handled polymorphically */\n isPolymorphicRelationship?: boolean;\n}\n\n/** @public */\nexport namespace RelatedClassInfo {\n /**\n * Serialize [[RelatedClassInfo]] to JSON\n * @deprecated in 3.x. Use [[RelatedClassInfo]].\n */\n export function toJSON(info: RelatedClassInfo): RelatedClassInfoJSON {\n return { ...info };\n }\n\n /** Serialize [[RelatedClassInfo]] to compressed JSON */\n export function toCompressedJSON(classInfo: RelatedClassInfo, classesMap: { [id: string]: CompressedClassInfoJSON }): RelatedClassInfoJSON<string> {\n const { id: sourceId, ...sourceLeftOverInfo } = classInfo.sourceClassInfo;\n const { id: targetId, ...targetLeftOverInfo } = classInfo.targetClassInfo;\n const { id: relationshipId, ...relationshipLeftOverInfo } = classInfo.relationshipInfo;\n\n classesMap[sourceId] = sourceLeftOverInfo;\n classesMap[targetId] = targetLeftOverInfo;\n classesMap[relationshipId] = relationshipLeftOverInfo;\n\n return {\n ...classInfo,\n sourceClassInfo: sourceId,\n targetClassInfo: targetId,\n relationshipInfo: relationshipId,\n };\n }\n\n /**\n * Deserialize [[RelatedClassInfo]] from JSON\n * @deprecated in 3.x. Use [[RelatedClassInfo]].\n */\n export function fromJSON(json: RelatedClassInfoJSON): RelatedClassInfo {\n return { ...json };\n }\n\n /** Deserialize [[RelatedClassInfo]] from compressed JSON */\n export function fromCompressedJSON(json: RelatedClassInfoJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): RelatedClassInfo {\n assert(classesMap.hasOwnProperty(json.sourceClassInfo));\n assert(classesMap.hasOwnProperty(json.targetClassInfo));\n assert(classesMap.hasOwnProperty(json.relationshipInfo));\n return {\n ...json,\n sourceClassInfo: { id: json.sourceClassInfo, ...classesMap[json.sourceClassInfo] },\n targetClassInfo: { id: json.targetClassInfo, ...classesMap[json.targetClassInfo] },\n relationshipInfo: { id: json.relationshipInfo, ...classesMap[json.relationshipInfo] },\n };\n }\n\n /** Check two [[RelatedClassInfo]] or [[StrippedRelatedClassInfo]] for equality */\n export function equals(lhs: RelatedClassInfo | StrippedRelatedClassInfo, rhs: RelatedClassInfo | StrippedRelatedClassInfo): boolean {\n return lhs.isForwardRelationship === rhs.isForwardRelationship\n && getClassName(lhs, \"source\") === getClassName(rhs, \"source\")\n && getClassName(lhs, \"target\") === getClassName(rhs, \"target\")\n && getClassName(lhs, \"relationship\") === getClassName(rhs, \"relationship\");\n }\n\n function isStripped(info: RelatedClassInfo | StrippedRelatedClassInfo): info is StrippedRelatedClassInfo {\n const maybeStripped = info as StrippedRelatedClassInfo;\n return !!maybeStripped.relationshipName && !!maybeStripped.sourceClassName && !!maybeStripped.targetClassName;\n }\n\n function getClassName(info: RelatedClassInfo | StrippedRelatedClassInfo, whichClass: \"relationship\" | \"source\" | \"target\"): string {\n switch (whichClass) {\n case \"source\": return isStripped(info) ? info.sourceClassName : info.sourceClassInfo.name;\n case \"target\": return isStripped(info) ? info.targetClassName : info.targetClassInfo.name;\n case \"relationship\": return isStripped(info) ? info.relationshipName : info.relationshipInfo.name;\n }\n }\n\n /** Strip given [[RelatedClassInfo]] to [[StrippedRelatedClassInfo]] */\n export function strip(full: RelatedClassInfo): StrippedRelatedClassInfo {\n return {\n sourceClassName: full.sourceClassInfo.name,\n targetClassName: full.targetClassInfo.name,\n relationshipName: full.relationshipInfo.name,\n isForwardRelationship: full.isForwardRelationship,\n };\n }\n}\n\n/**\n * A serialized version of [[RelatedClassInfo]]\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface RelatedClassInfoJSON<TClassInfoJSON = ClassInfoJSON> {\n sourceClassInfo: TClassInfoJSON;\n targetClassInfo: TClassInfoJSON;\n isPolymorphicTargetClass?: boolean;\n relationshipInfo: TClassInfoJSON;\n isForwardRelationship: boolean;\n isPolymorphicRelationship?: boolean;\n}\n\n/**\n * A structure that describes a relationship between source and target classes where\n * an actual ECRelationship between them is optional.\n * @public\n */\nexport type RelatedClassInfoWithOptionalRelationship = PartialBy<RelatedClassInfo, \"relationshipInfo\" | \"isForwardRelationship\" | \"isPolymorphicRelationship\">;\n\n/** @public */\n// eslint-disable-next-line deprecation/deprecation\nexport type RelatedClassInfoWithOptionalRelationshipJSON<TClassInfoJSON = ClassInfoJSON> = PartialBy<RelatedClassInfoJSON<TClassInfoJSON>, \"relationshipInfo\" | \"isForwardRelationship\" | \"isPolymorphicRelationship\">;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace RelatedClassInfoWithOptionalRelationship {\n /** Serialize [[RelatedClassInfoWithOptionalRelationship]] to compressed JSON */\n export function toCompressedJSON(classInfo: RelatedClassInfoWithOptionalRelationship, classesMap: { [id: string]: CompressedClassInfoJSON }): RelatedClassInfoWithOptionalRelationshipJSON<string> {\n const { sourceClassInfo, targetClassInfo, relationshipInfo, ...otherProps } = classInfo;\n const { id: sourceId, ...sourceLeftOverInfo } = sourceClassInfo;\n const { id: targetId, ...targetLeftOverInfo } = targetClassInfo;\n\n classesMap[sourceId] = sourceLeftOverInfo;\n classesMap[targetId] = targetLeftOverInfo;\n\n if (relationshipInfo) {\n const { id: relationshipId, ...relationshipLeftOverInfo } = relationshipInfo;\n classesMap[relationshipId] = relationshipLeftOverInfo;\n }\n\n return {\n ...otherProps,\n sourceClassInfo: sourceId,\n targetClassInfo: targetId,\n ...(relationshipInfo ? { relationshipInfo: relationshipInfo.id } : undefined),\n };\n }\n\n /** Deserialize [[RelatedClassInfoWithOptionalRelationship]] from compressed JSON */\n export function fromCompressedJSON(json: RelatedClassInfoWithOptionalRelationshipJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): RelatedClassInfoWithOptionalRelationship {\n const { sourceClassInfo, targetClassInfo, relationshipInfo, ...otherProps } = json;\n assert(classesMap.hasOwnProperty(sourceClassInfo));\n assert(classesMap.hasOwnProperty(targetClassInfo));\n if (relationshipInfo)\n assert(classesMap.hasOwnProperty(relationshipInfo));\n return {\n ...otherProps,\n sourceClassInfo: { id: sourceClassInfo, ...classesMap[sourceClassInfo] },\n targetClassInfo: { id: targetClassInfo, ...classesMap[targetClassInfo] },\n ...(relationshipInfo ? { relationshipInfo: { id: relationshipInfo, ...classesMap[relationshipInfo] } } : undefined),\n };\n }\n}\n\n/**\n * A structure that describes a related class path.\n * @public\n */\nexport type RelationshipPath = RelatedClassInfo[];\n\n/**\n * Serialized [[RelationshipPath]]\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport type RelationshipPathJSON<TClassInfoJSON = ClassInfoJSON> = RelatedClassInfoJSON<TClassInfoJSON>[];\n\n/** @public */\nexport namespace RelationshipPath { // eslint-disable-line @typescript-eslint/no-redeclare\n /** Reverse direction of the given [[RelationshipPath]] */\n export function reverse(path: RelationshipPath): RelationshipPath {\n return [...path].reverse().map((step) => ({\n ...step,\n sourceClassInfo: step.targetClassInfo,\n targetClassInfo: step.sourceClassInfo,\n isForwardRelationship: !step.isForwardRelationship,\n }));\n }\n\n /** Check two [[RelationshipPath]] or [[StrippedRelationshipPath]] for equality */\n export function equals(lhs: Array<RelatedClassInfo | StrippedRelatedClassInfo>, rhs: Array<RelatedClassInfo | StrippedRelatedClassInfo>): boolean {\n return lhs.length === rhs.length\n && lhs.every((lhsPart, i) => RelatedClassInfo.equals(lhsPart, rhs[i]));\n }\n\n /** Strip given [[RelationshipPath]] to [[StrippedRelationshipPath]] */\n export function strip(full: RelationshipPath): StrippedRelationshipPath {\n return full.map(RelatedClassInfo.strip);\n }\n}\n\n/**\n * Data structure that contains a subset of [[RelatedClassInfo]] required to\n * identify the relationship.\n * @public\n */\nexport interface StrippedRelatedClassInfo {\n sourceClassName: string;\n targetClassName: string;\n relationshipName: string;\n isForwardRelationship: boolean;\n}\n\n/**\n * Data structure that contains a subset of [[RelationshipPath]] required to\n * identify the relationship path.\n * @public\n */\nexport type StrippedRelationshipPath = StrippedRelatedClassInfo[];\n"]}
1
+ {"version":3,"file":"EC.js","sourceRoot":"","sources":["../../../src/presentation-common/EC.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAyD;AA2BzD,cAAc;AACd,IAAiB,WAAW,CA6B3B;AA7BD,WAAiB,WAAW;IAC1B,8BAA8B;IAC9B,SAAgB,OAAO,CAAC,GAAgB,EAAE,GAAgB;QACxD,MAAM,gBAAgB,GAAG,GAAG,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACpE,IAAI,gBAAgB,KAAK,CAAC,EAAE;YAC1B,OAAO,gBAAgB,CAAC;SACzB;QACD,OAAO,GAAG,CAAC,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACtC,CAAC;IANe,mBAAO,UAMtB,CAAA;IAED;;;OAGG;IACH,uBAAuB;IACvB,mDAAmD;IACnD,SAAgB,MAAM,CAAC,GAAgB;QACrC,OAAO,EAAE,GAAG,GAAG,EAAE,CAAC;IACpB,CAAC;IAFe,kBAAM,SAErB,CAAA;IAED;;;OAGG;IACH,uBAAuB;IACvB,mDAAmD;IACnD,SAAgB,QAAQ,CAAC,IAAqB;QAC5C,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;IACrB,CAAC;IAFe,oBAAQ,WAEvB,CAAA;AACH,CAAC,EA7BgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QA6B3B;AAyBD,cAAc;AACd,IAAiB,SAAS,CAoBzB;AApBD,WAAiB,SAAS;IACxB;;;OAGG;IACH,uBAAuB;IACvB,mDAAmD;IACnD,SAAgB,MAAM,CAAC,IAAe;QACpC,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;IACrB,CAAC;IAFe,gBAAM,SAErB,CAAA;IAED;;;OAGG;IACH,uBAAuB;IACvB,m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AC;IACJ,CAAC;IAhBe,2DAAkB,qBAgBjC,CAAA;AACH,CAAC,EA5CgB,wCAAwC,GAAxC,gDAAwC,KAAxC,gDAAwC,QA4CxD;AAeD,cAAc;AACd,2DAA2D;AAC3D,IAAiB,gBAAgB,CAoBhC;AApBD,WAAiB,gBAAgB;IAC/B,0DAA0D;IAC1D,SAAgB,OAAO,CAAC,IAAsB;QAC5C,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACxC,GAAG,IAAI;YACP,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,qBAAqB,EAAE,CAAC,IAAI,CAAC,qBAAqB;SACnD,CAAC,CAAC,CAAC;IACN,CAAC;IAPe,wBAAO,UAOtB,CAAA;IAED,kFAAkF;IAClF,SAAgB,MAAM,CAAC,GAAuD,EAAE,GAAuD;QACrI,OAAO,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1G,CAAC;IAFe,uBAAM,SAErB,CAAA;IAED,uEAAuE;IACvE,SAAgB,KAAK,CAAC,IAAsB;QAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAFe,sBAAK,QAEpB,CAAA;AACH,CAAC,EApBgB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAoBhC","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 { assert, Id64String } from \"@itwin/core-bentley\";\nimport { FormatProps } from \"@itwin/core-quantity\";\nimport { PartialBy } from \"./Utils\";\n\n/**\n * Type of an ECClass ID.\n * @public\n */\nexport type ClassId = Id64String;\n\n/**\n * Type of an ECInstance ID.\n * @public\n */\nexport type InstanceId = Id64String;\n\n/**\n * A key that uniquely identifies an instance in an iModel\n * @public\n */\nexport interface InstanceKey {\n /** Full class name in format `SchemaName:ClassName` */\n className: string;\n /** ECInstance ID */\n id: InstanceId;\n}\n\n/** @public */\nexport namespace InstanceKey {\n /** Compare 2 instance keys */\n export function compare(lhs: InstanceKey, rhs: InstanceKey): number {\n const classNameCompare = lhs.className.localeCompare(rhs.className);\n if (classNameCompare !== 0) {\n return classNameCompare;\n }\n return lhs.id.localeCompare(rhs.id);\n }\n\n /**\n * Serialize [[InstanceKey]] to JSON\n * @deprecated in 3.x. Use [[InstanceKey]].\n */\n // istanbul ignore next\n // eslint-disable-next-line deprecation/deprecation\n export function toJSON(key: InstanceKey): InstanceKeyJSON {\n return { ...key };\n }\n\n /**\n * Deserialize [[InstanceKey]] from JSON\n * @deprecated in 3.x. Use [[InstanceKey]].\n */\n // istanbul ignore next\n // eslint-disable-next-line deprecation/deprecation\n export function fromJSON(json: InstanceKeyJSON) {\n return { ...json };\n }\n}\n\n/**\n * A serialized version of [[InstanceKey]]\n * @public\n * @deprecated in 3.x. Use [[InstanceKey]].\n */\nexport interface InstanceKeyJSON {\n className: string;\n id: string;\n}\n\n/**\n * Information about an ECClass\n * @public\n */\nexport interface ClassInfo {\n /** ECClass ID */\n id: ClassId;\n /** Full class name in format `SchemaName:ClassName` */\n name: string;\n /** ECClass label */\n label: string;\n}\n\n/** @public */\nexport namespace ClassInfo {\n /**\n * Serialize [[ClassInfo]] to JSON\n * @deprecated in 3.x. Use [[ClassInfo]].\n */\n // istanbul ignore next\n // eslint-disable-next-line deprecation/deprecation\n export function toJSON(info: ClassInfo): ClassInfoJSON {\n return { ...info };\n }\n\n /**\n * Deserialize [[ClassInfo]] from JSON\n * @deprecated in 3.x. Use [[ClassInfo]].\n */\n // istanbul ignore next\n // eslint-disable-next-line deprecation/deprecation\n export function fromJSON(json: ClassInfoJSON): ClassInfo {\n return { ...json };\n }\n}\n\n/**\n * A serialized version of [[ClassInfo]]\n * @public\n * @deprecated in 3.x. Use [[ClassInfo]].\n */\nexport interface ClassInfoJSON {\n id: string;\n name: string;\n label: string;\n}\n\n/**\n * A serialized and compressed version of [[ClassInfo]]\n * @public\n */\nexport interface CompressedClassInfoJSON {\n name: string;\n label: string;\n}\n\n/**\n * A single choice in enumeration\n * @public\n */\nexport interface EnumerationChoice {\n /** Label of the choice */\n label: string;\n /** Value of the choice */\n value: string | number;\n}\n\n/**\n * Enumeration information\n * @public\n */\nexport interface EnumerationInfo {\n /** Available enumeration choices */\n choices: EnumerationChoice[];\n /** Is the enumeration strict (values only allowed from `choices` list) */\n isStrict: boolean;\n}\n\n/**\n * Kind of quantity information\n * @public\n */\nexport interface KindOfQuantityInfo {\n /** Full name of KindOfQuantity in format `SchemaName:KindOfQuantityName` */\n name: string;\n /** Label of KindOfQuantity */\n label: string;\n /**\n * Persistence unit identifier.\n * @alpha Still not entirely clear how kind of quantities will be handled and what data we'll need\n */\n persistenceUnit: string;\n /**\n * Active format that was used to format property value.\n * @alpha Still not entirely clear how kind of quantities will be handled and what data we'll need\n */\n activeFormat?: FormatProps;\n}\n\n/**\n * A data structure for storing navigation property information.\n * @beta\n */\nexport interface NavigationPropertyInfo {\n /** Information about ECProperty's relationship class */\n classInfo: ClassInfo;\n /** Is the direction of the relationship forward */\n isForwardRelationship: boolean;\n /** Information about ECProperty's target class */\n targetClassInfo: ClassInfo;\n /** Is ECProperty's target class polymorphic */\n isTargetPolymorphic: boolean;\n}\n\n/**\n * Contains utilities for working with objects of [[NavigationPropertyInfo]] type.\n * @beta\n */\nexport namespace NavigationPropertyInfo {\n /**\n * Serialize [[NavigationPropertyInfo]] to JSON\n * @deprecated in 3.x. Use [[toCompressedJSON]].\n */\n // istanbul ignore next\n export function toJSON(info: NavigationPropertyInfo): NavigationPropertyInfoJSON {\n return { ...info };\n }\n\n /** Serialize [[NavigationPropertyInfo]] to compressed JSON */\n export function toCompressedJSON(\n navigationPropertyInfo: NavigationPropertyInfo,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n ): NavigationPropertyInfoJSON<string> {\n const { id: relationshipId, ...relationshipLeftOverInfo } = navigationPropertyInfo.classInfo;\n const { id: targetId, ...targetLeftOverInfo } = navigationPropertyInfo.targetClassInfo;\n classesMap[relationshipId] = relationshipLeftOverInfo;\n classesMap[targetId] = targetLeftOverInfo;\n\n return {\n ...navigationPropertyInfo,\n classInfo: relationshipId,\n targetClassInfo: targetId,\n };\n }\n\n /**\n * Deserialize [[NavigationPropertyInfo]] from JSON\n * @deprecated in 3.x. Use [[fromCompressedJSON]].\n */\n // istanbul ignore next\n export function fromJSON(json: NavigationPropertyInfoJSON): NavigationPropertyInfo {\n return { ...json };\n }\n\n /** Deserialize [[NavigationPropertyInfo]] from compressed JSON */\n export function fromCompressedJSON(\n compressedNavigationPropertyInfoJSON: NavigationPropertyInfoJSON<string>,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n ): NavigationPropertyInfo {\n return {\n ...compressedNavigationPropertyInfoJSON,\n classInfo: { id: compressedNavigationPropertyInfoJSON.classInfo, ...classesMap[compressedNavigationPropertyInfoJSON.classInfo] },\n targetClassInfo: { id: compressedNavigationPropertyInfoJSON.targetClassInfo, ...classesMap[compressedNavigationPropertyInfoJSON.targetClassInfo] },\n };\n }\n}\n\n/**\n * A serialized version of [[NavigationPropertyInfo]]\n * @beta\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface NavigationPropertyInfoJSON<TClassInfoJSON = ClassInfoJSON> {\n classInfo: TClassInfoJSON;\n isForwardRelationship: boolean;\n targetClassInfo: TClassInfoJSON;\n isTargetPolymorphic: boolean;\n}\n\n/**\n * A structure that describes an ECProperty\n * @public\n */\nexport interface PropertyInfo {\n /** Information about ECProperty class */\n classInfo: ClassInfo;\n /** Name of the ECProperty */\n name: string;\n /** Type name of the ECProperty */\n type: string;\n /** Enumeration info if the property is enumerable */\n enumerationInfo?: EnumerationInfo;\n /** Kind of quantity information, if any. */\n kindOfQuantity?: KindOfQuantityInfo;\n /** Extended type name of the ECProperty if it has one */\n extendedType?: string;\n /**\n * Navigation property info if the field is navigation type\n * @beta\n */\n navigationPropertyInfo?: NavigationPropertyInfo;\n}\n\n/** @public */\nexport namespace PropertyInfo {\n /**\n * Serialize [[PropertyInfo]] to JSON\n * @deprecated in 3.x. Use [[PropertyInfo]].\n */\n // istanbul ignore next\n export function toJSON(info: PropertyInfo): PropertyInfoJSON {\n return { ...info };\n }\n\n /** Serialize [[PropertyInfo]] to compressed JSON */\n export function toCompressedJSON(propertyInfo: PropertyInfo, classesMap: { [id: string]: CompressedClassInfoJSON }): PropertyInfoJSON<string> {\n const { navigationPropertyInfo, ...leftOverPropertyInfo } = propertyInfo;\n const { id, ...leftOverInfo } = propertyInfo.classInfo;\n classesMap[id] = leftOverInfo;\n\n return {\n ...leftOverPropertyInfo,\n classInfo: propertyInfo.classInfo.id,\n ...(navigationPropertyInfo ? { navigationPropertyInfo: NavigationPropertyInfo.toCompressedJSON(navigationPropertyInfo, classesMap) } : undefined),\n };\n }\n\n /**\n * Deserialize [[PropertyInfo]] from JSON\n * @deprecated in 3.x. Use [[PropertyInfo]].\n */\n // istanbul ignore next\n export function fromJSON(json: PropertyInfoJSON): PropertyInfo {\n return { ...json };\n }\n}\n\n/**\n * A serialized version of [[PropertyInfo]]\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface PropertyInfoJSON<TClassInfoJSON = ClassInfoJSON> {\n classInfo: TClassInfoJSON;\n name: string;\n type: string;\n enumerationInfo?: EnumerationInfo;\n kindOfQuantity?: KindOfQuantityInfo;\n /** @beta */\n navigationPropertyInfo?: NavigationPropertyInfoJSON<TClassInfoJSON>;\n}\n\n/**\n * A structure that describes a related class and the properties of that relationship.\n * @public\n */\nexport interface RelatedClassInfo {\n /** Information about the source ECClass */\n sourceClassInfo: ClassInfo;\n\n /** Information about the target ECClass */\n targetClassInfo: ClassInfo;\n\n /** Is target class handled polymorphically */\n isPolymorphicTargetClass?: boolean;\n\n /** Optionally, IDs of specific target class instances. */\n targetInstanceIds?: Id64String[];\n\n /** Information about the ECRelationship */\n relationshipInfo: ClassInfo;\n\n /** Should relationship be followed in a forward direction to access the related class. */\n isForwardRelationship: boolean;\n\n /** Is relationship handled polymorphically */\n isPolymorphicRelationship?: boolean;\n}\n\n/** @public */\nexport namespace RelatedClassInfo {\n /**\n * Serialize [[RelatedClassInfo]] to JSON\n * @deprecated in 3.x. Use [[RelatedClassInfo]].\n */\n export function toJSON(info: RelatedClassInfo): RelatedClassInfoJSON {\n return { ...info };\n }\n\n /** Serialize [[RelatedClassInfo]] to compressed JSON */\n export function toCompressedJSON(classInfo: RelatedClassInfo, classesMap: { [id: string]: CompressedClassInfoJSON }): RelatedClassInfoJSON<string> {\n const { id: sourceId, ...sourceLeftOverInfo } = classInfo.sourceClassInfo;\n const { id: targetId, ...targetLeftOverInfo } = classInfo.targetClassInfo;\n const { id: relationshipId, ...relationshipLeftOverInfo } = classInfo.relationshipInfo;\n\n classesMap[sourceId] = sourceLeftOverInfo;\n classesMap[targetId] = targetLeftOverInfo;\n classesMap[relationshipId] = relationshipLeftOverInfo;\n\n return {\n ...classInfo,\n sourceClassInfo: sourceId,\n targetClassInfo: targetId,\n relationshipInfo: relationshipId,\n };\n }\n\n /**\n * Deserialize [[RelatedClassInfo]] from JSON\n * @deprecated in 3.x. Use [[RelatedClassInfo]].\n */\n export function fromJSON(json: RelatedClassInfoJSON): RelatedClassInfo {\n return { ...json };\n }\n\n /** Deserialize [[RelatedClassInfo]] from compressed JSON */\n export function fromCompressedJSON(json: RelatedClassInfoJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): RelatedClassInfo {\n assert(classesMap.hasOwnProperty(json.sourceClassInfo));\n assert(classesMap.hasOwnProperty(json.targetClassInfo));\n assert(classesMap.hasOwnProperty(json.relationshipInfo));\n return {\n ...json,\n sourceClassInfo: { id: json.sourceClassInfo, ...classesMap[json.sourceClassInfo] },\n targetClassInfo: { id: json.targetClassInfo, ...classesMap[json.targetClassInfo] },\n relationshipInfo: { id: json.relationshipInfo, ...classesMap[json.relationshipInfo] },\n };\n }\n\n /** Check two [[RelatedClassInfo]] or [[StrippedRelatedClassInfo]] for equality */\n export function equals(lhs: RelatedClassInfo | StrippedRelatedClassInfo, rhs: RelatedClassInfo | StrippedRelatedClassInfo): boolean {\n return (\n lhs.isForwardRelationship === rhs.isForwardRelationship &&\n getClassName(lhs, \"source\") === getClassName(rhs, \"source\") &&\n getClassName(lhs, \"target\") === getClassName(rhs, \"target\") &&\n getClassName(lhs, \"relationship\") === getClassName(rhs, \"relationship\")\n );\n }\n\n function isStripped(info: RelatedClassInfo | StrippedRelatedClassInfo): info is StrippedRelatedClassInfo {\n const maybeStripped = info as StrippedRelatedClassInfo;\n return !!maybeStripped.relationshipName && !!maybeStripped.sourceClassName && !!maybeStripped.targetClassName;\n }\n\n function getClassName(info: RelatedClassInfo | StrippedRelatedClassInfo, whichClass: \"relationship\" | \"source\" | \"target\"): string {\n switch (whichClass) {\n case \"source\":\n return isStripped(info) ? info.sourceClassName : info.sourceClassInfo.name;\n case \"target\":\n return isStripped(info) ? info.targetClassName : info.targetClassInfo.name;\n case \"relationship\":\n return isStripped(info) ? info.relationshipName : info.relationshipInfo.name;\n }\n }\n\n /** Strip given [[RelatedClassInfo]] to [[StrippedRelatedClassInfo]] */\n export function strip(full: RelatedClassInfo): StrippedRelatedClassInfo {\n return {\n sourceClassName: full.sourceClassInfo.name,\n targetClassName: full.targetClassInfo.name,\n relationshipName: full.relationshipInfo.name,\n isForwardRelationship: full.isForwardRelationship,\n };\n }\n}\n\n/**\n * A serialized version of [[RelatedClassInfo]]\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport interface RelatedClassInfoJSON<TClassInfoJSON = ClassInfoJSON> {\n sourceClassInfo: TClassInfoJSON;\n targetClassInfo: TClassInfoJSON;\n isPolymorphicTargetClass?: boolean;\n targetInstanceIds?: Id64String[];\n relationshipInfo: TClassInfoJSON;\n isForwardRelationship: boolean;\n isPolymorphicRelationship?: boolean;\n}\n\n/**\n * A structure that describes a relationship between source and target classes where\n * an actual ECRelationship between them is optional.\n * @public\n */\nexport type RelatedClassInfoWithOptionalRelationship = PartialBy<RelatedClassInfo, \"relationshipInfo\" | \"isForwardRelationship\" | \"isPolymorphicRelationship\">;\n\n/** @public */\n// eslint-disable-next-line deprecation/deprecation\nexport type RelatedClassInfoWithOptionalRelationshipJSON<TClassInfoJSON = ClassInfoJSON> = PartialBy<\n RelatedClassInfoJSON<TClassInfoJSON>,\n \"relationshipInfo\" | \"isForwardRelationship\" | \"isPolymorphicRelationship\"\n>;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace RelatedClassInfoWithOptionalRelationship {\n /** Serialize [[RelatedClassInfoWithOptionalRelationship]] to compressed JSON */\n export function toCompressedJSON(\n classInfo: RelatedClassInfoWithOptionalRelationship,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n ): RelatedClassInfoWithOptionalRelationshipJSON<string> {\n const { sourceClassInfo, targetClassInfo, relationshipInfo, ...otherProps } = classInfo;\n const { id: sourceId, ...sourceLeftOverInfo } = sourceClassInfo;\n const { id: targetId, ...targetLeftOverInfo } = targetClassInfo;\n\n classesMap[sourceId] = sourceLeftOverInfo;\n classesMap[targetId] = targetLeftOverInfo;\n\n if (relationshipInfo) {\n const { id: relationshipId, ...relationshipLeftOverInfo } = relationshipInfo;\n classesMap[relationshipId] = relationshipLeftOverInfo;\n }\n\n return {\n ...otherProps,\n sourceClassInfo: sourceId,\n targetClassInfo: targetId,\n ...(relationshipInfo ? { relationshipInfo: relationshipInfo.id } : undefined),\n };\n }\n\n /** Deserialize [[RelatedClassInfoWithOptionalRelationship]] from compressed JSON */\n export function fromCompressedJSON(\n json: RelatedClassInfoWithOptionalRelationshipJSON<string>,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n ): RelatedClassInfoWithOptionalRelationship {\n const { sourceClassInfo, targetClassInfo, relationshipInfo, ...otherProps } = json;\n assert(classesMap.hasOwnProperty(sourceClassInfo));\n assert(classesMap.hasOwnProperty(targetClassInfo));\n if (relationshipInfo) {\n assert(classesMap.hasOwnProperty(relationshipInfo));\n }\n return {\n ...otherProps,\n sourceClassInfo: { id: sourceClassInfo, ...classesMap[sourceClassInfo] },\n targetClassInfo: { id: targetClassInfo, ...classesMap[targetClassInfo] },\n ...(relationshipInfo ? { relationshipInfo: { id: relationshipInfo, ...classesMap[relationshipInfo] } } : undefined),\n };\n }\n}\n\n/**\n * A structure that describes a related class path.\n * @public\n */\nexport type RelationshipPath = RelatedClassInfo[];\n\n/**\n * Serialized [[RelationshipPath]]\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport type RelationshipPathJSON<TClassInfoJSON = ClassInfoJSON> = RelatedClassInfoJSON<TClassInfoJSON>[];\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace RelationshipPath {\n /** Reverse direction of the given [[RelationshipPath]] */\n export function reverse(path: RelationshipPath): RelationshipPath {\n return [...path].reverse().map((step) => ({\n ...step,\n sourceClassInfo: step.targetClassInfo,\n targetClassInfo: step.sourceClassInfo,\n isForwardRelationship: !step.isForwardRelationship,\n }));\n }\n\n /** Check two [[RelationshipPath]] or [[StrippedRelationshipPath]] for equality */\n export function equals(lhs: Array<RelatedClassInfo | StrippedRelatedClassInfo>, rhs: Array<RelatedClassInfo | StrippedRelatedClassInfo>): boolean {\n return lhs.length === rhs.length && lhs.every((lhsPart, i) => RelatedClassInfo.equals(lhsPart, rhs[i]));\n }\n\n /** Strip given [[RelationshipPath]] to [[StrippedRelationshipPath]] */\n export function strip(full: RelationshipPath): StrippedRelationshipPath {\n return full.map(RelatedClassInfo.strip);\n }\n}\n\n/**\n * Data structure that contains a subset of [[RelatedClassInfo]] required to\n * identify the relationship.\n * @public\n */\nexport interface StrippedRelatedClassInfo {\n sourceClassName: string;\n targetClassName: string;\n relationshipName: string;\n isForwardRelationship: boolean;\n}\n\n/**\n * Data structure that contains a subset of [[RelationshipPath]] required to\n * identify the relationship path.\n * @public\n */\nexport type StrippedRelationshipPath = StrippedRelatedClassInfo[];\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 RPC
8
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ElementProperties.js","sourceRoot":"","sources":["../../../src/presentation-common/ElementProperties.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 RPC\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\n\n/**\n * Data structure for storing element properties information in a simplified format.\n * @see [[Content]] for a format that stores all available element property data.\n * @public\n */\nexport interface ElementProperties {\n /** Label of element's ECClass. */\n class: string;\n /** Element's ID. */\n id: Id64String;\n /** Element's label. */\n label: string;\n /** Container of property values */\n items: { [label: string]: ElementPropertiesItem };\n}\n\n/**\n * Base type for all [[ElementPropertiesItem]] types.\n * @public\n */\nexport interface ElementPropertiesItemBase {\n /** Type of the properties item. */\n type: \"category\" | ElementPropertiesPropertyValueType;\n}\n\n/**\n * Definition for a category. A category can nest other property items, including categories.\n * @public\n */\nexport interface ElementPropertiesCategoryItem extends ElementPropertiesItemBase {\n /** Type of the properties item. */\n type: \"category\";\n /** Container of property values */\n items: { [label: string]: ElementPropertiesItem };\n}\n\n/**\n * Base type for all [[ElementPropertiesPropertyItem]] types.\n * @public\n */\nexport interface ElementPropertiesPropertyItemBase extends ElementPropertiesItemBase {\n /** Type of the properties item. */\n type: ElementPropertiesPropertyValueType;\n}\n\n/**\n * Definition for a primitive property value.\n * @public\n */\nexport interface ElementPropertiesPrimitivePropertyItem extends ElementPropertiesPropertyItemBase {\n /** Type of the properties item. */\n type: \"primitive\";\n /** Display value of the property. */\n value: string;\n}\n\n/**\n * Base type for all [[ElementPropertiesArrayPropertyItem]] types.\n * @public\n */\nexport interface ElementPropertiesArrayPropertyItemBase extends ElementPropertiesPropertyItemBase {\n /** Type of the properties item. */\n type: \"array\";\n /** Type of values contained in this array. */\n valueType: \"primitive\" | \"struct\";\n}\n\n/**\n * Definition for a primitives' array property value.\n * @public\n */\nexport interface ElementPropertiesPrimitiveArrayPropertyItem extends ElementPropertiesArrayPropertyItemBase {\n /** Type of values contained in this array. */\n valueType: \"primitive\";\n /** Array of display values. */\n values: string[];\n}\n\n/**\n * Definition for a structs' array property value.\n * @public\n */\nexport interface ElementPropertiesStructArrayPropertyItem extends ElementPropertiesArrayPropertyItemBase {\n /** Type of values contained in this array. */\n valueType: \"struct\";\n /** Array of structs. */\n values: Array<{ [memberLabel: string]: ElementPropertiesPropertyItem }>;\n}\n\n/**\n * Definition for an array property value.\n * @public\n */\nexport type ElementPropertiesArrayPropertyItem = ElementPropertiesPrimitiveArrayPropertyItem | ElementPropertiesStructArrayPropertyItem;\n\n/**\n * Definition for an struct property value.\n * @public\n */\nexport interface ElementPropertiesStructPropertyItem extends ElementPropertiesPropertyItemBase {\n /** Type of the properties item. */\n type: \"struct\";\n /** Container of struct members. */\n members: { [memberLabel: string]: ElementPropertiesPropertyItem };\n}\n\n/**\n * Available element property types.\n * @public\n */\nexport type ElementPropertiesPropertyValueType = \"primitive\" | \"array\" | \"struct\";\n\n/**\n * Definition of a property value.\n * @public\n */\nexport type ElementPropertiesPropertyItem = ElementPropertiesPrimitivePropertyItem | ElementPropertiesArrayPropertyItem | ElementPropertiesStructPropertyItem;\n\n/**\n * Definition of a property item, including a property category.\n * @public\n */\nexport type ElementPropertiesItem = ElementPropertiesCategoryItem | ElementPropertiesPropertyItem;\n"]}
1
+ {"version":3,"file":"ElementProperties.js","sourceRoot":"","sources":["../../../src/presentation-common/ElementProperties.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","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 RPC\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\n\n/**\n * Data structure for storing element properties information in a simplified format.\n * @see [[Content]] for a format that stores all available element property data.\n * @public\n */\nexport interface ElementProperties {\n /** Label of element's ECClass. */\n class: string;\n /** Element's ID. */\n id: Id64String;\n /** Element's label. */\n label: string;\n /** Container of property values */\n items: { [label: string]: ElementPropertiesItem };\n}\n\n/**\n * Base type for all [[ElementPropertiesItem]] types.\n * @public\n */\nexport interface ElementPropertiesItemBase {\n /** Type of the properties item. */\n type: \"category\" | ElementPropertiesPropertyValueType;\n}\n\n/**\n * Definition for a category. A category can nest other property items, including categories.\n * @public\n */\nexport interface ElementPropertiesCategoryItem extends ElementPropertiesItemBase {\n /** Type of the properties item. */\n type: \"category\";\n /** Container of property values */\n items: { [label: string]: ElementPropertiesItem };\n}\n\n/**\n * Base type for all [[ElementPropertiesPropertyItem]] types.\n * @public\n */\nexport interface ElementPropertiesPropertyItemBase extends ElementPropertiesItemBase {\n /** Type of the properties item. */\n type: ElementPropertiesPropertyValueType;\n}\n\n/**\n * Definition for a primitive property value.\n * @public\n */\nexport interface ElementPropertiesPrimitivePropertyItem extends ElementPropertiesPropertyItemBase {\n /** Type of the properties item. */\n type: \"primitive\";\n /** Display value of the property. */\n value: string;\n}\n\n/**\n * Base type for all [[ElementPropertiesArrayPropertyItem]] types.\n * @public\n */\nexport interface ElementPropertiesArrayPropertyItemBase extends ElementPropertiesPropertyItemBase {\n /** Type of the properties item. */\n type: \"array\";\n /** Type of values contained in this array. */\n valueType: \"primitive\" | \"struct\";\n}\n\n/**\n * Definition for a primitives' array property value.\n * @public\n */\nexport interface ElementPropertiesPrimitiveArrayPropertyItem extends ElementPropertiesArrayPropertyItemBase {\n /** Type of values contained in this array. */\n valueType: \"primitive\";\n /** Array of display values. */\n values: string[];\n}\n\n/**\n * Definition for a structs' array property value.\n * @public\n */\nexport interface ElementPropertiesStructArrayPropertyItem extends ElementPropertiesArrayPropertyItemBase {\n /** Type of values contained in this array. */\n valueType: \"struct\";\n /** Array of structs. */\n values: Array<{ [memberLabel: string]: ElementPropertiesPropertyItem }>;\n}\n\n/**\n * Definition for an array property value.\n * @public\n */\nexport type ElementPropertiesArrayPropertyItem = ElementPropertiesPrimitiveArrayPropertyItem | ElementPropertiesStructArrayPropertyItem;\n\n/**\n * Definition for an struct property value.\n * @public\n */\nexport interface ElementPropertiesStructPropertyItem extends ElementPropertiesPropertyItemBase {\n /** Type of the properties item. */\n type: \"struct\";\n /** Container of struct members. */\n members: { [memberLabel: string]: ElementPropertiesPropertyItem };\n}\n\n/**\n * Available element property types.\n * @public\n */\nexport type ElementPropertiesPropertyValueType = \"primitive\" | \"array\" | \"struct\";\n\n/**\n * Definition of a property value.\n * @public\n */\nexport type ElementPropertiesPropertyItem = ElementPropertiesPrimitivePropertyItem | ElementPropertiesArrayPropertyItem | ElementPropertiesStructPropertyItem;\n\n/**\n * Definition of a property item, including a property category.\n * @public\n */\nexport type ElementPropertiesItem = ElementPropertiesCategoryItem | ElementPropertiesPropertyItem;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/Error.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAExE;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,sBAAsB;IACtB,OAAO,IAAI;IAEX,6BAA6B;IAC7B,QAAQ,IAAI;IAEZ,qBAAqB;IACrB,KAAK,QAAU;IAEf,yCAAyC;IACzC,cAAc,QAAY;IAE1B,sCAAsC;IACtC,iBAAiB,QAAY;IAE7B,kCAAkC;IAClC,eAAe,QAAY;IAE3B;;;OAGG;IACH,cAAc,QAAY;CAC3B;AAED;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,YAAY;IAEjD;;;;;;;OAOG;gBACgB,WAAW,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,mBAAmB;IAIvG;;;OAGG;cAEgB,SAAS,IAAI,MAAM;CAMvC"}
1
+ {"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/Error.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAExE;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,sBAAsB;IACtB,OAAO,IAAI;IAEX,6BAA6B;IAC7B,QAAQ,IAAI;IAEZ,qBAAqB;IACrB,KAAK,QAAU;IAEf,yCAAyC;IACzC,cAAc,QAAY;IAE1B,sCAAsC;IACtC,iBAAiB,QAAY;IAE7B,kCAAkC;IAClC,eAAe,QAAY;IAE3B;;;OAGG;IACH,cAAc,QAAY;CAC3B;AAED;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,YAAY;IACjD;;;;;;;OAOG;gBACgB,WAAW,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,mBAAmB;IAIvG;;;OAGG;cAEgB,SAAS,IAAI,MAAM;CAOvC"}
@@ -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
  */
@@ -56,8 +56,9 @@ class PresentationError extends core_bentley_1.BentleyError {
56
56
  // eslint-disable-next-line @typescript-eslint/naming-convention
57
57
  _initName() {
58
58
  let value = PresentationStatus[this.errorNumber];
59
- if (!value)
59
+ if (!value) {
60
60
  value = `Unknown Error (${this.errorNumber})`;
61
+ }
61
62
  return value;
62
63
  }
63
64
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Error.js","sourceRoot":"","sources":["../../../src/presentation-common/Error.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAwE;AAExE;;;GAGG;AACH,IAAY,kBAwBX;AAxBD,WAAY,kBAAkB;IAC5B,sBAAsB;IACtB,iEAAW,CAAA;IAEX,6BAA6B;IAC7B,mEAAY,CAAA;IAEZ,qBAAqB;IACrB,iEAAe,CAAA;IAEf,yCAAyC;IACzC,mFAA0B,CAAA;IAE1B,sCAAsC;IACtC,yFAA6B,CAAA;IAE7B,kCAAkC;IAClC,qFAA2B,CAAA;IAE3B;;;OAGG;IACH,mFAA0B,CAAA;AAC5B,CAAC,EAxBW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAwB7B;AAED;;;GAGG;AACH,MAAa,iBAAkB,SAAQ,2BAAY;IAEjD;;;;;;;OAOG;IACH,YAAmB,WAA+B,EAAE,OAAgB,EAAE,WAAiC;QACrG,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3C,CAAC;IAED;;;OAGG;IACH,gEAAgE;IAC7C,SAAS;QAC1B,IAAI,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACjD,IAAI,CAAC,KAAK;YACR,KAAK,GAAG,kBAAkB,IAAI,CAAC,WAAW,GAAG,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAzBD,8CAyBC","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 { BentleyError, GetMetaDataFunction } from \"@itwin/core-bentley\";\n\n/**\n * Status codes used by Presentation APIs.\n * @public\n */\nexport enum PresentationStatus {\n /** Success result. */\n Success = 0,\n\n /** Request was cancelled. */\n Canceled = 1,\n\n /** Error: Unknown */\n Error = 0x10000,\n\n /** Error: Backend is not initialized. */\n NotInitialized = Error + 1,\n\n /** Error: Result set is too large. */\n ResultSetTooLarge = Error + 2,\n\n /** Error: Argument is invalid. */\n InvalidArgument = Error + 3,\n\n /**\n * Timeout for the request was reached which prevented it from being fulfilled. Frontend may\n * repeat the request.\n */\n BackendTimeout = Error + 7,\n}\n\n/**\n * An error type thrown by Presentation APIs.\n * @public\n */\nexport class PresentationError extends BentleyError {\n\n /**\n * Creates an instance of Error.\n * @param errorNumber Error code\n * @param message Optional brief description of the error. The `message` property combined with the `name`\n * property is used by the `Error.prototype.toString()` method to create a string representation of the Error.\n * @param log Optional log function which logs the error.\n * @param getMetaData Optional function that returns meta-data related to an error.\n */\n public constructor(errorNumber: PresentationStatus, message?: string, getMetaData?: GetMetaDataFunction) {\n super(errorNumber, message, getMetaData);\n }\n\n /**\n * Returns the name of each error status. The name is used by the `Error.prototype.toString()`\n * method to create a string representation of the error.\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n protected override _initName(): string {\n let value = PresentationStatus[this.errorNumber];\n if (!value)\n value = `Unknown Error (${this.errorNumber})`;\n return value;\n }\n}\n"]}
1
+ {"version":3,"file":"Error.js","sourceRoot":"","sources":["../../../src/presentation-common/Error.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAwE;AAExE;;;GAGG;AACH,IAAY,kBAwBX;AAxBD,WAAY,kBAAkB;IAC5B,sBAAsB;IACtB,iEAAW,CAAA;IAEX,6BAA6B;IAC7B,mEAAY,CAAA;IAEZ,qBAAqB;IACrB,iEAAe,CAAA;IAEf,yCAAyC;IACzC,mFAA0B,CAAA;IAE1B,sCAAsC;IACtC,yFAA6B,CAAA;IAE7B,kCAAkC;IAClC,qFAA2B,CAAA;IAE3B;;;OAGG;IACH,mFAA0B,CAAA;AAC5B,CAAC,EAxBW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAwB7B;AAED;;;GAGG;AACH,MAAa,iBAAkB,SAAQ,2BAAY;IACjD;;;;;;;OAOG;IACH,YAAmB,WAA+B,EAAE,OAAgB,EAAE,WAAiC;QACrG,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3C,CAAC;IAED;;;OAGG;IACH,gEAAgE;IAC7C,SAAS;QAC1B,IAAI,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACjD,IAAI,CAAC,KAAK,EAAE;YACV,KAAK,GAAG,kBAAkB,IAAI,CAAC,WAAW,GAAG,CAAC;SAC/C;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAzBD,8CAyBC","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 { BentleyError, GetMetaDataFunction } from \"@itwin/core-bentley\";\n\n/**\n * Status codes used by Presentation APIs.\n * @public\n */\nexport enum PresentationStatus {\n /** Success result. */\n Success = 0,\n\n /** Request was cancelled. */\n Canceled = 1,\n\n /** Error: Unknown */\n Error = 0x10000,\n\n /** Error: Backend is not initialized. */\n NotInitialized = Error + 1,\n\n /** Error: Result set is too large. */\n ResultSetTooLarge = Error + 2,\n\n /** Error: Argument is invalid. */\n InvalidArgument = Error + 3,\n\n /**\n * Timeout for the request was reached which prevented it from being fulfilled. Frontend may\n * repeat the request.\n */\n BackendTimeout = Error + 7,\n}\n\n/**\n * An error type thrown by Presentation APIs.\n * @public\n */\nexport class PresentationError extends BentleyError {\n /**\n * Creates an instance of Error.\n * @param errorNumber Error code\n * @param message Optional brief description of the error. The `message` property combined with the `name`\n * property is used by the `Error.prototype.toString()` method to create a string representation of the Error.\n * @param log Optional log function which logs the error.\n * @param getMetaData Optional function that returns meta-data related to an error.\n */\n public constructor(errorNumber: PresentationStatus, message?: string, getMetaData?: GetMetaDataFunction) {\n super(errorNumber, message, getMetaData);\n }\n\n /**\n * Returns the name of each error status. The name is used by the `Error.prototype.toString()`\n * method to create a string representation of the error.\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n protected override _initName(): string {\n let value = PresentationStatus[this.errorNumber];\n if (!value) {\n value = `Unknown Error (${this.errorNumber})`;\n }\n return value;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"InstanceFilterDefinition.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/InstanceFilterDefinition.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,MAAM,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;;;OAMG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,uCAAuC,EAAE,CAAC;IAE7D;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,MAAM,uCAAuC,GACjD,iCAAiC,GAC/B,CAAC,wCAAwC,GAAG,8CAA8C,CAAC,CAAC;AAEhG;;;GAGG;AACH,MAAM,WAAW,iCAAiC;IAChD;;;OAGG;IACH,6BAA6B,EAAE,wBAAwB,CAAC;IACxD;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,wCAAwC;IACvD;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,8CAA8C;IAC7D;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B"}
1
+ {"version":3,"file":"InstanceFilterDefinition.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/InstanceFilterDefinition.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,MAAM,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;;;OAMG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,uCAAuC,EAAE,CAAC;IAE7D;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,MAAM,uCAAuC,GAAG,iCAAiC,GACrF,CAAC,wCAAwC,GAAG,8CAA8C,CAAC,CAAC;AAE9F;;;GAGG;AACH,MAAM,WAAW,iCAAiC;IAChD;;;OAGG;IACH,6BAA6B,EAAE,wBAAwB,CAAC;IACxD;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,wCAAwC;IACvD;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,8CAA8C;IAC7D;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B"}
@@ -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":"InstanceFilterDefinition.js","sourceRoot":"","sources":["../../../src/presentation-common/InstanceFilterDefinition.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 { StrippedRelationshipPath } from \"./EC\";\n\n/**\n * Definition of an instance filter that can be used to filter content or hierarchy levels.\n *\n * Example:\n *\n * ```json\n * {\n * selectClassName: \"MySchema:MyClass\",\n * expression: \"this.MyProperty = 1 AND other.OtherProperty = 2\",\n * relatedInstances: [{\n * pathFromSelectToPropertyClass: [{\n * sourceClassName: \"MySchema:MyClass\",\n * relationshipName: \"MySchema:RelationshipFromMyToOtherClass\",\n * isForwardRelationship: true,\n * targetClassName: \"MySchema:OtherClass\",\n * }],\n * alias: \"other\",\n * }],\n * }\n * ```\n *\n * @beta\n */\nexport interface InstanceFilterDefinition {\n /**\n * Select class filter used to select only instances of specific class.\n * The [[relatedInstances]] attribute, when used, should specify paths from this class.\n * Also, the [[expression]] attribute's `this` symbol points to instances of this class.\n *\n * The format is full class name: `SchemaName:ClassName`.\n */\n selectClassName: string;\n\n /**\n * Specifies relationship paths pointing to related instances used in the [[expression]] attribute.\n *\n * Sometimes there's a need to filter on a related instance property. In that case, the relationship\n * needs to be named by specifying the path and alias for the target (or the relationship). Then, the\n * related instance's symbol context can be accessed through the root symbol named as specified in the\n * [[alias]] (or [[relationshipAlias]]) attribute.\n */\n relatedInstances?: InstanceFilterRelatedInstanceDefinition[];\n\n /**\n * [ECExpression]($docs/presentation/advanced/ECExpressions.md) for filtering the select instances.\n */\n expression: string;\n}\n\n/**\n * Related instance definition for accessing properties of a related instance in [[InstanceFilterDefinition.expression]].\n * @beta\n */\nexport type InstanceFilterRelatedInstanceDefinition =\n InstanceFilterRelatedInstancePath\n & (InstanceFilterRelatedInstanceTargetAlias | InstanceFilterRelatedInstanceRelationshipAlias);\n\n/**\n * Partial definition of common attributes for [[InstanceFilterRelatedInstanceDefinition]].\n * @beta\n */\nexport interface InstanceFilterRelatedInstancePath {\n /**\n * A relationship path from select class (either specified through [[InstanceFilterDefinition.selectClassName]] or taken from context)\n * to the target related instance containing the properties used in [[InstanceFilterDefinition.expression]].\n */\n pathFromSelectToPropertyClass: StrippedRelationshipPath;\n /**\n * An optional flag indicating that the target instance must exist. Setting this allows to filter out all\n * select instances that don't have a related instance by following the [[pathFromSelectToPropertyClass]] path.\n */\n isRequired?: boolean;\n}\n\n/**\n * Partial definition of [[InstanceFilterRelatedInstanceDefinition]] for the case when referencing the target class.\n * @beta\n */\nexport interface InstanceFilterRelatedInstanceTargetAlias {\n /**\n * An alias for the target class in the [[InstanceFilterRelatedInstancePath.pathFromSelectToPropertyClass]] path. This alias can be used to\n * access related instance symbols context in the [[InstanceFilterDefinition.expression]].\n */\n alias: string;\n}\n\n/**\n * Partial definition of [[InstanceFilterRelatedInstanceDefinition]] for the case when referencing the relationship class.\n * @beta\n */\nexport interface InstanceFilterRelatedInstanceRelationshipAlias {\n /**\n * An alias for the relationship in the last step of the [[InstanceFilterRelatedInstancePath.pathFromSelectToPropertyClass]] path. This alias can be\n * used to access the relationship instance symbols context in the [[InstanceFilterDefinition.expression]].\n */\n relationshipAlias: string;\n}\n"]}
1
+ {"version":3,"file":"InstanceFilterDefinition.js","sourceRoot":"","sources":["../../../src/presentation-common/InstanceFilterDefinition.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","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 { StrippedRelationshipPath } from \"./EC\";\n\n/**\n * Definition of an instance filter that can be used to filter content or hierarchy levels.\n *\n * Example:\n *\n * ```json\n * {\n * selectClassName: \"MySchema:MyClass\",\n * expression: \"this.MyProperty = 1 AND other.OtherProperty = 2\",\n * relatedInstances: [{\n * pathFromSelectToPropertyClass: [{\n * sourceClassName: \"MySchema:MyClass\",\n * relationshipName: \"MySchema:RelationshipFromMyToOtherClass\",\n * isForwardRelationship: true,\n * targetClassName: \"MySchema:OtherClass\",\n * }],\n * alias: \"other\",\n * }],\n * }\n * ```\n *\n * @beta\n */\nexport interface InstanceFilterDefinition {\n /**\n * Select class filter used to select only instances of specific class.\n * The [[relatedInstances]] attribute, when used, should specify paths from this class.\n * Also, the [[expression]] attribute's `this` symbol points to instances of this class.\n *\n * The format is full class name: `SchemaName:ClassName`.\n */\n selectClassName: string;\n\n /**\n * Specifies relationship paths pointing to related instances used in the [[expression]] attribute.\n *\n * Sometimes there's a need to filter on a related instance property. In that case, the relationship\n * needs to be named by specifying the path and alias for the target (or the relationship). Then, the\n * related instance's symbol context can be accessed through the root symbol named as specified in the\n * [[alias]] (or [[relationshipAlias]]) attribute.\n */\n relatedInstances?: InstanceFilterRelatedInstanceDefinition[];\n\n /**\n * [ECExpression]($docs/presentation/advanced/ECExpressions.md) for filtering the select instances.\n */\n expression: string;\n}\n\n/**\n * Related instance definition for accessing properties of a related instance in [[InstanceFilterDefinition.expression]].\n * @beta\n */\nexport type InstanceFilterRelatedInstanceDefinition = InstanceFilterRelatedInstancePath &\n (InstanceFilterRelatedInstanceTargetAlias | InstanceFilterRelatedInstanceRelationshipAlias);\n\n/**\n * Partial definition of common attributes for [[InstanceFilterRelatedInstanceDefinition]].\n * @beta\n */\nexport interface InstanceFilterRelatedInstancePath {\n /**\n * A relationship path from select class (either specified through [[InstanceFilterDefinition.selectClassName]] or taken from context)\n * to the target related instance containing the properties used in [[InstanceFilterDefinition.expression]].\n */\n pathFromSelectToPropertyClass: StrippedRelationshipPath;\n /**\n * An optional flag indicating that the target instance must exist. Setting this allows to filter out all\n * select instances that don't have a related instance by following the [[pathFromSelectToPropertyClass]] path.\n */\n isRequired?: boolean;\n}\n\n/**\n * Partial definition of [[InstanceFilterRelatedInstanceDefinition]] for the case when referencing the target class.\n * @beta\n */\nexport interface InstanceFilterRelatedInstanceTargetAlias {\n /**\n * An alias for the target class in the [[InstanceFilterRelatedInstancePath.pathFromSelectToPropertyClass]] path. This alias can be used to\n * access related instance symbols context in the [[InstanceFilterDefinition.expression]].\n */\n alias: string;\n}\n\n/**\n * Partial definition of [[InstanceFilterRelatedInstanceDefinition]] for the case when referencing the relationship class.\n * @beta\n */\nexport interface InstanceFilterRelatedInstanceRelationshipAlias {\n /**\n * An alias for the relationship in the last step of the [[InstanceFilterRelatedInstancePath.pathFromSelectToPropertyClass]] path. This alias can be\n * used to access the relationship instance symbols context in the [[InstanceFilterDefinition.expression]].\n */\n relationshipAlias: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"KeySet.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/KeySet.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAA2B,UAAU,EAAoB,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEvD;;;GAGG;AACH,MAAM,MAAM,GAAG,GAAG,QAAQ,CAAC,OAA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sDAAsD;IAC/C,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI;IAqBvF;;;OAGG;IACI,MAAM,IAAI,UAAU;IAoB3B;;;OAGG;WACW,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM;CAKjD"}
@@ -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
  */
@@ -12,6 +12,7 @@ const core_bentley_1 = require("@itwin/core-bentley");
12
12
  const Error_1 = require("./Error");
13
13
  const Key_1 = require("./hierarchy/Key");
14
14
  /** @public */
15
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
15
16
  var Key;
16
17
  (function (Key) {
17
18
  /** Check if the supplied key is a `NodeKey` */
@@ -46,8 +47,9 @@ class KeySet {
46
47
  this._lowerCaseMap = new Map();
47
48
  this._nodeKeys = new Set();
48
49
  this.recalculateGuid();
49
- if (source)
50
+ if (source) {
50
51
  this.add(source);
52
+ }
51
53
  }
52
54
  recalculateGuid() {
53
55
  // empty keyset should have empty guid, otherwise use a random guid value
@@ -58,7 +60,9 @@ class KeySet {
58
60
  * does not uniquely identify contents of the keyset, but it can be
59
61
  * used to check whether keyset has changed.
60
62
  */
61
- get guid() { return this._guid; }
63
+ get guid() {
64
+ return this._guid;
65
+ }
62
66
  /**
63
67
  * Get a map of instance keys stored in this KeySet
64
68
  *
@@ -67,8 +71,9 @@ class KeySet {
67
71
  */
68
72
  get instanceKeys() {
69
73
  const map = new Map();
70
- for (const entry of this._instanceKeys)
74
+ for (const entry of this._instanceKeys) {
71
75
  map.set(this._lowerCaseMap.get(entry["0"]), new Set([...entry["1"]].map((key) => core_bentley_1.Id64.fromJSON(key))));
76
+ }
72
77
  return map;
73
78
  }
74
79
  /**
@@ -76,7 +81,7 @@ class KeySet {
76
81
  */
77
82
  get instanceKeysCount() {
78
83
  let count = 0;
79
- this._instanceKeys.forEach((set) => count += set.size);
84
+ this._instanceKeys.forEach((set) => (count += set.size));
80
85
  return count;
81
86
  }
82
87
  /**
@@ -111,8 +116,9 @@ class KeySet {
111
116
  * @returns itself
112
117
  */
113
118
  clear() {
114
- if (this.isEmpty)
119
+ if (this.isEmpty) {
115
120
  return this;
121
+ }
116
122
  this._instanceKeys = new Map();
117
123
  this._lowerCaseMap = new Map();
118
124
  this._nodeKeys = new Set();
@@ -122,8 +128,9 @@ class KeySet {
122
128
  addKeySet(keyset, pred) {
123
129
  for (const key of keyset._nodeKeys) {
124
130
  // eslint-disable-next-line deprecation/deprecation
125
- if (!pred || pred(Key_1.NodeKey.fromJSON(JSON.parse(key))))
131
+ if (!pred || pred(Key_1.NodeKey.fromJSON(JSON.parse(key)))) {
126
132
  this._nodeKeys.add(key);
133
+ }
127
134
  }
128
135
  for (const entry of keyset._instanceKeys) {
129
136
  let set = this._instanceKeys.get(entry["0"]);
@@ -134,22 +141,20 @@ class KeySet {
134
141
  this._lowerCaseMap.set(entry["0"], className);
135
142
  }
136
143
  entry["1"].forEach((id) => {
137
- if (!pred || pred({ className, id }))
144
+ if (!pred || pred({ className, id })) {
138
145
  set.add(id);
146
+ }
139
147
  });
140
148
  }
141
149
  }
142
150
  addKeySetJSON(keyset) {
143
- for (const key of keyset.nodeKeys)
151
+ for (const key of keyset.nodeKeys) {
144
152
  this._nodeKeys.add(JSON.stringify(key));
153
+ }
145
154
  for (const entry of keyset.instanceKeys) {
146
155
  const lcClassName = entry["0"].toLowerCase();
147
156
  const idsJson = entry["1"];
148
- const ids = typeof idsJson === "string"
149
- ? idsJson === core_bentley_1.Id64.invalid
150
- ? new Set([core_bentley_1.Id64.invalid])
151
- : core_bentley_1.CompressedId64Set.decompressSet(idsJson)
152
- : new Set(idsJson);
157
+ const ids = typeof idsJson === "string" ? (idsJson === core_bentley_1.Id64.invalid ? new Set([core_bentley_1.Id64.invalid]) : core_bentley_1.CompressedId64Set.decompressSet(idsJson)) : new Set(idsJson);
153
158
  this._instanceKeys.set(lcClassName, ids);
154
159
  this._lowerCaseMap.set(lcClassName, entry["0"]);
155
160
  }
@@ -161,8 +166,9 @@ class KeySet {
161
166
  * @returns itself
162
167
  */
163
168
  add(value, pred) {
164
- if (!value)
169
+ if (!value) {
165
170
  throw new Error_1.PresentationError(Error_1.PresentationStatus.InvalidArgument, `Invalid argument: value = ${value}`);
171
+ }
166
172
  const sizeBefore = this.size;
167
173
  if (this.isKeySet(value)) {
168
174
  this.addKeySet(value, pred);
@@ -190,13 +196,15 @@ class KeySet {
190
196
  throw new Error_1.PresentationError(Error_1.PresentationStatus.InvalidArgument, `Invalid argument: value = ${value}`);
191
197
  }
192
198
  }
193
- if (this.size !== sizeBefore)
199
+ if (this.size !== sizeBefore) {
194
200
  this.recalculateGuid();
201
+ }
195
202
  return this;
196
203
  }
197
204
  deleteKeySet(keyset) {
198
- for (const key of keyset._nodeKeys)
205
+ for (const key of keyset._nodeKeys) {
199
206
  this._nodeKeys.delete(key);
207
+ }
200
208
  for (const entry of keyset._instanceKeys) {
201
209
  const set = this._instanceKeys.get(entry["0"].toLowerCase());
202
210
  if (set) {
@@ -212,23 +220,26 @@ class KeySet {
212
220
  * @returns itself
213
221
  */
214
222
  delete(value) {
215
- if (!value)
223
+ if (!value) {
216
224
  throw new Error_1.PresentationError(Error_1.PresentationStatus.InvalidArgument, `Invalid argument: value = ${value}`);
225
+ }
217
226
  const sizeBefore = this.size;
218
227
  if (this.isKeySet(value)) {
219
228
  this.deleteKeySet(value);
220
229
  }
221
230
  else if (this.isKeysArray(value)) {
222
- for (const key of value)
231
+ for (const key of value) {
223
232
  this.delete(key);
233
+ }
224
234
  }
225
235
  else if (Key.isEntityProps(value)) {
226
236
  this.delete({ className: value.classFullName, id: value.id });
227
237
  }
228
238
  else if (Key.isInstanceKey(value)) {
229
239
  const set = this._instanceKeys.get(value.className.toLowerCase());
230
- if (set)
240
+ if (set) {
231
241
  set.delete(value.id);
242
+ }
232
243
  }
233
244
  else if (Key.isNodeKey(value)) {
234
245
  this._nodeKeys.delete(JSON.stringify(value));
@@ -236,8 +247,9 @@ class KeySet {
236
247
  else {
237
248
  throw new Error_1.PresentationError(Error_1.PresentationStatus.InvalidArgument, `Invalid argument: value = ${value}`);
238
249
  }
239
- if (this.size !== sizeBefore)
250
+ if (this.size !== sizeBefore) {
240
251
  this.recalculateGuid();
252
+ }
241
253
  return this;
242
254
  }
243
255
  /**
@@ -245,59 +257,71 @@ class KeySet {
245
257
  * @param value The key to check.
246
258
  */
247
259
  has(value) {
248
- if (!value)
260
+ if (!value) {
249
261
  throw new Error_1.PresentationError(Error_1.PresentationStatus.InvalidArgument, `Invalid argument: value = ${value}`);
250
- if (Key.isEntityProps(value))
262
+ }
263
+ if (Key.isEntityProps(value)) {
251
264
  return this.has({ className: value.classFullName, id: value.id });
265
+ }
252
266
  if (Key.isInstanceKey(value)) {
253
267
  const set = this._instanceKeys.get(value.className.toLowerCase());
254
268
  return !!(set && set.has(value.id));
255
269
  }
256
- if (Key.isNodeKey(value))
270
+ if (Key.isNodeKey(value)) {
257
271
  return this._nodeKeys.has(JSON.stringify(value));
272
+ }
258
273
  throw new Error_1.PresentationError(Error_1.PresentationStatus.InvalidArgument, `Invalid argument: value = ${value}`);
259
274
  }
260
275
  hasKeySet(readonlyKeys, checkType) {
261
276
  // note: cast-away read-onlyness to access private members...
262
277
  const keys = readonlyKeys;
263
278
  if (checkType === "all") {
264
- if (this._nodeKeys.size < keys._nodeKeys.size || this._instanceKeys.size < keys._instanceKeys.size)
279
+ if (this._nodeKeys.size < keys._nodeKeys.size || this._instanceKeys.size < keys._instanceKeys.size) {
265
280
  return false;
266
- if ([...keys._nodeKeys].some((key) => !this._nodeKeys.has(key)))
281
+ }
282
+ if ([...keys._nodeKeys].some((key) => !this._nodeKeys.has(key))) {
267
283
  return false;
284
+ }
268
285
  for (const otherEntry of keys._instanceKeys) {
269
286
  const thisEntryKeys = this._instanceKeys.get(otherEntry["0"].toLowerCase());
270
- if (!thisEntryKeys || thisEntryKeys.size < otherEntry["1"].size)
287
+ if (!thisEntryKeys || thisEntryKeys.size < otherEntry["1"].size) {
271
288
  return false;
272
- if ([...otherEntry["1"]].some((key) => !thisEntryKeys.has(key)))
289
+ }
290
+ if ([...otherEntry["1"]].some((key) => !thisEntryKeys.has(key))) {
273
291
  return false;
292
+ }
274
293
  }
275
294
  return true;
276
295
  }
277
296
  // "any" check type
278
- if ([...keys._nodeKeys].some((key) => this._nodeKeys.has(key)))
297
+ if ([...keys._nodeKeys].some((key) => this._nodeKeys.has(key))) {
279
298
  return true;
299
+ }
280
300
  for (const otherEntry of keys._instanceKeys) {
281
301
  const thisEntryKeys = this._instanceKeys.get(otherEntry["0"].toLowerCase());
282
- if (thisEntryKeys && [...otherEntry["1"]].some((key) => thisEntryKeys.has(key)))
302
+ if (thisEntryKeys && [...otherEntry["1"]].some((key) => thisEntryKeys.has(key))) {
283
303
  return true;
304
+ }
284
305
  }
285
306
  return false;
286
307
  }
287
308
  hasKeysArray(keys, checkType) {
288
309
  if (checkType === "all") {
289
- if (this.size < keys.length)
310
+ if (this.size < keys.length) {
290
311
  return false;
312
+ }
291
313
  for (const key of keys) {
292
- if (!this.has(key))
314
+ if (!this.has(key)) {
293
315
  return false;
316
+ }
294
317
  }
295
318
  return true;
296
319
  }
297
320
  // "any" check type
298
321
  for (const key of keys) {
299
- if (this.has(key))
322
+ if (this.has(key)) {
300
323
  return true;
324
+ }
301
325
  }
302
326
  return false;
303
327
  }
@@ -306,12 +330,15 @@ class KeySet {
306
330
  * @param keys The keys to check.
307
331
  */
308
332
  hasAll(keys) {
309
- if (!keys)
333
+ if (!keys) {
310
334
  throw new Error_1.PresentationError(Error_1.PresentationStatus.InvalidArgument, `Invalid argument: value = ${keys}`);
311
- if (this.isKeySet(keys))
335
+ }
336
+ if (this.isKeySet(keys)) {
312
337
  return this.hasKeySet(keys, "all");
313
- if (this.isKeysArray(keys))
338
+ }
339
+ if (this.isKeysArray(keys)) {
314
340
  return this.hasKeysArray(keys, "all");
341
+ }
315
342
  throw new Error_1.PresentationError(Error_1.PresentationStatus.InvalidArgument, `Invalid argument: keys = ${keys}`);
316
343
  }
317
344
  /**
@@ -319,12 +346,15 @@ class KeySet {
319
346
  * @param keys The keys to check.
320
347
  */
321
348
  hasAny(keys) {
322
- if (!keys)
349
+ if (!keys) {
323
350
  throw new Error_1.PresentationError(Error_1.PresentationStatus.InvalidArgument, `Invalid argument: value = ${keys}`);
324
- if (this.isKeySet(keys))
351
+ }
352
+ if (this.isKeySet(keys)) {
325
353
  return this.hasKeySet(keys, "any");
326
- if (this.isKeysArray(keys))
354
+ }
355
+ if (this.isKeysArray(keys)) {
327
356
  return this.hasKeysArray(keys, "any");
357
+ }
328
358
  throw new Error_1.PresentationError(Error_1.PresentationStatus.InvalidArgument, `Invalid argument: keys = ${keys}`);
329
359
  }
330
360
  /**
@@ -333,8 +363,9 @@ class KeySet {
333
363
  get size() {
334
364
  const nodeKeysCount = this._nodeKeys.size;
335
365
  let instanceIdsCount = 0;
336
- for (const set of this._instanceKeys.values())
366
+ for (const set of this._instanceKeys.values()) {
337
367
  instanceIdsCount += set.size;
368
+ }
338
369
  return nodeKeysCount + instanceIdsCount;
339
370
  }
340
371
  /**
@@ -347,8 +378,9 @@ class KeySet {
347
378
  some(callback) {
348
379
  for (const entry of this._instanceKeys) {
349
380
  const className = this._lowerCaseMap.get(entry["0"].toLowerCase());
350
- if (some(entry[1], (id) => callback({ className, id })))
381
+ if (some(entry[1], (id) => callback({ className, id }))) {
351
382
  return true;
383
+ }
352
384
  }
353
385
  // eslint-disable-next-line deprecation/deprecation
354
386
  return some(this._nodeKeys, (serializedKey) => callback(Key_1.NodeKey.fromJSON(JSON.parse(serializedKey))));
@@ -379,7 +411,7 @@ class KeySet {
379
411
  this.forEach((key, index) => {
380
412
  batch.add(key);
381
413
  ++currBatchSize;
382
- if (currBatchSize === batchSize || index === (size - 1)) {
414
+ if (currBatchSize === batchSize || index === size - 1) {
383
415
  callback(batch, batchIndex++);
384
416
  batch = new KeySet();
385
417
  currBatchSize = 0;
@@ -401,8 +433,9 @@ class KeySet {
401
433
  }
402
434
  // eslint-disable-next-line deprecation/deprecation
403
435
  const nodeKeys = [];
404
- for (const serializedKey of this._nodeKeys.values())
436
+ for (const serializedKey of this._nodeKeys.values()) {
405
437
  nodeKeys.push(JSON.parse(serializedKey));
438
+ }
406
439
  return {
407
440
  instanceKeys,
408
441
  nodeKeys,
@@ -421,8 +454,9 @@ class KeySet {
421
454
  exports.KeySet = KeySet;
422
455
  const some = (set, cb) => {
423
456
  for (const item of set) {
424
- if (cb(item))
457
+ if (cb(item)) {
425
458
  return true;
459
+ }
426
460
  }
427
461
  return false;
428
462
  };