@itwin/components-react 4.10.0-dev.1 → 4.11.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 (379) hide show
  1. package/CHANGELOG.md +22 -1
  2. package/lib/cjs/components-react/UiComponents.d.ts +1 -1
  3. package/lib/cjs/components-react/UiComponents.js +2 -4
  4. package/lib/cjs/components-react/UiComponents.js.map +1 -1
  5. package/lib/cjs/components-react/common/DelayedSpinner.js +3 -2
  6. package/lib/cjs/components-react/common/DelayedSpinner.js.map +1 -1
  7. package/lib/cjs/components-react/common/UseDebouncedAsyncValue.js +2 -1
  8. package/lib/cjs/components-react/common/UseDebouncedAsyncValue.js.map +1 -1
  9. package/lib/cjs/components-react/converters/DateTimeTypeConverter.js +1 -1
  10. package/lib/cjs/components-react/converters/DateTimeTypeConverter.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/PointTypeConverter.d.ts.map +1 -1
  14. package/lib/cjs/components-react/converters/PointTypeConverter.js +2 -0
  15. package/lib/cjs/components-react/converters/PointTypeConverter.js.map +1 -1
  16. package/lib/cjs/components-react/converters/TypeConverter.d.ts.map +1 -1
  17. package/lib/cjs/components-react/converters/TypeConverter.js +3 -1
  18. package/lib/cjs/components-react/converters/TypeConverter.js.map +1 -1
  19. package/lib/cjs/components-react/datepicker/DatePicker.d.ts +2 -0
  20. package/lib/cjs/components-react/datepicker/DatePicker.d.ts.map +1 -1
  21. package/lib/cjs/components-react/datepicker/DatePicker.js +48 -45
  22. package/lib/cjs/components-react/datepicker/DatePicker.js.map +1 -1
  23. package/lib/cjs/components-react/datepicker/DatePickerPopupButton.d.ts +5 -2
  24. package/lib/cjs/components-react/datepicker/DatePickerPopupButton.d.ts.map +1 -1
  25. package/lib/cjs/components-react/datepicker/DatePickerPopupButton.js +8 -7
  26. package/lib/cjs/components-react/datepicker/DatePickerPopupButton.js.map +1 -1
  27. package/lib/cjs/components-react/datepicker/IntlFormatter.d.ts +1 -0
  28. package/lib/cjs/components-react/datepicker/IntlFormatter.d.ts.map +1 -1
  29. package/lib/cjs/components-react/datepicker/IntlFormatter.js +1 -0
  30. package/lib/cjs/components-react/datepicker/IntlFormatter.js.map +1 -1
  31. package/lib/cjs/components-react/datepicker/TimeField.d.ts.map +1 -1
  32. package/lib/cjs/components-react/datepicker/TimeField.js +49 -48
  33. package/lib/cjs/components-react/datepicker/TimeField.js.map +1 -1
  34. package/lib/cjs/components-react/editors/CustomNumberEditor.d.ts.map +1 -1
  35. package/lib/cjs/components-react/editors/CustomNumberEditor.js +14 -11
  36. package/lib/cjs/components-react/editors/CustomNumberEditor.js.map +1 -1
  37. package/lib/cjs/components-react/editors/DateTimeEditor.js +5 -3
  38. package/lib/cjs/components-react/editors/DateTimeEditor.js.map +1 -1
  39. package/lib/cjs/components-react/editors/EditorContainer.js +3 -3
  40. package/lib/cjs/components-react/editors/EditorContainer.js.map +1 -1
  41. package/lib/cjs/components-react/editors/EnumButtonGroupEditor.js +1 -1
  42. package/lib/cjs/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
  43. package/lib/cjs/components-react/editors/EnumEditor.d.ts +0 -1
  44. package/lib/cjs/components-react/editors/EnumEditor.d.ts.map +1 -1
  45. package/lib/cjs/components-react/editors/EnumEditor.js +2 -3
  46. package/lib/cjs/components-react/editors/EnumEditor.js.map +1 -1
  47. package/lib/cjs/components-react/editors/IconEditor.d.ts.map +1 -1
  48. package/lib/cjs/components-react/editors/IconEditor.js +1 -1
  49. package/lib/cjs/components-react/editors/IconEditor.js.map +1 -1
  50. package/lib/cjs/components-react/editors/ImageCheckBoxEditor.js +1 -1
  51. package/lib/cjs/components-react/editors/ImageCheckBoxEditor.js.map +1 -1
  52. package/lib/cjs/components-react/editors/NumericInputEditor.js +2 -2
  53. package/lib/cjs/components-react/editors/NumericInputEditor.js.map +1 -1
  54. package/lib/cjs/components-react/editors/PopupButton.d.ts.map +1 -1
  55. package/lib/cjs/components-react/editors/PopupButton.js +10 -7
  56. package/lib/cjs/components-react/editors/PopupButton.js.map +1 -1
  57. package/lib/cjs/components-react/editors/SliderEditor.js +1 -1
  58. package/lib/cjs/components-react/editors/SliderEditor.js.map +1 -1
  59. package/lib/cjs/components-react/editors/TextEditor.d.ts +0 -1
  60. package/lib/cjs/components-react/editors/TextEditor.d.ts.map +1 -1
  61. package/lib/cjs/components-react/editors/TextEditor.js +7 -6
  62. package/lib/cjs/components-react/editors/TextEditor.js.map +1 -1
  63. package/lib/cjs/components-react/editors/TextareaEditor.d.ts +0 -1
  64. package/lib/cjs/components-react/editors/TextareaEditor.d.ts.map +1 -1
  65. package/lib/cjs/components-react/editors/TextareaEditor.js +3 -4
  66. package/lib/cjs/components-react/editors/TextareaEditor.js.map +1 -1
  67. package/lib/cjs/components-react/favorite/FavoritePropertyList.js +3 -3
  68. package/lib/cjs/components-react/favorite/FavoritePropertyList.js.map +1 -1
  69. package/lib/cjs/components-react/filter-builder/FilterBuilderLogicalOperator.d.ts.map +1 -1
  70. package/lib/cjs/components-react/filter-builder/FilterBuilderLogicalOperator.js +4 -3
  71. package/lib/cjs/components-react/filter-builder/FilterBuilderLogicalOperator.js.map +1 -1
  72. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js +2 -1
  73. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
  74. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.d.ts.map +1 -1
  75. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js +6 -5
  76. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
  77. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js +4 -3
  78. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
  79. package/lib/cjs/components-react/filter-builder/FilterBuilderState.js +3 -3
  80. package/lib/cjs/components-react/filter-builder/FilterBuilderState.js.map +1 -1
  81. package/lib/cjs/components-react/filter-builder/FilterBuilderToolbar.d.ts.map +1 -1
  82. package/lib/cjs/components-react/filter-builder/FilterBuilderToolbar.js +4 -3
  83. package/lib/cjs/components-react/filter-builder/FilterBuilderToolbar.js.map +1 -1
  84. package/lib/cjs/components-react/filter-builder/Operators.js +13 -13
  85. package/lib/cjs/components-react/filter-builder/Operators.js.map +1 -1
  86. package/lib/cjs/components-react/filtering/FilteringInput.d.ts +0 -3
  87. package/lib/cjs/components-react/filtering/FilteringInput.d.ts.map +1 -1
  88. package/lib/cjs/components-react/filtering/FilteringInput.js +6 -8
  89. package/lib/cjs/components-react/filtering/FilteringInput.js.map +1 -1
  90. package/lib/cjs/components-react/filtering/ResultSelector.d.ts +0 -1
  91. package/lib/cjs/components-react/filtering/ResultSelector.d.ts.map +1 -1
  92. package/lib/cjs/components-react/filtering/ResultSelector.js +2 -3
  93. package/lib/cjs/components-react/filtering/ResultSelector.js.map +1 -1
  94. package/lib/cjs/components-react/inputs/ParsedInput.js +2 -2
  95. package/lib/cjs/components-react/inputs/ParsedInput.js.map +1 -1
  96. package/lib/cjs/components-react/properties/ValueRendererManager.d.ts +3 -0
  97. package/lib/cjs/components-react/properties/ValueRendererManager.d.ts.map +1 -1
  98. package/lib/cjs/components-react/properties/ValueRendererManager.js +12 -1
  99. package/lib/cjs/components-react/properties/ValueRendererManager.js.map +1 -1
  100. package/lib/cjs/components-react/properties/renderers/CommonPropertyRenderer.js +4 -3
  101. package/lib/cjs/components-react/properties/renderers/CommonPropertyRenderer.js.map +1 -1
  102. package/lib/cjs/components-react/properties/renderers/CustomizablePropertyRenderer.d.ts +25 -0
  103. package/lib/cjs/components-react/properties/renderers/CustomizablePropertyRenderer.d.ts.map +1 -0
  104. package/lib/cjs/components-react/properties/renderers/CustomizablePropertyRenderer.js +62 -0
  105. package/lib/cjs/components-react/properties/renderers/CustomizablePropertyRenderer.js.map +1 -0
  106. package/lib/cjs/components-react/properties/renderers/NonPrimitivePropertyRenderer.js +1 -1
  107. package/lib/cjs/components-react/properties/renderers/NonPrimitivePropertyRenderer.js.map +1 -1
  108. package/lib/cjs/components-react/properties/renderers/PrimitivePropertyRenderer.d.ts +3 -4
  109. package/lib/cjs/components-react/properties/renderers/PrimitivePropertyRenderer.d.ts.map +1 -1
  110. package/lib/cjs/components-react/properties/renderers/PrimitivePropertyRenderer.js +6 -44
  111. package/lib/cjs/components-react/properties/renderers/PrimitivePropertyRenderer.js.map +1 -1
  112. package/lib/cjs/components-react/properties/renderers/PropertyView.d.ts +1 -1
  113. package/lib/cjs/components-react/properties/renderers/PropertyView.d.ts.map +1 -1
  114. package/lib/cjs/components-react/properties/renderers/PropertyView.js +2 -3
  115. package/lib/cjs/components-react/properties/renderers/PropertyView.js.map +1 -1
  116. package/lib/cjs/components-react/properties/renderers/label/PropertyLabelRenderer.js +4 -4
  117. package/lib/cjs/components-react/properties/renderers/label/PropertyLabelRenderer.js.map +1 -1
  118. package/lib/cjs/components-react/properties/renderers/value/Common.js +2 -1
  119. package/lib/cjs/components-react/properties/renderers/value/Common.js.map +1 -1
  120. package/lib/cjs/components-react/properties/renderers/value/DoublePropertyValueRenderer.js +1 -1
  121. package/lib/cjs/components-react/properties/renderers/value/DoublePropertyValueRenderer.js.map +1 -1
  122. package/lib/cjs/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.d.ts.map +1 -1
  123. package/lib/cjs/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js +8 -11
  124. package/lib/cjs/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js.map +1 -1
  125. package/lib/cjs/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js +1 -1
  126. package/lib/cjs/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js.map +1 -1
  127. package/lib/cjs/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js +6 -3
  128. package/lib/cjs/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js.map +1 -1
  129. package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.js +2 -1
  130. package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
  131. package/lib/cjs/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js +2 -1
  132. package/lib/cjs/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js.map +1 -1
  133. package/lib/cjs/components-react/propertygrid/component/PropertyCategoryBlock.js +2 -1
  134. package/lib/cjs/components-react/propertygrid/component/PropertyCategoryBlock.js.map +1 -1
  135. package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.js +2 -2
  136. package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
  137. package/lib/cjs/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.d.ts.map +1 -1
  138. package/lib/cjs/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js +1 -3
  139. package/lib/cjs/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js.map +1 -1
  140. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts +1 -3
  141. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts.map +1 -1
  142. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.js +90 -80
  143. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
  144. package/lib/cjs/components-react/propertygrid/dataproviders/FilteringDataProvider.js +13 -11
  145. package/lib/cjs/components-react/propertygrid/dataproviders/FilteringDataProvider.js.map +1 -1
  146. package/lib/cjs/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js +2 -2
  147. package/lib/cjs/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js.map +1 -1
  148. package/lib/cjs/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js +2 -1
  149. package/lib/cjs/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js.map +1 -1
  150. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCustomGridCategory.js +2 -1
  151. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCustomGridCategory.js.map +1 -1
  152. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js +2 -2
  153. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
  154. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.js +3 -2
  155. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.js.map +1 -1
  156. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js +1 -1
  157. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js.map +1 -1
  158. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js +1 -1
  159. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js.map +1 -1
  160. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts +1 -1
  161. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts.map +1 -1
  162. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js +22 -12
  163. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
  164. package/lib/cjs/components-react/selectable-content/SelectableContent.js +3 -2
  165. package/lib/cjs/components-react/selectable-content/SelectableContent.js.map +1 -1
  166. package/lib/cjs/components-react/toolbar/InternalToolbarComponent.d.ts.map +1 -1
  167. package/lib/cjs/components-react/toolbar/InternalToolbarComponent.js +15 -14
  168. package/lib/cjs/components-react/toolbar/InternalToolbarComponent.js.map +1 -1
  169. package/lib/cjs/components-react/toolbar/useConditionalSynchedItems.js +6 -5
  170. package/lib/cjs/components-react/toolbar/useConditionalSynchedItems.js.map +1 -1
  171. package/lib/cjs/components-react/tree/controlled/TreeModel.js +8 -7
  172. package/lib/cjs/components-react/tree/controlled/TreeModel.js.map +1 -1
  173. package/lib/cjs/components-react/tree/controlled/TreeNodeLoader.js +8 -6
  174. package/lib/cjs/components-react/tree/controlled/TreeNodeLoader.js.map +1 -1
  175. package/lib/cjs/components-react/tree/controlled/component/ControlledTree.d.ts.map +1 -1
  176. package/lib/cjs/components-react/tree/controlled/component/ControlledTree.js +3 -2
  177. package/lib/cjs/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
  178. package/lib/cjs/components-react/tree/controlled/internal/SparseTree.js +2 -1
  179. package/lib/cjs/components-react/tree/controlled/internal/SparseTree.js.map +1 -1
  180. package/lib/cjs/components-react/tree/controlled/internal/TreeSelectionManager.js +5 -3
  181. package/lib/cjs/components-react/tree/controlled/internal/TreeSelectionManager.js.map +1 -1
  182. package/lib/cjs/components-react/useTranslation.d.ts +10 -0
  183. package/lib/cjs/components-react/useTranslation.d.ts.map +1 -0
  184. package/lib/cjs/components-react/useTranslation.js +20 -0
  185. package/lib/cjs/components-react/useTranslation.js.map +1 -0
  186. package/lib/cjs/components-react.d.ts +1 -0
  187. package/lib/cjs/components-react.d.ts.map +1 -1
  188. package/lib/cjs/components-react.js +1 -0
  189. package/lib/cjs/components-react.js.map +1 -1
  190. package/lib/esm/components-react/UiComponents.d.ts +1 -1
  191. package/lib/esm/components-react/UiComponents.js +2 -4
  192. package/lib/esm/components-react/UiComponents.js.map +1 -1
  193. package/lib/esm/components-react/common/DelayedSpinner.js +3 -2
  194. package/lib/esm/components-react/common/DelayedSpinner.js.map +1 -1
  195. package/lib/esm/components-react/common/UseDebouncedAsyncValue.js +2 -1
  196. package/lib/esm/components-react/common/UseDebouncedAsyncValue.js.map +1 -1
  197. package/lib/esm/components-react/converters/DateTimeTypeConverter.js +1 -1
  198. package/lib/esm/components-react/converters/DateTimeTypeConverter.js.map +1 -1
  199. package/lib/esm/components-react/converters/NumericTypeConverter.js +4 -2
  200. package/lib/esm/components-react/converters/NumericTypeConverter.js.map +1 -1
  201. package/lib/esm/components-react/converters/PointTypeConverter.d.ts.map +1 -1
  202. package/lib/esm/components-react/converters/PointTypeConverter.js +2 -0
  203. package/lib/esm/components-react/converters/PointTypeConverter.js.map +1 -1
  204. package/lib/esm/components-react/converters/TypeConverter.d.ts.map +1 -1
  205. package/lib/esm/components-react/converters/TypeConverter.js +3 -1
  206. package/lib/esm/components-react/converters/TypeConverter.js.map +1 -1
  207. package/lib/esm/components-react/datepicker/DatePicker.d.ts +2 -0
  208. package/lib/esm/components-react/datepicker/DatePicker.d.ts.map +1 -1
  209. package/lib/esm/components-react/datepicker/DatePicker.js +48 -45
  210. package/lib/esm/components-react/datepicker/DatePicker.js.map +1 -1
  211. package/lib/esm/components-react/datepicker/DatePickerPopupButton.d.ts +5 -2
  212. package/lib/esm/components-react/datepicker/DatePickerPopupButton.d.ts.map +1 -1
  213. package/lib/esm/components-react/datepicker/DatePickerPopupButton.js +8 -7
  214. package/lib/esm/components-react/datepicker/DatePickerPopupButton.js.map +1 -1
  215. package/lib/esm/components-react/datepicker/IntlFormatter.d.ts +1 -0
  216. package/lib/esm/components-react/datepicker/IntlFormatter.d.ts.map +1 -1
  217. package/lib/esm/components-react/datepicker/IntlFormatter.js +1 -0
  218. package/lib/esm/components-react/datepicker/IntlFormatter.js.map +1 -1
  219. package/lib/esm/components-react/datepicker/TimeField.d.ts.map +1 -1
  220. package/lib/esm/components-react/datepicker/TimeField.js +49 -48
  221. package/lib/esm/components-react/datepicker/TimeField.js.map +1 -1
  222. package/lib/esm/components-react/editors/CustomNumberEditor.d.ts.map +1 -1
  223. package/lib/esm/components-react/editors/CustomNumberEditor.js +14 -11
  224. package/lib/esm/components-react/editors/CustomNumberEditor.js.map +1 -1
  225. package/lib/esm/components-react/editors/DateTimeEditor.js +5 -3
  226. package/lib/esm/components-react/editors/DateTimeEditor.js.map +1 -1
  227. package/lib/esm/components-react/editors/EditorContainer.js +3 -3
  228. package/lib/esm/components-react/editors/EditorContainer.js.map +1 -1
  229. package/lib/esm/components-react/editors/EnumButtonGroupEditor.js +1 -1
  230. package/lib/esm/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
  231. package/lib/esm/components-react/editors/EnumEditor.d.ts +0 -1
  232. package/lib/esm/components-react/editors/EnumEditor.d.ts.map +1 -1
  233. package/lib/esm/components-react/editors/EnumEditor.js +2 -3
  234. package/lib/esm/components-react/editors/EnumEditor.js.map +1 -1
  235. package/lib/esm/components-react/editors/IconEditor.d.ts.map +1 -1
  236. package/lib/esm/components-react/editors/IconEditor.js +1 -1
  237. package/lib/esm/components-react/editors/IconEditor.js.map +1 -1
  238. package/lib/esm/components-react/editors/ImageCheckBoxEditor.js +1 -1
  239. package/lib/esm/components-react/editors/ImageCheckBoxEditor.js.map +1 -1
  240. package/lib/esm/components-react/editors/NumericInputEditor.js +2 -2
  241. package/lib/esm/components-react/editors/NumericInputEditor.js.map +1 -1
  242. package/lib/esm/components-react/editors/PopupButton.d.ts.map +1 -1
  243. package/lib/esm/components-react/editors/PopupButton.js +11 -8
  244. package/lib/esm/components-react/editors/PopupButton.js.map +1 -1
  245. package/lib/esm/components-react/editors/SliderEditor.js +1 -1
  246. package/lib/esm/components-react/editors/SliderEditor.js.map +1 -1
  247. package/lib/esm/components-react/editors/TextEditor.d.ts +0 -1
  248. package/lib/esm/components-react/editors/TextEditor.d.ts.map +1 -1
  249. package/lib/esm/components-react/editors/TextEditor.js +7 -6
  250. package/lib/esm/components-react/editors/TextEditor.js.map +1 -1
  251. package/lib/esm/components-react/editors/TextareaEditor.d.ts +0 -1
  252. package/lib/esm/components-react/editors/TextareaEditor.d.ts.map +1 -1
  253. package/lib/esm/components-react/editors/TextareaEditor.js +3 -4
  254. package/lib/esm/components-react/editors/TextareaEditor.js.map +1 -1
  255. package/lib/esm/components-react/favorite/FavoritePropertyList.js +3 -3
  256. package/lib/esm/components-react/favorite/FavoritePropertyList.js.map +1 -1
  257. package/lib/esm/components-react/filter-builder/FilterBuilderLogicalOperator.d.ts.map +1 -1
  258. package/lib/esm/components-react/filter-builder/FilterBuilderLogicalOperator.js +4 -3
  259. package/lib/esm/components-react/filter-builder/FilterBuilderLogicalOperator.js.map +1 -1
  260. package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js +2 -1
  261. package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
  262. package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.d.ts.map +1 -1
  263. package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js +6 -5
  264. package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
  265. package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js +4 -3
  266. package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
  267. package/lib/esm/components-react/filter-builder/FilterBuilderState.js +3 -3
  268. package/lib/esm/components-react/filter-builder/FilterBuilderState.js.map +1 -1
  269. package/lib/esm/components-react/filter-builder/FilterBuilderToolbar.d.ts.map +1 -1
  270. package/lib/esm/components-react/filter-builder/FilterBuilderToolbar.js +4 -3
  271. package/lib/esm/components-react/filter-builder/FilterBuilderToolbar.js.map +1 -1
  272. package/lib/esm/components-react/filter-builder/Operators.js +13 -13
  273. package/lib/esm/components-react/filter-builder/Operators.js.map +1 -1
  274. package/lib/esm/components-react/filtering/FilteringInput.d.ts +0 -3
  275. package/lib/esm/components-react/filtering/FilteringInput.d.ts.map +1 -1
  276. package/lib/esm/components-react/filtering/FilteringInput.js +7 -9
  277. package/lib/esm/components-react/filtering/FilteringInput.js.map +1 -1
  278. package/lib/esm/components-react/filtering/ResultSelector.d.ts +0 -1
  279. package/lib/esm/components-react/filtering/ResultSelector.d.ts.map +1 -1
  280. package/lib/esm/components-react/filtering/ResultSelector.js +2 -3
  281. package/lib/esm/components-react/filtering/ResultSelector.js.map +1 -1
  282. package/lib/esm/components-react/inputs/ParsedInput.js +2 -2
  283. package/lib/esm/components-react/inputs/ParsedInput.js.map +1 -1
  284. package/lib/esm/components-react/properties/ValueRendererManager.d.ts +3 -0
  285. package/lib/esm/components-react/properties/ValueRendererManager.d.ts.map +1 -1
  286. package/lib/esm/components-react/properties/ValueRendererManager.js +12 -1
  287. package/lib/esm/components-react/properties/ValueRendererManager.js.map +1 -1
  288. package/lib/esm/components-react/properties/renderers/CommonPropertyRenderer.js +4 -3
  289. package/lib/esm/components-react/properties/renderers/CommonPropertyRenderer.js.map +1 -1
  290. package/lib/esm/components-react/properties/renderers/CustomizablePropertyRenderer.d.ts +25 -0
  291. package/lib/esm/components-react/properties/renderers/CustomizablePropertyRenderer.d.ts.map +1 -0
  292. package/lib/esm/components-react/properties/renderers/CustomizablePropertyRenderer.js +35 -0
  293. package/lib/esm/components-react/properties/renderers/CustomizablePropertyRenderer.js.map +1 -0
  294. package/lib/esm/components-react/properties/renderers/NonPrimitivePropertyRenderer.js +1 -1
  295. package/lib/esm/components-react/properties/renderers/NonPrimitivePropertyRenderer.js.map +1 -1
  296. package/lib/esm/components-react/properties/renderers/PrimitivePropertyRenderer.d.ts +3 -4
  297. package/lib/esm/components-react/properties/renderers/PrimitivePropertyRenderer.d.ts.map +1 -1
  298. package/lib/esm/components-react/properties/renderers/PrimitivePropertyRenderer.js +3 -21
  299. package/lib/esm/components-react/properties/renderers/PrimitivePropertyRenderer.js.map +1 -1
  300. package/lib/esm/components-react/properties/renderers/PropertyView.d.ts +1 -1
  301. package/lib/esm/components-react/properties/renderers/PropertyView.d.ts.map +1 -1
  302. package/lib/esm/components-react/properties/renderers/PropertyView.js +2 -3
  303. package/lib/esm/components-react/properties/renderers/PropertyView.js.map +1 -1
  304. package/lib/esm/components-react/properties/renderers/label/PropertyLabelRenderer.js +4 -4
  305. package/lib/esm/components-react/properties/renderers/label/PropertyLabelRenderer.js.map +1 -1
  306. package/lib/esm/components-react/properties/renderers/value/Common.js +2 -1
  307. package/lib/esm/components-react/properties/renderers/value/Common.js.map +1 -1
  308. package/lib/esm/components-react/properties/renderers/value/DoublePropertyValueRenderer.js +1 -1
  309. package/lib/esm/components-react/properties/renderers/value/DoublePropertyValueRenderer.js.map +1 -1
  310. package/lib/esm/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.d.ts.map +1 -1
  311. package/lib/esm/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js +8 -11
  312. package/lib/esm/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js.map +1 -1
  313. package/lib/esm/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js +1 -1
  314. package/lib/esm/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js.map +1 -1
  315. package/lib/esm/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js +6 -3
  316. package/lib/esm/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js.map +1 -1
  317. package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.js +2 -1
  318. package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
  319. package/lib/esm/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js +2 -1
  320. package/lib/esm/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js.map +1 -1
  321. package/lib/esm/components-react/propertygrid/component/PropertyCategoryBlock.js +2 -1
  322. package/lib/esm/components-react/propertygrid/component/PropertyCategoryBlock.js.map +1 -1
  323. package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.js +2 -2
  324. package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
  325. package/lib/esm/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.d.ts.map +1 -1
  326. package/lib/esm/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js +1 -3
  327. package/lib/esm/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js.map +1 -1
  328. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts +1 -3
  329. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts.map +1 -1
  330. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.js +90 -80
  331. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
  332. package/lib/esm/components-react/propertygrid/dataproviders/FilteringDataProvider.js +13 -11
  333. package/lib/esm/components-react/propertygrid/dataproviders/FilteringDataProvider.js.map +1 -1
  334. package/lib/esm/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js +2 -2
  335. package/lib/esm/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js.map +1 -1
  336. package/lib/esm/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js +2 -1
  337. package/lib/esm/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js.map +1 -1
  338. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCustomGridCategory.js +2 -1
  339. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCustomGridCategory.js.map +1 -1
  340. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js +2 -2
  341. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
  342. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.js +3 -2
  343. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.js.map +1 -1
  344. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js +1 -1
  345. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js.map +1 -1
  346. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js +1 -1
  347. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js.map +1 -1
  348. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts +1 -1
  349. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts.map +1 -1
  350. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js +22 -12
  351. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
  352. package/lib/esm/components-react/selectable-content/SelectableContent.js +3 -2
  353. package/lib/esm/components-react/selectable-content/SelectableContent.js.map +1 -1
  354. package/lib/esm/components-react/toolbar/InternalToolbarComponent.d.ts.map +1 -1
  355. package/lib/esm/components-react/toolbar/InternalToolbarComponent.js +15 -14
  356. package/lib/esm/components-react/toolbar/InternalToolbarComponent.js.map +1 -1
  357. package/lib/esm/components-react/toolbar/useConditionalSynchedItems.js +6 -5
  358. package/lib/esm/components-react/toolbar/useConditionalSynchedItems.js.map +1 -1
  359. package/lib/esm/components-react/tree/controlled/TreeModel.js +8 -7
  360. package/lib/esm/components-react/tree/controlled/TreeModel.js.map +1 -1
  361. package/lib/esm/components-react/tree/controlled/TreeNodeLoader.js +8 -6
  362. package/lib/esm/components-react/tree/controlled/TreeNodeLoader.js.map +1 -1
  363. package/lib/esm/components-react/tree/controlled/component/ControlledTree.d.ts.map +1 -1
  364. package/lib/esm/components-react/tree/controlled/component/ControlledTree.js +3 -2
  365. package/lib/esm/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
  366. package/lib/esm/components-react/tree/controlled/internal/SparseTree.js +2 -1
  367. package/lib/esm/components-react/tree/controlled/internal/SparseTree.js.map +1 -1
  368. package/lib/esm/components-react/tree/controlled/internal/TreeSelectionManager.js +5 -3
  369. package/lib/esm/components-react/tree/controlled/internal/TreeSelectionManager.js.map +1 -1
  370. package/lib/esm/components-react/useTranslation.d.ts +10 -0
  371. package/lib/esm/components-react/useTranslation.d.ts.map +1 -0
  372. package/lib/esm/components-react/useTranslation.js +16 -0
  373. package/lib/esm/components-react/useTranslation.js.map +1 -0
  374. package/lib/esm/components-react.d.ts +1 -0
  375. package/lib/esm/components-react.d.ts.map +1 -1
  376. package/lib/esm/components-react.js +1 -0
  377. package/lib/esm/components-react.js.map +1 -1
  378. package/lib/public/locales/en/UiComponents.json +7 -1
  379. package/package.json +11 -11
