@itwin/components-react 4.10.0 → 4.12.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 (347) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/lib/cjs/components-react/UiComponents.d.ts +1 -5
  3. package/lib/cjs/components-react/UiComponents.d.ts.map +1 -1
  4. package/lib/cjs/components-react/UiComponents.js +3 -15
  5. package/lib/cjs/components-react/UiComponents.js.map +1 -1
  6. package/lib/cjs/components-react/UiComponents.json +153 -0
  7. package/lib/cjs/components-react/common/DelayedSpinner.js +3 -2
  8. package/lib/cjs/components-react/common/DelayedSpinner.js.map +1 -1
  9. package/lib/cjs/components-react/common/UseDebouncedAsyncValue.js +2 -1
  10. package/lib/cjs/components-react/common/UseDebouncedAsyncValue.js.map +1 -1
  11. package/lib/cjs/components-react/converters/NumericTypeConverter.js +4 -2
  12. package/lib/cjs/components-react/converters/NumericTypeConverter.js.map +1 -1
  13. package/lib/cjs/components-react/converters/TypeConverter.js +2 -1
  14. package/lib/cjs/components-react/converters/TypeConverter.js.map +1 -1
  15. package/lib/cjs/components-react/datepicker/DatePicker.d.ts +2 -0
  16. package/lib/cjs/components-react/datepicker/DatePicker.d.ts.map +1 -1
  17. package/lib/cjs/components-react/datepicker/DatePicker.js +43 -40
  18. package/lib/cjs/components-react/datepicker/DatePicker.js.map +1 -1
  19. package/lib/cjs/components-react/datepicker/DatePickerPopupButton.d.ts +5 -2
  20. package/lib/cjs/components-react/datepicker/DatePickerPopupButton.d.ts.map +1 -1
  21. package/lib/cjs/components-react/datepicker/DatePickerPopupButton.js +8 -7
  22. package/lib/cjs/components-react/datepicker/DatePickerPopupButton.js.map +1 -1
  23. package/lib/cjs/components-react/datepicker/IntlFormatter.d.ts +1 -0
  24. package/lib/cjs/components-react/datepicker/IntlFormatter.d.ts.map +1 -1
  25. package/lib/cjs/components-react/datepicker/IntlFormatter.js +1 -0
  26. package/lib/cjs/components-react/datepicker/IntlFormatter.js.map +1 -1
  27. package/lib/cjs/components-react/datepicker/TimeField.d.ts.map +1 -1
  28. package/lib/cjs/components-react/datepicker/TimeField.js +28 -30
  29. package/lib/cjs/components-react/datepicker/TimeField.js.map +1 -1
  30. package/lib/cjs/components-react/editors/CustomNumberEditor.js +8 -6
  31. package/lib/cjs/components-react/editors/CustomNumberEditor.js.map +1 -1
  32. package/lib/cjs/components-react/editors/DateTimeEditor.js +5 -3
  33. package/lib/cjs/components-react/editors/DateTimeEditor.js.map +1 -1
  34. package/lib/cjs/components-react/editors/EnumEditor.d.ts +0 -1
  35. package/lib/cjs/components-react/editors/EnumEditor.d.ts.map +1 -1
  36. package/lib/cjs/components-react/editors/EnumEditor.js +2 -3
  37. package/lib/cjs/components-react/editors/EnumEditor.js.map +1 -1
  38. package/lib/cjs/components-react/editors/PopupButton.d.ts.map +1 -1
  39. package/lib/cjs/components-react/editors/PopupButton.js +8 -5
  40. package/lib/cjs/components-react/editors/PopupButton.js.map +1 -1
  41. package/lib/cjs/components-react/editors/TextEditor.d.ts +0 -1
  42. package/lib/cjs/components-react/editors/TextEditor.d.ts.map +1 -1
  43. package/lib/cjs/components-react/editors/TextEditor.js +5 -4
  44. package/lib/cjs/components-react/editors/TextEditor.js.map +1 -1
  45. package/lib/cjs/components-react/editors/TextareaEditor.d.ts +0 -1
  46. package/lib/cjs/components-react/editors/TextareaEditor.d.ts.map +1 -1
  47. package/lib/cjs/components-react/editors/TextareaEditor.js +1 -2
  48. package/lib/cjs/components-react/editors/TextareaEditor.js.map +1 -1
  49. package/lib/cjs/components-react/favorite/FavoritePropertyList.js +3 -3
  50. package/lib/cjs/components-react/favorite/FavoritePropertyList.js.map +1 -1
  51. package/lib/cjs/components-react/filter-builder/FilterBuilderLogicalOperator.d.ts.map +1 -1
  52. package/lib/cjs/components-react/filter-builder/FilterBuilderLogicalOperator.js +4 -3
  53. package/lib/cjs/components-react/filter-builder/FilterBuilderLogicalOperator.js.map +1 -1
  54. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js +2 -1
  55. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
  56. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.d.ts.map +1 -1
  57. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js +6 -5
  58. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
  59. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js +4 -3
  60. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
  61. package/lib/cjs/components-react/filter-builder/FilterBuilderState.js +3 -3
  62. package/lib/cjs/components-react/filter-builder/FilterBuilderState.js.map +1 -1
  63. package/lib/cjs/components-react/filter-builder/FilterBuilderToolbar.d.ts.map +1 -1
  64. package/lib/cjs/components-react/filter-builder/FilterBuilderToolbar.js +4 -3
  65. package/lib/cjs/components-react/filter-builder/FilterBuilderToolbar.js.map +1 -1
  66. package/lib/cjs/components-react/filter-builder/Operators.d.ts +1 -0
  67. package/lib/cjs/components-react/filter-builder/Operators.d.ts.map +1 -1
  68. package/lib/cjs/components-react/filter-builder/Operators.js +1 -0
  69. package/lib/cjs/components-react/filter-builder/Operators.js.map +1 -1
  70. package/lib/cjs/components-react/filtering/FilteringInput.d.ts +0 -3
  71. package/lib/cjs/components-react/filtering/FilteringInput.d.ts.map +1 -1
  72. package/lib/cjs/components-react/filtering/FilteringInput.js +5 -7
  73. package/lib/cjs/components-react/filtering/FilteringInput.js.map +1 -1
  74. package/lib/cjs/components-react/filtering/ResultSelector.d.ts +0 -1
  75. package/lib/cjs/components-react/filtering/ResultSelector.d.ts.map +1 -1
  76. package/lib/cjs/components-react/filtering/ResultSelector.js +1 -2
  77. package/lib/cjs/components-react/filtering/ResultSelector.js.map +1 -1
  78. package/lib/cjs/components-react/properties/ValueRendererManager.d.ts +3 -0
  79. package/lib/cjs/components-react/properties/ValueRendererManager.d.ts.map +1 -1
  80. package/lib/cjs/components-react/properties/ValueRendererManager.js +12 -1
  81. package/lib/cjs/components-react/properties/ValueRendererManager.js.map +1 -1
  82. package/lib/cjs/components-react/properties/renderers/CommonPropertyRenderer.js +4 -3
  83. package/lib/cjs/components-react/properties/renderers/CommonPropertyRenderer.js.map +1 -1
  84. package/lib/cjs/components-react/properties/renderers/CustomizablePropertyRenderer.d.ts +25 -0
  85. package/lib/cjs/components-react/properties/renderers/CustomizablePropertyRenderer.d.ts.map +1 -0
  86. package/lib/cjs/components-react/properties/renderers/CustomizablePropertyRenderer.js +62 -0
  87. package/lib/cjs/components-react/properties/renderers/CustomizablePropertyRenderer.js.map +1 -0
  88. package/lib/cjs/components-react/properties/renderers/NonPrimitivePropertyRenderer.js +1 -1
  89. package/lib/cjs/components-react/properties/renderers/NonPrimitivePropertyRenderer.js.map +1 -1
  90. package/lib/cjs/components-react/properties/renderers/PrimitivePropertyRenderer.d.ts +3 -4
  91. package/lib/cjs/components-react/properties/renderers/PrimitivePropertyRenderer.d.ts.map +1 -1
  92. package/lib/cjs/components-react/properties/renderers/PrimitivePropertyRenderer.js +6 -44
  93. package/lib/cjs/components-react/properties/renderers/PrimitivePropertyRenderer.js.map +1 -1
  94. package/lib/cjs/components-react/properties/renderers/PropertyView.d.ts +1 -1
  95. package/lib/cjs/components-react/properties/renderers/PropertyView.d.ts.map +1 -1
  96. package/lib/cjs/components-react/properties/renderers/PropertyView.js +2 -3
  97. package/lib/cjs/components-react/properties/renderers/PropertyView.js.map +1 -1
  98. package/lib/cjs/components-react/properties/renderers/label/PropertyLabelRenderer.js +4 -4
  99. package/lib/cjs/components-react/properties/renderers/label/PropertyLabelRenderer.js.map +1 -1
  100. package/lib/cjs/components-react/properties/renderers/value/Common.js +2 -1
  101. package/lib/cjs/components-react/properties/renderers/value/Common.js.map +1 -1
  102. package/lib/cjs/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.d.ts.map +1 -1
  103. package/lib/cjs/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js +8 -11
  104. package/lib/cjs/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js.map +1 -1
  105. package/lib/cjs/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js +6 -3
  106. package/lib/cjs/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js.map +1 -1
  107. package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.js +2 -1
  108. package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
  109. package/lib/cjs/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js +2 -1
  110. package/lib/cjs/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js.map +1 -1
  111. package/lib/cjs/components-react/propertygrid/component/PropertyCategoryBlock.js +2 -1
  112. package/lib/cjs/components-react/propertygrid/component/PropertyCategoryBlock.js.map +1 -1
  113. package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.js +2 -2
  114. package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
  115. package/lib/cjs/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.d.ts.map +1 -1
  116. package/lib/cjs/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js +1 -3
  117. package/lib/cjs/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js.map +1 -1
  118. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts +1 -3
  119. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts.map +1 -1
  120. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.js +90 -80
  121. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
  122. package/lib/cjs/components-react/propertygrid/dataproviders/FilteringDataProvider.js +13 -11
  123. package/lib/cjs/components-react/propertygrid/dataproviders/FilteringDataProvider.js.map +1 -1
  124. package/lib/cjs/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js +2 -2
  125. package/lib/cjs/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js.map +1 -1
  126. package/lib/cjs/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js +2 -1
  127. package/lib/cjs/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js.map +1 -1
  128. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCustomGridCategory.js +2 -1
  129. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCustomGridCategory.js.map +1 -1
  130. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js +2 -2
  131. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
  132. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.js +3 -2
  133. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.js.map +1 -1
  134. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js +1 -1
  135. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js.map +1 -1
  136. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js +1 -1
  137. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js.map +1 -1
  138. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts +1 -1
  139. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts.map +1 -1
  140. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js +22 -12
  141. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
  142. package/lib/cjs/components-react/selectable-content/SelectableContent.js +3 -2
  143. package/lib/cjs/components-react/selectable-content/SelectableContent.js.map +1 -1
  144. package/lib/cjs/components-react/toolbar/InternalToolbarComponent.d.ts.map +1 -1
  145. package/lib/cjs/components-react/toolbar/InternalToolbarComponent.js +19 -21
  146. package/lib/cjs/components-react/toolbar/InternalToolbarComponent.js.map +1 -1
  147. package/lib/cjs/components-react/toolbar/PopupItemWithDrag.d.ts.map +1 -1
  148. package/lib/cjs/components-react/toolbar/PopupItemWithDrag.js +1 -4
  149. package/lib/cjs/components-react/toolbar/PopupItemWithDrag.js.map +1 -1
  150. package/lib/cjs/components-react/toolbar/PopupItemsPanel.d.ts.map +1 -1
  151. package/lib/cjs/components-react/toolbar/PopupItemsPanel.js +2 -3
  152. package/lib/cjs/components-react/toolbar/PopupItemsPanel.js.map +1 -1
  153. package/lib/cjs/components-react/toolbar/useConditionalSynchedItems.js +6 -5
  154. package/lib/cjs/components-react/toolbar/useConditionalSynchedItems.js.map +1 -1
  155. package/lib/cjs/components-react/tree/controlled/TreeModel.js +8 -7
  156. package/lib/cjs/components-react/tree/controlled/TreeModel.js.map +1 -1
  157. package/lib/cjs/components-react/tree/controlled/TreeNodeLoader.js +8 -6
  158. package/lib/cjs/components-react/tree/controlled/TreeNodeLoader.js.map +1 -1
  159. package/lib/cjs/components-react/tree/controlled/component/ControlledTree.d.ts.map +1 -1
  160. package/lib/cjs/components-react/tree/controlled/component/ControlledTree.js +3 -2
  161. package/lib/cjs/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
  162. package/lib/cjs/components-react/tree/controlled/internal/SparseTree.js +2 -1
  163. package/lib/cjs/components-react/tree/controlled/internal/SparseTree.js.map +1 -1
  164. package/lib/cjs/components-react/tree/controlled/internal/TreeSelectionManager.js +4 -2
  165. package/lib/cjs/components-react/tree/controlled/internal/TreeSelectionManager.js.map +1 -1
  166. package/lib/cjs/components-react/useTranslation.d.ts +7 -0
  167. package/lib/cjs/components-react/useTranslation.d.ts.map +1 -0
  168. package/lib/cjs/components-react/useTranslation.js +52 -0
  169. package/lib/cjs/components-react/useTranslation.js.map +1 -0
  170. package/lib/cjs/components-react.d.ts +2 -0
  171. package/lib/cjs/components-react.d.ts.map +1 -1
  172. package/lib/cjs/components-react.js +2 -0
  173. package/lib/cjs/components-react.js.map +1 -1
  174. package/lib/esm/components-react/UiComponents.d.ts +1 -5
  175. package/lib/esm/components-react/UiComponents.d.ts.map +1 -1
  176. package/lib/esm/components-react/UiComponents.js +3 -15
  177. package/lib/esm/components-react/UiComponents.js.map +1 -1
  178. package/lib/esm/components-react/UiComponents.json +153 -0
  179. package/lib/esm/components-react/common/DelayedSpinner.js +3 -2
  180. package/lib/esm/components-react/common/DelayedSpinner.js.map +1 -1
  181. package/lib/esm/components-react/common/UseDebouncedAsyncValue.js +2 -1
  182. package/lib/esm/components-react/common/UseDebouncedAsyncValue.js.map +1 -1
  183. package/lib/esm/components-react/converters/NumericTypeConverter.js +4 -2
  184. package/lib/esm/components-react/converters/NumericTypeConverter.js.map +1 -1
  185. package/lib/esm/components-react/converters/TypeConverter.js +2 -1
  186. package/lib/esm/components-react/converters/TypeConverter.js.map +1 -1
  187. package/lib/esm/components-react/datepicker/DatePicker.d.ts +2 -0
  188. package/lib/esm/components-react/datepicker/DatePicker.d.ts.map +1 -1
  189. package/lib/esm/components-react/datepicker/DatePicker.js +43 -40
  190. package/lib/esm/components-react/datepicker/DatePicker.js.map +1 -1
  191. package/lib/esm/components-react/datepicker/DatePickerPopupButton.d.ts +5 -2
  192. package/lib/esm/components-react/datepicker/DatePickerPopupButton.d.ts.map +1 -1
  193. package/lib/esm/components-react/datepicker/DatePickerPopupButton.js +8 -7
  194. package/lib/esm/components-react/datepicker/DatePickerPopupButton.js.map +1 -1
  195. package/lib/esm/components-react/datepicker/IntlFormatter.d.ts +1 -0
  196. package/lib/esm/components-react/datepicker/IntlFormatter.d.ts.map +1 -1
  197. package/lib/esm/components-react/datepicker/IntlFormatter.js +1 -0
  198. package/lib/esm/components-react/datepicker/IntlFormatter.js.map +1 -1
  199. package/lib/esm/components-react/datepicker/TimeField.d.ts.map +1 -1
  200. package/lib/esm/components-react/datepicker/TimeField.js +28 -30
  201. package/lib/esm/components-react/datepicker/TimeField.js.map +1 -1
  202. package/lib/esm/components-react/editors/CustomNumberEditor.js +8 -6
  203. package/lib/esm/components-react/editors/CustomNumberEditor.js.map +1 -1
  204. package/lib/esm/components-react/editors/DateTimeEditor.js +5 -3
  205. package/lib/esm/components-react/editors/DateTimeEditor.js.map +1 -1
  206. package/lib/esm/components-react/editors/EnumEditor.d.ts +0 -1
  207. package/lib/esm/components-react/editors/EnumEditor.d.ts.map +1 -1
  208. package/lib/esm/components-react/editors/EnumEditor.js +2 -3
  209. package/lib/esm/components-react/editors/EnumEditor.js.map +1 -1
  210. package/lib/esm/components-react/editors/PopupButton.d.ts.map +1 -1
  211. package/lib/esm/components-react/editors/PopupButton.js +9 -6
  212. package/lib/esm/components-react/editors/PopupButton.js.map +1 -1
  213. package/lib/esm/components-react/editors/TextEditor.d.ts +0 -1
  214. package/lib/esm/components-react/editors/TextEditor.d.ts.map +1 -1
  215. package/lib/esm/components-react/editors/TextEditor.js +5 -4
  216. package/lib/esm/components-react/editors/TextEditor.js.map +1 -1
  217. package/lib/esm/components-react/editors/TextareaEditor.d.ts +0 -1
  218. package/lib/esm/components-react/editors/TextareaEditor.d.ts.map +1 -1
  219. package/lib/esm/components-react/editors/TextareaEditor.js +1 -2
  220. package/lib/esm/components-react/editors/TextareaEditor.js.map +1 -1
  221. package/lib/esm/components-react/favorite/FavoritePropertyList.js +3 -3
  222. package/lib/esm/components-react/favorite/FavoritePropertyList.js.map +1 -1
  223. package/lib/esm/components-react/filter-builder/FilterBuilderLogicalOperator.d.ts.map +1 -1
  224. package/lib/esm/components-react/filter-builder/FilterBuilderLogicalOperator.js +4 -3
  225. package/lib/esm/components-react/filter-builder/FilterBuilderLogicalOperator.js.map +1 -1
  226. package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js +2 -1
  227. package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
  228. package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.d.ts.map +1 -1
  229. package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js +6 -5
  230. package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
  231. package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js +4 -3
  232. package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
  233. package/lib/esm/components-react/filter-builder/FilterBuilderState.js +3 -3
  234. package/lib/esm/components-react/filter-builder/FilterBuilderState.js.map +1 -1
  235. package/lib/esm/components-react/filter-builder/FilterBuilderToolbar.d.ts.map +1 -1
  236. package/lib/esm/components-react/filter-builder/FilterBuilderToolbar.js +4 -3
  237. package/lib/esm/components-react/filter-builder/FilterBuilderToolbar.js.map +1 -1
  238. package/lib/esm/components-react/filter-builder/Operators.d.ts +1 -0
  239. package/lib/esm/components-react/filter-builder/Operators.d.ts.map +1 -1
  240. package/lib/esm/components-react/filter-builder/Operators.js +1 -0
  241. package/lib/esm/components-react/filter-builder/Operators.js.map +1 -1
  242. package/lib/esm/components-react/filtering/FilteringInput.d.ts +0 -3
  243. package/lib/esm/components-react/filtering/FilteringInput.d.ts.map +1 -1
  244. package/lib/esm/components-react/filtering/FilteringInput.js +6 -8
  245. package/lib/esm/components-react/filtering/FilteringInput.js.map +1 -1
  246. package/lib/esm/components-react/filtering/ResultSelector.d.ts +0 -1
  247. package/lib/esm/components-react/filtering/ResultSelector.d.ts.map +1 -1
  248. package/lib/esm/components-react/filtering/ResultSelector.js +1 -2
  249. package/lib/esm/components-react/filtering/ResultSelector.js.map +1 -1
  250. package/lib/esm/components-react/properties/ValueRendererManager.d.ts +3 -0
  251. package/lib/esm/components-react/properties/ValueRendererManager.d.ts.map +1 -1
  252. package/lib/esm/components-react/properties/ValueRendererManager.js +12 -1
  253. package/lib/esm/components-react/properties/ValueRendererManager.js.map +1 -1
  254. package/lib/esm/components-react/properties/renderers/CommonPropertyRenderer.js +4 -3
  255. package/lib/esm/components-react/properties/renderers/CommonPropertyRenderer.js.map +1 -1
  256. package/lib/esm/components-react/properties/renderers/CustomizablePropertyRenderer.d.ts +25 -0
  257. package/lib/esm/components-react/properties/renderers/CustomizablePropertyRenderer.d.ts.map +1 -0
  258. package/lib/esm/components-react/properties/renderers/CustomizablePropertyRenderer.js +35 -0
  259. package/lib/esm/components-react/properties/renderers/CustomizablePropertyRenderer.js.map +1 -0
  260. package/lib/esm/components-react/properties/renderers/NonPrimitivePropertyRenderer.js +1 -1
  261. package/lib/esm/components-react/properties/renderers/NonPrimitivePropertyRenderer.js.map +1 -1
  262. package/lib/esm/components-react/properties/renderers/PrimitivePropertyRenderer.d.ts +3 -4
  263. package/lib/esm/components-react/properties/renderers/PrimitivePropertyRenderer.d.ts.map +1 -1
  264. package/lib/esm/components-react/properties/renderers/PrimitivePropertyRenderer.js +3 -21
  265. package/lib/esm/components-react/properties/renderers/PrimitivePropertyRenderer.js.map +1 -1
  266. package/lib/esm/components-react/properties/renderers/PropertyView.d.ts +1 -1
  267. package/lib/esm/components-react/properties/renderers/PropertyView.d.ts.map +1 -1
  268. package/lib/esm/components-react/properties/renderers/PropertyView.js +2 -3
  269. package/lib/esm/components-react/properties/renderers/PropertyView.js.map +1 -1
  270. package/lib/esm/components-react/properties/renderers/label/PropertyLabelRenderer.js +4 -4
  271. package/lib/esm/components-react/properties/renderers/label/PropertyLabelRenderer.js.map +1 -1
  272. package/lib/esm/components-react/properties/renderers/value/Common.js +2 -1
  273. package/lib/esm/components-react/properties/renderers/value/Common.js.map +1 -1
  274. package/lib/esm/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.d.ts.map +1 -1
  275. package/lib/esm/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js +8 -11
  276. package/lib/esm/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js.map +1 -1
  277. package/lib/esm/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js +6 -3
  278. package/lib/esm/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js.map +1 -1
  279. package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.js +2 -1
  280. package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
  281. package/lib/esm/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js +2 -1
  282. package/lib/esm/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js.map +1 -1
  283. package/lib/esm/components-react/propertygrid/component/PropertyCategoryBlock.js +2 -1
  284. package/lib/esm/components-react/propertygrid/component/PropertyCategoryBlock.js.map +1 -1
  285. package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.js +2 -2
  286. package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
  287. package/lib/esm/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.d.ts.map +1 -1
  288. package/lib/esm/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js +1 -3
  289. package/lib/esm/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js.map +1 -1
  290. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts +1 -3
  291. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts.map +1 -1
  292. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.js +90 -80
  293. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
  294. package/lib/esm/components-react/propertygrid/dataproviders/FilteringDataProvider.js +13 -11
  295. package/lib/esm/components-react/propertygrid/dataproviders/FilteringDataProvider.js.map +1 -1
  296. package/lib/esm/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js +2 -2
  297. package/lib/esm/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js.map +1 -1
  298. package/lib/esm/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js +2 -1
  299. package/lib/esm/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js.map +1 -1
  300. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCustomGridCategory.js +2 -1
  301. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCustomGridCategory.js.map +1 -1
  302. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js +2 -2
  303. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
  304. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.js +3 -2
  305. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.js.map +1 -1
  306. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js +1 -1
  307. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js.map +1 -1
  308. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js +1 -1
  309. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js.map +1 -1
  310. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts +1 -1
  311. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts.map +1 -1
  312. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js +22 -12
  313. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
  314. package/lib/esm/components-react/selectable-content/SelectableContent.js +3 -2
  315. package/lib/esm/components-react/selectable-content/SelectableContent.js.map +1 -1
  316. package/lib/esm/components-react/toolbar/InternalToolbarComponent.d.ts.map +1 -1
  317. package/lib/esm/components-react/toolbar/InternalToolbarComponent.js +20 -22
  318. package/lib/esm/components-react/toolbar/InternalToolbarComponent.js.map +1 -1
  319. package/lib/esm/components-react/toolbar/PopupItemWithDrag.d.ts.map +1 -1
  320. package/lib/esm/components-react/toolbar/PopupItemWithDrag.js +2 -5
  321. package/lib/esm/components-react/toolbar/PopupItemWithDrag.js.map +1 -1
  322. package/lib/esm/components-react/toolbar/PopupItemsPanel.d.ts.map +1 -1
  323. package/lib/esm/components-react/toolbar/PopupItemsPanel.js +3 -4
  324. package/lib/esm/components-react/toolbar/PopupItemsPanel.js.map +1 -1
  325. package/lib/esm/components-react/toolbar/useConditionalSynchedItems.js +6 -5
  326. package/lib/esm/components-react/toolbar/useConditionalSynchedItems.js.map +1 -1
  327. package/lib/esm/components-react/tree/controlled/TreeModel.js +8 -7
  328. package/lib/esm/components-react/tree/controlled/TreeModel.js.map +1 -1
  329. package/lib/esm/components-react/tree/controlled/TreeNodeLoader.js +8 -6
  330. package/lib/esm/components-react/tree/controlled/TreeNodeLoader.js.map +1 -1
  331. package/lib/esm/components-react/tree/controlled/component/ControlledTree.d.ts.map +1 -1
  332. package/lib/esm/components-react/tree/controlled/component/ControlledTree.js +3 -2
  333. package/lib/esm/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
  334. package/lib/esm/components-react/tree/controlled/internal/SparseTree.js +2 -1
  335. package/lib/esm/components-react/tree/controlled/internal/SparseTree.js.map +1 -1
  336. package/lib/esm/components-react/tree/controlled/internal/TreeSelectionManager.js +4 -2
  337. package/lib/esm/components-react/tree/controlled/internal/TreeSelectionManager.js.map +1 -1
  338. package/lib/esm/components-react/useTranslation.d.ts +7 -0
  339. package/lib/esm/components-react/useTranslation.d.ts.map +1 -0
  340. package/lib/esm/components-react/useTranslation.js +25 -0
  341. package/lib/esm/components-react/useTranslation.js.map +1 -0
  342. package/lib/esm/components-react.d.ts +2 -0
  343. package/lib/esm/components-react.d.ts.map +1 -1
  344. package/lib/esm/components-react.js +2 -0
  345. package/lib/esm/components-react.js.map +1 -1
  346. package/lib/public/locales/en/UiComponents.json +7 -1
  347. package/package.json +5 -6
