@itwin/presentation-common 5.0.0-dev.7 → 5.0.0-dev.72

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 (287) hide show
  1. package/CHANGELOG.md +31 -1
  2. package/Ruleset.schema.json +3 -258
  3. package/lib/cjs/presentation-common/AsyncTasks.d.ts +4 -4
  4. package/lib/cjs/presentation-common/AsyncTasks.d.ts.map +1 -1
  5. package/lib/cjs/presentation-common/AsyncTasks.js +5 -6
  6. package/lib/cjs/presentation-common/AsyncTasks.js.map +1 -1
  7. package/lib/cjs/presentation-common/EC.d.ts +36 -80
  8. package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
  9. package/lib/cjs/presentation-common/EC.js +1 -97
  10. package/lib/cjs/presentation-common/EC.js.map +1 -1
  11. package/lib/cjs/presentation-common/ElementProperties.js +16 -9
  12. package/lib/cjs/presentation-common/ElementProperties.js.map +1 -1
  13. package/lib/cjs/presentation-common/Error.d.ts +2 -0
  14. package/lib/cjs/presentation-common/Error.d.ts.map +1 -1
  15. package/lib/cjs/presentation-common/Error.js +2 -0
  16. package/lib/cjs/presentation-common/Error.js.map +1 -1
  17. package/lib/cjs/presentation-common/KeySet.d.ts +2 -2
  18. package/lib/cjs/presentation-common/KeySet.d.ts.map +1 -1
  19. package/lib/cjs/presentation-common/KeySet.js +9 -11
  20. package/lib/cjs/presentation-common/KeySet.js.map +1 -1
  21. package/lib/cjs/presentation-common/KoqPropertyValueFormatter.js +4 -1
  22. package/lib/cjs/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
  23. package/lib/cjs/presentation-common/LabelDefinition.d.ts +0 -48
  24. package/lib/cjs/presentation-common/LabelDefinition.d.ts.map +1 -1
  25. package/lib/cjs/presentation-common/LabelDefinition.js +1 -44
  26. package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
  27. package/lib/cjs/presentation-common/LocalizationHelper.js +1 -0
  28. package/lib/cjs/presentation-common/LocalizationHelper.js.map +1 -1
  29. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts +31 -10
  30. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  31. package/lib/cjs/presentation-common/PresentationManagerOptions.js +0 -5
  32. package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
  33. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts +9 -9
  34. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  35. package/lib/cjs/presentation-common/PresentationRpcInterface.js +36 -21
  36. package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
  37. package/lib/cjs/presentation-common/RegisteredRuleset.d.ts +3 -2
  38. package/lib/cjs/presentation-common/RegisteredRuleset.d.ts.map +1 -1
  39. package/lib/cjs/presentation-common/RegisteredRuleset.js +9 -1
  40. package/lib/cjs/presentation-common/RegisteredRuleset.js.map +1 -1
  41. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts +9 -12
  42. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  43. package/lib/cjs/presentation-common/RpcRequestsHandler.js +37 -30
  44. package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
  45. package/lib/cjs/presentation-common/RulesetVariables.d.ts +1 -46
  46. package/lib/cjs/presentation-common/RulesetVariables.d.ts.map +1 -1
  47. package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
  48. package/lib/cjs/presentation-common/Update.d.ts +2 -79
  49. package/lib/cjs/presentation-common/Update.d.ts.map +1 -1
  50. package/lib/cjs/presentation-common/Update.js +1 -104
  51. package/lib/cjs/presentation-common/Update.js.map +1 -1
  52. package/lib/cjs/presentation-common/Utils.d.ts +21 -0
  53. package/lib/cjs/presentation-common/Utils.d.ts.map +1 -1
  54. package/lib/cjs/presentation-common/Utils.js +57 -0
  55. package/lib/cjs/presentation-common/Utils.js.map +1 -1
  56. package/lib/cjs/presentation-common/content/Content.d.ts +0 -7
  57. package/lib/cjs/presentation-common/content/Content.d.ts.map +1 -1
  58. package/lib/cjs/presentation-common/content/Content.js +5 -10
  59. package/lib/cjs/presentation-common/content/Content.js.map +1 -1
  60. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts +1 -1
  61. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  62. package/lib/cjs/presentation-common/content/ContentTraverser.js +116 -28
  63. package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
  64. package/lib/cjs/presentation-common/content/Descriptor.d.ts +2 -31
  65. package/lib/cjs/presentation-common/content/Descriptor.d.ts.map +1 -1
  66. package/lib/cjs/presentation-common/content/Descriptor.js +68 -22
  67. package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
  68. package/lib/cjs/presentation-common/content/Fields.d.ts +151 -27
  69. package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
  70. package/lib/cjs/presentation-common/content/Fields.js +264 -140
  71. package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
  72. package/lib/cjs/presentation-common/content/Item.d.ts +26 -31
  73. package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
  74. package/lib/cjs/presentation-common/content/Item.js +52 -67
  75. package/lib/cjs/presentation-common/content/Item.js.map +1 -1
  76. package/lib/cjs/presentation-common/content/Property.d.ts +2 -12
  77. package/lib/cjs/presentation-common/content/Property.d.ts.map +1 -1
  78. package/lib/cjs/presentation-common/content/Property.js +0 -18
  79. package/lib/cjs/presentation-common/content/Property.js.map +1 -1
  80. package/lib/cjs/presentation-common/content/PropertyValueFormatter.js +3 -0
  81. package/lib/cjs/presentation-common/content/PropertyValueFormatter.js.map +1 -1
  82. package/lib/cjs/presentation-common/content/Value.d.ts +5 -107
  83. package/lib/cjs/presentation-common/content/Value.d.ts.map +1 -1
  84. package/lib/cjs/presentation-common/content/Value.js +1 -215
  85. package/lib/cjs/presentation-common/content/Value.js.map +1 -1
  86. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts +1 -22
  87. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -1
  88. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js +0 -23
  89. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
  90. package/lib/cjs/presentation-common/hierarchy/Key.d.ts +0 -83
  91. package/lib/cjs/presentation-common/hierarchy/Key.d.ts.map +1 -1
  92. package/lib/cjs/presentation-common/hierarchy/Key.js +6 -24
  93. package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
  94. package/lib/cjs/presentation-common/hierarchy/Node.d.ts +4 -107
  95. package/lib/cjs/presentation-common/hierarchy/Node.d.ts.map +1 -1
  96. package/lib/cjs/presentation-common/hierarchy/Node.js +0 -99
  97. package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
  98. package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts +1 -67
  99. package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
  100. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js +0 -117
  101. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  102. package/lib/cjs/presentation-common/rules/Rule.d.ts +0 -14
  103. package/lib/cjs/presentation-common/rules/Rule.d.ts.map +1 -1
  104. package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
  105. package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts +0 -7
  106. package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
  107. package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  108. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts +1 -5
  109. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts.map +1 -1
  110. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  111. package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts +2 -28
  112. package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
  113. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js +1 -15
  114. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  115. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +2 -0
  116. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
  117. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  118. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +0 -9
  119. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
  120. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  121. package/lib/cjs/presentation-common/selection/SelectionScope.d.ts +3 -0
  122. package/lib/cjs/presentation-common/selection/SelectionScope.d.ts.map +1 -1
  123. package/lib/cjs/presentation-common/selection/SelectionScope.js +1 -0
  124. package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
  125. package/lib/cjs/presentation-common.d.ts +1 -5
  126. package/lib/cjs/presentation-common.d.ts.map +1 -1
  127. package/lib/cjs/presentation-common.js +6 -5
  128. package/lib/cjs/presentation-common.js.map +1 -1
  129. package/lib/esm/presentation-common/AsyncTasks.d.ts +4 -4
  130. package/lib/esm/presentation-common/AsyncTasks.d.ts.map +1 -1
  131. package/lib/esm/presentation-common/AsyncTasks.js +5 -6
  132. package/lib/esm/presentation-common/AsyncTasks.js.map +1 -1
  133. package/lib/esm/presentation-common/EC.d.ts +36 -80
  134. package/lib/esm/presentation-common/EC.d.ts.map +1 -1
  135. package/lib/esm/presentation-common/EC.js +0 -96
  136. package/lib/esm/presentation-common/EC.js.map +1 -1
  137. package/lib/esm/presentation-common/ElementProperties.js +16 -9
  138. package/lib/esm/presentation-common/ElementProperties.js.map +1 -1
  139. package/lib/esm/presentation-common/Error.d.ts +2 -0
  140. package/lib/esm/presentation-common/Error.d.ts.map +1 -1
  141. package/lib/esm/presentation-common/Error.js +2 -0
  142. package/lib/esm/presentation-common/Error.js.map +1 -1
  143. package/lib/esm/presentation-common/KeySet.d.ts +2 -2
  144. package/lib/esm/presentation-common/KeySet.d.ts.map +1 -1
  145. package/lib/esm/presentation-common/KeySet.js +9 -11
  146. package/lib/esm/presentation-common/KeySet.js.map +1 -1
  147. package/lib/esm/presentation-common/KoqPropertyValueFormatter.js +5 -2
  148. package/lib/esm/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
  149. package/lib/esm/presentation-common/LabelDefinition.d.ts +0 -48
  150. package/lib/esm/presentation-common/LabelDefinition.d.ts.map +1 -1
  151. package/lib/esm/presentation-common/LabelDefinition.js +0 -43
  152. package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
  153. package/lib/esm/presentation-common/LocalizationHelper.js +1 -0
  154. package/lib/esm/presentation-common/LocalizationHelper.js.map +1 -1
  155. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts +31 -10
  156. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  157. package/lib/esm/presentation-common/PresentationManagerOptions.js +0 -4
  158. package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
  159. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts +9 -9
  160. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  161. package/lib/esm/presentation-common/PresentationRpcInterface.js +38 -22
  162. package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
  163. package/lib/esm/presentation-common/RegisteredRuleset.d.ts +3 -2
  164. package/lib/esm/presentation-common/RegisteredRuleset.d.ts.map +1 -1
  165. package/lib/esm/presentation-common/RegisteredRuleset.js +9 -1
  166. package/lib/esm/presentation-common/RegisteredRuleset.js.map +1 -1
  167. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts +9 -12
  168. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  169. package/lib/esm/presentation-common/RpcRequestsHandler.js +39 -32
  170. package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
  171. package/lib/esm/presentation-common/RulesetVariables.d.ts +1 -46
  172. package/lib/esm/presentation-common/RulesetVariables.d.ts.map +1 -1
  173. package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
  174. package/lib/esm/presentation-common/Update.d.ts +2 -79
  175. package/lib/esm/presentation-common/Update.d.ts.map +1 -1
  176. package/lib/esm/presentation-common/Update.js +0 -103
  177. package/lib/esm/presentation-common/Update.js.map +1 -1
  178. package/lib/esm/presentation-common/Utils.d.ts +21 -0
  179. package/lib/esm/presentation-common/Utils.d.ts.map +1 -1
  180. package/lib/esm/presentation-common/Utils.js +54 -0
  181. package/lib/esm/presentation-common/Utils.js.map +1 -1
  182. package/lib/esm/presentation-common/content/Content.d.ts +0 -7
  183. package/lib/esm/presentation-common/content/Content.d.ts.map +1 -1
  184. package/lib/esm/presentation-common/content/Content.js +5 -10
  185. package/lib/esm/presentation-common/content/Content.js.map +1 -1
  186. package/lib/esm/presentation-common/content/ContentTraverser.d.ts +1 -1
  187. package/lib/esm/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  188. package/lib/esm/presentation-common/content/ContentTraverser.js +117 -29
  189. package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
  190. package/lib/esm/presentation-common/content/Descriptor.d.ts +2 -31
  191. package/lib/esm/presentation-common/content/Descriptor.d.ts.map +1 -1
  192. package/lib/esm/presentation-common/content/Descriptor.js +68 -22
  193. package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
  194. package/lib/esm/presentation-common/content/Fields.d.ts +151 -27
  195. package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
  196. package/lib/esm/presentation-common/content/Fields.js +264 -140
  197. package/lib/esm/presentation-common/content/Fields.js.map +1 -1
  198. package/lib/esm/presentation-common/content/Item.d.ts +26 -31
  199. package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
  200. package/lib/esm/presentation-common/content/Item.js +52 -67
  201. package/lib/esm/presentation-common/content/Item.js.map +1 -1
  202. package/lib/esm/presentation-common/content/Property.d.ts +2 -12
  203. package/lib/esm/presentation-common/content/Property.d.ts.map +1 -1
  204. package/lib/esm/presentation-common/content/Property.js +0 -18
  205. package/lib/esm/presentation-common/content/Property.js.map +1 -1
  206. package/lib/esm/presentation-common/content/PropertyValueFormatter.js +3 -0
  207. package/lib/esm/presentation-common/content/PropertyValueFormatter.js.map +1 -1
  208. package/lib/esm/presentation-common/content/Value.d.ts +5 -107
  209. package/lib/esm/presentation-common/content/Value.d.ts.map +1 -1
  210. package/lib/esm/presentation-common/content/Value.js +0 -214
  211. package/lib/esm/presentation-common/content/Value.js.map +1 -1
  212. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts +1 -22
  213. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -1
  214. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js +1 -22
  215. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
  216. package/lib/esm/presentation-common/hierarchy/Key.d.ts +0 -83
  217. package/lib/esm/presentation-common/hierarchy/Key.d.ts.map +1 -1
  218. package/lib/esm/presentation-common/hierarchy/Key.js +6 -24
  219. package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
  220. package/lib/esm/presentation-common/hierarchy/Node.d.ts +4 -107
  221. package/lib/esm/presentation-common/hierarchy/Node.d.ts.map +1 -1
  222. package/lib/esm/presentation-common/hierarchy/Node.js +1 -98
  223. package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
  224. package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts +1 -67
  225. package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
  226. package/lib/esm/presentation-common/hierarchy/NodePathElement.js +1 -116
  227. package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  228. package/lib/esm/presentation-common/rules/Rule.d.ts +0 -14
  229. package/lib/esm/presentation-common/rules/Rule.d.ts.map +1 -1
  230. package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
  231. package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts +0 -7
  232. package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
  233. package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  234. package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts +1 -5
  235. package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts.map +1 -1
  236. package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  237. package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts +2 -28
  238. package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
  239. package/lib/esm/presentation-common/rules/customization/GroupingRule.js +0 -14
  240. package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  241. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +2 -0
  242. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
  243. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  244. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +0 -9
  245. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
  246. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  247. package/lib/esm/presentation-common/selection/SelectionScope.d.ts +3 -0
  248. package/lib/esm/presentation-common/selection/SelectionScope.d.ts.map +1 -1
  249. package/lib/esm/presentation-common/selection/SelectionScope.js +1 -0
  250. package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
  251. package/lib/esm/presentation-common.d.ts +1 -5
  252. package/lib/esm/presentation-common.d.ts.map +1 -1
  253. package/lib/esm/presentation-common.js +1 -5
  254. package/lib/esm/presentation-common.js.map +1 -1
  255. package/package.json +12 -12
  256. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts +0 -45
  257. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts.map +0 -1
  258. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js +0 -10
  259. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js.map +0 -1
  260. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts +0 -30
  261. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts.map +0 -1
  262. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js +0 -10
  263. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js.map +0 -1
  264. package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts +0 -41
  265. package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts.map +0 -1
  266. package/lib/cjs/presentation-common/rules/customization/LabelOverride.js +0 -10
  267. package/lib/cjs/presentation-common/rules/customization/LabelOverride.js.map +0 -1
  268. package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts +0 -49
  269. package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts.map +0 -1
  270. package/lib/cjs/presentation-common/rules/customization/StyleOverride.js +0 -10
  271. package/lib/cjs/presentation-common/rules/customization/StyleOverride.js.map +0 -1
  272. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts +0 -45
  273. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts.map +0 -1
  274. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js +0 -9
  275. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js.map +0 -1
  276. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts +0 -30
  277. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts.map +0 -1
  278. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js +0 -9
  279. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js.map +0 -1
  280. package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts +0 -41
  281. package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts.map +0 -1
  282. package/lib/esm/presentation-common/rules/customization/LabelOverride.js +0 -9
  283. package/lib/esm/presentation-common/rules/customization/LabelOverride.js.map +0 -1
  284. package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts +0 -49
  285. package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts.map +0 -1
  286. package/lib/esm/presentation-common/rules/customization/StyleOverride.js +0 -9
  287. package/lib/esm/presentation-common/rules/customization/StyleOverride.js.map +0 -1
