@itwin/components-react 3.6.0-dev.8 → 3.7.0-dev.1
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.
- package/CHANGELOG.md +39 -1
- package/LICENSE.md +1 -1
- package/lib/cjs/components-react/breadcrumb/Breadcrumb.d.ts +5 -5
- package/lib/cjs/components-react/breadcrumb/Breadcrumb.js +3 -3
- package/lib/cjs/components-react/breadcrumb/Breadcrumb.js.map +1 -1
- package/lib/cjs/components-react/breadcrumb/BreadcrumbDetails.d.ts +2 -2
- package/lib/cjs/components-react/breadcrumb/BreadcrumbDetails.js +1 -1
- package/lib/cjs/components-react/breadcrumb/BreadcrumbDetails.js.map +1 -1
- package/lib/cjs/components-react/breadcrumb/BreadcrumbPath.d.ts +3 -3
- package/lib/cjs/components-react/breadcrumb/BreadcrumbPath.js +2 -2
- package/lib/cjs/components-react/breadcrumb/BreadcrumbPath.js.map +1 -1
- package/lib/cjs/components-react/breadcrumb/BreadcrumbTreeUtils.d.ts +1 -1
- package/lib/cjs/components-react/breadcrumb/BreadcrumbTreeUtils.js +1 -1
- package/lib/cjs/components-react/breadcrumb/BreadcrumbTreeUtils.js.map +1 -1
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.d.ts +4 -1
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.d.ts.map +1 -1
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.js +4 -1
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.js.map +1 -1
- package/lib/cjs/components-react/common/showhide/ShowHideDialog.d.ts +2 -2
- package/lib/cjs/components-react/common/showhide/ShowHideDialog.js +1 -1
- package/lib/cjs/components-react/common/showhide/ShowHideDialog.js.map +1 -1
- package/lib/cjs/components-react/common/showhide/ShowHideItem.d.ts +2 -2
- package/lib/cjs/components-react/common/showhide/ShowHideItem.js.map +1 -1
- package/lib/cjs/components-react/common/showhide/ShowHideMenu.d.ts +2 -2
- package/lib/cjs/components-react/common/showhide/ShowHideMenu.js +1 -1
- package/lib/cjs/components-react/common/showhide/ShowHideMenu.js.map +1 -1
- package/lib/cjs/components-react/converters/TypeConverterManager.d.ts.map +1 -1
- package/lib/cjs/components-react/converters/TypeConverterManager.js +3 -4
- package/lib/cjs/components-react/converters/TypeConverterManager.js.map +1 -1
- package/lib/cjs/components-react/editors/ThemedEnumEditor.d.ts +4 -4
- package/lib/cjs/components-react/editors/ThemedEnumEditor.js +2 -2
- package/lib/cjs/components-react/editors/ThemedEnumEditor.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilder.d.ts +22 -24
- package/lib/cjs/components-react/filter-builder/FilterBuilder.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilder.js +24 -83
- package/lib/cjs/components-react/filter-builder/FilterBuilder.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderContext.d.ts +80 -0
- package/lib/cjs/components-react/filter-builder/FilterBuilderContext.d.ts.map +1 -0
- package/lib/cjs/components-react/filter-builder/FilterBuilderContext.js +83 -0
- package/lib/cjs/components-react/filter-builder/FilterBuilderContext.js.map +1 -0
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.d.ts +14 -3
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.js +22 -12
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.scss +4 -0
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.d.ts +25 -16
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.js +22 -14
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.d.ts +14 -2
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js +11 -5
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.d.ts +16 -2
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js +11 -5
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.d.ts +14 -2
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js +11 -5
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderState.d.ts +52 -8
- package/lib/cjs/components-react/filter-builder/FilterBuilderState.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderState.js +102 -12
- package/lib/cjs/components-react/filter-builder/FilterBuilderState.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/Operators.d.ts +23 -5
- package/lib/cjs/components-react/filter-builder/Operators.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/Operators.js +25 -7
- package/lib/cjs/components-react/filter-builder/Operators.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/Types.d.ts +24 -4
- package/lib/cjs/components-react/filter-builder/Types.d.ts.map +1 -1
- package/lib/cjs/components-react/filter-builder/Types.js +11 -1
- package/lib/cjs/components-react/filter-builder/Types.js.map +1 -1
- package/lib/cjs/components-react/filtering/FilteringInput.js +1 -1
- package/lib/cjs/components-react/filtering/FilteringInput.js.map +1 -1
- package/lib/cjs/components-react/iconpicker/IconPickerButton.d.ts +2 -2
- package/lib/cjs/components-react/iconpicker/IconPickerButton.js +2 -2
- package/lib/cjs/components-react/iconpicker/IconPickerButton.js.map +1 -1
- package/lib/cjs/components-react/properties/LinkHandler.d.ts +2 -2
- package/lib/cjs/components-react/properties/LinkHandler.js +1 -1
- package/lib/cjs/components-react/properties/LinkHandler.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.d.ts +3 -3
- package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.js +1 -1
- package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/PropertyDataProvider.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/PropertyDataProvider.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGrid.d.ts +3 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGrid.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGrid.js +1 -0
- package/lib/cjs/components-react/propertygrid/component/PropertyGrid.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.d.ts +5 -10
- package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts +3 -3
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.js +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.scss +11 -0
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridEventHandler.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridEventHandler.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridEventHandler.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.d.ts +3 -3
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.js +3 -3
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModel.d.ts +3 -3
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModel.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModel.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelChangeEvent.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/FlatGridItem.d.ts +6 -6
- package/lib/cjs/components-react/propertygrid/internal/flat-items/FlatGridItem.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/FlatGridItem.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.d.ts +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.d.ts +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.d.ts +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.d.ts +10 -10
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js +3 -3
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.d.ts +2 -2
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts +3 -6
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/table/SimpleTableDataProvider.d.ts +1 -1
- package/lib/cjs/components-react/table/SimpleTableDataProvider.js +1 -1
- package/lib/cjs/components-react/table/SimpleTableDataProvider.js.map +1 -1
- package/lib/cjs/components-react/table/TableDataProvider.d.ts +8 -8
- package/lib/cjs/components-react/table/TableDataProvider.js +2 -2
- package/lib/cjs/components-react/table/TableDataProvider.js.map +1 -1
- package/lib/cjs/components-react/table/columnfiltering/ColumnFiltering.d.ts +16 -16
- package/lib/cjs/components-react/table/columnfiltering/ColumnFiltering.js +6 -6
- package/lib/cjs/components-react/table/columnfiltering/ColumnFiltering.js.map +1 -1
- package/lib/cjs/components-react/table/component/ColumnDragLayer.d.ts +1 -1
- package/lib/cjs/components-react/table/component/ColumnDragLayer.js +1 -1
- package/lib/cjs/components-react/table/component/ColumnDragLayer.js.map +1 -1
- package/lib/cjs/components-react/table/component/Table.d.ts +9 -9
- package/lib/cjs/components-react/table/component/Table.d.ts.map +1 -1
- package/lib/cjs/components-react/table/component/Table.js +2 -2
- package/lib/cjs/components-react/table/component/Table.js.map +1 -1
- package/lib/cjs/components-react/table/component/TableCell.d.ts +7 -7
- package/lib/cjs/components-react/table/component/TableCell.js +3 -3
- package/lib/cjs/components-react/table/component/TableCell.js.map +1 -1
- package/lib/cjs/components-react/table/component/TableColumn.d.ts +1 -1
- package/lib/cjs/components-react/table/component/TableColumn.js.map +1 -1
- package/lib/cjs/components-react/table/component/dragdrop/BeDragDropContext.d.ts +1 -1
- package/lib/cjs/components-react/table/component/dragdrop/BeDragDropContext.js +1 -1
- package/lib/cjs/components-react/table/component/dragdrop/BeDragDropContext.js.map +1 -1
- package/lib/cjs/components-react/table/component/dragdrop/DragDropDef.d.ts +8 -8
- package/lib/cjs/components-react/table/component/dragdrop/DragDropDef.js +2 -2
- package/lib/cjs/components-react/table/component/dragdrop/DragDropDef.js.map +1 -1
- package/lib/cjs/components-react/table/component/dragdrop/withDragSource.d.ts +2 -2
- package/lib/cjs/components-react/table/component/dragdrop/withDragSource.js +1 -1
- package/lib/cjs/components-react/table/component/dragdrop/withDragSource.js.map +1 -1
- package/lib/cjs/components-react/table/component/dragdrop/withDropTarget.d.ts +2 -2
- package/lib/cjs/components-react/table/component/dragdrop/withDropTarget.js +1 -1
- package/lib/cjs/components-react/table/component/dragdrop/withDropTarget.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Toolbar.d.ts +1 -1
- package/lib/cjs/components-react/toolbar/Toolbar.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/Toolbar.js.map +1 -1
- package/lib/cjs/components-react/toolbar/ToolbarWithOverflow.d.ts +2 -2
- package/lib/cjs/components-react/toolbar/ToolbarWithOverflow.d.ts.map +1 -1
- package/lib/cjs/components-react/toolbar/ToolbarWithOverflow.js.map +1 -1
- package/lib/cjs/components-react/tree/TreeDataProvider.d.ts +2 -2
- package/lib/cjs/components-react/tree/TreeDataProvider.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/TreeDataProvider.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.d.ts +1 -4
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.d.ts +2 -5
- package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.d.ts.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
- package/lib/cjs/components-react.d.ts +4 -6
- package/lib/cjs/components-react.d.ts.map +1 -1
- package/lib/cjs/components-react.js +4 -6
- package/lib/cjs/components-react.js.map +1 -1
- package/lib/esm/components-react/breadcrumb/Breadcrumb.d.ts +5 -5
- package/lib/esm/components-react/breadcrumb/Breadcrumb.js +3 -3
- package/lib/esm/components-react/breadcrumb/Breadcrumb.js.map +1 -1
- package/lib/esm/components-react/breadcrumb/BreadcrumbDetails.d.ts +2 -2
- package/lib/esm/components-react/breadcrumb/BreadcrumbDetails.js +1 -1
- package/lib/esm/components-react/breadcrumb/BreadcrumbDetails.js.map +1 -1
- package/lib/esm/components-react/breadcrumb/BreadcrumbPath.d.ts +3 -3
- package/lib/esm/components-react/breadcrumb/BreadcrumbPath.js +2 -2
- package/lib/esm/components-react/breadcrumb/BreadcrumbPath.js.map +1 -1
- package/lib/esm/components-react/breadcrumb/BreadcrumbTreeUtils.d.ts +1 -1
- package/lib/esm/components-react/breadcrumb/BreadcrumbTreeUtils.js +1 -1
- package/lib/esm/components-react/breadcrumb/BreadcrumbTreeUtils.js.map +1 -1
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.d.ts +4 -1
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.d.ts.map +1 -1
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.js +4 -1
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.js.map +1 -1
- package/lib/esm/components-react/common/showhide/ShowHideDialog.d.ts +2 -2
- package/lib/esm/components-react/common/showhide/ShowHideDialog.js +1 -1
- package/lib/esm/components-react/common/showhide/ShowHideDialog.js.map +1 -1
- package/lib/esm/components-react/common/showhide/ShowHideItem.d.ts +2 -2
- package/lib/esm/components-react/common/showhide/ShowHideItem.js.map +1 -1
- package/lib/esm/components-react/common/showhide/ShowHideMenu.d.ts +2 -2
- package/lib/esm/components-react/common/showhide/ShowHideMenu.js +1 -1
- package/lib/esm/components-react/common/showhide/ShowHideMenu.js.map +1 -1
- package/lib/esm/components-react/converters/TypeConverterManager.d.ts.map +1 -1
- package/lib/esm/components-react/converters/TypeConverterManager.js +3 -4
- package/lib/esm/components-react/converters/TypeConverterManager.js.map +1 -1
- package/lib/esm/components-react/editors/ThemedEnumEditor.d.ts +4 -4
- package/lib/esm/components-react/editors/ThemedEnumEditor.js +2 -2
- package/lib/esm/components-react/editors/ThemedEnumEditor.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilder.d.ts +22 -24
- package/lib/esm/components-react/filter-builder/FilterBuilder.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilder.js +17 -75
- package/lib/esm/components-react/filter-builder/FilterBuilder.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderContext.d.ts +80 -0
- package/lib/esm/components-react/filter-builder/FilterBuilderContext.d.ts.map +1 -0
- package/lib/esm/components-react/filter-builder/FilterBuilderContext.js +60 -0
- package/lib/esm/components-react/filter-builder/FilterBuilderContext.js.map +1 -0
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.d.ts +14 -3
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.js +17 -7
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.scss +4 -0
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.d.ts +25 -16
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.js +15 -7
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.d.ts +14 -2
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js +7 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.d.ts +16 -2
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js +7 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.d.ts +14 -2
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js +7 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderState.d.ts +52 -8
- package/lib/esm/components-react/filter-builder/FilterBuilderState.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderState.js +96 -7
- package/lib/esm/components-react/filter-builder/FilterBuilderState.js.map +1 -1
- package/lib/esm/components-react/filter-builder/Operators.d.ts +23 -5
- package/lib/esm/components-react/filter-builder/Operators.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/Operators.js +23 -5
- package/lib/esm/components-react/filter-builder/Operators.js.map +1 -1
- package/lib/esm/components-react/filter-builder/Types.d.ts +24 -4
- package/lib/esm/components-react/filter-builder/Types.d.ts.map +1 -1
- package/lib/esm/components-react/filter-builder/Types.js +11 -1
- package/lib/esm/components-react/filter-builder/Types.js.map +1 -1
- package/lib/esm/components-react/filtering/FilteringInput.js +1 -1
- package/lib/esm/components-react/filtering/FilteringInput.js.map +1 -1
- package/lib/esm/components-react/iconpicker/IconPickerButton.d.ts +2 -2
- package/lib/esm/components-react/iconpicker/IconPickerButton.js +2 -2
- package/lib/esm/components-react/iconpicker/IconPickerButton.js.map +1 -1
- package/lib/esm/components-react/properties/LinkHandler.d.ts +2 -2
- package/lib/esm/components-react/properties/LinkHandler.js +1 -1
- package/lib/esm/components-react/properties/LinkHandler.js.map +1 -1
- package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.d.ts +3 -3
- package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.js +1 -1
- package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
- package/lib/esm/components-react/propertygrid/PropertyDataProvider.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/PropertyDataProvider.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGrid.d.ts +3 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGrid.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGrid.js +1 -0
- package/lib/esm/components-react/propertygrid/component/PropertyGrid.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.d.ts +5 -10
- package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.d.ts +3 -3
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.js +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.scss +11 -0
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridEventHandler.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/internal/PropertyGridEventHandler.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridEventHandler.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.d.ts +3 -3
- package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.js +3 -3
- package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModel.d.ts +3 -3
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModel.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModel.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelChangeEvent.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/FlatGridItem.d.ts +6 -6
- package/lib/esm/components-react/propertygrid/internal/flat-items/FlatGridItem.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/FlatGridItem.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.d.ts +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.d.ts +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.d.ts +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.d.ts +10 -10
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js +3 -3
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridCategory.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.d.ts +2 -2
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts +3 -6
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/table/SimpleTableDataProvider.d.ts +1 -1
- package/lib/esm/components-react/table/SimpleTableDataProvider.js +1 -1
- package/lib/esm/components-react/table/SimpleTableDataProvider.js.map +1 -1
- package/lib/esm/components-react/table/TableDataProvider.d.ts +8 -8
- package/lib/esm/components-react/table/TableDataProvider.js +2 -2
- package/lib/esm/components-react/table/TableDataProvider.js.map +1 -1
- package/lib/esm/components-react/table/columnfiltering/ColumnFiltering.d.ts +16 -16
- package/lib/esm/components-react/table/columnfiltering/ColumnFiltering.js +6 -6
- package/lib/esm/components-react/table/columnfiltering/ColumnFiltering.js.map +1 -1
- package/lib/esm/components-react/table/component/ColumnDragLayer.d.ts +1 -1
- package/lib/esm/components-react/table/component/ColumnDragLayer.js +1 -1
- package/lib/esm/components-react/table/component/ColumnDragLayer.js.map +1 -1
- package/lib/esm/components-react/table/component/Table.d.ts +9 -9
- package/lib/esm/components-react/table/component/Table.d.ts.map +1 -1
- package/lib/esm/components-react/table/component/Table.js +2 -2
- package/lib/esm/components-react/table/component/Table.js.map +1 -1
- package/lib/esm/components-react/table/component/TableCell.d.ts +7 -7
- package/lib/esm/components-react/table/component/TableCell.js +3 -3
- package/lib/esm/components-react/table/component/TableCell.js.map +1 -1
- package/lib/esm/components-react/table/component/TableColumn.d.ts +1 -1
- package/lib/esm/components-react/table/component/TableColumn.js.map +1 -1
- package/lib/esm/components-react/table/component/dragdrop/BeDragDropContext.d.ts +1 -1
- package/lib/esm/components-react/table/component/dragdrop/BeDragDropContext.js +1 -1
- package/lib/esm/components-react/table/component/dragdrop/BeDragDropContext.js.map +1 -1
- package/lib/esm/components-react/table/component/dragdrop/DragDropDef.d.ts +8 -8
- package/lib/esm/components-react/table/component/dragdrop/DragDropDef.js +2 -2
- package/lib/esm/components-react/table/component/dragdrop/DragDropDef.js.map +1 -1
- package/lib/esm/components-react/table/component/dragdrop/withDragSource.d.ts +2 -2
- package/lib/esm/components-react/table/component/dragdrop/withDragSource.js +1 -1
- package/lib/esm/components-react/table/component/dragdrop/withDragSource.js.map +1 -1
- package/lib/esm/components-react/table/component/dragdrop/withDropTarget.d.ts +2 -2
- package/lib/esm/components-react/table/component/dragdrop/withDropTarget.js +1 -1
- package/lib/esm/components-react/table/component/dragdrop/withDropTarget.js.map +1 -1
- package/lib/esm/components-react/toolbar/Toolbar.d.ts +1 -1
- package/lib/esm/components-react/toolbar/Toolbar.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/Toolbar.js.map +1 -1
- package/lib/esm/components-react/toolbar/ToolbarWithOverflow.d.ts +2 -2
- package/lib/esm/components-react/toolbar/ToolbarWithOverflow.d.ts.map +1 -1
- package/lib/esm/components-react/toolbar/ToolbarWithOverflow.js.map +1 -1
- package/lib/esm/components-react/tree/TreeDataProvider.d.ts +2 -2
- package/lib/esm/components-react/tree/TreeDataProvider.d.ts.map +1 -1
- package/lib/esm/components-react/tree/TreeDataProvider.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.d.ts +1 -4
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/TreeRenderer.d.ts +2 -5
- package/lib/esm/components-react/tree/controlled/component/TreeRenderer.d.ts.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
- package/lib/esm/components-react.d.ts +4 -6
- package/lib/esm/components-react.d.ts.map +1 -1
- package/lib/esm/components-react.js +4 -6
- package/lib/esm/components-react.js.map +1 -1
- package/package.json +23 -13
|
@@ -6,7 +6,7 @@ import { FlatGridItemType, IMutableCategorizedPropertyItem, IMutableFlatGridItem
|
|
|
6
6
|
import { IMutableGridItemFactory } from "./MutableGridItemFactory";
|
|
7
7
|
/**
|
|
8
8
|
* Mutable wrapper object for PropertyRecord with array valueFormat which provides methods for working with and managing record children hierarchies.
|
|
9
|
-
* @
|
|
9
|
+
* @public
|
|
10
10
|
*/
|
|
11
11
|
export declare class MutableCategorizedArrayProperty extends MutableCategorizedProperty implements IMutableCategorizedPropertyItem {
|
|
12
12
|
private _renderLabel;
|
package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.MutableCategorizedArrayProperty = void 0;
|
|
|
8
8
|
const MutableFlatGridItem_1 = require("./MutableFlatGridItem");
|
|
9
9
|
/**
|
|
10
10
|
* Mutable wrapper object for PropertyRecord with array valueFormat which provides methods for working with and managing record children hierarchies.
|
|
11
|
-
* @
|
|
11
|
+
* @public
|
|
12
12
|
*/
|
|
13
13
|
class MutableCategorizedArrayProperty extends MutableFlatGridItem_1.MutableCategorizedProperty {
|
|
14
14
|
constructor(record, parentSelectionKey, parentCategorySelectionKey, depth, gridItemFactory, overrideName, overrideDisplayLabel) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutableCategorizedArrayProperty.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAM/F,+DAA4I;AAG5I;;;GAGG;AACH,MAAa,+BAAgC,SAAQ,gDAA0B;IAI7E,YACE,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,eAAwC,EACxC,YAAqB,EACrB,oBAA6B;QAE7B,KAAK,CAAC,sCAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;QACjI,IAAI,CAAC,YAAY,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,0BAA0B,CAAC;QAChE,MAAM,aAAa,GAAG,KAAK,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAA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;CACF;AAhDD,0EAgDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module PropertyGrid\r\n */\r\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\r\nimport { FlatGridItemType, IMutableCategorizedPropertyItem, IMutableFlatGridItem, MutableCategorizedProperty } from \"./MutableFlatGridItem\";\r\nimport { IMutableGridItemFactory } from \"./MutableGridItemFactory\";\r\n\r\n/**\r\n * Mutable wrapper object for PropertyRecord with array valueFormat which provides methods for working with and managing record children hierarchies.\r\n * @
|
|
1
|
+
{"version":3,"file":"MutableCategorizedArrayProperty.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableCategorizedArrayProperty.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAM/F,+DAA4I;AAG5I;;;GAGG;AACH,MAAa,+BAAgC,SAAQ,gDAA0B;IAI7E,YACE,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,eAAwC,EACxC,YAAqB,EACrB,oBAA6B;QAE7B,KAAK,CAAC,sCAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;QACjI,IAAI,CAAC,YAAY,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,0BAA0B,CAAC;QAChE,MAAM,aAAa,GAAG,KAAK,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1D,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,kBAAkB,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAChE,MAAM,OAAO,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,IAAI,KAAK,EAAE,CAAC;YAClD,MAAM,eAAe,GAAG,IAAI,KAAK,GAAG,CAAC,GAAG,CAAC;YACzC,OAAO,eAAe,CAAC,yBAAyB,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,0BAA0B,EAAE,aAAa,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC;QAClJ,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAW,IAAI;QACb,OAAO,sCAAgB,CAAC,KAAK,CAAC;IAChC,CAAC;IAEM,WAAW;QAChB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAEe,qBAAqB;QACnC,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;IACnF,CAAC;IAEe,qBAAqB;QACnC,MAAM,WAAW,GAA2B,EAAE,CAAC;QAC/C,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACzC,wFAAwF;YACxF,qCAAqC;YACrC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,4BAA4B,EAAE,CAAC,CAAC,CAAC;SAClG;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IAEe,4BAA4B;QAC1C,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,4BAA4B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC;IACjG,CAAC;CACF;AAhDD,0EAgDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module PropertyGrid\r\n */\r\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\r\nimport { FlatGridItemType, IMutableCategorizedPropertyItem, IMutableFlatGridItem, MutableCategorizedProperty } from \"./MutableFlatGridItem\";\r\nimport { IMutableGridItemFactory } from \"./MutableGridItemFactory\";\r\n\r\n/**\r\n * Mutable wrapper object for PropertyRecord with array valueFormat which provides methods for working with and managing record children hierarchies.\r\n * @public\r\n */\r\nexport class MutableCategorizedArrayProperty extends MutableCategorizedProperty implements IMutableCategorizedPropertyItem {\r\n private _renderLabel: boolean;\r\n private _children: IMutableCategorizedPropertyItem[];\r\n\r\n public constructor(\r\n record: PropertyRecord,\r\n parentSelectionKey: string,\r\n parentCategorySelectionKey: string,\r\n depth: number,\r\n gridItemFactory: IMutableGridItemFactory,\r\n overrideName?: string,\r\n overrideDisplayLabel?: string,\r\n ) {\r\n super(FlatGridItemType.Array, record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\r\n this._renderLabel = !record.property.hideCompositePropertyLabel;\r\n const childrenDepth = depth + (this._renderLabel ? 1 : 0);\r\n this._children = record.getChildrenRecords().map((child, index) => {\r\n const newName = `${child.property.name}_${index}`;\r\n const newDisplayLabel = `[${index + 1}]`;\r\n return gridItemFactory.createCategorizedProperty(child, this.selectionKey, parentCategorySelectionKey, childrenDepth, newName, newDisplayLabel);\r\n });\r\n }\r\n\r\n public get type(): FlatGridItemType.Array {\r\n return FlatGridItemType.Array;\r\n }\r\n\r\n public getChildren(): IMutableCategorizedPropertyItem[] {\r\n return this._children;\r\n }\r\n\r\n public override getDescendantsAndSelf() {\r\n return this._renderLabel ? super.getDescendantsAndSelf() : this.getDescendants();\r\n }\r\n\r\n public override getVisibleDescendants(): IMutableFlatGridItem[] {\r\n const descendants: IMutableFlatGridItem[] = [];\r\n if (this.isExpanded || !this._renderLabel) {\r\n // always render children if not rendering the label, otherwise there's no way to expand\r\n // this item to make children visible\r\n this.getChildren().forEach((child) => descendants.push(...child.getVisibleDescendantsAndSelf()));\r\n }\r\n return descendants;\r\n }\r\n\r\n public override getVisibleDescendantsAndSelf() {\r\n return this._renderLabel ? super.getVisibleDescendantsAndSelf() : this.getVisibleDescendants();\r\n }\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@ import { PropertyRecord } from "@itwin/appui-abstract";
|
|
|
5
5
|
import { FlatGridItemType, IMutableCategorizedPropertyItem, MutableCategorizedProperty } from "./MutableFlatGridItem";
|
|
6
6
|
/**
|
|
7
7
|
* Mutable wrapper object for PropertyRecord with primitive valueFormat.
|
|
8
|
-
* @
|
|
8
|
+
* @public
|
|
9
9
|
*/
|
|
10
10
|
export declare class MutableCategorizedPrimitiveProperty extends MutableCategorizedProperty implements IMutableCategorizedPropertyItem {
|
|
11
11
|
constructor(record: PropertyRecord, parentSelectionKey: string, parentCategorySelectionKey: string, depth: number, overrideName?: string, overrideDisplayLabel?: string);
|
|
@@ -8,7 +8,7 @@ exports.MutableCategorizedPrimitiveProperty = void 0;
|
|
|
8
8
|
const MutableFlatGridItem_1 = require("./MutableFlatGridItem");
|
|
9
9
|
/**
|
|
10
10
|
* Mutable wrapper object for PropertyRecord with primitive valueFormat.
|
|
11
|
-
* @
|
|
11
|
+
* @public
|
|
12
12
|
*/
|
|
13
13
|
class MutableCategorizedPrimitiveProperty extends MutableFlatGridItem_1.MutableCategorizedProperty {
|
|
14
14
|
constructor(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutableCategorizedPrimitiveProperty.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAM/F,+DAAsH;AAEtH;;;GAGG;AACH,MAAa,mCAAoC,SAAQ,gDAA0B;IACjF,YACE,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,KAAK,CAAC,sCAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;IACvI,CAAC;IAED,IAAW,IAAI;QACb,OAAO,sCAAgB,CAAC,SAAS,CAAC;IACpC,CAAC;IAEM,WAAW;QAChB,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAnBD,kFAmBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module PropertyGrid\r\n */\r\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\r\nimport { FlatGridItemType, IMutableCategorizedPropertyItem, MutableCategorizedProperty } from \"./MutableFlatGridItem\";\r\n\r\n/**\r\n * Mutable wrapper object for PropertyRecord with primitive valueFormat.\r\n * @
|
|
1
|
+
{"version":3,"file":"MutableCategorizedPrimitiveProperty.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableCategorizedPrimitiveProperty.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAM/F,+DAAsH;AAEtH;;;GAGG;AACH,MAAa,mCAAoC,SAAQ,gDAA0B;IACjF,YACE,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,KAAK,CAAC,sCAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;IACvI,CAAC;IAED,IAAW,IAAI;QACb,OAAO,sCAAgB,CAAC,SAAS,CAAC;IACpC,CAAC;IAEM,WAAW;QAChB,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAnBD,kFAmBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module PropertyGrid\r\n */\r\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\r\nimport { FlatGridItemType, IMutableCategorizedPropertyItem, MutableCategorizedProperty } from \"./MutableFlatGridItem\";\r\n\r\n/**\r\n * Mutable wrapper object for PropertyRecord with primitive valueFormat.\r\n * @public\r\n */\r\nexport class MutableCategorizedPrimitiveProperty extends MutableCategorizedProperty implements IMutableCategorizedPropertyItem {\r\n public constructor(\r\n record: PropertyRecord,\r\n parentSelectionKey: string,\r\n parentCategorySelectionKey: string,\r\n depth: number,\r\n overrideName?: string,\r\n overrideDisplayLabel?: string,\r\n ) {\r\n super(FlatGridItemType.Primitive, record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\r\n }\r\n\r\n public get type(): FlatGridItemType.Primitive {\r\n return FlatGridItemType.Primitive;\r\n }\r\n\r\n public getChildren(): IMutableCategorizedPropertyItem[] {\r\n return [];\r\n }\r\n}\r\n"]}
|
|
@@ -6,7 +6,7 @@ import { FlatGridItemType, IMutableCategorizedPropertyItem, IMutableFlatGridItem
|
|
|
6
6
|
import { IMutableGridItemFactory } from "./MutableGridItemFactory";
|
|
7
7
|
/**
|
|
8
8
|
* Mutable wrapper object for PropertyRecord with struct valueFormat which provides methods for working with and managing record children hierarchies.
|
|
9
|
-
* @
|
|
9
|
+
* @public
|
|
10
10
|
*/
|
|
11
11
|
export declare class MutableCategorizedStructProperty extends MutableCategorizedProperty implements IMutableCategorizedPropertyItem {
|
|
12
12
|
private _renderLabel;
|
|
@@ -8,7 +8,7 @@ exports.MutableCategorizedStructProperty = void 0;
|
|
|
8
8
|
const MutableFlatGridItem_1 = require("./MutableFlatGridItem");
|
|
9
9
|
/**
|
|
10
10
|
* Mutable wrapper object for PropertyRecord with struct valueFormat which provides methods for working with and managing record children hierarchies.
|
|
11
|
-
* @
|
|
11
|
+
* @public
|
|
12
12
|
*/
|
|
13
13
|
class MutableCategorizedStructProperty extends MutableFlatGridItem_1.MutableCategorizedProperty {
|
|
14
14
|
constructor(record, parentSelectionKey, parentCategorySelectionKey, depth, gridItemFactory, overrideName, overrideDisplayLabel) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutableCategorizedStructProperty.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProperty.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAM/F,+DAA4I;AAG5I;;;GAGG;AACH,MAAa,gCAAiC,SAAQ,gDAA0B;IAI9E,YACE,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,eAAwC,EACxC,YAAqB,EACrB,oBAA6B;QAE7B,KAAK,CAAC,sCAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;QAClI,IAAI,CAAC,YAAY,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,0BAA0B,CAAC;QAChE,MAAM,aAAa,GAAG,KAAK,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1D,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,kBAAkB,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YACzD,OAAO,eAAe,CAAC,yBAAyB,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,0BAA0B,EAAE,aAAa,CAAC,CAAC;QAC7H,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAW,IAAI;QACb,OAAO,sCAAgB,CAAC,MAAM,CAAC;IACjC,CAAC;IAEM,WAAW;QAChB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAEe,qBAAqB;QACnC,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;IACnF,CAAC;IAEe,qBAAqB;QACnC,MAAM,WAAW,GAA2B,EAAE,CAAC;QAC/C,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACzC,wFAAwF;YACxF,qCAAqC;YACrC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,4BAA4B,EAAE,CAAC,CAAC,CAAC;SAClG;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IAEe,4BAA4B;QAC1C,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,4BAA4B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC;IACjG,CAAC;CACF;AA9CD,4EA8CC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module PropertyGrid\r\n */\r\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\r\nimport { FlatGridItemType, IMutableCategorizedPropertyItem, IMutableFlatGridItem, MutableCategorizedProperty } from \"./MutableFlatGridItem\";\r\nimport { IMutableGridItemFactory } from \"./MutableGridItemFactory\";\r\n\r\n/**\r\n * Mutable wrapper object for PropertyRecord with struct valueFormat which provides methods for working with and managing record children hierarchies.\r\n * @
|
|
1
|
+
{"version":3,"file":"MutableCategorizedStructProperty.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableCategorizedStructProper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AAW,EAAE,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,4BAA4B,EAAE,CAAC,CAAC,CAAC;SAClG;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IAEe,4BAA4B;QAC1C,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,4BAA4B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC;IACjG,CAAC;CACF;AA9CD,4EA8CC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module PropertyGrid\r\n */\r\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\r\nimport { FlatGridItemType, IMutableCategorizedPropertyItem, IMutableFlatGridItem, MutableCategorizedProperty } from \"./MutableFlatGridItem\";\r\nimport { IMutableGridItemFactory } from \"./MutableGridItemFactory\";\r\n\r\n/**\r\n * Mutable wrapper object for PropertyRecord with struct valueFormat which provides methods for working with and managing record children hierarchies.\r\n * @public\r\n */\r\nexport class MutableCategorizedStructProperty extends MutableCategorizedProperty implements IMutableCategorizedPropertyItem {\r\n private _renderLabel: boolean;\r\n private _children: IMutableCategorizedPropertyItem[];\r\n\r\n public constructor(\r\n record: PropertyRecord,\r\n parentSelectionKey: string,\r\n parentCategorySelectionKey: string,\r\n depth: number,\r\n gridItemFactory: IMutableGridItemFactory,\r\n overrideName?: string,\r\n overrideDisplayLabel?: string,\r\n ) {\r\n super(FlatGridItemType.Struct, record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\r\n this._renderLabel = !record.property.hideCompositePropertyLabel;\r\n const childrenDepth = depth + (this._renderLabel ? 1 : 0);\r\n this._children = record.getChildrenRecords().map((value) => {\r\n return gridItemFactory.createCategorizedProperty(value, this.selectionKey, this.parentCategorySelectionKey, childrenDepth);\r\n });\r\n }\r\n\r\n public get type(): FlatGridItemType.Struct {\r\n return FlatGridItemType.Struct;\r\n }\r\n\r\n public getChildren(): IMutableCategorizedPropertyItem[] {\r\n return this._children;\r\n }\r\n\r\n public override getDescendantsAndSelf() {\r\n return this._renderLabel ? super.getDescendantsAndSelf() : this.getDescendants();\r\n }\r\n\r\n public override getVisibleDescendants(): IMutableFlatGridItem[] {\r\n const descendants: IMutableFlatGridItem[] = [];\r\n if (this.isExpanded || !this._renderLabel) {\r\n // always render children if not rendering the label, otherwise there's no way to expand\r\n // this item to make children visible\r\n this.getChildren().forEach((child) => descendants.push(...child.getVisibleDescendantsAndSelf()));\r\n }\r\n return descendants;\r\n }\r\n\r\n public override getVisibleDescendantsAndSelf() {\r\n return this._renderLabel ? super.getVisibleDescendantsAndSelf() : this.getVisibleDescendants();\r\n }\r\n}\r\n"]}
|
|
@@ -8,7 +8,7 @@ import { PropertyCategory } from "../../PropertyDataProvider";
|
|
|
8
8
|
* Types of FlatGridItems for differentiating what property FlatGridItem is wrapping.
|
|
9
9
|
* Category for PropertyCategory
|
|
10
10
|
* (Primitive, Array, Struct) for PropertyRecord with valueFormats: (Primitive, Array, Struct)
|
|
11
|
-
* @
|
|
11
|
+
* @public
|
|
12
12
|
*/
|
|
13
13
|
export declare enum FlatGridItemType {
|
|
14
14
|
Category = 0,
|
|
@@ -18,12 +18,12 @@ export declare enum FlatGridItemType {
|
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Type which extracts FlatGridItemTypes relevant for working with CategorizedProperties
|
|
21
|
-
* @
|
|
21
|
+
* @public
|
|
22
22
|
*/
|
|
23
23
|
export declare type CategorizedPropertyTypes = FlatGridItemType.Array | FlatGridItemType.Primitive | FlatGridItemType.Struct;
|
|
24
24
|
/**
|
|
25
25
|
* Base mutable data structure defining common methods and properties for both CategorizedProperties and GridCategoryItems
|
|
26
|
-
* @
|
|
26
|
+
* @public
|
|
27
27
|
*/
|
|
28
28
|
export interface IMutableFlatPropertyGridItem {
|
|
29
29
|
readonly type: FlatGridItemType;
|
|
@@ -43,7 +43,7 @@ export interface IMutableFlatPropertyGridItem {
|
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* Base class for all FlatPropertyGrid items
|
|
46
|
-
* @
|
|
46
|
+
* @public
|
|
47
47
|
*/
|
|
48
48
|
export declare abstract class MutableFlatPropertyGridItem implements IMutableFlatPropertyGridItem {
|
|
49
49
|
private _depth;
|
|
@@ -97,7 +97,7 @@ export declare abstract class MutableFlatPropertyGridItem implements IMutableFla
|
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
99
|
* Data structure which describes methods and properties to be held by Mutable GridCategoryItems
|
|
100
|
-
* @
|
|
100
|
+
* @public
|
|
101
101
|
*/
|
|
102
102
|
export interface IMutableGridCategoryItem extends IMutableFlatPropertyGridItem {
|
|
103
103
|
type: FlatGridItemType.Category;
|
|
@@ -105,17 +105,17 @@ export interface IMutableGridCategoryItem extends IMutableFlatPropertyGridItem {
|
|
|
105
105
|
derivedCategory: PropertyCategory;
|
|
106
106
|
isRootCategory: boolean;
|
|
107
107
|
/**
|
|
108
|
-
* @deprecated Use [[getChildren]] and filter categories yourself. Do not use this method to mutate the grid model, as this may lead to unexpected outcomes.
|
|
108
|
+
* @deprecated in 3.1. Use [[getChildren]] and filter categories yourself. Do not use this method to mutate the grid model, as this may lead to unexpected outcomes.
|
|
109
109
|
*/
|
|
110
110
|
getChildCategories(): IMutableGridCategoryItem[];
|
|
111
111
|
/**
|
|
112
|
-
* @deprecated Use [[getDescendantsAndSelf]] and filter categories yourself. Do not use this method to mutate the grid model, as this may lead to unexpected outcomes.
|
|
112
|
+
* @deprecated in 3.1. Use [[getDescendantsAndSelf]] and filter categories yourself. Do not use this method to mutate the grid model, as this may lead to unexpected outcomes.
|
|
113
113
|
*/
|
|
114
114
|
getDescendantCategoriesAndSelf(): IMutableGridCategoryItem[];
|
|
115
115
|
}
|
|
116
116
|
/**
|
|
117
117
|
* Data structure which describes methods and properties to be held by Mutable CategorizedPropertyItems
|
|
118
|
-
* @
|
|
118
|
+
* @public
|
|
119
119
|
*/
|
|
120
120
|
export interface IMutableCategorizedPropertyItem extends IMutableFlatPropertyGridItem {
|
|
121
121
|
readonly type: CategorizedPropertyTypes;
|
|
@@ -126,12 +126,12 @@ export interface IMutableCategorizedPropertyItem extends IMutableFlatPropertyGri
|
|
|
126
126
|
}
|
|
127
127
|
/**
|
|
128
128
|
* Type which describes mutable GridCategoryItem or CategorizedProperty
|
|
129
|
-
* @
|
|
129
|
+
* @public
|
|
130
130
|
*/
|
|
131
131
|
export declare type IMutableFlatGridItem = IMutableCategorizedPropertyItem | IMutableGridCategoryItem;
|
|
132
132
|
/**
|
|
133
133
|
* Base class for all Mutable CategorizedProperties
|
|
134
|
-
* @
|
|
134
|
+
* @public
|
|
135
135
|
*/
|
|
136
136
|
export declare abstract class MutableCategorizedProperty extends MutableFlatPropertyGridItem implements Partial<IMutableCategorizedPropertyItem> {
|
|
137
137
|
private _derivedRecord;
|
|
@@ -19,7 +19,7 @@ const appui_abstract_1 = require("@itwin/appui-abstract");
|
|
|
19
19
|
* Types of FlatGridItems for differentiating what property FlatGridItem is wrapping.
|
|
20
20
|
* Category for PropertyCategory
|
|
21
21
|
* (Primitive, Array, Struct) for PropertyRecord with valueFormats: (Primitive, Array, Struct)
|
|
22
|
-
* @
|
|
22
|
+
* @public
|
|
23
23
|
*/
|
|
24
24
|
var FlatGridItemType;
|
|
25
25
|
(function (FlatGridItemType) {
|
|
@@ -30,7 +30,7 @@ var FlatGridItemType;
|
|
|
30
30
|
})(FlatGridItemType = exports.FlatGridItemType || (exports.FlatGridItemType = {}));
|
|
31
31
|
/**
|
|
32
32
|
* Base class for all FlatPropertyGrid items
|
|
33
|
-
* @
|
|
33
|
+
* @public
|
|
34
34
|
*/
|
|
35
35
|
class MutableFlatPropertyGridItem {
|
|
36
36
|
constructor(_depth, _parentSelectionKey, _parentCategorySelectionKey) {
|
|
@@ -134,7 +134,7 @@ exports.MutableFlatPropertyGridItem = MutableFlatPropertyGridItem;
|
|
|
134
134
|
_a = immer_1.immerable;
|
|
135
135
|
/**
|
|
136
136
|
* Base class for all Mutable CategorizedProperties
|
|
137
|
-
* @
|
|
137
|
+
* @public
|
|
138
138
|
*/
|
|
139
139
|
class MutableCategorizedProperty extends MutableFlatPropertyGridItem {
|
|
140
140
|
constructor(type, record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel) {
|
package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutableFlatGridItem.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.ts"],"names":[],"mappings":";;;;;;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,iCAAkC;AAClC,sDAA8B;AAC9B,0DAAiG;AAGjG;;;;;GAKG;AACH,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,+DAAQ,CAAA;IACR,iEAAS,CAAA;IACT,yDAAK,CAAA;IACL,2DAAM,CAAA;AACR,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B;AA6BD;;;GAGG;AACH,MAAsB,2BAA2B;IAQ/C,YAA2B,MAAc,EAAU,mBAAuC,EAAU,2BAA+C;QAAxH,WAAM,GAAN,MAAM,CAAQ;QAAU,wBAAmB,GAAnB,mBAAmB,CAAoB;QAAU,gCAA2B,GAA3B,2BAA2B,CAAoB;QAP5I,QAAW,GAAG,IAAI,CAAC;QAEV,QAAG,GAAW,iBAAO,CAAC,QAAQ,EAAE,CAAC;QACvC,gBAAW,GAAY,KAAK,CAAC;QAC7B,8BAAyB,GAAW,CAAC,CAAC;QACtC,0BAAqB,GAAY,KAAK,CAAC;QAG/C,IAAI,IAAI,CAAC,MAAM,G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,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,YAAY,CAAC;IACnD,CAAC;IAED;;OAEG;IACH,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;CACF;AA1GD,gEA0GC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PropertyGrid\r\n */\r\nimport { immerable } from \"immer\";\r\nimport shortid from \"shortid\";\r\nimport { PropertyDescription, PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\r\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\r\n\r\n/**\r\n * Types of FlatGridItems for differentiating what property FlatGridItem is wrapping.\r\n * Category for PropertyCategory\r\n * (Primitive, Array, Struct) for PropertyRecord with valueFormats: (Primitive, Array, Struct)\r\n * @beta\r\n */\r\nexport enum FlatGridItemType {\r\n Category,\r\n Primitive,\r\n Array,\r\n Struct,\r\n}\r\n\r\n/**\r\n * Type which extracts FlatGridItemTypes relevant for working with CategorizedProperties\r\n * @beta\r\n */\r\nexport type CategorizedPropertyTypes = FlatGridItemType.Array | FlatGridItemType.Primitive | FlatGridItemType.Struct;\r\n\r\n/**\r\n * Base mutable data structure defining common methods and properties for both CategorizedProperties and GridCategoryItems\r\n * @beta\r\n */\r\nexport interface IMutableFlatPropertyGridItem {\r\n readonly type: FlatGridItemType;\r\n readonly key: string;\r\n readonly selectionKey: string;\r\n readonly parentSelectionKey: string | undefined;\r\n readonly parentCategorySelectionKey: string | undefined;\r\n readonly depth: number;\r\n readonly label: string;\r\n lastInNumberOfCategories: number;\r\n isLastInRootCategory: boolean;\r\n isExpanded: boolean;\r\n getDescendantsAndSelf(): IMutableFlatGridItem[];\r\n getVisibleDescendantsAndSelf(): IMutableFlatGridItem[];\r\n getChildren(): IMutableFlatGridItem[];\r\n getLastVisibleDescendantOrSelf(): IMutableFlatGridItem;\r\n}\r\n\r\n/**\r\n * Base class for all FlatPropertyGrid items\r\n * @beta\r\n */\r\nexport abstract class MutableFlatPropertyGridItem implements IMutableFlatPropertyGridItem {\r\n public [immerable] = true;\r\n\r\n public readonly key: string = shortid.generate();\r\n protected _isExpanded: boolean = false;\r\n protected _lastInNumberOfCategories: number = 0;\r\n protected _isLastInRootCategory: boolean = false;\r\n\r\n public constructor(private _depth: number, private _parentSelectionKey: string | undefined, private _parentCategorySelectionKey: string | undefined) {\r\n if (this._depth < 0)\r\n throw new Error(\"Depth cannot be negative\");\r\n }\r\n\r\n public abstract type: FlatGridItemType;\r\n public abstract label: string;\r\n public abstract selectionKey: string;\r\n\r\n public get depth() {\r\n return this._depth;\r\n }\r\n\r\n public get parentSelectionKey() {\r\n return this._parentSelectionKey;\r\n }\r\n\r\n public get parentCategorySelectionKey() {\r\n return this._parentCategorySelectionKey;\r\n }\r\n\r\n public get isExpanded() {\r\n return this._isExpanded;\r\n }\r\n\r\n public set isExpanded(value: boolean) {\r\n this._isExpanded = value;\r\n }\r\n\r\n public abstract getChildren(): IMutableFlatGridItem[];\r\n public abstract getSelf(): IMutableFlatGridItem;\r\n\r\n protected getDescendants() {\r\n const descendants: IMutableFlatGridItem[] = [];\r\n this.getChildren().forEach((child) => descendants.push(...child.getDescendantsAndSelf()));\r\n\r\n return descendants;\r\n }\r\n\r\n /**\r\n * Gets a flat list of all FlatGridItems beneath this flat grid item including itself in depth first visiting order.\r\n */\r\n public getDescendantsAndSelf(): IMutableFlatGridItem[] {\r\n return [this.getSelf(), ...this.getDescendants()];\r\n }\r\n\r\n /**\r\n * Gets a flat list of visible FlatGridItems beneath this flat grid item.\r\n */\r\n public getVisibleDescendants(): IMutableFlatGridItem[] {\r\n const descendants: IMutableFlatGridItem[] = [];\r\n if (this.isExpanded)\r\n this.getChildren().forEach((child) => descendants.push(...child.getVisibleDescendantsAndSelf()));\r\n return descendants;\r\n }\r\n\r\n /**\r\n * Gets a flat list of visible FlatGridItems beneath this flat grid item and itself in depth first visiting order.\r\n */\r\n public getVisibleDescendantsAndSelf(): IMutableFlatGridItem[] {\r\n return [this.getSelf(), ...this.getVisibleDescendants()];\r\n }\r\n\r\n /**\r\n * @returns self if item is not expanded, last visible descendant of this item otherwise.\r\n */\r\n public getLastVisibleDescendantOrSelf(): IMutableFlatGridItem {\r\n if (!this.isExpanded)\r\n return this.getSelf();\r\n\r\n const children = this.getChildren();\r\n if (children.length < 1)\r\n return this.getSelf();\r\n\r\n return children[children.length - 1].getLastVisibleDescendantOrSelf();\r\n }\r\n\r\n /**\r\n * Sets lastInNumberOfCategories value and sends it down to this items last child\r\n * @internal\r\n */\r\n public get lastInNumberOfCategories(): number {\r\n if (this.isExpanded && this.getChildren().length > 0)\r\n return 0;\r\n\r\n return this._lastInNumberOfCategories;\r\n }\r\n\r\n public set lastInNumberOfCategories(value: number) {\r\n this._lastInNumberOfCategories = value;\r\n const children = this.getChildren();\r\n if (children.length < 1)\r\n return;\r\n\r\n children[children.length - 1].lastInNumberOfCategories = value;\r\n }\r\n\r\n /**\r\n * Gets and sets isLastInRootCategory value and sends it down to this items last child\r\n * @internal\r\n */\r\n public get isLastInRootCategory(): boolean {\r\n if (this.isExpanded && this.getChildren().length > 0)\r\n return false;\r\n\r\n return this._isLastInRootCategory;\r\n }\r\n\r\n public set isLastInRootCategory(value: boolean) {\r\n this._isLastInRootCategory = value;\r\n const children = this.getChildren();\r\n if (children.length < 1)\r\n return;\r\n\r\n children[children.length - 1].isLastInRootCategory = value;\r\n }\r\n}\r\n\r\n/**\r\n * Data structure which describes methods and properties to be held by Mutable GridCategoryItems\r\n * @beta\r\n */\r\nexport interface IMutableGridCategoryItem extends IMutableFlatPropertyGridItem {\r\n type: FlatGridItemType.Category;\r\n name: string;\r\n derivedCategory: PropertyCategory;\r\n isRootCategory: boolean;\r\n\r\n /**\r\n * @deprecated Use [[getChildren]] and filter categories yourself. Do not use this method to mutate the grid model, as this may lead to unexpected outcomes.\r\n */\r\n getChildCategories(): IMutableGridCategoryItem[];\r\n /**\r\n * @deprecated Use [[getDescendantsAndSelf]] and filter categories yourself. Do not use this method to mutate the grid model, as this may lead to unexpected outcomes.\r\n */\r\n getDescendantCategoriesAndSelf(): IMutableGridCategoryItem[];\r\n}\r\n\r\n/**\r\n * Data structure which describes methods and properties to be held by Mutable CategorizedPropertyItems\r\n * @beta\r\n */\r\nexport interface IMutableCategorizedPropertyItem extends IMutableFlatPropertyGridItem {\r\n readonly type: CategorizedPropertyTypes;\r\n readonly derivedRecord: PropertyRecord;\r\n readonly parentCategorySelectionKey: string;\r\n readonly parentSelectionKey: string;\r\n\r\n getChildren(): IMutableCategorizedPropertyItem[];\r\n}\r\n\r\n/**\r\n * Type which describes mutable GridCategoryItem or CategorizedProperty\r\n * @beta\r\n */\r\nexport type IMutableFlatGridItem = IMutableCategorizedPropertyItem | IMutableGridCategoryItem;\r\n\r\n/**\r\n * Base class for all Mutable CategorizedProperties\r\n * @beta\r\n */\r\nexport abstract class MutableCategorizedProperty extends MutableFlatPropertyGridItem implements Partial<IMutableCategorizedPropertyItem> {\r\n private _derivedRecord: PropertyRecord;\r\n private _selectionKey: string;\r\n\r\n public constructor(\r\n type: CategorizedPropertyTypes,\r\n record: PropertyRecord,\r\n parentSelectionKey: string,\r\n parentCategorySelectionKey: string,\r\n depth: number,\r\n overrideName?: string,\r\n overrideDisplayLabel?: string,\r\n ) {\r\n super(depth, parentSelectionKey, parentCategorySelectionKey);\r\n\r\n const recordType = this.valueTypeToFlatGridType(record.value.valueFormat);\r\n if (recordType !== type) {\r\n const expectedTypeStr = FlatGridItemType[type];\r\n const actualTypeStr = FlatGridItemType[recordType];\r\n throw Error(`Record with incorrect value format passed to property: expected ${expectedTypeStr}, got ${actualTypeStr}`);\r\n }\r\n\r\n const overridenProperty = this.makeOverridenProperty(record.property, overrideName, overrideDisplayLabel);\r\n this._derivedRecord = this.makeDerivedRecord(record, overridenProperty);\r\n\r\n this._selectionKey = `${this.parentSelectionKey}_${this.derivedRecord.property.name}`;\r\n this._isExpanded = !!record.autoExpand;\r\n }\r\n\r\n public abstract override type: CategorizedPropertyTypes;\r\n public abstract override getChildren(): IMutableCategorizedPropertyItem[];\r\n\r\n /**\r\n * Maps PropertyRecord valueFormat to FlatGridItemType\r\n * @param valueType valueFormat to map\r\n * @returns mapped FlatGridItemType\r\n */\r\n private valueTypeToFlatGridType(valueType: PropertyValueFormat) {\r\n switch (valueType) {\r\n case PropertyValueFormat.Primitive:\r\n return FlatGridItemType.Primitive;\r\n case PropertyValueFormat.Array:\r\n return FlatGridItemType.Array;\r\n case PropertyValueFormat.Struct:\r\n return FlatGridItemType.Struct;\r\n /* istanbul ignore next */\r\n default:\r\n const unhandledType: never = valueType;\r\n throw Error(`Property Value Format not handled: ${unhandledType}`);\r\n }\r\n }\r\n\r\n /**\r\n * Make new property description with overriden fields.\r\n * @param propertyDescription property description to override.\r\n * @param overrideName property description name to override.\r\n * @param overrideDisplay property description display name to override.\r\n */\r\n private makeOverridenProperty(propertyDescription: PropertyDescription, overrideName?: string, overrideDisplay?: string): PropertyDescription {\r\n const { name, displayLabel, ...property } = { ...propertyDescription };\r\n const newName = overrideName ?? name;\r\n const newDisplayLabel = overrideDisplay ?? displayLabel;\r\n\r\n return { ...property, name: newName, displayLabel: newDisplayLabel };\r\n }\r\n\r\n /**\r\n * Gets derived property record that has it's property description field overriden\r\n */\r\n private makeDerivedRecord(record: PropertyRecord, overridenPropertyDescription: PropertyDescription) {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { value, property, ...others } = record;\r\n const newRecord = new PropertyRecord(value, overridenPropertyDescription);\r\n\r\n return Object.assign(newRecord, others);\r\n }\r\n\r\n public getSelf(): IMutableCategorizedPropertyItem {\r\n return this;\r\n }\r\n\r\n public override get parentCategorySelectionKey() {\r\n return super.parentCategorySelectionKey!;\r\n }\r\n\r\n public override get parentSelectionKey() {\r\n return super.parentSelectionKey!;\r\n }\r\n\r\n /**\r\n * Unique selection key made of parent selectionKey and this property name.\r\n */\r\n public get selectionKey() {\r\n return this._selectionKey;\r\n }\r\n\r\n public get label() {\r\n return this._derivedRecord.property.displayLabel;\r\n }\r\n\r\n /**\r\n * Record with overriden property description.\r\n */\r\n public get derivedRecord() {\r\n return this._derivedRecord;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"MutableFlatGridItem.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.ts"],"names":[],"mappings":";;;;;;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,iCAAkC;AAClC,sDAA8B;AAC9B,0DAAiG;AAGjG;;;;;GAKG;AACH,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,+DAAQ,CAAA;IACR,iEAAS,CAAA;IACT,yDAAK,CAAA;IACL,2DAAM,CAAA;AACR,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B;AA6BD;;;GAGG;AACH,MAAsB,2BAA2B;IAQ/C,YAA2B,MAAc,EAAU,mBAAuC,EAAU,2BAA+C;QAAxH,WAAM,GAAN,MAAM,CAAQ;QAAU,wBAAmB,GAAnB,mBAAmB,CAAoB;QAAU,gCAA2B,GAA3B,2BAA2B,CAAoB;QAP5I,QAAW,GAAG,IAAI,CAAC;QAEV,QAAG,GAAW,iBAAO,CAAC,QAAQ,EAAE,CAAC;QACvC,gBAAW,GAAY,KAAK,CAAC;QAC7B,8BAAyB,GAAW,CAAC,CAAC;QACtC,0BAAqB,GAAY,KAAK,CAAC;QAG/C,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAChD,CAAC;IAMD,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,IAAW,kBAAkB;QAC3B,OAAO,IAAI,CAAC,mBAAmB,CAAC;IACl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ACtE;IACH,CAAC;IAED;;;;;OAKG;IACK,qBAAqB,CAAC,mBAAwC,EAAE,YAAqB,EAAE,eAAwB;QACrH,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,QAAQ,EAAE,GAAG,EAAE,GAAG,mBAAmB,EAAE,CAAC;QACvE,MAAM,OAAO,GAAG,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,IAAI,CAAC;QACrC,MAAM,eAAe,GAAG,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,YAAY,CAAC;QAExD,OAAO,EAAE,GAAG,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;IACvE,CAAC;IAED;;OAEG;IACK,iBAAiB,CAAC,MAAsB,EAAE,4BAAiD;QACjG,6DAA6D;QAC7D,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;QAC9C,MAAM,SAAS,GAAG,IAAI,+BAAc,CAAC,KAAK,EAAE,4BAA4B,CAAC,CAAC;QAE1E,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IAEM,OAAO;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAoB,0BAA0B;QAC5C,OAAO,KAAK,CAAC,0BAA2B,CAAC;IAC3C,CAAC;IAED,IAAoB,kBAAkB;QACpC,OAAO,KAAK,CAAC,kBAAmB,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,YAAY,CAAC;IACnD,CAAC;IAED;;OAEG;IACH,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;CACF;AA1GD,gEA0GC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PropertyGrid\r\n */\r\nimport { immerable } from \"immer\";\r\nimport shortid from \"shortid\";\r\nimport { PropertyDescription, PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\r\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\r\n\r\n/**\r\n * Types of FlatGridItems for differentiating what property FlatGridItem is wrapping.\r\n * Category for PropertyCategory\r\n * (Primitive, Array, Struct) for PropertyRecord with valueFormats: (Primitive, Array, Struct)\r\n * @public\r\n */\r\nexport enum FlatGridItemType {\r\n Category,\r\n Primitive,\r\n Array,\r\n Struct,\r\n}\r\n\r\n/**\r\n * Type which extracts FlatGridItemTypes relevant for working with CategorizedProperties\r\n * @public\r\n */\r\nexport type CategorizedPropertyTypes = FlatGridItemType.Array | FlatGridItemType.Primitive | FlatGridItemType.Struct;\r\n\r\n/**\r\n * Base mutable data structure defining common methods and properties for both CategorizedProperties and GridCategoryItems\r\n * @public\r\n */\r\nexport interface IMutableFlatPropertyGridItem {\r\n readonly type: FlatGridItemType;\r\n readonly key: string;\r\n readonly selectionKey: string;\r\n readonly parentSelectionKey: string | undefined;\r\n readonly parentCategorySelectionKey: string | undefined;\r\n readonly depth: number;\r\n readonly label: string;\r\n lastInNumberOfCategories: number;\r\n isLastInRootCategory: boolean;\r\n isExpanded: boolean;\r\n getDescendantsAndSelf(): IMutableFlatGridItem[];\r\n getVisibleDescendantsAndSelf(): IMutableFlatGridItem[];\r\n getChildren(): IMutableFlatGridItem[];\r\n getLastVisibleDescendantOrSelf(): IMutableFlatGridItem;\r\n}\r\n\r\n/**\r\n * Base class for all FlatPropertyGrid items\r\n * @public\r\n */\r\nexport abstract class MutableFlatPropertyGridItem implements IMutableFlatPropertyGridItem {\r\n public [immerable] = true;\r\n\r\n public readonly key: string = shortid.generate();\r\n protected _isExpanded: boolean = false;\r\n protected _lastInNumberOfCategories: number = 0;\r\n protected _isLastInRootCategory: boolean = false;\r\n\r\n public constructor(private _depth: number, private _parentSelectionKey: string | undefined, private _parentCategorySelectionKey: string | undefined) {\r\n if (this._depth < 0)\r\n throw new Error(\"Depth cannot be negative\");\r\n }\r\n\r\n public abstract type: FlatGridItemType;\r\n public abstract label: string;\r\n public abstract selectionKey: string;\r\n\r\n public get depth() {\r\n return this._depth;\r\n }\r\n\r\n public get parentSelectionKey() {\r\n return this._parentSelectionKey;\r\n }\r\n\r\n public get parentCategorySelectionKey() {\r\n return this._parentCategorySelectionKey;\r\n }\r\n\r\n public get isExpanded() {\r\n return this._isExpanded;\r\n }\r\n\r\n public set isExpanded(value: boolean) {\r\n this._isExpanded = value;\r\n }\r\n\r\n public abstract getChildren(): IMutableFlatGridItem[];\r\n public abstract getSelf(): IMutableFlatGridItem;\r\n\r\n protected getDescendants() {\r\n const descendants: IMutableFlatGridItem[] = [];\r\n this.getChildren().forEach((child) => descendants.push(...child.getDescendantsAndSelf()));\r\n\r\n return descendants;\r\n }\r\n\r\n /**\r\n * Gets a flat list of all FlatGridItems beneath this flat grid item including itself in depth first visiting order.\r\n */\r\n public getDescendantsAndSelf(): IMutableFlatGridItem[] {\r\n return [this.getSelf(), ...this.getDescendants()];\r\n }\r\n\r\n /**\r\n * Gets a flat list of visible FlatGridItems beneath this flat grid item.\r\n */\r\n public getVisibleDescendants(): IMutableFlatGridItem[] {\r\n const descendants: IMutableFlatGridItem[] = [];\r\n if (this.isExpanded)\r\n this.getChildren().forEach((child) => descendants.push(...child.getVisibleDescendantsAndSelf()));\r\n return descendants;\r\n }\r\n\r\n /**\r\n * Gets a flat list of visible FlatGridItems beneath this flat grid item and itself in depth first visiting order.\r\n */\r\n public getVisibleDescendantsAndSelf(): IMutableFlatGridItem[] {\r\n return [this.getSelf(), ...this.getVisibleDescendants()];\r\n }\r\n\r\n /**\r\n * @returns self if item is not expanded, last visible descendant of this item otherwise.\r\n */\r\n public getLastVisibleDescendantOrSelf(): IMutableFlatGridItem {\r\n if (!this.isExpanded)\r\n return this.getSelf();\r\n\r\n const children = this.getChildren();\r\n if (children.length < 1)\r\n return this.getSelf();\r\n\r\n return children[children.length - 1].getLastVisibleDescendantOrSelf();\r\n }\r\n\r\n /**\r\n * Sets lastInNumberOfCategories value and sends it down to this items last child\r\n * @internal\r\n */\r\n public get lastInNumberOfCategories(): number {\r\n if (this.isExpanded && this.getChildren().length > 0)\r\n return 0;\r\n\r\n return this._lastInNumberOfCategories;\r\n }\r\n\r\n public set lastInNumberOfCategories(value: number) {\r\n this._lastInNumberOfCategories = value;\r\n const children = this.getChildren();\r\n if (children.length < 1)\r\n return;\r\n\r\n children[children.length - 1].lastInNumberOfCategories = value;\r\n }\r\n\r\n /**\r\n * Gets and sets isLastInRootCategory value and sends it down to this items last child\r\n * @internal\r\n */\r\n public get isLastInRootCategory(): boolean {\r\n if (this.isExpanded && this.getChildren().length > 0)\r\n return false;\r\n\r\n return this._isLastInRootCategory;\r\n }\r\n\r\n public set isLastInRootCategory(value: boolean) {\r\n this._isLastInRootCategory = value;\r\n const children = this.getChildren();\r\n if (children.length < 1)\r\n return;\r\n\r\n children[children.length - 1].isLastInRootCategory = value;\r\n }\r\n}\r\n\r\n/**\r\n * Data structure which describes methods and properties to be held by Mutable GridCategoryItems\r\n * @public\r\n */\r\nexport interface IMutableGridCategoryItem extends IMutableFlatPropertyGridItem {\r\n type: FlatGridItemType.Category;\r\n name: string;\r\n derivedCategory: PropertyCategory;\r\n isRootCategory: boolean;\r\n\r\n /**\r\n * @deprecated in 3.1. Use [[getChildren]] and filter categories yourself. Do not use this method to mutate the grid model, as this may lead to unexpected outcomes.\r\n */\r\n getChildCategories(): IMutableGridCategoryItem[];\r\n /**\r\n * @deprecated in 3.1. Use [[getDescendantsAndSelf]] and filter categories yourself. Do not use this method to mutate the grid model, as this may lead to unexpected outcomes.\r\n */\r\n getDescendantCategoriesAndSelf(): IMutableGridCategoryItem[];\r\n}\r\n\r\n/**\r\n * Data structure which describes methods and properties to be held by Mutable CategorizedPropertyItems\r\n * @public\r\n */\r\nexport interface IMutableCategorizedPropertyItem extends IMutableFlatPropertyGridItem {\r\n readonly type: CategorizedPropertyTypes;\r\n readonly derivedRecord: PropertyRecord;\r\n readonly parentCategorySelectionKey: string;\r\n readonly parentSelectionKey: string;\r\n\r\n getChildren(): IMutableCategorizedPropertyItem[];\r\n}\r\n\r\n/**\r\n * Type which describes mutable GridCategoryItem or CategorizedProperty\r\n * @public\r\n */\r\nexport type IMutableFlatGridItem = IMutableCategorizedPropertyItem | IMutableGridCategoryItem;\r\n\r\n/**\r\n * Base class for all Mutable CategorizedProperties\r\n * @public\r\n */\r\nexport abstract class MutableCategorizedProperty extends MutableFlatPropertyGridItem implements Partial<IMutableCategorizedPropertyItem> {\r\n private _derivedRecord: PropertyRecord;\r\n private _selectionKey: string;\r\n\r\n public constructor(\r\n type: CategorizedPropertyTypes,\r\n record: PropertyRecord,\r\n parentSelectionKey: string,\r\n parentCategorySelectionKey: string,\r\n depth: number,\r\n overrideName?: string,\r\n overrideDisplayLabel?: string,\r\n ) {\r\n super(depth, parentSelectionKey, parentCategorySelectionKey);\r\n\r\n const recordType = this.valueTypeToFlatGridType(record.value.valueFormat);\r\n if (recordType !== type) {\r\n const expectedTypeStr = FlatGridItemType[type];\r\n const actualTypeStr = FlatGridItemType[recordType];\r\n throw Error(`Record with incorrect value format passed to property: expected ${expectedTypeStr}, got ${actualTypeStr}`);\r\n }\r\n\r\n const overridenProperty = this.makeOverridenProperty(record.property, overrideName, overrideDisplayLabel);\r\n this._derivedRecord = this.makeDerivedRecord(record, overridenProperty);\r\n\r\n this._selectionKey = `${this.parentSelectionKey}_${this.derivedRecord.property.name}`;\r\n this._isExpanded = !!record.autoExpand;\r\n }\r\n\r\n public abstract override type: CategorizedPropertyTypes;\r\n public abstract override getChildren(): IMutableCategorizedPropertyItem[];\r\n\r\n /**\r\n * Maps PropertyRecord valueFormat to FlatGridItemType\r\n * @param valueType valueFormat to map\r\n * @returns mapped FlatGridItemType\r\n */\r\n private valueTypeToFlatGridType(valueType: PropertyValueFormat) {\r\n switch (valueType) {\r\n case PropertyValueFormat.Primitive:\r\n return FlatGridItemType.Primitive;\r\n case PropertyValueFormat.Array:\r\n return FlatGridItemType.Array;\r\n case PropertyValueFormat.Struct:\r\n return FlatGridItemType.Struct;\r\n /* istanbul ignore next */\r\n default:\r\n const unhandledType: never = valueType;\r\n throw Error(`Property Value Format not handled: ${unhandledType}`);\r\n }\r\n }\r\n\r\n /**\r\n * Make new property description with overriden fields.\r\n * @param propertyDescription property description to override.\r\n * @param overrideName property description name to override.\r\n * @param overrideDisplay property description display name to override.\r\n */\r\n private makeOverridenProperty(propertyDescription: PropertyDescription, overrideName?: string, overrideDisplay?: string): PropertyDescription {\r\n const { name, displayLabel, ...property } = { ...propertyDescription };\r\n const newName = overrideName ?? name;\r\n const newDisplayLabel = overrideDisplay ?? displayLabel;\r\n\r\n return { ...property, name: newName, displayLabel: newDisplayLabel };\r\n }\r\n\r\n /**\r\n * Gets derived property record that has it's property description field overriden\r\n */\r\n private makeDerivedRecord(record: PropertyRecord, overridenPropertyDescription: PropertyDescription) {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { value, property, ...others } = record;\r\n const newRecord = new PropertyRecord(value, overridenPropertyDescription);\r\n\r\n return Object.assign(newRecord, others);\r\n }\r\n\r\n public getSelf(): IMutableCategorizedPropertyItem {\r\n return this;\r\n }\r\n\r\n public override get parentCategorySelectionKey() {\r\n return super.parentCategorySelectionKey!;\r\n }\r\n\r\n public override get parentSelectionKey() {\r\n return super.parentSelectionKey!;\r\n }\r\n\r\n /**\r\n * Unique selection key made of parent selectionKey and this property name.\r\n */\r\n public get selectionKey() {\r\n return this._selectionKey;\r\n }\r\n\r\n public get label() {\r\n return this._derivedRecord.property.displayLabel;\r\n }\r\n\r\n /**\r\n * Record with overriden property description.\r\n */\r\n public get derivedRecord() {\r\n return this._derivedRecord;\r\n }\r\n}\r\n"]}
|
|
@@ -7,14 +7,14 @@ import { FlatGridItemType, IMutableFlatGridItem, IMutableGridCategoryItem, Mutab
|
|
|
7
7
|
import { IMutableGridItemFactory } from "./MutableGridItemFactory";
|
|
8
8
|
/**
|
|
9
9
|
* Category name to PropertyRecord[] key pair interface used to describe which records belong to which category.
|
|
10
|
-
* @
|
|
10
|
+
* @public
|
|
11
11
|
*/
|
|
12
12
|
export interface CategoryRecordsDict {
|
|
13
13
|
[categoryName: string]: PropertyRecord[];
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Mutable wrapper object for PropertyCategory which provides methods for working with and managing category and record children hierarchies
|
|
17
|
-
* @
|
|
17
|
+
* @public
|
|
18
18
|
*/
|
|
19
19
|
export declare class MutableGridCategory extends MutableFlatPropertyGridItem implements IMutableGridCategoryItem {
|
|
20
20
|
private _children;
|
|
@@ -8,7 +8,7 @@ exports.MutableGridCategory = void 0;
|
|
|
8
8
|
const MutableFlatGridItem_1 = require("./MutableFlatGridItem");
|
|
9
9
|
/**
|
|
10
10
|
* Mutable wrapper object for PropertyCategory which provides methods for working with and managing category and record children hierarchies
|
|
11
|
-
* @
|
|
11
|
+
* @public
|
|
12
12
|
*/
|
|
13
13
|
class MutableGridCategory extends MutableFlatGridItem_1.MutableFlatPropertyGridItem {
|
|
14
14
|
constructor(category, recordsDict, gridItemFactory, parentSelectionKey, depth = 0) {
|
package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridCategory.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutableGridCategory.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableGridCategory.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAO/F,+DAAsI;AAWtI;;;GAGG;AACH,MAAa,mBAAoB,SAAQ,iDAA2B;IAMlE,YACE,QAA0B,EAC1B,WAAgC,EAChC,eAAwC,EACxC,kBAA2B,EA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,KAAK,CAAC,wBAAwB,GAAG,KAAK,GAAG,CAAC,CAAC;IAC7C,CAAC;CACF;AAvGD,kDAuGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module PropertyGrid\r\n */\r\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\r\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\r\nimport { FlatGridItemType, IMutableFlatGridItem, IMutableGridCategoryItem, MutableFlatPropertyGridItem } from \"./MutableFlatGridItem\";\r\nimport { IMutableGridItemFactory } from \"./MutableGridItemFactory\";\r\n\r\n/**\r\n * Category name to PropertyRecord[] key pair interface used to describe which records belong to which category.\r\n * @
|
|
1
|
+
{"version":3,"file":"MutableGridCategory.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableGridCategory.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAO/F,+DAAsI;AAWtI;;;GAGG;AACH,MAAa,mBAAoB,SAAQ,iDAA2B;IAMlE,YACE,QAA0B,EAC1B,WAAgC,EAChC,eAAwC,EACxC,kBAA2B,EAC3B,QAAgB,CAAC;;QAEjB,KAAK,CAAC,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;QACrD,IAAI,CAAC,SAAS,GAAG,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC;QAEzF,IAAI,kBAAkB,KAAK,SAAS;YAClC,IAAI,CAAC,aAAa,GAAG,GAAG,kBAAkB,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;;YAE9D,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC;QAErC,IAAI,CAAC,WAAW,GAA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IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC;IACxD,CAAC;IAEM,OAAO;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,WAAW;QAChB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAEM,kBAAkB;QACvB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAED;;OAEG;IACI,8BAA8B;QACnC,MAAM,WAAW,GAA+B,EAAE,CAAC;QACnD,mDAAmD;QACnD,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,8BAA8B,EAAE,CAAC,CAAC,CAAC;QAEtG,OAAO,CAAC,IAAI,EAAE,GAAG,WAAW,CAAC,CAAC;IAChC,CAAC;IAED;;;;;OAKG;IACH,IAAoB,wBAAwB;QAC1C,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,MAAM,GAAG,CAAC;YAClD,OAAO,CAAC,CAAC;QAEX,OAAO,IAAI,CAAC,yBAAyB,GAAG,CAAC,CAAC;IAC5C,CAAC;IAED,IAAoB,wBAAwB,CAAC,KAAa;QACxD,KAAK,CAAC,wBAAwB,GAAG,KAAK,GAAG,CAAC,CAAC;IAC7C,CAAC;CACF;AAvGD,kDAuGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module PropertyGrid\r\n */\r\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\r\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\r\nimport { FlatGridItemType, IMutableFlatGridItem, IMutableGridCategoryItem, MutableFlatPropertyGridItem } from \"./MutableFlatGridItem\";\r\nimport { IMutableGridItemFactory } from \"./MutableGridItemFactory\";\r\n\r\n/**\r\n * Category name to PropertyRecord[] key pair interface used to describe which records belong to which category.\r\n * @public\r\n */\r\nexport interface CategoryRecordsDict {\r\n [categoryName: string]: PropertyRecord[];\r\n}\r\n\r\n/**\r\n * Mutable wrapper object for PropertyCategory which provides methods for working with and managing category and record children hierarchies\r\n * @public\r\n */\r\nexport class MutableGridCategory extends MutableFlatPropertyGridItem implements IMutableGridCategoryItem {\r\n private _children: IMutableFlatGridItem[];\r\n private _childCategories: IMutableGridCategoryItem[];\r\n private _selectionKey: string;\r\n private _category: PropertyCategory;\r\n\r\n constructor(\r\n category: PropertyCategory,\r\n recordsDict: CategoryRecordsDict,\r\n gridItemFactory: IMutableGridItemFactory,\r\n parentSelectionKey?: string,\r\n depth: number = 0,\r\n ) {\r\n super(depth, parentSelectionKey, parentSelectionKey);\r\n this._category = { name: category.name, label: category.label, expand: category.expand };\r\n\r\n if (parentSelectionKey !== undefined)\r\n this._selectionKey = `${parentSelectionKey}_${category.name}`;\r\n else\r\n this._selectionKey = category.name;\r\n\r\n this._isExpanded = category.expand;\r\n\r\n // Even though categories are nested and have their own depth, categorized properties depth is counted starting with the parent category.\r\n const categoryRecords = recordsDict[category.name] ?? [];\r\n this._children = categoryRecords.map((value) => gridItemFactory.createCategorizedProperty(value, this.selectionKey, this.selectionKey, 0));\r\n\r\n const childCategories = category.childCategories ?? [];\r\n this._childCategories = childCategories.map((childCategory) => gridItemFactory.createGridCategory(childCategory, recordsDict, this.selectionKey, this.depth + 1));\r\n\r\n this._children.push(...this._childCategories);\r\n\r\n // Assign lastInNumberOfCategories and isLastInRootCategory for entire children hierarchy\r\n this.lastInNumberOfCategories = 0;\r\n this.isLastInRootCategory = this.isRootCategory;\r\n }\r\n\r\n /**\r\n * Category is considered to be root category if its depth is 0\r\n */\r\n public get isRootCategory() {\r\n return this.depth === 0;\r\n }\r\n\r\n public get selectionKey() {\r\n return this._selectionKey;\r\n }\r\n\r\n public get type(): FlatGridItemType.Category {\r\n return FlatGridItemType.Category;\r\n }\r\n\r\n public get name() {\r\n return this._category.name;\r\n }\r\n\r\n public get label() {\r\n return this._category.label;\r\n }\r\n\r\n public get derivedCategory(): PropertyCategory {\r\n return { ...this._category, expand: this.isExpanded };\r\n }\r\n\r\n public getSelf() {\r\n return this;\r\n }\r\n\r\n public getChildren(): IMutableFlatGridItem[] {\r\n return this._children;\r\n }\r\n\r\n public getChildCategories() {\r\n return this._childCategories;\r\n }\r\n\r\n /**\r\n * Gets a flat list of all categories beneath this category and itself in depth first visiting order.\r\n */\r\n public getDescendantCategoriesAndSelf(): IMutableGridCategoryItem[] {\r\n const descendants: IMutableGridCategoryItem[] = [];\r\n // eslint-disable-next-line deprecation/deprecation\r\n this._childCategories.forEach((value) => descendants.push(...value.getDescendantCategoriesAndSelf()));\r\n\r\n return [this, ...descendants];\r\n }\r\n\r\n /**\r\n * Gets and Sets lastInNumberOfCategories.\r\n * Setter increments set value by one to account self as category.\r\n * New value is sent down to this items last child\r\n * @internal\r\n */\r\n public override get lastInNumberOfCategories(): number {\r\n if (this.isExpanded && this.getChildren().length > 0)\r\n return 0;\r\n\r\n return this._lastInNumberOfCategories - 1;\r\n }\r\n\r\n public override set lastInNumberOfCategories(value: number) {\r\n super.lastInNumberOfCategories = value + 1;\r\n }\r\n}\r\n"]}
|
package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { IMutableCategorizedPropertyItem, IMutableGridCategoryItem } from "./Mut
|
|
|
10
10
|
import { CategoryRecordsDict } from "./MutableGridCategory";
|
|
11
11
|
/**
|
|
12
12
|
* IMutableGridItemFactory interface for creating MutableGridItem objects
|
|
13
|
-
* @
|
|
13
|
+
* @public
|
|
14
14
|
*/
|
|
15
15
|
export interface IMutableGridItemFactory {
|
|
16
16
|
createCategorizedProperty: (record: PropertyRecord, parentSelectionKey: string, parentCategorySelectionKey: string, depth: number, overrideName?: string, overrideDisplayLabel?: string) => IMutableCategorizedPropertyItem;
|
|
@@ -18,7 +18,7 @@ export interface IMutableGridItemFactory {
|
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Implementation of IMutableGridItemFactory for creating MutableGridItem objects.
|
|
21
|
-
* @
|
|
21
|
+
* @public
|
|
22
22
|
*/
|
|
23
23
|
export declare class MutableGridItemFactory implements IMutableGridItemFactory {
|
|
24
24
|
protected createPrimitiveProperty(record: PropertyRecord, parentSelectionKey: string, parentCategorySelectionKey: string, depth: number, overrideName?: string, overrideDisplayLabel?: string): MutableCategorizedPrimitiveProperty;
|
|
@@ -16,7 +16,7 @@ const MutableCustomGridCategory_1 = require("./MutableCustomGridCategory");
|
|
|
16
16
|
const MutableGridCategory_1 = require("./MutableGridCategory");
|
|
17
17
|
/**
|
|
18
18
|
* Implementation of IMutableGridItemFactory for creating MutableGridItem objects.
|
|
19
|
-
* @
|
|
19
|
+
* @public
|
|
20
20
|
*/
|
|
21
21
|
class MutableGridItemFactory {
|
|
22
22
|
createPrimitiveProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel) {
|
package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutableGridItemFactory.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,0DAA4E;AAE5E,uFAAoF;AACpF,+FAA4F;AAC5F,yFAAsF;AACtF,2EAAwE;AAExE,+DAAiF;AAwBjF;;;GAGG;AACH,MAAa,sBAAsB;IACvB,uBAAuB,CAC/B,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,OAAO,IAAI,yEAAmC,CAAC,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KA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C1B;gBACE,MAAM,mBAAmB,GAAU,WAAW,CAAC;gBAC/C,MAAM,IAAI,KAAK,CAAC,yDAAyD,mBAAmB,EAAE,CAAC,CAAC;SACnG;IACH,CAAC;IAED;;;;;;;OAOG;IACI,kBAAkB,CACvB,QAA0B,EAC1B,WAAgC,EAChC,kBAA2B,EAC3B,KAAc;QAEd,IAAI,QAAQ,CAAC,QAAQ,KAAK,SAAS;YACjC,OAAO,IAAI,qDAAyB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,CAAC,CAAC,CAAC;QAEpG,IAAI,kBAAkB,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS;YACzD,OAAO,IAAI,yCAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC;QAEzF,OAAO,IAAI,yCAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;IAC9D,CAAC;CACF;AAzFD,wDAyFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PropertyGrid\r\n */\r\nimport { PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\r\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\r\nimport { MutableCategorizedArrayProperty } from \"./MutableCategorizedArrayProperty\";\r\nimport { MutableCategorizedPrimitiveProperty } from \"./MutableCategorizedPrimitiveProperty\";\r\nimport { MutableCategorizedStructProperty } from \"./MutableCategorizedStructProperty\";\r\nimport { MutableCustomGridCategory } from \"./MutableCustomGridCategory\";\r\nimport { IMutableCategorizedPropertyItem, IMutableGridCategoryItem } from \"./MutableFlatGridItem\";\r\nimport { CategoryRecordsDict, MutableGridCategory } from \"./MutableGridCategory\";\r\n\r\n/**\r\n * IMutableGridItemFactory interface for creating MutableGridItem objects\r\n * @
|
|
1
|
+
{"version":3,"file":"MutableGridItemFactory.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-items/MutableGridItemFactory.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,0DAA4E;AAE5E,uFAAoF;AACpF,+FAA4F;AAC5F,yFAAsF;AACtF,2EAAwE;AAExE,+DAAiF;AAwBjF;;;GAGG;AACH,MAAa,sBAAsB;IACvB,uBAAuB,CAC/B,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,OAAO,IAAI,yEAAmC,CAAC,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;IACpJ,CAAC;IAES,mBAAmB,CAC3B,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,OAAO,IAAI,iEAA+B,CAAC,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;IACtJ,CAAC;IAES,oBAAoB,CAC5B,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,OAAO,IAAI,mEAAgC,CAAC,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;IACvJ,CAAC;IAED;;;;;;;;;OASG;IACI,yBAAyB,CAC9B,MAAsB,EACtB,kBAA0B,EAC1B,0BAAkC,EAClC,KAAa,EACb,YAAqB,EACrB,oBAA6B;QAE7B,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC;QAC7C,QAAQ,WAAW,EAAE;YACnB,KAAK,oCAAmB,CAAC,SAAS;gBAChC,OAAO,IAAI,CAAC,uBAAuB,CAAC,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;YACzI,KAAK,oCAAmB,CAAC,KAAK;gBAC5B,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;YACrI,KAAK,oCAAmB,CAAC,MAAM;gBAC7B,OAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,KAAK,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;YACtI,0BAA0B;YAC1B;gBACE,MAAM,mBAAmB,GAAU,WAAW,CAAC;gBAC/C,MAAM,IAAI,KAAK,CAAC,yDAAyD,mBAAmB,EAAE,CAAC,CAAC;SACnG;IACH,CAAC;IAED;;;;;;;OAOG;IACI,kBAAkB,CACvB,QAA0B,EAC1B,WAAgC,EAChC,kBAA2B,EAC3B,KAAc;QAEd,IAAI,QAAQ,CAAC,QAAQ,KAAK,SAAS;YACjC,OAAO,IAAI,qDAAyB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,CAAC,CAAC,CAAC;QAEpG,IAAI,kBAAkB,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS;YACzD,OAAO,IAAI,yCAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC;QAEzF,OAAO,IAAI,yCAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;IAC9D,CAAC;CACF;AAzFD,wDAyFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PropertyGrid\r\n */\r\nimport { PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\r\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\r\nimport { MutableCategorizedArrayProperty } from \"./MutableCategorizedArrayProperty\";\r\nimport { MutableCategorizedPrimitiveProperty } from \"./MutableCategorizedPrimitiveProperty\";\r\nimport { MutableCategorizedStructProperty } from \"./MutableCategorizedStructProperty\";\r\nimport { MutableCustomGridCategory } from \"./MutableCustomGridCategory\";\r\nimport { IMutableCategorizedPropertyItem, IMutableGridCategoryItem } from \"./MutableFlatGridItem\";\r\nimport { CategoryRecordsDict, MutableGridCategory } from \"./MutableGridCategory\";\r\n\r\n/**\r\n * IMutableGridItemFactory interface for creating MutableGridItem objects\r\n * @public\r\n */\r\nexport interface IMutableGridItemFactory {\r\n createCategorizedProperty: (\r\n record: PropertyRecord,\r\n parentSelectionKey: string,\r\n parentCategorySelectionKey: string,\r\n depth: number,\r\n overrideName?: string,\r\n overrideDisplayLabel?: string,\r\n ) => IMutableCategorizedPropertyItem;\r\n\r\n createGridCategory: (\r\n category: PropertyCategory,\r\n recordsDict: CategoryRecordsDict,\r\n parentSelectionKey?: string,\r\n depth?: number,\r\n ) => IMutableGridCategoryItem;\r\n}\r\n\r\n/**\r\n * Implementation of IMutableGridItemFactory for creating MutableGridItem objects.\r\n * @public\r\n */\r\nexport class MutableGridItemFactory implements IMutableGridItemFactory {\r\n protected createPrimitiveProperty(\r\n record: PropertyRecord,\r\n parentSelectionKey: string,\r\n parentCategorySelectionKey: string,\r\n depth: number,\r\n overrideName?: string,\r\n overrideDisplayLabel?: string,\r\n ) {\r\n return new MutableCategorizedPrimitiveProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\r\n }\r\n\r\n protected createArrayProperty(\r\n record: PropertyRecord,\r\n parentSelectionKey: string,\r\n parentCategorySelectionKey: string,\r\n depth: number,\r\n overrideName?: string,\r\n overrideDisplayLabel?: string,\r\n ) {\r\n return new MutableCategorizedArrayProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, this, overrideName, overrideDisplayLabel);\r\n }\r\n\r\n protected createStructProperty(\r\n record: PropertyRecord,\r\n parentSelectionKey: string,\r\n parentCategorySelectionKey: string,\r\n depth: number,\r\n overrideName?: string,\r\n overrideDisplayLabel?: string,\r\n ) {\r\n return new MutableCategorizedStructProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, this, overrideName, overrideDisplayLabel);\r\n }\r\n\r\n /**\r\n * Converts record into FlatGridItem.\r\n * @param record record to convert to a FlatGridItem.\r\n * @param parentSelectionKey parent selection key of provided `record`.\r\n * @param parentCategorySelectionKey parent category selection key of provided `record`.\r\n * @param depth current depth counting from parent category.\r\n * @param overrideName property name that overrides original record property name.\r\n * @param overrideDisplayLabel property display label that overrides original record property display label.\r\n * @returns converted CategorizedProperty.\r\n */\r\n public createCategorizedProperty(\r\n record: PropertyRecord,\r\n parentSelectionKey: string,\r\n parentCategorySelectionKey: string,\r\n depth: number,\r\n overrideName?: string,\r\n overrideDisplayLabel?: string,\r\n ): IMutableCategorizedPropertyItem {\r\n const valueFormat = record.value.valueFormat;\r\n switch (valueFormat) {\r\n case PropertyValueFormat.Primitive:\r\n return this.createPrimitiveProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\r\n case PropertyValueFormat.Array:\r\n return this.createArrayProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\r\n case PropertyValueFormat.Struct:\r\n return this.createStructProperty(record, parentSelectionKey, parentCategorySelectionKey, depth, overrideName, overrideDisplayLabel);\r\n /* istanbul ignore next */\r\n default:\r\n const unhandledRecordType: never = valueFormat;\r\n throw new Error(`Unhandled property record type. Was a new type added? ${unhandledRecordType}`);\r\n }\r\n }\r\n\r\n /**\r\n * Converts category into GridCategoryItem.\r\n * @param category PropertyCategory to convert.\r\n * @param recordsDict dictionary of category records.\r\n * @param parentSelectionKey parent selection key of this category.\r\n * @param depth current depth counting from root category.\r\n * @returns converted GridCategory.\r\n */\r\n public createGridCategory(\r\n category: PropertyCategory,\r\n recordsDict: CategoryRecordsDict,\r\n parentSelectionKey?: string,\r\n depth?: number,\r\n ): IMutableGridCategoryItem {\r\n if (category.renderer !== undefined)\r\n return new MutableCustomGridCategory(category, recordsDict, this, parentSelectionKey, depth ?? 0);\r\n\r\n if (parentSelectionKey !== undefined && depth !== undefined)\r\n return new MutableGridCategory(category, recordsDict, this, parentSelectionKey, depth);\r\n\r\n return new MutableGridCategory(category, recordsDict, this);\r\n }\r\n}\r\n"]}
|
package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts
CHANGED
|
@@ -16,14 +16,11 @@ export interface FlatPropertyRendererProps extends SharedRendererProps {
|
|
|
16
16
|
propertyValueRendererManager?: PropertyValueRendererManager;
|
|
17
17
|
/** Multiplier of how much the property is indented to the right */
|
|
18
18
|
indentation?: number;
|
|
19
|
-
/** Indicates property is being edited
|
|
20
|
-
* @beta */
|
|
19
|
+
/** Indicates property is being edited */
|
|
21
20
|
isEditing?: boolean;
|
|
22
|
-
/** Called when property edit is committed.
|
|
23
|
-
* @beta */
|
|
21
|
+
/** Called when property edit is committed. */
|
|
24
22
|
onEditCommit?: (args: PropertyUpdatedArgs, category: PropertyCategory) => void;
|
|
25
|
-
/** Called when property edit is cancelled.
|
|
26
|
-
* @beta */
|
|
23
|
+
/** Called when property edit is cancelled. */
|
|
27
24
|
onEditCancel?: () => void;
|
|
28
25
|
/** Whether property value is displayed in expanded state. */
|
|
29
26
|
isExpanded: boolean;
|
package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlatPropertyRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAmB,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG9D;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IACpE,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,4BAA4B;IAC5B,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;IAC5D,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;
|
|
1
|
+
{"version":3,"file":"FlatPropertyRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAmB,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG9D;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IACpE,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,4BAA4B;IAC5B,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;IAC5D,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/E,8CAA8C;IAC9C,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,6DAA6D;IAC7D,UAAU,EAAE,OAAO,CAAC;IACpB,wFAAwF;IACxF,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,uCAAuC;IACvC,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAE9C,SAAS,CAAC,EAAE,0BAA0B,GAAG;QAAE,YAAY,EAAE,OAAO,CAAC;QAAC,YAAY,EAAE,OAAO,CAAA;KAAE,CAAC;IAE1F,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAsDpE,CAAC"}
|
package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlatPropertyRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,0DAA4E;AAG5E,sEAAwF;AACxF,iGAA8F;AAC9F,uGAA4H;AAI5H,yFAAsF;
|
|
1
|
+
{"version":3,"file":"FlatPropertyRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+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AAK,CAAC,4BAA4B,EAClC,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,kBAAkB,EACxB,KAAK,CAAC,eAAe,EACrB,KAAK,CAAC,SAAS,CAChB,CAEF,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,oBAAoB,CAAC,SAAmB,EAAE,eAA6C;IAC9F,MAAM,wBAAwB,GAAG,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACzD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,wBAAwB,CAAC,OAAO,IAAI,SAAS,EAAE;YAClD,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAG,EAAE,CAAC,CAAC;SACvB;QAED,wBAAwB,CAAC,OAAO,GAAG,SAAS,CAAC;IAC/C,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PropertyGrid\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\r\nimport { Orientation } from \"@itwin/core-react\";\r\nimport { HighlightingComponentProps } from \"../../../common/HighlightingComponentProps\";\r\nimport { EditorContainer, PropertyUpdatedArgs } from \"../../../editors/EditorContainer\";\r\nimport { CommonPropertyRenderer } from \"../../../properties/renderers/CommonPropertyRenderer\";\r\nimport { PrimitivePropertyRenderer, PrimitiveRendererProps } from \"../../../properties/renderers/PrimitivePropertyRenderer\";\r\nimport { SharedRendererProps } from \"../../../properties/renderers/PropertyRenderer\";\r\nimport { PropertyValueRendererManager } from \"../../../properties/ValueRendererManager\";\r\nimport { PropertyCategory } from \"../../PropertyDataProvider\";\r\nimport { FlatNonPrimitivePropertyRenderer } from \"./FlatNonPrimitivePropertyRenderer\";\r\n\r\n/** Properties of [[FlatPropertyRenderer]] React component\r\n * @internal\r\n */\r\nexport interface FlatPropertyRendererProps extends SharedRendererProps {\r\n category?: PropertyCategory;\r\n /** Custom value renderer */\r\n propertyValueRendererManager?: PropertyValueRendererManager;\r\n /** Multiplier of how much the property is indented to the right */\r\n indentation?: number;\r\n /** Indicates property is being edited */\r\n isEditing?: boolean;\r\n /** Called when property edit is committed. */\r\n onEditCommit?: (args: PropertyUpdatedArgs, category: PropertyCategory) => void;\r\n /** Called when property edit is cancelled. */\r\n onEditCancel?: () => void;\r\n /** Whether property value is displayed in expanded state. */\r\n isExpanded: boolean;\r\n /** Called when toggling between expanded and collapsed property value display state. */\r\n onExpansionToggled: () => void;\r\n /** Reports property height changes. */\r\n onHeightChanged?: (newHeight: number) => void;\r\n\r\n highlight?: HighlightingComponentProps & { applyOnLabel: boolean, applyOnValue: boolean };\r\n\r\n children?: never;\r\n}\r\n\r\n/** A React component that renders flat properties\r\n * @internal\r\n */\r\nexport const FlatPropertyRenderer: React.FC<FlatPropertyRendererProps> = (props) => {\r\n const {\r\n category,\r\n propertyValueRendererManager,\r\n isEditing,\r\n onEditCommit,\r\n onEditCancel,\r\n onHeightChanged,\r\n highlight,\r\n ...passthroughProps\r\n } = props;\r\n\r\n const valueElementRenderer = () => (\r\n <DisplayValue\r\n propertyRecord={passthroughProps.propertyRecord}\r\n orientation={passthroughProps.orientation}\r\n columnRatio={passthroughProps.columnRatio}\r\n width={passthroughProps.width}\r\n category={category}\r\n propertyValueRendererManager={propertyValueRendererManager}\r\n isEditing={isEditing}\r\n onEditCommit={onEditCommit}\r\n onEditCancel={onEditCancel}\r\n isExpanded={passthroughProps.isExpanded}\r\n onExpansionToggled={passthroughProps.onExpansionToggled}\r\n onHeightChanged={onHeightChanged}\r\n highlight={highlight}\r\n />\r\n );\r\n\r\n const primitiveRendererProps: PrimitiveRendererProps = {\r\n ...passthroughProps,\r\n valueElementRenderer,\r\n indentation: props.indentation,\r\n };\r\n switch (props.propertyRecord.value.valueFormat) {\r\n case PropertyValueFormat.Primitive:\r\n return (<PrimitivePropertyRenderer highlight={highlight?.applyOnLabel ? highlight : undefined} {...primitiveRendererProps} />);\r\n\r\n case PropertyValueFormat.Array:\r\n // If array is empty, render it as a primitive property\r\n if (props.propertyRecord.value.items.length === 0)\r\n return (<PrimitivePropertyRenderer highlight={highlight?.applyOnLabel ? highlight : undefined} {...primitiveRendererProps} />);\r\n\r\n // eslint-disable-next-line no-fallthrough\r\n case PropertyValueFormat.Struct:\r\n return (\r\n <FlatNonPrimitivePropertyRenderer\r\n isExpanded={props.isExpanded}\r\n onExpandToggled={props.onExpansionToggled}\r\n {...primitiveRendererProps}\r\n />\r\n );\r\n }\r\n};\r\n\r\ninterface DisplayValueProps {\r\n isEditing?: boolean;\r\n propertyRecord: PropertyRecord;\r\n\r\n orientation: Orientation;\r\n columnRatio?: number;\r\n /** Pass width to rerender component as property grid width changes */\r\n width?: number;\r\n indentation?: number;\r\n propertyValueRendererManager?: PropertyValueRendererManager;\r\n isExpanded?: boolean;\r\n onExpansionToggled?: () => void;\r\n onHeightChanged?: (newHeight: number) => void;\r\n\r\n category?: PropertyCategory;\r\n onEditCancel?: () => void;\r\n onEditCommit?: (args: PropertyUpdatedArgs, category: PropertyCategory) => void;\r\n\r\n highlight?: HighlightingComponentProps & { applyOnLabel: boolean, applyOnValue: boolean };\r\n}\r\n\r\nconst DisplayValue: React.FC<DisplayValueProps> = (props) => {\r\n useResetHeightOnEdit(props.isEditing, props.onHeightChanged);\r\n\r\n if (props.isEditing) {\r\n const _onEditCommit = (args: PropertyUpdatedArgs) => {\r\n /* istanbul ignore else */\r\n if (props.category)\r\n props.onEditCommit?.(args, props.category);\r\n };\r\n\r\n return (\r\n <EditorContainer\r\n propertyRecord={props.propertyRecord}\r\n onCommit={_onEditCommit}\r\n onCancel={props.onEditCancel ?? (/* istanbul ignore next */() => { })}\r\n setFocus={true}\r\n />\r\n );\r\n }\r\n\r\n return (\r\n <>\r\n {\r\n CommonPropertyRenderer.createNewDisplayValue(\r\n props.orientation,\r\n props.propertyRecord,\r\n props.indentation,\r\n props.propertyValueRendererManager,\r\n props.isExpanded,\r\n props.onExpansionToggled,\r\n props.onHeightChanged,\r\n props.highlight\r\n )\r\n }\r\n </>\r\n );\r\n};\r\n\r\nfunction useResetHeightOnEdit(isEditing?: boolean, onHeightChanged?: (newHeight: number) => void) {\r\n const previousEditingStatusRef = React.useRef(isEditing);\r\n React.useEffect(() => {\r\n if (!previousEditingStatusRef.current && isEditing) {\r\n onHeightChanged?.(27);\r\n }\r\n\r\n previousEditingStatusRef.current = isEditing;\r\n });\r\n}\r\n"]}
|
|
@@ -6,7 +6,7 @@ import { CompositeFilterDescriptorCollection, DistinctValueCollection } from "./
|
|
|
6
6
|
import { ColumnDescription, MutableTableDataProvider, RowItem, TableDataChangeEvent } from "./TableDataProvider";
|
|
7
7
|
/**
|
|
8
8
|
* A Table Data Provider using an array of items.
|
|
9
|
-
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this class.
|
|
9
|
+
* @deprecated in 3.5. Use the Table component in @itwin/itwinui-react instead, which does not use this class.
|
|
10
10
|
* @public
|
|
11
11
|
*/
|
|
12
12
|
export declare class SimpleTableDataProvider implements MutableTableDataProvider {
|
|
@@ -18,7 +18,7 @@ const TableDataProvider_1 = require("./TableDataProvider");
|
|
|
18
18
|
// cSpell:ignore columnfiltering
|
|
19
19
|
/**
|
|
20
20
|
* A Table Data Provider using an array of items.
|
|
21
|
-
* @deprecated Use the Table component in @itwin/itwinui-react instead, which does not use this class.
|
|
21
|
+
* @deprecated in 3.5. Use the Table component in @itwin/itwinui-react instead, which does not use this class.
|
|
22
22
|
* @public
|
|
23
23
|
*/
|
|
24
24
|
class SimpleTableDataProvider {
|