@@ -1,8 +1,9 @@
1
1
  import { TypeConverterManager } from "../../../converters/TypeConverterManager";
2
2
  /** @internal */
3
3
  export function convertRecordToString(record) {
4
+ var _a;
4
5
  const primitive = record.value;
5
6
  return (primitive.displayValue ||
6
- TypeConverterManager.getConverter(record.property.typename, record.property.converter?.name).convertPropertyToString(record.property, primitive.value));
7
+ TypeConverterManager.getConverter(record.property.typename, (_a = record.property.converter) === null || _a === void 0 ? void 0 : _a.name).convertPropertyToString(record.property, primitive.value));
7
8
  }
8
9
  //# sourceMappingURL=Common.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Common.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/Common.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,gBAAgB;AAChB,MAAM,UAAU,qBAAqB,CACnC,MAAsB;IAEtB,MAAM,SAAS,GAAG,MAAM,CAAC,KAAuB,CAAC;IACjD,OAAO,CACL,SAAS,CAAC,YAAY;QACtB,oBAAoB,CAAC,YAAY,CAC/B,MAAM,CAAC,QAAQ,CAAC,QAAQ,EACxB,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAChC,CAAC,uBAAuB,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,CAC5D,CAAC;AACJ,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 *--------------------------------------------------------------------------------------------*/\nimport type { PrimitiveValue, PropertyRecord } from \"@itwin/appui-abstract\";\nimport { TypeConverterManager } from \"../../../converters/TypeConverterManager\";\n\n/** @internal */\nexport function convertRecordToString(\n record: PropertyRecord\n): string | Promise<string> {\n const primitive = record.value as PrimitiveValue;\n return (\n primitive.displayValue ||\n TypeConverterManager.getConverter(\n record.property.typename,\n record.property.converter?.name\n ).convertPropertyToString(record.property, primitive.value)\n );\n}\n"]}
1
+ {"version":3,"file":"Common.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/Common.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,gBAAgB;AAChB,MAAM,UAAU,qBAAqB,CACnC,MAAsB;;IAEtB,MAAM,SAAS,GAAG,MAAM,CAAC,KAAuB,CAAC;IACjD,OAAO,CACL,SAAS,CAAC,YAAY;QACtB,oBAAoB,CAAC,YAAY,CAC/B,MAAM,CAAC,QAAQ,CAAC,QAAQ,EACxB,MAAA,MAAM,CAAC,QAAQ,CAAC,SAAS,0CAAE,IAAI,CAChC,CAAC,uBAAuB,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,CAC5D,CAAC;AACJ,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 *--------------------------------------------------------------------------------------------*/\nimport type { PrimitiveValue, PropertyRecord } from \"@itwin/appui-abstract\";\nimport { TypeConverterManager } from \"../../../converters/TypeConverterManager\";\n\n/** @internal */\nexport function convertRecordToString(\n record: PropertyRecord\n): string | Promise<string> {\n const primitive = record.value as PrimitiveValue;\n return (\n primitive.displayValue ||\n TypeConverterManager.getConverter(\n record.property.typename,\n record.property.converter?.name\n ).convertPropertyToString(record.property, primitive.value)\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MultilineTextPropertyValueRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.tsx"],"names":[],"mappings":"AAIA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,KAAK,EACV,sBAAsB,EACtB,4BAA4B,EAC7B,MAAM,4BAA4B,CAAC;AAKpC,gBAAgB;AAChB,qBAAa,kCACX,YAAW,sBAAsB;IAE1B,SAAS,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO;IAI1C,MAAM,CACX,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,4BAA4B,GACrC,KAAK,CAAC,SAAS;CAQnB;AA6BD,UAAU,0BAA0B;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,cAAc;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,gBAAgB;AAChB,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAqDtE,CAAC"}
1
+ {"version":3,"file":"MultilineTextPropertyValueRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.tsx"],"names":[],"mappings":"AAIA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,KAAK,EACV,sBAAsB,EACtB,4BAA4B,EAC7B,MAAM,4BAA4B,CAAC;AAMpC,gBAAgB;AAChB,qBAAa,kCACX,YAAW,sBAAsB;IAE1B,SAAS,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO;IAI1C,MAAM,CACX,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,4BAA4B,GACrC,KAAK,CAAC,SAAS;CAQnB;AA6BD,UAAU,0BAA0B;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,cAAc;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,gBAAgB;AAChB,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CA+CtE,CAAC"}
@@ -10,10 +10,10 @@ import * as React from "react";
10
10
  import { useLayoutEffect, useRef, useState } from "react";
11
11
  import { assert } from "@itwin/core-bentley";
12
12
  import { PropertyValueFormat } from "@itwin/appui-abstract";
13
- import { UiComponents } from "../../../UiComponents";
14
13
  import { useRenderedStringValue } from "./PrimitivePropertyValueRenderer";
15
14
  import classnames from "classnames";
16
15
  import { convertRecordToString } from "./Common";
16
+ import { useTranslation } from "../../../useTranslation";
17
17
  /** @internal */