@@ -7,53 +7,10 @@
7
7
  * @module Hierarchies
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.LabelDefinition = exports.LabelCompositeValue = void 0;
11
- /** @public */
12
- var LabelCompositeValue;
13
- (function (LabelCompositeValue) {
14
- /**
15
- * Serialize given [[LabelCompositeValue]] to JSON
16
- * @deprecated in 3.x. Use [[LabelCompositeValue]].
17
- */
18
- // eslint-disable-next-line @typescript-eslint/no-deprecated
19
- function toJSON(compositeValue) {
20
- return { ...compositeValue };
21
- }
22
- LabelCompositeValue.toJSON = toJSON;
23
- /**
24
- * Deserialize [[LabelCompositeValue]] from JSON
25
- * @deprecated in 3.x. Use [[LabelCompositeValue]].
26
- */
27
- // eslint-disable-next-line @typescript-eslint/no-deprecated
28
- function fromJSON(json) {
29
- return { ...json };
30
- }
31
- LabelCompositeValue.fromJSON = fromJSON;
32
- })(LabelCompositeValue || (exports.LabelCompositeValue = LabelCompositeValue = {}));
10
+ exports.LabelDefinition = void 0;
33
11
  /** @public */
34
12
  var LabelDefinition;
35
13
  (function (LabelDefinition) {
36
- /**
37
- * Serialize given [[LabelDefinition]] to JSON
38
- * @deprecated in 3.x. Use [[LabelDefinition]].
39
- */
40
- // eslint-disable-next-line @typescript-eslint/no-deprecated
41
- function toJSON(labelDefinition) {
42
- return { ...labelDefinition };
43
- }
44
- LabelDefinition.toJSON = toJSON;
45
- /**
46
- * Deserialize [[LabelDefinition]] from JSON
47
- * @deprecated in 3.x. Use [[LabelDefinition]].
48
- */
49
- // eslint-disable-next-line @typescript-eslint/no-deprecated
50
- function fromJSON(json) {
51
- if (typeof json === "string") {
52
- return JSON.parse(json);
53
- }
54
- return { ...json };
55
- }
56
- LabelDefinition.fromJSON = fromJSON;
57
14
  /** @internal */
58
15
  LabelDefinition.COMPOSITE_DEFINITION_TYPENAME = "composite";
59
16
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"LabelDefinition.js","sourceRoot":"","sources":["../../../src/presentation-common/LabelDefinition.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAqBH,cAAc;AACd,IAAiB,mBAAmB,CAkBnC;AAlBD,WAAiB,mBAAmB;IAClC;;;OAGG;IACH,4DAA4D;IAC5D,SAAgB,MAAM,CAAC,cAAmC;QACxD,OAAO,EAAE,GAAG,cAAc,EAAE,CAAC;IAC/B,CAAC;IAFe,0BAAM,SAErB,CAAA;IAED;;;OAGG;IACH,4DAA4D;IAC5D,SAAgB,QAAQ,CAAC,IAA6B;QACpD,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;IACrB,CAAC;IAFe,4BAAQ,WAEvB,CAAA;AACH,CAAC,EAlBgB,mBAAmB,mCAAnB,mBAAmB,QAkBnC;AAuCD,cAAc;AACd,IAAiB,eAAe,CA4C/B;AA5CD,WAAiB,eAAe;IAC9B;;;OAGG;IACH,4DAA4D;IAC5D,SAAgB,MAAM,CAAC,eAAgC;QACrD,OAAO,EAAE,GAAG,eAAe,EAAE,CAAC;IAChC,CAAC;IAFe,sBAAM,SAErB,CAAA;IAED;;;OAGG;IACH,4DAA4D;IAC5D,SAAgB,QAAQ,CAAC,IAAkC;QACzD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;QACD,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;IACrB,CAAC;IALe,wBAAQ,WAKvB,CAAA;IAED,gBAAgB;IACH,6CAA6B,GAAG,WAAW,CAAC;IAEzD;;;OAGG;IACH,SAAgB,qBAAqB,CAAC,GAAoB;QACxD,OAAO,GAAG,CAAC,QAAQ,KAAK,gBAAA,6BAA6B,CAAC;IACxD,CAAC;IAFe,qCAAqB,wBAEpC,CAAA;IAED;;;OAGG;IACH,SAAgB,eAAe,CAAC,KAAa;QAC3C,OAAO;YACL,YAAY,EAAE,KAAK;YACnB,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,QAAQ;SACnB,CAAC;IACJ,CAAC;IANe,+BAAe,kBAM9B,CAAA;AACH,CAAC,EA5CgB,eAAe,+BAAf,eAAe,QA4C/B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Hierarchies\r\n */\r\n\r\n/**\r\n * Data structure that describes raw composite label value.\r\n * @public\r\n */\r\nexport interface LabelCompositeValue {\r\n separator: string;\r\n values: LabelDefinition[];\r\n}\r\n\r\n/**\r\n * JSON representation of [[LabelCompositeValue]]\r\n * @public\r\n * @deprecated in 3.x. Use [[LabelCompositeValue]].\r\n */\r\nexport interface LabelCompositeValueJSON {\r\n separator: string;\r\n values: LabelDefinition[];\r\n}\r\n\r\n/** @public */\r\nexport namespace LabelCompositeValue {\r\n /**\r\n * Serialize given [[LabelCompositeValue]] to JSON\r\n * @deprecated in 3.x. Use [[LabelCompositeValue]].\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function toJSON(compositeValue: LabelCompositeValue): LabelCompositeValueJSON {\r\n return { ...compositeValue };\r\n }\r\n\r\n /**\r\n * Deserialize [[LabelCompositeValue]] from JSON\r\n * @deprecated in 3.x. Use [[LabelCompositeValue]].\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function fromJSON(json: LabelCompositeValueJSON): LabelCompositeValue {\r\n return { ...json };\r\n }\r\n}\r\n\r\n/**\r\n * Type definition of label raw value.\r\n * @public\r\n */\r\nexport type LabelRawValue = string | number | boolean | LabelCompositeValue;\r\n\r\n/**\r\n * JSON representation of [[LabelRawValue]]\r\n * @public\r\n * @deprecated in 3.x. Use [[LabelRawValue]].\r\n */\r\nexport type LabelRawValueJSON = LabelRawValue;\r\n\r\n/**\r\n * Data structure that describes label definition.\r\n * @public\r\n */\r\nexport interface LabelDefinition {\r\n /** Display value of label */\r\n displayValue: string;\r\n /** Raw value of label */\r\n rawValue: LabelRawValue;\r\n /** Type name of raw value */\r\n typeName: string;\r\n}\r\n\r\n/**\r\n * JSON representation of [[LabelDefinition]]\r\n * @public\r\n * @deprecated in 3.x. Use [[LabelDefinition]].\r\n */\r\nexport interface LabelDefinitionJSON {\r\n displayValue: string;\r\n rawValue: LabelRawValue;\r\n typeName: string;\r\n}\r\n\r\n/** @public */\r\nexport namespace LabelDefinition {\r\n /**\r\n * Serialize given [[LabelDefinition]] to JSON\r\n * @deprecated in 3.x. Use [[LabelDefinition]].\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function toJSON(labelDefinition: LabelDefinition): LabelDefinitionJSON {\r\n return { ...labelDefinition };\r\n }\r\n\r\n /**\r\n * Deserialize [[LabelDefinition]] from JSON\r\n * @deprecated in 3.x. Use [[LabelDefinition]].\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function fromJSON(json: LabelDefinitionJSON | string): LabelDefinition {\r\n if (typeof json === \"string\") {\r\n return JSON.parse(json);\r\n }\r\n return { ...json };\r\n }\r\n\r\n /** @internal */\r\n export const COMPOSITE_DEFINITION_TYPENAME = \"composite\";\r\n\r\n /**\r\n * Checks if provided [[LabelDefinition]] has raw value of type [[LabelCompositeValue]].\r\n * @public\r\n */\r\n export function isCompositeDefinition(def: LabelDefinition): def is LabelDefinition & { rawValue: LabelCompositeValue } {\r\n return def.typeName === COMPOSITE_DEFINITION_TYPENAME;\r\n }\r\n\r\n /**\r\n * Creates [[LabelDefinition]] from string value.\r\n * @public\r\n */\r\n export function fromLabelString(label: string): LabelDefinition {\r\n return {\r\n displayValue: label,\r\n rawValue: label,\r\n typeName: \"string\",\r\n };\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"LabelDefinition.js","sourceRoot":"","sources":["../../../src/presentation-common/LabelDefinition.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AA8BH,cAAc;AACd,IAAiB,eAAe,CAuB/B;AAvBD,WAAiB,eAAe;IAC9B,gBAAgB;IACH,6CAA6B,GAAG,WAAW,CAAC;IAEzD;;;OAGG;IACH,SAAgB,qBAAqB,CAAC,GAAoB;QACxD,OAAO,GAAG,CAAC,QAAQ,KAAK,gBAAA,6BAA6B,CAAC;IACxD,CAAC;IAFe,qCAAqB,wBAEpC,CAAA;IAED;;;OAGG;IACH,SAAgB,eAAe,CAAC,KAAa;QAC3C,OAAO;YACL,YAAY,EAAE,KAAK;YACnB,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,QAAQ;SACnB,CAAC;IACJ,CAAC;IANe,+BAAe,kBAM9B,CAAA;AACH,CAAC,EAvBgB,eAAe,+BAAf,eAAe,QAuB/B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Hierarchies\r\n */\r\n\r\n/**\r\n * Data structure that describes raw composite label value.\r\n * @public\r\n */\r\nexport interface LabelCompositeValue {\r\n separator: string;\r\n values: LabelDefinition[];\r\n}\r\n\r\n/**\r\n * Type definition of label raw value.\r\n * @public\r\n */\r\nexport type LabelRawValue = string | number | boolean | LabelCompositeValue;\r\n\r\n/**\r\n * Data structure that describes label definition.\r\n * @public\r\n */\r\nexport interface LabelDefinition {\r\n /** Display value of label */\r\n displayValue: string;\r\n /** Raw value of label */\r\n rawValue: LabelRawValue;\r\n /** Type name of raw value */\r\n typeName: string;\r\n}\r\n\r\n/** @public */\r\nexport namespace LabelDefinition {\r\n /** @internal */\r\n export const COMPOSITE_DEFINITION_TYPENAME = \"composite\";\r\n\r\n /**\r\n * Checks if provided [[LabelDefinition]] has raw value of type [[LabelCompositeValue]].\r\n * @public\r\n */\r\n export function isCompositeDefinition(def: LabelDefinition): def is LabelDefinition & { rawValue: LabelCompositeValue } {\r\n return def.typeName === COMPOSITE_DEFINITION_TYPENAME;\r\n }\r\n\r\n /**\r\n * Creates [[LabelDefinition]] from string value.\r\n * @public\r\n */\r\n export function fromLabelString(label: string): LabelDefinition {\r\n return {\r\n displayValue: label,\r\n rawValue: label,\r\n typeName: \"string\",\r\n };\r\n }\r\n}\r\n"]}
@@ -15,6 +15,7 @@ const LabelDefinition_1 = require("./LabelDefinition");
15
15
  const KEY_PATTERN = /@[\w\d\-_]+:[\w\d\-\._]+?@/g;
16
16
  /** @internal */
17
17
  class LocalizationHelper {
18
+ _getLocalizedString;
18
19
  constructor(props) {
19
20
  this._getLocalizedString = props.getLocalizedString;
20
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LocalizationHelper.js","sourceRoot":"","sources":["../../../src/presentation-common/LocalizationHelper.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,+CAA4C;AAC5C,qDAAkD;AAGlD,2CAAyE;AAIzE,uDAAyE;AAEzE,MAAM,WAAW,GAAG,6BAA6B,CAAC;AAOlD,gBAAgB;AAChB,MAAa,kBAAkB;IAG7B,YAAY,KAA8B;QACxC,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,kBAAkB,CAAC;IACtD,CAAC;IAEM,kBAAkB,CAAC,IAAY;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,EAAE,CAA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C;IACJ,CAAC;IAEO,wBAAwB,CAAC,KAAmB;QAClD,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE,CAAC;YACjC,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACxC,CAAC;QACD,IAAI,oBAAY,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAChC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5G,CAAC;CACF;AA1JD,gDA0JC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Core\r\n */\r\n\r\nimport { CategoryDescription } from \"./content/Category\";\r\nimport { Content } from \"./content/Content\";\r\nimport { Descriptor } from \"./content/Descriptor\";\r\nimport { Field } from \"./content/Fields\";\r\nimport { Item } from \"./content/Item\";\r\nimport { DisplayValue, DisplayValueGroup, Value } from \"./content/Value\";\r\nimport { ElementProperties } from \"./ElementProperties\";\r\nimport { Node } from \"./hierarchy/Node\";\r\nimport { NodePathElement } from \"./hierarchy/NodePathElement\";\r\nimport { LabelCompositeValue, LabelDefinition } from \"./LabelDefinition\";\r\n\r\nconst KEY_PATTERN = /@[\\w\\d\\-_]+:[\\w\\d\\-\\._]+?@/g;\r\n\r\n/** @internal */\r\nexport interface LocalizationHelperProps {\r\n getLocalizedString: (key: string) => string;\r\n}\r\n\r\n/** @internal */\r\nexport class LocalizationHelper {\r\n private _getLocalizedString: (key: string) => string;\r\n\r\n constructor(props: LocalizationHelperProps) {\r\n this._getLocalizedString = props.getLocalizedString;\r\n }\r\n\r\n public getLocalizedString(text: string) {\r\n return text.replace(KEY_PATTERN, (key) => this._getLocalizedString(key.replace(/^@|@$/g, \"\")));\r\n }\r\n\r\n public getLocalizedNodes(nodes: Node[]): Node[] {\r\n return nodes.map((n) => this.getLocalizedNode(n));\r\n }\r\n\r\n public getLocalizedNodePathElement(npe: NodePathElement): NodePathElement {\r\n return {\r\n ...npe,\r\n node: this.getLocalizedNode(npe.node),\r\n children: npe.children.map((c) => this.getLocalizedNodePathElement(c)),\r\n };\r\n }\r\n\r\n public getLocalizedDisplayValueGroup(group: DisplayValueGroup): DisplayValueGroup {\r\n return {\r\n ...group,\r\n displayValue: this.getLocalizedDisplayValue(group.displayValue),\r\n };\r\n }\r\n\r\n public getLocalizedLabelDefinition(labelDefinition: LabelDefinition): LabelDefinition {\r\n const getLocalizedComposite = (compositeValue: LabelCompositeValue) => ({\r\n ...compositeValue,\r\n values: compositeValue.values.map((value) => this.getLocalizedLabelDefinition(value)),\r\n });\r\n\r\n if (labelDefinition.typeName === LabelDefinition.COMPOSITE_DEFINITION_TYPENAME) {\r\n return {\r\n ...labelDefinition,\r\n rawValue: getLocalizedComposite(labelDefinition.rawValue as LabelCompositeValue),\r\n };\r\n }\r\n if (labelDefinition.typeName === \"string\") {\r\n return {\r\n ...labelDefinition,\r\n rawValue: this.getLocalizedString(labelDefinition.rawValue as string),\r\n displayValue: this.getLocalizedString(labelDefinition.displayValue),\r\n };\r\n }\r\n return labelDefinition;\r\n }\r\n\r\n public getLocalizedLabelDefinitions(labelDefinitions: LabelDefinition[]) {\r\n return labelDefinitions.map((labelDefinition) => this.getLocalizedLabelDefinition(labelDefinition));\r\n }\r\n\r\n public getLocalizedContentDescriptor(descriptor: Descriptor) {\r\n const clone = new Descriptor(descriptor);\r\n clone.fields.forEach((field) => this.getLocalizedContentField(field));\r\n clone.categories.forEach((category) => this.getLocalizedCategoryDescription(category));\r\n return clone;\r\n }\r\n\r\n public getLocalizedContentItems(items: Item[]): Item[] {\r\n return items.map((item) => this.getLocalizedContentItem(item));\r\n }\r\n\r\n public getLocalizedContent(content: Content): Content {\r\n return new Content(this.getLocalizedContentDescriptor(content.descriptor), this.getLocalizedContentItems(content.contentSet));\r\n }\r\n\r\n public getLocalizedElementProperties(elem: ElementProperties): ElementProperties {\r\n return {\r\n ...elem,\r\n label: this.getLocalizedString(elem.label),\r\n };\r\n }\r\n\r\n // warning: this function mutates the item\r\n private getLocalizedContentItem(item: Item): Item {\r\n item.label = this.getLocalizedLabelDefinition(item.label);\r\n item.values = Object.entries(item.values).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedRawValue(v) }), {});\r\n item.displayValues = Object.entries(item.displayValues).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedDisplayValue(v) }), {});\r\n return item;\r\n }\r\n\r\n private getLocalizedRawValue(value: Value): Value {\r\n if (typeof value === \"string\") {\r\n return this.getLocalizedString(value);\r\n }\r\n if (Value.isNavigationValue(value)) {\r\n return {\r\n ...value,\r\n label: this.getLocalizedLabelDefinition(value.label),\r\n };\r\n }\r\n if (Value.isNestedContent(value)) {\r\n return value.map((item) => ({\r\n ...item,\r\n values: Object.entries(item.values).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedRawValue(v) }), {}),\r\n displayValues: Object.entries(item.displayValues).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedDisplayValue(v) }), {}),\r\n }));\r\n }\r\n if (Value.isArray(value)) {\r\n return value.map((v) => this.getLocalizedRawValue(v));\r\n }\r\n if (Value.isMap(value)) {\r\n return Object.entries(value).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedRawValue(v) }), {});\r\n }\r\n return value;\r\n }\r\n\r\n // warning: this function mutates the field\r\n private getLocalizedContentField<TField extends Field>(field: TField) {\r\n field.label = this.getLocalizedString(field.label);\r\n if (field.isPropertiesField()) {\r\n if (field.isStructPropertiesField()) {\r\n field.memberFields = field.memberFields.map((m) => this.getLocalizedContentField(m));\r\n } else if (field.isArrayPropertiesField()) {\r\n field.itemsField = this.getLocalizedContentField(field.itemsField);\r\n }\r\n } else if (field.isNestedContentField()) {\r\n field.nestedFields = field.nestedFields.map((m) => this.getLocalizedContentField(m));\r\n }\r\n return field;\r\n }\r\n\r\n // warning: this function mutates the category\r\n private getLocalizedCategoryDescription(category: CategoryDescription) {\r\n category.label = this.getLocalizedString(category.label);\r\n category.description = this.getLocalizedString(category.description);\r\n return category;\r\n }\r\n\r\n public getLocalizedNode(node: Node): Node {\r\n return {\r\n ...node,\r\n label: this.getLocalizedLabelDefinition(node.label),\r\n ...(node.description ? { description: this.getLocalizedString(node.description) } : undefined),\r\n };\r\n }\r\n\r\n private getLocalizedDisplayValue(value: DisplayValue): DisplayValue {\r\n if (typeof value === \"undefined\") {\r\n return undefined;\r\n }\r\n if (typeof value === \"string\") {\r\n return this.getLocalizedString(value);\r\n }\r\n if (DisplayValue.isArray(value)) {\r\n return value.map((v) => this.getLocalizedDisplayValue(v));\r\n }\r\n return Object.entries(value).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedDisplayValue(v) }), {});\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"LocalizationHelper.js","sourceRoot":"","sources":["../../../src/presentation-common/LocalizationHelper.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,+CAA4C;AAC5C,qDAAkD;AAGlD,2CAAyE;AAIzE,uDAAyE;AAEzE,MAAM,WAAW,GAAG,6BAA6B,CAAC;AAOlD,gBAAgB;AAChB,MAAa,kBAAkB;IACrB,mBAAmB,CAA0B;IA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I,CAAC,KAAK,CAAC;YACnD,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;SAC/F,CAAC;IACJ,CAAC;IAEO,wBAAwB,CAAC,KAAmB;QAClD,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE,CAAC;YACjC,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACxC,CAAC;QACD,IAAI,oBAAY,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAChC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5G,CAAC;CACF;AA1JD,gDA0JC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Core\r\n */\r\n\r\nimport { CategoryDescription } from \"./content/Category\";\r\nimport { Content } from \"./content/Content\";\r\nimport { Descriptor } from \"./content/Descriptor\";\r\nimport { Field } from \"./content/Fields\";\r\nimport { Item } from \"./content/Item\";\r\nimport { DisplayValue, DisplayValueGroup, Value } from \"./content/Value\";\r\nimport { ElementProperties } from \"./ElementProperties\";\r\nimport { Node } from \"./hierarchy/Node\";\r\nimport { NodePathElement } from \"./hierarchy/NodePathElement\";\r\nimport { LabelCompositeValue, LabelDefinition } from \"./LabelDefinition\";\r\n\r\nconst KEY_PATTERN = /@[\\w\\d\\-_]+:[\\w\\d\\-\\._]+?@/g;\r\n\r\n/** @internal */\r\nexport interface LocalizationHelperProps {\r\n getLocalizedString: (key: string) => string;\r\n}\r\n\r\n/** @internal */\r\nexport class LocalizationHelper {\r\n private _getLocalizedString: (key: string) => string;\r\n\r\n constructor(props: LocalizationHelperProps) {\r\n this._getLocalizedString = props.getLocalizedString;\r\n }\r\n\r\n public getLocalizedString(text: string) {\r\n return text.replace(KEY_PATTERN, (key) => this._getLocalizedString(key.replace(/^@|@$/g, \"\")));\r\n }\r\n\r\n public getLocalizedNodes(nodes: Node[]): Node[] {\r\n return nodes.map((n) => this.getLocalizedNode(n));\r\n }\r\n\r\n public getLocalizedNodePathElement(npe: NodePathElement): NodePathElement {\r\n return {\r\n ...npe,\r\n node: this.getLocalizedNode(npe.node),\r\n children: npe.children.map((c) => this.getLocalizedNodePathElement(c)),\r\n };\r\n }\r\n\r\n public getLocalizedDisplayValueGroup(group: DisplayValueGroup): DisplayValueGroup {\r\n return {\r\n ...group,\r\n displayValue: this.getLocalizedDisplayValue(group.displayValue),\r\n };\r\n }\r\n\r\n public getLocalizedLabelDefinition(labelDefinition: LabelDefinition): LabelDefinition {\r\n const getLocalizedComposite = (compositeValue: LabelCompositeValue) => ({\r\n ...compositeValue,\r\n values: compositeValue.values.map((value) => this.getLocalizedLabelDefinition(value)),\r\n });\r\n\r\n if (labelDefinition.typeName === LabelDefinition.COMPOSITE_DEFINITION_TYPENAME) {\r\n return {\r\n ...labelDefinition,\r\n rawValue: getLocalizedComposite(labelDefinition.rawValue as LabelCompositeValue),\r\n };\r\n }\r\n if (labelDefinition.typeName === \"string\") {\r\n return {\r\n ...labelDefinition,\r\n rawValue: this.getLocalizedString(labelDefinition.rawValue as string),\r\n displayValue: this.getLocalizedString(labelDefinition.displayValue),\r\n };\r\n }\r\n return labelDefinition;\r\n }\r\n\r\n public getLocalizedLabelDefinitions(labelDefinitions: LabelDefinition[]) {\r\n return labelDefinitions.map((labelDefinition) => this.getLocalizedLabelDefinition(labelDefinition));\r\n }\r\n\r\n public getLocalizedContentDescriptor(descriptor: Descriptor) {\r\n const clone = new Descriptor(descriptor);\r\n clone.fields.forEach((field) => this.getLocalizedContentField(field));\r\n clone.categories.forEach((category) => this.getLocalizedCategoryDescription(category));\r\n return clone;\r\n }\r\n\r\n public getLocalizedContentItems(items: Item[]): Item[] {\r\n return items.map((item) => this.getLocalizedContentItem(item));\r\n }\r\n\r\n public getLocalizedContent(content: Content): Content {\r\n return new Content(this.getLocalizedContentDescriptor(content.descriptor), this.getLocalizedContentItems(content.contentSet));\r\n }\r\n\r\n public getLocalizedElementProperties(elem: ElementProperties): ElementProperties {\r\n return {\r\n ...elem,\r\n label: this.getLocalizedString(elem.label),\r\n };\r\n }\r\n\r\n // warning: this function mutates the item\r\n private getLocalizedContentItem(item: Item): Item {\r\n item.label = this.getLocalizedLabelDefinition(item.label);\r\n item.values = Object.entries(item.values).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedRawValue(v) }), {});\r\n item.displayValues = Object.entries(item.displayValues).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedDisplayValue(v) }), {});\r\n return item;\r\n }\r\n\r\n private getLocalizedRawValue(value: Value): Value {\r\n if (typeof value === \"string\") {\r\n return this.getLocalizedString(value);\r\n }\r\n if (Value.isNavigationValue(value)) {\r\n return {\r\n ...value,\r\n label: this.getLocalizedLabelDefinition(value.label),\r\n };\r\n }\r\n if (Value.isNestedContent(value)) {\r\n return value.map((item) => ({\r\n ...item,\r\n values: Object.entries(item.values).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedRawValue(v) }), {}),\r\n displayValues: Object.entries(item.displayValues).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedDisplayValue(v) }), {}),\r\n }));\r\n }\r\n if (Value.isArray(value)) {\r\n return value.map((v) => this.getLocalizedRawValue(v));\r\n }\r\n if (Value.isMap(value)) {\r\n return Object.entries(value).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedRawValue(v) }), {});\r\n }\r\n return value;\r\n }\r\n\r\n // warning: this function mutates the field\r\n private getLocalizedContentField<TField extends Field>(field: TField) {\r\n field.label = this.getLocalizedString(field.label);\r\n if (field.isPropertiesField()) {\r\n if (field.isStructPropertiesField()) {\r\n field.memberFields = field.memberFields.map((m) => this.getLocalizedContentField(m));\r\n } else if (field.isArrayPropertiesField()) {\r\n field.itemsField = this.getLocalizedContentField(field.itemsField);\r\n }\r\n } else if (field.isNestedContentField()) {\r\n field.nestedFields = field.nestedFields.map((m) => this.getLocalizedContentField(m));\r\n }\r\n return field;\r\n }\r\n\r\n // warning: this function mutates the category\r\n private getLocalizedCategoryDescription(category: CategoryDescription) {\r\n category.label = this.getLocalizedString(category.label);\r\n category.description = this.getLocalizedString(category.description);\r\n return category;\r\n }\r\n\r\n public getLocalizedNode(node: Node): Node {\r\n return {\r\n ...node,\r\n label: this.getLocalizedLabelDefinition(node.label),\r\n ...(node.description ? { description: this.getLocalizedString(node.description) } : undefined),\r\n };\r\n }\r\n\r\n private getLocalizedDisplayValue(value: DisplayValue): DisplayValue {\r\n if (typeof value === \"undefined\") {\r\n return undefined;\r\n }\r\n if (typeof value === \"string\") {\r\n return this.getLocalizedString(value);\r\n }\r\n if (DisplayValue.isArray(value)) {\r\n return value.map((v) => this.getLocalizedDisplayValue(v));\r\n }\r\n return Object.entries(value).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedDisplayValue(v) }), {});\r\n }\r\n}\r\n"]}
@@ -175,16 +175,10 @@ export interface SingleElementPropertiesRequestOptions<TIModel, TParsedContent =
175
175
  contentParser?: (descriptor: Descriptor, item: Item) => TParsedContent;
176
176
  }
177
177
  /**
178
- * Request type for multiple elements properties requests.
178
+ * Base request type for multiple elements properties requests.
179
179
  * @public
180
180
  */
181
- export interface MultiElementPropertiesRequestOptions<TIModel, TParsedContent = ElementProperties> extends RequestOptions<TIModel> {
182
- /**
183
- * Classes of the elements to get properties for. If [[elementClasses]] is `undefined`, all classes
184
- * are used. Classes should be specified in one of these formats: "<schema name or alias>.<class_name>" or
185
- * "<schema name or alias>:<class_name>".
186
- */
187
- elementClasses?: string[];
181
+ export interface MultiElementPropertiesBaseRequestOptions<TIModel, TParsedContent = ElementProperties> extends RequestOptions<TIModel> {
188
182
  /**
189
183
  * Content parser that creates a result item based on given content descriptor and content item. Defaults
190
184
  * to a parser that creates [[ElementProperties]] objects.
@@ -197,6 +191,33 @@ export interface MultiElementPropertiesRequestOptions<TIModel, TParsedContent =
197
191
  */
198
192
  batchSize?: number;
199
193
  }
194
+ /**
195
+ * Request type for multiple elements properties requests, where elements are specified by class.
196
+ * @public
197
+ */
198
+ export interface MultiElementPropertiesByClassRequestOptions<TIModel, TParsedContent = ElementProperties> extends MultiElementPropertiesBaseRequestOptions<TIModel, TParsedContent> {
199
+ /**
200
+ * Classes of the elements to get properties for. If [[elementClasses]] is `undefined`, all classes
201
+ * are used. Classes should be specified in one of these formats: "<schema name or alias>.<class_name>" or
202
+ * "<schema name or alias>:<class_name>".
203
+ */
204
+ elementClasses?: string[];
205
+ }
206
+ /**
207
+ * Request type for multiple elements properties requests, where elements are specified by element id.
208
+ * @public
209
+ */
210
+ export interface MultiElementPropertiesByIdsRequestOptions<TIModel, TParsedContent = ElementProperties> extends MultiElementPropertiesBaseRequestOptions<TIModel, TParsedContent> {
211
+ /**
212
+ * A list of `bis.Element` IDs to get properties for.
213
+ */
214
+ elementIds?: Id64String[];
215
+ }
216
+ /**
217
+ * Request type for multiple elements properties requests.
218
+ * @public
219
+ */
220
+ export type MultiElementPropertiesRequestOptions<TIModel, TParsedContent = ElementProperties> = MultiElementPropertiesByClassRequestOptions<TIModel, TParsedContent> | MultiElementPropertiesByIdsRequestOptions<TIModel, TParsedContent>;
200
221
  /**
201
222
  * Request type for content instance keys' requests.
202
223
  * @public
@@ -229,19 +250,19 @@ export interface DisplayLabelsRequestOptions<TIModel, TInstanceKey> extends Requ
229
250
  /**
230
251
  * Request options used for selection scope related requests
231
252
  * @public
253
+ * @deprecated in 5.0. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
232
254
  */
233
255
  export interface SelectionScopeRequestOptions<TIModel> extends RequestOptions<TIModel> {
234
256
  }
235
257
  /**
236
258
  * Request options used for calculating selection based on given instance keys and selection scope.
237
259
  * @public
260
+ * @deprecated in 5.0. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
238
261
  */
239
262
  export interface ComputeSelectionRequestOptions<TIModel> extends RequestOptions<TIModel> {
240
263
  elementIds: Id64String[];
241
264
  scope: SelectionScopeProps;
242
265
  }
243
- /** @internal */
244
- export declare function isComputeSelectionRequestOptions<TIModel>(options: ComputeSelectionRequestOptions<TIModel> | SelectionScopeRequestOptions<TIModel>): options is ComputeSelectionRequestOptions<TIModel>;
245
266
  /**
246
267
  * Data structure for comparing a hierarchy after ruleset or ruleset variable changes.
247
268
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"PresentationManagerOptions.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/PresentationManagerOptions.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,M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,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC9B,iBAAiB,CAAC,EAAE;QAClB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,iBAAiB,EAAE,MAAM,CAAC;KAC3B,CAAC;IACF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,MAAM,KAAK,CAAC,QAAQ,SAAS,MAAM,IAAI,QAAQ,GAAG;IACtD,iCAAiC;IACjC,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,WAAW,CAAC,QAAQ,SAAS,MAAM,IAAI,QAAQ,GAAG;IAC5D,wBAAwB;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,uCAAuC,CAAC,OAAO,EAAE,cAAc,GAAG,GAAG,EACnF,OAAO,EAAE,qCAAqC,CAAC,OAAO,CAAC,GAAG,oCAAoC,CAAC,OAAO,EAAE,cAAc,CAAC,GACtH,OAAO,IAAI,qCAAqC,CAAC,OAAO,CAAC,CAE3D;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,QAAQ,SAAS,MAAM,IAAI,QAAQ,GAAG;IAChE,4DAA4D;IAC5D,WAAW,CAAC,EAAE,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC;CACnC,CAAC"}
1
+ {"version":3,"file":"PresentationManagerOptions.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/PresentationManagerOptions.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC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,EAAE,cAAc,CAAC,GACtH,OAAO,IAAI,qCAAqC,CAAC,OAAO,CAAC,CAE3D;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,QAAQ,SAAS,MAAM,IAAI,QAAQ,GAAG;IAChE,4DAA4D;IAC5D,WAAW,CAAC,EAAE,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC;CACnC,CAAC"}
@@ -7,12 +7,7 @@
7
7
  * @module Core
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.isComputeSelectionRequestOptions = isComputeSelectionRequestOptions;
11
10
  exports.isSingleElementPropertiesRequestOptions = isSingleElementPropertiesRequestOptions;
12
- /** @internal */
13
- function isComputeSelectionRequestOptions(options) {
14
- return !!options.elementIds;
15
- }
16
11
  /**
17
12
  * Checks if supplied request options are for single or multiple element properties.
18
13
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"PresentationManagerOptions.js","sourceRoot":"","sources":["../../../src/presentation-common/PresentationManagerOptions.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;AAqRH,4EAIC;AAoDD,0FAIC;AA7DD,gBAAgB;AAChB,SAAgB,gCAAgC,CAC9C,OAAwF;IAExF,OAAO,CAAC,CAAE,OAAmD,CAAC,UAAU,CAAC;AAC3E,CAAC;AAgDD;;;GAGG;AACH,SAAgB,uCAAuC,CACrD,OAAuH;IAEvH,OAAQ,OAA0D,CAAC,SAAS,KAAK,SAAS,CAAC;AAC7F,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Core\r\n */\r\n\r\nimport { BeEvent, Id64String } from \"@itwin/core-bentley\";\r\nimport { UnitSystemKey } from \"@itwin/core-quantity\";\r\nimport { Descriptor, SelectionInfo } from \"./content/Descriptor\";\r\nimport { FieldDescriptor } from \"./content/Fields\";\r\nimport { Item } from \"./content/Item\";\r\nimport { InstanceKey } from \"./EC\";\r\nimport { ElementProperties } from \"./ElementProperties\";\r\nimport { InstanceFilterDefinition } from \"./InstanceFilterDefinition\";\r\nimport { Ruleset } from \"./rules/Ruleset\";\r\nimport { RulesetVariable } from \"./RulesetVariables\";\r\nimport { SelectionScopeProps } from \"./selection/SelectionScope\";\r\n\r\n/**\r\n * A generic request options type used for both hierarchy and content requests.\r\n * @public\r\n */\r\nexport interface RequestOptions<TIModel> {\r\n /** iModel to request data from */\r\n imodel: TIModel;\r\n\r\n /** Optional locale to use when formatting / localizing data */\r\n locale?: string;\r\n\r\n /**\r\n * Unit system to use when formatting property values with units. Default presentation\r\n * unit is used if unit system is not specified.\r\n */\r\n unitSystem?: UnitSystemKey;\r\n\r\n /**\r\n * Expected form of response. This property is set automatically on newer frontends.\r\n * `unparsed-json` — deliver response from native addon without parsing it.\r\n * @internal\r\n */\r\n transport?: \"unparsed-json\";\r\n}\r\n\r\n/**\r\n * Options for requests that require presentation ruleset. Not\r\n * meant to be used directly, see one of the subclasses.\r\n *\r\n * @public\r\n */\r\nexport interface RequestOptionsWithRuleset<TIModel, TRulesetVariable = RulesetVariable> extends RequestOptions<TIModel> {\r\n /** Ruleset or id of the ruleset to use when requesting data */\r\n rulesetOrId: Ruleset | string;\r\n\r\n /** Ruleset variables to use when requesting data */\r\n rulesetVariables?: TRulesetVariable[];\r\n}\r\n\r\n/**\r\n * Request type for hierarchy requests.\r\n * @public\r\n */\r\nexport interface HierarchyRequestOptions<TIModel, TNodeKey, TRulesetVariable = RulesetVariable> extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n /** Key of the parent node to get children for */\r\n parentKey?: TNodeKey;\r\n\r\n /**\r\n * An instance filter that should be applied for this hierarchy level.\r\n *\r\n * **Note:** May only be used on hierarchy levels that support filtering - check [[NavNode.supportsFiltering]] before\r\n * requesting filtered children.\r\n */\r\n instanceFilter?: InstanceFilterDefinition;\r\n\r\n /**\r\n * A limit to how many instances at most should be loaded for a hierarchy level. If the limit is exceeded,\r\n * the request fails with [[PresentationError]] having [[PresentationStatus.ResultSetTooLarge]] error number.\r\n *\r\n * Specifying the limit is useful when creating unlimited size result sets is not meaningful - this allows the library\r\n * to return early as soon as the limit is reached, instead of creating a very large result that's possibly too large to\r\n * be useful to be displayed to end users.\r\n *\r\n * @see [Hierarchies' filtering and limiting]($docs/presentation/hierarchies/FilteringLimiting.md)\r\n */\r\n sizeLimit?: number;\r\n}\r\n\r\n/**\r\n * Params for hierarchy level descriptor requests.\r\n * @public\r\n */\r\nexport interface HierarchyLevelDescriptorRequestOptions<TIModel, TNodeKey, TRulesetVariable = RulesetVariable>\r\n extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n /** Key of the parent node to get hierarchy level descriptor for. */\r\n parentKey?: TNodeKey;\r\n}\r\n\r\n/**\r\n * Request type of filtering hierarchies by given ECInstance paths.\r\n * @public\r\n */\r\nexport interface FilterByInstancePathsHierarchyRequestOptions<TIModel, TRulesetVariable = RulesetVariable>\r\n extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n /** A list of paths from root ECInstance to target ECInstance. */\r\n instancePaths: InstanceKey[][];\r\n\r\n /**\r\n * An optional index (`0 <= markedIndex < instancePaths.length`) to mark one of the instance paths. The\r\n * path is marked using `NodePathElement.isMarked` flag in the result.\r\n */\r\n markedIndex?: number;\r\n}\r\n\r\n/**\r\n * Request type of filtering hierarchies by given text.\r\n * @public\r\n */\r\nexport interface FilterByTextHierarchyRequestOptions<TIModel, TRulesetVariable = RulesetVariable> extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n /** Text to filter the hierarchy by. */\r\n filterText: string;\r\n}\r\n\r\n/**\r\n * Request type for content sources requests.\r\n * @public\r\n */\r\nexport interface ContentSourcesRequestOptions<TIModel> extends RequestOptions<TIModel> {\r\n /** Full names of classes to get content sources for. Format for a full class name: `SchemaName:ClassName`. */\r\n classes: string[];\r\n}\r\n\r\n/**\r\n * Request type for content descriptor requests.\r\n * @public\r\n */\r\nexport interface ContentDescriptorRequestOptions<TIModel, TKeySet, TRulesetVariable = RulesetVariable>\r\n extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n /**\r\n * Content display type.\r\n * @see [[DefaultContentDisplayTypes]]\r\n */\r\n displayType: string;\r\n /**\r\n * Content flags used for content customization.\r\n * @see [[ContentFlags]]\r\n */\r\n contentFlags?: number;\r\n /** Input keys for getting the content */\r\n keys: TKeySet;\r\n /** Information about the selection event that was the cause of this content request */\r\n selection?: SelectionInfo;\r\n}\r\n\r\n/**\r\n * Request type for content requests.\r\n * @public\r\n */\r\nexport interface ContentRequestOptions<TIModel, TDescriptor, TKeySet, TRulesetVariable = RulesetVariable>\r\n extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n /** Content descriptor for customizing the returned content */\r\n descriptor: TDescriptor;\r\n /** Input keys for getting the content */\r\n keys: TKeySet;\r\n /**\r\n * Flag that specifies whether value formatting should be omitted or not.\r\n * Content is returned without `displayValues` when this is set to `true`.\r\n */\r\n omitFormattedValues?: boolean;\r\n}\r\n\r\n/**\r\n * Request type for distinct values' requests.\r\n * @public\r\n */\r\nexport interface DistinctValuesRequestOptions<TIModel, TDescriptor, TKeySet, TRulesetVariable = RulesetVariable>\r\n extends Paged<RequestOptionsWithRuleset<TIModel, TRulesetVariable>> {\r\n /** Content descriptor for customizing the returned content */\r\n descriptor: TDescriptor;\r\n /** Input keys for getting the content */\r\n keys: TKeySet;\r\n /** Descriptor for a field distinct values are requested for */\r\n fieldDescriptor: FieldDescriptor;\r\n}\r\n\r\n/**\r\n * Request type for element properties requests\r\n * @public\r\n * @deprecated in 4.x. Use [[SingleElementPropertiesRequestOptions]] or [[MultiElementPropertiesRequestOptions]] directly.\r\n */\r\nexport type ElementPropertiesRequestOptions<TIModel, TParsedContent = ElementProperties> =\r\n | SingleElementPropertiesRequestOptions<TIModel>\r\n | MultiElementPropertiesRequestOptions<TIModel, TParsedContent>;\r\n\r\n/**\r\n * Request type for single element properties requests.\r\n * @public\r\n */\r\nexport interface SingleElementPropertiesRequestOptions<TIModel, TParsedContent = ElementProperties> extends RequestOptions<TIModel> {\r\n /** ID of the element to get properties for. */\r\n elementId: Id64String;\r\n\r\n /**\r\n * Content parser that creates a result item based on given content descriptor and content item. Defaults\r\n * to a parser that creates [[ElementProperties]] objects.\r\n */\r\n contentParser?: (descriptor: Descriptor, item: Item) => TParsedContent;\r\n}\r\n\r\n/**\r\n * Request type for multiple elements properties requests.\r\n * @public\r\n */\r\nexport interface MultiElementPropertiesRequestOptions<TIModel, TParsedContent = ElementProperties> extends RequestOptions<TIModel> {\r\n /**\r\n * Classes of the elements to get properties for. If [[elementClasses]] is `undefined`, all classes\r\n * are used. Classes should be specified in one of these formats: \"<schema name or alias>.<class_name>\" or\r\n * \"<schema name or alias>:<class_name>\".\r\n */\r\n elementClasses?: string[];\r\n\r\n /**\r\n * Content parser that creates a result item based on given content descriptor and content item. Defaults\r\n * to a parser that creates [[ElementProperties]] objects.\r\n */\r\n contentParser?: (descriptor: Descriptor, item: Item) => TParsedContent;\r\n\r\n /**\r\n * The properties of multiple elements are going to be retrieved and returned in batches. Depending on the batch\r\n * size load on CPU vs MEMORY load may vary, so changing this attribute allows to fine tune the performance.\r\n * Defaults to `1000`.\r\n */\r\n batchSize?: number;\r\n}\r\n\r\n/**\r\n * Request type for content instance keys' requests.\r\n * @public\r\n */\r\nexport interface ContentInstanceKeysRequestOptions<TIModel, TKeySet, TRulesetVariable = RulesetVariable>\r\n extends Paged<RequestOptionsWithRuleset<TIModel, TRulesetVariable>> {\r\n /**\r\n * Content display type.\r\n * @see [[DefaultContentDisplayTypes]]\r\n */\r\n displayType?: string;\r\n /** Input keys for getting the content. */\r\n keys: TKeySet;\r\n}\r\n\r\n/**\r\n * Request type for label requests\r\n * @public\r\n */\r\nexport interface DisplayLabelRequestOptions<TIModel, TInstanceKey> extends RequestOptions<TIModel> {\r\n /** Key of ECInstance to get label for */\r\n key: TInstanceKey;\r\n}\r\n\r\n/**\r\n * Request type for labels requests\r\n * @public\r\n */\r\nexport interface DisplayLabelsRequestOptions<TIModel, TInstanceKey> extends RequestOptions<TIModel> {\r\n /** Keys of ECInstances to get labels for */\r\n keys: TInstanceKey[];\r\n}\r\n\r\n/**\r\n * Request options used for selection scope related requests\r\n * @public\r\n */\r\nexport interface SelectionScopeRequestOptions<TIModel> extends RequestOptions<TIModel> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * Request options used for calculating selection based on given instance keys and selection scope.\r\n * @public\r\n */\r\nexport interface ComputeSelectionRequestOptions<TIModel> extends RequestOptions<TIModel> {\r\n elementIds: Id64String[];\r\n scope: SelectionScopeProps;\r\n}\r\n/** @internal */\r\nexport function isComputeSelectionRequestOptions<TIModel>(\r\n options: ComputeSelectionRequestOptions<TIModel> | SelectionScopeRequestOptions<TIModel>,\r\n): options is ComputeSelectionRequestOptions<TIModel> {\r\n return !!(options as ComputeSelectionRequestOptions<TIModel>).elementIds;\r\n}\r\n\r\n/**\r\n * Data structure for comparing a hierarchy after ruleset or ruleset variable changes.\r\n * @public\r\n */\r\nexport interface HierarchyCompareOptions<TIModel, TNodeKey, TRulesetVariable = RulesetVariable> extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n prev: {\r\n rulesetOrId?: Ruleset | string;\r\n rulesetVariables?: TRulesetVariable[];\r\n };\r\n expandedNodeKeys?: TNodeKey[];\r\n continuationToken?: {\r\n prevHierarchyNode: string;\r\n currHierarchyNode: string;\r\n };\r\n resultSetSize?: number;\r\n}\r\n\r\n/**\r\n * Paging options\r\n * @public\r\n */\r\nexport interface PageOptions {\r\n /** Inclusive start 0-based index of the page */\r\n start?: number;\r\n /** Maximum size of the page */\r\n size?: number;\r\n}\r\n\r\n/**\r\n * A wrapper type that injects [[PageOptions]] into supplied type\r\n * @public\r\n */\r\nexport type Paged<TOptions extends object> = TOptions & {\r\n /** Optional paging parameters */\r\n paging?: PageOptions;\r\n};\r\n\r\n/**\r\n * A wrapper type that injects priority into supplied type.\r\n * @public\r\n */\r\nexport type Prioritized<TOptions extends object> = TOptions & {\r\n /** Optional priority */\r\n priority?: number;\r\n};\r\n\r\n/**\r\n * Checks if supplied request options are for single or multiple element properties.\r\n * @internal\r\n */\r\nexport function isSingleElementPropertiesRequestOptions<TIModel, TParsedContent = any>(\r\n options: SingleElementPropertiesRequestOptions<TIModel> | MultiElementPropertiesRequestOptions<TIModel, TParsedContent>,\r\n): options is SingleElementPropertiesRequestOptions<TIModel> {\r\n return (options as SingleElementPropertiesRequestOptions<TIModel>).elementId !== undefined;\r\n}\r\n\r\n/**\r\n * A wrapper type that injects cancelEvent into supplied type.\r\n * @public\r\n */\r\nexport type WithCancelEvent<TOptions extends object> = TOptions & {\r\n /** Event which is triggered when the request is canceled */\r\n cancelEvent?: BeEvent<() => void>;\r\n};\r\n"]}
1
+ {"version":3,"file":"PresentationManagerOptions.js","sourceRoot":"","sources":["../../../src/presentation-common/PresentationManagerOptions.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;AAkWH,0FAIC;AARD;;;GAGG;AACH,SAAgB,uCAAuC,CACrD,OAAuH;IAEvH,OAAQ,OAA0D,CAAC,SAAS,KAAK,SAAS,CAAC;AAC7F,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Core\r\n */\r\n\r\nimport { BeEvent, Id64String } from \"@itwin/core-bentley\";\r\nimport { UnitSystemKey } from \"@itwin/core-quantity\";\r\nimport { Descriptor, SelectionInfo } from \"./content/Descriptor\";\r\nimport { FieldDescriptor } from \"./content/Fields\";\r\nimport { Item } from \"./content/Item\";\r\nimport { InstanceKey } from \"./EC\";\r\nimport { ElementProperties } from \"./ElementProperties\";\r\nimport { InstanceFilterDefinition } from \"./InstanceFilterDefinition\";\r\nimport { Ruleset } from \"./rules/Ruleset\";\r\nimport { RulesetVariable } from \"./RulesetVariables\";\r\nimport { SelectionScopeProps } from \"./selection/SelectionScope\";\r\n\r\n/**\r\n * A generic request options type used for both hierarchy and content requests.\r\n * @public\r\n */\r\nexport interface RequestOptions<TIModel> {\r\n /** iModel to request data from */\r\n imodel: TIModel;\r\n\r\n /** Optional locale to use when formatting / localizing data */\r\n locale?: string;\r\n\r\n /**\r\n * Unit system to use when formatting property values with units. Default presentation\r\n * unit is used if unit system is not specified.\r\n */\r\n unitSystem?: UnitSystemKey;\r\n\r\n /**\r\n * Expected form of response. This property is set automatically on newer frontends.\r\n * `unparsed-json` — deliver response from native addon without parsing it.\r\n * @internal\r\n */\r\n transport?: \"unparsed-json\";\r\n}\r\n\r\n/**\r\n * Options for requests that require presentation ruleset. Not\r\n * meant to be used directly, see one of the subclasses.\r\n *\r\n * @public\r\n */\r\nexport interface RequestOptionsWithRuleset<TIModel, TRulesetVariable = RulesetVariable> extends RequestOptions<TIModel> {\r\n /** Ruleset or id of the ruleset to use when requesting data */\r\n rulesetOrId: Ruleset | string;\r\n\r\n /** Ruleset variables to use when requesting data */\r\n rulesetVariables?: TRulesetVariable[];\r\n}\r\n\r\n/**\r\n * Request type for hierarchy requests.\r\n * @public\r\n */\r\nexport interface HierarchyRequestOptions<TIModel, TNodeKey, TRulesetVariable = RulesetVariable> extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n /** Key of the parent node to get children for */\r\n parentKey?: TNodeKey;\r\n\r\n /**\r\n * An instance filter that should be applied for this hierarchy level.\r\n *\r\n * **Note:** May only be used on hierarchy levels that support filtering - check [[NavNode.supportsFiltering]] before\r\n * requesting filtered children.\r\n */\r\n instanceFilter?: InstanceFilterDefinition;\r\n\r\n /**\r\n * A limit to how many instances at most should be loaded for a hierarchy level. If the limit is exceeded,\r\n * the request fails with [[PresentationError]] having [[PresentationStatus.ResultSetTooLarge]] error number.\r\n *\r\n * Specifying the limit is useful when creating unlimited size result sets is not meaningful - this allows the library\r\n * to return early as soon as the limit is reached, instead of creating a very large result that's possibly too large to\r\n * be useful to be displayed to end users.\r\n *\r\n * @see [Hierarchies' filtering and limiting]($docs/presentation/hierarchies/FilteringLimiting.md)\r\n */\r\n sizeLimit?: number;\r\n}\r\n\r\n/**\r\n * Params for hierarchy level descriptor requests.\r\n * @public\r\n */\r\nexport interface HierarchyLevelDescriptorRequestOptions<TIModel, TNodeKey, TRulesetVariable = RulesetVariable>\r\n extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n /** Key of the parent node to get hierarchy level descriptor for. */\r\n parentKey?: TNodeKey;\r\n}\r\n\r\n/**\r\n * Request type of filtering hierarchies by given ECInstance paths.\r\n * @public\r\n */\r\nexport interface FilterByInstancePathsHierarchyRequestOptions<TIModel, TRulesetVariable = RulesetVariable>\r\n extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n /** A list of paths from root ECInstance to target ECInstance. */\r\n instancePaths: InstanceKey[][];\r\n\r\n /**\r\n * An optional index (`0 <= markedIndex < instancePaths.length`) to mark one of the instance paths. The\r\n * path is marked using `NodePathElement.isMarked` flag in the result.\r\n */\r\n markedIndex?: number;\r\n}\r\n\r\n/**\r\n * Request type of filtering hierarchies by given text.\r\n * @public\r\n */\r\nexport interface FilterByTextHierarchyRequestOptions<TIModel, TRulesetVariable = RulesetVariable> extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n /** Text to filter the hierarchy by. */\r\n filterText: string;\r\n}\r\n\r\n/**\r\n * Request type for content sources requests.\r\n * @public\r\n */\r\nexport interface ContentSourcesRequestOptions<TIModel> extends RequestOptions<TIModel> {\r\n /** Full names of classes to get content sources for. Format for a full class name: `SchemaName:ClassName`. */\r\n classes: string[];\r\n}\r\n\r\n/**\r\n * Request type for content descriptor requests.\r\n * @public\r\n */\r\nexport interface ContentDescriptorRequestOptions<TIModel, TKeySet, TRulesetVariable = RulesetVariable>\r\n extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n /**\r\n * Content display type.\r\n * @see [[DefaultContentDisplayTypes]]\r\n */\r\n displayType: string;\r\n /**\r\n * Content flags used for content customization.\r\n * @see [[ContentFlags]]\r\n */\r\n contentFlags?: number;\r\n /** Input keys for getting the content */\r\n keys: TKeySet;\r\n /** Information about the selection event that was the cause of this content request */\r\n selection?: SelectionInfo;\r\n}\r\n\r\n/**\r\n * Request type for content requests.\r\n * @public\r\n */\r\nexport interface ContentRequestOptions<TIModel, TDescriptor, TKeySet, TRulesetVariable = RulesetVariable>\r\n extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n /** Content descriptor for customizing the returned content */\r\n descriptor: TDescriptor;\r\n /** Input keys for getting the content */\r\n keys: TKeySet;\r\n /**\r\n * Flag that specifies whether value formatting should be omitted or not.\r\n * Content is returned without `displayValues` when this is set to `true`.\r\n */\r\n omitFormattedValues?: boolean;\r\n}\r\n\r\n/**\r\n * Request type for distinct values' requests.\r\n * @public\r\n */\r\nexport interface DistinctValuesRequestOptions<TIModel, TDescriptor, TKeySet, TRulesetVariable = RulesetVariable>\r\n extends Paged<RequestOptionsWithRuleset<TIModel, TRulesetVariable>> {\r\n /** Content descriptor for customizing the returned content */\r\n descriptor: TDescriptor;\r\n /** Input keys for getting the content */\r\n keys: TKeySet;\r\n /** Descriptor for a field distinct values are requested for */\r\n fieldDescriptor: FieldDescriptor;\r\n}\r\n\r\n/**\r\n * Request type for element properties requests\r\n * @public\r\n * @deprecated in 4.x. Use [[SingleElementPropertiesRequestOptions]] or [[MultiElementPropertiesRequestOptions]] directly.\r\n */\r\nexport type ElementPropertiesRequestOptions<TIModel, TParsedContent = ElementProperties> =\r\n | SingleElementPropertiesRequestOptions<TIModel>\r\n | MultiElementPropertiesRequestOptions<TIModel, TParsedContent>;\r\n\r\n/**\r\n * Request type for single element properties requests.\r\n * @public\r\n */\r\nexport interface SingleElementPropertiesRequestOptions<TIModel, TParsedContent = ElementProperties> extends RequestOptions<TIModel> {\r\n /** ID of the element to get properties for. */\r\n elementId: Id64String;\r\n\r\n /**\r\n * Content parser that creates a result item based on given content descriptor and content item. Defaults\r\n * to a parser that creates [[ElementProperties]] objects.\r\n */\r\n contentParser?: (descriptor: Descriptor, item: Item) => TParsedContent;\r\n}\r\n\r\n/**\r\n * Base request type for multiple elements properties requests.\r\n * @public\r\n */\r\nexport interface MultiElementPropertiesBaseRequestOptions<TIModel, TParsedContent = ElementProperties> extends RequestOptions<TIModel> {\r\n /**\r\n * Content parser that creates a result item based on given content descriptor and content item. Defaults\r\n * to a parser that creates [[ElementProperties]] objects.\r\n */\r\n contentParser?: (descriptor: Descriptor, item: Item) => TParsedContent;\r\n\r\n /**\r\n * The properties of multiple elements are going to be retrieved and returned in batches. Depending on the batch\r\n * size load on CPU vs MEMORY load may vary, so changing this attribute allows to fine tune the performance.\r\n * Defaults to `1000`.\r\n */\r\n batchSize?: number;\r\n}\r\n/**\r\n * Request type for multiple elements properties requests, where elements are specified by class.\r\n * @public\r\n */\r\nexport interface MultiElementPropertiesByClassRequestOptions<TIModel, TParsedContent = ElementProperties>\r\n extends MultiElementPropertiesBaseRequestOptions<TIModel, TParsedContent> {\r\n /**\r\n * Classes of the elements to get properties for. If [[elementClasses]] is `undefined`, all classes\r\n * are used. Classes should be specified in one of these formats: \"<schema name or alias>.<class_name>\" or\r\n * \"<schema name or alias>:<class_name>\".\r\n */\r\n elementClasses?: string[];\r\n}\r\n/**\r\n * Request type for multiple elements properties requests, where elements are specified by element id.\r\n * @public\r\n */\r\nexport interface MultiElementPropertiesByIdsRequestOptions<TIModel, TParsedContent = ElementProperties>\r\n extends MultiElementPropertiesBaseRequestOptions<TIModel, TParsedContent> {\r\n /**\r\n * A list of `bis.Element` IDs to get properties for.\r\n */\r\n elementIds?: Id64String[];\r\n}\r\n/**\r\n * Request type for multiple elements properties requests.\r\n * @public\r\n */\r\nexport type MultiElementPropertiesRequestOptions<TIModel, TParsedContent = ElementProperties> =\r\n | MultiElementPropertiesByClassRequestOptions<TIModel, TParsedContent>\r\n | MultiElementPropertiesByIdsRequestOptions<TIModel, TParsedContent>;\r\n\r\n/**\r\n * Request type for content instance keys' requests.\r\n * @public\r\n */\r\nexport interface ContentInstanceKeysRequestOptions<TIModel, TKeySet, TRulesetVariable = RulesetVariable>\r\n extends Paged<RequestOptionsWithRuleset<TIModel, TRulesetVariable>> {\r\n /**\r\n * Content display type.\r\n * @see [[DefaultContentDisplayTypes]]\r\n */\r\n displayType?: string;\r\n /** Input keys for getting the content. */\r\n keys: TKeySet;\r\n}\r\n\r\n/**\r\n * Request type for label requests\r\n * @public\r\n */\r\nexport interface DisplayLabelRequestOptions<TIModel, TInstanceKey> extends RequestOptions<TIModel> {\r\n /** Key of ECInstance to get label for */\r\n key: TInstanceKey;\r\n}\r\n\r\n/**\r\n * Request type for labels requests\r\n * @public\r\n */\r\nexport interface DisplayLabelsRequestOptions<TIModel, TInstanceKey> extends RequestOptions<TIModel> {\r\n /** Keys of ECInstances to get labels for */\r\n keys: TInstanceKey[];\r\n}\r\n\r\n/**\r\n * Request options used for selection scope related requests\r\n * @public\r\n * @deprecated in 5.0. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\r\n */\r\nexport interface SelectionScopeRequestOptions<TIModel> extends RequestOptions<TIModel> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * Request options used for calculating selection based on given instance keys and selection scope.\r\n * @public\r\n * @deprecated in 5.0. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\r\n */\r\nexport interface ComputeSelectionRequestOptions<TIModel> extends RequestOptions<TIModel> {\r\n elementIds: Id64String[];\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n scope: SelectionScopeProps;\r\n}\r\n\r\n/**\r\n * Data structure for comparing a hierarchy after ruleset or ruleset variable changes.\r\n * @public\r\n */\r\nexport interface HierarchyCompareOptions<TIModel, TNodeKey, TRulesetVariable = RulesetVariable> extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n prev: {\r\n rulesetOrId?: Ruleset | string;\r\n rulesetVariables?: TRulesetVariable[];\r\n };\r\n expandedNodeKeys?: TNodeKey[];\r\n continuationToken?: {\r\n prevHierarchyNode: string;\r\n currHierarchyNode: string;\r\n };\r\n resultSetSize?: number;\r\n}\r\n\r\n/**\r\n * Paging options\r\n * @public\r\n */\r\nexport interface PageOptions {\r\n /** Inclusive start 0-based index of the page */\r\n start?: number;\r\n /** Maximum size of the page */\r\n size?: number;\r\n}\r\n\r\n/**\r\n * A wrapper type that injects [[PageOptions]] into supplied type\r\n * @public\r\n */\r\nexport type Paged<TOptions extends object> = TOptions & {\r\n /** Optional paging parameters */\r\n paging?: PageOptions;\r\n};\r\n\r\n/**\r\n * A wrapper type that injects priority into supplied type.\r\n * @public\r\n */\r\nexport type Prioritized<TOptions extends object> = TOptions & {\r\n /** Optional priority */\r\n priority?: number;\r\n};\r\n\r\n/**\r\n * Checks if supplied request options are for single or multiple element properties.\r\n * @internal\r\n */\r\nexport function isSingleElementPropertiesRequestOptions<TIModel, TParsedContent = any>(\r\n options: SingleElementPropertiesRequestOptions<TIModel> | MultiElementPropertiesRequestOptions<TIModel, TParsedContent>,\r\n): options is SingleElementPropertiesRequestOptions<TIModel> {\r\n return (options as SingleElementPropertiesRequestOptions<TIModel>).elementId !== undefined;\r\n}\r\n\r\n/**\r\n * A wrapper type that injects cancelEvent into supplied type.\r\n * @public\r\n */\r\nexport type WithCancelEvent<TOptions extends object> = TOptions & {\r\n /** Event which is triggered when the request is canceled */\r\n cancelEvent?: BeEvent<() => void>;\r\n};\r\n"]}
@@ -5,20 +5,20 @@ import { Id64String } from "@itwin/core-bentley";
5
5
  import { IModelRpcProps, RpcInterface } from "@itwin/core-common";
