@itwin/presentation-common 3.2.0-dev.9 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (303) hide show
  1. package/CHANGELOG.md +36 -1
  2. package/Ruleset.schema.json +304 -289
  3. package/lib/cjs/presentation-common/CommonLoggerCategory.d.ts +13 -0
  4. package/lib/cjs/presentation-common/CommonLoggerCategory.d.ts.map +1 -0
  5. package/lib/cjs/presentation-common/CommonLoggerCategory.js +21 -0
  6. package/lib/cjs/presentation-common/CommonLoggerCategory.js.map +1 -0
  7. package/lib/cjs/presentation-common/EC.d.ts +36 -0
  8. package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
  9. package/lib/cjs/presentation-common/EC.js +38 -4
  10. package/lib/cjs/presentation-common/EC.js.map +1 -1
  11. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  12. package/lib/cjs/presentation-common/RpcRequestsHandler.js +26 -0
  13. package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
  14. package/lib/cjs/presentation-common/Utils.d.ts +0 -2
  15. package/lib/cjs/presentation-common/Utils.d.ts.map +1 -1
  16. package/lib/cjs/presentation-common/Utils.js +1 -25
  17. package/lib/cjs/presentation-common/Utils.js.map +1 -1
  18. package/lib/cjs/presentation-common/content/Descriptor.d.ts +6 -6
  19. package/lib/cjs/presentation-common/content/Descriptor.js +1 -1
  20. package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
  21. package/lib/cjs/presentation-common/content/Fields.d.ts +3 -3
  22. package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
  23. package/lib/cjs/presentation-common/content/Fields.js +11 -3
  24. package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
  25. package/lib/cjs/presentation-common/content/Item.d.ts +3 -3
  26. package/lib/cjs/presentation-common/content/Item.js +1 -1
  27. package/lib/cjs/presentation-common/content/Item.js.map +1 -1
  28. package/lib/cjs/presentation-common/hierarchy/Node.d.ts +7 -7
  29. package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
  30. package/lib/cjs/presentation-common/rules/ClassSpecifications.d.ts +10 -8
  31. package/lib/cjs/presentation-common/rules/ClassSpecifications.d.ts.map +1 -1
  32. package/lib/cjs/presentation-common/rules/ClassSpecifications.js.map +1 -1
  33. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.d.ts +10 -62
  34. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.d.ts.map +1 -1
  35. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
  36. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts +20 -13
  37. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts.map +1 -1
  38. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  39. package/lib/cjs/presentation-common/rules/Rule.d.ts +11 -12
  40. package/lib/cjs/presentation-common/rules/Rule.d.ts.map +1 -1
  41. package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
  42. package/lib/cjs/presentation-common/rules/Ruleset.d.ts +6 -5
  43. package/lib/cjs/presentation-common/rules/Ruleset.d.ts.map +1 -1
  44. package/lib/cjs/presentation-common/rules/Ruleset.js.map +1 -1
  45. package/lib/cjs/presentation-common/rules/SchemasSpecification.d.ts +5 -2
  46. package/lib/cjs/presentation-common/rules/SchemasSpecification.d.ts.map +1 -1
  47. package/lib/cjs/presentation-common/rules/SchemasSpecification.js.map +1 -1
  48. package/lib/cjs/presentation-common/rules/Variables.d.ts +3 -3
  49. package/lib/cjs/presentation-common/rules/Variables.js.map +1 -1
  50. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +12 -14
  51. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts.map +1 -1
  52. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  53. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +6 -8
  54. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts.map +1 -1
  55. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  56. package/lib/cjs/presentation-common/rules/content/ContentRule.d.ts +15 -10
  57. package/lib/cjs/presentation-common/rules/content/ContentRule.d.ts.map +1 -1
  58. package/lib/cjs/presentation-common/rules/content/ContentRule.js.map +1 -1
  59. package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts +9 -6
  60. package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
  61. package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  62. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +3 -4
  63. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts.map +1 -1
  64. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  65. package/lib/cjs/presentation-common/rules/content/PropertySpecification.d.ts +56 -21
  66. package/lib/cjs/presentation-common/rules/content/PropertySpecification.d.ts.map +1 -1
  67. package/lib/cjs/presentation-common/rules/content/PropertySpecification.js.map +1 -1
  68. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +5 -10
  69. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts.map +1 -1
  70. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  71. package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts +7 -10
  72. package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts.map +1 -1
  73. package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
  74. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.d.ts +22 -12
  75. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.d.ts.map +1 -1
  76. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  77. package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.d.ts +8 -2
  78. package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.d.ts.map +1 -1
  79. package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
  80. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts +30 -10
  81. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts.map +1 -1
  82. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
  83. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +9 -4
  84. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts.map +1 -1
  85. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  86. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +25 -21
  87. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts.map +1 -1
  88. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js +5 -7
  89. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  90. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts +8 -11
  91. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts.map +1 -1
  92. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
  93. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts +1 -1
  94. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  95. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.d.ts +9 -24
  96. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.d.ts.map +1 -1
  97. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  98. package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts +55 -72
  99. package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
  100. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js +1 -1
  101. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  102. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts +9 -10
  103. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts.map +1 -1
  104. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
  105. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts +33 -22
  106. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
  107. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js +1 -1
  108. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  109. package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts +13 -16
  110. package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts.map +1 -1
  111. package/lib/cjs/presentation-common/rules/customization/LabelOverride.js.map +1 -1
  112. package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts +16 -29
  113. package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts.map +1 -1
  114. package/lib/cjs/presentation-common/rules/customization/SortingRule.js.map +1 -1
  115. package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts +11 -12
  116. package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts.map +1 -1
  117. package/lib/cjs/presentation-common/rules/customization/StyleOverride.js.map +1 -1
  118. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +4 -5
  119. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.d.ts.map +1 -1
  120. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  121. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +30 -32
  122. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
  123. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  124. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +11 -6
  125. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
  126. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  127. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +19 -20
  128. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts.map +1 -1
  129. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  130. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +14 -10
  131. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
  132. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  133. package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.d.ts +16 -15
  134. package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.d.ts.map +1 -1
  135. package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
  136. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +9 -28
  137. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts.map +1 -1
  138. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  139. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +8 -9
  140. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts.map +1 -1
  141. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  142. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.d.ts +3 -4
  143. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.d.ts.map +1 -1
  144. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  145. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.d.ts +17 -10
  146. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.d.ts.map +1 -1
  147. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  148. package/lib/cjs/presentation-common/selection/SelectionScope.d.ts +1 -1
  149. package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
  150. package/lib/cjs/presentation-common.d.ts +3 -3
  151. package/lib/cjs/presentation-common.js +3 -3
  152. package/lib/cjs/presentation-common.js.map +1 -1
  153. package/lib/esm/presentation-common/CommonLoggerCategory.d.ts +13 -0
  154. package/lib/esm/presentation-common/CommonLoggerCategory.d.ts.map +1 -0
  155. package/lib/esm/presentation-common/CommonLoggerCategory.js +18 -0
  156. package/lib/esm/presentation-common/CommonLoggerCategory.js.map +1 -0
  157. package/lib/esm/presentation-common/EC.d.ts +36 -0
  158. package/lib/esm/presentation-common/EC.d.ts.map +1 -1
  159. package/lib/esm/presentation-common/EC.js +37 -3
  160. package/lib/esm/presentation-common/EC.js.map +1 -1
  161. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  162. package/lib/esm/presentation-common/RpcRequestsHandler.js +27 -1
  163. package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
  164. package/lib/esm/presentation-common/Utils.d.ts +0 -2
  165. package/lib/esm/presentation-common/Utils.d.ts.map +1 -1
  166. package/lib/esm/presentation-common/Utils.js +0 -4
  167. package/lib/esm/presentation-common/Utils.js.map +1 -1
  168. package/lib/esm/presentation-common/content/Descriptor.d.ts +6 -6
  169. package/lib/esm/presentation-common/content/Descriptor.js +1 -1
  170. package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
  171. package/lib/esm/presentation-common/content/Fields.d.ts +3 -3
  172. package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
  173. package/lib/esm/presentation-common/content/Fields.js +11 -3
  174. package/lib/esm/presentation-common/content/Fields.js.map +1 -1
  175. package/lib/esm/presentation-common/content/Item.d.ts +3 -3
  176. package/lib/esm/presentation-common/content/Item.js +1 -1
  177. package/lib/esm/presentation-common/content/Item.js.map +1 -1
  178. package/lib/esm/presentation-common/hierarchy/Node.d.ts +7 -7
  179. package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
  180. package/lib/esm/presentation-common/rules/ClassSpecifications.d.ts +10 -8
  181. package/lib/esm/presentation-common/rules/ClassSpecifications.d.ts.map +1 -1
  182. package/lib/esm/presentation-common/rules/ClassSpecifications.js.map +1 -1
  183. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.d.ts +10 -62
  184. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.d.ts.map +1 -1
  185. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
  186. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts +20 -13
  187. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts.map +1 -1
  188. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  189. package/lib/esm/presentation-common/rules/Rule.d.ts +11 -12
  190. package/lib/esm/presentation-common/rules/Rule.d.ts.map +1 -1
  191. package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
  192. package/lib/esm/presentation-common/rules/Ruleset.d.ts +6 -5
  193. package/lib/esm/presentation-common/rules/Ruleset.d.ts.map +1 -1
  194. package/lib/esm/presentation-common/rules/Ruleset.js.map +1 -1
  195. package/lib/esm/presentation-common/rules/SchemasSpecification.d.ts +5 -2
  196. package/lib/esm/presentation-common/rules/SchemasSpecification.d.ts.map +1 -1
  197. package/lib/esm/presentation-common/rules/SchemasSpecification.js.map +1 -1
  198. package/lib/esm/presentation-common/rules/Variables.d.ts +3 -3
  199. package/lib/esm/presentation-common/rules/Variables.js.map +1 -1
  200. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +12 -14
  201. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts.map +1 -1
  202. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  203. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +6 -8
  204. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts.map +1 -1
  205. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  206. package/lib/esm/presentation-common/rules/content/ContentRule.d.ts +15 -10
  207. package/lib/esm/presentation-common/rules/content/ContentRule.d.ts.map +1 -1
  208. package/lib/esm/presentation-common/rules/content/ContentRule.js.map +1 -1
  209. package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts +9 -6
  210. package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
  211. package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  212. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +3 -4
  213. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts.map +1 -1
  214. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  215. package/lib/esm/presentation-common/rules/content/PropertySpecification.d.ts +56 -21
  216. package/lib/esm/presentation-common/rules/content/PropertySpecification.d.ts.map +1 -1
  217. package/lib/esm/presentation-common/rules/content/PropertySpecification.js.map +1 -1
  218. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +5 -10
  219. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts.map +1 -1
  220. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  221. package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts +7 -10
  222. package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts.map +1 -1
  223. package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
  224. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.d.ts +22 -12
  225. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.d.ts.map +1 -1
  226. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  227. package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.d.ts +8 -2
  228. package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.d.ts.map +1 -1
  229. package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
  230. package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts +30 -10
  231. package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts.map +1 -1
  232. package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
  233. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +9 -4
  234. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts.map +1 -1
  235. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  236. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +25 -21
  237. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts.map +1 -1
  238. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js +5 -7
  239. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  240. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts +8 -11
  241. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts.map +1 -1
  242. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
  243. package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts +1 -1
  244. package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  245. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.d.ts +9 -24
  246. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.d.ts.map +1 -1
  247. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  248. package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts +55 -72
  249. package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
  250. package/lib/esm/presentation-common/rules/customization/GroupingRule.js +1 -1
  251. package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  252. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts +9 -10
  253. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts.map +1 -1
  254. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
  255. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts +33 -22
  256. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
  257. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js +1 -1
  258. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  259. package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts +13 -16
  260. package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts.map +1 -1
  261. package/lib/esm/presentation-common/rules/customization/LabelOverride.js.map +1 -1
  262. package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts +16 -29
  263. package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts.map +1 -1
  264. package/lib/esm/presentation-common/rules/customization/SortingRule.js.map +1 -1
  265. package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts +11 -12
  266. package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts.map +1 -1
  267. package/lib/esm/presentation-common/rules/customization/StyleOverride.js.map +1 -1
  268. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +4 -5
  269. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.d.ts.map +1 -1
  270. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  271. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +30 -32
  272. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
  273. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  274. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +11 -6
  275. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
  276. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  277. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +19 -20
  278. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts.map +1 -1
  279. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  280. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +14 -10
  281. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
  282. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  283. package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.d.ts +16 -15
  284. package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.d.ts.map +1 -1
  285. package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
  286. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +9 -28
  287. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts.map +1 -1
  288. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  289. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +8 -9
  290. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts.map +1 -1
  291. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  292. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.d.ts +3 -4
  293. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.d.ts.map +1 -1
  294. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  295. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.d.ts +17 -10
  296. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.d.ts.map +1 -1
  297. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  298. package/lib/esm/presentation-common/selection/SelectionScope.d.ts +1 -1
  299. package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
  300. package/lib/esm/presentation-common.d.ts +3 -3
  301. package/lib/esm/presentation-common.js +3 -3
  302. package/lib/esm/presentation-common.js.map +1 -1
  303. package/package.json +9 -10