18
18
  export class MultilineTextPropertyValueRenderer {
19
19
  canRender(record) {
@@ -24,27 +24,24 @@ export class MultilineTextPropertyValueRenderer {
24
24
  }
25
25
  }
26
26
  const MultilineTextPropertyValueRendererImpl = (props) => {
27
+ var _a, _b, _c, _d;
27
28
  const { stringValue, element } = useRenderedStringValue(props.record, convertRecordToString, props.context);
28
- return (React.createElement(MultilineTextRenderer, { style: props.context?.style, stringValue: stringValue, isExpanded: props.context?.isExpanded, onExpansionToggled: props.context?.onExpansionToggled, onHeightChanged: props.context?.onHeightChanged }, element));
29
+ return (React.createElement(MultilineTextRenderer, { style: (_a = props.context) === null || _a === void 0 ? void 0 : _a.style, stringValue: stringValue, isExpanded: (_b = props.context) === null || _b === void 0 ? void 0 : _b.isExpanded, onExpansionToggled: (_c = props.context) === null || _c === void 0 ? void 0 : _c.onExpansionToggled, onHeightChanged: (_d = props.context) === null || _d === void 0 ? void 0 : _d.onHeightChanged }, element));
29
30
  };
30
31
  /** @internal */
31
32
  export const MultilineTextRenderer = (props) => {
33
+ const { translate } = useTranslation();
32
34
  const spanRef = useRef(null);
33
35
  const divRef = useRef(null);
34
- const previousHeightRef = useRef(0);
35
36
  const [contentOverflows, setContentOverflows] = useState(false);
36
37
  // eslint-disable-next-line react-hooks/exhaustive-deps
37
38
  useLayoutEffect(() => {
38
39
  assert(divRef.current !== null && spanRef.current !== null);
39
40
  setContentOverflows(spanRef.current.clientWidth < spanRef.current.scrollWidth);
40
- const currentHeight = Math.max(divRef.current.offsetHeight, 27);
41
- if (currentHeight !== previousHeightRef.current) {
42
- props.onHeightChanged?.(currentHeight);
43
- previousHeightRef.current = currentHeight;
44
- }
45
41
  });
46
42
  const handleExpansionToggleClick = (event) => {
47
- props.onExpansionToggled?.();
43
+ var _a;
44
+ (_a = props.onExpansionToggled) === null || _a === void 0 ? void 0 : _a.call(props);
48
45
  event.stopPropagation();
49
46
  };
50
47
  // In order to always trigger onMouseLeave event on PropertyView, collapse button must remain mounted at all times.
@@ -52,7 +49,7 @@ export const MultilineTextRenderer = (props) => {
52
49
  return (React.createElement("div", { ref: divRef, className: "multiline" },
53
50
  React.createElement("span", { ref: spanRef, className: classnames("content", { expanded: props.isExpanded }), style: props.style, title: props.isExpanded ? undefined : props.stringValue },
54
51
  props.children,
55
- React.createElement("button", { className: "expand-toggle", style: { display: props.isExpanded ? "inline-block" : "none" }, onClick: handleExpansionToggleClick }, UiComponents.translate("property.collapse"))),
56
- contentOverflows && !props.isExpanded && (React.createElement("button", { className: "expand-toggle", onClick: handleExpansionToggleClick }, UiComponents.translate("property.expand")))));
52
+ React.createElement("button", { className: "expand-toggle", style: { display: props.isExpanded ? "inline-block" : "none" }, onClick: handleExpansionToggleClick }, translate("property.collapse"))),
53
+ contentOverflows && !props.isExpanded && (React.createElement("button", { className: "expand-toggle", onClick: handleExpansionToggleClick }, translate("property.expand")))));
57
54
  };
58
55
  //# sourceMappingURL=MultilineTextPropertyValueRenderer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MultilineTextPropertyValueRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,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,CAAC,WAAW;YAEtD,KAAK,CAAC,QAAQ;YACf,gCACE,SAAS,EAAC,eAAe,EACzB,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,EAAE,EAC9D,OAAO,EAAE,0BAA0B,IAElC,YAAY,CAAC,SAAS,CAAC,mBAAmB,CAAC,CACrC,CACJ;QACN,gBAAgB,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,CACxC,gCAAQ,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,0BAA0B,IAClE,YAAY,CAAC,SAAS,CAAC,iBAAiB,CAAC,CACnC,CACV,CACG,CACP,CAAC;AACJ,CAAC,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/**\n * @packageDocumentation\n * @module Properties\n */\n\nimport * as React from \"react\";\nimport { useLayoutEffect, useRef, useState } from \"react\";\nimport { assert } from \"@itwin/core-bentley\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { UiComponents } from \"../../../UiComponents\";\nimport type {\n IPropertyValueRenderer,\n PropertyValueRendererContext,\n} from \"../../ValueRendererManager\";\nimport { useRenderedStringValue } from \"./PrimitivePropertyValueRenderer\";\nimport classnames from \"classnames\";\nimport { convertRecordToString } from \"./Common\";\n\n/** @internal */\nexport class MultilineTextPropertyValueRenderer\n implements IPropertyValueRenderer\n{\n public canRender(record: PropertyRecord): boolean {\n return record.value.valueFormat === PropertyValueFormat.Primitive;\n }\n\n public render(\n record: PropertyRecord,\n context?: PropertyValueRendererContext\n ): React.ReactNode {\n return (\n <MultilineTextPropertyValueRendererImpl\n record={record}\n context={context}\n />\n );\n }\n}\n\ninterface MultilineTextPropertyValueRendererImplProps {\n record: PropertyRecord;\n context?: PropertyValueRendererContext;\n children?: never;\n}\n\nconst MultilineTextPropertyValueRendererImpl: React.FC<\n MultilineTextPropertyValueRendererImplProps\n> = (props) => {\n const { stringValue, element } = useRenderedStringValue(\n props.record,\n convertRecordToString,\n props.context\n );\n return (\n <MultilineTextRenderer\n style={props.context?.style}\n stringValue={stringValue}\n isExpanded={props.context?.isExpanded}\n onExpansionToggled={props.context?.onExpansionToggled}\n onHeightChanged={props.context?.onHeightChanged}\n >\n {element}\n </MultilineTextRenderer>\n );\n};\n\ninterface MultilineTextRendererProps {\n stringValue?: string;\n isExpanded?: boolean;\n onExpansionToggled?: () => void;\n onHeightChanged?: (newHeight: number) => void;\n style?: React.CSSProperties;\n /** Content */\n children?: React.ReactNode;\n}\n\n/** @internal */\nexport const MultilineTextRenderer: React.FC<MultilineTextRendererProps> = (\n props\n) => {\n const spanRef = useRef<HTMLSpanElement>(null);\n const divRef = useRef<HTMLDivElement>(null);\n const previousHeightRef = useRef(0);\n const [contentOverflows, setContentOverflows] = useState<boolean>(false);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(() => {\n assert(divRef.current !== null && spanRef.current !== null);\n\n setContentOverflows(\n spanRef.current.clientWidth < spanRef.current.scrollWidth\n );\n\n const currentHeight = Math.max(divRef.current.offsetHeight, 27);\n if (currentHeight !== previousHeightRef.current) {\n props.onHeightChanged?.(currentHeight);\n previousHeightRef.current = currentHeight;\n }\n });\n\n const handleExpansionToggleClick = (event: React.MouseEvent) => {\n props.onExpansionToggled?.();\n event.stopPropagation();\n };\n\n // In order to always trigger onMouseLeave event on PropertyView, collapse button must remain mounted at all times.\n // https://github.com/facebook/react/issues/6807\n return (\n <div ref={divRef} className=\"multiline\">\n <span\n ref={spanRef}\n className={classnames(\"content\", { expanded: props.isExpanded })}\n style={props.style}\n title={props.isExpanded ? undefined : props.stringValue}\n >\n {props.children}\n <button\n className=\"expand-toggle\"\n style={{ display: props.isExpanded ? \"inline-block\" : \"none\" }}\n onClick={handleExpansionToggleClick}\n >\n {UiComponents.translate(\"property.collapse\")}\n </button>\n </span>\n {contentOverflows && !props.isExpanded && (\n <button className=\"expand-toggle\" onClick={handleExpansionToggleClick}>\n {UiComponents.translate(\"property.expand\")}\n </button>\n )}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"MultilineTextPropertyValueRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAK5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,gBAAgB;AAChB,MAAM,OAAO,kCAAkC;IAGtC,SAAS,CAAC,MAAsB;QACrC,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,KAAK,mBAAmB,CAAC,SAAS,CAAC;IACpE,CAAC;IAEM,MAAM,CACX,MAAsB,EACtB,OAAsC;QAEtC,OAAO,CACL,oBAAC,sCAAsC,IACrC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,GAChB,CACH,CAAC;IACJ,CAAC;CACF;AAQD,MAAM,sCAAsC,GAExC,CAAC,KAAK,EAAE,EAAE;;IACZ,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,sBAAsB,CACrD,KAAK,CAAC,MAAM,EACZ,qBAAqB,EACrB,KAAK,CAAC,OAAO,CACd,CAAC;IAC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,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,EAChE,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW;YAEtD,KAAK,CAAC,QAAQ;YACf,gCACE,SAAS,EAAC,eAAe,EACzB,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,EAAE,EAC9D,OAAO,EAAE,0BAA0B,IAElC,SAAS,CAAC,mBAAmB,CAAC,CACxB,CACJ;QACN,gBAAgB,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,CACxC,gCAAQ,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,0BAA0B,IAClE,SAAS,CAAC,iBAAiB,CAAC,CACtB,CACV,CACG,CACP,CAAC;AACJ,CAAC,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/**\n * @packageDocumentation\n * @module Properties\n */\n\nimport * as React from \"react\";\nimport { useLayoutEffect, useRef, useState } from \"react\";\nimport { assert } from \"@itwin/core-bentley\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport type {\n IPropertyValueRenderer,\n PropertyValueRendererContext,\n} from \"../../ValueRendererManager\";\nimport { useRenderedStringValue } from \"./PrimitivePropertyValueRenderer\";\nimport classnames from \"classnames\";\nimport { convertRecordToString } from \"./Common\";\nimport { useTranslation } from \"../../../useTranslation\";\n\n/** @internal */\nexport class MultilineTextPropertyValueRenderer\n implements IPropertyValueRenderer\n{\n public canRender(record: PropertyRecord): boolean {\n return record.value.valueFormat === PropertyValueFormat.Primitive;\n }\n\n public render(\n record: PropertyRecord,\n context?: PropertyValueRendererContext\n ): React.ReactNode {\n return (\n <MultilineTextPropertyValueRendererImpl\n record={record}\n context={context}\n />\n );\n }\n}\n\ninterface MultilineTextPropertyValueRendererImplProps {\n record: PropertyRecord;\n context?: PropertyValueRendererContext;\n children?: never;\n}\n\nconst MultilineTextPropertyValueRendererImpl: React.FC<\n MultilineTextPropertyValueRendererImplProps\n> = (props) => {\n const { stringValue, element } = useRenderedStringValue(\n props.record,\n convertRecordToString,\n props.context\n );\n return (\n <MultilineTextRenderer\n style={props.context?.style}\n stringValue={stringValue}\n isExpanded={props.context?.isExpanded}\n onExpansionToggled={props.context?.onExpansionToggled}\n onHeightChanged={props.context?.onHeightChanged}\n >\n {element}\n </MultilineTextRenderer>\n );\n};\n\ninterface MultilineTextRendererProps {\n stringValue?: string;\n isExpanded?: boolean;\n onExpansionToggled?: () => void;\n onHeightChanged?: (newHeight: number) => void;\n style?: React.CSSProperties;\n /** Content */\n children?: React.ReactNode;\n}\n\n/** @internal */\nexport const MultilineTextRenderer: React.FC<MultilineTextRendererProps> = (\n props\n) => {\n const { translate } = useTranslation();\n const spanRef = useRef<HTMLSpanElement>(null);\n const divRef = useRef<HTMLDivElement>(null);\n const [contentOverflows, setContentOverflows] = useState<boolean>(false);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(() => {\n assert(divRef.current !== null && spanRef.current !== null);\n\n setContentOverflows(\n spanRef.current.clientWidth < spanRef.current.scrollWidth\n );\n });\n\n const handleExpansionToggleClick = (event: React.MouseEvent) => {\n props.onExpansionToggled?.();\n event.stopPropagation();\n };\n\n // In order to always trigger onMouseLeave event on PropertyView, collapse button must remain mounted at all times.\n // https://github.com/facebook/react/issues/6807\n return (\n <div ref={divRef} className=\"multiline\">\n <span\n ref={spanRef}\n className={classnames(\"content\", { expanded: props.isExpanded })}\n style={props.style}\n title={props.isExpanded ? undefined : props.stringValue}\n >\n {props.children}\n <button\n className=\"expand-toggle\"\n style={{ display: props.isExpanded ? \"inline-block\" : \"none\" }}\n onClick={handleExpansionToggleClick}\n >\n {translate(\"property.collapse\")}\n </button>\n </span>\n {contentOverflows && !props.isExpanded && (\n <button className=\"expand-toggle\" onClick={handleExpansionToggleClick}>\n {translate(\"property.expand\")}\n </button>\n )}\n </div>\n );\n};\n"]}