6
6
  import { DescriptorJSON, DescriptorOverrides, SelectClassInfoJSON } from "./content/Descriptor";
7
7
  import { ItemJSON } from "./content/Item";
8
- import { DisplayValueGroupJSON } from "./content/Value";
9
8
  import { ClientDiagnostics, ClientDiagnosticsOptions } from "./Diagnostics";
10
9
  import { CompressedClassInfoJSON, InstanceKey } from "./EC";
11
10
  import { ElementProperties } from "./ElementProperties";
12
11
  import { PresentationStatus } from "./Error";
13
12
  import { NodeKey } from "./hierarchy/Key";
14
- import { NodeJSON } from "./hierarchy/Node";
15
- import { NodePathElementJSON } from "./hierarchy/NodePathElement";
13
+ import { Node } from "./hierarchy/Node";
16
14
  import { KeySetJSON } from "./KeySet";
17
15
  import { LabelDefinition } from "./LabelDefinition";
18
16
  import { ComputeSelectionRequestOptions, ContentDescriptorRequestOptions, ContentInstanceKeysRequestOptions, ContentRequestOptions, ContentSourcesRequestOptions, DisplayLabelRequestOptions, DisplayLabelsRequestOptions, DistinctValuesRequestOptions, FilterByInstancePathsHierarchyRequestOptions, FilterByTextHierarchyRequestOptions, HierarchyLevelDescriptorRequestOptions, HierarchyRequestOptions, Paged, SelectionScopeRequestOptions, SingleElementPropertiesRequestOptions } from "./PresentationManagerOptions";
