@itwin/components-react 4.0.0-dev.2 → 4.0.0-dev.3

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 (234) hide show
  1. package/LICENSE.md +1 -1
  2. package/lib/cjs/components-react/common/UseDebouncedAsyncValue.d.ts +4 -1
  3. package/lib/cjs/components-react/common/UseDebouncedAsyncValue.d.ts.map +1 -1
  4. package/lib/cjs/components-react/common/UseDebouncedAsyncValue.js +4 -1
  5. package/lib/cjs/components-react/common/UseDebouncedAsyncValue.js.map +1 -1
  6. package/lib/cjs/components-react/filter-builder/FilterBuilder.d.ts +22 -25
  7. package/lib/cjs/components-react/filter-builder/FilterBuilder.d.ts.map +1 -1
  8. package/lib/cjs/components-react/filter-builder/FilterBuilder.js +19 -81
  9. package/lib/cjs/components-react/filter-builder/FilterBuilder.js.map +1 -1
  10. package/lib/cjs/components-react/filter-builder/FilterBuilderContext.d.ts +80 -0
  11. package/lib/cjs/components-react/filter-builder/FilterBuilderContext.d.ts.map +1 -0
  12. package/lib/cjs/components-react/filter-builder/FilterBuilderContext.js +83 -0
  13. package/lib/cjs/components-react/filter-builder/FilterBuilderContext.js.map +1 -0
  14. package/lib/cjs/components-react/filter-builder/FilterBuilderRule.d.ts +14 -3
  15. package/lib/cjs/components-react/filter-builder/FilterBuilderRule.d.ts.map +1 -1
  16. package/lib/cjs/components-react/filter-builder/FilterBuilderRule.js +22 -12
  17. package/lib/cjs/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
  18. package/lib/cjs/components-react/filter-builder/FilterBuilderRule.scss +4 -0
  19. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.d.ts +25 -16
  20. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.d.ts.map +1 -1
  21. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.js +22 -14
  22. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.js.map +1 -1
  23. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.d.ts +14 -2
  24. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.d.ts.map +1 -1
  25. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js +11 -5
  26. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
  27. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.d.ts +16 -2
  28. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.d.ts.map +1 -1
  29. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js +11 -5
  30. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
  31. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.d.ts +14 -2
  32. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.d.ts.map +1 -1
  33. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js +11 -5
  34. package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
  35. package/lib/cjs/components-react/filter-builder/FilterBuilderState.d.ts +50 -7
  36. package/lib/cjs/components-react/filter-builder/FilterBuilderState.d.ts.map +1 -1
  37. package/lib/cjs/components-react/filter-builder/FilterBuilderState.js +60 -8
  38. package/lib/cjs/components-react/filter-builder/FilterBuilderState.js.map +1 -1
  39. package/lib/cjs/components-react/filter-builder/Operators.d.ts +23 -5
  40. package/lib/cjs/components-react/filter-builder/Operators.d.ts.map +1 -1
  41. package/lib/cjs/components-react/filter-builder/Operators.js +25 -7
  42. package/lib/cjs/components-react/filter-builder/Operators.js.map +1 -1
  43. package/lib/cjs/components-react/filter-builder/Types.d.ts +24 -4
  44. package/lib/cjs/components-react/filter-builder/Types.d.ts.map +1 -1
  45. package/lib/cjs/components-react/filter-builder/Types.js +11 -1
  46. package/lib/cjs/components-react/filter-builder/Types.js.map +1 -1
  47. package/lib/cjs/components-react/properties/LinkHandler.d.ts +2 -2
  48. package/lib/cjs/components-react/properties/LinkHandler.js +1 -1
  49. package/lib/cjs/components-react/properties/LinkHandler.js.map +1 -1
  50. package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.d.ts +3 -3
  51. package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.js +1 -1
  52. package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
  53. package/lib/cjs/components-react/propertygrid/PropertyDataProvider.d.ts +2 -2
  54. package/lib/cjs/components-react/propertygrid/PropertyDataProvider.js.map +1 -1
  55. package/lib/cjs/components-react/propertygrid/component/PropertyGrid.d.ts +2 -0
  56. package/lib/cjs/components-react/propertygrid/component/PropertyGrid.d.ts.map +1 -1
  57. package/lib/cjs/components-react/propertygrid/component/PropertyGrid.js +1 -0
  58. package/lib/cjs/components-react/propertygrid/component/PropertyGrid.js.map +1 -1
  59. package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.d.ts +5 -10
  60. package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.d.ts.map +1 -1
  61. package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
  62. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts +3 -3
  63. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.js +1 -1
  64. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
  65. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.scss +11 -0
  66. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.d.ts +2 -2
  67. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js +1 -1
  68. package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js.map +1 -1
  69. package/lib/cjs/components-react/propertygrid/internal/PropertyGridEventHandler.d.ts +2 -2
  70. package/lib/cjs/components-react/propertygrid/internal/PropertyGridEventHandler.js +1 -1
  71. package/lib/cjs/components-react/propertygrid/internal/PropertyGridEventHandler.js.map +1 -1
  72. package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.d.ts +3 -3
  73. package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.js +3 -3
  74. package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.js.map +1 -1
  75. package/lib/cjs/components-react/propertygrid/internal/PropertyGridModel.d.ts +3 -3
  76. package/lib/cjs/components-react/propertygrid/internal/PropertyGridModel.js +1 -1
  77. package/lib/cjs/components-react/propertygrid/internal/PropertyGridModel.js.map +1 -1
  78. package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelChangeEvent.d.ts +2 -2
  79. package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js +1 -1
  80. package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js.map +1 -1
  81. package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.d.ts +2 -2
  82. package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.d.ts.map +1 -1
  83. package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.js +1 -1
  84. package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.js.map +1 -1
  85. package/lib/cjs/components-react/propertygrid/internal/flat-items/FlatGridItem.d.ts +4 -4
  86. package/lib/cjs/components-react/propertygrid/internal/flat-items/FlatGridItem.js.map +1 -1
  87. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.d.ts +1 -1
  88. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.js +1 -1
  89. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.js.map +1 -1
  90. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.d.ts +1 -1
  91. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.js +1 -1
  92. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.js.map +1 -1
  93. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.d.ts +1 -1
  94. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.js +1 -1
  95. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.js.map +1 -1
  96. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.d.ts +8 -8
  97. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js +3 -3
  98. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
  99. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.d.ts +2 -2
  100. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.js +1 -1
  101. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.js.map +1 -1
  102. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.d.ts +2 -2
  103. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js +1 -1
  104. package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js.map +1 -1
  105. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts +3 -6
  106. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts.map +1 -1
  107. package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
  108. package/lib/cjs/components-react/tree/controlled/component/ControlledTree.d.ts +1 -4
  109. package/lib/cjs/components-react/tree/controlled/component/ControlledTree.d.ts.map +1 -1
  110. package/lib/cjs/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
  111. package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.d.ts +2 -5
  112. package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.d.ts.map +1 -1
  113. package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
  114. package/lib/cjs/components-react.d.ts +4 -6
  115. package/lib/cjs/components-react.d.ts.map +1 -1
  116. package/lib/cjs/components-react.js +4 -6
  117. package/lib/cjs/components-react.js.map +1 -1
  118. package/lib/esm/components-react/common/UseDebouncedAsyncValue.d.ts +4 -1
  119. package/lib/esm/components-react/common/UseDebouncedAsyncValue.d.ts.map +1 -1
  120. package/lib/esm/components-react/common/UseDebouncedAsyncValue.js +4 -1
  121. package/lib/esm/components-react/common/UseDebouncedAsyncValue.js.map +1 -1
  122. package/lib/esm/components-react/filter-builder/FilterBuilder.d.ts +22 -25
  123. package/lib/esm/components-react/filter-builder/FilterBuilder.d.ts.map +1 -1
  124. package/lib/esm/components-react/filter-builder/FilterBuilder.js +12 -73
  125. package/lib/esm/components-react/filter-builder/FilterBuilder.js.map +1 -1
  126. package/lib/esm/components-react/filter-builder/FilterBuilderContext.d.ts +80 -0
  127. package/lib/esm/components-react/filter-builder/FilterBuilderContext.d.ts.map +1 -0
  128. package/lib/esm/components-react/filter-builder/FilterBuilderContext.js +60 -0
  129. package/lib/esm/components-react/filter-builder/FilterBuilderContext.js.map +1 -0
  130. package/lib/esm/components-react/filter-builder/FilterBuilderRule.d.ts +14 -3
  131. package/lib/esm/components-react/filter-builder/FilterBuilderRule.d.ts.map +1 -1
  132. package/lib/esm/components-react/filter-builder/FilterBuilderRule.js +17 -7
  133. package/lib/esm/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
  134. package/lib/esm/components-react/filter-builder/FilterBuilderRule.scss +4 -0
  135. package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.d.ts +25 -16
  136. package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.d.ts.map +1 -1
  137. package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.js +15 -7
  138. package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.js.map +1 -1
  139. package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.d.ts +14 -2
  140. package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.d.ts.map +1 -1
  141. package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js +7 -1
  142. package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
  143. package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.d.ts +16 -2
  144. package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.d.ts.map +1 -1
  145. package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js +7 -1
  146. package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
  147. package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.d.ts +14 -2
  148. package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.d.ts.map +1 -1
  149. package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js +7 -1
  150. package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
  151. package/lib/esm/components-react/filter-builder/FilterBuilderState.d.ts +50 -7
  152. package/lib/esm/components-react/filter-builder/FilterBuilderState.d.ts.map +1 -1
  153. package/lib/esm/components-react/filter-builder/FilterBuilderState.js +54 -3
  154. package/lib/esm/components-react/filter-builder/FilterBuilderState.js.map +1 -1
  155. package/lib/esm/components-react/filter-builder/Operators.d.ts +23 -5
  156. package/lib/esm/components-react/filter-builder/Operators.d.ts.map +1 -1
  157. package/lib/esm/components-react/filter-builder/Operators.js +23 -5
  158. package/lib/esm/components-react/filter-builder/Operators.js.map +1 -1
  159. package/lib/esm/components-react/filter-builder/Types.d.ts +24 -4
  160. package/lib/esm/components-react/filter-builder/Types.d.ts.map +1 -1
  161. package/lib/esm/components-react/filter-builder/Types.js +11 -1
  162. package/lib/esm/components-react/filter-builder/Types.js.map +1 -1
  163. package/lib/esm/components-react/properties/LinkHandler.d.ts +2 -2
  164. package/lib/esm/components-react/properties/LinkHandler.js +1 -1
  165. package/lib/esm/components-react/properties/LinkHandler.js.map +1 -1
  166. package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.d.ts +3 -3
  167. package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.js +1 -1
  168. package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
  169. package/lib/esm/components-react/propertygrid/PropertyDataProvider.d.ts +2 -2
  170. package/lib/esm/components-react/propertygrid/PropertyDataProvider.js.map +1 -1
  171. package/lib/esm/components-react/propertygrid/component/PropertyGrid.d.ts +2 -0
  172. package/lib/esm/components-react/propertygrid/component/PropertyGrid.d.ts.map +1 -1
  173. package/lib/esm/components-react/propertygrid/component/PropertyGrid.js +1 -0
  174. package/lib/esm/components-react/propertygrid/component/PropertyGrid.js.map +1 -1
  175. package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.d.ts +5 -10
  176. package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.d.ts.map +1 -1
  177. package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
  178. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts +3 -3
  179. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.js +1 -1
  180. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
  181. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.scss +11 -0
  182. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.d.ts +2 -2
  183. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js +1 -1
  184. package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js.map +1 -1
  185. package/lib/esm/components-react/propertygrid/internal/PropertyGridEventHandler.d.ts +2 -2
  186. package/lib/esm/components-react/propertygrid/internal/PropertyGridEventHandler.js +1 -1
  187. package/lib/esm/components-react/propertygrid/internal/PropertyGridEventHandler.js.map +1 -1
  188. package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.d.ts +3 -3
  189. package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.js +3 -3
  190. package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.js.map +1 -1
  191. package/lib/esm/components-react/propertygrid/internal/PropertyGridModel.d.ts +3 -3
  192. package/lib/esm/components-react/propertygrid/internal/PropertyGridModel.js +1 -1
  193. package/lib/esm/components-react/propertygrid/internal/PropertyGridModel.js.map +1 -1
  194. package/lib/esm/components-react/propertygrid/internal/PropertyGridModelChangeEvent.d.ts +2 -2
  195. package/lib/esm/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js +1 -1
  196. package/lib/esm/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js.map +1 -1
  197. package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.d.ts +2 -2
  198. package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.d.ts.map +1 -1
  199. package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.js +1 -1
  200. package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.js.map +1 -1
  201. package/lib/esm/components-react/propertygrid/internal/flat-items/FlatGridItem.d.ts +4 -4
  202. package/lib/esm/components-react/propertygrid/internal/flat-items/FlatGridItem.js.map +1 -1
  203. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.d.ts +1 -1
  204. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.js +1 -1
  205. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.js.map +1 -1
  206. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.d.ts +1 -1
  207. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.js +1 -1
  208. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.js.map +1 -1
  209. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.d.ts +1 -1
  210. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.js +1 -1
  211. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.js.map +1 -1
  212. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.d.ts +8 -8
  213. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js +3 -3
  214. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
  215. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.d.ts +2 -2
  216. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.js +1 -1
  217. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.js.map +1 -1
  218. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.d.ts +2 -2
  219. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js +1 -1
  220. package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js.map +1 -1
  221. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts +3 -6
  222. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts.map +1 -1
  223. package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
  224. package/lib/esm/components-react/tree/controlled/component/ControlledTree.d.ts +1 -4
  225. package/lib/esm/components-react/tree/controlled/component/ControlledTree.d.ts.map +1 -1
  226. package/lib/esm/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
  227. package/lib/esm/components-react/tree/controlled/component/TreeRenderer.d.ts +2 -5
  228. package/lib/esm/components-react/tree/controlled/component/TreeRenderer.d.ts.map +1 -1
  229. package/lib/esm/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
  230. package/lib/esm/components-react.d.ts +4 -6
  231. package/lib/esm/components-react.d.ts.map +1 -1
  232. package/lib/esm/components-react.js +4 -6
  233. package/lib/esm/components-react.js.map +1 -1
  234. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file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AAC,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QACvE,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,sBAAsB;YAC1D,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAEhD,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;QACvB,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;IACnC,CAAC;IAED;;;OAGG;IACI,WAAW,CAAC,QAAoD;QACrE,IAAI,CAAC,IAAI,CAAC,MAAM;YACd,OAAO;QAET,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC7C,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;IACnC,CAAC;IAED,mCAAmC;IAC5B,QAAQ;QACb,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport { produce } from \"immer\";\nimport { PropertyData } from \"../PropertyDataProvider\";\nimport { IMutableFlatGridItem } from \"./flat-items/MutableFlatGridItem\";\nimport { IMutableGridItemFactory } from \"./flat-items/MutableGridItemFactory\";\nimport { IMutablePropertyGridModel, IPropertyGridModel, MutablePropertyGridModel } from \"./PropertyGridModel\";\nimport { PropertyGridModelChangeEvent } from \"./PropertyGridModelChangeEvent\";\n\n/** @beta */\nexport interface IPropertyGridModelSource {\n onModelChanged: PropertyGridModelChangeEvent;\n setPropertyData: (data: PropertyData) => void;\n modifyModel(callback: (model: IMutablePropertyGridModel) => void): void;\n getModel(): IPropertyGridModel | undefined;\n}\n\n/**\n * Controls property grid model.\n * It is used to modify property grid model model and inform when the model changes.\n * @beta\n */\nexport class PropertyGridModelSource implements IPropertyGridModelSource {\n private _model?: IMutablePropertyGridModel;\n /** Event that is emitted every time property model is changed. */\n public onModelChanged = new PropertyGridModelChangeEvent();\n\n public constructor(private _gridFactory: IMutableGridItemFactory) {\n }\n\n private getFullModelMap(fullModel: IMutableFlatGridItem[]): Map<string, IMutableFlatGridItem> {\n const fullModelMap = new Map<string, IMutableFlatGridItem>();\n for (const item of fullModel) {\n const key = item.selectionKey;\n fullModelMap.set(key, item);\n }\n\n return fullModelMap;\n }\n\n private moveOldModelState(oldModel: IMutablePropertyGridModel, newModel: IMutablePropertyGridModel) {\n const oldModelMap = this.getFullModelMap(oldModel.getFlatGrid());\n const flatGrid = newModel.getFlatGrid();\n\n flatGrid.forEach((gridItem) => {\n const oldGridItem = oldModelMap.get(gridItem.selectionKey);\n // istanbul ignore else\n if (oldGridItem)\n gridItem.isExpanded = oldGridItem.isExpanded;\n });\n }\n\n public setPropertyData(data: PropertyData) {\n const newModel = new MutablePropertyGridModel(data, this._gridFactory);\n if (this._model !== undefined && data.reusePropertyDataState)\n this.moveOldModelState(this._model, newModel);\n\n this._model = newModel;\n this.onModelChanged.raiseEvent();\n }\n\n /**\n * Modifies property grid model using provided callback.\n * If changes to model are detected, onModelChanged emits an event to all subscribers.\n */\n public modifyModel(callback: (model: IMutablePropertyGridModel) => void): void {\n if (!this._model)\n return;\n\n this._model = produce(this._model, callback);\n this.onModelChanged.raiseEvent();\n }\n\n /** Returns property grid model. */\n public getModel(): IPropertyGridModel | undefined {\n return this._model;\n }\n}\n"]}
