@itwin/components-react 5.29.0 → 5.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/CHANGELOG.md +128 -0
  2. package/lib/components-react/editors/BooleanEditor.d.ts +2 -0
  3. package/lib/components-react/editors/BooleanEditor.d.ts.map +1 -1
  4. package/lib/components-react/editors/BooleanEditor.js +2 -0
  5. package/lib/components-react/editors/BooleanEditor.js.map +1 -1
  6. package/lib/components-react/editors/CustomNumberEditor.d.ts +2 -0
  7. package/lib/components-react/editors/CustomNumberEditor.d.ts.map +1 -1
  8. package/lib/components-react/editors/CustomNumberEditor.js +4 -6
  9. package/lib/components-react/editors/CustomNumberEditor.js.map +1 -1
  10. package/lib/components-react/editors/DateTimeEditor.d.ts.map +1 -1
  11. package/lib/components-react/editors/DateTimeEditor.js +1 -2
  12. package/lib/components-react/editors/DateTimeEditor.js.map +1 -1
  13. package/lib/components-react/editors/EditorContainer.d.ts +5 -1
  14. package/lib/components-react/editors/EditorContainer.d.ts.map +1 -1
  15. package/lib/components-react/editors/EditorContainer.js +1 -1
  16. package/lib/components-react/editors/EditorContainer.js.map +1 -1
  17. package/lib/components-react/editors/EnumButtonGroupEditor.d.ts +2 -0
  18. package/lib/components-react/editors/EnumButtonGroupEditor.d.ts.map +1 -1
  19. package/lib/components-react/editors/EnumButtonGroupEditor.js +2 -0
  20. package/lib/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
  21. package/lib/components-react/editors/EnumEditor.d.ts +2 -0
  22. package/lib/components-react/editors/EnumEditor.d.ts.map +1 -1
  23. package/lib/components-react/editors/EnumEditor.js +2 -0
  24. package/lib/components-react/editors/EnumEditor.js.map +1 -1
  25. package/lib/components-react/editors/IconEditor.d.ts +2 -0
  26. package/lib/components-react/editors/IconEditor.d.ts.map +1 -1
  27. package/lib/components-react/editors/IconEditor.js +2 -0
  28. package/lib/components-react/editors/IconEditor.js.map +1 -1
  29. package/lib/components-react/editors/ImageCheckBoxEditor.d.ts +2 -0
  30. package/lib/components-react/editors/ImageCheckBoxEditor.d.ts.map +1 -1
  31. package/lib/components-react/editors/ImageCheckBoxEditor.js +3 -3
  32. package/lib/components-react/editors/ImageCheckBoxEditor.js.map +1 -1
  33. package/lib/components-react/editors/NumericInputEditor.d.ts +2 -0
  34. package/lib/components-react/editors/NumericInputEditor.d.ts.map +1 -1
  35. package/lib/components-react/editors/NumericInputEditor.js +3 -3
  36. package/lib/components-react/editors/NumericInputEditor.js.map +1 -1
  37. package/lib/components-react/editors/PropertyEditorManager.d.ts +11 -2
  38. package/lib/components-react/editors/PropertyEditorManager.d.ts.map +1 -1
  39. package/lib/components-react/editors/PropertyEditorManager.js +6 -1
  40. package/lib/components-react/editors/PropertyEditorManager.js.map +1 -1
  41. package/lib/components-react/editors/SliderEditor.d.ts +4 -1
  42. package/lib/components-react/editors/SliderEditor.d.ts.map +1 -1
  43. package/lib/components-react/editors/SliderEditor.js +6 -7
  44. package/lib/components-react/editors/SliderEditor.js.map +1 -1
  45. package/lib/components-react/editors/TextEditor.d.ts +1 -0
  46. package/lib/components-react/editors/TextEditor.d.ts.map +1 -1
  47. package/lib/components-react/editors/TextEditor.js +3 -6
  48. package/lib/components-react/editors/TextEditor.js.map +1 -1
  49. package/lib/components-react/editors/TextareaEditor.d.ts +2 -0
  50. package/lib/components-react/editors/TextareaEditor.d.ts.map +1 -1
  51. package/lib/components-react/editors/TextareaEditor.js +2 -0
  52. package/lib/components-react/editors/TextareaEditor.js.map +1 -1
  53. package/lib/components-react/editors/ToggleEditor.d.ts +2 -0
  54. package/lib/components-react/editors/ToggleEditor.d.ts.map +1 -1
  55. package/lib/components-react/editors/ToggleEditor.js +2 -0
  56. package/lib/components-react/editors/ToggleEditor.js.map +1 -1
  57. package/lib/components-react/editors/registerEditors.d.ts.map +1 -1
  58. package/lib/components-react/editors/registerEditors.js +1 -0
  59. package/lib/components-react/editors/registerEditors.js.map +1 -1
  60. package/lib/components-react/favorite/FavoritePropertyList.d.ts.map +1 -1
  61. package/lib/components-react/favorite/FavoritePropertyList.js +4 -1
  62. package/lib/components-react/favorite/FavoritePropertyList.js.map +1 -1
  63. package/lib/components-react/filter-builder/FilterBuilderRule.d.ts +1 -0
  64. package/lib/components-react/filter-builder/FilterBuilderRule.d.ts.map +1 -1
  65. package/lib/components-react/filter-builder/FilterBuilderRule.js +5 -3
  66. package/lib/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
  67. package/lib/components-react/filter-builder/FilterBuilderRuleGroup.d.ts +1 -0
  68. package/lib/components-react/filter-builder/FilterBuilderRuleGroup.d.ts.map +1 -1
  69. package/lib/components-react/filter-builder/FilterBuilderRuleGroup.js +5 -5
  70. package/lib/components-react/filter-builder/FilterBuilderRuleGroup.js.map +1 -1
  71. package/lib/components-react/filter-builder/FilterBuilderRuleValue.d.ts +45 -8
  72. package/lib/components-react/filter-builder/FilterBuilderRuleValue.d.ts.map +1 -1
  73. package/lib/components-react/filter-builder/FilterBuilderRuleValue.js +17 -8
  74. package/lib/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
  75. package/lib/components-react/new-editors/interop/EditorInterop.d.ts +2 -2
  76. package/lib/components-react/new-editors/interop/EditorInterop.d.ts.map +1 -1
  77. package/lib/components-react/new-editors/interop/EditorInterop.js.map +1 -1
  78. package/lib/components-react/new-editors/interop/Metadata.d.ts +9 -6
  79. package/lib/components-react/new-editors/interop/Metadata.d.ts.map +1 -1
  80. package/lib/components-react/new-editors/interop/Metadata.js +6 -3
  81. package/lib/components-react/new-editors/interop/Metadata.js.map +1 -1
  82. package/lib/components-react/new-editors/interop/PropertyRecordEditor.d.ts +28 -3
  83. package/lib/components-react/new-editors/interop/PropertyRecordEditor.d.ts.map +1 -1
  84. package/lib/components-react/new-editors/interop/PropertyRecordEditor.js +7 -3
  85. package/lib/components-react/new-editors/interop/PropertyRecordEditor.js.map +1 -1
  86. package/lib/components-react/new-editors/interop/old-editors/Color.js +2 -2
  87. package/lib/components-react/new-editors/interop/old-editors/Color.js.map +1 -1
  88. package/lib/components-react/new-editors/interop/old-editors/CustomNumber.d.ts +2 -2
  89. package/lib/components-react/new-editors/interop/old-editors/CustomNumber.d.ts.map +1 -1
  90. package/lib/components-react/new-editors/interop/old-editors/CustomNumber.js +2 -2
  91. package/lib/components-react/new-editors/interop/old-editors/CustomNumber.js.map +1 -1
  92. package/lib/components-react/new-editors/interop/old-editors/Enum.js +2 -2
  93. package/lib/components-react/new-editors/interop/old-editors/Enum.js.map +1 -1
  94. package/lib/components-react/new-editors/interop/old-editors/EnumButtonGroup.js +2 -2
  95. package/lib/components-react/new-editors/interop/old-editors/EnumButtonGroup.js.map +1 -1
  96. package/lib/components-react/new-editors/interop/old-editors/NumericInput.d.ts +2 -2
  97. package/lib/components-react/new-editors/interop/old-editors/NumericInput.d.ts.map +1 -1
  98. package/lib/components-react/new-editors/interop/old-editors/NumericInput.js +2 -2
  99. package/lib/components-react/new-editors/interop/old-editors/NumericInput.js.map +1 -1
  100. package/lib/components-react/new-editors/interop/old-editors/Slider.js +2 -2
  101. package/lib/components-react/new-editors/interop/old-editors/Slider.js.map +1 -1
  102. package/lib/components-react/new-editors/interop/old-editors/TextArea.d.ts.map +1 -1
  103. package/lib/components-react/new-editors/interop/old-editors/TextArea.js +2 -2
  104. package/lib/components-react/new-editors/interop/old-editors/TextArea.js.map +1 -1
  105. package/lib/components-react/new-editors/interop/old-editors/UseEditorParams.d.ts +8 -8
  106. package/lib/components-react/new-editors/interop/old-editors/UseEditorParams.d.ts.map +1 -1
  107. package/lib/components-react/new-editors/interop/old-editors/UseEditorParams.js.map +1 -1
  108. package/lib/components-react/new-editors/interop/old-editors/UseEnumMetadata.d.ts +2 -2
  109. package/lib/components-react/new-editors/interop/old-editors/UseEnumMetadata.d.ts.map +1 -1
  110. package/lib/components-react/new-editors/interop/old-editors/UseEnumMetadata.js.map +1 -1
  111. package/lib/components-react/properties/renderers/NonPrimitivePropertyRenderer.d.ts.map +1 -1
  112. package/lib/components-react/properties/renderers/NonPrimitivePropertyRenderer.js +4 -1
  113. package/lib/components-react/properties/renderers/NonPrimitivePropertyRenderer.js.map +1 -1
  114. package/lib/components-react/properties/renderers/PropertyRenderer.d.ts +45 -7
  115. package/lib/components-react/properties/renderers/PropertyRenderer.d.ts.map +1 -1
  116. package/lib/components-react/properties/renderers/PropertyRenderer.js +13 -5
  117. package/lib/components-react/properties/renderers/PropertyRenderer.js.map +1 -1
  118. package/lib/components-react/propertygrid/component/PropertyList.d.ts +40 -10
  119. package/lib/components-react/propertygrid/component/PropertyList.d.ts.map +1 -1
  120. package/lib/components-react/propertygrid/component/PropertyList.js +7 -2
  121. package/lib/components-react/propertygrid/component/PropertyList.js.map +1 -1
  122. package/lib/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts +37 -33
  123. package/lib/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts.map +1 -1
  124. package/lib/components-react/propertygrid/component/VirtualizedPropertyGrid.js +10 -4
  125. package/lib/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
  126. package/lib/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.d.ts +41 -5
  127. package/lib/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.d.ts.map +1 -1
  128. package/lib/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js +6 -4
  129. package/lib/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js.map +1 -1
  130. package/lib/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js +3 -1
  131. package/lib/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
  132. package/lib/components-react.d.ts +1 -0
  133. package/lib/components-react.d.ts.map +1 -1
  134. package/lib/components-react.js +1 -0
  135. package/lib/components-react.js.map +1 -1
  136. package/lib/internal.d.ts +0 -1
  137. package/lib/internal.d.ts.map +1 -1
  138. package/lib/internal.js +0 -1
  139. package/lib/internal.js.map +1 -1
  140. package/package.json +3 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AC;IACpD,cAAc;IACd,CAAC,KAAK,EAAE,iBAAiB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;CAC/C;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,cAAc,UAG/B;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,qBAE1B,CAAC"}
@@ -20,7 +20,10 @@ export function getPropertyKey(propertyCategory, propertyRecord) {
20
20
  /** A React component that renders multiple properties within a category as a list.
21
21
  * @public
22
22
  */
23
- export class PropertyList extends React.Component {
23
+ export const PropertyList = (props) => {
24
+ return React.createElement(PropertyListImpl, { ...props });
25
+ };
26
+ class PropertyListImpl extends React.Component {
24
27
  constructor(props) {
25
28
  super(props);
26
29
  }
@@ -43,7 +46,9 @@ export class PropertyList extends React.Component {
43
46
  : undefined, onRightClick: propertyRecord.value.valueFormat ===
44
47
  PropertyValueFormat.Primitive
45
48
  ? this.props.onPropertyRightClicked
46
- : undefined, onContextMenu: this.props.onPropertyContextMenu, columnRatio: this.props.columnRatio, onColumnRatioChanged: this.props.onColumnChanged, propertyValueRendererManager: this.props.propertyValueRendererManager, isEditing: key === this.props.editingPropertyKey, onEditCommit: this._onEditCommit, onEditCancel: this.props.onEditCancel, width: this.props.width, actionButtonRenderers: this.props.actionButtonRenderers, isResizeHandleHovered: this.props.isResizeHandleHovered, onResizeHandleHoverChanged: this.props.onResizeHandleHoverChanged, isResizeHandleBeingDragged: this.props.isResizeHandleBeingDragged, onResizeHandleDragChanged: this.props.onResizeHandleDragChanged, columnInfo: this.props.columnInfo }));
49
+ : undefined, onContextMenu: this.props.onPropertyContextMenu, columnRatio: this.props.columnRatio, onColumnRatioChanged: this.props.onColumnChanged, propertyValueRendererManager: this.props.propertyValueRendererManager, isEditing: key === this.props.editingPropertyKey, onEditCommit: this._onEditCommit, onEditCancel: this.props.onEditCancel, width: this.props.width, actionButtonRenderers: this.props.actionButtonRenderers, isResizeHandleHovered: this.props.isResizeHandleHovered, onResizeHandleHoverChanged: this.props.onResizeHandleHoverChanged, isResizeHandleBeingDragged: this.props.isResizeHandleBeingDragged, onResizeHandleDragChanged: this.props.onResizeHandleDragChanged, columnInfo: this.props.columnInfo,
50
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
51
+ editorSystem: this.props.editorSystem }));
47
52
  })));