@@ -29,13 +29,15 @@ export class PrimitivePropertyValueRenderer {
29
29
  * @internal
30
30
  */
31
31
  export function convertPrimitiveRecordToString(record) {
32
+ var _a;
32
33
  const primitive = record.value;
33
- return TypeConverterManager.getConverter(record.property.typename, record.property.converter?.name).convertPropertyToString(record.property, primitive.value);
34
+ return TypeConverterManager.getConverter(record.property.typename, (_a = record.property.converter) === null || _a === void 0 ? void 0 : _a.name).convertPropertyToString(record.property, primitive.value);
34
35
  }
35
36
  /** @internal */
36
37
  export function PrimitivePropertyValueRendererImpl(props) {
38
+ var _a;
37
39
  const { stringValue, element } = useRenderedStringValue(props.record, props.stringValueCalculator, props.context, props.linksHandler);
38
- return (React.createElement("span", { style: props.context?.style, title: stringValue }, element));
40
+ return (React.createElement("span", { style: (_a = props.context) === null || _a === void 0 ? void 0 : _a.style, title: stringValue }, element));
39
41
  }
40
42
  /**
41
43
  * Default link handler used for handling records,
@@ -51,8 +53,9 @@ export const DEFAULT_LINKS_HANDLER = {
51
53
  };
52
54
  /** @internal */
53
55
  export function useRenderedStringValue(record, stringValueCalculator, context, linksHandler) {
56
+ var _a, _b;
54
57
  const stringValue = useAsyncValue(stringValueCalculator(record));
55
- const el = stringValue === undefined ? (context?.defaultValue) : (React.createElement(LinksRenderer, { value: stringValue, links: record.links ?? linksHandler ?? DEFAULT_LINKS_HANDLER, highlighter: context?.textHighlighter }));
58
+ const el = stringValue === undefined ? (context === null || context === void 0 ? void 0 : context.defaultValue) : (React.createElement(LinksRenderer, { value: stringValue, links: (_b = (_a = record.links) !== null && _a !== void 0 ? _a : linksHandler) !== null && _b !== void 0 ? _b : DEFAULT_LINKS_HANDLER, highlighter: context === null || context === void 0 ? void 0 : context.textHighlighter }));
56
59
  return { stringValue, element: el };
57
60
  }
58
61
  //# sourceMappingURL=PrimitivePropertyValueRenderer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrimitivePropertyValueRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qDAAqD,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAMlD;;GAEG;AACH,MAAM,OAAO,8BAA8B;IACzC,uDAAuD;IAChD,SAAS,CAAC,MAAsB;QACrC,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,KAAK,mBAAmB,CAAC,SAAS,CAAC;IACpE,CAAC;IAED,iEAAiE;IAC1D,MAAM,CACX,MAAsB,EACtB,OAAsC;QAEtC,OAAO,CACL,oBAAC,kCAAkC,IACjC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,qBAAqB,EAAE,8BAA8B,GACrD,CACH,CAAC;IACJ,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,UAAU,8BAA8B,CAC5C,MAAsB;IAEtB,MAAM,SAAS,GAAG,MAAM,CAAC,KAAuB,CAAC;IACjD,OAAO,oBAAoB,CAAC,YAAY,CACtC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EACxB,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAChC,CAAC,uBAAuB,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;AAC9D,CAAC;AAUD,gBAAgB;AAChB,MAAM,UAAU,kCAAkC,CAChD,KAA8C;IAE9C,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,sBAAsB,CACrD,KAAK,CAAC,MAAM,EACZ,KAAK,CAAC,qBAAqB,EAC3B,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,YAAY,CACnB,CAAC;IACF,OAAO,CACL,8BAAM,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,IAClD,OAAO,CACH,CACR,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAqB;IACrD,OAAO,EAAE,mBAAmB,CAAC,QAAQ;IACrC,OAAO,EAAE,mBAAmB,CAAC,eAAe;CAC7C,CAAC;AAEF,gBAAgB;AAChB,MAAM,UAAU,sBAAsB,CACpC,MAAsB,EACtB,qBAA2E,EAC3E,OAAsC,EACtC,YAA+B;IAE/B,MAAM,WAAW,GAAG,aAAa,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC;IACjE,MAAM,EAAE,GACN,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,CAC1B,OAAO,EAAE,YAAY,CACtB,CAAC,CAAC,CAAC,CACF,oBAAC,aAAa,IACZ,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,YAAY,IAAI,qBAAqB,EAC5D,WAAW,EAAE,OAAO,EAAE,eAAe,GACrC,CACH,CAAC;IACJ,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AACtC,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 Properties\n */\n\nimport * as React from \"react\";\nimport type {\n LinkElementsInfo,\n PrimitiveValue,\n PropertyRecord,\n} from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { useAsyncValue } from \"../../../common/UseAsyncValue\";\nimport { TypeConverterManager } from \"../../../converters/TypeConverterManager\";\nimport { PropertyGridCommons } from \"../../../propertygrid/component/PropertyGridCommons\";\nimport { LinksRenderer } from \"../../LinkHandler\";\nimport type {\n IPropertyValueRenderer,\n PropertyValueRendererContext,\n} from \"../../ValueRendererManager\";\n\n/** Default Primitive Property Renderer\n * @public\n */\nexport class PrimitivePropertyValueRenderer implements IPropertyValueRenderer {\n /** Checks if the renderer can handle given property */\n public canRender(record: PropertyRecord) {\n return record.value.valueFormat === PropertyValueFormat.Primitive;\n }\n\n /** Method that returns a JSX representation of PropertyRecord */\n public render(\n record: PropertyRecord,\n context?: PropertyValueRendererContext\n ) {\n return (\n <PrimitivePropertyValueRendererImpl\n record={record}\n context={context}\n stringValueCalculator={convertPrimitiveRecordToString}\n />\n );\n }\n}\n\n/**\n * Function that converts primitive [[PropertyRecord]] to string\n * @internal\n */\nexport function convertPrimitiveRecordToString(\n record: PropertyRecord\n): string | Promise<string> {\n const primitive = record.value as PrimitiveValue;\n return TypeConverterManager.getConverter(\n record.property.typename,\n record.property.converter?.name\n ).convertPropertyToString(record.property, primitive.value);\n}\n\n/** @internal */\ninterface PrimitivePropertyValueRendererImplProps {\n record: PropertyRecord;\n stringValueCalculator: (record: PropertyRecord) => string | Promise<string>;\n context?: PropertyValueRendererContext;\n linksHandler?: LinkElementsInfo;\n}\n\n/** @internal */\nexport function PrimitivePropertyValueRendererImpl(\n props: PrimitivePropertyValueRendererImplProps\n) {\n const { stringValue, element } = useRenderedStringValue(\n props.record,\n props.stringValueCalculator,\n props.context,\n props.linksHandler\n );\n return (\n <span style={props.context?.style} title={stringValue}>\n {element}\n </span>\n );\n}\n\n/**\n * Default link handler used for handling records,\n * which did not have any specified LinkElementsInfo.\n *\n * Default matcher matches all URLs using regex.\n * Default onClick opens window or sets location.href with found URL.\n * @public\n */\nexport const DEFAULT_LINKS_HANDLER: LinkElementsInfo = {\n matcher: PropertyGridCommons.getLinks,\n onClick: PropertyGridCommons.handleLinkClick,\n};\n\n/** @internal */\nexport function useRenderedStringValue(\n record: PropertyRecord,\n stringValueCalculator: (record: PropertyRecord) => string | Promise<string>,\n context?: PropertyValueRendererContext,\n linksHandler?: LinkElementsInfo\n): { stringValue?: string; element: React.ReactNode } {\n const stringValue = useAsyncValue(stringValueCalculator(record));\n const el =\n stringValue === undefined ? (\n context?.defaultValue\n ) : (\n <LinksRenderer\n value={stringValue}\n links={record.links ?? linksHandler ?? DEFAULT_LINKS_HANDLER}\n highlighter={context?.textHighlighter}\n />\n );\n return { stringValue, element: el };\n}\n"]}
1
+ {"version":3,"file":"PrimitivePropertyValueRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qDAAqD,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAMlD;;GAEG;AACH,MAAM,OAAO,8BAA8B;IACzC,uDAAuD;IAChD,SAAS,CAAC,MAAsB;QACrC,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,KAAK,mBAAmB,CAAC,SAAS,CAAC;IACpE,CAAC;IAED,iEAAiE;IAC1D,MAAM,CACX,MAAsB,EACtB,OAAsC;QAEtC,OAAO,CACL,oBAAC,kCAAkC,IACjC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,qBAAqB,EA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ClB,KAAK,EAAE,MAAA,MAAA,MAAM,CAAC,KAAK,mCAAI,YAAY,mCAAI,qBAAqB,EAC5D,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,GACrC,CACH,CAAC;IACJ,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AACtC,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 Properties\n */\n\nimport * as React from \"react\";\nimport type {\n LinkElementsInfo,\n PrimitiveValue,\n PropertyRecord,\n} from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { useAsyncValue } from \"../../../common/UseAsyncValue\";\nimport { TypeConverterManager } from \"../../../converters/TypeConverterManager\";\nimport { PropertyGridCommons } from \"../../../propertygrid/component/PropertyGridCommons\";\nimport { LinksRenderer } from \"../../LinkHandler\";\nimport type {\n IPropertyValueRenderer,\n PropertyValueRendererContext,\n} from \"../../ValueRendererManager\";\n\n/** Default Primitive Property Renderer\n * @public\n */\nexport class PrimitivePropertyValueRenderer implements IPropertyValueRenderer {\n /** Checks if the renderer can handle given property */\n public canRender(record: PropertyRecord) {\n return record.value.valueFormat === PropertyValueFormat.Primitive;\n }\n\n /** Method that returns a JSX representation of PropertyRecord */\n public render(\n record: PropertyRecord,\n context?: PropertyValueRendererContext\n ) {\n return (\n <PrimitivePropertyValueRendererImpl\n record={record}\n context={context}\n stringValueCalculator={convertPrimitiveRecordToString}\n />\n );\n }\n}\n\n/**\n * Function that converts primitive [[PropertyRecord]] to string\n * @internal\n */\nexport function convertPrimitiveRecordToString(\n record: PropertyRecord\n): string | Promise<string> {\n const primitive = record.value as PrimitiveValue;\n return TypeConverterManager.getConverter(\n record.property.typename,\n record.property.converter?.name\n ).convertPropertyToString(record.property, primitive.value);\n}\n\n/** @internal */\ninterface PrimitivePropertyValueRendererImplProps {\n record: PropertyRecord;\n stringValueCalculator: (record: PropertyRecord) => string | Promise<string>;\n context?: PropertyValueRendererContext;\n linksHandler?: LinkElementsInfo;\n}\n\n/** @internal */\nexport function PrimitivePropertyValueRendererImpl(\n props: PrimitivePropertyValueRendererImplProps\n) {\n const { stringValue, element } = useRenderedStringValue(\n props.record,\n props.stringValueCalculator,\n props.context,\n props.linksHandler\n );\n return (\n <span style={props.context?.style} title={stringValue}>\n {element}\n </span>\n );\n}\n\n/**\n * Default link handler used for handling records,\n * which did not have any specified LinkElementsInfo.\n *\n * Default matcher matches all URLs using regex.\n * Default onClick opens window or sets location.href with found URL.\n * @public\n */\nexport const DEFAULT_LINKS_HANDLER: LinkElementsInfo = {\n matcher: PropertyGridCommons.getLinks,\n onClick: PropertyGridCommons.handleLinkClick,\n};\n\n/** @internal */\nexport function useRenderedStringValue(\n record: PropertyRecord,\n stringValueCalculator: (record: PropertyRecord) => string | Promise<string>,\n context?: PropertyValueRendererContext,\n linksHandler?: LinkElementsInfo\n): { stringValue?: string; element: React.ReactNode } {\n const stringValue = useAsyncValue(stringValueCalculator(record));\n const el =\n stringValue === undefined ? (\n context?.defaultValue\n ) : (\n <LinksRenderer\n value={stringValue}\n links={record.links ?? linksHandler ?? DEFAULT_LINKS_HANDLER}\n highlighter={context?.textHighlighter}\n />\n );\n return { stringValue, element: el };\n}\n"]}
@@ -16,10 +16,11 @@ class PropertyCategoryRendererManager {
16
16
  }
17
17
  /** Retrieves a category rendering component based for the passed category item. */
18
18
  getCategoryComponent(categoryItem) {
19
+ var _a;
19
20
  if (categoryItem.derivedCategory.renderer === undefined) {
20
21
  return undefined;
21
22
  }
22
- return this._categoryRenderers.get(categoryItem.derivedCategory.renderer.name)?.(categoryItem);
23
+ return (_a = this._categoryRenderers.get(categoryItem.derivedCategory.renderer.name)) === null || _a === void 0 ? void 0 : _a(categoryItem);
23
24
  }
24
25
  /** Registers a renderer factory function to be invoked on categories with specific renderer name. */
25
26
  addRenderer(rendererName, categoryRenderer, override = false) {
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyCategoryRendererManager.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/PropertyCategoryRendererManager.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AA2BH;;;;GAIG;AACH,MAAa,+BAA+B;IAA5C;QACU,uBAAkB,GAAG,IAAI,GAAG,EAAoC,CAAC;IAuC3E,CAAC;IAnCC,mFAAmF;IAC5E,oBAAoB,CACzB,YAA8B;QAE9B,IAAI,YAAY,CAAC,eAAe,CAAC,QAAQ,KAAK,SAAS,EAAE;YACvD,OAAO,SAAS,CAAC;SAClB;QAED,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAChC,YAAY,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAC3C,EAAE,CAAC,YAAY,CAAC,CAAC;IACpB,CAAC;IAED,qGAAqG;IAC9F,WAAW,CAChB,YAAoB,EACpB,gBAA0C,EAC1C,QAAQ,GAAG,KAAK;QAEhB,IAAI,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE;YAC1D,MAAM,SAAS,GAAG,+BAA+B,CAAC,IAAI,CAAC;YACvD,MAAM,UAAU,GACd,+BAA+B,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;YAC7D,MAAM,IAAI,KAAK,CACb,GAAG,SAAS,IAAI,UAAU,qBAAqB,YAAY,wDAAwD,CACpH,CAAC;SACH;QAED,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;IAC9D,CAAC;IAED,sDAAsD;IAC/C,cAAc,CAAC,YAAoB;QACxC,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAC/C,CAAC;;AApCa,8CAAc,GAAG,IAAI,+BAA+B,EAAE,AAAxC,CAAyC;SAH1D,+BAA+B","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 PropertyGrid\n */\n\nimport type * as React from \"react\";\nimport type { VirtualizedPropertyGridContext } from \"./component/VirtualizedPropertyGrid\";\nimport type { GridCategoryItem } from \"./internal/flat-items/FlatGridItem\";\n\n/**\n * Props that property category renderer receives.\n * @public\n */\nexport interface PropertyCategoryRendererProps {\n /** The category being rendered. */\n categoryItem: GridCategoryItem;\n /** Context of the surrounding property grid. */\n gridContext: VirtualizedPropertyGridContext;\n /** Sets the allocated height for category contents. */\n onHeightChanged: (newHeight: number) => void;\n}\n\n/**\n * Factory function that produces custom property category components.\n * @public\n */\nexport type PropertyCategoryRenderer = (\n categoryItem: GridCategoryItem\n) => React.ComponentType<PropertyCategoryRendererProps> | undefined;\n\n/**\n * Keeps a record of currently registered property category renderers and determines which renderers get invoked for\n * each category.\n * @public\n */\nexport class PropertyCategoryRendererManager {\n private _categoryRenderers = new Map<string, PropertyCategoryRenderer>();\n\n public static defaultManager = new PropertyCategoryRendererManager();\n\n /** Retrieves a category rendering component based for the passed category item. */\n public getCategoryComponent(\n categoryItem: GridCategoryItem\n ): React.ComponentType<PropertyCategoryRendererProps> | undefined {\n if (categoryItem.derivedCategory.renderer === undefined) {\n return undefined;\n }\n\n return this._categoryRenderers.get(\n categoryItem.derivedCategory.renderer.name\n )?.(categoryItem);\n }\n\n /** Registers a renderer factory function to be invoked on categories with specific renderer name. */\n public addRenderer(\n rendererName: string,\n categoryRenderer: PropertyCategoryRenderer,\n override = false\n ): void {\n if (this._categoryRenderers.has(rendererName) && !override) {\n const className = PropertyCategoryRendererManager.name;\n const methodName =\n PropertyCategoryRendererManager.prototype.addRenderer.name;\n throw new Error(\n `${className}.${methodName} error: renderer '${rendererName}' has already been added. Did you mean to override it?`\n );\n }\n\n this._categoryRenderers.set(rendererName, categoryRenderer);\n }\n\n /** Removes previous renderer factory registration. */\n public removeRenderer(rendererName: string): void {\n this._categoryRenderers.delete(rendererName);\n }\n}\n"]}
1
+ {"version":3,"file":"PropertyCategoryRendererManager.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/PropertyCategoryRendererManager.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AA2BH;;;;GAIG;AACH,MAAa,+BAA+B;IAA5C;QACU,uBAAkB,GAAG,IAAI,GAAG,EAAoC,CAAC;IAuC3E,CAAC;IAnCC,mFAAmF;IAC5E,oBAAoB,CACzB,YAA8B;;QAE9B,IAAI,YAAY,CAAC,eAAe,CAAC,QAAQ,KAAK,SAAS,EAAE;YACvD,OAAO,SAAS,CAAC;SAClB;QAED,OAAO,MAAA,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAChC,YAAY,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAC3C,0CAAG,YAAY,CAAC,CAAC;IACpB,CAAC;IAED,qGAAqG;IAC9F,WAAW,CAChB,YAAoB,EACpB,gBAA0C,EAC1C,QAAQ,GAAG,KAAK;QAEhB,IAAI,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE;YAC1D,MAAM,SAAS,GAAG,+BAA+B,CAAC,IAAI,CAAC;YACvD,MAAM,UAAU,GACd,+BAA+B,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;YAC7D,MAAM,IAAI,KAAK,CACb,GAAG,SAAS,IAAI,UAAU,qBAAqB,YAAY,wDAAwD,CACpH,CAAC;SACH;QAED,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;IAC9D,CAAC;IAED,sDAAsD;IAC/C,cAAc,CAAC,YAAoB;QACxC,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAC/C,CAAC;;AApCa,8CAAc,GAAG,IAAI,+BAA+B,EAAE,AAAxC,CAAyC;SAH1D,+BAA+B","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 PropertyGrid\n */\n\nimport type * as React from \"react\";\nimport type { VirtualizedPropertyGridContext } from \"./component/VirtualizedPropertyGrid\";\nimport type { GridCategoryItem } from \"./internal/flat-items/FlatGridItem\";\n\n/**\n * Props that property category renderer receives.\n * @public\n */\nexport interface PropertyCategoryRendererProps {\n /** The category being rendered. */\n categoryItem: GridCategoryItem;\n /** Context of the surrounding property grid. */\n gridContext: VirtualizedPropertyGridContext;\n /** Sets the allocated height for category contents. */\n onHeightChanged: (newHeight: number) => void;\n}\n\n/**\n * Factory function that produces custom property category components.\n * @public\n */\nexport type PropertyCategoryRenderer = (\n categoryItem: GridCategoryItem\n) => React.ComponentType<PropertyCategoryRendererProps> | undefined;\n\n/**\n * Keeps a record of currently registered property category renderers and determines which renderers get invoked for\n * each category.\n * @public\n */\nexport class PropertyCategoryRendererManager {\n private _categoryRenderers = new Map<string, PropertyCategoryRenderer>();\n\n public static defaultManager = new PropertyCategoryRendererManager();\n\n /** Retrieves a category rendering component based for the passed category item. */\n public getCategoryComponent(\n categoryItem: GridCategoryItem\n ): React.ComponentType<PropertyCategoryRendererProps> | undefined {\n if (categoryItem.derivedCategory.renderer === undefined) {\n return undefined;\n }\n\n return this._categoryRenderers.get(\n categoryItem.derivedCategory.renderer.name\n )?.(categoryItem);\n }\n\n /** Registers a renderer factory function to be invoked on categories with specific renderer name. */\n public addRenderer(\n rendererName: string,\n categoryRenderer: PropertyCategoryRenderer,\n override = false\n ): void {\n if (this._categoryRenderers.has(rendererName) && !override) {\n const className = PropertyCategoryRendererManager.name;\n const methodName =\n PropertyCategoryRendererManager.prototype.addRenderer.name;\n throw new Error(\n `${className}.${methodName} error: renderer '${rendererName}' has already been added. Did you mean to override it?`\n );\n }\n\n this._categoryRenderers.set(rendererName, categoryRenderer);\n }\n\n /** Removes previous renderer factory registration. */\n public removeRenderer(rendererName: string): void {\n this._categoryRenderers.delete(rendererName);\n }\n}\n"]}
@@ -40,13 +40,14 @@ class ColumnResizingPropertyListPropsSupplier extends React.Component {
40
40
  };
