@itwin/components-react 4.13.3 → 4.14.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 (402) hide show
  1. package/CHANGELOG.md +6 -3
  2. package/lib/cjs/components-react/common/ImageRenderer.d.ts.map +1 -1
  3. package/lib/cjs/components-react/common/ImageRenderer.js +0 -4
  4. package/lib/cjs/components-react/common/ImageRenderer.js.map +1 -1
  5. package/lib/cjs/components-react/common/Links.d.ts.map +1 -1
  6. package/lib/cjs/components-react/common/Links.js +0 -7
  7. package/lib/cjs/components-react/common/Links.js.map +1 -1
  8. package/lib/cjs/components-react/common/UseContextWithMandatoryProvider.d.ts.map +1 -1
  9. package/lib/cjs/components-react/common/UseContextWithMandatoryProvider.js +0 -1
  10. package/lib/cjs/components-react/common/UseContextWithMandatoryProvider.js.map +1 -1
  11. package/lib/cjs/components-react/common/UseElementsScrollStorage.d.ts.map +1 -1
  12. package/lib/cjs/components-react/common/UseElementsScrollStorage.js +0 -1
  13. package/lib/cjs/components-react/common/UseElementsScrollStorage.js.map +1 -1
  14. package/lib/cjs/components-react/converters/DateTimeTypeConverter.d.ts.map +1 -1
  15. package/lib/cjs/components-react/converters/DateTimeTypeConverter.js +0 -13
  16. package/lib/cjs/components-react/converters/DateTimeTypeConverter.js.map +1 -1
  17. package/lib/cjs/components-react/converters/TypeConverterManager.d.ts.map +1 -1
  18. package/lib/cjs/components-react/converters/TypeConverterManager.js +0 -1
  19. package/lib/cjs/components-react/converters/TypeConverterManager.js.map +1 -1
  20. package/lib/cjs/components-react/datepicker/DateField.d.ts.map +1 -1
  21. package/lib/cjs/components-react/datepicker/DateField.js +1 -8
  22. package/lib/cjs/components-react/datepicker/DateField.js.map +1 -1
  23. package/lib/cjs/components-react/datepicker/DatePicker.d.ts.map +1 -1
  24. package/lib/cjs/components-react/datepicker/DatePicker.js +0 -2
  25. package/lib/cjs/components-react/datepicker/DatePicker.js.map +1 -1
  26. package/lib/cjs/components-react/datepicker/DatePickerPopupButton.d.ts.map +1 -1
  27. package/lib/cjs/components-react/datepicker/DatePickerPopupButton.js +0 -1
  28. package/lib/cjs/components-react/datepicker/DatePickerPopupButton.js.map +1 -1
  29. package/lib/cjs/components-react/datepicker/TimeField.d.ts.map +1 -1
  30. package/lib/cjs/components-react/datepicker/TimeField.js +0 -9
  31. package/lib/cjs/components-react/datepicker/TimeField.js.map +1 -1
  32. package/lib/cjs/components-react/editors/BooleanEditor.d.ts.map +1 -1
  33. package/lib/cjs/components-react/editors/BooleanEditor.js +0 -8
  34. package/lib/cjs/components-react/editors/BooleanEditor.js.map +1 -1
  35. package/lib/cjs/components-react/editors/CustomNumberEditor.d.ts.map +1 -1
  36. package/lib/cjs/components-react/editors/CustomNumberEditor.js +7 -25
  37. package/lib/cjs/components-react/editors/CustomNumberEditor.js.map +1 -1
  38. package/lib/cjs/components-react/editors/DateTimeEditor.d.ts.map +1 -1
  39. package/lib/cjs/components-react/editors/DateTimeEditor.js +0 -21
  40. package/lib/cjs/components-react/editors/DateTimeEditor.js.map +1 -1
  41. package/lib/cjs/components-react/editors/EnumButtonGroupEditor.d.ts.map +1 -1
  42. package/lib/cjs/components-react/editors/EnumButtonGroupEditor.js +1 -14
  43. package/lib/cjs/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
  44. package/lib/cjs/components-react/editors/EnumEditor.d.ts.map +1 -1
  45. package/lib/cjs/components-react/editors/EnumEditor.js +1 -13
  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 +0 -9
  49. package/lib/cjs/components-react/editors/IconEditor.js.map +1 -1
  50. package/lib/cjs/components-react/editors/ImageCheckBoxEditor.d.ts.map +1 -1
  51. package/lib/cjs/components-react/editors/ImageCheckBoxEditor.js +0 -6
  52. package/lib/cjs/components-react/editors/ImageCheckBoxEditor.js.map +1 -1
  53. package/lib/cjs/components-react/editors/NumericInputEditor.d.ts.map +1 -1
  54. package/lib/cjs/components-react/editors/NumericInputEditor.js +1 -10
  55. package/lib/cjs/components-react/editors/NumericInputEditor.js.map +1 -1
  56. package/lib/cjs/components-react/editors/PopupButton.d.ts.map +1 -1
  57. package/lib/cjs/components-react/editors/PopupButton.js +0 -2
  58. package/lib/cjs/components-react/editors/PopupButton.js.map +1 -1
  59. package/lib/cjs/components-react/editors/PropertyEditorManager.d.ts.map +1 -1
  60. package/lib/cjs/components-react/editors/PropertyEditorManager.js +0 -1
  61. package/lib/cjs/components-react/editors/PropertyEditorManager.js.map +1 -1
  62. package/lib/cjs/components-react/editors/SliderEditor.d.ts.map +1 -1
  63. package/lib/cjs/components-react/editors/SliderEditor.js +0 -10
  64. package/lib/cjs/components-react/editors/SliderEditor.js.map +1 -1
  65. package/lib/cjs/components-react/editors/TextEditor.d.ts.map +1 -1
  66. package/lib/cjs/components-react/editors/TextEditor.js +0 -7
  67. package/lib/cjs/components-react/editors/TextEditor.js.map +1 -1
  68. package/lib/cjs/components-react/editors/TextareaEditor.d.ts.map +1 -1
  69. package/lib/cjs/components-react/editors/TextareaEditor.js +0 -15
  70. package/lib/cjs/components-react/editors/TextareaEditor.js.map +1 -1
  71. package/lib/cjs/components-react/editors/ToggleEditor.d.ts.map +1 -1
  72. package/lib/cjs/components-react/editors/ToggleEditor.js +0 -9
  73. package/lib/cjs/components-react/editors/ToggleEditor.js.map +1 -1
  74. package/lib/cjs/components-react/favorite/FavoritePropertiesRenderer.d.ts.map +1 -1
  75. package/lib/cjs/components-react/favorite/FavoritePropertiesRenderer.js +1 -0
  76. package/lib/cjs/components-react/favorite/FavoritePropertiesRenderer.js.map +1 -1
  77. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.d.ts.map +1 -1
  78. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js +0 -1
  79. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
  80. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js +3 -4
  81. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
  82. package/lib/cjs/components-react/filtering/FilteringInput.d.ts.map +1 -1
  83. package/lib/cjs/components-react/filtering/FilteringInput.js +0 -1
  84. package/lib/cjs/components-react/filtering/FilteringInput.js.map +1 -1
  85. package/lib/cjs/components-react/iconpicker/IconPickerButton.d.ts.map +1 -1
  86. package/lib/cjs/components-react/iconpicker/IconPickerButton.js +0 -3
  87. package/lib/cjs/components-react/iconpicker/IconPickerButton.js.map +1 -1
  88. package/lib/cjs/components-react/inputs/ParsedInput.d.ts +1 -1
  89. package/lib/cjs/components-react/inputs/ParsedInput.d.ts.map +1 -1
  90. package/lib/cjs/components-react/inputs/ParsedInput.js +0 -5
  91. package/lib/cjs/components-react/inputs/ParsedInput.js.map +1 -1
  92. package/lib/cjs/components-react/properties/renderers/NonPrimitivePropertyRenderer.d.ts.map +1 -1
  93. package/lib/cjs/components-react/properties/renderers/NonPrimitivePropertyRenderer.js +0 -1
  94. package/lib/cjs/components-react/properties/renderers/NonPrimitivePropertyRenderer.js.map +1 -1
  95. package/lib/cjs/components-react/properties/renderers/PropertyGridColumns.js +1 -2
  96. package/lib/cjs/components-react/properties/renderers/PropertyGridColumns.js.map +1 -1
  97. package/lib/cjs/components-react/properties/renderers/PropertyRenderer.d.ts.map +1 -1
  98. package/lib/cjs/components-react/properties/renderers/PropertyRenderer.js +0 -2
  99. package/lib/cjs/components-react/properties/renderers/PropertyRenderer.js.map +1 -1
  100. package/lib/cjs/components-react/properties/renderers/PropertyView.d.ts.map +1 -1
  101. package/lib/cjs/components-react/properties/renderers/PropertyView.js +7 -4
  102. package/lib/cjs/components-react/properties/renderers/PropertyView.js.map +1 -1
  103. package/lib/cjs/components-react/properties/renderers/label/PropertyLabelRenderer.d.ts.map +1 -1
  104. package/lib/cjs/components-react/properties/renderers/label/PropertyLabelRenderer.js +6 -3
  105. package/lib/cjs/components-react/properties/renderers/label/PropertyLabelRenderer.js.map +1 -1
  106. package/lib/cjs/components-react/properties/renderers/label/PropertyLabelRenderer.scss +5 -5
  107. package/lib/cjs/components-react/properties/renderers/value/ArrayPropertyValueRenderer.d.ts +1 -1
  108. package/lib/cjs/components-react/properties/renderers/value/DoublePropertyValueRenderer.d.ts +1 -0
  109. package/lib/cjs/components-react/properties/renderers/value/DoublePropertyValueRenderer.d.ts.map +1 -1
  110. package/lib/cjs/components-react/properties/renderers/value/DoublePropertyValueRenderer.js +1 -0
  111. package/lib/cjs/components-react/properties/renderers/value/DoublePropertyValueRenderer.js.map +1 -1
  112. package/lib/cjs/components-react/properties/renderers/value/MergedPropertyValueRenderer.d.ts +1 -1
  113. package/lib/cjs/components-react/properties/renderers/value/NavigationPropertyValueRenderer.d.ts +1 -0
  114. package/lib/cjs/components-react/properties/renderers/value/NavigationPropertyValueRenderer.d.ts.map +1 -1
  115. package/lib/cjs/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js +1 -0
  116. package/lib/cjs/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js.map +1 -1
  117. package/lib/cjs/components-react/properties/renderers/value/StructPropertyValueRenderer.d.ts +1 -1
  118. package/lib/cjs/components-react/properties/renderers/value/UrlPropertyValueRenderer.js +5 -9
  119. package/lib/cjs/components-react/properties/renderers/value/UrlPropertyValueRenderer.js.map +1 -1
  120. package/lib/cjs/components-react/properties/renderers/value/WithContextStyle.d.ts +1 -1
  121. package/lib/cjs/components-react/properties/renderers/value/WithContextStyle.d.ts.map +1 -1
  122. package/lib/cjs/components-react/propertygrid/SimplePropertyDataProvider.d.ts.map +1 -1
  123. package/lib/cjs/components-react/propertygrid/SimplePropertyDataProvider.js +0 -2
  124. package/lib/cjs/components-react/propertygrid/SimplePropertyDataProvider.js.map +1 -1
  125. package/lib/cjs/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.d.ts.map +1 -1
  126. package/lib/cjs/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js +0 -1
  127. package/lib/cjs/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js.map +1 -1
  128. package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.d.ts.map +1 -1
  129. package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.js +3 -4
  130. package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
  131. package/lib/cjs/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.d.ts.map +1 -1
  132. package/lib/cjs/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js +3 -4
  133. package/lib/cjs/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js.map +1 -1
  134. package/lib/cjs/components-react/propertygrid/component/PropertyList.d.ts.map +1 -1
  135. package/lib/cjs/components-react/propertygrid/component/PropertyList.js +0 -1
  136. package/lib/cjs/components-react/propertygrid/component/PropertyList.js.map +1 -1
  137. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts.map +1 -1
  138. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.js +0 -2
  139. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
  140. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.scss +0 -4
  141. package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.d.ts.map +1 -1
  142. package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.js +0 -1
  143. package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.js.map +1 -1
  144. package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.d.ts.map +1 -1
  145. package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.js +0 -1
  146. package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.js.map +1 -1
  147. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.d.ts.map +1 -1
  148. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js +2 -6
  149. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
  150. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js +0 -1
  151. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js.map +1 -1
  152. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.d.ts.map +1 -1
  153. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js +0 -2
  154. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js.map +1 -1
  155. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js +1 -2
  156. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
  157. package/lib/cjs/components-react/toolbar/InternalToolbarComponent.d.ts.map +1 -1
  158. package/lib/cjs/components-react/toolbar/InternalToolbarComponent.js +7 -24
  159. package/lib/cjs/components-react/toolbar/InternalToolbarComponent.js.map +1 -1
  160. package/lib/cjs/components-react/toolbar/Items.d.ts.map +1 -1
  161. package/lib/cjs/components-react/toolbar/Items.js +0 -2
  162. package/lib/cjs/components-react/toolbar/Items.js.map +1 -1
  163. package/lib/cjs/components-react/toolbar/OverflowPanel.d.ts.map +1 -1
  164. package/lib/cjs/components-react/toolbar/OverflowPanel.js +0 -1
  165. package/lib/cjs/components-react/toolbar/OverflowPanel.js.map +1 -1
  166. package/lib/cjs/components-react/toolbar/PopupItem.d.ts.map +1 -1
  167. package/lib/cjs/components-react/toolbar/PopupItem.js +3 -6
  168. package/lib/cjs/components-react/toolbar/PopupItem.js.map +1 -1
  169. package/lib/cjs/components-react/toolbar/PopupItemWithDrag.d.ts.map +1 -1
  170. package/lib/cjs/components-react/toolbar/PopupItemWithDrag.js +3 -13
  171. package/lib/cjs/components-react/toolbar/PopupItemWithDrag.js.map +1 -1
  172. package/lib/cjs/components-react/toolbar/PopupItemsPanel.d.ts.map +1 -1
  173. package/lib/cjs/components-react/toolbar/PopupItemsPanel.js +1 -7
  174. package/lib/cjs/components-react/toolbar/PopupItemsPanel.js.map +1 -1
  175. package/lib/cjs/components-react/toolbar/groupPanel/tool/Tool.d.ts.map +1 -1
  176. package/lib/cjs/components-react/toolbar/groupPanel/tool/Tool.js +0 -3
  177. package/lib/cjs/components-react/toolbar/groupPanel/tool/Tool.js.map +1 -1
  178. package/lib/cjs/components-react/toolbar/useDragInteraction.d.ts.map +1 -1
  179. package/lib/cjs/components-react/toolbar/useDragInteraction.js +0 -2
  180. package/lib/cjs/components-react/toolbar/useDragInteraction.js.map +1 -1
  181. package/lib/cjs/components-react/tree/TreeDataProvider.d.ts.map +1 -1
  182. package/lib/cjs/components-react/tree/TreeDataProvider.js +0 -1
  183. package/lib/cjs/components-react/tree/TreeDataProvider.js.map +1 -1
  184. package/lib/cjs/components-react/tree/controlled/TreeEventDispatcher.d.ts.map +1 -1
  185. package/lib/cjs/components-react/tree/controlled/TreeEventDispatcher.js +1 -8
  186. package/lib/cjs/components-react/tree/controlled/TreeEventDispatcher.js.map +1 -1
  187. package/lib/cjs/components-react/tree/controlled/TreeModel.d.ts.map +1 -1
  188. package/lib/cjs/components-react/tree/controlled/TreeModel.js +0 -1
  189. package/lib/cjs/components-react/tree/controlled/TreeModel.js.map +1 -1
  190. package/lib/cjs/components-react/tree/controlled/TreeNodeLoader.d.ts.map +1 -1
  191. package/lib/cjs/components-react/tree/controlled/TreeNodeLoader.js +0 -4
  192. package/lib/cjs/components-react/tree/controlled/TreeNodeLoader.js.map +1 -1
  193. package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.d.ts.map +1 -1
  194. package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.js +0 -5
  195. package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
  196. package/lib/cjs/components-react/tree/controlled/internal/TreeModelMutator.d.ts.map +1 -1
  197. package/lib/cjs/components-react/tree/controlled/internal/TreeModelMutator.js +0 -1
  198. package/lib/cjs/components-react/tree/controlled/internal/TreeModelMutator.js.map +1 -1
  199. package/lib/cjs/components-react/tree/controlled/internal/TreeSelectionManager.d.ts.map +1 -1
  200. package/lib/cjs/components-react/tree/controlled/internal/TreeSelectionManager.js +1 -10
  201. package/lib/cjs/components-react/tree/controlled/internal/TreeSelectionManager.js.map +1 -1
  202. package/lib/esm/components-react/common/ImageRenderer.d.ts.map +1 -1
  203. package/lib/esm/components-react/common/ImageRenderer.js +0 -4
  204. package/lib/esm/components-react/common/ImageRenderer.js.map +1 -1
  205. package/lib/esm/components-react/common/Links.d.ts.map +1 -1
  206. package/lib/esm/components-react/common/Links.js +0 -7
  207. package/lib/esm/components-react/common/Links.js.map +1 -1
  208. package/lib/esm/components-react/common/UseContextWithMandatoryProvider.d.ts.map +1 -1
  209. package/lib/esm/components-react/common/UseContextWithMandatoryProvider.js +0 -1
  210. package/lib/esm/components-react/common/UseContextWithMandatoryProvider.js.map +1 -1
  211. package/lib/esm/components-react/common/UseElementsScrollStorage.d.ts.map +1 -1
  212. package/lib/esm/components-react/common/UseElementsScrollStorage.js +0 -1
  213. package/lib/esm/components-react/common/UseElementsScrollStorage.js.map +1 -1
  214. package/lib/esm/components-react/converters/DateTimeTypeConverter.d.ts.map +1 -1
  215. package/lib/esm/components-react/converters/DateTimeTypeConverter.js +0 -13
  216. package/lib/esm/components-react/converters/DateTimeTypeConverter.js.map +1 -1
  217. package/lib/esm/components-react/converters/TypeConverterManager.d.ts.map +1 -1
  218. package/lib/esm/components-react/converters/TypeConverterManager.js +0 -1
  219. package/lib/esm/components-react/converters/TypeConverterManager.js.map +1 -1
  220. package/lib/esm/components-react/datepicker/DateField.d.ts.map +1 -1
  221. package/lib/esm/components-react/datepicker/DateField.js +1 -8
  222. package/lib/esm/components-react/datepicker/DateField.js.map +1 -1
  223. package/lib/esm/components-react/datepicker/DatePicker.d.ts.map +1 -1
  224. package/lib/esm/components-react/datepicker/DatePicker.js +0 -2
  225. package/lib/esm/components-react/datepicker/DatePicker.js.map +1 -1
  226. package/lib/esm/components-react/datepicker/DatePickerPopupButton.d.ts.map +1 -1
  227. package/lib/esm/components-react/datepicker/DatePickerPopupButton.js +0 -1
  228. package/lib/esm/components-react/datepicker/DatePickerPopupButton.js.map +1 -1
  229. package/lib/esm/components-react/datepicker/TimeField.d.ts.map +1 -1
  230. package/lib/esm/components-react/datepicker/TimeField.js +0 -9
  231. package/lib/esm/components-react/datepicker/TimeField.js.map +1 -1
  232. package/lib/esm/components-react/editors/BooleanEditor.d.ts.map +1 -1
  233. package/lib/esm/components-react/editors/BooleanEditor.js +0 -8
  234. package/lib/esm/components-react/editors/BooleanEditor.js.map +1 -1
  235. package/lib/esm/components-react/editors/CustomNumberEditor.d.ts.map +1 -1
  236. package/lib/esm/components-react/editors/CustomNumberEditor.js +7 -25
  237. package/lib/esm/components-react/editors/CustomNumberEditor.js.map +1 -1
  238. package/lib/esm/components-react/editors/DateTimeEditor.d.ts.map +1 -1
  239. package/lib/esm/components-react/editors/DateTimeEditor.js +0 -21
  240. package/lib/esm/components-react/editors/DateTimeEditor.js.map +1 -1
  241. package/lib/esm/components-react/editors/EnumButtonGroupEditor.d.ts.map +1 -1
  242. package/lib/esm/components-react/editors/EnumButtonGroupEditor.js +1 -14
  243. package/lib/esm/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
  244. package/lib/esm/components-react/editors/EnumEditor.d.ts.map +1 -1
  245. package/lib/esm/components-react/editors/EnumEditor.js +1 -13
  246. package/lib/esm/components-react/editors/EnumEditor.js.map +1 -1
  247. package/lib/esm/components-react/editors/IconEditor.d.ts.map +1 -1
  248. package/lib/esm/components-react/editors/IconEditor.js +0 -9
  249. package/lib/esm/components-react/editors/IconEditor.js.map +1 -1
  250. package/lib/esm/components-react/editors/ImageCheckBoxEditor.d.ts.map +1 -1
  251. package/lib/esm/components-react/editors/ImageCheckBoxEditor.js +0 -6
  252. package/lib/esm/components-react/editors/ImageCheckBoxEditor.js.map +1 -1
  253. package/lib/esm/components-react/editors/NumericInputEditor.d.ts.map +1 -1
  254. package/lib/esm/components-react/editors/NumericInputEditor.js +1 -10
  255. package/lib/esm/components-react/editors/NumericInputEditor.js.map +1 -1
  256. package/lib/esm/components-react/editors/PopupButton.d.ts.map +1 -1
  257. package/lib/esm/components-react/editors/PopupButton.js +0 -2
  258. package/lib/esm/components-react/editors/PopupButton.js.map +1 -1
  259. package/lib/esm/components-react/editors/PropertyEditorManager.d.ts.map +1 -1
  260. package/lib/esm/components-react/editors/PropertyEditorManager.js +0 -1
  261. package/lib/esm/components-react/editors/PropertyEditorManager.js.map +1 -1
  262. package/lib/esm/components-react/editors/SliderEditor.d.ts.map +1 -1
  263. package/lib/esm/components-react/editors/SliderEditor.js +0 -10
  264. package/lib/esm/components-react/editors/SliderEditor.js.map +1 -1
  265. package/lib/esm/components-react/editors/TextEditor.d.ts.map +1 -1
  266. package/lib/esm/components-react/editors/TextEditor.js +0 -7
  267. package/lib/esm/components-react/editors/TextEditor.js.map +1 -1
  268. package/lib/esm/components-react/editors/TextareaEditor.d.ts.map +1 -1
  269. package/lib/esm/components-react/editors/TextareaEditor.js +0 -15
  270. package/lib/esm/components-react/editors/TextareaEditor.js.map +1 -1
  271. package/lib/esm/components-react/editors/ToggleEditor.d.ts.map +1 -1
  272. package/lib/esm/components-react/editors/ToggleEditor.js +0 -9
  273. package/lib/esm/components-react/editors/ToggleEditor.js.map +1 -1
  274. package/lib/esm/components-react/favorite/FavoritePropertiesRenderer.d.ts.map +1 -1
  275. package/lib/esm/components-react/favorite/FavoritePropertiesRenderer.js +1 -0
  276. package/lib/esm/components-react/favorite/FavoritePropertiesRenderer.js.map +1 -1
  277. package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.d.ts.map +1 -1
  278. package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js +0 -1
  279. package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
  280. package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js +3 -4
  281. package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
  282. package/lib/esm/components-react/filtering/FilteringInput.d.ts.map +1 -1
  283. package/lib/esm/components-react/filtering/FilteringInput.js +0 -1
  284. package/lib/esm/components-react/filtering/FilteringInput.js.map +1 -1
  285. package/lib/esm/components-react/iconpicker/IconPickerButton.d.ts.map +1 -1
  286. package/lib/esm/components-react/iconpicker/IconPickerButton.js +0 -3
  287. package/lib/esm/components-react/iconpicker/IconPickerButton.js.map +1 -1
  288. package/lib/esm/components-react/inputs/ParsedInput.d.ts +1 -1
  289. package/lib/esm/components-react/inputs/ParsedInput.d.ts.map +1 -1
  290. package/lib/esm/components-react/inputs/ParsedInput.js +0 -5
  291. package/lib/esm/components-react/inputs/ParsedInput.js.map +1 -1
  292. package/lib/esm/components-react/properties/renderers/NonPrimitivePropertyRenderer.d.ts.map +1 -1
  293. package/lib/esm/components-react/properties/renderers/NonPrimitivePropertyRenderer.js +0 -1
  294. package/lib/esm/components-react/properties/renderers/NonPrimitivePropertyRenderer.js.map +1 -1
  295. package/lib/esm/components-react/properties/renderers/PropertyGridColumns.js +1 -2
  296. package/lib/esm/components-react/properties/renderers/PropertyGridColumns.js.map +1 -1
  297. package/lib/esm/components-react/properties/renderers/PropertyRenderer.d.ts.map +1 -1
  298. package/lib/esm/components-react/properties/renderers/PropertyRenderer.js +0 -2
  299. package/lib/esm/components-react/properties/renderers/PropertyRenderer.js.map +1 -1
  300. package/lib/esm/components-react/properties/renderers/PropertyView.d.ts.map +1 -1
  301. package/lib/esm/components-react/properties/renderers/PropertyView.js +7 -4
  302. package/lib/esm/components-react/properties/renderers/PropertyView.js.map +1 -1
  303. package/lib/esm/components-react/properties/renderers/label/PropertyLabelRenderer.d.ts.map +1 -1
  304. package/lib/esm/components-react/properties/renderers/label/PropertyLabelRenderer.js +3 -3
  305. package/lib/esm/components-react/properties/renderers/label/PropertyLabelRenderer.js.map +1 -1
  306. package/lib/esm/components-react/properties/renderers/label/PropertyLabelRenderer.scss +5 -5
  307. package/lib/esm/components-react/properties/renderers/value/ArrayPropertyValueRenderer.d.ts +1 -1
  308. package/lib/esm/components-react/properties/renderers/value/DoublePropertyValueRenderer.d.ts +1 -0
  309. package/lib/esm/components-react/properties/renderers/value/DoublePropertyValueRenderer.d.ts.map +1 -1
  310. package/lib/esm/components-react/properties/renderers/value/DoublePropertyValueRenderer.js +1 -0
  311. package/lib/esm/components-react/properties/renderers/value/DoublePropertyValueRenderer.js.map +1 -1
  312. package/lib/esm/components-react/properties/renderers/value/MergedPropertyValueRenderer.d.ts +1 -1
  313. package/lib/esm/components-react/properties/renderers/value/NavigationPropertyValueRenderer.d.ts +1 -0
  314. package/lib/esm/components-react/properties/renderers/value/NavigationPropertyValueRenderer.d.ts.map +1 -1
  315. package/lib/esm/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js +1 -0
  316. package/lib/esm/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js.map +1 -1
  317. package/lib/esm/components-react/properties/renderers/value/StructPropertyValueRenderer.d.ts +1 -1
  318. package/lib/esm/components-react/properties/renderers/value/UrlPropertyValueRenderer.js +5 -9
  319. package/lib/esm/components-react/properties/renderers/value/UrlPropertyValueRenderer.js.map +1 -1
  320. package/lib/esm/components-react/properties/renderers/value/WithContextStyle.d.ts +1 -1
  321. package/lib/esm/components-react/properties/renderers/value/WithContextStyle.d.ts.map +1 -1
  322. package/lib/esm/components-react/propertygrid/SimplePropertyDataProvider.d.ts.map +1 -1
  323. package/lib/esm/components-react/propertygrid/SimplePropertyDataProvider.js +0 -2
  324. package/lib/esm/components-react/propertygrid/SimplePropertyDataProvider.js.map +1 -1
  325. package/lib/esm/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.d.ts.map +1 -1
  326. package/lib/esm/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js +0 -1
  327. package/lib/esm/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js.map +1 -1
  328. package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.d.ts.map +1 -1
  329. package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.js +3 -4
  330. package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
  331. package/lib/esm/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.d.ts.map +1 -1
  332. package/lib/esm/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js +3 -4
  333. package/lib/esm/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js.map +1 -1
  334. package/lib/esm/components-react/propertygrid/component/PropertyList.d.ts.map +1 -1
  335. package/lib/esm/components-react/propertygrid/component/PropertyList.js +0 -1
  336. package/lib/esm/components-react/propertygrid/component/PropertyList.js.map +1 -1
  337. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts.map +1 -1
  338. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.js +0 -2
  339. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
  340. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.scss +0 -4
  341. package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.d.ts.map +1 -1
  342. package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.js +0 -1
  343. package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.js.map +1 -1
  344. package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.d.ts.map +1 -1
  345. package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.js +0 -1
  346. package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.js.map +1 -1
  347. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.d.ts.map +1 -1
  348. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js +2 -3
  349. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
  350. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js +0 -1
  351. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js.map +1 -1
  352. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.d.ts.map +1 -1
  353. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js +0 -2
  354. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js.map +1 -1
  355. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js +1 -2
  356. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
  357. package/lib/esm/components-react/toolbar/InternalToolbarComponent.d.ts.map +1 -1
  358. package/lib/esm/components-react/toolbar/InternalToolbarComponent.js +7 -24
  359. package/lib/esm/components-react/toolbar/InternalToolbarComponent.js.map +1 -1
  360. package/lib/esm/components-react/toolbar/Items.d.ts.map +1 -1
  361. package/lib/esm/components-react/toolbar/Items.js +0 -2
  362. package/lib/esm/components-react/toolbar/Items.js.map +1 -1
  363. package/lib/esm/components-react/toolbar/OverflowPanel.d.ts.map +1 -1
  364. package/lib/esm/components-react/toolbar/OverflowPanel.js +0 -1
  365. package/lib/esm/components-react/toolbar/OverflowPanel.js.map +1 -1
  366. package/lib/esm/components-react/toolbar/PopupItem.d.ts.map +1 -1
  367. package/lib/esm/components-react/toolbar/PopupItem.js +3 -6
  368. package/lib/esm/components-react/toolbar/PopupItem.js.map +1 -1
  369. package/lib/esm/components-react/toolbar/PopupItemWithDrag.d.ts.map +1 -1
  370. package/lib/esm/components-react/toolbar/PopupItemWithDrag.js +3 -13
  371. package/lib/esm/components-react/toolbar/PopupItemWithDrag.js.map +1 -1
  372. package/lib/esm/components-react/toolbar/PopupItemsPanel.d.ts.map +1 -1
  373. package/lib/esm/components-react/toolbar/PopupItemsPanel.js +1 -7
  374. package/lib/esm/components-react/toolbar/PopupItemsPanel.js.map +1 -1
  375. package/lib/esm/components-react/toolbar/groupPanel/tool/Tool.d.ts.map +1 -1
  376. package/lib/esm/components-react/toolbar/groupPanel/tool/Tool.js +0 -3
  377. package/lib/esm/components-react/toolbar/groupPanel/tool/Tool.js.map +1 -1
  378. package/lib/esm/components-react/toolbar/useDragInteraction.d.ts.map +1 -1
  379. package/lib/esm/components-react/toolbar/useDragInteraction.js +0 -2
  380. package/lib/esm/components-react/toolbar/useDragInteraction.js.map +1 -1
  381. package/lib/esm/components-react/tree/TreeDataProvider.d.ts.map +1 -1
  382. package/lib/esm/components-react/tree/TreeDataProvider.js +0 -1
  383. package/lib/esm/components-react/tree/TreeDataProvider.js.map +1 -1
  384. package/lib/esm/components-react/tree/controlled/TreeEventDispatcher.d.ts.map +1 -1
  385. package/lib/esm/components-react/tree/controlled/TreeEventDispatcher.js +1 -8
  386. package/lib/esm/components-react/tree/controlled/TreeEventDispatcher.js.map +1 -1
  387. package/lib/esm/components-react/tree/controlled/TreeModel.d.ts.map +1 -1
  388. package/lib/esm/components-react/tree/controlled/TreeModel.js +0 -1
  389. package/lib/esm/components-react/tree/controlled/TreeModel.js.map +1 -1
  390. package/lib/esm/components-react/tree/controlled/TreeNodeLoader.d.ts.map +1 -1
  391. package/lib/esm/components-react/tree/controlled/TreeNodeLoader.js +0 -4
  392. package/lib/esm/components-react/tree/controlled/TreeNodeLoader.js.map +1 -1
  393. package/lib/esm/components-react/tree/controlled/component/TreeRenderer.d.ts.map +1 -1
  394. package/lib/esm/components-react/tree/controlled/component/TreeRenderer.js +0 -5
  395. package/lib/esm/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
  396. package/lib/esm/components-react/tree/controlled/internal/TreeModelMutator.d.ts.map +1 -1
  397. package/lib/esm/components-react/tree/controlled/internal/TreeModelMutator.js +0 -1
  398. package/lib/esm/components-react/tree/controlled/internal/TreeModelMutator.js.map +1 -1
  399. package/lib/esm/components-react/tree/controlled/internal/TreeSelectionManager.d.ts.map +1 -1
  400. package/lib/esm/components-react/tree/controlled/internal/TreeSelectionManager.js +1 -10
  401. package/lib/esm/components-react/tree/controlled/internal/TreeSelectionManager.js.map +1 -1
  402. package/package.json +11 -15