48
53
  }
49
54
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyList.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/PropertyList.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAK5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAGlF,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAkD1D;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,gBAAkC,EAClC,cAA8B;IAE9B,OAAO,gBAAgB,CAAC,IAAI,GAAG,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC;AAC9D,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK,CAAC,SAA4B;IAClE,YAAY,KAAwB;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;IAEO,QAAQ,GAAG,KAAK,CAAC,SAAS,EAAkB,CAAC;IAE7C,aAAa,GAAG,CAAC,IAAyB,EAAE,EAAE;QACpD,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ;YAChD,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACvD,CAAC,CAAC;IAEc,MAAM;QACpB,MAAM,qBAAqB,GAAG,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AAC,qBAAqB,EAC/C,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,oBAAoB,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,EAChD,4BAA4B,EAC1B,IAAI,CAAC,KAAK,CAAC,4BAA4B,EAEzC,SAAS,EAAE,GAAG,KAAK,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAChD,YAAY,EAAE,IAAI,CAAC,aAAa,EAChC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,EACrC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EACvD,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EACvD,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B,EACjE,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B,EACjE,yBAAyB,EAAE,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAC/D,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,GACjC,CACH,CAAC;QACJ,CAAC,CAAC,CACE,CACP,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { PropertyUpdatedArgs } from \"../../editors/EditorContainer.js\";\nimport type { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer.js\";\nimport type { PropertyGridColumnInfo } from \"../../properties/renderers/PropertyGridColumns.js\";\nimport { PropertyRenderer } from \"../../properties/renderers/PropertyRenderer.js\";\nimport type { PropertyValueRendererManager } from \"../../properties/ValueRendererManager.js\";\nimport type { PropertyCategory } from \"../PropertyDataProvider.js\";\nimport { Orientation } from \"../../common/Orientation.js\";\n\n/** Properties of [[PropertyList]] React component\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface PropertyListProps extends CommonProps {\n orientation: Orientation;\n width: number;\n category?: PropertyCategory;\n properties: PropertyRecord[];\n selectedPropertyKey?: string;\n onPropertyClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyRightClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyContextMenu?: (\n property: PropertyRecord,\n e: React.MouseEvent\n ) => void;\n columnRatio?: number;\n /** Callback to column ratio changed event */\n onColumnChanged?: (ratio: number) => void | {\n ratio: number;\n };\n propertyValueRendererManager?: PropertyValueRendererManager;\n editingPropertyKey?: string;\n onEditCommit?: (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => void;\n onEditCancel?: () => void;\n /** Enables/disables property hovering effect */\n isPropertyHoverEnabled?: boolean;\n /** Enables/disables property selection */\n isPropertySelectionEnabled?: boolean;\n /** Enables/disables property right click selection */\n isPropertyRightClickSelectionEnabled?: boolean;\n /** Array of action button renderers */\n actionButtonRenderers?: ActionButtonRenderer[];\n /** Is resize handle hovered */\n isResizeHandleHovered?: boolean;\n /** Callback to hover event change */\n onResizeHandleHoverChanged?: (isHovered: boolean) => void;\n /** Is resize handle being dragged */\n isResizeHandleBeingDragged?: boolean;\n /** Callback to drag event change */\n onResizeHandleDragChanged?: (isDragStarted: boolean) => void;\n /** Information for styling property grid columns */\n columnInfo?: PropertyGridColumnInfo;\n}\n\n/**\n * Get unique key for property record\n * @internal\n */\nexport function getPropertyKey(\n propertyCategory: PropertyCategory,\n propertyRecord: PropertyRecord\n) {\n return propertyCategory.name + propertyRecord.property.name;\n}\n\n/** A React component that renders multiple properties within a category as a list.\n * @public\n */\nexport class PropertyList extends React.Component<PropertyListProps> {\n constructor(props: PropertyListProps) {\n super(props);\n }\n\n private _listRef = React.createRef<HTMLDivElement>();\n\n private _onEditCommit = (args: PropertyUpdatedArgs) => {\n if (this.props.onEditCommit && this.props.category)\n this.props.onEditCommit(args, this.props.category);\n };\n\n public override render() {\n const propertyListClassName = classnames(\n this.props.orientation === Orientation.Horizontal\n ? \"components-property-list--horizontal\"\n : \"components-property-list--vertical\",\n this.props.className\n );\n\n return (\n <div\n className={propertyListClassName}\n style={this.props.style}\n ref={this._listRef}\n >\n {this.props.properties.map((propertyRecord: PropertyRecord) => {\n const key = this.props.category\n ? getPropertyKey(this.props.category, propertyRecord)\n : propertyRecord.property.name;\n return (\n <PropertyRenderer\n key={key}\n uniqueKey={key}\n isHoverable={this.props.isPropertyHoverEnabled}\n isSelectable={this.props.isPropertySelectionEnabled}\n isSelected={key === this.props.selectedPropertyKey}\n propertyRecord={propertyRecord}\n orientation={this.props.orientation}\n onClick={\n propertyRecord.value.valueFormat ===\n PropertyValueFormat.Primitive\n ? this.props.onPropertyClicked\n : undefined\n }\n onRightClick={\n propertyRecord.value.valueFormat ===\n PropertyValueFormat.Primitive\n ? this.props.onPropertyRightClicked\n : undefined\n }\n onContextMenu={this.props.onPropertyContextMenu}\n columnRatio={this.props.columnRatio}\n onColumnRatioChanged={this.props.onColumnChanged}\n propertyValueRendererManager={\n this.props.propertyValueRendererManager\n }\n isEditing={key === this.props.editingPropertyKey}\n onEditCommit={this._onEditCommit}\n onEditCancel={this.props.onEditCancel}\n width={this.props.width}\n actionButtonRenderers={this.props.actionButtonRenderers}\n isResizeHandleHovered={this.props.isResizeHandleHovered}\n onResizeHandleHoverChanged={this.props.onResizeHandleHoverChanged}\n isResizeHandleBeingDragged={this.props.isResizeHandleBeingDragged}\n onResizeHandleDragChanged={this.props.onResizeHandleDragChanged}\n columnInfo={this.props.columnInfo}\n />\n );\n })}\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"PropertyList.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/Property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,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAChD,YAAY,EAAE,IAAI,CAAC,aAAa,EAChC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,EACrC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EACvD,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EACvD,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B,EACjE,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B,EACjE,yBAAyB,EAAE,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAC/D,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU;gBACjC,4DAA4D;gBAC5D,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,GACrC,CACH,CAAC;QACJ,CAAC,CAAC,CACE,CACP,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport type { PropertyUpdatedArgs } from \"../../editors/EditorContainer.js\";\nimport type { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer.js\";\nimport type { PropertyGridColumnInfo } from \"../../properties/renderers/PropertyGridColumns.js\";\nimport { PropertyRenderer } from \"../../properties/renderers/PropertyRenderer.js\";\nimport type { PropertyValueRendererManager } from \"../../properties/ValueRendererManager.js\";\nimport type { PropertyCategory } from \"../PropertyDataProvider.js\";\nimport { Orientation } from \"../../common/Orientation.js\";\n\n// eslint-disable-next-line @typescript-eslint/no-deprecated\ninterface PropertyListBaseProps extends CommonProps {\n orientation: Orientation;\n width: number;\n category?: PropertyCategory;\n properties: PropertyRecord[];\n selectedPropertyKey?: string;\n onPropertyClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyRightClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyContextMenu?: (\n property: PropertyRecord,\n e: React.MouseEvent\n ) => void;\n columnRatio?: number;\n /** Callback to column ratio changed event */\n onColumnChanged?: (ratio: number) => void | {\n ratio: number;\n };\n propertyValueRendererManager?: PropertyValueRendererManager;\n editingPropertyKey?: string;\n onEditCommit?: (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => void;\n onEditCancel?: () => void;\n /** Enables/disables property hovering effect */\n isPropertyHoverEnabled?: boolean;\n /** Enables/disables property selection */\n isPropertySelectionEnabled?: boolean;\n /** Enables/disables property right click selection */\n isPropertyRightClickSelectionEnabled?: boolean;\n /** Array of action button renderers */\n actionButtonRenderers?: ActionButtonRenderer[];\n /** Is resize handle hovered */\n isResizeHandleHovered?: boolean;\n /** Callback to hover event change */\n onResizeHandleHoverChanged?: (isHovered: boolean) => void;\n /** Is resize handle being dragged */\n isResizeHandleBeingDragged?: boolean;\n /** Callback to drag event change */\n onResizeHandleDragChanged?: (isDragStarted: boolean) => void;\n /** Information for styling property grid columns */\n columnInfo?: PropertyGridColumnInfo;\n}\n\n/** @public */\ninterface PropertyListLegacyProps extends PropertyListBaseProps {\n /**\n * Specifies which editors system should be used: legacy or the new one.\n * @default \"legacy\"\n * @beta\n * @deprecated in 5.30. Legacy editors system is deprecated. Use `editorSystem: \"new\"`.\n */\n editorSystem?: \"legacy\";\n}\n\n/** @public */\ninterface PropertyListNewProps extends PropertyListBaseProps {\n /**\n * Specifies which editors system should be used: legacy or the new one.\n * @default \"legacy\"\n * @beta\n */\n editorSystem: \"new\";\n}\n\n/** Properties of [[PropertyList]] React component\n * @public\n */\nexport type PropertyListProps = PropertyListLegacyProps | PropertyListNewProps;\n\ninterface PropertyListComponent {\n /**\n * React Component that renders struct and array properties\n * @public\n */\n (props: PropertyListNewProps): React.JSX.Element;\n /**\n * @deprecated in 5.30. Use `PropertyList` with `editorSystem=\"new\"` instead.\n * @public\n */\n (props: PropertyListLegacyProps): React.JSX.Element;\n /** @public */\n (props: PropertyListProps): React.JSX.Element;\n}\n\n/**\n * Get unique key for property record\n * @internal\n */\nexport function getPropertyKey(\n propertyCategory: PropertyCategory,\n propertyRecord: PropertyRecord\n) {\n return propertyCategory.name + propertyRecord.property.name;\n}\n\n/** A React component that renders multiple properties within a category as a list.\n * @public\n */\nexport const PropertyList: PropertyListComponent = (props) => {\n return <PropertyListImpl {...props} />;\n};\n\nclass PropertyListImpl extends React.Component<PropertyListProps> {\n constructor(props: PropertyListProps) {\n super(props);\n }\n\n private _listRef = React.createRef<HTMLDivElement>();\n\n private _onEditCommit = (args: PropertyUpdatedArgs) => {\n if (this.props.onEditCommit && this.props.category)\n this.props.onEditCommit(args, this.props.category);\n };\n\n public override render() {\n const propertyListClassName = classnames(\n this.props.orientation === Orientation.Horizontal\n ? \"components-property-list--horizontal\"\n : \"components-property-list--vertical\",\n this.props.className\n );\n\n return (\n <div\n className={propertyListClassName}\n style={this.props.style}\n ref={this._listRef}\n >\n {this.props.properties.map((propertyRecord: PropertyRecord) => {\n const key = this.props.category\n ? getPropertyKey(this.props.category, propertyRecord)\n : propertyRecord.property.name;\n return (\n <PropertyRenderer\n key={key}\n uniqueKey={key}\n isHoverable={this.props.isPropertyHoverEnabled}\n isSelectable={this.props.isPropertySelectionEnabled}\n isSelected={key === this.props.selectedPropertyKey}\n propertyRecord={propertyRecord}\n orientation={this.props.orientation}\n onClick={\n propertyRecord.value.valueFormat ===\n PropertyValueFormat.Primitive\n ? this.props.onPropertyClicked\n : undefined\n }\n onRightClick={\n propertyRecord.value.valueFormat ===\n PropertyValueFormat.Primitive\n ? this.props.onPropertyRightClicked\n : undefined\n }\n onContextMenu={this.props.onPropertyContextMenu}\n columnRatio={this.props.columnRatio}\n onColumnRatioChanged={this.props.onColumnChanged}\n propertyValueRendererManager={\n this.props.propertyValueRendererManager\n }\n isEditing={key === this.props.editingPropertyKey}\n onEditCommit={this._onEditCommit}\n onEditCancel={this.props.onEditCancel}\n width={this.props.width}\n actionButtonRenderers={this.props.actionButtonRenderers}\n isResizeHandleHovered={this.props.isResizeHandleHovered}\n onResizeHandleHoverChanged={this.props.onResizeHandleHoverChanged}\n isResizeHandleBeingDragged={this.props.isResizeHandleBeingDragged}\n onResizeHandleDragChanged={this.props.onResizeHandleDragChanged}\n columnInfo={this.props.columnInfo}\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n editorSystem={this.props.editorSystem}\n />\n );\n })}\n </div>\n );\n }\n}\n"]}
@@ -15,10 +15,10 @@ import { PropertyCategoryRendererManager } from "../PropertyCategoryRendererMana
15
15
  import type { IPropertyDataProvider, PropertyCategory } from "../PropertyDataProvider.js";
16
16
  import type { CommonPropertyGridProps, PropertyGridContentHighlightProps } from "./PropertyGridCommons.js";
17
17
  import { Orientation } from "../../common/Orientation.js";