@@ -2,50 +2,37 @@
2
2
  * @module PresentationRules
3
3
  */
4
4
  import { SingleSchemaClassSpecification } from "../ClassSpecifications";
5
- import { ConditionContainer, RuleBase, RuleTypes } from "../Rule";
5
+ import { RuleBase, RuleTypes } from "../Rule";
6
6
  /**
7
- * Grouping rule is an advanced way to configure node grouping.
7
+ * Grouping rules provide advanced ways to group instances when creating hierarchies.
8
8
  *
9
- * It allows to define these types of groupings:
10
- * - Group by base class.
11
- * - Group by any property of the instance by a common value or a range of values.
12
- * - Group multiple instances with the same label in to one ECInstance node. This can be used in cases when these
13
- * instances represent the same object for the user.
14
- *
15
- * The rule works in conjunction with other grouping options available in navigation specifications [[ChildNodeSpecification]]:
16
- * `groupByClass` and `groupByLabel`. The grouping hierarchy looks like this:
17
- * - Base ECClass grouping node (specified by base class grouping specification [[ClassGroup]])
18
- * - ECClass grouping node (specified by `groupByClass` property)
19
- * - ECProperty grouping node 1 (specified by 1st [[PropertyGroup]])
20
- * - ECProperty grouping node 2 (specified by 2nd [[PropertyGroup]])
21
- * - ECProperty grouping node n (specified by n-th [[PropertyGroup]])
22
- * - Display label grouping node (specified by `groupByLabel` property)
23
- * - ECInstance nodes (may be grouped under a single node by [[SameLabelInstanceGroup]])
24
- *
25
- * @see [More details]($docs/presentation/Hierarchies/GroupingRule.md)
9
+ * @see [Grouping rule reference documentation page]($docs/presentation/hierarchies/GroupingRule.md)
26
10
  * @public
27
11
  */