@@ -1,7 +1,4 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  var _a;
6
3
  Object.defineProperty(exports, "__esModule", { value: true });
7
4
  exports.MutableCategorizedProperty = exports.MutableFlatPropertyGridItem = exports.FlatGridItemType = void 0;
@@ -13,8 +10,8 @@ exports.MutableCategorizedProperty = exports.MutableFlatPropertyGridItem = expor
13
10
  * @module PropertyGrid
14
11
  */
15
12
  const immer_1 = require("immer");
16
- const shortid_1 = __importDefault(require("shortid"));
17
13
  const appui_abstract_1 = require("@itwin/appui-abstract");
14
+ const core_bentley_1 = require("@itwin/core-bentley");
18
15
  /**
19
16
  * Types of FlatGridItems for differentiating what property FlatGridItem is wrapping.
20
17
  * Category for PropertyCategory
@@ -38,7 +35,7 @@ class MutableFlatPropertyGridItem {
38
35
  this._parentSelectionKey = _parentSelectionKey;
39
36
  this._parentCategorySelectionKey = _parentCategorySelectionKey;
40
37
  this[_a] = true;
41
- this.key = shortid_1.default.generate();
38
+ this.key = core_bentley_1.Guid.createValue();
42
39
  this._isExpanded = false;
43
40
  this._lastInNumberOfCategories = 0;
44
41
  this._isLastInRootCategory = false;
@@ -163,7 +160,6 @@ class MutableCategorizedProperty extends MutableFlatPropertyGridItem {
163
160
  return FlatGridItemType.Array;
164
161
  case appui_abstract_1.PropertyValueFormat.Struct:
165
162
  return FlatGridItemType.Struct;
166
- /* istanbul ignore next */
167
163
  default:
168
164
  const unhandledType = valueType;
169
165
  throw Error(`Property Value Format not handled: ${unhandledType}`);
@@ -1 +1 @@
1
- {"version":3,"file":"MutableFlatGridItem.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.ts"],"names":[],"mappings":";;;;;;;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EAAE,eAAe,EAAE,CAAC;IACvE,CAAC;IAED;;OAEG;IACK,iBAAiB,CACvB,MAAsB,EACtB,4BAAiD;QAEjD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;QAC9C,MAAM,SAAS,GAAG,IAAI,+BAAc,CAAC,KAAK,EAAE,4BAA4B,CAAC,CAAC;QAE1E,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IAEM,OAAO;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAoB,0BAA0B;QAC5C,OAAO,KAAK,CAAC,0BAA2B,CAAC;IAC3C,CAAC;IAED,IAAoB,kBAAkB;QACpC,OAAO,KAAK,CAAC,kBAAmB,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,YAAY,CAAC;IACnD,CAAC;IAED;;OAEG;IACH,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;CACF;AAzHD,gEAyHC","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 */\nimport { immerable } from \"immer\";\nimport shortid from \"shortid\";\nimport type { PropertyDescription } from \"@itwin/appui-abstract\";\nimport { PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport type { PropertyCategory } from \"../../PropertyDataProvider\";\n\n/**\n * Types of FlatGridItems for differentiating what property FlatGridItem is wrapping.\n * Category for PropertyCategory\n * (Primitive, Array, Struct) for PropertyRecord with valueFormats: (Primitive, Array, Struct)\n * @public\n */\nexport enum FlatGridItemType {\n Category,\n Primitive,\n Array,\n Struct,\n}\n\n/**\n * Type which extracts FlatGridItemTypes relevant for working with CategorizedProperties\n * @public\n */\nexport type CategorizedPropertyTypes =\n | FlatGridItemType.Array\n | FlatGridItemType.Primitive\n | FlatGridItemType.Struct;\n\n/**\n * Base mutable data structure defining common methods and properties for both CategorizedProperties and GridCategoryItems\n * @public\n */\nexport interface IMutableFlatPropertyGridItem {\n readonly type: FlatGridItemType;\n readonly key: string;\n readonly selectionKey: string;\n readonly parentSelectionKey: string | undefined;\n readonly parentCategorySelectionKey: string | undefined;\n readonly depth: number;\n readonly label: string;\n lastInNumberOfCategories: number;\n isLastInRootCategory: boolean;\n isExpanded: boolean;\n getDescendantsAndSelf(): IMutableFlatGridItem[];\n getVisibleDescendantsAndSelf(): IMutableFlatGridItem[];\n getChildren(): IMutableFlatGridItem[];\n getLastVisibleDescendantOrSelf(): IMutableFlatGridItem;\n}\n\n/**\n * Base class for all FlatPropertyGrid items\n * @public\n */\nexport abstract class MutableFlatPropertyGridItem\n implements IMutableFlatPropertyGridItem\n{\n public [immerable] = true;\n\n public readonly key: string = shortid.generate();\n protected _isExpanded: boolean = false;\n protected _lastInNumberOfCategories: number = 0;\n protected _isLastInRootCategory: boolean = false;\n\n public constructor(\n private _depth: number,\n private _parentSelectionKey: string | undefined,\n private _parentCategorySelectionKey: string | undefined\n ) {\n if (this._depth < 0) throw new Error(\"Depth cannot be negative\");\n }\n\n public abstract type: FlatGridItemType;\n public abstract label: string;\n public abstract selectionKey: string;\n\n public get depth() {\n return this._depth;\n }\n\n public get parentSelectionKey() {\n return this._parentSelectionKey;\n }\n\n public get parentCategorySelectionKey() {\n return this._parentCategorySelectionKey;\n }\n\n public get isExpanded() {\n return this._isExpanded;\n }\n\n public set isExpanded(value: boolean) {\n this._isExpanded = value;\n }\n\n public abstract getChildren(): IMutableFlatGridItem[];\n public abstract getSelf(): IMutableFlatGridItem;\n\n protected getDescendants() {\n const descendants: IMutableFlatGridItem[] = [];\n this.getChildren().forEach((child) =>\n descendants.push(...child.getDescendantsAndSelf())\n );\n\n return descendants;\n }\n\n /**\n * Gets a flat list of all FlatGridItems beneath this flat grid item including itself in depth first visiting order.\n */\n public getDescendantsAndSelf(): IMutableFlatGridItem[] {\n return [this.getSelf(), ...this.getDescendants()];\n }\n\n /**\n * Gets a flat list of visible FlatGridItems beneath this flat grid item.\n */\n public getVisibleDescendants(): IMutableFlatGridItem[] {\n const descendants: IMutableFlatGridItem[] = [];\n if (this.isExpanded)\n this.getChildren().forEach((child) =>\n descendants.push(...child.getVisibleDescendantsAndSelf())\n );\n return descendants;\n }\n\n /**\n * Gets a flat list of visible FlatGridItems beneath this flat grid item and itself in depth first visiting order.\n */\n public getVisibleDescendantsAndSelf(): IMutableFlatGridItem[] {\n return [this.getSelf(), ...this.getVisibleDescendants()];\n }\n\n /**\n * @returns self if item is not expanded, last visible descendant of this item otherwise.\n */\n public getLastVisibleDescendantOrSelf(): IMutableFlatGridItem {\n if (!this.isExpanded) return this.getSelf();\n\n const children = this.getChildren();\n if (children.length < 1) return this.getSelf();\n\n return children[children.length - 1].getLastVisibleDescendantOrSelf();\n }\n\n /**\n * Sets lastInNumberOfCategories value and sends it down to this items last child\n * @internal\n */\n public get lastInNumberOfCategories(): number {\n if (this.isExpanded && this.getChildren().length > 0) return 0;\n\n return this._lastInNumberOfCategories;\n }\n\n public set lastInNumberOfCategories(value: number) {\n this._lastInNumberOfCategories = value;\n const children = this.getChildren();\n if (children.length < 1) return;\n\n children[children.length - 1].lastInNumberOfCategories = value;\n }\n\n /**\n * Gets and sets isLastInRootCategory value and sends it down to this items last child\n * @internal\n */\n public get isLastInRootCategory(): boolean {\n if (this.isExpanded && this.getChildren().length > 0) return false;\n\n return this._isLastInRootCategory;\n }\n\n public set isLastInRootCategory(value: boolean) {\n this._isLastInRootCategory = value;\n const children = this.getChildren();\n if (children.length < 1) return;\n\n children[children.length - 1].isLastInRootCategory = value;\n }\n}\n\n/**\n * Data structure which describes methods and properties to be held by Mutable GridCategoryItems\n * @public\n */\nexport interface IMutableGridCategoryItem extends IMutableFlatPropertyGridItem {\n type: FlatGridItemType.Category;\n name: string;\n derivedCategory: PropertyCategory;\n isRootCategory: boolean;\n}\n\n/**\n * Data structure which describes methods and properties to be held by Mutable CategorizedPropertyItems\n * @public\n */\nexport interface IMutableCategorizedPropertyItem\n extends IMutableFlatPropertyGridItem {\n readonly type: CategorizedPropertyTypes;\n readonly derivedRecord: PropertyRecord;\n readonly parentCategorySelectionKey: string;\n readonly parentSelectionKey: string;\n\n getChildren(): IMutableCategorizedPropertyItem[];\n}\n\n/**\n * Type which describes mutable GridCategoryItem or CategorizedProperty\n * @public\n */\nexport type IMutableFlatGridItem =\n | IMutableCategorizedPropertyItem\n | IMutableGridCategoryItem;\n\n/**\n * Base class for all Mutable CategorizedProperties\n * @public\n */\nexport abstract class MutableCategorizedProperty\n extends MutableFlatPropertyGridItem\n implements Partial<IMutableCategorizedPropertyItem>\n{\n private _derivedRecord: PropertyRecord;\n private _selectionKey: string;\n\n public constructor(\n type: CategorizedPropertyTypes,\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string\n ) {\n super(depth, parentSelectionKey, parentCategorySelectionKey);\n\n const recordType = this.valueTypeToFlatGridType(record.value.valueFormat);\n if (recordType !== type) {\n const expectedTypeStr = FlatGridItemType[type];\n const actualTypeStr = FlatGridItemType[recordType];\n throw Error(\n `Record with incorrect value format passed to property: expected ${expectedTypeStr}, got ${actualTypeStr}`\n );\n }\n\n const overridenProperty = this.makeOverridenProperty(\n record.property,\n overrideName,\n overrideDisplayLabel\n );\n this._derivedRecord = this.makeDerivedRecord(record, overridenProperty);\n\n this._selectionKey = `${this.parentSelectionKey}_${this.derivedRecord.property.name}`;\n this._isExpanded = !!record.autoExpand;\n }\n\n public abstract override type: CategorizedPropertyTypes;\n public abstract override getChildren(): IMutableCategorizedPropertyItem[];\n\n /**\n * Maps PropertyRecord valueFormat to FlatGridItemType\n * @param valueType valueFormat to map\n * @returns mapped FlatGridItemType\n */\n private valueTypeToFlatGridType(valueType: PropertyValueFormat) {\n switch (valueType) {\n case PropertyValueFormat.Primitive:\n return FlatGridItemType.Primitive;\n case PropertyValueFormat.Array:\n return FlatGridItemType.Array;\n case PropertyValueFormat.Struct:\n return FlatGridItemType.Struct;\n /* istanbul ignore next */\n default:\n const unhandledType: never = valueType;\n throw Error(`Property Value Format not handled: ${unhandledType}`);\n }\n }\n\n /**\n * Make new property description with overriden fields.\n * @param propertyDescription property description to override.\n * @param overrideName property description name to override.\n * @param overrideDisplay property description display name to override.\n */\n private makeOverridenProperty(\n propertyDescription: PropertyDescription,\n overrideName?: string,\n overrideDisplay?: string\n ): PropertyDescription {\n const { name, displayLabel, ...property } = { ...propertyDescription };\n const newName = overrideName ?? name;\n const newDisplayLabel = overrideDisplay ?? displayLabel;\n\n return { ...property, name: newName, displayLabel: newDisplayLabel };\n }\n\n /**\n * Gets derived property record that has it's property description field overriden\n */\n private makeDerivedRecord(\n record: PropertyRecord,\n overridenPropertyDescription: PropertyDescription\n ) {\n const { value, property, ...others } = record;\n const newRecord = new PropertyRecord(value, overridenPropertyDescription);\n\n return Object.assign(newRecord, others);\n }\n\n public getSelf(): IMutableCategorizedPropertyItem {\n return this;\n }\n\n public override get parentCategorySelectionKey() {\n return super.parentCategorySelectionKey!;\n }\n\n public override get parentSelectionKey() {\n return super.parentSelectionKey!;\n }\n\n /**\n * Unique selection key made of parent selectionKey and this property name.\n */\n public get selectionKey() {\n return this._selectionKey;\n }\n\n public get label() {\n return this._derivedRecord.property.displayLabel;\n }\n\n /**\n * Record with overriden property description.\n */\n public get derivedRecord() {\n return this._derivedRecord;\n }\n}\n"]}
1
+ {"version":3,"file":"MutableFlatGridItem.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.ts"],"names":[],"mappings":";;;;AAAA;;;gGAGgG;A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C;IAED;;OAEG;IACK,iBAAiB,CACvB,MAAsB,EACtB,4BAAiD;QAEjD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;QAC9C,MAAM,SAAS,GAAG,IAAI,+BAAc,CAAC,KAAK,EAAE,4BAA4B,CAAC,CAAC;QAE1E,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IAEM,OAAO;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAoB,0BAA0B;QAC5C,OAAO,KAAK,CAAC,0BAA2B,CAAC;IAC3C,CAAC;IAED,IAAoB,kBAAkB;QACpC,OAAO,KAAK,CAAC,kBAAmB,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,YAAY,CAAC;IACnD,CAAC;IAED;;OAEG;IACH,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;CACF;AAzHD,gEAyHC","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 */\nimport { immerable } from \"immer\";\nimport type { PropertyDescription } from \"@itwin/appui-abstract\";\nimport { PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { Guid } from \"@itwin/core-bentley\";\nimport type { PropertyCategory } from \"../../PropertyDataProvider\";\n\n/**\n * Types of FlatGridItems for differentiating what property FlatGridItem is wrapping.\n * Category for PropertyCategory\n * (Primitive, Array, Struct) for PropertyRecord with valueFormats: (Primitive, Array, Struct)\n * @public\n */\nexport enum FlatGridItemType {\n Category,\n Primitive,\n Array,\n Struct,\n}\n\n/**\n * Type which extracts FlatGridItemTypes relevant for working with CategorizedProperties\n * @public\n */\nexport type CategorizedPropertyTypes =\n | FlatGridItemType.Array\n | FlatGridItemType.Primitive\n | FlatGridItemType.Struct;\n\n/**\n * Base mutable data structure defining common methods and properties for both CategorizedProperties and GridCategoryItems\n * @public\n */\nexport interface IMutableFlatPropertyGridItem {\n readonly type: FlatGridItemType;\n readonly key: string;\n readonly selectionKey: string;\n readonly parentSelectionKey: string | undefined;\n readonly parentCategorySelectionKey: string | undefined;\n readonly depth: number;\n readonly label: string;\n lastInNumberOfCategories: number;\n isLastInRootCategory: boolean;\n isExpanded: boolean;\n getDescendantsAndSelf(): IMutableFlatGridItem[];\n getVisibleDescendantsAndSelf(): IMutableFlatGridItem[];\n getChildren(): IMutableFlatGridItem[];\n getLastVisibleDescendantOrSelf(): IMutableFlatGridItem;\n}\n\n/**\n * Base class for all FlatPropertyGrid items\n * @public\n */\nexport abstract class MutableFlatPropertyGridItem\n implements IMutableFlatPropertyGridItem\n{\n public [immerable] = true;\n\n public readonly key: string = Guid.createValue();\n protected _isExpanded: boolean = false;\n protected _lastInNumberOfCategories: number = 0;\n protected _isLastInRootCategory: boolean = false;\n\n public constructor(\n private _depth: number,\n private _parentSelectionKey: string | undefined,\n private _parentCategorySelectionKey: string | undefined\n ) {\n if (this._depth < 0) throw new Error(\"Depth cannot be negative\");\n }\n\n public abstract type: FlatGridItemType;\n public abstract label: string;\n public abstract selectionKey: string;\n\n public get depth() {\n return this._depth;\n }\n\n public get parentSelectionKey() {\n return this._parentSelectionKey;\n }\n\n public get parentCategorySelectionKey() {\n return this._parentCategorySelectionKey;\n }\n\n public get isExpanded() {\n return this._isExpanded;\n }\n\n public set isExpanded(value: boolean) {\n this._isExpanded = value;\n }\n\n public abstract getChildren(): IMutableFlatGridItem[];\n public abstract getSelf(): IMutableFlatGridItem;\n\n protected getDescendants() {\n const descendants: IMutableFlatGridItem[] = [];\n this.getChildren().forEach((child) =>\n descendants.push(...child.getDescendantsAndSelf())\n );\n\n return descendants;\n }\n\n /**\n * Gets a flat list of all FlatGridItems beneath this flat grid item including itself in depth first visiting order.\n */\n public getDescendantsAndSelf(): IMutableFlatGridItem[] {\n return [this.getSelf(), ...this.getDescendants()];\n }\n\n /**\n * Gets a flat list of visible FlatGridItems beneath this flat grid item.\n */\n public getVisibleDescendants(): IMutableFlatGridItem[] {\n const descendants: IMutableFlatGridItem[] = [];\n if (this.isExpanded)\n this.getChildren().forEach((child) =>\n descendants.push(...child.getVisibleDescendantsAndSelf())\n );\n return descendants;\n }\n\n /**\n * Gets a flat list of visible FlatGridItems beneath this flat grid item and itself in depth first visiting order.\n */\n public getVisibleDescendantsAndSelf(): IMutableFlatGridItem[] {\n return [this.getSelf(), ...this.getVisibleDescendants()];\n }\n\n /**\n * @returns self if item is not expanded, last visible descendant of this item otherwise.\n */\n public getLastVisibleDescendantOrSelf(): IMutableFlatGridItem {\n if (!this.isExpanded) return this.getSelf();\n\n const children = this.getChildren();\n if (children.length < 1) return this.getSelf();\n\n return children[children.length - 1].getLastVisibleDescendantOrSelf();\n }\n\n /**\n * Sets lastInNumberOfCategories value and sends it down to this items last child\n * @internal\n */\n public get lastInNumberOfCategories(): number {\n if (this.isExpanded && this.getChildren().length > 0) return 0;\n\n return this._lastInNumberOfCategories;\n }\n\n public set lastInNumberOfCategories(value: number) {\n this._lastInNumberOfCategories = value;\n const children = this.getChildren();\n if (children.length < 1) return;\n\n children[children.length - 1].lastInNumberOfCategories = value;\n }\n\n /**\n * Gets and sets isLastInRootCategory value and sends it down to this items last child\n * @internal\n */\n public get isLastInRootCategory(): boolean {\n if (this.isExpanded && this.getChildren().length > 0) return false;\n\n return this._isLastInRootCategory;\n }\n\n public set isLastInRootCategory(value: boolean) {\n this._isLastInRootCategory = value;\n const children = this.getChildren();\n if (children.length < 1) return;\n\n children[children.length - 1].isLastInRootCategory = value;\n }\n}\n\n/**\n * Data structure which describes methods and properties to be held by Mutable GridCategoryItems\n * @public\n */\nexport interface IMutableGridCategoryItem extends IMutableFlatPropertyGridItem {\n type: FlatGridItemType.Category;\n name: string;\n derivedCategory: PropertyCategory;\n isRootCategory: boolean;\n}\n\n/**\n * Data structure which describes methods and properties to be held by Mutable CategorizedPropertyItems\n * @public\n */\nexport interface IMutableCategorizedPropertyItem\n extends IMutableFlatPropertyGridItem {\n readonly type: CategorizedPropertyTypes;\n readonly derivedRecord: PropertyRecord;\n readonly parentCategorySelectionKey: string;\n readonly parentSelectionKey: string;\n\n getChildren(): IMutableCategorizedPropertyItem[];\n}\n\n/**\n * Type which describes mutable GridCategoryItem or CategorizedProperty\n * @public\n */\nexport type IMutableFlatGridItem =\n | IMutableCategorizedPropertyItem\n | IMutableGridCategoryItem;\n\n/**\n * Base class for all Mutable CategorizedProperties\n * @public\n */\nexport abstract class MutableCategorizedProperty\n extends MutableFlatPropertyGridItem\n implements Partial<IMutableCategorizedPropertyItem>\n{\n private _derivedRecord: PropertyRecord;\n private _selectionKey: string;\n\n public constructor(\n type: CategorizedPropertyTypes,\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string\n ) {\n super(depth, parentSelectionKey, parentCategorySelectionKey);\n\n const recordType = this.valueTypeToFlatGridType(record.value.valueFormat);\n if (recordType !== type) {\n const expectedTypeStr = FlatGridItemType[type];\n const actualTypeStr = FlatGridItemType[recordType];\n throw Error(\n `Record with incorrect value format passed to property: expected ${expectedTypeStr}, got ${actualTypeStr}`\n );\n }\n\n const overridenProperty = this.makeOverridenProperty(\n record.property,\n overrideName,\n overrideDisplayLabel\n );\n this._derivedRecord = this.makeDerivedRecord(record, overridenProperty);\n\n this._selectionKey = `${this.parentSelectionKey}_${this.derivedRecord.property.name}`;\n this._isExpanded = !!record.autoExpand;\n }\n\n public abstract override type: CategorizedPropertyTypes;\n public abstract override getChildren(): IMutableCategorizedPropertyItem[];\n\n /**\n * Maps PropertyRecord valueFormat to FlatGridItemType\n * @param valueType valueFormat to map\n * @returns mapped FlatGridItemType\n */\n private valueTypeToFlatGridType(valueType: PropertyValueFormat) {\n switch (valueType) {\n case PropertyValueFormat.Primitive:\n return FlatGridItemType.Primitive;\n case PropertyValueFormat.Array:\n return FlatGridItemType.Array;\n case PropertyValueFormat.Struct:\n return FlatGridItemType.Struct;\n\n default:\n const unhandledType: never = valueType;\n throw Error(`Property Value Format not handled: ${unhandledType}`);\n }\n }\n\n /**\n * Make new property description with overriden fields.\n * @param propertyDescription property description to override.\n * @param overrideName property description name to override.\n * @param overrideDisplay property description display name to override.\n */\n private makeOverridenProperty(\n propertyDescription: PropertyDescription,\n overrideName?: string,\n overrideDisplay?: string\n ): PropertyDescription {\n const { name, displayLabel, ...property } = { ...propertyDescription };\n const newName = overrideName ?? name;\n const newDisplayLabel = overrideDisplay ?? displayLabel;\n\n return { ...property, name: newName, displayLabel: newDisplayLabel };\n }\n\n /**\n * Gets derived property record that has it's property description field overriden\n */\n private makeDerivedRecord(\n record: PropertyRecord,\n overridenPropertyDescription: PropertyDescription\n ) {\n const { value, property, ...others } = record;\n const newRecord = new PropertyRecord(value, overridenPropertyDescription);\n\n return Object.assign(newRecord, others);\n }\n\n public getSelf(): IMutableCategorizedPropertyItem {\n return this;\n }\n\n public override get parentCategorySelectionKey() {\n return super.parentCategorySelectionKey!;\n }\n\n public override get parentSelectionKey() {\n return super.parentSelectionKey!;\n }\n\n /**\n * Unique selection key made of parent selectionKey and this property name.\n */\n public get selectionKey() {\n return this._selectionKey;\n }\n\n public get label() {\n return this._derivedRecord.property.displayLabel;\n }\n\n /**\n * Record with overriden property description.\n */\n public get derivedRecord() {\n return this._derivedRecord;\n }\n}\n"]}
@@ -40,7 +40,6 @@ class MutableGridItemFactory {
40
40
  return this.createArrayProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);