41
41
  }
42
42
  isMinimumColumnSizeEnabled() {
43
+ var _a;
43
44
  if (this.props.orientation !== Orientation.Horizontal)
44
45
  return false;
45
46
  // calculated how much width all the borders of nested properties takes up.
46
47
  const bordersWidth = this.props.maxPropertyDepth
47
48
  ? this.props.maxPropertyDepth * BORDER_WIDTH
48
49
  : 0;
49
- const actionButtonWidth = this.props.actionButtonWidth ?? 0;
50
+ const actionButtonWidth = (_a = this.props.actionButtonWidth) !== null && _a !== void 0 ? _a : 0;
50
51
  // minimum with required to render property. This consists of:
51
52
  // * minimum label width
52
53
  // * 1px resizer
@@ -1 +1 @@
1
- {"version":3,"file":"ColumnResizingPropertyListPropsSupplier.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG5D,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,eAAe,GAAG,EAAE,CAAC;AA2C3B;;;GAGG;AACH,MAAa,uCAAwC,SAAQ,KAAK,CAAC,SAGlE;IAHD;;QAImB,kBAAa,GAAG,IAAI,CAAC;QACrB,qBAAgB,GAAG,IAAI,CAAC;QACxB,qBAAgB,GAAG,GAAG,CAAC;QAChC,cAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAClC,cAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAE1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AAe,EAAE,IAAI,CAAC,qBAAqB;YAC3C,WAAW,EAAE,IAAI,CAAC,mBAAmB,EAAE;YACvC,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB;YACvD,0BAA0B,EAAE,IAAI,CAAC,2BAA2B;YAC5D,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B;YACjE,yBAAyB,EAAE,IAAI,CAAC,0BAA0B;YAC1D,UAAU,EAAE;gBACV,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,aAAc;gBACxC,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,aAAc;gBACxC,iBAAiB,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAkB;gBAChD,0BAA0B,EAAE,IAAI,CAAC,0BAA0B,EAAE;aAC9D;SACF,CAAC;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC;;AA9Fa,oDAAY,GACxB;IACE,aAAa,EAAE,GAAG;IAClB,aAAa,EAAE,GAAG;CACnB,AAJuB,CAItB;SApBO,uCAAuC","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 *--------------------------------------------------------------------------------------------*/\nimport * as React from \"react\";\nimport type { RatioChangeResult } from \"@itwin/core-react\";\nimport { Orientation, UiGeometry } from \"@itwin/core-react\";\nimport type { PropertyListProps } from \"./PropertyList\";\n\nconst BORDER_WIDTH = 10;\nconst PROPERTY_PADDING = 16;\nconst VALUE_MIN_WIDTH = 10;\n\n/** @internal */\nexport type ColumnResizeRelatedPropertyListProps = Required<\n Pick<\n PropertyListProps,\n | \"onColumnChanged\"\n | \"columnRatio\"\n | \"isResizeHandleHovered\"\n | \"onResizeHandleHoverChanged\"\n | \"isResizeHandleBeingDragged\"\n | \"onResizeHandleDragChanged\"\n | \"columnInfo\"\n | \"orientation\"\n | \"width\"\n >\n>;\n\n/** @internal */\nexport interface ColumnResizingPropertyListPropsSupplierProps {\n /** Orientation of the properties */\n orientation: Orientation;\n /** Width of the property list */\n width: number;\n /** Minimum allowed label column width, after which resizing stops */\n minLabelWidth?: number;\n /** Minimum allowed value column width, after which resizing stops */\n minValueWidth?: number;\n /** Fixed action button column width */\n actionButtonWidth?: number;\n /** Maximum depth of the properties shown */\n maxPropertyDepth?: number;\n /** A callback that receives the required column-resize-related props for the [[PropertyList]] component */\n children: (props: ColumnResizeRelatedPropertyListProps) => React.ReactNode;\n}\n\n/** @internal */\nexport interface ColumnResizingPropertyListPropsSupplierState {\n columnRatio: number;\n isResizeHandleHovered: boolean;\n isResizeHandleBeingDragged: boolean;\n}\n\n/**\n * Wrapped PropertyCategoryBlock React component with list of properties and render optimization\n * @internal\n */\nexport class ColumnResizingPropertyListPropsSupplier extends React.Component<\n ColumnResizingPropertyListPropsSupplierProps,\n ColumnResizingPropertyListPropsSupplierState\n> {\n private readonly _initialRatio = 0.25;\n private readonly _defaultMinRatio = 0.15;\n private readonly _defaultMaxRatio = 0.6;\n private _minRatio = this._defaultMinRatio;\n private _maxRatio = this._defaultMaxRatio;\n\n public override state: ColumnResizingPropertyListPropsSupplierState = {\n columnRatio: this._initialRatio,\n isResizeHandleHovered: false,\n isResizeHandleBeingDragged: false,\n };\n\n public static defaultProps: Partial<ColumnResizingPropertyListPropsSupplierProps> =\n {\n minLabelWidth: 100,\n minValueWidth: 100,\n };\n\n private _onColumnRatioChanged = (ratio: number): RatioChangeResult => {\n ratio = UiGeometry.clamp(ratio, this._minRatio, this._maxRatio);\n if (this.state.columnRatio === ratio) return { ratio };\n\n this.setState({ columnRatio: ratio });\n return { ratio };\n };\n\n // istanbul ignore next\n private _onResizeHandleHoverChanged = (isHovered: boolean) => {\n this.setState({ isResizeHandleHovered: isHovered });\n };\n\n private _onResizeHandleDragChanged = (isDragStarted: boolean) => {\n this.setState({ isResizeHandleBeingDragged: isDragStarted });\n };\n\n private isMinimumColumnSizeEnabled() {\n if (this.props.orientation !== Orientation.Horizontal) return false;\n\n // calculated how much width all the borders of nested properties takes up.\n const bordersWidth = this.props.maxPropertyDepth\n ? this.props.maxPropertyDepth * BORDER_WIDTH\n : 0;\n const actionButtonWidth = this.props.actionButtonWidth ?? 0;\n\n // minimum with required to render property. This consists of:\n // * minimum label width\n // * 1px resizer\n // * minimum value width\n // * actions buttons width\n // * all nested borders width\n // * padding\n const propertyWidth =\n this.props.minLabelWidth! +\n 1 +\n this.props.minValueWidth! +\n actionButtonWidth +\n bordersWidth +\n PROPERTY_PADDING;\n // default behavior for screens that are too small to have minimum column widths\n if (this.props.width < propertyWidth) {\n this._minRatio = this._defaultMinRatio;\n // if there are action buttons calculate maximum ratio for label. Otherwise use default.\n this._maxRatio = this.props.actionButtonWidth\n ? (this.props.width -\n this.props.actionButtonWidth -\n bordersWidth -\n PROPERTY_PADDING -\n VALUE_MIN_WIDTH) /\n this.props.width\n : this._defaultMaxRatio;\n return false;\n }\n\n this._minRatio = this.props.minLabelWidth! / this.props.width;\n this._maxRatio =\n (this.props.width - actionButtonWidth - this.props.minValueWidth!) /\n this.props.width;\n return true;\n }\n\n private getValidColumnRatio(): number {\n return UiGeometry.clamp(\n this.state.columnRatio,\n this._minRatio,\n this._maxRatio\n );\n }\n\n public override render() {\n const listProps: ColumnResizeRelatedPropertyListProps = {\n orientation: this.props.orientation,\n width: this.props.width,\n onColumnChanged: this._onColumnRatioChanged,\n columnRatio: this.getValidColumnRatio(),\n isResizeHandleHovered: this.state.isResizeHandleHovered,\n onResizeHandleHoverChanged: this._onResizeHandleHoverChanged,\n isResizeHandleBeingDragged: this.state.isResizeHandleBeingDragged,\n onResizeHandleDragChanged: this._onResizeHandleDragChanged,\n columnInfo: {\n minLabelWidth: this.props.minLabelWidth!,\n minValueWidth: this.props.minValueWidth!,\n actionButtonWidth: this.props.actionButtonWidth!,\n isMinimumColumnSizeEnabled: this.isMinimumColumnSizeEnabled(),\n },\n };\n return this.props.children(listProps);\n }\n}\n"]}
1
+ {"version":3,"file":"ColumnResizingPropertyListPropsSupplier.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG5D,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,eAAe,GAAG,EAAE,CAAC;AA2C3B;;;GAGG;AACH,MAAa,uCAAwC,SAAQ,KAAK,CAAC,SAGlE;IAHD;;QAImB,kBAAa,GAAG,IAAI,CAAC;QACrB,qBAAgB,GAAG,IAAI,CAAC;QACxB,qBAAgB,GAAG,GAAG,CAAC;QAChC,cAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAClC,cAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAE1B,UAAK,GAAiD;YACpE,WAAW,EAAE,IAAI,CAAC,aAAa;YAC/B,qBAAqB,EAAE,KAAK;YAC5B,0BAA0B,EAAE,KAAK;SAClC,CAAC;QAQM,0BAAqB,GAAG,CAAC,KAAa,EAAqB,EAAE;YACnE,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAChE,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,KAAK,KAAK;gBAAE,OAAO,EAAE,KAAK,EAAE,CAAC;YAEvD,IAAI,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC;YACtC,OAAO,EAAE,KAAK,EAAE,CAAC;QACnB,CAAC,CAAC;QAEF,uBAAuB;QACf,gCAA2B,GAAG,CAAC,SAAkB,EAAE,EAAE;YAC3D,IAAI,CAAC,QAAQ,CAAC,EAAE,qBAAqB,E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DAAY,GACxB;IACE,aAAa,EAAE,GAAG;IAClB,aAAa,EAAE,GAAG;CACnB,AAJuB,CAItB;SApBO,uCAAuC","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 *--------------------------------------------------------------------------------------------*/\nimport * as React from \"react\";\nimport type { RatioChangeResult } from \"@itwin/core-react\";\nimport { Orientation, UiGeometry } from \"@itwin/core-react\";\nimport type { PropertyListProps } from \"./PropertyList\";\n\nconst BORDER_WIDTH = 10;\nconst PROPERTY_PADDING = 16;\nconst VALUE_MIN_WIDTH = 10;\n\n/** @internal */\nexport type ColumnResizeRelatedPropertyListProps = Required<\n Pick<\n PropertyListProps,\n | \"onColumnChanged\"\n | \"columnRatio\"\n | \"isResizeHandleHovered\"\n | \"onResizeHandleHoverChanged\"\n | \"isResizeHandleBeingDragged\"\n | \"onResizeHandleDragChanged\"\n | \"columnInfo\"\n | \"orientation\"\n | \"width\"\n >\n>;\n\n/** @internal */\nexport interface ColumnResizingPropertyListPropsSupplierProps {\n /** Orientation of the properties */\n orientation: Orientation;\n /** Width of the property list */\n width: number;\n /** Minimum allowed label column width, after which resizing stops */\n minLabelWidth?: number;\n /** Minimum allowed value column width, after which resizing stops */\n minValueWidth?: number;\n /** Fixed action button column width */\n actionButtonWidth?: number;\n /** Maximum depth of the properties shown */\n maxPropertyDepth?: number;\n /** A callback that receives the required column-resize-related props for the [[PropertyList]] component */\n children: (props: ColumnResizeRelatedPropertyListProps) => React.ReactNode;\n}\n\n/** @internal */\nexport interface ColumnResizingPropertyListPropsSupplierState {\n columnRatio: number;\n isResizeHandleHovered: boolean;\n isResizeHandleBeingDragged: boolean;\n}\n\n/**\n * Wrapped PropertyCategoryBlock React component with list of properties and render optimization\n * @internal\n */\nexport class ColumnResizingPropertyListPropsSupplier extends React.Component<\n ColumnResizingPropertyListPropsSupplierProps,\n ColumnResizingPropertyListPropsSupplierState\n> {\n private readonly _initialRatio = 0.25;\n private readonly _defaultMinRatio = 0.15;\n private readonly _defaultMaxRatio = 0.6;\n private _minRatio = this._defaultMinRatio;\n private _maxRatio = this._defaultMaxRatio;\n\n public override state: ColumnResizingPropertyListPropsSupplierState = {\n columnRatio: this._initialRatio,\n isResizeHandleHovered: false,\n isResizeHandleBeingDragged: false,\n };\n\n public static defaultProps: Partial<ColumnResizingPropertyListPropsSupplierProps> =\n {\n minLabelWidth: 100,\n minValueWidth: 100,\n };\n\n private _onColumnRatioChanged = (ratio: number): RatioChangeResult => {\n ratio = UiGeometry.clamp(ratio, this._minRatio, this._maxRatio);\n if (this.state.columnRatio === ratio) return { ratio };\n\n this.setState({ columnRatio: ratio });\n return { ratio };\n };\n\n // istanbul ignore next\n private _onResizeHandleHoverChanged = (isHovered: boolean) => {\n this.setState({ isResizeHandleHovered: isHovered });\n };\n\n private _onResizeHandleDragChanged = (isDragStarted: boolean) => {\n this.setState({ isResizeHandleBeingDragged: isDragStarted });\n };\n\n private isMinimumColumnSizeEnabled() {\n if (this.props.orientation !== Orientation.Horizontal) return false;\n\n // calculated how much width all the borders of nested properties takes up.\n const bordersWidth = this.props.maxPropertyDepth\n ? this.props.maxPropertyDepth * BORDER_WIDTH\n : 0;\n const actionButtonWidth = this.props.actionButtonWidth ?? 0;\n\n // minimum with required to render property. This consists of:\n // * minimum label width\n // * 1px resizer\n // * minimum value width\n // * actions buttons width\n // * all nested borders width\n // * padding\n const propertyWidth =\n this.props.minLabelWidth! +\n 1 +\n this.props.minValueWidth! +\n actionButtonWidth +\n bordersWidth +\n PROPERTY_PADDING;\n // default behavior for screens that are too small to have minimum column widths\n if (this.props.width < propertyWidth) {\n this._minRatio = this._defaultMinRatio;\n // if there are action buttons calculate maximum ratio for label. Otherwise use default.\n this._maxRatio = this.props.actionButtonWidth\n ? (this.props.width -\n this.props.actionButtonWidth -\n bordersWidth -\n PROPERTY_PADDING -\n VALUE_MIN_WIDTH) /\n this.props.width\n : this._defaultMaxRatio;\n return false;\n }\n\n this._minRatio = this.props.minLabelWidth! / this.props.width;\n this._maxRatio =\n (this.props.width - actionButtonWidth - this.props.minValueWidth!) /\n this.props.width;\n return true;\n }\n\n private getValidColumnRatio(): number {\n return UiGeometry.clamp(\n this.state.columnRatio,\n this._minRatio,\n this._maxRatio\n );\n }\n\n public override render() {\n const listProps: ColumnResizeRelatedPropertyListProps = {\n orientation: this.props.orientation,\n width: this.props.width,\n onColumnChanged: this._onColumnRatioChanged,\n columnRatio: this.getValidColumnRatio(),\n isResizeHandleHovered: this.state.isResizeHandleHovered,\n onResizeHandleHoverChanged: this._onResizeHandleHoverChanged,\n isResizeHandleBeingDragged: this.state.isResizeHandleBeingDragged,\n onResizeHandleDragChanged: this._onResizeHandleDragChanged,\n columnInfo: {\n minLabelWidth: this.props.minLabelWidth!,\n minValueWidth: this.props.minValueWidth!,\n actionButtonWidth: this.props.actionButtonWidth!,\n isMinimumColumnSizeEnabled: this.isMinimumColumnSizeEnabled(),\n },\n };\n return this.props.children(listProps);\n }\n}\n"]}
@@ -25,9 +25,10 @@ export class PropertyCategoryBlock extends React.Component {
25
25
  }