@@ -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;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,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C;;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,CA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WAAW;YACnC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;YACvB,eAAe,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"]}
@@ -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,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;YACxB,SAAS,EAAE,eAAe,EAAE,yBAAyB;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"]}
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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,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,C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;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,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AEpE,IAAI,IAAI,CAAC,KAAK,CAAC,0BAA0B;YACvC,IAAI,CAAC,KAAK,CAAC,0BAA0B,CAAC,QAAQ,CAAC,CAAC;QAElD,IAAI,CAAC,QAAQ,CAAC,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,gBAAgB;IACA,MAAM;QACpB,MAAM,aAAa,GAAmC;YACpD,sBAAsB,EAAE,IAAI,CAAC,KAAK,CAAC,sBAAsB;YACzD,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B;YACjE,sCAAsC,EACpC,IAAI,CAAC,KAAK,CAAC,sCAAsC;YACnD,wBAAwB,EAAE,IAAI,CAAC,KAAK,CAAC,wBAAwB;YAC7D,mBAAmB,EAAE,IAAI,CAAC,KAAK,CAAC,mBAAmB;YACnD,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,kBAAkB;YACjD,YAAY,EAAE,IAAI,CAAC,aAAa;YAChC,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 { 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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C,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;QAEpE,IAAI,IAAI,CAAC,KAAK,CAAC,0BAA0B;YACvC,IAAI,CAAC,KAAK,CAAC,0BAA0B,CAAC,QAAQ,CAAC,CAAC;QAElD,IAAI,CAAC,QAAQ,CAAC,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,gBAAgB;IACA,MAAM;QACpB,MAAM,aAAa,GAAmC;YACpD,sBAAsB,EAAE,IAAI,CAAC,KAAK,CAAC,sBAAsB;YACzD,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B;YACjE,sCAAsC,EACpC,IAAI,CAAC,KAAK,CAAC,sCAAsC;YACnD,wBAAwB,EAAE,IAAI,CAAC,KAAK,CAAC,wBAAwB;YAC7D,mBAAmB,EAAE,IAAI,CAAC,KAAK,CAAC,mBAAmB;YACnD,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,kBAAkB;YACjD,YAAY,EAAE,IAAI,CAAC,aAAa;YAChC,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,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAE1F,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,qCAAqC,CAAC;AAM7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,EAAE,+BAA+B,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,KAAK,EACV,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EACV,uBAAuB,EACvB,iCAAiC,EAClC,MAAM,uBAAuB,CAAC;AAK/B;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,uBAAuB;IAC3E,sEAAsE;IACtE,KAAK,EAAE,kBAAk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,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;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,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAE1F,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,qCAAqC,CAAC;AAM7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B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;CAC/C;AAeD;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,KAAK,CAAC,SAAS,CAC1D,4BAA4B,EAC5B,4BAA4B,CAC7B;IACC,OAAO,CAAC,QAAQ,CAAuC;IAEvD,gBAAgB;gBACJ,KAAK,EAAE,4BAA4B;IAgB/C,gBAAgB;IACA,kBAAkB,CAAC,SAAS,EAAE,4BAA4B;IA2C1E,gBAAgB;WACF,wBAAwB,CACpC,KAAK,EAAE,4BAA4B,EACnC,KAAK,EAAE,4BAA4B,GAClC,4BAA4B,GAAG,IAAI;IAOtC,OAAO,CAAC,iBAAiB;IAgBzB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IA+B3B,OAAO,CAAC,uBAAuB,CAqB7B;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"}
@@ -27,6 +27,9 @@ import { PropertyGridEventsRelatedPropsSupplier } from "./PropertyGridEventsRela
27
27
  import { useElementsScrollStorage } from "../../common/UseElementsScrollStorage";
28
28
  const [PropertyGridInternalContextProvider, _PropertyGridInternalContextConsumer, usePropertyGridInternalContext,] = createContextWithMandatoryProvider("PropertyGridInternalContext");
29
29
  const ACTION_BUTTON_DEFAULT_WIDTH = 90;
30
+ const CATEGORY_HEADER_HEIGHT = 42;
31
+ const CATEGORY_PROPERTY_HEIGHT = 28;
32
+ const VERTICAL_CATEGORY_PROPERTY_HEIGHT = 48;
30
33
  /**
31
34
  * VirtualizedPropertyGrid React component.
32
35
  * @public
@@ -34,6 +37,7 @@ const ACTION_BUTTON_DEFAULT_WIDTH = 90;
34
37
  export class VirtualizedPropertyGrid extends React.Component {
35
38
  /** @internal */
36
39
  constructor(props) {
40
+ var _a;
37
41
  super(props);
38
42
  this._listRef = React.createRef();
39
43
  this._handleNodeHeightChange = (index, key, newHeight) => {
@@ -44,9 +48,8 @@ export class VirtualizedPropertyGrid extends React.Component {
44
48
  return {
45
49
  ...state,
46
50
  dynamicNodeHeights: new Map(state.dynamicNodeHeights).set(key, newHeight),
47
- resetIndex: index,
48
51
  };
49
- });
52
+ }, () => this._listRef.current.resetAfterIndex(index));
50
53
  };
