@itwin/presentation-common 5.0.0-dev.11 → 5.0.0-dev.111

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 (507) hide show
  1. package/CHANGELOG.md +79 -1
  2. package/Ruleset.schema.json +3 -258
  3. package/lib/{cjs/assets → assets}/locales/en/Presentation.json +19 -19
  4. package/lib/cjs/package.json +1 -0
  5. package/lib/cjs/presentation-common/AsyncTasks.d.ts +4 -4
  6. package/lib/cjs/presentation-common/AsyncTasks.d.ts.map +1 -1
  7. package/lib/cjs/presentation-common/AsyncTasks.js +5 -6
  8. package/lib/cjs/presentation-common/AsyncTasks.js.map +1 -1
  9. package/lib/cjs/presentation-common/CommonLoggerCategory.js.map +1 -1
  10. package/lib/cjs/presentation-common/Diagnostics.js.map +1 -1
  11. package/lib/cjs/presentation-common/EC.d.ts +37 -81
  12. package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
  13. package/lib/cjs/presentation-common/EC.js +1 -97
  14. package/lib/cjs/presentation-common/EC.js.map +1 -1
  15. package/lib/cjs/presentation-common/ElementProperties.d.ts +2 -2
  16. package/lib/cjs/presentation-common/ElementProperties.d.ts.map +1 -1
  17. package/lib/cjs/presentation-common/ElementProperties.js +22 -15
  18. package/lib/cjs/presentation-common/ElementProperties.js.map +1 -1
  19. package/lib/cjs/presentation-common/Error.d.ts +2 -0
  20. package/lib/cjs/presentation-common/Error.d.ts.map +1 -1
  21. package/lib/cjs/presentation-common/Error.js +2 -0
  22. package/lib/cjs/presentation-common/Error.js.map +1 -1
  23. package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts +1 -1
  24. package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
  25. package/lib/cjs/presentation-common/InstanceFilterDefinition.js.map +1 -1
  26. package/lib/cjs/presentation-common/KeySet.d.ts +3 -3
  27. package/lib/cjs/presentation-common/KeySet.d.ts.map +1 -1
  28. package/lib/cjs/presentation-common/KeySet.js +20 -22
  29. package/lib/cjs/presentation-common/KeySet.js.map +1 -1
  30. package/lib/cjs/presentation-common/KoqPropertyValueFormatter.js +15 -11
  31. package/lib/cjs/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
  32. package/lib/cjs/presentation-common/LabelDefinition.d.ts +2 -50
  33. package/lib/cjs/presentation-common/LabelDefinition.d.ts.map +1 -1
  34. package/lib/cjs/presentation-common/LabelDefinition.js +4 -47
  35. package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
  36. package/lib/cjs/presentation-common/LocalizationHelper.d.ts +10 -10
  37. package/lib/cjs/presentation-common/LocalizationHelper.d.ts.map +1 -1
  38. package/lib/cjs/presentation-common/LocalizationHelper.js +13 -12
  39. package/lib/cjs/presentation-common/LocalizationHelper.js.map +1 -1
  40. package/lib/cjs/presentation-common/PresentationIpcInterface.d.ts +12 -7
  41. package/lib/cjs/presentation-common/PresentationIpcInterface.d.ts.map +1 -1
  42. package/lib/cjs/presentation-common/PresentationIpcInterface.js +9 -1
  43. package/lib/cjs/presentation-common/PresentationIpcInterface.js.map +1 -1
  44. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts +40 -25
  45. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  46. package/lib/cjs/presentation-common/PresentationManagerOptions.js +0 -5
  47. package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
  48. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts +22 -29
  49. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  50. package/lib/cjs/presentation-common/PresentationRpcInterface.js +41 -36
  51. package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
  52. package/lib/cjs/presentation-common/RegisteredRuleset.d.ts +6 -5
  53. package/lib/cjs/presentation-common/RegisteredRuleset.d.ts.map +1 -1
  54. package/lib/cjs/presentation-common/RegisteredRuleset.js +9 -1
  55. package/lib/cjs/presentation-common/RegisteredRuleset.js.map +1 -1
  56. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts +21 -24
  57. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  58. package/lib/cjs/presentation-common/RpcRequestsHandler.js +42 -35
  59. package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
  60. package/lib/cjs/presentation-common/RulesetVariables.d.ts +1 -46
  61. package/lib/cjs/presentation-common/RulesetVariables.d.ts.map +1 -1
  62. package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
  63. package/lib/cjs/presentation-common/RulesetsFactory.d.ts +4 -4
  64. package/lib/cjs/presentation-common/RulesetsFactory.d.ts.map +1 -1
  65. package/lib/cjs/presentation-common/RulesetsFactory.js +15 -15
  66. package/lib/cjs/presentation-common/RulesetsFactory.js.map +1 -1
  67. package/lib/cjs/presentation-common/Update.d.ts +2 -79
  68. package/lib/cjs/presentation-common/Update.d.ts.map +1 -1
  69. package/lib/cjs/presentation-common/Update.js +1 -104
  70. package/lib/cjs/presentation-common/Update.js.map +1 -1
  71. package/lib/cjs/presentation-common/Utils.d.ts +22 -1
  72. package/lib/cjs/presentation-common/Utils.d.ts.map +1 -1
  73. package/lib/cjs/presentation-common/Utils.js +59 -3
  74. package/lib/cjs/presentation-common/Utils.js.map +1 -1
  75. package/lib/cjs/presentation-common/content/Category.d.ts +1 -1
  76. package/lib/cjs/presentation-common/content/Category.d.ts.map +1 -1
  77. package/lib/cjs/presentation-common/content/Category.js.map +1 -1
  78. package/lib/cjs/presentation-common/content/Content.d.ts +2 -9
  79. package/lib/cjs/presentation-common/content/Content.d.ts.map +1 -1
  80. package/lib/cjs/presentation-common/content/Content.js +9 -14
  81. package/lib/cjs/presentation-common/content/Content.js.map +1 -1
  82. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts +9 -9
  83. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  84. package/lib/cjs/presentation-common/content/ContentTraverser.js +138 -50
  85. package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
  86. package/lib/cjs/presentation-common/content/Descriptor.d.ts +7 -52
  87. package/lib/cjs/presentation-common/content/Descriptor.d.ts.map +1 -1
  88. package/lib/cjs/presentation-common/content/Descriptor.js +82 -53
  89. package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
  90. package/lib/cjs/presentation-common/content/DisplayTypes.js.map +1 -1
  91. package/lib/cjs/presentation-common/content/Editor.js.map +1 -1
  92. package/lib/cjs/presentation-common/content/Fields.d.ts +157 -33
  93. package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
  94. package/lib/cjs/presentation-common/content/Fields.js +275 -151
  95. package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
  96. package/lib/cjs/presentation-common/content/Item.d.ts +28 -33
  97. package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
  98. package/lib/cjs/presentation-common/content/Item.js +53 -68
  99. package/lib/cjs/presentation-common/content/Item.js.map +1 -1
  100. package/lib/cjs/presentation-common/content/Property.d.ts +2 -14
  101. package/lib/cjs/presentation-common/content/Property.d.ts.map +1 -1
  102. package/lib/cjs/presentation-common/content/Property.js +2 -20
  103. package/lib/cjs/presentation-common/content/Property.js.map +1 -1
  104. package/lib/cjs/presentation-common/content/PropertyValueFormatter.d.ts +6 -6
  105. package/lib/cjs/presentation-common/content/PropertyValueFormatter.d.ts.map +1 -1
  106. package/lib/cjs/presentation-common/content/PropertyValueFormatter.js +12 -9
  107. package/lib/cjs/presentation-common/content/PropertyValueFormatter.js.map +1 -1
  108. package/lib/cjs/presentation-common/content/Renderer.js.map +1 -1
  109. package/lib/cjs/presentation-common/content/TypeDescription.js.map +1 -1
  110. package/lib/cjs/presentation-common/content/Value.d.ts +8 -110
  111. package/lib/cjs/presentation-common/content/Value.d.ts.map +1 -1
  112. package/lib/cjs/presentation-common/content/Value.js +1 -215
  113. package/lib/cjs/presentation-common/content/Value.js.map +1 -1
  114. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts +1 -22
  115. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -1
  116. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js +0 -23
  117. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
  118. package/lib/cjs/presentation-common/hierarchy/Key.d.ts +1 -84
  119. package/lib/cjs/presentation-common/hierarchy/Key.d.ts.map +1 -1
  120. package/lib/cjs/presentation-common/hierarchy/Key.js +8 -26
  121. package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
  122. package/lib/cjs/presentation-common/hierarchy/Node.d.ts +4 -107
  123. package/lib/cjs/presentation-common/hierarchy/Node.d.ts.map +1 -1
  124. package/lib/cjs/presentation-common/hierarchy/Node.js +0 -99
  125. package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
  126. package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts +1 -67
  127. package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
  128. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js +0 -117
  129. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  130. package/lib/cjs/presentation-common/rules/ClassSpecifications.js.map +1 -1
  131. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.d.ts +2 -2
  132. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.d.ts.map +1 -1
  133. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
  134. package/lib/cjs/presentation-common/rules/RelationshipDirection.js.map +1 -1
  135. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts +2 -2
  136. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts.map +1 -1
  137. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  138. package/lib/cjs/presentation-common/rules/Rule.d.ts +6 -20
  139. package/lib/cjs/presentation-common/rules/Rule.d.ts.map +1 -1
  140. package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
  141. package/lib/cjs/presentation-common/rules/Ruleset.d.ts +3 -3
  142. package/lib/cjs/presentation-common/rules/Ruleset.d.ts.map +1 -1
  143. package/lib/cjs/presentation-common/rules/Ruleset.js.map +1 -1
  144. package/lib/cjs/presentation-common/rules/SchemasSpecification.js.map +1 -1
  145. package/lib/cjs/presentation-common/rules/Variables.js.map +1 -1
  146. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +2 -2
  147. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts.map +1 -1
  148. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  149. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +2 -2
  150. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts.map +1 -1
  151. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  152. package/lib/cjs/presentation-common/rules/content/ContentRule.d.ts +2 -2
  153. package/lib/cjs/presentation-common/rules/content/ContentRule.d.ts.map +1 -1
  154. package/lib/cjs/presentation-common/rules/content/ContentRule.js.map +1 -1
  155. package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts +5 -12
  156. package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
  157. package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  158. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +2 -2
  159. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts.map +1 -1
  160. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  161. package/lib/cjs/presentation-common/rules/content/PropertySpecification.d.ts +3 -3
  162. package/lib/cjs/presentation-common/rules/content/PropertySpecification.d.ts.map +1 -1
  163. package/lib/cjs/presentation-common/rules/content/PropertySpecification.js.map +1 -1
  164. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +1 -1
  165. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts.map +1 -1
  166. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  167. package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts +3 -3
  168. package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts.map +1 -1
  169. package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
  170. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.d.ts +6 -6
  171. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.d.ts.map +1 -1
  172. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  173. package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
  174. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts +1 -1
  175. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts.map +1 -1
  176. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
  177. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  178. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +2 -2
  179. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts.map +1 -1
  180. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  181. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts +6 -10
  182. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts.map +1 -1
  183. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  184. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.d.ts +1 -1
  185. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.d.ts.map +1 -1
  186. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  187. package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts +4 -30
  188. package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
  189. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js +1 -15
  190. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  191. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts +3 -3
  192. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
  193. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  194. package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts +2 -2
  195. package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts.map +1 -1
  196. package/lib/cjs/presentation-common/rules/customization/SortingRule.js.map +1 -1
  197. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +1 -1
  198. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.d.ts.map +1 -1
  199. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  200. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +6 -6
  201. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
  202. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  203. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +3 -1
  204. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
  205. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  206. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +2 -2
  207. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts.map +1 -1
  208. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  209. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +2 -11
  210. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
  211. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  212. package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.d.ts +6 -6
  213. package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.d.ts.map +1 -1
  214. package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
  215. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +1 -1
  216. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts.map +1 -1
  217. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  218. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +2 -2
  219. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts.map +1 -1
  220. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  221. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.d.ts +1 -1
  222. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.d.ts.map +1 -1
  223. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  224. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.d.ts +2 -2
  225. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.d.ts.map +1 -1
  226. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  227. package/lib/cjs/presentation-common/selection/SelectionScope.d.ts +3 -0
  228. package/lib/cjs/presentation-common/selection/SelectionScope.d.ts.map +1 -1
  229. package/lib/cjs/presentation-common/selection/SelectionScope.js +1 -0
  230. package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
  231. package/lib/cjs/presentation-common-internal.d.ts +10 -0
  232. package/lib/cjs/presentation-common-internal.d.ts.map +1 -0
  233. package/lib/cjs/presentation-common-internal.js +32 -0
  234. package/lib/cjs/presentation-common-internal.js.map +1 -0
  235. package/lib/cjs/presentation-common.d.ts +68 -77
  236. package/lib/cjs/presentation-common.d.ts.map +1 -1
  237. package/lib/cjs/presentation-common.js +110 -89
  238. package/lib/cjs/presentation-common.js.map +1 -1
  239. package/lib/esm/presentation-common/AsyncTasks.d.ts +4 -4
  240. package/lib/esm/presentation-common/AsyncTasks.d.ts.map +1 -1
  241. package/lib/esm/presentation-common/AsyncTasks.js +5 -6
  242. package/lib/esm/presentation-common/AsyncTasks.js.map +1 -1
  243. package/lib/esm/presentation-common/CommonLoggerCategory.js.map +1 -1
  244. package/lib/esm/presentation-common/Diagnostics.js.map +1 -1
  245. package/lib/esm/presentation-common/EC.d.ts +37 -81
  246. package/lib/esm/presentation-common/EC.d.ts.map +1 -1
  247. package/lib/esm/presentation-common/EC.js +0 -96
  248. package/lib/esm/presentation-common/EC.js.map +1 -1
  249. package/lib/esm/presentation-common/ElementProperties.d.ts +2 -2
  250. package/lib/esm/presentation-common/ElementProperties.d.ts.map +1 -1
  251. package/lib/esm/presentation-common/ElementProperties.js +18 -11
  252. package/lib/esm/presentation-common/ElementProperties.js.map +1 -1
  253. package/lib/esm/presentation-common/Error.d.ts +2 -0
  254. package/lib/esm/presentation-common/Error.d.ts.map +1 -1
  255. package/lib/esm/presentation-common/Error.js +2 -0
  256. package/lib/esm/presentation-common/Error.js.map +1 -1
  257. package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts +1 -1
  258. package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
  259. package/lib/esm/presentation-common/InstanceFilterDefinition.js.map +1 -1
  260. package/lib/esm/presentation-common/KeySet.d.ts +3 -3
  261. package/lib/esm/presentation-common/KeySet.d.ts.map +1 -1
  262. package/lib/esm/presentation-common/KeySet.js +10 -12
  263. package/lib/esm/presentation-common/KeySet.js.map +1 -1
  264. package/lib/esm/presentation-common/KoqPropertyValueFormatter.js +16 -12
  265. package/lib/esm/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
  266. package/lib/esm/presentation-common/LabelDefinition.d.ts +2 -50
  267. package/lib/esm/presentation-common/LabelDefinition.d.ts.map +1 -1
  268. package/lib/esm/presentation-common/LabelDefinition.js +3 -46
  269. package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
  270. package/lib/esm/presentation-common/LocalizationHelper.d.ts +10 -10
  271. package/lib/esm/presentation-common/LocalizationHelper.d.ts.map +1 -1
  272. package/lib/esm/presentation-common/LocalizationHelper.js +6 -5
  273. package/lib/esm/presentation-common/LocalizationHelper.js.map +1 -1
  274. package/lib/esm/presentation-common/PresentationIpcInterface.d.ts +12 -7
  275. package/lib/esm/presentation-common/PresentationIpcInterface.d.ts.map +1 -1
  276. package/lib/esm/presentation-common/PresentationIpcInterface.js +8 -0
  277. package/lib/esm/presentation-common/PresentationIpcInterface.js.map +1 -1
  278. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts +40 -25
  279. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  280. package/lib/esm/presentation-common/PresentationManagerOptions.js +0 -4
  281. package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
  282. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts +22 -29
  283. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  284. package/lib/esm/presentation-common/PresentationRpcInterface.js +42 -36
  285. package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
  286. package/lib/esm/presentation-common/RegisteredRuleset.d.ts +6 -5
  287. package/lib/esm/presentation-common/RegisteredRuleset.d.ts.map +1 -1
  288. package/lib/esm/presentation-common/RegisteredRuleset.js +9 -1
  289. package/lib/esm/presentation-common/RegisteredRuleset.js.map +1 -1
  290. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts +21 -24
  291. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  292. package/lib/esm/presentation-common/RpcRequestsHandler.js +42 -35
  293. package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
  294. package/lib/esm/presentation-common/RulesetVariables.d.ts +1 -46
  295. package/lib/esm/presentation-common/RulesetVariables.d.ts.map +1 -1
  296. package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
  297. package/lib/esm/presentation-common/RulesetsFactory.d.ts +4 -4
  298. package/lib/esm/presentation-common/RulesetsFactory.d.ts.map +1 -1
  299. package/lib/esm/presentation-common/RulesetsFactory.js +6 -6
  300. package/lib/esm/presentation-common/RulesetsFactory.js.map +1 -1
  301. package/lib/esm/presentation-common/Update.d.ts +2 -79
  302. package/lib/esm/presentation-common/Update.d.ts.map +1 -1
  303. package/lib/esm/presentation-common/Update.js +0 -103
  304. package/lib/esm/presentation-common/Update.js.map +1 -1
  305. package/lib/esm/presentation-common/Utils.d.ts +22 -1
  306. package/lib/esm/presentation-common/Utils.d.ts.map +1 -1
  307. package/lib/esm/presentation-common/Utils.js +54 -1
  308. package/lib/esm/presentation-common/Utils.js.map +1 -1
  309. package/lib/esm/presentation-common/content/Category.d.ts +1 -1
  310. package/lib/esm/presentation-common/content/Category.d.ts.map +1 -1
  311. package/lib/esm/presentation-common/content/Category.js.map +1 -1
  312. package/lib/esm/presentation-common/content/Content.d.ts +2 -9
  313. package/lib/esm/presentation-common/content/Content.d.ts.map +1 -1
  314. package/lib/esm/presentation-common/content/Content.js +7 -12
  315. package/lib/esm/presentation-common/content/Content.js.map +1 -1
  316. package/lib/esm/presentation-common/content/ContentTraverser.d.ts +9 -9
  317. package/lib/esm/presentation-common/content/ContentTraverser.d.ts.map +1 -1
  318. package/lib/esm/presentation-common/content/ContentTraverser.js +123 -35
  319. package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
  320. package/lib/esm/presentation-common/content/Descriptor.d.ts +7 -52
  321. package/lib/esm/presentation-common/content/Descriptor.d.ts.map +1 -1
  322. package/lib/esm/presentation-common/content/Descriptor.js +71 -42
  323. package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
  324. package/lib/esm/presentation-common/content/DisplayTypes.js.map +1 -1
  325. package/lib/esm/presentation-common/content/Editor.js.map +1 -1
  326. package/lib/esm/presentation-common/content/Fields.d.ts +157 -33
  327. package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
  328. package/lib/esm/presentation-common/content/Fields.js +268 -144
  329. package/lib/esm/presentation-common/content/Fields.js.map +1 -1
  330. package/lib/esm/presentation-common/content/Item.d.ts +28 -33
  331. package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
  332. package/lib/esm/presentation-common/content/Item.js +53 -68
  333. package/lib/esm/presentation-common/content/Item.js.map +1 -1
  334. package/lib/esm/presentation-common/content/Property.d.ts +2 -14
  335. package/lib/esm/presentation-common/content/Property.d.ts.map +1 -1
  336. package/lib/esm/presentation-common/content/Property.js +1 -19
  337. package/lib/esm/presentation-common/content/Property.js.map +1 -1
  338. package/lib/esm/presentation-common/content/PropertyValueFormatter.d.ts +6 -6
  339. package/lib/esm/presentation-common/content/PropertyValueFormatter.d.ts.map +1 -1
  340. package/lib/esm/presentation-common/content/PropertyValueFormatter.js +5 -2
  341. package/lib/esm/presentation-common/content/PropertyValueFormatter.js.map +1 -1
  342. package/lib/esm/presentation-common/content/Renderer.js.map +1 -1
  343. package/lib/esm/presentation-common/content/TypeDescription.js.map +1 -1
  344. package/lib/esm/presentation-common/content/Value.d.ts +8 -110
  345. package/lib/esm/presentation-common/content/Value.d.ts.map +1 -1
  346. package/lib/esm/presentation-common/content/Value.js +0 -214
  347. package/lib/esm/presentation-common/content/Value.js.map +1 -1
  348. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts +1 -22
  349. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -1
  350. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js +1 -22
  351. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
  352. package/lib/esm/presentation-common/hierarchy/Key.d.ts +1 -84
  353. package/lib/esm/presentation-common/hierarchy/Key.d.ts.map +1 -1
  354. package/lib/esm/presentation-common/hierarchy/Key.js +7 -25
  355. package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
  356. package/lib/esm/presentation-common/hierarchy/Node.d.ts +4 -107
  357. package/lib/esm/presentation-common/hierarchy/Node.d.ts.map +1 -1
  358. package/lib/esm/presentation-common/hierarchy/Node.js +1 -98
  359. package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
  360. package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts +1 -67
  361. package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
  362. package/lib/esm/presentation-common/hierarchy/NodePathElement.js +1 -116
  363. package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  364. package/lib/esm/presentation-common/rules/ClassSpecifications.js.map +1 -1
  365. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.d.ts +2 -2
  366. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.d.ts.map +1 -1
  367. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
  368. package/lib/esm/presentation-common/rules/RelationshipDirection.js.map +1 -1
  369. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts +2 -2
  370. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts.map +1 -1
  371. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  372. package/lib/esm/presentation-common/rules/Rule.d.ts +6 -20
  373. package/lib/esm/presentation-common/rules/Rule.d.ts.map +1 -1
  374. package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
  375. package/lib/esm/presentation-common/rules/Ruleset.d.ts +3 -3
  376. package/lib/esm/presentation-common/rules/Ruleset.d.ts.map +1 -1
  377. package/lib/esm/presentation-common/rules/Ruleset.js.map +1 -1
  378. package/lib/esm/presentation-common/rules/SchemasSpecification.js.map +1 -1
  379. package/lib/esm/presentation-common/rules/Variables.js.map +1 -1
  380. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +2 -2
  381. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts.map +1 -1
  382. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  383. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +2 -2
  384. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts.map +1 -1
  385. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  386. package/lib/esm/presentation-common/rules/content/ContentRule.d.ts +2 -2
  387. package/lib/esm/presentation-common/rules/content/ContentRule.d.ts.map +1 -1
  388. package/lib/esm/presentation-common/rules/content/ContentRule.js.map +1 -1
  389. package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts +5 -12
  390. package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
  391. package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  392. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +2 -2
  393. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts.map +1 -1
  394. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  395. package/lib/esm/presentation-common/rules/content/PropertySpecification.d.ts +3 -3
  396. package/lib/esm/presentation-common/rules/content/PropertySpecification.d.ts.map +1 -1
  397. package/lib/esm/presentation-common/rules/content/PropertySpecification.js.map +1 -1
  398. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +1 -1
  399. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts.map +1 -1
  400. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  401. package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts +3 -3
  402. package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts.map +1 -1
  403. package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
  404. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.d.ts +6 -6
  405. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.d.ts.map +1 -1
  406. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  407. package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
  408. package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts +1 -1
  409. package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts.map +1 -1
  410. package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
  411. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  412. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +2 -2
  413. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts.map +1 -1
  414. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  415. package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts +6 -10
  416. package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts.map +1 -1
  417. package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  418. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.d.ts +1 -1
  419. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.d.ts.map +1 -1
  420. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  421. package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts +4 -30
  422. package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
  423. package/lib/esm/presentation-common/rules/customization/GroupingRule.js +0 -14
  424. package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  425. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts +3 -3
  426. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
  427. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  428. package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts +2 -2
  429. package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts.map +1 -1
  430. package/lib/esm/presentation-common/rules/customization/SortingRule.js.map +1 -1
  431. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +1 -1
  432. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.d.ts.map +1 -1
  433. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  434. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +6 -6
  435. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
  436. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  437. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +3 -1
  438. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
  439. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  440. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +2 -2
  441. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts.map +1 -1
  442. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  443. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +2 -11
  444. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
  445. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  446. package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.d.ts +6 -6
  447. package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.d.ts.map +1 -1
  448. package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
  449. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +1 -1
  450. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts.map +1 -1
  451. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  452. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +2 -2
  453. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts.map +1 -1
  454. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  455. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.d.ts +1 -1
  456. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.d.ts.map +1 -1
  457. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  458. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.d.ts +2 -2
  459. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.d.ts.map +1 -1
  460. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  461. package/lib/esm/presentation-common/selection/SelectionScope.d.ts +3 -0
  462. package/lib/esm/presentation-common/selection/SelectionScope.d.ts.map +1 -1
  463. package/lib/esm/presentation-common/selection/SelectionScope.js +1 -0
  464. package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
  465. package/lib/esm/presentation-common-internal.d.ts +10 -0
  466. package/lib/esm/presentation-common-internal.d.ts.map +1 -0
  467. package/lib/esm/presentation-common-internal.js +16 -0
  468. package/lib/esm/presentation-common-internal.js.map +1 -0
  469. package/lib/esm/presentation-common.d.ts +68 -77
  470. package/lib/esm/presentation-common.d.ts.map +1 -1
  471. package/lib/esm/presentation-common.js +60 -89
  472. package/lib/esm/presentation-common.js.map +1 -1
  473. package/lib/public/locales/en/Presentation.json +19 -19
  474. package/package.json +47 -36
  475. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts +0 -45
  476. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts.map +0 -1
  477. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js +0 -10
  478. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js.map +0 -1
  479. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts +0 -30
  480. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts.map +0 -1
  481. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js +0 -10
  482. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js.map +0 -1
  483. package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts +0 -41
  484. package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts.map +0 -1
  485. package/lib/cjs/presentation-common/rules/customization/LabelOverride.js +0 -10
  486. package/lib/cjs/presentation-common/rules/customization/LabelOverride.js.map +0 -1
  487. package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts +0 -49
  488. package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts.map +0 -1
  489. package/lib/cjs/presentation-common/rules/customization/StyleOverride.js +0 -10
  490. package/lib/cjs/presentation-common/rules/customization/StyleOverride.js.map +0 -1
  491. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts +0 -45
  492. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts.map +0 -1
  493. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js +0 -9
  494. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js.map +0 -1
  495. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts +0 -30
  496. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts.map +0 -1
  497. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js +0 -9
  498. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js.map +0 -1
  499. package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts +0 -41
  500. package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts.map +0 -1
  501. package/lib/esm/presentation-common/rules/customization/LabelOverride.js +0 -9
  502. package/lib/esm/presentation-common/rules/customization/LabelOverride.js.map +0 -1
  503. package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts +0 -49
  504. package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts.map +0 -1
  505. package/lib/esm/presentation-common/rules/customization/StyleOverride.js +0 -9
  506. package/lib/esm/presentation-common/rules/customization/StyleOverride.js.map +0 -1
  507. /package/lib/{cjs/assets → assets}/locales/en-PSEUDO/Presentation.json +0 -0