19
17
  import { RulesetVariableJSON } from "./RulesetVariables";
20
18
  import { SelectionScope } from "./selection/SelectionScope";
21
19
  import { Omit, PagedResponse } from "./Utils";
20
+ import { NodePathElement } from "./hierarchy/NodePathElement";
21
+ import { DisplayValueGroup } from "./content/Value";
22
22
  /**
23
23
  * Base options for all presentation RPC requests.
24
24
  * @public
@@ -128,11 +128,13 @@ export type DisplayLabelsRpcRequestOptions = PresentationRpcRequestOptions<Displ
128
128
  /**
129
129
  * Data structure for selection scope request options.
130
130
  * @public
131
+ * @deprecated in 5.0. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
131
132
  */
132
133
  export type SelectionScopeRpcRequestOptions = PresentationRpcRequestOptions<SelectionScopeRequestOptions<never>>;
133
134
  /**
134
135
  * Request options data structure for computing selection based on given selection scope and element IDs.
135
136
  * @public
137
+ * @deprecated in 5.0. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
136
138
  */
137
139
  export type ComputeSelectionRpcRequestOptions = PresentationRpcRequestOptions<ComputeSelectionRequestOptions<never>>;
138
140
  /**
@@ -147,13 +149,13 @@ export declare class PresentationRpcInterface extends RpcInterface {
147
149
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
148
150
  getNodesCount(_token: IModelRpcProps, _options: HierarchyRpcRequestOptions): PresentationRpcResponse<number>;
149
151
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
150
- getPagedNodes(_token: IModelRpcProps, _options: Paged<HierarchyRpcRequestOptions>): PresentationRpcResponse<PagedResponse<NodeJSON>>;
152
+ getPagedNodes(_token: IModelRpcProps, _options: Paged<HierarchyRpcRequestOptions>): PresentationRpcResponse<PagedResponse<Node>>;
151
153
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
152
154
  getNodesDescriptor(_token: IModelRpcProps, _options: HierarchyLevelDescriptorRpcRequestOptions): PresentationRpcResponse<string | DescriptorJSON | undefined>;
153
155
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
154
- getNodePaths(_token: IModelRpcProps, _options: FilterByInstancePathsHierarchyRpcRequestOptions): PresentationRpcResponse<NodePathElementJSON[]>;
156
+ getNodePaths(_token: IModelRpcProps, _options: FilterByInstancePathsHierarchyRpcRequestOptions): PresentationRpcResponse<NodePathElement[]>;
155
157
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
156
- getFilteredNodePaths(_token: IModelRpcProps, _options: FilterByTextHierarchyRpcRequestOptions): PresentationRpcResponse<NodePathElementJSON[]>;
158
+ getFilteredNodePaths(_token: IModelRpcProps, _options: FilterByTextHierarchyRpcRequestOptions): PresentationRpcResponse<NodePathElement[]>;
157
159
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
158
160
  getContentSources(_token: IModelRpcProps, _options: ContentSourcesRpcRequestOptions): PresentationRpcResponse<ContentSourcesRpcResult>;
159
161
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
@@ -170,7 +172,7 @@ export declare class PresentationRpcInterface extends RpcInterface {
170
172
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
171
173
  getElementProperties(_token: IModelRpcProps, _options: SingleElementPropertiesRpcRequestOptions): PresentationRpcResponse<ElementProperties | undefined>;
172
174
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
173
- getPagedDistinctValues(_token: IModelRpcProps, _options: DistinctValuesRpcRequestOptions): PresentationRpcResponse<PagedResponse<DisplayValueGroupJSON>>;
175
+ getPagedDistinctValues(_token: IModelRpcProps, _options: DistinctValuesRpcRequestOptions): PresentationRpcResponse<PagedResponse<DisplayValueGroup>>;
174
176
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
175
177
  getContentInstanceKeys(_token: IModelRpcProps, _options: ContentInstanceKeysRpcRequestOptions): PresentationRpcResponse<{
176
178
  total: number;
@@ -182,8 +184,6 @@ export declare class PresentationRpcInterface extends RpcInterface {
182
184
  getPagedDisplayLabelDefinitions(_token: IModelRpcProps, _options: DisplayLabelsRpcRequestOptions): PresentationRpcResponse<PagedResponse<LabelDefinition>>;
183
185
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
184
186
  getSelectionScopes(_token: IModelRpcProps, _options: SelectionScopeRpcRequestOptions): PresentationRpcResponse<SelectionScope[]>;
185
- /** @deprecated in 3.x. Use the override with [[ComputeSelectionRpcRequestOptions]]. */
186
- computeSelection(_token: IModelRpcProps, _options: SelectionScopeRpcRequestOptions, _ids: Id64String[], _scopeId: string): PresentationRpcResponse<KeySetJSON>;
187
187
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
188
188
  computeSelection(_token: IModelRpcProps, _options: ComputeSelectionRpcRequestOptions): PresentationRpcResponse<KeySetJSON>;