26
26
  /** @internal */
27
27
  render() {
28
+ var _a;
28
29
  const { highlight, category, children, onExpansionToggled, ...other } = this.props;
29
30
  const activeMatchIndex = this.props.category.name ===
30
- highlight?.activeHighlight?.highlightedItemIdentifier
31
+ ((_a = highlight === null || highlight === void 0 ? void 0 : highlight.activeHighlight) === null || _a === void 0 ? void 0 : _a.highlightedItemIdentifier)
31
32
  ? highlight.activeHighlight.highlightIndex
32
33
  : undefined;
33
34
  const label = highlight ? (React.createElement(HighlightedText, { text: category.label, activeMatchIndex: activeMatchIndex, searchText: highlight.highlightedText })) : (category.label);
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyCategoryBlock.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/PropertyCategoryBlock.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK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,OAAO,KACR,KAAK;YAET,oBAAC,eAAe,CAAC,OAAO,IAAC,KAAK,EAAE,KAAK,GAAI;YACzC,oBAAC,eAAe,CAAC,OAAO,IAAC,SAAS,EAAC,+BAA+B,IAC/D,QAAQ,CAAC,MAAM,IAAI,QAAQ,CACJ,CACF,CAC3B,CAAC;IACJ,CAAC;CACF","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 PropertyGrid\n */\n\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { ExpandableBlock } from \"@itwin/itwinui-react\";\nimport { HighlightedText } from \"../../common/HighlightedText\";\nimport type { HighlightingComponentProps } from \"../../common/HighlightingComponentProps\";\nimport type { PropertyCategory } from \"../PropertyDataProvider\";\n\n/**\n * Properties for the [[PropertyCategoryBlock]] React component\n * @public\n */\nexport interface PropertyCategoryBlockProps extends CommonProps {\n /** Category of the properties */\n category: PropertyCategory;\n /** Callback to when PropertyCategoryBlock gets expended or collapsed */\n onExpansionToggled?: (categoryName: string) => void;\n /** Properties used for highlighting */\n highlight?: HighlightingComponentProps;\n /** Content */\n children?: React.ReactNode;\n}\n\n/**\n * PropertyCategoryBlock React component\n * @public\n */\nexport class PropertyCategoryBlock extends React.Component<PropertyCategoryBlockProps> {\n constructor(props: PropertyCategoryBlockProps) {\n super(props);\n }\n\n private toggleExpansion() {\n if (this.props.onExpansionToggled)\n this.props.onExpansionToggled(this.props.category.name);\n }\n\n private _handleToggle = (_isExpanding: boolean): void => {\n this.toggleExpansion();\n };\n\n /** @internal */\n public override render() {\n const { highlight, category, children, onExpansionToggled, ...other } =\n this.props;\n const activeMatchIndex =\n this.props.category.name ===\n highlight?.activeHighlight?.highlightedItemIdentifier\n ? highlight.activeHighlight.highlightIndex\n : undefined;\n const label = highlight ? (\n <HighlightedText\n text={category.label}\n activeMatchIndex={activeMatchIndex}\n searchText={highlight.highlightedText}\n />\n ) : (\n category.label\n );\n return (\n <ExpandableBlock.Wrapper\n isExpanded={category.expand}\n onToggle={this._handleToggle}\n size=\"small\"\n {...other}\n >\n <ExpandableBlock.Trigger label={label} />\n <ExpandableBlock.Content className=\"components-expandable-content\">\n {category.expand && children}\n </ExpandableBlock.Content>\n </ExpandableBlock.Wrapper>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"PropertyCategoryBlock.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/PropertyCategoryBlock.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAmB/D;;;GAGG;AACH,MAAM,OAAO,qBAAsB,SAAQ,KAAK,CAAC,SAAqC;IACpF,YAAY,KAAiC;QAC3C,KAAK,CAAC,KAAK,CAAC,CAAC;QAQP,kBAAa,GAAG,CAAC,YAAqB,EAAQ,EAAE;YACtD,IAAI,CAAC,eAAe,EAAE,CAAC;QACzB,CAAC,CAAC;IATF,CAAC;IAEO,eAAe;QACrB,IAAI,IAAI,CAAC,KAAK,CAAC,kBAAkB;YAC/B,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC;IAMD,gBAAgB;IACA,MAAM;;QACpB,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,GACnE,IAAI,CAAC,KAAK,CAAC;QACb,MAAM,gBAAgB,GACpB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI;aACxB,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,eAAe,0CAAE,yBAAyB,CAAA;YACnD,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,cAAc;YAC1C,CAAC,CAAC,SAAS,CAAC;QAChB,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,CACxB,oBAAC,eAAe,IACd,IAAI,EAAE,QAAQ,CAAC,KAAK,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,SAAS,CAAC,eAAe,GACrC,CACH,CAAC,CAAC,CAAC,CACF,QAAQ,CAAC,KAAK,CACf,CAAC;QACF,OAAO,CACL,oBAAC,eAAe,CAAC,OAAO,IACtB,UAAU,EAAE,QAAQ,CAAC,MAAM,EAC3B,QAAQ,EAAE,IAAI,CAAC,aAAa,EAC5B,IAAI,EAAC,OAAO,KACR,KAAK;YAET,oBAAC,eAAe,CAAC,OAAO,IAAC,KAAK,EAAE,KAAK,GAAI;YACzC,oBAAC,eAAe,CAAC,OAAO,IAAC,SAAS,EAAC,+BAA+B,IAC/D,QAAQ,CAAC,MAAM,IAAI,QAAQ,CACJ,CACF,CAC3B,CAAC;IACJ,CAAC;CACF","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 PropertyGrid\n */\n\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { ExpandableBlock } from \"@itwin/itwinui-react\";\nimport { HighlightedText } from \"../../common/HighlightedText\";\nimport type { HighlightingComponentProps } from \"../../common/HighlightingComponentProps\";\nimport type { PropertyCategory } from \"../PropertyDataProvider\";\n\n/**\n * Properties for the [[PropertyCategoryBlock]] React component\n * @public\n */\nexport interface PropertyCategoryBlockProps extends CommonProps {\n /** Category of the properties */\n category: PropertyCategory;\n /** Callback to when PropertyCategoryBlock gets expended or collapsed */\n onExpansionToggled?: (categoryName: string) => void;\n /** Properties used for highlighting */\n highlight?: HighlightingComponentProps;\n /** Content */\n children?: React.ReactNode;\n}\n\n/**\n * PropertyCategoryBlock React component\n * @public\n */\nexport class PropertyCategoryBlock extends React.Component<PropertyCategoryBlockProps> {\n constructor(props: PropertyCategoryBlockProps) {\n super(props);\n }\n\n private toggleExpansion() {\n if (this.props.onExpansionToggled)\n this.props.onExpansionToggled(this.props.category.name);\n }\n\n private _handleToggle = (_isExpanding: boolean): void => {\n this.toggleExpansion();\n };\n\n /** @internal */\n public override render() {\n const { highlight, category, children, onExpansionToggled, ...other } =\n this.props;\n const activeMatchIndex =\n this.props.category.name ===\n highlight?.activeHighlight?.highlightedItemIdentifier\n ? highlight.activeHighlight.highlightIndex\n : undefined;\n const label = highlight ? (\n <HighlightedText\n text={category.label}\n activeMatchIndex={activeMatchIndex}\n searchText={highlight.highlightedText}\n />\n ) : (\n category.label\n );\n return (\n <ExpandableBlock.Wrapper\n isExpanded={category.expand}\n onToggle={this._handleToggle}\n size=\"small\"\n {...other}\n >\n <ExpandableBlock.Trigger label={label} />\n <ExpandableBlock.Content className=\"components-expandable-content\">\n {category.expand && children}\n </ExpandableBlock.Content>\n </ExpandableBlock.Wrapper>\n );\n }\n}\n"]}
@@ -10,10 +10,10 @@ import { matchLinks } from "../../common/Links";
10
10
  /** @internal */