18
- /** Properties for [[VirtualizedPropertyGrid]] React component
18
+ /**
19
19
  * @public
20
20
  */
21
- export interface VirtualizedPropertyGridProps extends CommonPropertyGridProps {
21
+ interface VirtualizedPropertyGridBaseProps extends CommonPropertyGridProps {
22
22
  /** Property grid view model that defines what needs to be rendered */
23
23
  model: IPropertyGridModel;
24
24
  /** Handler of the events raised from the property grid */
@@ -33,23 +33,47 @@ export interface VirtualizedPropertyGridProps extends CommonPropertyGridProps {
33
33
  width: number;
34
34
  /** Height of the property grid component. */
35
35
  height: number;
36
+ }
37
+ /** @public */
38
+ interface VirtualizedPropertyGridLegacyProps extends VirtualizedPropertyGridBaseProps {
36
39
  /**
37
40
  * Specifies which editors system should be used: legacy or the new one.
38
41
  * @default "legacy"
39
42
  * @beta
43
+ * @deprecated in 5.30. Legacy editors system is deprecated. Use `editorSystem: "new"`.
40
44
  */
41
- editorSystem?: "legacy" | "new";
45
+ editorSystem?: "legacy";
42
46
  }
43
- /** State of [[VirtualizedPropertyGrid]] React component
44
- * @internal
47
+ /**
48
+ * @public
45
49
  */
46
- interface VirtualizedPropertyGridState {
47
- /** List of PropertyGrid categories */
48
- gridItems: FlatGridItem[];
49
- /** Actual orientation used by the property grid */
50
- orientation: Orientation;
51
- /** Keeps record of dynamic node heights */
52
- dynamicNodeHeights: Map<string, number>;
50
+ interface VirtualizedPropertyGridNewProps extends VirtualizedPropertyGridBaseProps {
51
+ /**
52
+ * Specifies which editors system should be used: legacy or the new one.
53
+ * @default "legacy"
54
+ * @beta
55
+ */
56
+ editorSystem: "new";
57
+ }
58
+ /** Properties for [[VirtualizedPropertyGrid]] React component
59
+ * @public
60
+ * @deprecated in 5.30.0. Use `React.ComponentProps<typeof VirtualizedPropertyGrid>` instead.
61
+ */
62
+ export type VirtualizedPropertyGridProps = VirtualizedPropertyGridLegacyProps | VirtualizedPropertyGridNewProps;
63
+ interface VirtualizedPropertyGridComponent {
64
+ /**
65
+ * [[VirtualizedPropertyGrid]] React Component which takes a data provider and
66
+ * sets up default implementations for `IPropertyGridModelSource` and `IPropertyGridEventHandler`
67
+ * @public
68
+ */
69
+ (props: VirtualizedPropertyGridNewProps): React.JSX.Element;
70
+ /**
71
+ * @deprecated in 5.30. Use `VirtualizedPropertyGrid` with `editorSystem="new"` instead.
72
+ * @public
73
+ */
74
+ (props: VirtualizedPropertyGridLegacyProps): React.JSX.Element;
75
+ /** @public */
76
+ (props: VirtualizedPropertyGridProps): React.JSX.Element;
53
77
  }
54
78
  /**
55
79
  * Context of [[VirtualizedPropertyGrid]] component.
@@ -103,27 +127,7 @@ export interface VirtualizedPropertyGridContext {
103
127
  * VirtualizedPropertyGrid React component.
104
128
  * @public
105
129
  */
106
- export declare class VirtualizedPropertyGrid extends React.Component<VirtualizedPropertyGridProps, VirtualizedPropertyGridState> {
107
- private _listRef;
108
- constructor(props: VirtualizedPropertyGridProps);
109
- /** @internal */
110
- componentDidUpdate(prevProps: VirtualizedPropertyGridProps): void;
111
- /** @internal */
112
- static getDerivedStateFromProps(props: VirtualizedPropertyGridProps, state: VirtualizedPropertyGridState): VirtualizedPropertyGridState | null;
113
- private updateOrientation;
114
- /**
115
- * Calculate given node height depending on it's type, position in category, parent category depth and current orientation.
116
- * @param node FlatGridItem node for which to calculate height
117
- * @returns current height of node.
118
- */
119
- private calculateNodeHeight;
120
- private _handleNodeHeightChange;
121
- private _calculateNodeHeightByIndex;
122
- private calculateEstimatedHeight;
123
- private _getNodeKey;
124
- private _getMaxItemDepth;
125
- render(): React.JSX.Element;
126
- }
130
+ export declare const VirtualizedPropertyGrid: VirtualizedPropertyGridComponent;
127
131
  /**
128
132
  * Returns callbacks for persisting and restoring [[VirtualizedPropertyGrid]] layout state.
129
133
  * Returned `ref` should be set on container containing [[VirtualizedPropertyGrid]].
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualizedPropertyGrid.d.ts","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/VirtualizedPropertyGrid.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,gCAAgC,CAAC;AAExC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAChG,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AAE7F,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,wCAAwC,CAAC;AAMhD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,OAAO,EA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AC;IAC/B,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG;QAC9C,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,yBAAyB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvD,0BAA0B,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAExD,SAAS,CAAC,EAAE,iCAAiC,CAAC;CAC/C;AAeD;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,KAAK,CAAC,SAAS,CAC1D,4BAA4B,EAC5B,4BAA4B,CAC7B;IACC,OAAO,CAAC,QAAQ,CAAuC;gBAE3C,KAAK,EAAE,4BAA4B;IAgB/C,gBAAgB;IACA,kBAAkB,CAAC,SAAS,EAAE,4BAA4B;IAyC1E,gBAAgB;WACF,wBAAwB,CACpC,KAAK,EAAE,4BAA4B,EACnC,KAAK,EAAE,4BAA4B,GAClC,4BAA4B,GAAG,IAAI;IAOtC,OAAO,CAAC,iBAAiB;IAgBzB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAuB3B,OAAO,CAAC,uBAAuB,CAqB7B;IAEF,OAAO,CAAC,2BAA2B,CAGjC;IAEF,OAAO,CAAC,wBAAwB;IAQhC,OAAO,CAAC,WAAW,CAGjB;IAEF,OAAO,CAAC,gBAAgB,CAQtB;IAEc,MAAM;CA8GvB;AAoCD;;;;GAIG;AACH,wBAAgB,uCAAuC,CAAC,CAAC,SAAS,OAAO;;;;EAExE"}
1
+ {"version":3,"file":"VirtualizedPropertyGrid.d.ts","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/VirtualizedPropertyGrid.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,gCAAgC,CAAC;AAExC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM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AM,KAAK,IAAI,CAAC;IAC1E,qBAAqB,CAAC,EAAE,CACtB,QAAQ,EAAE,cAAc,EACxB,CAAC,EAAE,KAAK,CAAC,UAAU,KAChB,IAAI,CAAC;IAEV,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,CACb,IAAI,EAAE,mBAAmB,EACzB,QAAQ,EAAE,gBAAgB,KACvB,IAAI,CAAC;IACV,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,EAAE,QAAQ,GAAG,KAAK,CAAC;IAE/B,YAAY,EAAE,yBAAyB,CAAC;IACxC,YAAY,EAAE,qBAAqB,CAAC;IAEpC,qBAAqB,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAC/C,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;IAC5D,+BAA+B,CAAC,EAAE,+BAA+B,CAAC;IAElE,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,sBAAsB,CAAC;IACnC,0BAA0B,EAAE,OAAO,CAAC;IACpC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG;QAC9C,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,yBAAyB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvD,0BAA0B,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAExD,SAAS,CAAC,EAAE,iCAAiC,CAAC;CAC/C;AAeD;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,gCAIrC,CAAC;AAiUF;;;;GAIG;AACH,wBAAgB,uCAAuC,CAAC,CAAC,SAAS,OAAO;;;;EAExE"}
@@ -34,8 +34,12 @@ const VERTICAL_CATEGORY_PROPERTY_HEIGHT = 48;
34
34
  * VirtualizedPropertyGrid React component.
35
35
  * @public
36
36
  */
37
- export class VirtualizedPropertyGrid extends React.Component {
37
+ export const VirtualizedPropertyGrid = (props) => {
38
+ return React.createElement(VirtualizedPropertyGridImpl, { ...props });
39
+ };
40
+ class VirtualizedPropertyGridImpl extends React.Component {
38
41
  _listRef = React.createRef();
42
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
39
43
  constructor(props) {
40
44
  super(props);
41
45
  this.state = {
@@ -45,7 +49,7 @@ export class VirtualizedPropertyGrid extends React.Component {
45
49
  dynamicNodeHeights: new Map(),
46
50
  };
47
51
  }
48
- /** @internal */
52
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
49
53
  componentDidUpdate(prevProps) {
50
54
  if (this.props.orientation !== prevProps.orientation ||
51
55
  this.props.isOrientationFixed !== prevProps.isOrientationFixed ||
@@ -80,8 +84,9 @@ export class VirtualizedPropertyGrid extends React.Component {
80
84
  }
81
85
  }
82
86
  }
83
- /** @internal */
84
- static getDerivedStateFromProps(props, state) {
87
+ static getDerivedStateFromProps(
88
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
89
+ props, state) {
85
90
  return {
86
91
  ...state,
87
92
  gridItems: props.model.getVisibleFlatGrid(),
@@ -174,6 +179,7 @@ export class VirtualizedPropertyGrid extends React.Component {
174
179
  editingPropertyKey: selectionContext.editingPropertyKey,
175
180
  onEditCommit: selectionContext.onEditCommit,
176
181
  onEditCancel: selectionContext.onEditCancel,
182
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
177
183
  editorSystem: this.props.editorSystem ?? "legacy",
178
184
  eventHandler: this.props.eventHandler,
179
185
  dataProvider: this.props.dataProvider,
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualizedPropertyGrid.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/VirtualizedPropertyGrid.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;GAEG;AACH,OAAO,gCAAgC,CAAC;AACxC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,QAAQ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EAAE,GAAG,SAAS,IAAI;gBAC3B,OAAO,EAAE,MAAM;aAChB;YAED,6BACE,GAAG,EAAE,MAAM,EACX,SAAS,EAAC,4CAA4C,IAErD,cAAc,EAAE,CACb,CACF,CACF,CACP,CAAC;AACJ,CAAC,EACD,QAAQ,CACT,CAAC;AAEF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AASlD,MAAM,qBAAqB,GAAyC,CAAC,KAAK,EAAE,EAAE;IAC5E,MAAM,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAClC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAElD,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE;QACzB,MAAM,CAAC,MAAM,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC;QAChC,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,MAAM,CAAC;QACpE,eAAe,CAAC,aAAa,CAAC,CAAC;IACjC,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC,CAAC;IAErD,OAAO,6BAAK,GAAG,EAAE,MAAM,IAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAO,CAAC;AAC9E,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport \"./VirtualizedPropertyGrid.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type {\n ListChildComponentProps,\n VariableSizeListProps,\n} from \"react-window\";\nimport { areEqual, VariableSizeList } from \"react-window\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { assert } from \"@itwin/core-bentley\";\nimport { createContextWithMandatoryProvider } from \"../../common/UseContextWithMandatoryProvider.js\";\nimport type { PropertyUpdatedArgs } from \"../../editors/EditorContainer.js\";\nimport type { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer.js\";\nimport type { PropertyGridColumnInfo } from \"../../properties/renderers/PropertyGridColumns.js\";\nimport type { PropertyValueRendererManager } from \"../../properties/ValueRendererManager.js\";\nimport { FilteredType } from \"../dataproviders/filterers/PropertyDataFiltererBase.js\";\nimport type {\n FlatGridItem,\n GridCategoryItem,\n} from \"../internal/flat-items/FlatGridItem.js\";\nimport { MutableCategorizedPrimitiveProperty } from \"../internal/flat-items/MutableCategorizedPrimitiveProperty.js\";\nimport { MutableCustomGridCategory } from \"../internal/flat-items/MutableCustomGridCategory.js\";\nimport { FlatGridItemType } from \"../internal/flat-items/MutableFlatGridItem.js\";\nimport { MutableGridCategory } from \"../internal/flat-items/MutableGridCategory.js\";\nimport { FlatPropertyRenderer } from \"../internal/flat-properties/FlatPropertyRenderer.js\";\nimport type { IPropertyGridEventHandler } from \"../internal/PropertyGridEventHandler.js\";\nimport type { IPropertyGridModel } from \"../internal/PropertyGridModel.js\";\nimport type { PropertyCategoryRendererProps } from \"../PropertyCategoryRendererManager.js\";\nimport { PropertyCategoryRendererManager } from \"../PropertyCategoryRendererManager.js\";\nimport type {\n IPropertyDataProvider,\n PropertyCategory,\n} from \"../PropertyDataProvider.js\";\nimport { ColumnResizingPropertyListPropsSupplier } from \"./ColumnResizingPropertyListPropsSupplier.js\";\nimport { FlatItemNestedBorderWrapper } from \"./FlatItemNestedBorderWrapper.js\";\nimport { PropertyCategoryBlock } from \"./PropertyCategoryBlock.js\";\nimport type {\n CommonPropertyGridProps,\n PropertyGridContentHighlightProps,\n} from \"./PropertyGridCommons.js\";\nimport { PropertyGridCommons } from \"./PropertyGridCommons.js\";\nimport { PropertyGridEventsRelatedPropsSupplier } from \"./PropertyGridEventsRelatedPropsSupplier.js\";\nimport { useElementsScrollStorage } from \"../../common/UseElementsScrollStorage.js\";\nimport { Orientation } from \"../../common/Orientation.js\";\n\n/** Properties for [[VirtualizedPropertyGrid]] React component\n * @public\n */\nexport interface VirtualizedPropertyGridProps extends CommonPropertyGridProps {\n /** Property grid view model that defines what needs to be rendered */\n model: IPropertyGridModel;\n /** Handler of the events raised from the property grid */\n eventHandler: IPropertyGridEventHandler;\n /** Property data provider used by the property grid */\n dataProvider: IPropertyDataProvider;\n /** Properties for highlighting property data in the grid. */\n highlight?: PropertyGridContentHighlightProps;\n /** Custom property category renderer manager. Defaults to [[PropertyCategoryRendererManager.defaultManager]]. */\n propertyCategoryRendererManager?: PropertyCategoryRendererManager;\n /** Width of the property grid component. */\n width: number;\n /** Height of the property grid component. */\n height: number;\n /**\n * Specifies which editors system should be used: legacy or the new one.\n * @default \"legacy\"\n * @beta\n */\n editorSystem?: \"legacy\" | \"new\";\n}\n\n/** State of [[VirtualizedPropertyGrid]] React component\n * @internal\n */\ninterface VirtualizedPropertyGridState {\n /** List of PropertyGrid categories */\n gridItems: FlatGridItem[];\n /** Actual orientation used by the property grid */\n orientation: Orientation;\n /** Keeps record of dynamic node heights */\n dynamicNodeHeights: Map<string, number>;\n}\n\n/**\n * Context of [[VirtualizedPropertyGrid]] component.\n * @internal\n */\nexport interface PropertyGridInternalContext {\n gridItems: FlatGridItem[];\n gridEventHandler: IPropertyGridEventHandler;\n gridModel: IPropertyGridModel;\n\n style?: React.CSSProperties;\n className?: string;\n gridContext: VirtualizedPropertyGridContext;\n onItemHeightChanged: (index: number, key: string, height: number) => void;\n}\n\n/**\n * Context of the surrounding [[VirtualizedPropertyGrid]] component.\n * @public\n */\nexport interface VirtualizedPropertyGridContext {\n orientation: Orientation;\n gridWidth: number;\n\n isPropertyHoverEnabled: boolean;\n isPropertySelectionEnabled: boolean;\n selectedPropertyKey?: string;\n isPropertyEditingEnabled?: boolean;\n\n alwaysShowEditor?: (property: PropertyRecord) => boolean;\n onPropertyClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyRightClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyContextMenu?: (\n property: PropertyRecord,\n e: React.MouseEvent\n ) => void;\n\n editingPropertyKey?: string;\n onEditCommit?: (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => void;\n onEditCancel?: () => void;\n editorSystem: \"legacy\" | \"new\";\n\n eventHandler: IPropertyGridEventHandler;\n dataProvider: IPropertyDataProvider;\n\n actionButtonRenderers?: ActionButtonRenderer[];\n propertyValueRendererManager?: PropertyValueRendererManager;\n propertyCategoryRendererManager?: PropertyCategoryRendererManager;\n\n columnRatio: number;\n columnInfo: PropertyGridColumnInfo;\n isResizeHandleBeingDragged: boolean;\n isResizeHandleHovered: boolean;\n onColumnRatioChanged: (ratio: number) => void | {\n ratio: number;\n };\n onResizeHandleDragChanged: (newValue: boolean) => void;\n onResizeHandleHoverChanged: (newValue: boolean) => void;\n\n highlight?: PropertyGridContentHighlightProps;\n}\n\nconst [\n PropertyGridInternalContextProvider,\n _PropertyGridInternalContextConsumer,\n usePropertyGridInternalContext,\n] = createContextWithMandatoryProvider<PropertyGridInternalContext>(\n \"PropertyGridInternalContext\"\n);\n\nconst ACTION_BUTTON_DEFAULT_WIDTH = 90;\nconst CATEGORY_HEADER_HEIGHT = 42;\nconst CATEGORY_PROPERTY_HEIGHT = 28;\nconst VERTICAL_CATEGORY_PROPERTY_HEIGHT = 48;\n\n/**\n * VirtualizedPropertyGrid React component.\n * @public\n */\nexport class VirtualizedPropertyGrid extends React.Component<\n VirtualizedPropertyGridProps,\n VirtualizedPropertyGridState\n> {\n private _listRef = React.createRef<VariableSizeList>();\n\n constructor(props: VirtualizedPropertyGridProps) {\n super(props);\n this.state = {\n gridItems: [],\n orientation:\n props.orientation ??\n PropertyGridCommons.getCurrentOrientation(\n props.width,\n undefined,\n props.isOrientationFixed,\n props.horizontalOrientationMinWidth\n ),\n dynamicNodeHeights: new Map(),\n };\n }\n\n /** @internal */\n public override componentDidUpdate(prevProps: VirtualizedPropertyGridProps) {\n if (\n this.props.orientation !== prevProps.orientation ||\n this.props.isOrientationFixed !== prevProps.isOrientationFixed ||\n this.props.horizontalOrientationMinWidth !==\n prevProps.horizontalOrientationMinWidth ||\n this.props.width !== prevProps.width\n )\n this.updateOrientation(this.props.width);\n\n if (this.props.model !== prevProps.model) {\n if (this._listRef.current) this._listRef.current.resetAfterIndex(0);\n }\n\n if (\n this.props.highlight !== prevProps.highlight &&\n this.props.highlight?.activeHighlight &&\n this.state.gridItems.length !== 0\n ) {\n let index = 0;\n let foundMatchingItem = false;\n for (const item of this.state.gridItems) {\n if (\n (item instanceof MutableCategorizedPrimitiveProperty &&\n this.props.highlight.activeHighlight.highlightedItemIdentifier ===\n item.derivedRecord.property.name) ||\n (item instanceof MutableGridCategory &&\n this.props.highlight.activeHighlight.highlightedItemIdentifier ===\n item.name)\n ) {\n foundMatchingItem = true;\n break;\n }\n index++;\n }\n if (foundMatchingItem) {\n if (this._listRef.current) this._listRef.current.scrollToItem(index);\n }\n }\n }\n\n /** @internal */\n public static getDerivedStateFromProps(\n props: VirtualizedPropertyGridProps,\n state: VirtualizedPropertyGridState\n ): VirtualizedPropertyGridState | null {\n return {\n ...state,\n gridItems: props.model.getVisibleFlatGrid(),\n };\n }\n\n private updateOrientation(width: number) {\n const { orientation, isOrientationFixed, horizontalOrientationMinWidth } = {\n ...this.props,\n };\n const currentOrientation = PropertyGridCommons.getCurrentOrientation(\n width,\n orientation,\n isOrientationFixed,\n horizontalOrientationMinWidth\n );\n\n if (currentOrientation !== this.state.orientation) {\n this.setState({ orientation: currentOrientation });\n }\n }\n\n /**\n * Calculate given node height depending on it's type, position in category, parent category depth and current orientation.\n * @param node FlatGridItem node for which to calculate height\n * @returns current height of node.\n */\n private calculateNodeHeight(node: FlatGridItem) {\n return getPropertyHeight(this.state);\n\n function getPropertyHeight(state: VirtualizedPropertyGridState) {\n const dynamicHeight = state.dynamicNodeHeights.get(node.key);\n if (dynamicHeight !== undefined) {\n if (node instanceof MutableCustomGridCategory) {\n return CATEGORY_HEADER_HEIGHT + (node.isExpanded ? dynamicHeight : 0);\n }\n\n return dynamicHeight;\n }\n\n if (node.type === FlatGridItemType.Category) {\n return CATEGORY_HEADER_HEIGHT;\n }\n\n return state.orientation === Orientation.Vertical\n ? VERTICAL_CATEGORY_PROPERTY_HEIGHT\n : CATEGORY_PROPERTY_HEIGHT;\n }\n }\n\n private _handleNodeHeightChange = (\n index: number,\n key: string,\n newHeight: number\n ) => {\n if (this.state.dynamicNodeHeights.get(key) === newHeight) {\n return;\n }\n\n this.setState(\n (state) => {\n return {\n ...state,\n dynamicNodeHeights: new Map(state.dynamicNodeHeights).set(\n key,\n newHeight\n ),\n };\n },\n () => this._listRef.current!.resetAfterIndex(index)\n );\n };\n\n private _calculateNodeHeightByIndex = (index: number) => {\n const node = this.state.gridItems[index];\n return this.calculateNodeHeight(node);\n };\n\n private calculateEstimatedHeight() {\n let sum = 0;\n for (const node of this.state.gridItems)\n sum += this.calculateNodeHeight(node);\n\n return Math.ceil(sum / this.state.gridItems.length);\n }\n\n private _getNodeKey = (index: number) => {\n const node = this.state.gridItems[index];\n return node.key;\n };\n\n private _getMaxItemDepth = () => {\n let depth = 0;\n for (const item of this.state.gridItems) {\n if (depth < item.depth) {\n depth = item.depth;\n }\n }\n return depth + 1;\n };\n\n public override render() {\n const defaultActionButtonWidth =\n (this.props.actionButtonRenderers?.length ?? 0) > 0\n ? ACTION_BUTTON_DEFAULT_WIDTH\n : undefined;\n\n return (\n <ColumnResizingPropertyListPropsSupplier\n orientation={this.state.orientation}\n width={this.props.width}\n minLabelWidth={this.props.minLabelWidth}\n minValueWidth={this.props.minValueWidth}\n actionButtonWidth={\n this.props.actionButtonWidth !== undefined\n ? this.props.actionButtonWidth\n : defaultActionButtonWidth\n }\n maxPropertyDepth={this._getMaxItemDepth()}\n >\n {(columnResizeContext) => (\n <PropertyGridEventsRelatedPropsSupplier\n isPropertySelectionEnabled={\n this.props.isPropertySelectionEnabled ?? false\n }\n isPropertySelectionOnRightClickEnabled={\n this.props.isPropertySelectionOnRightClickEnabled\n }\n isPropertyEditingEnabled={this.props.isPropertyEditingEnabled}\n onPropertyContextMenu={this.props.onPropertyContextMenu}\n onPropertyUpdated={this.props.onPropertyUpdated}\n onPropertySelectionChanged={this.props.onPropertySelectionChanged}\n isPropertyHoverEnabled={this.props.isPropertyHoverEnabled ?? false}\n >\n {(selectionContext) => {\n const gridContext: VirtualizedPropertyGridContext = {\n orientation: columnResizeContext.orientation,\n gridWidth: this.props.width,\n\n isPropertyHoverEnabled: selectionContext.isPropertyHoverEnabled,\n isPropertySelectionEnabled:\n selectionContext.isPropertySelectionEnabled,\n selectedPropertyKey: selectionContext.selectedPropertyKey,\n isPropertyEditingEnabled: this.props.isPropertyEditingEnabled,\n\n alwaysShowEditor: this.props.alwaysShowEditor,\n onPropertyClicked: selectionContext.onPropertyClicked,\n onPropertyRightClicked: selectionContext.onPropertyRightClicked,\n onPropertyContextMenu: selectionContext.onPropertyContextMenu,\n\n editingPropertyKey: selectionContext.editingPropertyKey,\n onEditCommit: selectionContext.onEditCommit,\n onEditCancel: selectionContext.onEditCancel,\n editorSystem: this.props.editorSystem ?? \"legacy\",\n\n eventHandler: this.props.eventHandler,\n dataProvider: this.props.dataProvider,\n\n actionButtonRenderers: this.props.actionButtonRenderers,\n propertyValueRendererManager:\n this.props.propertyValueRendererManager,\n propertyCategoryRendererManager:\n this.props.propertyCategoryRendererManager,\n\n columnRatio: columnResizeContext.columnRatio,\n columnInfo: columnResizeContext.columnInfo,\n isResizeHandleBeingDragged:\n columnResizeContext.isResizeHandleBeingDragged,\n isResizeHandleHovered:\n columnResizeContext.isResizeHandleHovered,\n onColumnRatioChanged: columnResizeContext.onColumnChanged,\n onResizeHandleDragChanged:\n columnResizeContext.onResizeHandleDragChanged,\n onResizeHandleHoverChanged:\n columnResizeContext.onResizeHandleHoverChanged,\n\n highlight: this.props.highlight,\n };\n\n const renderContext: PropertyGridInternalContext = {\n gridItems: this.state.gridItems,\n gridEventHandler: this.props.eventHandler,\n gridModel: this.props.model,\n style: this.props.style,\n className: this.props.className,\n onItemHeightChanged: this._handleNodeHeightChange,\n gridContext,\n };\n\n return (\n <PropertyGridInternalContextProvider value={renderContext}>\n <VirtualizedPropertyGridInternal\n width={this.props.width}\n height={this.props.height}\n itemCount={this.state.gridItems.length}\n itemSize={this._calculateNodeHeightByIndex}\n estimatedItemSize={this.calculateEstimatedHeight()}\n overscanCount={10}\n layout=\"vertical\"\n style={this.props.style}\n itemKey={this._getNodeKey}\n ref={this._listRef}\n />\n </PropertyGridInternalContextProvider>\n );\n }}\n </PropertyGridEventsRelatedPropsSupplier>\n )}\n </ColumnResizingPropertyListPropsSupplier>\n );\n }\n}\n\nconst VirtualizedPropertyGridInternal = React.forwardRef<\n VariableSizeList,\n Omit<VariableSizeListProps, \"children\">\n>(function VirtualizedPropertyGridInternal(props, ref) {\n const { gridContext } = usePropertyGridInternalContext(FlatGridItemNode);\n\n React.useEffect(() => {\n return gridContext.dataProvider.onDataChanged.addListener(() => {\n gridContext.onEditCancel?.();\n });\n }, [gridContext]);\n\n return (\n <div\n className={classnames(\n \"components-virtualized-property-grid\",\n \"components-smallEditor-host\"\n )}\n >\n <VariableSizeList\n {...props}\n className={classnames(\n \"components-property-grid-wrapper\",\n \"ReactWindow__VariableSizeList\",\n props.className\n )}\n ref={ref}\n >\n {FlatGridItemNode}\n </VariableSizeList>\n </div>\n );\n});\n\n/**\n * Returns callbacks for persisting and restoring [[VirtualizedPropertyGrid]] layout state.\n * Returned `ref` should be set on container containing [[VirtualizedPropertyGrid]].\n * @public\n */\nexport function useVirtualizedPropertyGridLayoutStorage<T extends Element>() {\n return useElementsScrollStorage<T>(\"ReactWindow__VariableSizeList\");\n}\n\nconst FlatGridItemNode = React.memo(\n ({ index, style: virtualizedListStyle }: ListChildComponentProps) => {\n const {\n gridItems,\n gridEventHandler,\n gridModel,\n gridContext,\n className,\n style,\n onItemHeightChanged,\n } = usePropertyGridInternalContext(FlatGridItemNode);\n const node = gridItems[index];\n const divRef = React.useRef<HTMLDivElement>(null);\n const previousHeightRef = React.useRef(0);\n\n const onExpansionToggled = React.useCallback(\n () => gridEventHandler.onExpansionToggled(node.selectionKey),\n [gridEventHandler, node.selectionKey]\n );\n const onHeightChanged = React.useCallback(\n (newHeight: number) => onItemHeightChanged(index, node.key, newHeight),\n [onItemHeightChanged, index, node.key]\n );\n\n const minHeight = React.useMemo(() => {\n if (node.type === FlatGridItemType.Category)\n return CATEGORY_HEADER_HEIGHT;\n\n return gridContext.orientation === Orientation.Vertical\n ? VERTICAL_CATEGORY_PROPERTY_HEIGHT\n : CATEGORY_PROPERTY_HEIGHT;\n }, [gridContext.orientation, node.type]);\n\n React.useLayoutEffect(() => {\n assert(divRef.current !== null);\n const refHeight = divRef.current.getBoundingClientRect().height;\n const currentHeight = Math.max(refHeight, minHeight);\n\n if (currentHeight !== previousHeightRef.current) {\n onHeightChanged(currentHeight);\n previousHeightRef.current = currentHeight;\n }\n });\n\n function getDisplayNode() {\n const lastInNumberOfCategories = node.lastInNumberOfCategories;\n switch (node.type) {\n case FlatGridItemType.Category:\n const categoryRendererManager =\n gridContext.propertyCategoryRendererManager ??\n PropertyCategoryRendererManager.defaultManager;\n const customRenderer =\n categoryRendererManager.getCategoryComponent(node);\n const wrapperClassName = classnames(\n \"virtualized-grid-node-content\",\n customRenderer !== undefined\n ? \"virtualized-grid-node-custom-category\"\n : \"virtualized-grid-node-category\"\n );\n return (\n <FlatItemNestedBorderWrapper\n borderCount={node.depth}\n bottomBorderCount={lastInNumberOfCategories}\n className={wrapperClassName}\n >\n <PropertyCategoryBlock\n className={className}\n style={style}\n category={node.derivedCategory}\n onExpansionToggled={onExpansionToggled}\n highlight={\n gridContext.highlight?.filteredTypes?.includes(\n FilteredType.Category\n )\n ? gridContext.highlight\n : undefined\n }\n >\n {customRenderer !== undefined && (\n <CustomCategoryContent\n renderer={customRenderer}\n categoryItem={node}\n gridContext={gridContext}\n onHeightChanged={onHeightChanged}\n />\n )}\n </PropertyCategoryBlock>\n </FlatItemNestedBorderWrapper>\n );\n case FlatGridItemType.Array:\n case FlatGridItemType.Struct:\n case FlatGridItemType.Primitive:\n const selectionKey = node.selectionKey;\n const parentCategoryItem = gridModel.getItem(\n node.parentCategorySelectionKey\n ) as GridCategoryItem;\n\n return (\n <FlatItemNestedBorderWrapper\n borderCount={parentCategoryItem.depth + 1}\n bottomBorderCount={lastInNumberOfCategories}\n className=\"virtualized-grid-node-content\"\n >\n <FlatPropertyRenderer\n key={node.key}\n uniqueKey={selectionKey}\n propertyRecord={node.derivedRecord}\n orientation={gridContext.orientation}\n indentation={node.depth}\n width={gridContext.gridWidth}\n isHoverable={gridContext.isPropertyHoverEnabled}\n isSelectable={gridContext.isPropertySelectionEnabled}\n isSelected={selectionKey === gridContext.selectedPropertyKey}\n onClick={gridContext.onPropertyClicked}\n onRightClick={gridContext.onPropertyRightClicked}\n onContextMenu={gridContext.onPropertyContextMenu}\n category={parentCategoryItem.derivedCategory}\n isEditing={selectionKey === gridContext.editingPropertyKey}\n isPropertyEditingEnabled={gridContext.isPropertyEditingEnabled}\n alwaysShowEditor={gridContext.alwaysShowEditor}\n onEditCommit={gridContext.onEditCommit}\n onEditCancel={gridContext.onEditCancel}\n editorSystem={gridContext.editorSystem}\n isExpanded={node.isExpanded}\n onExpansionToggled={onExpansionToggled}\n onHeightChanged={onHeightChanged}\n actionButtonRenderers={gridContext.actionButtonRenderers}\n propertyValueRendererManager={\n gridContext.propertyValueRendererManager\n }\n columnRatio={gridContext.columnRatio}\n columnInfo={gridContext.columnInfo}\n isResizeHandleBeingDragged={\n gridContext.isResizeHandleBeingDragged\n }\n isResizeHandleHovered={gridContext.isResizeHandleHovered}\n onColumnRatioChanged={gridContext.onColumnRatioChanged}\n onResizeHandleDragChanged={\n gridContext.onResizeHandleDragChanged\n }\n onResizeHandleHoverChanged={\n gridContext.onResizeHandleHoverChanged\n }\n highlight={\n gridContext.highlight\n ? {\n applyOnLabel:\n gridContext.highlight.filteredTypes?.includes(\n FilteredType.Label\n ) ?? false,\n applyOnValue:\n gridContext.highlight.filteredTypes?.includes(\n FilteredType.Value\n ) ?? false,\n ...gridContext.highlight,\n }\n : undefined\n }\n />\n </FlatItemNestedBorderWrapper>\n );\n }\n }\n\n return (\n <div className=\"virtualized-grid-node\" style={virtualizedListStyle}>\n <div\n className=\"virtualized-grid-node-content-wrapper\"\n style={{\n minHeight: `${minHeight}px`,\n display: \"grid\",\n }}\n >\n <div\n ref={divRef}\n className=\"virtualized-grid-node-content-wrapper-item\"\n >\n {getDisplayNode()}\n </div>\n </div>\n </div>\n );\n },\n areEqual\n);\n\nFlatGridItemNode.displayName = \"FlatGridItemNode\";\n\ninterface CustomCategoryContentProps {\n categoryItem: GridCategoryItem;\n renderer: React.ComponentType<PropertyCategoryRendererProps>;\n gridContext: VirtualizedPropertyGridContext;\n onHeightChanged: (newHeight: number) => void;\n}\n\nconst CustomCategoryContent: React.FC<CustomCategoryContentProps> = (props) => {\n const { onHeightChanged } = props;\n const divRef = React.useRef<HTMLDivElement>(null);\n\n React.useLayoutEffect(() => {\n assert(divRef.current !== null);\n const contentHeight = divRef.current.getBoundingClientRect().height;\n onHeightChanged(contentHeight);\n }, [props.gridContext.orientation, onHeightChanged]);\n\n return <div ref={divRef}>{React.createElement(props.renderer, props)}</div>;\n};\n"]}
1
+ {"version":3,"file":"VirtualizedPropertyGrid.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/VirtualizedPropertyGrid.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;GAEG;AACH,OAAO,gCAAgC,CAAC;AACxC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,kCAAkC,EAAE,M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CAAuC,EACjD,KAAK,EAAE;gBACL,SAAS,EAAE,GAAG,SAAS,IAAI;gBAC3B,OAAO,EAAE,MAAM;aAChB;YAED,6BACE,GAAG,EAAE,MAAM,EACX,SAAS,EAAC,4CAA4C,IAErD,cAAc,EAAE,CACb,CACF,CACF,CACP,CAAC;AACJ,CAAC,EACD,QAAQ,CACT,CAAC;AAEF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AASlD,MAAM,qBAAqB,GAAyC,CAAC,KAAK,EAAE,EAAE;IAC5E,MAAM,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAClC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAElD,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE;QACzB,MAAM,CAAC,MAAM,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC;QAChC,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,MAAM,CAAC;QACpE,eAAe,CAAC,aAAa,CAAC,CAAC;IACjC,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC,CAAC;IAErD,OAAO,6BAAK,GAAG,EAAE,MAAM,IAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAO,CAAC;AAC9E,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport \"./VirtualizedPropertyGrid.scss\";\nimport classnames from \"classnames\";\nimport * as React from \"react\";\nimport type {\n ListChildComponentProps,\n VariableSizeListProps,\n} from \"react-window\";\nimport { areEqual, VariableSizeList } from \"react-window\";\nimport type { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { assert } from \"@itwin/core-bentley\";\nimport { createContextWithMandatoryProvider } from \"../../common/UseContextWithMandatoryProvider.js\";\nimport type { PropertyUpdatedArgs } from \"../../editors/EditorContainer.js\";\nimport type { ActionButtonRenderer } from \"../../properties/renderers/ActionButtonRenderer.js\";\nimport type { PropertyGridColumnInfo } from \"../../properties/renderers/PropertyGridColumns.js\";\nimport type { PropertyValueRendererManager } from \"../../properties/ValueRendererManager.js\";\nimport { FilteredType } from \"../dataproviders/filterers/PropertyDataFiltererBase.js\";\nimport type {\n FlatGridItem,\n GridCategoryItem,\n} from \"../internal/flat-items/FlatGridItem.js\";\nimport { MutableCategorizedPrimitiveProperty } from \"../internal/flat-items/MutableCategorizedPrimitiveProperty.js\";\nimport { MutableCustomGridCategory } from \"../internal/flat-items/MutableCustomGridCategory.js\";\nimport { FlatGridItemType } from \"../internal/flat-items/MutableFlatGridItem.js\";\nimport { MutableGridCategory } from \"../internal/flat-items/MutableGridCategory.js\";\nimport { FlatPropertyRenderer } from \"../internal/flat-properties/FlatPropertyRenderer.js\";\nimport type { IPropertyGridEventHandler } from \"../internal/PropertyGridEventHandler.js\";\nimport type { IPropertyGridModel } from \"../internal/PropertyGridModel.js\";\nimport type { PropertyCategoryRendererProps } from \"../PropertyCategoryRendererManager.js\";\nimport { PropertyCategoryRendererManager } from \"../PropertyCategoryRendererManager.js\";\nimport type {\n IPropertyDataProvider,\n PropertyCategory,\n} from \"../PropertyDataProvider.js\";\nimport { ColumnResizingPropertyListPropsSupplier } from \"./ColumnResizingPropertyListPropsSupplier.js\";\nimport { FlatItemNestedBorderWrapper } from \"./FlatItemNestedBorderWrapper.js\";\nimport { PropertyCategoryBlock } from \"./PropertyCategoryBlock.js\";\nimport type {\n CommonPropertyGridProps,\n PropertyGridContentHighlightProps,\n} from \"./PropertyGridCommons.js\";\nimport { PropertyGridCommons } from \"./PropertyGridCommons.js\";\nimport { PropertyGridEventsRelatedPropsSupplier } from \"./PropertyGridEventsRelatedPropsSupplier.js\";\nimport { useElementsScrollStorage } from \"../../common/UseElementsScrollStorage.js\";\nimport { Orientation } from \"../../common/Orientation.js\";\n\n/**\n * @public\n */\ninterface VirtualizedPropertyGridBaseProps extends CommonPropertyGridProps {\n /** Property grid view model that defines what needs to be rendered */\n model: IPropertyGridModel;\n /** Handler of the events raised from the property grid */\n eventHandler: IPropertyGridEventHandler;\n /** Property data provider used by the property grid */\n dataProvider: IPropertyDataProvider;\n /** Properties for highlighting property data in the grid. */\n highlight?: PropertyGridContentHighlightProps;\n /** Custom property category renderer manager. Defaults to [[PropertyCategoryRendererManager.defaultManager]]. */\n propertyCategoryRendererManager?: PropertyCategoryRendererManager;\n /** Width of the property grid component. */\n width: number;\n /** Height of the property grid component. */\n height: number;\n}\n\n/** @public */\ninterface VirtualizedPropertyGridLegacyProps\n extends VirtualizedPropertyGridBaseProps {\n /**\n * Specifies which editors system should be used: legacy or the new one.\n * @default \"legacy\"\n * @beta\n * @deprecated in 5.30. Legacy editors system is deprecated. Use `editorSystem: \"new\"`.\n */\n editorSystem?: \"legacy\";\n}\n\n/**\n * @public\n */\ninterface VirtualizedPropertyGridNewProps\n extends VirtualizedPropertyGridBaseProps {\n /**\n * Specifies which editors system should be used: legacy or the new one.\n * @default \"legacy\"\n * @beta\n */\n editorSystem: \"new\";\n}\n\n/** Properties for [[VirtualizedPropertyGrid]] React component\n * @public\n * @deprecated in 5.30.0. Use `React.ComponentProps<typeof VirtualizedPropertyGrid>` instead.\n */\nexport type VirtualizedPropertyGridProps =\n | VirtualizedPropertyGridLegacyProps\n | VirtualizedPropertyGridNewProps;\n\ninterface VirtualizedPropertyGridComponent {\n /**\n * [[VirtualizedPropertyGrid]] React Component which takes a data provider and\n * sets up default implementations for `IPropertyGridModelSource` and `IPropertyGridEventHandler`\n * @public\n */\n (props: VirtualizedPropertyGridNewProps): React.JSX.Element;\n /**\n * @deprecated in 5.30. Use `VirtualizedPropertyGrid` with `editorSystem=\"new\"` instead.\n * @public\n */\n (props: VirtualizedPropertyGridLegacyProps): React.JSX.Element;\n /** @public */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n (props: VirtualizedPropertyGridProps): React.JSX.Element;\n}\n\n/** State of [[VirtualizedPropertyGrid]] React component\n * @internal\n */\ninterface VirtualizedPropertyGridState {\n /** List of PropertyGrid categories */\n gridItems: FlatGridItem[];\n /** Actual orientation used by the property grid */\n orientation: Orientation;\n /** Keeps record of dynamic node heights */\n dynamicNodeHeights: Map<string, number>;\n}\n\n/**\n * Context of [[VirtualizedPropertyGrid]] component.\n * @internal\n */\nexport interface PropertyGridInternalContext {\n gridItems: FlatGridItem[];\n gridEventHandler: IPropertyGridEventHandler;\n gridModel: IPropertyGridModel;\n\n style?: React.CSSProperties;\n className?: string;\n gridContext: VirtualizedPropertyGridContext;\n onItemHeightChanged: (index: number, key: string, height: number) => void;\n}\n\n/**\n * Context of the surrounding [[VirtualizedPropertyGrid]] component.\n * @public\n */\nexport interface VirtualizedPropertyGridContext {\n orientation: Orientation;\n gridWidth: number;\n\n isPropertyHoverEnabled: boolean;\n isPropertySelectionEnabled: boolean;\n selectedPropertyKey?: string;\n isPropertyEditingEnabled?: boolean;\n\n alwaysShowEditor?: (property: PropertyRecord) => boolean;\n onPropertyClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyRightClicked?: (property: PropertyRecord, key?: string) => void;\n onPropertyContextMenu?: (\n property: PropertyRecord,\n e: React.MouseEvent\n ) => void;\n\n editingPropertyKey?: string;\n onEditCommit?: (\n args: PropertyUpdatedArgs,\n category: PropertyCategory\n ) => void;\n onEditCancel?: () => void;\n editorSystem: \"legacy\" | \"new\";\n\n eventHandler: IPropertyGridEventHandler;\n dataProvider: IPropertyDataProvider;\n\n actionButtonRenderers?: ActionButtonRenderer[];\n propertyValueRendererManager?: PropertyValueRendererManager;\n propertyCategoryRendererManager?: PropertyCategoryRendererManager;\n\n columnRatio: number;\n columnInfo: PropertyGridColumnInfo;\n isResizeHandleBeingDragged: boolean;\n isResizeHandleHovered: boolean;\n onColumnRatioChanged: (ratio: number) => void | {\n ratio: number;\n };\n onResizeHandleDragChanged: (newValue: boolean) => void;\n onResizeHandleHoverChanged: (newValue: boolean) => void;\n\n highlight?: PropertyGridContentHighlightProps;\n}\n\nconst [\n PropertyGridInternalContextProvider,\n _PropertyGridInternalContextConsumer,\n usePropertyGridInternalContext,\n] = createContextWithMandatoryProvider<PropertyGridInternalContext>(\n \"PropertyGridInternalContext\"\n);\n\nconst ACTION_BUTTON_DEFAULT_WIDTH = 90;\nconst CATEGORY_HEADER_HEIGHT = 42;\nconst CATEGORY_PROPERTY_HEIGHT = 28;\nconst VERTICAL_CATEGORY_PROPERTY_HEIGHT = 48;\n\n/**\n * VirtualizedPropertyGrid React component.\n * @public\n */\nexport const VirtualizedPropertyGrid: VirtualizedPropertyGridComponent = (\n props\n) => {\n return <VirtualizedPropertyGridImpl {...props} />;\n};\n\nclass VirtualizedPropertyGridImpl extends React.Component<\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n VirtualizedPropertyGridProps,\n VirtualizedPropertyGridState\n> {\n private _listRef = React.createRef<VariableSizeList>();\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n constructor(props: VirtualizedPropertyGridProps) {\n super(props);\n this.state = {\n gridItems: [],\n orientation:\n props.orientation ??\n PropertyGridCommons.getCurrentOrientation(\n props.width,\n undefined,\n props.isOrientationFixed,\n props.horizontalOrientationMinWidth\n ),\n dynamicNodeHeights: new Map(),\n };\n }\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public override componentDidUpdate(prevProps: VirtualizedPropertyGridProps) {\n if (\n this.props.orientation !== prevProps.orientation ||\n this.props.isOrientationFixed !== prevProps.isOrientationFixed ||\n this.props.horizontalOrientationMinWidth !==\n prevProps.horizontalOrientationMinWidth ||\n this.props.width !== prevProps.width\n )\n this.updateOrientation(this.props.width);\n\n if (this.props.model !== prevProps.model) {\n if (this._listRef.current) this._listRef.current.resetAfterIndex(0);\n }\n\n if (\n this.props.highlight !== prevProps.highlight &&\n this.props.highlight?.activeHighlight &&\n this.state.gridItems.length !== 0\n ) {\n let index = 0;\n let foundMatchingItem = false;\n for (const item of this.state.gridItems) {\n if (\n (item instanceof MutableCategorizedPrimitiveProperty &&\n this.props.highlight.activeHighlight.highlightedItemIdentifier ===\n item.derivedRecord.property.name) ||\n (item instanceof MutableGridCategory &&\n this.props.highlight.activeHighlight.highlightedItemIdentifier ===\n item.name)\n ) {\n foundMatchingItem = true;\n break;\n }\n index++;\n }\n if (foundMatchingItem) {\n if (this._listRef.current) this._listRef.current.scrollToItem(index);\n }\n }\n }\n\n public static getDerivedStateFromProps(\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n props: VirtualizedPropertyGridProps,\n state: VirtualizedPropertyGridState\n ): VirtualizedPropertyGridState | null {\n return {\n ...state,\n gridItems: props.model.getVisibleFlatGrid(),\n };\n }\n\n private updateOrientation(width: number) {\n const { orientation, isOrientationFixed, horizontalOrientationMinWidth } = {\n ...this.props,\n };\n const currentOrientation = PropertyGridCommons.getCurrentOrientation(\n width,\n orientation,\n isOrientationFixed,\n horizontalOrientationMinWidth\n );\n\n if (currentOrientation !== this.state.orientation) {\n this.setState({ orientation: currentOrientation });\n }\n }\n\n /**\n * Calculate given node height depending on it's type, position in category, parent category depth and current orientation.\n * @param node FlatGridItem node for which to calculate height\n * @returns current height of node.\n */\n private calculateNodeHeight(node: FlatGridItem) {\n return getPropertyHeight(this.state);\n\n function getPropertyHeight(state: VirtualizedPropertyGridState) {\n const dynamicHeight = state.dynamicNodeHeights.get(node.key);\n if (dynamicHeight !== undefined) {\n if (node instanceof MutableCustomGridCategory) {\n return CATEGORY_HEADER_HEIGHT + (node.isExpanded ? dynamicHeight : 0);\n }\n\n return dynamicHeight;\n }\n\n if (node.type === FlatGridItemType.Category) {\n return CATEGORY_HEADER_HEIGHT;\n }\n\n return state.orientation === Orientation.Vertical\n ? VERTICAL_CATEGORY_PROPERTY_HEIGHT\n : CATEGORY_PROPERTY_HEIGHT;\n }\n }\n\n private _handleNodeHeightChange = (\n index: number,\n key: string,\n newHeight: number\n ) => {\n if (this.state.dynamicNodeHeights.get(key) === newHeight) {\n return;\n }\n\n this.setState(\n (state) => {\n return {\n ...state,\n dynamicNodeHeights: new Map(state.dynamicNodeHeights).set(\n key,\n newHeight\n ),\n };\n },\n () => this._listRef.current!.resetAfterIndex(index)\n );\n };\n\n private _calculateNodeHeightByIndex = (index: number) => {\n const node = this.state.gridItems[index];\n return this.calculateNodeHeight(node);\n };\n\n private calculateEstimatedHeight() {\n let sum = 0;\n for (const node of this.state.gridItems)\n sum += this.calculateNodeHeight(node);\n\n return Math.ceil(sum / this.state.gridItems.length);\n }\n\n private _getNodeKey = (index: number) => {\n const node = this.state.gridItems[index];\n return node.key;\n };\n\n private _getMaxItemDepth = () => {\n let depth = 0;\n for (const item of this.state.gridItems) {\n if (depth < item.depth) {\n depth = item.depth;\n }\n }\n return depth + 1;\n };\n\n public override render() {\n const defaultActionButtonWidth =\n (this.props.actionButtonRenderers?.length ?? 0) > 0\n ? ACTION_BUTTON_DEFAULT_WIDTH\n : undefined;\n\n return (\n <ColumnResizingPropertyListPropsSupplier\n orientation={this.state.orientation}\n width={this.props.width}\n minLabelWidth={this.props.minLabelWidth}\n minValueWidth={this.props.minValueWidth}\n actionButtonWidth={\n this.props.actionButtonWidth !== undefined\n ? this.props.actionButtonWidth\n : defaultActionButtonWidth\n }\n maxPropertyDepth={this._getMaxItemDepth()}\n >\n {(columnResizeContext) => (\n <PropertyGridEventsRelatedPropsSupplier\n isPropertySelectionEnabled={\n this.props.isPropertySelectionEnabled ?? false\n }\n isPropertySelectionOnRightClickEnabled={\n this.props.isPropertySelectionOnRightClickEnabled\n }\n isPropertyEditingEnabled={this.props.isPropertyEditingEnabled}\n onPropertyContextMenu={this.props.onPropertyContextMenu}\n onPropertyUpdated={this.props.onPropertyUpdated}\n onPropertySelectionChanged={this.props.onPropertySelectionChanged}\n isPropertyHoverEnabled={this.props.isPropertyHoverEnabled ?? false}\n >\n {(selectionContext) => {\n const gridContext: VirtualizedPropertyGridContext = {\n orientation: columnResizeContext.orientation,\n gridWidth: this.props.width,\n\n isPropertyHoverEnabled: selectionContext.isPropertyHoverEnabled,\n isPropertySelectionEnabled:\n selectionContext.isPropertySelectionEnabled,\n selectedPropertyKey: selectionContext.selectedPropertyKey,\n isPropertyEditingEnabled: this.props.isPropertyEditingEnabled,\n\n alwaysShowEditor: this.props.alwaysShowEditor,\n onPropertyClicked: selectionContext.onPropertyClicked,\n onPropertyRightClicked: selectionContext.onPropertyRightClicked,\n onPropertyContextMenu: selectionContext.onPropertyContextMenu,\n\n editingPropertyKey: selectionContext.editingPropertyKey,\n onEditCommit: selectionContext.onEditCommit,\n onEditCancel: selectionContext.onEditCancel,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n editorSystem: this.props.editorSystem ?? \"legacy\",\n\n eventHandler: this.props.eventHandler,\n dataProvider: this.props.dataProvider,\n\n actionButtonRenderers: this.props.actionButtonRenderers,\n propertyValueRendererManager:\n this.props.propertyValueRendererManager,\n propertyCategoryRendererManager:\n this.props.propertyCategoryRendererManager,\n\n columnRatio: columnResizeContext.columnRatio,\n columnInfo: columnResizeContext.columnInfo,\n isResizeHandleBeingDragged:\n columnResizeContext.isResizeHandleBeingDragged,\n isResizeHandleHovered:\n columnResizeContext.isResizeHandleHovered,\n onColumnRatioChanged: columnResizeContext.onColumnChanged,\n onResizeHandleDragChanged:\n columnResizeContext.onResizeHandleDragChanged,\n onResizeHandleHoverChanged:\n columnResizeContext.onResizeHandleHoverChanged,\n\n highlight: this.props.highlight,\n };\n\n const renderContext: PropertyGridInternalContext = {\n gridItems: this.state.gridItems,\n gridEventHandler: this.props.eventHandler,\n gridModel: this.props.model,\n style: this.props.style,\n className: this.props.className,\n onItemHeightChanged: this._handleNodeHeightChange,\n gridContext,\n };\n\n return (\n <PropertyGridInternalContextProvider value={renderContext}>\n <VirtualizedPropertyGridInternal\n width={this.props.width}\n height={this.props.height}\n itemCount={this.state.gridItems.length}\n itemSize={this._calculateNodeHeightByIndex}\n estimatedItemSize={this.calculateEstimatedHeight()}\n overscanCount={10}\n layout=\"vertical\"\n style={this.props.style}\n itemKey={this._getNodeKey}\n ref={this._listRef}\n />\n </PropertyGridInternalContextProvider>\n );\n }}\n </PropertyGridEventsRelatedPropsSupplier>\n )}\n </ColumnResizingPropertyListPropsSupplier>\n );\n }\n}\n\nconst VirtualizedPropertyGridInternal = React.forwardRef<\n VariableSizeList,\n Omit<VariableSizeListProps, \"children\">\n>(function VirtualizedPropertyGridInternal(props, ref) {\n const { gridContext } = usePropertyGridInternalContext(FlatGridItemNode);\n\n React.useEffect(() => {\n return gridContext.dataProvider.onDataChanged.addListener(() => {\n gridContext.onEditCancel?.();\n });\n }, [gridContext]);\n\n return (\n <div\n className={classnames(\n \"components-virtualized-property-grid\",\n \"components-smallEditor-host\"\n )}\n >\n <VariableSizeList\n {...props}\n className={classnames(\n \"components-property-grid-wrapper\",\n \"ReactWindow__VariableSizeList\",\n props.className\n )}\n ref={ref}\n >\n {FlatGridItemNode}\n </VariableSizeList>\n </div>\n );\n});\n\n/**\n * Returns callbacks for persisting and restoring [[VirtualizedPropertyGrid]] layout state.\n * Returned `ref` should be set on container containing [[VirtualizedPropertyGrid]].\n * @public\n */\nexport function useVirtualizedPropertyGridLayoutStorage<T extends Element>() {\n return useElementsScrollStorage<T>(\"ReactWindow__VariableSizeList\");\n}\n\nconst FlatGridItemNode = React.memo(\n ({ index, style: virtualizedListStyle }: ListChildComponentProps) => {\n const {\n gridItems,\n gridEventHandler,\n gridModel,\n gridContext,\n className,\n style,\n onItemHeightChanged,\n } = usePropertyGridInternalContext(FlatGridItemNode);\n const node = gridItems[index];\n const divRef = React.useRef<HTMLDivElement>(null);\n const previousHeightRef = React.useRef(0);\n\n const onExpansionToggled = React.useCallback(\n () => gridEventHandler.onExpansionToggled(node.selectionKey),\n [gridEventHandler, node.selectionKey]\n );\n const onHeightChanged = React.useCallback(\n (newHeight: number) => onItemHeightChanged(index, node.key, newHeight),\n [onItemHeightChanged, index, node.key]\n );\n\n const minHeight = React.useMemo(() => {\n if (node.type === FlatGridItemType.Category)\n return CATEGORY_HEADER_HEIGHT;\n\n return gridContext.orientation === Orientation.Vertical\n ? VERTICAL_CATEGORY_PROPERTY_HEIGHT\n : CATEGORY_PROPERTY_HEIGHT;\n }, [gridContext.orientation, node.type]);\n\n React.useLayoutEffect(() => {\n assert(divRef.current !== null);\n const refHeight = divRef.current.getBoundingClientRect().height;\n const currentHeight = Math.max(refHeight, minHeight);\n\n if (currentHeight !== previousHeightRef.current) {\n onHeightChanged(currentHeight);\n previousHeightRef.current = currentHeight;\n }\n });\n\n function getDisplayNode() {\n const lastInNumberOfCategories = node.lastInNumberOfCategories;\n switch (node.type) {\n case FlatGridItemType.Category:\n const categoryRendererManager =\n gridContext.propertyCategoryRendererManager ??\n PropertyCategoryRendererManager.defaultManager;\n const customRenderer =\n categoryRendererManager.getCategoryComponent(node);\n const wrapperClassName = classnames(\n \"virtualized-grid-node-content\",\n customRenderer !== undefined\n ? \"virtualized-grid-node-custom-category\"\n : \"virtualized-grid-node-category\"\n );\n return (\n <FlatItemNestedBorderWrapper\n borderCount={node.depth}\n bottomBorderCount={lastInNumberOfCategories}\n className={wrapperClassName}\n >\n <PropertyCategoryBlock\n className={className}\n style={style}\n category={node.derivedCategory}\n onExpansionToggled={onExpansionToggled}\n highlight={\n gridContext.highlight?.filteredTypes?.includes(\n FilteredType.Category\n )\n ? gridContext.highlight\n : undefined\n }\n >\n {customRenderer !== undefined && (\n <CustomCategoryContent\n renderer={customRenderer}\n categoryItem={node}\n gridContext={gridContext}\n onHeightChanged={onHeightChanged}\n />\n )}\n </PropertyCategoryBlock>\n </FlatItemNestedBorderWrapper>\n );\n case FlatGridItemType.Array:\n case FlatGridItemType.Struct:\n case FlatGridItemType.Primitive:\n const selectionKey = node.selectionKey;\n const parentCategoryItem = gridModel.getItem(\n node.parentCategorySelectionKey\n ) as GridCategoryItem;\n\n return (\n <FlatItemNestedBorderWrapper\n borderCount={parentCategoryItem.depth + 1}\n bottomBorderCount={lastInNumberOfCategories}\n className=\"virtualized-grid-node-content\"\n >\n <FlatPropertyRenderer\n key={node.key}\n uniqueKey={selectionKey}\n propertyRecord={node.derivedRecord}\n orientation={gridContext.orientation}\n indentation={node.depth}\n width={gridContext.gridWidth}\n isHoverable={gridContext.isPropertyHoverEnabled}\n isSelectable={gridContext.isPropertySelectionEnabled}\n isSelected={selectionKey === gridContext.selectedPropertyKey}\n onClick={gridContext.onPropertyClicked}\n onRightClick={gridContext.onPropertyRightClicked}\n onContextMenu={gridContext.onPropertyContextMenu}\n category={parentCategoryItem.derivedCategory}\n isEditing={selectionKey === gridContext.editingPropertyKey}\n isPropertyEditingEnabled={gridContext.isPropertyEditingEnabled}\n alwaysShowEditor={gridContext.alwaysShowEditor}\n onEditCommit={gridContext.onEditCommit}\n onEditCancel={gridContext.onEditCancel}\n editorSystem={gridContext.editorSystem}\n isExpanded={node.isExpanded}\n onExpansionToggled={onExpansionToggled}\n onHeightChanged={onHeightChanged}\n actionButtonRenderers={gridContext.actionButtonRenderers}\n propertyValueRendererManager={\n gridContext.propertyValueRendererManager\n }\n columnRatio={gridContext.columnRatio}\n columnInfo={gridContext.columnInfo}\n isResizeHandleBeingDragged={\n gridContext.isResizeHandleBeingDragged\n }\n isResizeHandleHovered={gridContext.isResizeHandleHovered}\n onColumnRatioChanged={gridContext.onColumnRatioChanged}\n onResizeHandleDragChanged={\n gridContext.onResizeHandleDragChanged\n }\n onResizeHandleHoverChanged={\n gridContext.onResizeHandleHoverChanged\n }\n highlight={\n gridContext.highlight\n ? {\n applyOnLabel:\n gridContext.highlight.filteredTypes?.includes(\n FilteredType.Label\n ) ?? false,\n applyOnValue:\n gridContext.highlight.filteredTypes?.includes(\n FilteredType.Value\n ) ?? false,\n ...gridContext.highlight,\n }\n : undefined\n }\n />\n </FlatItemNestedBorderWrapper>\n );\n }\n }\n\n return (\n <div className=\"virtualized-grid-node\" style={virtualizedListStyle}>\n <div\n className=\"virtualized-grid-node-content-wrapper\"\n style={{\n minHeight: `${minHeight}px`,\n display: \"grid\",\n }}\n >\n <div\n ref={divRef}\n className=\"virtualized-grid-node-content-wrapper-item\"\n >\n {getDisplayNode()}\n </div>\n </div>\n </div>\n );\n },\n areEqual\n);\n\nFlatGridItemNode.displayName = \"FlatGridItemNode\";\n\ninterface CustomCategoryContentProps {\n categoryItem: GridCategoryItem;\n renderer: React.ComponentType<PropertyCategoryRendererProps>;\n gridContext: VirtualizedPropertyGridContext;\n onHeightChanged: (newHeight: number) => void;\n}\n\nconst CustomCategoryContent: React.FC<CustomCategoryContentProps> = (props) => {\n const { onHeightChanged } = props;\n const divRef = React.useRef<HTMLDivElement>(null);\n\n React.useLayoutEffect(() => {\n assert(divRef.current !== null);\n const contentHeight = divRef.current.getBoundingClientRect().height;\n onHeightChanged(contentHeight);\n }, [props.gridContext.orientation, onHeightChanged]);\n\n return <div ref={divRef}>{React.createElement(props.renderer, props)}</div>;\n};\n"]}
@@ -5,11 +5,10 @@ import React from "react";
5
5
  import type { PropertyCategoryRendererManager } from "../PropertyCategoryRendererManager.js";
6
6
  import type { IPropertyDataProvider } from "../PropertyDataProvider.js";
7
7
  import type { CommonPropertyGridProps, PropertyGridContentHighlightProps } from "./PropertyGridCommons.js";
8
- /** Properties for [[VirtualizedPropertyGridWithDataProvider]] React component
8
+ /**
9
9
  * @public
10
- * @deprecated in 4.17.0. Use `React.ComponentProps<typeof VirtualizedPropertyGridWithDataProvider>`
11
10
  */
12
- export interface VirtualizedPropertyGridWithDataProviderProps extends CommonPropertyGridProps {
11
+ interface VirtualizedPropertyGridWithDataProviderBaseProps extends CommonPropertyGridProps {
13
12
  /** Property data provider used by the property grid */
14
13
  dataProvider: IPropertyDataProvider;
15
14
  /** Properties for highlighting property data in the grid. */
@@ -20,17 +19,54 @@ export interface VirtualizedPropertyGridWithDataProviderProps extends CommonProp
20
19
  width: number;
21
20
  /** Height of the property grid component. */
22
21
  height: number;
22
+ }
23
+ /** @public */
24
+ interface VirtualizedPropertyGridWithDataProviderLegacyProps extends VirtualizedPropertyGridWithDataProviderBaseProps {
23
25
  /**
24
26
  * Specifies which editors system should be used: legacy or the new one.
25
27
  * @default "legacy"
26
28
  * @beta
29
+ * @deprecated in 5.30. Legacy editors system is deprecated. Use `editorSystem: "new"`.
30
+ */
31
+ editorSystem?: "legacy";
32
+ }
33
+ /**
34
+ * @public
35
+ */
36
+ interface VirtualizedPropertyGridWithDataProviderNewProps extends VirtualizedPropertyGridWithDataProviderBaseProps {
37
+ /**
38
+ * Specifies which editors system should be used: legacy or the new one.
39
+ * @default "legacy"
40
+ * @beta
41
+ */
42
+ editorSystem: "new";
43
+ }
44
+ /**
45
+ * Properties for [[VirtualizedPropertyGridWithDataProvider]] React component
46
+ * @public
47
+ * @deprecated in 4.17.0. Use `React.ComponentProps<typeof VirtualizedPropertyGridWithDataProvider>`
48
+ */
49
+ export type VirtualizedPropertyGridWithDataProviderProps = VirtualizedPropertyGridWithDataProviderLegacyProps | VirtualizedPropertyGridWithDataProviderNewProps;
50
+ interface VirtualizedPropertyGridWithDataProviderComponent {
51
+ /**
52
+ * [[VirtualizedPropertyGrid]] React Component which takes a data provider and
53
+ * sets up default implementations for `IPropertyGridModelSource` and `IPropertyGridEventHandler`
54
+ * @public
55
+ */
56
+ (props: VirtualizedPropertyGridWithDataProviderNewProps): React.JSX.Element;
57
+ /**
58
+ * @deprecated in 5.30. Use `VirtualizedPropertyGridWithDataProvider` with `editorSystem="new"` instead.
59
+ * @public
27
60
  */
28
- editorSystem?: "legacy" | "new";
61
+ (props: VirtualizedPropertyGridWithDataProviderLegacyProps): React.JSX.Element;
62
+ /** @public */
63
+ (props: VirtualizedPropertyGridWithDataProviderProps): React.JSX.Element;
29
64
  }
30
65
  /**
31
66
  * [[VirtualizedPropertyGrid]] React Component which takes a data provider and
32
67
  * sets up default implementations for `IPropertyGridModelSource` and `IPropertyGridEventHandler`
33
68
  * @public
34
69
  */
35
- export declare function VirtualizedPropertyGridWithDataProvider(props: VirtualizedPropertyGridWithDataProviderProps): React.JSX.Element;
70
+ export declare const VirtualizedPropertyGridWithDataProvider: VirtualizedPropertyGridWithDataProviderComponent;
71
+ export {};
36
72
  //# sourceMappingURL=VirtualizedPropertyGridWithDataProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualizedPropertyGridWithDataProvider.d.ts","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.tsx"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AAC7F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EACV,uBAAuB,EACvB,iCAAiC,EAClC,MAAM,0BAA0B,CAAC;AAIlC;;;GAGG;AACH,MAAM,WAAW,4CACf,SAAQ,uBAAuB;IAC/B,uDAAuD;IACvD,YAAY,EAAE,qBAAqB,CAAC;IACpC,6DAA6D;IAC7D,SAAS,CAAC,EAAE,iCAAiC,CAAC;IAC9C,iHAAiH;IACjH,+BAA+B,CAAC,EAAE,+BAA+B,CAAC;IAClE,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,YAAY,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;CACjC;AAED;;;;GAIG;AACH,wBAAgB,uCAAuC,CAErD,KAAK,EAAE,4CAA4C,qBAqBpD"}
1
+ {"version":3,"file":"VirtualizedPropertyGridWithDataProvider.d.ts","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.tsx"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AAC7F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EACV,uBAAuB,EACvB,iCAAiC,EAClC,MAAM,0BAA0B,CAAC;AAIlC;;GAEG;AACH,UAAU,gDACR,SAAQ,uBAAuB;IAC/B,uDAAuD;IACvD,YAAY,EAAE,qBAAqB,CAAC;IACpC,6DAA6D;IAC7D,SAAS,CAAC,EAAE,iCAAiC,CAAC;IAC9C,iHAAiH;IACjH,+BAA+B,CAAC,EAAE,+BAA+B,CAAC;IAClE,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,cAAc;AACd,UAAU,kDACR,SAAQ,gDAAgD;IACxD;;;;;OAKG;IACH,YAAY,CAAC,EAAE,QAAQ,CAAC;CACzB;AAED;;GAEG;AACH,UAAU,+CACR,SAAQ,gDAAgD;IACxD;;;;OAIG;IACH,YAAY,EAAE,KAAK,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,MAAM,4CAA4C,GACpD,kDAAkD,GAClD,+CAA+C,CAAC;AAEpD,UAAU,gDAAgD;IACxD;;;;OAIG;IACH,CAAC,KAAK,EAAE,+CAA+C,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IAC5E;;;OAGG;IACH,CACE,KAAK,EAAE,kDAAkD,GACxD,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IACrB,cAAc;IAEd,CAAC,KAAK,EAAE,4CAA4C,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;CAC1E;AAED;;;;GAIG;AACH,eAAO,MAAM,uCAAuC,EAAE,gDAyBnD,CAAC"}
@@ -14,16 +14,18 @@ import { ProgressRadial } from "@itwin/itwinui-react";
14
14
  * sets up default implementations for `IPropertyGridModelSource` and `IPropertyGridEventHandler`
15
15
  * @public
16
16
  */
17
- export function VirtualizedPropertyGridWithDataProvider(
17
+ export const VirtualizedPropertyGridWithDataProvider = (
18
18
  /* eslint-disable-next-line @typescript-eslint/no-deprecated */
19
- props) {
19
+ props) => {
20
20
  const { modelSource, inProgress } = useTrackedPropertyGridModelSource({
21
21
  dataProvider: props.dataProvider,
22
22
  });
23
23
  const model = usePropertyGridModel({ modelSource });
24
24
  const eventHandler = usePropertyGridEventHandler({ modelSource });
25
- return (React.createElement(DelayedLoaderRenderer, { shouldRenderLoader: inProgress || !model }, model && (React.createElement(VirtualizedPropertyGrid, { ...props, model: model, eventHandler: eventHandler, editorSystem: props.editorSystem ?? "legacy" }))));
26
- }
25
+ return (React.createElement(DelayedLoaderRenderer, { shouldRenderLoader: inProgress || !model }, model && (React.createElement(VirtualizedPropertyGrid, { ...props, model: model, eventHandler: eventHandler,
26
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
27
+ editorSystem: props.editorSystem ?? "legacy" }))));
28
+ };
27
29
  function DelayedLoaderRenderer({ children, shouldRenderLoader, }) {
28
30
  const [showSpinner, setShowSpinner] = useState(shouldRenderLoader);
29
31
  useEffect(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualizedPropertyGridWithDataProvider.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;GAEG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,EACpB,iCAAiC,GAClC,MAAM,kCAAkC,CAAC;AAO1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AA0BtD;;;;GAIG;AACH,MAAM,UAAU,uCAAuC;AACrD,+DAA+D;AAC/D,KAAmD;IAEnD,MAAM,EAAE,WAAW,EAA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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 */\n\nimport React, { useEffect, useState } from \"react\";\nimport {\n usePropertyGridEventHandler,\n usePropertyGridModel,\n useTrackedPropertyGridModelSource,\n} from \"../internal/PropertyGridHooks.js\";\nimport type { PropertyCategoryRendererManager } from \"../PropertyCategoryRendererManager.js\";\nimport type { IPropertyDataProvider } from \"../PropertyDataProvider.js\";\nimport type {\n CommonPropertyGridProps,\n PropertyGridContentHighlightProps,\n} from \"./PropertyGridCommons.js\";\nimport { VirtualizedPropertyGrid } from \"./VirtualizedPropertyGrid.js\";\nimport { ProgressRadial } from \"@itwin/itwinui-react\";\n\n/** Properties for [[VirtualizedPropertyGridWithDataProvider]] React component\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof VirtualizedPropertyGridWithDataProvider>`\n */\nexport interface VirtualizedPropertyGridWithDataProviderProps\n extends CommonPropertyGridProps {\n /** Property data provider used by the property grid */\n dataProvider: IPropertyDataProvider;\n /** Properties for highlighting property data in the grid. */\n highlight?: PropertyGridContentHighlightProps;\n /** Custom property category renderer manager. Defaults to [[PropertyCategoryRendererManager.defaultManager]]. */\n propertyCategoryRendererManager?: PropertyCategoryRendererManager;\n /** Width of the property grid component. */\n width: number;\n /** Height of the property grid component. */\n height: number;\n /**\n * Specifies which editors system should be used: legacy or the new one.\n * @default \"legacy\"\n * @beta\n */\n editorSystem?: \"legacy\" | \"new\";\n}\n\n/**\n * [[VirtualizedPropertyGrid]] React Component which takes a data provider and\n * sets up default implementations for `IPropertyGridModelSource` and `IPropertyGridEventHandler`\n * @public\n */\nexport function VirtualizedPropertyGridWithDataProvider(\n /* eslint-disable-next-line @typescript-eslint/no-deprecated */\n props: VirtualizedPropertyGridWithDataProviderProps\n) {\n const { modelSource, inProgress } = useTrackedPropertyGridModelSource({\n dataProvider: props.dataProvider,\n });\n\n const model = usePropertyGridModel({ modelSource });\n const eventHandler = usePropertyGridEventHandler({ modelSource });\n\n return (\n <DelayedLoaderRenderer shouldRenderLoader={inProgress || !model}>\n {model && (\n <VirtualizedPropertyGrid\n {...props}\n model={model}\n eventHandler={eventHandler}\n editorSystem={props.editorSystem ?? \"legacy\"}\n />\n )}\n </DelayedLoaderRenderer>\n );\n}\n\ninterface DelayedLoaderRendererProps {\n shouldRenderLoader: boolean;\n}\n\nfunction DelayedLoaderRenderer({\n children,\n shouldRenderLoader,\n}: React.PropsWithChildren<DelayedLoaderRendererProps>) {\n const [showSpinner, setShowSpinner] = useState(shouldRenderLoader);\n useEffect(() => {\n if (!shouldRenderLoader) {\n setShowSpinner(shouldRenderLoader);\n return;\n }\n\n // only set a timeout when shouldRenderLoader is set to `true`\n const timeout = setTimeout(() => {\n setShowSpinner(shouldRenderLoader);\n }, 250);\n\n return () => clearTimeout(timeout);\n }, [shouldRenderLoader]);\n\n return !showSpinner ? (\n <>{children}</>\n ) : (\n <div className=\"components-virtualized-property-grid-loader\">\n <ProgressRadial indeterminate size={\"large\"} />\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"VirtualizedPropertyGridWithDataProvider.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.tsx"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;GAEG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,EACpB,iCAAiC,GAClC,MAAM,kCAAkC,CAAC;AAO1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAwEtD;;;;GAIG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAClD;AACE,+DAA+D;AAC/D,KAAm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Aa,QAAC,IAAI,EAAE,OAAO,GAAI,CAC3C,CACP,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport React, { useEffect, useState } from \"react\";\nimport {\n usePropertyGridEventHandler,\n usePropertyGridModel,\n useTrackedPropertyGridModelSource,\n} from \"../internal/PropertyGridHooks.js\";\nimport type { PropertyCategoryRendererManager } from \"../PropertyCategoryRendererManager.js\";\nimport type { IPropertyDataProvider } from \"../PropertyDataProvider.js\";\nimport type {\n CommonPropertyGridProps,\n PropertyGridContentHighlightProps,\n} from \"./PropertyGridCommons.js\";\nimport { VirtualizedPropertyGrid } from \"./VirtualizedPropertyGrid.js\";\nimport { ProgressRadial } from \"@itwin/itwinui-react\";\n\n/**\n * @public\n */\ninterface VirtualizedPropertyGridWithDataProviderBaseProps\n extends CommonPropertyGridProps {\n /** Property data provider used by the property grid */\n dataProvider: IPropertyDataProvider;\n /** Properties for highlighting property data in the grid. */\n highlight?: PropertyGridContentHighlightProps;\n /** Custom property category renderer manager. Defaults to [[PropertyCategoryRendererManager.defaultManager]]. */\n propertyCategoryRendererManager?: PropertyCategoryRendererManager;\n /** Width of the property grid component. */\n width: number;\n /** Height of the property grid component. */\n height: number;\n}\n\n/** @public */\ninterface VirtualizedPropertyGridWithDataProviderLegacyProps\n extends VirtualizedPropertyGridWithDataProviderBaseProps {\n /**\n * Specifies which editors system should be used: legacy or the new one.\n * @default \"legacy\"\n * @beta\n * @deprecated in 5.30. Legacy editors system is deprecated. Use `editorSystem: \"new\"`.\n */\n editorSystem?: \"legacy\";\n}\n\n/**\n * @public\n */\ninterface VirtualizedPropertyGridWithDataProviderNewProps\n extends VirtualizedPropertyGridWithDataProviderBaseProps {\n /**\n * Specifies which editors system should be used: legacy or the new one.\n * @default \"legacy\"\n * @beta\n */\n editorSystem: \"new\";\n}\n\n/**\n * Properties for [[VirtualizedPropertyGridWithDataProvider]] React component\n * @public\n * @deprecated in 4.17.0. Use `React.ComponentProps<typeof VirtualizedPropertyGridWithDataProvider>`\n */\nexport type VirtualizedPropertyGridWithDataProviderProps =\n | VirtualizedPropertyGridWithDataProviderLegacyProps\n | VirtualizedPropertyGridWithDataProviderNewProps;\n\ninterface VirtualizedPropertyGridWithDataProviderComponent {\n /**\n * [[VirtualizedPropertyGrid]] React Component which takes a data provider and\n * sets up default implementations for `IPropertyGridModelSource` and `IPropertyGridEventHandler`\n * @public\n */\n (props: VirtualizedPropertyGridWithDataProviderNewProps): React.JSX.Element;\n /**\n * @deprecated in 5.30. Use `VirtualizedPropertyGridWithDataProvider` with `editorSystem=\"new\"` instead.\n * @public\n */\n (\n props: VirtualizedPropertyGridWithDataProviderLegacyProps\n ): React.JSX.Element;\n /** @public */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n (props: VirtualizedPropertyGridWithDataProviderProps): React.JSX.Element;\n}\n\n/**\n * [[VirtualizedPropertyGrid]] React Component which takes a data provider and\n * sets up default implementations for `IPropertyGridModelSource` and `IPropertyGridEventHandler`\n * @public\n */\nexport const VirtualizedPropertyGridWithDataProvider: VirtualizedPropertyGridWithDataProviderComponent =\n (\n /* eslint-disable-next-line @typescript-eslint/no-deprecated */\n props: VirtualizedPropertyGridWithDataProviderProps\n ) => {\n const { modelSource, inProgress } = useTrackedPropertyGridModelSource({\n dataProvider: props.dataProvider,\n });\n\n const model = usePropertyGridModel({ modelSource });\n const eventHandler = usePropertyGridEventHandler({ modelSource });\n\n return (\n <DelayedLoaderRenderer shouldRenderLoader={inProgress || !model}>\n {model && (\n <VirtualizedPropertyGrid\n {...props}\n model={model}\n eventHandler={eventHandler}\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n editorSystem={props.editorSystem ?? \"legacy\"}\n />\n )}\n </DelayedLoaderRenderer>\n );\n };\n\ninterface DelayedLoaderRendererProps {\n shouldRenderLoader: boolean;\n}\n\nfunction DelayedLoaderRenderer({\n children,\n shouldRenderLoader,\n}: React.PropsWithChildren<DelayedLoaderRendererProps>) {\n const [showSpinner, setShowSpinner] = useState(shouldRenderLoader);\n useEffect(() => {\n if (!shouldRenderLoader) {\n setShowSpinner(shouldRenderLoader);\n return;\n }\n\n // only set a timeout when shouldRenderLoader is set to `true`\n const timeout = setTimeout(() => {\n setShowSpinner(shouldRenderLoader);\n }, 250);\n\n return () => clearTimeout(timeout);\n }, [shouldRenderLoader]);\n\n return !showSpinner ? (\n <>{children}</>\n ) : (\n <div className=\"components-virtualized-property-grid-loader\">\n <ProgressRadial indeterminate size={\"large\"} />\n </div>\n );\n}\n"]}
@@ -53,7 +53,9 @@ const DisplayValue = (props) => {
53
53
  if (props.category)
54
54
  props.onEditCommit?.(args, props.category);
55
55
  };
56
- return (React.createElement(PropertyRecordEditor, { propertyRecord: props.propertyRecord, onCommit: _onEditCommit, onCancel: props.onEditCancel ?? (() => { }), onClick: () => props.onClick?.(props.propertyRecord, props.uniqueKey), setFocus: props.isEditing, editorSystem: props.editorSystem, size: "small" }));
56
+ return (React.createElement(PropertyRecordEditor, { propertyRecord: props.propertyRecord, onCommit: _onEditCommit, onCancel: props.onEditCancel ?? (() => { }), onClick: () => props.onClick?.(props.propertyRecord, props.uniqueKey), setFocus: props.isEditing,
57
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
58
+ editorSystem: props.editorSystem, size: "small" }));
57
59
  }
58
60
  return CommonPropertyRenderer.createNewDisplayValue(props.orientation, props.propertyRecord, props.indentation, props.propertyValueRendererManager, props.isExpanded, props.onExpansionToggled, props.onHeightChanged, props.highlight);
59
61
  };