41
41
  case appui_abstract_1.PropertyValueFormat.Struct:
42
42
  return this.createStructProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);
43
- /* istanbul ignore next */
44
43
  default:
45
44
  const unhandledRecordType = valueFormat;
46
45
  throw new Error(`Unhandled property record type. Was a new type added? ${unhandledRecordType}`);
@@ -1 +1 @@
1
- {"version":3,"file":"MutableGridItemFactory.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.ts"],"names":[],"mappings":";;;AAQA,0DAA4D;AAE5D,uFAAoF;AACpF,+FAA4F;AAC5F,yFAAsF;AACtF,2EAAwE;AAMxE,+DAA4D;AAwB5D;;;GAGG;AACH,MAAa,sBAAsB;IACvB,uBAAuB,CAC/B,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,OAAO,IAAI,yEAAmC,CAC5C,MAAM,EACN,kBAAkB,EAClB,0BAA0B,EAC1B,KAAK,EACL,YAAY,EACZ,oBAAoB,CACrB,CAAC;IACJ,CAAC;IAES,mBAAmB,CAC3B,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,OAAO,IAAI,iEAA+B,CACxC,MAAM,EACN,kBAAkB,EAClB,0BAA0B,EAC1B,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,oBAAoB,CACrB,CAAC;IACJ,CAAC;IAES,oBAAoB,CAC5B,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,OAAO,IAAI,mEAAgC,CACzC,MAAM,EACN,kBAAkB,EAClB,0BAA0B,EAC1B,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,oBAAoB,CACrB,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACI,yBAAyB,CAC9B,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,MA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------------------------------------------------------------------------------------\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 */\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport type { PropertyCategory } from \"../../PropertyDataProvider\";\nimport { MutableCategorizedArrayProperty } from \"./MutableCategorizedArrayProperty\";\nimport { MutableCategorizedPrimitiveProperty } from \"./MutableCategorizedPrimitiveProperty\";\nimport { MutableCategorizedStructProperty } from \"./MutableCategorizedStructProperty\";\nimport { MutableCustomGridCategory } from \"./MutableCustomGridCategory\";\nimport type {\n IMutableCategorizedPropertyItem,\n IMutableGridCategoryItem,\n} from \"./MutableFlatGridItem\";\nimport type { CategoryRecordsDict } from \"./MutableGridCategory\";\nimport { MutableGridCategory } from \"./MutableGridCategory\";\n\n/**\n * IMutableGridItemFactory interface for creating MutableGridItem objects\n * @public\n */\nexport interface IMutableGridItemFactory {\n createCategorizedProperty: (\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string\n ) => IMutableCategorizedPropertyItem;\n\n createGridCategory: (\n category: PropertyCategory,\n recordsDict: CategoryRecordsDict,\n parentSelectionKey?: string,\n depth?: number\n ) => IMutableGridCategoryItem;\n}\n\n/**\n * Implementation of IMutableGridItemFactory for creating MutableGridItem objects.\n * @public\n */\nexport class MutableGridItemFactory implements IMutableGridItemFactory {\n protected createPrimitiveProperty(\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string\n ) {\n return new MutableCategorizedPrimitiveProperty(\n record,\n parentSelectionKey,\n parentCategorySelectionKey,\n depth,\n overrideName,\n overrideDisplayLabel\n );\n }\n\n protected createArrayProperty(\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string\n ) {\n return new MutableCategorizedArrayProperty(\n record,\n parentSelectionKey,\n parentCategorySelectionKey,\n depth,\n this,\n overrideName,\n overrideDisplayLabel\n );\n }\n\n protected createStructProperty(\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string\n ) {\n return new MutableCategorizedStructProperty(\n record,\n parentSelectionKey,\n parentCategorySelectionKey,\n depth,\n this,\n overrideName,\n overrideDisplayLabel\n );\n }\n\n /**\n * Converts record into FlatGridItem.\n * @param record record to convert to a FlatGridItem.\n * @param parentSelectionKey parent selection key of provided `record`.\n * @param parentCategorySelectionKey parent category selection key of provided `record`.\n * @param depth current depth counting from parent category.\n * @param overrideName property name that overrides original record property name.\n * @param overrideDisplayLabel property display label that overrides original record property display label.\n * @returns converted CategorizedProperty.\n */\n public createCategorizedProperty(\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string\n ): IMutableCategorizedPropertyItem {\n const valueFormat = record.value.valueFormat;\n switch (valueFormat) {\n case PropertyValueFormat.Primitive:\n return this.createPrimitiveProperty(\n record,\n parentSelectionKey,\n parentCategorySelectionKey,\n depth,\n overrideName,\n overrideDisplayLabel\n );\n case PropertyValueFormat.Array:\n return this.createArrayProperty(\n record,\n parentSelectionKey,\n parentCategorySelectionKey,\n depth,\n overrideName,\n overrideDisplayLabel\n );\n case PropertyValueFormat.Struct:\n return this.createStructProperty(\n record,\n parentSelectionKey,\n parentCategorySelectionKey,\n depth,\n overrideName,\n overrideDisplayLabel\n );\n /* istanbul ignore next */\n default:\n const unhandledRecordType: never = valueFormat;\n throw new Error(\n `Unhandled property record type. Was a new type added? ${unhandledRecordType}`\n );\n }\n }\n\n /**\n * Converts category into GridCategoryItem.\n * @param category PropertyCategory to convert.\n * @param recordsDict dictionary of category records.\n * @param parentSelectionKey parent selection key of this category.\n * @param depth current depth counting from root category.\n * @returns converted GridCategory.\n */\n public createGridCategory(\n category: PropertyCategory,\n recordsDict: CategoryRecordsDict,\n parentSelectionKey?: string,\n depth?: number\n ): IMutableGridCategoryItem {\n if (category.renderer !== undefined)\n return new MutableCustomGridCategory(\n category,\n recordsDict,\n this,\n parentSelectionKey,\n depth ?? 0\n );\n\n if (parentSelectionKey !== undefined && depth !== undefined)\n return new MutableGridCategory(\n category,\n recordsDict,\n this,\n parentSelectionKey,\n depth\n );\n\n return new MutableGridCategory(category, recordsDict, this);\n }\n}\n"]}
1
+ {"version":3,"file":"MutableGridItemFactory.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.ts"],"names":[],"mappings":";;;AAQA,0DAA4D;AAE5D,uFAAoF;AACpF,+FAA4F;AAC5F,yFAAsF;AACtF,2EAAwE;AAMxE,+DAA4D;AAwB5D;;;GAGG;AACH,MAAa,sBAAsB;IACvB,uBAAuB,CAC/B,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,OAAO,IAAI,yEAAmC,CAC5C,MAAM,EACN,kBAAkB,EAClB,0BAA0B,EAC1B,KAAK,EACL,YAAY,EACZ,oBAAoB,CACrB,CAAC;IACJ,CAAC;IAES,mBAAmB,CAC3B,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,OAAO,IAAI,iEAA+B,CACxC,MAAM,EACN,kBAAkB,EAClB,0BAA0B,EAC1B,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,oBAAoB,CACrB,CAAC;IACJ,CAAC;IAES,oBAAoB,CAC5B,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,OAAO,IAAI,mEAAgC,CACzC,MAAM,EAC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AI,yCAAmB,CAC5B,QAAQ,EACR,WAAW,EACX,IAAI,EACJ,kBAAkB,EAClB,KAAK,CACN,CAAC;QAEJ,OAAO,IAAI,yCAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;IAC9D,CAAC;CACF;AAnJD,wDAmJC","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 */\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport type { PropertyCategory } from \"../../PropertyDataProvider\";\nimport { MutableCategorizedArrayProperty } from \"./MutableCategorizedArrayProperty\";\nimport { MutableCategorizedPrimitiveProperty } from \"./MutableCategorizedPrimitiveProperty\";\nimport { MutableCategorizedStructProperty } from \"./MutableCategorizedStructProperty\";\nimport { MutableCustomGridCategory } from \"./MutableCustomGridCategory\";\nimport type {\n IMutableCategorizedPropertyItem,\n IMutableGridCategoryItem,\n} from \"./MutableFlatGridItem\";\nimport type { CategoryRecordsDict } from \"./MutableGridCategory\";\nimport { MutableGridCategory } from \"./MutableGridCategory\";\n\n/**\n * IMutableGridItemFactory interface for creating MutableGridItem objects\n * @public\n */\nexport interface IMutableGridItemFactory {\n createCategorizedProperty: (\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string\n ) => IMutableCategorizedPropertyItem;\n\n createGridCategory: (\n category: PropertyCategory,\n recordsDict: CategoryRecordsDict,\n parentSelectionKey?: string,\n depth?: number\n ) => IMutableGridCategoryItem;\n}\n\n/**\n * Implementation of IMutableGridItemFactory for creating MutableGridItem objects.\n * @public\n */\nexport class MutableGridItemFactory implements IMutableGridItemFactory {\n protected createPrimitiveProperty(\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string\n ) {\n return new MutableCategorizedPrimitiveProperty(\n record,\n parentSelectionKey,\n parentCategorySelectionKey,\n depth,\n overrideName,\n overrideDisplayLabel\n );\n }\n\n protected createArrayProperty(\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string\n ) {\n return new MutableCategorizedArrayProperty(\n record,\n parentSelectionKey,\n parentCategorySelectionKey,\n depth,\n this,\n overrideName,\n overrideDisplayLabel\n );\n }\n\n protected createStructProperty(\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string\n ) {\n return new MutableCategorizedStructProperty(\n record,\n parentSelectionKey,\n parentCategorySelectionKey,\n depth,\n this,\n overrideName,\n overrideDisplayLabel\n );\n }\n\n /**\n * Converts record into FlatGridItem.\n * @param record record to convert to a FlatGridItem.\n * @param parentSelectionKey parent selection key of provided `record`.\n * @param parentCategorySelectionKey parent category selection key of provided `record`.\n * @param depth current depth counting from parent category.\n * @param overrideName property name that overrides original record property name.\n * @param overrideDisplayLabel property display label that overrides original record property display label.\n * @returns converted CategorizedProperty.\n */\n public createCategorizedProperty(\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string\n ): IMutableCategorizedPropertyItem {\n const valueFormat = record.value.valueFormat;\n switch (valueFormat) {\n case PropertyValueFormat.Primitive:\n return this.createPrimitiveProperty(\n record,\n parentSelectionKey,\n parentCategorySelectionKey,\n depth,\n overrideName,\n overrideDisplayLabel\n );\n case PropertyValueFormat.Array:\n return this.createArrayProperty(\n record,\n parentSelectionKey,\n parentCategorySelectionKey,\n depth,\n overrideName,\n overrideDisplayLabel\n );\n case PropertyValueFormat.Struct:\n return this.createStructProperty(\n record,\n parentSelectionKey,\n parentCategorySelectionKey,\n depth,\n overrideName,\n overrideDisplayLabel\n );\n\n default:\n const unhandledRecordType: never = valueFormat;\n throw new Error(\n `Unhandled property record type. Was a new type added? ${unhandledRecordType}`\n );\n }\n }\n\n /**\n * Converts category into GridCategoryItem.\n * @param category PropertyCategory to convert.\n * @param recordsDict dictionary of category records.\n * @param parentSelectionKey parent selection key of this category.\n * @param depth current depth counting from root category.\n * @returns converted GridCategory.\n */\n public createGridCategory(\n category: PropertyCategory,\n recordsDict: CategoryRecordsDict,\n parentSelectionKey?: string,\n depth?: number\n ): IMutableGridCategoryItem {\n if (category.renderer !== undefined)\n return new MutableCustomGridCategory(\n category,\n recordsDict,\n this,\n parentSelectionKey,\n depth ?? 0\n );\n\n if (parentSelectionKey !== undefined && depth !== undefined)\n return new MutableGridCategory(\n category,\n recordsDict,\n this,\n parentSelectionKey,\n depth\n );\n\n return new MutableGridCategory(category, recordsDict, this);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FlatNonPrimitivePropertyRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,iEAAiE,CAAC;AACzE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yDAAyD,CAAC;AAItG;;GAEG;AACH,MAAM,WAAW,qCACf,SAAQ,sBAAsB;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED;;GAEG;AACH,qBAAa,gCAAiC,SAAQ,KAAK,CAAC,SAAS,CAAC,qCAAqC,CAAC;gBAC9F,KAAK,EAAE,qCAAqC;IAIxD,OAAO,CAAC,WAAW,CAGjB;IAEF,OAAO,CAAC,YAAY,CAGlB;IAEF,OAAO,CAAC,QAAQ;IA6BhB,gBAAgB;IACA,MAAM;CAIvB"}
1
+ {"version":3,"file":"FlatNonPrimitivePropertyRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,iEAAiE,CAAC;AACzE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yDAAyD,CAAC;AAItG;;GAEG;AACH,MAAM,WAAW,qCACf,SAAQ,sBAAsB;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED;;GAEG;AACH,qBAAa,gCAAiC,SAAQ,KAAK,CAAC,SAAS,CAAC,qCAAqC,CAAC;gBAC9F,KAAK,EAAE,qCAAqC;IAIxD,OAAO,CAAC,WAAW,CAEjB;IAEF,OAAO,CAAC,YAAY,CAElB;IAEF,OAAO,CAAC,QAAQ;IA6BhB,gBAAgB;IACA,MAAM;CAIvB"}
@@ -44,12 +44,10 @@ class FlatNonPrimitivePropertyRenderer extends React.Component {
44
44
  constructor(props) {
45
45
  super(props);
46
46
  this._onExpanded = () => {
47
- /* istanbul ignore else */
48
47
  if (!this.props.isExpanded)
49
48
  this.props.onExpandToggled();
50
49
  };
51
50
  this._onCollapsed = () => {
52
- /* istanbul ignore else */
53
51
  if (this.props.isExpanded)
54
52
  this.props.onExpandToggled();
55
53
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FlatNonPrimitivePropertyRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;gGAGgG;AAChG;;GAEG;AACH,2EAAyE;AACzE,6CAA+B;AAC/B,0DAA4D;AAC5D,iGAA8F;AAE9F,6HAA0H;AAC1H,6EAA0E;AAW1E;;GAEG;AACH,MAAa,gCAAiC,SA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AAG,IAAI,CAAC,KAAK,CAAC;QAC7C,OAAO,oBAAC,2BAAY,IAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAM,KAAK,GAAI,CAAC;IAC9E,CAAC;CACF;AAjDD,4EAiDC","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 */\nimport \"../../../properties/renderers/NonPrimitivePropertyRenderer.scss\";\nimport * as React from \"react\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { CommonPropertyRenderer } from \"../../../properties/renderers/CommonPropertyRenderer\";\nimport type { PrimitiveRendererProps } from \"../../../properties/renderers/PrimitivePropertyRenderer\";\nimport { NonPrimitivePropertyLabelRenderer } from \"../../../properties/renderers/label/NonPrimitivePropertyLabelRenderer\";\nimport { PropertyView } from \"../../../properties/renderers/PropertyView\";\n\n/** Properties of [[FlatNonPrimitivePropertyRenderer]] React component\n * @internal\n */\nexport interface FlatNonPrimitivePropertyRendererProps\n extends PrimitiveRendererProps {\n isExpanded: boolean;\n onExpandToggled: () => void;\n}\n\n/** React Component that renders flat struct and array properties\n * @internal\n */\nexport class FlatNonPrimitivePropertyRenderer extends React.Component<FlatNonPrimitivePropertyRendererProps> {\n constructor(props: FlatNonPrimitivePropertyRendererProps) {\n super(props);\n }\n\n private _onExpanded = () => {\n /* istanbul ignore else */\n if (!this.props.isExpanded) this.props.onExpandToggled();\n };\n\n private _onCollapsed = () => {\n /* istanbul ignore else */\n if (this.props.isExpanded) this.props.onExpandToggled();\n };\n\n private getLabel(\n props: FlatNonPrimitivePropertyRendererProps\n ): React.ReactNode {\n const { orientation, indentation, width, columnRatio, columnInfo } = props;\n const offset = CommonPropertyRenderer.getLabelOffset(\n indentation,\n orientation,\n width,\n columnRatio,\n columnInfo?.minLabelWidth\n );\n\n let displayLabel = props.propertyRecord.property.displayLabel;\n if (props.propertyRecord.value.valueFormat === PropertyValueFormat.Array)\n displayLabel = `${displayLabel} (${props.propertyRecord.value.items.length})`;\n\n return (\n <NonPrimitivePropertyLabelRenderer\n isExpanded={props.isExpanded}\n onExpand={this._onExpanded}\n onCollapse={this._onCollapsed}\n offset={offset}\n renderColon={false}\n >\n {displayLabel}\n </NonPrimitivePropertyLabelRenderer>\n );\n }\n\n /** @internal */\n public override render() {\n const { indentation, ...props } = this.props;\n return <PropertyView labelElement={this.getLabel(this.props)} {...props} />;\n }\n}\n"]}
1
+ {"version":3,"file":"FlatNonPrimitivePropertyRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;gGAGgG;AAChG;;GAEG;AACH,2EAAyE;AACzE,6CAA+B;AAC/B,0DAA4D;AAC5D,iGAA8F;AAE9F,6HAA0H;AAC1H,6EAA0E;AAW1E;;GAEG;AACH,MAAa,gCAAiC,SAAQ,KAAK,CAAC,SAAgD;IAC1G,YAAY,KAA4C;QACtD,KAAK,CAAC,KAAK,CAAC,CAAC;QAGP,gBAAW,GAAG,GAAG,EAAE;YACzB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU;gBAAE,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC;QAC3D,CAAC,CAAC;QAEM,iBAAY,GAAG,GAAG,EAAE;YAC1B,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU;gBAAE,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC;QAC1D,CAAC,CAAC;IARF,CAAC;IAUO,QAAQ,CACd,KAA4C;QAE5C,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;QAC3E,MAAM,MAAM,GAAG,+CAAsB,CAAC,cAAc,CAClD,WAAW,EACX,WAAW,EACX,KAAK,EACL,WAAW,EACX,UAAU,EAAE,aAAa,CAC1B,CAAC;QAEF,IAAI,YAAY,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,YAAY,CAAC;QAC9D,IAAI,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,KAAK;YACtE,YAAY,GAAG,GAAG,YAAY,KAAK,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;QAEhF,OAAO,CACL,oBAAC,qEAAiC,IAChC,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,QAAQ,EAAE,IAAI,CAAC,WAAW,EAC1B,UAAU,EAAE,IAAI,CAAC,YAAY,EAC7B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,KAAK,IAEjB,YAAY,CACqB,CACrC,CAAC;IACJ,CAAC;IAED,gBAAgB;IACA,MAAM;QACpB,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7C,OAAO,oBAAC,2BAAY,IAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAM,KAAK,GAAI,CAAC;IAC9E,CAAC;CACF;AA/CD,4EA+CC","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 */\nimport \"../../../properties/renderers/NonPrimitivePropertyRenderer.scss\";\nimport * as React from \"react\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { CommonPropertyRenderer } from \"../../../properties/renderers/CommonPropertyRenderer\";\nimport type { PrimitiveRendererProps } from \"../../../properties/renderers/PrimitivePropertyRenderer\";\nimport { NonPrimitivePropertyLabelRenderer } from \"../../../properties/renderers/label/NonPrimitivePropertyLabelRenderer\";\nimport { PropertyView } from \"../../../properties/renderers/PropertyView\";\n\n/** Properties of [[FlatNonPrimitivePropertyRenderer]] React component\n * @internal\n */\nexport interface FlatNonPrimitivePropertyRendererProps\n extends PrimitiveRendererProps {\n isExpanded: boolean;\n onExpandToggled: () => void;\n}\n\n/** React Component that renders flat struct and array properties\n * @internal\n */\nexport class FlatNonPrimitivePropertyRenderer extends React.Component<FlatNonPrimitivePropertyRendererProps> {\n constructor(props: FlatNonPrimitivePropertyRendererProps) {\n super(props);\n }\n\n private _onExpanded = () => {\n if (!this.props.isExpanded) this.props.onExpandToggled();\n };\n\n private _onCollapsed = () => {\n if (this.props.isExpanded) this.props.onExpandToggled();\n };\n\n private getLabel(\n props: FlatNonPrimitivePropertyRendererProps\n ): React.ReactNode {\n const { orientation, indentation, width, columnRatio, columnInfo } = props;\n const offset = CommonPropertyRenderer.getLabelOffset(\n indentation,\n orientation,\n width,\n columnRatio,\n columnInfo?.minLabelWidth\n );\n\n let displayLabel = props.propertyRecord.property.displayLabel;\n if (props.propertyRecord.value.valueFormat === PropertyValueFormat.Array)\n displayLabel = `${displayLabel} (${props.propertyRecord.value.items.length})`;\n\n return (\n <NonPrimitivePropertyLabelRenderer\n isExpanded={props.isExpanded}\n onExpand={this._onExpanded}\n onCollapse={this._onCollapsed}\n offset={offset}\n renderColon={false}\n >\n {displayLabel}\n </NonPrimitivePropertyLabelRenderer>\n );\n }\n\n /** @internal */\n public override render() {\n const { indentation, ...props } = this.props;\n return <PropertyView labelElement={this.getLabel(this.props)} {...props} />;\n }\n}\n"]}
@@ -73,11 +73,10 @@ const DisplayValue = (props) => {
73
73
  useResetHeightOnEdit(props.orientation, props.isEditing, props.onHeightChanged);
74
74
  if (props.isEditing) {
75
75
  const _onEditCommit = (args) => {
76
- /* istanbul ignore else */
77
76
  if (props.category)
78
77
  props.onEditCommit?.(args, props.category);
79
78
  };
80
- return (React.createElement(EditorContainer_1.EditorContainer, { propertyRecord: props.propertyRecord, onCommit: _onEditCommit, onCancel: props.onEditCancel ?? /* istanbul ignore next */ (() => { }), setFocus: true }));
79
+ return (React.createElement(EditorContainer_1.EditorContainer, { propertyRecord: props.propertyRecord, onCommit: _onEditCommit, onCancel: props.onEditCancel ?? (() => { }), setFocus: true }));
81
80
  }
82
81
  return (React.createElement(React.Fragment, null, CommonPropertyRenderer_1.CommonPropertyRenderer.createNewDisplayValue(props.orientation, props.propertyRecord, props.indentation, props.propertyValueRendererManager, props.isExpanded, props.onExpansionToggled, props.onHeightChanged, props.highlight)));
83
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FlatPropertyRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,0DAA4D;AAC5D,kDAAgD;AAGhD,sEAAmE;AACnE,iGAA8F;AAG9F,mFAAwF;AAExF,yFAAsF;AACtF,6GAA0G;AAmC1G;;GAEG;AACI,MAAM,oBAAoB,GAAwC,CACvE,KAAK,EACL,EAAE;IACF,MAAM,EACJ,QAAQ,EACR,4BAA4B,EAC5B,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,SAAS,EACT,GAAG,gBAAgB,EACpB,GAAG,KAAK,CAAC;IAEV,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,CACjC,oBAAC,YAAY,IACX,cAAc,EAAE,gBAAgB,CAAC,cAAc,EAC/C,WAAW,EAAE,gBAAgB,CAAC,WAAW,EACzC,WAAW,EAAE,gBAAgB,CAAC,WAAW,EACzC,KAAK,EAAE,gBAAgB,CAAC,KAAK,EAC7B,QAAQ,EAAE,QAAQ,EAClB,4BAA4B,EAAE,4BAA4B,EAC1D,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,YAAY,EAA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SAAmB,EACnB,eAA6C;IAE7C,MAAM,wBAAwB,GAAG,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACzD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,wBAAwB,CAAC,OAAO,IAAI,SAAS,EAAE,CAAC;YACnD,eAAe,EAAE,CAAC,WAAW,KAAK,wBAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACpE,CAAC;QAED,wBAAwB,CAAC,OAAO,GAAG,SAAS,CAAC;IAC/C,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { Orientation } from \"@itwin/core-react\";\nimport type { HighlightingComponentProps } from \"../../../common/HighlightingComponentProps\";\nimport type { PropertyUpdatedArgs } from \"../../../editors/EditorContainer\";\nimport { EditorContainer } from \"../../../editors/EditorContainer\";\nimport { CommonPropertyRenderer } from \"../../../properties/renderers/CommonPropertyRenderer\";\nimport type { PrimitiveRendererProps } from \"../../../properties/renderers/PrimitivePropertyRenderer\";\nimport type { SharedRendererProps } from \"../../../properties/renderers/PropertyRenderer\";\nimport { PropertyValueRendererManager } from \"../../../properties/ValueRendererManager\";\nimport type { PropertyCategory } from \"../../PropertyDataProvider\";\nimport { FlatNonPrimitivePropertyRenderer } from \"./FlatNonPrimitivePropertyRenderer\";\nimport { CustomizablePropertyRenderer } from \"../../../properties/renderers/CustomizablePropertyRenderer\";\n\n/** Properties of [[FlatPropertyRenderer]] React component\n * @internal\n */\nexport interface FlatPropertyRendererProps extends SharedRendererProps {\n category?: PropertyCategory;\n /** Custom value renderer */\n propertyValueRendererManager?: PropertyValueRendererManager;\n /** Multiplier of how much the property is indented to the right */\n indentation?: number;\n /** Indicates property is being edited */\n isEditing?: boolean;\n /** Called when property edit is committed. */\n onEditCommit?: (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => void;\n /** Called when property edit is cancelled. */\n onEditCancel?: () => void;\n /** Whether property value is displayed in expanded state. */\n isExpanded: boolean;\n /** Called when toggling between expanded and collapsed property value display state. */\n onExpansionToggled: () => void;\n /** Reports property height changes. */\n onHeightChanged?: (newHeight: number) => void;\n\n highlight?: HighlightingComponentProps & {\n applyOnLabel: boolean;\n applyOnValue: boolean;\n };\n\n children?: never;\n}\n\n/** A React component that renders flat properties\n * @internal\n */\nexport const FlatPropertyRenderer: React.FC<FlatPropertyRendererProps> = (\n props\n) => {\n const {\n category,\n propertyValueRendererManager,\n isEditing,\n onEditCommit,\n onEditCancel,\n onHeightChanged,\n highlight,\n ...passthroughProps\n } = props;\n\n const valueElementRenderer = () => (\n <DisplayValue\n propertyRecord={passthroughProps.propertyRecord}\n orientation={passthroughProps.orientation}\n columnRatio={passthroughProps.columnRatio}\n width={passthroughProps.width}\n category={category}\n propertyValueRendererManager={propertyValueRendererManager}\n isEditing={isEditing}\n onEditCommit={onEditCommit}\n onEditCancel={onEditCancel}\n isExpanded={passthroughProps.isExpanded}\n onExpansionToggled={passthroughProps.onExpansionToggled}\n onHeightChanged={onHeightChanged}\n highlight={highlight}\n indentation={props.indentation}\n />\n );\n\n const primitiveRendererProps: PrimitiveRendererProps = {\n ...passthroughProps,\n valueElementRenderer,\n indentation: props.indentation,\n };\n\n const rendererManager =\n propertyValueRendererManager ?? PropertyValueRendererManager.defaultManager;\n const hasCustomRenderer = rendererManager.hasCustomRenderer(\n passthroughProps.propertyRecord\n );\n\n switch (props.propertyRecord.value.valueFormat) {\n case PropertyValueFormat.Primitive:\n return (\n <CustomizablePropertyRenderer\n highlight={highlight?.applyOnLabel ? highlight : undefined}\n {...primitiveRendererProps}\n />\n );\n\n case PropertyValueFormat.Array:\n // If array is empty or has a custom renderer registered, render it as a customizable property\n if (props.propertyRecord.value.items.length === 0 || hasCustomRenderer)\n return (\n <CustomizablePropertyRenderer\n highlight={highlight?.applyOnLabel ? highlight : undefined}\n {...primitiveRendererProps}\n />\n );\n\n // eslint-disable-next-line no-fallthrough\n case PropertyValueFormat.Struct:\n // If a custom renderer is registered for the struct property, render it as a customizable property\n if (hasCustomRenderer) {\n return (\n <CustomizablePropertyRenderer\n highlight={highlight?.applyOnLabel ? highlight : undefined}\n {...primitiveRendererProps}\n />\n );\n }\n\n return (\n <FlatNonPrimitivePropertyRenderer\n {...primitiveRendererProps}\n isExpanded={props.isExpanded}\n onExpandToggled={props.onExpansionToggled}\n valueElement={undefined}\n valueElementRenderer={undefined}\n />\n );\n }\n};\n\ninterface DisplayValueProps {\n isEditing?: boolean;\n propertyRecord: PropertyRecord;\n\n orientation: Orientation;\n columnRatio?: number;\n /** Pass width to rerender component as property grid width changes */\n width?: number;\n indentation?: number;\n propertyValueRendererManager?: PropertyValueRendererManager;\n isExpanded?: boolean;\n onExpansionToggled?: () => void;\n onHeightChanged?: (newHeight: number) => void;\n\n category?: PropertyCategory;\n onEditCancel?: () => void;\n onEditCommit?: (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => void;\n\n highlight?: HighlightingComponentProps & {\n applyOnLabel: boolean;\n applyOnValue: boolean;\n };\n}\n\nconst DisplayValue: React.FC<DisplayValueProps> = (props) => {\n useResetHeightOnEdit(\n props.orientation,\n props.isEditing,\n props.onHeightChanged\n );\n\n if (props.isEditing) {\n const _onEditCommit = (args: PropertyUpdatedArgs) => {\n /* istanbul ignore else */\n if (props.category) props.onEditCommit?.(args, props.category);\n };\n\n return (\n <EditorContainer\n propertyRecord={props.propertyRecord}\n onCommit={_onEditCommit}\n onCancel={props.onEditCancel ?? /* istanbul ignore next */ (() => {})}\n setFocus={true}\n />\n );\n }\n\n return (\n <>\n {CommonPropertyRenderer.createNewDisplayValue(\n props.orientation,\n props.propertyRecord,\n props.indentation,\n props.propertyValueRendererManager,\n props.isExpanded,\n props.onExpansionToggled,\n props.onHeightChanged,\n props.highlight\n )}\n </>\n );\n};\n\nfunction useResetHeightOnEdit(\n orientation: Orientation,\n isEditing?: boolean,\n onHeightChanged?: (newHeight: number) => void\n) {\n const previousEditingStatusRef = React.useRef(isEditing);\n React.useEffect(() => {\n if (!previousEditingStatusRef.current && isEditing) {\n onHeightChanged?.(orientation === Orientation.Vertical ? 48 : 28);\n }\n\n previousEditingStatusRef.current = isEditing;\n });\n}\n"]}
1
+ {"version":3,"file":"FlatPropertyRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,0DAA4D;AAC5D,kDAAgD;AAGhD,sEAAmE;AACnE,iGAA8F;AAG9F,mFAAwF;AAExF,yFAAsF;AACtF,6GAA0G;AAmC1G;;GAEG;AACI,MAAM,oBAAoB,GAAwC,CACvE,KAAK,EACL,EAAE;IACF,MAAM,EACJ,QAAQ,EACR,4BAA4B,EAC5B,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,SAAS,EACT,GAAG,gBAAgB,EACpB,GAAG,KAAK,CAAC;IAEV,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,CACjC,oBAAC,YAAY,IACX,cAAc,EAAE,gBAAgB,CAAC,cAAc,EAC/C,WAAW,EAAE,gBAAgB,CAAC,WAAW,EACzC,WAAW,EAAE,gBAAgB,CAAC,WAAW,EACzC,KAAK,EAAE,gBAAgB,CAAC,KAAK,EAC7B,QAAQ,EAAE,QAAQ,EAClB,4BAA4B,EAAE,4BAA4B,EAC1D,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,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M,wBAAwB,GAAG,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACzD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,wBAAwB,CAAC,OAAO,IAAI,SAAS,EAAE,CAAC;YACnD,eAAe,EAAE,CAAC,WAAW,KAAK,wBAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACpE,CAAC;QAED,wBAAwB,CAAC,OAAO,GAAG,SAAS,CAAC;IAC/C,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { Orientation } from \"@itwin/core-react\";\nimport type { HighlightingComponentProps } from \"../../../common/HighlightingComponentProps\";\nimport type { PropertyUpdatedArgs } from \"../../../editors/EditorContainer\";\nimport { EditorContainer } from \"../../../editors/EditorContainer\";\nimport { CommonPropertyRenderer } from \"../../../properties/renderers/CommonPropertyRenderer\";\nimport type { PrimitiveRendererProps } from \"../../../properties/renderers/PrimitivePropertyRenderer\";\nimport type { SharedRendererProps } from \"../../../properties/renderers/PropertyRenderer\";\nimport { PropertyValueRendererManager } from \"../../../properties/ValueRendererManager\";\nimport type { PropertyCategory } from \"../../PropertyDataProvider\";\nimport { FlatNonPrimitivePropertyRenderer } from \"./FlatNonPrimitivePropertyRenderer\";\nimport { CustomizablePropertyRenderer } from \"../../../properties/renderers/CustomizablePropertyRenderer\";\n\n/** Properties of [[FlatPropertyRenderer]] React component\n * @internal\n */\nexport interface FlatPropertyRendererProps extends SharedRendererProps {\n category?: PropertyCategory;\n /** Custom value renderer */\n propertyValueRendererManager?: PropertyValueRendererManager;\n /** Multiplier of how much the property is indented to the right */\n indentation?: number;\n /** Indicates property is being edited */\n isEditing?: boolean;\n /** Called when property edit is committed. */\n onEditCommit?: (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => void;\n /** Called when property edit is cancelled. */\n onEditCancel?: () => void;\n /** Whether property value is displayed in expanded state. */\n isExpanded: boolean;\n /** Called when toggling between expanded and collapsed property value display state. */\n onExpansionToggled: () => void;\n /** Reports property height changes. */\n onHeightChanged?: (newHeight: number) => void;\n\n highlight?: HighlightingComponentProps & {\n applyOnLabel: boolean;\n applyOnValue: boolean;\n };\n\n children?: never;\n}\n\n/** A React component that renders flat properties\n * @internal\n */\nexport const FlatPropertyRenderer: React.FC<FlatPropertyRendererProps> = (\n props\n) => {\n const {\n category,\n propertyValueRendererManager,\n isEditing,\n onEditCommit,\n onEditCancel,\n onHeightChanged,\n highlight,\n ...passthroughProps\n } = props;\n\n const valueElementRenderer = () => (\n <DisplayValue\n propertyRecord={passthroughProps.propertyRecord}\n orientation={passthroughProps.orientation}\n columnRatio={passthroughProps.columnRatio}\n width={passthroughProps.width}\n category={category}\n propertyValueRendererManager={propertyValueRendererManager}\n isEditing={isEditing}\n onEditCommit={onEditCommit}\n onEditCancel={onEditCancel}\n isExpanded={passthroughProps.isExpanded}\n onExpansionToggled={passthroughProps.onExpansionToggled}\n onHeightChanged={onHeightChanged}\n highlight={highlight}\n indentation={props.indentation}\n />\n );\n\n const primitiveRendererProps: PrimitiveRendererProps = {\n ...passthroughProps,\n valueElementRenderer,\n indentation: props.indentation,\n };\n\n const rendererManager =\n propertyValueRendererManager ?? PropertyValueRendererManager.defaultManager;\n const hasCustomRenderer = rendererManager.hasCustomRenderer(\n passthroughProps.propertyRecord\n );\n\n switch (props.propertyRecord.value.valueFormat) {\n case PropertyValueFormat.Primitive:\n return (\n <CustomizablePropertyRenderer\n highlight={highlight?.applyOnLabel ? highlight : undefined}\n {...primitiveRendererProps}\n />\n );\n\n case PropertyValueFormat.Array:\n // If array is empty or has a custom renderer registered, render it as a customizable property\n if (props.propertyRecord.value.items.length === 0 || hasCustomRenderer)\n return (\n <CustomizablePropertyRenderer\n highlight={highlight?.applyOnLabel ? highlight : undefined}\n {...primitiveRendererProps}\n />\n );\n\n // eslint-disable-next-line no-fallthrough\n case PropertyValueFormat.Struct:\n // If a custom renderer is registered for the struct property, render it as a customizable property\n if (hasCustomRenderer) {\n return (\n <CustomizablePropertyRenderer\n highlight={highlight?.applyOnLabel ? highlight : undefined}\n {...primitiveRendererProps}\n />\n );\n }\n\n return (\n <FlatNonPrimitivePropertyRenderer\n {...primitiveRendererProps}\n isExpanded={props.isExpanded}\n onExpandToggled={props.onExpansionToggled}\n valueElement={undefined}\n valueElementRenderer={undefined}\n />\n );\n }\n};\n\ninterface DisplayValueProps {\n isEditing?: boolean;\n propertyRecord: PropertyRecord;\n\n orientation: Orientation;\n columnRatio?: number;\n /** Pass width to rerender component as property grid width changes */\n width?: number;\n indentation?: number;\n propertyValueRendererManager?: PropertyValueRendererManager;\n isExpanded?: boolean;\n onExpansionToggled?: () => void;\n onHeightChanged?: (newHeight: number) => void;\n\n category?: PropertyCategory;\n onEditCancel?: () => void;\n onEditCommit?: (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => void;\n\n highlight?: HighlightingComponentProps & {\n applyOnLabel: boolean;\n applyOnValue: boolean;\n };\n}\n\nconst DisplayValue: React.FC<DisplayValueProps> = (props) => {\n useResetHeightOnEdit(\n props.orientation,\n props.isEditing,\n props.onHeightChanged\n );\n\n if (props.isEditing) {\n const _onEditCommit = (args: PropertyUpdatedArgs) => {\n if (props.category) props.onEditCommit?.(args, props.category);\n };\n\n return (\n <EditorContainer\n propertyRecord={props.propertyRecord}\n onCommit={_onEditCommit}\n onCancel={props.onEditCancel ?? (() => {})}\n setFocus={true}\n />\n );\n }\n\n return (\n <>\n {CommonPropertyRenderer.createNewDisplayValue(\n props.orientation,\n props.propertyRecord,\n props.indentation,\n props.propertyValueRendererManager,\n props.isExpanded,\n props.onExpansionToggled,\n props.onHeightChanged,\n props.highlight\n )}\n </>\n );\n};\n\nfunction useResetHeightOnEdit(\n orientation: Orientation,\n isEditing?: boolean,\n onHeightChanged?: (newHeight: number) => void\n) {\n const previousEditingStatusRef = React.useRef(isEditing);\n React.useEffect(() => {\n if (!previousEditingStatusRef.current && isEditing) {\n onHeightChanged?.(orientation === Orientation.Vertical ? 48 : 28);\n }\n\n previousEditingStatusRef.current = isEditing;\n });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"InternalToolbarComponent.d.ts","sourceRoot":"","sources":["../../../../src/components-react/toolbar/InternalToolbarComponent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,gBAAgB,CAAC;AAExB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,WAAW,EACX,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAM/B,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAUtE,OAAO,EACL,SAAS,EAET,mBAAmB,EAEpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAInD;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,sBAAsB;IAC/D,oDAAoD;IACpD,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC;kEAC8D;IAC9D,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;GAGG;AACH,eAAO,MAAM,2BAA2B,wBAAsC,CAAC;AAE/E;;;GAGG;AACH,wBAAgB,8BAA8B,YAE7C;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,iBAAiB,CAAC;AAEzE;;GAEG;AACH,wBAAgB,mBAAmB,CAEjC,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AAK,IAAI,CAAC;CACxC;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,gBAAgB;AAChB,wBAAgB,uBAAuB,2BAEtC"}
1
+ {"version":3,"file":"InternalToolbarComponent.d.ts","sourceRoot":"","sources":["../../../../src/components-react/toolbar/InternalToolbarComponent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,gBAAgB,CAAC;AAExB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,WAAW,EACX,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAM/B,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAUtE,OAAO,EACL,SAAS,EAET,mBAAmB,EAEpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAInD;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,sBAAsB;IAC/D,oDAAoD;IACpD,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC;kEAC8D;IAC9D,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;GAGG;AACH,eAAO,MAAM,2BAA2B,wBAAsC,CAAC;AAE/E;;;GAGG;AACH,wBAAgB,8BAA8B,YAE7C;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,iBAAiB,CAAC;AAEzE;;GAEG;AACH,wBAAgB,mBAAmB,CAEjC,IAAI,EAAE,WAAW,GAEhB,IAAI,IAAI,iBAAiB,CAE3B;AAED,gBAAgB;AAChB,eAAO,MAAM,mBAAmB,cACnB,SAAS,KACnB,mBAIF,CAAC;AAEF;;GAEG;AACH,oBAAY,qBAAqB;IAC/B,KAAK,IAAA;IACL,GAAG,IAAA;CACJ;AAED;;GAEG;AACH,o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C,gCAErD;AAiCD;;GAEG;AACH,MAAM,WAAW,6BACf,SAAQ,WAAW,EACjB,eAAe;IACjB,oGAAoG;IACpG,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,gHAAgH;IAChH,cAAc,CAAC,EACX,OAAO,GACP;QACE,mIAAmI;QACnI,iBAAiB,CAAC,EAAE,SAAS,CAAC;KAC/B,CAAC;IACN,uGAAuG;IACvG,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,8FAA8F;IAC9F,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC,mEAAmE;IACnE,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,oFAAoF;IACpF,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAC9C,sDAAsD;IACtD,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,2EAA2E;IAC3E,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;IAC7C,2DAA2D;IAC3D,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;KAAE,KAAK,IAAI,CAAC,CAAC;CAClE;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,qBAqP5E;AA+JD;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,uCAM7B,CAAC;AAEH,gBAAgB;AAChB,wBAAgB,uBAAuB,2BAEtC"}
@@ -133,22 +133,18 @@ exports.ToolbarWithOverflowDirectionContext = React.createContext({
133
133
  useDragInteraction: false,
134
134
  toolbarOpacitySetting: ToolbarOpacitySetting.Proximity,
135
135
  openPopupCount: 0,
136
- onPopupPanelOpenClose: /* istanbul ignore next */ (_isOpening) => { },
136
+ onPopupPanelOpenClose: (_isOpening) => { },
137
137
  overflowDisplayActive: false,
138
- onItemExecuted: /* istanbul ignore next */ (_item) => void {},
139
- onKeyDown: /* istanbul ignore next */ (_e) => void {},
138
+ onItemExecuted: (_item) => void {},
139
+ onKeyDown: (_e) => void {},
140
140
  });
141
141
  /** @internal */
142
142
  function CustomItem({ item, addGroupSeparator, }) {
143
143
  const { useDragInteraction } = useToolbarWithOverflowDirectionContext();
144
144
  const icon = React.useMemo(() => (item.icon &&
145
- core_react_1.IconHelper.getIconReactNode(item.icon, item.internalData)) || (
146
- // istanbul ignore next
147
- React.createElement(core_react_1.Icon, { className: "icon", iconSpec: React.createElement(itwinui_icons_react_1.SvgPlaceholder, null) })), [item.icon, item.internalData]);
145
+ core_react_1.IconHelper.getIconReactNode(item.icon, item.internalData)) || (React.createElement(core_react_1.Icon, { className: "icon", iconSpec: React.createElement(itwinui_icons_react_1.SvgPlaceholder, null) })), [item.icon, item.internalData]);
148
146
  const isDisabled = React.useMemo(() => appui_abstract_1.ConditionalBooleanValue.getValue(item.isDisabled), [item.isDisabled]);
149
- const title = React.useMemo(() =>
150
- /* istanbul ignore next */ appui_abstract_1.ConditionalStringValue.getValue(item.label) ??
151
- item.id, [item.id, item.label]);
147
+ const title = React.useMemo(() => appui_abstract_1.ConditionalStringValue.getValue(item.label) ?? item.id, [item.id, item.label]);
152
148
  return (React.createElement(PopupItem_1.PopupItem, { key: item.id, itemId: item.id, icon: icon, isDisabled: isDisabled, title: title, panel: item.panelContentNode, hideIndicator: useDragInteraction, badge: React.createElement(core_react_1.Badge, { type: item.badgeType }), addGroupSeparator: addGroupSeparator, keepContentsMounted: item.keepContentsLoaded }));
153
149
  }