11
11
  class PropertyGridCommons {
12
12
  static getCurrentOrientation(width, preferredOrientation, isOrientationFixed, horizontalOrientationMinWidth) {
13
- const orientation = preferredOrientation ?? Orientation.Horizontal;
13
+ const orientation = preferredOrientation !== null && preferredOrientation !== void 0 ? preferredOrientation : Orientation.Horizontal;
14
14
  if (isOrientationFixed)
15
15
  return orientation;
16
- horizontalOrientationMinWidth = horizontalOrientationMinWidth ?? 300;
16
+ horizontalOrientationMinWidth = horizontalOrientationMinWidth !== null && horizontalOrientationMinWidth !== void 0 ? horizontalOrientationMinWidth : 300;
17
17
  // Switch to Vertical if width too small
18
18
  if (width < horizontalOrientationMinWidth)
19
19
  return Orientation.Vertical;
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyGridCommons.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/PropertyGridCommons.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAgGhD,gBAAgB;AAChB,MAAa,mBAAmB;IACvB,MAAM,CAAC,qBAAqB,CACjC,KAAa,EACb,oBAAkC,EAClC,kBAA4B,EAC5B,6BAAsC;QAEtC,MAAM,WAAW,GAAG,oBAAoB,IAAI,WAAW,CAAC,UAAU,CAAC;QACnE,IAAI,kBAAkB;YAAE,OAAO,WAAW,CAAC;QAE3C,6BAA6B,GAAG,6BAA6B,IAAI,GAAG,CAAC;QACrE,wCAAwC;QACxC,IAAI,KAAK,GAAG,6BAA6B;YAAE,OAAO,WAAW,CAAC,QAAQ,CAAC;QAEvE,OAAO,WAAW,CAAC;IACrB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,MAAM,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,UAAU,CAAC,MAAM,IAAI,CAAC;YAAE,OAAO;QACnC,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAChC,uBAAuB;QACvB,IAAI,SAAS,IAAI,SAAS,CAAC,GAAG,EAAE;YAC9B,IAAI,SAAS,CAAC,MAAM,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,KAAK;gBAC9D,QAAQ,CAAC,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC;iBAC3B;gBACH,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;gBACxD,IAAI,UAAU;oBAAE,UAAU,CAAC,KAAK,EAAE,CAAC;aACpC;SACF;IACH,CAAC;;AAED;;;GAGG;AACW,4BAAQ,GAAG,CACvB,KAAa,EAC0B,EAAE;IACzC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,GAAG,CAC1B,CAAC,QAA8C,EAAE,EAAE;QACjD,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC5D,CAAC,CACF,CAAC;AACJ,CAAC,CAAC;SAhDS,mBAAmB","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 PropertyGrid\n */\n\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Orientation } from \"@itwin/core-react\";\nimport type { HighlightingComponentProps } from \"../../common/HighlightingComponentProps\";\nimport { matchLinks } from \"../../common/Links\";\nimport type { PropertyUpdatedArgs } from \"../../editors/EditorContainer\";\nimport type { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer\";\nimport type { PropertyValueRendererManager } from \"../../properties/ValueRendererManager\";\nimport type { FilteredType } from \"../dataproviders/filterers/PropertyDataFiltererBase\";\nimport type { PropertyCategory } from \"../PropertyDataProvider\";\n\n/** Arguments for the Property Editing event callback\n * @public\n */\nexport interface PropertyEditingArgs {\n /** PropertyRecord being edited */\n propertyRecord: PropertyRecord;\n /** Unique key of currently edited property */\n propertyKey?: string;\n}\n\n/** Arguments for `PropertyGridProps.onPropertyContextMenu` callback\n * @public\n */\nexport interface PropertyGridContextMenuArgs {\n /** PropertyRecord being edited */\n propertyRecord: PropertyRecord;\n /** An event which caused the context menu callback */\n event: React.MouseEvent;\n}\n\n/**\n * Common Property Grid Props to be used by Property Grid Variants\n * @public\n */\nexport interface CommonPropertyGridProps extends CommonProps {\n /** Grid orientation. When not defined, it is chosen automatically based on width of the grid. */\n orientation?: Orientation;\n\n /** Enables/disables property hovering effect */\n isPropertyHoverEnabled?: boolean;\n\n /** Called to show a context menu when properties are right-clicked */\n onPropertyContextMenu?: (args: PropertyGridContextMenuArgs) => void;\n\n /** Enables/disables property selection */\n isPropertySelectionEnabled?: boolean;\n /** Enables/disables property selection with right click */\n isPropertySelectionOnRightClickEnabled?: boolean;\n /** Callback to property selection */\n onPropertySelectionChanged?: (property: PropertyRecord) => void;\n\n /** Enables/disables property editing */\n isPropertyEditingEnabled?: boolean;\n /** Callback for when properties are being edited */\n onPropertyEditing?: (\n args: PropertyEditingArgs,\n category: PropertyCategory\n ) => void;\n /** Callback for when properties are updated */\n onPropertyUpdated?: (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => Promise<boolean>;\n\n /** Custom property value renderer manager */\n propertyValueRendererManager?: PropertyValueRendererManager;\n\n /** Indicates whether the orientation is fixed and does not auto-switch to Vertical when the width is too narrow. Defaults to false. */\n isOrientationFixed?: boolean;\n /** The minimum width before the auto-switch to Vertical when the width is too narrow. Defaults to 300. */\n horizontalOrientationMinWidth?: number;\n\n /** Minimum allowed label column width, after which resizing stops */\n minLabelWidth?: number;\n /** Minimum allowed value column width, after which resizing stops */\n minValueWidth?: number;\n /** Fixed action button column width */\n actionButtonWidth?: number;\n\n /**\n * Array of action button renderers. Each renderer is called for each property and can decide\n * to render an action button for the property or not.\n */\n actionButtonRenderers?: ActionButtonRenderer[];\n}\n\n/**\n * Properties for highlighting text in property grid.\n * @public\n */\nexport interface PropertyGridContentHighlightProps\n extends HighlightingComponentProps {\n /**\n * Specifies what the highlighting should be applied on - category labels, property labels and / or property values.\n * Defaults to \"nowhere\".\n */\n filteredTypes?: FilteredType[];\n}\n\n/** @internal */\nexport class PropertyGridCommons {\n public static getCurrentOrientation(\n width: number,\n preferredOrientation?: Orientation,\n isOrientationFixed?: boolean,\n horizontalOrientationMinWidth?: number\n ): Orientation {\n const orientation = preferredOrientation ?? Orientation.Horizontal;\n if (isOrientationFixed) return orientation;\n\n horizontalOrientationMinWidth = horizontalOrientationMinWidth ?? 300;\n // Switch to Vertical if width too small\n if (width < horizontalOrientationMinWidth) return Orientation.Vertical;\n\n return orientation;\n }\n\n /**\n * Helper method to handle link clicks\n * @internal\n */\n public static handleLinkClick(text: string) {\n const linksArray = matchLinks(text);\n if (linksArray.length <= 0) return;\n const foundLink = linksArray[0];\n // istanbul ignore else\n if (foundLink && foundLink.url) {\n if (foundLink.schema === \"mailto:\" || foundLink.schema === \"pw:\")\n location.href = foundLink.url;\n else {\n const windowOpen = window.open(foundLink.url, \"_blank\");\n if (windowOpen) windowOpen.focus();\n }\n }\n }\n\n /**\n * A helper method to get links from string.\n * @internal\n */\n public static getLinks = (\n value: string\n ): Array<{ start: number; end: number }> => {\n return matchLinks(value).map(\n (linkInfo: { index: number; lastIndex: number }) => {\n return { start: linkInfo.index, end: linkInfo.lastIndex };\n }\n );\n };\n}\n"]}
1
+ {"version":3,"file":"PropertyGridCommons.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/PropertyGridCommons.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAgGhD,gBAAgB;AAChB,MAAa,mBAAmB;IACvB,MAAM,CAAC,qBAAqB,CACjC,KAAa,EACb,oBAAkC,EAClC,kBAA4B,EAC5B,6BAAsC;QAEtC,MAAM,WAAW,GAAG,oBAAoB,aAApB,oBAAoB,cAApB,oBAAoB,GAAI,WAAW,CAAC,UAAU,CAAC;QACnE,IAAI,kBAAkB;YAAE,OAAO,WAAW,CAAC;QAE3C,6BAA6B,GAAG,6BAA6B,aAA7B,6BAA6B,cAA7B,6BAA6B,GAAI,GAAG,CAAC;QACrE,wCAAwC;QACxC,IAAI,KAAK,GAAG,6BAA6B;YAAE,OAAO,WAAW,CAAC,QAAQ,CAAC;QAEvE,OAAO,WAAW,CAAC;IACrB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,MAAM,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,UAAU,CAAC,MAAM,IAAI,CAAC;YAAE,OAAO;QACnC,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAChC,uBAAuB;QACvB,IAAI,SAAS,IAAI,SAAS,CAAC,GAAG,EAAE;YAC9B,IAAI,SAAS,CAAC,MAAM,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,KAAK;gBAC9D,QAAQ,CAAC,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC;iBAC3B;gBACH,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;gBACxD,IAAI,UAAU;oBAAE,UAAU,CAAC,KAAK,EAAE,CAAC;aACpC;SACF;IACH,CAAC;;AAED;;;GAGG;AACW,4BAAQ,GAAG,CACvB,KAAa,EAC0B,EAAE;IACzC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,GAAG,CAC1B,CAAC,QAA8C,EAAE,EAAE;QACjD,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC;IAC5D,CAAC,CACF,CAAC;AACJ,CAAC,CAAC;SAhDS,mBAAmB","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 PropertyGrid\n */\n\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Orientation } from \"@itwin/core-react\";\nimport type { HighlightingComponentProps } from \"../../common/HighlightingComponentProps\";\nimport { matchLinks } from \"../../common/Links\";\nimport type { PropertyUpdatedArgs } from \"../../editors/EditorContainer\";\nimport type { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer\";\nimport type { PropertyValueRendererManager } from \"../../properties/ValueRendererManager\";\nimport type { FilteredType } from \"../dataproviders/filterers/PropertyDataFiltererBase\";\nimport type { PropertyCategory } from \"../PropertyDataProvider\";\n\n/** Arguments for the Property Editing event callback\n * @public\n */\nexport interface PropertyEditingArgs {\n /** PropertyRecord being edited */\n propertyRecord: PropertyRecord;\n /** Unique key of currently edited property */\n propertyKey?: string;\n}\n\n/** Arguments for `PropertyGridProps.onPropertyContextMenu` callback\n * @public\n */\nexport interface PropertyGridContextMenuArgs {\n /** PropertyRecord being edited */\n propertyRecord: PropertyRecord;\n /** An event which caused the context menu callback */\n event: React.MouseEvent;\n}\n\n/**\n * Common Property Grid Props to be used by Property Grid Variants\n * @public\n */\nexport interface CommonPropertyGridProps extends CommonProps {\n /** Grid orientation. When not defined, it is chosen automatically based on width of the grid. */\n orientation?: Orientation;\n\n /** Enables/disables property hovering effect */\n isPropertyHoverEnabled?: boolean;\n\n /** Called to show a context menu when properties are right-clicked */\n onPropertyContextMenu?: (args: PropertyGridContextMenuArgs) => void;\n\n /** Enables/disables property selection */\n isPropertySelectionEnabled?: boolean;\n /** Enables/disables property selection with right click */\n isPropertySelectionOnRightClickEnabled?: boolean;\n /** Callback to property selection */\n onPropertySelectionChanged?: (property: PropertyRecord) => void;\n\n /** Enables/disables property editing */\n isPropertyEditingEnabled?: boolean;\n /** Callback for when properties are being edited */\n onPropertyEditing?: (\n args: PropertyEditingArgs,\n category: PropertyCategory\n ) => void;\n /** Callback for when properties are updated */\n onPropertyUpdated?: (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => Promise<boolean>;\n\n /** Custom property value renderer manager */\n propertyValueRendererManager?: PropertyValueRendererManager;\n\n /** Indicates whether the orientation is fixed and does not auto-switch to Vertical when the width is too narrow. Defaults to false. */\n isOrientationFixed?: boolean;\n /** The minimum width before the auto-switch to Vertical when the width is too narrow. Defaults to 300. */\n horizontalOrientationMinWidth?: number;\n\n /** Minimum allowed label column width, after which resizing stops */\n minLabelWidth?: number;\n /** Minimum allowed value column width, after which resizing stops */\n minValueWidth?: number;\n /** Fixed action button column width */\n actionButtonWidth?: number;\n\n /**\n * Array of action button renderers. Each renderer is called for each property and can decide\n * to render an action button for the property or not.\n */\n actionButtonRenderers?: ActionButtonRenderer[];\n}\n\n/**\n * Properties for highlighting text in property grid.\n * @public\n */\nexport interface PropertyGridContentHighlightProps\n extends HighlightingComponentProps {\n /**\n * Specifies what the highlighting should be applied on - category labels, property labels and / or property values.\n * Defaults to \"nowhere\".\n */\n filteredTypes?: FilteredType[];\n}\n\n/** @internal */\nexport class PropertyGridCommons {\n public static getCurrentOrientation(\n width: number,\n preferredOrientation?: Orientation,\n isOrientationFixed?: boolean,\n horizontalOrientationMinWidth?: number\n ): Orientation {\n const orientation = preferredOrientation ?? Orientation.Horizontal;\n if (isOrientationFixed) return orientation;\n\n horizontalOrientationMinWidth = horizontalOrientationMinWidth ?? 300;\n // Switch to Vertical if width too small\n if (width < horizontalOrientationMinWidth) return Orientation.Vertical;\n\n return orientation;\n }\n\n /**\n * Helper method to handle link clicks\n * @internal\n */\n public static handleLinkClick(text: string) {\n const linksArray = matchLinks(text);\n if (linksArray.length <= 0) return;\n const foundLink = linksArray[0];\n // istanbul ignore else\n if (foundLink && foundLink.url) {\n if (foundLink.schema === \"mailto:\" || foundLink.schema === \"pw:\")\n location.href = foundLink.url;\n else {\n const windowOpen = window.open(foundLink.url, \"_blank\");\n if (windowOpen) windowOpen.focus();\n }\n }\n }\n\n /**\n * A helper method to get links from string.\n * @internal\n */\n public static getLinks = (\n value: string\n ): Array<{ start: number; end: number }> => {\n return matchLinks(value).map(\n (linkInfo: { index: number; lastIndex: number }) => {\n return { start: linkInfo.index, end: linkInfo.lastIndex };\n }\n );\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyGridEventsRelatedPropsSupplier.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,gBAAgB;AAChB,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAC/C,iBAAiB,EACf,mBAAmB,GACnB,wBAAwB,GACxB,uBAAuB,GACvB,cAAc,GACd,cAAc,GACd,qBAAqB,GACrB,oBAAoB,CACvB,GACC,IAAI,CACF,uBAAuB,EACvB,wCAAwC,GAAG,0BAA0B,CACtE,GACD,QAAQ,CACN,IAAI,CACF,uBAAuB,EACvB,wBAAwB,GAAG,4BAA4B,CACxD,CACF,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,2CAA2C,GAAG,IAAI,CAC5D,uBAAuB,EACrB,uBAAuB,GACvB,wCAAwC,GACxC,wCAAwC,GACxC,4BAA4B,GAC5B,0BAA0B,GAC1B,mBAAmB,CACtB,GACC,QAAQ,CACN,IAAI,CACF,uBAAuB,EACvB,wBAAwB,GAAG,4BAA4B,CACxD,CACF,GAAG;IACF,QAAQ,EAAE,CAAC,OAAO,EAAE,8BAA8B,KAAK,KAAK,CAAC,SAAS,CAAC;CACxE,CAAC;AAEJ;;GAEG;AACH,UAAU,2CAA2C;IACnD,gDAAgD;IAChD,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,8CAA8C;IAC9C,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,qBAAa,sCAAuC,SAAQ,KAAK,CAAC,SAAS,CACzE,2CAA2C,EAC3C,2CAA2C,CAC5C;IACC,gBAAgB;gBACJ,KAAK,EAAE,2CAA2C;IAK9D,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,sBAAsB;IAI9B,OAAO,CAAC,uBAAuB,CAO7B;IAEF,OAAO,CAAC,kBAAkB,CAIxB;IAEF,OAAO,CAAC,sBAAsB,CAO5B;IAEF,OAAO,CAAC,aAAa,CASnB;IAEF,OAAO,CAAC,aAAa,CAEnB;IAEF,OAAO,CAAC,6BAA6B;IAgBrC,OAAO,CAAC,4BAA4B;IAgCpC,gBAAgB;IACA,MAAM;CAwBvB"}
1
+ {"version":3,"file":"PropertyGridEventsRelatedPropsSupplier.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,gBAAgB;AAChB,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAC/C,iBAAiB,EACf,mBAAmB,GACnB,wBAAwB,GACxB,uBAAuB,GACvB,cAAc,GACd,cAAc,GACd,qBAAqB,GACrB,oBAAoB,CACvB,GACC,IAAI,CACF,uBAAuB,EACvB,wCAAwC,GAAG,0BAA0B,CACtE,GACD,QAAQ,CACN,IAAI,CACF,uBAAuB,EACvB,wBAAwB,GAAG,4BAA4B,CACxD,CACF,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,2CAA2C,GAAG,IAAI,CAC5D,uBAAuB,EACrB,uBAAuB,GACvB,wCAAwC,GACxC,wCAAwC,GACxC,4BAA4B,GAC5B,0BAA0B,GAC1B,mBAAmB,CACtB,GACC,QAAQ,CACN,IAAI,CACF,uBAAuB,EACvB,wBAAwB,GAAG,4BAA4B,CACxD,CACF,GAAG;IACF,QAAQ,EAAE,CAAC,OAAO,EAAE,8BAA8B,KAAK,KAAK,CAAC,SAAS,CAAC;CACxE,CAAC;AAEJ;;GAEG;AACH,UAAU,2CAA2C;IACnD,gDAAgD;IAChD,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,8CAA8C;IAC9C,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,qBAAa,sCAAuC,SAAQ,KAAK,CAAC,SAAS,CACzE,2CAA2C,EAC3C,2CAA2C,CAC5C;IACC,gBAAgB;gBACJ,KAAK,EAAE,2CAA2C;IAK9D,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,sBAAsB;IAI9B,OAAO,CAAC,uBAAuB,CAO7B;IAEF,OAAO,CAAC,kBAAkB,CAIxB;IAEF,OAAO,CAAC,sBAAsB,CAO5B;IAEF,OAAO,CAAC,aAAa,CASnB;IAEF,OAAO,CAAC,aAAa,CAEnB;IAEF,OAAO,CAAC,6BAA6B;IAgBrC,OAAO,CAAC,4BAA4B;IA8BpC,gBAAgB;IACA,MAAM;CAwBvB"}
@@ -7,7 +7,6 @@
7
7
  */
8
8
  import "./PropertyGrid.scss";
9
9
  import * as React from "react";
10
- import { PropertyValueFormat } from "@itwin/appui-abstract";
11
10
  /** PropertyGridEventsRelatedPropsSupplier React component.
12
11
  * @internal
13
12
  */