189
189
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PresentationRpcInterface.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/PresentationRpcInterface.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChG,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,8BAA8B,EAC9B,+BAA+B,EAC/B,iCAAiC,EACjC,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,CAAC,GAAG,uBAAuB,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAIpJ,4HAA4H;IAC/G,oBAAoB,CAC/B,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,wCAAwC,GACjD,uBAAuB,CAAC,iBAAiB,GAAG,SAAS,CAAC;IAIzD,4HAA4H;IAC/G,sBAAsB,CACjC,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,+BAA+B,GACxC,uBAAuB,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAI5D,4HAA4H;IAC/G,sBAAsB,CACjC,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,oCAAoC,GAC7C,uBAAuB,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,UAAU,CAAA;KAAE,CAAC;IAIhE,4HAA4H;IAC/G,yBAAyB,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,6BAA6B,GAAG,uBAAuB,CAAC,eAAe,CAAC;IAIjJ,4HAA4H;IAC/G,+BAA+B,CAC1C,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,8BAA8B,GACvC,uBAAuB,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IAI1D,4HAA4H;IAE/G,kBAAkB,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,+BAA+B,GAAG,uBAAuB,CAAC,cAAc,EAAE,CAAC;IAI7I,4HAA4H;IAE/G,gBAAgB,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,iCAAiC,GAAG,uBAAuB,CAAC,UAAU,CAAC;CAGxI;AAED,gBAAgB;AAChB,oBAAY,qBAAqB;IAC/B;;OAEG;IACH,MAAM,0BAA0B;CACjC"}
@@ -6,15 +6,26 @@
6
6
  /** @packageDocumentation
7
7
  * @module RPC
8
8
  */