28
- export interface GroupingRule extends RuleBase, ConditionContainer {
12
+ export interface GroupingRule extends RuleBase {
29
13
  /** Used for serializing to JSON. */
30
14
  ruleType: RuleTypes.Grouping;
31
15
  /**
32
- * Defines a condition for the rule, which needs to be met in order to execute it. Condition
33
- * is an [ECExpression]($docs/presentation/Advanced/ECExpressions.md), which can use
34
- * a [limited set of symbols]($docs/presentation/Hierarchies/ECExpressions.md#rule-condition).
16
+ * An [ECExpression]($docs/presentation/hierarchies/ECExpressions.md#rule-condition) that results in
17
+ * a boolean value. If specified, the grouping rule applies only to instance nodes that cause the condition
18
+ * to evaluate to `true`.
35
19
  */
36
20
  condition?: string;
37
- /** Specification of ECClass which should be grouped using this rule */
21
+ /** Specification of ECClass which should be grouped using this rule. */
38
22
  class: SingleSchemaClassSpecification;
39
- /** Specifications of grouping which should be applied to matching ECInstances */
23
+ /**
24
+ * Specifies a list of [grouping specifications]($docs/presentation/hierarchies/GroupingRule.md#grouping-specifications)
25
+ * which describe the kind of grouping that should be applied.
26
+ */
40
27
  groups: GroupingSpecification[];
41
28
  }
42
29
  /**
43
- * Grouping rule specifications
30
+ * Grouping rule specifications.
44
31
  * @public
45
32
  */
46
33
  export declare type GroupingSpecification = ClassGroup | PropertyGroup | SameLabelInstanceGroup;
47
34
  /**
48
- * Available types of [[GroupingSpecification]]
35
+ * Available types of [[GroupingSpecification]].
49
36
  * @public
50
37
  */
51
38
  export declare enum GroupingSpecificationTypes {
@@ -64,33 +51,43 @@ export interface GroupingSpecificationBase {
64
51
  specType: GroupingSpecificationTypes;
65
52
  }
66
53
  /**
67
- * Allows grouping ECInstance nodes by their base class.
54
+ * Base class grouping allows grouping ECInstance nodes by their base class (as opposed to the hierarchy
55
+ * specifications' `groupByClass` attribute, which always groups by direct class).
56
+ *
57
+ * @see [Base class grouping documentation section]($docs/presentation/hierarchies/GroupingRule.md#base-class-grouping)
68
58
  * @public
69
59
  */
70
60
  export interface ClassGroup extends GroupingSpecificationBase {
71
61
  /** Used for serializing to JSON. */
72
62
  specType: GroupingSpecificationTypes.Class;
73
- /** Should the grouping node be created if there is only one item in that group. */
63
+ /** Specifies whether a grouping node should be created if there is only one item in that group. */
74
64
  createGroupForSingleItem?: boolean;
75
- /** Specification of the base ECClass to group by. Defaults to rule's class. */
65
+ /**
66
+ * Specification of the base ECClass to group by. If specified, allows grouping by a subclass of the class
67
+ * specified by rule's `class` attribute.
68
+ */
76
69
  baseClass?: SingleSchemaClassSpecification;
77
70
  }
78
71
  /**
79
- * Allows grouping multiple instances with the same label into one ECInstance node.
80
- * It can be used in cases when these instances represent the same object for the user.
81
- *
82
- * When multiple instances are grouped, an ECInstance node is created instead of a
83
- * grouping node and the ECInstance key for the node is assigned to key of one of grouped
84
- * instances.
72
+ * Allows grouping multiple instances with the same label into one ECInstances type of node. Similar to display label grouping,
73
+ * but instead of showing a grouping node with multiple grouped ECInstance nodes, it shows a single ECInstances node which represents
74
+ * multiple ECInstances.
85
75
  *
76
+ * @see [Same label instance grouping documentation section]($docs/presentation/hierarchies/GroupingRule.md#same-label-instance-grouping)
86
77
  * @public
87
78
  */
88
79
  export interface SameLabelInstanceGroup extends GroupingSpecificationBase {
89
80
  /** Used for serializing to JSON. */
90
81
  specType: GroupingSpecificationTypes.SameLabelInstance;
91
82
  /**
92
- * Stage of hierarchy creation at which the rule is applied.
93
- * Defaults to [[SameLabelInstanceGroupApplicationStage.Query]].
83
+ * Grouping nodes by label is an expensive operation because it requires the whole hierarchy level to be created before even the first
84
+ * grouped node can be produced. To alleviate the performance impact when this specification is used, two `applicationStage` settings have been introduced:
85
+ *
86
+ * - `"Query"` groups instances during ECSql query, which can often make use of database indices and is generally fairly quick. It is chosen
87
+ * as the default option, however, it fails to produce grouping nodes when certain ruleset specifications are involved.
88
+ *
89
+ * - `"PostProcess"` groups instances after the whole hierarchy level is built. It incurs a large performance penalty, but it will
90
+ * produce the expected result in all cases.
94
91
  */
95
92
  applicationStage?: SameLabelInstanceGroupApplicationStage;
96
93
  }
@@ -111,64 +108,48 @@ export declare enum SameLabelInstanceGroupApplicationStage {
111
108
  PostProcess = "PostProcess"
112
109
  }
113
110
  /**
114
- * Allows grouping by property of the instance
115
- * by a common value or by range of values.
111
+ * Property grouping allows grouping by a property of the instance by value or by given ranges of values.
116
112
  *
113
+ * @see [Property grouping documentation section]($docs/presentation/hierarchies/GroupingRule.md#property-grouping)
117
114
  * @public
118
115
  */
119
116
  export interface PropertyGroup extends GroupingSpecificationBase {
120
117
  /** Used for serializing to JSON. */
121
118
  specType: GroupingSpecificationTypes.Property;
122
119
  /**
123
- * Name of the ECProperty which is used for grouping.
120
+ * Name of the ECProperty which is used for grouping. The property must exist on the ECClass specified by the
121
+ * rule's `class` attribute and it must be of either a primitive or a navigation type.
124
122
  *
125
123
  * @minLength 1
126
124
  */
127
125
  propertyName: string;
128
126
  /**
129
- * ID of an image to use for the grouping node
127
+ * Specifies grouping node's image ID. If set, the ID is assigned to [[Node.imageId]] and
128
+ * it's up to the UI component to decide what to do with it.
130
129
  *
131
130
  * @minLength 1
132
131
  */
133
132
  imageId?: string;
134
- /** Should the grouping node be created if there is only one item in that group */
133
+ /** Specifies whether a grouping node should be created if there is only one item in that group. */
135
134
  createGroupForSingleItem?: boolean;
136
135
  /**
137
- * Should a separate grouping node be created for nodes whose grouping value is not
138
- * set or is an empty string.
139
- *
140
- * Defaults to `true`.
136
+ * Should a separate grouping node be created for nodes whose grouping value is not set or is set to an empty string.
141
137
  */
142
138
  createGroupForUnspecifiedValues?: boolean;
143
139
  /**
144
- * Should the instances be grouped on display label or the grouping property value.
145
- * Defaults to [[PropertyGroupingValue.DisplayLabel]].
146
- *
147
- * **Note:** Grouping by property value is required if the display label is
148
- * overridden to display grouped instances count.
140
+ * Specifies whether instances should be grouped using property's display or raw value.
149
141
  *
150
- * **Warning:** Grouping by label and sorting by property value is not possible.
151
- *
152
- * @deprecated Display value should always be used for grouping. In cases when there's a
153
- * need to show grouped instances count suffix, that can be achieved at the UI component
154
- * layer by composing UI node's label from node's display label and
155
- * [GroupingNodeKey.groupedInstancesCount]($presentation-common).
142
+ * @deprecated Display value should always be used for grouping.
156
143
  */
157
144
  groupingValue?: PropertyGroupingValue;
158
145
  /**
159
- * Should the nodes be sorted by display label or the grouping property value. In most
160
- * cases the result is the same, unless [[LabelOverride]] rule is used to change the display label.
161
- * Defaults to [[PropertyGroupingValue.DisplayLabel]].
162
- *
163
- * **Note:** Sorting by property value only makes sense when instances are grouped by
164
- * property value as well.
165
- *
166
- * **Warning:** Grouping by label and sorting by property value is not possible.
146
+ * Specifies whether nodes should be sorted by their display label or the grouping property's value. In most cases the result
147
+ * is the same, unless a [label override rule]($docs/presentation/customization/LabelOverride.md) is used to change node's display label.
167
148
  *
168
149
  * @deprecated Property grouping nodes should always be sorted by display label.
169
150
  */
170
151
  sortingValue?: PropertyGroupingValue;
171
- /** Ranges into which the grouping values are divided */
152
+ /** Ranges into which the grouping values are divided. Instances are grouped by value if no ranges are specified. */
172
153
  ranges?: PropertyRangeGroupSpecification[];
173
154
  }
174
155
  /**
@@ -185,7 +166,9 @@ export declare enum PropertyGroupingValue {
185
166
  DisplayLabel = "DisplayLabel"
186
167
  }
187
168
  /**
188
- * Describes a grouping range
169
+ * Describes a grouping range.
170
+ *
171
+ * @see [Property range group specification documentation section]($docs/presentation/hierarchies/GroupingRule.md#attribute-ranges)
189
172
  * @public
190
173
  */
191
174
  export interface PropertyRangeGroupSpecification {
@@ -196,20 +179,20 @@ export interface PropertyRangeGroupSpecification {
196
179
  */
197
180
  imageId?: string;
198
181
  /**
199
- * Grouping node label. May be [localized]($docs/presentation/Advanced/Localization.md).
200
- * Defaults to `{from value} - {to value}`
182
+ * Grouping node label. May be [localized]($docs/presentation/advanced/Localization.md).
183
+ * Defaults to `{from value} - {to value}`.
201
184
  *
202
185
  * @minLength 1
203
186
  */
204
187
  label?: string;
205
188
  /**
206
- * Value that defines the range start (inclusive)
189
+ * Value that defines the range start (inclusive).
207
190
  *
208
191
  * @minLength 1
209
192
  */
210
193
  fromValue: string;
211
194
  /**
212
- * Value that defines the range end (inclusive)
195
+ * Value that defines the range end (inclusive).
213
196
  *
214
197
  * @minLength 1
215
198
  */
@@ -1 +1 @@
1
- {"version":3,"file":"GroupingRule.d.ts","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/customization/GroupingRule.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,YAAa,SAAQ,QAAQ,EAAE,kBAAkB;IAChE,oCAAoC;IACpC,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC;IAE7B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,uEAAuE;IACvE,KAAK,EAAE,8BAA8B,CAAC;IAEtC,iFAAiF;IACjF,MAAM,EAAE,qBAAqB,EAAE,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,MAAM,qBAAqB,GAAG,UAAU,GAAG,aAAa,GAAG,sBAAsB,CAAC;AAEhG;;;GAGG;AACH,oBAAY,0BAA0B;IACpC,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,iBAAiB,sBAAsB;CACxC;AAED;;;;;GAKG;AACH,MAAM,WAAW,yBAAyB;IACxC,2BAA2B;IAC3B,QAAQ,EAAE,0BAA0B,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,yBAAyB;IAC3D,oCAAoC;IACpC,QAAQ,EAAE,0BAA0B,CAAC,KAAK,CAAC;IAE3C,mFAAmF;IACnF,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC,+EAA+E;IAC/E,SAAS,CAAC,EAAE,8BAA8B,CAAC;CAC5C;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,sBAAuB,SAAQ,yBAAyB;IACvE,oCAAoC;IACpC,QAAQ,EAAE,0BAA0B,CAAC,iBAAiB,CAAC;IACvD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,sCAAsC,CAAC;CAC3D;AAED;;;GAGG;AACH,oBAAY,sCAAsC;IAChD,qCAAqC;IACrC,KAAK,UAAU;IAEf;;;;;;OAMG;IACH,WAAW,gBAAgB;CAC5B;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAc,SAAQ,yBAAyB;IAC9D,oCAAoC;IACpC,QAAQ,EAAE,0BAA0B,CAAC,QAAQ,CAAC;IAE9C;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,kFAAkF;IAClF,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC;;;;;OAKG;IACH,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAE1C;;;;;;;;;;;;;OAaG;IACH,aAAa,CAAC,EAAE,qBAAqB,CAAC;IAEtC;;;;;;;;;;;OAWG;IACH,YAAY,CAAC,EAAE,qBAAqB,CAAC;IAErC,wDAAwD;IACxD,MAAM,CAAC,EAAE,+BAA+B,EAAE,CAAC;CAC5C;AAED;;;;;;GAMG;AACH,oBAAY,qBAAqB;IAC/B,wBAAwB;IACxB,aAAa,kBAAkB;IAE/B,uBAAuB;IACvB,YAAY,iBAAiB;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB"}
1
+ {"version":3,"file":"GroupingRule.d.ts","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/customization/GroupingRule.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,WAAW,YAAa,SAAQ,QAAQ;IAC5C,oCAAoC;IACpC,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC;IAE7B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,wEAAwE;IACxE,KAAK,EAAE,8BAA8B,CAAC;IAEtC;;;OAGG;IACH,MAAM,EAAE,qBAAqB,EAAE,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,MAAM,qBAAqB,GAAG,UAAU,GAAG,aAAa,GAAG,sBAAsB,CAAC;AAEhG;;;GAGG;AACH,oBAAY,0BAA0B;IACpC,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,iBAAiB,sBAAsB;CACxC;AAED;;;;;GAKG;AACH,MAAM,WAAW,yBAAyB;IACxC,2BAA2B;IAC3B,QAAQ,EAAE,0BAA0B,CAAC;CACtC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,UAAW,SAAQ,yBAAyB;IAC3D,oCAAoC;IACpC,QAAQ,EAAE,0BAA0B,CAAC,KAAK,CAAC;IAE3C,mGAAmG;IACnG,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC;;;OAGG;IACH,SAAS,CAAC,EAAE,8BAA8B,CAAC;CAC5C;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAuB,SAAQ,yBAAyB;IACvE,oCAAoC;IACpC,QAAQ,EAAE,0BAA0B,CAAC,iBAAiB,CAAC;IAEvD;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,sCAAsC,CAAC;CAC3D;AAED;;;GAGG;AACH,oBAAY,sCAAsC;IAChD,qCAAqC;IACrC,KAAK,UAAU;IAEf;;;;;;OAMG;IACH,WAAW,gBAAgB;CAC5B;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAc,SAAQ,yBAAyB;IAC9D,oCAAoC;IACpC,QAAQ,EAAE,0BAA0B,CAAC,QAAQ,CAAC;IAE9C;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,mGAAmG;IACnG,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC;;OAEG;IACH,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAE1C;;;;OAIG;IACH,aAAa,CAAC,EAAE,qBAAqB,CAAC;IAEtC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,qBAAqB,CAAC;IAErC,oHAAoH;IACpH,MAAM,CAAC,EAAE,+BAA+B,EAAE,CAAC;CAC5C;AAED;;;;;;GAMG;AACH,oBAAY,qBAAqB;IAC/B,wBAAwB;IACxB,aAAa,kBAAkB;IAE/B,uBAAuB;IACvB,YAAY,iBAAiB;CAC9B;AAED;;;;;GAKG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -9,7 +9,7 @@
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.PropertyGroupingValue = exports.SameLabelInstanceGroupApplicationStage = exports.GroupingSpecificationTypes = void 0;
11
11
  /**
12
- * Available types of [[GroupingSpecification]]
12
+ * Available types of [[GroupingSpecification]].
13
13
  * @public
14
14
  */
15
15
  var GroupingSpecificationTypes;
@@ -1 +1 @@
1
- {"version":3,"file":"GroupingRule.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/customization/GroupingRule.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAmDH;;;GAGG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACpC,6CAAe,CAAA;IACf,mDAAqB,CAAA;IACrB,qEAAuC,CAAA;AACzC,CAAC,EAJW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAIrC;AAgDD;;;GAGG;AACH,IAAY,sCAYX;AAZD,WAAY,sCAAsC;IAChD,qCAAqC;IACrC,yDAAe,CAAA;IAEf;;;;;;OAMG;IACH,qEAA2B,CAAA;AAC7B,CAAC,EAZW,sCAAsC,GAAtC,8CAAsC,KAAtC,8CAAsC,QAYjD;AAuED;;;;;;GAMG;AACH,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAC/B,wBAAwB;IACxB,wDAA+B,CAAA;IAE/B,uBAAuB;IACvB,sDAA6B,CAAA;AAC/B,CAAC,EANW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAMhC","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 PresentationRules\r\n */\r\n\r\nimport { SingleSchemaClassSpecification } from \"../ClassSpecifications\";\r\nimport { ConditionContainer, RuleBase, RuleTypes } from \"../Rule\";\r\n\r\n/**\r\n * Grouping rule is an advanced way to configure node grouping.\r\n *\r\n * It allows to define these types of groupings:\r\n * - Group by base class.\r\n * - Group by any property of the instance by a common value or a range of values.\r\n * - Group multiple instances with the same label in to one ECInstance node. This can be used in cases when these\r\n * instances represent the same object for the user.\r\n *\r\n * The rule works in conjunction with other grouping options available in navigation specifications [[ChildNodeSpecification]]:\r\n * `groupByClass` and `groupByLabel`. The grouping hierarchy looks like this:\r\n * - Base ECClass grouping node (specified by base class grouping specification [[ClassGroup]])\r\n * - ECClass grouping node (specified by `groupByClass` property)\r\n * - ECProperty grouping node 1 (specified by 1st [[PropertyGroup]])\r\n * - ECProperty grouping node 2 (specified by 2nd [[PropertyGroup]])\r\n * - ECProperty grouping node n (specified by n-th [[PropertyGroup]])\r\n * - Display label grouping node (specified by `groupByLabel` property)\r\n * - ECInstance nodes (may be grouped under a single node by [[SameLabelInstanceGroup]])\r\n *\r\n * @see [More details]($docs/presentation/Hierarchies/GroupingRule.md)\r\n * @public\r\n */\r\nexport interface GroupingRule extends RuleBase, ConditionContainer {\r\n /** Used for serializing to JSON. */\r\n ruleType: RuleTypes.Grouping;\r\n\r\n /**\r\n * Defines a condition for the rule, which needs to be met in order to execute it. Condition\r\n * is an [ECExpression]($docs/presentation/Advanced/ECExpressions.md), which can use\r\n * a [limited set of symbols]($docs/presentation/Hierarchies/ECExpressions.md#rule-condition).\r\n */\r\n condition?: string;\r\n\r\n /** Specification of ECClass which should be grouped using this rule */\r\n class: SingleSchemaClassSpecification;\r\n\r\n /** Specifications of grouping which should be applied to matching ECInstances */\r\n groups: GroupingSpecification[];\r\n}\r\n\r\n/**\r\n * Grouping rule specifications\r\n * @public\r\n */\r\nexport declare type GroupingSpecification = ClassGroup | PropertyGroup | SameLabelInstanceGroup;\r\n\r\n/**\r\n * Available types of [[GroupingSpecification]]\r\n * @public\r\n */\r\nexport enum GroupingSpecificationTypes {\r\n Class = \"Class\",\r\n Property = \"Property\",\r\n SameLabelInstance = \"SameLabelInstance\",\r\n}\r\n\r\n/**\r\n * Base interface for all [[GroupingSpecification]] implementations. Not\r\n * meant to be used directly, see `GroupingSpecification`.\r\n *\r\n * @public\r\n */\r\nexport interface GroupingSpecificationBase {\r\n /** Type of the subclass */\r\n specType: GroupingSpecificationTypes;\r\n}\r\n\r\n/**\r\n * Allows grouping ECInstance nodes by their base class.\r\n * @public\r\n */\r\nexport interface ClassGroup extends GroupingSpecificationBase {\r\n /** Used for serializing to JSON. */\r\n specType: GroupingSpecificationTypes.Class;\r\n\r\n /** Should the grouping node be created if there is only one item in that group. */\r\n createGroupForSingleItem?: boolean;\r\n\r\n /** Specification of the base ECClass to group by. Defaults to rule's class. */\r\n baseClass?: SingleSchemaClassSpecification;\r\n}\r\n\r\n/**\r\n * Allows grouping multiple instances with the same label into one ECInstance node.\r\n * It can be used in cases when these instances represent the same object for the user.\r\n *\r\n * When multiple instances are grouped, an ECInstance node is created instead of a\r\n * grouping node and the ECInstance key for the node is assigned to key of one of grouped\r\n * instances.\r\n *\r\n * @public\r\n */\r\nexport interface SameLabelInstanceGroup extends GroupingSpecificationBase {\r\n /** Used for serializing to JSON. */\r\n specType: GroupingSpecificationTypes.SameLabelInstance;\r\n /**\r\n * Stage of hierarchy creation at which the rule is applied.\r\n * Defaults to [[SameLabelInstanceGroupApplicationStage.Query]].\r\n */\r\n applicationStage?: SameLabelInstanceGroupApplicationStage;\r\n}\r\n\r\n/**\r\n * Specifies hierarchy creation stages used to apply [[SameLabelInstanceGroup]] grouping.\r\n * @public\r\n */\r\nexport enum SameLabelInstanceGroupApplicationStage {\r\n /** Apply grouping at query stage. */\r\n Query = \"Query\",\r\n\r\n /**\r\n * Apply grouping at post-processing stage.\r\n *\r\n * This allows grouping nodes created by different hierarchy specifications at\r\n * a higher performance cost as it requires loading the whole hierarchy level before\r\n * returning even the first node - avoid using with large numbers of nodes.\r\n */\r\n PostProcess = \"PostProcess\",\r\n}\r\n\r\n/**\r\n * Allows grouping by property of the instance\r\n * by a common value or by range of values.\r\n *\r\n * @public\r\n */\r\nexport interface PropertyGroup extends GroupingSpecificationBase {\r\n /** Used for serializing to JSON. */\r\n specType: GroupingSpecificationTypes.Property;\r\n\r\n /**\r\n * Name of the ECProperty which is used for grouping.\r\n *\r\n * @minLength 1\r\n */\r\n propertyName: string;\r\n\r\n /**\r\n * ID of an image to use for the grouping node\r\n *\r\n * @minLength 1\r\n */\r\n imageId?: string;\r\n\r\n /** Should the grouping node be created if there is only one item in that group */\r\n createGroupForSingleItem?: boolean;\r\n\r\n /**\r\n * Should a separate grouping node be created for nodes whose grouping value is not\r\n * set or is an empty string.\r\n *\r\n * Defaults to `true`.\r\n */\r\n createGroupForUnspecifiedValues?: boolean;\r\n\r\n /**\r\n * Should the instances be grouped on display label or the grouping property value.\r\n * Defaults to [[PropertyGroupingValue.DisplayLabel]].\r\n *\r\n * **Note:** Grouping by property value is required if the display label is\r\n * overridden to display grouped instances count.\r\n *\r\n * **Warning:** Grouping by label and sorting by property value is not possible.\r\n *\r\n * @deprecated Display value should always be used for grouping. In cases when there's a\r\n * need to show grouped instances count suffix, that can be achieved at the UI component\r\n * layer by composing UI node's label from node's display label and\r\n * [GroupingNodeKey.groupedInstancesCount]($presentation-common).\r\n */\r\n groupingValue?: PropertyGroupingValue; // eslint-disable-line deprecation/deprecation\r\n\r\n /**\r\n * Should the nodes be sorted by display label or the grouping property value. In most\r\n * cases the result is the same, unless [[LabelOverride]] rule is used to change the display label.\r\n * Defaults to [[PropertyGroupingValue.DisplayLabel]].\r\n *\r\n * **Note:** Sorting by property value only makes sense when instances are grouped by\r\n * property value as well.\r\n *\r\n * **Warning:** Grouping by label and sorting by property value is not possible.\r\n *\r\n * @deprecated Property grouping nodes should always be sorted by display label.\r\n */\r\n sortingValue?: PropertyGroupingValue; // eslint-disable-line deprecation/deprecation\r\n\r\n /** Ranges into which the grouping values are divided */\r\n ranges?: PropertyRangeGroupSpecification[];\r\n}\r\n\r\n/**\r\n * Used in [[PropertyGroup]] to specify the type of value to use\r\n * for grouping and sorting\r\n *\r\n * @public\r\n * @deprecated The attributes using this enum are deprecated.\r\n */\r\nexport enum PropertyGroupingValue {\r\n /** By property value */\r\n PropertyValue = \"PropertyValue\",\r\n\r\n /** By display label */\r\n DisplayLabel = \"DisplayLabel\",\r\n}\r\n\r\n/**\r\n * Describes a grouping range\r\n * @public\r\n */\r\nexport interface PropertyRangeGroupSpecification {\r\n /**\r\n * ID of an image to use for the grouping node. Defaults to [[PropertyGroup.imageId]] specified in [[PropertyGroup]].\r\n *\r\n * @minLength 1\r\n */\r\n imageId?: string;\r\n\r\n /**\r\n * Grouping node label. May be [localized]($docs/presentation/Advanced/Localization.md).\r\n * Defaults to `{from value} - {to value}`\r\n *\r\n * @minLength 1\r\n */\r\n label?: string;\r\n\r\n /**\r\n * Value that defines the range start (inclusive)\r\n *\r\n * @minLength 1\r\n */\r\n fromValue: string;\r\n\r\n /**\r\n * Value that defines the range end (inclusive)\r\n *\r\n * @minLength 1\r\n */\r\n toValue: string;\r\n}\r\n"]}
1
+ {"version":3,"file":"GroupingRule.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/customization/GroupingRule.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAsCH;;;GAGG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACpC,6CAAe,CAAA;IACf,mDAAqB,CAAA;IACrB,qEAAuC,CAAA;AACzC,CAAC,EAJW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAIrC;AA2DD;;;GAGG;AACH,IAAY,sCAYX;AAZD,WAAY,sCAAsC;IAChD,qCAAqC;IACrC,yDAAe,CAAA;IAEf;;;;;;OAMG;IACH,qEAA2B,CAAA;AAC7B,CAAC,EAZW,sCAAsC,GAAtC,8CAAsC,KAAtC,8CAAsC,QAYjD;AAuDD;;;;;;GAMG;AACH,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAC/B,wBAAwB;IACxB,wDAA+B,CAAA;IAE/B,uBAAuB;IACvB,sDAA6B,CAAA;AAC/B,CAAC,EANW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAMhC","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 PresentationRules\r\n */\r\n\r\nimport { SingleSchemaClassSpecification } from \"../ClassSpecifications\";\r\nimport { RuleBase, RuleTypes } from \"../Rule\";\r\n\r\n/**\r\n * Grouping rules provide advanced ways to group instances when creating hierarchies.\r\n *\r\n * @see [Grouping rule reference documentation page]($docs/presentation/hierarchies/GroupingRule.md)\r\n * @public\r\n */\r\nexport interface GroupingRule extends RuleBase {\r\n /** Used for serializing to JSON. */\r\n ruleType: RuleTypes.Grouping;\r\n\r\n /**\r\n * An [ECExpression]($docs/presentation/hierarchies/ECExpressions.md#rule-condition) that results in\r\n * a boolean value. If specified, the grouping rule applies only to instance nodes that cause the condition\r\n * to evaluate to `true`.\r\n */\r\n condition?: string;\r\n\r\n /** Specification of ECClass which should be grouped using this rule. */\r\n class: SingleSchemaClassSpecification;\r\n\r\n /**\r\n * Specifies a list of [grouping specifications]($docs/presentation/hierarchies/GroupingRule.md#grouping-specifications)\r\n * which describe the kind of grouping that should be applied.\r\n */\r\n groups: GroupingSpecification[];\r\n}\r\n\r\n/**\r\n * Grouping rule specifications.\r\n * @public\r\n */\r\nexport declare type GroupingSpecification = ClassGroup | PropertyGroup | SameLabelInstanceGroup;\r\n\r\n/**\r\n * Available types of [[GroupingSpecification]].\r\n * @public\r\n */\r\nexport enum GroupingSpecificationTypes {\r\n Class = \"Class\",\r\n Property = \"Property\",\r\n SameLabelInstance = \"SameLabelInstance\",\r\n}\r\n\r\n/**\r\n * Base interface for all [[GroupingSpecification]] implementations. Not\r\n * meant to be used directly, see `GroupingSpecification`.\r\n *\r\n * @public\r\n */\r\nexport interface GroupingSpecificationBase {\r\n /** Type of the subclass */\r\n specType: GroupingSpecificationTypes;\r\n}\r\n\r\n/**\r\n * Base class grouping allows grouping ECInstance nodes by their base class (as opposed to the hierarchy\r\n * specifications' `groupByClass` attribute, which always groups by direct class).\r\n *\r\n * @see [Base class grouping documentation section]($docs/presentation/hierarchies/GroupingRule.md#base-class-grouping)\r\n * @public\r\n */\r\nexport interface ClassGroup extends GroupingSpecificationBase {\r\n /** Used for serializing to JSON. */\r\n specType: GroupingSpecificationTypes.Class;\r\n\r\n /** Specifies whether a grouping node should be created if there is only one item in that group. */\r\n createGroupForSingleItem?: boolean;\r\n\r\n /**\r\n * Specification of the base ECClass to group by. If specified, allows grouping by a subclass of the class\r\n * specified by rule's `class` attribute.\r\n */\r\n baseClass?: SingleSchemaClassSpecification;\r\n}\r\n\r\n/**\r\n * Allows grouping multiple instances with the same label into one ECInstances type of node. Similar to display label grouping,\r\n * but instead of showing a grouping node with multiple grouped ECInstance nodes, it shows a single ECInstances node which represents\r\n * multiple ECInstances.\r\n *\r\n * @see [Same label instance grouping documentation section]($docs/presentation/hierarchies/GroupingRule.md#same-label-instance-grouping)\r\n * @public\r\n */\r\nexport interface SameLabelInstanceGroup extends GroupingSpecificationBase {\r\n /** Used for serializing to JSON. */\r\n specType: GroupingSpecificationTypes.SameLabelInstance;\r\n\r\n /**\r\n * Grouping nodes by label is an expensive operation because it requires the whole hierarchy level to be created before even the first\r\n * grouped node can be produced. To alleviate the performance impact when this specification is used, two `applicationStage` settings have been introduced:\r\n *\r\n * - `\"Query\"` groups instances during ECSql query, which can often make use of database indices and is generally fairly quick. It is chosen\r\n * as the default option, however, it fails to produce grouping nodes when certain ruleset specifications are involved.\r\n *\r\n * - `\"PostProcess\"` groups instances after the whole hierarchy level is built. It incurs a large performance penalty, but it will\r\n * produce the expected result in all cases.\r\n */\r\n applicationStage?: SameLabelInstanceGroupApplicationStage;\r\n}\r\n\r\n/**\r\n * Specifies hierarchy creation stages used to apply [[SameLabelInstanceGroup]] grouping.\r\n * @public\r\n */\r\nexport enum SameLabelInstanceGroupApplicationStage {\r\n /** Apply grouping at query stage. */\r\n Query = \"Query\",\r\n\r\n /**\r\n * Apply grouping at post-processing stage.\r\n *\r\n * This allows grouping nodes created by different hierarchy specifications at\r\n * a higher performance cost as it requires loading the whole hierarchy level before\r\n * returning even the first node - avoid using with large numbers of nodes.\r\n */\r\n PostProcess = \"PostProcess\",\r\n}\r\n\r\n/**\r\n * Property grouping allows grouping by a property of the instance by value or by given ranges of values.\r\n *\r\n * @see [Property grouping documentation section]($docs/presentation/hierarchies/GroupingRule.md#property-grouping)\r\n * @public\r\n */\r\nexport interface PropertyGroup extends GroupingSpecificationBase {\r\n /** Used for serializing to JSON. */\r\n specType: GroupingSpecificationTypes.Property;\r\n\r\n /**\r\n * Name of the ECProperty which is used for grouping. The property must exist on the ECClass specified by the\r\n * rule's `class` attribute and it must be of either a primitive or a navigation type.\r\n *\r\n * @minLength 1\r\n */\r\n propertyName: string;\r\n\r\n /**\r\n * Specifies grouping node's image ID. If set, the ID is assigned to [[Node.imageId]] and\r\n * it's up to the UI component to decide what to do with it.\r\n *\r\n * @minLength 1\r\n */\r\n imageId?: string;\r\n\r\n /** Specifies whether a grouping node should be created if there is only one item in that group. */\r\n createGroupForSingleItem?: boolean;\r\n\r\n /**\r\n * Should a separate grouping node be created for nodes whose grouping value is not set or is set to an empty string.\r\n */\r\n createGroupForUnspecifiedValues?: boolean;\r\n\r\n /**\r\n * Specifies whether instances should be grouped using property's display or raw value.\r\n *\r\n * @deprecated Display value should always be used for grouping.\r\n */\r\n groupingValue?: PropertyGroupingValue; // eslint-disable-line deprecation/deprecation\r\n\r\n /**\r\n * Specifies whether nodes should be sorted by their display label or the grouping property's value. In most cases the result\r\n * is the same, unless a [label override rule]($docs/presentation/customization/LabelOverride.md) is used to change node's display label.\r\n *\r\n * @deprecated Property grouping nodes should always be sorted by display label.\r\n */\r\n sortingValue?: PropertyGroupingValue; // eslint-disable-line deprecation/deprecation\r\n\r\n /** Ranges into which the grouping values are divided. Instances are grouped by value if no ranges are specified. */\r\n ranges?: PropertyRangeGroupSpecification[];\r\n}\r\n\r\n/**\r\n * Used in [[PropertyGroup]] to specify the type of value to use\r\n * for grouping and sorting\r\n *\r\n * @public\r\n * @deprecated The attributes using this enum are deprecated.\r\n */\r\nexport enum PropertyGroupingValue {\r\n /** By property value */\r\n PropertyValue = \"PropertyValue\",\r\n\r\n /** By display label */\r\n DisplayLabel = \"DisplayLabel\",\r\n}\r\n\r\n/**\r\n * Describes a grouping range.\r\n *\r\n * @see [Property range group specification documentation section]($docs/presentation/hierarchies/GroupingRule.md#attribute-ranges)\r\n * @public\r\n */\r\nexport interface PropertyRangeGroupSpecification {\r\n /**\r\n * ID of an image to use for the grouping node. Defaults to [[PropertyGroup.imageId]] specified in [[PropertyGroup]].\r\n *\r\n * @minLength 1\r\n */\r\n imageId?: string;\r\n\r\n /**\r\n * Grouping node label. May be [localized]($docs/presentation/advanced/Localization.md).\r\n * Defaults to `{from value} - {to value}`.\r\n *\r\n * @minLength 1\r\n */\r\n label?: string;\r\n\r\n /**\r\n * Value that defines the range start (inclusive).\r\n *\r\n * @minLength 1\r\n */\r\n fromValue: string;\r\n\r\n /**\r\n * Value that defines the range end (inclusive).\r\n *\r\n * @minLength 1\r\n */\r\n toValue: string;\r\n}\r\n"]}
@@ -1,27 +1,26 @@
1
1
  /** @packageDocumentation
2
2
  * @module PresentationRules
3
3
  */
4
- import { ConditionContainer, RuleBase, RuleTypes } from "../Rule";
4
+ import { RuleBase, RuleTypes } from "../Rule";
5
5
  /**
6
- * Rule that allows overriding default icon and dynamically define an icon
7
- * for a particular node based on the context.
6
+ * ImageId override rules allow setting an image ID to specific types of ECInstances.
8
7
  *
9
- * @see [More details]($docs/presentation/Customization/ImageIdOverride.md)
8
+ * @see [Image ID override reference documentation page]($docs/presentation/customization/ImageIdOverride.md)
10
9
  * @public
11
- * @deprecated Use [[ExtendedDataRule]] instead. See [extended data usage page]($docs/presentation/Customization/ExtendedDataUsage.md) for more details.
10
+ * @deprecated Use [[ExtendedDataRule]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
12
11
  */
13
- export interface ImageIdOverride extends RuleBase, ConditionContainer {
12
+ export interface ImageIdOverride extends RuleBase {
14
13
  /** Used for serializing to JSON. */
15
14
  ruleType: RuleTypes.ImageIdOverride;
16
15
  /**
17
16
  * Defines a condition for the rule, which needs to be met in order to execute it. Condition
18
- * is an [ECExpression]($docs/presentation/Advanced/ECExpressions.md), which can use
19
- * a [limited set of symbols]($docs/presentation/Customization/ECExpressions.md#rule-condition).
17
+ * is an [ECExpression]($docs/presentation/advanced/ECExpressions.md), which can use
18
+ * a [limited set of symbols]($docs/presentation/customization/ECExpressions.md#rule-condition).
20
19
  */
21
20
  condition?: string;
22
21
  /**
23
- * Defines an image ID that should be used for nodes that meet rule condition. This is
24
- * an [ECExpression]($docs/presentation/Customization/ECExpressions.md), so ID can be
22
+ * An expression whose result becomes the image ID. This is
23
+ * an [ECExpression]($docs/presentation/customization/ECExpressions.md), so ID can be
25
24
  * defined/formatted dynamically based on the context - for example ECInstance property value.
26
25
  *
27
26
  * @minLength 1
@@ -1 +1 @@
1
- {"version":3,"file":"ImageIdOverride.d.ts","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/customization/ImageIdOverride.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAElE;;;;;;;GAOG;AACH,MAAM,WAAW,eAAgB,SAAQ,QAAQ,EAAE,kBAAkB;IACnE,oCAAoC;IACpC,QAAQ,EAAE,SAAS,CAAC,eAAe,CAAC;IAEpC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B"}
1
+ {"version":3,"file":"ImageIdOverride.d.ts","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/customization/ImageIdOverride.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAC/C,oCAAoC;IACpC,QAAQ,EAAE,SAAS,CAAC,eAAe,CAAC;IAEpC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"ImageIdOverride.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/customization/ImageIdOverride.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 PresentationRules\r\n */\r\n\r\nimport { ConditionContainer, RuleBase, RuleTypes } from \"../Rule\";\r\n\r\n/**\r\n * Rule that allows overriding default icon and dynamically define an icon\r\n * for a particular node based on the context.\r\n *\r\n * @see [More details]($docs/presentation/Customization/ImageIdOverride.md)\r\n * @public\r\n * @deprecated Use [[ExtendedDataRule]] instead. See [extended data usage page]($docs/presentation/Customization/ExtendedDataUsage.md) for more details.\r\n */\r\nexport interface ImageIdOverride extends RuleBase, ConditionContainer {\r\n /** Used for serializing to JSON. */\r\n ruleType: RuleTypes.ImageIdOverride;\r\n\r\n /**\r\n * Defines a condition for the rule, which needs to be met in order to execute it. Condition\r\n * is an [ECExpression]($docs/presentation/Advanced/ECExpressions.md), which can use\r\n * a [limited set of symbols]($docs/presentation/Customization/ECExpressions.md#rule-condition).\r\n */\r\n condition?: string;\r\n\r\n /**\r\n * Defines an image ID that should be used for nodes that meet rule condition. This is\r\n * an [ECExpression]($docs/presentation/Customization/ECExpressions.md), so ID can be\r\n * defined/formatted dynamically based on the context - for example ECInstance property value.\r\n *\r\n * @minLength 1\r\n */\r\n imageIdExpression: string;\r\n}\r\n"]}
1
+ {"version":3,"file":"ImageIdOverride.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/customization/ImageIdOverride.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 PresentationRules\r\n */\r\n\r\nimport { RuleBase, RuleTypes } from \"../Rule\";\r\n\r\n/**\r\n * ImageId override rules allow setting an image ID to specific types of ECInstances.\r\n *\r\n * @see [Image ID override reference documentation page]($docs/presentation/customization/ImageIdOverride.md)\r\n * @public\r\n * @deprecated Use [[ExtendedDataRule]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\nexport interface ImageIdOverride extends RuleBase {\r\n /** Used for serializing to JSON. */\r\n ruleType: RuleTypes.ImageIdOverride;\r\n\r\n /**\r\n * Defines a condition for the rule, which needs to be met in order to execute it. Condition\r\n * is an [ECExpression]($docs/presentation/advanced/ECExpressions.md), which can use\r\n * a [limited set of symbols]($docs/presentation/customization/ECExpressions.md#rule-condition).\r\n */\r\n condition?: string;\r\n\r\n /**\r\n * An expression whose result becomes the image ID. This is\r\n * an [ECExpression]($docs/presentation/customization/ECExpressions.md), so ID can be\r\n * defined/formatted dynamically based on the context - for example ECInstance property value.\r\n *\r\n * @minLength 1\r\n */\r\n imageIdExpression: string;\r\n}\r\n"]}
@@ -5,29 +5,26 @@ import { SingleSchemaClassSpecification } from "../ClassSpecifications";
5
5
  import { RelationshipPathSpecification } from "../RelationshipPathSpecification";
6
6
  import { RuleBase, RuleTypes } from "../Rule";
7
7
  /**
8
- * Rule to override labels for instances of specific ECClasses.
8
+ * Instance label override rule provides a way to set instance label to one of its property values,
9
+ * other attributes and/or combination of them.
9
10
  *
10
- * **Important:** Prefer this rule over [[LabelOverride]] when possible as it
11
- * has better performance.
12
- *
13
- * @see [More details]($docs/presentation/Customization/InstanceLabelOverride.md)
11
+ * @see [Instance label override reference documentation page]($docs/presentation/customization/InstanceLabelOverride.md)
14
12
  * @public
15
13
  */
16
14
  export interface InstanceLabelOverride extends RuleBase {
17
15
  /** Used for serializing to JSON. */
18
16
  ruleType: RuleTypes.InstanceLabelOverride;
19
17
  /**
20
- * Specification of the ECClass to apply this rule to.
18
+ * Specifies the ECClass to apply this rule to.
21
19
  */
22
20
  class: SingleSchemaClassSpecification;
23
21
  /**
24
- * Specifications for the label value. The first non-empty value
25
- * is used as the actual label.
22
+ * Specifications of values used to override label. The first non-empty value is used as the actual label.
26
23
  */
27
24
  values: InstanceLabelOverrideValueSpecification[];
28
25
  }
29
26
  /**
30
- * Types of possible [[InstanceLabelOverride]] label value.
27
+ * Types of possible [[InstanceLabelOverride]] label values.
31
28
  * @public
32
29
  */
33
30
  export declare enum InstanceLabelOverrideValueSpecificationType {
@@ -49,9 +46,9 @@ export interface InstanceLabelOverrideValueSpecificationBase {
49
46
  specType: InstanceLabelOverrideValueSpecificationType;
50
47
  }
51
48
  /**
52
- * Specification that allows creating a label value composited using
53
- * multiple other specifications.
49
+ * Specification allows creating a label value composited using multiple other specifications.
54
50
  *
51
+ * @see [Composite value specification reference documentation page]($docs/presentation/customization/InstanceLabelOverride.md#composite-value-specification)
55
52
  * @public
56
53
  */
57
54
  export interface InstanceLabelOverrideCompositeValueSpecification extends InstanceLabelOverrideValueSpecificationBase {
@@ -70,7 +67,9 @@ export interface InstanceLabelOverrideCompositeValueSpecification extends Instan
70
67
  separator?: string;
71
68
  }
72
69
  /**
73
- * Specification that uses property value as the label content.
70
+ * Specification uses property value as the label content.
71
+ *
72
+ * @see [Property value specification reference documentation page]($docs/presentation/customization/InstanceLabelOverride.md#property-value-specification)
74
73
  * @public
75
74
  */
76
75
  export interface InstanceLabelOverridePropertyValueSpecification extends InstanceLabelOverrideValueSpecificationBase {
@@ -81,14 +80,16 @@ export interface InstanceLabelOverridePropertyValueSpecification extends Instanc
81
80
  */
82
81
  propertyName: string;
83
82
  /**
84
- * Path from `InstanceLabelOverride.class` to the property class. If omitted,
85
- * `InstanceLabelOverride.class` is used as property class.
83
+ * [Specification of the relationship path]($docs/presentation/RelationshipPathSpecification.md) from `InstanceLabelOverride.class`
84
+ * to class of the property. If omitted, `InstanceLabelOverride.class` is used as property class.
86
85
  * @beta
87
86
  */
88
87
  propertySource?: RelationshipPathSpecification;
89
88
  }
90
89
  /**
91
- * Specification that uses ECClass name as the label content.
90
+ * Specification uses ECClass name as the label content.
91
+ *
92
+ * @see [Class name value specification reference documentation page]($docs/presentation/customization/InstanceLabelOverride.md#class-name-value-specification)
92
93
  * @public
93
94
  */
94
95
  export interface InstanceLabelOverrideClassNameSpecification extends InstanceLabelOverrideValueSpecificationBase {
@@ -97,28 +98,36 @@ export interface InstanceLabelOverrideClassNameSpecification extends InstanceLab
97
98
  full?: boolean;
98
99
  }
99
100
  /**
100
- * Specification that uses ECClass display label as the label content.
101
+ * Specification uses ECClass display label as the label content.
102
+ *
103
+ * @see [Class label value specification reference documentation page]($docs/presentation/customization/InstanceLabelOverride.md#class-label-value-specification)
101
104
  * @public
102
105
  */
103
106
  export interface InstanceLabelOverrideClassLabelSpecification extends InstanceLabelOverrideValueSpecificationBase {
104
107
  specType: InstanceLabelOverrideValueSpecificationType.ClassLabel;
105
108
  }
106
109
  /**
107
- * Specification that returns ECInstance's briefcase ID in base36 format.
110
+ * Specification returns ECInstance's briefcase ID in base36 format.
111
+ *
112
+ * @see [BriefcaseId value specification reference documentation page]($docs/presentation/customization/InstanceLabelOverride.md#briefcaseid-value-specification)
108
113
  * @public
109
114
  */
110
115
  export interface InstanceLabelOverrideBriefcaseIdSpecification extends InstanceLabelOverrideValueSpecificationBase {
111
116
  specType: InstanceLabelOverrideValueSpecificationType.BriefcaseId;
112
117
  }
113
118
  /**
114
- * Specification that returns ECInstance's local ID in base36 format.
119
+ * Specification returns ECInstance's local ID in base36 format.
120
+ *
121
+ * @see [LocalId value specification reference documentation page]($docs/presentation/customization/InstanceLabelOverride.md#localid-value-specification)
115
122
  * @public
116
123
  */
117
124
  export interface InstanceLabelOverrideLocalIdSpecification extends InstanceLabelOverrideValueSpecificationBase {
118
125
  specType: InstanceLabelOverrideValueSpecificationType.LocalId;
119
126
  }
120
127
  /**
121
- * Specification that uses the specified value as the label content.
128
+ * Specification uses the specified value as the label content.
129
+ *
130
+ * @see [String value specification reference documentation page]($docs/presentation/customization/InstanceLabelOverride.md#string-value-specification)
122
131
  * @public
123
132
  */
124
133
  export interface InstanceLabelOverrideStringValueSpecification extends InstanceLabelOverrideValueSpecificationBase {
@@ -127,14 +136,16 @@ export interface InstanceLabelOverrideStringValueSpecification extends InstanceL
127
136
  value: string;
128
137
  }
129
138
  /**
130
- * Specification that uses label of a related instance as the label content.
139
+ * Specification uses label of another related instance as the label content.
140
+ *
141
+ * @see [Related instance label value specification reference documentation page]($docs/presentation/customization/InstanceLabelOverride.md#related-instance-label-value-specification)
131
142
  * @public
132
143
  */
133
144
  export interface InstanceLabelOverrideRelatedInstanceLabelSpecification extends InstanceLabelOverrideValueSpecificationBase {
134
145
  specType: InstanceLabelOverrideValueSpecificationType.RelatedInstanceLabel;
135
146
  /**
136
- * Path from `InstanceLabelOverride.class` to the class of related instance whose label
137
- * should be returned.
147
+ * [Specification of the relationship path]($docs/presentation/RelationshipPathSpecification.md) from `InstanceLabelOverride.class`
148
+ * to class of the related instance.
138
149
  */
139
150
  pathToRelatedInstance: RelationshipPathSpecification;
140
151
  }
@@ -1 +1 @@
1
- {"version":3,"file":"InstanceLabelOverride.d.ts","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/customization/InstanceLabelOverride.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;;;GAQG;AACH,MAAM,WAAW,qBAAsB,SAAQ,QAAQ;IACrD,oCAAoC;IACpC,QAAQ,EAAE,SAAS,CAAC,qBAAqB,CAAC;IAE1C;;OAEG;IACH,KAAK,EAAE,8BAA8B,CAAC;IAEtC;;;OAGG;IACH,MAAM,EAAE,uCAAuC,EAAE,CAAC;CACnD;AAED;;;GAGG;AACH,oBAAY,2CAA2C;IACrD,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,oBAAoB,yBAAyB;CAC9C;AAED;;;GAGG;AACH,MAAM,WAAW,2CAA2C;IAC1D,gCAAgC;IAChC,QAAQ,EAAE,2CAA2C,CAAC;CACvD;AAED;;;;;GAKG;AACH,MAAM,WAAW,gDAAiD,SAAQ,2CAA2C;IACnH,QAAQ,EAAE,2CAA2C,CAAC,SAAS,CAAC;IAEhE;;;;;OAKG;IACH,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,uCAAuC,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAEtF,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,+CAAgD,SAAQ,2CAA2C;IAClH,QAAQ,EAAE,2CAA2C,CAAC,QAAQ,CAAC;IAE/D;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,cAAc,CAAC,EAAE,6BAA6B,CAAC;CAChD;AAED;;;GAGG;AACH,MAAM,WAAW,2CAA4C,SAAQ,2CAA2C;IAC9G,QAAQ,EAAE,2CAA2C,CAAC,SAAS,CAAC;IAEhE,kEAAkE;IAClE,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,4CAA6C,SAAQ,2CAA2C;IAC/G,QAAQ,EAAE,2CAA2C,CAAC,UAAU,CAAC;CAClE;AAED;;;GAGG;AACH,MAAM,WAAW,6CAA8C,SAAQ,2CAA2C;IAChH,QAAQ,EAAE,2CAA2C,CAAC,WAAW,CAAC;CACnE;AAED;;;GAGG;AACH,MAAM,WAAW,yCAA0C,SAAQ,2CAA2C;IAC5G,QAAQ,EAAE,2CAA2C,CAAC,OAAO,CAAC;CAC/D;AAED;;;GAGG;AACH,MAAM,WAAW,6CAA8C,SAAQ,2CAA2C;IAChH,QAAQ,EAAE,2CAA2C,CAAC,MAAM,CAAC;IAE7D,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,sDAAuD,SAAQ,2CAA2C;IACzH,QAAQ,EAAE,2CAA2C,CAAC,oBAAoB,CAAC;IAE3E;;;OAGG;IACH,qBAAqB,EAAE,6BAA6B,CAAC;CACtD;AAED;;;GAGG;AACH,oBAAY,uCAAuC,GACjD,gDAAgD,GAAG,+CAA+C,GAClG,6CAA6C,GAAG,2CAA2C,GAC3F,4CAA4C,GAAG,6CAA6C,GAC5F,yCAAyC,GAAG,sDAAsD,CAAC"}
1
+ {"version":3,"file":"InstanceLabelOverride.d.ts","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/customization/InstanceLabelOverride.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,WAAW,qBAAsB,SAAQ,QAAQ;IACrD,oCAAoC;IACpC,QAAQ,EAAE,SAAS,CAAC,qBAAqB,CAAC;IAE1C;;OAEG;IACH,KAAK,EAAE,8BAA8B,CAAC;IAEtC;;OAEG;IACH,MAAM,EAAE,uCAAuC,EAAE,CAAC;CACnD;AAED;;;GAGG;AACH,oBAAY,2CAA2C;IACrD,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,oBAAoB,yBAAyB;CAC9C;AAED;;;GAGG;AACH,MAAM,WAAW,2CAA2C;IAC1D,gCAAgC;IAChC,QAAQ,EAAE,2CAA2C,CAAC;CACvD;AAED;;;;;GAKG;AACH,MAAM,WAAW,gDAAiD,SAAQ,2CAA2C;IACnH,QAAQ,EAAE,2CAA2C,CAAC,SAAS,CAAC;IAEhE;;;;;OAKG;IACH,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,uCAAuC,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAEtF,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,+CAAgD,SAAQ,2CAA2C;IAClH,QAAQ,EAAE,2CAA2C,CAAC,QAAQ,CAAC;IAE/D;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,cAAc,CAAC,EAAE,6BAA6B,CAAC;CAChD;AAED;;;;;GAKG;AACH,MAAM,WAAW,2CAA4C,SAAQ,2CAA2C;IAC9G,QAAQ,EAAE,2CAA2C,CAAC,SAAS,CAAC;IAEhE,kEAAkE;IAClE,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;;GAKG;AACH,MAAM,WAAW,4CAA6C,SAAQ,2CAA2C;IAC/G,QAAQ,EAAE,2CAA2C,CAAC,UAAU,CAAC;CAClE;AAED;;;;;GAKG;AACH,MAAM,WAAW,6CAA8C,SAAQ,2CAA2C;IAChH,QAAQ,EAAE,2CAA2C,CAAC,WAAW,CAAC;CACnE;AAED;;;;;GAKG;AACH,MAAM,WAAW,yCAA0C,SAAQ,2CAA2C;IAC5G,QAAQ,EAAE,2CAA2C,CAAC,OAAO,CAAC;CAC/D;AAED;;;;;GAKG;AACH,MAAM,WAAW,6CAA8C,SAAQ,2CAA2C;IAChH,QAAQ,EAAE,2CAA2C,CAAC,MAAM,CAAC;IAE7D,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,MAAM,WAAW,sDAAuD,SAAQ,2CAA2C;IACzH,QAAQ,EAAE,2CAA2C,CAAC,oBAAoB,CAAC;IAE3E;;;OAGG;IACH,qBAAqB,EAAE,6BAA6B,CAAC;CACtD;AAED;;;GAGG;AACH,oBAAY,uCAAuC,GACjD,gDAAgD,GAAG,+CAA+C,GAClG,6CAA6C,GAAG,2CAA2C,GAC3F,4CAA4C,GAAG,6CAA6C,GAC5F,yCAAyC,GAAG,sDAAsD,CAAC"}
@@ -9,7 +9,7 @@
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.InstanceLabelOverrideValueSpecificationType = void 0;
11
11
  /**
12
- * Types of possible [[InstanceLabelOverride]] label value.
12
+ * Types of possible [[InstanceLabelOverride]] label values.
13
13
  * @public
14
14
  */
15
15
  var InstanceLabelOverrideValueSpecificationType;
@@ -1 +1 @@
1
- {"version":3,"file":"InstanceLabelOverride.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/customization/InstanceLabelOverride.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA+BH;;;GAGG;AACH,IAAY,2CASX;AATD,WAAY,2CAA2C;IACrD,sEAAuB,CAAA;IACvB,oEAAqB,CAAA;IACrB,sEAAuB,CAAA;IACvB,wEAAyB,CAAA;IACzB,0EAA2B,CAAA;IAC3B,kEAAmB,CAAA;IACnB,gEAAiB,CAAA;IACjB,4FAA6C,CAAA;AAC/C,CAAC,EATW,2CAA2C,GAA3C,mDAA2C,KAA3C,mDAA2C,QAStD","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 PresentationRules\r\n */\r\n\r\nimport { SingleSchemaClassSpecification } from \"../ClassSpecifications\";\r\nimport { RelationshipPathSpecification } from \"../RelationshipPathSpecification\";\r\nimport { RuleBase, RuleTypes } from \"../Rule\";\r\n\r\n/**\r\n * Rule to override labels for instances of specific ECClasses.\r\n *\r\n * **Important:** Prefer this rule over [[LabelOverride]] when possible as it\r\n * has better performance.\r\n *\r\n * @see [More details]($docs/presentation/Customization/InstanceLabelOverride.md)\r\n * @public\r\n */\r\nexport interface InstanceLabelOverride extends RuleBase {\r\n /** Used for serializing to JSON. */\r\n ruleType: RuleTypes.InstanceLabelOverride;\r\n\r\n /**\r\n * Specification of the ECClass to apply this rule to.\r\n */\r\n class: SingleSchemaClassSpecification;\r\n\r\n /**\r\n * Specifications for the label value. The first non-empty value\r\n * is used as the actual label.\r\n */\r\n values: InstanceLabelOverrideValueSpecification[];\r\n}\r\n\r\n/**\r\n * Types of possible [[InstanceLabelOverride]] label value.\r\n * @public\r\n */\r\nexport enum InstanceLabelOverrideValueSpecificationType {\r\n Composite = \"Composite\",\r\n Property = \"Property\",\r\n ClassName = \"ClassName\",\r\n ClassLabel = \"ClassLabel\",\r\n BriefcaseId = \"BriefcaseId\",\r\n LocalId = \"LocalId\",\r\n String = \"String\",\r\n RelatedInstanceLabel = \"RelatedInstanceLabel\",\r\n}\r\n\r\n/**\r\n * Base interface for all [[InstanceLabelOverrideValueSpecification]] implementations.\r\n * @public\r\n */\r\nexport interface InstanceLabelOverrideValueSpecificationBase {\r\n /** Type of the specification */\r\n specType: InstanceLabelOverrideValueSpecificationType;\r\n}\r\n\r\n/**\r\n * Specification that allows creating a label value composited using\r\n * multiple other specifications.\r\n *\r\n * @public\r\n */\r\nexport interface InstanceLabelOverrideCompositeValueSpecification extends InstanceLabelOverrideValueSpecificationBase {\r\n specType: InstanceLabelOverrideValueSpecificationType.Composite;\r\n\r\n /**\r\n * Parts of the value.\r\n *\r\n * If any of the parts with `isRequired` flag evaluate to an empty string, the\r\n * result of this specification is also an empty string.\r\n */\r\n parts: Array<{ spec: InstanceLabelOverrideValueSpecification, isRequired?: boolean }>;\r\n\r\n /** Separator to use when joining the parts. Defaults to a space character. */\r\n separator?: string;\r\n}\r\n\r\n/**\r\n * Specification that uses property value as the label content.\r\n * @public\r\n */\r\nexport interface InstanceLabelOverridePropertyValueSpecification extends InstanceLabelOverrideValueSpecificationBase {\r\n specType: InstanceLabelOverrideValueSpecificationType.Property;\r\n\r\n /**\r\n * Name of the property whose value should be used.\r\n * @note A property with this name must exist on the property class (see [[propertySource]]).\r\n */\r\n propertyName: string;\r\n\r\n /**\r\n * Path from `InstanceLabelOverride.class` to the property class. If omitted,\r\n * `InstanceLabelOverride.class` is used as property class.\r\n * @beta\r\n */\r\n propertySource?: RelationshipPathSpecification;\r\n}\r\n\r\n/**\r\n * Specification that uses ECClass name as the label content.\r\n * @public\r\n */\r\nexport interface InstanceLabelOverrideClassNameSpecification extends InstanceLabelOverrideValueSpecificationBase {\r\n specType: InstanceLabelOverrideValueSpecificationType.ClassName;\r\n\r\n /** Should full (`{schemaName}.{className}`) class name be used */\r\n full?: boolean;\r\n}\r\n\r\n/**\r\n * Specification that uses ECClass display label as the label content.\r\n * @public\r\n */\r\nexport interface InstanceLabelOverrideClassLabelSpecification extends InstanceLabelOverrideValueSpecificationBase {\r\n specType: InstanceLabelOverrideValueSpecificationType.ClassLabel;\r\n}\r\n\r\n/**\r\n * Specification that returns ECInstance's briefcase ID in base36 format.\r\n * @public\r\n */\r\nexport interface InstanceLabelOverrideBriefcaseIdSpecification extends InstanceLabelOverrideValueSpecificationBase {\r\n specType: InstanceLabelOverrideValueSpecificationType.BriefcaseId;\r\n}\r\n\r\n/**\r\n * Specification that returns ECInstance's local ID in base36 format.\r\n * @public\r\n */\r\nexport interface InstanceLabelOverrideLocalIdSpecification extends InstanceLabelOverrideValueSpecificationBase {\r\n specType: InstanceLabelOverrideValueSpecificationType.LocalId;\r\n}\r\n\r\n/**\r\n * Specification that uses the specified value as the label content.\r\n * @public\r\n */\r\nexport interface InstanceLabelOverrideStringValueSpecification extends InstanceLabelOverrideValueSpecificationBase {\r\n specType: InstanceLabelOverrideValueSpecificationType.String;\r\n\r\n /** The value to use as the label content. */\r\n value: string;\r\n}\r\n\r\n/**\r\n * Specification that uses label of a related instance as the label content.\r\n * @public\r\n */\r\nexport interface InstanceLabelOverrideRelatedInstanceLabelSpecification extends InstanceLabelOverrideValueSpecificationBase {\r\n specType: InstanceLabelOverrideValueSpecificationType.RelatedInstanceLabel;\r\n\r\n /**\r\n * Path from `InstanceLabelOverride.class` to the class of related instance whose label\r\n * should be returned.\r\n */\r\n pathToRelatedInstance: RelationshipPathSpecification;\r\n}\r\n\r\n/**\r\n * Specification to define how the label for [[InstanceLabelOverride]] should be created.\r\n * @public\r\n */\r\nexport type InstanceLabelOverrideValueSpecification =\r\n InstanceLabelOverrideCompositeValueSpecification | InstanceLabelOverridePropertyValueSpecification |\r\n InstanceLabelOverrideStringValueSpecification | InstanceLabelOverrideClassNameSpecification |\r\n InstanceLabelOverrideClassLabelSpecification | InstanceLabelOverrideBriefcaseIdSpecification |\r\n InstanceLabelOverrideLocalIdSpecification | InstanceLabelOverrideRelatedInstanceLabelSpecification;\r\n"]}
1
+ {"version":3,"file":"InstanceLabelOverride.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/customization/InstanceLabelOverride.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA4BH;;;GAGG;AACH,IAAY,2CASX;AATD,WAAY,2CAA2C;IACrD,sEAAuB,CAAA;IACvB,oEAAqB,CAAA;IACrB,sEAAuB,CAAA;IACvB,wEAAyB,CAAA;IACzB,0EAA2B,CAAA;IAC3B,kEAAmB,CAAA;IACnB,gEAAiB,CAAA;IACjB,4FAA6C,CAAA;AAC/C,CAAC,EATW,2CAA2C,GAA3C,mDAA2C,KAA3C,mDAA2C,QAStD","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 PresentationRules\r\n */\r\n\r\nimport { SingleSchemaClassSpecification } from \"../ClassSpecifications\";\r\nimport { RelationshipPathSpecification } from \"../RelationshipPathSpecification\";\r\nimport { RuleBase, RuleTypes } from \"../Rule\";\r\n\r\n/**\r\n * Instance label override rule provides a way to set instance label to one of its property values,\r\n * other attributes and/or combination of them.\r\n *\r\n * @see [Instance label override reference documentation page]($docs/presentation/customization/InstanceLabelOverride.md)\r\n * @public\r\n */\r\nexport interface InstanceLabelOverride extends RuleBase {\r\n /** Used for serializing to JSON. */\r\n ruleType: RuleTypes.InstanceLabelOverride;\r\n\r\n /**\r\n * Specifies the ECClass to apply this rule to.\r\n */\r\n class: SingleSchemaClassSpecification;\r\n\r\n /**\r\n * Specifications of values used to override label. The first non-empty value is used as the actual label.\r\n */\r\n values: InstanceLabelOverrideValueSpecification[];\r\n}\r\n\r\n/**\r\n * Types of possible [[InstanceLabelOverride]] label values.\r\n * @public\r\n */\r\nexport enum InstanceLabelOverrideValueSpecificationType {\r\n Composite = \"Composite\",\r\n Property = \"Property\",\r\n ClassName = \"ClassName\",\r\n ClassLabel = \"ClassLabel\",\r\n BriefcaseId = \"BriefcaseId\",\r\n LocalId = \"LocalId\",\r\n String = \"String\",\r\n RelatedInstanceLabel = \"RelatedInstanceLabel\",\r\n}\r\n\r\n/**\r\n * Base interface for all [[InstanceLabelOverrideValueSpecification]] implementations.\r\n * @public\r\n */\r\nexport interface InstanceLabelOverrideValueSpecificationBase {\r\n /** Type of the specification */\r\n specType: InstanceLabelOverrideValueSpecificationType;\r\n}\r\n\r\n/**\r\n * Specification allows creating a label value composited using multiple other specifications.\r\n *\r\n * @see [Composite value specification reference documentation page]($docs/presentation/customization/InstanceLabelOverride.md#composite-value-specification)\r\n * @public\r\n */\r\nexport interface InstanceLabelOverrideCompositeValueSpecification extends InstanceLabelOverrideValueSpecificationBase {\r\n specType: InstanceLabelOverrideValueSpecificationType.Composite;\r\n\r\n /**\r\n * Parts of the value.\r\n *\r\n * If any of the parts with `isRequired` flag evaluate to an empty string, the\r\n * result of this specification is also an empty string.\r\n */\r\n parts: Array<{ spec: InstanceLabelOverrideValueSpecification, isRequired?: boolean }>;\r\n\r\n /** Separator to use when joining the parts. Defaults to a space character. */\r\n separator?: string;\r\n}\r\n\r\n/**\r\n * Specification uses property value as the label content.\r\n *\r\n * @see [Property value specification reference documentation page]($docs/presentation/customization/InstanceLabelOverride.md#property-value-specification)\r\n * @public\r\n */\r\nexport interface InstanceLabelOverridePropertyValueSpecification extends InstanceLabelOverrideValueSpecificationBase {\r\n specType: InstanceLabelOverrideValueSpecificationType.Property;\r\n\r\n /**\r\n * Name of the property whose value should be used.\r\n * @note A property with this name must exist on the property class (see [[propertySource]]).\r\n */\r\n propertyName: string;\r\n\r\n /**\r\n * [Specification of the relationship path]($docs/presentation/RelationshipPathSpecification.md) from `InstanceLabelOverride.class`\r\n * to class of the property. If omitted, `InstanceLabelOverride.class` is used as property class.\r\n * @beta\r\n */\r\n propertySource?: RelationshipPathSpecification;\r\n}\r\n\r\n/**\r\n * Specification uses ECClass name as the label content.\r\n *\r\n * @see [Class name value specification reference documentation page]($docs/presentation/customization/InstanceLabelOverride.md#class-name-value-specification)\r\n * @public\r\n */\r\nexport interface InstanceLabelOverrideClassNameSpecification extends InstanceLabelOverrideValueSpecificationBase {\r\n specType: InstanceLabelOverrideValueSpecificationType.ClassName;\r\n\r\n /** Should full (`{schemaName}.{className}`) class name be used */\r\n full?: boolean;\r\n}\r\n\r\n/**\r\n * Specification uses ECClass display label as the label content.\r\n *\r\n * @see [Class label value specification reference documentation page]($docs/presentation/customization/InstanceLabelOverride.md#class-label-value-specification)\r\n * @public\r\n */\r\nexport interface InstanceLabelOverrideClassLabelSpecification extends InstanceLabelOverrideValueSpecificationBase {\r\n specType: InstanceLabelOverrideValueSpecificationType.ClassLabel;\r\n}\r\n\r\n/**\r\n * Specification returns ECInstance's briefcase ID in base36 format.\r\n *\r\n * @see [BriefcaseId value specification reference documentation page]($docs/presentation/customization/InstanceLabelOverride.md#briefcaseid-value-specification)\r\n * @public\r\n */\r\nexport interface InstanceLabelOverrideBriefcaseIdSpecification extends InstanceLabelOverrideValueSpecificationBase {\r\n specType: InstanceLabelOverrideValueSpecificationType.BriefcaseId;\r\n}\r\n\r\n/**\r\n * Specification returns ECInstance's local ID in base36 format.\r\n *\r\n * @see [LocalId value specification reference documentation page]($docs/presentation/customization/InstanceLabelOverride.md#localid-value-specification)\r\n * @public\r\n */\r\nexport interface InstanceLabelOverrideLocalIdSpecification extends InstanceLabelOverrideValueSpecificationBase {\r\n specType: InstanceLabelOverrideValueSpecificationType.LocalId;\r\n}\r\n\r\n/**\r\n * Specification uses the specified value as the label content.\r\n *\r\n * @see [String value specification reference documentation page]($docs/presentation/customization/InstanceLabelOverride.md#string-value-specification)\r\n * @public\r\n */\r\nexport interface InstanceLabelOverrideStringValueSpecification extends InstanceLabelOverrideValueSpecificationBase {\r\n specType: InstanceLabelOverrideValueSpecificationType.String;\r\n\r\n /** The value to use as the label content. */\r\n value: string;\r\n}\r\n\r\n/**\r\n * Specification uses label of another related instance as the label content.\r\n *\r\n * @see [Related instance label value specification reference documentation page]($docs/presentation/customization/InstanceLabelOverride.md#related-instance-label-value-specification)\r\n * @public\r\n */\r\nexport interface InstanceLabelOverrideRelatedInstanceLabelSpecification extends InstanceLabelOverrideValueSpecificationBase {\r\n specType: InstanceLabelOverrideValueSpecificationType.RelatedInstanceLabel;\r\n\r\n /**\r\n * [Specification of the relationship path]($docs/presentation/RelationshipPathSpecification.md) from `InstanceLabelOverride.class`\r\n * to class of the related instance.\r\n */\r\n pathToRelatedInstance: RelationshipPathSpecification;\r\n}\r\n\r\n/**\r\n * Specification to define how the label for [[InstanceLabelOverride]] should be created.\r\n * @public\r\n */\r\nexport type InstanceLabelOverrideValueSpecification =\r\n InstanceLabelOverrideCompositeValueSpecification | InstanceLabelOverridePropertyValueSpecification |\r\n InstanceLabelOverrideStringValueSpecification | InstanceLabelOverrideClassNameSpecification |\r\n InstanceLabelOverrideClassLabelSpecification | InstanceLabelOverrideBriefcaseIdSpecification |\r\n InstanceLabelOverrideLocalIdSpecification | InstanceLabelOverrideRelatedInstanceLabelSpecification;\r\n"]}