51
54
  this._calculateNodeHeightByIndex = (index) => {
52
55
  const node = this.state.gridItems[index];
@@ -67,14 +70,13 @@ export class VirtualizedPropertyGrid extends React.Component {
67
70
  };
68
71
  this.state = {
69
72
  gridItems: [],
70
- orientation: props.orientation ??
71
- PropertyGridCommons.getCurrentOrientation(props.width, undefined, props.isOrientationFixed, props.horizontalOrientationMinWidth),
73
+ orientation: (_a = props.orientation) !== null && _a !== void 0 ? _a : PropertyGridCommons.getCurrentOrientation(props.width, undefined, props.isOrientationFixed, props.horizontalOrientationMinWidth),
72
74
  dynamicNodeHeights: new Map(),
73
- resetIndex: 0,
74
75
  };
75
76
  }
76
77
  /** @internal */
77
- componentDidUpdate(prevProps, prevState) {
78
+ componentDidUpdate(prevProps) {
79
+ var _a;
78
80
  if (this.props.orientation !== prevProps.orientation ||
79
81
  this.props.isOrientationFixed !== prevProps.isOrientationFixed ||
80
82
  this.props.horizontalOrientationMinWidth !==
@@ -87,7 +89,7 @@ export class VirtualizedPropertyGrid extends React.Component {
87
89
  this._listRef.current.resetAfterIndex(0);
88
90
  }
89
91
  if (this.props.highlight !== prevProps.highlight &&
90
- this.props.highlight?.activeHighlight &&
92
+ ((_a = this.props.highlight) === null || _a === void 0 ? void 0 : _a.activeHighlight) &&
91
93
  this.state.gridItems.length !== 0) {
92
94
  let index = 0;
93
95
  let foundMatchingItem = false;
@@ -109,11 +111,6 @@ export class VirtualizedPropertyGrid extends React.Component {
109
111
  this._listRef.current.scrollToItem(index);
110
112
  }
111
113
  }
112
- if (this.state.dynamicNodeHeights !== prevState.dynamicNodeHeights) {
113
- // istanbul ignore else
114
- if (this._listRef.current)
115
- this._listRef.current.resetAfterIndex(this.state.resetIndex);
116
- }
117
114
  }
118
115
  /** @internal */
119
116
  static getDerivedStateFromProps(props, state) {
@@ -129,9 +126,6 @@ export class VirtualizedPropertyGrid extends React.Component {
129
126
  const currentOrientation = PropertyGridCommons.getCurrentOrientation(width, orientation, isOrientationFixed, horizontalOrientationMinWidth);
130
127
  if (currentOrientation !== this.state.orientation) {
131
128
  this.setState({ orientation: currentOrientation });
132
- // istanbul ignore else
133
- if (this._listRef.current)
134
- this._listRef.current.resetAfterIndex(0);
135
129
  }
136
130
  }
137
131
  /**
@@ -140,31 +134,24 @@ export class VirtualizedPropertyGrid extends React.Component {
140
134
  * @returns current height of node.
141
135
  */
142
136
  calculateNodeHeight(node) {
143
- const categoryHeaderHeight = 38;
144
- const categoryHeaderPadding = 4;
145
- const categoryPropertyHeight = 27;
146
137
  const bottomBorderPadding = 5;
147
- const verticalPrimitivePropertyHeight = 55;
148
138
  return (getPropertyHeight(this.state) +
149
139
  node.lastInNumberOfCategories * bottomBorderPadding);
150
140
  function getPropertyHeight(state) {
151
141
  const dynamicHeight = state.dynamicNodeHeights.get(node.key);
152
142
  if (dynamicHeight !== undefined) {
153
143
  if (node instanceof MutableCustomGridCategory) {
154
- return (categoryHeaderHeight +
155
- categoryHeaderPadding +
144
+ return (CATEGORY_HEADER_HEIGHT +
156
145
  (node.isExpanded ? dynamicHeight + bottomBorderPadding : 0));
157
146
  }
158
- return (dynamicHeight + (state.orientation === Orientation.Vertical ? 28 : 0));
147
+ return dynamicHeight;
159
148
  }
160
149
  if (node.type === FlatGridItemType.Category) {
161
- return categoryHeaderHeight + categoryHeaderPadding;
162
- }
163
- if (state.orientation === Orientation.Vertical &&
164
- node.type === FlatGridItemType.Primitive) {
165
- return verticalPrimitivePropertyHeight;
150
+ return CATEGORY_HEADER_HEIGHT;
166
151
  }
167
- return categoryPropertyHeight;
152
+ return state.orientation === Orientation.Vertical
153
+ ? VERTICAL_CATEGORY_PROPERTY_HEIGHT
154
+ : CATEGORY_PROPERTY_HEIGHT;
168
155
  }
169
156
  }
170
157
  calculateEstimatedHeight() {
@@ -175,51 +162,55 @@ export class VirtualizedPropertyGrid extends React.Component {
175
162
  }
176
163
  /** @internal */
177
164
  render() {
178
- const defaultActionButtonWidth = (this.props.actionButtonRenderers?.length ?? 0) > 0
165
+ var _a, _b;
166
+ const defaultActionButtonWidth = ((_b = (_a = this.props.actionButtonRenderers) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0
179
167
  ? ACTION_BUTTON_DEFAULT_WIDTH
180
168
  : undefined;
181
169
  return (React.createElement(ColumnResizingPropertyListPropsSupplier, { orientation: this.state.orientation, width: this.props.width, minLabelWidth: this.props.minLabelWidth, minValueWidth: this.props.minValueWidth, actionButtonWidth: this.props.actionButtonWidth !== undefined
182
170
  ? this.props.actionButtonWidth
183
- : defaultActionButtonWidth, maxPropertyDepth: this._getMaxItemDepth() }, (columnResizeContext) => (React.createElement(PropertyGridEventsRelatedPropsSupplier, { isPropertySelectionEnabled: this.props.isPropertySelectionEnabled ?? false, isPropertySelectionOnRightClickEnabled: this.props.isPropertySelectionOnRightClickEnabled, isPropertyEditingEnabled: this.props.isPropertyEditingEnabled, onPropertyContextMenu: this.props.onPropertyContextMenu, onPropertyUpdated: this.props.onPropertyUpdated, onPropertySelectionChanged: this.props.onPropertySelectionChanged, isPropertyHoverEnabled: this.props.isPropertyHoverEnabled ?? false }, (selectionContext) => {
184
- const gridContext = {
185
- orientation: columnResizeContext.orientation,
186
- gridWidth: this.props.width,
187
- isPropertyHoverEnabled: selectionContext.isPropertyHoverEnabled,
188
- isPropertySelectionEnabled: selectionContext.isPropertySelectionEnabled,
189
- selectedPropertyKey: selectionContext.selectedPropertyKey,
190
- onPropertyClicked: selectionContext.onPropertyClicked,
191
- onPropertyRightClicked: selectionContext.onPropertyRightClicked,
192
- onPropertyContextMenu: selectionContext.onPropertyContextMenu,
193
- editingPropertyKey: selectionContext.editingPropertyKey,
194
- onEditCommit: selectionContext.onEditCommit,
195
- onEditCancel: selectionContext.onEditCancel,
196
- eventHandler: this.props.eventHandler,
197
- dataProvider: this.props.dataProvider,
198
- actionButtonRenderers: this.props.actionButtonRenderers,
199
- propertyValueRendererManager: this.props.propertyValueRendererManager,
200
- propertyCategoryRendererManager: this.props.propertyCategoryRendererManager,
201
- columnRatio: columnResizeContext.columnRatio,
202
- columnInfo: columnResizeContext.columnInfo,
203
- isResizeHandleBeingDragged: columnResizeContext.isResizeHandleBeingDragged,
204
- isResizeHandleHovered: columnResizeContext.isResizeHandleHovered,
205
- onColumnRatioChanged: columnResizeContext.onColumnChanged,
206
- onResizeHandleDragChanged: columnResizeContext.onResizeHandleDragChanged,
207
- onResizeHandleHoverChanged: columnResizeContext.onResizeHandleHoverChanged,
208
- highlight: this.props.highlight,
209
- };
210
- const renderContext = {
211
- gridItems: this.state.gridItems,
212
- gridEventHandler: this.props.eventHandler,
213
- gridModel: this.props.model,
214
- style: this.props.style,
215
- className: this.props.className,
216
- onItemHeightChanged: this._handleNodeHeightChange,
217
- gridContext,
218
- };
219
- return (React.createElement(PropertyGridInternalContextProvider, { value: renderContext },
220
- React.createElement("div", { className: classnames("components-virtualized-property-grid", "components-smallEditor-host") },
221
- React.createElement(VariableSizeList, { className: classnames("components-property-grid-wrapper", "ReactWindow__VariableSizeList", this.props.className), width: this.props.width, height: this.props.height, itemCount: this.state.gridItems.length, itemSize: this._calculateNodeHeightByIndex, estimatedItemSize: this.calculateEstimatedHeight(), overscanCount: 10, layout: "vertical", style: this.props.style, itemKey: this._getNodeKey, ref: this._listRef }, FlatGridItemNode))));
222
- }))));
171
+ : defaultActionButtonWidth, maxPropertyDepth: this._getMaxItemDepth() }, (columnResizeContext) => {
172
+ var _a, _b;
173
+ return (React.createElement(PropertyGridEventsRelatedPropsSupplier, { isPropertySelectionEnabled: (_a = this.props.isPropertySelectionEnabled) !== null && _a !== void 0 ? _a : false, isPropertySelectionOnRightClickEnabled: this.props.isPropertySelectionOnRightClickEnabled, isPropertyEditingEnabled: this.props.isPropertyEditingEnabled, onPropertyContextMenu: this.props.onPropertyContextMenu, onPropertyUpdated: this.props.onPropertyUpdated, onPropertySelectionChanged: this.props.onPropertySelectionChanged, isPropertyHoverEnabled: (_b = this.props.isPropertyHoverEnabled) !== null && _b !== void 0 ? _b : false }, (selectionContext) => {
174
+ const gridContext = {
175
+ orientation: columnResizeContext.orientation,
176
+ gridWidth: this.props.width,
177
+ isPropertyHoverEnabled: selectionContext.isPropertyHoverEnabled,
178
+ isPropertySelectionEnabled: selectionContext.isPropertySelectionEnabled,
179
+ selectedPropertyKey: selectionContext.selectedPropertyKey,
180
+ onPropertyClicked: selectionContext.onPropertyClicked,
181
+ onPropertyRightClicked: selectionContext.onPropertyRightClicked,
182
+ onPropertyContextMenu: selectionContext.onPropertyContextMenu,
183
+ editingPropertyKey: selectionContext.editingPropertyKey,
184
+ onEditCommit: selectionContext.onEditCommit,
185
+ onEditCancel: selectionContext.onEditCancel,
186
+ eventHandler: this.props.eventHandler,
187
+ dataProvider: this.props.dataProvider,
188
+ actionButtonRenderers: this.props.actionButtonRenderers,
189
+ propertyValueRendererManager: this.props.propertyValueRendererManager,
190
+ propertyCategoryRendererManager: this.props.propertyCategoryRendererManager,
191
+ columnRatio: columnResizeContext.columnRatio,
192
+ columnInfo: columnResizeContext.columnInfo,
193
+ isResizeHandleBeingDragged: columnResizeContext.isResizeHandleBeingDragged,
194
+ isResizeHandleHovered: columnResizeContext.isResizeHandleHovered,
195
+ onColumnRatioChanged: columnResizeContext.onColumnChanged,
196
+ onResizeHandleDragChanged: columnResizeContext.onResizeHandleDragChanged,
197
+ onResizeHandleHoverChanged: columnResizeContext.onResizeHandleHoverChanged,
198
+ highlight: this.props.highlight,
199
+ };
200
+ const renderContext = {
201
+ gridItems: this.state.gridItems,
202
+ gridEventHandler: this.props.eventHandler,
203
+ gridModel: this.props.model,
204
+ style: this.props.style,
205
+ className: this.props.className,
206
+ onItemHeightChanged: this._handleNodeHeightChange,
207
+ gridContext,
208
+ };
209
+ return (React.createElement(PropertyGridInternalContextProvider, { value: renderContext },
210
+ React.createElement("div", { className: classnames("components-virtualized-property-grid", "components-smallEditor-host") },
211
+ React.createElement(VariableSizeList, { className: classnames("components-property-grid-wrapper", "ReactWindow__VariableSizeList", this.props.className), width: this.props.width, height: this.props.height, itemCount: this.state.gridItems.length, itemSize: this._calculateNodeHeightByIndex, estimatedItemSize: this.calculateEstimatedHeight(), overscanCount: 10, layout: "vertical", style: this.props.style, itemKey: this._getNodeKey, ref: this._listRef }, FlatGridItemNode))));
212
+ }));
213
+ }));
223
214
  }
224
215
  }
225
216
  /**
@@ -233,20 +224,38 @@ export function useVirtualizedPropertyGridLayoutStorage() {
233
224
  const FlatGridItemNode = React.memo(({ index, style: virtualizedListStyle }) => {
234
225
  const { gridItems, gridEventHandler, gridModel, gridContext, className, style, onItemHeightChanged, } = usePropertyGridInternalContext(FlatGridItemNode);
235
226
  const node = gridItems[index];
227
+ const divRef = React.useRef(null);
228
+ const previousHeightRef = React.useRef(0);
236
229
  const onExpansionToggled = React.useCallback(() => gridEventHandler.onExpansionToggled(node.selectionKey), [gridEventHandler, node.selectionKey]);
237
230
  const onHeightChanged = React.useCallback((newHeight) => onItemHeightChanged(index, node.key, newHeight), [onItemHeightChanged, index, node.key]);
231
+ const minHeight = React.useMemo(() => {
232
+ if (node.type === FlatGridItemType.Category)
233
+ return CATEGORY_HEADER_HEIGHT;
234
+ return gridContext.orientation === Orientation.Vertical
235
+ ? VERTICAL_CATEGORY_PROPERTY_HEIGHT
236
+ : CATEGORY_PROPERTY_HEIGHT;
237
+ }, [gridContext.orientation, node.type]);
238
+ React.useLayoutEffect(() => {
239
+ assert(divRef.current !== null);
240
+ const refHeight = divRef.current.getBoundingClientRect().height;
241
+ const currentHeight = Math.max(refHeight, minHeight);
242
+ if (currentHeight !== previousHeightRef.current) {
243
+ onHeightChanged(currentHeight);
244
+ previousHeightRef.current = currentHeight;
245
+ }
246
+ });
238
247
  function getDisplayNode() {
248
+ var _a, _b, _c, _d, _e, _f, _g;
239
249
  const lastInNumberOfCategories = node.lastInNumberOfCategories;
240
250
  switch (node.type) {
241
251
  case FlatGridItemType.Category:
242
- const categoryRendererManager = gridContext.propertyCategoryRendererManager ??
243
- PropertyCategoryRendererManager.defaultManager;
252
+ const categoryRendererManager = (_a = gridContext.propertyCategoryRendererManager) !== null && _a !== void 0 ? _a : PropertyCategoryRendererManager.defaultManager;
244
253
  const customRenderer = categoryRendererManager.getCategoryComponent(node);
245
254
  const wrapperClassName = classnames("virtualized-grid-node-content", customRenderer !== undefined
246
255
  ? "virtualized-grid-node-custom-category"
247
256
  : "virtualized-grid-node-category");
248
257
  return (React.createElement(FlatItemNestedBorderWrapper, { borderCount: node.depth, bottomBorderCount: lastInNumberOfCategories, className: wrapperClassName },
249
- React.createElement(PropertyCategoryBlock, { className: className, style: style, category: node.derivedCategory, onExpansionToggled: onExpansionToggled, highlight: gridContext.highlight?.filteredTypes?.includes(FilteredType.Category)
258
+ React.createElement(PropertyCategoryBlock, { className: className, style: style, category: node.derivedCategory, onExpansionToggled: onExpansionToggled, highlight: ((_c = (_b = gridContext.highlight) === null || _b === void 0 ? void 0 : _b.filteredTypes) === null || _c === void 0 ? void 0 : _c.includes(FilteredType.Category))
250
259
  ? gridContext.highlight
251
260
  : undefined }, customRenderer !== undefined && (React.createElement(CustomCategoryContent, { renderer: customRenderer, categoryItem: node, gridContext: gridContext, onHeightChanged: onHeightChanged })))));
252
261
  case FlatGridItemType.Array:
@@ -255,20 +264,21 @@ const FlatGridItemNode = React.memo(({ index, style: virtualizedListStyle }) =>
255
264
  const selectionKey = node.selectionKey;
256
265
  const parentCategoryItem = gridModel.getItem(node.parentCategorySelectionKey);
257
266
  return (React.createElement(FlatItemNestedBorderWrapper, { borderCount: parentCategoryItem.depth + 1, bottomBorderCount: lastInNumberOfCategories, className: "virtualized-grid-node-content" },
258
- React.createElement(FlatPropertyRenderer, { key: node.key, uniqueKey: selectionKey, propertyRecord: node.derivedRecord, orientation: gridContext.orientation, indentation: node.depth, width: gridContext.gridWidth, isHoverable: gridContext.isPropertyHoverEnabled, isSelectable: gridContext.isPropertySelectionEnabled, isSelected: selectionKey === gridContext.selectedPropertyKey, onClick: node.type === FlatGridItemType.Primitive
259
- ? gridContext.onPropertyClicked
260
- : undefined, onRightClick: node.type === FlatGridItemType.Primitive
261
- ? gridContext.onPropertyRightClicked
262
- : undefined, onContextMenu: gridContext.onPropertyContextMenu, category: parentCategoryItem.derivedCategory, isEditing: selectionKey === gridContext.editingPropertyKey, onEditCommit: gridContext.onEditCommit, onEditCancel: gridContext.onEditCancel, isExpanded: node.isExpanded, onExpansionToggled: onExpansionToggled, onHeightChanged: onHeightChanged, actionButtonRenderers: gridContext.actionButtonRenderers, propertyValueRendererManager: gridContext.propertyValueRendererManager, columnRatio: gridContext.columnRatio, columnInfo: gridContext.columnInfo, isResizeHandleBeingDragged: gridContext.isResizeHandleBeingDragged, isResizeHandleHovered: gridContext.isResizeHandleHovered, onColumnRatioChanged: gridContext.onColumnRatioChanged, onResizeHandleDragChanged: gridContext.onResizeHandleDragChanged, onResizeHandleHoverChanged: gridContext.onResizeHandleHoverChanged, highlight: gridContext.highlight
267
+ React.createElement(FlatPropertyRenderer, { key: node.key, uniqueKey: selectionKey, propertyRecord: node.derivedRecord, orientation: gridContext.orientation, indentation: node.depth, width: gridContext.gridWidth, isHoverable: gridContext.isPropertyHoverEnabled, isSelectable: gridContext.isPropertySelectionEnabled, isSelected: selectionKey === gridContext.selectedPropertyKey, onClick: gridContext.onPropertyClicked, onRightClick: gridContext.onPropertyRightClicked, onContextMenu: gridContext.onPropertyContextMenu, category: parentCategoryItem.derivedCategory, isEditing: selectionKey === gridContext.editingPropertyKey, onEditCommit: gridContext.onEditCommit, onEditCancel: gridContext.onEditCancel, isExpanded: node.isExpanded, onExpansionToggled: onExpansionToggled, onHeightChanged: onHeightChanged, actionButtonRenderers: gridContext.actionButtonRenderers, propertyValueRendererManager: gridContext.propertyValueRendererManager, columnRatio: gridContext.columnRatio, columnInfo: gridContext.columnInfo, isResizeHandleBeingDragged: gridContext.isResizeHandleBeingDragged, isResizeHandleHovered: gridContext.isResizeHandleHovered, onColumnRatioChanged: gridContext.onColumnRatioChanged, onResizeHandleDragChanged: gridContext.onResizeHandleDragChanged, onResizeHandleHoverChanged: gridContext.onResizeHandleHoverChanged, highlight: gridContext.highlight
263
268
  ? {
264
- applyOnLabel: gridContext.highlight.filteredTypes?.includes(FilteredType.Label) ?? false,
265
- applyOnValue: gridContext.highlight.filteredTypes?.includes(FilteredType.Value) ?? false,
269
+ applyOnLabel: (_e = (_d = gridContext.highlight.filteredTypes) === null || _d === void 0 ? void 0 : _d.includes(FilteredType.Label)) !== null && _e !== void 0 ? _e : false,
270
+ applyOnValue: (_g = (_f = gridContext.highlight.filteredTypes) === null || _f === void 0 ? void 0 : _f.includes(FilteredType.Value)) !== null && _g !== void 0 ? _g : false,
266
271
  ...gridContext.highlight,
267
272
  }
268
273
  : undefined })));
269
274
  }
270
275
  }
271
- return (React.createElement("div", { className: "virtualized-grid-node", style: virtualizedListStyle }, getDisplayNode()));
276
+ return (React.createElement("div", { className: "virtualized-grid-node", style: virtualizedListStyle },
277
+ React.createElement("div", { className: "virtualized-grid-node-content-wrapper", style: {
278
+ minHeight: `${minHeight}px`,
279
+ display: "grid",
280
+ } },
281
+ React.createElement("div", { ref: divRef, className: "virtualized-grid-node-content-wrapper-item" }, getDisplayNode()))));
272
282
  }, areEqual);
273
283
  FlatGridItemNode.displayName = "FlatGridItemNode";
274
284
  const CustomCategoryContent = (props) => {