@itwin/components-react 4.0.0-dev.13 → 4.0.0-dev.15
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 +129 -1
- package/README.md +2 -2
- package/lib/cjs/components-react/UiComponents.js.map +1 -1
- package/lib/cjs/components-react/_target.scss +9 -9
- package/lib/cjs/components-react/common/DateUtils.js.map +1 -1
- package/lib/cjs/components-react/common/DelayedSpinner.js.map +1 -1
- package/lib/cjs/components-react/common/HighlightedText.js.map +1 -1
- package/lib/cjs/components-react/common/HighlightingComponentProps.js.map +1 -1
- package/lib/cjs/components-react/common/IImageLoader.js.map +1 -1
- package/lib/cjs/components-react/common/ImageRenderer.js.map +1 -1
- package/lib/cjs/components-react/common/Links.js.map +1 -1
- package/lib/cjs/components-react/common/PageOptions.js.map +1 -1
- package/lib/cjs/components-react/common/SubscriptionScheduler.js.map +1 -1
- package/lib/cjs/components-react/common/UseAsyncValue.js.map +1 -1
- package/lib/cjs/components-react/common/UseContextWithMandatoryProvider.js.map +1 -1
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.d.ts +1 -0
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.d.ts.map +1 -1
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.js +12 -1
- package/lib/cjs/components-react/common/UseDebouncedAsyncValue.js.map +1 -1
- package/lib/cjs/components-react/common/UseRerender.js.map +1 -1
- package/lib/cjs/components-react/common/countMatchesInString.js.map +1 -1
- package/lib/cjs/components-react/common/selection/SelectionHandler.js.map +1 -1
- package/lib/cjs/components-react/common/selection/SelectionModes.js.map +1 -1
- package/lib/cjs/components-react/converters/BooleanTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/CompositeTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/DateTimeTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/EnumTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/HexadecimalTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/NavigationPropertyTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/NumericTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/PointTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/StringTypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/TypeConverter.js.map +1 -1
- package/lib/cjs/components-react/converters/TypeConverterManager.js.map +1 -1
- package/lib/cjs/components-react/converters/valuetypes/ConvertedTypes.js.map +1 -1
- package/lib/cjs/components-react/datepicker/DateField.js.map +1 -1
- package/lib/cjs/components-react/datepicker/DateField.scss +22 -22
- package/lib/cjs/components-react/datepicker/DatePicker.js.map +1 -1
- package/lib/cjs/components-react/datepicker/DatePicker.scss +176 -176
- package/lib/cjs/components-react/datepicker/DatePickerPopupButton.js.map +1 -1
- package/lib/cjs/components-react/datepicker/DatePickerPopupButton.scss +57 -57
- package/lib/cjs/components-react/datepicker/IntlFormatter.js.map +1 -1
- package/lib/cjs/components-react/datepicker/TimeField.js.map +1 -1
- package/lib/cjs/components-react/datepicker/TimeField.scss +76 -76
- package/lib/cjs/components-react/editors/BooleanEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/BooleanEditor.scss +22 -22
- package/lib/cjs/components-react/editors/CustomNumberEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/CustomNumberEditor.scss +20 -20
- package/lib/cjs/components-react/editors/DateTimeEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/DateTimeEditor.scss +9 -9
- package/lib/cjs/components-react/editors/EditorContainer.js.map +1 -1
- package/lib/cjs/components-react/editors/EditorContainer.scss +6 -6
- package/lib/cjs/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/EnumButtonGroupEditor.scss +141 -141
- package/lib/cjs/components-react/editors/EnumEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/EnumEditor.scss +22 -22
- package/lib/cjs/components-react/editors/IconEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/IconEditor.scss +16 -16
- package/lib/cjs/components-react/editors/ImageCheckBoxEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/ImageCheckBoxEditor.scss +24 -24
- package/lib/cjs/components-react/editors/NumericInputEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/NumericInputEditor.scss +16 -16
- package/lib/cjs/components-react/editors/PopupButton.js.map +1 -1
- package/lib/cjs/components-react/editors/PopupButton.scss +116 -116
- package/lib/cjs/components-react/editors/PropertyEditorManager.js.map +1 -1
- package/lib/cjs/components-react/editors/SliderEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/SliderEditor.scss +13 -13
- package/lib/cjs/components-react/editors/TextEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/TextEditor.scss +20 -20
- package/lib/cjs/components-react/editors/TextareaEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/TextareaEditor.scss +14 -14
- package/lib/cjs/components-react/editors/ToggleEditor.js.map +1 -1
- package/lib/cjs/components-react/editors/ToggleEditor.scss +23 -23
- package/lib/cjs/components-react/editors/variables.scss +7 -7
- package/lib/cjs/components-react/favorite/FavoritePropertiesRenderer.js.map +1 -1
- package/lib/cjs/components-react/favorite/FavoritePropertyList.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilder.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderContext.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRule.scss +38 -38
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleGroup.scss +68 -68
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/FilterBuilderState.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/Operators.js.map +1 -1
- package/lib/cjs/components-react/filter-builder/Types.js.map +1 -1
- package/lib/cjs/components-react/filtering/FilteringInput.js.map +1 -1
- package/lib/cjs/components-react/filtering/FilteringInput.scss +58 -58
- package/lib/cjs/components-react/filtering/ResultSelector.js.map +1 -1
- package/lib/cjs/components-react/filtering/ResultSelector.scss +68 -68
- package/lib/cjs/components-react/iconpicker/IconPickerButton.js.map +1 -1
- package/lib/cjs/components-react/iconpicker/IconPickerButton.scss +75 -75
- package/lib/cjs/components-react/inputs/ParsedInput.js.map +1 -1
- package/lib/cjs/components-react/inputs/ParsedInput.scss +23 -23
- package/lib/cjs/components-react/properties/ItemStyle.js.map +1 -1
- package/lib/cjs/components-react/properties/LinkHandler.js.map +1 -1
- package/lib/cjs/components-react/properties/ValueRendererManager.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/ActionButtonList.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/ActionButtonList.scss +25 -25
- package/lib/cjs/components-react/properties/renderers/ActionButtonRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/CommonPropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/NonPrimitivePropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/NonPrimitivePropertyRenderer.scss +17 -17
- package/lib/cjs/components-react/properties/renderers/PrimitivePropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PropertyGridColumns.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PropertyView.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/PropertyView.scss +104 -104
- package/lib/cjs/components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/label/PrimitivePropertyLabelRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/label/PropertyLabelRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/label/PropertyLabelRenderer.scss +88 -88
- package/lib/cjs/components-react/properties/renderers/value/ArrayPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/DoublePropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/MergedPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/StructPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/UrlPropertyValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/WithContextStyle.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/table/ArrayValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/properties/renderers/value/table/StructValueRenderer.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/PropertyDataProvider.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/SimplePropertyDataProvider.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/FlatItemNestedBorderWrapper.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyCategoryBlock.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGrid.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGrid.scss +73 -73
- package/lib/cjs/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/PropertyList.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGrid.scss +101 -101
- package/lib/cjs/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/FilteringDataProvider.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/LabelPropertyDataFilterer.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/PropertyCategoryLabelFilterer.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridEventHandler.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.d.ts +2 -0
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.d.ts.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.js +2 -0
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridHooks.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModel.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/PropertyGridModelSource.js.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.js.map +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.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableCustomGridCategory.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +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.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
- package/lib/cjs/components-react/selectable-content/SelectableContent.js.map +1 -1
- package/lib/cjs/components-react/selectable-content/SelectableContent.scss +20 -20
- package/lib/cjs/components-react/table/TableDataProvider.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Item.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Item.scss +91 -91
- package/lib/cjs/components-react/toolbar/ItemWrapper.js.map +1 -1
- package/lib/cjs/components-react/toolbar/ItemWrapper.scss +10 -10
- package/lib/cjs/components-react/toolbar/Items.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Items.scss +96 -96
- package/lib/cjs/components-react/toolbar/Overflow.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Overflow.scss +57 -57
- package/lib/cjs/components-react/toolbar/OverflowPanel.js.map +1 -1
- package/lib/cjs/components-react/toolbar/OverflowPanel.scss +37 -37
- package/lib/cjs/components-react/toolbar/PopupItem.js.map +1 -1
- package/lib/cjs/components-react/toolbar/PopupItem.scss +88 -88
- package/lib/cjs/components-react/toolbar/PopupItemWithDrag.js.map +1 -1
- package/lib/cjs/components-react/toolbar/PopupItemsPanel.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Toolbar.js.map +1 -1
- package/lib/cjs/components-react/toolbar/Toolbar.scss +18 -18
- package/lib/cjs/components-react/toolbar/ToolbarWithOverflow.js.map +1 -1
- package/lib/cjs/components-react/toolbar/_variables.scss +34 -34
- package/lib/cjs/components-react/toolbar/groupPanel/BackArrow.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/BackArrow.scss +44 -44
- package/lib/cjs/components-react/toolbar/groupPanel/Column.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Column.scss +9 -9
- package/lib/cjs/components-react/toolbar/groupPanel/Columns.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Columns.scss +10 -10
- package/lib/cjs/components-react/toolbar/groupPanel/Panel.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Panel.scss +15 -15
- package/lib/cjs/components-react/toolbar/groupPanel/Title.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/Title.scss +33 -33
- package/lib/cjs/components-react/toolbar/groupPanel/_variables.scss +16 -16
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Expander.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Expander.scss +29 -29
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Tool.js.map +1 -1
- package/lib/cjs/components-react/toolbar/groupPanel/tool/Tool.scss +117 -117
- package/lib/cjs/components-react/toolbar/groupPanel/tool/_variables.scss +12 -12
- package/lib/cjs/components-react/toolbar/useDragInteraction.js.map +1 -1
- package/lib/cjs/components-react/toolbar/utilities/Direction.js.map +1 -1
- package/lib/cjs/components-react/tree/HighlightingEngine.js.map +1 -1
- package/lib/cjs/components-react/tree/HighlightingEngine.scss +7 -7
- package/lib/cjs/components-react/tree/ImageLoader.js.map +1 -1
- package/lib/cjs/components-react/tree/SimpleTreeDataProvider.js.map +1 -1
- package/lib/cjs/components-react/tree/TreeComponentTestId.js.map +1 -1
- package/lib/cjs/components-react/tree/TreeDataProvider.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/Observable.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeActions.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeEventDispatcher.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeEventHandler.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeEvents.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeHooks.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeModel.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeModelSource.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/TreeNodeLoader.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/ControlledTree.scss +102 -102
- package/lib/cjs/components-react/tree/controlled/component/NodeContent.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/NodeContent.scss +27 -27
- package/lib/cjs/components-react/tree/controlled/component/TreeNodeEditor.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/TreeNodeRenderer.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/internal/SparseTree.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/internal/TreeModelMutator.js.map +1 -1
- package/lib/cjs/components-react/tree/controlled/internal/TreeSelectionManager.js.map +1 -1
- package/lib/cjs/components-react.js.map +1 -1
- package/lib/esm/components-react/UiComponents.js.map +1 -1
- package/lib/esm/components-react/_target.scss +9 -9
- package/lib/esm/components-react/common/DateUtils.js.map +1 -1
- package/lib/esm/components-react/common/DelayedSpinner.js.map +1 -1
- package/lib/esm/components-react/common/HighlightedText.js.map +1 -1
- package/lib/esm/components-react/common/HighlightingComponentProps.js.map +1 -1
- package/lib/esm/components-react/common/IImageLoader.js.map +1 -1
- package/lib/esm/components-react/common/ImageRenderer.js.map +1 -1
- package/lib/esm/components-react/common/Links.js.map +1 -1
- package/lib/esm/components-react/common/PageOptions.js.map +1 -1
- package/lib/esm/components-react/common/SubscriptionScheduler.js.map +1 -1
- package/lib/esm/components-react/common/UseAsyncValue.js.map +1 -1
- package/lib/esm/components-react/common/UseContextWithMandatoryProvider.js.map +1 -1
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.d.ts +1 -0
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.d.ts.map +1 -1
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.js +12 -1
- package/lib/esm/components-react/common/UseDebouncedAsyncValue.js.map +1 -1
- package/lib/esm/components-react/common/UseRerender.js.map +1 -1
- package/lib/esm/components-react/common/countMatchesInString.js.map +1 -1
- package/lib/esm/components-react/common/selection/SelectionHandler.js.map +1 -1
- package/lib/esm/components-react/common/selection/SelectionModes.js.map +1 -1
- package/lib/esm/components-react/converters/BooleanTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/CompositeTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/DateTimeTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/EnumTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/HexadecimalTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/NavigationPropertyTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/NumericTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/PointTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/StringTypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/TypeConverter.js.map +1 -1
- package/lib/esm/components-react/converters/TypeConverterManager.js.map +1 -1
- package/lib/esm/components-react/converters/valuetypes/ConvertedTypes.js.map +1 -1
- package/lib/esm/components-react/datepicker/DateField.js.map +1 -1
- package/lib/esm/components-react/datepicker/DateField.scss +22 -22
- package/lib/esm/components-react/datepicker/DatePicker.js.map +1 -1
- package/lib/esm/components-react/datepicker/DatePicker.scss +176 -176
- package/lib/esm/components-react/datepicker/DatePickerPopupButton.js.map +1 -1
- package/lib/esm/components-react/datepicker/DatePickerPopupButton.scss +57 -57
- package/lib/esm/components-react/datepicker/IntlFormatter.js.map +1 -1
- package/lib/esm/components-react/datepicker/TimeField.js.map +1 -1
- package/lib/esm/components-react/datepicker/TimeField.scss +76 -76
- package/lib/esm/components-react/editors/BooleanEditor.js.map +1 -1
- package/lib/esm/components-react/editors/BooleanEditor.scss +22 -22
- package/lib/esm/components-react/editors/CustomNumberEditor.js.map +1 -1
- package/lib/esm/components-react/editors/CustomNumberEditor.scss +20 -20
- package/lib/esm/components-react/editors/DateTimeEditor.js.map +1 -1
- package/lib/esm/components-react/editors/DateTimeEditor.scss +9 -9
- package/lib/esm/components-react/editors/EditorContainer.js.map +1 -1
- package/lib/esm/components-react/editors/EditorContainer.scss +6 -6
- package/lib/esm/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
- package/lib/esm/components-react/editors/EnumButtonGroupEditor.scss +141 -141
- package/lib/esm/components-react/editors/EnumEditor.js.map +1 -1
- package/lib/esm/components-react/editors/EnumEditor.scss +22 -22
- package/lib/esm/components-react/editors/IconEditor.js.map +1 -1
- package/lib/esm/components-react/editors/IconEditor.scss +16 -16
- package/lib/esm/components-react/editors/ImageCheckBoxEditor.js.map +1 -1
- package/lib/esm/components-react/editors/ImageCheckBoxEditor.scss +24 -24
- package/lib/esm/components-react/editors/NumericInputEditor.js.map +1 -1
- package/lib/esm/components-react/editors/NumericInputEditor.scss +16 -16
- package/lib/esm/components-react/editors/PopupButton.js.map +1 -1
- package/lib/esm/components-react/editors/PopupButton.scss +116 -116
- package/lib/esm/components-react/editors/PropertyEditorManager.js.map +1 -1
- package/lib/esm/components-react/editors/SliderEditor.js.map +1 -1
- package/lib/esm/components-react/editors/SliderEditor.scss +13 -13
- package/lib/esm/components-react/editors/TextEditor.js.map +1 -1
- package/lib/esm/components-react/editors/TextEditor.scss +20 -20
- package/lib/esm/components-react/editors/TextareaEditor.js.map +1 -1
- package/lib/esm/components-react/editors/TextareaEditor.scss +14 -14
- package/lib/esm/components-react/editors/ToggleEditor.js.map +1 -1
- package/lib/esm/components-react/editors/ToggleEditor.scss +23 -23
- package/lib/esm/components-react/editors/variables.scss +7 -7
- package/lib/esm/components-react/favorite/FavoritePropertiesRenderer.js.map +1 -1
- package/lib/esm/components-react/favorite/FavoritePropertyList.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilder.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderContext.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRule.scss +38 -38
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleGroup.scss +68 -68
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleOperator.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleProperty.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderRuleValue.js.map +1 -1
- package/lib/esm/components-react/filter-builder/FilterBuilderState.js.map +1 -1
- package/lib/esm/components-react/filter-builder/Operators.js.map +1 -1
- package/lib/esm/components-react/filter-builder/Types.js.map +1 -1
- package/lib/esm/components-react/filtering/FilteringInput.js.map +1 -1
- package/lib/esm/components-react/filtering/FilteringInput.scss +58 -58
- package/lib/esm/components-react/filtering/ResultSelector.js.map +1 -1
- package/lib/esm/components-react/filtering/ResultSelector.scss +68 -68
- package/lib/esm/components-react/iconpicker/IconPickerButton.js.map +1 -1
- package/lib/esm/components-react/iconpicker/IconPickerButton.scss +75 -75
- package/lib/esm/components-react/inputs/ParsedInput.js.map +1 -1
- package/lib/esm/components-react/inputs/ParsedInput.scss +23 -23
- package/lib/esm/components-react/properties/ItemStyle.js.map +1 -1
- package/lib/esm/components-react/properties/LinkHandler.js.map +1 -1
- package/lib/esm/components-react/properties/ValueRendererManager.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/ActionButtonList.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/ActionButtonList.scss +25 -25
- package/lib/esm/components-react/properties/renderers/ActionButtonRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/CommonPropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/NonPrimitivePropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/NonPrimitivePropertyRenderer.scss +17 -17
- package/lib/esm/components-react/properties/renderers/PrimitivePropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/PropertyGridColumns.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/PropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/PropertyView.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/PropertyView.scss +104 -104
- package/lib/esm/components-react/properties/renderers/label/NonPrimitivePropertyLabelRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/label/PrimitivePropertyLabelRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/label/PropertyLabelRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/label/PropertyLabelRenderer.scss +88 -88
- package/lib/esm/components-react/properties/renderers/value/ArrayPropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/DoublePropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/MergedPropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/StructPropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/UrlPropertyValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/WithContextStyle.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/table/ArrayValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.js.map +1 -1
- package/lib/esm/components-react/properties/renderers/value/table/StructValueRenderer.js.map +1 -1
- package/lib/esm/components-react/propertygrid/PropertyCategoryRendererManager.js.map +1 -1
- package/lib/esm/components-react/propertygrid/PropertyDataProvider.js.map +1 -1
- package/lib/esm/components-react/propertygrid/SimplePropertyDataProvider.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/FlatItemNestedBorderWrapper.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyCategoryBlock.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGrid.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGrid.scss +73 -73
- package/lib/esm/components-react/propertygrid/component/PropertyGridCommons.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyGridEventsRelatedPropsSupplier.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/PropertyList.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.js.map +1 -1
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGrid.scss +101 -101
- package/lib/esm/components-react/propertygrid/component/VirtualizedPropertyGridWithDataProvider.js.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/FilteringDataProvider.js.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/CompositePropertyDataFilterer.js.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/DisplayValuePropertyDataFilterer.js.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/LabelPropertyDataFilterer.js.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/PropertyCategoryLabelFilterer.js.map +1 -1
- package/lib/esm/components-react/propertygrid/dataproviders/filterers/PropertyDataFiltererBase.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridEventHandler.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.d.ts +2 -0
- package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.d.ts.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.js +2 -0
- package/lib/esm/components-react/propertygrid/internal/PropertyGridHooks.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModel.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelChangeEvent.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/PropertyGridModelSource.js.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.js.map +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.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableCustomGridCategory.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-items/MutableFlatGridItem.js.map +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.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatNonPrimitivePropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/propertygrid/internal/flat-properties/FlatPropertyRenderer.js.map +1 -1
- package/lib/esm/components-react/selectable-content/SelectableContent.js.map +1 -1
- package/lib/esm/components-react/selectable-content/SelectableContent.scss +20 -20
- package/lib/esm/components-react/table/TableDataProvider.js.map +1 -1
- package/lib/esm/components-react/toolbar/Item.js.map +1 -1
- package/lib/esm/components-react/toolbar/Item.scss +91 -91
- package/lib/esm/components-react/toolbar/ItemWrapper.js.map +1 -1
- package/lib/esm/components-react/toolbar/ItemWrapper.scss +10 -10
- package/lib/esm/components-react/toolbar/Items.js.map +1 -1
- package/lib/esm/components-react/toolbar/Items.scss +96 -96
- package/lib/esm/components-react/toolbar/Overflow.js.map +1 -1
- package/lib/esm/components-react/toolbar/Overflow.scss +57 -57
- package/lib/esm/components-react/toolbar/OverflowPanel.js.map +1 -1
- package/lib/esm/components-react/toolbar/OverflowPanel.scss +37 -37
- package/lib/esm/components-react/toolbar/PopupItem.js.map +1 -1
- package/lib/esm/components-react/toolbar/PopupItem.scss +88 -88
- package/lib/esm/components-react/toolbar/PopupItemWithDrag.js.map +1 -1
- package/lib/esm/components-react/toolbar/PopupItemsPanel.js.map +1 -1
- package/lib/esm/components-react/toolbar/Toolbar.js.map +1 -1
- package/lib/esm/components-react/toolbar/Toolbar.scss +18 -18
- package/lib/esm/components-react/toolbar/ToolbarWithOverflow.js.map +1 -1
- package/lib/esm/components-react/toolbar/_variables.scss +34 -34
- package/lib/esm/components-react/toolbar/groupPanel/BackArrow.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/BackArrow.scss +44 -44
- package/lib/esm/components-react/toolbar/groupPanel/Column.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Column.scss +9 -9
- package/lib/esm/components-react/toolbar/groupPanel/Columns.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Columns.scss +10 -10
- package/lib/esm/components-react/toolbar/groupPanel/Panel.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Panel.scss +15 -15
- package/lib/esm/components-react/toolbar/groupPanel/Title.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/Title.scss +33 -33
- package/lib/esm/components-react/toolbar/groupPanel/_variables.scss +16 -16
- package/lib/esm/components-react/toolbar/groupPanel/tool/Expander.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/tool/Expander.scss +29 -29
- package/lib/esm/components-react/toolbar/groupPanel/tool/Tool.js.map +1 -1
- package/lib/esm/components-react/toolbar/groupPanel/tool/Tool.scss +117 -117
- package/lib/esm/components-react/toolbar/groupPanel/tool/_variables.scss +12 -12
- package/lib/esm/components-react/toolbar/useDragInteraction.js.map +1 -1
- package/lib/esm/components-react/toolbar/utilities/Direction.js.map +1 -1
- package/lib/esm/components-react/tree/HighlightingEngine.js.map +1 -1
- package/lib/esm/components-react/tree/HighlightingEngine.scss +7 -7
- package/lib/esm/components-react/tree/ImageLoader.js.map +1 -1
- package/lib/esm/components-react/tree/SimpleTreeDataProvider.js.map +1 -1
- package/lib/esm/components-react/tree/TreeComponentTestId.js.map +1 -1
- package/lib/esm/components-react/tree/TreeDataProvider.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/Observable.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeActions.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeEventDispatcher.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeEventHandler.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeEvents.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeHooks.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeModel.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeModelSource.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/TreeNodeLoader.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/ControlledTree.scss +102 -102
- package/lib/esm/components-react/tree/controlled/component/NodeContent.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/NodeContent.scss +27 -27
- package/lib/esm/components-react/tree/controlled/component/TreeNodeEditor.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/TreeNodeRenderer.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/component/TreeRenderer.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/internal/SparseTree.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/internal/TreeModelMutator.js.map +1 -1
- package/lib/esm/components-react/tree/controlled/internal/TreeSelectionManager.js.map +1 -1
- package/lib/esm/components-react.js.map +1 -1
- package/lib/public/locales/en/UiComponents.json +139 -139
- package/package.json +16 -14
- package/ThirdPartyNotices.md +0 -31
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultilineTextPropertyValueRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,gDAAgD;AAChD,iCAAgD;AAChD,sDAA6C;AAC7C,0DAA+G;AAC/G,6DAA0D;AAC1D,mFAAgF;AAChF,wDAAqD;AAErD,qFAA0E;AAE1E,gBAAgB;AAChB,MAAa,kCAAkC;IACtC,SAAS,CAAC,MAAsB;QACrC,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,SAAS,CAAC;IACpE,CAAC;IAEM,MAAM,CAAC,MAAsB,EAAE,OAAsC;QAC1E,OAAO,oBAAC,sCAAsC,IAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;IACtF,CAAC;CACF;AARD,gFAQC;AAQD,MAAM,sCAAsC,GACxC,CAAC,KAAK,EAAE,EAAE;IACV,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,IAAA,uDAAsB,EAAC,KAAK,CAAC,MAAM,EAAE,qBAAqB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC5G,OAAO,CACL,oBAAC,6BAAqB,IACpB,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,EAC3B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,KAAK,CAAC,OAAO,EAAE,UAAU,EACrC,kBAAkB,EAAE,KAAK,CAAC,OAAO,EAAE,kBAAkB,EACrD,eAAe,EAAE,KAAK,CAAC,OAAO,EAAE,eAAe,IAE9C,OAAO,CACc,CACzB,CAAC;AACJ,CAAC,CAAC;AAYJ,gBAAgB;AACT,MAAM,qBAAqB,GAAoC,CAAC,KAAK,EAAE,EAAE;IAC9E,MAAM,E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S,EAAC,WAAW;QACrC,8BACE,GAAG,EAAE,OAAO,EACZ,SAAS,EAAE,CAAC,YAAY,KAAK,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EACrE,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW;YAEtD,KAAK,CAAC,QAAQ;YACf,gCACE,SAAS,EAAC,eAAe,EACzB,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,eAAe,CAAC,gBAAgB,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,EAAE,EACpG,OAAO,EAAE,0BAA0B,IAElC,2BAAY,CAAC,SAAS,CAAC,mBAAmB,CAAC,CACrC,CACJ;QAEL,eAAe,CAAC,gBAAgB,IAAI,CAAC,KAAK,CAAC,UAAU;YACrD,gCAAQ,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,0BAA0B,IAClE,2BAAY,CAAC,SAAS,CAAC,iBAAiB,CAAC,CACnC,CAEP,CACP,CAAC;AACJ,CAAC,CAAC;AAtDW,QAAA,qBAAqB,yBAsDhC;AAEF,SAAS,qBAAqB,CAAC,MAAsB;IACnD,OAAO,2CAAoB;SACxB,YAAY,CAAC,kCAAiB,CAAC,IAAI,CAAC;SACpC,uBAAuB,CAAC,MAAM,CAAC,QAAQ,EAAG,MAAM,CAAC,KAAwB,CAAC,KAAK,CAAC,CAAC;AACtF,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/**\n * @packageDocumentation\n * @module Properties\n */\n\nimport * as React from \"react\";\n// eslint-disable-next-line no-duplicate-imports\nimport { useLayoutEffect, useRef } from \"react\";\nimport { assert } from \"@itwin/core-bentley\";\nimport { PrimitiveValue, PropertyRecord, PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\nimport { useRerender } from \"../../../common/UseRerender\";\nimport { TypeConverterManager } from \"../../../converters/TypeConverterManager\";\nimport { UiComponents } from \"../../../UiComponents\";\nimport { IPropertyValueRenderer, PropertyValueRendererContext } from \"../../ValueRendererManager\";\nimport { useRenderedStringValue } from \"./PrimitivePropertyValueRenderer\";\n\n/** @internal */\nexport class MultilineTextPropertyValueRenderer implements IPropertyValueRenderer {\n public canRender(record: PropertyRecord): boolean {\n return record.value.valueFormat === PropertyValueFormat.Primitive;\n }\n\n public render(record: PropertyRecord, context?: PropertyValueRendererContext): React.ReactNode {\n return <MultilineTextPropertyValueRendererImpl record={record} context={context} />;\n }\n}\n\ninterface MultilineTextPropertyValueRendererImplProps {\n record: PropertyRecord;\n context?: PropertyValueRendererContext;\n children?: never;\n}\n\nconst MultilineTextPropertyValueRendererImpl: React.FC<MultilineTextPropertyValueRendererImplProps>\n = (props) => {\n const { stringValue, element } = useRenderedStringValue(props.record, convertRecordToString, props.context);\n return (\n <MultilineTextRenderer\n style={props.context?.style}\n stringValue={stringValue}\n isExpanded={props.context?.isExpanded}\n onExpansionToggled={props.context?.onExpansionToggled}\n onHeightChanged={props.context?.onHeightChanged}\n >\n {element}\n </MultilineTextRenderer>\n );\n };\n\ninterface MultilineTextRenderer {\n stringValue?: string;\n isExpanded?: boolean;\n onExpansionToggled?: () => void;\n onHeightChanged?: (newHeight: number) => void;\n style?: React.CSSProperties;\n /** Content */\n children?: React.ReactNode;\n}\n\n/** @internal */\nexport const MultilineTextRenderer: React.FC<MultilineTextRenderer> = (props) => { // eslint-disable-line @typescript-eslint/no-redeclare\n const { rerenderContext, numRerenders, rerender } = useRerender({ contentOverflows: false });\n const spanRef = useRef<HTMLSpanElement>(null);\n const divRef = useRef<HTMLDivElement>(null);\n const previousHeightRef = useRef(0);\n useLayoutEffect(() => {\n assert(divRef.current !== null && spanRef.current !== null);\n\n const contentOverflows = spanRef.current.clientWidth < spanRef.current.scrollWidth;\n if (numRerenders === 0 && contentOverflows) {\n rerender({ contentOverflows });\n }\n\n if (numRerenders === 1 || !contentOverflows) {\n const currentHeight = Math.max(divRef.current.offsetHeight, 27);\n if (currentHeight !== previousHeightRef.current) {\n props.onHeightChanged?.(currentHeight);\n previousHeightRef.current = currentHeight;\n }\n }\n });\n\n const handleExpansionToggleClick = (event: React.MouseEvent) => {\n props.onExpansionToggled?.();\n event.stopPropagation();\n };\n\n // In order to always trigger onMouseLeave event on PropertyView, collapse button must remain mounted at all times.\n // https://github.com/facebook/react/issues/6807\n return (\n <div ref={divRef} className=\"multiline\">\n <span\n ref={spanRef}\n className={(numRerenders !== 0 && props.isExpanded) ? \"expanded\" : \"\"}\n style={props.style}\n title={props.isExpanded ? undefined : props.stringValue}\n >\n {props.children}\n <button\n className=\"expand-toggle\"\n style={{ display: (rerenderContext.contentOverflows && props.isExpanded) ? \"inline-block\" : \"none\" }}\n onClick={handleExpansionToggleClick}\n >\n {UiComponents.translate(\"property.collapse\")}\n </button>\n </span>\n {\n rerenderContext.contentOverflows && !props.isExpanded &&\n <button className=\"expand-toggle\" onClick={handleExpansionToggleClick}>\n {UiComponents.translate(\"property.expand\")}\n </button>\n }\n </div>\n );\n};\n\nfunction convertRecordToString(record: PropertyRecord): string | Promise<string> {\n return TypeConverterManager\n .getConverter(StandardTypeNames.Text)\n .convertPropertyToString(record.property, (record.value as PrimitiveValue).value);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"MultilineTextPropertyValueRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,gDAAgD;AAChD,iCAAgD;AAChD,sDAA6C;AAC7C,0DAA+G;AAC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EtD,KAAK,CAAC,QAAQ;YACf,gCACE,SAAS,EAAC,eAAe,EACzB,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,eAAe,CAAC,gBAAgB,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,EAAE,EACpG,OAAO,EAAE,0BAA0B,IAElC,2BAAY,CAAC,SAAS,CAAC,mBAAmB,CAAC,CACrC,CACJ;QAEL,eAAe,CAAC,gBAAgB,IAAI,CAAC,KAAK,CAAC,UAAU;YACrD,gCAAQ,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,0BAA0B,IAClE,2BAAY,CAAC,SAAS,CAAC,iBAAiB,CAAC,CACnC,CAEP,CACP,CAAC;AACJ,CAAC,CAAC;AAtDW,QAAA,qBAAqB,yBAsDhC;AAEF,SAAS,qBAAqB,CAAC,MAAsB;IACnD,OAAO,2CAAoB;SACxB,YAAY,CAAC,kCAAiB,CAAC,IAAI,CAAC;SACpC,uBAAuB,CAAC,MAAM,CAAC,QAAQ,EAAG,MAAM,CAAC,KAAwB,CAAC,KAAK,CAAC,CAAC;AACtF,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/**\r\n * @packageDocumentation\r\n * @module Properties\r\n */\r\n\r\nimport * as React from \"react\";\r\n// eslint-disable-next-line no-duplicate-imports\r\nimport { useLayoutEffect, useRef } from \"react\";\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { PrimitiveValue, PropertyRecord, PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\r\nimport { useRerender } from \"../../../common/UseRerender\";\r\nimport { TypeConverterManager } from \"../../../converters/TypeConverterManager\";\r\nimport { UiComponents } from \"../../../UiComponents\";\r\nimport { IPropertyValueRenderer, PropertyValueRendererContext } from \"../../ValueRendererManager\";\r\nimport { useRenderedStringValue } from \"./PrimitivePropertyValueRenderer\";\r\n\r\n/** @internal */\r\nexport class MultilineTextPropertyValueRenderer implements IPropertyValueRenderer {\r\n public canRender(record: PropertyRecord): boolean {\r\n return record.value.valueFormat === PropertyValueFormat.Primitive;\r\n }\r\n\r\n public render(record: PropertyRecord, context?: PropertyValueRendererContext): React.ReactNode {\r\n return <MultilineTextPropertyValueRendererImpl record={record} context={context} />;\r\n }\r\n}\r\n\r\ninterface MultilineTextPropertyValueRendererImplProps {\r\n record: PropertyRecord;\r\n context?: PropertyValueRendererContext;\r\n children?: never;\r\n}\r\n\r\nconst MultilineTextPropertyValueRendererImpl: React.FC<MultilineTextPropertyValueRendererImplProps>\r\n = (props) => {\r\n const { stringValue, element } = useRenderedStringValue(props.record, convertRecordToString, props.context);\r\n return (\r\n <MultilineTextRenderer\r\n style={props.context?.style}\r\n stringValue={stringValue}\r\n isExpanded={props.context?.isExpanded}\r\n onExpansionToggled={props.context?.onExpansionToggled}\r\n onHeightChanged={props.context?.onHeightChanged}\r\n >\r\n {element}\r\n </MultilineTextRenderer>\r\n );\r\n };\r\n\r\ninterface MultilineTextRenderer {\r\n stringValue?: string;\r\n isExpanded?: boolean;\r\n onExpansionToggled?: () => void;\r\n onHeightChanged?: (newHeight: number) => void;\r\n style?: React.CSSProperties;\r\n /** Content */\r\n children?: React.ReactNode;\r\n}\r\n\r\n/** @internal */\r\nexport const MultilineTextRenderer: React.FC<MultilineTextRenderer> = (props) => { // eslint-disable-line @typescript-eslint/no-redeclare\r\n const { rerenderContext, numRerenders, rerender } = useRerender({ contentOverflows: false });\r\n const spanRef = useRef<HTMLSpanElement>(null);\r\n const divRef = useRef<HTMLDivElement>(null);\r\n const previousHeightRef = useRef(0);\r\n useLayoutEffect(() => {\r\n assert(divRef.current !== null && spanRef.current !== null);\r\n\r\n const contentOverflows = spanRef.current.clientWidth < spanRef.current.scrollWidth;\r\n if (numRerenders === 0 && contentOverflows) {\r\n rerender({ contentOverflows });\r\n }\r\n\r\n if (numRerenders === 1 || !contentOverflows) {\r\n const currentHeight = Math.max(divRef.current.offsetHeight, 27);\r\n if (currentHeight !== previousHeightRef.current) {\r\n props.onHeightChanged?.(currentHeight);\r\n previousHeightRef.current = currentHeight;\r\n }\r\n }\r\n });\r\n\r\n const handleExpansionToggleClick = (event: React.MouseEvent) => {\r\n props.onExpansionToggled?.();\r\n event.stopPropagation();\r\n };\r\n\r\n // In order to always trigger onMouseLeave event on PropertyView, collapse button must remain mounted at all times.\r\n // https://github.com/facebook/react/issues/6807\r\n return (\r\n <div ref={divRef} className=\"multiline\">\r\n <span\r\n ref={spanRef}\r\n className={(numRerenders !== 0 && props.isExpanded) ? \"expanded\" : \"\"}\r\n style={props.style}\r\n title={props.isExpanded ? undefined : props.stringValue}\r\n >\r\n {props.children}\r\n <button\r\n className=\"expand-toggle\"\r\n style={{ display: (rerenderContext.contentOverflows && props.isExpanded) ? \"inline-block\" : \"none\" }}\r\n onClick={handleExpansionToggleClick}\r\n >\r\n {UiComponents.translate(\"property.collapse\")}\r\n </button>\r\n </span>\r\n {\r\n rerenderContext.contentOverflows && !props.isExpanded &&\r\n <button className=\"expand-toggle\" onClick={handleExpansionToggleClick}>\r\n {UiComponents.translate(\"property.expand\")}\r\n </button>\r\n }\r\n </div>\r\n );\r\n};\r\n\r\nfunction convertRecordToString(record: PropertyRecord): string | Promise<string> {\r\n return TypeConverterManager\r\n .getConverter(StandardTypeNames.Text)\r\n .convertPropertyToString(record.property, (record.value as PrimitiveValue).value);\r\n}\r\n"]}
|
package/lib/cjs/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationPropertyValueRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/NavigationPropertyValueRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,0DAA+G;AAC/G,mFAAgF;AAEhF,qFAAsF;AAEtF;;GAEG;AACH,MAAa,+BAA+B;IAE1C,uDAAuD;IAChD,SAAS,CAAC,MAAsB;QACrC,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,SAAS;eAC5D,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,kCAAiB,CAAC,UAAU,CAAC;IACjE,CAAC;IAED,iEAAiE;IAC1D,MAAM,CAAC,MAAsB,EAAE,OAAsC;QAC1E,OAAO,oBAAC,mEAAkC,IACxC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,qBAAqB,EAAE,qBAAqB,GAC5C,CAAC;IACL,CAAC;CACF;AAhBD,0EAgBC;AAED,SAAS,qBAAqB,CAAC,MAAsB;IACnD,MAAM,SAAS,GAAG,MAAM,CAAC,KAAuB,CAAC;IACjD,IAAI,SAAS,CAAC,YAAY;QACxB,OAAO,SAAS,CAAC,YAAY,CAAC;IAChC,OAAO,2CAAoB,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,uBAAuB,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;AAChK,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\nimport * as React from \"react\";\nimport { PrimitiveValue, PropertyRecord, PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\nimport { TypeConverterManager } from \"../../../converters/TypeConverterManager\";\nimport { IPropertyValueRenderer, PropertyValueRendererContext } from \"../../ValueRendererManager\";\nimport { PrimitivePropertyValueRendererImpl } from \"./PrimitivePropertyValueRenderer\";\n\n/** Default Navigation Property Renderer\n * @public\n */\nexport class NavigationPropertyValueRenderer implements IPropertyValueRenderer {\n\n /** Checks if the renderer can handle given property */\n public canRender(record: PropertyRecord) {\n return record.value.valueFormat === PropertyValueFormat.Primitive\n && record.property.typename === StandardTypeNames.Navigation;\n }\n\n /** Method that returns a JSX representation of PropertyRecord */\n public render(record: PropertyRecord, context?: PropertyValueRendererContext) {\n return <PrimitivePropertyValueRendererImpl\n record={record}\n context={context}\n stringValueCalculator={convertRecordToString}\n />;\n }\n}\n\nfunction convertRecordToString(record: PropertyRecord): string | Promise<string> {\n const primitive = record.value as PrimitiveValue;\n if (primitive.displayValue)\n return primitive.displayValue;\n return TypeConverterManager.getConverter(record.property.typename, record.property.converter?.name).convertPropertyToString(record.property, primitive.value);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"NavigationPropertyValueRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/NavigationPropertyValueRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,0DAA+G;AAC/G,mFAAgF;AAEhF,qFAAsF;AAEtF;;GAEG;AACH,MAAa,+BAA+B;IAE1C,uDAAuD;IAChD,SAAS,CAAC,MAAsB;QACrC,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,SAAS;eAC5D,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,kCAAiB,CAAC,UAAU,CAAC;IACjE,CAAC;IAED,iEAAiE;IAC1D,MAAM,CAAC,MAAsB,EAAE,OAAsC;QAC1E,OAAO,oBAAC,mEAAkC,IACxC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,qBAAqB,EAAE,qBAAqB,GAC5C,CAAC;IACL,CAAC;CACF;AAhBD,0EAgBC;AAED,SAAS,qBAAqB,CAAC,MAAsB;IACnD,MAAM,SAAS,GAAG,MAAM,CAAC,KAAuB,CAAC;IACjD,IAAI,SAAS,CAAC,YAAY;QACxB,OAAO,SAAS,CAAC,YAAY,CAAC;IAChC,OAAO,2CAAoB,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,uBAAuB,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;AAChK,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 Properties\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { PrimitiveValue, PropertyRecord, PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\r\nimport { TypeConverterManager } from \"../../../converters/TypeConverterManager\";\r\nimport { IPropertyValueRenderer, PropertyValueRendererContext } from \"../../ValueRendererManager\";\r\nimport { PrimitivePropertyValueRendererImpl } from \"./PrimitivePropertyValueRenderer\";\r\n\r\n/** Default Navigation Property Renderer\r\n * @public\r\n */\r\nexport class NavigationPropertyValueRenderer implements IPropertyValueRenderer {\r\n\r\n /** Checks if the renderer can handle given property */\r\n public canRender(record: PropertyRecord) {\r\n return record.value.valueFormat === PropertyValueFormat.Primitive\r\n && record.property.typename === StandardTypeNames.Navigation;\r\n }\r\n\r\n /** Method that returns a JSX representation of PropertyRecord */\r\n public render(record: PropertyRecord, context?: PropertyValueRendererContext) {\r\n return <PrimitivePropertyValueRendererImpl\r\n record={record}\r\n context={context}\r\n stringValueCalculator={convertRecordToString}\r\n />;\r\n }\r\n}\r\n\r\nfunction convertRecordToString(record: PropertyRecord): string | Promise<string> {\r\n const primitive = record.value as PrimitiveValue;\r\n if (primitive.displayValue)\r\n return primitive.displayValue;\r\n return TypeConverterManager.getConverter(record.property.typename, record.property.converter?.name).convertPropertyToString(record.property, primitive.value);\r\n}\r\n"]}
|
package/lib/cjs/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimitivePropertyValueRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,0DAA8G;AAC9G,iEAA8D;AAC9D,mFAAgF;AAChF,6FAA0F;AAC1F,mDAAkD;AAGlD;;GAEG;AACH,MAAa,8BAA8B;IAEzC,uDAAuD;IAChD,SAAS,CAAC,MAAsB;QACrC,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,SAAS,CAAC;IACpE,CAAC;IAED,iEAAiE;IAC1D,MAAM,CAAC,MAAsB,EAAE,OAAsC;QAC1E,OAAO,oBAAC,kCAAkC,IACxC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,qBAAqB,EAAE,8BAA8B,GACrD,CAAC;IACL,CAAC;CACF;AAfD,wEAeC;AAED;;;GAGG;AACH,SAAgB,8BAA8B,CAAC,MAAsB;IACnE,MAAM,SAAS,GAAG,MAAM,CAAC,KAAuB,CAAC;IACjD,OAAO,2CAAoB,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,uBAAuB,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;AAChK,CAAC;AAHD,wEAGC;AAUD,gBAAgB;AAChB,SAAgB,kCAAkC,CAAC,KAA8C;IAC/F,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,sBAAsB,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,qBAAqB,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IACtI,OAAO,8BAAM,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,IAAG,OAAO,CAAQ,CAAC;AACjF,CAAC;AAHD,gFAGC;AAED;;;;;;;GAOG;AACU,QAAA,qBAAqB,GAAqB;IACrD,OAAO,EAAE,yCAAmB,CAAC,QAAQ;IACrC,OAAO,EAAE,yCAAmB,CAAC,eAAe;CAC7C,CAAC;AAEF,gBAAgB;AAChB,SAAgB,sBAAsB,CACpC,MAAsB,EACtB,qBAA2E,EAC3E,OAAsC,EACtC,YAA+B;IAE/B,MAAM,WAAW,GAAG,IAAA,6BAAa,EAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC;IACjE,MAAM,EAAE,GAAG,CAAC,WAAW,KAAK,SAAS,CAAC;QACpC,CAAC,CAAC,OAAO,EAAE,YAAY;QACvB,CAAC,CAAC,oBAAC,2BAAa,IACd,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,YAAY,IAAI,6BAAqB,EAC5D,WAAW,EAAE,OAAO,EAAE,eAAe,GACrC,CAAC;IACL,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AACtC,CAAC;AAfD,wDAeC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\nimport * as React from \"react\";\nimport { LinkElementsInfo, PrimitiveValue, PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { useAsyncValue } from \"../../../common/UseAsyncValue\";\nimport { TypeConverterManager } from \"../../../converters/TypeConverterManager\";\nimport { PropertyGridCommons } from \"../../../propertygrid/component/PropertyGridCommons\";\nimport { LinksRenderer } from \"../../LinkHandler\";\nimport { IPropertyValueRenderer, PropertyValueRendererContext } from \"../../ValueRendererManager\";\n\n/** Default Primitive Property Renderer\n * @public\n */\nexport class PrimitivePropertyValueRenderer implements IPropertyValueRenderer {\n\n /** Checks if the renderer can handle given property */\n public canRender(record: PropertyRecord) {\n return record.value.valueFormat === PropertyValueFormat.Primitive;\n }\n\n /** Method that returns a JSX representation of PropertyRecord */\n public render(record: PropertyRecord, context?: PropertyValueRendererContext) {\n return <PrimitivePropertyValueRendererImpl\n record={record}\n context={context}\n stringValueCalculator={convertPrimitiveRecordToString}\n />;\n }\n}\n\n/**\n * Function that converts primitive [[PropertyRecord]] to string\n * @internal\n */\nexport function convertPrimitiveRecordToString(record: PropertyRecord): string | Promise<string> {\n const primitive = record.value as PrimitiveValue;\n return TypeConverterManager.getConverter(record.property.typename, record.property.converter?.name).convertPropertyToString(record.property, primitive.value);\n}\n\n/** @internal */\ninterface PrimitivePropertyValueRendererImplProps {\n record: PropertyRecord;\n stringValueCalculator: (record: PropertyRecord) => string | Promise<string>;\n context?: PropertyValueRendererContext;\n linksHandler?: LinkElementsInfo;\n}\n\n/** @internal */\nexport function PrimitivePropertyValueRendererImpl(props: PrimitivePropertyValueRendererImplProps) {\n const { stringValue, element } = useRenderedStringValue(props.record, props.stringValueCalculator, props.context, props.linksHandler);\n return <span style={props.context?.style} title={stringValue}>{element}</span>;\n}\n\n/**\n * Default link handler used for handling records,\n * which did not have any specified LinkElementsInfo.\n *\n * Default matcher matches all URLs using regex.\n * Default onClick opens window or sets location.href with found URL.\n * @public\n */\nexport const DEFAULT_LINKS_HANDLER: LinkElementsInfo = {\n matcher: PropertyGridCommons.getLinks,\n onClick: PropertyGridCommons.handleLinkClick,\n};\n\n/** @internal */\nexport function useRenderedStringValue(\n record: PropertyRecord,\n stringValueCalculator: (record: PropertyRecord) => string | Promise<string>,\n context?: PropertyValueRendererContext,\n linksHandler?: LinkElementsInfo,\n): { stringValue?: string, element: React.ReactNode } {\n const stringValue = useAsyncValue(stringValueCalculator(record));\n const el = (stringValue === undefined)\n ? context?.defaultValue\n : <LinksRenderer\n value={stringValue}\n links={record.links ?? linksHandler ?? DEFAULT_LINKS_HANDLER}\n highlighter={context?.textHighlighter}\n />;\n return { stringValue, element: el };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"PrimitivePropertyValueRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/PrimitivePropertyValueRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,0DAA8G;AAC9G,iEAA8D;AAC9D,mFAAgF;AAChF,6FAA0F;AAC1F,mDAAkD;AAGlD;;GAEG;AACH,MAAa,8BAA8B;IAEzC,uDAAuD;IAChD,SAAS,CAAC,MAAsB;QACrC,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,SAAS,CAAC;IACpE,CAAC;IAED,iEAAiE;IAC1D,MAAM,CAAC,MAAsB,EAAE,OAAsC;QAC1E,OAAO,oBAAC,kCAAkC,IACxC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,qBAAqB,EAAE,8BAA8B,GACrD,CAAC;IACL,CAAC;CACF;AAfD,wEAeC;AAED;;;GAGG;AACH,SAAgB,8BAA8B,CAAC,MAAsB;IACnE,MAAM,SAAS,GAAG,MAAM,CAAC,KAAuB,CAAC;IACjD,OAAO,2CAAoB,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,uBAAuB,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;AAChK,CAAC;AAHD,wEAGC;AAUD,gBAAgB;AAChB,SAAgB,kCAAkC,CAAC,KAA8C;IAC/F,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,sBAAsB,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,qBAAqB,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IACtI,OAAO,8BAAM,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,IAAG,OAAO,CAAQ,CAAC;AACjF,CAAC;AAHD,gFAGC;AAED;;;;;;;GAOG;AACU,QAAA,qBAAqB,GAAqB;IACrD,OAAO,EAAE,yCAAmB,CAAC,QAAQ;IACrC,OAAO,EAAE,yCAAmB,CAAC,eAAe;CAC7C,CAAC;AAEF,gBAAgB;AAChB,SAAgB,sBAAsB,CACpC,MAAsB,EACtB,qBAA2E,EAC3E,OAAsC,EACtC,YAA+B;IAE/B,MAAM,WAAW,GAAG,IAAA,6BAAa,EAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC;IACjE,MAAM,EAAE,GAAG,CAAC,WAAW,KAAK,SAAS,CAAC;QACpC,CAAC,CAAC,OAAO,EAAE,YAAY;QACvB,CAAC,CAAC,oBAAC,2BAAa,IACd,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,YAAY,IAAI,6BAAqB,EAC5D,WAAW,EAAE,OAAO,EAAE,eAAe,GACrC,CAAC;IACL,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AACtC,CAAC;AAfD,wDAeC","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 Properties\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { LinkElementsInfo, PrimitiveValue, PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\r\nimport { useAsyncValue } from \"../../../common/UseAsyncValue\";\r\nimport { TypeConverterManager } from \"../../../converters/TypeConverterManager\";\r\nimport { PropertyGridCommons } from \"../../../propertygrid/component/PropertyGridCommons\";\r\nimport { LinksRenderer } from \"../../LinkHandler\";\r\nimport { IPropertyValueRenderer, PropertyValueRendererContext } from \"../../ValueRendererManager\";\r\n\r\n/** Default Primitive Property Renderer\r\n * @public\r\n */\r\nexport class PrimitivePropertyValueRenderer implements IPropertyValueRenderer {\r\n\r\n /** Checks if the renderer can handle given property */\r\n public canRender(record: PropertyRecord) {\r\n return record.value.valueFormat === PropertyValueFormat.Primitive;\r\n }\r\n\r\n /** Method that returns a JSX representation of PropertyRecord */\r\n public render(record: PropertyRecord, context?: PropertyValueRendererContext) {\r\n return <PrimitivePropertyValueRendererImpl\r\n record={record}\r\n context={context}\r\n stringValueCalculator={convertPrimitiveRecordToString}\r\n />;\r\n }\r\n}\r\n\r\n/**\r\n * Function that converts primitive [[PropertyRecord]] to string\r\n * @internal\r\n */\r\nexport function convertPrimitiveRecordToString(record: PropertyRecord): string | Promise<string> {\r\n const primitive = record.value as PrimitiveValue;\r\n return TypeConverterManager.getConverter(record.property.typename, record.property.converter?.name).convertPropertyToString(record.property, primitive.value);\r\n}\r\n\r\n/** @internal */\r\ninterface PrimitivePropertyValueRendererImplProps {\r\n record: PropertyRecord;\r\n stringValueCalculator: (record: PropertyRecord) => string | Promise<string>;\r\n context?: PropertyValueRendererContext;\r\n linksHandler?: LinkElementsInfo;\r\n}\r\n\r\n/** @internal */\r\nexport function PrimitivePropertyValueRendererImpl(props: PrimitivePropertyValueRendererImplProps) {\r\n const { stringValue, element } = useRenderedStringValue(props.record, props.stringValueCalculator, props.context, props.linksHandler);\r\n return <span style={props.context?.style} title={stringValue}>{element}</span>;\r\n}\r\n\r\n/**\r\n * Default link handler used for handling records,\r\n * which did not have any specified LinkElementsInfo.\r\n *\r\n * Default matcher matches all URLs using regex.\r\n * Default onClick opens window or sets location.href with found URL.\r\n * @public\r\n */\r\nexport const DEFAULT_LINKS_HANDLER: LinkElementsInfo = {\r\n matcher: PropertyGridCommons.getLinks,\r\n onClick: PropertyGridCommons.handleLinkClick,\r\n};\r\n\r\n/** @internal */\r\nexport function useRenderedStringValue(\r\n record: PropertyRecord,\r\n stringValueCalculator: (record: PropertyRecord) => string | Promise<string>,\r\n context?: PropertyValueRendererContext,\r\n linksHandler?: LinkElementsInfo,\r\n): { stringValue?: string, element: React.ReactNode } {\r\n const stringValue = useAsyncValue(stringValueCalculator(record));\r\n const el = (stringValue === undefined)\r\n ? context?.defaultValue\r\n : <LinksRenderer\r\n value={stringValue}\r\n links={record.links ?? linksHandler ?? DEFAULT_LINKS_HANDLER}\r\n highlighter={context?.textHighlighter}\r\n />;\r\n return { stringValue, element: el };\r\n}\r\n"]}
|
package/lib/cjs/components-react/properties/renderers/value/StructPropertyValueRenderer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StructPropertyValueRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/StructPropertyValueRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,0DAA4E;AAC5E,kDAAgD;AAChD,qEAAyH;AACzH,qEAAuE;AACvE,yDAAsD;AAEtD;;GAEG;AACH,MAAa,2BAA2B;IAEtC,uDAAuD;IAChD,SAAS,CAAC,MAAsB;QACrC,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,MAAM,CAAC;IACjE,CAAC;IAED,iEAAiE;IAC1D,MAAM,CAAC,MAAsB,EAAE,OAAsC;QAC1E,IAAI,OAAO,IAAI,OAAO,CAAC,aAAa,KAAK,4CAAqB,CAAC,KAAK,EAAE;YACpE,OAAO,IAAA,mCAAgB,EACrB,oBAAC,8CAAwB,IACvB,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,OAAO,CAAC,YAAY,EAClC,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,wBAAW,CAAC,UAAU,GAC/E,EACF,OAAO,CACR,CAAC;SACH;QAED,IAAI,OAAO,IAAI,OAAO,CAAC,aAAa,KAAK,4CAAqB,CAAC,YAAY,EAAE;YAC3E,OAAO,IAAA,mCAAgB,EAAC,EAAE,EAAE,OAAO,CAAC,CAAC;SACtC;QAED,OAAO,IAAA,mCAAgB,EAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAG,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF;AA1BD,kEA0BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\nimport * as React from \"react\";\nimport { PropertyRecord, PropertyValueFormat } from \"@itwin/appui-abstract\";\nimport { Orientation } from \"@itwin/core-react\";\nimport { IPropertyValueRenderer, PropertyContainerType, PropertyValueRendererContext } from \"../../ValueRendererManager\";\nimport { TableStructValueRenderer } from \"./table/StructValueRenderer\";\nimport { withContextStyle } from \"./WithContextStyle\";\n\n/** Default Struct Property Renderer\n * @public\n */\nexport class StructPropertyValueRenderer implements IPropertyValueRenderer {\n\n /** Checks if the renderer can handle given property */\n public canRender(record: PropertyRecord) {\n return record.value.valueFormat === PropertyValueFormat.Struct;\n }\n\n /** Method that returns a JSX representation of PropertyRecord */\n public render(record: PropertyRecord, context?: PropertyValueRendererContext) {\n if (context && context.containerType === PropertyContainerType.Table) {\n return withContextStyle(\n <TableStructValueRenderer\n propertyRecord={record}\n onDialogOpen={context.onDialogOpen}\n orientation={context.orientation ? context.orientation : Orientation.Horizontal}\n />,\n context,\n );\n }\n\n if (context && context.containerType === PropertyContainerType.PropertyPane) {\n return withContextStyle(\"\", context);\n }\n\n return withContextStyle(`{${record.property.typename}}`, context);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"StructPropertyValueRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/StructPropertyValueRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,0DAA4E;AAC5E,kDAAgD;AAChD,qEAAyH;AACzH,qEAAuE;AACvE,yDAAsD;AAEtD;;GAEG;AACH,MAAa,2BAA2B;IAEtC,uDAAuD;IAChD,SAAS,CAAC,MAAsB;QACrC,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,MAAM,CAAC;IACjE,CAAC;IAED,iEAAiE;IAC1D,MAAM,CAAC,MAAsB,EAAE,OAAsC;QAC1E,IAAI,OAAO,IAAI,OAAO,CAAC,aAAa,KAAK,4CAAqB,CAAC,KAAK,EAAE;YACpE,OAAO,IAAA,mCAAgB,EACrB,oBAAC,8CAAwB,IACvB,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,OAAO,CAAC,YAAY,EAClC,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,wBAAW,CAAC,UAAU,GAC/E,EACF,OAAO,CACR,CAAC;SACH;QAED,IAAI,OAAO,IAAI,OAAO,CAAC,aAAa,KAAK,4CAAqB,CAAC,YAAY,EAAE;YAC3E,OAAO,IAAA,mCAAgB,EAAC,EAAE,EAAE,OAAO,CAAC,CAAC;SACtC;QAED,OAAO,IAAA,mCAAgB,EAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAG,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF;AA1BD,kEA0BC","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 Properties\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 { IPropertyValueRenderer, PropertyContainerType, PropertyValueRendererContext } from \"../../ValueRendererManager\";\r\nimport { TableStructValueRenderer } from \"./table/StructValueRenderer\";\r\nimport { withContextStyle } from \"./WithContextStyle\";\r\n\r\n/** Default Struct Property Renderer\r\n * @public\r\n */\r\nexport class StructPropertyValueRenderer implements IPropertyValueRenderer {\r\n\r\n /** Checks if the renderer can handle given property */\r\n public canRender(record: PropertyRecord) {\r\n return record.value.valueFormat === PropertyValueFormat.Struct;\r\n }\r\n\r\n /** Method that returns a JSX representation of PropertyRecord */\r\n public render(record: PropertyRecord, context?: PropertyValueRendererContext) {\r\n if (context && context.containerType === PropertyContainerType.Table) {\r\n return withContextStyle(\r\n <TableStructValueRenderer\r\n propertyRecord={record}\r\n onDialogOpen={context.onDialogOpen}\r\n orientation={context.orientation ? context.orientation : Orientation.Horizontal}\r\n />,\r\n context,\r\n );\r\n }\r\n\r\n if (context && context.containerType === PropertyContainerType.PropertyPane) {\r\n return withContextStyle(\"\", context);\r\n }\r\n\r\n return withContextStyle(`{${record.property.typename}}`, context);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UrlPropertyValueRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/UrlPropertyValueRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,0DAAiH;AAEjH,qFAAsH;AAEtH;;;;;GAKG;AACH,MAAa,wBAAwB;IAEnC,uDAAuD;IAChD,SAAS,CAAC,MAAsB;QACrC,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,SAAS;eAC5D,CAAC,kCAAiB,CAAC,GAAG,EAAE,kCAAiB,CAAC,MAAM,EAAE,kCAAiB,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,QAA6B,CAAC,CAAC;IACzI,CAAC;IAED,iEAAiE;IAC1D,MAAM,CAAC,MAAsB,EAAE,OAAsC;QAC1E,OAAO,oBAAC,mEAAkC,IACxC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,qBAAqB,EAAE,+DAA8B,EACrD,YAAY,EAAE,yBAAyB,GACvC,CAAC;IACL,CAAC;CACF;AAjBD,4DAiBC;AAED;;;GAGG;AACH,SAAS,UAAU,CAAC,IAAY;IAC9B,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;QACtD,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;SAClB;QACH,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC/C,IAAI,UAAU;YACZ,UAAU,CAAC,KAAK,EAAE,CAAC;KACtB;AACH,CAAC;AAED,MAAM,yBAAyB,GAAqB;IAClD,OAAO,EAAE,UAAU;CACpB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\nimport * as React from \"react\";\nimport { LinkElementsInfo, PropertyRecord, PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\nimport { IPropertyValueRenderer, PropertyValueRendererContext } from \"../../ValueRendererManager\";\nimport { convertPrimitiveRecordToString, PrimitivePropertyValueRendererImpl } from \"./PrimitivePropertyValueRenderer\";\n\n/**\n * URL property value renderer that renders the whole value as a URL without matching it\n * against URL regex.\n *\n * @public\n */\nexport class UrlPropertyValueRenderer implements IPropertyValueRenderer {\n\n /** Checks if the renderer can handle given property */\n public canRender(record: PropertyRecord) {\n return record.value.valueFormat === PropertyValueFormat.Primitive\n && [StandardTypeNames.URL, StandardTypeNames.String, StandardTypeNames.Text].includes(record.property.typename as StandardTypeNames);\n }\n\n /** Method that returns a JSX representation of PropertyRecord */\n public render(record: PropertyRecord, context?: PropertyValueRendererContext) {\n return <PrimitivePropertyValueRendererImpl\n record={record}\n context={context}\n stringValueCalculator={convertPrimitiveRecordToString}\n linksHandler={URI_PROPERTY_LINK_HANDLER}\n />;\n }\n}\n\n/**\n * Default URI onClick event, sets location.href to the whole URI value without matching it\n * against URL regex.\n */\nfunction urlOnClick(text: string) {\n if (text.startsWith(\"mailto:\") || text.startsWith(\"pw:\"))\n location.href = text;\n else {\n const windowOpen = window.open(text, \"_blank\");\n if (windowOpen)\n windowOpen.focus();\n }\n}\n\nconst URI_PROPERTY_LINK_HANDLER: LinkElementsInfo = {\n onClick: urlOnClick,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"UrlPropertyValueRenderer.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/UrlPropertyValueRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,0DAAiH;AAEjH,qFAAsH;AAEtH;;;;;GAKG;AACH,MAAa,wBAAwB;IAEnC,uDAAuD;IAChD,SAAS,CAAC,MAAsB;QACrC,OAAO,MAAM,CAAC,KAAK,CAAC,WAAW,KAAK,oCAAmB,CAAC,SAAS;eAC5D,CAAC,kCAAiB,CAAC,GAAG,EAAE,kCAAiB,CAAC,MAAM,EAAE,kCAAiB,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,QAA6B,CAAC,CAAC;IACzI,CAAC;IAED,iEAAiE;IAC1D,MAAM,CAAC,MAAsB,EAAE,OAAsC;QAC1E,OAAO,oBAAC,mEAAkC,IACxC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,qBAAqB,EAAE,+DAA8B,EACrD,YAAY,EAAE,yBAAyB,GACvC,CAAC;IACL,CAAC;CACF;AAjBD,4DAiBC;AAED;;;GAGG;AACH,SAAS,UAAU,CAAC,IAAY;IAC9B,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;QACtD,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;SAClB;QACH,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC/C,IAAI,UAAU;YACZ,UAAU,CAAC,KAAK,EAAE,CAAC;KACtB;AACH,CAAC;AAED,MAAM,yBAAyB,GAAqB;IAClD,OAAO,EAAE,UAAU;CACpB,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 Properties\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { LinkElementsInfo, PropertyRecord, PropertyValueFormat, StandardTypeNames } from \"@itwin/appui-abstract\";\r\nimport { IPropertyValueRenderer, PropertyValueRendererContext } from \"../../ValueRendererManager\";\r\nimport { convertPrimitiveRecordToString, PrimitivePropertyValueRendererImpl } from \"./PrimitivePropertyValueRenderer\";\r\n\r\n/**\r\n * URL property value renderer that renders the whole value as a URL without matching it\r\n * against URL regex.\r\n *\r\n * @public\r\n */\r\nexport class UrlPropertyValueRenderer implements IPropertyValueRenderer {\r\n\r\n /** Checks if the renderer can handle given property */\r\n public canRender(record: PropertyRecord) {\r\n return record.value.valueFormat === PropertyValueFormat.Primitive\r\n && [StandardTypeNames.URL, StandardTypeNames.String, StandardTypeNames.Text].includes(record.property.typename as StandardTypeNames);\r\n }\r\n\r\n /** Method that returns a JSX representation of PropertyRecord */\r\n public render(record: PropertyRecord, context?: PropertyValueRendererContext) {\r\n return <PrimitivePropertyValueRendererImpl\r\n record={record}\r\n context={context}\r\n stringValueCalculator={convertPrimitiveRecordToString}\r\n linksHandler={URI_PROPERTY_LINK_HANDLER}\r\n />;\r\n }\r\n}\r\n\r\n/**\r\n * Default URI onClick event, sets location.href to the whole URI value without matching it\r\n * against URL regex.\r\n */\r\nfunction urlOnClick(text: string) {\r\n if (text.startsWith(\"mailto:\") || text.startsWith(\"pw:\"))\r\n location.href = text;\r\n else {\r\n const windowOpen = window.open(text, \"_blank\");\r\n if (windowOpen)\r\n windowOpen.focus();\r\n }\r\n}\r\n\r\nconst URI_PROPERTY_LINK_HANDLER: LinkElementsInfo = {\r\n onClick: urlOnClick,\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithContextStyle.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/WithContextStyle.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAG/B;;GAEG;AACI,MAAM,gBAAgB,GAAG,CAAC,IAAqB,EAAE,OAAsC,EAAE,EAAE;IAChG,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK;QAC5B,OAAO,IAAI,CAAC;IACd,OAAO,CAAC,8BAAM,KAAK,EAAE,OAAO,CAAC,KAAK,IAAG,IAAI,CAAQ,CAAC,CAAC;AACrD,CAAC,CAAC;AAJW,QAAA,gBAAgB,oBAI3B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\nimport * as React from \"react\";\nimport { PropertyValueRendererContext } from \"../../ValueRendererManager\";\n\n/** Wraps a React component with a span element with a given style attribute\n * @public\n */\nexport const withContextStyle = (node: React.ReactNode, context?: PropertyValueRendererContext) => {\n if (!context || !context.style)\n return node;\n return (<span style={context.style}>{node}</span>);\n};\n"]}
|
|
1
|
+
{"version":3,"file":"WithContextStyle.js","sourceRoot":"","sources":["../../../../../../src/components-react/properties/renderers/value/WithContextStyle.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAG/B;;GAEG;AACI,MAAM,gBAAgB,GAAG,CAAC,IAAqB,EAAE,OAAsC,EAAE,EAAE;IAChG,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK;QAC5B,OAAO,IAAI,CAAC;IACd,OAAO,CAAC,8BAAM,KAAK,EAAE,OAAO,CAAC,KAAK,IAAG,IAAI,CAAQ,CAAC,CAAC;AACrD,CAAC,CAAC;AAJW,QAAA,gBAAgB,oBAI3B","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 Properties\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { PropertyValueRendererContext } from \"../../ValueRendererManager\";\r\n\r\n/** Wraps a React component with a span element with a given style attribute\r\n * @public\r\n */\r\nexport const withContextStyle = (node: React.ReactNode, context?: PropertyValueRendererContext) => {\r\n if (!context || !context.style)\r\n return node;\r\n return (<span style={context.style}>{node}</span>);\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayValueRenderer.js","sourceRoot":"","sources":["../../../../../../../src/components-react/properties/renderers/value/table/ArrayValueRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,qFAAkF;AAClF,2EAAoI;AAEpI;;GAEG;AACH,MAAa,uBAAwB,SAAQ,KAAK,CAAC,aAA8C;IACvF,cAAc,CAAC,KAAsC;QAC3D,MAAM,KAAK,GAAI,KAAK,CAAC,cAAc,CAAC,KAAoB,CAAC;QACzD,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3F,CAAC;IAEO,iBAAiB;QACvB,OAAO,CACL,oBAAC,2DAA4B,IAC3B,SAAS,EAAE,eAAe,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,EAAE,EACnE,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,GACzC,CACH,CAAC;IACJ,CAAC;IAED,gBAAgB;IACA,MAAM;QACpB,MAAM,QAAQ,GAAI,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAoB,CAAC,aAAa,CAAC;QAC/E,OAAO,CACL,oBAAC,0DAAkB,IACjB,WAAW,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,EAC5C,cAAc,EAAE,IAAI,CAAC,iBAAiB,EAAE,EACxC,WAAW,EAAE,kBAAkB,QAAQ,GAAG,EAC1C,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,GACrC,CACH,CAAC;IACJ,CAAC;CACF;AA5BD,0DA4BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\nimport * as React from \"react\";\nimport { ArrayValue } from \"@itwin/appui-abstract\";\nimport { NonPrimitivePropertyRenderer } from \"../../NonPrimitivePropertyRenderer\";\nimport { TableSpecificValueRendererProps, TableNonPrimitiveValueRenderer as TableValueRenderer } from \"./NonPrimitiveValueRenderer\";\n\n/** A react component which renders array property value as a button with text\n * @public\n */\nexport class TableArrayValueRenderer extends React.PureComponent<TableSpecificValueRendererProps> {\n private getButtonLabel(props: TableSpecificValueRendererProps) {\n const value = (props.propertyRecord.value as ArrayValue);\n return value.items.length !== 0 ? `${value.itemsTypeName}[${value.items.length}]` : \"[]\";\n }\n\n private getDialogContents() {\n return (\n <NonPrimitivePropertyRenderer\n uniqueKey={`table_array_${this.props.propertyRecord.property.name}`}\n orientation={this.props.orientation}\n propertyRecord={this.props.propertyRecord}\n />\n );\n }\n\n /** @internal */\n public override render() {\n const typeName = (this.props.propertyRecord.value as ArrayValue).itemsTypeName;\n return (\n <TableValueRenderer\n buttonLabel={this.getButtonLabel(this.props)}\n dialogContents={this.getDialogContents()}\n dialogTitle={`Array of type \"${typeName}\"`}\n onDialogOpen={this.props.onDialogOpen}\n />\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ArrayValueRenderer.js","sourceRoot":"","sources":["../../../../../../../src/components-react/properties/renderers/value/table/ArrayValueRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,qFAAkF;AAClF,2EAAoI;AAEpI;;GAEG;AACH,MAAa,uBAAwB,SAAQ,KAAK,CAAC,aAA8C;IACvF,cAAc,CAAC,KAAsC;QAC3D,MAAM,KAAK,GAAI,KAAK,CAAC,cAAc,CAAC,KAAoB,CAAC;QACzD,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3F,CAAC;IAEO,iBAAiB;QACvB,OAAO,CACL,oBAAC,2DAA4B,IAC3B,SAAS,EAAE,eAAe,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,EAAE,EACnE,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,GACzC,CACH,CAAC;IACJ,CAAC;IAED,gBAAgB;IACA,MAAM;QACpB,MAAM,QAAQ,GAAI,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAoB,CAAC,aAAa,CAAC;QAC/E,OAAO,CACL,oBAAC,0DAAkB,IACjB,WAAW,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,EAC5C,cAAc,EAAE,IAAI,CAAC,iBAAiB,EAAE,EACxC,WAAW,EAAE,kBAAkB,QAAQ,GAAG,EAC1C,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,GACrC,CACH,CAAC;IACJ,CAAC;CACF;AA5BD,0DA4BC","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 Properties\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { ArrayValue } from \"@itwin/appui-abstract\";\r\nimport { NonPrimitivePropertyRenderer } from \"../../NonPrimitivePropertyRenderer\";\r\nimport { TableSpecificValueRendererProps, TableNonPrimitiveValueRenderer as TableValueRenderer } from \"./NonPrimitiveValueRenderer\";\r\n\r\n/** A react component which renders array property value as a button with text\r\n * @public\r\n */\r\nexport class TableArrayValueRenderer extends React.PureComponent<TableSpecificValueRendererProps> {\r\n private getButtonLabel(props: TableSpecificValueRendererProps) {\r\n const value = (props.propertyRecord.value as ArrayValue);\r\n return value.items.length !== 0 ? `${value.itemsTypeName}[${value.items.length}]` : \"[]\";\r\n }\r\n\r\n private getDialogContents() {\r\n return (\r\n <NonPrimitivePropertyRenderer\r\n uniqueKey={`table_array_${this.props.propertyRecord.property.name}`}\r\n orientation={this.props.orientation}\r\n propertyRecord={this.props.propertyRecord}\r\n />\r\n );\r\n }\r\n\r\n /** @internal */\r\n public override render() {\r\n const typeName = (this.props.propertyRecord.value as ArrayValue).itemsTypeName;\r\n return (\r\n <TableValueRenderer\r\n buttonLabel={this.getButtonLabel(this.props)}\r\n dialogContents={this.getDialogContents()}\r\n dialogTitle={`Array of type \"${typeName}\"`}\r\n onDialogOpen={this.props.onDialogOpen}\r\n />\r\n );\r\n }\r\n}\r\n"]}
|
package/lib/cjs/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NonPrimitiveValueRenderer.js","sourceRoot":"","sources":["../../../../../../../src/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,kDAAkE;AAqClE;;;;GAIG;AACH,MAAa,8BAA+B,SAAQ,KAAK,CAAC,aAAkD;IAA5G;QACE,6DAA6D;;QAErD,aAAQ,GAAG,GAAG,EAAE;YACtB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY;gBAC1B,OAAO;YAET,MAAM,WAAW,GAAwB,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;YAE/G,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;QACvC,CAAC,CAAC;IAkDJ,CAAC;IAhDC,2CAA2C;IAC3C,8DAA8D;IAC9D,mFAAmF;IACnF,6CAA6C;IAC7C,iCAAiC;IACjC,iCAAiC;IACjC,cAAc;IAEd,mDAAmD;IAEnD,wBAAwB;IACxB,cAAc;IAEd,6DAA6D;IAE7D,6CAA6C;IAC7C,uBAAuB;IACvB,iCAAiC;IACjC,oDAAoD;IACpD,SAAS;IACT,eAAe;IACf,wDAAwD;IACxD,6DAA6D;IAC7D,iBAAiB;IACjB,OAAO;IACP,wCAAwC;IACxC,IAAI;IAEJ,iCAAiC;IACjC,gCAAgC;IAChC,gCAAgC;IAChC,IAAI;IAEJ,gBAAgB;IACA,MAAM;QACpB,OAAO,CACL,oBAAC,6BAAgB;QACf,wBAAwB;;YAAxB,wBAAwB;YACxB,SAAS,EAAC,+BAA+B,EACzC,OAAO,EAAE,IAAI,CAAC,QAAQ;YACtB,mCAAmC;YACnC,mCAAmC;YACnC,KAAK,EAAE,QAAQ,IAAI,CAAC,KAAK,CAAC,WAAW,kBAAkB,IAEtD,IAAI,CAAC,KAAK,CAAC,WAAW,CACN,CACpB,CAAC;IACJ,CAAC;CACF;AA5DD,wEA4DC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\nimport * as React from \"react\";\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { Orientation, UnderlinedButton } from \"@itwin/core-react\";\nimport { PropertyDialogState } from \"../../../ValueRendererManager\";\n\n/** Properties for [[TableArrayValueRenderer]] and [[TableStructValueRenderer]] React component\n * @public\n */\nexport interface TableSpecificValueRendererProps extends SharedTableNonPrimitiveValueRendererProps {\n /** Property record */\n propertyRecord: PropertyRecord;\n /** Orientation of the rendered property */\n orientation: Orientation;\n}\n\n/** Shared properties between table non-primitive value renderers\n * @public\n */\nexport interface SharedTableNonPrimitiveValueRendererProps {\n // /** Callback to request for a Popup to be shown. */\n // onPopupShow?: (popupState: PropertyPopupState) => void;\n // /** Callback to request for a Popup to be hidden. */\n // onPopupHide?: () => void;\n /** Callback to request for dialog to be opened. */\n onDialogOpen?: (dialogState: PropertyDialogState) => void;\n}\n\n/** Properties for [[TableNonPrimitiveValueRenderer]] React component\n * @public\n */\nexport interface TableNonPrimitiveValueRendererProps extends SharedTableNonPrimitiveValueRendererProps {\n /** Title of the dialog that shows property in more detail. */\n dialogTitle: string;\n /** Contents of the dialog. Should be the property record shown in more detail. */\n dialogContents: React.ReactNode;\n /** Text that will be rendered in the table cell, in other words - Property value */\n buttonLabel: string;\n}\n\n/**\n * A React component that renders non primitive values as a button with text.\n * When clicked, a dialog appears that shows the value in greater detail.\n * @public\n */\nexport class TableNonPrimitiveValueRenderer extends React.PureComponent<TableNonPrimitiveValueRendererProps> {\n // private _buttonRef = React.createRef<HTMLButtonElement>();\n\n private _onClick = () => {\n if (!this.props.onDialogOpen)\n return;\n\n const dialogState: PropertyDialogState = { content: this.props.dialogContents, title: this.props.dialogTitle };\n\n this.props.onDialogOpen(dialogState);\n };\n\n // TODO: Enable, when table gets refactored\n // Disabled fancy tooltips, because table controls it's state.\n // But, because everything is in table state and there is no shouldComponentUpdate,\n // tooltips cause rerender of the whole table\n // private _showTooltip = () => {\n // if (!this.props.onPopupShow)\n // return;\n\n // const buttonElement = this._buttonRef.current;\n\n // if (!buttonElement)\n // return;\n\n // const buttonBox = buttonElement.getBoundingClientRect();\n\n // const popupState: PropertyPopupState = {\n // fixedPosition: {\n // top: buttonBox.top - 10,\n // left: buttonBox.left + buttonBox.width / 2,\n // },\n // content:\n // <span className=\"components-table-value-popup\">\n // {`View ${this.props.buttonLabel} in more detail.`}\n // </span>,\n // };\n // this.props.onPopupShow(popupState);\n // }\n\n // private _hideTooltip = () => {\n // if (this.props.onPopupHide)\n // this.props.onPopupHide();\n // }\n\n /** @internal */\n public override render() {\n return (\n <UnderlinedButton\n // ref={this._buttonRef}\n className=\"components-table-value-button\"\n onClick={this._onClick}\n // onMouseEnter={this._showTooltip}\n // onMouseLeave={this._hideTooltip}\n title={`View ${this.props.buttonLabel} in more detail.`}\n >\n {this.props.buttonLabel}\n </UnderlinedButton>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"NonPrimitiveValueRenderer.js","sourceRoot":"","sources":["../../../../../../../src/components-react/properties/renderers/value/table/NonPrimitiveValueRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,kDAAkE;AAqClE;;;;GAIG;AACH,MAAa,8BAA+B,SAAQ,KAAK,CAAC,aAAkD;IAA5G;QACE,6DAA6D;;QAErD,aAAQ,GAAG,GAAG,EAAE;YACtB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY;gBAC1B,OAAO;YAET,MAAM,WAAW,GAAwB,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;YAE/G,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;QACvC,CAAC,CAAC;IAkDJ,CAAC;IAhDC,2CAA2C;IAC3C,8DAA8D;IAC9D,mFAAmF;IACnF,6CAA6C;IAC7C,iCAAiC;IACjC,iCAAiC;IACjC,cAAc;IAEd,mDAAmD;IAEnD,wBAAwB;IACxB,cAAc;IAEd,6DAA6D;IAE7D,6CAA6C;IAC7C,uBAAuB;IACvB,iCAAiC;IACjC,oDAAoD;IACpD,SAAS;IACT,eAAe;IACf,wDAAwD;IACxD,6DAA6D;IAC7D,iBAAiB;IACjB,OAAO;IACP,wCAAwC;IACxC,IAAI;IAEJ,iCAAiC;IACjC,gCAAgC;IAChC,gCAAgC;IAChC,IAAI;IAEJ,gBAAgB;IACA,MAAM;QACpB,OAAO,CACL,oBAAC,6BAAgB;QACf,wBAAwB;;YAAxB,wBAAwB;YACxB,SAAS,EAAC,+BAA+B,EACzC,OAAO,EAAE,IAAI,CAAC,QAAQ;YACtB,mCAAmC;YACnC,mCAAmC;YACnC,KAAK,EAAE,QAAQ,IAAI,CAAC,KAAK,CAAC,WAAW,kBAAkB,IAEtD,IAAI,CAAC,KAAK,CAAC,WAAW,CACN,CACpB,CAAC;IACJ,CAAC;CACF;AA5DD,wEA4DC","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 Properties\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\r\nimport { Orientation, UnderlinedButton } from \"@itwin/core-react\";\r\nimport { PropertyDialogState } from \"../../../ValueRendererManager\";\r\n\r\n/** Properties for [[TableArrayValueRenderer]] and [[TableStructValueRenderer]] React component\r\n * @public\r\n */\r\nexport interface TableSpecificValueRendererProps extends SharedTableNonPrimitiveValueRendererProps {\r\n /** Property record */\r\n propertyRecord: PropertyRecord;\r\n /** Orientation of the rendered property */\r\n orientation: Orientation;\r\n}\r\n\r\n/** Shared properties between table non-primitive value renderers\r\n * @public\r\n */\r\nexport interface SharedTableNonPrimitiveValueRendererProps {\r\n // /** Callback to request for a Popup to be shown. */\r\n // onPopupShow?: (popupState: PropertyPopupState) => void;\r\n // /** Callback to request for a Popup to be hidden. */\r\n // onPopupHide?: () => void;\r\n /** Callback to request for dialog to be opened. */\r\n onDialogOpen?: (dialogState: PropertyDialogState) => void;\r\n}\r\n\r\n/** Properties for [[TableNonPrimitiveValueRenderer]] React component\r\n * @public\r\n */\r\nexport interface TableNonPrimitiveValueRendererProps extends SharedTableNonPrimitiveValueRendererProps {\r\n /** Title of the dialog that shows property in more detail. */\r\n dialogTitle: string;\r\n /** Contents of the dialog. Should be the property record shown in more detail. */\r\n dialogContents: React.ReactNode;\r\n /** Text that will be rendered in the table cell, in other words - Property value */\r\n buttonLabel: string;\r\n}\r\n\r\n/**\r\n * A React component that renders non primitive values as a button with text.\r\n * When clicked, a dialog appears that shows the value in greater detail.\r\n * @public\r\n */\r\nexport class TableNonPrimitiveValueRenderer extends React.PureComponent<TableNonPrimitiveValueRendererProps> {\r\n // private _buttonRef = React.createRef<HTMLButtonElement>();\r\n\r\n private _onClick = () => {\r\n if (!this.props.onDialogOpen)\r\n return;\r\n\r\n const dialogState: PropertyDialogState = { content: this.props.dialogContents, title: this.props.dialogTitle };\r\n\r\n this.props.onDialogOpen(dialogState);\r\n };\r\n\r\n // TODO: Enable, when table gets refactored\r\n // Disabled fancy tooltips, because table controls it's state.\r\n // But, because everything is in table state and there is no shouldComponentUpdate,\r\n // tooltips cause rerender of the whole table\r\n // private _showTooltip = () => {\r\n // if (!this.props.onPopupShow)\r\n // return;\r\n\r\n // const buttonElement = this._buttonRef.current;\r\n\r\n // if (!buttonElement)\r\n // return;\r\n\r\n // const buttonBox = buttonElement.getBoundingClientRect();\r\n\r\n // const popupState: PropertyPopupState = {\r\n // fixedPosition: {\r\n // top: buttonBox.top - 10,\r\n // left: buttonBox.left + buttonBox.width / 2,\r\n // },\r\n // content:\r\n // <span className=\"components-table-value-popup\">\r\n // {`View ${this.props.buttonLabel} in more detail.`}\r\n // </span>,\r\n // };\r\n // this.props.onPopupShow(popupState);\r\n // }\r\n\r\n // private _hideTooltip = () => {\r\n // if (this.props.onPopupHide)\r\n // this.props.onPopupHide();\r\n // }\r\n\r\n /** @internal */\r\n public override render() {\r\n return (\r\n <UnderlinedButton\r\n // ref={this._buttonRef}\r\n className=\"components-table-value-button\"\r\n onClick={this._onClick}\r\n // onMouseEnter={this._showTooltip}\r\n // onMouseLeave={this._hideTooltip}\r\n title={`View ${this.props.buttonLabel} in more detail.`}\r\n >\r\n {this.props.buttonLabel}\r\n </UnderlinedButton>\r\n );\r\n }\r\n}\r\n"]}
|
package/lib/cjs/components-react/properties/renderers/value/table/StructValueRenderer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StructValueRenderer.js","sourceRoot":"","sources":["../../../../../../../src/components-react/properties/renderers/value/table/StructValueRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,qFAAkF;AAClF,2EAAoI;AAEpI;;GAEG;AACH,MAAa,wBAAyB,SAAQ,KAAK,CAAC,aAA8C;IACxF,cAAc,CAAC,KAAsC;QAC3D,OAAO,IAAI,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,GAAG,CAAC;IACvD,CAAC;IAEO,iBAAiB;QACvB,OAAO,CACL,oBAAC,2DAA4B,IAC3B,SAAS,EAAE,gBAAgB,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,EAAE,EACpE,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,GACzC,CACH,CAAC;IACJ,CAAC;IAED,gBAAgB;IACA,MAAM;QACpB,OAAO,CACL,oBAAC,0DAAkB,IACjB,WAAW,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,EAC5C,WAAW,EAAE,mBAAmB,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,GAAG,EAC9E,cAAc,EAAE,IAAI,CAAC,iBAAiB,EAAE,EACxC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,GACrC,CACH,CAAC;IACJ,CAAC;CACF;AA1BD,4DA0BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Properties\n */\n\nimport * as React from \"react\";\nimport { NonPrimitivePropertyRenderer } from \"../../NonPrimitivePropertyRenderer\";\nimport { TableSpecificValueRendererProps, TableNonPrimitiveValueRenderer as TableValueRenderer } from \"./NonPrimitiveValueRenderer\";\n\n/** A react component which renders struct property value as a button with text\n * @public\n */\nexport class TableStructValueRenderer extends React.PureComponent<TableSpecificValueRendererProps> {\n private getButtonLabel(props: TableSpecificValueRendererProps) {\n return `{${props.propertyRecord.property.typename}}`;\n }\n\n private getDialogContents() {\n return (\n <NonPrimitivePropertyRenderer\n uniqueKey={`table_struct_${this.props.propertyRecord.property.name}`}\n orientation={this.props.orientation}\n propertyRecord={this.props.propertyRecord}\n />\n );\n }\n\n /** @internal */\n public override render() {\n return (\n <TableValueRenderer\n buttonLabel={this.getButtonLabel(this.props)}\n dialogTitle={`Struct of type \"${this.props.propertyRecord.property.typename}\"`}\n dialogContents={this.getDialogContents()}\n onDialogOpen={this.props.onDialogOpen}\n />\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"StructValueRenderer.js","sourceRoot":"","sources":["../../../../../../../src/components-react/properties/renderers/value/table/StructValueRenderer.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,qFAAkF;AAClF,2EAAoI;AAEpI;;GAEG;AACH,MAAa,wBAAyB,SAAQ,KAAK,CAAC,aAA8C;IACxF,cAAc,CAAC,KAAsC;QAC3D,OAAO,IAAI,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,GAAG,CAAC;IACvD,CAAC;IAEO,iBAAiB;QACvB,OAAO,CACL,oBAAC,2DAA4B,IAC3B,SAAS,EAAE,gBAAgB,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,EAAE,EACpE,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,GACzC,CACH,CAAC;IACJ,CAAC;IAED,gBAAgB;IACA,MAAM;QACpB,OAAO,CACL,oBAAC,0DAAkB,IACjB,WAAW,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,EAC5C,WAAW,EAAE,mBAAmB,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,GAAG,EAC9E,cAAc,EAAE,IAAI,CAAC,iBAAiB,EAAE,EACxC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,GACrC,CACH,CAAC;IACJ,CAAC;CACF;AA1BD,4DA0BC","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 Properties\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { NonPrimitivePropertyRenderer } from \"../../NonPrimitivePropertyRenderer\";\r\nimport { TableSpecificValueRendererProps, TableNonPrimitiveValueRenderer as TableValueRenderer } from \"./NonPrimitiveValueRenderer\";\r\n\r\n/** A react component which renders struct property value as a button with text\r\n * @public\r\n */\r\nexport class TableStructValueRenderer extends React.PureComponent<TableSpecificValueRendererProps> {\r\n private getButtonLabel(props: TableSpecificValueRendererProps) {\r\n return `{${props.propertyRecord.property.typename}}`;\r\n }\r\n\r\n private getDialogContents() {\r\n return (\r\n <NonPrimitivePropertyRenderer\r\n uniqueKey={`table_struct_${this.props.propertyRecord.property.name}`}\r\n orientation={this.props.orientation}\r\n propertyRecord={this.props.propertyRecord}\r\n />\r\n );\r\n }\r\n\r\n /** @internal */\r\n public override render() {\r\n return (\r\n <TableValueRenderer\r\n buttonLabel={this.getButtonLabel(this.props)}\r\n dialogTitle={`Struct of type \"${this.props.propertyRecord.property.typename}\"`}\r\n dialogContents={this.getDialogContents()}\r\n onDialogOpen={this.props.onDialogOpen}\r\n />\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyCategoryRendererManager.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/PropertyCategoryRendererManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAyBH;;;;GAIG;AACH,MAAa,+BAA+B;IAA5C;QACU,uBAAkB,GAAG,IAAI,GAAG,EAAoC,CAAC;IA4B3E,CAAC;IAxBC,mFAAmF;IAC5E,oBAAoB,CAAC,YAA8B;QACxD,IAAI,YAAY,CAAC,eAAe,CAAC,QAAQ,KAAK,SAAS,EAAE;YACvD,OAAO,SAAS,CAAC;SAClB;QAED,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC;IACjG,CAAC;IAED,qGAAqG;IAC9F,WAAW,CAAC,YAAoB,EAAE,gBAA0C,EAAE,QAAQ,GAAG,KAAK;QACnG,IAAI,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE;YAC1D,MAAM,SAAS,GAAG,+BAA+B,CAAC,IAAI,CAAC;YACvD,MAAM,UAAU,GAAG,+BAA+B,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;YAC9E,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,IAAI,UAAU,qBAAqB,YAAY,wDAAwD,CAAC,CAAC;SACtI;QAED,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;IAC9D,CAAC;IAED,sDAAsD;IAC/C,cAAc,CAAC,YAAoB;QACxC,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAC/C,CAAC;;AAzBa,8CAAc,GAAG,IAAI,+BAA+B,EAAE,AAAxC,CAAyC;AAH1D,0EAA+B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport * as React from \"react\";\nimport { VirtualizedPropertyGridContext } from \"./component/VirtualizedPropertyGrid\";\nimport { GridCategoryItem } from \"./internal/flat-items/FlatGridItem\";\n\n/**\n * Props that property category renderer receives.\n * @public\n */\nexport interface PropertyCategoryRendererProps {\n /** The category being rendered. */\n categoryItem: GridCategoryItem;\n /** Context of the surrounding property grid. */\n gridContext: VirtualizedPropertyGridContext;\n /** Sets the allocated height for category contents. */\n onHeightChanged: (newHeight: number) => void;\n}\n\n/**\n * Factory function that produces custom property category components.\n * @public\n */\nexport type PropertyCategoryRenderer = (categoryItem: GridCategoryItem) => React.ComponentType<PropertyCategoryRendererProps> | undefined;\n\n/**\n * Keeps a record of currently registered property category renderers and determines which renderers get invoked for\n * each category.\n * @public\n */\nexport class PropertyCategoryRendererManager {\n private _categoryRenderers = new Map<string, PropertyCategoryRenderer>();\n\n public static defaultManager = new PropertyCategoryRendererManager();\n\n /** Retrieves a category rendering component based for the passed category item. */\n public getCategoryComponent(categoryItem: GridCategoryItem): React.ComponentType<PropertyCategoryRendererProps> | undefined {\n if (categoryItem.derivedCategory.renderer === undefined) {\n return undefined;\n }\n\n return this._categoryRenderers.get(categoryItem.derivedCategory.renderer.name)?.(categoryItem);\n }\n\n /** Registers a renderer factory function to be invoked on categories with specific renderer name. */\n public addRenderer(rendererName: string, categoryRenderer: PropertyCategoryRenderer, override = false): void {\n if (this._categoryRenderers.has(rendererName) && !override) {\n const className = PropertyCategoryRendererManager.name;\n const methodName = PropertyCategoryRendererManager.prototype.addRenderer.name;\n throw new Error(`${className}.${methodName} error: renderer '${rendererName}' has already been added. Did you mean to override it?`);\n }\n\n this._categoryRenderers.set(rendererName, categoryRenderer);\n }\n\n /** Removes previous renderer factory registration. */\n public removeRenderer(rendererName: string): void {\n this._categoryRenderers.delete(rendererName);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"PropertyCategoryRendererManager.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/PropertyCategoryRendererManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAyBH;;;;GAIG;AACH,MAAa,+BAA+B;IAA5C;QACU,uBAAkB,GAAG,IAAI,GAAG,EAAoC,CAAC;IA4B3E,CAAC;IAxBC,mFAAmF;IAC5E,oBAAoB,CAAC,YAA8B;QACxD,IAAI,YAAY,CAAC,eAAe,CAAC,QAAQ,KAAK,SAAS,EAAE;YACvD,OAAO,SAAS,CAAC;SAClB;QAED,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC;IACjG,CAAC;IAED,qGAAqG;IAC9F,WAAW,CAAC,YAAoB,EAAE,gBAA0C,EAAE,QAAQ,GAAG,KAAK;QACnG,IAAI,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE;YAC1D,MAAM,SAAS,GAAG,+BAA+B,CAAC,IAAI,CAAC;YACvD,MAAM,UAAU,GAAG,+BAA+B,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;YAC9E,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,IAAI,UAAU,qBAAqB,YAAY,wDAAwD,CAAC,CAAC;SACtI;QAED,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;IAC9D,CAAC;IAED,sDAAsD;IAC/C,cAAc,CAAC,YAAoB;QACxC,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAC/C,CAAC;;AAzBa,8CAAc,GAAG,IAAI,+BAA+B,EAAE,AAAxC,CAAyC;AAH1D,0EAA+B","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 { VirtualizedPropertyGridContext } from \"./component/VirtualizedPropertyGrid\";\r\nimport { GridCategoryItem } from \"./internal/flat-items/FlatGridItem\";\r\n\r\n/**\r\n * Props that property category renderer receives.\r\n * @public\r\n */\r\nexport interface PropertyCategoryRendererProps {\r\n /** The category being rendered. */\r\n categoryItem: GridCategoryItem;\r\n /** Context of the surrounding property grid. */\r\n gridContext: VirtualizedPropertyGridContext;\r\n /** Sets the allocated height for category contents. */\r\n onHeightChanged: (newHeight: number) => void;\r\n}\r\n\r\n/**\r\n * Factory function that produces custom property category components.\r\n * @public\r\n */\r\nexport type PropertyCategoryRenderer = (categoryItem: GridCategoryItem) => React.ComponentType<PropertyCategoryRendererProps> | undefined;\r\n\r\n/**\r\n * Keeps a record of currently registered property category renderers and determines which renderers get invoked for\r\n * each category.\r\n * @public\r\n */\r\nexport class PropertyCategoryRendererManager {\r\n private _categoryRenderers = new Map<string, PropertyCategoryRenderer>();\r\n\r\n public static defaultManager = new PropertyCategoryRendererManager();\r\n\r\n /** Retrieves a category rendering component based for the passed category item. */\r\n public getCategoryComponent(categoryItem: GridCategoryItem): React.ComponentType<PropertyCategoryRendererProps> | undefined {\r\n if (categoryItem.derivedCategory.renderer === undefined) {\r\n return undefined;\r\n }\r\n\r\n return this._categoryRenderers.get(categoryItem.derivedCategory.renderer.name)?.(categoryItem);\r\n }\r\n\r\n /** Registers a renderer factory function to be invoked on categories with specific renderer name. */\r\n public addRenderer(rendererName: string, categoryRenderer: PropertyCategoryRenderer, override = false): void {\r\n if (this._categoryRenderers.has(rendererName) && !override) {\r\n const className = PropertyCategoryRendererManager.name;\r\n const methodName = PropertyCategoryRendererManager.prototype.addRenderer.name;\r\n throw new Error(`${className}.${methodName} error: renderer '${rendererName}' has already been added. Did you mean to override it?`);\r\n }\r\n\r\n this._categoryRenderers.set(rendererName, categoryRenderer);\r\n }\r\n\r\n /** Removes previous renderer factory registration. */\r\n public removeRenderer(rendererName: string): void {\r\n this._categoryRenderers.delete(rendererName);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyDataProvider.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/PropertyDataProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,sDAA8C;AAsC9C;;GAEG;AACH,MAAa,uBAAwB,SAAQ,sBAAoC;CAAI;AAArF,0DAAqF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { BeEvent } from \"@itwin/core-bentley\";\n\n/**\n * Contains metadata about a group of Properties.\n * @public\n */\nexport interface PropertyCategory {\n name: string;\n label: string;\n expand: boolean;\n childCategories?: PropertyCategory[];\n renderer?: {\n name: string;\n };\n}\n\n/**\n * Interface for property data provided to the PropertyGrid React component.\n * @public\n */\nexport interface PropertyData {\n label: PropertyRecord;\n description?: string;\n categories: PropertyCategory[];\n records: { [categoryName: string]: PropertyRecord[] };\n\n /**\n * Should state of existing property data in the component be re-used for this property data\n * @beta\n */\n reusePropertyDataState?: boolean;\n}\n\n/** A signature for property data change listeners\n * @public\n */\nexport declare type PropertyDataChangesListener = () => void;\n\n/** An event broadcasted on property data changes\n * @public\n */\nexport class PropertyDataChangeEvent extends BeEvent<PropertyDataChangesListener> { }\n\n/**\n * An interface for property data provider which returns\n * property data and broadcasts an event when the data changes\n * @public\n */\nexport interface IPropertyDataProvider {\n /** Returns property data. */\n getData: (() => Promise<PropertyData>);\n /** Property data change event. */\n onDataChanged: PropertyDataChangeEvent;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"PropertyDataProvider.js","sourceRoot":"","sources":["../../../../src/components-react/propertygrid/PropertyDataProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,sDAA8C;AAsC9C;;GAEG;AACH,MAAa,uBAAwB,SAAQ,sBAAoC;CAAI;AAArF,0DAAqF","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 { PropertyRecord } from \"@itwin/appui-abstract\";\r\nimport { BeEvent } from \"@itwin/core-bentley\";\r\n\r\n/**\r\n * Contains metadata about a group of Properties.\r\n * @public\r\n */\r\nexport interface PropertyCategory {\r\n name: string;\r\n label: string;\r\n expand: boolean;\r\n childCategories?: PropertyCategory[];\r\n renderer?: {\r\n name: string;\r\n };\r\n}\r\n\r\n/**\r\n * Interface for property data provided to the PropertyGrid React component.\r\n * @public\r\n */\r\nexport interface PropertyData {\r\n label: PropertyRecord;\r\n description?: string;\r\n categories: PropertyCategory[];\r\n records: { [categoryName: string]: PropertyRecord[] };\r\n\r\n /**\r\n * Should state of existing property data in the component be re-used for this property data\r\n * @beta\r\n */\r\n reusePropertyDataState?: boolean;\r\n}\r\n\r\n/** A signature for property data change listeners\r\n * @public\r\n */\r\nexport declare type PropertyDataChangesListener = () => void;\r\n\r\n/** An event broadcasted on property data changes\r\n * @public\r\n */\r\nexport class PropertyDataChangeEvent extends BeEvent<PropertyDataChangesListener> { }\r\n\r\n/**\r\n * An interface for property data provider which returns\r\n * property data and broadcasts an event when the data changes\r\n * @public\r\n */\r\nexport interface IPropertyDataProvider {\r\n /** Returns property data. */\r\n getData: (() => Promise<PropertyData>);\r\n /** Property data change event. */\r\n onDataChanged: PropertyDataChangeEvent;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimplePropertyDataProvider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AAW,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,MAAsB,EAAE,EAAE;YACjG,OAAO,MAAM,KAAK,cAAc,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,IAAI,MAAM,GAAG,KAAK,CAAC;QAEnB,uBAAuB;QACvB,IAAI,KAAK,IAAI,CAAC,EAAE;YACd,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YACjE,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC;YAChC,MAAM,GAAG,IAAI,CAAC;SACf;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,eAAe,CAAC,cAA8B,EAAE,WAAmB,EAAE,SAAyB;QACnG,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,MAAsB,EAAE,EAAE;YACjG,OAAO,MAAM,KAAK,cAAc,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,IAAI,MAAM,GAAG,KAAK,CAAC;QAEnB,uBAAuB;QACvB,IAAI,KAAK,IAAI,CAAC,EAAE;YACd,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;YAC5E,MAAM,GAAG,IAAI,CAAC;SACf;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,KAAK,CAAC,OAAO;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5DD,gEA4DC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { IPropertyDataProvider, PropertyCategory, PropertyData, PropertyDataChangeEvent } from \"./PropertyDataProvider\";\n\n/**\n * Implementation of [IPropertyDataProvider] that uses an associative array.\n * @public\n */\nexport class SimplePropertyDataProvider implements IPropertyDataProvider, PropertyData {\n public label: PropertyRecord = PropertyRecord.fromString(\"\");\n public description?: string;\n public categories: PropertyCategory[] = [];\n public records: { [categoryName: string]: PropertyRecord[] } = {};\n public onDataChanged = new PropertyDataChangeEvent();\n\n public addCategory(category: PropertyCategory): number {\n const categoryIdx = this.categories.push(category) - 1;\n this.records[this.categories[categoryIdx].name] = [];\n this.onDataChanged.raiseEvent();\n return categoryIdx;\n }\n\n public findCategoryIndex(category: PropertyCategory): number {\n const index = this.categories.findIndex((testCategory: PropertyCategory) => {\n return testCategory.name === category.name;\n });\n return index;\n }\n\n public addProperty(propertyRecord: PropertyRecord, categoryIdx: number): void {\n this.records[this.categories[categoryIdx].name].push(propertyRecord);\n this.onDataChanged.raiseEvent();\n }\n\n public removeProperty(propertyRecord: PropertyRecord, categoryIdx: number): boolean {\n const index = this.records[this.categories[categoryIdx].name].findIndex((record: PropertyRecord) => {\n return record === propertyRecord;\n });\n\n let result = false;\n\n // istanbul ignore else\n if (index >= 0) {\n this.records[this.categories[categoryIdx].name].splice(index, 1);\n this.onDataChanged.raiseEvent();\n result = true;\n }\n return result;\n }\n\n public replaceProperty(propertyRecord: PropertyRecord, categoryIdx: number, newRecord: PropertyRecord): boolean {\n const index = this.records[this.categories[categoryIdx].name].findIndex((record: PropertyRecord) => {\n return record === propertyRecord;\n });\n\n let result = false;\n\n // istanbul ignore else\n if (index >= 0) {\n this.records[this.categories[categoryIdx].name].splice(index, 1, newRecord);\n result = true;\n }\n return result;\n }\n\n public async getData(): Promise<PropertyData> {\n return this;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SimplePropertyDataProvider.js","s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CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,MAAsB,EAAE,EAAE;YACjG,OAAO,MAAM,KAAK,cAAc,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,IAAI,MAAM,GAAG,KAAK,CAAC;QAEnB,uBAAuB;QACvB,IAAI,KAAK,IAAI,CAAC,EAAE;YACd,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YACjE,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC;YAChC,MAAM,GAAG,IAAI,CAAC;SACf;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,eAAe,CAAC,cAA8B,EAAE,WAAmB,EAAE,SAAyB;QACnG,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,MAAsB,EAAE,EAAE;YACjG,OAAO,MAAM,KAAK,cAAc,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,IAAI,MAAM,GAAG,KAAK,CAAC;QAEnB,uBAAuB;QACvB,IAAI,KAAK,IAAI,CAAC,EAAE;YACd,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;YAC5E,MAAM,GAAG,IAAI,CAAC;SACf;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,KAAK,CAAC,OAAO;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5DD,gEA4DC","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 { PropertyRecord } from \"@itwin/appui-abstract\";\r\nimport { IPropertyDataProvider, PropertyCategory, PropertyData, PropertyDataChangeEvent } from \"./PropertyDataProvider\";\r\n\r\n/**\r\n * Implementation of [IPropertyDataProvider] that uses an associative array.\r\n * @public\r\n */\r\nexport class SimplePropertyDataProvider implements IPropertyDataProvider, PropertyData {\r\n public label: PropertyRecord = PropertyRecord.fromString(\"\");\r\n public description?: string;\r\n public categories: PropertyCategory[] = [];\r\n public records: { [categoryName: string]: PropertyRecord[] } = {};\r\n public onDataChanged = new PropertyDataChangeEvent();\r\n\r\n public addCategory(category: PropertyCategory): number {\r\n const categoryIdx = this.categories.push(category) - 1;\r\n this.records[this.categories[categoryIdx].name] = [];\r\n this.onDataChanged.raiseEvent();\r\n return categoryIdx;\r\n }\r\n\r\n public findCategoryIndex(category: PropertyCategory): number {\r\n const index = this.categories.findIndex((testCategory: PropertyCategory) => {\r\n return testCategory.name === category.name;\r\n });\r\n return index;\r\n }\r\n\r\n public addProperty(propertyRecord: PropertyRecord, categoryIdx: number): void {\r\n this.records[this.categories[categoryIdx].name].push(propertyRecord);\r\n this.onDataChanged.raiseEvent();\r\n }\r\n\r\n public removeProperty(propertyRecord: PropertyRecord, categoryIdx: number): boolean {\r\n const index = this.records[this.categories[categoryIdx].name].findIndex((record: PropertyRecord) => {\r\n return record === propertyRecord;\r\n });\r\n\r\n let result = false;\r\n\r\n // istanbul ignore else\r\n if (index >= 0) {\r\n this.records[this.categories[categoryIdx].name].splice(index, 1);\r\n this.onDataChanged.raiseEvent();\r\n result = true;\r\n }\r\n return result;\r\n }\r\n\r\n public replaceProperty(propertyRecord: PropertyRecord, categoryIdx: number, newRecord: PropertyRecord): boolean {\r\n const index = this.records[this.categories[categoryIdx].name].findIndex((record: PropertyRecord) => {\r\n return record === propertyRecord;\r\n });\r\n\r\n let result = false;\r\n\r\n // istanbul ignore else\r\n if (index >= 0) {\r\n this.records[this.categories[categoryIdx].name].splice(index, 1, newRecord);\r\n result = true;\r\n }\r\n return result;\r\n }\r\n\r\n public async getData(): Promise<PropertyData> {\r\n return this;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnResizingPropertyListPropsSupplier.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,6CAA+B;AAC/B,kDAA+E;AA6B/E;;;GAGG;AACH,MAAa,uCAAwC,SAAQ,KAAK,CAAC,SAAqG;IAAxK;;QACmB,kBAAa,GAAG,IAAI,CAAC;QACrB,qBAAgB,GAAG,IAAI,CAAC;QACxB,qBAAgB,GAAG,GAAG,CAAC;QAChC,cAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAClC,cAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAE1B,UAAK,GAAiD;YACpE,WAAW,EAAE,IAAI,CAAC,aAAa;YAC/B,qBAAqB,EAAE,KAAK;YAC5B,0BAA0B,EAAE,KAAK;SAClC,CAAC;QAQM,0BAAqB,GAAG,CAAC,KAAa,EAAqB,EAAE;YACnE,KAAK,GAAG,uBAAU,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAChE,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,KAAK,KAAK;gBAClC,OAAO,EAAE,KAAK,EAAE,CAAC;YAEnB,IAAI,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC;YACtC,OAAO,EAAE,KAAK,EAAE,CAAC;QACnB,CAAC,CAAC;QAEF,uBAAuB;QACf,gCAA2B,GAAG,CAAC,SAAkB,EAAE,EAAE;YAC3D,IAAI,CAAC,QAAQ,CAAC,EAAE,qBAAqB,EAA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AAK,CAAC,KAAK;YACvB,eAAe,EAAE,IAAI,CAAC,qBAAqB;YAC3C,WAAW,EAAE,IAAI,CAAC,mBAAmB,EAAE;YACvC,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB;YACvD,0BAA0B,EAAE,IAAI,CAAC,2BAA2B;YAC5D,0BAA0B,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B;YACjE,yBAAyB,EAAE,IAAI,CAAC,0BAA0B;YAC1D,UAAU,EAAE;gBACV,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,aAAc;gBACxC,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,aAAc;gBACxC,iBAAiB,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAkB;gBAChD,0BAA0B,EAAE,IAAI,CAAC,0BAA0B,EAAE;aAC9D;SACF,CAAC;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC;;AA9Da,oDAAY,GAA0D;IAClF,aAAa,EAAE,GAAG;IAClB,aAAa,EAAE,GAAG;IAClB,iBAAiB,EAAE,EAAE;CACtB,AAJyB,CAIxB;AAjBS,0FAAuC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport * as React from \"react\";\nimport { Orientation, RatioChangeResult, UiGeometry } from \"@itwin/core-react\";\nimport { PropertyListProps } from \"./PropertyList\";\n\n/** @internal */\nexport type ColumnResizeRelatedPropertyListProps = Required<Pick<PropertyListProps, \"onColumnChanged\" | \"columnRatio\" | \"isResizeHandleHovered\" | \"onResizeHandleHoverChanged\" | \"isResizeHandleBeingDragged\" | \"onResizeHandleDragChanged\" | \"columnInfo\" | \"orientation\" | \"width\">>;\n\n/** @internal */\nexport interface ColumnResizingPropertyListPropsSupplierProps {\n /** Orientation of the properties */\n orientation: Orientation;\n /** Width of the property list */\n width: number;\n /** Minimum allowed label column width, after which resizing stops */\n minLabelWidth?: number;\n /** Minimum allowed value column width, after which resizing stops */\n minValueWidth?: number;\n /** Fixed action button column width */\n actionButtonWidth?: number;\n /** A callback that receives the required column-resize-related props for the [[PropertyList]] component */\n children: (props: ColumnResizeRelatedPropertyListProps) => React.ReactNode;\n}\n\n/** @internal */\nexport interface ColumnResizingPropertyListPropsSupplierState {\n columnRatio: number;\n isResizeHandleHovered: boolean;\n isResizeHandleBeingDragged: boolean;\n}\n\n/**\n * Wrapped PropertyCategoryBlock React component with list of properties and render optimization\n * @internal\n */\nexport class ColumnResizingPropertyListPropsSupplier extends React.Component<ColumnResizingPropertyListPropsSupplierProps, ColumnResizingPropertyListPropsSupplierState> {\n private readonly _initialRatio = 0.25;\n private readonly _defaultMinRatio = 0.15;\n private readonly _defaultMaxRatio = 0.6;\n private _minRatio = this._defaultMinRatio;\n private _maxRatio = this._defaultMaxRatio;\n\n public override state: ColumnResizingPropertyListPropsSupplierState = {\n columnRatio: this._initialRatio,\n isResizeHandleHovered: false,\n isResizeHandleBeingDragged: false,\n };\n\n public static defaultProps: Partial<ColumnResizingPropertyListPropsSupplierProps> = {\n minLabelWidth: 100,\n minValueWidth: 100,\n actionButtonWidth: 90,\n };\n\n private _onColumnRatioChanged = (ratio: number): RatioChangeResult => {\n ratio = UiGeometry.clamp(ratio, this._minRatio, this._maxRatio);\n if (this.state.columnRatio === ratio)\n return { ratio };\n\n this.setState({ columnRatio: ratio });\n return { ratio };\n };\n\n // istanbul ignore next\n private _onResizeHandleHoverChanged = (isHovered: boolean) => {\n this.setState({ isResizeHandleHovered: isHovered });\n };\n\n private _onResizeHandleDragChanged = (isDragStarted: boolean) => {\n this.setState({ isResizeHandleBeingDragged: isDragStarted });\n };\n\n private isMinimumColumnSizeEnabled() {\n if (this.props.orientation !== Orientation.Horizontal)\n return false;\n\n // default behavior for screens that are too small to have minimum column widths\n if (this.props.width < this.props.minLabelWidth! + 1 + this.props.minValueWidth! + this.props.actionButtonWidth!) {\n this._minRatio = this._defaultMinRatio;\n this._maxRatio = this._defaultMaxRatio;\n return false;\n }\n\n this._minRatio = this.props.minLabelWidth! / this.props.width;\n this._maxRatio = (this.props.width - this.props.actionButtonWidth! - this.props.minValueWidth!) / this.props.width;\n return true;\n }\n\n private getValidColumnRatio(): number {\n return UiGeometry.clamp(this.state.columnRatio, this._minRatio, this._maxRatio);\n }\n\n public override render() {\n const listProps: ColumnResizeRelatedPropertyListProps = {\n orientation: this.props.orientation,\n width: this.props.width,\n onColumnChanged: this._onColumnRatioChanged,\n columnRatio: this.getValidColumnRatio(),\n isResizeHandleHovered: this.state.isResizeHandleHovered,\n onResizeHandleHoverChanged: this._onResizeHandleHoverChanged,\n isResizeHandleBeingDragged: this.state.isResizeHandleBeingDragged,\n onResizeHandleDragChanged: this._onResizeHandleDragChanged,\n columnInfo: {\n minLabelWidth: this.props.minLabelWidth!,\n minValueWidth: this.props.minValueWidth!,\n actionButtonWidth: this.props.actionButtonWidth!,\n isMinimumColumnSizeEnabled: this.isMinimumColumnSizeEnabled(),\n },\n };\n return this.props.children(listProps);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ColumnResizingPropertyListPropsSupplier.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/ColumnResizingPropertyListPropsSupplier.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,6CAA+B;AAC/B,kDAA+E;AA6B/E;;;GAGG;AACH,MAAa,uCAAwC,SAAQ,KAAK,CAAC,SAAqG;IAAxK;;QACmB,kBAAa,GAAG,IAAI,CAAC;QACrB,qBAAgB,GAAG,IAAI,CAAC;QACxB,qBAAgB,GAAG,GAAG,CAAC;QAChC,cAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAClC,cAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAE1B,UAAK,GAAiD;YACpE,WAAW,EAAE,IAAI,CAA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AAG;IAClB,iBAAiB,EAAE,EAAE;CACtB,AAJyB,CAIxB;AAjBS,0FAAuC","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\nimport * as React from \"react\";\r\nimport { Orientation, RatioChangeResult, UiGeometry } from \"@itwin/core-react\";\r\nimport { PropertyListProps } from \"./PropertyList\";\r\n\r\n/** @internal */\r\nexport type ColumnResizeRelatedPropertyListProps = Required<Pick<PropertyListProps, \"onColumnChanged\" | \"columnRatio\" | \"isResizeHandleHovered\" | \"onResizeHandleHoverChanged\" | \"isResizeHandleBeingDragged\" | \"onResizeHandleDragChanged\" | \"columnInfo\" | \"orientation\" | \"width\">>;\r\n\r\n/** @internal */\r\nexport interface ColumnResizingPropertyListPropsSupplierProps {\r\n /** Orientation of the properties */\r\n orientation: Orientation;\r\n /** Width of the property list */\r\n width: number;\r\n /** Minimum allowed label column width, after which resizing stops */\r\n minLabelWidth?: number;\r\n /** Minimum allowed value column width, after which resizing stops */\r\n minValueWidth?: number;\r\n /** Fixed action button column width */\r\n actionButtonWidth?: number;\r\n /** A callback that receives the required column-resize-related props for the [[PropertyList]] component */\r\n children: (props: ColumnResizeRelatedPropertyListProps) => React.ReactNode;\r\n}\r\n\r\n/** @internal */\r\nexport interface ColumnResizingPropertyListPropsSupplierState {\r\n columnRatio: number;\r\n isResizeHandleHovered: boolean;\r\n isResizeHandleBeingDragged: boolean;\r\n}\r\n\r\n/**\r\n * Wrapped PropertyCategoryBlock React component with list of properties and render optimization\r\n * @internal\r\n */\r\nexport class ColumnResizingPropertyListPropsSupplier extends React.Component<ColumnResizingPropertyListPropsSupplierProps, ColumnResizingPropertyListPropsSupplierState> {\r\n private readonly _initialRatio = 0.25;\r\n private readonly _defaultMinRatio = 0.15;\r\n private readonly _defaultMaxRatio = 0.6;\r\n private _minRatio = this._defaultMinRatio;\r\n private _maxRatio = this._defaultMaxRatio;\r\n\r\n public override state: ColumnResizingPropertyListPropsSupplierState = {\r\n columnRatio: this._initialRatio,\r\n isResizeHandleHovered: false,\r\n isResizeHandleBeingDragged: false,\r\n };\r\n\r\n public static defaultProps: Partial<ColumnResizingPropertyListPropsSupplierProps> = {\r\n minLabelWidth: 100,\r\n minValueWidth: 100,\r\n actionButtonWidth: 90,\r\n };\r\n\r\n private _onColumnRatioChanged = (ratio: number): RatioChangeResult => {\r\n ratio = UiGeometry.clamp(ratio, this._minRatio, this._maxRatio);\r\n if (this.state.columnRatio === ratio)\r\n return { ratio };\r\n\r\n this.setState({ columnRatio: ratio });\r\n return { ratio };\r\n };\r\n\r\n // istanbul ignore next\r\n private _onResizeHandleHoverChanged = (isHovered: boolean) => {\r\n this.setState({ isResizeHandleHovered: isHovered });\r\n };\r\n\r\n private _onResizeHandleDragChanged = (isDragStarted: boolean) => {\r\n this.setState({ isResizeHandleBeingDragged: isDragStarted });\r\n };\r\n\r\n private isMinimumColumnSizeEnabled() {\r\n if (this.props.orientation !== Orientation.Horizontal)\r\n return false;\r\n\r\n // default behavior for screens that are too small to have minimum column widths\r\n if (this.props.width < this.props.minLabelWidth! + 1 + this.props.minValueWidth! + this.props.actionButtonWidth!) {\r\n this._minRatio = this._defaultMinRatio;\r\n this._maxRatio = this._defaultMaxRatio;\r\n return false;\r\n }\r\n\r\n this._minRatio = this.props.minLabelWidth! / this.props.width;\r\n this._maxRatio = (this.props.width - this.props.actionButtonWidth! - this.props.minValueWidth!) / this.props.width;\r\n return true;\r\n }\r\n\r\n private getValidColumnRatio(): number {\r\n return UiGeometry.clamp(this.state.columnRatio, this._minRatio, this._maxRatio);\r\n }\r\n\r\n public override render() {\r\n const listProps: ColumnResizeRelatedPropertyListProps = {\r\n orientation: this.props.orientation,\r\n width: this.props.width,\r\n onColumnChanged: this._onColumnRatioChanged,\r\n columnRatio: this.getValidColumnRatio(),\r\n isResizeHandleHovered: this.state.isResizeHandleHovered,\r\n onResizeHandleHoverChanged: this._onResizeHandleHoverChanged,\r\n isResizeHandleBeingDragged: this.state.isResizeHandleBeingDragged,\r\n onResizeHandleDragChanged: this._onResizeHandleDragChanged,\r\n columnInfo: {\r\n minLabelWidth: this.props.minLabelWidth!,\r\n minValueWidth: this.props.minValueWidth!,\r\n actionButtonWidth: this.props.actionButtonWidth!,\r\n isMinimumColumnSizeEnabled: this.isMinimumColumnSizeEnabled(),\r\n },\r\n };\r\n return this.props.children(listProps);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlatItemNestedBorderWrapper.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/FlatItemNestedBorderWrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,4DAAoC;AACpC,6CAA+B;AAa/B;;;;GAIG;AACH,SAAgB,2BAA2B,CAAC,KAA+B;IACzE,IAAI,KAAK,CAAC,WAAW,IAAI,CAAC,EAAE;QAC1B,OAAO,CACL,6BAAK,SAAS,EAAE,KAAK,CAAC,SAAS,IAC5B,KAAK,CAAC,QAAQ,CACX,CACP,CAAC;KACH;IAED,MAAM,oBAAoB,GAAG,KAAK,CAAC,iBAAiB,IAAI,CAAC,IAAI,KAAK,CAAC,iBAAiB,IAAI,KAAK,CAAC,WAAW,CAAC;IAC1G,MAAM,UAAU,GAAW,IAAA,oBAAU,EACnC,sBAAsB,EACtB,oBAAoB,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,SAAS,CAC1D,CAAC;IAEF,IAAI,wBAAwB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACvD,IAAI,oBAAoB;QACtB,wBAAwB,EAAE,CAAC;IAE7B,OAAO,CACL,6BAAK,SAAS,EAAE,UAAU;QACxB,oBAAC,2BAA2B,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,GAAG,CAAC,EAAE,iBAAiB,EAAE,wBAAwB,IACrI,KAAK,CAAC,QAAQ,CACa,CAC1B,CACP,CAAC;AACJ,CAAC;AA1BD,kEA0BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport classnames from \"classnames\";\nimport * as React from \"react\";\n\n/** @internal */\nexport interface NestedBorderWrapperProps {\n className?: string;\n /** Number of bottom borders to draw (no more than side borders) */\n bottomBorderCount: number;\n /** Number of side borders to draw */\n borderCount: number;\n /** Node to wrap around */\n children: React.ReactNode;\n}\n\n/**\n * FlatItemNestedBorderWrapper React component.\n * Wraps provided ReactNode in nested borders recursively according to provided borderCount.\n * @internal\n */\nexport function FlatItemNestedBorderWrapper(props: NestedBorderWrapperProps) {\n if (props.borderCount <= 0) {\n return (\n <div className={props.className}>\n {props.children}\n </div>\n );\n }\n\n const isBottomBorderNeeded = props.bottomBorderCount >= 0 && props.bottomBorderCount >= props.borderCount;\n const classNames: string = classnames(\n \"nested-border-middle\",\n isBottomBorderNeeded ? \"nested-border-bottom\" : undefined,\n );\n\n let currentBottomBorderCount = props.bottomBorderCount;\n if (isBottomBorderNeeded)\n currentBottomBorderCount--;\n\n return (\n <div className={classNames}>\n <FlatItemNestedBorderWrapper className={props.className} borderCount={props.borderCount - 1} bottomBorderCount={currentBottomBorderCount}>\n {props.children}\n </FlatItemNestedBorderWrapper>\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FlatItemNestedBorderWrapper.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/FlatItemNestedBorderWrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,4DAAoC;AACpC,6CAA+B;AAa/B;;;;GAIG;AACH,SAAgB,2BAA2B,CAAC,KAA+B;IACzE,IAAI,KAAK,CAAC,WAAW,IAAI,CAAC,EAAE;QAC1B,OAAO,CACL,6BAAK,SAAS,EAAE,KAAK,CAAC,SAAS,IAC5B,KAAK,CAAC,QAAQ,CACX,CACP,CAAC;KACH;IAED,MAAM,oBAAoB,GAAG,KAAK,CAAC,iBAAiB,IAAI,CAAC,IAAI,KAAK,CAAC,iBAAiB,IAAI,KAAK,CAAC,WAAW,CAAC;IAC1G,MAAM,UAAU,GAAW,IAAA,oBAAU,EACnC,sBAAsB,EACtB,oBAAoB,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,SAAS,CAC1D,CAAC;IAEF,IAAI,wBAAwB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACvD,IAAI,oBAAoB;QACtB,wBAAwB,EAAE,CAAC;IAE7B,OAAO,CACL,6BAAK,SAAS,EAAE,UAAU;QACxB,oBAAC,2BAA2B,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,GAAG,CAAC,EAAE,iBAAiB,EAAE,wBAAwB,IACrI,KAAK,CAAC,QAAQ,CACa,CAC1B,CACP,CAAC;AACJ,CAAC;AA1BD,kEA0BC","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\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\n\r\n/** @internal */\r\nexport interface NestedBorderWrapperProps {\r\n className?: string;\r\n /** Number of bottom borders to draw (no more than side borders) */\r\n bottomBorderCount: number;\r\n /** Number of side borders to draw */\r\n borderCount: number;\r\n /** Node to wrap around */\r\n children: React.ReactNode;\r\n}\r\n\r\n/**\r\n * FlatItemNestedBorderWrapper React component.\r\n * Wraps provided ReactNode in nested borders recursively according to provided borderCount.\r\n * @internal\r\n */\r\nexport function FlatItemNestedBorderWrapper(props: NestedBorderWrapperProps) {\r\n if (props.borderCount <= 0) {\r\n return (\r\n <div className={props.className}>\r\n {props.children}\r\n </div>\r\n );\r\n }\r\n\r\n const isBottomBorderNeeded = props.bottomBorderCount >= 0 && props.bottomBorderCount >= props.borderCount;\r\n const classNames: string = classnames(\r\n \"nested-border-middle\",\r\n isBottomBorderNeeded ? \"nested-border-bottom\" : undefined,\r\n );\r\n\r\n let currentBottomBorderCount = props.bottomBorderCount;\r\n if (isBottomBorderNeeded)\r\n currentBottomBorderCount--;\r\n\r\n return (\r\n <div className={classNames}>\r\n <FlatItemNestedBorderWrapper className={props.className} borderCount={props.borderCount - 1} bottomBorderCount={currentBottomBorderCount}>\r\n {props.children}\r\n </FlatItemNestedBorderWrapper>\r\n </div>\r\n );\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyCategoryBlock.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/PropertyCategoryBlock.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,wDAAuD;AACvD,kEAA+D;AAmB/D;;;GAGG;AACH,MAAa,qBAAsB,SAAQ,KAAK,CAAC,SAAqC;IACpF,YAAY,KAAiC;QAC3C,KAAK,CAAC,KAAK,CAAC,CAAC;QAQP,kBAAa,GAAG,CAAC,YAAqB,EAAQ,EAAE;YACtD,IAAI,CAAC,eAAe,EAAE,CAAC;QACzB,CAAC,CAAC;IATF,CAAC;IAEO,eAAe;QACrB,IAAI,IAAI,CAAC,KAAK,CAAC,kBAAkB;YAC/B,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC;IAMD,gBAAgB;IACA,MAAM;QACpB,6DAA6D;QAC7D,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACnF,MAAM,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE,eAAe,EAAE,yBAAyB,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC;QACnK,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC;YACvB,CAAC,oBAAC,iCAAe,IAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,CAAC,eAAe,GAAI,CAAC,CAAC,CAAC;YACxH,QAAQ,CAAC,KAAK,CAAC;QACjB,OAAO,CACL,oBAAC,+BAAe,IACd,UAAU,EAAE,QAAQ,CAAC,MAAM,EAC3B,QAAQ,EAAE,IAAI,CAAC,aAAa,EAC5B,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,OAAO,KACR,KAAK,IAER,QAAQ,CAAC,MAAM,IAAI,QAAQ,CACZ,CACnB,CAAC;IACJ,CAAC;CACF;AAlCD,sDAkCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PropertyGrid\n */\n\nimport * as React from \"react\";\nimport { CommonProps } from \"@itwin/core-react\";\nimport { ExpandableBlock } from \"@itwin/itwinui-react\";\nimport { HighlightedText } from \"../../common/HighlightedText\";\nimport { HighlightingComponentProps } from \"../../common/HighlightingComponentProps\";\nimport { PropertyCategory } from \"../PropertyDataProvider\";\n\n/**\n * Properties for the [[PropertyCategoryBlock]] React component\n * @public\n */\nexport interface PropertyCategoryBlockProps extends CommonProps {\n /** Category of the properties */\n category: PropertyCategory;\n /** Callback to when PropertyCategoryBlock gets expended or collapsed */\n onExpansionToggled?: (categoryName: string) => void;\n /** Properties used for highlighting */\n highlight?: HighlightingComponentProps;\n /** Content */\n children?: React.ReactNode;\n}\n\n/**\n * PropertyCategoryBlock React component\n * @public\n */\nexport class PropertyCategoryBlock extends React.Component<PropertyCategoryBlockProps> {\n constructor(props: PropertyCategoryBlockProps) {\n super(props);\n }\n\n private toggleExpansion() {\n if (this.props.onExpansionToggled)\n this.props.onExpansionToggled(this.props.category.name);\n }\n\n private _handleToggle = (_isExpanding: boolean): void => {\n this.toggleExpansion();\n };\n\n /** @internal */\n public override render() {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { highlight, category, children, onExpansionToggled, ...props } = this.props;\n const activeMatchIndex = this.props.category.name === highlight?.activeHighlight?.highlightedItemIdentifier ? highlight.activeHighlight.highlightIndex : undefined;\n const label = highlight ?\n (<HighlightedText text={category.label} activeMatchIndex={activeMatchIndex} searchText={highlight.highlightedText} />) :\n category.label;\n return (\n <ExpandableBlock\n isExpanded={category.expand}\n onToggle={this._handleToggle}\n title={label}\n size=\"small\"\n {...props}\n >\n {category.expand && children}\n </ExpandableBlock>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"PropertyCategoryBlock.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/PropertyCategoryBlock.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAE/B,wDAAuD;AACvD,kEAA+D;AAmB/D;;;GAGG;AACH,MAAa,qBAAsB,SAAQ,KAAK,CAAC,SAAqC;IACpF,YAAY,KAAiC;QAC3C,KAAK,CAAC,KAAK,CAAC,CAAC;QAQP,kBAAa,GAAG,CAAC,YAAqB,EAAQ,EAAE;YACtD,IAAI,CAAC,eAAe,EAAE,CAAC;QACzB,CAAC,CAAC;IATF,CAAC;IAEO,eAAe;QACrB,IAAI,IAAI,CAAC,KAAK,CAAC,kBAAkB;YAC/B,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC;IAMD,gBAAgB;IACA,MAAM;QACpB,6DAA6D;QAC7D,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACnF,MAAM,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE,eAAe,EAAE,yBAAyB,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC;QACnK,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC;YACvB,CAAC,oBAAC,iCAAe,IAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,CAAC,eAAe,GAAI,CAAC,CAAC,CAAC;YACxH,QAAQ,CAAC,KAAK,CAAC;QACjB,OAAO,CACL,oBAAC,+BAAe,IACd,UAAU,EAAE,QAAQ,CAAC,MAAM,EAC3B,QAAQ,EAAE,IAAI,CAAC,aAAa,EAC5B,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,OAAO,KACR,KAAK,IAER,QAAQ,CAAC,MAAM,IAAI,QAAQ,CACZ,CACnB,CAAC;IACJ,CAAC;CACF;AAlCD,sDAkCC","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 { CommonProps } from \"@itwin/core-react\";\r\nimport { ExpandableBlock } from \"@itwin/itwinui-react\";\r\nimport { HighlightedText } from \"../../common/HighlightedText\";\r\nimport { HighlightingComponentProps } from \"../../common/HighlightingComponentProps\";\r\nimport { PropertyCategory } from \"../PropertyDataProvider\";\r\n\r\n/**\r\n * Properties for the [[PropertyCategoryBlock]] React component\r\n * @public\r\n */\r\nexport interface PropertyCategoryBlockProps extends CommonProps {\r\n /** Category of the properties */\r\n category: PropertyCategory;\r\n /** Callback to when PropertyCategoryBlock gets expended or collapsed */\r\n onExpansionToggled?: (categoryName: string) => void;\r\n /** Properties used for highlighting */\r\n highlight?: HighlightingComponentProps;\r\n /** Content */\r\n children?: React.ReactNode;\r\n}\r\n\r\n/**\r\n * PropertyCategoryBlock React component\r\n * @public\r\n */\r\nexport class PropertyCategoryBlock extends React.Component<PropertyCategoryBlockProps> {\r\n constructor(props: PropertyCategoryBlockProps) {\r\n super(props);\r\n }\r\n\r\n private toggleExpansion() {\r\n if (this.props.onExpansionToggled)\r\n this.props.onExpansionToggled(this.props.category.name);\r\n }\r\n\r\n private _handleToggle = (_isExpanding: boolean): void => {\r\n this.toggleExpansion();\r\n };\r\n\r\n /** @internal */\r\n public override render() {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { highlight, category, children, onExpansionToggled, ...props } = this.props;\r\n const activeMatchIndex = this.props.category.name === highlight?.activeHighlight?.highlightedItemIdentifier ? highlight.activeHighlight.highlightIndex : undefined;\r\n const label = highlight ?\r\n (<HighlightedText text={category.label} activeMatchIndex={activeMatchIndex} searchText={highlight.highlightedText} />) :\r\n category.label;\r\n return (\r\n <ExpandableBlock\r\n isExpanded={category.expand}\r\n onToggle={this._handleToggle}\r\n title={label}\r\n size=\"small\"\r\n {...props}\r\n >\r\n {category.expand && children}\r\n </ExpandableBlock>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyGrid.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/PropertyGrid.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE/F;;GAEG;AACH,+BAA6B;AAC7B,4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AC,qBAAqB,GAClD,CACH,CACuC,CAC3C,CAAC,CAAC,CAAC,SAAS;QACZ,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAC1C,6BAAK,SAAS,EAAC,qBAAqB,IAEhC,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,uBAAuB,EAAE,EAAE,CAAC,CACjE,oBAAC,mBAAmB,OAAK,KAAK,EAAE,GAAG,EAAE,uBAAuB,CAAC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,EAAE,uBAAuB,GAAI,CAC5H,CAAC,CAEA,CACP,CAAC,CAAC,CAAC,SAAS,CACS,CACzB,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module PropertyGrid\n */\nimport \"./PropertyGrid.scss\";\nimport classnames from \"classnames\";\nimport { produce } from \"immer\";\nimport * as React from \"react\";\nimport { DisposeFunc } from \"@itwin/core-bentley\";\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { Orientation, ResizableContainerObserver } from \"@itwin/core-react\";\nimport { DelayedSpinner } from \"../../common/DelayedSpinner\";\nimport { IPropertyDataProvider, PropertyCategory, PropertyData } from \"../PropertyDataProvider\";\nimport { ColumnResizeRelatedPropertyListProps, ColumnResizingPropertyListPropsSupplier } from \"./ColumnResizingPropertyListPropsSupplier\";\nimport { PropertyCategoryBlock } from \"./PropertyCategoryBlock\";\nimport { CommonPropertyGridProps, PropertyGridCommons } from \"./PropertyGridCommons\";\nimport { PropertyGridEventsRelatedPropsSupplier } from \"./PropertyGridEventsRelatedPropsSupplier\";\nimport { PropertyList, PropertyListProps } from \"./PropertyList\";\n\n/** Properties for [[PropertyGrid]] React component\n * @public\n * @deprecated in 3.x. Use [[VirtualizedPropertyGrid]] instead.\n */\nexport interface PropertyGridProps extends CommonPropertyGridProps {\n /** Property data provider */\n dataProvider: IPropertyDataProvider;\n}\n\ninterface CategorizedPropertyGridRecords {\n category: PropertyCategory;\n records: PropertyRecord[];\n children: CategorizedPropertyGridRecords[];\n}\n\n/** State of [[PropertyGrid]] React component\n * @internal\n */\ninterface PropertyGridState {\n /** List of PropertyGrid categories */\n categories: CategorizedPropertyGridRecords[];\n /** Actual orientation used by the property grid */\n orientation: Orientation;\n /** If property grid currently loading data, the loading start time */\n loadStart?: Date;\n /** Width of PropertyGrid */\n width: number;\n}\n\n/** PropertyGrid React component.\n * @public\n * @deprecated in 3.x. Use [[VirtualizedPropertyGrid]] instead.\n */\nexport class PropertyGrid extends React.Component<PropertyGridProps, PropertyGridState> { // eslint-disable-line deprecation/deprecation\n private _dataChangesListenerDisposeFunc?: DisposeFunc;\n private _isMounted = false;\n private _isInDataRequest = false;\n private _hasPendingDataRequest = false;\n\n /** @internal */\n constructor(props: PropertyGridProps) { // eslint-disable-line deprecation/deprecation\n super(props);\n this.state = {\n categories: [],\n orientation: this.getPreferredOrientation(),\n width: 0,\n };\n }\n\n /** @internal */\n public override componentDidMount() {\n this._isMounted = true;\n this._dataChangesListenerDisposeFunc = this.props.dataProvider.onDataChanged.addListener(this._onPropertyDataChanged);\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.gatherData();\n }\n\n /** @internal */\n public override componentWillUnmount() {\n // istanbul ignore else\n if (this._dataChangesListenerDisposeFunc) {\n this._dataChangesListenerDisposeFunc();\n this._dataChangesListenerDisposeFunc = undefined;\n }\n this._isMounted = false;\n }\n\n public override componentDidUpdate(prevProps: PropertyGridProps) { // eslint-disable-line deprecation/deprecation\n if (this.props.dataProvider !== prevProps.dataProvider) {\n // istanbul ignore else\n if (this._dataChangesListenerDisposeFunc)\n this._dataChangesListenerDisposeFunc();\n this._dataChangesListenerDisposeFunc = this.props.dataProvider.onDataChanged.addListener(this._onPropertyDataChanged);\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.gatherData();\n }\n\n if (this.props.orientation !== prevProps.orientation\n || this.props.isOrientationFixed !== prevProps.isOrientationFixed\n || this.props.horizontalOrientationMinWidth !== prevProps.horizontalOrientationMinWidth)\n this.updateOrientation(this.state.width);\n }\n\n private _onPropertyDataChanged = () => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.gatherData();\n };\n\n private async gatherData(): Promise<void> {\n if (this._isInDataRequest) {\n this._hasPendingDataRequest = true;\n return;\n }\n\n this.setState((prev) => prev.loadStart ? null : { loadStart: new Date() });\n\n this._isInDataRequest = true;\n let propertyData: PropertyData;\n try {\n propertyData = await this.props.dataProvider.getData();\n } finally {\n this._isInDataRequest = false;\n }\n\n if (!this._isMounted)\n return;\n\n if (this._hasPendingDataRequest) {\n this._hasPendingDataRequest = false;\n return this.gatherData();\n }\n\n this.setState((prevState) => {\n const buildCategoriesHierarchy = (newCategories: PropertyCategory[], stateCategories: CategorizedPropertyGridRecords[] | undefined) =>\n newCategories.map((category): CategorizedPropertyGridRecords => {\n const matchingStateCategory = findCategory(stateCategories ?? [], category.name, false);\n return {\n category: { ...category, expand: matchingStateCategory?.category?.expand ?? category.expand },\n records: propertyData.records[category.name] ?? [],\n children: buildCategoriesHierarchy(category.childCategories ?? [], matchingStateCategory?.children),\n };\n });\n return {\n categories: buildCategoriesHierarchy(propertyData.categories, prevState.categories),\n loadStart: undefined,\n };\n });\n }\n\n private getPreferredOrientation(): Orientation {\n return (this.props.orientation !== undefined) ? this.props.orientation : Orientation.Horizontal;\n }\n\n private _onResize = (width: number) => {\n this.updateOrientation(width);\n };\n\n private _onCategoryExpansionToggled = (categoryName: string) => {\n this.setState((state) => {\n return produce(state, (draft) => {\n const records = findCategory(draft.categories, categoryName, true);\n // istanbul ignore else\n if (records) {\n const category = records.category;\n category.expand = !category.expand;\n }\n });\n });\n };\n\n private updateOrientation(width: number): void {\n const { orientation, isOrientationFixed, horizontalOrientationMinWidth } = { ...this.props };\n const currentOrientation = PropertyGridCommons.getCurrentOrientation(width, orientation, isOrientationFixed, horizontalOrientationMinWidth);\n\n if (currentOrientation !== this.state.orientation || width !== this.state.width)\n this.setState({ orientation: currentOrientation, width });\n }\n\n /** @internal */\n public override render() {\n if (this.state.loadStart) {\n return (\n <div className=\"components-property-grid-loader\">\n <DelayedSpinner loadStart={this.state.loadStart} size=\"large\" />\n </div>\n );\n }\n\n return (\n <PropertyGridEventsRelatedPropsSupplier\n isPropertySelectionEnabled={this.props.isPropertySelectionEnabled ?? false}\n isPropertySelectionOnRightClickEnabled={this.props.isPropertySelectionOnRightClickEnabled}\n isPropertyEditingEnabled={this.props.isPropertyEditingEnabled}\n isPropertyHoverEnabled={this.props.isPropertyHoverEnabled ?? false}\n onPropertyContextMenu={this.props.onPropertyContextMenu}\n onPropertyUpdated={this.props.onPropertyUpdated}\n onPropertySelectionChanged={this.props.onPropertySelectionChanged}\n >\n {(selectionContext) => (\n <div className={classnames(\"components-property-grid-wrapper\", this.props.className)} style={this.props.style}>\n <div className={classnames(\"components-property-grid\", \"components-smallEditor-host\")}>\n <div className=\"property-categories\">\n {\n this.state.categories.map((categorizedRecords: CategorizedPropertyGridRecords) => (\n <NestedCategoryBlock\n {...selectionContext}\n key={categorizedRecords.category.name}\n categorizedRecords={categorizedRecords}\n onCategoryExpansionToggled={this._onCategoryExpansionToggled}\n orientation={this.state.orientation}\n propertyValueRendererManager={this.props.propertyValueRendererManager}\n actionButtonRenderers={this.props.actionButtonRenderers}\n />\n ))\n }\n </div>\n </div>\n <ResizableContainerObserver onResize={this._onResize} />\n </div>\n )}\n </PropertyGridEventsRelatedPropsSupplier>\n );\n }\n}\n\nfunction findCategory(categories: CategorizedPropertyGridRecords[], lookupName: string, recurseIntoChildren: boolean): CategorizedPropertyGridRecords | undefined {\n for (const category of categories) {\n if (category.category.name === lookupName)\n return category;\n if (recurseIntoChildren) {\n const matchingChild = findCategory(category.children, lookupName, recurseIntoChildren);\n if (matchingChild)\n return matchingChild;\n }\n }\n return undefined;\n}\n\ninterface NestedCategoryBlockProps extends Omit<PropertyListProps, (keyof ColumnResizeRelatedPropertyListProps) | \"properties\"> {\n categorizedRecords: CategorizedPropertyGridRecords;\n onCategoryExpansionToggled: (categoryName: string) => void;\n orientation: Orientation;\n}\nfunction NestedCategoryBlock(props: NestedCategoryBlockProps) {\n return (\n <PropertyCategoryBlock\n category={props.categorizedRecords.category}\n onExpansionToggled={props.onCategoryExpansionToggled}\n >\n {props.categorizedRecords.records.length ? (\n <ColumnResizingPropertyListPropsSupplier orientation={props.orientation}>\n {(partialListProps: ColumnResizeRelatedPropertyListProps) => (\n <PropertyList\n {...partialListProps}\n orientation={props.orientation}\n category={props.categorizedRecords.category}\n properties={props.categorizedRecords.records}\n selectedPropertyKey={props.selectedPropertyKey}\n onPropertyClicked={props.onPropertyClicked}\n onPropertyRightClicked={props.onPropertyRightClicked}\n onPropertyContextMenu={props.onPropertyContextMenu}\n propertyValueRendererManager={props.propertyValueRendererManager}\n editingPropertyKey={props.editingPropertyKey}\n onEditCommit={props.onEditCommit}\n onEditCancel={props.onEditCancel}\n isPropertyHoverEnabled={props.isPropertyHoverEnabled}\n isPropertySelectionEnabled={props.isPropertySelectionEnabled}\n isPropertyRightClickSelectionEnabled={props.isPropertyRightClickSelectionEnabled}\n actionButtonRenderers={props.actionButtonRenderers}\n />\n )}\n </ColumnResizingPropertyListPropsSupplier>\n ) : undefined}\n {props.categorizedRecords.children.length ? (\n <div className=\"property-categories\">\n {\n props.categorizedRecords.children.map((categorizedChildRecords) => (\n <NestedCategoryBlock {...props} key={categorizedChildRecords.category.name} categorizedRecords={categorizedChildRecords} />\n ))\n }\n </div>\n ) : undefined}\n </PropertyCategoryBlock>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"PropertyGrid.js","sourceRoot":"","sources":["../../../../../src/components-react/propertygrid/component/PropertyGrid.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;;;;;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K,CAAC,oCAAoC,EAChF,qBAAqB,EAAE,KAAK,CAAC,qBAAqB,GAClD,CACH,CACuC,CAC3C,CAAC,CAAC,CAAC,SAAS;QACZ,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAC1C,6BAAK,SAAS,EAAC,qBAAqB,IAEhC,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,uBAAuB,EAAE,EAAE,CAAC,CACjE,oBAAC,mBAAmB,OAAK,KAAK,EAAE,GAAG,EAAE,uBAAuB,CAAC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,EAAE,uBAAuB,GAAI,CAC5H,CAAC,CAEA,CACP,CAAC,CAAC,CAAC,SAAS,CACS,CACzB,CAAC;AACJ,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\r\n/** @packageDocumentation\r\n * @module PropertyGrid\r\n */\r\nimport \"./PropertyGrid.scss\";\r\nimport classnames from \"classnames\";\r\nimport { produce } from \"immer\";\r\nimport * as React from \"react\";\r\nimport { DisposeFunc } from \"@itwin/core-bentley\";\r\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\r\nimport { Orientation, ResizableContainerObserver } from \"@itwin/core-react\";\r\nimport { DelayedSpinner } from \"../../common/DelayedSpinner\";\r\nimport { IPropertyDataProvider, PropertyCategory, PropertyData } from \"../PropertyDataProvider\";\r\nimport { ColumnResizeRelatedPropertyListProps, ColumnResizingPropertyListPropsSupplier } from \"./ColumnResizingPropertyListPropsSupplier\";\r\nimport { PropertyCategoryBlock } from \"./PropertyCategoryBlock\";\r\nimport { CommonPropertyGridProps, PropertyGridCommons } from \"./PropertyGridCommons\";\r\nimport { PropertyGridEventsRelatedPropsSupplier } from \"./PropertyGridEventsRelatedPropsSupplier\";\r\nimport { PropertyList, PropertyListProps } from \"./PropertyList\";\r\n\r\n/** Properties for [[PropertyGrid]] React component\r\n * @public\r\n * @deprecated in 3.x. Use [[VirtualizedPropertyGrid]] instead.\r\n */\r\nexport interface PropertyGridProps extends CommonPropertyGridProps {\r\n /** Property data provider */\r\n dataProvider: IPropertyDataProvider;\r\n}\r\n\r\ninterface CategorizedPropertyGridRecords {\r\n category: PropertyCategory;\r\n records: PropertyRecord[];\r\n children: CategorizedPropertyGridRecords[];\r\n}\r\n\r\n/** State of [[PropertyGrid]] React component\r\n * @internal\r\n */\r\ninterface PropertyGridState {\r\n /** List of PropertyGrid categories */\r\n categories: CategorizedPropertyGridRecords[];\r\n /** Actual orientation used by the property grid */\r\n orientation: Orientation;\r\n /** If property grid currently loading data, the loading start time */\r\n loadStart?: Date;\r\n /** Width of PropertyGrid */\r\n width: number;\r\n}\r\n\r\n/** PropertyGrid React component.\r\n * @public\r\n * @deprecated in 3.x. Use [[VirtualizedPropertyGrid]] instead.\r\n */\r\nexport class PropertyGrid extends React.Component<PropertyGridProps, PropertyGridState> { // eslint-disable-line deprecation/deprecation\r\n private _dataChangesListenerDisposeFunc?: DisposeFunc;\r\n private _isMounted = false;\r\n private _isInDataRequest = false;\r\n private _hasPendingDataRequest = false;\r\n\r\n /** @internal */\r\n constructor(props: PropertyGridProps) { // eslint-disable-line deprecation/deprecation\r\n super(props);\r\n this.state = {\r\n categories: [],\r\n orientation: this.getPreferredOrientation(),\r\n width: 0,\r\n };\r\n }\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n this._isMounted = true;\r\n this._dataChangesListenerDisposeFunc = this.props.dataProvider.onDataChanged.addListener(this._onPropertyDataChanged);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.gatherData();\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n // istanbul ignore else\r\n if (this._dataChangesListenerDisposeFunc) {\r\n this._dataChangesListenerDisposeFunc();\r\n this._dataChangesListenerDisposeFunc = undefined;\r\n }\r\n this._isMounted = false;\r\n }\r\n\r\n public override componentDidUpdate(prevProps: PropertyGridProps) { // eslint-disable-line deprecation/deprecation\r\n if (this.props.dataProvider !== prevProps.dataProvider) {\r\n // istanbul ignore else\r\n if (this._dataChangesListenerDisposeFunc)\r\n this._dataChangesListenerDisposeFunc();\r\n this._dataChangesListenerDisposeFunc = this.props.dataProvider.onDataChanged.addListener(this._onPropertyDataChanged);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.gatherData();\r\n }\r\n\r\n if (this.props.orientation !== prevProps.orientation\r\n || this.props.isOrientationFixed !== prevProps.isOrientationFixed\r\n || this.props.horizontalOrientationMinWidth !== prevProps.horizontalOrientationMinWidth)\r\n this.updateOrientation(this.state.width);\r\n }\r\n\r\n private _onPropertyDataChanged = () => {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.gatherData();\r\n };\r\n\r\n private async gatherData(): Promise<void> {\r\n if (this._isInDataRequest) {\r\n this._hasPendingDataRequest = true;\r\n return;\r\n }\r\n\r\n this.setState((prev) => prev.loadStart ? null : { loadStart: new Date() });\r\n\r\n this._isInDataRequest = true;\r\n let propertyData: PropertyData;\r\n try {\r\n propertyData = await this.props.dataProvider.getData();\r\n } finally {\r\n this._isInDataRequest = false;\r\n }\r\n\r\n if (!this._isMounted)\r\n return;\r\n\r\n if (this._hasPendingDataRequest) {\r\n this._hasPendingDataRequest = false;\r\n return this.gatherData();\r\n }\r\n\r\n this.setState((prevState) => {\r\n const buildCategoriesHierarchy = (newCategories: PropertyCategory[], stateCategories: CategorizedPropertyGridRecords[] | undefined) =>\r\n newCategories.map((category): CategorizedPropertyGridRecords => {\r\n const matchingStateCategory = findCategory(stateCategories ?? [], category.name, false);\r\n return {\r\n category: { ...category, expand: matchingStateCategory?.category?.expand ?? category.expand },\r\n records: propertyData.records[category.name] ?? [],\r\n children: buildCategoriesHierarchy(category.childCategories ?? [], matchingStateCategory?.children),\r\n };\r\n });\r\n return {\r\n categories: buildCategoriesHierarchy(propertyData.categories, prevState.categories),\r\n loadStart: undefined,\r\n };\r\n });\r\n }\r\n\r\n private getPreferredOrientation(): Orientation {\r\n return (this.props.orientation !== undefined) ? this.props.orientation : Orientation.Horizontal;\r\n }\r\n\r\n private _onResize = (width: number) => {\r\n this.updateOrientation(width);\r\n };\r\n\r\n private _onCategoryExpansionToggled = (categoryName: string) => {\r\n this.setState((state) => {\r\n return produce(state, (draft) => {\r\n const records = findCategory(draft.categories, categoryName, true);\r\n // istanbul ignore else\r\n if (records) {\r\n const category = records.category;\r\n category.expand = !category.expand;\r\n }\r\n });\r\n });\r\n };\r\n\r\n private updateOrientation(width: number): void {\r\n const { orientation, isOrientationFixed, horizontalOrientationMinWidth } = { ...this.props };\r\n const currentOrientation = PropertyGridCommons.getCurrentOrientation(width, orientation, isOrientationFixed, horizontalOrientationMinWidth);\r\n\r\n if (currentOrientation !== this.state.orientation || width !== this.state.width)\r\n this.setState({ orientation: currentOrientation, width });\r\n }\r\n\r\n /** @internal */\r\n public override render() {\r\n if (this.state.loadStart) {\r\n return (\r\n <div className=\"components-property-grid-loader\">\r\n <DelayedSpinner loadStart={this.state.loadStart} size=\"large\" />\r\n </div>\r\n );\r\n }\r\n\r\n return (\r\n <PropertyGridEventsRelatedPropsSupplier\r\n isPropertySelectionEnabled={this.props.isPropertySelectionEnabled ?? false}\r\n isPropertySelectionOnRightClickEnabled={this.props.isPropertySelectionOnRightClickEnabled}\r\n isPropertyEditingEnabled={this.props.isPropertyEditingEnabled}\r\n isPropertyHoverEnabled={this.props.isPropertyHoverEnabled ?? false}\r\n onPropertyContextMenu={this.props.onPropertyContextMenu}\r\n onPropertyUpdated={this.props.onPropertyUpdated}\r\n onPropertySelectionChanged={this.props.onPropertySelectionChanged}\r\n >\r\n {(selectionContext) => (\r\n <div className={classnames(\"components-property-grid-wrapper\", this.props.className)} style={this.props.style}>\r\n <div className={classnames(\"components-property-grid\", \"components-smallEditor-host\")}>\r\n <div className=\"property-categories\">\r\n {\r\n this.state.categories.map((categorizedRecords: CategorizedPropertyGridRecords) => (\r\n <NestedCategoryBlock\r\n {...selectionContext}\r\n key={categorizedRecords.category.name}\r\n categorizedRecords={categorizedRecords}\r\n onCategoryExpansionToggled={this._onCategoryExpansionToggled}\r\n orientation={this.state.orientation}\r\n propertyValueRendererManager={this.props.propertyValueRendererManager}\r\n actionButtonRenderers={this.props.actionButtonRenderers}\r\n />\r\n ))\r\n }\r\n </div>\r\n </div>\r\n <ResizableContainerObserver onResize={this._onResize} />\r\n </div>\r\n )}\r\n </PropertyGridEventsRelatedPropsSupplier>\r\n );\r\n }\r\n}\r\n\r\nfunction findCategory(categories: CategorizedPropertyGridRecords[], lookupName: string, recurseIntoChildren: boolean): CategorizedPropertyGridRecords | undefined {\r\n for (const category of categories) {\r\n if (category.category.name === lookupName)\r\n return category;\r\n if (recurseIntoChildren) {\r\n const matchingChild = findCategory(category.children, lookupName, recurseIntoChildren);\r\n if (matchingChild)\r\n return matchingChild;\r\n }\r\n }\r\n return undefined;\r\n}\r\n\r\ninterface NestedCategoryBlockProps extends Omit<PropertyListProps, (keyof ColumnResizeRelatedPropertyListProps) | \"properties\"> {\r\n categorizedRecords: CategorizedPropertyGridRecords;\r\n onCategoryExpansionToggled: (categoryName: string) => void;\r\n orientation: Orientation;\r\n}\r\nfunction NestedCategoryBlock(props: NestedCategoryBlockProps) {\r\n return (\r\n <PropertyCategoryBlock\r\n category={props.categorizedRecords.category}\r\n onExpansionToggled={props.onCategoryExpansionToggled}\r\n >\r\n {props.categorizedRecords.records.length ? (\r\n <ColumnResizingPropertyListPropsSupplier orientation={props.orientation}>\r\n {(partialListProps: ColumnResizeRelatedPropertyListProps) => (\r\n <PropertyList\r\n {...partialListProps}\r\n orientation={props.orientation}\r\n category={props.categorizedRecords.category}\r\n properties={props.categorizedRecords.records}\r\n selectedPropertyKey={props.selectedPropertyKey}\r\n onPropertyClicked={props.onPropertyClicked}\r\n onPropertyRightClicked={props.onPropertyRightClicked}\r\n onPropertyContextMenu={props.onPropertyContextMenu}\r\n propertyValueRendererManager={props.propertyValueRendererManager}\r\n editingPropertyKey={props.editingPropertyKey}\r\n onEditCommit={props.onEditCommit}\r\n onEditCancel={props.onEditCancel}\r\n isPropertyHoverEnabled={props.isPropertyHoverEnabled}\r\n isPropertySelectionEnabled={props.isPropertySelectionEnabled}\r\n isPropertyRightClickSelectionEnabled={props.isPropertyRightClickSelectionEnabled}\r\n actionButtonRenderers={props.actionButtonRenderers}\r\n />\r\n )}\r\n </ColumnResizingPropertyListPropsSupplier>\r\n ) : undefined}\r\n {props.categorizedRecords.children.length ? (\r\n <div className=\"property-categories\">\r\n {\r\n props.categorizedRecords.children.map((categorizedChildRecords) => (\r\n <NestedCategoryBlock {...props} key={categorizedChildRecords.category.name} categorizedRecords={categorizedChildRecords} />\r\n ))\r\n }\r\n </div>\r\n ) : undefined}\r\n </PropertyCategoryBlock>\r\n );\r\n}\r\n"]}
|