9
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
10
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
11
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
12
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
14
+ };
9
15
  Object.defineProperty(exports, "__esModule", { value: true });
10
16
  exports.PresentationIpcEvents = exports.PresentationRpcInterface = void 0;
11
17
  const core_common_1 = require("@itwin/core-common");
12
18
  const Error_1 = require("./Error");
19
+ const Utils_1 = require("./Utils");
13
20
  /**
14
21
  * Interface used for communication between Presentation backend and frontend.
15
22
  * @public
16
23
  */
17
- class PresentationRpcInterface extends core_common_1.RpcInterface {
24
+ let PresentationRpcInterface = class PresentationRpcInterface extends core_common_1.RpcInterface {
25
+ /** The immutable name of the interface. */
26
+ static interfaceName = "PresentationRpcInterface";
27
+ /** The semantic version of the interface. */
28
+ static interfaceVersion = "5.0.0";
18
29
  /*===========================================================================================
19
30
  NOTE: Any add/remove/change to the methods below requires an update of the interface version.
20
31
  NOTE: Please consult the README in core/common/src/rpc for the semantic versioning rules.
@@ -24,29 +35,26 @@ class PresentationRpcInterface extends core_common_1.RpcInterface {
24
35
  return this.forward(arguments);
25
36
  }
26
37
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
27
- // eslint-disable-next-line @typescript-eslint/no-deprecated
28
38
  async getPagedNodes(_token, _options) {
29
- return this.forward(arguments);
39
+ return (0, Utils_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
30
40
  }
31
41
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
32
42
  async getNodesDescriptor(_token, _options) {
33
- return this.forward(arguments);
43
+ return (0, Utils_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
34
44
  }
35
45
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
36
46
  // TODO: add paged version of this (#387280)
37
- // eslint-disable-next-line @typescript-eslint/no-deprecated
38
47
  async getNodePaths(_token, _options) {
39
- return this.forward(arguments);
48
+ return (0, Utils_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
40
49
  }
41
50
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
42
51
  // TODO: add paged version of this (#387280)
43
- // eslint-disable-next-line @typescript-eslint/no-deprecated
44
52
  async getFilteredNodePaths(_token, _options) {
45
- return this.forward(arguments);
53
+ return (0, Utils_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
46
54
  }
47
55
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
48
56
  async getContentSources(_token, _options) {
49
- return this.forward(arguments);
57
+ return (0, Utils_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
50
58
  }
51
59
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
52
60
  async getContentDescriptor(_token, _options) {
@@ -63,19 +71,25 @@ class PresentationRpcInterface extends core_common_1.RpcInterface {
63
71
  }
64
72
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
65
73
  async getPagedContent(_token, _options) {
66
- return this.forward(arguments);
74
+ const rpcResponse = await this.forward(arguments);
75
+ return {
76
+ ...rpcResponse,
77
+ ...(rpcResponse.result
78
+ ? /* istanbul ignore next */ { result: { ...rpcResponse.result, contentSet: (0, Utils_1.deepReplaceNullsToUndefined)(rpcResponse.result.contentSet) } }
79
+ : {}),
80
+ };
67
81
  }