154
150
  /** @internal */
@@ -156,7 +152,6 @@ function GroupPopupItem({ item, addGroupSeparator, }) {
156
152
  const { useDragInteraction } = useToolbarWithOverflowDirectionContext();
157
153
  const title = appui_abstract_1.ConditionalStringValue.getValue(item.label);
158
154
  const panel = React.useMemo(() => React.createElement(PopupItemsPanel_1.PopupItemsPanel, { groupItem: item, activateOnPointerUp: false }), [item]);
159
- // istanbul ignore next
160
155
  const providerId = "providerId" in item ? item.providerId : undefined;
161
156
  if (useDragInteraction) {
162
157
  return (React.createElement(PopupItemWithDrag_1.PopupItemWithDrag, { key: item.id, itemId: item.id, providerId: providerId, itemPriority: item.itemPriority, groupPriority: item.groupPriority, icon: core_react_1.IconHelper.getIconReactNode(item.icon, item.internalData), isDisabled: appui_abstract_1.ConditionalBooleanValue.getValue(item.isDisabled), title: title, groupItem: item, badge: React.createElement(core_react_1.Badge, { type: item.badgeType }), addGroupSeparator: addGroupSeparator }));
@@ -171,7 +166,6 @@ function ActionItem({ item, addGroupSeparator, }) {
171
166
  item.execute();
172
167
  onItemExecuted(item);
173
168
  }, [item, onItemExecuted]);
174
- // istanbul ignore next
175
169
  const providerId = "providerId" in item ? item.providerId : undefined;
176
170
  return (React.createElement(Item_1.ToolbarButtonItem, { itemId: item.id, providerId: providerId, itemPriority: item.itemPriority, groupPriority: item.groupPriority, key: item.id, isDisabled: appui_abstract_1.ConditionalBooleanValue.getValue(item.isDisabled), title: title, icon: core_react_1.IconHelper.getIconReactNode(item.icon, item.internalData), isActive: item.isActive, onClick: onExecute, badge: React.createElement(core_react_1.Badge, { type: item.badgeType }), addGroupSeparator: addGroupSeparator }));
177
171
  }