1
+ {"version":3,"file":"PropertyGridModelSource.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/internal/PropertyGridModelSource.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,EAAiD,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC9G,OAAO,EAAE,4BAA4B,E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C,cAAc,CAAC,UAAU,EAAE,CAAC;IACnC,CAAC;IAED;;;OAGG;IACI,WAAW,CAAC,QAAoD;QACrE,IAAI,CAAC,IAAI,CAAC,MAAM;YACd,OAAO;QAET,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC7C,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;IACnC,CAAC;IAED,mCAAmC;IAC5B,QAAQ;QACb,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport { produce } from \"immer\";\nimport { PropertyData } from \"../PropertyDataProvider\";\nimport { IMutableFlatGridItem } from \"./flat-items/MutableFlatGridItem\";\nimport { IMutableGridItemFactory } from \"./flat-items/MutableGridItemFactory\";\nimport { IMutablePropertyGridModel, IPropertyGridModel, MutablePropertyGridModel } from \"./PropertyGridModel\";\nimport { PropertyGridModelChangeEvent } from \"./PropertyGridModelChangeEvent\";\n\n/** @public */\nexport interface IPropertyGridModelSource {\n onModelChanged: PropertyGridModelChangeEvent;\n setPropertyData: (data: PropertyData) => void;\n modifyModel(callback: (model: IMutablePropertyGridModel) => void): void;\n getModel(): IPropertyGridModel | undefined;\n}\n\n/**\n * Controls property grid model.\n * It is used to modify property grid model model and inform when the model changes.\n * @public\n */\nexport class PropertyGridModelSource implements IPropertyGridModelSource {\n private _model?: IMutablePropertyGridModel;\n /** Event that is emitted every time property model is changed. */\n public onModelChanged = new PropertyGridModelChangeEvent();\n\n public constructor(private _gridFactory: IMutableGridItemFactory) {\n }\n\n private getFullModelMap(fullModel: IMutableFlatGridItem[]): Map<string, IMutableFlatGridItem> {\n const fullModelMap = new Map<string, IMutableFlatGridItem>();\n for (const item of fullModel) {\n const key = item.selectionKey;\n fullModelMap.set(key, item);\n }\n\n return fullModelMap;\n }\n\n private moveOldModelState(oldModel: IMutablePropertyGridModel, newModel: IMutablePropertyGridModel) {\n const oldModelMap = this.getFullModelMap(oldModel.getFlatGrid());\n const flatGrid = newModel.getFlatGrid();\n\n flatGrid.forEach((gridItem) => {\n const oldGridItem = oldModelMap.get(gridItem.selectionKey);\n // istanbul ignore else\n if (oldGridItem)\n gridItem.isExpanded = oldGridItem.isExpanded;\n });\n }\n\n public setPropertyData(data: PropertyData) {\n const newModel = new MutablePropertyGridModel(data, this._gridFactory);\n if (this._model !== undefined && data.reusePropertyDataState)\n this.moveOldModelState(this._model, newModel);\n\n this._model = newModel;\n this.onModelChanged.raiseEvent();\n }\n\n /**\n * Modifies property grid model using provided callback.\n * If changes to model are detected, onModelChanged emits an event to all subscribers.\n */\n public modifyModel(callback: (model: IMutablePropertyGridModel) => void): void {\n if (!this._model)\n return;\n\n this._model = produce(this._model, callback);\n this.onModelChanged.raiseEvent();\n }\n\n /** Returns property grid model. */\n public getModel(): IPropertyGridModel | undefined {\n return this._model;\n }\n}\n"]}
@@ -6,7 +6,7 @@ import { PropertyRecord } from "@itwin/appui-abstract";
6
6
  import { PropertyCategory } from "../../PropertyDataProvider";