68
82
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
69
83
  async getPagedContentSet(_token, _options) {
70
- return this.forward(arguments);
84
+ return (0, Utils_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
71
85
  }
72
86
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
73
87
  async getElementProperties(_token, _options) {
74
- return this.forward(arguments);
88
+ return (0, Utils_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
75
89
  }
76
90
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
77
91
  async getPagedDistinctValues(_token, _options) {
78
- return this.forward(arguments);
92
+ return (0, Utils_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
79
93
  }
80
94
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
81
95
  async getContentInstanceKeys(_token, _options) {
@@ -83,26 +97,27 @@ class PresentationRpcInterface extends core_common_1.RpcInterface {
83
97
  }
84
98
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
85
99
  async getDisplayLabelDefinition(_token, _options) {
86
- return this.forward(arguments);
100
+ return (0, Utils_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
87
101
  }
88
102
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
89
103
  async getPagedDisplayLabelDefinitions(_token, _options) {
90
- return this.forward(arguments);
104
+ return (0, Utils_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
91
105
  }
92
106
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
107
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
93
108
  async getSelectionScopes(_token, _options) {
94
109
  return this.forward(arguments);
95
110
  }
96
111
  /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
97
- async computeSelection(_token, _options, _ids, _scopeId) {
112
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
113
+ async computeSelection(_token, _options) {
98
114
  return this.forward(arguments);
99
115
  }
100
- }
116
+ };
101
117
  exports.PresentationRpcInterface = PresentationRpcInterface;
102
- /** The immutable name of the interface. */
103
- PresentationRpcInterface.interfaceName = "PresentationRpcInterface";
104
- /** The semantic version of the interface. */
105
- PresentationRpcInterface.interfaceVersion = "4.1.0";
118
+ exports.PresentationRpcInterface = PresentationRpcInterface = __decorate([
119
+ core_common_1.RpcOperation.setDefaultPolicy({ retryInterval: () => 0 })
120
+ ], PresentationRpcInterface);
106
121
  /** @internal */
107
122
  var PresentationIpcEvents;
108
123
  (function (PresentationIpcEvents) {