@@ -1,7 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module Content
3
3
  */
4
- import { ClassInfoJSON, CompressedClassInfoJSON, PropertyInfo, PropertyInfoJSON } from "../EC";
4
+ import { ClassInfo, CompressedClassInfoJSON, PropertyInfo, PropertyInfoJSON } from "../EC.js";
5
5
  /**
6
6
  * Data structure that describes one step of property
7
7
  * accessor path.
@@ -23,8 +23,6 @@ export type PropertyAccessorPath = PropertyAccessor[];
23
23
  * Data structure that describes a single ECProperty that's
24
24
  * included in a [[PropertiesField]].
25
25
  *
26
- * TODO: Remove?
27
- *
28
26
  * @public
29
27
  */
30
28
  export interface Property {
@@ -33,26 +31,16 @@ export interface Property {
33
31
  }
34
32
  /** @public */
35
33
  export declare namespace Property {
36
- /**
37
- * Serialize [[Property]] to JSON
38
- * @deprecated in 3.x. Use [[toCompressedJSON]]
39
- */
40
- function toJSON(prop: Property): PropertyJSON;
41
34
  /** Serialize [[Property]] to compressed JSON */
42
35
  function toCompressedJSON(prop: Property, classesMap: {
43
36
  [id: string]: CompressedClassInfoJSON;
44
37
  }): PropertyJSON<string>;
45
- /**
46
- * Deserializes [[Property]] from JSON
47
- * @deprecated in 3.x. Use [[Property]]
48
- */
49
- function fromJSON(json: PropertyJSON): Property;
50
38
  }
51
39
  /**
52
40
  * JSON representation of [[Property]]
53
41
  * @public
54
42
  */
55
- export interface PropertyJSON<TClassInfoJSON = ClassInfoJSON> {
43
+ export interface PropertyJSON<TClassInfoJSON = ClassInfo> {
56
44
  property: PropertyInfoJSON<TClassInfoJSON>;
57
45
  }
58
46
  //# sourceMappingURL=Property.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Property.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Property.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAE/F;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yBAAyB;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,EAAE,CAAC;AAEtD;;;;;;;GAOG;AACH,MAAM,WAAW,QAAQ;IACvB,6BAA6B;IAC7B,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED,cAAc;AACd,yBAAiB,QAAQ,CAAC;IACxB;;;OAGG;IAEH,SAAgB,MAAM,CAAC,IAAI,EAAE,QAAQ,GAAG,YAAY,CAEnD;IAED,gDAAgD;IAChD,SAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE;QAAE,CAAC,EAAE,EAAE,MAAM,GAAG,uBAAuB,CAAA;KAAE,GAAG,YAAY,CAAC,MAAM,CAAC,CAI5H;IAED;;;OAGG;IAEH,SAAgB,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,QAAQ,CAErD;CACF;AAED;;;GAGG;AAEH,MAAM,WAAW,YAAY,CAAC,cAAc,GAAG,aAAa;IAC1D,QAAQ,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;CAC5C"}
1
+ {"version":3,"file":"Property.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Property.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE9F;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yBAAyB;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,EAAE,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,6BAA6B;IAC7B,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED,cAAc;AACd,yBAAiB,QAAQ,CAAC;IACxB,gDAAgD;IAChD,SAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE;QAAE,CAAC,EAAE,EAAE,MAAM,GAAG,uBAAuB,CAAA;KAAE,GAAG,YAAY,CAAC,MAAM,CAAC,CAI5H;CACF;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY,CAAC,cAAc,GAAG,SAAS;IACtD,QAAQ,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;CAC5C"}
@@ -8,34 +8,16 @@
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.Property = void 0;
11
- const EC_1 = require("../EC");
11
+ const EC_js_1 = require("../EC.js");
12
12
  /** @public */
13
13
  var Property;
14
14
  (function (Property) {
15
- /**
16
- * Serialize [[Property]] to JSON
17
- * @deprecated in 3.x. Use [[toCompressedJSON]]
18
- */
19
- // istanbul ignore next
20
- function toJSON(prop) {
21
- return { ...prop };
22
- }
23
- Property.toJSON = toJSON;
24
15
  /** Serialize [[Property]] to compressed JSON */
25
16
  function toCompressedJSON(prop, classesMap) {
26
17
  return {
27
- property: EC_1.PropertyInfo.toCompressedJSON(prop.property, classesMap),
18
+ property: EC_js_1.PropertyInfo.toCompressedJSON(prop.property, classesMap),
28
19
  };
29
20
  }
30
21
  Property.toCompressedJSON = toCompressedJSON;
31
- /**
32
- * Deserializes [[Property]] from JSON
33
- * @deprecated in 3.x. Use [[Property]]
34
- */
35
- // istanbul ignore next
36
- function fromJSON(json) {
37
- return { ...json };
38
- }
39
- Property.fromJSON = fromJSON;
40
22
  })(Property || (exports.Property = Property = {}));
41
23
  //# sourceMappingURL=Property.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Property.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Property.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,8BAA+F;AAkC/F,cAAc;AACd,IAAiB,QAAQ,CAyBxB;AAzBD,WAAiB,QAAQ;IACvB;;;OAGG;IACH,uBAAuB;IACvB,SAAgB,MAAM,CAAC,IAAc;QACnC,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;IACrB,CAAC;IAFe,eAAM,SAErB,CAAA;IAED,gDAAgD;IAChD,SAAgB,gBAAgB,CAAC,IAAc,EAAE,UAAqD;QACpG,OAAO;YACL,QAAQ,EAAE,iBAAY,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;SACnE,CAAC;IACJ,CAAC;IAJe,yBAAgB,mBAI/B,CAAA;IAED;;;OAGG;IACH,uBAAuB;IACvB,SAAgB,QAAQ,CAAC,IAAkB;QACzC,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;IACrB,CAAC;IAFe,iBAAQ,WAEvB,CAAA;AACH,CAAC,EAzBgB,QAAQ,wBAAR,QAAQ,QAyBxB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\nimport { ClassInfoJSON, CompressedClassInfoJSON, PropertyInfo, PropertyInfoJSON } from \"../EC\";\r\n\r\n/**\r\n * Data structure that describes one step of property\r\n * accessor path.\r\n *\r\n * @public\r\n */\r\nexport interface PropertyAccessor {\r\n /** Name of ECProperty */\r\n propertyName: string;\r\n /** If the property is an array, array index. Otherwise undefined. */\r\n arrayIndex?: number;\r\n}\r\n\r\n/**\r\n * Describes path to a property.\r\n * @public\r\n */\r\nexport type PropertyAccessorPath = PropertyAccessor[];\r\n\r\n/**\r\n * Data structure that describes a single ECProperty that's\r\n * included in a [[PropertiesField]].\r\n *\r\n * TODO: Remove?\r\n *\r\n * @public\r\n */\r\nexport interface Property {\r\n /** ECProperty information */\r\n property: PropertyInfo;\r\n}\r\n\r\n/** @public */\r\nexport namespace Property {\r\n /**\r\n * Serialize [[Property]] to JSON\r\n * @deprecated in 3.x. Use [[toCompressedJSON]]\r\n */\r\n // istanbul ignore next\r\n export function toJSON(prop: Property): PropertyJSON {\r\n return { ...prop };\r\n }\r\n\r\n /** Serialize [[Property]] to compressed JSON */\r\n export function toCompressedJSON(prop: Property, classesMap: { [id: string]: CompressedClassInfoJSON }): PropertyJSON<string> {\r\n return {\r\n property: PropertyInfo.toCompressedJSON(prop.property, classesMap),\r\n };\r\n }\r\n\r\n /**\r\n * Deserializes [[Property]] from JSON\r\n * @deprecated in 3.x. Use [[Property]]\r\n */\r\n // istanbul ignore next\r\n export function fromJSON(json: PropertyJSON): Property {\r\n return { ...json };\r\n }\r\n}\r\n\r\n/**\r\n * JSON representation of [[Property]]\r\n * @public\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport interface PropertyJSON<TClassInfoJSON = ClassInfoJSON> {\r\n property: PropertyInfoJSON<TClassInfoJSON>;\r\n}\r\n"]}
1
+ {"version":3,"file":"Property.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Property.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,oCAA8F;AAgC9F,cAAc;AACd,IAAiB,QAAQ,CAOxB;AAPD,WAAiB,QAAQ;IACvB,gDAAgD;IAChD,SAAgB,gBAAgB,CAAC,IAAc,EAAE,UAAqD;QACpG,OAAO;YACL,QAAQ,EAAE,oBAAY,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;SACnE,CAAC;IACJ,CAAC;IAJe,yBAAgB,mBAI/B,CAAA;AACH,CAAC,EAPgB,QAAQ,wBAAR,QAAQ,QAOxB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\nimport { ClassInfo, CompressedClassInfoJSON, PropertyInfo, PropertyInfoJSON } from \"../EC.js\";\n\n/**\n * Data structure that describes one step of property\n * accessor path.\n *\n * @public\n */\nexport interface PropertyAccessor {\n /** Name of ECProperty */\n propertyName: string;\n /** If the property is an array, array index. Otherwise undefined. */\n arrayIndex?: number;\n}\n\n/**\n * Describes path to a property.\n * @public\n */\nexport type PropertyAccessorPath = PropertyAccessor[];\n\n/**\n * Data structure that describes a single ECProperty that's\n * included in a [[PropertiesField]].\n *\n * @public\n */\nexport interface Property {\n /** ECProperty information */\n property: PropertyInfo;\n}\n\n/** @public */\nexport namespace Property {\n /** Serialize [[Property]] to compressed JSON */\n export function toCompressedJSON(prop: Property, classesMap: { [id: string]: CompressedClassInfoJSON }): PropertyJSON<string> {\n return {\n property: PropertyInfo.toCompressedJSON(prop.property, classesMap),\n };\n }\n}\n\n/**\n * JSON representation of [[Property]]\n * @public\n */\nexport interface PropertyJSON<TClassInfoJSON = ClassInfo> {\n property: PropertyInfoJSON<TClassInfoJSON>;\n}\n"]}
@@ -2,12 +2,12 @@
2
2
  * @module Content
3
3
  */
4
4
  import { UnitSystemKey } from "@itwin/core-quantity";
5
- import { KoqPropertyValueFormatter } from "../KoqPropertyValueFormatter";
6
- import { Content } from "./Content";
7
- import { Descriptor } from "./Descriptor";
8
- import { Field } from "./Fields";
9
- import { Item } from "./Item";
10
- import { DisplayValue, Value } from "./Value";
5
+ import { KoqPropertyValueFormatter } from "../KoqPropertyValueFormatter.js";
6
+ import { Content } from "./Content.js";
7
+ import { Descriptor } from "./Descriptor.js";
8
+ import { Field } from "./Fields.js";
9
+ import { Item } from "./Item.js";
10
+ import { DisplayValue, Value } from "./Value.js";
11
11
  /** @internal */
12
12
  export declare class ContentFormatter {
13
13
  private _propertyValueFormatter;
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyValueFormatter.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/PropertyValueFormatter.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAwB,KAAK,EAA0C,MAAM,UAAU,CAAC;AAC/F,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAwC,KAAK,EAA0B,MAAM,SAAS,CAAC;AAE5G,gBAAgB;AAChB,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,uBAAuB;IAC/B,OAAO,CAAC,WAAW,CAAC;gBADZ,uBAAuB,EAAE;QAAE,mBAAmB,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,YAAY,CAAC,CAAA;KAAE,EACnI,WAAW,CAAC,EAAE,aAAa,YAAA;IAGxB,aAAa,CAAC,OAAO,EAAE,OAAO;IAK9B,kBAAkB,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,UAAU;YASvD,YAAY;YAgCZ,gCAAgC;YAMhC,mBAAmB;YAYnB,gBAAgB;YAIhB,mBAAmB;CASlC;AAED,gBAAgB;AAChB,qBAAa,6BAA6B;IAC5B,OAAO,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,yBAAyB;IAEpD,mBAAmB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;YAejG,WAAW;YAcX,oBAAoB;YA6CpB,iBAAiB;YAYjB,gBAAgB;CAW/B"}
1
+ {"version":3,"file":"PropertyValueFormatter.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/PropertyValueFormatter.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAE5E,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAwB,KAAK,EAA0C,MAAM,aAAa,CAAC;AAClG,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAwC,KAAK,EAA0B,MAAM,YAAY,CAAC;AAE/G,gBAAgB;AAChB,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,uBAAuB;IAC/B,OAAO,CAAC,WAAW,CAAC;gBADZ,uBAAuB,EAAE;QAAE,mBAAmB,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,YAAY,CAAC,CAAA;KAAE,EACnI,WAAW,CAAC,EAAE,aAAa,YAAA;IAGxB,aAAa,CAAC,OAAO,EAAE,OAAO;IAK9B,kBAAkB,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,UAAU;YASvD,YAAY;YAgCZ,gCAAgC;YAMhC,mBAAmB;YAYnB,gBAAgB;YAIhB,mBAAmB;CASlC;AAED,gBAAgB;AAChB,qBAAa,6BAA6B;IAC5B,OAAO,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,yBAAyB;IAEpD,mBAAmB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;YAejG,WAAW;YAcX,oBAAoB;YA6CpB,iBAAiB;YAYjB,gBAAgB;CAW/B"}
@@ -9,17 +9,19 @@
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.ContentPropertyValueFormatter = exports.ContentFormatter = void 0;
11
11
  const core_bentley_1 = require("@itwin/core-bentley");
12
- const Content_1 = require("./Content");
13
- const Value_1 = require("./Value");
12
+ const Content_js_1 = require("./Content.js");
13
+ const Value_js_1 = require("./Value.js");
14
14
  /** @internal */
15
15
  class ContentFormatter {
16
+ _propertyValueFormatter;
17
+ _unitSystem;
16
18
  constructor(_propertyValueFormatter, _unitSystem) {
17
19
  this._propertyValueFormatter = _propertyValueFormatter;
18
20
  this._unitSystem = _unitSystem;
19
21
  }
20
22
  async formatContent(content) {
21
23
  const formattedItems = await this.formatContentItems(content.contentSet, content.descriptor);
22
- return new Content_1.Content(content.descriptor, formattedItems);
24
+ return new Content_js_1.Content(content.descriptor, formattedItems);
23
25
  }
24
26
  async formatContentItems(items, descriptor) {
25
27
  return Promise.all(items.map(async (item) => {
@@ -41,7 +43,7 @@ class ContentFormatter {
41
43
  }
42
44
  // format display values of nested content field
43
45
  if (field.isNestedContentField()) {
44
- (0, core_bentley_1.assert)(Value_1.Value.isNestedContent(value));
46
+ (0, core_bentley_1.assert)(Value_js_1.Value.isNestedContent(value));
45
47
  await this.formatNestedContentDisplayValues(value, field.nestedFields);
46
48
  continue;
47
49
  }
@@ -60,11 +62,11 @@ class ContentFormatter {
60
62
  }
61
63
  async formatPropertyValue(value, field) {
62
64
  if (field.isArrayPropertiesField()) {
63
- (0, core_bentley_1.assert)(Value_1.Value.isArray(value));
65
+ (0, core_bentley_1.assert)(Value_js_1.Value.isArray(value));
64
66
  return this.formatArrayItems(value, field);
65
67
  }
66
68
  if (field.isStructPropertiesField()) {
67
- (0, core_bentley_1.assert)(Value_1.Value.isMap(value));
69
+ (0, core_bentley_1.assert)(Value_js_1.Value.isMap(value));
68
70
  return this.formatStructMembers(value, field);
69
71
  }
70
72
  return this._propertyValueFormatter.formatPropertyValue(field, value, this._unitSystem);
@@ -83,6 +85,7 @@ class ContentFormatter {
83
85
  exports.ContentFormatter = ContentFormatter;
84
86
  /** @internal */
85
87
  class ContentPropertyValueFormatter {
88
+ _koqValueFormatter;
86
89
  constructor(_koqValueFormatter) {
87
90
  this._koqValueFormatter = _koqValueFormatter;
88
91
  }
@@ -138,7 +141,7 @@ class ContentPropertyValueFormatter {
138
141
  return formatDoubleValue(value);
139
142
  }
140
143
  if (field.type.typeName === "navigation") {
141
- (0, core_bentley_1.assert)(Value_1.Value.isNavigationValue(value));
144
+ (0, core_bentley_1.assert)(Value_js_1.Value.isNavigationValue(value));
142
145
  return value.label.displayValue;
143
146
  }
144
147
  if (field.type.typeName === "enum" && field.isPropertiesField()) {
@@ -151,7 +154,7 @@ class ContentPropertyValueFormatter {
151
154
  return value.toString();
152
155
  }
153
156
  async formatStructValue(field, value) {
154
- if (!Value_1.Value.isMap(value)) {
157
+ if (!Value_js_1.Value.isMap(value)) {
155
158
  return {};
156
159
  }
157
160
  const formattedMember = {};
@@ -161,7 +164,7 @@ class ContentPropertyValueFormatter {
161
164
  return formattedMember;
162
165
  }
163
166
  async formatArrayValue(field, value) {
164
- if (!Value_1.Value.isArray(value)) {
167
+ if (!Value_js_1.Value.isArray(value)) {
165
168
  return [];
166
169
  }
167
170
  return Promise.all(value.map(async (arrayVal) => {
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyValueFormatter.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/PropertyValueFormatter.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAA6C;AAK7C,uCAAoC;AAIpC,mCAA4G;AAE5G,gBAAgB;AAChB,MAAa,gBAAgB;IAC3B,YACU,uBAAmI,EACnI,WAA2B;QAD3B,4BAAuB,GAAvB,uBAAuB,CAA4G;QACnI,gBAAW,GAAX,WAAW,CAAgB;IAClC,CAAC;IAEG,KAAK,CAAC,aAAa,CAAC,OAAgB;QACzC,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;QAC7F,OAAO,IAAI,iBAAO,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IACzD,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,KAAa,EAAE,UAAsB;QACnE,OAAO,OAAO,CAAC,GAAG,CAChB,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACvB,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACnG,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,YAAY,CAAC,MAA+B,EAAE,aAA6C,EAAE,MAAe,EAAE,YAAsB;QAChJ,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,C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AAO,GAAG,KAAK,SAAS,IAAI,QAAQ,CAAE,GAAW,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAE,GAAW,CAAC,CAAC,CAAC,CAAC;AACnF,CAAC;AAED,SAAS,SAAS,CAAC,GAAU;IAC3B,OAAO,SAAS,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAE,GAAW,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,SAAS,QAAQ,CAAC,GAAU;IAC1B,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { UnitSystemKey } from \"@itwin/core-quantity\";\r\nimport { KindOfQuantityInfo, PropertyInfo } from \"../EC\";\r\nimport { KoqPropertyValueFormatter } from \"../KoqPropertyValueFormatter\";\r\nimport { ValuesDictionary } from \"../Utils\";\r\nimport { Content } from \"./Content\";\r\nimport { Descriptor } from \"./Descriptor\";\r\nimport { ArrayPropertiesField, Field, PropertiesField, StructPropertiesField } from \"./Fields\";\r\nimport { Item } from \"./Item\";\r\nimport { DisplayValue, DisplayValuesMap, NestedContentValue, Value, ValuesArray, ValuesMap } from \"./Value\";\r\n\r\n/** @internal */\r\nexport class ContentFormatter {\r\n constructor(\r\n private _propertyValueFormatter: { formatPropertyValue: (field: Field, value: Value, unitSystem?: UnitSystemKey) => Promise<DisplayValue> },\r\n private _unitSystem?: UnitSystemKey,\r\n ) {}\r\n\r\n public async formatContent(content: Content) {\r\n const formattedItems = await this.formatContentItems(content.contentSet, content.descriptor);\r\n return new Content(content.descriptor, formattedItems);\r\n }\r\n\r\n public async formatContentItems(items: Item[], descriptor: Descriptor) {\r\n return Promise.all(\r\n items.map(async (item) => {\r\n await this.formatValues(item.values, item.displayValues, descriptor.fields, item.mergedFieldNames);\r\n return item;\r\n }),\r\n );\r\n }\r\n\r\n private async formatValues(values: ValuesDictionary<Value>, displayValues: ValuesDictionary<DisplayValue>, fields: Field[], mergedFields: string[]) {\r\n for (const field of fields) {\r\n const value = values[field.name];\r\n\r\n // format display value of merged values\r\n if (mergedFields.includes(field.name)) {\r\n displayValues[field.name] = \"@Presentation:label.varies@\";\r\n continue;\r\n }\r\n\r\n // do not add undefined value to display values\r\n if (value === undefined) {\r\n continue;\r\n }\r\n\r\n // format display values of nested content field\r\n if (field.isNestedContentField()) {\r\n assert(Value.isNestedContent(value));\r\n await this.formatNestedContentDisplayValues(value, field.nestedFields);\r\n continue;\r\n }\r\n\r\n // format property items\r\n if (field.isPropertiesField()) {\r\n displayValues[field.name] = await this.formatPropertyValue(value, field);\r\n continue;\r\n }\r\n\r\n displayValues[field.name] = await this._propertyValueFormatter.formatPropertyValue(field, value, this._unitSystem);\r\n }\r\n }\r\n\r\n private async formatNestedContentDisplayValues(nestedValues: NestedContentValue[], fields: Field[]) {\r\n for (const nestedValue of nestedValues) {\r\n await this.formatValues(nestedValue.values, nestedValue.displayValues, fields, nestedValue.mergedFieldNames);\r\n }\r\n }\r\n\r\n private async formatPropertyValue(value: Value, field: PropertiesField): Promise<DisplayValue> {\r\n if (field.isArrayPropertiesField()) {\r\n assert(Value.isArray(value));\r\n return this.formatArrayItems(value, field);\r\n }\r\n if (field.isStructPropertiesField()) {\r\n assert(Value.isMap(value));\r\n return this.formatStructMembers(value, field);\r\n }\r\n return this._propertyValueFormatter.formatPropertyValue(field, value, this._unitSystem);\r\n }\r\n\r\n private async formatArrayItems(itemValues: ValuesArray, field: ArrayPropertiesField) {\r\n return Promise.all(itemValues.map(async (value) => this.formatPropertyValue(value, field.itemsField)));\r\n }\r\n\r\n private async formatStructMembers(memberValues: ValuesMap, field: StructPropertiesField) {\r\n const displayValues: DisplayValuesMap = {};\r\n await Promise.all(\r\n field.memberFields.map(async (memberField) => {\r\n displayValues[memberField.name] = await this.formatPropertyValue(memberValues[memberField.name], memberField);\r\n }),\r\n );\r\n return displayValues;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class ContentPropertyValueFormatter {\r\n constructor(private _koqValueFormatter: KoqPropertyValueFormatter) {}\r\n\r\n public async formatPropertyValue(field: Field, value: Value, unitSystem?: UnitSystemKey): Promise<DisplayValue> {\r\n const doubleFormatter = isFieldWithKoq(field)\r\n ? async (rawValue: number) => {\r\n const koq = field.properties[0].property.kindOfQuantity;\r\n const formattedValue = await this._koqValueFormatter.format(rawValue, { koqName: koq.name, unitSystem });\r\n if (formattedValue !== undefined) {\r\n return formattedValue;\r\n }\r\n return formatDouble(rawValue);\r\n }\r\n : async (rawValue: number) => formatDouble(rawValue);\r\n\r\n return this.formatValue(field, value, { doubleFormatter });\r\n }\r\n\r\n private async formatValue(field: Field, value: Value, ctx?: { doubleFormatter: (raw: number) => Promise<string> }): Promise<DisplayValue> {\r\n if (field.isPropertiesField()) {\r\n if (field.isArrayPropertiesField()) {\r\n return this.formatArrayValue(field, value);\r\n }\r\n\r\n if (field.isStructPropertiesField()) {\r\n return this.formatStructValue(field, value);\r\n }\r\n }\r\n\r\n return this.formatPrimitiveValue(field, value, ctx);\r\n }\r\n\r\n private async formatPrimitiveValue(field: Field, value: Value, ctx?: { doubleFormatter: (raw: number) => Promise<string> }) {\r\n if (value === undefined) {\r\n return \"\";\r\n }\r\n\r\n const formatDoubleValue = async (raw: number) => (ctx ? ctx.doubleFormatter(raw) : formatDouble(raw));\r\n\r\n if (field.type.typeName === \"point2d\" && isPoint2d(value)) {\r\n return `X: ${await formatDoubleValue(value.x)}; Y: ${await formatDoubleValue(value.y)}`;\r\n }\r\n if (field.type.typeName === \"point3d\" && isPoint3d(value)) {\r\n return `X: ${await formatDoubleValue(value.x)}; Y: ${await formatDoubleValue(value.y)}; Z: ${await formatDoubleValue(value.z)}`;\r\n }\r\n if (field.type.typeName === \"dateTime\") {\r\n assert(typeof value === \"string\");\r\n return value;\r\n }\r\n if (field.type.typeName === \"bool\" || field.type.typeName === \"boolean\") {\r\n assert(typeof value === \"boolean\");\r\n return value ? \"@Presentation:value.true@\" : \"@Presentation:value.false@\";\r\n }\r\n if (field.type.typeName === \"int\" || field.type.typeName === \"long\") {\r\n assert(isNumber(value));\r\n return value.toFixed(0);\r\n }\r\n if (field.type.typeName === \"double\") {\r\n assert(isNumber(value));\r\n return formatDoubleValue(value);\r\n }\r\n if (field.type.typeName === \"navigation\") {\r\n assert(Value.isNavigationValue(value));\r\n return value.label.displayValue;\r\n }\r\n\r\n if (field.type.typeName === \"enum\" && field.isPropertiesField()) {\r\n const defaultValue = !field.properties[0].property.enumerationInfo?.isStrict\r\n ? value.toString() // eslint-disable-line @typescript-eslint/no-base-to-string\r\n : undefined;\r\n\r\n return field.properties[0].property.enumerationInfo?.choices.find(({ value: enumValue }) => enumValue === value)?.label ?? defaultValue;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\r\n return value.toString();\r\n }\r\n\r\n private async formatStructValue(field: StructPropertiesField, value: Value) {\r\n if (!Value.isMap(value)) {\r\n return {};\r\n }\r\n\r\n const formattedMember: DisplayValuesMap = {};\r\n for (const member of field.memberFields) {\r\n formattedMember[member.name] = await this.formatValue(member, value[member.name]);\r\n }\r\n return formattedMember;\r\n }\r\n\r\n private async formatArrayValue(field: ArrayPropertiesField, value: Value) {\r\n if (!Value.isArray(value)) {\r\n return [];\r\n }\r\n\r\n return Promise.all(\r\n value.map(async (arrayVal) => {\r\n return this.formatValue(field.itemsField, arrayVal);\r\n }),\r\n );\r\n }\r\n}\r\n\r\nfunction formatDouble(value: number) {\r\n return value.toFixed(2);\r\n}\r\n\r\ntype FieldWithKoq = PropertiesField & {\r\n properties: [\r\n {\r\n property: PropertyInfo & {\r\n kindOfQuantity: KindOfQuantityInfo;\r\n };\r\n },\r\n ];\r\n};\r\n\r\nfunction isFieldWithKoq(field: Field): field is FieldWithKoq {\r\n return field.isPropertiesField() && field.properties.length > 0 && field.properties[0].property.kindOfQuantity !== undefined;\r\n}\r\n\r\nfunction isPoint2d(obj: Value): obj is { x: number; y: number } {\r\n return obj !== undefined && isNumber((obj as any).x) && isNumber((obj as any).y);\r\n}\r\n\r\nfunction isPoint3d(obj: Value): obj is { x: number; y: number; z: number } {\r\n return isPoint2d(obj) && isNumber((obj as any).z);\r\n}\r\n\r\nfunction isNumber(obj: Value): obj is number {\r\n return !isNaN(Number(obj));\r\n}\r\n"]}
1
+ {"version":3,"file":"PropertyValueFormatter.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/PropertyValueFormatter.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAA6C;AAK7C,6CAAuC;AAIvC,yCAA+G;AAE/G,gBAAgB;AAChB,MAAa,gBAAgB;IAEjB;IACA;IAFV,YACU,uBAAmI,EACnI,WAA2B;QAD3B,4BAAuB,GAAvB,uBAAuB,CAA4G;QACnI,gBAAW,GAAX,WAAW,CAAgB;IAClC,CAAC;IAEG,KAAK,CAAC,aAAa,CAAC,OAAgB;QACzC,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;QAC7F,OAAO,IAAI,oBAAO,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IACzD,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,KAAa,EAAE,UAAsB;QACnE,OAAO,OAAO,CAAC,GAAG,CAChB,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACvB,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACnG,OAAO,IAAI,CAAC;QACd,CA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AAO,KAAK,CAAC,iBAAiB,EAAE,IAAI,KAAK,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,KAAK,SAAS,CAAC;AAC/H,CAAC;AAED,SAAS,SAAS,CAAC,GAAU;IAC3B,OAAO,GAAG,KAAK,SAAS,IAAI,QAAQ,CAAE,GAAW,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAE,GAAW,CAAC,CAAC,CAAC,CAAC;AACnF,CAAC;AAED,SAAS,SAAS,CAAC,GAAU;IAC3B,OAAO,SAAS,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAE,GAAW,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,SAAS,QAAQ,CAAC,GAAU;IAC1B,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\nimport { assert } from \"@itwin/core-bentley\";\nimport { UnitSystemKey } from \"@itwin/core-quantity\";\nimport { KindOfQuantityInfo, PropertyInfo } from \"../EC.js\";\nimport { KoqPropertyValueFormatter } from \"../KoqPropertyValueFormatter.js\";\nimport { ValuesDictionary } from \"../Utils.js\";\nimport { Content } from \"./Content.js\";\nimport { Descriptor } from \"./Descriptor.js\";\nimport { ArrayPropertiesField, Field, PropertiesField, StructPropertiesField } from \"./Fields.js\";\nimport { Item } from \"./Item.js\";\nimport { DisplayValue, DisplayValuesMap, NestedContentValue, Value, ValuesArray, ValuesMap } from \"./Value.js\";\n\n/** @internal */\nexport class ContentFormatter {\n constructor(\n private _propertyValueFormatter: { formatPropertyValue: (field: Field, value: Value, unitSystem?: UnitSystemKey) => Promise<DisplayValue> },\n private _unitSystem?: UnitSystemKey,\n ) {}\n\n public async formatContent(content: Content) {\n const formattedItems = await this.formatContentItems(content.contentSet, content.descriptor);\n return new Content(content.descriptor, formattedItems);\n }\n\n public async formatContentItems(items: Item[], descriptor: Descriptor) {\n return Promise.all(\n items.map(async (item) => {\n await this.formatValues(item.values, item.displayValues, descriptor.fields, item.mergedFieldNames);\n return item;\n }),\n );\n }\n\n private async formatValues(values: ValuesDictionary<Value>, displayValues: ValuesDictionary<DisplayValue>, fields: Field[], mergedFields: string[]) {\n for (const field of fields) {\n const value = values[field.name];\n\n // format display value of merged values\n if (mergedFields.includes(field.name)) {\n displayValues[field.name] = \"@Presentation:label.varies@\";\n continue;\n }\n\n // do not add undefined value to display values\n if (value === undefined) {\n continue;\n }\n\n // format display values of nested content field\n if (field.isNestedContentField()) {\n assert(Value.isNestedContent(value));\n await this.formatNestedContentDisplayValues(value, field.nestedFields);\n continue;\n }\n\n // format property items\n if (field.isPropertiesField()) {\n displayValues[field.name] = await this.formatPropertyValue(value, field);\n continue;\n }\n\n displayValues[field.name] = await this._propertyValueFormatter.formatPropertyValue(field, value, this._unitSystem);\n }\n }\n\n private async formatNestedContentDisplayValues(nestedValues: NestedContentValue[], fields: Field[]) {\n for (const nestedValue of nestedValues) {\n await this.formatValues(nestedValue.values, nestedValue.displayValues, fields, nestedValue.mergedFieldNames);\n }\n }\n\n private async formatPropertyValue(value: Value, field: PropertiesField): Promise<DisplayValue> {\n if (field.isArrayPropertiesField()) {\n assert(Value.isArray(value));\n return this.formatArrayItems(value, field);\n }\n if (field.isStructPropertiesField()) {\n assert(Value.isMap(value));\n return this.formatStructMembers(value, field);\n }\n return this._propertyValueFormatter.formatPropertyValue(field, value, this._unitSystem);\n }\n\n private async formatArrayItems(itemValues: ValuesArray, field: ArrayPropertiesField) {\n return Promise.all(itemValues.map(async (value) => this.formatPropertyValue(value, field.itemsField)));\n }\n\n private async formatStructMembers(memberValues: ValuesMap, field: StructPropertiesField) {\n const displayValues: DisplayValuesMap = {};\n await Promise.all(\n field.memberFields.map(async (memberField) => {\n displayValues[memberField.name] = await this.formatPropertyValue(memberValues[memberField.name], memberField);\n }),\n );\n return displayValues;\n }\n}\n\n/** @internal */\nexport class ContentPropertyValueFormatter {\n constructor(private _koqValueFormatter: KoqPropertyValueFormatter) {}\n\n public async formatPropertyValue(field: Field, value: Value, unitSystem?: UnitSystemKey): Promise<DisplayValue> {\n const doubleFormatter = isFieldWithKoq(field)\n ? async (rawValue: number) => {\n const koq = field.properties[0].property.kindOfQuantity;\n const formattedValue = await this._koqValueFormatter.format(rawValue, { koqName: koq.name, unitSystem });\n if (formattedValue !== undefined) {\n return formattedValue;\n }\n return formatDouble(rawValue);\n }\n : async (rawValue: number) => formatDouble(rawValue);\n\n return this.formatValue(field, value, { doubleFormatter });\n }\n\n private async formatValue(field: Field, value: Value, ctx?: { doubleFormatter: (raw: number) => Promise<string> }): Promise<DisplayValue> {\n if (field.isPropertiesField()) {\n if (field.isArrayPropertiesField()) {\n return this.formatArrayValue(field, value);\n }\n\n if (field.isStructPropertiesField()) {\n return this.formatStructValue(field, value);\n }\n }\n\n return this.formatPrimitiveValue(field, value, ctx);\n }\n\n private async formatPrimitiveValue(field: Field, value: Value, ctx?: { doubleFormatter: (raw: number) => Promise<string> }) {\n if (value === undefined) {\n return \"\";\n }\n\n const formatDoubleValue = async (raw: number) => (ctx ? ctx.doubleFormatter(raw) : formatDouble(raw));\n\n if (field.type.typeName === \"point2d\" && isPoint2d(value)) {\n return `X: ${await formatDoubleValue(value.x)}; Y: ${await formatDoubleValue(value.y)}`;\n }\n if (field.type.typeName === \"point3d\" && isPoint3d(value)) {\n return `X: ${await formatDoubleValue(value.x)}; Y: ${await formatDoubleValue(value.y)}; Z: ${await formatDoubleValue(value.z)}`;\n }\n if (field.type.typeName === \"dateTime\") {\n assert(typeof value === \"string\");\n return value;\n }\n if (field.type.typeName === \"bool\" || field.type.typeName === \"boolean\") {\n assert(typeof value === \"boolean\");\n return value ? \"@Presentation:value.true@\" : \"@Presentation:value.false@\";\n }\n if (field.type.typeName === \"int\" || field.type.typeName === \"long\") {\n assert(isNumber(value));\n return value.toFixed(0);\n }\n if (field.type.typeName === \"double\") {\n assert(isNumber(value));\n return formatDoubleValue(value);\n }\n if (field.type.typeName === \"navigation\") {\n assert(Value.isNavigationValue(value));\n return value.label.displayValue;\n }\n\n if (field.type.typeName === \"enum\" && field.isPropertiesField()) {\n const defaultValue = !field.properties[0].property.enumerationInfo?.isStrict\n ? value.toString() // eslint-disable-line @typescript-eslint/no-base-to-string\n : undefined;\n\n return field.properties[0].property.enumerationInfo?.choices.find(({ value: enumValue }) => enumValue === value)?.label ?? defaultValue;\n }\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n return value.toString();\n }\n\n private async formatStructValue(field: StructPropertiesField, value: Value) {\n if (!Value.isMap(value)) {\n return {};\n }\n\n const formattedMember: DisplayValuesMap = {};\n for (const member of field.memberFields) {\n formattedMember[member.name] = await this.formatValue(member, value[member.name]);\n }\n return formattedMember;\n }\n\n private async formatArrayValue(field: ArrayPropertiesField, value: Value) {\n if (!Value.isArray(value)) {\n return [];\n }\n\n return Promise.all(\n value.map(async (arrayVal) => {\n return this.formatValue(field.itemsField, arrayVal);\n }),\n );\n }\n}\n\nfunction formatDouble(value: number) {\n return value.toFixed(2);\n}\n\ntype FieldWithKoq = PropertiesField & {\n properties: [\n {\n property: PropertyInfo & {\n kindOfQuantity: KindOfQuantityInfo;\n };\n },\n ];\n};\n\nfunction isFieldWithKoq(field: Field): field is FieldWithKoq {\n return field.isPropertiesField() && field.properties.length > 0 && field.properties[0].property.kindOfQuantity !== undefined;\n}\n\nfunction isPoint2d(obj: Value): obj is { x: number; y: number } {\n return obj !== undefined && isNumber((obj as any).x) && isNumber((obj as any).y);\n}\n\nfunction isPoint3d(obj: Value): obj is { x: number; y: number; z: number } {\n return isPoint2d(obj) && isNumber((obj as any).z);\n}\n\nfunction isNumber(obj: Value): obj is number {\n return !isNaN(Number(obj));\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Renderer.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Renderer.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;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 Content\r\n */\r\n\r\n/**\r\n * Describes property renderer used for a content [[Field]].\r\n * @public\r\n */\r\nexport interface RendererDescription {\r\n /** Renderer name. */\r\n name: string;\r\n}\r\n"]}
1
+ {"version":3,"file":"Renderer.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Renderer.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\n/**\n * Describes property renderer used for a content [[Field]].\n * @public\n */\nexport interface RendererDescription {\n /** Renderer name. */\n name: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TypeDescription.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/TypeDescription.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH;;;GAGG;AACH,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC7B,sBAAsB;IACtB,8CAAuB,CAAA;IACvB,kBAAkB;IAClB,sCAAe,CAAA;IACf,mBAAmB;IACnB,wCAAiB,CAAA;AACnB,CAAC,EAPW,mBAAmB,mCAAnB,mBAAmB,QAO9B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\n/**\r\n * Format of the property value.\r\n * @public\r\n */\r\nexport enum PropertyValueFormat {\r\n /** Primitive value */\r\n Primitive = \"Primitive\",\r\n /** Array value */\r\n Array = \"Array\",\r\n /** Struct value */\r\n Struct = \"Struct\",\r\n}\r\n\r\n/**\r\n * Data structure for base content field type description. Not\r\n * meant to be used directly, see `TypeDescription`.\r\n *\r\n * @public\r\n */\r\nexport interface BaseTypeDescription {\r\n /** Value format */\r\n valueFormat: PropertyValueFormat;\r\n /** Type name */\r\n typeName: string;\r\n}\r\n\r\n/**\r\n * Type description for primitive properties.\r\n * @public\r\n */\r\nexport interface PrimitiveTypeDescription extends BaseTypeDescription {\r\n /** Primitive format */\r\n valueFormat: PropertyValueFormat.Primitive;\r\n}\r\n\r\n/**\r\n * Type description for array properties.\r\n * @public\r\n */\r\nexport interface ArrayTypeDescription extends BaseTypeDescription {\r\n /** Array format */\r\n valueFormat: PropertyValueFormat.Array;\r\n /** Type of array items */\r\n memberType: TypeDescription;\r\n}\r\n\r\n/**\r\n * A data structure that describes a struct member.\r\n * @public\r\n */\r\nexport interface StructFieldMemberDescription {\r\n /** Unique name of a struct member */\r\n name: string;\r\n /** Label of the struct member */\r\n label: string;\r\n /** Type of the struct member */\r\n type: TypeDescription;\r\n}\r\n\r\n/**\r\n * Type description for struct properties.\r\n * @public\r\n */\r\nexport interface StructTypeDescription extends BaseTypeDescription {\r\n /** Struct format */\r\n valueFormat: PropertyValueFormat.Struct;\r\n /** Type descriptions of struct members */\r\n members: StructFieldMemberDescription[];\r\n}\r\n\r\n/**\r\n * One of content field type descriptions.\r\n * @public\r\n */\r\nexport type TypeDescription = PrimitiveTypeDescription | ArrayTypeDescription | StructTypeDescription;\r\n"]}
1
+ {"version":3,"file":"TypeDescription.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/TypeDescription.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH;;;GAGG;AACH,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC7B,sBAAsB;IACtB,8CAAuB,CAAA;IACvB,kBAAkB;IAClB,sCAAe,CAAA;IACf,mBAAmB;IACnB,wCAAiB,CAAA;AACnB,CAAC,EAPW,mBAAmB,mCAAnB,mBAAmB,QAO9B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\n/**\n * Format of the property value.\n * @public\n */\nexport enum PropertyValueFormat {\n /** Primitive value */\n Primitive = \"Primitive\",\n /** Array value */\n Array = \"Array\",\n /** Struct value */\n Struct = \"Struct\",\n}\n\n/**\n * Data structure for base content field type description. Not\n * meant to be used directly, see `TypeDescription`.\n *\n * @public\n */\nexport interface BaseTypeDescription {\n /** Value format */\n valueFormat: PropertyValueFormat;\n /** Type name */\n typeName: string;\n}\n\n/**\n * Type description for primitive properties.\n * @public\n */\nexport interface PrimitiveTypeDescription extends BaseTypeDescription {\n /** Primitive format */\n valueFormat: PropertyValueFormat.Primitive;\n}\n\n/**\n * Type description for array properties.\n * @public\n */\nexport interface ArrayTypeDescription extends BaseTypeDescription {\n /** Array format */\n valueFormat: PropertyValueFormat.Array;\n /** Type of array items */\n memberType: TypeDescription;\n}\n\n/**\n * A data structure that describes a struct member.\n * @public\n */\nexport interface StructFieldMemberDescription {\n /** Unique name of a struct member */\n name: string;\n /** Label of the struct member */\n label: string;\n /** Type of the struct member */\n type: TypeDescription;\n}\n\n/**\n * Type description for struct properties.\n * @public\n */\nexport interface StructTypeDescription extends BaseTypeDescription {\n /** Struct format */\n valueFormat: PropertyValueFormat.Struct;\n /** Type descriptions of struct members */\n members: StructFieldMemberDescription[];\n}\n\n/**\n * One of content field type descriptions.\n * @public\n */\nexport type TypeDescription = PrimitiveTypeDescription | ArrayTypeDescription | StructTypeDescription;\n"]}
@@ -1,9 +1,9 @@
1
1
  /** @packageDocumentation
2
2
  * @module Content
3
3
  */
4
- import { InstanceId, InstanceKey } from "../EC";
5
- import { LabelDefinition } from "../LabelDefinition";
6
- import { ValuesDictionary } from "../Utils";
4
+ import { InstanceId, InstanceKey } from "../EC.js";
5
+ import { LabelDefinition } from "../LabelDefinition.js";
6
+ import { ValuesDictionary } from "../Utils.js";
7
7
  /**
8
8
  * Raw value type
9
9
  * @public
@@ -21,16 +21,6 @@ export declare namespace Value {
21
21
  function isNestedContent(value: Value): value is NestedContentValue[];
22
22
  /** Is the value a navigation value */
23
23
  function isNavigationValue(value: Value): value is NavigationPropertyValue;
24
- /**
25
- * Serialize [[Value]] to JSON
26
- * @deprecated in 3.x. Use [[Value]]
27
- */
28
- function fromJSON(json: ValueJSON): Value;
29
- /**
30
- * Deserialize [[Value]] from JSON
31
- * @deprecated in 3.x. Use [[Value]]
32
- */
33
- function toJSON(value: Value): ValueJSON;
34
24
  }
35
25
  /**
36
26
  * A map of raw values
@@ -57,16 +47,6 @@ export declare namespace DisplayValue {
57
47
  function isArray(value: DisplayValue): value is DisplayValuesArray;
58
48
  /** Is the value a map / struct */
59
49
  function isMap(value: DisplayValue): value is DisplayValuesMap;
60
- /**
61
- * Serialize [[DisplayValue]] to JSON
62
- * @deprecated in 3.x. Use [[DisplayValue]]
63
- */
64
- function fromJSON(json: DisplayValueJSON): DisplayValue;
65
- /**
66
- * Deserialize [[DisplayValue]] from JSON
67
- * @deprecated in 3.x. Use [[DisplayValue]]
68
- */
69
- function toJSON(value: DisplayValue): DisplayValueJSON;
70
50
  }
71
51
  /**
72
52
  * A map of display values
@@ -93,8 +73,12 @@ export interface NestedContentValue {
93
73
  displayValues: ValuesDictionary<DisplayValue>;
94
74
  /** Names of fields whose values are merged */
95
75
  mergedFieldNames: string[];
96
- /** Label of the ECInstance that this `NestedContentValue` is based on. */
76
+ /**
77
+ * Label of the ECInstance that this `NestedContentValue` is based on.
78
+ * @deprecated in 5.x. Use [[label]] instead.
79
+ */
97
80
  labelDefinition?: LabelDefinition;
81
+ label?: LabelDefinition;
98
82
  }
99
83
  /**
100
84
  * Data structure that describes value of the navigation property.
@@ -108,70 +92,6 @@ export interface NavigationPropertyValue {
108
92
  /** Id of target instance. */
109
93
  id: InstanceId;
110
94
  }
111
- /** @public */
112
- export declare namespace NestedContentValue {
113
- /**
114
- * Serialize [[NestedContentValue]] to JSON
115
- * @deprecated in 3.x. Use [[NestedContentValue]]
116
- */
117
- function toJSON(value: NestedContentValue): NestedContentValueJSON;
118
- /**
119
- * Deserialize [[NestedContentValue]] from JSON
120
- * @deprecated in 3.x. Use [[NestedContentValue]]
121
- */
122
- function fromJSON(json: NestedContentValueJSON): NestedContentValue;
123
- }
124
- /**
125
- * JSON representation of [[Value]]
126
- * @public
127
- * @deprecated in 3.x. Use [[Value]]
128
- */
129
- export type ValueJSON = string | number | boolean | null | ValuesMapJSON | ValuesArrayJSON | NavigationPropertyValue | NestedContentValueJSON[];
130
- /**
131
- * JSON representation of [[ValuesMap]]
132
- * @public
133
- * @deprecated in 3.x. Use [[ValuesMap]]
134
- */
135
- export interface ValuesMapJSON extends ValuesDictionary<ValueJSON> {
136
- }
137
- /**
138
- * JSON representation of [[ValuesArray]]
139
- * @public
140
- * @deprecated in 3.x. Use [[ValuesArray]]
141
- */
142
- export interface ValuesArrayJSON extends Array<ValueJSON> {
143
- }
144
- /**
145
- * JSON representation of [[DisplayValue]]
146
- * @public
147
- * @deprecated in 3.x. Use [[DisplayValue]]
148
- */
149
- export type DisplayValueJSON = string | null | DisplayValuesMapJSON | DisplayValuesArrayJSON;
150
- /**
151
- * JSON representation of [[DisplayValuesMap]]
152
- * @public
153
- * @deprecated in 3.x. Use [[DisplayValuesMap]]
154
- */
155
- export interface DisplayValuesMapJSON extends ValuesDictionary<DisplayValueJSON> {
156
- }
157
- /**
158
- * JSON representation of [[DisplayValuesArray]]
159
- * @public
160
- * @deprecated in 3.x. Use [[DisplayValuesArray]]
161
- */
162
- export interface DisplayValuesArrayJSON extends Array<DisplayValueJSON> {
163
- }
164
- /**
165
- * JSON representation of [[NestedContentValue]]
166
- * @public
167
- * @deprecated in 3.x. Use [[NestedContentValue]]
168
- */
169
- export interface NestedContentValueJSON {
170
- primaryKeys: InstanceKey[];
171
- values: ValuesDictionary<ValueJSON>;
172
- displayValues: ValuesDictionary<DisplayValueJSON>;
173
- mergedFieldNames: string[];
174
- }
175
95
  /**
176
96
  * A group of raw values and their common display value.
177
97
  * @public
@@ -182,26 +102,4 @@ export interface DisplayValueGroup {
182
102
  /** A list of grouped raw values */
183
103
  groupedRawValues: Value[];
184
104
  }
185
- /**
186
- * JSON representation of [[DisplayValueGroup]].
187
- * @public
188
- * @deprecated in 3.x. Use [[DisplayValueGroup]]
189
- */
190
- export interface DisplayValueGroupJSON {
191
- displayValue: DisplayValueJSON;
192
- groupedRawValues: ValueJSON[];
193
- }
194
- /** @public */
195
- export declare namespace DisplayValueGroup {
196
- /**
197
- * Serialize [[DisplayValueGroup]] to JSON
198
- * @deprecated in 3.x. Use [[DisplayValueGroup]]
199
- */
200
- function toJSON(group: DisplayValueGroup): DisplayValueGroupJSON;
201
- /**
202
- * Deserialize [[DisplayValueGroup]] from JSON
203
- * @deprecated in 3.x. Use [[DisplayValueGroup]]
204
- */
205
- function fromJSON(json: DisplayValueGroupJSON): DisplayValueGroup;
206
- }
207
105
  //# sourceMappingURL=Value.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Value.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Value.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C;;;GAGG;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG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