7
7
  /**
8
8
  * Base immutable data structure defining common methods and properties for categories and categorized properties
9
- * @beta
9
+ * @public
10
10
  */
11
11
  export interface FlatGridItemBase {
12
12
  readonly isExpanded: boolean;
@@ -26,7 +26,7 @@ export interface FlatGridItemBase {
26
26
  }
27
27
  /**
28
28
  * Data structure which describes methods and properties present on immutable [[GridCategoryItem]]
29
- * @beta
29
+ * @public
30
30
  */
31
31
  export interface GridCategoryItem extends FlatGridItemBase {
32
32
  readonly type: FlatGridItemType.Category;
@@ -35,7 +35,7 @@ export interface GridCategoryItem extends FlatGridItemBase {
35
35
  }
36
36
  /**
37
37
  * Data structure which describes methods and properties present on immutable [[CategorizedPropertyItem]] objects
38
- * @beta
38
+ * @public
39
39
  */
40
40
  export interface CategorizedPropertyItem extends FlatGridItemBase {
41
41
  readonly type: CategorizedPropertyTypes;
@@ -46,7 +46,7 @@ export interface CategorizedPropertyItem extends FlatGridItemBase {
46
46
  }
47
47
  /**
48
48
  * Type which describes immutable [[GridCategoryItem]] or [[CategorizedPropertyItem]]
49
- * @beta
49
+ * @public
50
50
  */
51
51
  export declare type FlatGridItem = CategorizedPropertyItem | GridCategoryItem;
52
52
  //# sourceMappingURL=FlatGridItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FlatGridItem.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/FlatGridItem.ts"],"names":[],"mappings":"AAAA;;;+FAG+F","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport { CategorizedPropertyTypes, FlatGridItemType } from \"./MutableFlatGridItem\";\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\n\n/**\n * Base immutable data structure defining common methods and properties for categories and categorized properties\n * @beta\n */\nexport interface FlatGridItemBase {\n readonly isExpanded: boolean;\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 readonly type: FlatGridItemType;\n readonly lastInNumberOfCategories: number;\n readonly isLastInRootCategory: boolean;\n getDescendantsAndSelf(): FlatGridItem[];\n getVisibleDescendantsAndSelf(): FlatGridItem[];\n getChildren(): FlatGridItem[];\n getLastVisibleDescendantOrSelf(): FlatGridItem;\n}\n\n/**\n * Data structure which describes methods and properties present on immutable [[GridCategoryItem]]\n * @beta\n */\nexport interface GridCategoryItem extends FlatGridItemBase {\n readonly type: FlatGridItemType.Category;\n readonly name: string;\n readonly derivedCategory: PropertyCategory;\n}\n\n/**\n * Data structure which describes methods and properties present on immutable [[CategorizedPropertyItem]] objects\n * @beta\n */\nexport interface CategorizedPropertyItem extends FlatGridItemBase {\n readonly type: CategorizedPropertyTypes;\n readonly derivedRecord: PropertyRecord;\n readonly parentCategorySelectionKey: string;\n readonly parentSelectionKey: string;\n\n getChildren(): CategorizedPropertyItem[];\n}\n\n/**\n * Type which describes immutable [[GridCategoryItem]] or [[CategorizedPropertyItem]]\n * @beta\n */\nexport type FlatGridItem = CategorizedPropertyItem | GridCategoryItem;\n"]}
1
+ {"version":3,"file":"FlatGridItem.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/FlatGridItem.ts"],"names":[],"mappings":"AAAA;;;+FAG+F","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport { CategorizedPropertyTypes, FlatGridItemType } from \"./MutableFlatGridItem\";\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\n\n/**\n * Base immutable data structure defining common methods and properties for categories and categorized properties\n * @public\n */\nexport interface FlatGridItemBase {\n readonly isExpanded: boolean;\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 readonly type: FlatGridItemType;\n readonly lastInNumberOfCategories: number;\n readonly isLastInRootCategory: boolean;\n getDescendantsAndSelf(): FlatGridItem[];\n getVisibleDescendantsAndSelf(): FlatGridItem[];\n getChildren(): FlatGridItem[];\n getLastVisibleDescendantOrSelf(): FlatGridItem;\n}\n\n/**\n * Data structure which describes methods and properties present on immutable [[GridCategoryItem]]\n * @public\n */\nexport interface GridCategoryItem extends FlatGridItemBase {\n readonly type: FlatGridItemType.Category;\n readonly name: string;\n readonly derivedCategory: PropertyCategory;\n}\n\n/**\n * Data structure which describes methods and properties present on immutable [[CategorizedPropertyItem]] objects\n * @public\n */\nexport interface CategorizedPropertyItem extends FlatGridItemBase {\n readonly type: CategorizedPropertyTypes;\n readonly derivedRecord: PropertyRecord;\n readonly parentCategorySelectionKey: string;\n readonly parentSelectionKey: string;\n\n getChildren(): CategorizedPropertyItem[];\n}\n\n/**\n * Type which describes immutable [[GridCategoryItem]] or [[CategorizedPropertyItem]]\n * @public\n */\nexport type FlatGridItem = CategorizedPropertyItem | GridCategoryItem;\n"]}
@@ -6,7 +6,7 @@ import { FlatGridItemType, IMutableCategorizedPropertyItem, IMutableFlatGridItem
6
6
  import { IMutableGridItemFactory } from "./MutableGridItemFactory";
7
7
  /**
8
8
  * Mutable wrapper object for PropertyRecord with array valueFormat which provides methods for working with and managing record children hierarchies.
9
- * @beta
9
+ * @public
10
10
  */
11
11
  export declare class MutableCategorizedArrayProperty extends MutableCategorizedProperty implements IMutableCategorizedPropertyItem {
12
12
  private _renderLabel;
@@ -5,7 +5,7 @@
5
5
  import { FlatGridItemType, MutableCategorizedProperty } from "./MutableFlatGridItem";
6
6
  /**
7
7
  * Mutable wrapper object for PropertyRecord with array valueFormat which provides methods for working with and managing record children hierarchies.
8
- * @beta
8
+ * @public
9
9
  */
10
10
  export class MutableCategorizedArrayProperty extends MutableCategorizedProperty {
11
11
  constructor(record, parentSelectionKey, parentCategorySelectionKey, depth, gridItemFactory, overrideName, overrideDisplayLabel) {
@@ -1 +1 @@
1
- {"version":3,"file":"MutableCategorizedArrayProperty.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAM/F,OAAO,EAAE,gBAAgB,EAAyD,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAG5I;;;GAGG;AACH,MAAM,OAAO,+BAAgC,SAAQ,0BAA0B;IA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,YAAY,EAAE;YACzC,wFAAwF;YACxF,qCAAqC;YACrC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,4BAA4B,EAAE,CAAC,CAAC,CAAC;SAClG;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IAEe,4BAA4B;QAC1C,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,4BAA4B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC;IACjG,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { FlatGridItemType, IMutableCategorizedPropertyItem, IMutableFlatGridItem, MutableCategorizedProperty } from \"./MutableFlatGridItem\";\nimport { IMutableGridItemFactory } from \"./MutableGridItemFactory\";\n\n/**\n * Mutable wrapper object for PropertyRecord with array valueFormat which provides methods for working with and managing record children hierarchies.\n * @beta\n */\nexport class MutableCategorizedArrayProperty extends MutableCategorizedProperty implements IMutableCategorizedPropertyItem {\n private _renderLabel: boolean;\n private _children: IMutableCategorizedPropertyItem[];\n\n public constructor(\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n gridItemFactory: IMutableGridItemFactory,\n overrideName?: string,\n overrideDisplayLabel?: string,\n ) {\n super(FlatGridItemType.Array, record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\n this._renderLabel = !record.property.hideCompositePropertyLabel;\n const childrenDepth = depth + (this._renderLabel ? 1 : 0);\n this._children = record.getChildrenRecords().map((child, index) => {\n const newName = `${child.property.name}_${index}`;\n const newDisplayLabel = `[${index + 1}]`;\n return gridItemFactory.createCategorizedProperty(child, this.selectionKey, parentCategorySelectionKey, childrenDepth, newName, newDisplayLabel);\n });\n }\n\n public get type(): FlatGridItemType.Array {\n return FlatGridItemType.Array;\n }\n\n public getChildren(): IMutableCategorizedPropertyItem[] {\n return this._children;\n }\n\n public override getDescendantsAndSelf() {\n return this._renderLabel ? super.getDescendantsAndSelf() : this.getDescendants();\n }\n\n public override getVisibleDescendants(): IMutableFlatGridItem[] {\n const descendants: IMutableFlatGridItem[] = [];\n if (this.isExpanded || !this._renderLabel) {\n // always render children if not rendering the label, otherwise there's no way to expand\n // this item to make children visible\n this.getChildren().forEach((child) => descendants.push(...child.getVisibleDescendantsAndSelf()));\n }\n return descendants;\n }\n\n public override getVisibleDescendantsAndSelf() {\n return this._renderLabel ? super.getVisibleDescendantsAndSelf() : this.getVisibleDescendants();\n }\n}\n"]}
1
+ {"version":3,"file":"MutableCategorizedArrayProperty.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAM/F,OAAO,EAAE,gBAAgB,EAAyD,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAG5I;;;GAGG;AACH,MAAM,OAAO,+BAAgC,SAAQ,0BAA0B;IAI7E,YACE,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,eAAwC,EACxC,YAAqB,EACrB,oBAA6B;QAE7B,KAAK,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;QACjI,IAAI,CAAC,YAAY,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,0BAA0B,CAAC;QAChE,MAAM,aAAa,GAAG,KAAK,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,C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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\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { FlatGridItemType, IMutableCategorizedPropertyItem, IMutableFlatGridItem, MutableCategorizedProperty } from \"./MutableFlatGridItem\";\nimport { IMutableGridItemFactory } from \"./MutableGridItemFactory\";\n\n/**\n * Mutable wrapper object for PropertyRecord with array valueFormat which provides methods for working with and managing record children hierarchies.\n * @public\n */\nexport class MutableCategorizedArrayProperty extends MutableCategorizedProperty implements IMutableCategorizedPropertyItem {\n private _renderLabel: boolean;\n private _children: IMutableCategorizedPropertyItem[];\n\n public constructor(\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n gridItemFactory: IMutableGridItemFactory,\n overrideName?: string,\n overrideDisplayLabel?: string,\n ) {\n super(FlatGridItemType.Array, record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\n this._renderLabel = !record.property.hideCompositePropertyLabel;\n const childrenDepth = depth + (this._renderLabel ? 1 : 0);\n this._children = record.getChildrenRecords().map((child, index) => {\n const newName = `${child.property.name}_${index}`;\n const newDisplayLabel = `[${index + 1}]`;\n return gridItemFactory.createCategorizedProperty(child, this.selectionKey, parentCategorySelectionKey, childrenDepth, newName, newDisplayLabel);\n });\n }\n\n public get type(): FlatGridItemType.Array {\n return FlatGridItemType.Array;\n }\n\n public getChildren(): IMutableCategorizedPropertyItem[] {\n return this._children;\n }\n\n public override getDescendantsAndSelf() {\n return this._renderLabel ? super.getDescendantsAndSelf() : this.getDescendants();\n }\n\n public override getVisibleDescendants(): IMutableFlatGridItem[] {\n const descendants: IMutableFlatGridItem[] = [];\n if (this.isExpanded || !this._renderLabel) {\n // always render children if not rendering the label, otherwise there's no way to expand\n // this item to make children visible\n this.getChildren().forEach((child) => descendants.push(...child.getVisibleDescendantsAndSelf()));\n }\n return descendants;\n }\n\n public override getVisibleDescendantsAndSelf() {\n return this._renderLabel ? super.getVisibleDescendantsAndSelf() : this.getVisibleDescendants();\n }\n}\n"]}
@@ -5,7 +5,7 @@ import { PropertyRecord } from "@itwin/appui-abstract";
5
5
  import { FlatGridItemType, IMutableCategorizedPropertyItem, MutableCategorizedProperty } from "./MutableFlatGridItem";
6
6
  /**
7
7
  * Mutable wrapper object for PropertyRecord with primitive valueFormat.
8
- * @beta
8
+ * @public
9
9
  */
10
10
  export declare class MutableCategorizedPrimitiveProperty extends MutableCategorizedProperty implements IMutableCategorizedPropertyItem {
11
11
  constructor(record: PropertyRecord, parentSelectionKey: string, parentCategorySelectionKey: string, depth: number, overrideName?: string, overrideDisplayLabel?: string);
@@ -5,7 +5,7 @@
5
5
  import { FlatGridItemType, MutableCategorizedProperty } from "./MutableFlatGridItem";
6
6
  /**
7
7
  * Mutable wrapper object for PropertyRecord with primitive valueFormat.
8
- * @beta
8
+ * @public
9
9
  */
10
10
  export class MutableCategorizedPrimitiveProperty extends MutableCategorizedProperty {
11
11
  constructor(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel) {
@@ -1 +1 @@
1
- {"version":3,"file":"MutableCategorizedPrimitiveProperty.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAM/F,OAAO,EAAE,gBAAgB,EAAmC,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEtH;;;GAGG;AACH,MAAM,OAAO,mCAAoC,SAAQ,0BAA0B;IACjF,YACE,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,KAAK,CAAC,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;IACvI,CAAC;IAED,IAAW,IAAI;QACb,OAAO,gBAAgB,CAAC,SAAS,CAAC;IACpC,CAAC;IAEM,WAAW;QAChB,OAAO,EAAE,CAAC;IACZ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { FlatGridItemType, IMutableCategorizedPropertyItem, MutableCategorizedProperty } from \"./MutableFlatGridItem\";\n\n/**\n * Mutable wrapper object for PropertyRecord with primitive valueFormat.\n * @beta\n */\nexport class MutableCategorizedPrimitiveProperty extends MutableCategorizedProperty implements IMutableCategorizedPropertyItem {\n public constructor(\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string,\n ) {\n super(FlatGridItemType.Primitive, record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\n }\n\n public get type(): FlatGridItemType.Primitive {\n return FlatGridItemType.Primitive;\n }\n\n public getChildren(): IMutableCategorizedPropertyItem[] {\n return [];\n }\n}\n"]}
1
+ {"version":3,"file":"MutableCategorizedPrimitiveProperty.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAM/F,OAAO,EAAE,gBAAgB,EAAmC,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEtH;;;GAGG;AACH,MAAM,OAAO,mCAAoC,SAAQ,0BAA0B;IACjF,YACE,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,KAAK,CAAC,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;IACvI,CAAC;IAED,IAAW,IAAI;QACb,OAAO,gBAAgB,CAAC,SAAS,CAAC;IACpC,CAAC;IAEM,WAAW;QAChB,OAAO,EAAE,CAAC;IACZ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { FlatGridItemType, IMutableCategorizedPropertyItem, MutableCategorizedProperty } from \"./MutableFlatGridItem\";\n\n/**\n * Mutable wrapper object for PropertyRecord with primitive valueFormat.\n * @public\n */\nexport class MutableCategorizedPrimitiveProperty extends MutableCategorizedProperty implements IMutableCategorizedPropertyItem {\n public constructor(\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n overrideName?: string,\n overrideDisplayLabel?: string,\n ) {\n super(FlatGridItemType.Primitive, record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\n }\n\n public get type(): FlatGridItemType.Primitive {\n return FlatGridItemType.Primitive;\n }\n\n public getChildren(): IMutableCategorizedPropertyItem[] {\n return [];\n }\n}\n"]}
@@ -6,7 +6,7 @@ import { FlatGridItemType, IMutableCategorizedPropertyItem, IMutableFlatGridItem
6
6
  import { IMutableGridItemFactory } from "./MutableGridItemFactory";
7
7
  /**
8
8
  * Mutable wrapper object for PropertyRecord with struct valueFormat which provides methods for working with and managing record children hierarchies.
9
- * @beta
9
+ * @public
10
10
  */
11
11
  export declare class MutableCategorizedStructProperty extends MutableCategorizedProperty implements IMutableCategorizedPropertyItem {
12
12
  private _renderLabel;
@@ -5,7 +5,7 @@
5
5
  import { FlatGridItemType, MutableCategorizedProperty } from "./MutableFlatGridItem";
6
6
  /**
7
7
  * Mutable wrapper object for PropertyRecord with struct valueFormat which provides methods for working with and managing record children hierarchies.
8
- * @beta
8
+ * @public
9
9
  */
10
10
  export class MutableCategorizedStructProperty extends MutableCategorizedProperty {
11
11
  constructor(record, parentSelectionKey, parentCategorySelectionKey, depth, gridItemFactory, overrideName, overrideDisplayLabel) {
@@ -1 +1 @@
1
- {"version":3,"file":"MutableCategorizedStructProperty.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAM/F,OAAO,EAAE,gBAAgB,EAAyD,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAG5I;;;GAGG;AACH,MAAM,OAAO,gCAAiC,SAAQ,0BAA0B;IAI9E,YACE,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,eAAwC,EACxC,YAAqB,EACrB,oBAA6B;QAE7B,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;QAClI,IAAI,CAAC,YAAY,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,0BAA0B,CAAC;QAChE,MAAM,aAAa,GAAG,KAAK,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1D,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,kBAAkB,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YACzD,OAAO,eAAe,CAAC,yBAAyB,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,0BAA0B,EAAE,aAAa,CAAC,CAAC;QAC7H,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAW,IAAI;QACb,OAAO,gBAAgB,CAAC,MAAM,CAAC;IACjC,CAAC;IAEM,WAAW;QAChB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAEe,qBAAqB;QACnC,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;IACnF,CAAC;IAEe,qBAAqB;QACnC,MAAM,WAAW,GAA2B,EAAE,CAAC;QAC/C,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACzC,wFAAwF;YACxF,qCAAqC;YACrC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,4BAA4B,EAAE,CAAC,CAAC,CAAC;SAClG;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IAEe,4BAA4B;QAC1C,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,4BAA4B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC;IACjG,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { FlatGridItemType, IMutableCategorizedPropertyItem, IMutableFlatGridItem, MutableCategorizedProperty } from \"./MutableFlatGridItem\";\nimport { IMutableGridItemFactory } from \"./MutableGridItemFactory\";\n\n/**\n * Mutable wrapper object for PropertyRecord with struct valueFormat which provides methods for working with and managing record children hierarchies.\n * @beta\n */\nexport class MutableCategorizedStructProperty extends MutableCategorizedProperty implements IMutableCategorizedPropertyItem {\n private _renderLabel: boolean;\n private _children: IMutableCategorizedPropertyItem[];\n\n public constructor(\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n gridItemFactory: IMutableGridItemFactory,\n overrideName?: string,\n overrideDisplayLabel?: string,\n ) {\n super(FlatGridItemType.Struct, record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\n this._renderLabel = !record.property.hideCompositePropertyLabel;\n const childrenDepth = depth + (this._renderLabel ? 1 : 0);\n this._children = record.getChildrenRecords().map((value) => {\n return gridItemFactory.createCategorizedProperty(value, this.selectionKey, this.parentCategorySelectionKey, childrenDepth);\n });\n }\n\n public get type(): FlatGridItemType.Struct {\n return FlatGridItemType.Struct;\n }\n\n public getChildren(): IMutableCategorizedPropertyItem[] {\n return this._children;\n }\n\n public override getDescendantsAndSelf() {\n return this._renderLabel ? super.getDescendantsAndSelf() : this.getDescendants();\n }\n\n public override getVisibleDescendants(): IMutableFlatGridItem[] {\n const descendants: IMutableFlatGridItem[] = [];\n if (this.isExpanded || !this._renderLabel) {\n // always render children if not rendering the label, otherwise there's no way to expand\n // this item to make children visible\n this.getChildren().forEach((child) => descendants.push(...child.getVisibleDescendantsAndSelf()));\n }\n return descendants;\n }\n\n public override getVisibleDescendantsAndSelf() {\n return this._renderLabel ? super.getVisibleDescendantsAndSelf() : this.getVisibleDescendants();\n }\n}\n"]}
1
+ {"version":3,"file":"MutableCategorizedStructProperty.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAM/F,OAAO,EAAE,gBAAgB,EAAyD,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAG5I;;;GAGG;AACH,MAAM,OAAO,gCAAiC,SAAQ,0BAA0B;IAI9E,YACE,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,eAAwC,EACxC,YAAqB,EACrB,oBAA6B;QAE7B,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE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,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC;IACjG,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { FlatGridItemType, IMutableCategorizedPropertyItem, IMutableFlatGridItem, MutableCategorizedProperty } from \"./MutableFlatGridItem\";\nimport { IMutableGridItemFactory } from \"./MutableGridItemFactory\";\n\n/**\n * Mutable wrapper object for PropertyRecord with struct valueFormat which provides methods for working with and managing record children hierarchies.\n * @public\n */\nexport class MutableCategorizedStructProperty extends MutableCategorizedProperty implements IMutableCategorizedPropertyItem {\n private _renderLabel: boolean;\n private _children: IMutableCategorizedPropertyItem[];\n\n public constructor(\n record: PropertyRecord,\n parentSelectionKey: string,\n parentCategorySelectionKey: string,\n depth: number,\n gridItemFactory: IMutableGridItemFactory,\n overrideName?: string,\n overrideDisplayLabel?: string,\n ) {\n super(FlatGridItemType.Struct, record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\n this._renderLabel = !record.property.hideCompositePropertyLabel;\n const childrenDepth = depth + (this._renderLabel ? 1 : 0);\n this._children = record.getChildrenRecords().map((value) => {\n return gridItemFactory.createCategorizedProperty(value, this.selectionKey, this.parentCategorySelectionKey, childrenDepth);\n });\n }\n\n public get type(): FlatGridItemType.Struct {\n return FlatGridItemType.Struct;\n }\n\n public getChildren(): IMutableCategorizedPropertyItem[] {\n return this._children;\n }\n\n public override getDescendantsAndSelf() {\n return this._renderLabel ? super.getDescendantsAndSelf() : this.getDescendants();\n }\n\n public override getVisibleDescendants(): IMutableFlatGridItem[] {\n const descendants: IMutableFlatGridItem[] = [];\n if (this.isExpanded || !this._renderLabel) {\n // always render children if not rendering the label, otherwise there's no way to expand\n // this item to make children visible\n this.getChildren().forEach((child) => descendants.push(...child.getVisibleDescendantsAndSelf()));\n }\n return descendants;\n }\n\n public override getVisibleDescendantsAndSelf() {\n return this._renderLabel ? super.getVisibleDescendantsAndSelf() : this.getVisibleDescendants();\n }\n}\n"]}
@@ -8,7 +8,7 @@ import { PropertyCategory } from "../../PropertyDataProvider";
8
8
  * Types of FlatGridItems for differentiating what property FlatGridItem is wrapping.
9
9
  * Category for PropertyCategory
10
10
  * (Primitive, Array, Struct) for PropertyRecord with valueFormats: (Primitive, Array, Struct)
11
- * @beta
11
+ * @public
12
12
  */
13
13
  export declare enum FlatGridItemType {
14
14
  Category = 0,
@@ -18,12 +18,12 @@ export declare enum FlatGridItemType {
18
18
  }
19
19
  /**
20
20
  * Type which extracts FlatGridItemTypes relevant for working with CategorizedProperties
21
- * @beta
21
+ * @public
22
22
  */
23
23
  export declare type CategorizedPropertyTypes = FlatGridItemType.Array | FlatGridItemType.Primitive | FlatGridItemType.Struct;
24
24
  /**
25
25
  * Base mutable data structure defining common methods and properties for both CategorizedProperties and GridCategoryItems
26
- * @beta
26
+ * @public
27
27
  */
28
28
  export interface IMutableFlatPropertyGridItem {
29
29
  readonly type: FlatGridItemType;
@@ -43,7 +43,7 @@ export interface IMutableFlatPropertyGridItem {
43
43
  }
44
44
  /**
45
45
  * Base class for all FlatPropertyGrid items
46
- * @beta
46
+ * @public
47
47
  */
48
48
  export declare abstract class MutableFlatPropertyGridItem implements IMutableFlatPropertyGridItem {
49
49
  private _depth;
@@ -97,7 +97,7 @@ export declare abstract class MutableFlatPropertyGridItem implements IMutableFla
97
97
  }
98
98
  /**
99
99
  * Data structure which describes methods and properties to be held by Mutable GridCategoryItems
100
- * @beta
100
+ * @public
101
101
  */
102
102
  export interface IMutableGridCategoryItem extends IMutableFlatPropertyGridItem {
103
103
  type: FlatGridItemType.Category;
@@ -107,7 +107,7 @@ export interface IMutableGridCategoryItem extends IMutableFlatPropertyGridItem {
107
107
  }
108
108
  /**
109
109
  * Data structure which describes methods and properties to be held by Mutable CategorizedPropertyItems
110
- * @beta
110
+ * @public
111
111
  */
112
112
  export interface IMutableCategorizedPropertyItem extends IMutableFlatPropertyGridItem {
113
113
  readonly type: CategorizedPropertyTypes;
@@ -118,12 +118,12 @@ export interface IMutableCategorizedPropertyItem extends IMutableFlatPropertyGri
118
118
  }
119
119
  /**
120
120
  * Type which describes mutable GridCategoryItem or CategorizedProperty
121
- * @beta
121
+ * @public
122
122
  */
123
123
  export declare type IMutableFlatGridItem = IMutableCategorizedPropertyItem | IMutableGridCategoryItem;
124
124
  /**
125
125
  * Base class for all Mutable CategorizedProperties
126
- * @beta
126
+ * @public
127
127
  */
128
128
  export declare abstract class MutableCategorizedProperty extends MutableFlatPropertyGridItem implements Partial<IMutableCategorizedPropertyItem> {
129
129
  private _derivedRecord;
@@ -13,7 +13,7 @@ import { PropertyRecord, PropertyValueFormat } from "@itwin/appui-abstract";
13
13
  * Types of FlatGridItems for differentiating what property FlatGridItem is wrapping.
14
14
  * Category for PropertyCategory
15
15
  * (Primitive, Array, Struct) for PropertyRecord with valueFormats: (Primitive, Array, Struct)
16
- * @beta
16
+ * @public
17
17
  */
18
18
  export var FlatGridItemType;
19
19
  (function (FlatGridItemType) {
@@ -24,7 +24,7 @@ export var FlatGridItemType;
24
24
  })(FlatGridItemType || (FlatGridItemType = {}));
25
25
  /**
26
26
  * Base class for all FlatPropertyGrid items
27
- * @beta
27
+ * @public
28
28
  */
29
29
  export class MutableFlatPropertyGridItem {
30
30
  constructor(_depth, _parentSelectionKey, _parentCategorySelectionKey) {
@@ -127,7 +127,7 @@ export class MutableFlatPropertyGridItem {
127
127
  _a = immerable;
128
128
  /**
129
129
  * Base class for all Mutable CategorizedProperties
130
- * @beta
130
+ * @public
131
131
  */
132
132
  export class MutableCategorizedProperty extends MutableFlatPropertyGridItem {
133
133
  constructor(type, record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel) {
@@ -1 +1 @@
1
- {"version":3,"file":"MutableFlatGridItem.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAuB,cAAc,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAGjG;;;;;GAKG;AACH,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,+DAAQ,CAAA;IACR,iEAAS,CAAA;IACT,yDAAK,CAAA;IACL,2DAAM,CAAA;AACR,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B;AA6BD;;;GAGG;AACH,MAAM,OAAgB,2BAA2B;IAQ/C,YAA2B,MAAc,EAAU,mBAAuC,EAAU,2BAA+C;QAAxH,WAAM,GAAN,MAAM,CAAQ;QAAU,wBAAmB,GAAnB,mBAAmB,CAAoB;QAAU,gCAA2B,GAA3B,2BAA2B,CAAoB;QAP5I,QAAW,GAAG,IAAI,CAAC;QAEV,QAAG,GAAW,OAAO,CAAC,QAAQ,EAAE,CAAC;QACvC,gBAAW,GAAY,KAAK,CAAC;QAC7B,8BAAyB,GAAW,CAAC,CAAC;QACtC,0BAAqB,GAAY,KAAK,CAAC;QAG/C,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAChD,CAAC;IAMD,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,IAAW,kBAAkB;QAC3B,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;IAED,IAAW,0BAA0B;QACnC,OAAO,IAAI,CAAC,2BAA2B,CAAC;IAC1C,CAAC;IAED,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,IAA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mBAAmB,EAAE,CAAC;QACvE,MAAM,OAAO,GAAG,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,IAAI,CAAC;QACrC,MAAM,eAAe,GAAG,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,YAAY,CAAC;QAExD,OAAO,EAAE,GAAG,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;IACvE,CAAC;IAED;;OAEG;IACK,iBAAiB,CAAC,MAAsB,EAAE,4BAAiD;QACjG,6DAA6D;QAC7D,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;QAC9C,MAAM,SAAS,GAAG,IAAI,cAAc,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","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 { PropertyDescription, PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { 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 * @beta\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 * @beta\n */\nexport type CategorizedPropertyTypes = FlatGridItemType.Array | FlatGridItemType.Primitive | FlatGridItemType.Struct;\n\n/**\n * Base mutable data structure defining common methods and properties for both CategorizedProperties and GridCategoryItems\n * @beta\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 * @beta\n */\nexport abstract class MutableFlatPropertyGridItem implements IMutableFlatPropertyGridItem {\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(private _depth: number, private _parentSelectionKey: string | undefined, private _parentCategorySelectionKey: string | undefined) {\n if (this._depth < 0)\n 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) => descendants.push(...child.getDescendantsAndSelf()));\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) => descendants.push(...child.getVisibleDescendantsAndSelf()));\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)\n return this.getSelf();\n\n const children = this.getChildren();\n if (children.length < 1)\n 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)\n 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)\n 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)\n 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)\n 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 * @beta\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 * @beta\n */\nexport interface IMutableCategorizedPropertyItem 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 * @beta\n */\nexport type IMutableFlatGridItem = IMutableCategorizedPropertyItem | IMutableGridCategoryItem;\n\n/**\n * Base class for all Mutable CategorizedProperties\n * @beta\n */\nexport abstract class MutableCategorizedProperty extends MutableFlatPropertyGridItem implements Partial<IMutableCategorizedPropertyItem> {\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(`Record with incorrect value format passed to property: expected ${expectedTypeStr}, got ${actualTypeStr}`);\n }\n\n const overridenProperty = this.makeOverridenProperty(record.property, overrideName, overrideDisplayLabel);\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(propertyDescription: PropertyDescription, overrideName?: string, overrideDisplay?: string): 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(record: PropertyRecord, overridenPropertyDescription: PropertyDescription) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\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;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAuB,cAAc,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAGjG;;;;;GAKG;AACH,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,+DAAQ,CAAA;IACR,iEAAS,CAAA;IACT,yDAAK,CAAA;IACL,2DAAM,CAAA;AACR,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B;AA6BD;;;GAGG;AACH,MAAM,OAAgB,2BAA2B;IAQ/C,YAA2B,MAAc,EAAU,mBAAuC,EAAU,2BAA+C;QAAxH,WAAM,GAAN,MAAM,CAAQ;QAAU,wBAAmB,GAAnB,mBAAmB,CAAoB;QAAU,gCAA2B,GAA3B,2BAA2B,CAAoB;QAP5I,QAAW,GAAG,IAAI,CAAC;QAEV,QAAG,GAAW,OAAO,CAAC,QAAQ,EAAE,CAAC;QACvC,gBAAW,GAAY,KAAK,CAAC;QAC7B,8BAAyB,GAAW,CAAC,CAAC;QACtC,0BAAqB,GAAY,KAAK,CAAC;QAG/C,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAChD,CAAC;IAMD,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,IAAW,kBAAkB;QAC3B,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;IAED,IAAW,0BAA0B;QACnC,OAAO,IAAI,CAAC,2BAA2B,CAAC;IAC1C,CAAC;IAED,IAAW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AE,IAAI,EAAE,YAAY,EAAE,GAAG,QAAQ,EAAE,GAAG,EAAE,GAAG,mBAAmB,EAAE,CAAC;QACvE,MAAM,OAAO,GAAG,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,IAAI,CAAC;QACrC,MAAM,eAAe,GAAG,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,YAAY,CAAC;QAExD,OAAO,EAAE,GAAG,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;IACvE,CAAC;IAED;;OAEG;IACK,iBAAiB,CAAC,MAAsB,EAAE,4BAAiD;QACjG,6DAA6D;QAC7D,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;QAC9C,MAAM,SAAS,GAAG,IAAI,cAAc,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","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 { PropertyDescription, PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { 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 = FlatGridItemType.Array | FlatGridItemType.Primitive | 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 implements IMutableFlatPropertyGridItem {\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(private _depth: number, private _parentSelectionKey: string | undefined, private _parentCategorySelectionKey: string | undefined) {\n if (this._depth < 0)\n 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) => descendants.push(...child.getDescendantsAndSelf()));\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) => descendants.push(...child.getVisibleDescendantsAndSelf()));\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)\n return this.getSelf();\n\n const children = this.getChildren();\n if (children.length < 1)\n 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)\n 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)\n 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)\n 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)\n 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 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 = IMutableCategorizedPropertyItem | IMutableGridCategoryItem;\n\n/**\n * Base class for all Mutable CategorizedProperties\n * @public\n */\nexport abstract class MutableCategorizedProperty extends MutableFlatPropertyGridItem implements Partial<IMutableCategorizedPropertyItem> {\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(`Record with incorrect value format passed to property: expected ${expectedTypeStr}, got ${actualTypeStr}`);\n }\n\n const overridenProperty = this.makeOverridenProperty(record.property, overrideName, overrideDisplayLabel);\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(propertyDescription: PropertyDescription, overrideName?: string, overrideDisplay?: string): 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(record: PropertyRecord, overridenPropertyDescription: PropertyDescription) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\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"]}
@@ -7,14 +7,14 @@ import { FlatGridItemType, IMutableFlatGridItem, IMutableGridCategoryItem, Mutab
7
7
  import { IMutableGridItemFactory } from "./MutableGridItemFactory";
8
8
  /**
9
9
  * Category name to PropertyRecord[] key pair interface used to describe which records belong to which category.
10
- * @beta
10
+ * @public
11
11
  */
12
12
  export interface CategoryRecordsDict {
13
13
  [categoryName: string]: PropertyRecord[];
14
14
  }
15
15
  /**
16
16
  * Mutable wrapper object for PropertyCategory which provides methods for working with and managing category and record children hierarchies
17
- * @beta
17
+ * @public
18
18
  */
19
19
  export declare class MutableGridCategory extends MutableFlatPropertyGridItem implements IMutableGridCategoryItem {
20
20
  private _children;
@@ -5,7 +5,7 @@
5
5
  import { FlatGridItemType, MutableFlatPropertyGridItem } from "./MutableFlatGridItem";
6
6
  /**
7
7
  * Mutable wrapper object for PropertyCategory which provides methods for working with and managing category and record children hierarchies
8
- * @beta
8
+ * @public
9
9
  */
10
10
  export class MutableGridCategory extends MutableFlatPropertyGridItem {
11
11
  constructor(category, recordsDict, gridItemFactory, parentSelectionKey, depth = 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"MutableGridCategory.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableGridCategory.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAO/F,OAAO,EAAE,gBAAgB,EAAkD,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAWtI;;;GAGG;AACH,MAAM,OAAO,mBAAoB,SAAQ,2BAA2B;IAKlE,YACE,QAA0B,EAC1B,WAAgC,EAChC,eAAwC,EACxC,kBAA2B,EAC3B,QAAgB,CAAC;;QAEjB,KAAK,CAAC,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;QACrD,IAAI,CAAC,SAAS,GAAG,EAAE,IAAI,EAAE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AAa,CAAC;IAC5B,CAAC;IAED,IAAW,IAAI;QACb,OAAO,gBAAgB,CAAC,QAAQ,CAAC;IACnC,CAAC;IAED,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;IAC7B,CAAC;IAED,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;IAC9B,CAAC;IAED,IAAW,eAAe;QACxB,OAAO,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC;IACxD,CAAC;IAEM,OAAO;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,WAAW;QAChB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;;;;OAKG;IACH,IAAoB,wBAAwB;QAC1C,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,MAAM,GAAG,CAAC;YAClD,OAAO,CAAC,CAAC;QAEX,OAAO,IAAI,CAAC,yBAAyB,GAAG,CAAC,CAAC;IAC5C,CAAC;IAED,IAAoB,wBAAwB,CAAC,KAAa;QACxD,KAAK,CAAC,wBAAwB,GAAG,KAAK,GAAG,CAAC,CAAC;IAC7C,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\nimport { FlatGridItemType, IMutableFlatGridItem, IMutableGridCategoryItem, MutableFlatPropertyGridItem } from \"./MutableFlatGridItem\";\nimport { IMutableGridItemFactory } from \"./MutableGridItemFactory\";\n\n/**\n * Category name to PropertyRecord[] key pair interface used to describe which records belong to which category.\n * @beta\n */\nexport interface CategoryRecordsDict {\n [categoryName: string]: PropertyRecord[];\n}\n\n/**\n * Mutable wrapper object for PropertyCategory which provides methods for working with and managing category and record children hierarchies\n * @beta\n */\nexport class MutableGridCategory extends MutableFlatPropertyGridItem implements IMutableGridCategoryItem {\n private _children: IMutableFlatGridItem[];\n private _selectionKey: string;\n private _category: PropertyCategory;\n\n constructor(\n category: PropertyCategory,\n recordsDict: CategoryRecordsDict,\n gridItemFactory: IMutableGridItemFactory,\n parentSelectionKey?: string,\n depth: number = 0,\n ) {\n super(depth, parentSelectionKey, parentSelectionKey);\n this._category = { name: category.name, label: category.label, expand: category.expand };\n\n if (parentSelectionKey !== undefined)\n this._selectionKey = `${parentSelectionKey}_${category.name}`;\n else\n this._selectionKey = category.name;\n\n this._isExpanded = category.expand;\n\n // Even though categories are nested and have their own depth, categorized properties depth is counted starting with the parent category.\n const categoryRecords = recordsDict[category.name] ?? [];\n this._children = categoryRecords.map((value) => gridItemFactory.createCategorizedProperty(value, this.selectionKey, this.selectionKey, 0));\n\n const childCategories = category.childCategories ?? [];\n const child = childCategories.map((childCategory) => gridItemFactory.createGridCategory(childCategory, recordsDict, this.selectionKey, this.depth + 1));\n\n this._children.push(...child);\n\n // Assign lastInNumberOfCategories and isLastInRootCategory for entire children hierarchy\n this.lastInNumberOfCategories = 0;\n this.isLastInRootCategory = this.isRootCategory;\n }\n\n /**\n * Category is considered to be root category if its depth is 0\n */\n public get isRootCategory() {\n return this.depth === 0;\n }\n\n public get selectionKey() {\n return this._selectionKey;\n }\n\n public get type(): FlatGridItemType.Category {\n return FlatGridItemType.Category;\n }\n\n public get name() {\n return this._category.name;\n }\n\n public get label() {\n return this._category.label;\n }\n\n public get derivedCategory(): PropertyCategory {\n return { ...this._category, expand: this.isExpanded };\n }\n\n public getSelf() {\n return this;\n }\n\n public getChildren(): IMutableFlatGridItem[] {\n return this._children;\n }\n\n /**\n * Gets and Sets lastInNumberOfCategories.\n * Setter increments set value by one to account self as category.\n * New value is sent down to this items last child\n * @internal\n */\n public override get lastInNumberOfCategories(): number {\n if (this.isExpanded && this.getChildren().length > 0)\n return 0;\n\n return this._lastInNumberOfCategories - 1;\n }\n\n public override set lastInNumberOfCategories(value: number) {\n super.lastInNumberOfCategories = value + 1;\n }\n}\n"]}
1
+ {"version":3,"file":"MutableGridCategory.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableGridCategory.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAO/F,OAAO,EAAE,gBAAgB,EAAkD,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAWtI;;;GAGG;AACH,MAAM,OAAO,mBAAoB,SAAQ,2BAA2B;IAKlE,YACE,QAA0B,EAC1B,WAAgC,EAChC,eAAwC,EACxC,kBAA2B,EAC3B,QAAgB,CAAC;;QAEjB,KAAK,CAAC,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;QACrD,IAAI,CAAC,SAAS,GAAG,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;QAEzF,IAAI,kBAAkB,KAAK,SAAS;YAClC,IAAI,CAAC,aAAa,GAAG,GAAG,kBAAkB,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;;YAE9D,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC;QAErC,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC;QAEnC,yIAAyI;QACzI,MAAM,eAAe,GAAG,MAAA,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC;QACzD,IAAI,CAAC,SAAS,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,yBAAyB,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC;QAE3I,MAA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AAyB,GAAG,CAAC,CAAC;IAC5C,CAAC;IAED,IAAoB,wBAAwB,CAAC,KAAa;QACxD,KAAK,CAAC,wBAAwB,GAAG,KAAK,GAAG,CAAC,CAAC;IAC7C,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\nimport { FlatGridItemType, IMutableFlatGridItem, IMutableGridCategoryItem, MutableFlatPropertyGridItem } from \"./MutableFlatGridItem\";\nimport { IMutableGridItemFactory } from \"./MutableGridItemFactory\";\n\n/**\n * Category name to PropertyRecord[] key pair interface used to describe which records belong to which category.\n * @public\n */\nexport interface CategoryRecordsDict {\n [categoryName: string]: PropertyRecord[];\n}\n\n/**\n * Mutable wrapper object for PropertyCategory which provides methods for working with and managing category and record children hierarchies\n * @public\n */\nexport class MutableGridCategory extends MutableFlatPropertyGridItem implements IMutableGridCategoryItem {\n private _children: IMutableFlatGridItem[];\n private _selectionKey: string;\n private _category: PropertyCategory;\n\n constructor(\n category: PropertyCategory,\n recordsDict: CategoryRecordsDict,\n gridItemFactory: IMutableGridItemFactory,\n parentSelectionKey?: string,\n depth: number = 0,\n ) {\n super(depth, parentSelectionKey, parentSelectionKey);\n this._category = { name: category.name, label: category.label, expand: category.expand };\n\n if (parentSelectionKey !== undefined)\n this._selectionKey = `${parentSelectionKey}_${category.name}`;\n else\n this._selectionKey = category.name;\n\n this._isExpanded = category.expand;\n\n // Even though categories are nested and have their own depth, categorized properties depth is counted starting with the parent category.\n const categoryRecords = recordsDict[category.name] ?? [];\n this._children = categoryRecords.map((value) => gridItemFactory.createCategorizedProperty(value, this.selectionKey, this.selectionKey, 0));\n\n const childCategories = category.childCategories ?? [];\n const child = childCategories.map((childCategory) => gridItemFactory.createGridCategory(childCategory, recordsDict, this.selectionKey, this.depth + 1));\n\n this._children.push(...child);\n\n // Assign lastInNumberOfCategories and isLastInRootCategory for entire children hierarchy\n this.lastInNumberOfCategories = 0;\n this.isLastInRootCategory = this.isRootCategory;\n }\n\n /**\n * Category is considered to be root category if its depth is 0\n */\n public get isRootCategory() {\n return this.depth === 0;\n }\n\n public get selectionKey() {\n return this._selectionKey;\n }\n\n public get type(): FlatGridItemType.Category {\n return FlatGridItemType.Category;\n }\n\n public get name() {\n return this._category.name;\n }\n\n public get label() {\n return this._category.label;\n }\n\n public get derivedCategory(): PropertyCategory {\n return { ...this._category, expand: this.isExpanded };\n }\n\n public getSelf() {\n return this;\n }\n\n public getChildren(): IMutableFlatGridItem[] {\n return this._children;\n }\n\n /**\n * Gets and Sets lastInNumberOfCategories.\n * Setter increments set value by one to account self as category.\n * New value is sent down to this items last child\n * @internal\n */\n public override get lastInNumberOfCategories(): number {\n if (this.isExpanded && this.getChildren().length > 0)\n return 0;\n\n return this._lastInNumberOfCategories - 1;\n }\n\n public override set lastInNumberOfCategories(value: number) {\n super.lastInNumberOfCategories = value + 1;\n }\n}\n"]}
@@ -10,7 +10,7 @@ import { IMutableCategorizedPropertyItem, IMutableGridCategoryItem } from "./Mut
10
10
  import { CategoryRecordsDict } from "./MutableGridCategory";
11
11
  /**
12
12
  * IMutableGridItemFactory interface for creating MutableGridItem objects
13
- * @beta
13
+ * @public
14
14
  */
15
15
  export interface IMutableGridItemFactory {
16
16
  createCategorizedProperty: (record: PropertyRecord, parentSelectionKey: string, parentCategorySelectionKey: string, depth: number, overrideName?: string, overrideDisplayLabel?: string) => IMutableCategorizedPropertyItem;
@@ -18,7 +18,7 @@ export interface IMutableGridItemFactory {
18
18
  }
19
19
  /**
20
20
  * Implementation of IMutableGridItemFactory for creating MutableGridItem objects.
21
- * @beta
21
+ * @public
22
22
  */
23
23
  export declare class MutableGridItemFactory implements IMutableGridItemFactory {
24
24
  protected createPrimitiveProperty(record: PropertyRecord, parentSelectionKey: string, parentCategorySelectionKey: string, depth: number, overrideName?: string, overrideDisplayLabel?: string): MutableCategorizedPrimitiveProperty;
@@ -13,7 +13,7 @@ import { MutableCustomGridCategory } from "./MutableCustomGridCategory";
13
13
  import { MutableGridCategory } from "./MutableGridCategory";
14
14
  /**
15
15
  * Implementation of IMutableGridItemFactory for creating MutableGridItem objects.
16
- * @beta
16
+ * @public
17
17
  */
18
18
  export class MutableGridItemFactory {
19
19
  createPrimitiveProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel) {
@@ -1 +1 @@
1
- {"version":3,"file":"MutableGridItemFactory.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAkB,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5E,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,EAAuB,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAwBjF;;;GAGG;AACH,MAAM,OAAO,sBAAsB;IACvB,uBAAuB,CAC/B,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,OAAO,IAAI,mCAAmC,CAAC,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;IACpJ,CAAC;IAES,mBAAmB,CAC3B,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,OAAO,IAAI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B,EAC1B,WAAgC,EAChC,kBAA2B,EAC3B,KAAc;QAEd,IAAI,QAAQ,CAAC,QAAQ,KAAK,SAAS;YACjC,OAAO,IAAI,yBAAyB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,CAAC,CAAC,CAAC;QAEpG,IAAI,kBAAkB,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS;YACzD,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC;QAEzF,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;IAC9D,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport { PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\nimport { MutableCategorizedArrayProperty } from \"./MutableCategorizedArrayProperty\";\nimport { MutableCategorizedPrimitiveProperty } from \"./MutableCategorizedPrimitiveProperty\";\nimport { MutableCategorizedStructProperty } from \"./MutableCategorizedStructProperty\";\nimport { MutableCustomGridCategory } from \"./MutableCustomGridCategory\";\nimport { IMutableCategorizedPropertyItem, IMutableGridCategoryItem } from \"./MutableFlatGridItem\";\nimport { CategoryRecordsDict, MutableGridCategory } from \"./MutableGridCategory\";\n\n/**\n * IMutableGridItemFactory interface for creating MutableGridItem objects\n * @beta\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 * @beta\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(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\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(record, parentSelectionKey, parentCategorySelectionKey, depth, this, overrideName, overrideDisplayLabel);\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(record, parentSelectionKey, parentCategorySelectionKey, depth, this, overrideName, overrideDisplayLabel);\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(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\n case PropertyValueFormat.Array:\n return this.createArrayProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\n case PropertyValueFormat.Struct:\n return this.createStructProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\n /* istanbul ignore next */\n default:\n const unhandledRecordType: never = valueFormat;\n throw new Error(`Unhandled property record type. Was a new type added? ${unhandledRecordType}`);\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(category, recordsDict, this, parentSelectionKey, depth ?? 0);\n\n if (parentSelectionKey !== undefined && depth !== undefined)\n return new MutableGridCategory(category, recordsDict, this, parentSelectionKey, depth);\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":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAkB,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5E,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,EAAuB,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAwBjF;;;GAGG;AACH,MAAM,OAAO,sBAAsB;IACvB,uBAAuB,CAC/B,MAAsB,EACt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BAC7B,OAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;YACtI,0BAA0B;YAC1B;gBACE,MAAM,mBAAmB,GAAU,WAAW,CAAC;gBAC/C,MAAM,IAAI,KAAK,CAAC,yDAAyD,mBAAmB,EAAE,CAAC,CAAC;SACnG;IACH,CAAC;IAED;;;;;;;OAOG;IACI,kBAAkB,CACvB,QAA0B,EAC1B,WAAgC,EAChC,kBAA2B,EAC3B,KAAc;QAEd,IAAI,QAAQ,CAAC,QAAQ,KAAK,SAAS;YACjC,OAAO,IAAI,yBAAyB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,CAAC,CAAC,CAAC;QAEpG,IAAI,kBAAkB,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS;YACzD,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC;QAEzF,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;IAC9D,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport { PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\nimport { MutableCategorizedArrayProperty } from \"./MutableCategorizedArrayProperty\";\nimport { MutableCategorizedPrimitiveProperty } from \"./MutableCategorizedPrimitiveProperty\";\nimport { MutableCategorizedStructProperty } from \"./MutableCategorizedStructProperty\";\nimport { MutableCustomGridCategory } from \"./MutableCustomGridCategory\";\nimport { IMutableCategorizedPropertyItem, IMutableGridCategoryItem } from \"./MutableFlatGridItem\";\nimport { CategoryRecordsDict, 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(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\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(record, parentSelectionKey, parentCategorySelectionKey, depth, this, overrideName, overrideDisplayLabel);\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(record, parentSelectionKey, parentCategorySelectionKey, depth, this, overrideName, overrideDisplayLabel);\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(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\n case PropertyValueFormat.Array:\n return this.createArrayProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\n case PropertyValueFormat.Struct:\n return this.createStructProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\n /* istanbul ignore next */\n default:\n const unhandledRecordType: never = valueFormat;\n throw new Error(`Unhandled property record type. Was a new type added? ${unhandledRecordType}`);\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(category, recordsDict, this, parentSelectionKey, depth ?? 0);\n\n if (parentSelectionKey !== undefined && depth !== undefined)\n return new MutableGridCategory(category, recordsDict, this, parentSelectionKey, depth);\n\n return new MutableGridCategory(category, recordsDict, this);\n }\n}\n"]}
@@ -16,14 +16,11 @@ export interface FlatPropertyRendererProps extends SharedRendererProps {
16
16
  propertyValueRendererManager?: PropertyValueRendererManager;
17
17
  /** Multiplier of how much the property is indented to the right */
18
18
  indentation?: number;
19
- /** Indicates property is being edited
20
- * @beta */
19
+ /** Indicates property is being edited */
21
20
  isEditing?: boolean;
22
- /** Called when property edit is committed.
23
- * @beta */
21
+ /** Called when property edit is committed. */
24
22
  onEditCommit?: (args: PropertyUpdatedArgs, category: PropertyCategory) => void;
25
- /** Called when property edit is cancelled.
26
- * @beta */
23
+ /** Called when property edit is cancelled. */
27
24
  onEditCancel?: () => void;
28
25
  /** Whether property value is displayed in expanded state. */
29
26
  isExpanded: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"FlatPropertyRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAmB,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG9D;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IACpE,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,4BAA4B;IAC5B,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;IAC5D,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;eACW;IACX,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;eACW;IACX,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/E;eACW;IACX,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,6DAA6D;IAC7D,UAAU,EAAE,OAAO,CAAC;IACpB,wFAAwF;IACxF,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,uCAAuC;IACvC,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAE9C,SAAS,CAAC,EAAE,0BAA0B,GAAG;QAAE,YAAY,EAAE,OAAO,CAAC;QAAC,YAAY,EAAE,OAAO,CAAA;KAAE,CAAC;IAE1F,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAsDpE,CAAC"}
1
+ {"version":3,"file":"FlatPropertyRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAmB,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG9D;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IACpE,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,4BAA4B;IAC5B,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;IAC5D,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/E,8CAA8C;IAC9C,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,6DAA6D;IAC7D,UAAU,EAAE,OAAO,CAAC;IACpB,wFAAwF;IACxF,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,uCAAuC;IACvC,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAE9C,SAAS,CAAC,EAAE,0BAA0B,GAAG;QAAE,YAAY,EAAE,OAAO,CAAC;QAAC,YAAY,EAAE,OAAO,CAAA;KAAE,CAAC;IAE1F,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAsDpE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"FlatPropertyRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAkB,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5E,OAAO,EAAE,eAAe,EAAuB,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAA0B,MAAM,yDAAyD,CAAC;AAI5H,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAgCtF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAwC,CAAC,KAAK,EAAE,EAAE;IACjF,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,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cesContent":["/*---------------------------------------------------------------------------------------------\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 { PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { Orientation } from \"@itwin/core-react\";\nimport { HighlightingComponentProps } from \"../../../common/HighlightingComponentProps\";\nimport { EditorContainer, PropertyUpdatedArgs } from \"../../../editors/EditorContainer\";\nimport { CommonPropertyRenderer } from \"../../../properties/renderers/CommonPropertyRenderer\";\nimport { PrimitivePropertyRenderer, PrimitiveRendererProps } from \"../../../properties/renderers/PrimitivePropertyRenderer\";\nimport { SharedRendererProps } from \"../../../properties/renderers/PropertyRenderer\";\nimport { PropertyValueRendererManager } from \"../../../properties/ValueRendererManager\";\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\nimport { FlatNonPrimitivePropertyRenderer } from \"./FlatNonPrimitivePropertyRenderer\";\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 * @beta */\n isEditing?: boolean;\n /** Called when property edit is committed.\n * @beta */\n onEditCommit?: (args: PropertyUpdatedArgs, category: PropertyCategory) => void;\n /** Called when property edit is cancelled.\n * @beta */\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 & { applyOnLabel: boolean, applyOnValue: boolean };\n\n children?: never;\n}\n\n/** A React component that renders flat properties\n * @internal\n */\nexport const FlatPropertyRenderer: React.FC<FlatPropertyRendererProps> = (props) => {\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 />\n );\n\n const primitiveRendererProps: PrimitiveRendererProps = {\n ...passthroughProps,\n valueElementRenderer,\n indentation: props.indentation,\n };\n switch (props.propertyRecord.value.valueFormat) {\n case PropertyValueFormat.Primitive:\n return (<PrimitivePropertyRenderer highlight={highlight?.applyOnLabel ? highlight : undefined} {...primitiveRendererProps} />);\n\n case PropertyValueFormat.Array:\n // If array is empty, render it as a primitive property\n if (props.propertyRecord.value.items.length === 0)\n return (<PrimitivePropertyRenderer highlight={highlight?.applyOnLabel ? highlight : undefined} {...primitiveRendererProps} />);\n\n // eslint-disable-next-line no-fallthrough\n case PropertyValueFormat.Struct:\n return (\n <FlatNonPrimitivePropertyRenderer\n isExpanded={props.isExpanded}\n onExpandToggled={props.onExpansionToggled}\n {...primitiveRendererProps}\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?: (args: PropertyUpdatedArgs, category: PropertyCategory) => void;\n\n highlight?: HighlightingComponentProps & { applyOnLabel: boolean, applyOnValue: boolean };\n}\n\nconst DisplayValue: React.FC<DisplayValueProps> = (props) => {\n useResetHeightOnEdit(props.isEditing, props.onHeightChanged);\n\n if (props.isEditing) {\n const _onEditCommit = (args: PropertyUpdatedArgs) => {\n /* istanbul ignore else */\n if (props.category)\n 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 {\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};\n\nfunction useResetHeightOnEdit(isEditing?: boolean, onHeightChanged?: (newHeight: number) => void) {\n const previousEditingStatusRef = React.useRef(isEditing);\n React.useEffect(() => {\n if (!previousEditingStatusRef.current && isEditing) {\n onHeightChanged?.(27);\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;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAkB,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5E,OAAO,EAAE,eAAe,EAAuB,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAA0B,MAAM,yDAAyD,CAAC;AAI5H,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AA6BtF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAwC,CAAC,KAAK,EAAE,E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BAAoB,CAAC,SAAmB,EAAE,eAA6C;IAC9F,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;YAClD,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAG,EAAE,CAAC,CAAC;SACvB;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 { PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { Orientation } from \"@itwin/core-react\";\nimport { HighlightingComponentProps } from \"../../../common/HighlightingComponentProps\";\nimport { EditorContainer, PropertyUpdatedArgs } from \"../../../editors/EditorContainer\";\nimport { CommonPropertyRenderer } from \"../../../properties/renderers/CommonPropertyRenderer\";\nimport { PrimitivePropertyRenderer, PrimitiveRendererProps } from \"../../../properties/renderers/PrimitivePropertyRenderer\";\nimport { SharedRendererProps } from \"../../../properties/renderers/PropertyRenderer\";\nimport { PropertyValueRendererManager } from \"../../../properties/ValueRendererManager\";\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\nimport { FlatNonPrimitivePropertyRenderer } from \"./FlatNonPrimitivePropertyRenderer\";\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?: (args: PropertyUpdatedArgs, category: PropertyCategory) => 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 & { applyOnLabel: boolean, applyOnValue: boolean };\n\n children?: never;\n}\n\n/** A React component that renders flat properties\n * @internal\n */\nexport const FlatPropertyRenderer: React.FC<FlatPropertyRendererProps> = (props) => {\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 />\n );\n\n const primitiveRendererProps: PrimitiveRendererProps = {\n ...passthroughProps,\n valueElementRenderer,\n indentation: props.indentation,\n };\n switch (props.propertyRecord.value.valueFormat) {\n case PropertyValueFormat.Primitive:\n return (<PrimitivePropertyRenderer highlight={highlight?.applyOnLabel ? highlight : undefined} {...primitiveRendererProps} />);\n\n case PropertyValueFormat.Array:\n // If array is empty, render it as a primitive property\n if (props.propertyRecord.value.items.length === 0)\n return (<PrimitivePropertyRenderer highlight={highlight?.applyOnLabel ? highlight : undefined} {...primitiveRendererProps} />);\n\n // eslint-disable-next-line no-fallthrough\n case PropertyValueFormat.Struct:\n return (\n <FlatNonPrimitivePropertyRenderer\n isExpanded={props.isExpanded}\n onExpandToggled={props.onExpansionToggled}\n {...primitiveRendererProps}\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?: (args: PropertyUpdatedArgs, category: PropertyCategory) => void;\n\n highlight?: HighlightingComponentProps & { applyOnLabel: boolean, applyOnValue: boolean };\n}\n\nconst DisplayValue: React.FC<DisplayValueProps> = (props) => {\n useResetHeightOnEdit(props.isEditing, props.onHeightChanged);\n\n if (props.isEditing) {\n const _onEditCommit = (args: PropertyUpdatedArgs) => {\n /* istanbul ignore else */\n if (props.category)\n 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 {\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};\n\nfunction useResetHeightOnEdit(isEditing?: boolean, onHeightChanged?: (newHeight: number) => void) {\n const previousEditingStatusRef = React.useRef(isEditing);\n React.useEffect(() => {\n if (!previousEditingStatusRef.current && isEditing) {\n onHeightChanged?.(27);\n }\n\n previousEditingStatusRef.current = isEditing;\n });\n}\n"]}
@@ -43,10 +43,7 @@ export interface ControlledTreeProps extends CommonProps {
43
43
  spinnerRenderer?: () => React.ReactElement;
44
44
  /** Custom renderer to be used when there is no data to show in tree. */
45
45
  noDataRenderer?: () => React.ReactElement;
46
- /**
47
- * Callback that is invoked when rendered items range changes.
48
- * @beta
49
- */
46
+ /** Callback that is invoked when rendered items range changes. */
50
47
  onItemsRendered?: (items: RenderedItemsRange) => void;
51
48
  /** Width of the tree renderer. */
52
49
  width: number;