@@ -184,12 +178,10 @@ function ToolbarItemComponent({ item, addGroupSeparator, }) {
184
178
  return React.createElement(CustomItem, { item: item, addGroupSeparator: addGroupSeparator });
185
179
  }
186
180
  else {
187
- // istanbul ignore else
188
181
  if (appui_abstract_1.ToolbarItemUtilities.isActionButton(item)) {
189
182
  return React.createElement(ActionItem, { item: item, addGroupSeparator: addGroupSeparator });
190
183
  }
191
184
  }
192
- // istanbul ignore next
193
185
  return null;
194
186
  }
195
187
  exports.ToolbarItemComponent = ToolbarItemComponent;
@@ -202,7 +194,6 @@ function OverflowItemsContainer(p) {
202
194
  return React.createElement(React.Fragment, null, p.children);
203
195
  }
204
196
  function getItemWrapperClass(child) {
205
- // istanbul ignore else
206
197
  if (React.isValidElement(child)) {
207
198
  if (child.props && child.props.addGroupSeparator)
208
199
  return "components-toolbar-button-add-gap-before";
@@ -248,13 +239,11 @@ function InternalToolbarComponent(props) {
248
239
  const handlePopupPanelOpenClose = React.useCallback((isOpening) => {
249
240
  // use setTimeout to avoid warning about setting state in ToolbarWithOverflow from render method of PopupItem/PopupItemWithDrag
250
241
  setTimeout(() => {
251
- // istanbul ignore next
252
242
  if (!isMounted.current)
253
243
  return;
254
244
  setPopupPanelCount((prev) => {
255
- /* istanbul ignore next */
256
245
  const nextCount = isOpening ? prev + 1 : prev - 1;
257
- return nextCount < 0 ? /* istanbul ignore next */ 0 : nextCount;
246
+ return nextCount < 0 ? 0 : nextCount;
258
247
  });
259
248
  });
260
249
  }, []);
@@ -284,7 +273,6 @@ function InternalToolbarComponent(props) {
284
273
  const handleClick = React.useCallback(() => {
285
274
  setIsOverflowPanelOpen((prev) => !prev);
286
275
  }, []);
287
- // istanbul ignore next - NEEDSWORK add complete tests
288
276
  const handleClose = React.useCallback(() => {
289
277
  setIsOverflowPanelOpen(false);
290
278
  }, []);
@@ -360,7 +348,7 @@ function InternalToolbarComponent(props) {
360
348
  onItemExecuted: props.onItemExecuted ? props.onItemExecuted : () => { },
361
349
  onKeyDown: props.onKeyDown
362
350
  ? props.onKeyDown
363
- : /* istanbul ignore next */ (_e) => { },
351
+ : (_e) => { },
364
352
  } }, availableItems.length > 0 && (React.createElement("div", { className: className, ref: ref, style: props.style, onKeyDown: props.onKeyDown, role: "presentation" },
365
353
  React.createElement(Items_1.ToolbarItems, { className: "components-items", direction: direction },
366
354
  props.enableOverflow &&
@@ -386,11 +374,9 @@ exports.InternalToolbarComponent = InternalToolbarComponent;
386
374
  * @internal
387
375
  */
388
376
  function getChildKey(child, index) {
389
- // istanbul ignore else
390
377
  if (React.isValidElement(child) && child.key !== null) {
391
378
  return child.key.toString();
392
379
  }
393
- // istanbul ignore next
394
380
  return index.toString();
395
381
  }
396
382
  /** Returns a subset of toolbar item entry keys that exceed given width and should be overflowItemKeys.
@@ -520,7 +506,6 @@ function useToolItemEntryContext() {
520
506
  exports.useToolItemEntryContext = useToolItemEntryContext;
521
507
  function verifiedMapEntries(map) {
522
508
  for (const [, val] of map) {
523
- // istanbul ignore next during unit testing
524
509
  if (val === undefined)
525
510
  return undefined;
526
511
  }
@@ -529,13 +514,11 @@ function verifiedMapEntries(map) {
529
514
  function eql(prev, value) {
530
515
  if (!prev)
531
516
  return false;
532
- // istanbul ignore next
533
517
  if (prev.length !== value.length)
534
518
  return false;
535
519
  for (let i = 0; i < prev.length; i++) {
536
520
  const p = prev[i];
537
521
  const v = value[i];
538
- // istanbul ignore next
539
522
  if (p !== v)
540
523
  return false;
541
524
  }