@@ -62,10 +61,9 @@ export class PropertyGridEventsRelatedPropsSupplier extends React.Component {
62
61
  onEnabledPropertyLeftClicked(property, key) {
63
62
  let selectedPropertyKey = this.state.selectedPropertyKey;
64
63
  let editingPropertyKey = this.state.editingPropertyKey;
65
- const isValuePrimitive = property.value.valueFormat === PropertyValueFormat.Primitive;
66
64
  const isEditingEnabled = this.props.isPropertyEditingEnabled;
67
65
  const isSelectionEnabled = this.props.isPropertySelectionEnabled;
68
- if (isEditingEnabled && isValuePrimitive) {
66
+ if (isEditingEnabled) {
69
67
  // Deselect editing key only if another selection was made
70
68
  editingPropertyKey =
71
69
  isSelectionEnabled && selectedPropertyKey !== key ? undefined : key;
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyGridEventsRelatedPropsSupplier.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;GAEG;AACH,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA2D5D;;GAEG;AACH,MAAM,OAAO,sCAAuC,SAAQ,KAAK,CAAC,SAGjE;IACC,gBAAgB;IAChB,YAAY,KAAkD;QAC5D,KAAK,CAAC,KAAK,CAAC,CAAC;QAeP,4BAAuB,GAAG,CAChC,QAAwB,EACxB,GAAY,EACZ,EAAE;YACF,uBAAuB;YACvB,IAAI,IAAI,CAAC,sBAAsB,EAAE;gBAC/B,IAAI,CAAC,6BAA6B,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QACtD,CAAC,CAAC;QAEM,uBAAkB,GAAG,CAAC,QAAwB,EAAE,GAAY,EAAE,EAAE;YACtE,uBAAuB;YACvB,IAAI,IAAI,CAAC,iBAAiB,EAAE;gBAC1B,IAAI,CAAC,4BAA4B,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QACrD,CAAC,CAAC;QAEM,2BAAsB,GAAG,CAC/B,QAAwB,EACxB,CAAmB,EACnB,EAAE;YACF,IAAI,IAAI,CAAC,KAAK,CAAC,qBAAqB,EAAE;gBACpC,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;aAC1E;QACH,CAAC,CAAC;QAEM,kBAAa,GAAG,KAAK,EAC3B,IAAyB,EACzB,QAA0B,EAC1B,EAAE;YACF,uBAAuB;YACvB,IAAI,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE;gBAChC,MAAM,IAAI,CAAC,KAAK,C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,EAAE,IAAI,CAAC,iBAAiB,EAAE;gBACzC,CAAC,CAAC,IAAI,CAAC,kBAAkB;gBACzB,CAAC,CAAC,SAAS;YACb,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,EAAE;gBACnD,CAAC,CAAC,IAAI,CAAC,uBAAuB;gBAC9B,CAAC,CAAC,SAAS;YACb,qBAAqB,EAAE,IAAI,CAAC,sBAAsB;SACnD,CAAC;QAEF,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ,QAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAkB,CACtE,CAAC;IACJ,CAAC;CACF","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\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport \"./PropertyGrid.scss\";\nimport * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport type { PropertyUpdatedArgs } from \"../../editors/EditorContainer\";\nimport type { PropertyCategory } from \"../PropertyDataProvider\";\nimport type { CommonPropertyGridProps } from \"./PropertyGridCommons\";\nimport type { PropertyListProps } from \"./PropertyList\";\n\n/** @internal */\nexport type PropertyGridEventsRelatedProps = Pick<\n PropertyListProps,\n | \"onPropertyClicked\"\n | \"onPropertyRightClicked\"\n | \"onPropertyContextMenu\"\n | \"onEditCommit\"\n | \"onEditCancel\"\n | \"selectedPropertyKey\"\n | \"editingPropertyKey\"\n> &\n Pick<\n CommonPropertyGridProps,\n \"isPropertySelectionOnRightClickEnabled\" | \"isPropertyEditingEnabled\"\n > &\n Required<\n Pick<\n CommonPropertyGridProps,\n \"isPropertyHoverEnabled\" | \"isPropertySelectionEnabled\"\n >\n >;\n\n/** Properties for [[PropertyGridEventsRelatedPropsSupplier]] React component\n * @internal\n */\nexport type PropertyGridEventsRelatedPropsSupplierProps = Pick<\n CommonPropertyGridProps,\n | \"onPropertyContextMenu\"\n | \"isPropertySelectionOnRightClickEnabled\"\n | \"isPropertySelectionOnRightClickEnabled\"\n | \"onPropertySelectionChanged\"\n | \"isPropertyEditingEnabled\"\n | \"onPropertyUpdated\"\n> &\n Required<\n Pick<\n CommonPropertyGridProps,\n \"isPropertyHoverEnabled\" | \"isPropertySelectionEnabled\"\n >\n > & {\n children: (context: PropertyGridEventsRelatedProps) => React.ReactNode;\n };\n\n/** State of [[PropertyGridEventsRelatedPropsSupplier]] React component\n * @internal\n */\ninterface PropertyGridEventsRelatedPropsSupplierState {\n /** Unique key of currently selected property */\n selectedPropertyKey?: string;\n /** Unique key of currently edited property */\n editingPropertyKey?: string;\n}\n\n/** PropertyGridEventsRelatedPropsSupplier React component.\n * @internal\n */\nexport class PropertyGridEventsRelatedPropsSupplier extends React.Component<\n PropertyGridEventsRelatedPropsSupplierProps,\n PropertyGridEventsRelatedPropsSupplierState\n> {\n /** @internal */\n constructor(props: PropertyGridEventsRelatedPropsSupplierProps) {\n super(props);\n this.state = {};\n }\n\n private _isClickSupported() {\n return (\n this.props.isPropertySelectionEnabled ||\n this.props.isPropertyEditingEnabled\n );\n }\n\n private _isRightClickSupported() {\n return this.props.isPropertySelectionOnRightClickEnabled;\n }\n\n private _onPropertyRightClicked = (\n property: PropertyRecord,\n key?: string\n ) => {\n // istanbul ignore else\n if (this._isRightClickSupported())\n this.onEnabledPropertyRightClicked(property, key);\n };\n\n private _onPropertyClicked = (property: PropertyRecord, key?: string) => {\n // istanbul ignore else\n if (this._isClickSupported())\n this.onEnabledPropertyLeftClicked(property, key);\n };\n\n private _onPropertyContextMenu = (\n property: PropertyRecord,\n e: React.MouseEvent\n ) => {\n if (this.props.onPropertyContextMenu) {\n this.props.onPropertyContextMenu({ propertyRecord: property, event: e });\n }\n };\n\n private _onEditCommit = async (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => {\n // istanbul ignore else\n if (this.props.onPropertyUpdated) {\n await this.props.onPropertyUpdated(args, category);\n this.setState({ editingPropertyKey: undefined });\n }\n };\n\n private _onEditCancel = () => {\n this.setState({ editingPropertyKey: undefined });\n };\n\n private onEnabledPropertyRightClicked(\n property: PropertyRecord,\n key: string | undefined\n ) {\n let selectedPropertyKey = this.state.selectedPropertyKey;\n let editingPropertyKey = this.state.editingPropertyKey;\n\n editingPropertyKey = undefined;\n if (selectedPropertyKey !== key) selectedPropertyKey = key;\n\n if (this.props.onPropertySelectionChanged)\n this.props.onPropertySelectionChanged(property);\n\n this.setState({ selectedPropertyKey, editingPropertyKey });\n }\n\n private onEnabledPropertyLeftClicked(\n property: PropertyRecord,\n key: string | undefined\n ) {\n let selectedPropertyKey = this.state.selectedPropertyKey;\n let editingPropertyKey = this.state.editingPropertyKey;\n\n const isValuePrimitive =\n property.value.valueFormat === PropertyValueFormat.Primitive;\n const isEditingEnabled = this.props.isPropertyEditingEnabled;\n const isSelectionEnabled = this.props.isPropertySelectionEnabled;\n\n if (isEditingEnabled && isValuePrimitive) {\n // Deselect editing key only if another selection was made\n editingPropertyKey =\n isSelectionEnabled && selectedPropertyKey !== key ? undefined : key;\n }\n\n if (editingPropertyKey === key) {\n this.setState({ editingPropertyKey });\n return;\n }\n\n // Select/Deselect\n selectedPropertyKey = selectedPropertyKey !== key ? key : undefined;\n\n if (this.props.onPropertySelectionChanged)\n this.props.onPropertySelectionChanged(property);\n\n this.setState({ selectedPropertyKey, editingPropertyKey });\n }\n\n /** @internal */\n public override render() {\n const renderContext: PropertyGridEventsRelatedProps = {\n isPropertyHoverEnabled: this.props.isPropertyHoverEnabled,\n isPropertySelectionEnabled: this.props.isPropertySelectionEnabled,\n isPropertySelectionOnRightClickEnabled:\n this.props.isPropertySelectionOnRightClickEnabled,\n isPropertyEditingEnabled: this.props.isPropertyEditingEnabled,\n selectedPropertyKey: this.state.selectedPropertyKey,\n editingPropertyKey: this.state.editingPropertyKey,\n onEditCommit: this._onEditCommit,\n onEditCancel: this._onEditCancel,\n onPropertyClicked: this._isClickSupported()\n ? this._onPropertyClicked\n : undefined,\n onPropertyRightClicked: this._isRightClickSupported()\n ? this._onPropertyRightClicked\n : undefined,\n onPropertyContextMenu: this._onPropertyContextMenu,\n };\n\n return (\n <React.Fragment>{this.props.children(renderContext)}</React.Fragment>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"PropertyGridEventsRelatedPropsSupplier.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;GAEG;AACH,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA4D/B;;GAEG;AACH,MAAM,OAAO,sCAAuC,SAAQ,KAAK,CAAC,SAGjE;IACC,gBAAgB;IAChB,YAAY,KAAkD;QAC5D,KAAK,CAAC,KAAK,CAAC,CAAC;QAeP,4BAAuB,GAAG,CAChC,QAAwB,EACxB,GAAY,EACZ,EAAE;YACF,uBAAuB;YACvB,IAAI,IAAI,CAAC,sBAAsB,EAAE;gBAC/B,IAAI,CAAC,6BAA6B,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QACtD,CAAC,CAAC;QAEM,uBAAkB,GAAG,CAAC,QAAwB,EAAE,GAAY,EAAE,EAAE;YACtE,uBAAuB;YACvB,IAAI,IAAI,CAAC,iBAAiB,EAAE;gBAC1B,IAAI,CAAC,4BAA4B,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QACrD,CAAC,CAAC;QAEM,2BAAsB,GAAG,CAC/B,QAAwB,EACxB,CAAmB,EACnB,EAAE;YACF,IAAI,IAAI,CAAC,KAAK,CAAC,qBAAqB,EAAE;gBACpC,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;aAC1E;QACH,CAAC,CAAC;QAEM,kBAA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C,YAAY,EAAE,IAAI,CAAC,aAAa;YAChC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAAE;gBACzC,CAAC,CAAC,IAAI,CAAC,kBAAkB;gBACzB,CAAC,CAAC,SAAS;YACb,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,EAAE;gBACnD,CAAC,CAAC,IAAI,CAAC,uBAAuB;gBAC9B,CAAC,CAAC,SAAS;YACb,qBAAqB,EAAE,IAAI,CAAC,sBAAsB;SACnD,CAAC;QAEF,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ,QAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAkB,CACtE,CAAC;IACJ,CAAC;CACF","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\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport \"./PropertyGrid.scss\";\nimport * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport type { PropertyUpdatedArgs } from \"../../editors/EditorContainer\";\nimport type { PropertyCategory } from \"../PropertyDataProvider\";\nimport type { CommonPropertyGridProps } from \"./PropertyGridCommons\";\nimport type { PropertyListProps } from \"./PropertyList\";\n\n/** @internal */\nexport type PropertyGridEventsRelatedProps = Pick<\n PropertyListProps,\n | \"onPropertyClicked\"\n | \"onPropertyRightClicked\"\n | \"onPropertyContextMenu\"\n | \"onEditCommit\"\n | \"onEditCancel\"\n | \"selectedPropertyKey\"\n | \"editingPropertyKey\"\n> &\n Pick<\n CommonPropertyGridProps,\n \"isPropertySelectionOnRightClickEnabled\" | \"isPropertyEditingEnabled\"\n > &\n Required<\n Pick<\n CommonPropertyGridProps,\n \"isPropertyHoverEnabled\" | \"isPropertySelectionEnabled\"\n >\n >;\n\n/** Properties for [[PropertyGridEventsRelatedPropsSupplier]] React component\n * @internal\n */\nexport type PropertyGridEventsRelatedPropsSupplierProps = Pick<\n CommonPropertyGridProps,\n | \"onPropertyContextMenu\"\n | \"isPropertySelectionOnRightClickEnabled\"\n | \"isPropertySelectionOnRightClickEnabled\"\n | \"onPropertySelectionChanged\"\n | \"isPropertyEditingEnabled\"\n | \"onPropertyUpdated\"\n> &\n Required<\n Pick<\n CommonPropertyGridProps,\n \"isPropertyHoverEnabled\" | \"isPropertySelectionEnabled\"\n >\n > & {\n children: (context: PropertyGridEventsRelatedProps) => React.ReactNode;\n };\n\n/** State of [[PropertyGridEventsRelatedPropsSupplier]] React component\n * @internal\n */\ninterface PropertyGridEventsRelatedPropsSupplierState {\n /** Unique key of currently selected property */\n selectedPropertyKey?: string;\n /** Unique key of currently edited property */\n editingPropertyKey?: string;\n}\n\n/** PropertyGridEventsRelatedPropsSupplier React component.\n * @internal\n */\nexport class PropertyGridEventsRelatedPropsSupplier extends React.Component<\n PropertyGridEventsRelatedPropsSupplierProps,\n PropertyGridEventsRelatedPropsSupplierState\n> {\n /** @internal */\n constructor(props: PropertyGridEventsRelatedPropsSupplierProps) {\n super(props);\n this.state = {};\n }\n\n private _isClickSupported() {\n return (\n this.props.isPropertySelectionEnabled ||\n this.props.isPropertyEditingEnabled\n );\n }\n\n private _isRightClickSupported() {\n return this.props.isPropertySelectionOnRightClickEnabled;\n }\n\n private _onPropertyRightClicked = (\n property: PropertyRecord,\n key?: string\n ) => {\n // istanbul ignore else\n if (this._isRightClickSupported())\n this.onEnabledPropertyRightClicked(property, key);\n };\n\n private _onPropertyClicked = (property: PropertyRecord, key?: string) => {\n // istanbul ignore else\n if (this._isClickSupported())\n this.onEnabledPropertyLeftClicked(property, key);\n };\n\n private _onPropertyContextMenu = (\n property: PropertyRecord,\n e: React.MouseEvent\n ) => {\n if (this.props.onPropertyContextMenu) {\n this.props.onPropertyContextMenu({ propertyRecord: property, event: e });\n }\n };\n\n private _onEditCommit = async (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => {\n // istanbul ignore else\n if (this.props.onPropertyUpdated) {\n await this.props.onPropertyUpdated(args, category);\n this.setState({ editingPropertyKey: undefined });\n }\n };\n\n private _onEditCancel = () => {\n this.setState({ editingPropertyKey: undefined });\n };\n\n private onEnabledPropertyRightClicked(\n property: PropertyRecord,\n key: string | undefined\n ) {\n let selectedPropertyKey = this.state.selectedPropertyKey;\n let editingPropertyKey = this.state.editingPropertyKey;\n\n editingPropertyKey = undefined;\n if (selectedPropertyKey !== key) selectedPropertyKey = key;\n\n if (this.props.onPropertySelectionChanged)\n this.props.onPropertySelectionChanged(property);\n\n this.setState({ selectedPropertyKey, editingPropertyKey });\n }\n\n private onEnabledPropertyLeftClicked(\n property: PropertyRecord,\n key: string | undefined\n ) {\n let selectedPropertyKey = this.state.selectedPropertyKey;\n let editingPropertyKey = this.state.editingPropertyKey;\n\n const isEditingEnabled = this.props.isPropertyEditingEnabled;\n const isSelectionEnabled = this.props.isPropertySelectionEnabled;\n\n if (isEditingEnabled) {\n // Deselect editing key only if another selection was made\n editingPropertyKey =\n isSelectionEnabled && selectedPropertyKey !== key ? undefined : key;\n }\n\n if (editingPropertyKey === key) {\n this.setState({ editingPropertyKey });\n return;\n }\n\n // Select/Deselect\n selectedPropertyKey = selectedPropertyKey !== key ? key : undefined;\n\n if (this.props.onPropertySelectionChanged)\n this.props.onPropertySelectionChanged(property);\n\n this.setState({ selectedPropertyKey, editingPropertyKey });\n }\n\n /** @internal */\n public override render() {\n const renderContext: PropertyGridEventsRelatedProps = {\n isPropertyHoverEnabled: this.props.isPropertyHoverEnabled,\n isPropertySelectionEnabled: this.props.isPropertySelectionEnabled,\n isPropertySelectionOnRightClickEnabled:\n this.props.isPropertySelectionOnRightClickEnabled,\n isPropertyEditingEnabled: this.props.isPropertyEditingEnabled,\n selectedPropertyKey: this.state.selectedPropertyKey,\n editingPropertyKey: this.state.editingPropertyKey,\n onEditCommit: this._onEditCommit,\n onEditCancel: this._onEditCancel,\n onPropertyClicked: this._isClickSupported()\n ? this._onPropertyClicked\n : undefined,\n onPropertyRightClicked: this._isRightClickSupported()\n ? this._onPropertyRightClicked\n : undefined,\n onPropertyContextMenu: this._onPropertyContextMenu,\n };\n\n return (\n <React.Fragment>{this.props.children(renderContext)}</React.Fragment>\n );\n }\n}\n"]}
@@ -45,8 +45,6 @@ interface VirtualizedPropertyGridState {
45
45
  orientation: Orientation;
46
46
  /** Keeps record of dynamic node heights */
47
47
  dynamicNodeHeights: Map<string, number>;
48
- /** When resetting node height cache, marks the point at which heights have become stale */
49
- resetIndex: number;
50
48
  }
51
49
  /**
52
50
  * Context of [[VirtualizedPropertyGrid]] component.
@@ -100,7 +98,7 @@ export declare class VirtualizedPropertyGrid extends React.Component<Virtualized
100
98
  /** @internal */
101
99
  constructor(props: VirtualizedPropertyGridProps);
102
100
  /** @internal */
103
- componentDidUpdate(prevProps: VirtualizedPropertyGridProps, prevState: VirtualizedPropertyGridState): void;
101
+ componentDidUpdate(prevProps: VirtualizedPropertyGridProps): void;
104
102
  /** @internal */
105
103
  static getDerivedStateFromProps(props: VirtualizedPropertyGridProps, state: VirtualizedPropertyGridState): VirtualizedPropertyGridState | null;
106
104
  private updateOrientation;
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualizedPropertyGrid.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/VirtualizedPropertyGrid.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,gCAAgC,CAAC;AAExC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AAC5F,OAA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,sBAAsB,CAAC;IACnC,0BAA0B,EAAE,OAAO,CAAC;IACpC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,iBAAiB,CAAC;IAClE,yBAAyB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvD,0BAA0B,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAExD,SAAS,CAAC,EAAE,iCAAiC,CAAC;CAC/C;AAYD;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,KAAK,CAAC,SAAS,CAC1D,4BAA4B,EAC5B,4BAA4B,CAC7B;IACC,OAAO,CAAC,QAAQ,CAAuC;IAEvD,gBAAgB;gBACJ,KAAK,EAAE,4BAA4B;IAiB/C,gBAAgB;IACA,kBAAkB,CAChC,SAAS,EAAE,4BAA4B,EACvC,SAAS,EAAE,4BAA4B;IAkDzC,gBAAgB;WACF,wBAAwB,CACpC,KAAK,EAAE,4BAA4B,EACnC,KAAK,EAAE,4BAA4B,GAClC,4BAA4B,GAAG,IAAI;IAOtC,OAAO,CAAC,iBAAiB;IAkBzB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IA2C3B,OAAO,CAAC,uBAAuB,CAmB7B;IAEF,OAAO,CAAC,2BAA2B,CAGjC;IAEF,OAAO,CAAC,wBAAwB;IAQhC,OAAO,CAAC,WAAW,CAGjB;IAEF,OAAO,CAAC,gBAAgB,CAQtB;IAEF,gBAAgB;IACA,MAAM;CAyHvB;AAED;;;;GAIG;AACH,wBAAgB,uCAAuC,CAAC,CAAC,SAAS,OAAO;;;;EAExE"}
1
+ {"version":3,"file":"VirtualizedPropertyGrid.d.ts","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/VirtualizedPropertyGrid.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,gCAAgC,CAAC;AAExC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC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